SCM Repository
[diderot] Diff of /branches/pure-cfg/src/compiler/c-target/c-target.sml
Diff of /branches/pure-cfg/src/compiler/c-target/c-target.sml
Parent Directory
|
Revision Log
|
Patch
99 |
strands = ref [] |
strands = ref [] |
100 |
}) |
}) |
101 |
|
|
102 |
|
(* register the global initialization part of a program *) |
103 |
fun globalInit (Prog{topDecls, ...}, init) = let |
fun globalInit (Prog{topDecls, ...}, init) = let |
104 |
val initFn = CL.D_Func([], CL.voidTy, RN.initGlobals, [], init) |
val initFn = CL.D_Func([], CL.voidTy, RN.initGlobals, [], init) |
105 |
in |
in |
106 |
topDecls := initFn :: !topDecls |
topDecls := initFn :: !topDecls |
107 |
end |
end |
108 |
|
|
109 |
|
(* register the initially code for a program *) |
110 |
|
fun initially (Prog{topDecls, ...}, init) = let |
111 |
|
(* FIXME: what is the correct return type for this function? *) |
112 |
|
val initFn = CL.D_Func([], CL.voidTy, RN.initially, [], init) |
113 |
|
in |
114 |
|
topDecls := initFn :: !topDecls |
115 |
|
end |
116 |
|
|
117 |
structure Var = |
structure Var = |
118 |
struct |
struct |
|
Legend:
Removed from v.617 |
|
changed lines |
|
Added in v.618 |
|
|