@@ -78,6 +78,8 @@ Module['MemoryInitId'] = Module['_BinaryenMemoryInitId']();
7878Module [ 'DataDropId' ] = Module [ '_BinaryenDataDropId' ] ( ) ;
7979Module [ 'MemoryCopyId' ] = Module [ '_BinaryenMemoryCopyId' ] ( ) ;
8080Module [ 'MemoryFillId' ] = Module [ '_BinaryenMemoryFillId' ] ( ) ;
81+ Module [ 'PushId' ] = Module [ '_BinaryenPushId' ] ( ) ;
82+ Module [ 'PopId' ] = Module [ '_BinaryenPopId' ] ( ) ;
8183
8284// External kinds
8385Module [ 'ExternalFunction' ] = Module [ '_BinaryenExternalFunction' ] ( ) ;
@@ -761,6 +763,9 @@ function wrapModule(module, self) {
761763 'wait' : function ( ptr , expected , timeout ) {
762764 return Module [ '_BinaryenAtomicWait' ] ( module , ptr , expected , timeout , Module [ 'i32' ] ) ;
763765 } ,
766+ 'pop' : function ( ) {
767+ return Module [ '_BinaryenPop' ] ( module , Module [ 'i32' ] ) ;
768+ }
764769 } ;
765770
766771 self [ 'i64' ] = {
@@ -1062,6 +1067,9 @@ function wrapModule(module, self) {
10621067 'wait' : function ( ptr , expected , timeout ) {
10631068 return Module [ '_BinaryenAtomicWait' ] ( module , ptr , expected , timeout , Module [ 'i64' ] ) ;
10641069 } ,
1070+ 'pop' : function ( ) {
1071+ return Module [ '_BinaryenPop' ] ( module , Module [ 'i64' ] ) ;
1072+ }
10651073 } ;
10661074
10671075 self [ 'f32' ] = {
@@ -1167,6 +1175,9 @@ function wrapModule(module, self) {
11671175 'ge' : function ( left , right ) {
11681176 return Module [ '_BinaryenBinary' ] ( module , Module [ 'GeFloat32' ] , left , right ) ;
11691177 } ,
1178+ 'pop' : function ( ) {
1179+ return Module [ '_BinaryenPop' ] ( module , Module [ 'f32' ] ) ;
1180+ }
11701181 } ;
11711182
11721183 self [ 'f64' ] = {
@@ -1272,6 +1283,9 @@ function wrapModule(module, self) {
12721283 'ge' : function ( left , right ) {
12731284 return Module [ '_BinaryenBinary' ] ( module , Module [ 'GeFloat64' ] , left , right ) ;
12741285 } ,
1286+ 'pop' : function ( ) {
1287+ return Module [ '_BinaryenPop' ] ( module , Module [ 'f64' ] ) ;
1288+ }
12751289 } ;
12761290
12771291 self [ 'v128' ] = {
@@ -1302,6 +1316,9 @@ function wrapModule(module, self) {
13021316 } ,
13031317 'bitselect' : function ( left , right , cond ) {
13041318 return Module [ '_BinaryenSIMDBitselect' ] ( module , left , right , cond ) ;
1319+ } ,
1320+ 'pop' : function ( ) {
1321+ return Module [ '_BinaryenPop' ] ( module , Module [ 'v128' ] ) ;
13051322 }
13061323 } ;
13071324
@@ -1724,6 +1741,12 @@ function wrapModule(module, self) {
17241741 } ,
17251742 } ;
17261743
1744+ self [ 'exnref' ] = {
1745+ 'pop' : function ( ) {
1746+ return Module [ '_BinaryenPop' ] ( module , Module [ 'exnref' ] ) ;
1747+ }
1748+ } ;
1749+
17271750 self [ 'select' ] = function ( condition , ifTrue , ifFalse ) {
17281751 return Module [ '_BinaryenSelect' ] ( module , condition , ifTrue , ifFalse ) ;
17291752 } ;
@@ -1748,6 +1771,9 @@ function wrapModule(module, self) {
17481771 self [ 'notify' ] = function ( ptr , notifyCount ) {
17491772 return Module [ '_BinaryenAtomicNotify' ] ( module , ptr , notifyCount ) ;
17501773 } ;
1774+ self [ 'push' ] = function ( value ) {
1775+ return Module [ '_BinaryenPush' ] ( module , value ) ;
1776+ } ;
17511777
17521778 // 'Module' operations
17531779 self [ 'addFunctionType' ] = function ( name , result , paramTypes ) {
@@ -2225,6 +2251,7 @@ Module['getExpressionInfo'] = function(expr) {
22252251 } ;
22262252 case Module [ 'NopId' ] :
22272253 case Module [ 'UnreachableId' ] :
2254+ case Module [ 'PopId' ] :
22282255 return {
22292256 'id' : id ,
22302257 'type' : type
@@ -2349,6 +2376,11 @@ Module['getExpressionInfo'] = function(expr) {
23492376 'value' : Module [ '_BinaryenMemoryFillGetValue' ] ( expr ) ,
23502377 'size' : Module [ '_BinaryenMemoryFillGetSize' ] ( expr )
23512378 } ;
2379+ case Module [ 'PushId' ] :
2380+ return {
2381+ 'id' : id ,
2382+ 'value' : Module [ '_BinaryenPushGetValue' ] ( expr )
2383+ } ;
23522384
23532385 default :
23542386 throw Error ( 'unexpected id: ' + id ) ;
0 commit comments