-
Notifications
You must be signed in to change notification settings - Fork 745
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
Fix parsing of table imports #6446
Conversation
The types was ignored and `funcref` was always used instead.
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.
FWIW, we will soon be switching to the next wat parser --new-wat-parser
, which should already implement this correctly.
I have added a test in #6437 which would fail without this change... |
src/wasm/wasm-s-parser.cpp
Outdated
if (!table->type.isRef()) { | ||
throw SParseException("Only reference types are valid for tables", s); | ||
} | ||
|
||
wasm.addTable(std::move(table)); | ||
|
||
j++; // funcref |
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.
Should this line not be removed? We increment j
on line 3740 now.
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, indeed!
The types was ignored and
funcref
was always used instead.