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

SCM Repository

[diderot] Diff of /trunk/src/compiler/fields/raw-types.sml
ViewVC logotype

Diff of /trunk/src/compiler/fields/raw-types.sml

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

trunk/src/compiler/IL/raw-types.sml revision 141, Thu Jul 8 18:51:26 2010 UTC trunk/src/compiler/fields/raw-types.sml revision 282, Fri Aug 13 19:20:23 2010 UTC
# Line 18  Line 18 
18        | RT_Int64 | RT_UInt64        | RT_Int64 | RT_UInt64
19        | RT_Float | RT_Double        | RT_Float | RT_Double
20    
21        fun same (a : ty, b) = (a = b)
22    
23        fun hash RT_Int8    = 0w17
24          | hash RT_UInt8   = 0w59
25          | hash RT_Int16   = 0w103
26          | hash RT_UInt16  = 0w157
27          | hash RT_Int32   = 0w211
28          | hash RT_UInt32  = 0w269
29          | hash RT_Int64   = 0w331
30          | hash RT_UInt64  = 0w389
31          | hash RT_Float   = 0w449
32          | hash RT_Double  = 0w509
33    
34        fun fromString ty = (case ty
35               of "signed char" => RT_Int8
36                | "unsigned char" => RT_UInt8
37                | "short" => RT_Int16
38                | "unsigned short" => RT_UInt16
39                | "int" => RT_Int32
40                | "unsigned int" => RT_UInt32
41                | "long long int" => RT_Int64
42                | "unsigned long long int" => RT_UInt64
43                | "float" => RT_Float
44                | "double" => RT_Double
45                | _ => raise Fail("unknown raw type "^ty)
46              (* end case *))
47    
48        fun toString ty = (case ty
49               of RT_Int8 => "signed char"
50                | RT_UInt8 => "unsigned char"
51                | RT_Int16 => "short"
52                | RT_UInt16 => "unsigned short"
53                | RT_Int32 => "int"
54                | RT_UInt32 => "unsigned int"
55                | RT_Int64 => "long long int"
56                | RT_UInt64 => "unsigned long long int"
57                | RT_Float => "float"
58                | RT_Double => "double"
59              (* end case *))
60    
61    end    end

Legend:
Removed from v.141  
changed lines
  Added in v.282

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