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 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",

View File

@ -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

View File

@ -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