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

LibWasm: Parse i33's #24462

Open
dzfrias opened this issue May 27, 2024 · 1 comment
Open

LibWasm: Parse i33's #24462

dzfrias opened this issue May 27, 2024 · 1 comment

Comments

@dzfrias
Copy link
Contributor

dzfrias commented May 27, 2024

Unfortunately, signed 33-bit integers are part of the WebAssembly spec, and are needed when parsing blocktypes. Currently, we don't have anything to handle this case.

Should we make a special i33 type (to integrate with Stream::read_value? Or is it okay just to make a special one-off function that'll parse an i33 from the stream? We don't technically need a new datatype, since we can represent it as an i64 that's been parsed in a weird way. We can't really fit it in the LEB128 type, sadly.

@dzfrias
Copy link
Contributor Author

dzfrias commented May 29, 2024

Even though we have #24464, I think we should keep this issue open until full spec compliance is reached (see the PR for more details).

alimpfard pushed a commit that referenced this issue May 29, 2024
This works for now, but is technically still not spec compliant. Right
now, we're (potentially) missing one bit when reading function indices.
See the relevant issue: #24462.
@dzfrias dzfrias changed the title LibWeb: Parse i33's LibWasm: Parse i33's May 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

No branches or pull requests

1 participant