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 314, Tue Aug 17 21:49:25 2010 UTC revision 328, Wed Aug 18 22:19:26 2010 UTC
# Line 13  Line 13 
13    
14      datatype ty = BoolTy | StringTy | IntTy | VecTy of int      datatype ty = BoolTy | StringTy | IntTy | VecTy of int
15    
16        val realTy = VecTy 0
17    
18      fun samety (ty1 : ty, ty2) = (ty1 = ty2)      fun samety (ty1 : ty, ty2) = (ty1 = ty2)
19      fun hashty BoolTy = 0w1      fun hashty BoolTy = 0w1
20        | hashty StringTy = 0w2        | hashty StringTy = 0w2
# Line 63  Line 65 
65        | VoxelAddress of ImageInfo.info        | VoxelAddress of ImageInfo.info
66        | LoadVoxels of RawTypes.ty * int        | LoadVoxels of RawTypes.ty * int
67        | Transform of ImageInfo.info        | Transform of ImageInfo.info
68        | Kernel of Kernel.kernel        | EvalKernel of int * Kernel.kernel * int
       | DiffKernel  
       | EvalKernel of int  
69        | LoadImage of ImageInfo.info        | LoadImage of ImageInfo.info
70        | Inside        | Inside
71        | Input of string        | Input of string
# Line 105  Line 105 
105        | arity (VoxelAddress _) = ~1        | arity (VoxelAddress _) = ~1
106        | arity (LoadVoxels _) = 1        | arity (LoadVoxels _) = 1
107        | arity (Transform _) = 1        | arity (Transform _) = 1
108        | arity (Kernel _) = 0        | arity (EvalKernel _) = 1
       | arity DiffKernel = 1  
       | arity (EvalKernel _) = 2  
109        | arity (LoadImage _) = 0        | arity (LoadImage _) = 0
110        | arity Inside = 2        | arity Inside = 2
111        | arity (Input _) = 0        | arity (Input _) = 0
# Line 147  Line 145 
145        | same (VoxelAddress(a0), VoxelAddress(b0)) = ImageInfo.same(a0, b0)        | same (VoxelAddress(a0), VoxelAddress(b0)) = ImageInfo.same(a0, b0)
146        | same (LoadVoxels(a0,a1), LoadVoxels(b0,b1)) = RawTypes.same(a0, b0) andalso sameint(a1, b1)        | same (LoadVoxels(a0,a1), LoadVoxels(b0,b1)) = RawTypes.same(a0, b0) andalso sameint(a1, b1)
147        | same (Transform(a0), Transform(b0)) = ImageInfo.same(a0, b0)        | same (Transform(a0), Transform(b0)) = ImageInfo.same(a0, b0)
148        | same (Kernel(a0), Kernel(b0)) = Kernel.same(a0, b0)        | same (EvalKernel(a0,a1,a2), EvalKernel(b0,b1,b2)) = sameint(a0, b0) andalso Kernel.same(a1, b1) andalso sameint(a2, b2)
       | same (DiffKernel, DiffKernel) = true  
       | same (EvalKernel(a0), EvalKernel(b0)) = sameint(a0, b0)  
149        | same (LoadImage(a0), LoadImage(b0)) = ImageInfo.same(a0, b0)        | same (LoadImage(a0), LoadImage(b0)) = ImageInfo.same(a0, b0)
150        | same (Inside, Inside) = true        | same (Inside, Inside) = true
151        | same (Input(a0), Input(b0)) = samestring(a0, b0)        | same (Input(a0), Input(b0)) = samestring(a0, b0)
# Line 190  Line 186 
186        | hash (VoxelAddress(a0)) = 0w137 + ImageInfo.hash a0        | hash (VoxelAddress(a0)) = 0w137 + ImageInfo.hash a0
187        | hash (LoadVoxels(a0,a1)) = 0w139 + RawTypes.hash a0 + hashint a1        | hash (LoadVoxels(a0,a1)) = 0w139 + RawTypes.hash a0 + hashint a1
188        | hash (Transform(a0)) = 0w149 + ImageInfo.hash a0        | hash (Transform(a0)) = 0w149 + ImageInfo.hash a0
189        | hash (Kernel(a0)) = 0w151 + Kernel.hash a0        | hash (EvalKernel(a0,a1,a2)) = 0w151 + hashint a0 + Kernel.hash a1 + hashint a2
190        | hash DiffKernel = 0w157        | hash (LoadImage(a0)) = 0w157 + ImageInfo.hash a0
191        | hash (EvalKernel(a0)) = 0w163 + hashint a0        | hash Inside = 0w163
192        | hash (LoadImage(a0)) = 0w167 + ImageInfo.hash a0        | hash (Input(a0)) = 0w167 + hashstring a0
193        | hash Inside = 0w173        | hash (InputWithDefault(a0)) = 0w173 + hashstring a0
       | hash (Input(a0)) = 0w179 + hashstring a0  
       | hash (InputWithDefault(a0)) = 0w181 + hashstring a0  
194    
195      fun toString (Add(a0)) = concat["Add<", tyToString a0, ">"]      fun toString (Add(a0)) = concat["Add<", tyToString a0, ">"]
196        | toString (Sub(a0)) = concat["Sub<", tyToString a0, ">"]        | toString (Sub(a0)) = concat["Sub<", tyToString a0, ">"]
# Line 232  Line 226 
226        | toString (VoxelAddress(a0)) = concat["VoxelAddress<", ImageInfo.toString a0, ">"]        | toString (VoxelAddress(a0)) = concat["VoxelAddress<", ImageInfo.toString a0, ">"]
227        | toString (LoadVoxels(a0,a1)) = concat["LoadVoxels<", RawTypes.toString a0",", intToString a0, ">"]        | toString (LoadVoxels(a0,a1)) = concat["LoadVoxels<", RawTypes.toString a0",", intToString a0, ">"]
228        | toString (Transform(a0)) = concat["Transform<", ImageInfo.toString a0, ">"]        | toString (Transform(a0)) = concat["Transform<", ImageInfo.toString a0, ">"]
229        | toString (Kernel(a0)) = concat["Kernel<", Kernel.toString a0, ">"]        | toString (EvalKernel(a0,a1,a2)) = concat["EvalKernel<", intToString a0",", Kernel.toString a0",", intToString a0, ">"]
       | toString DiffKernel = "DiffKernel"  
       | toString (EvalKernel(a0)) = concat["EvalKernel<", intToString a0, ">"]  
230        | toString (LoadImage(a0)) = concat["LoadImage<", ImageInfo.toString a0, ">"]        | toString (LoadImage(a0)) = concat["LoadImage<", ImageInfo.toString a0, ">"]
231        | toString Inside = "Inside"        | toString Inside = "Inside"
232        | toString (Input(a0)) = concat["Input<", stringToString a0, ">"]        | toString (Input(a0)) = concat["Input<", stringToString a0, ">"]

Legend:
Removed from v.314  
changed lines
  Added in v.328

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