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

SCM Repository

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

Diff of /trunk/src/compiler/tree-il/low-to-tree-fn.sml

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

revision 1231, Mon May 16 13:49:17 2011 UTC revision 1232, Mon May 16 23:37:52 2011 UTC
# Line 340  Line 340 
340                    | k as IL.EXIT{kind, live, ...} => (case kind                    | k as IL.EXIT{kind, live, ...} => (case kind
341                         of ExitKind.FRAGMENT =>                         of ExitKind.FRAGMENT =>
342                              endScope (env, prefix @ List.revAppend(stms, finish env))                              endScope (env, prefix @ List.revAppend(stms, finish env))
343                            | ExitKind.SINIT => let
344    (* FIXME: we should probably call flushPending here! *)
345                                val suffix = finish env @ [T.S_Exit(List.map (useVar env) live)]
346                                in
347                                  endScope (env, prefix @ List.revAppend(stms, suffix))
348                                end
349                          | ExitKind.RETURN => let                          | ExitKind.RETURN => let
350  (* FIXME: we should probably call flushPending here! *)  (* FIXME: we should probably call flushPending here! *)
351                              val suffix = finish env @ [T.S_Exit(List.map (useVar env) live)]                              val suffix = finish env @ [T.S_Exit(List.map (useVar env) live)]
# Line 453  Line 459 
459          (* first we do a variable analysis pass on the Low IL *)          (* first we do a variable analysis pass on the Low IL *)
460            val prog as IL.Program{globalInit, initially, strands} = VA.optimize prog            val prog as IL.Program{globalInit, initially, strands} = VA.optimize prog
461  (* FIXME: here we should do a contraction pass to eliminate unused variables that VA may have created *)  (* FIXME: here we should do a contraction pass to eliminate unused variables that VA may have created *)
462            val _ = ( (* DEBUG *)            val _ = (* DEBUG *)
463                  LowPP.output (Log.logFile(), "LowIL after variable analysis", prog);                  LowPP.output (Log.logFile(), "LowIL after variable analysis", prog)
                 if CheckLowIL.check ("after LowIL variable analysis", prog)  
                   then raise Fail "bogus Low IL after variable analysis"  
                   else ())  
464            val env = newEnv()            val env = newEnv()
465            val globals = List.map            val globals = List.map
466                  (fn x => let val x' = newGlobal x in global(env, x, x'); x' end)                  (fn x => let val x' = newGlobal x in global(env, x, x'); x' end)

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

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