diff options
Diffstat (limited to 'test')
97 files changed, 437 insertions, 437 deletions
diff --git a/test/binaryen.js/emit_asmjs.js b/test/binaryen.js/emit_asmjs.js index c7cd5c717..1faf58308 100644 --- a/test/binaryen.js/emit_asmjs.js +++ b/test/binaryen.js/emit_asmjs.js @@ -2,7 +2,7 @@ var module = new Binaryen.Module(); var signature = module.addFunctionType("ii", Binaryen.i32, [ Binaryen.i32 ]); -module.addFunction("main", signature, [], module.getLocal(0, Binaryen.i32)); +module.addFunction("main", signature, [], module.local.get(0, Binaryen.i32)); module.addFunctionExport("main", "main"); diff --git a/test/binaryen.js/hello-world.js b/test/binaryen.js/hello-world.js index 2a9a56ed0..03cfb4163 100644 --- a/test/binaryen.js/hello-world.js +++ b/test/binaryen.js/hello-world.js @@ -11,8 +11,8 @@ var iii = module.addFunctionType('iii', Binaryen.i32, [Binaryen.i32, Binaryen.i3 // Start to create the function, starting with the contents: Get the 0 and // 1 arguments, and add them, then return them -var left = module.getLocal(0, Binaryen.i32); -var right = module.getLocal(1, Binaryen.i32); +var left = module.local.get(0, Binaryen.i32); +var right = module.local.get(1, Binaryen.i32); var add = module.i32.add(left, right); var ret = module.return(add); diff --git a/test/binaryen.js/kitchen-sink.js b/test/binaryen.js/kitchen-sink.js index a798c4092..38ce32876 100644 --- a/test/binaryen.js/kitchen-sink.js +++ b/test/binaryen.js/kitchen-sink.js @@ -81,10 +81,10 @@ function test_ids() { console.log("BinaryenSwitchId: " + Binaryen.SwitchId); console.log("BinaryenCallId: " + Binaryen.CallId); console.log("BinaryenCallIndirectId: " + Binaryen.CallIndirectId); - console.log("BinaryenGetLocalId: " + Binaryen.GetLocalId); - console.log("BinaryenSetLocalId: " + Binaryen.SetLocalId); - console.log("BinaryenGetGlobalId: " + Binaryen.GetGlobalId); - console.log("BinaryenSetGlobalId: " + Binaryen.SetGlobalId); + console.log("BinaryenLocalGetId: " + Binaryen.LocalGetId); + console.log("BinaryenLocalSetId: " + Binaryen.LocalSetId); + console.log("BinaryenGlobalGetId: " + Binaryen.GlobalGetId); + console.log("BinaryenGlobalSetId: " + Binaryen.GlobalSetId); console.log("BinaryenLoadId: " + Binaryen.LoadId); console.log("BinaryenStoreId: " + Binaryen.StoreId); console.log("BinaryenConstId: " + Binaryen.ConstId); @@ -383,9 +383,9 @@ function test_core() { module.i32.eqz( // check the output type of the call node module.callIndirect(makeInt32(2449), [ makeInt32(13), makeInt64(37, 0), makeFloat32(1.3), makeFloat64(3.7) ], "iiIfF") ), - module.drop(module.getLocal(0, Binaryen.i32)), - module.setLocal(0, makeInt32(101)), - module.drop(module.teeLocal(0, makeInt32(102))), + module.drop(module.local.get(0, Binaryen.i32)), + module.local.set(0, makeInt32(101)), + module.drop(module.local.tee(0, makeInt32(102))), module.i32.load(0, 0, makeInt32(1)), module.i64.load16_s(2, 1, makeInt32(8)), module.f32.load(0, 0, makeInt32(2)), @@ -688,8 +688,8 @@ function test_binaries() { { // create a module and write it to binary module = new Binaryen.Module(); var iii = module.addFunctionType("iii", Binaryen.i32, [ Binaryen.i32, Binaryen.i32 ]); - var x = module.getLocal(0, Binaryen.i32), - y = module.getLocal(1, Binaryen.i32); + var x = module.local.get(0, Binaryen.i32), + y = module.local.get(1, Binaryen.i32); var add = module.i32.add(x, y); var adder = module.addFunction("adder", iii, [], add); var initExpr = module.i32.const(3); @@ -738,7 +738,7 @@ function test_nonvalid() { var v = module.addFunctionType("v", Binaryen.None, []); var func = module.addFunction("func", v, [ Binaryen.i32 ], - module.setLocal(0, makeInt64(1234, 0)) // wrong type! + module.local.set(0, makeInt64(1234, 0)) // wrong type! ); console.log(module.emitText()); @@ -760,8 +760,8 @@ function test_parsing() { // create a module and write it to text module = new Binaryen.Module(); var iii = module.addFunctionType("iii", Binaryen.i32, [ Binaryen.i32, Binaryen.i32 ]); - var x = module.getLocal(0, Binaryen.i32), - y = module.getLocal(1, Binaryen.i32); + var x = module.local.get(0, Binaryen.i32), + y = module.local.get(1, Binaryen.i32); var add = module.i32.add(x, y); var adder = module.addFunction("adder", iii, [], add); var initExpr = module.i32.const(3); diff --git a/test/binaryen.js/kitchen-sink.js.txt b/test/binaryen.js/kitchen-sink.js.txt index fb937e39d..e68efda08 100644 --- a/test/binaryen.js/kitchen-sink.js.txt +++ b/test/binaryen.js/kitchen-sink.js.txt @@ -22,10 +22,10 @@ BinaryenBreakId: 4 BinaryenSwitchId: 5 BinaryenCallId: 6 BinaryenCallIndirectId: 7 -BinaryenGetLocalId: 8 -BinaryenSetLocalId: 9 -BinaryenGetGlobalId: 10 -BinaryenSetGlobalId: 11 +BinaryenLocalGetId: 8 +BinaryenLocalSetId: 9 +BinaryenGlobalGetId: 10 +BinaryenGlobalSetId: 11 BinaryenLoadId: 12 BinaryenStoreId: 13 BinaryenConstId: 14 @@ -3227,12 +3227,12 @@ int main() { expressions[623] = BinaryenCallIndirect(the_module, expressions[618], operands, 4, "iiIfF"); } expressions[624] = BinaryenUnary(the_module, 20, expressions[623]); - expressions[625] = BinaryenGetLocal(the_module, 0, 1); + expressions[625] = BinaryenLocalGet(the_module, 0, 1); expressions[626] = BinaryenDrop(the_module, expressions[625]); expressions[627] = BinaryenConst(the_module, BinaryenLiteralInt32(101)); - expressions[628] = BinaryenSetLocal(the_module, 0, expressions[627]); + expressions[628] = BinaryenLocalSet(the_module, 0, expressions[627]); expressions[629] = BinaryenConst(the_module, BinaryenLiteralInt32(102)); - expressions[630] = BinaryenTeeLocal(the_module, 0, expressions[629]); + expressions[630] = BinaryenLocalTee(the_module, 0, expressions[629]); expressions[631] = BinaryenDrop(the_module, expressions[630]); expressions[632] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); expressions[633] = BinaryenLoad(the_module, 4, 1, 0, 0, 1, expressions[632]); @@ -3390,8 +3390,8 @@ getExpressionInfo(f64.const)={"id":14,"type":4,"value":9.5} functionTypes[3] = BinaryenAddFunctionType(the_module, NULL, 0, paramTypes, 0); } BinaryenModuleAutoDrop(the_module); - BinaryenSetFeatures(the_module, 61); - BinaryenGetFeatures(the_module); + BinaryenModuleSetFeatures(the_module, 61); + BinaryenModuleGetFeatures(the_module); BinaryenModuleValidate(the_module); BinaryenModulePrint(the_module); (module diff --git a/test/binaryen.js/sieve.js b/test/binaryen.js/sieve.js index 8f31e9cd8..41dd0ddd3 100644 --- a/test/binaryen.js/sieve.js +++ b/test/binaryen.js/sieve.js @@ -14,13 +14,13 @@ var body = module.block( module.if( module.i32.lt_u( module.i32.mul( - module.current_memory(), + module.memory.size(), module.i32.const(65536) ), module.local.get(0, Binaryen.i32) ), module.drop( - module.grow_memory( + module.memory.grow( module.i32.sub( module.i32.div_u( module.i32.add( @@ -29,7 +29,7 @@ var body = module.block( ), module.i32.const(65536) ), - module.current_memory() + module.memory.size() ) ) ) diff --git a/test/binaryen.js/sieve.js.txt b/test/binaryen.js/sieve.js.txt index 2d9fc8ef2..888b6b06d 100644 --- a/test/binaryen.js/sieve.js.txt +++ b/test/binaryen.js/sieve.js.txt @@ -7,13 +7,13 @@ (if (i32.lt_u (i32.mul - (current_memory) + (memory.size) (i32.const 65536) ) (local.get $0) ) (drop - (grow_memory + (memory.grow (i32.sub (i32.div_u (i32.add @@ -22,7 +22,7 @@ ) (i32.const 65536) ) - (current_memory) + (memory.size) ) ) ) @@ -65,13 +65,13 @@ optimized: (if (i32.lt_u (i32.shl - (current_memory) + (memory.size) (i32.const 16) ) (local.get $0) ) (drop - (grow_memory + (memory.grow (i32.sub (i32.div_u (i32.add @@ -80,7 +80,7 @@ optimized: ) (i32.const 65536) ) - (current_memory) + (memory.size) ) ) ) diff --git a/test/binaryen.js/validation_errors.js b/test/binaryen.js/validation_errors.js index 58eed0e08..e2ee01adb 100644 --- a/test/binaryen.js/validation_errors.js +++ b/test/binaryen.js/validation_errors.js @@ -4,7 +4,7 @@ var func = mod.addFunction("test", funcType, [], mod.block("", [ mod.drop( - mod.getGlobal("missing", Binaryen.i32) + mod.global.get("missing", Binaryen.i32) ) ]) ); @@ -18,7 +18,7 @@ var func = mod.addFunction("test", funcType, [], mod.block("", [ mod.drop( - mod.getLocal(0, Binaryen.i32) + mod.local.get(0, Binaryen.i32) ) ]) ); diff --git a/test/example/c-api-hello-world.c b/test/example/c-api-hello-world.c index 4cb86b5a6..066799de6 100644 --- a/test/example/c-api-hello-world.c +++ b/test/example/c-api-hello-world.c @@ -11,8 +11,8 @@ int main() { BinaryenFunctionTypeRef iii = BinaryenAddFunctionType(module, "iii", BinaryenTypeInt32(), params, 2); // Get the 0 and 1 arguments, and add them - BinaryenExpressionRef x = BinaryenGetLocal(module, 0, BinaryenTypeInt32()), - y = BinaryenGetLocal(module, 1, BinaryenTypeInt32()); + BinaryenExpressionRef x = BinaryenLocalGet(module, 0, BinaryenTypeInt32()), + y = BinaryenLocalGet(module, 1, BinaryenTypeInt32()); BinaryenExpressionRef add = BinaryenBinary(module, BinaryenAddInt32(), x, y); // Create the add function diff --git a/test/example/c-api-kitchen-sink.c b/test/example/c-api-kitchen-sink.c index 1359385eb..0efafde52 100644 --- a/test/example/c-api-kitchen-sink.c +++ b/test/example/c-api-kitchen-sink.c @@ -452,9 +452,9 @@ void test_core() { BinaryenUnary(module, BinaryenEqZInt32(), // check the output type of the call node BinaryenCallIndirect(module, makeInt32(module, 2449), callOperands4b, 4, "iiIfF") ), - BinaryenDrop(module, BinaryenGetLocal(module, 0, BinaryenTypeInt32())), - BinaryenSetLocal(module, 0, makeInt32(module, 101)), - BinaryenDrop(module, BinaryenTeeLocal(module, 0, makeInt32(module, 102))), + BinaryenDrop(module, BinaryenLocalGet(module, 0, BinaryenTypeInt32())), + BinaryenLocalSet(module, 0, makeInt32(module, 101)), + BinaryenDrop(module, BinaryenLocalTee(module, 0, makeInt32(module, 102))), BinaryenLoad(module, 4, 0, 0, 0, BinaryenTypeInt32(), makeInt32(module, 1)), BinaryenLoad(module, 2, 1, 2, 1, BinaryenTypeInt64(), makeInt32(module, 8)), BinaryenLoad(module, 4, 0, 0, 0, BinaryenTypeFloat32(), makeInt32(module, 2)), @@ -528,8 +528,8 @@ void test_core() { BinaryenFeatureSignExt() | BinaryenFeatureSIMD128(); - BinaryenSetFeatures(module, features); - assert(BinaryenGetFeatures(module) == features); + BinaryenModuleSetFeatures(module, features); + assert(BinaryenModuleGetFeatures(module) == features); // Verify it validates assert(BinaryenModuleValidate(module)); @@ -765,8 +765,8 @@ void test_binaries() { BinaryenModuleRef module = BinaryenModuleCreate(); BinaryenType params[2] = { BinaryenTypeInt32(), BinaryenTypeInt32() }; BinaryenFunctionTypeRef iii = BinaryenAddFunctionType(module, "iii", BinaryenTypeInt32(), params, 2); - BinaryenExpressionRef x = BinaryenGetLocal(module, 0, BinaryenTypeInt32()), - y = BinaryenGetLocal(module, 1, BinaryenTypeInt32()); + BinaryenExpressionRef x = BinaryenLocalGet(module, 0, BinaryenTypeInt32()), + y = BinaryenLocalGet(module, 1, BinaryenTypeInt32()); BinaryenExpressionRef add = BinaryenBinary(module, BinaryenAddInt32(), x, y); BinaryenFunctionRef adder = BinaryenAddFunction(module, "adder", iii, NULL, 0, add); BinaryenSetDebugInfo(1); // include names section @@ -816,7 +816,7 @@ void test_nonvalid() { BinaryenFunctionTypeRef v = BinaryenAddFunctionType(module, "v", BinaryenTypeNone(), NULL, 0); BinaryenType localTypes[] = { BinaryenTypeInt32() }; BinaryenFunctionRef func = BinaryenAddFunction(module, "func", v, localTypes, 1, - BinaryenSetLocal(module, 0, makeInt64(module, 1234)) // wrong type! + BinaryenLocalSet(module, 0, makeInt64(module, 1234)) // wrong type! ); BinaryenModulePrint(module); diff --git a/test/example/c-api-kitchen-sink.txt b/test/example/c-api-kitchen-sink.txt index 9b5c10a05..5a4055ddb 100644 --- a/test/example/c-api-kitchen-sink.txt +++ b/test/example/c-api-kitchen-sink.txt @@ -3195,12 +3195,12 @@ int main() { expressions[624] = BinaryenCallIndirect(the_module, expressions[623], operands, 4, "iiIfF"); } expressions[625] = BinaryenUnary(the_module, 20, expressions[624]); - expressions[626] = BinaryenGetLocal(the_module, 0, 1); + expressions[626] = BinaryenLocalGet(the_module, 0, 1); expressions[627] = BinaryenDrop(the_module, expressions[626]); expressions[628] = BinaryenConst(the_module, BinaryenLiteralInt32(101)); - expressions[629] = BinaryenSetLocal(the_module, 0, expressions[628]); + expressions[629] = BinaryenLocalSet(the_module, 0, expressions[628]); expressions[630] = BinaryenConst(the_module, BinaryenLiteralInt32(102)); - expressions[631] = BinaryenTeeLocal(the_module, 0, expressions[630]); + expressions[631] = BinaryenLocalTee(the_module, 0, expressions[630]); expressions[632] = BinaryenDrop(the_module, expressions[631]); expressions[633] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); expressions[634] = BinaryenLoad(the_module, 4, 0, 0, 0, 1, expressions[633]); @@ -3319,8 +3319,8 @@ int main() { functionTypes[3] = BinaryenAddFunctionType(the_module, NULL, 0, paramTypes, 0); } BinaryenModuleAutoDrop(the_module); - BinaryenSetFeatures(the_module, 61); - BinaryenGetFeatures(the_module); + BinaryenModuleSetFeatures(the_module, 61); + BinaryenModuleGetFeatures(the_module); BinaryenModuleValidate(the_module); BinaryenModulePrint(the_module); (module diff --git a/test/example/c-api-relooper-unreachable-if.cpp b/test/example/c-api-relooper-unreachable-if.cpp index 3acc65d56..5f7b2e874 100644 --- a/test/example/c-api-relooper-unreachable-if.cpp +++ b/test/example/c-api-relooper-unreachable-if.cpp @@ -20,7 +20,7 @@ int main() { BinaryenSetMemory(the_module, 256, 256, "memory", segments, segmentPassive, segmentOffsets, segmentSizes, 0, 0); } the_relooper = RelooperCreate(the_module); - expressions[1] = BinaryenGetLocal(the_module, 0, 1); + expressions[1] = BinaryenLocalGet(the_module, 0, 1); expressions[2] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); expressions[3] = BinaryenStore(the_module, 4, 0, 0, expressions[2], expressions[1], 1); expressions[4] = BinaryenReturn(the_module, expressions[0]); @@ -35,7 +35,7 @@ int main() { } expressions[6] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); expressions[7] = BinaryenLoad(the_module, 4, 0, 0, 0, 1, expressions[6]); - expressions[8] = BinaryenSetLocal(the_module, 0, expressions[7]); + expressions[8] = BinaryenLocalSet(the_module, 0, expressions[7]); relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[8]); RelooperAddBranch(relooperBlocks[1], relooperBlocks[0], expressions[0], expressions[0]); expressions[9] = RelooperRenderAndDispose(the_relooper, relooperBlocks[1], 1); @@ -45,7 +45,7 @@ int main() { } BinaryenAddFunctionExport(the_module, "tinycore::eh_personality", "tinycore::eh_personality"); the_relooper = RelooperCreate(the_module); - expressions[10] = BinaryenGetLocal(the_module, 0, 1); + expressions[10] = BinaryenLocalGet(the_module, 0, 1); expressions[11] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); expressions[12] = BinaryenStore(the_module, 4, 0, 0, expressions[11], expressions[10], 1); expressions[13] = BinaryenReturn(the_module, expressions[0]); @@ -56,7 +56,7 @@ int main() { relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[14]); expressions[15] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); expressions[16] = BinaryenLoad(the_module, 4, 0, 0, 0, 1, expressions[15]); - expressions[17] = BinaryenSetLocal(the_module, 0, expressions[16]); + expressions[17] = BinaryenLocalSet(the_module, 0, expressions[16]); relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[17]); RelooperAddBranch(relooperBlocks[1], relooperBlocks[0], expressions[0], expressions[0]); expressions[18] = RelooperRenderAndDispose(the_relooper, relooperBlocks[1], 1); @@ -84,7 +84,7 @@ int main() { } expressions[21] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); expressions[22] = BinaryenLoad(the_module, 4, 0, 0, 0, 1, expressions[21]); - expressions[23] = BinaryenSetLocal(the_module, 0, expressions[22]); + expressions[23] = BinaryenLocalSet(the_module, 0, expressions[22]); relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[23]); RelooperAddBranch(relooperBlocks[2], relooperBlocks[0], expressions[0], expressions[0]); expressions[24] = RelooperRenderAndDispose(the_relooper, relooperBlocks[2], 1); @@ -94,7 +94,7 @@ int main() { } BinaryenAddFunctionExport(the_module, "tinycore::panic_fmt", "tinycore::panic_fmt"); the_relooper = RelooperCreate(the_module); - expressions[25] = BinaryenGetLocal(the_module, 0, 1); + expressions[25] = BinaryenLocalGet(the_module, 0, 1); expressions[26] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); expressions[27] = BinaryenStore(the_module, 4, 0, 0, expressions[26], expressions[25], 1); expressions[28] = BinaryenReturn(the_module, expressions[0]); @@ -105,7 +105,7 @@ int main() { relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[29]); expressions[30] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); expressions[31] = BinaryenLoad(the_module, 4, 0, 0, 0, 1, expressions[30]); - expressions[32] = BinaryenSetLocal(the_module, 0, expressions[31]); + expressions[32] = BinaryenLocalSet(the_module, 0, expressions[31]); relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[32]); RelooperAddBranch(relooperBlocks[1], relooperBlocks[0], expressions[0], expressions[0]); expressions[33] = RelooperRenderAndDispose(the_relooper, relooperBlocks[1], 1); @@ -115,7 +115,7 @@ int main() { } BinaryenAddFunctionExport(the_module, "tinycore::rust_eh_register_frames", "tinycore::rust_eh_register_frames"); the_relooper = RelooperCreate(the_module); - expressions[34] = BinaryenGetLocal(the_module, 0, 1); + expressions[34] = BinaryenLocalGet(the_module, 0, 1); expressions[35] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); expressions[36] = BinaryenStore(the_module, 4, 0, 0, expressions[35], expressions[34], 1); expressions[37] = BinaryenReturn(the_module, expressions[0]); @@ -126,7 +126,7 @@ int main() { relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[38]); expressions[39] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); expressions[40] = BinaryenLoad(the_module, 4, 0, 0, 0, 1, expressions[39]); - expressions[41] = BinaryenSetLocal(the_module, 0, expressions[40]); + expressions[41] = BinaryenLocalSet(the_module, 0, expressions[40]); relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[41]); RelooperAddBranch(relooperBlocks[1], relooperBlocks[0], expressions[0], expressions[0]); expressions[42] = RelooperRenderAndDispose(the_relooper, relooperBlocks[1], 1); @@ -136,16 +136,16 @@ int main() { } BinaryenAddFunctionExport(the_module, "tinycore::rust_eh_unregister_frames", "tinycore::rust_eh_unregister_frames"); the_relooper = RelooperCreate(the_module); - expressions[43] = BinaryenGetLocal(the_module, 0, 1); - expressions[44] = BinaryenSetLocal(the_module, 1, expressions[43]); - expressions[45] = BinaryenGetLocal(the_module, 1, 1); - expressions[46] = BinaryenSetLocal(the_module, 2, expressions[45]); + expressions[43] = BinaryenLocalGet(the_module, 0, 1); + expressions[44] = BinaryenLocalSet(the_module, 1, expressions[43]); + expressions[45] = BinaryenLocalGet(the_module, 1, 1); + expressions[46] = BinaryenLocalSet(the_module, 2, expressions[45]); { BinaryenType paramTypes[] = { 1 }; functionTypes[2] = BinaryenAddFunctionType(the_module, "print_i32", 0, paramTypes, 1); } BinaryenAddFunctionImport(the_module, "print_i32", "spectest", "print", functionTypes[2]); - expressions[47] = BinaryenGetLocal(the_module, 2, 1); + expressions[47] = BinaryenLocalGet(the_module, 2, 1); { BinaryenExpressionRef operands[] = { expressions[47] }; expressions[48] = BinaryenCall(the_module, "print_i32", operands, 1, 0); @@ -155,7 +155,7 @@ int main() { expressions[49] = BinaryenBlock(the_module, "bb0", children, 3, BinaryenTypeAuto()); } relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[49]); - expressions[50] = BinaryenGetLocal(the_module, 3, 1); + expressions[50] = BinaryenLocalGet(the_module, 3, 1); expressions[51] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); expressions[52] = BinaryenStore(the_module, 4, 0, 0, expressions[51], expressions[50], 1); expressions[53] = BinaryenReturn(the_module, expressions[0]); @@ -171,7 +171,7 @@ int main() { } expressions[55] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); expressions[56] = BinaryenLoad(the_module, 4, 0, 0, 0, 1, expressions[55]); - expressions[57] = BinaryenSetLocal(the_module, 3, expressions[56]); + expressions[57] = BinaryenLocalSet(the_module, 3, expressions[56]); relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[57]); RelooperAddBranch(relooperBlocks[2], relooperBlocks[0], expressions[0], expressions[0]); expressions[58] = RelooperRenderAndDispose(the_relooper, relooperBlocks[2], 4); @@ -182,28 +182,28 @@ int main() { BinaryenAddFunctionExport(the_module, "wasm::print_i32", "wasm::print_i32"); the_relooper = RelooperCreate(the_module); expressions[59] = BinaryenConst(the_module, BinaryenLiteralInt32(1)); - expressions[60] = BinaryenSetLocal(the_module, 0, expressions[59]); - expressions[61] = BinaryenGetLocal(the_module, 0, 1); - expressions[62] = BinaryenSetLocal(the_module, 2, expressions[61]); - expressions[63] = BinaryenGetLocal(the_module, 2, 1); + expressions[60] = BinaryenLocalSet(the_module, 0, expressions[59]); + expressions[61] = BinaryenLocalGet(the_module, 0, 1); + expressions[62] = BinaryenLocalSet(the_module, 2, expressions[61]); + expressions[63] = BinaryenLocalGet(the_module, 2, 1); expressions[64] = BinaryenConst(the_module, BinaryenLiteralInt32(2)); expressions[65] = BinaryenUnary(the_module, 22, expressions[63]); expressions[66] = BinaryenUnary(the_module, 22, expressions[64]); expressions[67] = BinaryenBinary(the_module, 25, expressions[65], expressions[66]); - expressions[68] = BinaryenSetLocal(the_module, 8, expressions[67]); - expressions[69] = BinaryenGetLocal(the_module, 8, 2); + expressions[68] = BinaryenLocalSet(the_module, 8, expressions[67]); + expressions[69] = BinaryenLocalGet(the_module, 8, 2); expressions[70] = BinaryenUnary(the_module, 24, expressions[69]); expressions[71] = BinaryenConst(the_module, BinaryenLiteralInt64(32)); - expressions[72] = BinaryenGetLocal(the_module, 8, 2); + expressions[72] = BinaryenLocalGet(the_module, 8, 2); expressions[73] = BinaryenBinary(the_module, 36, expressions[72], expressions[71]); expressions[74] = BinaryenUnary(the_module, 24, expressions[73]); expressions[75] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); expressions[76] = BinaryenLoad(the_module, 4, 0, 0, 0, 1, expressions[75]); expressions[77] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); expressions[78] = BinaryenBinary(the_module, 1, expressions[76], expressions[77]); - expressions[79] = BinaryenTeeLocal(the_module, 3, expressions[78]); + expressions[79] = BinaryenLocalTee(the_module, 3, expressions[78]); expressions[80] = BinaryenStore(the_module, 4, 0, 0, expressions[75], expressions[79], 1); - expressions[81] = BinaryenGetLocal(the_module, 3, 1); + expressions[81] = BinaryenLocalGet(the_module, 3, 1); expressions[82] = BinaryenStore(the_module, 4, 0, 0, expressions[81], expressions[70], 1); expressions[83] = BinaryenStore(the_module, 4, 4, 0, expressions[81], expressions[74], 1); { @@ -211,24 +211,24 @@ int main() { expressions[84] = BinaryenBlock(the_module, "bb0", children, 6, BinaryenTypeAuto()); } relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[84]); - expressions[85] = BinaryenGetLocal(the_module, 3, 1); + expressions[85] = BinaryenLocalGet(the_module, 3, 1); expressions[86] = BinaryenLoad(the_module, 4, 0, 0, 0, 1, expressions[85]); - expressions[87] = BinaryenSetLocal(the_module, 1, expressions[86]); - expressions[88] = BinaryenGetLocal(the_module, 1, 1); - expressions[89] = BinaryenSetLocal(the_module, 4, expressions[88]); - expressions[90] = BinaryenGetLocal(the_module, 4, 1); - expressions[91] = BinaryenSetLocal(the_module, 5, expressions[90]); - expressions[92] = BinaryenGetLocal(the_module, 6, 1); + expressions[87] = BinaryenLocalSet(the_module, 1, expressions[86]); + expressions[88] = BinaryenLocalGet(the_module, 1, 1); + expressions[89] = BinaryenLocalSet(the_module, 4, expressions[88]); + expressions[90] = BinaryenLocalGet(the_module, 4, 1); + expressions[91] = BinaryenLocalSet(the_module, 5, expressions[90]); + expressions[92] = BinaryenLocalGet(the_module, 6, 1); expressions[93] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); expressions[94] = BinaryenStore(the_module, 4, 0, 0, expressions[93], expressions[92], 1); - expressions[95] = BinaryenGetLocal(the_module, 5, 1); + expressions[95] = BinaryenLocalGet(the_module, 5, 1); expressions[96] = BinaryenReturn(the_module, expressions[95]); { BinaryenExpressionRef children[] = { expressions[87], expressions[89], expressions[91], expressions[94], expressions[96] }; expressions[97] = BinaryenBlock(the_module, "bb1", children, 5, BinaryenTypeAuto()); } relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[97]); - expressions[98] = BinaryenGetLocal(the_module, 3, 1); + expressions[98] = BinaryenLocalGet(the_module, 3, 1); expressions[99] = BinaryenLoad(the_module, 4, 0, 8, 0, 1, expressions[98]); RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[99], expressions[0]); expressions[100] = BinaryenUnreachable(the_module); @@ -240,7 +240,7 @@ int main() { } expressions[101] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); expressions[102] = BinaryenLoad(the_module, 4, 0, 0, 0, 1, expressions[101]); - expressions[103] = BinaryenSetLocal(the_module, 6, expressions[102]); + expressions[103] = BinaryenLocalSet(the_module, 6, expressions[102]); relooperBlocks[3] = RelooperAddBlock(the_relooper, expressions[103]); RelooperAddBranch(relooperBlocks[3], relooperBlocks[0], expressions[0], expressions[0]); expressions[104] = RelooperRenderAndDispose(the_relooper, relooperBlocks[3], 7); @@ -250,37 +250,37 @@ int main() { } BinaryenAddFunctionExport(the_module, "real_main", "real_main"); the_relooper = RelooperCreate(the_module); - expressions[105] = BinaryenGetLocal(the_module, 0, 1); - expressions[106] = BinaryenSetLocal(the_module, 2, expressions[105]); + expressions[105] = BinaryenLocalGet(the_module, 0, 1); + expressions[106] = BinaryenLocalSet(the_module, 2, expressions[105]); { BinaryenExpressionRef operands[] = { 0 }; expressions[107] = BinaryenCall(the_module, "real_main", operands, 0, 1); } - expressions[108] = BinaryenSetLocal(the_module, 4, expressions[107]); + expressions[108] = BinaryenLocalSet(the_module, 4, expressions[107]); { BinaryenExpressionRef children[] = { expressions[106], expressions[108] }; expressions[109] = BinaryenBlock(the_module, "bb0", children, 2, BinaryenTypeAuto()); } relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[109]); - expressions[110] = BinaryenGetLocal(the_module, 4, 1); + expressions[110] = BinaryenLocalGet(the_module, 4, 1); expressions[111] = BinaryenConst(the_module, BinaryenLiteralInt32(3)); expressions[112] = BinaryenUnary(the_module, 22, expressions[110]); expressions[113] = BinaryenUnary(the_module, 22, expressions[111]); expressions[114] = BinaryenBinary(the_module, 25, expressions[112], expressions[113]); - expressions[115] = BinaryenSetLocal(the_module, 11, expressions[114]); - expressions[116] = BinaryenGetLocal(the_module, 11, 2); + expressions[115] = BinaryenLocalSet(the_module, 11, expressions[114]); + expressions[116] = BinaryenLocalGet(the_module, 11, 2); expressions[117] = BinaryenUnary(the_module, 24, expressions[116]); expressions[118] = BinaryenConst(the_module, BinaryenLiteralInt64(32)); - expressions[119] = BinaryenGetLocal(the_module, 11, 2); + expressions[119] = BinaryenLocalGet(the_module, 11, 2); expressions[120] = BinaryenBinary(the_module, 36, expressions[119], expressions[118]); expressions[121] = BinaryenUnary(the_module, 24, expressions[120]); expressions[122] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); expressions[123] = BinaryenLoad(the_module, 4, 0, 0, 0, 1, expressions[122]); expressions[124] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); expressions[125] = BinaryenBinary(the_module, 1, expressions[123], expressions[124]); - expressions[126] = BinaryenTeeLocal(the_module, 5, expressions[125]); + expressions[126] = BinaryenLocalTee(the_module, 5, expressions[125]); expressions[127] = BinaryenStore(the_module, 4, 0, 0, expressions[122], expressions[126], 1); - expressions[128] = BinaryenGetLocal(the_module, 5, 1); + expressions[128] = BinaryenLocalGet(the_module, 5, 1); expressions[129] = BinaryenStore(the_module, 4, 0, 0, expressions[128], expressions[117], 1); expressions[130] = BinaryenStore(the_module, 4, 4, 0, expressions[128], expressions[121], 1); { @@ -288,12 +288,12 @@ int main() { expressions[131] = BinaryenBlock(the_module, "bb1", children, 4, BinaryenTypeAuto()); } relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[131]); - expressions[132] = BinaryenGetLocal(the_module, 5, 1); + expressions[132] = BinaryenLocalGet(the_module, 5, 1); expressions[133] = BinaryenLoad(the_module, 4, 0, 0, 0, 1, expressions[132]); - expressions[134] = BinaryenSetLocal(the_module, 3, expressions[133]); - expressions[135] = BinaryenGetLocal(the_module, 3, 1); - expressions[136] = BinaryenSetLocal(the_module, 6, expressions[135]); - expressions[137] = BinaryenGetLocal(the_module, 6, 1); + expressions[134] = BinaryenLocalSet(the_module, 3, expressions[133]); + expressions[135] = BinaryenLocalGet(the_module, 3, 1); + expressions[136] = BinaryenLocalSet(the_module, 6, expressions[135]); + expressions[137] = BinaryenLocalGet(the_module, 6, 1); { BinaryenExpressionRef operands[] = { expressions[137] }; expressions[138] = BinaryenCall(the_module, "wasm::print_i32", operands, 1, 0); @@ -303,14 +303,14 @@ int main() { expressions[139] = BinaryenBlock(the_module, "bb2", children, 3, BinaryenTypeAuto()); } relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[139]); - expressions[140] = BinaryenGetLocal(the_module, 3, 1); - expressions[141] = BinaryenSetLocal(the_module, 7, expressions[140]); - expressions[142] = BinaryenGetLocal(the_module, 7, 1); - expressions[143] = BinaryenSetLocal(the_module, 8, expressions[142]); - expressions[144] = BinaryenGetLocal(the_module, 9, 1); + expressions[140] = BinaryenLocalGet(the_module, 3, 1); + expressions[141] = BinaryenLocalSet(the_module, 7, expressions[140]); + expressions[142] = BinaryenLocalGet(the_module, 7, 1); + expressions[143] = BinaryenLocalSet(the_module, 8, expressions[142]); + expressions[144] = BinaryenLocalGet(the_module, 9, 1); expressions[145] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); expressions[146] = BinaryenStore(the_module, 4, 0, 0, expressions[145], expressions[144], 1); - expressions[147] = BinaryenGetLocal(the_module, 8, 1); + expressions[147] = BinaryenLocalGet(the_module, 8, 1); expressions[148] = BinaryenReturn(the_module, expressions[147]); { BinaryenExpressionRef children[] = { expressions[141], expressions[143], expressions[146], expressions[148] }; @@ -318,7 +318,7 @@ int main() { } relooperBlocks[3] = RelooperAddBlock(the_relooper, expressions[149]); RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[0], expressions[0]); - expressions[150] = BinaryenGetLocal(the_module, 5, 1); + expressions[150] = BinaryenLocalGet(the_module, 5, 1); expressions[151] = BinaryenLoad(the_module, 4, 0, 8, 0, 1, expressions[150]); RelooperAddBranch(relooperBlocks[1], relooperBlocks[2], expressions[151], expressions[0]); expressions[152] = BinaryenUnreachable(the_module); @@ -331,7 +331,7 @@ int main() { } expressions[153] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); expressions[154] = BinaryenLoad(the_module, 4, 0, 0, 0, 1, expressions[153]); - expressions[155] = BinaryenSetLocal(the_module, 9, expressions[154]); + expressions[155] = BinaryenLocalSet(the_module, 9, expressions[154]); relooperBlocks[5] = RelooperAddBlock(the_relooper, expressions[155]); RelooperAddBranch(relooperBlocks[5], relooperBlocks[0], expressions[0], expressions[0]); expressions[156] = RelooperRenderAndDispose(the_relooper, relooperBlocks[5], 10); @@ -372,33 +372,33 @@ int main() { } BinaryenSetStart(the_module, functions[8]); the_relooper = RelooperCreate(the_module); - expressions[165] = BinaryenGetLocal(the_module, 0, 1); - expressions[166] = BinaryenSetLocal(the_module, 2, expressions[165]); - expressions[167] = BinaryenGetLocal(the_module, 1, 1); - expressions[168] = BinaryenSetLocal(the_module, 3, expressions[167]); - expressions[169] = BinaryenGetLocal(the_module, 2, 1); - expressions[170] = BinaryenSetLocal(the_module, 4, expressions[169]); - expressions[171] = BinaryenGetLocal(the_module, 3, 1); - expressions[172] = BinaryenSetLocal(the_module, 5, expressions[171]); - expressions[173] = BinaryenGetLocal(the_module, 4, 1); - expressions[174] = BinaryenGetLocal(the_module, 5, 1); + expressions[165] = BinaryenLocalGet(the_module, 0, 1); + expressions[166] = BinaryenLocalSet(the_module, 2, expressions[165]); + expressions[167] = BinaryenLocalGet(the_module, 1, 1); + expressions[168] = BinaryenLocalSet(the_module, 3, expressions[167]); + expressions[169] = BinaryenLocalGet(the_module, 2, 1); + expressions[170] = BinaryenLocalSet(the_module, 4, expressions[169]); + expressions[171] = BinaryenLocalGet(the_module, 3, 1); + expressions[172] = BinaryenLocalSet(the_module, 5, expressions[171]); + expressions[173] = BinaryenLocalGet(the_module, 4, 1); + expressions[174] = BinaryenLocalGet(the_module, 5, 1); expressions[175] = BinaryenUnary(the_module, 22, expressions[173]); expressions[176] = BinaryenUnary(the_module, 22, expressions[174]); expressions[177] = BinaryenBinary(the_module, 25, expressions[175], expressions[176]); - expressions[178] = BinaryenSetLocal(the_module, 10, expressions[177]); - expressions[179] = BinaryenGetLocal(the_module, 10, 2); + expressions[178] = BinaryenLocalSet(the_module, 10, expressions[177]); + expressions[179] = BinaryenLocalGet(the_module, 10, 2); expressions[180] = BinaryenUnary(the_module, 24, expressions[179]); expressions[181] = BinaryenConst(the_module, BinaryenLiteralInt64(32)); - expressions[182] = BinaryenGetLocal(the_module, 10, 2); + expressions[182] = BinaryenLocalGet(the_module, 10, 2); expressions[183] = BinaryenBinary(the_module, 36, expressions[182], expressions[181]); expressions[184] = BinaryenUnary(the_module, 24, expressions[183]); expressions[185] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); expressions[186] = BinaryenLoad(the_module, 4, 0, 0, 0, 1, expressions[185]); expressions[187] = BinaryenConst(the_module, BinaryenLiteralInt32(128)); expressions[188] = BinaryenBinary(the_module, 1, expressions[186], expressions[187]); - expressions[189] = BinaryenTeeLocal(the_module, 6, expressions[188]); + expressions[189] = BinaryenLocalTee(the_module, 6, expressions[188]); expressions[190] = BinaryenStore(the_module, 4, 0, 0, expressions[185], expressions[189], 1); - expressions[191] = BinaryenGetLocal(the_module, 6, 1); + expressions[191] = BinaryenLocalGet(the_module, 6, 1); expressions[192] = BinaryenStore(the_module, 4, 0, 0, expressions[191], expressions[180], 1); expressions[193] = BinaryenStore(the_module, 4, 4, 0, expressions[191], expressions[184], 1); { @@ -406,20 +406,20 @@ int main() { expressions[194] = BinaryenBlock(the_module, "bb0", children, 8, BinaryenTypeAuto()); } relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[194]); - expressions[195] = BinaryenGetLocal(the_module, 6, 1); + expressions[195] = BinaryenLocalGet(the_module, 6, 1); expressions[196] = BinaryenLoad(the_module, 4, 0, 0, 0, 1, expressions[195]); - expressions[197] = BinaryenSetLocal(the_module, 7, expressions[196]); - expressions[198] = BinaryenGetLocal(the_module, 8, 1); + expressions[197] = BinaryenLocalSet(the_module, 7, expressions[196]); + expressions[198] = BinaryenLocalGet(the_module, 8, 1); expressions[199] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); expressions[200] = BinaryenStore(the_module, 4, 0, 0, expressions[199], expressions[198], 1); - expressions[201] = BinaryenGetLocal(the_module, 7, 1); + expressions[201] = BinaryenLocalGet(the_module, 7, 1); expressions[202] = BinaryenReturn(the_module, expressions[201]); { BinaryenExpressionRef children[] = { expressions[197], expressions[200], expressions[202] }; expressions[203] = BinaryenBlock(the_module, "bb1", children, 3, BinaryenTypeAuto()); } relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[203]); - expressions[204] = BinaryenGetLocal(the_module, 6, 1); + expressions[204] = BinaryenLocalGet(the_module, 6, 1); expressions[205] = BinaryenLoad(the_module, 4, 0, 8, 0, 1, expressions[204]); RelooperAddBranch(relooperBlocks[0], relooperBlocks[1], expressions[205], expressions[0]); expressions[206] = BinaryenUnreachable(the_module); @@ -431,7 +431,7 @@ int main() { } expressions[207] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); expressions[208] = BinaryenLoad(the_module, 4, 0, 0, 0, 1, expressions[207]); - expressions[209] = BinaryenSetLocal(the_module, 8, expressions[208]); + expressions[209] = BinaryenLocalSet(the_module, 8, expressions[208]); relooperBlocks[3] = RelooperAddBlock(the_relooper, expressions[209]); RelooperAddBranch(relooperBlocks[3], relooperBlocks[0], expressions[0], expressions[0]); expressions[210] = RelooperRenderAndDispose(the_relooper, relooperBlocks[3], 9); @@ -441,17 +441,17 @@ int main() { } BinaryenAddFunctionExport(the_module, "_isize_as_tinycore::Add_::add", "_isize_as_tinycore::Add_::add"); the_relooper = RelooperCreate(the_module); - expressions[211] = BinaryenGetLocal(the_module, 0, 1); - expressions[212] = BinaryenSetLocal(the_module, 1, expressions[211]); - expressions[213] = BinaryenGetLocal(the_module, 1, 1); - expressions[214] = BinaryenSetLocal(the_module, 2, expressions[213]); - expressions[215] = BinaryenGetLocal(the_module, 2, 1); + expressions[211] = BinaryenLocalGet(the_module, 0, 1); + expressions[212] = BinaryenLocalSet(the_module, 1, expressions[211]); + expressions[213] = BinaryenLocalGet(the_module, 1, 1); + expressions[214] = BinaryenLocalSet(the_module, 2, expressions[213]); + expressions[215] = BinaryenLocalGet(the_module, 2, 1); expressions[216] = BinaryenUnary(the_module, 20, expressions[215]); - expressions[217] = BinaryenSetLocal(the_module, 3, expressions[216]); - expressions[218] = BinaryenGetLocal(the_module, 4, 1); + expressions[217] = BinaryenLocalSet(the_module, 3, expressions[216]); + expressions[218] = BinaryenLocalGet(the_module, 4, 1); expressions[219] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); expressions[220] = BinaryenStore(the_module, 4, 0, 0, expressions[219], expressions[218], 1); - expressions[221] = BinaryenGetLocal(the_module, 3, 1); + expressions[221] = BinaryenLocalGet(the_module, 3, 1); expressions[222] = BinaryenReturn(the_module, expressions[221]); { BinaryenExpressionRef children[] = { expressions[212], expressions[214], expressions[217], expressions[220], expressions[222] }; @@ -464,7 +464,7 @@ int main() { } expressions[224] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); expressions[225] = BinaryenLoad(the_module, 4, 0, 0, 0, 1, expressions[224]); - expressions[226] = BinaryenSetLocal(the_module, 4, expressions[225]); + expressions[226] = BinaryenLocalSet(the_module, 4, expressions[225]); relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[226]); RelooperAddBranch(relooperBlocks[1], relooperBlocks[0], expressions[0], expressions[0]); expressions[227] = RelooperRenderAndDispose(the_relooper, relooperBlocks[1], 5); @@ -474,22 +474,22 @@ int main() { } BinaryenAddFunctionExport(the_module, "_bool_as_tinycore::Not_::not", "_bool_as_tinycore::Not_::not"); the_relooper = RelooperCreate(the_module); - expressions[228] = BinaryenGetLocal(the_module, 0, 1); - expressions[229] = BinaryenSetLocal(the_module, 2, expressions[228]); - expressions[230] = BinaryenGetLocal(the_module, 1, 1); - expressions[231] = BinaryenSetLocal(the_module, 3, expressions[230]); - expressions[232] = BinaryenGetLocal(the_module, 2, 1); - expressions[233] = BinaryenSetLocal(the_module, 4, expressions[232]); - expressions[234] = BinaryenGetLocal(the_module, 3, 1); - expressions[235] = BinaryenSetLocal(the_module, 5, expressions[234]); - expressions[236] = BinaryenGetLocal(the_module, 4, 1); - expressions[237] = BinaryenGetLocal(the_module, 5, 1); + expressions[228] = BinaryenLocalGet(the_module, 0, 1); + expressions[229] = BinaryenLocalSet(the_module, 2, expressions[228]); + expressions[230] = BinaryenLocalGet(the_module, 1, 1); + expressions[231] = BinaryenLocalSet(the_module, 3, expressions[230]); + expressions[232] = BinaryenLocalGet(the_module, 2, 1); + expressions[233] = BinaryenLocalSet(the_module, 4, expressions[232]); + expressions[234] = BinaryenLocalGet(the_module, 3, 1); + expressions[235] = BinaryenLocalSet(the_module, 5, expressions[234]); + expressions[236] = BinaryenLocalGet(the_module, 4, 1); + expressions[237] = BinaryenLocalGet(the_module, 5, 1); expressions[238] = BinaryenBinary(the_module, 15, expressions[236], expressions[237]); - expressions[239] = BinaryenSetLocal(the_module, 6, expressions[238]); - expressions[240] = BinaryenGetLocal(the_module, 7, 1); + expressions[239] = BinaryenLocalSet(the_module, 6, expressions[238]); + expressions[240] = BinaryenLocalGet(the_module, 7, 1); expressions[241] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); expressions[242] = BinaryenStore(the_module, 4, 0, 0, expressions[241], expressions[240], 1); - expressions[243] = BinaryenGetLocal(the_module, 6, 1); + expressions[243] = BinaryenLocalGet(the_module, 6, 1); expressions[244] = BinaryenReturn(the_module, expressions[243]); { BinaryenExpressionRef children[] = { expressions[229], expressions[231], expressions[233], expressions[235], expressions[239], expressions[242], expressions[244] }; @@ -502,7 +502,7 @@ int main() { } expressions[246] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); expressions[247] = BinaryenLoad(the_module, 4, 0, 0, 0, 1, expressions[246]); - expressions[248] = BinaryenSetLocal(the_module, 7, expressions[247]); + expressions[248] = BinaryenLocalSet(the_module, 7, expressions[247]); relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[248]); RelooperAddBranch(relooperBlocks[1], relooperBlocks[0], expressions[0], expressions[0]); expressions[249] = RelooperRenderAndDispose(the_relooper, relooperBlocks[1], 8); @@ -512,22 +512,22 @@ int main() { } BinaryenAddFunctionExport(the_module, "_i16_as_tinycore::PartialEq_::eq", "_i16_as_tinycore::PartialEq_::eq"); the_relooper = RelooperCreate(the_module); - expressions[250] = BinaryenGetLocal(the_module, 0, 1); - expressions[251] = BinaryenSetLocal(the_module, 2, expressions[250]); - expressions[252] = BinaryenGetLocal(the_module, 1, 1); - expressions[253] = BinaryenSetLocal(the_module, 3, expressions[252]); - expressions[254] = BinaryenGetLocal(the_module, 2, 2); - expressions[255] = BinaryenSetLocal(the_module, 4, expressions[254]); - expressions[256] = BinaryenGetLocal(the_module, 3, 2); - expressions[257] = BinaryenSetLocal(the_module, 5, expressions[256]); - expressions[258] = BinaryenGetLocal(the_module, 4, 2); - expressions[259] = BinaryenGetLocal(the_module, 5, 2); + expressions[250] = BinaryenLocalGet(the_module, 0, 1); + expressions[251] = BinaryenLocalSet(the_module, 2, expressions[250]); + expressions[252] = BinaryenLocalGet(the_module, 1, 1); + expressions[253] = BinaryenLocalSet(the_module, 3, expressions[252]); + expressions[254] = BinaryenLocalGet(the_module, 2, 2); + expressions[255] = BinaryenLocalSet(the_module, 4, expressions[254]); + expressions[256] = BinaryenLocalGet(the_module, 3, 2); + expressions[257] = BinaryenLocalSet(the_module, 5, expressions[256]); + expressions[258] = BinaryenLocalGet(the_module, 4, 2); + expressions[259] = BinaryenLocalGet(the_module, 5, 2); expressions[260] = BinaryenBinary(the_module, 40, expressions[258], expressions[259]); - expressions[261] = BinaryenSetLocal(the_module, 6, expressions[260]); - expressions[262] = BinaryenGetLocal(the_module, 7, 1); + expressions[261] = BinaryenLocalSet(the_module, 6, expressions[260]); + expressions[262] = BinaryenLocalGet(the_module, 7, 1); expressions[263] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); expressions[264] = BinaryenStore(the_module, 4, 0, 0, expressions[263], expressions[262], 1); - expressions[265] = BinaryenGetLocal(the_module, 6, 1); + expressions[265] = BinaryenLocalGet(the_module, 6, 1); expressions[266] = BinaryenReturn(the_module, expressions[265]); { BinaryenExpressionRef children[] = { expressions[251], expressions[253], expressions[255], expressions[257], expressions[261], expressions[264], expressions[266] }; @@ -540,7 +540,7 @@ int main() { } expressions[268] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); expressions[269] = BinaryenLoad(the_module, 4, 0, 0, 0, 1, expressions[268]); - expressions[270] = BinaryenSetLocal(the_module, 7, expressions[269]); + expressions[270] = BinaryenLocalSet(the_module, 7, expressions[269]); relooperBlocks[1] = RelooperAddBlock(the_relooper, expressions[270]); RelooperAddBranch(relooperBlocks[1], relooperBlocks[0], expressions[0], expressions[0]); expressions[271] = RelooperRenderAndDispose(the_relooper, relooperBlocks[1], 8); diff --git a/test/example/c-api-unused-mem.cpp b/test/example/c-api-unused-mem.cpp index 49d116fdc..d625e2b51 100644 --- a/test/example/c-api-unused-mem.cpp +++ b/test/example/c-api-unused-mem.cpp @@ -26,7 +26,7 @@ int main() { expressions[1] = BinaryenBlock(the_module, "bb0", children, 0, BinaryenTypeAuto()); } relooperBlocks[0] = RelooperAddBlock(the_relooper, expressions[1]); - expressions[2] = BinaryenGetLocal(the_module, 0, 1); + expressions[2] = BinaryenLocalGet(the_module, 0, 1); expressions[3] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); expressions[4] = BinaryenStore(the_module, 4, 0, 0, expressions[3], expressions[2], 1); expressions[5] = BinaryenReturn(the_module, expressions[0]); @@ -42,7 +42,7 @@ int main() { } expressions[7] = BinaryenConst(the_module, BinaryenLiteralInt32(0)); expressions[8] = BinaryenLoad(the_module, 4, 0, 0, 0, 1, expressions[7]); - expressions[9] = BinaryenSetLocal(the_module, 0, expressions[8]); + expressions[9] = BinaryenLocalSet(the_module, 0, expressions[8]); relooperBlocks[2] = RelooperAddBlock(the_relooper, expressions[9]); RelooperAddBranch(relooperBlocks[2], relooperBlocks[0], expressions[0], expressions[0]); expressions[10] = RelooperRenderAndDispose(the_relooper, relooperBlocks[2], 1); diff --git a/test/example/cpp-threads.cpp b/test/example/cpp-threads.cpp index 4a41249e7..07c3049d8 100644 --- a/test/example/cpp-threads.cpp +++ b/test/example/cpp-threads.cpp @@ -16,8 +16,8 @@ void worker() { BinaryenFunctionTypeRef iii = BinaryenAddFunctionType(module, "iii", BinaryenTypeInt32(), params, 2); // Get the 0 and 1 arguments, and add them - BinaryenExpressionRef x = BinaryenGetLocal(module, 0, BinaryenTypeInt32()), - y = BinaryenGetLocal(module, 1, BinaryenTypeInt32()); + BinaryenExpressionRef x = BinaryenLocalGet(module, 0, BinaryenTypeInt32()), + y = BinaryenLocalGet(module, 1, BinaryenTypeInt32()); BinaryenExpressionRef add = BinaryenBinary(module, BinaryenAddInt32(), x, y); BinaryenExpressionRef ret = BinaryenReturn(module, add); diff --git a/test/example/cpp-unit.cpp b/test/example/cpp-unit.cpp index f51ca72b6..e6189d9d1 100644 --- a/test/example/cpp-unit.cpp +++ b/test/example/cpp-unit.cpp @@ -10,7 +10,7 @@ using namespace wasm; int main() { // Some optimizations assume that the cost of a get is zero, e.g. local-cse. - GetLocal get; + LocalGet get; assert(CostAnalyzer(&get).cost == 0); std::cout << "Success.\n"; diff --git a/test/example/relooper-fuzz.c b/test/example/relooper-fuzz.c index 7d8e5aec0..5691c5660 100644 --- a/test/example/relooper-fuzz.c +++ b/test/example/relooper-fuzz.c @@ -70,7 +70,7 @@ int main() { BinaryenExpressionRef args[] = { BinaryenConst(module, BinaryenLiteralInt32(0)) }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; b0 = RelooperAddBlock(relooper, BinaryenBlock(module, NULL, list, 2, BinaryenTypeAuto())); } @@ -80,7 +80,7 @@ int main() { BinaryenExpressionRef args[] = { BinaryenConst(module, BinaryenLiteralInt32(1)) }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; b1 = RelooperAddBlock(relooper, BinaryenBlock(module, NULL, list, 2, BinaryenTypeAuto())); } @@ -90,7 +90,7 @@ int main() { BinaryenExpressionRef args[] = { BinaryenConst(module, BinaryenLiteralInt32(2)) }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; b2 = RelooperAddBlock(relooper, BinaryenBlock(module, NULL, list, 2, BinaryenTypeAuto())); } @@ -100,7 +100,7 @@ int main() { BinaryenExpressionRef args[] = { BinaryenConst(module, BinaryenLiteralInt32(3)) }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; b3 = RelooperAddBlock(relooper, BinaryenBlock(module, NULL, list, 2, BinaryenTypeAuto())); } @@ -110,7 +110,7 @@ int main() { BinaryenExpressionRef args[] = { BinaryenConst(module, BinaryenLiteralInt32(4)) }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; b4 = RelooperAddBlock(relooper, BinaryenBlock(module, NULL, list, 2, BinaryenTypeAuto())); } @@ -120,7 +120,7 @@ int main() { BinaryenExpressionRef args[] = { BinaryenConst(module, BinaryenLiteralInt32(5)) }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; b5 = RelooperAddBlock(relooper, BinaryenBlock(module, NULL, list, 2, BinaryenTypeAuto())); } @@ -130,7 +130,7 @@ int main() { BinaryenExpressionRef args[] = { BinaryenConst(module, BinaryenLiteralInt32(6)) }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; b6 = RelooperAddBlock(relooper, BinaryenBlock(module, NULL, list, 2, BinaryenTypeAuto())); } @@ -140,7 +140,7 @@ int main() { BinaryenExpressionRef args[] = { BinaryenConst(module, BinaryenLiteralInt32(7)) }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; b7 = RelooperAddBlock(relooper, BinaryenBlock(module, NULL, list, 2, BinaryenTypeAuto())); } @@ -150,7 +150,7 @@ int main() { BinaryenExpressionRef args[] = { BinaryenConst(module, BinaryenLiteralInt32(8)) }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; b8 = RelooperAddBlock(relooper, BinaryenBlock(module, NULL, list, 2, BinaryenTypeAuto())); } @@ -159,7 +159,7 @@ int main() { BinaryenEqInt32(), BinaryenBinary(module, BinaryenRemUInt32(), - BinaryenGetLocal(module, 0, BinaryenTypeInt32()), + BinaryenLocalGet(module, 0, BinaryenTypeInt32()), BinaryenConst(module, BinaryenLiteralInt32(2)) ), BinaryenConst(module, BinaryenLiteralInt32(0)) @@ -175,7 +175,7 @@ int main() { BinaryenEqInt32(), BinaryenBinary(module, BinaryenRemUInt32(), - BinaryenGetLocal(module, 0, BinaryenTypeInt32()), + BinaryenLocalGet(module, 0, BinaryenTypeInt32()), BinaryenConst(module, BinaryenLiteralInt32(2)) ), BinaryenConst(module, BinaryenLiteralInt32(0)) @@ -187,7 +187,7 @@ int main() { BinaryenEqInt32(), BinaryenBinary(module, BinaryenRemUInt32(), - BinaryenGetLocal(module, 0, BinaryenTypeInt32()), + BinaryenLocalGet(module, 0, BinaryenTypeInt32()), BinaryenConst(module, BinaryenLiteralInt32(3)) ), BinaryenConst(module, BinaryenLiteralInt32(0)) @@ -197,7 +197,7 @@ int main() { BinaryenEqInt32(), BinaryenBinary(module, BinaryenRemUInt32(), - BinaryenGetLocal(module, 0, BinaryenTypeInt32()), + BinaryenLocalGet(module, 0, BinaryenTypeInt32()), BinaryenConst(module, BinaryenLiteralInt32(3)) ), BinaryenConst(module, BinaryenLiteralInt32(1)) @@ -209,7 +209,7 @@ int main() { BinaryenEqInt32(), BinaryenBinary(module, BinaryenRemUInt32(), - BinaryenGetLocal(module, 0, BinaryenTypeInt32()), + BinaryenLocalGet(module, 0, BinaryenTypeInt32()), BinaryenConst(module, BinaryenLiteralInt32(2)) ), BinaryenConst(module, BinaryenLiteralInt32(0)) diff --git a/test/example/relooper-fuzz1.c b/test/example/relooper-fuzz1.c index 5b6b7f450..55271356c 100644 --- a/test/example/relooper-fuzz1.c +++ b/test/example/relooper-fuzz1.c @@ -84,7 +84,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -100,7 +100,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -116,7 +116,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -132,7 +132,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -148,7 +148,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -164,7 +164,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -180,7 +180,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -196,7 +196,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -212,7 +212,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -228,7 +228,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -241,7 +241,7 @@ int main() { BinaryenEqInt32(), BinaryenBinary(module, BinaryenRemUInt32(), - BinaryenGetLocal(module, 0, BinaryenTypeInt32()), + BinaryenLocalGet(module, 0, BinaryenTypeInt32()), BinaryenConst(module, BinaryenLiteralInt32(4)) ), BinaryenConst(module, BinaryenLiteralInt32(0)) @@ -251,7 +251,7 @@ int main() { BinaryenEqInt32(), BinaryenBinary(module, BinaryenRemUInt32(), - BinaryenGetLocal(module, 0, BinaryenTypeInt32()), + BinaryenLocalGet(module, 0, BinaryenTypeInt32()), BinaryenConst(module, BinaryenLiteralInt32(4)) ), BinaryenConst(module, BinaryenLiteralInt32(2)) @@ -263,7 +263,7 @@ int main() { BinaryenEqInt32(), BinaryenBinary(module, BinaryenRemUInt32(), - BinaryenGetLocal(module, 0, BinaryenTypeInt32()), + BinaryenLocalGet(module, 0, BinaryenTypeInt32()), BinaryenConst(module, BinaryenLiteralInt32(2)) ), BinaryenConst(module, BinaryenLiteralInt32(0)) @@ -277,7 +277,7 @@ int main() { BinaryenEqInt32(), BinaryenBinary(module, BinaryenRemUInt32(), - BinaryenGetLocal(module, 0, BinaryenTypeInt32()), + BinaryenLocalGet(module, 0, BinaryenTypeInt32()), BinaryenConst(module, BinaryenLiteralInt32(3)) ), BinaryenConst(module, BinaryenLiteralInt32(0)) diff --git a/test/example/relooper-fuzz2.c b/test/example/relooper-fuzz2.c index 66ffcef36..4d5af6759 100644 --- a/test/example/relooper-fuzz2.c +++ b/test/example/relooper-fuzz2.c @@ -84,7 +84,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -99,7 +99,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -114,7 +114,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -122,7 +122,7 @@ int main() { BinaryenBlock(module, NULL, list, 2, BinaryenTypeNone()), BinaryenBinary(module, BinaryenRemUInt32(), - BinaryenGetLocal(module, 0, BinaryenTypeInt32()), + BinaryenLocalGet(module, 0, BinaryenTypeInt32()), BinaryenConst(module, BinaryenLiteralInt32(2)) ) ); @@ -136,7 +136,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -144,7 +144,7 @@ int main() { BinaryenBlock(module, NULL, list, 2, BinaryenTypeNone()), BinaryenBinary(module, BinaryenRemUInt32(), - BinaryenGetLocal(module, 0, BinaryenTypeInt32()), + BinaryenLocalGet(module, 0, BinaryenTypeInt32()), BinaryenConst(module, BinaryenLiteralInt32(1)) ) ); @@ -158,7 +158,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -173,7 +173,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -181,7 +181,7 @@ int main() { BinaryenBlock(module, NULL, list, 2, BinaryenTypeNone()), BinaryenBinary(module, BinaryenRemUInt32(), - BinaryenGetLocal(module, 0, BinaryenTypeInt32()), + BinaryenLocalGet(module, 0, BinaryenTypeInt32()), BinaryenConst(module, BinaryenLiteralInt32(1)) ) ); @@ -195,7 +195,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -203,7 +203,7 @@ int main() { BinaryenBlock(module, NULL, list, 2, BinaryenTypeNone()), BinaryenBinary(module, BinaryenRemUInt32(), - BinaryenGetLocal(module, 0, BinaryenTypeInt32()), + BinaryenLocalGet(module, 0, BinaryenTypeInt32()), BinaryenConst(module, BinaryenLiteralInt32(3)) ) ); @@ -217,7 +217,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -232,7 +232,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -313,7 +313,7 @@ int main() { BinaryenEqInt32(), BinaryenBinary(module, BinaryenRemUInt32(), - BinaryenGetLocal(module, 0, BinaryenTypeInt32()), + BinaryenLocalGet(module, 0, BinaryenTypeInt32()), BinaryenConst(module, BinaryenLiteralInt32(2)) ), BinaryenConst(module, BinaryenLiteralInt32(0)) @@ -407,7 +407,7 @@ int main() { BinaryenEqInt32(), BinaryenBinary(module, BinaryenRemUInt32(), - BinaryenGetLocal(module, 0, BinaryenTypeInt32()), + BinaryenLocalGet(module, 0, BinaryenTypeInt32()), BinaryenConst(module, BinaryenLiteralInt32(2)) ), BinaryenConst(module, BinaryenLiteralInt32(0)) diff --git a/test/example/relooper-merge1.c b/test/example/relooper-merge1.c index df08e60b5..320e73efa 100644 --- a/test/example/relooper-merge1.c +++ b/test/example/relooper-merge1.c @@ -84,7 +84,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -92,7 +92,7 @@ int main() { BinaryenBlock(module, NULL, list, 2, BinaryenTypeNone()), BinaryenBinary(module, BinaryenRemUInt32(), - BinaryenGetLocal(module, 0, BinaryenTypeInt32()), + BinaryenLocalGet(module, 0, BinaryenTypeInt32()), BinaryenConst(module, BinaryenLiteralInt32(1)) ) ); @@ -106,7 +106,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -121,7 +121,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -136,7 +136,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -150,7 +150,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; diff --git a/test/example/relooper-merge2.c b/test/example/relooper-merge2.c index 2784b4e71..9387d572b 100644 --- a/test/example/relooper-merge2.c +++ b/test/example/relooper-merge2.c @@ -84,7 +84,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -92,7 +92,7 @@ int main() { BinaryenBlock(module, NULL, list, 2, BinaryenTypeNone()), BinaryenBinary(module, BinaryenRemUInt32(), - BinaryenGetLocal(module, 0, BinaryenTypeInt32()), + BinaryenLocalGet(module, 0, BinaryenTypeInt32()), BinaryenConst(module, BinaryenLiteralInt32(1)) ) ); @@ -106,7 +106,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -121,7 +121,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -136,7 +136,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -150,7 +150,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; diff --git a/test/example/relooper-merge3.c b/test/example/relooper-merge3.c index a992c0d47..1bb650391 100644 --- a/test/example/relooper-merge3.c +++ b/test/example/relooper-merge3.c @@ -84,7 +84,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -92,7 +92,7 @@ int main() { BinaryenBlock(module, NULL, list, 2, BinaryenTypeNone()), BinaryenBinary(module, BinaryenRemUInt32(), - BinaryenGetLocal(module, 0, BinaryenTypeInt32()), + BinaryenLocalGet(module, 0, BinaryenTypeInt32()), BinaryenConst(module, BinaryenLiteralInt32(1)) ) ); @@ -106,7 +106,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -121,7 +121,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -136,7 +136,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -150,7 +150,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; diff --git a/test/example/relooper-merge4.c b/test/example/relooper-merge4.c index d8d78d082..86ba272f2 100644 --- a/test/example/relooper-merge4.c +++ b/test/example/relooper-merge4.c @@ -84,7 +84,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -92,7 +92,7 @@ int main() { BinaryenBlock(module, NULL, list, 2, BinaryenTypeNone()), BinaryenBinary(module, BinaryenRemUInt32(), - BinaryenGetLocal(module, 0, BinaryenTypeInt32()), + BinaryenLocalGet(module, 0, BinaryenTypeInt32()), BinaryenConst(module, BinaryenLiteralInt32(1)) ) ); @@ -106,7 +106,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -121,7 +121,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -136,7 +136,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -150,7 +150,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; diff --git a/test/example/relooper-merge5.c b/test/example/relooper-merge5.c index 8c4c25ad0..67048159f 100644 --- a/test/example/relooper-merge5.c +++ b/test/example/relooper-merge5.c @@ -84,7 +84,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -92,7 +92,7 @@ int main() { BinaryenBlock(module, NULL, list, 2, BinaryenTypeNone()), BinaryenBinary(module, BinaryenRemUInt32(), - BinaryenGetLocal(module, 0, BinaryenTypeInt32()), + BinaryenLocalGet(module, 0, BinaryenTypeInt32()), BinaryenConst(module, BinaryenLiteralInt32(1)) ) ); @@ -106,7 +106,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -121,7 +121,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -136,7 +136,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -150,7 +150,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; diff --git a/test/example/relooper-merge6.c b/test/example/relooper-merge6.c index 7576a6c1e..d51504d68 100644 --- a/test/example/relooper-merge6.c +++ b/test/example/relooper-merge6.c @@ -84,7 +84,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -92,7 +92,7 @@ int main() { BinaryenBlock(module, NULL, list, 2, BinaryenTypeNone()), BinaryenBinary(module, BinaryenRemUInt32(), - BinaryenGetLocal(module, 0, BinaryenTypeInt32()), + BinaryenLocalGet(module, 0, BinaryenTypeInt32()), BinaryenConst(module, BinaryenLiteralInt32(1)) ) ); @@ -106,7 +106,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -121,7 +121,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -136,7 +136,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; @@ -150,7 +150,7 @@ int main() { }; BinaryenExpressionRef list[] = { BinaryenCall(module, "print", args, 1, BinaryenTypeNone()), - BinaryenSetLocal(module, 0, BinaryenCall(module, "check", NULL, 0, + BinaryenLocalSet(module, 0, BinaryenCall(module, "check", NULL, 0, BinaryenTypeInt32())) }; diff --git a/test/grow_memory.wast b/test/grow_memory.wast index 263c90515..002247713 100644 --- a/test/grow_memory.wast +++ b/test/grow_memory.wast @@ -6,12 +6,12 @@ (export "grow" (func $0)) (export "current" (func $1)) (func $0 (; 0 ;) (type $0) (param $var$0 i32) (result i32) - (grow_memory + (memory.grow (local.get $var$0) ) ) (func $1 (; 1 ;) (type $1) (result i32) - (current_memory) + (memory.size) ) ) diff --git a/test/grow_memory.wast.from-wast b/test/grow_memory.wast.from-wast index 634368962..383591320 100644 --- a/test/grow_memory.wast.from-wast +++ b/test/grow_memory.wast.from-wast @@ -6,11 +6,11 @@ (export "grow" (func $0)) (export "current" (func $1)) (func $0 (; 0 ;) (type $0) (param $var$0 i32) (result i32) - (grow_memory + (memory.grow (local.get $var$0) ) ) (func $1 (; 1 ;) (type $1) (result i32) - (current_memory) + (memory.size) ) ) diff --git a/test/grow_memory.wast.fromBinary b/test/grow_memory.wast.fromBinary index f822a95f6..706495c97 100644 --- a/test/grow_memory.wast.fromBinary +++ b/test/grow_memory.wast.fromBinary @@ -6,12 +6,12 @@ (export "grow" (func $0)) (export "current" (func $1)) (func $0 (; 0 ;) (type $0) (param $0 i32) (result i32) - (grow_memory + (memory.grow (local.get $0) ) ) (func $1 (; 1 ;) (type $1) (result i32) - (current_memory) + (memory.size) ) ) diff --git a/test/grow_memory.wast.fromBinary.noDebugInfo b/test/grow_memory.wast.fromBinary.noDebugInfo index f822a95f6..706495c97 100644 --- a/test/grow_memory.wast.fromBinary.noDebugInfo +++ b/test/grow_memory.wast.fromBinary.noDebugInfo @@ -6,12 +6,12 @@ (export "grow" (func $0)) (export "current" (func $1)) (func $0 (; 0 ;) (type $0) (param $0 i32) (result i32) - (grow_memory + (memory.grow (local.get $0) ) ) (func $1 (; 1 ;) (type $1) (result i32) - (current_memory) + (memory.size) ) ) diff --git a/test/lld/duplicate_imports.wast.out b/test/lld/duplicate_imports.wast.out index be9d7f77a..3a9798679 100644 --- a/test/lld/duplicate_imports.wast.out +++ b/test/lld/duplicate_imports.wast.out @@ -61,7 +61,7 @@ ) ) (func $__growWasmMemory (; 9 ;) (param $newSize i32) (result i32) - (grow_memory + (memory.grow (local.get $newSize) ) ) diff --git a/test/lld/em_asm.wast.mem.out b/test/lld/em_asm.wast.mem.out index 2aac1ef36..4e16c7feb 100644 --- a/test/lld/em_asm.wast.mem.out +++ b/test/lld/em_asm.wast.mem.out @@ -217,7 +217,7 @@ ) ) (func $__growWasmMemory (; 11 ;) (param $newSize i32) (result i32) - (grow_memory + (memory.grow (local.get $newSize) ) ) diff --git a/test/lld/em_asm.wast.out b/test/lld/em_asm.wast.out index 5917fb187..43d68677b 100644 --- a/test/lld/em_asm.wast.out +++ b/test/lld/em_asm.wast.out @@ -218,7 +218,7 @@ ) ) (func $__growWasmMemory (; 11 ;) (param $newSize i32) (result i32) - (grow_memory + (memory.grow (local.get $newSize) ) ) diff --git a/test/lld/em_asm_O0.wast.out b/test/lld/em_asm_O0.wast.out index cb5cc1961..7fc057079 100644 --- a/test/lld/em_asm_O0.wast.out +++ b/test/lld/em_asm_O0.wast.out @@ -78,7 +78,7 @@ ) ) (func $__growWasmMemory (; 8 ;) (param $newSize i32) (result i32) - (grow_memory + (memory.grow (local.get $newSize) ) ) diff --git a/test/lld/em_asm_table.wast.out b/test/lld/em_asm_table.wast.out index 50f24876e..a3ce87bba 100644 --- a/test/lld/em_asm_table.wast.out +++ b/test/lld/em_asm_table.wast.out @@ -41,7 +41,7 @@ ) ) (func $__growWasmMemory (; 5 ;) (param $newSize i32) (result i32) - (grow_memory + (memory.grow (local.get $newSize) ) ) diff --git a/test/lld/em_js_O0.wast.out b/test/lld/em_js_O0.wast.out index 02d4fed07..697a5082f 100644 --- a/test/lld/em_js_O0.wast.out +++ b/test/lld/em_js_O0.wast.out @@ -37,7 +37,7 @@ ) ) (func $__growWasmMemory (; 3 ;) (param $newSize i32) (result i32) - (grow_memory + (memory.grow (local.get $newSize) ) ) diff --git a/test/lld/hello_world.wast.mem.out b/test/lld/hello_world.wast.mem.out index 834f4945a..b3c6ad55c 100644 --- a/test/lld/hello_world.wast.mem.out +++ b/test/lld/hello_world.wast.mem.out @@ -57,7 +57,7 @@ ) ) (func $__growWasmMemory (; 7 ;) (param $newSize i32) (result i32) - (grow_memory + (memory.grow (local.get $newSize) ) ) diff --git a/test/lld/hello_world.wast.out b/test/lld/hello_world.wast.out index 67fd6428b..b20f4e6ca 100644 --- a/test/lld/hello_world.wast.out +++ b/test/lld/hello_world.wast.out @@ -58,7 +58,7 @@ ) ) (func $__growWasmMemory (; 7 ;) (param $newSize i32) (result i32) - (grow_memory + (memory.grow (local.get $newSize) ) ) diff --git a/test/lld/init.wast.out b/test/lld/init.wast.out index 645f78f67..7b5f43de2 100644 --- a/test/lld/init.wast.out +++ b/test/lld/init.wast.out @@ -70,7 +70,7 @@ ) ) (func $__growWasmMemory (; 8 ;) (param $newSize i32) (result i32) - (grow_memory + (memory.grow (local.get $newSize) ) ) diff --git a/test/lld/recursive.wast.out b/test/lld/recursive.wast.out index 8f81cdc91..18b9c7db0 100644 --- a/test/lld/recursive.wast.out +++ b/test/lld/recursive.wast.out @@ -115,7 +115,7 @@ ) ) (func $__growWasmMemory (; 8 ;) (param $newSize i32) (result i32) - (grow_memory + (memory.grow (local.get $newSize) ) ) diff --git a/test/lld/reserved_func_ptr.wast.out b/test/lld/reserved_func_ptr.wast.out index 3ddf2f0ce..0244ee522 100644 --- a/test/lld/reserved_func_ptr.wast.out +++ b/test/lld/reserved_func_ptr.wast.out @@ -142,7 +142,7 @@ ) ) (func $__growWasmMemory (; 8 ;) (param $newSize i32) (result i32) - (grow_memory + (memory.grow (local.get $newSize) ) ) diff --git a/test/memorygrowth-minimal.fromasm b/test/memorygrowth-minimal.fromasm index 39dc3622b..fdc4bf41d 100644 --- a/test/memorygrowth-minimal.fromasm +++ b/test/memorygrowth-minimal.fromasm @@ -4,7 +4,7 @@ (import "env" "__memory_base" (global $__memory_base i32)) (export "__growWasmMemory" (func $__growWasmMemory)) (func $__growWasmMemory (; 0 ;) (; has Stack IR ;) (param $0 i32) (result i32) - (grow_memory + (memory.grow (local.get $0) ) ) diff --git a/test/memorygrowth-minimal.fromasm.clamp b/test/memorygrowth-minimal.fromasm.clamp index 39dc3622b..fdc4bf41d 100644 --- a/test/memorygrowth-minimal.fromasm.clamp +++ b/test/memorygrowth-minimal.fromasm.clamp @@ -4,7 +4,7 @@ (import "env" "__memory_base" (global $__memory_base i32)) (export "__growWasmMemory" (func $__growWasmMemory)) (func $__growWasmMemory (; 0 ;) (; has Stack IR ;) (param $0 i32) (result i32) - (grow_memory + (memory.grow (local.get $0) ) ) diff --git a/test/memorygrowth-minimal.fromasm.clamp.no-opts b/test/memorygrowth-minimal.fromasm.clamp.no-opts index 7a07ac465..70f1600f3 100644 --- a/test/memorygrowth-minimal.fromasm.clamp.no-opts +++ b/test/memorygrowth-minimal.fromasm.clamp.no-opts @@ -5,7 +5,7 @@ (import "env" "__table_base" (global $__table_base i32)) (export "__growWasmMemory" (func $__growWasmMemory)) (func $__growWasmMemory (; 0 ;) (param $newSize i32) (result i32) - (grow_memory + (memory.grow (local.get $newSize) ) ) diff --git a/test/memorygrowth-minimal.fromasm.imprecise b/test/memorygrowth-minimal.fromasm.imprecise index 95377f497..1c70223ec 100644 --- a/test/memorygrowth-minimal.fromasm.imprecise +++ b/test/memorygrowth-minimal.fromasm.imprecise @@ -2,7 +2,7 @@ (import "env" "memory" (memory $memory 256)) (export "__growWasmMemory" (func $__growWasmMemory)) (func $__growWasmMemory (; 0 ;) (; has Stack IR ;) (param $0 i32) (result i32) - (grow_memory + (memory.grow (local.get $0) ) ) diff --git a/test/memorygrowth-minimal.fromasm.imprecise.no-opts b/test/memorygrowth-minimal.fromasm.imprecise.no-opts index 7a07ac465..70f1600f3 100644 --- a/test/memorygrowth-minimal.fromasm.imprecise.no-opts +++ b/test/memorygrowth-minimal.fromasm.imprecise.no-opts @@ -5,7 +5,7 @@ (import "env" "__table_base" (global $__table_base i32)) (export "__growWasmMemory" (func $__growWasmMemory)) (func $__growWasmMemory (; 0 ;) (param $newSize i32) (result i32) - (grow_memory + (memory.grow (local.get $newSize) ) ) diff --git a/test/memorygrowth-minimal.fromasm.no-opts b/test/memorygrowth-minimal.fromasm.no-opts index 7a07ac465..70f1600f3 100644 --- a/test/memorygrowth-minimal.fromasm.no-opts +++ b/test/memorygrowth-minimal.fromasm.no-opts @@ -5,7 +5,7 @@ (import "env" "__table_base" (global $__table_base i32)) (export "__growWasmMemory" (func $__growWasmMemory)) (func $__growWasmMemory (; 0 ;) (param $newSize i32) (result i32) - (grow_memory + (memory.grow (local.get $newSize) ) ) diff --git a/test/memorygrowth.fromasm b/test/memorygrowth.fromasm index 349fddb52..13231d482 100644 --- a/test/memorygrowth.fromasm +++ b/test/memorygrowth.fromasm @@ -51,7 +51,7 @@ (export "dynCall_iiii" (func $lb)) (export "dynCall_vi" (func $mb)) (func $__growWasmMemory (; 12 ;) (; has Stack IR ;) (param $0 i32) (result i32) - (grow_memory + (memory.grow (local.get $0) ) ) diff --git a/test/memorygrowth.fromasm.clamp b/test/memorygrowth.fromasm.clamp index 349fddb52..13231d482 100644 --- a/test/memorygrowth.fromasm.clamp +++ b/test/memorygrowth.fromasm.clamp @@ -51,7 +51,7 @@ (export "dynCall_iiii" (func $lb)) (export "dynCall_vi" (func $mb)) (func $__growWasmMemory (; 12 ;) (; has Stack IR ;) (param $0 i32) (result i32) - (grow_memory + (memory.grow (local.get $0) ) ) diff --git a/test/memorygrowth.fromasm.clamp.no-opts b/test/memorygrowth.fromasm.clamp.no-opts index 4ab38f888..f18677923 100644 --- a/test/memorygrowth.fromasm.clamp.no-opts +++ b/test/memorygrowth.fromasm.clamp.no-opts @@ -79,7 +79,7 @@ (export "dynCall_iiii" (func $lb)) (export "dynCall_vi" (func $mb)) (func $__growWasmMemory (; 12 ;) (param $newSize i32) (result i32) - (grow_memory + (memory.grow (local.get $newSize) ) ) diff --git a/test/memorygrowth.fromasm.imprecise b/test/memorygrowth.fromasm.imprecise index bf7be5678..d6011b1c7 100644 --- a/test/memorygrowth.fromasm.imprecise +++ b/test/memorygrowth.fromasm.imprecise @@ -49,7 +49,7 @@ (export "dynCall_iiii" (func $lb)) (export "dynCall_vi" (func $mb)) (func $__growWasmMemory (; 12 ;) (; has Stack IR ;) (param $0 i32) (result i32) - (grow_memory + (memory.grow (local.get $0) ) ) diff --git a/test/memorygrowth.fromasm.imprecise.no-opts b/test/memorygrowth.fromasm.imprecise.no-opts index 9a0b46da0..ef39f5e2e 100644 --- a/test/memorygrowth.fromasm.imprecise.no-opts +++ b/test/memorygrowth.fromasm.imprecise.no-opts @@ -79,7 +79,7 @@ (export "dynCall_iiii" (func $lb)) (export "dynCall_vi" (func $mb)) (func $__growWasmMemory (; 12 ;) (param $newSize i32) (result i32) - (grow_memory + (memory.grow (local.get $newSize) ) ) diff --git a/test/memorygrowth.fromasm.no-opts b/test/memorygrowth.fromasm.no-opts index 4ab38f888..f18677923 100644 --- a/test/memorygrowth.fromasm.no-opts +++ b/test/memorygrowth.fromasm.no-opts @@ -79,7 +79,7 @@ (export "dynCall_iiii" (func $lb)) (export "dynCall_vi" (func $mb)) (func $__growWasmMemory (; 12 ;) (param $newSize i32) (result i32) - (grow_memory + (memory.grow (local.get $newSize) ) ) diff --git a/test/passes/O4_disable-bulk-memory.txt b/test/passes/O4_disable-bulk-memory.txt index 1b01f1c28..455d8101d 100644 --- a/test/passes/O4_disable-bulk-memory.txt +++ b/test/passes/O4_disable-bulk-memory.txt @@ -66,14 +66,14 @@ ) (i32.shl (local.tee $2 - (current_memory) + (memory.size) ) (i32.const 16) ) ) (if (i32.lt_s - (grow_memory + (memory.grow (select (local.get $2) (local.tee $3 @@ -101,7 +101,7 @@ ) (if (i32.lt_s - (grow_memory + (memory.grow (local.get $3) ) (i32.const 0) diff --git a/test/passes/O4_disable-bulk-memory.wast b/test/passes/O4_disable-bulk-memory.wast index cdea2da96..9a8c38b49 100644 --- a/test/passes/O4_disable-bulk-memory.wast +++ b/test/passes/O4_disable-bulk-memory.wast @@ -224,7 +224,7 @@ ) ) (local.set $5 - (current_memory) + (memory.size) ) (if (i32.gt_u @@ -269,14 +269,14 @@ ) (if (i32.lt_s - (grow_memory + (memory.grow (local.get $3) ) (i32.const 0) ) (if (i32.lt_s - (grow_memory + (memory.grow (local.get $2) ) (i32.const 0) diff --git a/test/passes/dce.wast b/test/passes/dce.wast index 3d12a4989..0d3b04557 100644 --- a/test/passes/dce.wast +++ b/test/passes/dce.wast @@ -481,7 +481,7 @@ (func $unreachable-brs-3 (result i32) (block $label$0 (result i32) (br $label$0 - (grow_memory + (memory.grow (br $label$0 (i32.const 18) ) diff --git a/test/passes/duplicate-function-elimination_optimize-level=1.txt b/test/passes/duplicate-function-elimination_optimize-level=1.txt index 4ed278af8..baebf9ea8 100644 --- a/test/passes/duplicate-function-elimination_optimize-level=1.txt +++ b/test/passes/duplicate-function-elimination_optimize-level=1.txt @@ -1017,7 +1017,7 @@ (memory $0 0) (func $erase (; 0 ;) (type $0) (drop - (current_memory) + (memory.size) ) ) ) @@ -1026,7 +1026,7 @@ (memory $0 0) (func $erase (; 0 ;) (type $0) (drop - (grow_memory + (memory.grow (i32.const 10) ) ) @@ -1037,14 +1037,14 @@ (memory $0 0) (func $keep (; 0 ;) (type $0) (drop - (grow_memory + (memory.grow (i32.const 10) ) ) ) (func $other (; 1 ;) (type $0) (drop - (grow_memory + (memory.grow (i32.const 11) ) ) @@ -1055,12 +1055,12 @@ (memory $0 0) (func $keep (; 0 ;) (type $0) (drop - (current_memory) + (memory.size) ) ) (func $other (; 1 ;) (type $0) (drop - (grow_memory + (memory.grow (i32.const 10) ) ) diff --git a/test/passes/duplicate-function-elimination_optimize-level=1.wast b/test/passes/duplicate-function-elimination_optimize-level=1.wast index ce33b7a91..5b42a6ba5 100644 --- a/test/passes/duplicate-function-elimination_optimize-level=1.wast +++ b/test/passes/duplicate-function-elimination_optimize-level=1.wast @@ -1158,12 +1158,12 @@ (type $0 (func)) (func $erase (type $0) (drop - (current_memory) + (memory.size) ) ) (func $other (type $0) (drop - (current_memory) + (memory.size) ) ) ) @@ -1172,14 +1172,14 @@ (type $0 (func)) (func $erase (type $0) (drop - (grow_memory + (memory.grow (i32.const 10) ) ) ) (func $other (type $0) (drop - (grow_memory + (memory.grow (i32.const 10) ) ) @@ -1190,14 +1190,14 @@ (type $0 (func)) (func $keep (type $0) (drop - (grow_memory + (memory.grow (i32.const 10) ) ) ) (func $other (type $0) (drop - (grow_memory + (memory.grow (i32.const 11) ) ) @@ -1208,12 +1208,12 @@ (type $0 (func)) (func $keep (type $0) (drop - (current_memory) + (memory.size) ) ) (func $other (type $0) (drop - (grow_memory + (memory.grow (i32.const 10) ) ) diff --git a/test/passes/duplicate-function-elimination_optimize-level=2.txt b/test/passes/duplicate-function-elimination_optimize-level=2.txt index 3232613b0..0eb2d00cc 100644 --- a/test/passes/duplicate-function-elimination_optimize-level=2.txt +++ b/test/passes/duplicate-function-elimination_optimize-level=2.txt @@ -1014,7 +1014,7 @@ (memory $0 0) (func $erase (; 0 ;) (type $0) (drop - (current_memory) + (memory.size) ) ) ) @@ -1023,7 +1023,7 @@ (memory $0 0) (func $erase (; 0 ;) (type $0) (drop - (grow_memory + (memory.grow (i32.const 10) ) ) @@ -1034,14 +1034,14 @@ (memory $0 0) (func $keep (; 0 ;) (type $0) (drop - (grow_memory + (memory.grow (i32.const 10) ) ) ) (func $other (; 1 ;) (type $0) (drop - (grow_memory + (memory.grow (i32.const 11) ) ) @@ -1052,12 +1052,12 @@ (memory $0 0) (func $keep (; 0 ;) (type $0) (drop - (current_memory) + (memory.size) ) ) (func $other (; 1 ;) (type $0) (drop - (grow_memory + (memory.grow (i32.const 10) ) ) diff --git a/test/passes/duplicate-function-elimination_optimize-level=2.wast b/test/passes/duplicate-function-elimination_optimize-level=2.wast index ce33b7a91..5b42a6ba5 100644 --- a/test/passes/duplicate-function-elimination_optimize-level=2.wast +++ b/test/passes/duplicate-function-elimination_optimize-level=2.wast @@ -1158,12 +1158,12 @@ (type $0 (func)) (func $erase (type $0) (drop - (current_memory) + (memory.size) ) ) (func $other (type $0) (drop - (current_memory) + (memory.size) ) ) ) @@ -1172,14 +1172,14 @@ (type $0 (func)) (func $erase (type $0) (drop - (grow_memory + (memory.grow (i32.const 10) ) ) ) (func $other (type $0) (drop - (grow_memory + (memory.grow (i32.const 10) ) ) @@ -1190,14 +1190,14 @@ (type $0 (func)) (func $keep (type $0) (drop - (grow_memory + (memory.grow (i32.const 10) ) ) ) (func $other (type $0) (drop - (grow_memory + (memory.grow (i32.const 11) ) ) @@ -1208,12 +1208,12 @@ (type $0 (func)) (func $keep (type $0) (drop - (current_memory) + (memory.size) ) ) (func $other (type $0) (drop - (grow_memory + (memory.grow (i32.const 10) ) ) diff --git a/test/passes/flatten.txt b/test/passes/flatten.txt index 7b7214374..560e5762b 100644 --- a/test/passes/flatten.txt +++ b/test/passes/flatten.txt @@ -1558,7 +1558,7 @@ (i32.const 18) ) (br $label$0) - (grow_memory + (memory.grow (unreachable) ) (unreachable) diff --git a/test/passes/flatten.wast b/test/passes/flatten.wast index c655ebd17..dbfc8165c 100644 --- a/test/passes/flatten.wast +++ b/test/passes/flatten.wast @@ -704,7 +704,7 @@ (func $unreachable-brs-3 (result i32) (block $label$0 (result i32) (br $label$0 - (grow_memory + (memory.grow (br $label$0 (i32.const 18) ) diff --git a/test/passes/remove-unused-module-elements_enable-threads.txt b/test/passes/remove-unused-module-elements_enable-threads.txt index c2471e743..99820cc52 100644 --- a/test/passes/remove-unused-module-elements_enable-threads.txt +++ b/test/passes/remove-unused-module-elements_enable-threads.txt @@ -181,7 +181,7 @@ (memory $0 23 256) (export "user" (func $user)) (func $user (; 0 ;) (type $0) (result i32) - (grow_memory + (memory.grow (i32.const 0) ) ) @@ -191,7 +191,7 @@ (import "env" "memory" (memory $0 256)) (export "user" (func $user)) (func $user (; 0 ;) (type $0) (result i32) - (grow_memory + (memory.grow (i32.const 0) ) ) @@ -201,7 +201,7 @@ (memory $0 23 256) (export "user" (func $user)) (func $user (; 0 ;) (type $0) (result i32) - (current_memory) + (memory.size) ) ) (module diff --git a/test/passes/remove-unused-module-elements_enable-threads.wast b/test/passes/remove-unused-module-elements_enable-threads.wast index 4bd5ccf10..7cb4423b5 100644 --- a/test/passes/remove-unused-module-elements_enable-threads.wast +++ b/test/passes/remove-unused-module-elements_enable-threads.wast @@ -147,21 +147,21 @@ (memory $0 23 256) (export "user" $user) (func $user (result i32) - (grow_memory (i32.const 0)) + (memory.grow (i32.const 0)) ) ) (module ;; more use checks (import "env" "memory" (memory $0 256)) (export "user" $user) (func $user (result i32) - (grow_memory (i32.const 0)) + (memory.grow (i32.const 0)) ) ) (module ;; more use checks (memory $0 23 256) (export "user" $user) (func $user (result i32) - (current_memory) + (memory.size) ) ) (module diff --git a/test/passes/remove-unused-nonfunction-module-elements_enable-threads.txt b/test/passes/remove-unused-nonfunction-module-elements_enable-threads.txt index 2d9609efa..1ac7e5228 100644 --- a/test/passes/remove-unused-nonfunction-module-elements_enable-threads.txt +++ b/test/passes/remove-unused-nonfunction-module-elements_enable-threads.txt @@ -196,7 +196,7 @@ (memory $0 23 256) (export "user" (func $user)) (func $user (; 0 ;) (type $0) (result i32) - (grow_memory + (memory.grow (i32.const 0) ) ) @@ -206,7 +206,7 @@ (import "env" "memory" (memory $0 256)) (export "user" (func $user)) (func $user (; 0 ;) (type $0) (result i32) - (grow_memory + (memory.grow (i32.const 0) ) ) @@ -216,7 +216,7 @@ (memory $0 23 256) (export "user" (func $user)) (func $user (; 0 ;) (type $0) (result i32) - (current_memory) + (memory.size) ) ) (module diff --git a/test/passes/remove-unused-nonfunction-module-elements_enable-threads.wast b/test/passes/remove-unused-nonfunction-module-elements_enable-threads.wast index 4370328ce..6024e1bc1 100644 --- a/test/passes/remove-unused-nonfunction-module-elements_enable-threads.wast +++ b/test/passes/remove-unused-nonfunction-module-elements_enable-threads.wast @@ -147,21 +147,21 @@ (memory $0 23 256) (export "user" $user) (func $user (result i32) - (grow_memory (i32.const 0)) + (memory.grow (i32.const 0)) ) ) (module ;; more use checks (import "env" "memory" (memory $0 256)) (export "user" $user) (func $user (result i32) - (grow_memory (i32.const 0)) + (memory.grow (i32.const 0)) ) ) (module ;; more use checks (memory $0 23 256) (export "user" $user) (func $user (result i32) - (current_memory) + (memory.size) ) ) (module diff --git a/test/passes/simplify-locals_all-features.txt b/test/passes/simplify-locals_all-features.txt index 7a6de1873..d33dd9769 100644 --- a/test/passes/simplify-locals_all-features.txt +++ b/test/passes/simplify-locals_all-features.txt @@ -1150,7 +1150,7 @@ (local $x i32) (local.set $x (i32.load - (grow_memory + (memory.grow (i32.const 1) ) ) @@ -1214,7 +1214,7 @@ (local $x i32) (local.set $x (i32.load - (grow_memory + (memory.grow (i32.const 1) ) ) diff --git a/test/passes/simplify-locals_all-features.wast b/test/passes/simplify-locals_all-features.wast index 34a93d442..ff362db64 100644 --- a/test/passes/simplify-locals_all-features.wast +++ b/test/passes/simplify-locals_all-features.wast @@ -1105,9 +1105,9 @@ (drop (i32.load (i32.const 1028))) (local.get $x) ) - (func $nonatomic-growmem (result i32) ;; grow_memory is modeled as modifying memory + (func $nonatomic-growmem (result i32) ;; memory.grow is modeled as modifying memory (local $x i32) - (local.set $x (i32.load (grow_memory (i32.const 1)))) + (local.set $x (i32.load (memory.grow (i32.const 1)))) (drop (i32.load (i32.const 1028))) (local.get $x) ) @@ -1129,9 +1129,9 @@ (drop (i32.load (i32.const 1028))) (drop (local.get $x)) ) - (func $atomic-growmem (result i32) ;; grow_memory is modeled as modifying memory + (func $atomic-growmem (result i32) ;; memory.grow is modeled as modifying memory (local $x i32) - (local.set $x (i32.load (grow_memory (i32.const 1)))) + (local.set $x (i32.load (memory.grow (i32.const 1)))) (drop (i32.atomic.load (i32.const 1028))) (local.get $x) ) diff --git a/test/spec/br.wast b/test/spec/br.wast index 99b6605c8..5937375dd 100644 --- a/test/spec/br.wast +++ b/test/spec/br.wast @@ -195,8 +195,8 @@ (block i32 (i32.wrap_i64 (br 0 (i32.const 41)))) ) - (func (export "as-grow_memory-size") (result i32) - (block i32 (grow_memory (br 0 (i32.const 40)))) + (func (export "as-memory.grow-size") (result i32) + (block i32 (memory.grow (br 0 (i32.const 40)))) ) (func (export "nested-block-value") (result i32) @@ -355,7 +355,7 @@ (assert_return (invoke "as-convert-operand") (i32.const 41)) -(assert_return (invoke "as-grow_memory-size") (i32.const 40)) +(assert_return (invoke "as-memory.grow-size") (i32.const 40)) (assert_return (invoke "nested-block-value") (i32.const 9)) (assert_return (invoke "nested-br-value") (i32.const 9)) diff --git a/test/spec/br_table.wast b/test/spec/br_table.wast index 2f3f2aa7c..663bb9ecb 100644 --- a/test/spec/br_table.wast +++ b/test/spec/br_table.wast @@ -1090,8 +1090,8 @@ (block i32 (i32.wrap_i64 (br_table 0 (i32.const 41) (i32.const 0)))) ) - (func (export "as-grow_memory-size") (result i32) - (block i32 (grow_memory (br_table 0 (i32.const 40) (i32.const 0)))) + (func (export "as-memory.grow-size") (result i32) + (block i32 (memory.grow (br_table 0 (i32.const 40) (i32.const 0)))) ) (func (export "nested-block-value") (param i32) (result i32) @@ -1331,7 +1331,7 @@ (assert_return (invoke "as-convert-operand") (i32.const 41)) -(assert_return (invoke "as-grow_memory-size") (i32.const 40)) +(assert_return (invoke "as-memory.grow-size") (i32.const 40)) (assert_return (invoke "nested-block-value" (i32.const 0)) (i32.const 19)) (assert_return (invoke "nested-block-value" (i32.const 1)) (i32.const 17)) diff --git a/test/spec/imports.wast b/test/spec/imports.wast index f0ae31340..19ea25202 100644 --- a/test/spec/imports.wast +++ b/test/spec/imports.wast @@ -215,7 +215,7 @@ (module (import "spectest" "memory" (memory 0 3)) ;; actual has max size 2 - (func (export "grow") (param i32) (result i32) (grow_memory (local.get 0))) + (func (export "grow") (param i32) (result i32) (memory.grow (local.get 0))) ) (assert_return (invoke "grow" (i32.const 0)) (i32.const 1)) (assert_return (invoke "grow" (i32.const 1)) (i32.const 1)) diff --git a/test/spec/linking.wast b/test/spec/linking.wast index fafaf2746..653433ac6 100644 --- a/test/spec/linking.wast +++ b/test/spec/linking.wast @@ -201,7 +201,7 @@ (memory (import "Mm" "mem") 1 8) (func (export "grow") (param $a i32) (result i32) - (grow_memory (local.get 0)) + (memory.grow (local.get 0)) ) ) diff --git a/test/spec/memory_trap.wast b/test/spec/memory_trap.wast index 2a4649126..fe2dee7fa 100644 --- a/test/spec/memory_trap.wast +++ b/test/spec/memory_trap.wast @@ -2,7 +2,7 @@ (memory 1) (func $addr_limit (result i32) - (i32.mul (current_memory) (i32.const 0x10000)) + (i32.mul (memory.size) (i32.const 0x10000)) ) (func (export "store") (param $i i32) (param $v i32) @@ -13,8 +13,8 @@ (i32.load (i32.add (call $addr_limit) (local.get $i))) ) - (func (export "grow_memory") (param i32) (result i32) - (grow_memory (local.get 0)) + (func (export "memory.grow") (param i32) (result i32) + (memory.grow (local.get 0)) ) ) @@ -30,4 +30,4 @@ (assert_trap (invoke "load" (i32.const 0)) "out of bounds memory access") (assert_trap (invoke "store" (i32.const 0x80000000) (i32.const 13)) "out of bounds memory access") (assert_trap (invoke "load" (i32.const 0x80000000)) "out of bounds memory access") -(assert_return (invoke "grow_memory" (i32.const 0x10001)) (i32.const -1)) +(assert_return (invoke "memory.grow" (i32.const 0x10001)) (i32.const -1)) diff --git a/test/spec/nop.wast b/test/spec/nop.wast index aebe43819..2348fdc1e 100644 --- a/test/spec/nop.wast +++ b/test/spec/nop.wast @@ -168,11 +168,11 @@ (nop) (local.get 0) (nop) (nop) (local.get 0) (nop) (nop) (i32.le_s) ) - (func (export "as-grow_memory-last") (param i32) (result i32) - (local.get 0) (nop) (grow_memory) + (func (export "as-memory.grow-last") (param i32) (result i32) + (local.get 0) (nop) (memory.grow) ) - (func (export "as-grow_memory-everywhere") (param i32) (result i32) - (nop) (nop) (local.get 0) (nop) (nop) (grow_memory) + (func (export "as-memory.grow-everywhere") (param i32) (result i32) + (nop) (nop) (local.get 0) (nop) (nop) (memory.grow) ) ) @@ -239,8 +239,8 @@ (assert_return (invoke "as-compare-last" (i32.const 3)) (i32.const 0)) (assert_return (invoke "as-compare-everywhere" (i32.const 3)) (i32.const 1)) -(assert_return (invoke "as-grow_memory-last" (i32.const 2)) (i32.const 1)) -(assert_return (invoke "as-grow_memory-everywhere" (i32.const 12)) (i32.const 3)) +(assert_return (invoke "as-memory.grow-last" (i32.const 2)) (i32.const 1)) +(assert_return (invoke "as-memory.grow-everywhere" (i32.const 12)) (i32.const 3)) (assert_invalid (module (func $type-i32 (result i32) (nop))) diff --git a/test/spec/resizing.wast b/test/spec/resizing.wast index b340bb4ea..7a677c9fa 100644 --- a/test/spec/resizing.wast +++ b/test/spec/resizing.wast @@ -7,8 +7,8 @@ (func (export "load_at_page_size") (result i32) (i32.load (i32.const 0x10000))) (func (export "store_at_page_size") (i32.store (i32.const 0x10000) (i32.const 3))) - (func (export "grow") (param $sz i32) (result i32) (grow_memory (local.get $sz))) - (func (export "size") (result i32) (current_memory)) + (func (export "grow") (param $sz i32) (result i32) (memory.grow (local.get $sz))) + (func (export "size") (result i32) (memory.size)) ) (assert_return (invoke "size") (i32.const 0)) @@ -35,7 +35,7 @@ (module (memory 0) - (func (export "grow") (param i32) (result i32) (grow_memory (local.get 0))) + (func (export "grow") (param i32) (result i32) (memory.grow (local.get 0))) ) (assert_return (invoke "grow" (i32.const 0)) (i32.const 0)) @@ -46,7 +46,7 @@ (module (memory 0 10) - (func (export "grow") (param i32) (result i32) (grow_memory (local.get 0))) + (func (export "grow") (param i32) (result i32) (memory.grow (local.get 0))) ) (assert_return (invoke "grow" (i32.const 0)) (i32.const 0)) diff --git a/test/spec/return.wast b/test/spec/return.wast index f6fd6de33..9dca8dda9 100644 --- a/test/spec/return.wast +++ b/test/spec/return.wast @@ -178,8 +178,8 @@ (i32.wrap_i64 (return (i32.const 41))) ) - (func (export "as-grow_memory-size") (result i32) - (grow_memory (return (i32.const 40))) + (func (export "as-memory.grow-size") (result i32) + (memory.grow (return (i32.const 40))) ) ) @@ -260,7 +260,7 @@ (assert_return (invoke "as-convert-operand") (i32.const 41)) -(assert_return (invoke "as-grow_memory-size") (i32.const 40)) +(assert_return (invoke "as-memory.grow-size") (i32.const 40)) (assert_invalid (module (func $type-value-empty-vs-num (result f64) (return))) diff --git a/test/spec/typecheck.wast b/test/spec/typecheck.wast index 773d00ffd..fbaf426a5 100644 --- a/test/spec/typecheck.wast +++ b/test/spec/typecheck.wast @@ -429,5 +429,5 @@ (assert_invalid (module (func (f64.promote_f32 (i32.const 0)))) "type mismatch") (assert_invalid (module (func (f64.reinterpret_i64 (i32.const 0)))) "type mismatch") -;; grow_memory -(assert_invalid (module (memory 1) (func (grow_memory (f32.const 0)))) "type mismatch") +;; memory.grow +(assert_invalid (module (memory 1) (func (memory.grow (f32.const 0)))) "type mismatch") diff --git a/test/spec/unreachable.wast b/test/spec/unreachable.wast index ce1d81ba1..ee61f794f 100644 --- a/test/spec/unreachable.wast +++ b/test/spec/unreachable.wast @@ -177,8 +177,8 @@ (i32.wrap_i64 (unreachable)) ) - (func (export "as-grow_memory-size") (result i32) - (grow_memory (unreachable)) + (func (export "as-memory.grow-size") (result i32) + (memory.grow (unreachable)) ) ) @@ -258,5 +258,5 @@ (assert_trap (invoke "as-convert-operand") "unreachable") -(assert_trap (invoke "as-grow_memory-size") "unreachable") +(assert_trap (invoke "as-memory.grow-size") "unreachable") diff --git a/test/unit.asm.js b/test/unit.asm.js index b62c7aefb..405701ee6 100644 --- a/test/unit.asm.js +++ b/test/unit.asm.js @@ -309,14 +309,14 @@ function asm(global, env, buffer) { return phi() | 0; } - function useSetGlobal() { + function useGlobalSet() { var x = 0; x = (Int = 10); Int = 20; return (Int = 30) | 0; } - function usesSetGlobal2() { + function usesGlobalSet2() { return (Int = 40, 50) | 0; } @@ -806,6 +806,6 @@ function asm(global, env, buffer) { var FUNCTION_TABLE_vi = [ vi, vi, vi, vi, vi, vi, vi, vi ]; var FUNCTION_TABLE_ii = [ ii ]; - return { big_negative: big_negative, pick: forgetMe, pick: exportMe, doubleCompares: doubleCompares, intOps: intOps, conversions: conversions, switcher: switcher, frem: frem, frem_float: frem_float, big_uint_div_u: big_uint_div_u, trapping_sint_div_s: trapping_sint_div_s, fr: fr, negZero: negZero, neg: neg, smallCompare: smallCompare, cneg_nosemicolon: cneg_nosemicolon, forLoop: forLoop, ceiling_32_64: ceiling_32_64, aborts: aborts, continues: continues, bitcasts: bitcasts, recursiveBlockMerging: recursiveBlockMerging, lb: lb, zeroInit: zeroInit, phi: phi, smallIf: smallIf, dropCall: dropCall, useSetGlobal: useSetGlobal, usesSetGlobal2: usesSetGlobal2, breakThroughMany: breakThroughMany, ifChainEmpty: ifChainEmpty, heap8NoShift: heap8NoShift, conditionalTypeFun: conditionalTypeFun, loadSigned: loadSigned, globalOpts: globalOpts, dropCallImport: dropCallImport, loophi: loophi, loophi2: loophi2, loophi2b: loophi2b, relooperJumpThreading: relooperJumpThreading, relooperJumpThreading__ZN4game14preloadweaponsEv: relooperJumpThreading__ZN4game14preloadweaponsEv, __Z12multi_varargiz: __Z12multi_varargiz, jumpThreadDrop: jumpThreadDrop, dropIgnoredImportInIf: dropIgnoredImportInIf, dropIgnoredImportsInIf: dropIgnoredImportsInIf, relooperJumpThreading_irreducible: relooperJumpThreading_irreducible, store_fround: store_fround, exportedNumber: 42, relocatableAndModules: relocatableAndModules, exported_f32_user: exported_f32_user, keepAlive: keepAlive }; + return { big_negative: big_negative, pick: forgetMe, pick: exportMe, doubleCompares: doubleCompares, intOps: intOps, conversions: conversions, switcher: switcher, frem: frem, frem_float: frem_float, big_uint_div_u: big_uint_div_u, trapping_sint_div_s: trapping_sint_div_s, fr: fr, negZero: negZero, neg: neg, smallCompare: smallCompare, cneg_nosemicolon: cneg_nosemicolon, forLoop: forLoop, ceiling_32_64: ceiling_32_64, aborts: aborts, continues: continues, bitcasts: bitcasts, recursiveBlockMerging: recursiveBlockMerging, lb: lb, zeroInit: zeroInit, phi: phi, smallIf: smallIf, dropCall: dropCall, useGlobalSet: useGlobalSet, usesGlobalSet2: usesGlobalSet2, breakThroughMany: breakThroughMany, ifChainEmpty: ifChainEmpty, heap8NoShift: heap8NoShift, conditionalTypeFun: conditionalTypeFun, loadSigned: loadSigned, globalOpts: globalOpts, dropCallImport: dropCallImport, loophi: loophi, loophi2: loophi2, loophi2b: loophi2b, relooperJumpThreading: relooperJumpThreading, relooperJumpThreading__ZN4game14preloadweaponsEv: relooperJumpThreading__ZN4game14preloadweaponsEv, __Z12multi_varargiz: __Z12multi_varargiz, jumpThreadDrop: jumpThreadDrop, dropIgnoredImportInIf: dropIgnoredImportInIf, dropIgnoredImportsInIf: dropIgnoredImportsInIf, relooperJumpThreading_irreducible: relooperJumpThreading_irreducible, store_fround: store_fround, exportedNumber: 42, relocatableAndModules: relocatableAndModules, exported_f32_user: exported_f32_user, keepAlive: keepAlive }; } diff --git a/test/unit.fromasm b/test/unit.fromasm index 1bc96b1cf..b6065c905 100644 --- a/test/unit.fromasm +++ b/test/unit.fromasm @@ -53,8 +53,8 @@ (export "phi" (func $phi)) (export "smallIf" (func $smallIf)) (export "dropCall" (func $dropCall)) - (export "useSetGlobal" (func $useSetGlobal)) - (export "usesSetGlobal2" (func $usesSetGlobal2)) + (export "useGlobalSet" (func $useGlobalSet)) + (export "usesGlobalSet2" (func $usesGlobalSet2)) (export "breakThroughMany" (func $breakThroughMany)) (export "ifChainEmpty" (func $ifChainEmpty)) (export "heap8NoShift" (func $heap8NoShift)) @@ -520,7 +520,7 @@ ) (call $phi) ) - (func $useSetGlobal (; 35 ;) (; has Stack IR ;) (result i32) + (func $useGlobalSet (; 35 ;) (; has Stack IR ;) (result i32) (global.set $Int (i32.const 10) ) @@ -532,7 +532,7 @@ ) (global.get $Int) ) - (func $usesSetGlobal2 (; 36 ;) (; has Stack IR ;) (result i32) + (func $usesGlobalSet2 (; 36 ;) (; has Stack IR ;) (result i32) (global.set $Int (i32.const 40) ) diff --git a/test/unit.fromasm.clamp b/test/unit.fromasm.clamp index 147913b80..1a905fee5 100644 --- a/test/unit.fromasm.clamp +++ b/test/unit.fromasm.clamp @@ -51,8 +51,8 @@ (export "phi" (func $phi)) (export "smallIf" (func $smallIf)) (export "dropCall" (func $dropCall)) - (export "useSetGlobal" (func $useSetGlobal)) - (export "usesSetGlobal2" (func $usesSetGlobal2)) + (export "useGlobalSet" (func $useGlobalSet)) + (export "usesGlobalSet2" (func $usesGlobalSet2)) (export "breakThroughMany" (func $breakThroughMany)) (export "ifChainEmpty" (func $ifChainEmpty)) (export "heap8NoShift" (func $heap8NoShift)) @@ -568,7 +568,7 @@ ) (call $phi) ) - (func $useSetGlobal (; 36 ;) (; has Stack IR ;) (result i32) + (func $useGlobalSet (; 36 ;) (; has Stack IR ;) (result i32) (global.set $Int (i32.const 10) ) @@ -580,7 +580,7 @@ ) (global.get $Int) ) - (func $usesSetGlobal2 (; 37 ;) (; has Stack IR ;) (result i32) + (func $usesGlobalSet2 (; 37 ;) (; has Stack IR ;) (result i32) (global.set $Int (i32.const 40) ) diff --git a/test/unit.fromasm.clamp.no-opts b/test/unit.fromasm.clamp.no-opts index 2c45360f2..672d73320 100644 --- a/test/unit.fromasm.clamp.no-opts +++ b/test/unit.fromasm.clamp.no-opts @@ -59,8 +59,8 @@ (export "phi" (func $phi)) (export "smallIf" (func $smallIf)) (export "dropCall" (func $dropCall)) - (export "useSetGlobal" (func $useSetGlobal)) - (export "usesSetGlobal2" (func $usesSetGlobal2)) + (export "useGlobalSet" (func $useGlobalSet)) + (export "usesGlobalSet2" (func $usesGlobalSet2)) (export "breakThroughMany" (func $breakThroughMany)) (export "ifChainEmpty" (func $ifChainEmpty)) (export "heap8NoShift" (func $heap8NoShift)) @@ -1081,7 +1081,7 @@ (call $phi) ) ) - (func $useSetGlobal (; 46 ;) (result i32) + (func $useGlobalSet (; 46 ;) (result i32) (local $x i32) (local.set $x (block (result i32) @@ -1103,7 +1103,7 @@ ) ) ) - (func $usesSetGlobal2 (; 47 ;) (result i32) + (func $usesGlobalSet2 (; 47 ;) (result i32) (return (block (result i32) (block diff --git a/test/unit.fromasm.imprecise b/test/unit.fromasm.imprecise index 62b517f87..bc2546b6e 100644 --- a/test/unit.fromasm.imprecise +++ b/test/unit.fromasm.imprecise @@ -49,8 +49,8 @@ (export "phi" (func $phi)) (export "smallIf" (func $smallIf)) (export "dropCall" (func $dropCall)) - (export "useSetGlobal" (func $useSetGlobal)) - (export "usesSetGlobal2" (func $usesSetGlobal2)) + (export "useGlobalSet" (func $useGlobalSet)) + (export "usesGlobalSet2" (func $usesGlobalSet2)) (export "breakThroughMany" (func $breakThroughMany)) (export "ifChainEmpty" (func $ifChainEmpty)) (export "heap8NoShift" (func $heap8NoShift)) @@ -508,7 +508,7 @@ ) (call $phi) ) - (func $useSetGlobal (; 34 ;) (; has Stack IR ;) (result i32) + (func $useGlobalSet (; 34 ;) (; has Stack IR ;) (result i32) (global.set $Int (i32.const 10) ) @@ -520,7 +520,7 @@ ) (global.get $Int) ) - (func $usesSetGlobal2 (; 35 ;) (; has Stack IR ;) (result i32) + (func $usesGlobalSet2 (; 35 ;) (; has Stack IR ;) (result i32) (global.set $Int (i32.const 40) ) diff --git a/test/unit.fromasm.imprecise.no-opts b/test/unit.fromasm.imprecise.no-opts index 776aa2ba5..b2b0a5f40 100644 --- a/test/unit.fromasm.imprecise.no-opts +++ b/test/unit.fromasm.imprecise.no-opts @@ -59,8 +59,8 @@ (export "phi" (func $phi)) (export "smallIf" (func $smallIf)) (export "dropCall" (func $dropCall)) - (export "useSetGlobal" (func $useSetGlobal)) - (export "usesSetGlobal2" (func $usesSetGlobal2)) + (export "useGlobalSet" (func $useGlobalSet)) + (export "usesGlobalSet2" (func $usesGlobalSet2)) (export "breakThroughMany" (func $breakThroughMany)) (export "ifChainEmpty" (func $ifChainEmpty)) (export "heap8NoShift" (func $heap8NoShift)) @@ -992,7 +992,7 @@ (call $phi) ) ) - (func $useSetGlobal (; 42 ;) (result i32) + (func $useGlobalSet (; 42 ;) (result i32) (local $x i32) (local.set $x (block (result i32) @@ -1014,7 +1014,7 @@ ) ) ) - (func $usesSetGlobal2 (; 43 ;) (result i32) + (func $usesGlobalSet2 (; 43 ;) (result i32) (return (block (result i32) (block diff --git a/test/unit.fromasm.no-opts b/test/unit.fromasm.no-opts index 216d30d34..84dcdf881 100644 --- a/test/unit.fromasm.no-opts +++ b/test/unit.fromasm.no-opts @@ -61,8 +61,8 @@ (export "phi" (func $phi)) (export "smallIf" (func $smallIf)) (export "dropCall" (func $dropCall)) - (export "useSetGlobal" (func $useSetGlobal)) - (export "usesSetGlobal2" (func $usesSetGlobal2)) + (export "useGlobalSet" (func $useGlobalSet)) + (export "usesGlobalSet2" (func $usesGlobalSet2)) (export "breakThroughMany" (func $breakThroughMany)) (export "ifChainEmpty" (func $ifChainEmpty)) (export "heap8NoShift" (func $heap8NoShift)) @@ -1033,7 +1033,7 @@ (call $phi) ) ) - (func $useSetGlobal (; 45 ;) (result i32) + (func $useGlobalSet (; 45 ;) (result i32) (local $x i32) (local.set $x (block (result i32) @@ -1055,7 +1055,7 @@ ) ) ) - (func $usesSetGlobal2 (; 46 ;) (result i32) + (func $usesGlobalSet2 (; 46 ;) (result i32) (return (block (result i32) (block diff --git a/test/wasm2js/address.2asm.js b/test/wasm2js/address.2asm.js index 366bcec11..4038425ba 100644 --- a/test/wasm2js/address.2asm.js +++ b/test/wasm2js/address.2asm.js @@ -46,9 +46,9 @@ function asmFunc(global, env, buffer) { } var FUNCTION_TABLE = []; - function __wasm_grow_memory(pagesToAdd) { + function __wasm_memory_grow(pagesToAdd) { pagesToAdd = pagesToAdd | 0; - var oldPages = __wasm_current_memory() | 0; + var oldPages = __wasm_memory_size() | 0; var newPages = oldPages + pagesToAdd | 0; if ((oldPages < newPages) && (newPages < 65536)) { var newBuffer = new ArrayBuffer(Math_imul(newPages, 65536)); @@ -68,7 +68,7 @@ function asmFunc(global, env, buffer) { return oldPages; } - function __wasm_current_memory() { + function __wasm_memory_size() { return buffer.byteLength / 65536 | 0; } diff --git a/test/wasm2js/br.2asm.js b/test/wasm2js/br.2asm.js index f02b0a154..2dfb17d2e 100644 --- a/test/wasm2js/br.2asm.js +++ b/test/wasm2js/br.2asm.js @@ -695,7 +695,7 @@ function asmFunc(global, env, buffer) { "as_compare_left": $49, "as_compare_right": $50, "as_convert_operand": $51, - "as_grow_memory_size": $52, + "as_memory_grow_size": $52, "nested_block_value": $53, "nested_br_value": $54, "nested_br_if_value": $55, @@ -757,7 +757,7 @@ export var as_test_operand = retasmFunc.as_test_operand; export var as_compare_left = retasmFunc.as_compare_left; export var as_compare_right = retasmFunc.as_compare_right; export var as_convert_operand = retasmFunc.as_convert_operand; -export var as_grow_memory_size = retasmFunc.as_grow_memory_size; +export var as_memory_grow_size = retasmFunc.as_memory_grow_size; export var nested_block_value = retasmFunc.nested_block_value; export var nested_br_value = retasmFunc.nested_br_value; export var nested_br_if_value = retasmFunc.nested_br_if_value; diff --git a/test/wasm2js/br_table.2asm.js b/test/wasm2js/br_table.2asm.js index 952e99b1b..b462871e5 100644 --- a/test/wasm2js/br_table.2asm.js +++ b/test/wasm2js/br_table.2asm.js @@ -13377,7 +13377,7 @@ function asmFunc(global, env, buffer) { "as_compare_left": $56, "as_compare_right": $57, "as_convert_operand": $58, - "as_grow_memory_size": $59, + "as_memory_grow_size": $59, "nested_block_value": $60, "nested_br_value": $61, "nested_br_if_value": $62, @@ -13446,7 +13446,7 @@ export var as_test_operand = retasmFunc.as_test_operand; export var as_compare_left = retasmFunc.as_compare_left; export var as_compare_right = retasmFunc.as_compare_right; export var as_convert_operand = retasmFunc.as_convert_operand; -export var as_grow_memory_size = retasmFunc.as_grow_memory_size; +export var as_memory_grow_size = retasmFunc.as_memory_grow_size; export var nested_block_value = retasmFunc.nested_block_value; export var nested_br_value = retasmFunc.nested_br_value; export var nested_br_if_value = retasmFunc.nested_br_if_value; diff --git a/test/wasm2js/br_table_temp.2asm.js b/test/wasm2js/br_table_temp.2asm.js index b55d6ab24..34dffb54e 100644 --- a/test/wasm2js/br_table_temp.2asm.js +++ b/test/wasm2js/br_table_temp.2asm.js @@ -13281,7 +13281,7 @@ function asmFunc(global, env, buffer) { "as_compare_left": $56, "as_compare_right": $57, "as_convert_operand": $58, - "as_grow_memory_size": $59, + "as_memory_grow_size": $59, "nested_block_value": $60, "nested_br_value": $61, "nested_br_if_value": $62, @@ -13350,7 +13350,7 @@ export var as_test_operand = retasmFunc.as_test_operand; export var as_compare_left = retasmFunc.as_compare_left; export var as_compare_right = retasmFunc.as_compare_right; export var as_convert_operand = retasmFunc.as_convert_operand; -export var as_grow_memory_size = retasmFunc.as_grow_memory_size; +export var as_memory_grow_size = retasmFunc.as_memory_grow_size; export var nested_block_value = retasmFunc.nested_block_value; export var nested_br_value = retasmFunc.nested_br_value; export var nested_br_if_value = retasmFunc.nested_br_if_value; diff --git a/test/wasm2js/br_table_temp.2asm.js.opt b/test/wasm2js/br_table_temp.2asm.js.opt index 4633a99e3..eae9b99ab 100644 --- a/test/wasm2js/br_table_temp.2asm.js.opt +++ b/test/wasm2js/br_table_temp.2asm.js.opt @@ -12729,7 +12729,7 @@ function asmFunc(global, env, buffer) { "as_compare_left": $56, "as_compare_right": $57, "as_convert_operand": $58, - "as_grow_memory_size": $59, + "as_memory_grow_size": $59, "nested_block_value": $60, "nested_br_value": $61, "nested_br_if_value": $62, @@ -12798,7 +12798,7 @@ export var as_test_operand = retasmFunc.as_test_operand; export var as_compare_left = retasmFunc.as_compare_left; export var as_compare_right = retasmFunc.as_compare_right; export var as_convert_operand = retasmFunc.as_convert_operand; -export var as_grow_memory_size = retasmFunc.as_grow_memory_size; +export var as_memory_grow_size = retasmFunc.as_memory_grow_size; export var nested_block_value = retasmFunc.nested_block_value; export var nested_br_value = retasmFunc.nested_br_value; export var nested_br_if_value = retasmFunc.nested_br_if_value; diff --git a/test/wasm2js/br_table_temp.wast b/test/wasm2js/br_table_temp.wast index 865072b28..1ddff07ca 100644 --- a/test/wasm2js/br_table_temp.wast +++ b/test/wasm2js/br_table_temp.wast @@ -1090,8 +1090,8 @@ (block i32 (i32.wrap_i64 (br_table 0 (i32.const 41) (i32.const 0)))) ) - (func (export "as-grow_memory-size") (result i32) - (block i32 (grow_memory (br_table 0 (i32.const 40) (i32.const 0)))) + (func (export "as-memory.grow-size") (result i32) + (block i32 (memory.grow (br_table 0 (i32.const 40) (i32.const 0)))) ) (func (export "nested-block-value") (param i32) (result i32) @@ -1331,7 +1331,7 @@ (assert_return (invoke "as-convert-operand") (i32.const 41)) -(assert_return (invoke "as-grow_memory-size") (i32.const 40)) +(assert_return (invoke "as-memory.grow-size") (i32.const 40)) (assert_return (invoke "nested-block-value" (i32.const 0)) (i32.const 19)) (assert_return (invoke "nested-block-value" (i32.const 1)) (i32.const 17)) diff --git a/test/wasm2js/emscripten.wast b/test/wasm2js/emscripten.wast index 5b1b81507..2f9e560ca 100644 --- a/test/wasm2js/emscripten.wast +++ b/test/wasm2js/emscripten.wast @@ -197,7 +197,7 @@ (call $getf64) ) (func $__growWasmMemory (param $0 i32) (result i32) - (grow_memory + (memory.grow (local.get $0) ) ) diff --git a/test/wasm2js/endianness.2asm.js b/test/wasm2js/endianness.2asm.js index 364486744..ef27e82d9 100644 --- a/test/wasm2js/endianness.2asm.js +++ b/test/wasm2js/endianness.2asm.js @@ -651,9 +651,9 @@ function asmFunc(global, env, buffer) { } var FUNCTION_TABLE = []; - function __wasm_grow_memory(pagesToAdd) { + function __wasm_memory_grow(pagesToAdd) { pagesToAdd = pagesToAdd | 0; - var oldPages = __wasm_current_memory() | 0; + var oldPages = __wasm_memory_size() | 0; var newPages = oldPages + pagesToAdd | 0; if ((oldPages < newPages) && (newPages < 65536)) { var newBuffer = new ArrayBuffer(Math_imul(newPages, 65536)); @@ -673,7 +673,7 @@ function asmFunc(global, env, buffer) { return oldPages; } - function __wasm_current_memory() { + function __wasm_memory_size() { return buffer.byteLength / 65536 | 0; } diff --git a/test/wasm2js/grow-memory-tricky.2asm.js b/test/wasm2js/grow-memory-tricky.2asm.js index ed69a4a43..0e92bc100 100644 --- a/test/wasm2js/grow-memory-tricky.2asm.js +++ b/test/wasm2js/grow-memory-tricky.2asm.js @@ -23,7 +23,7 @@ function asmFunc(global, env, buffer) { var infinity = global.Infinity; function $0() { var wasm2js_i32$0 = 0, wasm2js_i32$1 = 0; - (wasm2js_i32$0 = 0, wasm2js_i32$1 = __wasm_grow_memory(1 | 0)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + (wasm2js_i32$0 = 0, wasm2js_i32$1 = __wasm_memory_grow(1 | 0)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; return HEAP32[0 >> 2] | 0 | 0; } @@ -34,13 +34,13 @@ function asmFunc(global, env, buffer) { } function grow() { - return __wasm_grow_memory(1 | 0) | 0; + return __wasm_memory_grow(1 | 0) | 0; } var FUNCTION_TABLE = []; - function __wasm_grow_memory(pagesToAdd) { + function __wasm_memory_grow(pagesToAdd) { pagesToAdd = pagesToAdd | 0; - var oldPages = __wasm_current_memory() | 0; + var oldPages = __wasm_memory_size() | 0; var newPages = oldPages + pagesToAdd | 0; if ((oldPages < newPages) && (newPages < 65536)) { var newBuffer = new ArrayBuffer(Math_imul(newPages, 65536)); @@ -60,14 +60,14 @@ function asmFunc(global, env, buffer) { return oldPages; } - function __wasm_current_memory() { + function __wasm_memory_size() { return buffer.byteLength / 65536 | 0; } return { "memory": Object.create(Object.prototype, { "grow": { - "value": __wasm_grow_memory + "value": __wasm_memory_grow }, "buffer": { "get": function () { diff --git a/test/wasm2js/grow-memory-tricky.2asm.js.opt b/test/wasm2js/grow-memory-tricky.2asm.js.opt index 42255e0f8..078fad5ec 100644 --- a/test/wasm2js/grow-memory-tricky.2asm.js.opt +++ b/test/wasm2js/grow-memory-tricky.2asm.js.opt @@ -23,14 +23,14 @@ function asmFunc(global, env, buffer) { var infinity = global.Infinity; function $0() { var wasm2js_i32$0 = 0, wasm2js_i32$1 = 0; - (wasm2js_i32$0 = 0, wasm2js_i32$1 = __wasm_grow_memory(1)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + (wasm2js_i32$0 = 0, wasm2js_i32$1 = __wasm_memory_grow(1)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; return HEAP32[0]; } var FUNCTION_TABLE = []; - function __wasm_grow_memory(pagesToAdd) { + function __wasm_memory_grow(pagesToAdd) { pagesToAdd = pagesToAdd | 0; - var oldPages = __wasm_current_memory() | 0; + var oldPages = __wasm_memory_size() | 0; var newPages = oldPages + pagesToAdd | 0; if ((oldPages < newPages) && (newPages < 65536)) { var newBuffer = new ArrayBuffer(Math_imul(newPages, 65536)); @@ -50,14 +50,14 @@ function asmFunc(global, env, buffer) { return oldPages; } - function __wasm_current_memory() { + function __wasm_memory_size() { return buffer.byteLength / 65536 | 0; } return { "memory": Object.create(Object.prototype, { "grow": { - "value": __wasm_grow_memory + "value": __wasm_memory_grow }, "buffer": { "get": function () { diff --git a/test/wasm2js/grow-memory-tricky.wast b/test/wasm2js/grow-memory-tricky.wast index 8513eb2af..163892d58 100644 --- a/test/wasm2js/grow-memory-tricky.wast +++ b/test/wasm2js/grow-memory-tricky.wast @@ -8,7 +8,7 @@ (func $0 (result i32) (block (result i32) - (i32.store (i32.const 0) (grow_memory (i32.const 1))) + (i32.store (i32.const 0) (memory.grow (i32.const 1))) (i32.load (i32.const 0)) ) ) @@ -21,7 +21,7 @@ ) (func $grow (result i32) - (grow_memory (i32.const 1)) + (memory.grow (i32.const 1)) ) ) diff --git a/test/wasm2js/grow_memory.2asm.js b/test/wasm2js/grow_memory.2asm.js index 372442436..0e9864bc3 100644 --- a/test/wasm2js/grow_memory.2asm.js +++ b/test/wasm2js/grow_memory.2asm.js @@ -23,17 +23,17 @@ function asmFunc(global, env, buffer) { var infinity = global.Infinity; function $0(var$0) { var$0 = var$0 | 0; - return __wasm_grow_memory(var$0 | 0) | 0; + return __wasm_memory_grow(var$0 | 0) | 0; } function $1() { - return __wasm_current_memory() | 0; + return __wasm_memory_size() | 0; } var FUNCTION_TABLE = []; - function __wasm_grow_memory(pagesToAdd) { + function __wasm_memory_grow(pagesToAdd) { pagesToAdd = pagesToAdd | 0; - var oldPages = __wasm_current_memory() | 0; + var oldPages = __wasm_memory_size() | 0; var newPages = oldPages + pagesToAdd | 0; if ((oldPages < newPages) && (newPages < 65536)) { var newBuffer = new ArrayBuffer(Math_imul(newPages, 65536)); @@ -53,14 +53,14 @@ function asmFunc(global, env, buffer) { return oldPages; } - function __wasm_current_memory() { + function __wasm_memory_size() { return buffer.byteLength / 65536 | 0; } return { "memory": Object.create(Object.prototype, { "grow": { - "value": __wasm_grow_memory + "value": __wasm_memory_grow }, "buffer": { "get": function () { diff --git a/test/wasm2js/left-to-right.2asm.js b/test/wasm2js/left-to-right.2asm.js index 74fe50cd6..8f8f6db3f 100644 --- a/test/wasm2js/left-to-right.2asm.js +++ b/test/wasm2js/left-to-right.2asm.js @@ -2091,9 +2091,9 @@ function asmFunc(global, env, buffer) { } var FUNCTION_TABLE = [i32_t0, i32_t1, i64_t0, i64_t1, f32_t0, f32_t1, f64_t0, f64_t1]; - function __wasm_grow_memory(pagesToAdd) { + function __wasm_memory_grow(pagesToAdd) { pagesToAdd = pagesToAdd | 0; - var oldPages = __wasm_current_memory() | 0; + var oldPages = __wasm_memory_size() | 0; var newPages = oldPages + pagesToAdd | 0; if ((oldPages < newPages) && (newPages < 65536)) { var newBuffer = new ArrayBuffer(Math_imul(newPages, 65536)); @@ -2113,7 +2113,7 @@ function asmFunc(global, env, buffer) { return oldPages; } - function __wasm_current_memory() { + function __wasm_memory_size() { return buffer.byteLength / 65536 | 0; } diff --git a/test/wasm2js/traps.2asm.js b/test/wasm2js/traps.2asm.js index e702a65a0..bba034c13 100644 --- a/test/wasm2js/traps.2asm.js +++ b/test/wasm2js/traps.2asm.js @@ -1973,9 +1973,9 @@ function asmFunc(global, env, buffer) { } var FUNCTION_TABLE = []; - function __wasm_grow_memory(pagesToAdd) { + function __wasm_memory_grow(pagesToAdd) { pagesToAdd = pagesToAdd | 0; - var oldPages = __wasm_current_memory() | 0; + var oldPages = __wasm_memory_size() | 0; var newPages = oldPages + pagesToAdd | 0; if ((oldPages < newPages) && (newPages < 65536)) { var newBuffer = new ArrayBuffer(Math_imul(newPages, 65536)); @@ -1995,7 +1995,7 @@ function asmFunc(global, env, buffer) { return oldPages; } - function __wasm_current_memory() { + function __wasm_memory_size() { return buffer.byteLength / 65536 | 0; } diff --git a/test/wasm2js/unreachable.2asm.js b/test/wasm2js/unreachable.2asm.js index 47a5ff4da..b2eeb0bec 100644 --- a/test/wasm2js/unreachable.2asm.js +++ b/test/wasm2js/unreachable.2asm.js @@ -432,7 +432,7 @@ function asmFunc(global, env, buffer) { "as_compare_left": $51, "as_compare_right": $52, "as_convert_operand": $53, - "as_grow_memory_size": $54 + "as_memory_grow_size": $54 }; } @@ -490,4 +490,4 @@ export var as_test_operand = retasmFunc.as_test_operand; export var as_compare_left = retasmFunc.as_compare_left; export var as_compare_right = retasmFunc.as_compare_right; export var as_convert_operand = retasmFunc.as_convert_operand; -export var as_grow_memory_size = retasmFunc.as_grow_memory_size; +export var as_memory_grow_size = retasmFunc.as_memory_grow_size; |