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

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/high-ir/high-ir.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/high-ir/high-ir.sml

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

revision 4479, Thu Sep 1 13:48:18 2016 UTC revision 4480, Thu Sep 1 14:39:27 2016 UTC
# Line 93  Line 93 
93        | BorderCtlWrap of ImageInfo.t        | BorderCtlWrap of ImageInfo.t
94        | LoadSeq of ty * string        | LoadSeq of ty * string
95        | LoadImage of ty * string        | LoadImage of ty * string
96          | StabilizeAll
97        | Print of tys        | Print of tys
98        | MathFn of MathFns.t        | MathFn of MathFns.t
99    
# Line 147  Line 148 
148        | resultArity (BorderCtlWrap _) = 1        | resultArity (BorderCtlWrap _) = 1
149        | resultArity (LoadSeq _) = 1        | resultArity (LoadSeq _) = 1
150        | resultArity (LoadImage _) = 1        | resultArity (LoadImage _) = 1
151          | resultArity StabilizeAll = 0
152        | resultArity (Print _) = 0        | resultArity (Print _) = 0
153        | resultArity (MathFn _) = 1        | resultArity (MathFn _) = 1
154    
# Line 201  Line 203 
203        | arity (BorderCtlWrap _) = 1        | arity (BorderCtlWrap _) = 1
204        | arity (LoadSeq _) = 0        | arity (LoadSeq _) = 0
205        | arity (LoadImage _) = 0        | arity (LoadImage _) = 0
206          | arity StabilizeAll = 0
207        | arity (Print _) = ~1        | arity (Print _) = ~1
208        | arity (MathFn _) = ~1        | arity (MathFn _) = ~1
209    
# Line 208  Line 211 
211        | isPure (Append _) = false        | isPure (Append _) = false
212        | isPure (Prepend _) = false        | isPure (Prepend _) = false
213        | isPure (Concat _) = false        | isPure (Concat _) = false
214          | isPure StabilizeAll = false
215        | isPure (Print _) = false        | isPure (Print _) = false
216        | isPure _ = true        | isPure _ = true
217    
# Line 262  Line 266 
266        | same (BorderCtlWrap(a0), BorderCtlWrap(b0)) = ImageInfo.same(a0, b0)        | same (BorderCtlWrap(a0), BorderCtlWrap(b0)) = ImageInfo.same(a0, b0)
267        | same (LoadSeq(a0,a1), LoadSeq(b0,b1)) = samety(a0, b0) andalso samestring(a1, b1)        | same (LoadSeq(a0,a1), LoadSeq(b0,b1)) = samety(a0, b0) andalso samestring(a1, b1)
268        | same (LoadImage(a0,a1), LoadImage(b0,b1)) = samety(a0, b0) andalso samestring(a1, b1)        | same (LoadImage(a0,a1), LoadImage(b0,b1)) = samety(a0, b0) andalso samestring(a1, b1)
269          | same (StabilizeAll, StabilizeAll) = true
270        | same (Print(a0), Print(b0)) = sametys(a0, b0)        | same (Print(a0), Print(b0)) = sametys(a0, b0)
271        | same (MathFn(a0), MathFn(b0)) = MathFns.same(a0, b0)        | same (MathFn(a0), MathFn(b0)) = MathFns.same(a0, b0)
272        | same _ = false        | same _ = false
# Line 317  Line 322 
322        | hash (BorderCtlWrap(a0)) = 0w229 + ImageInfo.hash a0        | hash (BorderCtlWrap(a0)) = 0w229 + ImageInfo.hash a0
323        | hash (LoadSeq(a0,a1)) = 0w233 + hashty a0 + hashstring a1        | hash (LoadSeq(a0,a1)) = 0w233 + hashty a0 + hashstring a1
324        | hash (LoadImage(a0,a1)) = 0w239 + hashty a0 + hashstring a1        | hash (LoadImage(a0,a1)) = 0w239 + hashty a0 + hashstring a1
325        | hash (Print(a0)) = 0w241 + hashtys a0        | hash StabilizeAll = 0w241
326        | hash (MathFn(a0)) = 0w251 + MathFns.hash a0        | hash (Print(a0)) = 0w251 + hashtys a0
327          | hash (MathFn(a0)) = 0w257 + MathFns.hash a0
328    
329      fun toString IAdd = "IAdd"      fun toString IAdd = "IAdd"
330        | toString ISub = "ISub"        | toString ISub = "ISub"
# Line 371  Line 377 
377        | toString (BorderCtlWrap(a0)) = concat["BorderCtlWrap<", ImageInfo.toString a0, ">"]        | toString (BorderCtlWrap(a0)) = concat["BorderCtlWrap<", ImageInfo.toString a0, ">"]
378        | toString (LoadSeq(a0,a1)) = concat["LoadSeq<", tyToString a0, ",", stringToString a1, ">"]        | toString (LoadSeq(a0,a1)) = concat["LoadSeq<", tyToString a0, ",", stringToString a1, ">"]
379        | toString (LoadImage(a0,a1)) = concat["LoadImage<", tyToString a0, ",", stringToString a1, ">"]        | toString (LoadImage(a0,a1)) = concat["LoadImage<", tyToString a0, ",", stringToString a1, ">"]
380          | toString StabilizeAll = "StabilizeAll"
381        | toString (Print(a0)) = concat["Print<", tysToString a0, ">"]        | toString (Print(a0)) = concat["Print<", tysToString a0, ">"]
382        | toString (MathFn(a0)) = concat["MathFn<", MathFns.toString a0, ">"]        | toString (MathFn(a0)) = concat["MathFn<", MathFns.toString a0, ">"]
383    

Legend:
Removed from v.4479  
changed lines
  Added in v.4480

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