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

SCM Repository

[diderot] Diff of /branches/pure-cfg/src/compiler/mid-il/mid-il.sml
ViewVC logotype

Diff of /branches/pure-cfg/src/compiler/mid-il/mid-il.sml

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

revision 753, Thu Apr 7 14:48:23 2011 UTC revision 754, Thu Apr 7 14:55:33 2011 UTC
# Line 43  Line 43 
43        | Not        | Not
44        | Max        | Max
45        | Min        | Min
46          | Lerp of ty
47        | Dot of int        | Dot of int
48        | Cross        | Cross
49        | Select of ty * int        | Select of ty * int
# Line 85  Line 86 
86        | arity Not = 1        | arity Not = 1
87        | arity Max = 2        | arity Max = 2
88        | arity Min = 2        | arity Min = 2
89          | arity (Lerp _) = 3
90        | arity (Dot _) = 2        | arity (Dot _) = 2
91        | arity Cross = 2        | arity Cross = 2
92        | arity (Select _) = 1        | arity (Select _) = 1
# Line 127  Line 129 
129        | same (Not, Not) = true        | same (Not, Not) = true
130        | same (Max, Max) = true        | same (Max, Max) = true
131        | same (Min, Min) = true        | same (Min, Min) = true
132          | same (Lerp(a0), Lerp(b0)) = samety(a0, b0)
133        | same (Dot(a0), Dot(b0)) = sameint(a0, b0)        | same (Dot(a0), Dot(b0)) = sameint(a0, b0)
134        | same (Cross, Cross) = true        | same (Cross, Cross) = true
135        | same (Select(a0,a1), Select(b0,b1)) = samety(a0, b0) andalso sameint(a1, b1)        | same (Select(a0,a1), Select(b0,b1)) = samety(a0, b0) andalso sameint(a1, b1)
# Line 170  Line 173 
173        | hash Not = 0w43        | hash Not = 0w43
174        | hash Max = 0w47        | hash Max = 0w47
175        | hash Min = 0w53        | hash Min = 0w53
176        | hash (Dot(a0)) = 0w59 + hashint a0        | hash (Lerp(a0)) = 0w59 + hashty a0
177        | hash Cross = 0w61        | hash (Dot(a0)) = 0w61 + hashint a0
178        | hash (Select(a0,a1)) = 0w67 + hashty a0 + hashint a1        | hash Cross = 0w67
179        | hash (Norm(a0)) = 0w71 + hashint a0        | hash (Select(a0,a1)) = 0w71 + hashty a0 + hashint a1
180        | hash (Normalize(a0)) = 0w73 + hashint a0        | hash (Norm(a0)) = 0w73 + hashint a0
181        | hash (Scale(a0)) = 0w79 + hashint a0        | hash (Normalize(a0)) = 0w79 + hashint a0
182        | hash (InvScale(a0)) = 0w83 + hashint a0        | hash (Scale(a0)) = 0w83 + hashint a0
183        | hash CL = 0w89        | hash (InvScale(a0)) = 0w89 + hashint a0
184        | hash (PrincipleEvec(a0)) = 0w97 + hashty a0        | hash CL = 0w97
185        | hash (Trace(a0)) = 0w101 + hashint a0        | hash (PrincipleEvec(a0)) = 0w101 + hashty a0
186        | hash (Subscript(a0)) = 0w103 + hashty a0        | hash (Trace(a0)) = 0w103 + hashint a0
187        | hash (Ceiling(a0)) = 0w107 + hashint a0        | hash (Subscript(a0)) = 0w107 + hashty a0
188        | hash (Floor(a0)) = 0w109 + hashint a0        | hash (Ceiling(a0)) = 0w109 + hashint a0
189        | hash (Round(a0)) = 0w113 + hashint a0        | hash (Floor(a0)) = 0w113 + hashint a0
190        | hash (Trunc(a0)) = 0w127 + hashint a0        | hash (Round(a0)) = 0w127 + hashint a0
191        | hash IntToReal = 0w131        | hash (Trunc(a0)) = 0w131 + hashint a0
192        | hash (RealToInt(a0)) = 0w137 + hashint a0        | hash IntToReal = 0w137
193        | hash (VoxelAddress(a0)) = 0w139 + ImageInfo.hash a0        | hash (RealToInt(a0)) = 0w139 + hashint a0
194        | hash (LoadVoxels(a0,a1)) = 0w149 + ImageInfo.hash a0 + hashint a1        | hash (VoxelAddress(a0)) = 0w149 + ImageInfo.hash a0
195        | hash (PosToImgSpace(a0)) = 0w151 + ImageInfo.hash a0        | hash (LoadVoxels(a0,a1)) = 0w151 + ImageInfo.hash a0 + hashint a1
196        | hash (GradToWorldSpace(a0)) = 0w157 + ImageInfo.hash a0        | hash (PosToImgSpace(a0)) = 0w157 + ImageInfo.hash a0
197        | hash (EvalKernel(a0,a1,a2)) = 0w163 + hashint a0 + Kernel.hash a1 + hashint a2        | hash (GradToWorldSpace(a0)) = 0w163 + ImageInfo.hash a0
198        | hash (LoadImage(a0)) = 0w167 + ImageInfo.hash a0        | hash (EvalKernel(a0,a1,a2)) = 0w167 + hashint a0 + Kernel.hash a1 + hashint a2
199        | hash (Inside(a0,a1)) = 0w173 + ImageInfo.hash a0 + hashint a1        | hash (LoadImage(a0)) = 0w173 + ImageInfo.hash a0
200        | hash (Input(a0,a1)) = 0w179 + hashty a0 + hashstring a1        | hash (Inside(a0,a1)) = 0w179 + ImageInfo.hash a0 + hashint a1
201        | hash (InputWithDefault(a0,a1)) = 0w181 + hashty a0 + hashstring a1        | hash (Input(a0,a1)) = 0w181 + hashty a0 + hashstring a1
202          | hash (InputWithDefault(a0,a1)) = 0w191 + hashty a0 + hashstring a1
203    
204      fun toString (Add(a0)) = concat["Add<", tyToString a0, ">"]      fun toString (Add(a0)) = concat["Add<", tyToString a0, ">"]
205        | toString (Sub(a0)) = concat["Sub<", tyToString a0, ">"]        | toString (Sub(a0)) = concat["Sub<", tyToString a0, ">"]
# Line 212  Line 216 
216        | toString Not = "Not"        | toString Not = "Not"
217        | toString Max = "Max"        | toString Max = "Max"
218        | toString Min = "Min"        | toString Min = "Min"
219          | toString (Lerp(a0)) = concat["Lerp<", tyToString a0, ">"]
220        | toString (Dot(a0)) = concat["Dot<", intToString a0, ">"]        | toString (Dot(a0)) = concat["Dot<", intToString a0, ">"]
221        | toString Cross = "Cross"        | toString Cross = "Cross"
222        | toString (Select(a0,a1)) = concat["Select<", tyToString a0, ",", intToString a1, ">"]        | toString (Select(a0,a1)) = concat["Select<", tyToString a0, ",", intToString a1, ">"]

Legend:
Removed from v.753  
changed lines
  Added in v.754

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