summaryrefslogtreecommitdiff
path: root/src/wasm-linker.cpp
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-06-26 11:00:02 -0700
committerGitHub <noreply@github.com>2016-06-26 11:00:02 -0700
commit45b358706c86415c5982f9e777fa9e19a33b27a3 (patch)
treed1caa4180c8d0f4a76319fd11f8b18f9f446e6c3 /src/wasm-linker.cpp
parentc410d93d3af9813f889b4011f964d4becf43bc27 (diff)
parent87f3020cf4e666a6eb6620106e48ee042cd2f666 (diff)
downloadbinaryen-45b358706c86415c5982f9e777fa9e19a33b27a3.tar.gz
binaryen-45b358706c86415c5982f9e777fa9e19a33b27a3.tar.bz2
binaryen-45b358706c86415c5982f9e777fa9e19a33b27a3.zip
Merge pull request #602 from WebAssembly/dsl-nice
Use a DSL in OptimizeInstructions
Diffstat (limited to 'src/wasm-linker.cpp')
-rw-r--r--src/wasm-linker.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/wasm-linker.cpp b/src/wasm-linker.cpp
index e89c324b4..34dbc7f9c 100644
--- a/src/wasm-linker.cpp
+++ b/src/wasm-linker.cpp
@@ -25,13 +25,6 @@
using namespace wasm;
cashew::IString EMSCRIPTEN_ASM_CONST("emscripten_asm_const");
-namespace wasm {
-// These are defined (not just declared) in shared-constants.h, so we can't just
-// include that header. TODO: Move the definitions into a cpp file.
-extern cashew::IString ENV;
-extern cashew::IString MEMORY;
-}
-
void Linker::placeStackPointer(Address stackAllocation) {
// ensure this is the first allocation
@@ -403,7 +396,7 @@ Function* Linker::getImportThunk(Name name, const FunctionType* funcType) {
for (Index i = 0; i < funcType->params.size(); ++i) {
args.push_back(wasmBuilder.makeGetLocal(i, funcType->params[i]));
}
- Expression* call = wasmBuilder.makeCallImport(name, args);
+ Expression* call = wasmBuilder.makeCallImport(name, args, funcType->result);
f->body = call;
out.wasm.addFunction(f);
return f;