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

SCM Repository

[diderot] Diff of /trunk/src/compiler/low-il/low-opt.sml
ViewVC logotype

Diff of /trunk/src/compiler/low-il/low-opt.sml

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

revision 1232, Mon May 16 23:37:52 2011 UTC revision 1640, Wed Nov 16 02:19:51 2011 UTC
# Line 25  Line 25 
25              ("low-check", checkFlag, "enable consistency checking for LowIL [debug]")              ("low-check", checkFlag, "enable consistency checking for LowIL [debug]")
26            ]            ]
27    
28      fun debugDump (phase, prog) = if !debugFlag      fun checkIL (phase, prog) =
29            then (            if !checkFlag andalso CheckLowIL.check ("after " ^ phase, prog)
             LowPP.output (Log.logFile(), "LowIL after " ^ phase, prog);  
             prog)  
           else prog  
   
     fun checkIL (phase, prog) = if !checkFlag  
           then if CheckLowIL.check ("after " ^ phase, prog)  
30              then (              then (
31                TextIO.output(TextIO.stdErr, concat[                TextIO.output(TextIO.stdErr, concat[
32                    "***** Internal error after ", phase,                    "***** Internal error after ", phase,
33                    ": see log file for details\n"                    ": see log file for details\n"
34                  ]);                  ]);
35                  LowPP.output (Log.logFile(), "LowIL after " ^ phase, prog);
36                OS.Process.exit OS.Process.failure)                OS.Process.exit OS.Process.failure)
37              else prog            else if !debugFlag
38                then (
39                  LowPP.output (Log.logFile(), "LowIL after " ^ phase, prog);
40                  prog)
41            else prog            else prog
42    
43      fun transform (ctl, phase, transform, prog) =      fun transform (ctl, phase, transform, prog) =
44            if !ctl            if !ctl
45              then checkIL (phase, debugDump(phase, transform prog))              then checkIL (phase, transform prog)
46              else prog              else prog
47    
48      fun optimize prog = let      fun optimize prog = let

Legend:
Removed from v.1232  
changed lines
  Added in v.1640

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