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 2026, Thu Oct 11 00:26:15 2012 UTC revision 2027, Thu Oct 11 10:40:12 2012 UTC
# Line 93  Line 93 
93        | PosToImgSpace of ImageInfo.info        | PosToImgSpace of ImageInfo.info
94        | TensorToWorldSpace of ImageInfo.info * ty        | TensorToWorldSpace of ImageInfo.info * ty
95        | Inside of ImageInfo.info * int        | Inside of ImageInfo.info * int
96          | LoadSeq of ty * string
97          | LoadImage of ty * string * ImageInfo.info
98        | Input of input        | Input of input
99        | Print of tys        | Print of tys
100    
# Line 150  Line 152 
152        | resultArity (PosToImgSpace _) = 1        | resultArity (PosToImgSpace _) = 1
153        | resultArity (TensorToWorldSpace _) = 1        | resultArity (TensorToWorldSpace _) = 1
154        | resultArity (Inside _) = 1        | resultArity (Inside _) = 1
155          | resultArity (LoadSeq _) = 1
156          | resultArity (LoadImage _) = 1
157        | resultArity (Input _) = 0        | resultArity (Input _) = 0
158        | resultArity (Print _) = 0        | resultArity (Print _) = 0
159    
# Line 207  Line 211 
211        | arity (PosToImgSpace _) = 2        | arity (PosToImgSpace _) = 2
212        | arity (TensorToWorldSpace _) = 2        | arity (TensorToWorldSpace _) = 2
213        | arity (Inside _) = 2        | arity (Inside _) = 2
214          | arity (LoadSeq _) = 0
215          | arity (LoadImage _) = 0
216        | arity (Input _) = 0        | arity (Input _) = 0
217        | arity (Print _) = ~1        | arity (Print _) = ~1
218    
# Line 264  Line 270 
270        | same (PosToImgSpace(a0), PosToImgSpace(b0)) = ImageInfo.same(a0, b0)        | same (PosToImgSpace(a0), PosToImgSpace(b0)) = ImageInfo.same(a0, b0)
271        | same (TensorToWorldSpace(a0,a1), TensorToWorldSpace(b0,b1)) = ImageInfo.same(a0, b0) andalso samety(a1, b1)        | same (TensorToWorldSpace(a0,a1), TensorToWorldSpace(b0,b1)) = ImageInfo.same(a0, b0) andalso samety(a1, b1)
272        | 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)
273          | same (LoadSeq(a0,a1), LoadSeq(b0,b1)) = samety(a0, b0) andalso samestring(a1, b1)
274          | same (LoadImage(a0,a1,a2), LoadImage(b0,b1,b2)) = samety(a0, b0) andalso samestring(a1, b1) andalso ImageInfo.same(a2, b2)
275        | same (Input(a0), Input(b0)) = sameinput(a0, b0)        | same (Input(a0), Input(b0)) = sameinput(a0, b0)
276        | same (Print(a0), Print(b0)) = sametys(a0, b0)        | same (Print(a0), Print(b0)) = sametys(a0, b0)
277        | same _ = false        | same _ = false
# Line 322  Line 330 
330        | hash (PosToImgSpace(a0)) = 0w241 + ImageInfo.hash a0        | hash (PosToImgSpace(a0)) = 0w241 + ImageInfo.hash a0
331        | hash (TensorToWorldSpace(a0,a1)) = 0w251 + ImageInfo.hash a0 + hashty a1        | hash (TensorToWorldSpace(a0,a1)) = 0w251 + ImageInfo.hash a0 + hashty a1
332        | hash (Inside(a0,a1)) = 0w257 + ImageInfo.hash a0 + hashint a1        | hash (Inside(a0,a1)) = 0w257 + ImageInfo.hash a0 + hashint a1
333        | hash (Input(a0)) = 0w263 + hashinput a0        | hash (LoadSeq(a0,a1)) = 0w263 + hashty a0 + hashstring a1
334        | hash (Print(a0)) = 0w269 + hashtys a0        | hash (LoadImage(a0,a1,a2)) = 0w269 + hashty a0 + hashstring a1 + ImageInfo.hash a2
335          | hash (Input(a0)) = 0w271 + hashinput a0
336          | hash (Print(a0)) = 0w277 + hashtys a0
337    
338      fun toString (Add(a0)) = concat["Add<", tyToString a0, ">"]      fun toString (Add(a0)) = concat["Add<", tyToString a0, ">"]
339        | toString (Sub(a0)) = concat["Sub<", tyToString a0, ">"]        | toString (Sub(a0)) = concat["Sub<", tyToString a0, ">"]
# Line 379  Line 389 
389        | toString (PosToImgSpace(a0)) = concat["PosToImgSpace<", ImageInfo.toString a0, ">"]        | toString (PosToImgSpace(a0)) = concat["PosToImgSpace<", ImageInfo.toString a0, ">"]
390        | toString (TensorToWorldSpace(a0,a1)) = concat["TensorToWorldSpace<", ImageInfo.toString a0, ",", tyToString a1, ">"]        | toString (TensorToWorldSpace(a0,a1)) = concat["TensorToWorldSpace<", ImageInfo.toString a0, ",", tyToString a1, ">"]
391        | toString (Inside(a0,a1)) = concat["Inside<", ImageInfo.toString a0, ",", intToString a1, ">"]        | toString (Inside(a0,a1)) = concat["Inside<", ImageInfo.toString a0, ",", intToString a1, ">"]
392          | toString (LoadSeq(a0,a1)) = concat["LoadSeq<", tyToString a0, ",", stringToString a1, ">"]
393          | toString (LoadImage(a0,a1,a2)) = concat["LoadImage<", tyToString a0, ",", stringToString a1, ",", ImageInfo.toString a2, ">"]
394        | toString (Input(a0)) = concat["Input<", inputToString a0, ">"]        | toString (Input(a0)) = concat["Input<", inputToString a0, ">"]
395        | toString (Print(a0)) = concat["Print<", tysToString a0, ">"]        | toString (Print(a0)) = concat["Print<", tysToString a0, ">"]
396    

Legend:
Removed from v.2026  
changed lines
  Added in v.2027

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