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

SCM Repository

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

Diff of /branches/vis15/src/compiler/mid-ir/mid-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 108  Line 108 
108        | BorderCtlWrap of ImageInfo.t        | BorderCtlWrap of ImageInfo.t
109        | LoadSeq of ty * string        | LoadSeq of ty * string
110        | LoadImage of ty * string        | LoadImage of ty * string
111          | StabilizeAll
112        | Print of tys        | Print of tys
113        | MathFn of MathFns.t        | MathFn of MathFns.t
114    
# Line 171  Line 172 
172        | resultArity (BorderCtlWrap _) = 1        | resultArity (BorderCtlWrap _) = 1
173        | resultArity (LoadSeq _) = 1        | resultArity (LoadSeq _) = 1
174        | resultArity (LoadImage _) = 1        | resultArity (LoadImage _) = 1
175          | resultArity StabilizeAll = 0
176        | resultArity (Print _) = 0        | resultArity (Print _) = 0
177        | resultArity (MathFn _) = 1        | resultArity (MathFn _) = 1
178    
# Line 234  Line 236 
236        | arity (BorderCtlWrap _) = 1        | arity (BorderCtlWrap _) = 1
237        | arity (LoadSeq _) = 0        | arity (LoadSeq _) = 0
238        | arity (LoadImage _) = 0        | arity (LoadImage _) = 0
239          | arity StabilizeAll = 0
240        | arity (Print _) = ~1        | arity (Print _) = ~1
241        | arity (MathFn _) = ~1        | arity (MathFn _) = ~1
242    
# Line 241  Line 244 
244        | isPure (Append _) = false        | isPure (Append _) = false
245        | isPure (Prepend _) = false        | isPure (Prepend _) = false
246        | isPure (Concat _) = false        | isPure (Concat _) = false
247          | isPure StabilizeAll = false
248        | isPure (Print _) = false        | isPure (Print _) = false
249        | isPure _ = true        | isPure _ = true
250    
# Line 304  Line 308 
308        | same (BorderCtlWrap(a0), BorderCtlWrap(b0)) = ImageInfo.same(a0, b0)        | same (BorderCtlWrap(a0), BorderCtlWrap(b0)) = ImageInfo.same(a0, b0)
309        | 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)
310        | 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)
311          | same (StabilizeAll, StabilizeAll) = true
312        | same (Print(a0), Print(b0)) = sametys(a0, b0)        | same (Print(a0), Print(b0)) = sametys(a0, b0)
313        | same (MathFn(a0), MathFn(b0)) = MathFns.same(a0, b0)        | same (MathFn(a0), MathFn(b0)) = MathFns.same(a0, b0)
314        | same _ = false        | same _ = false
# Line 368  Line 373 
373        | hash (BorderCtlWrap(a0)) = 0w277 + ImageInfo.hash a0        | hash (BorderCtlWrap(a0)) = 0w277 + ImageInfo.hash a0
374        | hash (LoadSeq(a0,a1)) = 0w281 + hashty a0 + hashstring a1        | hash (LoadSeq(a0,a1)) = 0w281 + hashty a0 + hashstring a1
375        | hash (LoadImage(a0,a1)) = 0w283 + hashty a0 + hashstring a1        | hash (LoadImage(a0,a1)) = 0w283 + hashty a0 + hashstring a1
376        | hash (Print(a0)) = 0w293 + hashtys a0        | hash StabilizeAll = 0w293
377        | hash (MathFn(a0)) = 0w307 + MathFns.hash a0        | hash (Print(a0)) = 0w307 + hashtys a0
378          | hash (MathFn(a0)) = 0w311 + MathFns.hash a0
379    
380      fun toString IAdd = "IAdd"      fun toString IAdd = "IAdd"
381        | toString ISub = "ISub"        | toString ISub = "ISub"
# Line 431  Line 437 
437        | toString (BorderCtlWrap(a0)) = concat["BorderCtlWrap<", ImageInfo.toString a0, ">"]        | toString (BorderCtlWrap(a0)) = concat["BorderCtlWrap<", ImageInfo.toString a0, ">"]
438        | toString (LoadSeq(a0,a1)) = concat["LoadSeq<", tyToString a0, ",", stringToString a1, ">"]        | toString (LoadSeq(a0,a1)) = concat["LoadSeq<", tyToString a0, ",", stringToString a1, ">"]
439        | toString (LoadImage(a0,a1)) = concat["LoadImage<", tyToString a0, ",", stringToString a1, ">"]        | toString (LoadImage(a0,a1)) = concat["LoadImage<", tyToString a0, ",", stringToString a1, ">"]
440          | toString StabilizeAll = "StabilizeAll"
441        | toString (Print(a0)) = concat["Print<", tysToString a0, ">"]        | toString (Print(a0)) = concat["Print<", tysToString a0, ">"]
442        | toString (MathFn(a0)) = concat["MathFn<", MathFns.toString a0, ">"]        | toString (MathFn(a0)) = concat["MathFn<", MathFns.toString a0, ">"]
443    

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