Mercurial > projects > ddmd
comparison dmd/TypedefDeclaration.d @ 68:ee3a9f34dc48
final bits of codegen implementation to compile Phobos
author | korDen |
---|---|
date | Tue, 24 Aug 2010 16:44:34 +0400 |
parents | fd4acc376c45 |
children | 2e2a5c3f943a |
comparison
equal
deleted
inserted
replaced
67:f708f0452e81 | 68:ee3a9f34dc48 |
---|---|
12 import dmd.ExpInitializer; | 12 import dmd.ExpInitializer; |
13 import dmd.HdrGenState; | 13 import dmd.HdrGenState; |
14 import dmd.TypeTypedef; | 14 import dmd.TypeTypedef; |
15 import dmd.Global; | 15 import dmd.Global; |
16 import dmd.STC; | 16 import dmd.STC; |
17 import dmd.Id; | |
17 | 18 |
18 import dmd.backend.SC; | 19 import dmd.backend.SC; |
19 import dmd.backend.FL; | 20 import dmd.backend.FL; |
21 import dmd.backend.SFL; | |
20 import dmd.backend.Symbol; | 22 import dmd.backend.Symbol; |
21 import dmd.backend.Util; | 23 import dmd.backend.Util; |
24 import dmd.backend.LIST; | |
25 import dmd.backend.Classsym; | |
26 import dmd.codegen.Util; | |
22 | 27 |
23 class TypedefDeclaration : Declaration | 28 class TypedefDeclaration : Declaration |
24 { | 29 { |
25 Type basetype; | 30 Type basetype; |
26 Initializer init; | 31 Initializer init; |
173 TypedefDeclaration isTypedefDeclaration() { return this; } | 178 TypedefDeclaration isTypedefDeclaration() { return this; } |
174 | 179 |
175 Symbol* sinit; | 180 Symbol* sinit; |
176 Symbol* toInitializer() | 181 Symbol* toInitializer() |
177 { | 182 { |
178 assert(false); | 183 Symbol* s; |
184 Classsym* stag; | |
185 | |
186 if (!sinit) | |
187 { | |
188 stag = fake_classsym(Id.ClassInfo); | |
189 s = toSymbolX("__init", SCextern, stag.Stype, "Z"); | |
190 s.Sfl = FLextern; | |
191 s.Sflags |= SFLnodebug; | |
192 slist_add(s); | |
193 sinit = s; | |
194 } | |
195 return sinit; | |
179 } | 196 } |
180 } | 197 } |