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 4343, Tue Aug 2 14:38:15 2016 UTC revision 4344, Tue Aug 2 14:41:12 2016 UTC
# Line 812  Line 812 
812                      (* note that the flatten phase on LowIR should guarantee that each                      (* note that the flatten phase on LowIR should guarantee that each
813                       * FOREACH node that takes a Range argument has its own instance of                       * FOREACH node that takes a Range argument has its own instance of
814                       * the Range expression.                       * the Range expression.
815                       * Note also that we resolve the src scalar before processing the body                       * Note also that we resolve the src before processing the body
816                       * of the loop so that any nested flushPendings do not cause Range                       * of the loop so that any nested flushPendings do not cause Range
817                       * bindings to be flushed.                       * bindings to be flushed.
818                       *)                       *)
819                        val mkStm = (case useScalar(!src)                        val (src', stms) = simpleArg env (!src, Env.flushPending (env, stms))
820                          val mkStm = (case src'
821                               of T.E_Op(TOp.Range, [lo, hi]) =>                               of T.E_Op(TOp.Range, [lo, hi]) =>
822                                    (fn body => T.S_For(var', lo, hi, body))                                    (fn body => T.S_For(var', lo, hi, body))
823                                | e =>                                | e =>
824                                    (fn body => T.S_Foreach(var', e, body))                                    (fn body => T.S_Foreach(var', e, body))
825                              (* end case *))                              (* end case *))
                       val stms = Env.flushPending (env, stms)  
826                        val stm = mkStm (doNode (!bodyEntry, [], []))                        val stm = mkStm (doNode (!bodyEntry, [], []))
827                        in                        in
828                          doNode (!succ, ifStk, stm::stms)                          doNode (!succ, ifStk, stm::stms)

Legend:
Removed from v.4343  
changed lines
  Added in v.4344

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