-
Notifications
You must be signed in to change notification settings - Fork 27
Delete mentions of copying order in Overview.md #134
Conversation
This reflects spec changes in WebAssembly#126 in Overview.md.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Comment just pointing out an opportunity for clarification given our new semantics.
@@ -281,10 +281,8 @@ Note that it is allowed to use `memory.init` on the same data segment more than | |||
once. | |||
|
|||
Initialization takes place bytewise from lower addresses toward higher |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that we have an ahead-of-time bounds check, the copying order isn't observable. If it ever did become observable through some concurrency feature, implementations won't be able to guarantee that the order is observed to be low-to-high. This was something that came out of the discussion in #111, where it was noted that implementations are calling the system memcpy
/memmove
, which doesn't guarantee this ordering.
I feel that this sentence should now just state that the write/copying order isn't observable, due to the ahead-of-time bounds check. Same for copy/fill below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
stay written. | ||
Memory copying order of bytes is not observable. When a trap resulting from an | ||
access outside the source or target region occurs, partial copying does not take | ||
place. | ||
|
||
(Data are read and written as-if individual bytes were read and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies for missing this earlier:
Lines 316-325 above (more out-of-date ordering info) should be removed. It's too far from the diff for github to let me interact.
This line here should be replaced with a statement that copying occurs as though the source bytes are first read into an intermediate buffer (which was implied by lines 316-325 but not mentioned elsewhere). This is similar to the phrasing used to describe memmove.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replaced the paragraph with the sentence from the memmove link. Let me know if you think it's not sufficient.
addresses. A trap resulting from an access outside the target memory | ||
only occurs once the first byte that is outside the target is reached. | ||
Bytes written before the trap stay written. | ||
Memory writing order of bytes is not obserable. When a trap resulting from an |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: obserable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Oh, I didn't know your PR was pending. I deleted all duplicate paragraphs and this is what remains 😂 PTAL. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me :)
After the spec change in #126, byte copying order is not observable.