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

SCM Repository

[diderot] Diff of /branches/charisee/src/compiler/tree-il/treeOps.sml
ViewVC logotype

Diff of /branches/charisee/src/compiler/tree-il/treeOps.sml

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

revision 2627, Sat May 17 00:44:22 2014 UTC revision 2628, Wed May 21 04:02:06 2014 UTC
# Line 24  Line 24 
24    
25    (* required helper functions for the int type *)    (* required helper functions for the int type *)
26      fun sameint (i1 : int, i2) = (i1 = i2)      fun sameint (i1 : int, i2) = (i1 = i2)
       fun samereal (i1, i2) = sameint(Real.floor i1,Real.floor  i2)  
27      fun hashint i = Word.fromInt i      fun hashint i = Word.fromInt i
     fun hashreal i = Word.fromInt(Real.floor  i)  
28      fun intToString i = Int.toString i      fun intToString i = Int.toString i
      fun realToString i = Int.toString(Real.floor (i))  
29    
30    (* required helper functions for the string type *)    (* required helper functions for the string type *)
31      fun samestring (s1 : string, s2) = (s1 = s2)      fun samestring (s1 : string, s2) = (s1 = s2)
# Line 41  Line 38 
38        | IMul        | IMul
39        | IDiv        | IDiv
40        | INeg        | INeg
41          | C of int
42          | V of int * int * ty * ty
43          | S of int * ty * ty
44          | addSca
45          | subSca
46          | prodSca
47          | divSca
48          | addVec of int
49          | subVec of int
50          | prodVec of int
51          | prodScaV of int
52          | sumVec of int
53        | Abs of ty        | Abs of ty
54        | LT of ty        | LT of ty
55        | LTE of ty        | LTE of ty
# Line 51  Line 60 
60        | Not        | Not
61        | Max        | Max
62        | Min        | Min
   
       | addSca  
       | subSca  
       | prodSca  
       | divSca  
       | addVec of int  
       | subVec of int  
       | prodVec of int  
       | prodScaV of int  
       | sumVec of int  
  | V of int * int * ty * ty  
  | S of int * ty * ty  
  | imgAddr of ImageInfo.info * ty * int  
  | imgLoad of ImageInfo.info * int * int  
   
63        | Clamp of ty        | Clamp of ty
64        | Lerp of ty        | Lerp of ty
65        | Norm of ty        | Norm of ty
# Line 98  Line 92 
92        | Inside of ImageInfo.info * int        | Inside of ImageInfo.info * int
93        | LoadSeq of ty * string        | LoadSeq of ty * string
94        | LoadImage of ImageInfo.info        | LoadImage of ImageInfo.info
95          | imgAddr of ImageInfo.info * ty * int
96          | imgLoad of ImageInfo.info * int * int
97        | Input of ty * string * string        | Input of ty * string * string
98        | InputWithDefault of ty * string * string        | InputWithDefault of ty * string * string
99        | Print of tys        | Print of tys
# Line 107  Line 103 
103        | resultArity IMul = 1        | resultArity IMul = 1
104        | resultArity IDiv = 1        | resultArity IDiv = 1
105        | resultArity INeg = 1        | resultArity INeg = 1
106        | resultArity (Abs _) = 1        | resultArity (C _) = 1
       | resultArity (LT _) = 1  
       | resultArity (LTE _) = 1  
       | resultArity (EQ _) = 1  
       | resultArity (NEQ _) = 1  
       | resultArity (GT _) = 1  
       | resultArity (GTE _) = 1  
       | resultArity Not = 1  
       | resultArity Max = 1  
       | resultArity Min = 1  
   
107        | resultArity (V _) = 1        | resultArity (V _) = 1
108        | resultArity (S _) = 1        | resultArity (S _) = 1
109        | resultArity addSca = 1        | resultArity addSca = 1
110        | resultArity subSca = 1        | resultArity subSca = 1
111        | resultArity prodSca = 1        | resultArity prodSca = 1
112        | resultArity divSca = 1        | resultArity divSca = 1
       | resultArity (imgAddr _) = 1  
       | resultArity (imgLoad _) = 1  
