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

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/low-ir/check-low.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/low-ir/check-low.sml

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

revision 3851, Thu May 12 19:27:43 2016 UTC revision 3937, Mon Jun 6 13:16:10 2016 UTC
# Line 51  Line 51 
51              | Op.VClamp d => (Ty.vecTy d, [Ty.vecTy d, Ty.realTy, Ty.realTy])              | Op.VClamp d => (Ty.vecTy d, [Ty.vecTy d, Ty.realTy, Ty.realTy])
52              | Op.VMapClamp d => (Ty.vecTy d, [Ty.vecTy d, Ty.vecTy d, Ty.vecTy d])              | Op.VMapClamp d => (Ty.vecTy d, [Ty.vecTy d, Ty.vecTy d, Ty.vecTy d])
53              | Op.VLerp d => (Ty.vecTy d, [Ty.vecTy d, Ty.vecTy d, Ty.realTy])              | Op.VLerp d => (Ty.vecTy d, [Ty.vecTy d, Ty.vecTy d, Ty.realTy])
54              | Op.TensorIndex(ty, _) => (Ty.realTy, [ty])              | Op.TensorIndex(ty as Ty.TensorTy(_::_::_), _) => (Ty.realTy, [ty])
55              | Op.ProjectLast(ty as Ty.TensorTy dd, _) => (Ty.TensorTy[List.last dd], [ty])              | Op.ProjectLast(ty as Ty.TensorTy(dd as _::_::_), _) => (Ty.TensorTy[List.last dd], [ty])
56              | Op.LT ty => (Ty.BoolTy, [ty, ty])              | Op.LT ty => (Ty.BoolTy, [ty, ty])
57              | Op.LTE ty => (Ty.BoolTy, [ty, ty])              | Op.LTE ty => (Ty.BoolTy, [ty, ty])
58              | Op.EQ ty => (Ty.BoolTy, [ty, ty])              | Op.EQ ty => (Ty.BoolTy, [ty, ty])
# Line 91  Line 91 
91              | Op.IntToReal => (Ty.realTy, [Ty.intTy])              | Op.IntToReal => (Ty.realTy, [Ty.intTy])
92              | Op.RealToInt 1 => (Ty.IntTy, [Ty.realTy])              | Op.RealToInt 1 => (Ty.IntTy, [Ty.realTy])
93              | Op.RealToInt d => (Ty.SeqTy(Ty.IntTy, SOME d), [Ty.TensorTy[d]])              | Op.RealToInt d => (Ty.SeqTy(Ty.IntTy, SOME d), [Ty.TensorTy[d]])
 (* FIXME: the type of RealToInt should be  
             | Op.RealToInt d => (Ty.SeqTy(Ty.IntTy, d), [Ty.SeqTy(Ty.realTy, d)])  
 *)  
94  (* not sure if we will need these  (* not sure if we will need these
95        | R_All of ty        | R_All of ty
96        | R_Exists of ty        | R_Exists of ty
# Line 147  Line 144 
144            List.all (fn ty' => Ty.same(ty, ty')) tys andalso (List.length tys = n)            List.all (fn ty' => Ty.same(ty, ty')) tys andalso (List.length tys = n)
145        | typeOfSeq _ = false        | typeOfSeq _ = false
146    
147        fun isStrandTy (Ty.StrandTy _) = true
148          | isStrandTy _ = false
149    
150        fun isBoolTy Ty.BoolTy = true
151          | isBoolTy _ = false
152    
153    end    end
154    
155  structure CheckLow = CheckIRFn (  structure CheckLow = CheckIRFn (

Legend:
Removed from v.3851  
changed lines
  Added in v.3937

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