annotate dmd/backend/mTY.d @ 135:af1bebfd96a4 dmd2037

dmd 2.038
author Eldar Insafutdinov <e.insafutdinov@gmail.com>
date Mon, 13 Sep 2010 22:19:42 +0100
parents 2cc604139636
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.mTY;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
2
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
3 enum mTY
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
4 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
5 /* Linkage type */
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
6 mTYnear = 0x100,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
7 mTYfar = 0x200,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
8 mTYcs = 0x400, // in code segment
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
9 mTYthread = 0x800,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
10 mTYLINK = 0xF00, // all linkage bits
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
11
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
12 mTYloadds = 0x1000,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
13 mTYexport = 0x2000,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
14 mTYweak = 0x0000,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
15 mTYimport = 0x4000,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
16 mTYnaked = 0x8000,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
17 mTYMOD = 0xF000, // all modifier bits
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
18
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
19 mTYbasic = 0x3F, /* bit mask for basic types */
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
20
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
21 /* Modifiers to basic types */
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
22 /// #ifdef JHANDLE
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
23 /// mTYarrayhandle = 0x80,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
24 /// #else
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
25 mTYarrayhandle = 0x0,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
26 /// #endif
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
27 mTYconst = 0x40,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
28 mTYvolatile = 0x80,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
29 mTYrestrict = 0, // BUG: add for C99
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
30 mTYmutable = 0, // need to add support
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
31 mTYunaligned = 0, // non-zero for PowerPC
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
32
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
33 mTYimmutable = 0x1000000, // immutable data
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
34 mTYshared = 0x2000000, // shared data
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
35 mTYnothrow = 0x4000000, // nothrow function
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
36 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
37
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
38 import dmd.EnumUtils;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
39 mixin(BringToCurrentScope!(mTY));
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
40
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
41 uint tybasic(ulong ty) {
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
42 return ((ty) & mTY.mTYbasic);
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
43 }