113        | resultArity (addVec _) = 1        | resultArity (addVec _) = 1
114        | resultArity (subVec _) = 1        | resultArity (subVec _) = 1
115        | resultArity (prodVec _) = 1        | resultArity (prodVec _) = 1
116        | resultArity (prodScaV _) = 1        | resultArity (prodScaV _) = 1
117        | resultArity (sumVec _) = 1        | resultArity (sumVec _) = 1
118          | resultArity (Abs _) = 1
119          | resultArity (LT _) = 1
120          | resultArity (LTE _) = 1
121          | resultArity (EQ _) = 1
122          | resultArity (NEQ _) = 1
123          | resultArity (GT _) = 1
124          | resultArity (GTE _) = 1
125          | resultArity Not = 1
126          | resultArity Max = 1
127          | resultArity Min = 1
128        | resultArity (Clamp _) = 1        | resultArity (Clamp _) = 1
129        | resultArity (Lerp _) = 1        | resultArity (Lerp _) = 1
130        | resultArity (Norm _) = 1        | resultArity (Norm _) = 1
# Line 163  Line 157 
157        | resultArity (Inside _) = 1        | resultArity (Inside _) = 1
158        | resultArity (LoadSeq _) = 1        | resultArity (LoadSeq _) = 1
159        | resultArity (LoadImage _) = 1        | resultArity (LoadImage _) = 1
160          | resultArity (imgAddr _) = 1
161          | resultArity (imgLoad _) = 1
162        | resultArity (Input _) = 1        | resultArity (Input _) = 1
163        | resultArity (InputWithDefault _) = 1        | resultArity (InputWithDefault _) = 1
164        | resultArity (Print _) = 0        | resultArity (Print _) = 0
# Line 172  Line 168 
168        | arity IMul = 2        | arity IMul = 2
169        | arity IDiv = 2        | arity IDiv = 2
170        | arity INeg = 1        | arity INeg = 1
171        | arity (Abs _) = 1        | arity (C _) = 2
       | arity (LT _) = 2  
       | arity (LTE _) = 2  
       | arity (EQ _) = 2  
       | arity (NEQ _) = 2  
       | arity (GT _) = 2  
       | arity (GTE _) = 2  
       | arity Not = 1  
       | arity Max = 2  
       | arity Min = 2  
   
172        | arity (V _) = 2        | arity (V _) = 2
173        | arity (S _) = 2        | arity (S _) = 2
174        | arity addSca = 2        | arity addSca = 2
175        | arity subSca = 2        | arity subSca = 2
176        | arity prodSca = 2        | arity prodSca = 2
177        | arity divSca = 2        | arity divSca = 2
       | arity (imgAddr _) = 2  
       | arity (imgLoad _) = 2  
