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

SCM Repository

[diderot] Diff of /trunk/src/compiler/mid-il/mid-il.sml
ViewVC logotype

Diff of /trunk/src/compiler/mid-il/mid-il.sml

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

revision 1295, Thu Jun 9 06:42:54 2011 UTC revision 1301, Thu Jun 9 23:58:40 2011 UTC
# Line 73  Line 73 
73        | EvalKernel of int * Kernel.kernel * int        | EvalKernel of int * Kernel.kernel * int
74        | LoadImage of ImageInfo.info        | LoadImage of ImageInfo.info
75        | Inside of ImageInfo.info * int        | Inside of ImageInfo.info * int
76        | Input of ty * string        | Input of ty * string * string
77        | InputWithDefault of ty * string        | InputWithDefault of ty * string * string
78    
79      fun arity (Add _) = 2      fun arity (Add _) = 2
80        | arity (Sub _) = 2        | arity (Sub _) = 2
# Line 169  Line 169 
169        | 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)
170        | same (LoadImage(a0), LoadImage(b0)) = ImageInfo.same(a0, b0)        | same (LoadImage(a0), LoadImage(b0)) = ImageInfo.same(a0, b0)
171        | 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)
172        | 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)
173        | 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)
174        | same _ = false        | same _ = false
175    
176      fun hash (Add(a0)) = 0w3 + hashty a0      fun hash (Add(a0)) = 0w3 + hashty a0
# Line 218  Line 218 
218        | hash (EvalKernel(a0,a1,a2)) = 0w193 + hashint a0 + Kernel.hash a1 + hashint a2        | hash (EvalKernel(a0,a1,a2)) = 0w193 + hashint a0 + Kernel.hash a1 + hashint a2
219        | hash (LoadImage(a0)) = 0w197 + ImageInfo.hash a0        | hash (LoadImage(a0)) = 0w197 + ImageInfo.hash a0
220        | hash (Inside(a0,a1)) = 0w199 + ImageInfo.hash a0 + hashint a1        | hash (Inside(a0,a1)) = 0w199 + ImageInfo.hash a0 + hashint a1
221        | hash (Input(a0,a1)) = 0w211 + hashty a0 + hashstring a1        | hash (Input(a0,a1,a2)) = 0w211 + hashty a0 + hashstring a1 + hashstring a2
222        | hash (InputWithDefault(a0,a1)) = 0w223 + hashty a0 + hashstring a1        | hash (InputWithDefault(a0,a1,a2)) = 0w223 + hashty a0 + hashstring a1 + hashstring a2
223    
224      fun toString (Add(a0)) = concat["Add<", tyToString a0, ">"]      fun toString (Add(a0)) = concat["Add<", tyToString a0, ">"]
225        | toString (Sub(a0)) = concat["Sub<", tyToString a0, ">"]        | toString (Sub(a0)) = concat["Sub<", tyToString a0, ">"]
# Line 266  Line 266 
266        | 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, ">"]
267        | toString (LoadImage(a0)) = concat["LoadImage<", ImageInfo.toString a0, ">"]        | toString (LoadImage(a0)) = concat["LoadImage<", ImageInfo.toString a0, ">"]
268        | toString (Inside(a0,a1)) = concat["Inside<", ImageInfo.toString a0, ",", intToString a1, ">"]        | toString (Inside(a0,a1)) = concat["Inside<", ImageInfo.toString a0, ",", intToString a1, ">"]
269        | toString (Input(a0,a1)) = concat["Input<", tyToString a0, ",", stringToString a1, ">"]        | toString (Input(a0,a1,a2)) = concat["Input<", tyToString a0, ",", stringToString a1, ",", stringToString a2, ">"]
270        | toString (InputWithDefault(a0,a1)) = concat["InputWithDefault<", tyToString a0, ",", stringToString a1, ">"]        | toString (InputWithDefault(a0,a1,a2)) = concat["InputWithDefault<", tyToString a0, ",", stringToString a1, ",", stringToString a2, ">"]
271    
272    end    end
273    

Legend:
Removed from v.1295  
changed lines
  Added in v.1301

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