-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: Make MirPointsTo accept a SetupValue, not an AllocIndex
In an upcoming commit, we will want to be able to write things such as `mir_points_to (mir_global "X") ...`. This isn't currently possible with the way `MirPointsTo` is currently designed, as it expects the left-hand side of a `mir_points_to` statement to always be an `AllocIndex`, i.e., something created via `mir_alloc`/`mir_alloc_mut`. This patch generalizes the `AllocIndex` field in `MirPointsTo` to a `SetupValue` to allow other forms of references to be used in `mir_points_to` statements. In most places, this is a simple matter of wrapping the `AllocIndex` in a `SetupVar`. It was slightly tricky to update the code in `crucible-mir-comp` to accommodate this, as that code relies on a subtle assumption about the left-hand sides of `MirPointsTo` values only originating from `SetupVar`s. I have documented this assumption in the new `setupVarAllocIndex` function.
- Loading branch information
1 parent
23616d5
commit 41c0ca4
Showing
7 changed files
with
114 additions
and
44 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
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