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

SCM Repository

[diderot] Diff of /trunk/src/compiler/codegen/codegen-fn.sml
ViewVC logotype

Diff of /trunk/src/compiler/codegen/codegen-fn.sml

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

revision 1300, Thu Jun 9 21:11:47 2011 UTC revision 1301, Thu Jun 9 23:58:40 2011 UTC
# Line 99  Line 99 
99            end            end
100    
101      fun generate {basename, double, parallel, debug, prog=srcProg} = let      fun generate {basename, double, parallel, debug, prog=srcProg} = let
102            val treeProg as TreeIL.Program{props, globals, globalInit, strands, initially} =            val treeProg as TreeIL.Program{props, globals, inputInit, globalInit, strands, initially} =
103                  PhaseTimer.withTimer Timers.timeLowToTree LowToTree.translate srcProg                  PhaseTimer.withTimer Timers.timeLowToTree LowToTree.translate srcProg
104  val _ = (  val _ = (
105  TextIO.output(Log.logFile(), "********** After translation to TreeIL **********\n");  TextIO.output(Log.logFile(), "********** After translation to TreeIL **********\n");
106  TreeILPP.program (Log.logFile(), treeProg))  TreeILPP.program (Log.logFile(), treeProg))
107            val prog = T.Program.new {double=double, parallel=parallel, debug=debug}            val prog = T.Program.new {
108                      name = basename,
109                      double = double,
110                      parallel = parallel,
111                      debug = debug
112                    }
113            val env = T.Env.new prog            val env = T.Env.new prog
114          (* define the globals and initialize the environment *)          (* define the globals and initialize the environment *)
115            val env = let            val env = let
# Line 127  Line 132 
132                    List.foldl gvar (T.Env.scopeGlobal env) globs                    List.foldl gvar (T.Env.scopeGlobal env) globs
133                  end                  end
134            in            in
135                T.Program.inputs (prog, T.Tr.block (T.Env.scopeGlobal env, inputInit));
136            (* global initialization *)            (* global initialization *)
137              T.Program.init (prog, T.Tr.block (T.Env.scopeGlobal env, globalInit));              T.Program.init (prog, T.Tr.block (T.Env.scopeGlobal env, globalInit));
138            (* translate strands *)            (* translate strands *)

Legend:
Removed from v.1300  
changed lines
  Added in v.1301

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