178        | arity (addVec _) = 2        | arity (addVec _) = 2
179        | arity (subVec _) = 2        | arity (subVec _) = 2
180        | arity (prodVec _) = 2        | arity (prodVec _) = 2
181        | arity (prodScaV _) = 2        | arity (prodScaV _) = 2
182        | arity (sumVec _) = 1        | arity (sumVec _) = 2
183          | arity (Abs _) = 1
184          | arity (LT _) = 2
185          | arity (LTE _) = 2
186          | arity (EQ _) = 2
187          | arity (NEQ _) = 2
188          | arity (GT _) = 2
189          | arity (GTE _) = 2
190          | arity Not = 1
191          | arity Max = 2
192          | arity Min = 2
193        | arity (Clamp _) = 3        | arity (Clamp _) = 3
194        | arity (Lerp _) = 3        | arity (Lerp _) = 3
195        | arity (Norm _) = 1        | arity (Norm _) = 1
# Line 228  Line 222 
222        | arity (Inside _) = 2        | arity (Inside _) = 2
223        | arity (LoadSeq _) = 0        | arity (LoadSeq _) = 0
224        | arity (LoadImage _) = 0        | arity (LoadImage _) = 0
225          | arity (imgAddr _) = 2
226          | arity (imgLoad _) = 2
227        | arity (Input _) = 0        | arity (Input _) = 0
228        | arity (InputWithDefault _) = 1        | arity (InputWithDefault _) = 1
229        | arity (Print _) = ~1        | arity (Print _) = ~1
# Line 244  Line 240 
240        | same (IMul, IMul) = true        | same (IMul, IMul) = true
241        | same (IDiv, IDiv) = true        | same (IDiv, IDiv) = true
242        | same (INeg, INeg) = true        | same (INeg, INeg) = true
243          | same (C(a0), C(b0)) = sameint(a0, b0)
244          | same (V(a0,a1,a2,a3), V(b0,b1,b2,b3)) = sameint(a0, b0) andalso sameint(a1, b1) andalso samety(a2, b2) andalso samety(a3, b3)
245          | same (S(a0,a1,a2), S(b0,b1,b2)) = sameint(a0, b0) andalso samety(a1, b1) andalso samety(a2, b2)
246          | same (addSca, addSca) = true
247          | same (subSca, subSca) = true
248          | same (prodSca, prodSca) = true
249          | same (divSca, divSca) = true
250          | same (addVec(a0), addVec(b0)) = sameint(a0, b0)
251          | same (subVec(a0), subVec(b0)) = sameint(a0, b0)
252          | same (prodVec(a0), prodVec(b0)) = sameint(a0, b0)
253          | same (prodScaV(a0), prodScaV(b0)) = sameint(a0, b0)
254          | same (sumVec(a0), sumVec(b0)) = sameint(a0, b0)
255        | same (Abs(a0), Abs(b0)) = samety(a0, b0)        | same (Abs(a0), Abs(b0)) = samety(a0, b0)
256        | same (LT(a0), LT(b0)) = samety(a0, b0)        | same (LT(a0), LT(b0)) = samety(a0, b0)
257        | same (LTE(a0), LTE(b0)) = samety(a0, b0)        | same (LTE(a0), LTE(b0)) = samety(a0, b0)
# Line 254  Line 262 
262        | same (Not, Not) = true        | same (Not, Not) = true
263        | same (Max, Max) = true        | same (Max, Max) = true
264        | same (Min, Min) = true        | same (Min, Min) = true
   
       | same (V(a0,a1,a2,a3), V(b0,b1,b2,b3)) = sameint(a0, b0) andalso sameint(a1, b1) andalso samety(a2, b2) andalso samety(a3, b3)  
       | same (S(a0,a1,a2), S(b0,b1,b2)) = sameint(a0, b0) andalso samety(a1, b1) andalso samety(a2, b2)  
       | same (addSca, addSca) = true  
       | same (subSca, subSca) = true  
       | same (prodSca, prodSca) = true  
       | same (divSca, divSca) = true  
       | same (imgAddr(a0,a1,a2), imgAddr(b0,b1,b2)) = ImageInfo.same(a0, b0) andalso samety(a1, b1) andalso sameint(a2, b2)  
       | same (imgLoad(a0,a1,a2), imgLoad(b0,b1,b2)) = ImageInfo.same(a0, b0) andalso sameint(a1, b1) andalso sameint(a2, b2)  
       | same (addVec(a0), addVec(b0)) =sameint(a0, b0)  
       | same (subVec(a0), subVec(b0)) =  
             sameint(a0, b0)  
       | same (prodVec(a0), prodVec(b0)) =  
         sameint(a0, b0)  
       | same (prodScaV(a0), prodScaV(b0)) =  
             sameint(a0, b0)  
       | same (sumVec(a0), sumVec(b0)) = sameint(a0, b0)  
265        | same (Clamp(a0), Clamp(b0)) = samety(a0, b0)        | same (Clamp(a0), Clamp(b0)) = samety(a0, b0)
266        | same (Lerp(a0), Lerp(b0)) = samety(a0, b0)        | same (Lerp(a0), Lerp(b0)) = samety(a0, b0)
267        | same (Norm(a0), Norm(b0)) = samety(a0, b0)        | same (Norm(a0), Norm(b0)) = samety(a0, b0)
# Line 303  Line 294 
294        | same (Inside(a0,a1), Inside(b0,b1)) = ImageInfo.same(a0, b0) andalso sameint(a1, b1)        | same (Inside(a0,a1), Inside(b0,b1)) = ImageInfo.same(a0, b0) andalso sameint(a1, b1)
295        | same (LoadSeq(a0,a1), LoadSeq(b0,b1)) = samety(a0, b0) andalso samestring(a1, b1)        | same (LoadSeq(a0,a1), LoadSeq(b0,b1)) = samety(a0, b0) andalso samestring(a1, b1)
296        | same (LoadImage(a0), LoadImage(b0)) = ImageInfo.same(a0, b0)        | same (LoadImage(a0), LoadImage(b0)) = ImageInfo.same(a0, b0)
297          | same (imgAddr(a0,a1,a2), imgAddr(b0,b1,b2)) = ImageInfo.same(a0, b0) andalso samety(a1, b1) andalso sameint(a2, b2)
298          | same (imgLoad(a0,a1,a2), imgLoad(b0,b1,b2)) = ImageInfo.same(a0, b0) andalso sameint(a1, b1) andalso sameint(a2, b2)
299        | same (Input(a0,a1,a2), Input(b0,b1,b2)) = samety(a0, b0) andalso samestring(a1, b1) andalso samestring(a2, b2)        | same (Input(a0,a1,a2), Input(b0,b1,b2)) = samety(a0, b0) andalso samestring(a1, b1) andalso samestring(a2, b2)
300        | same (InputWithDefault(a0,a1,a2), InputWithDefault(b0,b1,b2)) = samety(a0, b0) andalso samestring(a1, b1) andalso samestring(a2, b2)        | same (InputWithDefault(a0,a1,a2), InputWithDefault(b0,b1,b2)) = samety(a0, b0) andalso samestring(a1, b1) andalso samestring(a2, b2)
301        | same (Print(a0), Print(b0)) = sametys(a0, b0)        | same (Print(a0), Print(b0)) = sametys(a0, b0)
# Line 313  Line 306 
306        | hash IMul = 0w7        | hash IMul = 0w7
307        | hash IDiv = 0w11        | hash IDiv = 0w11
308        | hash INeg = 0w13        | hash INeg = 0w13
309        | hash (Abs(a0)) = 0w17 + hashty a0        | hash (C(a0)) = 0w17 + hashint a0
310        | hash (LT(a0)) = 0w19 + hashty a0        | hash (V(a0,a1,a2,a3)) = 0w19 + hashint a0 + hashint a1 + hashty a2 + hashty a3
311        | hash (LTE(a0)) = 0w23 + hashty a0        | hash (S(a0,a1,a2)) = 0w23 + hashint a0 + hashty a1 + hashty a2
312        | hash (EQ(a0)) = 0w29 + hashty a0        | hash addSca = 0w29
313        | hash (NEQ(a0)) = 0w31 + hashty a0        | hash subSca = 0w31
314        | hash (GT(a0)) = 0w37 + hashty a0        | hash prodSca = 0w37
315        | hash (GTE(a0)) = 0w41 + hashty a0        | hash divSca = 0w41
316        | hash Not = 0w43        | hash (addVec(a0)) = 0w43 + hashint a0
317        | hash Max = 0w47        | hash (subVec(a0)) = 0w47 + hashint a0
318        | hash Min = 0w53        | hash (prodVec(a0)) = 0w53 + hashint a0
319        | hash (V(a0,a1,a2,a3)) = 0w67 + hashint a0 + hashint a1 + hashty a2 + hashty a3        | hash (prodScaV(a0)) = 0w59 + hashint a0
320        | hash (S(a0,a1,a2)) = 0w71 + hashint a0 + hashty a1 + hashty a2        | hash (sumVec(a0)) = 0w61 + hashint a0
321        | hash addSca = 0w73        | hash (Abs(a0)) = 0w67 + hashty a0
322        | hash subSca = 0w79        | hash (LT(a0)) = 0w71 + hashty a0
323        | hash prodSca = 0w83        | hash (LTE(a0)) = 0w73 + hashty a0
324        | hash divSca = 0w89        | hash (EQ(a0)) = 0w79 + hashty a0
325        | hash (imgAddr(a0,a1,a2)) = 0w101 + ImageInfo.hash a0 + hashty a1 + hashint a2        | hash (NEQ(a0)) = 0w83 + hashty a0
326        | hash (imgLoad(a0,a1,a2)) = 0w103 + ImageInfo.hash a0 + hashint a1 + hashint a2        | hash (GT(a0)) = 0w89 + hashty a0
327        | hash (addVec(a0)) = 0w107 + hashint a0        | hash (GTE(a0)) = 0w97 + hashty a0
328        | hash (subVec(a0)) = 0w107 + hashint a0        | hash Not = 0w101
329        | hash (prodVec(a0)) = 0w107 + hashint a0        | hash Max = 0w103
330        | hash (prodScaV(a0)) = 0w107 + hashint a0        | hash Min = 0w107
331        | hash (sumVec(a0)) = 0w107 + hashint a0        | hash (Clamp(a0)) = 0w109 + hashty a0
332        | hash (Clamp(a0)) = 0w137 + hashty a0        | hash (Lerp(a0)) = 0w113 + hashty a0
333        | hash (Lerp(a0)) = 0w139 + hashty a0        | hash (Norm(a0)) = 0w127 + hashty a0
334        | hash (Norm(a0)) = 0w149 + hashty a0        | hash (Normalize(a0)) = 0w131 + hashint a0
335        | hash (Normalize(a0)) = 0w151 + hashint a0        | hash (PrincipleEvec(a0)) = 0w137 + hashty a0
336        | hash (PrincipleEvec(a0)) = 0w157 + hashty a0        | hash EigenVecs2x2 = 0w139
337        | hash EigenVecs2x2 = 0w163        | hash EigenVecs3x3 = 0w149
338        | hash EigenVecs3x3 = 0w167        | hash EigenVals2x2 = 0w151
339        | hash EigenVals2x2 = 0w173        | hash EigenVals3x3 = 0w157
340        | hash EigenVals3x3 = 0w179        | hash (Zero(a0)) = 0w163 + hashty a0
341        | hash (Zero(a0)) = 0w181 + hashty a0        | hash (Select(a0,a1)) = 0w167 + hashty a0 + hashint a1
342        | hash (Select(a0,a1)) = 0w191 + hashty a0 + hashint a1        | hash (Index(a0,a1)) = 0w173 + hashty a0 + hashint a1
343        | hash (Index(a0,a1)) = 0w193 + hashty a0 + hashint a1        | hash (Subscript(a0)) = 0w179 + hashty a0
344        | hash (Subscript(a0)) = 0w197 + hashty a0        | hash (MkDynamic(a0,a1)) = 0w181 + hashty a0 + hashint a1
345        | hash (MkDynamic(a0,a1)) = 0w199 + hashty a0 + hashint a1        | hash (Append(a0)) = 0w191 + hashty a0
346        | hash (Append(a0)) = 0w211 + hashty a0        | hash (Prepend(a0)) = 0w193 + hashty a0
347        | hash (Prepend(a0)) = 0w223 + hashty a0        | hash (Concat(a0)) = 0w197 + hashty a0
348        | hash (Concat(a0)) = 0w227 + hashty a0        | hash (Length(a0)) = 0w199 + hashty a0
349        | hash (Length(a0)) = 0w229 + hashty a0        | hash (Ceiling(a0)) = 0w211 + hashint a0
350        | hash (Ceiling(a0)) = 0w233 + hashint a0        | hash (Floor(a0)) = 0w223 + hashint a0
351        | hash (Floor(a0)) = 0w239 + hashint a0        | hash (Round(a0)) = 0w227 + hashint a0
352        | hash (Round(a0)) = 0w241 + hashint a0        | hash (Trunc(a0)) = 0w229 + hashint a0
353        | hash (Trunc(a0)) = 0w251 + hashint a0        | hash IntToReal = 0w233
354        | hash IntToReal = 0w257        | hash (RealToInt(a0)) = 0w239 + hashint a0
355        | hash (RealToInt(a0)) = 0w263 + hashint a0        | hash (Transform(a0)) = 0w241 + ImageInfo.hash a0
356        | hash (Transform(a0)) = 0w269 + ImageInfo.hash a0        | hash (Translate(a0)) = 0w251 + ImageInfo.hash a0
357        | hash (Translate(a0)) = 0w271 + ImageInfo.hash a0        | hash (Kernel(a0,a1)) = 0w257 + Kernel.hash a0 + hashint a1
358        | hash (Kernel(a0,a1)) = 0w277 + Kernel.hash a0 + hashint a1        | hash (ImageAddress(a0)) = 0w263 + ImageInfo.hash a0
359        | hash (ImageAddress(a0)) = 0w281 + ImageInfo.hash a0        | hash (LoadVoxels(a0,a1)) = 0w269 + ImageInfo.hash a0 + hashint a1
360        | hash (LoadVoxels(a0,a1)) = 0w283 + ImageInfo.hash a0 + hashint a1        | hash (Inside(a0,a1)) = 0w271 + ImageInfo.hash a0 + hashint a1
361        | hash (Inside(a0,a1)) = 0w293 + ImageInfo.hash a0 + hashint a1        | hash (LoadSeq(a0,a1)) = 0w277 + hashty a0 + hashstring a1
362        | hash (LoadSeq(a0,a1)) = 0w307 + hashty a0 + hashstring a1        | hash (LoadImage(a0)) = 0w281 + ImageInfo.hash a0
363        | hash (LoadImage(a0)) = 0w311 + ImageInfo.hash a0        | hash (imgAddr(a0,a1,a2)) = 0w283 + ImageInfo.hash a0 + hashty a1 + hashint a2
364        | hash (Input(a0,a1,a2)) = 0w313 + hashty a0 + hashstring a1 + hashstring a2        | hash (imgLoad(a0,a1,a2)) = 0w293 + ImageInfo.hash a0 + hashint a1 + hashint a2
365        | hash (InputWithDefault(a0,a1,a2)) = 0w317 + hashty a0 + hashstring a1 + hashstring a2        | hash (Input(a0,a1,a2)) = 0w307 + hashty a0 + hashstring a1 + hashstring a2
366        | hash (Print(a0)) = 0w331 + hashtys a0        | hash (InputWithDefault(a0,a1,a2)) = 0w311 + hashty a0 + hashstring a1 + hashstring a2
367          | hash (Print(a0)) = 0w313 + hashtys a0
368    
369      fun toString IAdd = "IAdd"      fun toString IAdd = "IAdd"
370        | toString ISub = "ISub"        | toString ISub = "ISub"
371        | toString IMul = "IMul"        | toString IMul = "IMul"
372        | toString IDiv = "IDiv"        | toString IDiv = "IDiv"
373        | toString INeg = "INeg"        | toString INeg = "INeg"
374        | toString (Abs(a0)) = concat["Abs<", tyToString a0, ">"]        | toString (C(a0)) = concat["C<", intToString a0, ">"]
       | toString (LT(a0)) = concat["LT<", tyToString a0, ">"]  
       | toString (LTE(a0)) = concat["LTE<", tyToString a0, ">"]  
       | toString (EQ(a0)) = concat["EQ<", tyToString a0, ">"]  
       | toString (NEQ(a0)) = concat["NEQ<", tyToString a0, ">"]  
       | toString (GT(a0)) = concat["GT<", tyToString a0, ">"]  
       | toString (GTE(a0)) = concat["GTE<", tyToString a0, ">"]  
       | toString Not = "Not"  
       | toString Max = "Max"  
       | toString Min = "Min"  
   
