summaryrefslogtreecommitdiff
path: root/test/example
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2019-05-21 13:25:14 -0700
committerGitHub <noreply@github.com>2019-05-21 13:25:14 -0700
commit1a3c1a58cc7e97a846f612baf7f74a370980458f (patch)
treecbe62ea58b2c0dd6d98225265419fea0b829aeab /test/example
parentd78be9ac6c02910bbf8ac71118e68adff4fdc570 (diff)
downloadbinaryen-1a3c1a58cc7e97a846f612baf7f74a370980458f.tar.gz
binaryen-1a3c1a58cc7e97a846f612baf7f74a370980458f.tar.bz2
binaryen-1a3c1a58cc7e97a846f612baf7f74a370980458f.zip
Reflect instruction renaming in code (#2128)
- Reflected new renamed instruction names in code and tests: - `get_local` -> `local.get` - `set_local` -> `local.set` - `tee_local` -> `local.tee` - `get_global` -> `global.get` - `set_global` -> `global.set` - `current_memory` -> `memory.size` - `grow_memory` -> `memory.grow` - Removed APIs related to old instruction names in Binaryen.js and added APIs with new names if they are missing. - Renamed `typedef SortedVector LocalSet` to `SetsOfLocals` to prevent name clashes. - Resolved several TODO renaming items in wasm-binary.h: - `TableSwitch` -> `BrTable` - `I32ConvertI64` -> `I32WrapI64` - `I64STruncI32` -> `I64SExtendI32` - `I64UTruncI32` -> `I64UExtendI32` - `F32ConvertF64` -> `F32DemoteI64` - `F64ConvertF32` -> `F64PromoteF32` - Renamed `BinaryenGetFeatures` and `BinaryenSetFeatures` to `BinaryenModuleGetFeatures` and `BinaryenModuleSetFeatures` for consistency.
Diffstat (limited to 'test/example')
-rw-r--r--test/example/c-api-hello-world.c4
-rw-r--r--test/example/c-api-kitchen-sink.c16
-rw-r--r--test/example/c-api-kitchen-sink.txt10
-rw-r--r--test/example/c-api-relooper-unreachable-if.cpp230
-rw-r--r--test/example/c-api-unused-mem.cpp4
-rw-r--r--test/example/cpp-threads.cpp4
-rw-r--r--test/example/cpp-unit.cpp2
-rw-r--r--test/example/relooper-fuzz.c28
-rw-r--r--test/example/relooper-fuzz1.c28
-rw-r--r--test/example/relooper-fuzz2.c30
-rw-r--r--test/example/relooper-merge1.c12
-rw-r--r--test/example/relooper-merge2.c12
-rw-r--r--test/example/relooper-merge3.c12
-rw-r--r--test/example/relooper-merge4.c12
-rw-r--r--test/example/relooper-merge5.c12
-rw-r--r--test/example/relooper-merge6.c12
16 files changed, 214 insertions, 214 deletions
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()))
};