-
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.
crux-mir-comp: Support nightly-2023-01-23
This patch bumps the `crucible` submodule to bring in the changes from GaloisInc/crucible#1096 and updates the code in `crucible-mir-comp` and `crux-mir-comp` accordingly. Some highlights: * All of the `crux-mir-comp` test cases now use `crux::test` instead of `crux_test`. * All of the `crux-mir-comp` test cases now scrub out the values of crate hash disambiguators to make their output more stable. * The overrides in `crux-mir-comp` no longer depend on the specific disambiguator values being used, which makes them work with the sometimes unpredictable hash values used for crate disambiguators. * I have added a `tyToShape` case for `TyStr` to handle new kinds of static values that arise in the new Rust nightly (mostly coming from constant values in the `fmt` crate). The code for this case is nearly identical to that in the `TySlice` case. * There are now static values of type `TyFnPtr` in the new Rust nightly (mostly coming from constant values in the `fmt` crate), so in order to handle them in `clobberGlobals`, I needed to add a `FnPtrShape` data constructor to `TypeShape`. This is mostly a quick hack, since I implemented all other functionality for `FnPtrShape` with calls to `error`. Nevertheless, that is enough to make all of the tests pass. We can always fill out the calls to `error` later if need be.
- Loading branch information
1 parent
4a695fb
commit 3acded0
Showing
77 changed files
with
284 additions
and
181 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{-# LANGUAGE OverloadedStrings #-} | ||
module Mir.Compositional.DefId | ||
( hasInstPrefix | ||
) where | ||
|
||
import Data.List.Extra (unsnoc) | ||
import qualified Data.Text as Text | ||
import Data.Text (Text) | ||
|
||
import Mir.DefId | ||
|
||
-- | Check if @edid@ has the same path as @pfxInit@, plus a final path | ||
-- component that begins with the name @_inst@. | ||
hasInstPrefix :: [Text] -> ExplodedDefId -> Bool | ||
hasInstPrefix pfxInit edid = | ||
case unsnoc edid of | ||
Nothing -> False | ||
Just (edidInit, edidLast) -> | ||
pfxInit == edidInit && | ||
"_inst" `Text.isPrefixOf` edidLast |
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.