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 716, Thu Mar 31 16:39:25 2011 UTC revision 717, Thu Mar 31 22:12:58 2011 UTC
# Line 33  Line 33 
33        | Mul of ty        | Mul of ty
34        | Div of ty        | Div of ty
35        | Neg of ty        | Neg of ty
36          | Abs of ty
37        | LT of ty        | LT of ty
38        | LTE of ty        | LTE of ty
39        | EQ of ty        | EQ of ty
# Line 42  Line 43 
43        | Not        | Not
44        | Max        | Max
45        | Min        | Min
       | Sin  
       | Cos  
       | Pow  
46        | Dot of int        | Dot of int
47        | Cross        | Cross
48        | Select of ty * int        | Select of ty * int
49        | Norm of int        | Norm of int
50          | Normalize of int
51        | Scale of int        | Scale of int
52        | InvScale of int        | InvScale of int
53        | CL        | CL
# Line 76  Line 75 
75        | arity (Mul _) = 2        | arity (Mul _) = 2
76        | arity (Div _) = 2        | arity (Div _) = 2
77        | arity (Neg _) = 1        | arity (Neg _) = 1
78          | arity (Abs _) = 1
79        | arity (LT _) = 2        | arity (LT _) = 2
80        | arity (LTE _) = 2        | arity (LTE _) = 2
81        | arity (EQ _) = 2        | arity (EQ _) = 2
# Line 85  Line 85 
85        | arity Not = 1        | arity Not = 1
86        | arity Max = 2        | arity Max = 2
87        | arity Min = 2        | arity Min = 2
       | arity Sin = 1  
       | arity Cos = 1  
       | arity Pow = 2  
88        | arity (Dot _) = 2        | arity (Dot _) = 2
89        | arity Cross = 2        | arity Cross = 2
90        | arity (Select _) = 1        | arity (Select _) = 1
91        | arity (Norm _) = 1        | arity (Norm _) = 1
92          | arity (Normalize _) = 1
93        | arity (Scale _) = 2        | arity (Scale _) = 2
94        | arity (InvScale _) = 2        | arity (InvScale _) = 2
95        | arity CL = 1        | arity CL = 1
# Line 119  Line 117 
117        | same (Mul(a0), Mul(b0)) = samety(a0, b0)        | same (Mul(a0), Mul(b0)) = samety(a0, b0)
118        | same (Div(a0), Div(b0)) = samety(a0, b0)        | same (Div(a0), Div(b0)) = samety(a0, b0)
119        | same (Neg(a0), Neg(b0)) = samety(a0, b0)        | same (Neg(a0), Neg(b0)) = samety(a0, b0)
120          | same (Abs(a0), Abs(b0)) = samety(a0, b0)
121        | same (LT(a0), LT(b0)) = samety(a0, b0)        | same (LT(a0), LT(b0)) = samety(a0, b0)
122        | same (LTE(a0), LTE(b0)) = samety(a0, b0)        | same (LTE(a0), LTE(b0)) = samety(a0, b0)
123        | same (EQ(a0), EQ(b0)) = samety(a0, b0)        | same (EQ(a0), EQ(b0)) = samety(a0, b0)
# Line 128  Line 127 
127        | same (Not, Not) = true        | same (Not, Not) = true
128        | same (Max, Max) = true        | same (Max, Max) = true
129        | same (Min, Min) = true        | same (Min, Min) = true
       | same (Sin, Sin) = true  
       | same (Cos, Cos) = true  
       | same (Pow, Pow) = true  
