SCM Repository
Diff of /trunk/src/compiler/mid-il/mid-il-types.sml
Parent Directory
|
Revision Log
|
Patch
revision 396, Thu Oct 14 18:47:51 2010 UTC | revision 397, Thu Oct 14 20:08:03 2010 UTC | |
---|---|---|
# | Line 14 | Line 14 |
14 | | IVecTy of int (* integers; both scalars and vectors *) | | IVecTy of int (* integers; both scalars and vectors *) |
15 | | VecTy of int (* reals; both scalars and vectors *) | | VecTy of int (* reals; both scalars and vectors *) |
16 | | AddrTy (* voxel address *) | | AddrTy (* voxel address *) |
17 | | ImageTy | |
18 | ||
19 | val intTy = IVecTy 0 | val intTy = IVecTy 0 |
20 | val realTy = VecTy 0 | val realTy = VecTy 0 |
# | Line 25 | Line 26 |
26 | | hash (IVecTy d) = 0w7 * Word.fromInt d + 0w3 | | hash (IVecTy d) = 0w7 * Word.fromInt d + 0w3 |
27 | | hash (VecTy d) = 0w11 * Word.fromInt d + 0w4 | | hash (VecTy d) = 0w11 * Word.fromInt d + 0w4 |
28 | | hash AddrTy = 0w5 | | hash AddrTy = 0w5 |
29 | | hash ImageTy = 0w6 | |
30 | ||
31 | fun toString BoolTy = "bool" | fun toString BoolTy = "bool" |
32 | | toString StringTy = "string" | | toString StringTy = "string" |
# | Line 33 | Line 35 |
35 | | toString (VecTy 0) = "real" | | toString (VecTy 0) = "real" |
36 | | toString (VecTy d) = "real" ^ Int.toString d | | toString (VecTy d) = "real" ^ Int.toString d |
37 | | toString AddrTy = "addr" | | toString AddrTy = "addr" |
38 | | toString ImageTy = "image" | |
39 | ||
40 | end | end |
|
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |