summaryrefslogtreecommitdiff
path: root/SC
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2021-10-09 10:19:46 +0200
committerTom Smeding <tom@tomsmeding.com>2021-10-09 10:19:46 +0200
commit961b6fc01f9c2f0220070849d22b2a30ca031324 (patch)
tree4aad269afbe41c28684f2c028fb59d64a5935760 /SC
parentab75ec49d7248d5c908090f9ed7b234a0ff333d9 (diff)
Static C functions; clean up
Diffstat (limited to 'SC')
-rw-r--r--SC/Afun.hs3
-rw-r--r--SC/Exp.hs2
2 files changed, 3 insertions, 2 deletions
diff --git a/SC/Afun.hs b/SC/Afun.hs
index 3379cc6..2f1346f 100644
--- a/SC/Afun.hs
+++ b/SC/Afun.hs
@@ -87,7 +87,8 @@ compileAfun1 procname (A.Alam lhs (A.Abody acc)) = do
outnames <- genAVarsTup (A.arraysR acc)
(auxdefs, stmts) <- compileCommands <$> compileAcc' aenv destnames acc
return (auxdefs
- ,C.ProcDef procname
+ ,C.ProcDef C.defAttrs
+ procname
(map (\case Left (TypedName t n) -> (t, n)
Right (TypedAName t n) -> (t, n))
(tupanamesList' argnames)
diff --git a/SC/Exp.hs b/SC/Exp.hs
index 5c0bc72..ef18a7f 100644
--- a/SC/Exp.hs
+++ b/SC/Exp.hs
@@ -54,7 +54,7 @@ compileFun aenv (A.Lam lhs (A.Body body)) = do
++ map (\(TypedName t n) -> (t, n)) (itupList argnames)
++ map (\(TypedName t n) -> (t, n)) (itupList outnames)
return $ CompiledFun
- (C.ProcDef funname arguments (sts1 ++ sts2))
+ (C.ProcDef C.defAttrs { C.faStatic = True }funname arguments (sts1 ++ sts2))
(\argexprs destnames ->
map (C.EVar . snd) arrayarguments
++ itupList argexprs