130        | same (Dot(a0), Dot(b0)) = sameint(a0, b0)        | same (Dot(a0), Dot(b0)) = sameint(a0, b0)
131        | same (Cross, Cross) = true        | same (Cross, Cross) = true
132        | 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)
133        | same (Norm(a0), Norm(b0)) = sameint(a0, b0)        | same (Norm(a0), Norm(b0)) = sameint(a0, b0)
134          | same (Normalize(a0), Normalize(b0)) = sameint(a0, b0)
135        | same (Scale(a0), Scale(b0)) = sameint(a0, b0)        | same (Scale(a0), Scale(b0)) = sameint(a0, b0)
136        | same (InvScale(a0), InvScale(b0)) = sameint(a0, b0)        | same (InvScale(a0), InvScale(b0)) = sameint(a0, b0)
137        | same (CL, CL) = true        | same (CL, CL) = true
# Line 163  Line 160 
160        | hash (Mul(a0)) = 0w7 + hashty a0        | hash (Mul(a0)) = 0w7 + hashty a0
161        | hash (Div(a0)) = 0w11 + hashty a0        | hash (Div(a0)) = 0w11 + hashty a0
162        | hash (Neg(a0)) = 0w13 + hashty a0        | hash (Neg(a0)) = 0w13 + hashty a0
163        | hash (LT(a0)) = 0w17 + hashty a0        | hash (Abs(a0)) = 0w17 + hashty a0
164        | hash (LTE(a0)) = 0w19 + hashty a0        | hash (LT(a0)) = 0w19 + hashty a0
165        | hash (EQ(a0)) = 0w23 + hashty a0        | hash (LTE(a0)) = 0w23 + hashty a0
166        | hash (NEQ(a0)) = 0w29 + hashty a0        | hash (EQ(a0)) = 0w29 + hashty a0
167        | hash (GT(a0)) = 0w31 + hashty a0        | hash (NEQ(a0)) = 0w31 + hashty a0
168        | hash (GTE(a0)) = 0w37 + hashty a0        | hash (GT(a0)) = 0w37 + hashty a0
169        | hash Not = 0w41        | hash (GTE(a0)) = 0w41 + hashty a0
170        | hash Max = 0w43        | hash Not = 0w43
171        | hash Min = 0w47        | hash Max = 0w47
172        | hash Sin = 0w53        | hash Min = 0w53
173        | hash Cos = 0w59        | hash (Dot(a0)) = 0w59 + hashint a0
174        | hash Pow = 0w61        | hash Cross = 0w61
175        | hash (Dot(a0)) = 0w67 + hashint a0        | hash (Select(a0,a1)) = 0w67 + hashty a0 + hashint a1
176        | hash Cross = 0w71        | hash (Norm(a0)) = 0w71 + hashint a0
177        | hash (Select(a0,a1)) = 0w73 + hashty a0 + hashint a1        | hash (Normalize(a0)) = 0w73 + hashint a0
178        | hash (Norm(a0)) = 0w79 + hashint a0        | hash (Scale(a0)) = 0w79 + hashint a0
179        | hash (Scale(a0)) = 0w83 + hashint a0        | hash (InvScale(a0)) = 0w83 + hashint a0
180        | hash (InvScale(a0)) = 0w89 + hashint a0        | hash CL = 0w89
181        | hash CL = 0w97        | hash (PrincipleEvec(a0)) = 0w97 + hashty a0
182        | hash (PrincipleEvec(a0)) = 0w101 + hashty a0        | hash (Trace(a0)) = 0w101 + hashint a0
183        | hash (Trace(a0)) = 0w103 + hashint a0        | hash (Subscript(a0)) = 0w103 + hashty a0
184        | hash (Subscript(a0)) = 0w107 + hashty a0        | hash (Ceiling(a0)) = 0w107 + hashint a0
185        | hash (Ceiling(a0)) = 0w109 + hashint a0        | hash (Floor(a0)) = 0w109 + hashint a0
186        | hash (Floor(a0)) = 0w113 + hashint a0        | hash (Round(a0)) = 0w113 + hashint a0
187        | hash (Round(a0)) = 0w127 + hashint a0        | hash (Trunc(a0)) = 0w127 + hashint a0
188        | hash (Trunc(a0)) = 0w131 + hashint a0        | hash IntToReal = 0w131
189        | hash IntToReal = 0w137        | hash (RealToInt(a0)) = 0w137 + hashint a0
190        | hash (RealToInt(a0)) = 0w139 + hashint a0        | hash (VoxelAddress(a0)) = 0w139 + ImageInfo.hash a0
191        | hash (VoxelAddress(a0)) = 0w149 + ImageInfo.hash a0        | hash (LoadVoxels(a0,a1)) = 0w149 + ImageInfo.hash a0 + hashint a1
192        | hash (LoadVoxels(a0,a1)) = 0w151 + ImageInfo.hash a0 + hashint a1        | hash (PosToImgSpace(a0)) = 0w151 + ImageInfo.hash a0
193        | hash (PosToImgSpace(a0)) = 0w157 + ImageInfo.hash a0        | hash (GradToWorldSpace(a0)) = 0w157 + ImageInfo.hash a0
194        | hash (GradToWorldSpace(a0)) = 0w163 + ImageInfo.hash a0        | hash (EvalKernel(a0,a1,a2)) = 0w163 + hashint a0 + Kernel.hash a1 + hashint a2
195        | hash (EvalKernel(a0,a1,a2)) = 0w167 + hashint a0 + Kernel.hash a1 + hashint a2        | hash (LoadImage(a0)) = 0w167 + ImageInfo.hash a0
196        | hash (LoadImage(a0)) = 0w173 + ImageInfo.hash a0        | hash (Inside(a0,a1)) = 0w173 + ImageInfo.hash a0 + hashint a1
197        | hash (Inside(a0,a1)) = 0w179 + ImageInfo.hash a0 + hashint a1        | hash (Input(a0,a1)) = 0w179 + hashty a0 + hashstring a1
198        | hash (Input(a0,a1)) = 0w181 + hashty a0 + hashstring a1        | hash (InputWithDefault(a0,a1)) = 0w181 + hashty a0 + hashstring a1
       | hash (InputWithDefault(a0,a1)) = 0w191 + hashty a0 + hashstring a1  
