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 4349, Tue Aug 2 18:14:48 2016 UTC
# Line 457  Line 457 
457                | Op.Concat ty => bindTREE (TOp.Concat(U.trType ty))                | Op.Concat ty => bindTREE (TOp.Concat(U.trType ty))
458                | Op.Range => bindTREE TOp.Range                | Op.Range => bindTREE TOp.Range
459                | Op.Length ty => bindTREE (TOp.Length(U.trType ty))                | Op.Length ty => bindTREE (TOp.Length(U.trType ty))
460                | Op.SphereQuery(ty1, ty2) => bindTREE' (TOp.SphereQuery(U.trType ty1, U.trType ty2))                | Op.SphereQuery(dim, ty) => bindTREE' (TOp.SphereQuery(dim, U.trType ty))
461                | Op.Sqrt => bindTREE TOp.Sqrt                | Op.Sqrt => bindTREE TOp.Sqrt
462                | Op.Cos => bindTREE TOp.Cos                | Op.Cos => bindTREE TOp.Cos
463                | Op.ArcCos => bindTREE TOp.ArcCos                | Op.ArcCos => bindTREE TOp.ArcCos
# 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, stms)
820                          val stms = Env.flushPending (env, stms)
821                          val mkStm = (case src'
822                               of T.E_Op(TOp.Range, [lo, hi]) =>                               of T.E_Op(TOp.Range, [lo, hi]) =>
823                                    (fn body => T.S_For(var', lo, hi, body))                                    (fn body => T.S_For(var', lo, hi, body))
824                                | e =>                                | e =>
825                                    (fn body => T.S_Foreach(var', e, body))                                    (fn body => T.S_Foreach(var', e, body))
826                              (* end case *))                              (* end case *))
                       val stms = Env.flushPending (env, stms)  
827                        val stm = mkStm (doNode (!bodyEntry, [], []))                        val stm = mkStm (doNode (!bodyEntry, [], []))
828                        in                        in
829                          doNode (!succ, ifStk, stm::stms)                          doNode (!succ, ifStk, stm::stms)
# Line 877  Line 869 
869                        in                        in
870                          doNode (!succ, ifStk, stm :: stms)                          doNode (!succ, ifStk, stm :: stms)
871                        end                        end
872                      | IR.MAPREDUCE _ => raise Fail "FIXME: MAPREDUCE"
873                    | IR.NEW{strand, args, succ, ...} => let                    | IR.NEW{strand, args, succ, ...} => let
874                        val (es, stms') = singleArgs (env, args)                        val (es, stms') = singleArgs (env, args)
875                        val stm = T.S_New(strand, es)                        val stm = T.S_New(strand, es)

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

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