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 4317, Sat Jul 30 14:12:14 2016 UTC revision 4344, Tue Aug 2 14:41:12 2016 UTC
# Line 485  Line 485 
485                        | _ => raise Fail(concat["FIXME: RealToInt<", Int.toString d, ">"])                        | _ => raise Fail(concat["FIXME: RealToInt<", Int.toString d, ">"])
486                      (* end case *)                      (* end case *)
487                    end                    end
488  (* FIXME: reduction operators                | Op.StrandStatus(ty, set) => bindTREE (TOp.StrandStatus(U.trType ty, set))
               | Op.R_All ty => ??  
               | Op.R_Exists ty => ??  
               | Op.R_Max ty => ??  
               | Op.R_Min ty => ??  
               | Op.R_Sum ty => ??  
               | Op.R_Product ty => ??  
               | Op.R_Mean ty => ??  
               | Op.R_Variance ty => ??  
 *)  
489                | Op.Transform info => bindTREE (TOp.Transform info)                | Op.Transform info => bindTREE (TOp.Transform info)
490                | Op.Translate info => bindTREE (TOp.Translate info)                | Op.Translate info => bindTREE (TOp.Translate info)
491                | Op.ControlIndex(info, ctl, d) => bindTREE (TOp.ControlIndex(info, ctl, d))                | Op.ControlIndex(info, ctl, d) => bindTREE (TOp.ControlIndex(info, ctl, d))
# Line 821  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)
# Line 877  Line 868 
868                        in                        in
869                          doNode (!succ, ifStk, stm :: stms)                          doNode (!succ, ifStk, stm :: stms)
870                        end                        end
871                      | IR.MAPREDUCE _ => raise Fail "FIXME: MAPREDUCE"
872                    | IR.NEW{strand, args, succ, ...} => let                    | IR.NEW{strand, args, succ, ...} => let
873                        val (es, stms') = singleArgs (env, args)                        val (es, stms') = singleArgs (env, args)
874                        val stm = T.S_New(strand, es)                        val stm = T.S_New(strand, es)

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

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