Skip to content

Commit

Permalink
Add a correct cost center name, and correct the comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
Yogesh Sajanikar committed Aug 2, 2022
1 parent 728ca99 commit 9d2e67f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions io-sim/src/Control/Monad/IOSim/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ execAtomically !time !tid !tlbl !nextVid0 action0 k0 =
tvarId tvar `Map.notMember` writtenOuter)
writtenSeq
++ writtenOuterSeq
-- Skip the orElse right hand and continue with the k continuation
-- Skip the right hand and continue with the k continuation
go ctl' read written' writtenSeq' createdOuterSeq nextVid (k x)

ThrowStm e ->
Expand All @@ -904,16 +904,16 @@ execAtomically !time !tid !tlbl !nextVid0 action0 k0 =
k0 $ StmTxAborted [] (toException e)

BranchFrame (CatchStmA h) k writtenOuter writtenOuterSeq createdOuterSeq ctl' ->
{-# SCC "execAtomically.go.branchFrame" #-} do
-- Revert all the TVar writes within this orElse
{-# SCC "execAtomically.go.BranchFrame" #-} do
-- Revert all the TVar writes within this catch
!_ <- traverse_ (\(SomeTVar tvar) -> revertTVar tvar) written
-- Execute the catch handler with an empty written set
let ctl'' = BranchFrame EmptyStmA k writtenOuter writtenOuterSeq createdOuterSeq ctl'
go ctl'' read Map.empty [] [] nextVid (h e)
--
BranchFrame _ _k writtenOuter writtenOuterSeq createdOuterSeq ctl' ->
{-# SCC "execAtomically.go.branchFrame" #-} do
-- Revert all the TVar writes within this orElse
{-# SCC "execAtomically.go.BranchFrame" #-} do
-- Revert all the TVar writes within this branch
!_ <- traverse_ (\(SomeTVar tvar) -> revertTVar tvar) written
go ctl' read writtenOuter writtenOuterSeq createdOuterSeq nextVid (ThrowStm e)

Expand Down Expand Up @@ -943,7 +943,7 @@ execAtomically !time !tid !tlbl !nextVid0 action0 k0 =

BranchFrame _ _k writtenOuter writtenOuterSeq createdOuterSeq ctl' ->
{-# SCC "execAtomically.go.BranchFrame" #-} do
-- Revert all the TVar writes within this orElse branch
-- Revert all the TVar writes within this branch
!_ <- traverse_ (\(SomeTVar tvar) -> revertTVar tvar) written
-- Skip the continuation and propagate the retry into the outer frame
-- using the written set for the outer frame
Expand Down
12 changes: 6 additions & 6 deletions io-sim/src/Control/Monad/IOSimPOR/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1103,7 +1103,7 @@ execAtomically time tid tlbl nextVid0 action0 k0 =
tvarId tvar `Map.notMember` writtenOuter)
writtenSeq
++ writtenOuterSeq
-- Skip the orElse right hand and continue with the k continuation
-- Skip the right hand and continue with the k continuation
go ctl' read written' writtenSeq' createdOuterSeq nextVid (k x)

ThrowStm e ->
Expand All @@ -1115,16 +1115,16 @@ execAtomically time tid tlbl nextVid0 action0 k0 =
k0 $ StmTxAborted [] (toException e)

BranchFrame (CatchStmA h) k writtenOuter writtenOuterSeq createdOuterSeq ctl' ->
{-# SCC "execAtomically.go.branchFrame" #-} do
-- Revert all the TVar writes within this orElse
{-# SCC "execAtomically.go.BranchFrame" #-} do
-- Revert all the TVar writes within this catch
!_ <- traverse_ (\(SomeTVar tvar) -> revertTVar tvar) written
-- Execute the catch handler with an empty written set
let ctl'' = BranchFrame EmptyStmA k writtenOuter writtenOuterSeq createdOuterSeq ctl'
go ctl'' read Map.empty [] [] nextVid (h e)
--
BranchFrame _ _k writtenOuter writtenOuterSeq createdOuterSeq ctl' ->
{-# SCC "execAtomically.go.branchFrame" #-} do
-- Revert all the TVar writes within this orElse
{-# SCC "execAtomically.go.BranchFrame" #-} do
-- Revert all the TVar writes within this branch
!_ <- traverse_ (\(SomeTVar tvar) -> revertTVar tvar) written
go ctl' read writtenOuter writtenOuterSeq createdOuterSeq nextVid (ThrowStm e)

Expand Down Expand Up @@ -1153,7 +1153,7 @@ execAtomically time tid tlbl nextVid0 action0 k0 =

BranchFrame _ _k writtenOuter writtenOuterSeq createdOuterSeq ctl' ->
{-# SCC "execAtomically.go.BranchFrame" #-} do
-- Revert all the TVar writes within this orElse branch
-- Revert all the TVar writes within this branch
!_ <- traverse_ (\(SomeTVar tvar) -> revertTVar tvar) written
-- Skip the continuation and propagate the retry into the outer frame
-- using the written set for the outer frame
Expand Down

0 comments on commit 9d2e67f

Please sign in to comment.