diff options
author | Alon Zakai <alonzakai@gmail.com> | 2018-09-12 09:45:34 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-12 09:45:34 -0700 |
commit | 5d9ff4e46b595a5f20aa4732256462609a9614ea (patch) | |
tree | 56e57fa1cebd7527866ecd9923e26e828c8b907d /src/wasm | |
parent | 4d737f27edb5e2bb5f514aae800ba9c6ab61ca5a (diff) | |
download | binaryen-5d9ff4e46b595a5f20aa4732256462609a9614ea.tar.gz binaryen-5d9ff4e46b595a5f20aa4732256462609a9614ea.tar.bz2 binaryen-5d9ff4e46b595a5f20aa4732256462609a9614ea.zip |
remove PageSize and HasFeature, which wasm removed a while back (#1667)
From #1665 (a fuzz bug noticed they were not handled in stack.h).
Diffstat (limited to 'src/wasm')
-rw-r--r-- | src/wasm/wasm-s-parser.cpp | 8 | ||||
-rw-r--r-- | src/wasm/wasm-validator.cpp | 4 | ||||
-rw-r--r-- | src/wasm/wasm.cpp | 2 |
3 files changed, 3 insertions, 11 deletions
diff --git a/src/wasm/wasm-s-parser.cpp b/src/wasm/wasm-s-parser.cpp index 818af49ba..a25d3491b 100644 --- a/src/wasm/wasm-s-parser.cpp +++ b/src/wasm/wasm-s-parser.cpp @@ -832,7 +832,6 @@ Expression* SExpressionWasmBuilder::makeExpression(Element& s) { abort_on(str); } case 'h': { - if (str[1] == 'a') return makeHost(s, HostOp::HasFeature); abort_on(str); } case 'i': { @@ -848,7 +847,6 @@ Expression* SExpressionWasmBuilder::makeExpression(Element& s) { abort_on(str); } case 'p': { - if (str[1] == 'a') return makeHost(s, HostOp::PageSize); abort_on(str); } case 's': { @@ -975,11 +973,7 @@ Expression* SExpressionWasmBuilder::makeDrop(Element& s) { Expression* SExpressionWasmBuilder::makeHost(Element& s, HostOp op) { auto ret = allocator.alloc<Host>(); ret->op = op; - if (op == HostOp::HasFeature) { - ret->nameOperand = s[1]->str(); - } else { - parseCallOperands(s, 1, s.size(), ret); - } + parseCallOperands(s, 1, s.size(), ret); if (ret->op == HostOp::GrowMemory) { if (ret->operands.size() != 1) { throw ParseException("grow_memory needs one operand"); diff --git a/src/wasm/wasm-validator.cpp b/src/wasm/wasm-validator.cpp index 4a6ed19be..d57607ce6 100644 --- a/src/wasm/wasm-validator.cpp +++ b/src/wasm/wasm-validator.cpp @@ -802,9 +802,7 @@ void FunctionValidator::visitHost(Host* curr) { shouldBeEqualOrFirstIsUnreachable(curr->operands[0]->type, i32, curr, "grow_memory must have i32 operand"); break; } - case PageSize: - case CurrentMemory: - case HasFeature: break; + case CurrentMemory: break; default: WASM_UNREACHABLE(); } } diff --git a/src/wasm/wasm.cpp b/src/wasm/wasm.cpp index 433803772..ac3623cee 100644 --- a/src/wasm/wasm.cpp +++ b/src/wasm/wasm.cpp @@ -558,7 +558,7 @@ void Drop::finalize() { void Host::finalize() { switch (op) { - case PageSize: case CurrentMemory: case HasFeature: { + case CurrentMemory: { type = i32; break; } |