SCM Repository
Diff of /trunk/src/compiler/mid-il/mid-il-types.sml
Parent Directory
|
Revision Log
|
Patch
revision 393, Thu Oct 14 15:45:01 2010 UTC | revision 394, Thu Oct 14 16:30:29 2010 UTC | |
---|---|---|
# | Line 13 | Line 13 |
13 | = BoolTy | StringTy | = BoolTy | StringTy |
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 *) | |
17 | ||
18 | val intTy = IVecTy 0 | val intTy = IVecTy 0 |
19 | val realTy = VecTy 0 | val realTy = VecTy 0 |
# | Line 23 | Line 24 |
24 | | hash StringTy = 0w2 | | hash StringTy = 0w2 |
25 | | hash (IVecTy d) = 0w7 * Word.fromInt d + 0w3 | | hash (IVecTy d) = 0w7 * Word.fromInt d + 0w3 |
26 | | hash (VecTy d) = 0w11 * Word.fromInt d + 0w4 | | hash (VecTy d) = 0w11 * Word.fromInt d + 0w4 |
27 | | hash AddrTy = 0w5 | |
28 | ||
29 | fun toString BoolTy = "bool" | fun toString BoolTy = "bool" |
30 | | toString StringTy = "string" | | toString StringTy = "string" |
# | Line 30 | Line 32 |
32 | | toString (IVecTy d) = "int" ^ Int.toString d | | toString (IVecTy d) = "int" ^ Int.toString d |
33 | | toString (VecTy 0) = "real" | | toString (VecTy 0) = "real" |
34 | | toString (VecTy d) = "real" ^ Int.toString d | | toString (VecTy d) = "real" ^ Int.toString d |
35 | | toString AddrTy = "addr" | |
36 | ||
37 | end | end |
|
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |