@@ -47,11 +47,21 @@ pub static IMPORT_SIGNATURES: &[(&str, &[ValType], &[ValType])] = &[
4747 & [ ValType :: I32 ; 2 ] ,
4848 & [ ValType :: I32 ] ,
4949 ) ,
50+ (
51+ "componentize-py#ToCanonU32" ,
52+ & [ ValType :: I32 ; 2 ] ,
53+ & [ ValType :: I32 ] ,
54+ ) ,
5055 (
5156 "componentize-py#ToCanonI64" ,
5257 & [ ValType :: I32 ; 2 ] ,
5358 & [ ValType :: I64 ] ,
5459 ) ,
60+ (
61+ "componentize-py#ToCanonU64" ,
62+ & [ ValType :: I32 ; 2 ] ,
63+ & [ ValType :: I64 ] ,
64+ ) ,
5565 (
5666 "componentize-py#ToCanonF32" ,
5767 & [ ValType :: I32 ; 2 ] ,
@@ -93,11 +103,21 @@ pub static IMPORT_SIGNATURES: &[(&str, &[ValType], &[ValType])] = &[
93103 & [ ValType :: I32 ; 2 ] ,
94104 & [ ValType :: I32 ] ,
95105 ) ,
106+ (
107+ "componentize-py#FromCanonU32" ,
108+ & [ ValType :: I32 ; 2 ] ,
109+ & [ ValType :: I32 ] ,
110+ ) ,
96111 (
97112 "componentize-py#FromCanonI64" ,
98113 & [ ValType :: I32 , ValType :: I64 ] ,
99114 & [ ValType :: I32 ] ,
100115 ) ,
116+ (
117+ "componentize-py#FromCanonU64" ,
118+ & [ ValType :: I32 , ValType :: I64 ] ,
119+ & [ ValType :: I32 ] ,
120+ ) ,
101121 (
102122 "componentize-py#FromCanonF32" ,
103123 & [ ValType :: I32 , ValType :: F32 ] ,
@@ -592,20 +612,34 @@ impl<'a> FunctionBindgen<'a> {
592612 * IMPORTS . get ( "componentize-py#ToCanonBool" ) . unwrap ( ) ,
593613 ) ) ;
594614 }
595- Type :: U8 | Type :: U16 | Type :: U32 | Type :: S8 | Type :: S16 | Type :: S32 => {
615+ Type :: S8 | Type :: S16 | Type :: S32 => {
596616 self . push ( Ins :: LocalGet ( context) ) ;
597617 self . push ( Ins :: LocalGet ( value) ) ;
598618 self . push ( Ins :: Call (
599619 * IMPORTS . get ( "componentize-py#ToCanonI32" ) . unwrap ( ) ,
600620 ) ) ;
601621 }
602- Type :: U64 | Type :: S64 => {
622+ Type :: U8 | Type :: U16 | Type :: U32 => {
623+ self . push ( Ins :: LocalGet ( context) ) ;
624+ self . push ( Ins :: LocalGet ( value) ) ;
625+ self . push ( Ins :: Call (
626+ * IMPORTS . get ( "componentize-py#ToCanonU32" ) . unwrap ( ) ,
627+ ) ) ;
628+ }
629+ Type :: S64 => {
603630 self . push ( Ins :: LocalGet ( context) ) ;
604631 self . push ( Ins :: LocalGet ( value) ) ;
605632 self . push ( Ins :: Call (
606633 * IMPORTS . get ( "componentize-py#ToCanonI64" ) . unwrap ( ) ,
607634 ) ) ;
608635 }
636+ Type :: U64 => {
637+ self . push ( Ins :: LocalGet ( context) ) ;
638+ self . push ( Ins :: LocalGet ( value) ) ;
639+ self . push ( Ins :: Call (
640+ * IMPORTS . get ( "componentize-py#ToCanonU64" ) . unwrap ( ) ,
641+ ) ) ;
642+ }
609643 Type :: F32 => {
610644 self . push ( Ins :: LocalGet ( context) ) ;
611645 self . push ( Ins :: LocalGet ( value) ) ;
@@ -1417,20 +1451,34 @@ impl<'a> FunctionBindgen<'a> {
14171451 * IMPORTS . get ( "componentize-py#FromCanonBool" ) . unwrap ( ) ,
14181452 ) ) ;
14191453 }
1420- Type :: U8 | Type :: U16 | Type :: U32 | Type :: S8 | Type :: S16 | Type :: S32 => {
1454+ Type :: S8 | Type :: S16 | Type :: S32 => {
14211455 self . push ( Ins :: LocalGet ( context) ) ;
14221456 self . push ( Ins :: LocalGet ( value[ 0 ] ) ) ;
14231457 self . push ( Ins :: Call (
14241458 * IMPORTS . get ( "componentize-py#FromCanonI32" ) . unwrap ( ) ,
14251459 ) ) ;
14261460 }
1427- Type :: U64 | Type :: S64 => {
1461+ Type :: U8 | Type :: U16 | Type :: U32 => {
1462+ self . push ( Ins :: LocalGet ( context) ) ;
1463+ self . push ( Ins :: LocalGet ( value[ 0 ] ) ) ;
1464+ self . push ( Ins :: Call (
1465+ * IMPORTS . get ( "componentize-py#FromCanonU32" ) . unwrap ( ) ,
1466+ ) ) ;
1467+ }
1468+ Type :: S64 => {
14281469 self . push ( Ins :: LocalGet ( context) ) ;
14291470 self . push ( Ins :: LocalGet ( value[ 0 ] ) ) ;
14301471 self . push ( Ins :: Call (
14311472 * IMPORTS . get ( "componentize-py#FromCanonI64" ) . unwrap ( ) ,
14321473 ) ) ;
14331474 }
1475+ Type :: U64 => {
1476+ self . push ( Ins :: LocalGet ( context) ) ;
1477+ self . push ( Ins :: LocalGet ( value[ 0 ] ) ) ;
1478+ self . push ( Ins :: Call (
1479+ * IMPORTS . get ( "componentize-py#FromCanonU64" ) . unwrap ( ) ,
1480+ ) ) ;
1481+ }
14341482 Type :: F32 => {
14351483 self . push ( Ins :: LocalGet ( context) ) ;
14361484 self . push ( Ins :: LocalGet ( value[ 0 ] ) ) ;
0 commit comments