375        | toString (V(a0,a1,a2,a3)) = concat["V<", intToString a0, ",", intToString a1, ",", tyToString a2, ",", tyToString a3, ">"]        | toString (V(a0,a1,a2,a3)) = concat["V<", intToString a0, ",", intToString a1, ",", tyToString a2, ",", tyToString a3, ">"]
376        | toString (S(a0,a1,a2)) = concat["S<", intToString a0, ",", tyToString a1, ",", tyToString a2, ">"]        | toString (S(a0,a1,a2)) = concat["S<", intToString a0, ",", tyToString a1, ",", tyToString a2, ">"]
377        | toString addSca = "addSca"        | toString addSca = "addSca"
378        | toString subSca = "subSca"        | toString subSca = "subSca"
379        | toString prodSca = "prodSca"        | toString prodSca = "prodSca"
380        | toString divSca = "divSca"        | toString divSca = "divSca"
       | toString (imgAddr(a0,a1,a2)) = concat["imgAddr<", ImageInfo.toString a0, ",", tyToString a1, ",", intToString a2, ">"]  
       | toString (imgLoad(a0,a1,a2)) = concat["imgLoad<", ImageInfo.toString a0, ",", intToString a1, ",", intToString a2, ">"]  
381        | toString (addVec(a0)) = concat["addVec<", intToString a0,">"]        | toString (addVec(a0)) = concat["addVec<", intToString a0,">"]
382        | toString (subVec(a0)) = concat["subVec<", intToString a0,">"]        | toString (subVec(a0)) = concat["subVec<", intToString a0,">"]
383        | toString (prodVec(a0)) = concat["prodVec<", intToString a0,">"]        | toString (prodVec(a0)) = concat["prodVec<", intToString a0,">"]
384        | toString (prodScaV(a0)) = concat["prodScaVec<", intToString a0,">"]        | toString (prodScaV(a0)) = concat["prodScaV<", intToString a0, ">"]
385        | toString (sumVec(a0)) = concat["sumVec<", intToString a0,">"]        | toString (sumVec(a0)) = concat["sumVec<", intToString a0,">"]
386          | toString (Abs(a0)) = concat["Abs<", tyToString a0, ">"]
387          | toString (LT(a0)) = concat["LT<", tyToString a0, ">"]
388          | toString (LTE(a0)) = concat["LTE<", tyToString a0, ">"]
389          | toString (EQ(a0)) = concat["EQ<", tyToString a0, ">"]
390          | toString (NEQ(a0)) = concat["NEQ<", tyToString a0, ">"]
391          | toString (GT(a0)) = concat["GT<", tyToString a0, ">"]
392          | toString (GTE(a0)) = concat["GTE<", tyToString a0, ">"]
393          | toString Not = "Not"
394          | toString Max = "Max"
395          | toString Min = "Min"
396        | toString (Clamp(a0)) = concat["Clamp<", tyToString a0, ">"]        | toString (Clamp(a0)) = concat["Clamp<", tyToString a0, ">"]
397        | toString (Lerp(a0)) = concat["Lerp<", tyToString a0, ">"]        | toString (Lerp(a0)) = concat["Lerp<", tyToString a0, ">"]
398        | toString (Norm(a0)) = concat["Norm<", tyToString a0, ">"]        | toString (Norm(a0)) = concat["Norm<", tyToString a0, ">"]
# Line 433  Line 425 
425        | toString (Inside(a0,a1)) = concat["Inside<", ImageInfo.toString a0, ",", intToString a1, ">"]        | toString (Inside(a0,a1)) = concat["Inside<", ImageInfo.toString a0, ",", intToString a1, ">"]
426        | toString (LoadSeq(a0,a1)) = concat["LoadSeq<", tyToString a0, ",", stringToString a1, ">"]        | toString (LoadSeq(a0,a1)) = concat["LoadSeq<", tyToString a0, ",", stringToString a1, ">"]
427        | toString (LoadImage(a0)) = concat["LoadImage<", ImageInfo.toString a0, ">"]        | toString (LoadImage(a0)) = concat["LoadImage<", ImageInfo.toString a0, ">"]
428          | toString (imgAddr(a0,a1,a2)) = concat["imgAddr<", ImageInfo.toString a0, ",", tyToString a1, ",", intToString a2, ">"]
429          | toString (imgLoad(a0,a1,a2)) = concat["imgLoad<", ImageInfo.toString a0, ",", intToString a1, ",", intToString a2, ">"]
430        | toString (Input(a0,a1,a2)) = concat["Input<", tyToString a0, ",", stringToString a1, ",", stringToString a2, ">"]        | toString (Input(a0,a1,a2)) = concat["Input<", tyToString a0, ",", stringToString a1, ",", stringToString a2, ">"]
431        | toString (InputWithDefault(a0,a1,a2)) = concat["InputWithDefault<", tyToString a0, ",", stringToString a1, ",", stringToString a2, ">"]        | toString (InputWithDefault(a0,a1,a2)) = concat["InputWithDefault<", tyToString a0, ",", stringToString a1, ",", stringToString a2, ">"]
432        | toString (Print(a0)) = concat["Print<", tysToString a0, ">"]        | toString (Print(a0)) = concat["Print<", tysToString a0, ">"]
433    
434    end    end
435    
   
   

Legend:
Removed from v.2627  
changed lines
  Added in v.2628

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