summaryrefslogtreecommitdiff
path: root/src/emscripten-optimizer
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2015-11-26 21:22:29 -0800
committerAlon Zakai <alonzakai@gmail.com>2015-11-26 21:22:29 -0800
commit6f91d9e310b206ae801768f45f4a82aa647df1c6 (patch)
treeca2ea5d0b34dedd7c4255605210ff3325ee80f6c /src/emscripten-optimizer
parenta7bfbd7ab12aca7d1592e04165c3d0ec00c962e8 (diff)
downloadbinaryen-6f91d9e310b206ae801768f45f4a82aa647df1c6.tar.gz
binaryen-6f91d9e310b206ae801768f45f4a82aa647df1c6.tar.bz2
binaryen-6f91d9e310b206ae801768f45f4a82aa647df1c6.zip
wasm2asm progress
Diffstat (limited to 'src/emscripten-optimizer')
-rw-r--r--src/emscripten-optimizer/simple_ast.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/emscripten-optimizer/simple_ast.h b/src/emscripten-optimizer/simple_ast.h
index 9e19249ab..632e9053d 100644
--- a/src/emscripten-optimizer/simple_ast.h
+++ b/src/emscripten-optimizer/simple_ast.h
@@ -1336,6 +1336,13 @@ public:
.push_back(target)
.push_back(makeRawArray());
}
+ static Ref makeCall(IString target, Ref arg) {
+ auto ret = &makeRawArray(3)->push_back(makeRawString(CALL))
+ .push_back(makeName(target))
+ .push_back(makeRawArray());
+ ret[2]->push_back(arg);
+ return ret;
+ }
static void appendToCall(Ref call, Ref element) {
assert(call[0] == CALL);