diff options
Diffstat (limited to 'src/wasm/wasm-s-parser.cpp')
-rw-r--r-- | src/wasm/wasm-s-parser.cpp | 33 |
1 files changed, 3 insertions, 30 deletions
diff --git a/src/wasm/wasm-s-parser.cpp b/src/wasm/wasm-s-parser.cpp index 0356db235..d34698131 100644 --- a/src/wasm/wasm-s-parser.cpp +++ b/src/wasm/wasm-s-parser.cpp @@ -858,9 +858,6 @@ Type SExpressionWasmBuilder::stringToType(const char* str, if (strncmp(str, "externref", 9) == 0 && (prefix || str[9] == 0)) { return Type::externref; } - if (strncmp(str, "exnref", 6) == 0 && (prefix || str[6] == 0)) { - return Type::exnref; - } if (strncmp(str, "anyref", 6) == 0 && (prefix || str[6] == 0)) { return Type::anyref; } @@ -892,14 +889,9 @@ HeapType SExpressionWasmBuilder::stringToHeapType(const char* str, if (str[1] == 'q' && (prefix || str[2] == 0)) { return HeapType::eq; } - if (str[1] == 'x') { - if (str[2] == 'n' && (prefix || str[3] == 0)) { - return HeapType::exn; - } - if (str[2] == 't' && str[3] == 'e' && str[4] == 'r' && str[5] == 'n' && - (prefix || str[6] == 0)) { - return HeapType::ext; - } + if (str[1] == 'x' && str[2] == 't' && str[3] == 'e' && str[4] == 'r' && + str[5] == 'n' && (prefix || str[6] == 0)) { + return HeapType::ext; } } if (str[0] == 'i') { @@ -2073,25 +2065,6 @@ Expression* SExpressionWasmBuilder::makeRethrow(Element& s) { return ret; } -Expression* SExpressionWasmBuilder::makeBrOnExn(Element& s) { - auto ret = allocator.alloc<BrOnExn>(); - size_t i = 1; - ret->name = getLabel(*s[i++]); - ret->event = getEventName(*s[i++]); - if (!wasm.getEventOrNull(ret->event)) { - throw ParseException("bad event name", s[1]->line, s[1]->col); - } - ret->exnref = parseExpression(s[i]); - - Event* event = wasm.getEventOrNull(ret->event); - assert(event && "br_on_exn's event must exist"); - // Copy params info into BrOnExn, because it is necessary when BrOnExn is - // refinalized without the module. - ret->sent = event->sig.params; - ret->finalize(); - return ret; -} - Expression* SExpressionWasmBuilder::makeTupleMake(Element& s) { auto ret = allocator.alloc<TupleMake>(); parseCallOperands(s, 1, s.size(), ret); |