diff options
author | Dan Gohman <sunfish@mozilla.com> | 2016-05-20 20:08:54 -0700 |
---|---|---|
committer | Dan Gohman <sunfish@mozilla.com> | 2016-05-20 20:08:54 -0700 |
commit | 89a3fcbc78903d1a904354dd6eb2c4bd1ac44e8e (patch) | |
tree | 76d9524e84bbbbe32efe0688dd0b67a1cbe9545f /src | |
parent | b28a3a6eba4c4fbe64333dd544977a0c4f37c650 (diff) | |
download | binaryen-89a3fcbc78903d1a904354dd6eb2c4bd1ac44e8e.tar.gz binaryen-89a3fcbc78903d1a904354dd6eb2c4bd1ac44e8e.tar.bz2 binaryen-89a3fcbc78903d1a904354dd6eb2c4bd1ac44e8e.zip |
Update s2wasm for LLVM changes, and regenerate tests. (#532)
Diffstat (limited to 'src')
-rw-r--r-- | src/s2wasm.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/s2wasm.h b/src/s2wasm.h index 9afa51c7f..c0ab0998b 100644 --- a/src/s2wasm.h +++ b/src/s2wasm.h @@ -485,6 +485,12 @@ class S2WasmBuilder { mustMatch(":"); + if (match(".Lfunc_begin")) { + s = strchr(s, '\n'); + s++; + skipWhitespace(); + } + unsigned nextId = 0; auto getNextId = [&nextId]() { return cashew::IString(std::to_string(nextId++).c_str(), false); @@ -987,15 +993,10 @@ class S2WasmBuilder { addToBlock(builder.makeReturn(*s == '$' ? getInput() : nullptr)); } else if (match("unreachable")) { addToBlock(allocator->alloc<Unreachable>()); - } else if (match("memory_size")) { + } else if (match("current_memory")) { makeHost(CurrentMemory); } else if (match("grow_memory")) { makeHost1(GrowMemory); - } else if (match(".Lfunc_end")) { - s = strchr(s, '\n'); - s++; - s = strchr(s, '\n'); - break; // the function is done } else if (match(".endfunc")) { break; // the function is done } else { |