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. --- src/passes/LegalizeJSInterface.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/passes/LegalizeJSInterface.cpp') diff --git a/src/passes/LegalizeJSInterface.cpp b/src/passes/LegalizeJSInterface.cpp index ad6d0c35b..23cceb4ef 100644 --- a/src/passes/LegalizeJSInterface.cpp +++ b/src/passes/LegalizeJSInterface.cpp @@ -176,7 +176,7 @@ private: legal->params.push_back(i32); } else { call->operands.push_back( - builder.makeGetLocal(legal->params.size(), param)); + builder.makeLocalGet(legal->params.size(), param)); legal->params.push_back(param); } } @@ -186,7 +186,7 @@ private: legal->result = i32; auto index = Builder::addVar(legal, Name(), i64); auto* block = builder.makeBlock(); - block->list.push_back(builder.makeSetLocal(index, call)); + block->list.push_back(builder.makeLocalSet(index, call)); block->list.push_back(builder.makeCall( f->name, {I64Utilities::getI64High(builder, index)}, none)); block->list.push_back(I64Utilities::getI64Low(builder, index)); @@ -233,7 +233,7 @@ private: type->params.push_back(i32); } else { call->operands.push_back( - builder.makeGetLocal(func->params.size(), param)); + builder.makeLocalGet(func->params.size(), param)); type->params.push_back(param); } func->params.push_back(param); -- cgit v1.2.3