From 527e9f9ed76cee0baaa67e89569c282a3782be08 Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Thu, 21 Jan 2021 21:45:13 +0900 Subject: 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. --- src/wasm/wasm-validator.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/wasm/wasm-validator.cpp') 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) { -- cgit v1.2.3