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

SCM Repository

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

Diff of /branches/vis12/src/compiler/c-target/c-target.sml

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

revision 1869, Fri May 11 13:19:14 2012 UTC revision 1870, Fri May 11 17:44:18 2012 UTC
# Line 110  Line 110 
110                end                end
111  (* NOTE: we may be able to simplify the interface to ToC.trBlock! *)  (* NOTE: we may be able to simplify the interface to ToC.trBlock! *)
112          fun block (ENV{vMap, ...}, blk) = ToC.trBlock (vMap, blk)          fun block (ENV{vMap, ...}, blk) = ToC.trBlock (vMap, blk)
113            fun free (ENV{vMap, ...}, blk) = ToC.trFree (vMap, blk)
114          fun exp (ENV{vMap, ...}, e) = ToC.trExp(vMap, e)          fun exp (ENV{vMap, ...}, e) = ToC.trExp(vMap, e)
115        end        end
116    
# Line 260  Line 261 
261                in                in
262                  topDecls := initFn :: !topDecls                  topDecls := initFn :: !topDecls
263                end                end
264          (* register the global destruction part of a program *)
265            fun free (Prog{tgt, topDecls, ...}, free) = let
266                  val worldTy = CL.T_Ptr(CL.T_Named(N.worldTy tgt))
267                  val globTy = CL.T_Ptr(CL.T_Named(N.globalTy tgt))
268                  val free = CL.mkBlock(
269                        CL.mkDeclInit(globTy, "glob", CL.mkIndirect(CL.mkVar "wrld", "globals")) ::
270                        CL.unBlock free @ [CL.mkReturn(SOME(CL.mkVar "false"))])
271                  val freeFn = CL.D_Func(
272                        ["static"], CL.boolTy, N.freeGlobals,
273                        [CL.PARAM([], worldTy, "wrld")],
274                        free)
275                  in
276                    topDecls := freeFn :: !topDecls
277                  end
278        (* create and register the initially function for a program *)        (* create and register the initially function for a program *)
279          fun initially {          fun initially {
280                prog = Prog{tgt, strands, nAxes, initially, ...},                prog = Prog{tgt, strands, nAxes, initially, ...},

Legend:
Removed from v.1869  
changed lines
  Added in v.1870

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