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

SCM Repository

[diderot] Diff of /trunk/src/compiler/high-il/high-il.sml
ViewVC logotype

Diff of /trunk/src/compiler/high-il/high-il.sml

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

revision 281, Fri Aug 13 17:40:53 2010 UTC revision 282, Fri Aug 13 19:20:23 2010 UTC
# Line 118  Line 118 
118        | arity (Input _) = 0        | arity (Input _) = 0
119        | arity (InputWithDefault _) = 1        | arity (InputWithDefault _) = 1
120    
121      fun same (Add a, Add b) = samety(a, b)      fun same (Add(a0), Add(b0)) = samety(a0, b0)
122        | same (Sub a, Sub b) = samety(a, b)        | same (Sub(a0), Sub(b0)) = samety(a0, b0)
123        | same (Mul a, Mul b) = samety(a, b)        | same (Mul(a0), Mul(b0)) = samety(a0, b0)
124        | same (Div a, Div b) = samety(a, b)        | same (Div(a0), Div(b0)) = samety(a0, b0)
125        | same (Neg a, Neg b) = samety(a, b)        | same (Neg(a0), Neg(b0)) = samety(a0, b0)
126        | same (LT a, LT b) = samety(a, b)        | same (LT(a0), LT(b0)) = samety(a0, b0)
127        | same (LTE a, LTE b) = samety(a, b)        | same (LTE(a0), LTE(b0)) = samety(a0, b0)
128        | same (EQ a, EQ b) = samety(a, b)        | same (EQ(a0), EQ(b0)) = samety(a0, b0)
129        | same (NEQ a, NEQ b) = samety(a, b)        | same (NEQ(a0), NEQ(b0)) = samety(a0, b0)
130        | same (GT a, GT b) = samety(a, b)        | same (GT(a0), GT(b0)) = samety(a0, b0)
131        | same (GTE a, GTE b) = samety(a, b)        | same (GTE(a0), GTE(b0)) = samety(a0, b0)
132        | same (Dot a, Dot b) = samety(a, b)        | same (Dot(a0), Dot(b0)) = samety(a0, b0)
133        | same (Cross, Cross) = true        | same (Cross, Cross) = true
134        | same (Norm a, Norm b) = samety(a, b)        | same (Norm(a0), Norm(b0)) = samety(a0, b0)
135        | same (Scale a, Scale b) = samety(a, b)        | same (Scale(a0), Scale(b0)) = samety(a0, b0)
136        | same (InvScale a, InvScale b) = samety(a, b)        | same (InvScale(a0), InvScale(b0)) = samety(a0, b0)
137        | same (CL, CL) = true        | same (CL, CL) = true
138        | same (PrincipleEvec a, PrincipleEvec b) = samety(a, b)        | same (PrincipleEvec(a0), PrincipleEvec(b0)) = samety(a0, b0)
139        | same (Subscript a, Subscript b) = samety(a, b)        | same (Subscript(a0), Subscript(b0)) = samety(a0, b0)
140        | same (Max, Max) = true        | same (Max, Max) = true
141        | same (Min, Min) = true        | same (Min, Min) = true
142        | same (Sin, Sin) = true        | same (Sin, Sin) = true
# Line 148  Line 148 
148        | same (RoundToInt, RoundToInt) = true        | same (RoundToInt, RoundToInt) = true
149        | same (CeilToInt, CeilToInt) = true        | same (CeilToInt, CeilToInt) = true
150        | same (FloorToInt, FloorToInt) = true        | same (FloorToInt, FloorToInt) = true
151        | same (Kernel a, Kernel b) = Kernel.same(a, b)        | same (Kernel(a0), Kernel(b0)) = Kernel.same(a0, b0)
152        | same (LoadImage a, LoadImage b) = ImageInfo.same(a, b)        | same (LoadImage(a0), LoadImage(b0)) = ImageInfo.same(a0, b0)
153        | same (Convolve, Convolve) = true        | same (Convolve, Convolve) = true
154        | same (Inside, Inside) = true        | same (Inside, Inside) = true
155        | same (Field a, Field b) = FieldDef.same(a, b)        | same (Field(a0), Field(b0)) = FieldDef.same(a0, b0)
156        | same (AddField, AddField) = true        | same (AddField, AddField) = true
157        | same (ScaleField, ScaleField) = true        | same (ScaleField, ScaleField) = true
158        | same (NegField, NegField) = true        | same (NegField, NegField) = true
159        | same (DiffField, DiffField) = true        | same (DiffField, DiffField) = true
160        | same (Probe, Probe) = true        | same (Probe, Probe) = true
161        | same (Transform a, Transform b) = ImageInfo.same(a, b)        | same (Transform(a0), Transform(b0)) = ImageInfo.same(a0, b0)
162        | same (Input a, Input b) = samestring(a, b)        | same (Input(a0), Input(b0)) = samestring(a0, b0)
163        | same (InputWithDefault a, InputWithDefault b) = samestring(a, b)        | same (InputWithDefault(a0), InputWithDefault(b0)) = samestring(a0, b0)
164        | same _ = false        | same _ = false
165    
166      fun hash (Add a) = 0w3 + hashty a      fun hash (Add(a0)) = 0w3 + hashty a0
167        | hash (Sub a) = 0w5 + hashty a        | hash (Sub(a0)) = 0w5 + hashty a0
168        | hash (Mul a) = 0w7 + hashty a        | hash (Mul(a0)) = 0w7 + hashty a0
169        | hash (Div a) = 0w11 + hashty a        | hash (Div(a0)) = 0w11 + hashty a0
170        | hash (Neg a) = 0w13 + hashty a        | hash (Neg(a0)) = 0w13 + hashty a0
171        | hash (LT a) = 0w17 + hashty a        | hash (LT(a0)) = 0w17 + hashty a0
172        | hash (LTE a) = 0w19 + hashty a        | hash (LTE(a0)) = 0w19 + hashty a0
173        | hash (EQ a) = 0w23 + hashty a        | hash (EQ(a0)) = 0w23 + hashty a0
174        | hash (NEQ a) = 0w29 + hashty a        | hash (NEQ(a0)) = 0w29 + hashty a0
175        | hash (GT a) = 0w31 + hashty a        | hash (GT(a0)) = 0w31 + hashty a0
176        | hash (GTE a) = 0w37 + hashty a        | hash (GTE(a0)) = 0w37 + hashty a0
177        | hash (Dot a) = 0w41 + hashty a        | hash (Dot(a0)) = 0w41 + hashty a0
178        | hash Cross = 0w43        | hash Cross = 0w43
179        | hash (Norm a) = 0w47 + hashty a        | hash (Norm(a0)) = 0w47 + hashty a0
180        | hash (Scale a) = 0w53 + hashty a        | hash (Scale(a0)) = 0w53 + hashty a0
181        | hash (InvScale a) = 0w59 + hashty a        | hash (InvScale(a0)) = 0w59 + hashty a0
182        | hash CL = 0w61        | hash CL = 0w61
183        | hash (PrincipleEvec a) = 0w67 + hashty a        | hash (PrincipleEvec(a0)) = 0w67 + hashty a0
184        | hash (Subscript a) = 0w71 + hashty a        | hash (Subscript(a0)) = 0w71 + hashty a0
185        | hash Max = 0w73        | hash Max = 0w73
186        | hash Min = 0w79        | hash Min = 0w79
187        | hash Sin = 0w83        | hash Sin = 0w83
# Line 193  Line 193 
193        | hash RoundToInt = 0w109        | hash RoundToInt = 0w109
194        | hash CeilToInt = 0w113        | hash CeilToInt = 0w113
195        | hash FloorToInt = 0w127        | hash FloorToInt = 0w127
196        | hash (Kernel a) = 0w131 + Kernel.hash a        | hash (Kernel(a0)) = 0w131 + Kernel.hash a0
197        | hash (LoadImage a) = 0w137 + ImageInfo.hash a        | hash (LoadImage(a0)) = 0w137 + ImageInfo.hash a0
198        | hash Convolve = 0w139        | hash Convolve = 0w139
199        | hash Inside = 0w149        | hash Inside = 0w149
200        | hash (Field a) = 0w151 + FieldDef.hash a        | hash (Field(a0)) = 0w151 + FieldDef.hash a0
201        | hash AddField = 0w157        | hash AddField = 0w157
202        | hash ScaleField = 0w163        | hash ScaleField = 0w163
203        | hash NegField = 0w167        | hash NegField = 0w167
204        | hash DiffField = 0w173        | hash DiffField = 0w173
205        | hash Probe = 0w179        | hash Probe = 0w179
206        | hash (Transform a) = 0w181 + ImageInfo.hash a        | hash (Transform(a0)) = 0w181 + ImageInfo.hash a0
207        | hash (Input a) = 0w191 + hashstring a        | hash (Input(a0)) = 0w191 + hashstring a0
208        | hash (InputWithDefault a) = 0w193 + hashstring a        | hash (InputWithDefault(a0)) = 0w193 + hashstring a0
209    
210      fun toString (Add a) = concat["Add(", tyToString a, ")"]      fun toString (Add(a0)) = concat["Add<", tyToString a0, ">"]
211        | toString (Sub a) = concat["Sub(", tyToString a, ")"]        | toString (Sub(a0)) = concat["Sub<", tyToString a0, ">"]
212        | toString (Mul a) = concat["Mul(", tyToString a, ")"]        | toString (Mul(a0)) = concat["Mul<", tyToString a0, ">"]
213        | toString (Div a) = concat["Div(", tyToString a, ")"]        | toString (Div(a0)) = concat["Div<", tyToString a0, ">"]
214        | toString (Neg a) = concat["Neg(", tyToString a, ")"]        | toString (Neg(a0)) = concat["Neg<", tyToString a0, ">"]
215        | toString (LT a) = concat["LT(", tyToString a, ")"]        | toString (LT(a0)) = concat["LT<", tyToString a0, ">"]
216        | toString (LTE a) = concat["LTE(", tyToString a, ")"]        | toString (LTE(a0)) = concat["LTE<", tyToString a0, ">"]
217        | toString (EQ a) = concat["EQ(", tyToString a, ")"]        | toString (EQ(a0)) = concat["EQ<", tyToString a0, ">"]
218        | toString (NEQ a) = concat["NEQ(", tyToString a, ")"]        | toString (NEQ(a0)) = concat["NEQ<", tyToString a0, ">"]
219        | toString (GT a) = concat["GT(", tyToString a, ")"]        | toString (GT(a0)) = concat["GT<", tyToString a0, ">"]
220        | toString (GTE a) = concat["GTE(", tyToString a, ")"]        | toString (GTE(a0)) = concat["GTE<", tyToString a0, ">"]
221        | toString (Dot a) = concat["Dot(", tyToString a, ")"]        | toString (Dot(a0)) = concat["Dot<", tyToString a0, ">"]
222        | toString Cross = "Cross"        | toString Cross = "Cross"
223        | toString (Norm a) = concat["Norm(", tyToString a, ")"]        | toString (Norm(a0)) = concat["Norm<", tyToString a0, ">"]
224        | toString (Scale a) = concat["Scale(", tyToString a, ")"]        | toString (Scale(a0)) = concat["Scale<", tyToString a0, ">"]
225        | toString (InvScale a) = concat["InvScale(", tyToString a, ")"]        | toString (InvScale(a0)) = concat["InvScale<", tyToString a0, ">"]
226        | toString CL = "CL"        | toString CL = "CL"
227        | toString (PrincipleEvec a) = concat["PrincipleEvec(", tyToString a, ")"]        | toString (PrincipleEvec(a0)) = concat["PrincipleEvec<", tyToString a0, ">"]
228        | toString (Subscript a) = concat["Subscript(", tyToString a, ")"]        | toString (Subscript(a0)) = concat["Subscript<", tyToString a0, ">"]
229        | toString Max = "Max"        | toString Max = "Max"
230        | toString Min = "Min"        | toString Min = "Min"
231        | toString Sin = "Sin"        | toString Sin = "Sin"
# Line 237  Line 237 
237        | toString RoundToInt = "RoundToInt"        | toString RoundToInt = "RoundToInt"
238        | toString CeilToInt = "CeilToInt"        | toString CeilToInt = "CeilToInt"
239        | toString FloorToInt = "FloorToInt"        | toString FloorToInt = "FloorToInt"
240        | toString (Kernel a) = concat["Kernel(", Kernel.toString a, ")"]        | toString (Kernel(a0)) = concat["Kernel<", Kernel.toString a0, ">"]
241        | toString (LoadImage a) = concat["LoadImage(", ImageInfo.toString a, ")"]        | toString (LoadImage(a0)) = concat["LoadImage<", ImageInfo.toString a0, ">"]
242        | toString Convolve = "Convolve"        | toString Convolve = "Convolve"
243        | toString Inside = "Inside"        | toString Inside = "Inside"
244        | toString (Field a) = concat["Field(", FieldDef.toString a, ")"]        | toString (Field(a0)) = concat["Field<", FieldDef.toString a0, ">"]
245        | toString AddField = "AddField"        | toString AddField = "AddField"
246        | toString ScaleField = "ScaleField"        | toString ScaleField = "ScaleField"
247        | toString NegField = "NegField"        | toString NegField = "NegField"
248        | toString DiffField = "DiffField"        | toString DiffField = "DiffField"
249        | toString Probe = "Probe"        | toString Probe = "Probe"
250        | toString (Transform a) = concat["Transform(", ImageInfo.toString a, ")"]        | toString (Transform(a0)) = concat["Transform<", ImageInfo.toString a0, ">"]
251        | toString (Input a) = concat["Input(", stringToString a, ")"]        | toString (Input(a0)) = concat["Input<", stringToString a0, ">"]
252        | toString (InputWithDefault a) = concat["InputWithDefault(", stringToString a, ")"]        | toString (InputWithDefault(a0)) = concat["InputWithDefault<", stringToString a0, ">"]
253    
254    end    end
255    

Legend:
Removed from v.281  
changed lines
  Added in v.282

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