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

Support more reference constants in wast scripts #6865

Merged
merged 1 commit into from
Aug 26, 2024
Merged

Conversation

tlively
Copy link
Member

@tlively tlively commented Aug 22, 2024

Spec tests use constants like ref.array and ref.eq to assert that
exported function return references of the correct types. Support more
such constants in the wast parser.

Also fix a bug where the interpretation of array.new_data for arrays
of packed fields was not properly truncating the packed data. Move the
function for reading fields from memory from literal.cpp to
wasm-interpreter.h, where the function for truncating packed data lives.

Other bugs prevent us from enabling any more spec tests as a result of
this change, but we can get farther through several of them before
failing. Update the comments about the failures accordingly.

Spec tests use constants like `ref.array` and `ref.eq` to assert that
exported function return references of the correct types. Support more
such constants in the wast parser.

Also fix a bug where the interpretation of `array.new_data` for arrays
of packed fields was not properly truncating the packed data. Move the
function for reading fields from memory from literal.cpp to
wasm-interpreter.h, where the function for truncating packed data lives.

Other bugs prevent us from enabling any more spec tests as a result of
this change, but we can get farther through several of them before
failing. Update the comments about the failures accordingly.
@tlively tlively requested a review from kripken August 22, 2024 00:14
@tlively tlively merged commit dacc6e5 into main Aug 26, 2024
13 checks passed
@tlively tlively deleted the wast-ref-consts branch August 26, 2024 17:15
@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