diff --git a/frontends/RainPasses.hs b/frontends/RainPasses.hs index 9ee6732..c65cef5 100644 --- a/frontends/RainPasses.hs +++ b/frontends/RainPasses.hs @@ -57,7 +57,8 @@ rainPasses = makePassesDep' ((== FrontendRain) . csFrontend) ,("Check types in if/while conditions",checkConditionalTypes, typesDone ++ [Prop.expressionTypesChecked], [Prop.processTypesChecked]) ,("Check types in input/output",checkCommTypes, typesDone ++ [Prop.expressionTypesChecked], [Prop.processTypesChecked]) ,("Check types in now statements",checkGetTimeTypes, typesDone, [Prop.processTypesChecked]) - ,("Check parameters in process calls", matchParamPass, typesDone, [Prop.processTypesChecked]) + ,("Check parameters in process calls", matchParamPass, typesDone, [Prop.processTypesChecked, + Prop.functionTypesChecked]) ,("Find and tag the main function", findMain, namesDone, [Prop.mainTagged]) ,("Convert seqeach/pareach loops over ranges into simple replicated SEQ/PAR", diff --git a/pass/Properties.hs b/pass/Properties.hs index 9eed3cf..bffad72 100644 --- a/pass/Properties.hs +++ b/pass/Properties.hs @@ -39,6 +39,7 @@ module Properties , freeNamesToArgs , functionCallsRemoved , functionsRemoved + , functionTypesChecked , inferredTypesRecorded , inputCaseRemoved , intLiteralsInBounds @@ -94,6 +95,7 @@ agg_typesDone = [ constantsChecked , constantsFolded , expressionTypesChecked + , functionTypesChecked , inferredTypesRecorded , processTypesChecked , retypesChecked @@ -209,6 +211,9 @@ expressionTypesChecked = Property "expressionTypesChecked" nocheck processTypesChecked :: Property processTypesChecked = Property "processTypesChecked" nocheck +functionTypesChecked :: Property +functionTypesChecked = Property "functionTypesChecked" nocheck + eachRangeTransformed :: Property eachRangeTransformed = Property "eachRangeTransformed" checkTODO diff --git a/transformations/SimplifyExprs.hs b/transformations/SimplifyExprs.hs index 64131e0..08ca703 100644 --- a/transformations/SimplifyExprs.hs +++ b/transformations/SimplifyExprs.hs @@ -36,7 +36,8 @@ import Utils simplifyExprs :: [Pass] simplifyExprs = makePassesDep - [ ("Convert FUNCTIONs to PROCs", functionsToProcs, Prop.agg_namesDone ++ [Prop.expressionTypesChecked, Prop.parUsageChecked], [Prop.functionsRemoved]) + [ ("Convert FUNCTIONs to PROCs", functionsToProcs, Prop.agg_namesDone ++ [Prop.expressionTypesChecked, Prop.parUsageChecked, + Prop.functionTypesChecked], [Prop.functionsRemoved]) , ("Convert AFTER to MINUS", removeAfter, [Prop.expressionTypesChecked], [Prop.afterRemoved]) , ("Expand array literals", expandArrayLiterals, [Prop.expressionTypesChecked, Prop.processTypesChecked], [Prop.arrayLiteralsExpanded]) , ("Transform array constructors into initialisation code", transformConstr, Prop.agg_namesDone ++ Prop.agg_typesDone