Fixed some stuff on external PROCs (the adding of sizes parameters)
This commit is contained in:
parent
6e66cf7521
commit
574694d078
|
@ -330,7 +330,13 @@ addSizesFormalParameters :: Pass
|
|||
addSizesFormalParameters = occamOnlyPass "Add array-size arrays to PROC headers"
|
||||
(prereq ++ [Prop.arraySizesDeclared])
|
||||
[]
|
||||
(applyDepthM doSpecification)
|
||||
(\t -> do t' <- applyDepthM doSpecification t
|
||||
cs <- getCompState
|
||||
sequence_ [doSpecification $ A.Specification emptyMeta (A.Name emptyMeta n)
|
||||
(A.Proc emptyMeta (A.PlainSpec, A.PlainRec)
|
||||
fs (A.Skip emptyMeta))
|
||||
| (n, fs) <- csExternals cs]
|
||||
return t')
|
||||
where
|
||||
doSpecification :: A.Specification -> PassM A.Specification
|
||||
doSpecification (A.Specification m n (A.Proc m' sm args body))
|
||||
|
|
|
@ -2041,8 +2041,12 @@ cgenProcCall n as
|
|||
(A.Recursive, _) ->
|
||||
let m = A.nameMeta n
|
||||
in call genPar A.PlainPar $ A.Only m $ A.ProcCall m n as
|
||||
(_, Just fs) ->
|
||||
(_, Just _) ->
|
||||
do tell ["{int args_plus_blank[] = {0"]
|
||||
-- We don't use the formals in externals because they won't
|
||||
-- have had array sizes added:
|
||||
(A.Proc _ _ fs _) <- specTypeOfName n
|
||||
liftIO $ putStrLn $ show (fs, as)
|
||||
call genActuals fs as
|
||||
tell ["};"]
|
||||
let (_:cs) = A.nameName n
|
||||
|
|
Loading…
Reference in New Issue
Block a user