Skip to content

Commit c085c18

Browse files
author
Brian Huffman
committed
Reimplement refreshTerms to register names in the naming environment.
Fixes #869.
1 parent 2e4fc06 commit c085c18

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/SAWScript/Crucible/JVM/Override.hs

+2-2
Original file line numberDiff line numberDiff line change
@@ -381,8 +381,8 @@ refreshTerms sc ss =
381381
OM (termSub %= Map.union extension)
382382
where
383383
freshenTerm (TypedExtCns _cty ec) =
384-
do new <- liftIO $ do i <- scFreshGlobalVar sc
385-
scExtCns sc (EC i (ecName ec) (ecType ec))
384+
do ec' <- liftIO $ scFreshEC sc (toShortName (ecName ec)) (ecType ec)
385+
new <- liftIO $ scExtCns sc ec'
386386
return (ecVarIndex ec, new)
387387

388388
------------------------------------------------------------------------

src/SAWScript/Crucible/LLVM/Override.hs

+2-2
Original file line numberDiff line numberDiff line change
@@ -709,8 +709,8 @@ refreshTerms sc ss =
709709
OM (termSub %= Map.union extension)
710710
where
711711
freshenTerm (TypedExtCns _cty ec) =
712-
do new <- liftIO $ do i <- scFreshGlobalVar sc
713-
scExtCns sc (EC i (ecName ec) (ecType ec))
712+
do ec' <- liftIO $ scFreshEC sc (toShortName (ecName ec)) (ecType ec)
713+
new <- liftIO $ scExtCns sc ec'
714714
return (ecVarIndex ec, new)
715715

716716
------------------------------------------------------------------------

0 commit comments

Comments
 (0)