Mercurial > projects > ddmd
annotate dmd/ClassInfoDeclaration.d @ 166:d8565fbd755c
Moved object and classinfo from ClassDeclaration to Global (as part of getting rid of the global state)
author | korDen |
---|---|
date | Thu, 30 Sep 2010 10:30:15 +0400 |
parents | e28b18c23469 |
children | e3afd1303184 |
rev | line source |
---|---|
0 | 1 module dmd.ClassInfoDeclaration; |
2 | |
114 | 3 import dmd.common; |
0 | 4 import dmd.VarDeclaration; |
5 import dmd.ClassDeclaration; | |
166
d8565fbd755c
Moved object and classinfo from ClassDeclaration to Global (as part of getting rid of the global state)
korDen
parents:
114
diff
changeset
|
6 import dmd.Global; |
0 | 7 import dmd.Dsymbol; |
8 import dmd.Scope; | |
9 import dmd.Loc; | |
79 | 10 import dmd.OutBuffer; |
0 | 11 import dmd.Id; |
12 import dmd.STC; | |
13 | |
14 import dmd.backend.Symbol; | |
15 import dmd.backend.Classsym; | |
16 import dmd.backend.FL; | |
17 import dmd.backend.SFL; | |
18 import dmd.codegen.Util; | |
19 import dmd.backend.SC; | |
20 import dmd.backend.Util; | |
21 | |
22 class ClassInfoDeclaration : VarDeclaration | |
23 { | |
100 | 24 ClassDeclaration cd; |
0 | 25 |
100 | 26 this(ClassDeclaration cd) |
0 | 27 { |
166
d8565fbd755c
Moved object and classinfo from ClassDeclaration to Global (as part of getting rid of the global state)
korDen
parents:
114
diff
changeset
|
28 super(Loc(0), global.classinfo.type, cd.ident, null); |
0 | 29 |
30 this.cd = cd; | |
31 storage_class = STC.STCstatic | STC.STCgshared; | |
32 } | |
33 | |
100 | 34 override Dsymbol syntaxCopy(Dsymbol) |
0 | 35 { |
100 | 36 assert(false); // should never be produced by syntax |
37 return null; | |
0 | 38 } |
39 | |
100 | 40 override void semantic(Scope sc) |
0 | 41 { |
42 } | |
43 | |
100 | 44 override void emitComment(Scope sc) |
0 | 45 { |
46 } | |
47 | |
79 | 48 override void toJsonBuffer(OutBuffer buf) |
49 { | |
50 } | |
100 | 51 |
52 override Symbol* toSymbol() | |
0 | 53 { |
54 return cd.toSymbol(); | |
55 } | |
72 | 56 } |