@@ -626,7 +626,7 @@ export class Module {
626626 offset : Index = 0 ,
627627 align : Index = bytes // naturally aligned by default
628628 ) : ExpressionRef {
629- return binaryen . _BinaryenLoad ( this . ref , bytes , signed ? 1 : 0 , offset , align , type , ptr ) ;
629+ return binaryen . _BinaryenLoad ( this . ref , bytes , signed , offset , align , type , ptr ) ;
630630 }
631631
632632 store (
@@ -1797,7 +1797,7 @@ export class Module {
17971797 )
17981798 : binaryen . _BinaryenLoad ( this . ref ,
17991799 binaryen . _BinaryenLoadGetBytes ( expr ) ,
1800- binaryen . _BinaryenLoadIsSigned ( expr ) ? 1 : 0 ,
1800+ binaryen . _BinaryenLoadIsSigned ( expr ) ,
18011801 binaryen . _BinaryenLoadGetOffset ( expr ) ,
18021802 binaryen . _BinaryenLoadGetAlign ( expr ) ,
18031803 binaryen . _BinaryenExpressionGetType ( expr ) ,
@@ -2013,8 +2013,8 @@ export function getBlockChildCount(expr: ExpressionRef): Index {
20132013 return binaryen . _BinaryenBlockGetNumChildren ( expr ) ;
20142014}
20152015
2016- export function getBlockChild ( expr : ExpressionRef , index : Index ) : ExpressionRef {
2017- return binaryen . _BinaryenBlockGetChild ( expr , index ) ;
2016+ export function getBlockChildAt ( expr : ExpressionRef , index : Index ) : ExpressionRef {
2017+ return binaryen . _BinaryenBlockGetChildAt ( expr , index ) ;
20182018}
20192019
20202020export function getIfCondition ( expr : ExpressionRef ) : ExpressionRef {
@@ -2073,8 +2073,8 @@ export function getCallOperandCount(expr: ExpressionRef): i32 {
20732073 return binaryen . _BinaryenCallGetNumOperands ( expr ) ;
20742074}
20752075
2076- export function getCallOperand ( expr : ExpressionRef , index : Index ) : ExpressionRef {
2077- return binaryen . _BinaryenCallGetOperand ( expr , index ) ;
2076+ export function getCallOperandAt ( expr : ExpressionRef , index : Index ) : ExpressionRef {
2077+ return binaryen . _BinaryenCallGetOperandAt ( expr , index ) ;
20782078}
20792079
20802080export function getHostOp ( expr : ExpressionRef ) : ExpressionRef {
@@ -2085,8 +2085,8 @@ export function getHostOperandCount(expr: ExpressionRef): Index {
20852085 return binaryen . _BinaryenHostGetNumOperands ( expr ) ;
20862086}
20872087
2088- export function getHostOperand ( expr : ExpressionRef , index : Index ) : ExpressionRef {
2089- return binaryen . _BinaryenHostGetOperand ( expr , index ) ;
2088+ export function getHostOperandAt ( expr : ExpressionRef , index : Index ) : ExpressionRef {
2089+ return binaryen . _BinaryenHostGetOperandAt ( expr , index ) ;
20902090}
20912091
20922092export function getHostName ( expr : ExpressionRef ) : string | null {
@@ -2495,7 +2495,7 @@ export function needsExplicitUnreachable(expr: ExpressionRef): bool {
24952495 let numChildren = binaryen . _BinaryenBlockGetNumChildren ( expr ) ; // last child needs unreachable
24962496 return (
24972497 numChildren > 0 &&
2498- needsExplicitUnreachable ( binaryen . _BinaryenBlockGetChild ( expr , numChildren - 1 ) )
2498+ needsExplicitUnreachable ( binaryen . _BinaryenBlockGetChildAt ( expr , numChildren - 1 ) )
24992499 ) ;
25002500 }
25012501 }
@@ -2512,7 +2512,7 @@ export function traverse<T>(
25122512 switch ( getExpressionId ( expr ) ) {
25132513 case ExpressionId . Block : {
25142514 for ( let i : Index = 0 , n = binaryen . _BinaryenBlockGetNumChildren ( expr ) ; i < n ; ++ i ) {
2515- visit ( binaryen . _BinaryenBlockGetChild ( expr , i ) , data ) ;
2515+ visit ( binaryen . _BinaryenBlockGetChildAt ( expr , i ) , data ) ;
25162516 }
25172517 break ;
25182518 }
@@ -2538,13 +2538,13 @@ export function traverse<T>(
25382538 }
25392539 case ExpressionId . Call : {
25402540 for ( let i : Index = 0 , n = binaryen . _BinaryenCallGetNumOperands ( expr ) ; i < n ; ++ i ) {
2541- visit ( binaryen . _BinaryenCallGetOperand ( expr , i ) , data ) ;
2541+ visit ( binaryen . _BinaryenCallGetOperandAt ( expr , i ) , data ) ;
25422542 }
25432543 break ;
25442544 }
25452545 case ExpressionId . CallIndirect : {
25462546 for ( let i : Index = 0 , n = binaryen . _BinaryenCallIndirectGetNumOperands ( expr ) ; i < n ; ++ i ) {
2547- visit ( binaryen . _BinaryenCallIndirectGetOperand ( expr , i ) , data ) ;
2547+ visit ( binaryen . _BinaryenCallIndirectGetOperandAt ( expr , i ) , data ) ;
25482548 }
25492549 break ;
25502550 }
@@ -2599,7 +2599,7 @@ export function traverse<T>(
25992599 }
26002600 case ExpressionId . Host : {
26012601 for ( let i : Index = 0 , n = binaryen . _BinaryenHostGetNumOperands ( expr ) ; i < n ; ++ i ) {
2602- visit ( binaryen . _BinaryenHostGetOperand ( expr , i ) , data ) ;
2602+ visit ( binaryen . _BinaryenHostGetOperandAt ( expr , i ) , data ) ;
26032603 }
26042604 break ;
26052605 }
@@ -2703,7 +2703,7 @@ export function traverse<T>(
27032703 }
27042704 case ExpressionId . Throw : {
27052705 for ( let i : Index = 0 , n = binaryen . _BinaryenThrowGetNumOperands ( expr ) ; i < n ; ++ i ) {
2706- visit ( binaryen . _BinaryenThrowGetOperand ( expr , i ) , data ) ;
2706+ visit ( binaryen . _BinaryenThrowGetOperandAt ( expr , i ) , data ) ;
27072707 }
27082708 break ;
27092709 }
@@ -2717,7 +2717,7 @@ export function traverse<T>(
27172717 }
27182718 case ExpressionId . TupleMake : {
27192719 for ( let i : Index = 0 , n = binaryen . _BinaryenTupleMakeGetNumOperands ( expr ) ; i < n ; ++ i ) {
2720- visit ( binaryen . _BinaryenTupleMakeGetOperand ( expr , i ) , data ) ;
2720+ visit ( binaryen . _BinaryenTupleMakeGetOperandAt ( expr , i ) , data ) ;
27212721 }
27222722 break ;
27232723 }
0 commit comments