From 1a3c1a58cc7e97a846f612baf7f74a370980458f Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Tue, 21 May 2019 13:25:14 -0700 Subject: 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. --- test/example/relooper-merge3.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test/example/relooper-merge3.c') 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())) }; -- cgit v1.2.3