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

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/low-to-tree/low-to-tree.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/low-to-tree/low-to-tree.sml

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

revision 3836, Mon May 9 15:30:25 2016 UTC revision 3837, Mon May 9 16:38:09 2016 UTC
# Line 255  Line 255 
255            fun join (env, [], _, IR.JOIN _) = raise Fail "JOIN with no open if"            fun join (env, [], _, IR.JOIN _) = raise Fail "JOIN with no open if"
256              | join (env, [], stms, _) = Env.endScope (env, prefix @ List.rev stms)              | join (env, [], stms, _) = Env.endScope (env, prefix @ List.rev stms)
257              | join (env, THEN_BR(stms1, cond, elseBr)::stk, thenBlk, k) = let              | join (env, THEN_BR(stms1, cond, elseBr)::stk, thenBlk, k) = let
258                  val (env, thenBlk) = flushPending (env, thenBlk)                  val (env, thenBlk) = Env.flushPending (env, thenBlk)
259                  in                  in
260                    doNode (env, elseBr, ELSE_BR(stms1, cond, thenBlk, k)::stk, [])                    doNode (env, elseBr, ELSE_BR(stms1, cond, thenBlk, k)::stk, [])
261                  end                  end
# Line 295  Line 295 
295                    | k as IR.JOIN _ => join (env, ifStk, stms, k)                    | k as IR.JOIN _ => join (env, ifStk, stms, k)
296                    | IR.COND{cond, trueBranch, falseBranch, ...} => let                    | IR.COND{cond, trueBranch, falseBranch, ...} => let
297                        val cond = useScalar (!cond)                        val cond = useScalar (!cond)
298                        val (env, stms) = flushPending (env, stms)                        val (env, stms) = Env.flushPending (env, stms)
299                        in                        in
300                          doNode (env, !trueBranch, THEN_BR(stms, cond, !falseBranch)::ifStk, [])                          doNode (env, !trueBranch, THEN_BR(stms, cond, !falseBranch)::ifStk, [])
301                        end                        end
302                    | IR.FOREACH{var, src, bodyEntry, succ, ...} => let                    | IR.FOREACH{var, src, bodyEntry, succ, ...} => let
303                        val src = useScalar (!src)                        val src = useScalar (!src)
304                        val var = ??                        val var = ??
305                        val (env, stms) = flushPending (env, stms)                        val (env, stms) = Env.flushPending (env, stms)
306                        val body = doNode (env, !bodyEntry, [], [])                        val body = doNode (env, !bodyEntry, [], [])
307                        val stm = T.S_Foreach(var, src, body)                        val stm = T.S_Foreach(var, src, body)
308                        in                        in

Legend:
Removed from v.3836  
changed lines
  Added in v.3837

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