Make functionsToProcs depend on expressionTypesChecked.

I think in general typechecking needs to happen before any other pass runs,
else the user's likely to get rather confusing error messages.
This commit is contained in:
Adam Sampson 2008-03-22 00:04:53 +00:00
parent cfc5b18e3e
commit 9cea36257e

View File

@ -36,7 +36,7 @@ import Utils
simplifyExprs :: [Pass] simplifyExprs :: [Pass]
simplifyExprs = makePassesDep simplifyExprs = makePassesDep
[ ("Convert FUNCTIONs to PROCs", functionsToProcs, Prop.agg_namesDone ++ [Prop.parUsageChecked], [Prop.functionsRemoved]) [ ("Convert FUNCTIONs to PROCs", functionsToProcs, Prop.agg_namesDone ++ [Prop.expressionTypesChecked, Prop.parUsageChecked], [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