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

SCM Repository

[diderot] Diff of /branches/vis12/src/compiler/low-il/low-il.sml
ViewVC logotype

Diff of /branches/vis12/src/compiler/low-il/low-il.sml

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

revision 1688, Wed Jan 25 13:36:13 2012 UTC revision 1689, Wed Jan 25 14:55:43 2012 UTC
# Line 68  Line 68 
68        | Select of ty * int        | Select of ty * int
69        | Index of ty * int        | Index of ty * int
70        | Subscript of ty        | Subscript of ty
71          | MkDynamic of ty * int
72          | Append of ty
73          | Prepend of ty
74          | Concat of ty
75        | Ceiling of int        | Ceiling of int
76        | Floor of int        | Floor of int
77        | Round of int        | Round of int
# Line 119  Line 123 
123        | resultArity (Select _) = 1        | resultArity (Select _) = 1
124        | resultArity (Index _) = 1        | resultArity (Index _) = 1
125        | resultArity (Subscript _) = 1        | resultArity (Subscript _) = 1
126          | resultArity (MkDynamic _) = 1
127          | resultArity (Append _) = 2
128          | resultArity (Prepend _) = 2
129          | resultArity (Concat _) = 2
130        | resultArity (Ceiling _) = 1        | resultArity (Ceiling _) = 1
131        | resultArity (Floor _) = 1        | resultArity (Floor _) = 1
132        | resultArity (Round _) = 1        | resultArity (Round _) = 1
# Line 170  Line 178 
178        | arity (Select _) = 1        | arity (Select _) = 1
179        | arity (Index _) = 1        | arity (Index _) = 1
180        | arity (Subscript _) = 2        | arity (Subscript _) = 2
181          | arity (MkDynamic _) = 1
182          | arity (Append _) = 1
183          | arity (Prepend _) = 1
184          | arity (Concat _) = 1
185        | arity (Ceiling _) = 1        | arity (Ceiling _) = 1
186        | arity (Floor _) = 1        | arity (Floor _) = 1
187        | arity (Round _) = 1        | arity (Round _) = 1
# Line 221  Line 233 
233        | 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)
234        | same (Index(a0,a1), Index(b0,b1)) = samety(a0, b0) andalso sameint(a1, b1)        | same (Index(a0,a1), Index(b0,b1)) = samety(a0, b0) andalso sameint(a1, b1)
235        | same (Subscript(a0), Subscript(b0)) = samety(a0, b0)        | same (Subscript(a0), Subscript(b0)) = samety(a0, b0)
236          | same (MkDynamic(a0,a1), MkDynamic(b0,b1)) = samety(a0, b0) andalso sameint(a1, b1)
237          | same (Append(a0), Append(b0)) = samety(a0, b0)
238          | same (Prepend(a0), Prepend(b0)) = samety(a0, b0)
239          | same (Concat(a0), Concat(b0)) = samety(a0, b0)
240        | same (Ceiling(a0), Ceiling(b0)) = sameint(a0, b0)        | same (Ceiling(a0), Ceiling(b0)) = sameint(a0, b0)
241        | same (Floor(a0), Floor(b0)) = sameint(a0, b0)        | same (Floor(a0), Floor(b0)) = sameint(a0, b0)
242        | same (Round(a0), Round(b0)) = sameint(a0, b0)        | same (Round(a0), Round(b0)) = sameint(a0, b0)
# Line 273  Line 289 
289        | hash (Select(a0,a1)) = 0w139 + hashty a0 + hashint a1        | hash (Select(a0,a1)) = 0w139 + hashty a0 + hashint a1
290        | hash (Index(a0,a1)) = 0w149 + hashty a0 + hashint a1        | hash (Index(a0,a1)) = 0w149 + hashty a0 + hashint a1
291        | hash (Subscript(a0)) = 0w151 + hashty a0        | hash (Subscript(a0)) = 0w151 + hashty a0
292        | hash (Ceiling(a0)) = 0w157 + hashint a0        | hash (MkDynamic(a0,a1)) = 0w157 + hashty a0 + hashint a1
293        | hash (Floor(a0)) = 0w163 + hashint a0        | hash (Append(a0)) = 0w163 + hashty a0
294        | hash (Round(a0)) = 0w167 + hashint a0        | hash (Prepend(a0)) = 0w167 + hashty a0
295        | hash (Trunc(a0)) = 0w173 + hashint a0        | hash (Concat(a0)) = 0w173 + hashty a0
296        | hash IntToReal = 0w179        | hash (Ceiling(a0)) = 0w179 + hashint a0
297        | hash (RealToInt(a0)) = 0w181 + hashint a0        | hash (Floor(a0)) = 0w181 + hashint a0
298        | hash (ImageAddress(a0)) = 0w191 + ImageInfo.hash a0        | hash (Round(a0)) = 0w191 + hashint a0
299        | hash (LoadVoxels(a0,a1)) = 0w193 + ImageInfo.hash a0 + hashint a1        | hash (Trunc(a0)) = 0w193 + hashint a0
300        | hash (PosToImgSpace(a0)) = 0w197 + ImageInfo.hash a0        | hash IntToReal = 0w197
301        | hash (TensorToWorldSpace(a0,a1)) = 0w199 + ImageInfo.hash a0 + hashty a1        | hash (RealToInt(a0)) = 0w199 + hashint a0
302        | hash (LoadImage(a0)) = 0w211 + ImageInfo.hash a0        | hash (ImageAddress(a0)) = 0w211 + ImageInfo.hash a0
303        | hash (Inside(a0,a1)) = 0w223 + ImageInfo.hash a0 + hashint a1        | hash (LoadVoxels(a0,a1)) = 0w223 + ImageInfo.hash a0 + hashint a1
304        | hash (Input(a0,a1,a2)) = 0w227 + hashty a0 + hashstring a1 + hashstring a2        | hash (PosToImgSpace(a0)) = 0w227 + ImageInfo.hash a0
305        | hash (InputWithDefault(a0,a1,a2)) = 0w229 + hashty a0 + hashstring a1 + hashstring a2        | hash (TensorToWorldSpace(a0,a1)) = 0w229 + ImageInfo.hash a0 + hashty a1
306        | hash (Print(a0)) = 0w233 + hashtys a0        | hash (LoadImage(a0)) = 0w233 + ImageInfo.hash a0
307          | hash (Inside(a0,a1)) = 0w239 + ImageInfo.hash a0 + hashint a1
308          | hash (Input(a0,a1,a2)) = 0w241 + hashty a0 + hashstring a1 + hashstring a2
309          | hash (InputWithDefault(a0,a1,a2)) = 0w251 + hashty a0 + hashstring a1 + hashstring a2
310          | hash (Print(a0)) = 0w257 + hashtys a0
311    
312      fun toString (Add(a0)) = concat["Add<", tyToString a0, ">"]      fun toString (Add(a0)) = concat["Add<", tyToString a0, ">"]
313        | toString (Sub(a0)) = concat["Sub<", tyToString a0, ">"]        | toString (Sub(a0)) = concat["Sub<", tyToString a0, ">"]
# Line 324  Line 344 
344        | toString (Select(a0,a1)) = concat["Select<", tyToString a0, ",", intToString a1, ">"]        | toString (Select(a0,a1)) = concat["Select<", tyToString a0, ",", intToString a1, ">"]
345        | toString (Index(a0,a1)) = concat["Index<", tyToString a0, ",", intToString a1, ">"]        | toString (Index(a0,a1)) = concat["Index<", tyToString a0, ",", intToString a1, ">"]
346        | toString (Subscript(a0)) = concat["Subscript<", tyToString a0, ">"]        | toString (Subscript(a0)) = concat["Subscript<", tyToString a0, ">"]
347          | toString (MkDynamic(a0,a1)) = concat["MkDynamic<", tyToString a0, ",", intToString a1, ">"]
348          | toString (Append(a0)) = concat["Append<", tyToString a0, ">"]
349          | toString (Prepend(a0)) = concat["Prepend<", tyToString a0, ">"]
350          | toString (Concat(a0)) = concat["Concat<", tyToString a0, ">"]
351        | toString (Ceiling(a0)) = concat["Ceiling<", intToString a0, ">"]        | toString (Ceiling(a0)) = concat["Ceiling<", intToString a0, ">"]
352        | toString (Floor(a0)) = concat["Floor<", intToString a0, ">"]        | toString (Floor(a0)) = concat["Floor<", intToString a0, ">"]
353        | toString (Round(a0)) = concat["Round<", intToString a0, ">"]        | toString (Round(a0)) = concat["Round<", intToString a0, ">"]

Legend:
Removed from v.1688  
changed lines
  Added in v.1689

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