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

SCM Repository

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

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

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

revision 3506, Fri Dec 18 04:03:54 2015 UTC revision 3508, Fri Dec 18 14:19:30 2015 UTC
# Line 27  Line 27 
27              else ()              else ()
28    
29    (* conditional printing of intermediate forms *)    (* conditional printing of intermediate forms *)
30      fun dump ctl output message prog = if Controls.get ctl      fun dump ctl output phase prog = if Controls.get ctl
31            then output (Log.logFile(), message, prog)            then output (Log.logFile(), "After "^phase, prog)
32            else ()            else ()
33    
34    (* compiler front end (parsing, typechecking, and simplification *)    (* compiler front end (parsing, typechecking, and simplification *)
# Line 47  Line 47 
47                    checkForErrors errStrm;                    checkForErrors errStrm;
48                    valOf pt                    valOf pt
49                  end) ()                  end) ()
50            val _ = dump Ctl.dumpPT (ParseTreePP.output errStrm) "" parseTree            val _ = dump Ctl.dumpPT (ParseTreePP.output errStrm) "parsing" parseTree
51          (***** TYPECHECKING *****)          (***** TYPECHECKING *****)
52            val _ = PhaseTimer.start Timers.timeTypechecker            val _ = PhaseTimer.start Timers.timeTypechecker
53            val ast = (Typechecker.check errStrm parseTree)            val ast = (Typechecker.check errStrm parseTree)
54            val _ = PhaseTimer.stop Timers.timeTypechecker            val _ = PhaseTimer.stop Timers.timeTypechecker
55            val _ = checkForErrors errStrm            val _ = checkForErrors errStrm
56  (* TODO: check AST for consistency *)  (* TODO: check AST for consistency *)
57            val _ = dump Ctl.dumpAST ASTPP.output "" ast            val _ = dump Ctl.dumpAST ASTPP.output "typechecking" ast
58          (***** SIMPLIFY *****)          (***** SIMPLIFY *****)
59            val simple = Simplify.transform (errStrm, ast)            val simple = SimpleOpt.checkAfter ("simplify", Simplify.transform (errStrm, ast))
           val _ = dump Ctl.dumpSimple SimplePP.output "after simplify" simple  
60            val simple = SimpleOpt.transform simple            val simple = SimpleOpt.transform simple
           val _ = dump Ctl.dumpSimple SimplePP.output "after simple optimization" simple  
61            in            in
62            (* check for warnings and report if necessary *)            (* check for warnings and report if necessary *)
63              if Error.anyWarnings errStrm              if Error.anyWarnings errStrm
# Line 94  Line 92 
92            val simple = PhaseTimer.withTimer Timers.timeFront frontEnd filename            val simple = PhaseTimer.withTimer Timers.timeFront frontEnd filename
93          (***** TRANSLATION TO HIGH IL*****)          (***** TRANSLATION TO HIGH IL*****)
94            val high = Translate.translate simple            val high = Translate.translate simple
95            val _ = dump Ctl.dumpHighIL HighPP.output "after translate" high            val _ = dump Ctl.dumpHighIL HighPP.output "translate" high
96  (* TODO *)  (* TODO *)
97          (***** HIGH-IL OPTIMIZATION *****)          (***** HIGH-IL OPTIMIZATION *****)
98  (* TODO *)  (* TODO *)

Legend:
Removed from v.3506  
changed lines
  Added in v.3508

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