-
Notifications
You must be signed in to change notification settings - Fork 451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[spec review] 4 - Execution #728
Comments
If no one's done this by the time I'm done with the Appendix, I'd be willing to take it. |
Feedback: https://gist.github.com/binji/57b6b4ff318c6dc77f6d2e1fa7b2bada inline here: 4.2.12. Refers to the stack containing three kinds of entries "values", "labels", and "activations". Section 4.2.12.1 is called "Values", section 4.2.12.2 is called "Labels" but section 4.2.12.3 is called "Frames" instead. 4.2.12.3. The return arity is named but not labeled here. "Activation frames carry the return arity of the respective function". It should be the same as label above where 4.2.13. "ultimately reducing the entire program to a single trap instruction", this isn't true when calling out to the embedder, right? 4.2.13. Note #3. The link for the label reduction rule is broken, it should go to 4.4.6.2. Also, the rule is different in the note. 4.2.13.2. What does "home" mean in "home module instance"? 4.2.13.1. Better explanation of "the hole". It's not clear (to me) what it represents and how it works. 4.2.13.3. What is the purpose of the second reduction rule? (Where a 4.3. Mention the meta-variable "z"? 4.3. trunc is defined slightly different here than below in ftrunc_N: there 4.3.1.3. Is this bigendian instead? It looks like it extracts the most significant bits and puts it first in the byte sequence. 4.3.2.14 - 4.3.2.17. All define the shift amount as 4.3.3.1. sp: "correspondence" 4.3.3.3 and others. it's a bit odd that the prose says 4.3.3.4. Is there meant to be a difference between fadd and fsub here? fsub has 4.3.4.4. 4.3.4.6. Any "arithmetic" NaN of size N 4.4.1. It might be nice to have some examples of this mapping, e.g. 4.4.1.2. typo: 4.4.1.3. typo: 4.4.5.9. Mentioned in review for tailcall, I think -- 4.4.8. The evaluation here has a different syntax than elsewhere in this section. Is this deliberate? 4.5.3.2. typo: 4.5.3.6 (similar in 4.5.3.7). Phrasing here is ambiguous, "not empty and smaller" doesn't make it clear whether it is 4.5.3.8. The 4.5.3.8. I don't understand the allocx definition, it seems to be a recursive definition... oh, I see, it's actually not. 4.5.3.8. What's up with 4.5.4. Not sure if there's another way, but it is a bit unclear that 4.5.5. Discrepancy between prose and formal: formal mentions empty frame. Also, empty frame seems a little strange, maybe some explanation would help. |
@rossberg sorry, should have tagged you before! |
Hm, checking, I think I missed this. Will look into it. |
@binji, urgh, sorry, I somehow had missed this feedback. See #1022.
Renamed section title.
Added.
It should be true even then. We axiomatically require that any such call itself reduces to either a sequence of values or a trap.
Hm, this seems to be a Bikeshed issue. The link is correct in the other version of the document.
Changed to "the :ref:
Rephrased to " a hole :math:
This performs a reduction step inside a frame. Recursing into frames requires an explicit rule because frames are not expressible with evaluation contexts (because the recursion requires switching to frame F', and furthermore, the reduction can modify that frame).
That convention is already introduced in 2.2.3.1.
Done.
bits() is the binary representation of the number, i.e., the list of bits in natural (big endian) order. This definition hence has to switch that order around in groups of 8.
Cleaned up.
Fixed.
Synchronised.
The difference is that in the case of sub we have to toggle the sign.
Hm, why is it not defined?
Refined.
Added two examples.
These seem already fixed.
Ah, the B^n[] refers to the definition in 4.2.13.1, for which \ast is not defined.
Changed.
Already fixed?
Reworded to "is not empty and its value is smaller:
Hm, table* is used via (table.type)*.
Bikeshed issue, fixed by now.
Yeah, in the prose I need to spell out the (... val end)* iteration as an explicit loop.
Yeah, technically, the formal notation always requires a current frame F, even though the external caller does not really have one in this case, so a dummy is used. In the prose I ignored this technicality. Added now for symmetry. |
I think this was fixed here: #968 The rest of them I agree with, seems to be just misunderstanding on my part. |
Ah, indeed. |
Closing. |
Detail oriented review of draft text:
http://webassembly.github.io/spec/core/bikeshed/index.html#execution%E2%91%A1
Try to be ready to discuss issues by the next in person WG meeting.
The text was updated successfully, but these errors were encountered: