summaryrefslogtreecommitdiff
path: root/src/wasm/wasm-validator.cpp
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2021-01-21 21:45:13 +0900
committerGitHub <noreply@github.com>2021-01-21 21:45:13 +0900
commit527e9f9ed76cee0baaa67e89569c282a3782be08 (patch)
treeba7e490c4c959cc06b39f854ae7bef36ce16269b /src/wasm/wasm-validator.cpp
parentb77d0af3fc369dd78f51d61d0499571a74366762 (diff)
downloadbinaryen-527e9f9ed76cee0baaa67e89569c282a3782be08.tar.gz
binaryen-527e9f9ed76cee0baaa67e89569c282a3782be08.tar.bz2
binaryen-527e9f9ed76cee0baaa67e89569c282a3782be08.zip
Update interpreter for new EH spec (#3498)
This updates the interpreter for the EH instructions (modulo `delegate`) to match the new spec. Before we had an `exnref` type so threw a `Literal` of `exnref` type which contained `ExceptionPackage`. But now that we don't have `exnref` anymore, so we add the contents of `ExceptionPackage` to `WasmException`, which is used only for the `ExpressionRunner` class hierarchy. `exnref` and `ExceptionPackage` will be removed in a followup CL. This allows nonzero depths for `rethrow` for now for testing; we disallowed that for safety measure, but given that there are no passes that modifies that field, I think the risk is low.
Diffstat (limited to 'src/wasm/wasm-validator.cpp')
-rw-r--r--src/wasm/wasm-validator.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/wasm/wasm-validator.cpp b/src/wasm/wasm-validator.cpp
index e7055a8b0..1557240bb 100644
--- a/src/wasm/wasm-validator.cpp
+++ b/src/wasm/wasm-validator.cpp
@@ -2097,10 +2097,8 @@ void FunctionValidator::visitRethrow(Rethrow* curr) {
Type(Type::unreachable),
curr,
"rethrow's type must be unreachable");
- // TODO Allow non-zero depths and Validate the depth field. The current LLVM
- // toolchain only generates depth 0 for C++ support.
- shouldBeEqual(
- curr->depth, (Index)0, curr, "rethrow only support depth 0 at the moment");
+ // TODO Validate the depth field. The current LLVM toolchain only generates
+ // depth 0 for C++ support.
}
void FunctionValidator::visitBrOnExn(BrOnExn* curr) {