diff --git a/backends/GenerateCPPCSP.hs b/backends/GenerateCPPCSP.hs index d3b822c..8b0ba3e 100644 --- a/backends/GenerateCPPCSP.hs +++ b/backends/GenerateCPPCSP.hs @@ -1043,7 +1043,7 @@ cppgenSizeSuffix _ dim = tell [".extent(", dim, ")"] --Changed from GenerateC to change the A.Timer type to use C++CSP time. --Also changed the bool type, because vector in C++ is odd, so we hide it from the compiler. cppgetScalarType :: GenOps -> A.Type -> Maybe String -cppgetScalarType _ A.Bool = Just "tockBool" +cppgetScalarType _ A.Bool = Just "bool" cppgetScalarType _ A.Byte = Just "uint8_t" cppgetScalarType _ A.UInt16 = Just "uint16_t" cppgetScalarType _ A.UInt32 = Just "uint32_t" diff --git a/backends/GenerateCTest.hs b/backends/GenerateCTest.hs index 126517a..92004b8 100644 --- a/backends/GenerateCTest.hs +++ b/backends/GenerateCTest.hs @@ -216,7 +216,7 @@ testGenType = TestList ,testBothSame "GenType 6" "int32_t" (tcall genType A.Int32) ,testBothSame "GenType 7" "int64_t" (tcall genType A.Int64) ,testBothSame "GenType 8" "int" (tcall genType A.Int) - ,testBoth "GenType 9" "bool" "tockBool" (tcall genType A.Bool) + ,testBothSame "GenType 9" "bool" (tcall genType A.Bool) ,testBothSame "GenType 10" "float" (tcall genType A.Real32) ,testBothSame "GenType 11" "double" (tcall genType A.Real64) ,testBoth "GenType 100" "int*" "tockArrayView" (tcall genType $ A.Array [A.Dimension 5] A.Int) diff --git a/tock_support_cppcsp.h b/tock_support_cppcsp.h index dbab9ee..1a1964b 100644 --- a/tock_support_cppcsp.h +++ b/tock_support_cppcsp.h @@ -124,21 +124,6 @@ tie10(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8, (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10); } -//Let's assume bool is an unsigned byte: -#define occam_mostneg_tockBool 0 -#define occam_mostpos_tockBool 255 - -class tockBool -{ -private: - bool b; -public: - inline tockBool() {} - inline tockBool(bool _b) : b(_b) {} - inline operator bool () const {return b;} - inline void operator = (const bool& _b) {b = _b;} -}; - inline std::pair< boost::array , unsigned > tockDims(const unsigned d0) { boost::array r;