Mercurial > projects > ddmd
diff dmd/backend/mTY.d @ 0:10317f0c89a5
Initial commit
author | korDen |
---|---|
date | Sat, 24 Oct 2009 08:42:06 +0400 |
parents | |
children | 2cc604139636 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dmd/backend/mTY.d Sat Oct 24 08:42:06 2009 +0400 @@ -0,0 +1,43 @@ +module dmd.backend.mTY; + +enum mTY +{ + /* Linkage type */ + mTYnear = 0x100, + mTYfar = 0x200, + mTYcs = 0x400, // in code segment + mTYthread = 0x800, + mTYLINK = 0xF00, // all linkage bits + + mTYloadds = 0x1000, + mTYexport = 0x2000, + mTYweak = 0x0000, + mTYimport = 0x4000, + mTYnaked = 0x8000, + mTYMOD = 0xF000, // all modifier bits + + mTYbasic = 0x3F, /* bit mask for basic types */ + + /* Modifiers to basic types */ +/// #ifdef JHANDLE +/// mTYarrayhandle = 0x80, +/// #else + mTYarrayhandle = 0x0, +/// #endif + mTYconst = 0x40, + mTYvolatile = 0x80, + mTYrestrict = 0, // BUG: add for C99 + mTYmutable = 0, // need to add support + mTYunaligned = 0, // non-zero for PowerPC + + mTYimmutable = 0x1000000, // immutable data + mTYshared = 0x2000000, // shared data + mTYnothrow = 0x4000000, // nothrow function +} + +import dmd.EnumUtils; +mixin(BringToCurrentScope!(mTY)); + +uint tybasic(uint ty) { + return ((ty) & mTY.mTYbasic); +} \ No newline at end of file