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

SCM Repository

[diderot] Diff of /branches/vis12/src/compiler/simplify/simple.sml
ViewVC logotype

Diff of /branches/vis12/src/compiler/simplify/simple.sml

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

revision 1685, Sun Jan 22 15:23:36 2012 UTC revision 1688, Wed Jan 25 13:36:13 2012 UTC
# Line 71  Line 71 
71        | E_Tuple of var list        | E_Tuple of var list
72        | E_Apply of var * Types.meta_var list * var list * Types.ty        | E_Apply of var * Types.meta_var list * var list * Types.ty
73        | E_Cons of var list        | E_Cons of var list
74          | E_Seq of var list
75        | E_Slice of var * var option list * Types.ty     (* tensor slicing *)        | E_Slice of var * var option list * Types.ty     (* tensor slicing *)
76        | E_Input of Types.ty * string * string * var option        | E_Input of Types.ty * string * string * var option
77        | E_LoadImage of ImageInfo.info * var        | E_LoadImage of ImageInfo.info * var
78          | E_Coerce of {srcTy : Types.ty, dstTy : Types.ty, x : var}
79    
80      fun typeOf (E_Var x) = Var.monoTypeOf x      fun typeOf (E_Var x) = Var.monoTypeOf x
81        | typeOf (E_Lit lit) = (case lit        | typeOf (E_Lit lit) = (case lit
# Line 94  Line 96 
96              (* end case *)              (* end case *)
97            end            end
98        | typeOf (E_Cons[]) = raise Fail "impossible empty E_Cons"        | typeOf (E_Cons[]) = raise Fail "impossible empty E_Cons"
99          | typeOf (E_Seq[]) = raise Fail "empty sequence not supported yet"
100          | typeOf (E_Seq(x::xs)) = let
101              val d = List.length xs + 1
102              val ty = Var.monoTypeOf x
103              in
104                Types.T_Sequence(ty, Types.DimConst d)
105              end
106        | typeOf (E_Slice(_, _, ty)) = ty        | typeOf (E_Slice(_, _, ty)) = ty
107        | typeOf (E_Input(ty, _, _, _)) = ty        | typeOf (E_Input(ty, _, _, _)) = ty
108        | typeOf (E_LoadImage(ImageInfo.ImgInfo{dim, ty=(dd, _), ...}, _)) =        | typeOf (E_LoadImage(ImageInfo.ImgInfo{dim, ty=(dd, _), ...}, _)) =

Legend:
Removed from v.1685  
changed lines
  Added in v.1688

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