Commit Graph

2 Commits

Author SHA1 Message Date
Liam Appelbe f25c50fdcb [wasm] Use wasm traps to handle exceptions
The Dart exception is converted to a string, stored in a trap which
is passed through wasm, then converted back to a Dart exception.

Module instantiation can also throw a trap, because it internally
invokes the initialization function, if the module defines one. So I'm
handling this too.

Also, update to the new version of the wasm C API, which replaces some
foo_t** with foo_vec_t*.

Bug: https://github.com/dart-lang/sdk/issues/37882
Change-Id: I1e6952a191134734a892c42b2fb8ba3506bb0844
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169784
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-11-02 23:32:20 +00:00
Liam Appelbe af8c9131eb [vm, test] Copy dart:wasm tests from lib_2/wasm to lib/wasm
Bug: https://github.com/dart-lang/sdk/issues/40043
Change-Id: I309274bc637f0352d3eca9cef215fc50418b8213
Fixed: https://github.com/dart-lang/sdk/issues/40043
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131720
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-01-14 23:32:04 +00:00