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 3432, Sun Nov 15 14:42:04 2015 UTC revision 3437, Mon Nov 16 13:54:57 2015 UTC
# Line 28  Line 28 
28                quitWithError (Error.sourceFile errStrm))                quitWithError (Error.sourceFile errStrm))
29              else ()              else ()
30    
31      (* conditional printing of intermediate forms *)
32        fun dump ctl output message prog = if Controls.get ctl
33              then output (Log.logFile(), message, prog)
34              else ()
35    
36    (* compiler front end (parsing, typechecking, and simplification *)    (* compiler front end (parsing, typechecking, and simplification *)
37      fun frontEnd filename = let      fun frontEnd filename = let
38            val errStrm = Error.mkErrStream filename            val errStrm = Error.mkErrStream filename
# Line 45  Line 50 
50                    checkForErrors errStrm;                    checkForErrors errStrm;
51                    valOf pt                    valOf pt
52                  end) ()                  end) ()
53            val _ = if Controls.get Ctl.dumpPT            val _ = dump Ctl.dumpPT (ParseTreePP.output errStrm) "" parseTree
                     then ParseTreePP.output (errStrm, Log.logFile(), parseTree)  
                     else ()  
54          (***** TYPECHECKING *****)          (***** TYPECHECKING *****)
55            val _ = PhaseTimer.start Timers.timeTypechecker            val _ = PhaseTimer.start Timers.timeTypechecker
56            val ast = (Typechecker.check errStrm parseTree)            val ast = (Typechecker.check errStrm parseTree)
57            val _ = PhaseTimer.stop Timers.timeTypechecker            val _ = PhaseTimer.stop Timers.timeTypechecker
58            val _ = checkForErrors errStrm            val _ = checkForErrors errStrm
59  (* TODO: check AST for consistency *)  (* TODO: check AST for consistency *)
60            val _ = if Controls.get Ctl.dumpAST            val _ = dump Ctl.dumpAST ASTPP.output "" ast
                     then ASTPP.output (Log.logFile(), ast)  
                     else ()  
61          (***** SIMPLIFY *****)          (***** SIMPLIFY *****)
62  (* TODO *)  (*
63              val simple = Simplify.transform (errStrm, ast)
64              val _ = dump Ctl.dumpSimple SimplePP.output simple
65              val simple = SimpleOpt.transform simple
66              val _ = dump Ctl.dumpSimple SimplePP.output simple
67    *)
68            in            in
69            (* check for warnings and report if necessary *)            (* check for warnings and report if necessary *)
70              if Error.anyWarnings errStrm              if Error.anyWarnings errStrm

Legend:
Removed from v.3432  
changed lines
  Added in v.3437

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