diff options
author | Alon Zakai <alonzakai@gmail.com> | 2015-12-26 16:20:40 -0500 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2015-12-26 16:20:40 -0500 |
commit | b258f03455399fcadc6a4ba7426fa447fe6dff66 (patch) | |
tree | ce325377fe85edfa7fceea651fc8b958fcbfba3f /src | |
parent | fc2d299ffe1877a635277acff15574d987da9a53 (diff) | |
download | binaryen-b258f03455399fcadc6a4ba7426fa447fe6dff66.tar.gz binaryen-b258f03455399fcadc6a4ba7426fa447fe6dff66.tar.bz2 binaryen-b258f03455399fcadc6a4ba7426fa447fe6dff66.zip |
implement a temporary hack for __stack_pointer
Diffstat (limited to 'src')
-rw-r--r-- | src/s2wasm.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/s2wasm.h b/src/s2wasm.h index dd4437ed9..af5fccf82 100644 --- a/src/s2wasm.h +++ b/src/s2wasm.h @@ -42,11 +42,12 @@ class S2WasmBuilder { public: S2WasmBuilder(AllocatingModule& wasm, const char* input, bool debug, size_t globalBase) : wasm(wasm), allocator(wasm.allocator), debug(debug), globalBase(globalBase), nextStatic(globalBase) { - s = input; - scan(); - s = input; - process(); - fix(); + s = input; + scan(); + s = input; + prepare(); + process(); + fix(); } private: @@ -302,6 +303,10 @@ private: } } + void prepare() { + staticAddresses["__stack_pointer"] = 0; // XXX HACK for now + } + void process() { while (*s) { skipWhitespace(); |