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

SCM Repository

[diderot] Diff of /branches/vis12/src/compiler/driver/main.sml
ViewVC logotype

Diff of /branches/vis12/src/compiler/driver/main.sml

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

revision 1692, Fri Jan 27 23:17:47 2012 UTC revision 1693, Mon Feb 20 12:55:09 2012 UTC
# Line 67  Line 67 
67              simple              simple
68            end            end
69    
70      fun doFile (target : TargetUtil.target_desc, filename, optOutput) = let      fun doFile (target : TargetUtil.target_desc, filename, exec, optOutput) = let
71            val baseName = (case OS.Path.splitBaseExt filename            val baseName = (case OS.Path.splitBaseExt filename
72                   of {base, ext=SOME "diderot"} => base                   of {base, ext=SOME "diderot"} => base
73                    | _ => (errnl "expected diderot file"; quitWithError filename)                    | _ => (errnl "expected diderot file"; quitWithError filename)
# Line 88  Line 88 
88            val lowIL = PhaseTimer.withTimer Timers.timeLow MidToLow.translate midIL            val lowIL = PhaseTimer.withTimer Timers.timeLow MidToLow.translate midIL
89            val lowIL = PhaseTimer.withTimer Timers.timeLow LowOptimizer.optimize lowIL            val lowIL = PhaseTimer.withTimer Timers.timeLow LowOptimizer.optimize lowIL
90            in            in
91    (* FIXME: if exec flag is false, then we generate a library, otherwise an executable *)
92            (***** CODE GENERATION *****)            (***** CODE GENERATION *****)
93              PhaseTimer.withTimer Timers.timeCodegen              PhaseTimer.withTimer Timers.timeCodegen
94                (BackEnd.generate target)                (BackEnd.generate target)
# Line 97  Line 98 
98      fun usage cmd = TextIO.output(TextIO.stdErr, Options.usage cmd)      fun usage cmd = TextIO.output(TextIO.stdErr, Options.usage cmd)
99    
100      fun main (name: string, args: string list) = let      fun main (name: string, args: string list) = let
101            val {help, log, target, output, defs, file} =            val {help, log, target, standalone, output, defs, file} =
102                  (Options.parseCmdLine args)                  (Options.parseCmdLine args)
103                    handle Options.Usage msg => (                    handle Options.Usage msg => (
104                      err(concat[msg, "\n"]);                      err(concat[msg, "\n"]);
# Line 115  Line 116 
116                      then (                      then (
117                        if log then Log.init(base ^ ".log") else ();                        if log then Log.init(base ^ ".log") else ();
118                        PhaseTimer.withTimer Timers.timeCompiler                        PhaseTimer.withTimer Timers.timeCompiler
119                          doFile (target, file, output);                          doFile (target, file, standalone, output);
120                        Stats.report ();                        Stats.report ();
121                        Log.reportTiming Timers.timeCompiler;                        Log.reportTiming Timers.timeCompiler;
122                        OS.Process.success                        OS.Process.success

Legend:
Removed from v.1692  
changed lines
  Added in v.1693

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