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/StackIR.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/passes/StackIR.cpp') diff --git a/src/passes/StackIR.cpp b/src/passes/StackIR.cpp index 1f182dbc3..d834655b9 100644 --- a/src/passes/StackIR.cpp +++ b/src/passes/StackIR.cpp @@ -132,7 +132,7 @@ private: localGraph.computeInfluences(); // We maintain a stack of relevant values. This contains: // * a null for each actual value that the value stack would have - // * an index of each SetLocal that *could* be on the value + // * an index of each LocalSet that *could* be on the value // stack at that location. const Index null = -1; std::vector values; @@ -188,7 +188,7 @@ private: // This is something we should handle, look into it. if (isConcreteType(inst->type)) { bool optimized = false; - if (auto* get = inst->origin->dynCast()) { + if (auto* get = inst->origin->dynCast()) { // This is a potential optimization opportunity! See if we // can reach the set. if (values.size() > 0) { @@ -199,7 +199,7 @@ private: if (index == null) { break; } - auto* set = insts[index]->origin->cast(); + auto* set = insts[index]->origin->cast(); if (set->index == get->index) { // This might be a proper set-get pair, where the set is // used by this get and nothing else, check that. @@ -238,7 +238,7 @@ private: // This is an actual regular value on the value stack. values.push_back(null); } - } else if (inst->origin->is() && inst->type == none) { + } else if (inst->origin->is() && inst->type == none) { // This set is potentially optimizable later, add to stack. values.push_back(i); } -- cgit v1.2.3