Skip to content

Commit

Permalink
Merge branch 'master' into x86-return-trunc
Browse files Browse the repository at this point in the history
  • Loading branch information
chameco authored Oct 5, 2020
2 parents 082d3f2 + 6247f9a commit 974e910
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion deps/cryptol
Submodule cryptol updated 146 files
2 changes: 1 addition & 1 deletion deps/macaw
2 changes: 1 addition & 1 deletion deps/what4
4 changes: 2 additions & 2 deletions src/SAWScript/Crucible/JVM/ResolveSetupValue.hs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ typeOfSetupValue _cc env _nameEnv val =
MS.SetupTerm tt ->
case ttSchema tt of
Cryptol.Forall [] [] ty ->
case toJVMType (Cryptol.evalValType Map.empty ty) of
case toJVMType (Cryptol.evalValType mempty ty) of
Nothing -> fail "typeOfSetupValue: non-representable type"
Just jty -> return jty
s -> fail $ unlines [ "typeOfSetupValue: expected monomorphic term"
Expand Down Expand Up @@ -158,7 +158,7 @@ resolveTypedTerm ::
resolveTypedTerm cc tm =
case ttSchema tm of
Cryptol.Forall [] [] ty ->
resolveSAWTerm cc (Cryptol.evalValType Map.empty ty) (ttTerm tm)
resolveSAWTerm cc (Cryptol.evalValType mempty ty) (ttTerm tm)
_ -> fail "resolveSetupVal: expected monomorphic term"

resolveSAWPred ::
Expand Down
4 changes: 2 additions & 2 deletions src/SAWScript/Crucible/LLVM/Override.hs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ ppLLVMVal ::
ppLLVMVal cc val = do
sym <- Ov.getSymInterface
mem <- readGlobal (Crucible.llvmMemVar (ccLLVMContext cc))
liftIO $ Crucible.ppLLVMValWithGlobals sym (Crucible.memImplGlobalMap mem) val
pure $ Crucible.ppLLVMValWithGlobals sym (Crucible.memImplSymbolMap mem) val

-- | Resolve a 'SetupValue' into a 'LLVMVal' and pretty-print it
ppSetupValueAsLLVMVal ::
Expand Down Expand Up @@ -336,7 +336,7 @@ ppArgs sym cc cs (Crucible.RegMap args) = do
case Crucible.lookupGlobal (Crucible.llvmMemVar (ccLLVMContext cc)) (cc^.ccLLVMGlobals) of
Nothing -> fail "Internal error: Couldn't find LLVM memory variable"
Just mem -> do
traverse (Crucible.ppLLVMValWithGlobals sym (Crucible.memImplGlobalMap mem) . fst) =<<
map (Crucible.ppLLVMValWithGlobals sym (Crucible.memImplSymbolMap mem) . fst) <$>
liftIO (zipWithM aux expectedArgTypes (assignmentToList args))

-- | This function is responsible for implementing the \"override\" behavior
Expand Down
6 changes: 3 additions & 3 deletions src/SAWScript/Crucible/LLVM/ResolveSetupValue.hs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ typeOfSetupValue' cc env nameEnv val =
SetupTerm tt ->
case ttSchema tt of
Cryptol.Forall [] [] ty ->
case toLLVMType dl (Cryptol.evalValType Map.empty ty) of
case toLLVMType dl (Cryptol.evalValType mempty ty) of
Left err -> fail (toLLVMTypeErrToString err)
Right memTy -> return memTy
s -> fail $ unlines [ "typeOfSetupValue: expected monomorphic term"
Expand Down Expand Up @@ -345,7 +345,7 @@ resolveTypedTerm ::
resolveTypedTerm cc tm =
case ttSchema tm of
Cryptol.Forall [] [] ty ->
resolveSAWTerm cc (Cryptol.evalValType Map.empty ty) (ttTerm tm)
resolveSAWTerm cc (Cryptol.evalValType mempty ty) (ttTerm tm)
_ -> fail "resolveSetupVal: expected monomorphic term"

resolveSAWPred ::
Expand Down Expand Up @@ -650,7 +650,7 @@ memArrayToSawCoreTerm crucible_context endianess typed_term = do

case ttSchema typed_term of
Cryptol.Forall [] [] cryptol_type -> do
let evaluated_type = (Cryptol.evalValType Map.empty cryptol_type)
let evaluated_type = Cryptol.evalValType mempty cryptol_type
fresh_array_const <- scFreshGlobal saw_context "arr"
=<< scArrayType saw_context offset_type_term byte_type_term
execStateT
Expand Down

0 comments on commit 974e910

Please sign in to comment.