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

SCM Repository

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

Diff of /branches/pure-cfg/src/compiler/tree-il/low-to-tree-fn.sml

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

revision 1075, Tue May 3 21:46:15 2011 UTC revision 1076, Tue May 3 21:58:58 2011 UTC
# Line 341  Line 341 
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.RETURN => let                          | ExitKind.RETURN => let
344    (* FIXME: we should probably call flushPending here! *)
345                              val suffix = finish env @ [T.S_Exit(List.map (useVar env) live)]                              val suffix = finish env @ [T.S_Exit(List.map (useVar env) live)]
346                              in                              in
347                                endScope (env, prefix @ List.revAppend(stms, suffix))                                endScope (env, prefix @ List.revAppend(stms, suffix))
348                              end                              end
349                          | ExitKind.ACTIVE => let                          | ExitKind.ACTIVE => let
350    (* FIXME: we should probably call flushPending here! *)
351                              val suffix = finish env @ [T.S_Active(List.map (useVar env) live)]                              val suffix = finish env @ [T.S_Active(List.map (useVar env) live)]
352                              in                              in
353                                endScope (env, prefix @ List.revAppend(stms, suffix))                                endScope (env, prefix @ List.revAppend(stms, suffix))
354                              end                              end
355                          | ExitKind.STABILIZE => let                          | ExitKind.STABILIZE => let
356    (* FIXME: we should probably call flushPending here! *)
357                              val stms = T.S_Stabilize(List.map (useVar env) live) :: stms                              val stms = T.S_Stabilize(List.map (useVar env) live) :: stms
358                              in                              in
359    (* FIXME: we should probably call flushPending here! *)
360                                join (env, ifStk, stms, k)                                join (env, ifStk, stms, k)
361                              end                              end
362                          | ExitKind.DIE => join (env, ifStk, T.S_Die :: stms, k)                          | ExitKind.DIE => join (env, ifStk, T.S_Die :: stms, k)
# Line 424  Line 428 
428      fun translate prog = let      fun translate prog = let
429          (* first we do a variable analysis pass on the Low IL *)          (* first we do a variable analysis pass on the Low IL *)
430            val prog as IL.Program{globalInit, initially, strands} = VA.optimize prog            val prog as IL.Program{globalInit, initially, strands} = VA.optimize prog
431    (* FIXME: here we should do a contraction pass to eliminate unused variables that VA may have created *)
432            val _ = ( (* DEBUG *)            val _ = ( (* DEBUG *)
433                  LowPP.output (Log.logFile(), "LowIL after variable analysis", prog);                  LowPP.output (Log.logFile(), "LowIL after variable analysis", prog);
434                  if CheckLowIL.check ("after LowIL variable analysis", prog)                  if CheckLowIL.check ("after LowIL variable analysis", prog)

Legend:
Removed from v.1075  
changed lines
  Added in v.1076

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