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

SCM Repository

[diderot] Diff of /branches/pure-cfg/src/compiler/mid-il/mid-il.sml
ViewVC logotype

Diff of /branches/pure-cfg/src/compiler/mid-il/mid-il.sml

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

revision 1249, Thu May 19 00:37:17 2011 UTC revision 1250, Thu May 19 02:20:28 2011 UTC
# Line 72  Line 72 
72        | EvalKernel of int * Kernel.kernel * int        | EvalKernel of int * Kernel.kernel * int
73        | LoadImage of ImageInfo.info        | LoadImage of ImageInfo.info
74        | Inside of ImageInfo.info * int        | Inside of ImageInfo.info * int
75        | Input of ty * string        | Input of ty * string * string
76        | InputWithDefault of ty * string        | InputWithDefault of ty * string * string
77    
78      fun arity (Add _) = 2      fun arity (Add _) = 2
79        | arity (Sub _) = 2        | arity (Sub _) = 2
# Line 166  Line 166 
166        | same (EvalKernel(a0,a1,a2), EvalKernel(b0,b1,b2)) = sameint(a0, b0) andalso Kernel.same(a1, b1) andalso sameint(a2, b2)        | same (EvalKernel(a0,a1,a2), EvalKernel(b0,b1,b2)) = sameint(a0, b0) andalso Kernel.same(a1, b1) andalso sameint(a2, b2)
167        | same (LoadImage(a0), LoadImage(b0)) = ImageInfo.same(a0, b0)        | same (LoadImage(a0), LoadImage(b0)) = ImageInfo.same(a0, b0)
168        | 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)
169        | same (Input(a0,a1), Input(b0,b1)) = samety(a0, b0) andalso samestring(a1, b1)        | same (Input(a0,a1,a2), Input(b0,b1,b2)) = samety(a0, b0) andalso samestring(a1, b1) andalso samestring(a2, b2)
170        | same (InputWithDefault(a0,a1), InputWithDefault(b0,b1)) = samety(a0, b0) andalso samestring(a1, b1)        | same (InputWithDefault(a0,a1,a2), InputWithDefault(b0,b1,b2)) = samety(a0, b0) andalso samestring(a1, b1) andalso samestring(a2, b2)
171        | same _ = false        | same _ = false
172    
173      fun hash (Add(a0)) = 0w3 + hashty a0      fun hash (Add(a0)) = 0w3 + hashty a0
# Line 214  Line 214 
214        | hash (EvalKernel(a0,a1,a2)) = 0w191 + hashint a0 + Kernel.hash a1 + hashint a2        | hash (EvalKernel(a0,a1,a2)) = 0w191 + hashint a0 + Kernel.hash a1 + hashint a2
215        | hash (LoadImage(a0)) = 0w193 + ImageInfo.hash a0        | hash (LoadImage(a0)) = 0w193 + ImageInfo.hash a0
216        | hash (Inside(a0,a1)) = 0w197 + ImageInfo.hash a0 + hashint a1        | hash (Inside(a0,a1)) = 0w197 + ImageInfo.hash a0 + hashint a1
217        | hash (Input(a0,a1)) = 0w199 + hashty a0 + hashstring a1        | hash (Input(a0,a1,a2)) = 0w199 + hashty a0 + hashstring a1 + hashstring a2
218        | hash (InputWithDefault(a0,a1)) = 0w211 + hashty a0 + hashstring a1        | hash (InputWithDefault(a0,a1,a2)) = 0w211 + hashty a0 + hashstring a1 + hashstring a2
219    
220      fun toString (Add(a0)) = concat["Add<", tyToString a0, ">"]      fun toString (Add(a0)) = concat["Add<", tyToString a0, ">"]
221        | toString (Sub(a0)) = concat["Sub<", tyToString a0, ">"]        | toString (Sub(a0)) = concat["Sub<", tyToString a0, ">"]
# Line 261  Line 261 
261        | toString (EvalKernel(a0,a1,a2)) = concat["EvalKernel<", intToString a0, ",", Kernel.toString a1, ",", intToString a2, ">"]        | toString (EvalKernel(a0,a1,a2)) = concat["EvalKernel<", intToString a0, ",", Kernel.toString a1, ",", intToString a2, ">"]
262        | toString (LoadImage(a0)) = concat["LoadImage<", ImageInfo.toString a0, ">"]        | toString (LoadImage(a0)) = concat["LoadImage<", ImageInfo.toString a0, ">"]
263        | toString (Inside(a0,a1)) = concat["Inside<", ImageInfo.toString a0, ",", intToString a1, ">"]        | toString (Inside(a0,a1)) = concat["Inside<", ImageInfo.toString a0, ",", intToString a1, ">"]
264        | toString (Input(a0,a1)) = concat["Input<", tyToString a0, ",", stringToString a1, ">"]        | toString (Input(a0,a1,a2)) = concat["Input<", tyToString a0, ",", stringToString a1, ",", stringToString a2, ">"]
265        | toString (InputWithDefault(a0,a1)) = concat["InputWithDefault<", tyToString a0, ",", stringToString a1, ">"]        | toString (InputWithDefault(a0,a1,a2)) = concat["InputWithDefault<", tyToString a0, ",", stringToString a1, ",", stringToString a2, ">"]
266    
267    end    end
268    

Legend:
Removed from v.1249  
changed lines
  Added in v.1250

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