From cd1b409f96d233f8a8b6bcdd9461cccd2fe2e80c Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Fri, 27 Feb 2009 10:49:45 +0000 Subject: [PATCH] Removed cppremoveSpec, since it was doing the same as cremoveSpec --- backends/GenerateCPPCSP.hs | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/backends/GenerateCPPCSP.hs b/backends/GenerateCPPCSP.hs index 42937dc..27ee4e9 100644 --- a/backends/GenerateCPPCSP.hs +++ b/backends/GenerateCPPCSP.hs @@ -39,7 +39,7 @@ import System.IO import qualified AST as A import CompState -import GenerateC (cgenOps, cgenReplicatorLoop, cgenType, cintroduceSpec, cremoveSpec, +import GenerateC (cgenOps, cgenReplicatorLoop, cgenType, cintroduceSpec, generate, genComma, genLeftB, genMeta, genName, genRightB, justOnly, seqComma, withIf) import GenerateCBased import Errors @@ -88,8 +88,7 @@ cppgenOps = cgenOps { genUnfoldedExpression = cppgenUnfoldedExpression, genUnfoldedVariable = cppgenUnfoldedVariable, getScalarType = cppgetScalarType, - introduceSpec = cppintroduceSpec, - removeSpec = cppremoveSpec + introduceSpec = cppintroduceSpec } --}}} @@ -513,18 +512,6 @@ cppdeclareInit _ _ _ = Nothing cppdeclareFree :: Meta -> A.Type -> A.Variable -> Maybe (CGen ()) cppdeclareFree _ _ _ = Nothing --- | Changed to work properly with declareFree to free channel arrays. -cppremoveSpec :: A.Specification -> CGen () -cppremoveSpec (A.Specification m n (A.Declaration _ t)) - = do fdeclareFree <- fget declareFree - case fdeclareFree m t var of - Just p -> p - Nothing -> return () - where - var = A.Variable m n --- Otherwise, defer to the C implementation: -cppremoveSpec sp = cremoveSpec sp - --Changed from GenerateC to add a name function (to allow us to use the same function for doing function parameters as constructor parameters) --and also changed to use infixComma. --Therefore these functions are not part of GenOps. They are called directly by cppgenForwardDeclaration and cppintroduceSpec.