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

SCM Repository

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

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

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

revision 1520, Sun Oct 9 18:45:46 2011 UTC revision 1521, Mon Oct 10 14:19:33 2011 UTC
# Line 65  Line 65 
65        | Normalize of ty        | Normalize of ty
66        | Scale of ty        | Scale of ty
67        | PrincipleEvec of ty        | PrincipleEvec of ty
68          | Eigen2x2
69          | Eigen3x3
70        | Identity of int        | Identity of int
71        | Zero of ty        | Zero of ty
72        | Trace of ty        | Trace of ty
73        | Slice of ty * mask        | Slice of ty * mask
74        | Subscript of ty        | Subscript of ty
75          | Select of ty * int
76          | Index of ty
77        | IntToReal        | IntToReal
78        | TruncToInt        | TruncToInt
79        | RoundToInt        | RoundToInt
# Line 116  Line 120 
120        | arity (Normalize _) = 1        | arity (Normalize _) = 1
121        | arity (Scale _) = 2        | arity (Scale _) = 2
122        | arity (PrincipleEvec _) = 2        | arity (PrincipleEvec _) = 2
123          | arity Eigen2x2 = 1
124          | arity Eigen3x3 = 1
125        | arity (Identity _) = 0        | arity (Identity _) = 0
126        | arity (Zero _) = 0        | arity (Zero _) = 0
127        | arity (Trace _) = 1        | arity (Trace _) = 1
128        | arity (Slice _) = 1        | arity (Slice _) = 1
129        | arity (Subscript _) = ~1        | arity (Subscript _) = ~1
130          | arity (Select _) = 1
131          | arity (Index _) = 2
132        | arity IntToReal = 1        | arity IntToReal = 1
133        | arity TruncToInt = 1        | arity TruncToInt = 1
134        | arity RoundToInt = 1        | arity RoundToInt = 1
# Line 167  Line 175 
175        | same (Normalize(a0), Normalize(b0)) = samety(a0, b0)        | same (Normalize(a0), Normalize(b0)) = samety(a0, b0)
176        | same (Scale(a0), Scale(b0)) = samety(a0, b0)        | same (Scale(a0), Scale(b0)) = samety(a0, b0)
177        | same (PrincipleEvec(a0), PrincipleEvec(b0)) = samety(a0, b0)        | same (PrincipleEvec(a0), PrincipleEvec(b0)) = samety(a0, b0)
178          | same (Eigen2x2, Eigen2x2) = true
179          | same (Eigen3x3, Eigen3x3) = true
180        | same (Identity(a0), Identity(b0)) = sameint(a0, b0)        | same (Identity(a0), Identity(b0)) = sameint(a0, b0)
181        | same (Zero(a0), Zero(b0)) = samety(a0, b0)        | same (Zero(a0), Zero(b0)) = samety(a0, b0)
182        | same (Trace(a0), Trace(b0)) = samety(a0, b0)        | same (Trace(a0), Trace(b0)) = samety(a0, b0)
183        | same (Slice(a0,a1), Slice(b0,b1)) = samety(a0, b0) andalso samemask(a1, b1)        | same (Slice(a0,a1), Slice(b0,b1)) = samety(a0, b0) andalso samemask(a1, b1)
184        | same (Subscript(a0), Subscript(b0)) = samety(a0, b0)        | same (Subscript(a0), Subscript(b0)) = samety(a0, b0)
185          | same (Select(a0,a1), Select(b0,b1)) = samety(a0, b0) andalso sameint(a1, b1)
186          | same (Index(a0), Index(b0)) = samety(a0, b0)
187        | same (IntToReal, IntToReal) = true        | same (IntToReal, IntToReal) = true
188        | same (TruncToInt, TruncToInt) = true        | same (TruncToInt, TruncToInt) = true
189        | same (RoundToInt, RoundToInt) = true        | same (RoundToInt, RoundToInt) = true
# Line 219  Line 231 
231        | hash (Normalize(a0)) = 0w103 + hashty a0        | hash (Normalize(a0)) = 0w103 + hashty a0
232        | hash (Scale(a0)) = 0w107 + hashty a0        | hash (Scale(a0)) = 0w107 + hashty a0
233        | hash (PrincipleEvec(a0)) = 0w109 + hashty a0        | hash (PrincipleEvec(a0)) = 0w109 + hashty a0
234        | hash (Identity(a0)) = 0w113 + hashint a0        | hash Eigen2x2 = 0w113
235        | hash (Zero(a0)) = 0w127 + hashty a0        | hash Eigen3x3 = 0w127
236        | hash (Trace(a0)) = 0w131 + hashty a0        | hash (Identity(a0)) = 0w131 + hashint a0
237        | hash (Slice(a0,a1)) = 0w137 + hashty a0 + hashmask a1        | hash (Zero(a0)) = 0w137 + hashty a0
238        | hash (Subscript(a0)) = 0w139 + hashty a0        | hash (Trace(a0)) = 0w139 + hashty a0
239        | hash IntToReal = 0w149        | hash (Slice(a0,a1)) = 0w149 + hashty a0 + hashmask a1
240        | hash TruncToInt = 0w151        | hash (Subscript(a0)) = 0w151 + hashty a0
241        | hash RoundToInt = 0w157        | hash (Select(a0,a1)) = 0w157 + hashty a0 + hashint a1
242        | hash CeilToInt = 0w163        | hash (Index(a0)) = 0w163 + hashty a0
243        | hash FloorToInt = 0w167        | hash IntToReal = 0w167
244        | hash (Kernel(a0,a1)) = 0w173 + Kernel.hash a0 + hashint a1        | hash TruncToInt = 0w173
245        | hash (LoadImage(a0)) = 0w179 + ImageInfo.hash a0        | hash RoundToInt = 0w179
246        | hash (Inside(a0)) = 0w181 + hashint a0        | hash CeilToInt = 0w181
247        | hash (Field(a0)) = 0w191 + hashint a0        | hash FloorToInt = 0w191
248        | hash (Probe(a0,a1)) = 0w193 + hashty a0 + hashty a1        | hash (Kernel(a0,a1)) = 0w193 + Kernel.hash a0 + hashint a1
249        | hash AddField = 0w197        | hash (LoadImage(a0)) = 0w197 + ImageInfo.hash a0
250        | hash SubField = 0w199        | hash (Inside(a0)) = 0w199 + hashint a0
251        | hash ScaleField = 0w211        | hash (Field(a0)) = 0w211 + hashint a0
252        | hash NegField = 0w223        | hash (Probe(a0,a1)) = 0w223 + hashty a0 + hashty a1
253        | hash DiffField = 0w227        | hash AddField = 0w227
254        | hash (Input(a0,a1,a2)) = 0w229 + hashty a0 + hashstring a1 + hashstring a2        | hash SubField = 0w229
255        | hash (InputWithDefault(a0,a1,a2)) = 0w233 + hashty a0 + hashstring a1 + hashstring a2        | hash ScaleField = 0w233
256          | hash NegField = 0w239
257          | hash DiffField = 0w241
258          | hash (Input(a0,a1,a2)) = 0w251 + hashty a0 + hashstring a1 + hashstring a2
259          | hash (InputWithDefault(a0,a1,a2)) = 0w257 + hashty a0 + hashstring a1 + hashstring a2
260    
261      fun toString (Add(a0)) = concat["Add<", tyToString a0, ">"]      fun toString (Add(a0)) = concat["Add<", tyToString a0, ">"]
262        | toString (Sub(a0)) = concat["Sub<", tyToString a0, ">"]        | toString (Sub(a0)) = concat["Sub<", tyToString a0, ">"]
# Line 270  Line 286 
286        | toString (Normalize(a0)) = concat["Normalize<", tyToString a0, ">"]        | toString (Normalize(a0)) = concat["Normalize<", tyToString a0, ">"]
287        | toString (Scale(a0)) = concat["Scale<", tyToString a0, ">"]        | toString (Scale(a0)) = concat["Scale<", tyToString a0, ">"]
288        | toString (PrincipleEvec(a0)) = concat["PrincipleEvec<", tyToString a0, ">"]        | toString (PrincipleEvec(a0)) = concat["PrincipleEvec<", tyToString a0, ">"]
289          | toString Eigen2x2 = "Eigen2x2"
290          | toString Eigen3x3 = "Eigen3x3"
291        | toString (Identity(a0)) = concat["Identity<", intToString a0, ">"]        | toString (Identity(a0)) = concat["Identity<", intToString a0, ">"]
292        | toString (Zero(a0)) = concat["Zero<", tyToString a0, ">"]        | toString (Zero(a0)) = concat["Zero<", tyToString a0, ">"]
293        | toString (Trace(a0)) = concat["Trace<", tyToString a0, ">"]        | toString (Trace(a0)) = concat["Trace<", tyToString a0, ">"]
294        | toString (Slice(a0,a1)) = concat["Slice<", tyToString a0, ",", maskToString a1, ">"]        | toString (Slice(a0,a1)) = concat["Slice<", tyToString a0, ",", maskToString a1, ">"]
295        | toString (Subscript(a0)) = concat["Subscript<", tyToString a0, ">"]        | toString (Subscript(a0)) = concat["Subscript<", tyToString a0, ">"]
296          | toString (Select(a0,a1)) = concat["Select<", tyToString a0, ",", intToString a1, ">"]
297          | toString (Index(a0)) = concat["Index<", tyToString a0, ">"]
298        | toString IntToReal = "IntToReal"        | toString IntToReal = "IntToReal"
299        | toString TruncToInt = "TruncToInt"        | toString TruncToInt = "TruncToInt"
300        | toString RoundToInt = "RoundToInt"        | toString RoundToInt = "RoundToInt"

Legend:
Removed from v.1520  
changed lines
  Added in v.1521

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