summaryrefslogtreecommitdiff
path: root/src/asm2wasm.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-04-14 17:39:03 -0700
committerAlon Zakai <alonzakai@gmail.com>2016-04-14 17:39:03 -0700
commit3e28445757a8904dc0927698c5b9f33d3a0caeaf (patch)
tree3a781fba9010d0d483e23e2e1489b137de3bb392 /src/asm2wasm.h
parentf0c739b5f78e63e9ad4c11bfdc50a55ef18b388f (diff)
downloadbinaryen-3e28445757a8904dc0927698c5b9f33d3a0caeaf.tar.gz
binaryen-3e28445757a8904dc0927698c5b9f33d3a0caeaf.tar.bz2
binaryen-3e28445757a8904dc0927698c5b9f33d3a0caeaf.zip
rename function locals, to params and vars, which together are all the locals. preparation for #336 (#349)
Diffstat (limited to 'src/asm2wasm.h')
-rw-r--r--src/asm2wasm.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/asm2wasm.h b/src/asm2wasm.h
index 307f7a38e..8fcb1fb64 100644
--- a/src/asm2wasm.h
+++ b/src/asm2wasm.h
@@ -782,10 +782,10 @@ void Asm2WasmBuilder::processAsm(Ref ast) {
yl = func->params[2].name,
yh = func->params[3].name,
r = func->params[4].name;
- func->locals.clear();
+ func->vars.clear();
Name x64("x64"), y64("y64");
- func->locals.emplace_back(x64, i64);
- func->locals.emplace_back(y64, i64);
+ func->vars.emplace_back(x64, i64);
+ func->vars.emplace_back(y64, i64);
auto* body = allocator.alloc<Block>();
auto recreateI64 = [&](Name target, Name low, Name high) {
return builder.makeSetLocal(
@@ -884,7 +884,7 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) {
return IString((std::string("label$continue$") + label.str).c_str(), false);
};
- IStringSet functionVariables; // params or locals
+ IStringSet functionVariables; // params or vars
IString parentLabel; // set in LABEL, then read in WHILE/DO/SWITCH
std::vector<IString> breakStack; // where a break will go
@@ -910,7 +910,7 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) {
Ref pair = curr[1][j];
IString name = pair[0]->getIString();
AsmType asmType = detectType(pair[1], nullptr, true, Math_fround);
- function->locals.emplace_back(name, asmToWasmType(asmType));
+ function->vars.emplace_back(name, asmToWasmType(asmType));
functionVariables.insert(name);
asmData.addVar(name, asmType);
}
@@ -921,7 +921,7 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) {
auto ensureI32Temp = [&]() {
if (addedI32Temp) return;
addedI32Temp = true;
- function->locals.emplace_back(I32_TEMP, i32);
+ function->vars.emplace_back(I32_TEMP, i32);
functionVariables.insert(I32_TEMP);
asmData.addVar(I32_TEMP, ASM_INT);
};