Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml/trunk/src/MLRISC/c-calls/c-types.sml
ViewVC logotype

Annotation of /sml/trunk/src/MLRISC/c-calls/c-types.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 608 - (view) (download)

1 : george 556 (* c-types.sml
2 :     *
3 :     * COPYRIGHT (c) 1999 Bell Labs, Lucent Technologies
4 :     *
5 :     * A representation of C Types for specifying the arguments and results
6 :     * of C function calls.
7 :     *)
8 :    
9 :    
10 :     structure CTypes =
11 :     struct
12 :    
13 :     datatype c_type
14 :     = C_void
15 :     | C_float
16 :     | C_double
17 :     | C_long_double
18 :     | C_unsigned of c_int
19 :     | C_signed of c_int
20 :     | C_PTR
21 :     | C_ARRAY of (c_type * int)
22 :     | C_STRUCT of c_type list
23 :    
24 :     and c_int
25 :     = I_char
26 :     | I_short
27 :     | I_int
28 :     | I_long
29 :     | I_long_long
30 :    
31 : george 608
32 :     (* multiple calling conventions on a single architecture *)
33 :     type calling_convention = string
34 :    
35 :     (* prototype describing C function *)
36 :     type c_proto = {
37 :     conv : calling_convention,
38 :     retTy : c_type,
39 :     paramTys : c_type list
40 :     }
41 :    
42 : george 556 end

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