Conversation
|
I would rather check bounds as we apply segments, instead of up front. IMO it's not a useful property to purposefully apply segments and rely on halfway failure, but it's faster to check each bounds while applying them versus doing two passes. I'd therefore do a single pass, and fail halfway. This optimizes for the useful case (everything succeeds) and leaves the useless case in a well-specified state. |
|
@jfbastien, I agree that's simpler, but if you prefer that semantics then I suggest you create a PR to change JS.md. |
Addresses #897. Related to WebAssembly/spec#399.
|
Done: WebAssembly/design#902 |
|
lgtm |
|
@jfbastien, are you fine with landing this for the time being? Until we have consensus for changing the design the spec should better match the current design. |
|
@rossberg-chromium with that rationale we could as well merge WebAssembly/design#902, no? I'm OK revisiting later, so feel free to merge as long as we discuss this. |
|
@jfbastien, thanks. There doesn't seem to be consensus on the broader change from #902, but the overriding goal is to get design and spec into sync. We can always adjust the spec when #902 evolves. |
Fix WebAssembly#399 and a couple of other small bugs with conversion to/from JS numbers.
...and add tests that memories/tables remain unchanged in case of error. Addresses WebAssembly/design#897