diff options
author | Derek Schuff <dschuff@chromium.org> | 2016-03-09 17:38:56 -0800 |
---|---|---|
committer | Derek Schuff <dschuff@chromium.org> | 2016-03-09 17:38:56 -0800 |
commit | 864fa9c37ba1b33605805d89ab920e6fa4e67a38 (patch) | |
tree | c2cb837f4285b06b47bbb017a909df718673b7c1 /src/wasm-s-parser.h | |
parent | e9d98deed872a72a826f78c8525464c446c6f21b (diff) | |
parent | ac9d61d45fec988640b57dc6b9de97e7d46c41f5 (diff) | |
download | binaryen-864fa9c37ba1b33605805d89ab920e6fa4e67a38.tar.gz binaryen-864fa9c37ba1b33605805d89ab920e6fa4e67a38.tar.bz2 binaryen-864fa9c37ba1b33605805d89ab920e6fa4e67a38.zip |
Merge pull request #225 from WebAssembly/memory_pages
Make initial and max memory sizes be in pages instead of bytes
Diffstat (limited to 'src/wasm-s-parser.h')
-rw-r--r-- | src/wasm-s-parser.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h index 1cd614c1d..cfabbf52d 100644 --- a/src/wasm-s-parser.h +++ b/src/wasm-s-parser.h @@ -430,7 +430,8 @@ public: WasmType type = stringToWasmType(str, false, true); // Local copy to index into op without bounds checking. constexpr size_t maxNameSize = 15; - char op[maxNameSize + 1] = { '\0' }; + char op[maxNameSize + 1]; + memset(op, 0, maxNameSize + 1); // ensure the whole string is cleared. strncpy(op, dot + 1, maxNameSize); switch (op[0]) { case 'a': { @@ -523,6 +524,9 @@ public: if (op[2] == 'm') return makeBinary(s, op[4] == 'u' ? BinaryOp::RemU : BinaryOp::RemS, type); if (op[2] == 'i') return makeUnary(s, isWasmTypeFloat(type) ? UnaryOp::ReinterpretInt : UnaryOp::ReinterpretFloat, type); } + if (op[1] == 'o' && op[2] == 't') { + return makeBinary(s, op[3] == 'l' ? BinaryOp::RotL : BinaryOp::RotR, type); + } abort_on(op); } case 's': { |