diff options
author | Heejin Ahn <aheejin@gmail.com> | 2021-01-21 21:45:13 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-21 21:45:13 +0900 |
commit | 527e9f9ed76cee0baaa67e89569c282a3782be08 (patch) | |
tree | ba7e490c4c959cc06b39f854ae7bef36ce16269b /src/wasm/wasm-interpreter.cpp | |
parent | b77d0af3fc369dd78f51d61d0499571a74366762 (diff) | |
download | binaryen-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-interpreter.cpp')
-rw-r--r-- | src/wasm/wasm-interpreter.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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 |