-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cranelift: Choose memory trap code based on memflags (#8134)
Ideally we'd allow the frontend to specify what trap code a memory access instruction can produce, but we don't have room to store that information. We do have a few bits to spare in `MemFlags`, though, so add a new `tabletrap` bit to indicate that the trap code should be TableOutOfBounds instead of the default HeapOutOfBounds. Nothing yet sets the `tabletrap` flag, so the TableOutOfBounds case is never hit, but I wanted to separate this change out from the cranelift-wasm changes which will use it. The original version of this patch reused the `table` flag instead of introducing a new `tabletrap` flag. But this usage changes the semantics of an instruction, while the `table` flag is meant to be a hint for alias analysis in the egraph optimization pass.
- Loading branch information
1 parent
ac725f0
commit 779645f
Showing
12 changed files
with
157 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.