-
Notifications
You must be signed in to change notification settings - Fork 11
[interpreter] Handle custom sections and annotations #17
Conversation
@rossberg let me know if there is anything left that I should do here. |
Hi @yuri91, sorry, I didn't get around to reviewing this yet. |
@rossberg Do you have an ETA for the review of this PR? It is our understanding that it will allow the Annotation proposal to move forward to Phase 4. Our main interest is actually moving branch hinting to Phase 4. We have invested significant effort on this tangential line of work for the purpose of (eventually) satisfying the "testing" requirement, which is the main remaining obstacle. In case you do not have the opportunity of reviewing the work, is there anybody else that has the authority to do so? Thanks in advance for your help on the matter. |
Sorry about that, I've been in deadline and travel hell for the past weeks, and will remain so until end of next week. After that, I'll try to review it ASAP. |
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 a lot for looking into this, and sorry again for the long delay.
I don't remember where the Makefile changes were coming from, but they look fine.
If you can add the custom tests to the dune tests that would be great.
{ let at = at () in | ||
(* Hack for empty modules *) | ||
let at = if at.left <> at.right then at else | ||
{at with right = {at.right with line = Stdlib.Int.max_int}} in |
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.
If only I remembered what this was needed for...
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.
tests like this one, with an empty module (just an annotation) fail without those lines:
(module quote "(@a \09)") ;; \t
Co-authored-by: Yuri Iozzelli <[email protected]>
@rossberg I addressed your comments. About the "hack for empty modules" I am not entirely sure, but I guess that the source info would not play nice with the regular case without it. Before this PR nothing really cares about the source lines except for error messages. About adding the custom tests to dune: I am not familiar with it, and I am not sure if there is a way to add the required parameters automatically like the Makefile does:
Otherwise we need to spell all the tests and enabled sections in the dune file |
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.
@yuri91, please never force-push to a branch under review. That breaks the Github review history and workflow. E.g., reviewers can no longer see what changed since their last comments.
I think we can ignore the dune test question for now. I'll have a look later.
@yuri91, I merged upstream into |
Hm, in fact, I just saw that annotations.wast is already failing on |
@rossberg Yuri is out-of-office for a couple of weeks, I am available to try and get this PR merged |
@rossberg By my analysis the problem appears to be JS codegen issue. In particular code in this pattern is emitted. Please notice the
What is the purpose of the |
Thanks @alexp-sssup, that's indeed the problem. I fixed the test case to avoid duplicate name. I also made that an error in the wast runner, so that it will be rejected in the future. Now I just need to resolve the latest conflicts on this branch. However, GH UI seems to freeze on me every time I try to view test/core/run.py. :( |
@rossberg I suspect the conflict is spurious and due to an unintended indentation change. This diff does not look right. If that is the case reverting the change should remove the last conflict
|
Actually, the indentation change was intended (though not critical). It narrows the life time of the open files. I still can't resolve the conflict through GH UI. Would need to checkout Yuri's repo locally. Do you happen to have a checkout and can fix it? |
PS: I missed this question before:
They just come directly from the wast file, as the declared module names. |
@rossberg The language is alien to me, but I have done my best here: https://github.com/alexp-sssup/annotations/tree/annot_tests_pr_rebased |
* [interpreter] Handle custom sections and annotations Co-authored-by: Yuri Iozzelli <[email protected]> * Fix merge conflict * Fix lexer priorities * Fix wast.ml * Oops * Update wast.ml --------- Co-authored-by: Andreas Rossberg <[email protected]>
This is the work developed in WebAssembly/branch-hinting#19 , but without the branch hinting stuff, and rebased on the current main branch.
I tested the result of the rebase, but there are a couple of things I was unsure about :
unignore
branch that I based my changes on, there were some modifications to the Makefile that seem unrelated (?) , like adding quiettest as a PHONY target and some changes related to the smallint test. I noticed those because during the rebase they conflicted with the dune changes.@rossberg suggestions?