Closed Bug 1728897 Opened 4 years ago Closed 4 years ago

Update Wasm try-delegate semantics to match latest spec

Categories

(Core :: JavaScript: WebAssembly, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
94 Branch
Tracking Status
firefox94 --- fixed

People

(Reporter: asumu, Assigned: asumu)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Recently there has been a discussion on clarifying the behavior in the spec for the try-delegate instruction for Wasm exception handling: https://github.com/WebAssembly/exception-handling/issues/176

There's now consensus between the proposal champion and other spec authors, so this bug is for implementing the proposed new semantics.

The currently implemented semantics is that try-delegate can only target try blocks and the body block of a function.

The new semantics is that try-delegate may target any block, and the delegation will skip to the nearest enclosing try block (this can be determined statically) or rethrow out of the function.

I already have a patch prepared to implement this that I will attach later.

Assignee: nobody → asumu

The semantics of the try-delegate Wasm exception handling instruction
was recently changed in this spec discussion:

https://github.com/WebAssembly/exception-handling/issues/176

This patch adjusts compilation and validation to match the new
semantics, which allows delegate to target any block.

There was also a suggestion to remove the current validation restriction on delegating to a catch (https://github.com/WebAssembly/exception-handling/issues/176#issuecomment-912413970) so the attached patch might need to change to accommodate that too.

Status: NEW → ASSIGNED
Priority: -- → P3
Pushed by rhunt@eqrion.net: https://hg.mozilla.org/integration/autoland/rev/56efcc26737b Update Wasm try-delegate semantics to match spec r=rhunt
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 94 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: