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 1278, Mon Jun 6 16:27:28 2011 UTC revision 1279, Mon Jun 6 17:09:33 2011 UTC
# Line 311  Line 311 
311                    SOME(CL.I_Array(genInits (0, strands)))))                    SOME(CL.I_Array(genInits (0, strands)))))
312                end                end
313    
314          fun genSrc (baseName, Prog{globals, topDecls, strands, initially, ...}) = let          fun genSrc (baseName, prog) = let
315                  val Prog{name, globals, topDecls, strands, initially, ...} = prog
316                val fileName = OS.Path.joinBaseExt{base=baseName, ext=SOME "c"}                val fileName = OS.Path.joinBaseExt{base=baseName, ext=SOME "c"}
317                val outS = TextIO.openOut fileName                val outS = TextIO.openOut fileName
318                val ppStrm = PrintAsC.new outS                val ppStrm = PrintAsC.new outS
319                fun ppDecl dcl = PrintAsC.output(ppStrm, dcl)                fun ppDecl dcl = PrintAsC.output(ppStrm, dcl)
320                val strands = AtomTable.listItems strands                val strands = AtomTable.listItems strands
321                in                in
322                    ppDecl (
323                      CL.D_Var(["static"], CL.charPtr, "ProgramName",
324                      SOME(CL.I_Exp(CL.mkStr name))));
325                  List.app ppDecl (List.rev (!globals));                  List.app ppDecl (List.rev (!globals));
326                  List.app ppDecl (List.rev (!topDecls));                  List.app ppDecl (List.rev (!topDecls));
327                  List.app (fn strand => List.app ppDecl (genStrand strand)) strands;                  List.app (fn strand => List.app ppDecl (genStrand strand)) strands;

Legend:
Removed from v.1278  
changed lines
  Added in v.1279

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