Added code to pull up any VariableSizes expressions (since they result in an array)

This commit is contained in:
Neil Brown 2009-03-31 09:22:59 +00:00
parent 654dd453f1
commit e1cd694c27

View File

@ -490,7 +490,12 @@ pullUp pullUpArraysInsideRecords = pass "Pull up definitions"
addPulled $ (m, Left spec)
return $ A.Variable m n
_ -> descend v
doVariable v@(A.VariableSizes m _)
= do v' <- descend v
t <- astTypeOf v'
spec@(A.Specification _ n _) <- makeNonceIs "sizes_array" m t A.ValAbbrev v'
addPulled $ (m, Left spec)
return $ A.Variable m n
doVariable v = descend v
-- | Convert a FUNCTION call into some variables and a PROC call.