mirror of
https://github.com/github/semantic.git
synced 2025-01-04 13:34:31 +03:00
Update name to be more accurate
This commit is contained in:
parent
5076caa2d5
commit
39b056df47
@ -375,7 +375,7 @@ assign :: ( Member (Deref value) sig
|
|||||||
-> Evaluator term address value m ()
|
-> Evaluator term address value m ()
|
||||||
assign addr value = do
|
assign addr value = do
|
||||||
heap <- getHeap
|
heap <- getHeap
|
||||||
cell <- send (AssignCell value (fromMaybe lowerBound (Heap.getSlot addr heap)) ret)
|
cell <- send (AssignCell value (fromMaybe lowerBound (Heap.getSlotValue addr heap)) ret)
|
||||||
putHeap (Heap.setSlot addr cell heap)
|
putHeap (Heap.setSlot addr cell heap)
|
||||||
|
|
||||||
dealloc :: ( Carrier sig m
|
dealloc :: ( Carrier sig m
|
||||||
|
@ -6,7 +6,7 @@ module Data.Abstract.Heap
|
|||||||
, scopeLookup
|
, scopeLookup
|
||||||
, frameSlots
|
, frameSlots
|
||||||
, frameLinks
|
, frameLinks
|
||||||
, getSlot
|
, getSlotValue
|
||||||
, setSlot
|
, setSlot
|
||||||
, deleteSlot
|
, deleteSlot
|
||||||
, initFrame
|
, initFrame
|
||||||
@ -77,8 +77,8 @@ frameSlots address = fmap slots . frameLookup address
|
|||||||
frameLinks :: Ord address => address -> Heap scope address value -> Maybe (Map EdgeLabel (Map scope address))
|
frameLinks :: Ord address => address -> Heap scope address value -> Maybe (Map EdgeLabel (Map scope address))
|
||||||
frameLinks address = fmap links . frameLookup address
|
frameLinks address = fmap links . frameLookup address
|
||||||
|
|
||||||
getSlot :: Ord address => Slot address -> Heap address address value -> Maybe (Set value)
|
getSlotValue :: Ord address => Slot address -> Heap address address value -> Maybe (Set value)
|
||||||
getSlot Slot{..} = (IntMap.lookup (unPosition position) =<<) . frameSlots frameAddress
|
getSlotValue Slot{..} = (IntMap.lookup (unPosition position) =<<) . frameSlots frameAddress
|
||||||
|
|
||||||
setSlot :: Ord address => Slot address -> Set value -> Heap scope address value -> Heap scope address value
|
setSlot :: Ord address => Slot address -> Set value -> Heap scope address value -> Heap scope address value
|
||||||
setSlot Slot{..} value h@(Heap heap) = case frameLookup frameAddress h of
|
setSlot Slot{..} value h@(Heap heap) = case frameLookup frameAddress h of
|
||||||
|
Loading…
Reference in New Issue
Block a user