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-interpreter.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/wasm/wasm-interpreter.cpp') diff --git a/src/wasm/wasm-interpreter.cpp b/src/wasm/wasm-interpreter.cpp index ad4b565fe..f37758808 100644 --- a/src/wasm/wasm-interpreter.cpp +++ b/src/wasm/wasm-interpreter.cpp @@ -19,4 +19,8 @@ void Indenter::print() { } #endif // WASM_INTERPRETER_DEBUG +std::ostream& operator<<(std::ostream& o, const WasmException& exn) { + return o << exn.event << " " << exn.values; +} + } // namespace wasm -- cgit v1.2.3