annotate dmd/STC.d @ 139:bc45b1c53019

made StorageClass type-safe
author Trass3r
date Tue, 14 Sep 2010 01:13:58 +0200
parents af1bebfd96a4
children cd48cb899aee
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
1 module dmd.STC;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
2
139
bc45b1c53019 made StorageClass type-safe
Trass3r
parents: 135
diff changeset
3 enum STC : ulong
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
4 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
5 STCundefined = 0,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
6 STCstatic = 1,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
7 STCextern = 2,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
8 STCconst = 4,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
9 STCfinal = 8,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
10 STCabstract = 0x10,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
11 STCparameter = 0x20,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
12 STCfield = 0x40,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
13 STCoverride = 0x80,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
14 STCauto = 0x100,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
15 STCsynchronized = 0x200,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
16 STCdeprecated = 0x400,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
17 STCin = 0x800, // in parameter
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
18 STCout = 0x1000, // out parameter
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
19 STClazy = 0x2000, // lazy parameter
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
20 STCforeach = 0x4000, // variable for foreach loop
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
21 STCcomdat = 0x8000, // should go into COMDAT record
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
22 STCvariadic = 0x10000, // variadic function argument
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
23 STCctorinit = 0x20000, // can only be set inside constructor
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
24 STCtemplateparameter = 0x40000, // template parameter
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
25 STCscope = 0x80000, // template parameter
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
26 STCimmutable = 0x100000,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
27 STCref = 0x200000,
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
28 STCinit = 0x400000, // has explicit initializer
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
29 STCmanifest = 0x800000, // manifest constant
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
30 STCnodtor = 0x1000000, // don't run destructor
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
31 STCnothrow = 0x2000000, // never throws exceptions
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
32 STCpure = 0x4000000, // pure function
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
33 STCtls = 0x8000000, // thread local
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
34 STCalias = 0x10000000, // alias parameter
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
35 STCshared = 0x20000000, // accessible from multiple threads
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
36 STCgshared = 0x40000000, // accessible from multiple threads
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
37 // but not typed as "shared"
135
af1bebfd96a4 dmd 2.038
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 131
diff changeset
38 STCwild = 0x80000000, // for "wild" type constructor
af1bebfd96a4 dmd 2.038
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 131
diff changeset
39 STC_TYPECTOR = (STCconst | STCimmutable | STCshared | STCwild),
139
bc45b1c53019 made StorageClass type-safe
Trass3r
parents: 135
diff changeset
40
bc45b1c53019 made StorageClass type-safe
Trass3r
parents: 135
diff changeset
41 // attributes
bc45b1c53019 made StorageClass type-safe
Trass3r
parents: 135
diff changeset
42 STCproperty = 0x100000000,
bc45b1c53019 made StorageClass type-safe
Trass3r
parents: 135
diff changeset
43 STCsafe = 0x200000000,
bc45b1c53019 made StorageClass type-safe
Trass3r
parents: 135
diff changeset
44 STCtrusted = 0x400000000,
bc45b1c53019 made StorageClass type-safe
Trass3r
parents: 135
diff changeset
45 STCsystem = 0x800000000,
bc45b1c53019 made StorageClass type-safe
Trass3r
parents: 135
diff changeset
46 STCctfe = 0x1000000000, // can be used in CTFE, even if it is static
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
47 }
139
bc45b1c53019 made StorageClass type-safe
Trass3r
parents: 135
diff changeset
48 alias STC StorageClass;
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
49
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
50 import dmd.EnumUtils;
139
bc45b1c53019 made StorageClass type-safe
Trass3r
parents: 135
diff changeset
51 mixin(BringToCurrentScope!(STC));