Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/pure-cfg/src/compiler/c-target/c-target.sml
ViewVC logotype

Diff of /branches/pure-cfg/src/compiler/c-target/c-target.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1209, Thu May 12 21:51:37 2011 UTC revision 1215, Sat May 14 05:54:07 2011 UTC
# Line 152  Line 152 
152                  })                  })
153        (* register the global initialization part of a program *)        (* register the global initialization part of a program *)
154          fun init (Prog{topDecls, ...}, init) = let          fun init (Prog{topDecls, ...}, init) = let
155                val initFn = CL.D_Func([], CL.voidTy, RN.initGlobals, [], init)                val initFn = CL.D_Func(
156                        [], CL.voidTy, RN.initGlobals, [
157                            CL.PARAM([], CL.intTy, "argc"),
158                            CL.PARAM(["const"], CL.T_Ptr(CL.charPtr), "argv")
159                          ],
160                        init)
161                  val shutdownFn = CL.D_Func(
162                        [], CL.voidTy, RN.shutdown,
163                        [CL.PARAM([], CL.T_Ptr(CL.T_Named RN.worldTy), "wrld")],
164                        CL.S_Block[])
165                in                in
166                  topDecls := initFn :: !topDecls                  topDecls := shutdownFn :: initFn :: !topDecls
167                end                end
168        (* create and register the initially function for a program *)        (* create and register the initially function for a program *)
169          fun initially {          fun initially {

Legend:
Removed from v.1209  
changed lines
  Added in v.1215

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0