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 3510, Fri Dec 18 16:37:24 2015 UTC revision 3511, Fri Dec 18 17:43:38 2015 UTC
# Line 103  Line 103 
103        | LoadSeq of ty * string        | LoadSeq of ty * string
104        | LoadImage of ty * string        | LoadImage of ty * string
105        | Print of tys        | Print of tys
106          | MathFn of MathFns.t
107    
108      fun resultArity IAdd = 1      fun resultArity IAdd = 1
109        | resultArity ISub = 1        | resultArity ISub = 1
# Line 162  Line 163 
163        | resultArity (LoadSeq _) = 1        | resultArity (LoadSeq _) = 1
164        | resultArity (LoadImage _) = 1        | resultArity (LoadImage _) = 1
165        | resultArity (Print _) = 0        | resultArity (Print _) = 0
166          | resultArity (MathFn _) = 1
167    
168      fun arity IAdd = 2      fun arity IAdd = 2
169        | arity ISub = 2        | arity ISub = 2
# Line 221  Line 223 
223        | arity (LoadSeq _) = 0        | arity (LoadSeq _) = 0
224        | arity (LoadImage _) = 0        | arity (LoadImage _) = 0
225        | arity (Print _) = ~1        | arity (Print _) = ~1
226          | arity (MathFn _) = ~1
227    
228      fun isPure (MkDynamic _) = false      fun isPure (MkDynamic _) = false
229        | isPure (Append _) = false        | isPure (Append _) = false
# Line 287  Line 290 
290        | 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)
291        | 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)
292        | same (Print(a0), Print(b0)) = sametys(a0, b0)        | same (Print(a0), Print(b0)) = sametys(a0, b0)
293          | same (MathFn(a0), MathFn(b0)) = MathFns.same(a0, b0)
294        | same _ = false        | same _ = false
295    
296      fun hash IAdd = 0w3      fun hash IAdd = 0w3
# Line 347  Line 351 
351        | hash (LoadSeq(a0,a1)) = 0w269 + hashty a0 + hashstring a1        | hash (LoadSeq(a0,a1)) = 0w269 + hashty a0 + hashstring a1
352        | hash (LoadImage(a0,a1)) = 0w271 + hashty a0 + hashstring a1        | hash (LoadImage(a0,a1)) = 0w271 + hashty a0 + hashstring a1
353        | hash (Print(a0)) = 0w277 + hashtys a0        | hash (Print(a0)) = 0w277 + hashtys a0
354          | hash (MathFn(a0)) = 0w281 + MathFns.hash a0
355    
356      fun toString IAdd = "IAdd"      fun toString IAdd = "IAdd"
357        | toString ISub = "ISub"        | toString ISub = "ISub"
# Line 406  Line 411 
411        | toString (LoadSeq(a0,a1)) = concat["LoadSeq<", tyToString a0, ",", stringToString a1, ">"]        | toString (LoadSeq(a0,a1)) = concat["LoadSeq<", tyToString a0, ",", stringToString a1, ">"]
412        | toString (LoadImage(a0,a1)) = concat["LoadImage<", tyToString a0, ",", stringToString a1, ">"]        | toString (LoadImage(a0,a1)) = concat["LoadImage<", tyToString a0, ",", stringToString a1, ">"]
413        | toString (Print(a0)) = concat["Print<", tysToString a0, ">"]        | toString (Print(a0)) = concat["Print<", tysToString a0, ">"]
414          | toString (MathFn(a0)) = concat["MathFn<", MathFns.toString a0, ">"]
415    
416    end    end
417    

Legend:
Removed from v.3510  
changed lines
  Added in v.3511

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