Repository navigation
New segment encoding - #130
Conversation
|
@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). |
rossberg
left a comment
There was a problem hiding this comment.
LGTM (Sorry for the delay, I was OOO for the last two weeks.)
| 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. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Oh, right, partial write does not occur within a segment. Thanks.
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.