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