Added support for mobile types to the genType functions in the C and C++ backends
This commit is contained in:
parent
86054ba754
commit
9f78582391
|
@ -395,6 +395,9 @@ cgenType ops (A.Array _ t)
|
|||
_ -> return ()
|
||||
tell ["*"]
|
||||
cgenType _ (A.Record n) = genName n
|
||||
cgenType ops (A.Mobile t@(A.Array {})) = call genType ops t
|
||||
cgenType ops (A.Mobile t) = call genType ops t >> tell ["*"]
|
||||
|
||||
-- UserProtocol -- not used
|
||||
-- Channels are of type "Channel", but channel-ends are of type "Channel*"
|
||||
cgenType _ (A.Chan A.DirUnknown _ t) = tell ["Channel"]
|
||||
|
|
|
@ -907,6 +907,8 @@ cppgenType ops (A.Chan dir attr t)
|
|||
tell $ intersperse "*" [case d of A.Dimension n -> show n | d <- ds]
|
||||
tell [">/**/"]
|
||||
cppTypeInsideChannel ops t = call genType ops t
|
||||
cppgenType ops (A.Mobile t@(A.Array {})) = call genType ops t
|
||||
cppgenType ops (A.Mobile t) = call genType ops t >> tell ["*"]
|
||||
cppgenType ops t
|
||||
= case call getScalarType ops t of
|
||||
Just s -> tell [s]
|
||||
|
|
Loading…
Reference in New Issue
Block a user