Added a new property (functionTypesChecked) to help fix the pass ordering

This commit is contained in:
Neil Brown 2008-03-23 00:09:01 +00:00
parent 4e9a00a5b7
commit dd7b0268b2
3 changed files with 9 additions and 2 deletions

View File

@ -57,7 +57,8 @@ rainPasses = makePassesDep' ((== FrontendRain) . csFrontend)
,("Check types in if/while conditions",checkConditionalTypes, typesDone ++ [Prop.expressionTypesChecked], [Prop.processTypesChecked]) ,("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 input/output",checkCommTypes, typesDone ++ [Prop.expressionTypesChecked], [Prop.processTypesChecked])
,("Check types in now statements",checkGetTimeTypes, typesDone, [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]) ,("Find and tag the main function", findMain, namesDone, [Prop.mainTagged])
,("Convert seqeach/pareach loops over ranges into simple replicated SEQ/PAR", ,("Convert seqeach/pareach loops over ranges into simple replicated SEQ/PAR",

View File

@ -39,6 +39,7 @@ module Properties
, freeNamesToArgs , freeNamesToArgs
, functionCallsRemoved , functionCallsRemoved
, functionsRemoved , functionsRemoved
, functionTypesChecked
, inferredTypesRecorded , inferredTypesRecorded
, inputCaseRemoved , inputCaseRemoved
, intLiteralsInBounds , intLiteralsInBounds
@ -94,6 +95,7 @@ agg_typesDone =
[ constantsChecked [ constantsChecked
, constantsFolded , constantsFolded
, expressionTypesChecked , expressionTypesChecked
, functionTypesChecked
, inferredTypesRecorded , inferredTypesRecorded
, processTypesChecked , processTypesChecked
, retypesChecked , retypesChecked
@ -209,6 +211,9 @@ expressionTypesChecked = Property "expressionTypesChecked" nocheck
processTypesChecked :: Property processTypesChecked :: Property
processTypesChecked = Property "processTypesChecked" nocheck processTypesChecked = Property "processTypesChecked" nocheck
functionTypesChecked :: Property
functionTypesChecked = Property "functionTypesChecked" nocheck
eachRangeTransformed :: Property eachRangeTransformed :: Property
eachRangeTransformed = Property "eachRangeTransformed" checkTODO eachRangeTransformed = Property "eachRangeTransformed" checkTODO

View File

@ -36,7 +36,8 @@ import Utils
simplifyExprs :: [Pass] simplifyExprs :: [Pass]
simplifyExprs = makePassesDep 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]) , ("Convert AFTER to MINUS", removeAfter, [Prop.expressionTypesChecked], [Prop.afterRemoved])
, ("Expand array literals", expandArrayLiterals, [Prop.expressionTypesChecked, Prop.processTypesChecked], [Prop.arrayLiteralsExpanded]) , ("Expand array literals", expandArrayLiterals, [Prop.expressionTypesChecked, Prop.processTypesChecked], [Prop.arrayLiteralsExpanded])
, ("Transform array constructors into initialisation code", transformConstr, Prop.agg_namesDone ++ Prop.agg_typesDone , ("Transform array constructors into initialisation code", transformConstr, Prop.agg_namesDone ++ Prop.agg_typesDone