diff options
author | Heejin Ahn <aheejin@gmail.com> | 2019-05-21 13:25:14 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-21 13:25:14 -0700 |
commit | 1a3c1a58cc7e97a846f612baf7f74a370980458f (patch) | |
tree | cbe62ea58b2c0dd6d98225265419fea0b829aeab /src/passes/SpillPointers.cpp | |
parent | d78be9ac6c02910bbf8ac71118e68adff4fdc570 (diff) | |
download | binaryen-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 'src/passes/SpillPointers.cpp')
-rw-r--r-- | src/passes/SpillPointers.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/passes/SpillPointers.cpp b/src/passes/SpillPointers.cpp index 6c194eb60..5c3d546ad 100644 --- a/src/passes/SpillPointers.cpp +++ b/src/passes/SpillPointers.cpp @@ -103,7 +103,7 @@ struct SpillPointers } // scan through the block, spilling around the calls // TODO: we can filter on pointerMap everywhere - LocalSet live = liveness.end; + SetOfLocals live = liveness.end; for (int i = int(actions.size()) - 1; i >= 0; i--) { auto& action = actions[i]; if (action.isGet()) { @@ -160,14 +160,14 @@ struct SpillPointers // move the operands into locals, as we must spill after they are executed auto handleOperand = [&](Expression*& operand) { auto temp = builder.addVar(func, operand->type); - auto* set = builder.makeSetLocal(temp, operand); + auto* set = builder.makeLocalSet(temp, operand); block->list.push_back(set); block->finalize(); if (actualPointers.count(&operand) > 0) { // this is something we track, and it's moving - update actualPointers[&operand] = &set->value; } - operand = builder.makeGetLocal(temp, operand->type); + operand = builder.makeLocalGet(temp, operand->type); }; if (call->is<Call>()) { for (auto*& operand : call->cast<Call>()->operands) { @@ -187,8 +187,8 @@ struct SpillPointers builder.makeStore(getTypeSize(ABI::PointerType), pointerMap[index], getTypeSize(ABI::PointerType), - builder.makeGetLocal(spillLocal, ABI::PointerType), - builder.makeGetLocal(index, ABI::PointerType), + builder.makeLocalGet(spillLocal, ABI::PointerType), + builder.makeLocalGet(index, ABI::PointerType), ABI::PointerType)); } // add the (modified) call |