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

cranelift: Restrict br_table to i32 indices #4510

Merged
merged 2 commits into from
Jul 22, 2022

Conversation

afonso360
Copy link
Contributor

👋 Hey,

In #4498 it was proposed that we should only accept i32 indices to br_table. The rationale for this is that larger types lead the users to a false sense of flexibility (since we don't support jump tables larger than u32's), and narrower types are not well tested paths that would be safer if we removed them.

Fixes #4498
CC: @jameysharp @bjorn3 @cfallin

@github-actions github-actions bot added cranelift Issues related to the Cranelift code generator cranelift:area:x64 Issues related to x64 codegen cranelift:meta Everything related to the meta-language. labels Jul 22, 2022
Copy link
Contributor

@jameysharp jameysharp left a comment

Choose a reason for hiding this comment

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

This looks great, and a net reduction of about 100 lines is always nice to see too.

Since I merged #4507, some of the changes to tests conflict with changes on main. Could you rebase this?

Copy link
Member

@cfallin cfallin left a comment

Choose a reason for hiding this comment

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

Looks good to me too, thanks!

In bytecodealliance#4498 it was proposed that we should only accept `i32` indices
to `br_table`. The rationale for this is that larger types lead the
users to a false sense of flexibility (since we don't support jump
tables larger than u32's), and narrower types are not well tested
paths that would be safer if we removed them.
@jameysharp jameysharp enabled auto-merge (squash) July 22, 2022 23:08
@jameysharp jameysharp merged commit af62037 into bytecodealliance:main Jul 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cranelift:area:x64 Issues related to x64 codegen cranelift:meta Everything related to the meta-language. cranelift Issues related to the Cranelift code generator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cranelift: br_table.i128 not implemented on x86
4 participants