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 3894, Sun May 22 14:51:27 2016 UTC revision 3924, Fri Jun 3 17:30:27 2016 UTC
# Line 522  Line 522 
522                          doNode (!trueBranch, THEN_BR(stms, cond, !falseBranch)::ifStk, [])                          doNode (!trueBranch, THEN_BR(stms, cond, !falseBranch)::ifStk, [])
523                        end                        end
524                    | IR.FOREACH{var, src, bodyEntry, succ, ...} => let                    | IR.FOREACH{var, src, bodyEntry, succ, ...} => let
                       val src = useScalar (!src)  
525                        val var' = Util.newIterVar var                        val var' = Util.newIterVar var
                       val stms = Env.flushPending (env, stms)  
526                        val _ = Env.bindSimple (env, var, Env.TREE(T.E_Var var'))                        val _ = Env.bindSimple (env, var, Env.TREE(T.E_Var var'))
527                        val body = doNode (!bodyEntry, [], [])                        val body = doNode (!bodyEntry, [], [])
528                        val stm = T.S_Foreach(var', src, body)                      (* note that the flatten phase on LowIR should guarantee that each
529                         * FOREACH node that takes a Range argument has its own instance of
530                         * the Range expression.
531                         *)
532                          val stm = (case useScalar(!src)
533                                 of T.E_Op(TOp.Range, [lo, hi]) => T.S_For(var', lo, hi, body)
534                                  | _ => T.S_Foreach(var', useScalar (!src), body)
535                                (* end case *))
536                          val stms = Env.flushPending (env, stms)
537                        in                        in
538                          doNode (!succ, ifStk, stm::stms)                          doNode (!succ, ifStk, stm::stms)
539                        end                        end

Legend:
Removed from v.3894  
changed lines
  Added in v.3924

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