From 03a4b8e41b2b1b4d5f634b178c22a29d8c032746 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Sat, 6 Oct 2007 16:22:51 +0000 Subject: [PATCH] Removed the generate of tuples for sequential protocols in C++, since we're now using a byte-array approach --- backends/GenerateCPPCSP.hs | 3 --- backends/GenerateCTest.hs | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/backends/GenerateCPPCSP.hs b/backends/GenerateCPPCSP.hs index b7e1a39..19a6c25 100644 --- a/backends/GenerateCPPCSP.hs +++ b/backends/GenerateCPPCSP.hs @@ -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 {} "] diff --git a/backends/GenerateCTest.hs b/backends/GenerateCTest.hs index 7ca6ec3..8f94124 100644 --- a/backends/GenerateCTest.hs +++ b/backends/GenerateCTest.hs @@ -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)]