Skip to content
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

Fuzzer: Match the logging of i31ref between JS and C++ #6335

Merged
merged 4 commits into from
Feb 22, 2024

Conversation

kripken
Copy link
Member

@kripken kripken commented Feb 22, 2024

JS engines print i31ref as just a number, so we need a small regex to
standardize the representation (similar to what we do for funcrefs on
the code above).

On the C++ side, make it actually print the i31ref rather than treat it
like a generic reference (for whom we only print "object"). To do that
we must unwrap an externalized i31 as necessary, and add a case for
i31 in the printing logic.

Also move that printing logic to its own function, as it was starting to
get quite long.

Copy link
Member

@tlively tlively left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kripken kripken merged commit 4969f93 into WebAssembly:main Feb 22, 2024
14 checks passed
@kripken kripken deleted the fuzz.i31.print branch February 22, 2024 18:18
radekdoulik pushed a commit to dotnet/binaryen that referenced this pull request Jul 12, 2024
)

JS engines print i31ref as just a number, so we need a small regex to
standardize the representation (similar to what we do for funcrefs on
the code above).

On the C++ side, make it actually print the i31ref rather than treat it
like a generic reference (for whom we only print "object"). To do that
we must unwrap an externalized i31 as necessary, and add a case for
i31 in the printing logic.

Also move that printing logic to its own function, as it was starting to
get quite long.
@gkdn gkdn mentioned this pull request Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants