summaryrefslogtreecommitdiff
path: root/src/emscripten-optimizer
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2015-12-04 21:00:16 -0800
committerAlon Zakai <alonzakai@gmail.com>2015-12-04 21:00:16 -0800
commit1dc1d8a7958c85d4768afa1abcc4f2706510bee1 (patch)
treeca9bf1e585ed6cca05d48640d1b87e4bab220b13 /src/emscripten-optimizer
parent19109e4228c2687427257f06f80b19f3c95e1642 (diff)
downloadbinaryen-1dc1d8a7958c85d4768afa1abcc4f2706510bee1.tar.gz
binaryen-1dc1d8a7958c85d4768afa1abcc4f2706510bee1.tar.bz2
binaryen-1dc1d8a7958c85d4768afa1abcc4f2706510bee1.zip
wasm2asm fixes
Diffstat (limited to 'src/emscripten-optimizer')
-rw-r--r--src/emscripten-optimizer/simple_ast.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/emscripten-optimizer/simple_ast.h b/src/emscripten-optimizer/simple_ast.h
index 942121015..94cae9f2f 100644
--- a/src/emscripten-optimizer/simple_ast.h
+++ b/src/emscripten-optimizer/simple_ast.h
@@ -1615,6 +1615,12 @@ public:
.push_back(target)
.push_back(value);
}
+ static Ref makeAssign(IString target, Ref value) {
+ return &makeRawArray(3)->push_back(makeRawString(ASSIGN))
+ .push_back(&arena.alloc()->setBool(true))
+ .push_back(makeName(target))
+ .push_back(value);
+ }
static Ref makeSub(Ref obj, Ref index) {
return &makeRawArray(2)->push_back(makeRawString(SUB))