-
Notifications
You must be signed in to change notification settings - Fork 758
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
Use new wast parser in wasm2js #6606
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
@@ -18,6 +18,10 @@ function asmFunc(imports) { | |||
|
|||
} | |||
|
|||
function $0() { | |||
|
|||
} |
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.
What is the reason for these changes?
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.
I have no idea, and not for lack of trying to figure it out :/
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.
Perhaps wasm-reduce
can help here? It could compare the old and new outputs and find the smallest possible input that causes a difference.
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.
Oh, I thought this was an extra empty function that was being inserted at the beginning, but it's just the names that are being changed. The addition of function $0
in this diff is balanced by the removal of old function $4
. The difference in function names is just a difference between the old and new text parsers when parsing unnamed functions.
When generating assertions, traverse the `WASTScript` data structure rather than interleaving assertion parsing with emitting.
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.
I see, thanks.
The small changes do make reviewing a little hard but I didn't see anything obviously worrying, and we do execute those outputs in check.py
, so should be ok. We also have the emscripten wasm2js tests on the bots that will give additional coverage.
When generating assertions, traverse the
WASTScript
data structure rather thaninterleaving assertion parsing with emitting.