annotate dmd/backend/TYM.d @ 146:af7e5ebef6ad

redundant extern(C)
author Eldar Insafutdinov <e.insafutdinov@gmail.com>
date Tue, 14 Sep 2010 23:34:50 +0100
parents 3f834bed4f13
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
1 module dmd.backend.TYM;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
2
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
3 enum TYM
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
4 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
5 TYbool = 0,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
6 TYchar = 1,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
7 TYschar = 2, // signed char
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
8 TYuchar = 3, // unsigned char
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
9 TYshort = 4,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
10 TYwchar_t = 5,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
11 TYushort = 6, // unsigned short
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
12 TYenum = 7, // enumeration value
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
13 TYint = 8,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
14 TYuint = 9, // unsigned
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
15 TYlong = 0xA,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
16 TYulong = 0xB, // unsigned long
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
17 TYdchar = 0xC, // 32 bit Unicode char
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
18 TYllong = 0xD, // 64 bit long
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
19 TYullong = 0xE, // 64 bit unsigned long
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
20 TYfloat = 0xF, // 32 bit real
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
21 TYdouble = 0x10, // 64 bit real
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
22
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
23 // long double is mapped to either of the following at runtime:
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
24 TYdouble_alias = 0x11, // 64 bit real (but distinct for overload purposes)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
25 TYldouble = 0x12, // 80 bit real
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
26
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
27 // Add imaginary and complex types for D and C99
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
28 TYifloat = 0x13,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
29 TYidouble = 0x14,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
30 TYildouble = 0x15,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
31 TYcfloat = 0x16,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
32 TYcdouble = 0x17,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
33 TYcldouble = 0x18,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
34
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
35 ///#if TX86
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
36 TYjhandle = 0x19, // Jupiter handle type, equals TYnptr except
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
37 // that the debug type is different so the
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
38 // debugger can distinguish them
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
39 TYnptr = 0x1A, // data segment relative pointer
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
40 TYsptr = 0x1B, // stack segment relative pointer
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
41 TYcptr = 0x1C, // code segment relative pointer
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
42 TYf16ptr = 0x1D, // special OS/2 far16 pointer
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
43 TYfptr = 0x1E, // far pointer (has segment and offset)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
44 TYhptr = 0x1F, // huge pointer (has segment and offset)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
45 TYvptr = 0x20, // __handle pointer (has segment and offset)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
46 TYref = 0x21, // reference to another type
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
47 TYvoid = 0x22,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
48 TYstruct = 0x23, // watch tyaggregate()
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
49 TYarray = 0x24, // watch tyaggregate()
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
50 TYnfunc = 0x25, // near C func
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
51 TYffunc = 0x26, // far C func
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
52 TYnpfunc = 0x27, // near Cpp func
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
53 TYfpfunc = 0x28, // far Cpp func
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
54 TYnsfunc = 0x29, // near stdcall func
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
55 TYfsfunc = 0x2A, // far stdcall func
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
56 TYifunc = 0x2B, // interrupt func
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
57 TYmemptr = 0x2C, // pointer to member
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
58 TYident = 0x2D, // type-argument
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
59 TYtemplate = 0x2E, // unexpanded class template
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
60 TYvtshape = 0x2F, // virtual function table
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
61 TYptr = 0x30, // generic pointer type
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
62 TYf16func = 0x31, // _far16 _pascal function
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
63 TYnsysfunc = 0x32, // near __syscall func
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
64 TYfsysfunc = 0x33, // far __syscall func
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
65 TYmfunc = 0x34, // NT C++ member func
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
66 TYjfunc = 0x35, // LINKd D function
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
67 TYhfunc = 0x36, // C function with hidden parameter
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
68 TYnref = 0x37, // near reference
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
69 TYfref = 0x38, // far reference
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
70 TYMAX = 0x39,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
71
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
72 ///#if MARS
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
73 TYaarray = TYnptr,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
74 TYdelegate = TYllong,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
75 TYdarray = TYullong,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
76 ///#endif
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
77 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
78
25
3f834bed4f13 FWindows linking issues fixed
korDen
parents: 16
diff changeset
79 version (Windows) {
3f834bed4f13 FWindows linking issues fixed
korDen
parents: 16
diff changeset
80 extern (C++) extern {
3f834bed4f13 FWindows linking issues fixed
korDen
parents: 16
diff changeset
81 __gshared int TYptrdiff, TYsize, TYsize_t;
3f834bed4f13 FWindows linking issues fixed
korDen
parents: 16
diff changeset
82 }
3f834bed4f13 FWindows linking issues fixed
korDen
parents: 16
diff changeset
83 } else {
3f834bed4f13 FWindows linking issues fixed
korDen
parents: 16
diff changeset
84 extern (C) extern {
3f834bed4f13 FWindows linking issues fixed
korDen
parents: 16
diff changeset
85 __gshared int TYptrdiff, TYsize, TYsize_t;
3f834bed4f13 FWindows linking issues fixed
korDen
parents: 16
diff changeset
86 }
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
87 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
88
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
89 import dmd.EnumUtils;
14
2cc604139636 Implemented Linux support for ddmd. Some parts are a bit hacky to just "get it working", that said, druntime and phobos compile, and unittests pass.
Robert Clipsham <robert@octarineparrot.com>
parents: 0
diff changeset
90 mixin(BringToCurrentScope!(TYM));