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

SCM Repository

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

Diff of /branches/vis12/src/compiler/simplify/simplify.sml

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

revision 226, Tue Aug 3 21:34:18 2010 UTC revision 227, Wed Aug 4 05:27:13 2010 UTC
# Line 24  Line 24 
24    (* make a block out of a list of statements that are in reverse order *)    (* make a block out of a list of statements that are in reverse order *)
25      fun mkBlock stms = S.Block(List.rev stms)      fun mkBlock stms = S.Block(List.rev stms)
26    
27      fun transform (AST.Program dcls) = let      fun simplifyProgram (AST.Program dcls) = let
28            val globals = ref []            val globals = ref []
29            val globalInit = ref []            val globalInit = ref []
30            val actors = ref []            val actors = ref []
# Line 56  Line 56 
56              List.app simplifyDecl dcls;              List.app simplifyDecl dcls;
57              S.Program{              S.Program{
58                  globals = List.rev(!globals),                  globals = List.rev(!globals),
59                    staticInit = mkBlock [],
60                  globalInit = mkBlock (!globalInit),                  globalInit = mkBlock (!globalInit),
61                  actors = List.rev(!actors)                  actors = List.rev(!actors)
62                }                }
# Line 183  Line 184 
184              f (exps, [], stms)              f (exps, [], stms)
185            end            end
186    
187        fun transform ast = let
188              val simple = simplifyProgram ast
189              val _ = SimplePP.output (TextIO.stdOut, simple)       (* DEBUG *)
190              val simple = Lift.transform simple
191              in
192                simple
193              end
194    
195    end    end

Legend:
Removed from v.226  
changed lines
  Added in v.227

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