Removed the generate of tuples for sequential protocols in C++, since we're now using a byte-array approach

This commit is contained in:
Neil Brown 2007-10-06 16:22:51 +00:00
parent 062851dabf
commit 03a4b8e41b
2 changed files with 1 additions and 3 deletions

View File

@ -943,9 +943,6 @@ cppintroduceSpec ops (A.Specification _ n (A.RecordType _ b fs))
when b $ tell [" occam_struct_packed "]
genName n
tell [";"]
--We do sequential protocols by introducing a new tuple:
cppintroduceSpec ops (A.Specification _ n (A.Protocol _ typeList))
= do createChainedType "boost::tuple" (genProtocolName n) $ map (call genType ops) typeList
--We do variant protocols by introducing a new variant:
cppintroduceSpec _ (A.Specification _ n (A.ProtocolCase _ []))
= do tell ["typedef class {} "]

View File

@ -469,6 +469,7 @@ testSpec = TestList
,testAllSame 100 ("","") $ A.DataType undefined undefined
,testBothFail "testAllSame 200" (tcall introduceSpec $ A.Specification emptyMeta foo $ A.RetypesExpr emptyMeta A.Original A.Int (A.True emptyMeta))
,testBothFail "testAllSame 300" (tcall introduceSpec $ A.Specification emptyMeta foo $ A.Place emptyMeta (A.True emptyMeta))
,testAllSame 350 ("","") $ A.Protocol emptyMeta undefined
--Record types:
,testAllSame 400 ("typedef struct{#ATION_True}foo;","") $ A.RecordType emptyMeta False [(bar,A.Int)]