You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
execution [...] is terminated and abnormal termination is reported to the outside environment.
Several operators are defined to trap, such as integer division when the denominator is zero. What's the best way to represent this in OCaml? Would an exception be appropriate?
An exception seems perfectly adequate. We can either just use the existing Error.error for that, or, if we care about distinguishing expected from unexpected runtime errors, introduce a new Eval.Trap exception.
Given use of ML exceptions and ability to test with assert_trap (#74, #76), I think this issue is resolved, but feel free to reopen if there is more to do here. When we specify JS<->wasm integration, we'll have to talk about how spec traps turn into JS exceptions (I assume), but I think that's outside ml-proto (it's just what the host does when Eval.invoke throws).
Activity
rossberg commentedon Sep 2, 2015
An exception seems perfectly adequate. We can either just use the existing Error.error for that, or, if we care about distinguishing expected from unexpected runtime errors, introduce a new Eval.Trap exception.
lukewagner commentedon Sep 2, 2015
It'd also be nice to add a new
(asserttrap (invoke ...))command to test trapping behavior.lukewagner commentedon Sep 17, 2015
Given use of ML exceptions and ability to test with
assert_trap(#74, #76), I think this issue is resolved, but feel free to reopen if there is more to do here. When we specify JS<->wasm integration, we'll have to talk about how spec traps turn into JS exceptions (I assume), but I think that's outside ml-proto (it's just what the host does when Eval.invoke throws).Remove sign-extending operators from spec section (WebAssembly#41)
Update Overview.md for element segments (WebAssembly#41)
Merge pull request WebAssembly#41 from eholk/clarify-proposals
Merge pull request WebAssembly#41 from WebAssembly/add_more_tests
Fix `global.set` and `table.set` for continuation references (WebAsse…
Rename to laneselect (#41)
Changed u32/u64 to i32/i64 (#41)
Merge pull request WebAssembly#41 from WebAssembly/update-link