Skip to content
This repository was archived by the owner on Nov 3, 2021. It is now read-only.

New segment encoding #130

Merged
merged 7 commits into from
Dec 16, 2019
Merged

New segment encoding #130

merged 7 commits into from
Dec 16, 2019

Conversation

lars-t-hansen
Copy link
Contributor

@lars-t-hansen lars-t-hansen commented Nov 21, 2019

Resolve TODOs and other outstanding issues; update the overview to the new encoding spec; add forward references to reference-types and multi-memory proposals where appropriate.

Pertains to #116.

Lars T Hansen and others added 5 commits November 21, 2019 14:15

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@lars-t-hansen
Copy link
Contributor Author

@rossberg, ptal and make sure i did not undo any of your work when i merged :-) If it looks OK you can go ahead and merge (I don't think I have privileges).

Copy link
Member

@rossberg rossberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (Sorry for the delay, I was OOO for the last two weeks.)

@lars-t-hansen lars-t-hansen merged commit 82be3c0 into WebAssembly:master Dec 16, 2019
each segment, if reading the source or writing the destination would
go out of bounds, then instantiation fails at that point. Data that
had already been written for previous (in-bounds) segments stays
written.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While for all other instructions the bounds checks are done before copying/initialization and partial copying does not occur, does partial copying occur for active segment initialization?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each segment is bounds-checked and initialized individually, in-order. If a segment fails a bounds check, previous segments will stay written, but the oob segment will not do any partial write, and the rest of the segments will not be written (immediate trap).

Initialization can be thought of as iteratively doing init -> drop on the active segment declarations. The bounds checking comes precisely from the behaviour of init. In the MVP, by contrast, all segments are bounds-checked before any are written.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, right, partial write does not occur within a segment. Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants