Quickly added poison to the C++ backend
This commit is contained in:
parent
192ccd4e2c
commit
4e582d8c3a
|
@ -1500,6 +1500,7 @@ cgenProcess p = case p of
|
|||
-- PROCESSOR does nothing special.
|
||||
A.Processor m e p -> call genProcess p
|
||||
A.Alt m b s -> call genAlt b s
|
||||
A.InjectPoison m ch -> call genPoison m ch
|
||||
A.ProcCall m n as -> call genProcCall n as
|
||||
A.IntrinsicProcCall m s as -> call genIntrinsicProc m s as
|
||||
|
||||
|
|
|
@ -152,6 +152,7 @@ data GenOps = GenOps {
|
|||
-- | Generates a loop that maps over every element in a (potentially multi-dimensional) array
|
||||
genOverArray :: Meta -> A.Variable -> (SubscripterFunction -> Maybe (CGen ())) -> CGen (),
|
||||
genPar :: A.ParMode -> A.Structured A.Process -> CGen (),
|
||||
genPoison :: Meta -> A.Variable -> CGen (),
|
||||
genProcCall :: A.Name -> [A.Actual] -> CGen (),
|
||||
genProcess :: A.Process -> CGen (),
|
||||
genRecordTypeSpec :: A.Name -> Bool -> [(A.Name, A.Type)] -> CGen (),
|
||||
|
|
|
@ -74,6 +74,7 @@ cppgenOps = cgenOps {
|
|||
genOutputCase = cppgenOutputCase,
|
||||
genOutputItem = cppgenOutputItem,
|
||||
genPar = cppgenPar,
|
||||
genPoison = cppgenPoison,
|
||||
genProcCall = cppgenProcCall,
|
||||
genReplicatorLoop = cppgenReplicatorLoop,
|
||||
genStop = cppgenStop,
|
||||
|
@ -201,6 +202,11 @@ genCPPCSPChannelOutput var
|
|||
(A.Chan A.DirUnknown _ _) -> do call genVariable var
|
||||
tell ["->writer()"]
|
||||
_ -> call genMissing $ "genCPPCSPChannelOutput used on something which does not support output: " ++ show var
|
||||
|
||||
cppgenPoison :: Meta -> A.Variable -> CGen ()
|
||||
cppgenPoison _m var
|
||||
= do call genVariable var
|
||||
tell ["->poison();"]
|
||||
--}}}
|
||||
|
||||
-- | C++CSP2 returns the number of seconds since the epoch as the time
|
||||
|
|
Loading…
Reference in New Issue
Block a user