diff options
Diffstat (limited to 'src/emscripten-optimizer')
-rw-r--r-- | src/emscripten-optimizer/simple_ast.h | 7 |
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); |