199    
200      fun toString (Add(a0)) = concat["Add<", tyToString a0, ">"]      fun toString (Add(a0)) = concat["Add<", tyToString a0, ">"]
201        | toString (Sub(a0)) = concat["Sub<", tyToString a0, ">"]        | toString (Sub(a0)) = concat["Sub<", tyToString a0, ">"]
202        | toString (Mul(a0)) = concat["Mul<", tyToString a0, ">"]        | toString (Mul(a0)) = concat["Mul<", tyToString a0, ">"]
203        | toString (Div(a0)) = concat["Div<", tyToString a0, ">"]        | toString (Div(a0)) = concat["Div<", tyToString a0, ">"]
204        | toString (Neg(a0)) = concat["Neg<", tyToString a0, ">"]        | toString (Neg(a0)) = concat["Neg<", tyToString a0, ">"]
205          | toString (Abs(a0)) = concat["Abs<", tyToString a0, ">"]
206        | toString (LT(a0)) = concat["LT<", tyToString a0, ">"]        | toString (LT(a0)) = concat["LT<", tyToString a0, ">"]
207        | toString (LTE(a0)) = concat["LTE<", tyToString a0, ">"]        | toString (LTE(a0)) = concat["LTE<", tyToString a0, ">"]
208        | toString (EQ(a0)) = concat["EQ<", tyToString a0, ">"]        | toString (EQ(a0)) = concat["EQ<", tyToString a0, ">"]
# Line 215  Line 212 
212        | toString Not = "Not"        | toString Not = "Not"
213        | toString Max = "Max"        | toString Max = "Max"
214        | toString Min = "Min"        | toString Min = "Min"
       | toString Sin = "Sin"  
       | toString Cos = "Cos"  
       | toString Pow = "Pow"  
215        | toString (Dot(a0)) = concat["Dot<", intToString a0, ">"]        | toString (Dot(a0)) = concat["Dot<", intToString a0, ">"]
216        | toString Cross = "Cross"        | toString Cross = "Cross"
217        | toString (Select(a0,a1)) = concat["Select<", tyToString a0, ",", intToString a1, ">"]        | toString (Select(a0,a1)) = concat["Select<", tyToString a0, ",", intToString a1, ">"]
218        | toString (Norm(a0)) = concat["Norm<", intToString a0, ">"]        | toString (Norm(a0)) = concat["Norm<", intToString a0, ">"]
219          | toString (Normalize(a0)) = concat["Normalize<", intToString a0, ">"]
220        | toString (Scale(a0)) = concat["Scale<", intToString a0, ">"]        | toString (Scale(a0)) = concat["Scale<", intToString a0, ">"]
221        | toString (InvScale(a0)) = concat["InvScale<", intToString a0, ">"]        | toString (InvScale(a0)) = concat["InvScale<", intToString a0, ">"]
222        | toString CL = "CL"        | toString CL = "CL"

Legend:
Removed from v.716  
changed lines
  Added in v.717

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