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

SCM Repository

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

Diff of /branches/vis12/src/compiler/high-il/high-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 108  Line 108 
108        | ScaleField        | ScaleField
109        | NegField        | NegField
110        | DiffField        | DiffField
111          | LoadSeq of ty * string
112          | LoadImage of ty * string * ImageInfo.info
113        | Input of input        | Input of input
114        | Print of tys        | Print of tys
115    
# Line 170  Line 172 
172        | resultArity ScaleField = 1        | resultArity ScaleField = 1
173        | resultArity NegField = 1        | resultArity NegField = 1
174        | resultArity DiffField = 1        | resultArity DiffField = 1
175          | resultArity (LoadSeq _) = 1
176          | resultArity (LoadImage _) = 1
177        | resultArity (Input _) = 0        | resultArity (Input _) = 0
178        | resultArity (Print _) = 0        | resultArity (Print _) = 0
179    
# Line 232  Line 236 
236        | arity ScaleField = 2        | arity ScaleField = 2
237        | arity NegField = 1        | arity NegField = 1
238        | arity DiffField = 1        | arity DiffField = 1
239          | arity (LoadSeq _) = 0
240          | arity (LoadImage _) = 0
241        | arity (Input _) = 0        | arity (Input _) = 0
242        | arity (Print _) = ~1        | arity (Print _) = ~1
243    
# Line 294  Line 300 
300        | same (ScaleField, ScaleField) = true        | same (ScaleField, ScaleField) = true
301        | same (NegField, NegField) = true        | same (NegField, NegField) = true
302        | same (DiffField, DiffField) = true        | same (DiffField, DiffField) = true
303          | same (LoadSeq(a0,a1), LoadSeq(b0,b1)) = samety(a0, b0) andalso samestring(a1, b1)
304          | same (LoadImage(a0,a1,a2), LoadImage(b0,b1,b2)) = samety(a0, b0) andalso samestring(a1, b1) andalso ImageInfo.same(a2, b2)
305        | same (Input(a0), Input(b0)) = sameinput(a0, b0)        | same (Input(a0), Input(b0)) = sameinput(a0, b0)
306        | same (Print(a0), Print(b0)) = sametys(a0, b0)        | same (Print(a0), Print(b0)) = sametys(a0, b0)
307        | same _ = false        | same _ = false
# Line 357  Line 365 
365        | hash ScaleField = 0w271        | hash ScaleField = 0w271
366        | hash NegField = 0w277        | hash NegField = 0w277
367        | hash DiffField = 0w281        | hash DiffField = 0w281
368        | hash (Input(a0)) = 0w283 + hashinput a0        | hash (LoadSeq(a0,a1)) = 0w283 + hashty a0 + hashstring a1
369        | hash (Print(a0)) = 0w293 + hashtys a0        | hash (LoadImage(a0,a1,a2)) = 0w293 + hashty a0 + hashstring a1 + ImageInfo.hash a2
370          | hash (Input(a0)) = 0w307 + hashinput a0
371          | hash (Print(a0)) = 0w311 + hashtys a0
372    
373      fun toString (Add(a0)) = concat["Add<", tyToString a0, ">"]      fun toString (Add(a0)) = concat["Add<", tyToString a0, ">"]
374        | toString (Sub(a0)) = concat["Sub<", tyToString a0, ">"]        | toString (Sub(a0)) = concat["Sub<", tyToString a0, ">"]
# Line 419  Line 429 
429        | toString ScaleField = "ScaleField"        | toString ScaleField = "ScaleField"
430        | toString NegField = "NegField"        | toString NegField = "NegField"
431        | toString DiffField = "DiffField"        | toString DiffField = "DiffField"
432          | toString (LoadSeq(a0,a1)) = concat["LoadSeq<", tyToString a0, ",", stringToString a1, ">"]
433          | toString (LoadImage(a0,a1,a2)) = concat["LoadImage<", tyToString a0, ",", stringToString a1, ",", ImageInfo.toString a2, ">"]
434        | toString (Input(a0)) = concat["Input<", inputToString a0, ">"]        | toString (Input(a0)) = concat["Input<", inputToString a0, ">"]
435        | toString (Print(a0)) = concat["Print<", tysToString a0, ">"]        | toString (Print(a0)) = concat["Print<", tysToString a0, ">"]
436    

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