annotate dmd/TypedefDeclaration.d @ 192:eb38fdcb3e62 default tip

updated to compile with dmd2.062
author korDen
date Sat, 02 Mar 2013 01:25:52 -0800
parents b0d41ff5e0df
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
1 module dmd.TypedefDeclaration;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
2
114
e28b18c23469 added a module dmd.common for commonly used stuff
Trass3r
parents: 72
diff changeset
3 import dmd.common;
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
4 import dmd.Declaration;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
5 import dmd.Initializer;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
6 import dmd.Type;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
7 import dmd.Loc;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
8 import dmd.Identifier;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
9 import dmd.Dsymbol;
22
fd4acc376c45 Implemented object file output and linking on linux.
Robert Clipsham <robert@octarineparrot.com>
parents: 0
diff changeset
10 import dmd.Module;
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
11 import dmd.Scope;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
12 import dmd.OutBuffer;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
13 import dmd.ExpInitializer;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
14 import dmd.HdrGenState;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
15 import dmd.TypeTypedef;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
16 import dmd.Global;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
17 import dmd.STC;
68
ee3a9f34dc48 final bits of codegen implementation to compile Phobos
korDen
parents: 22
diff changeset
18 import dmd.Id;
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
19
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
20 import dmd.backend.SC;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
21 import dmd.backend.FL;
68
ee3a9f34dc48 final bits of codegen implementation to compile Phobos
korDen
parents: 22
diff changeset
22 import dmd.backend.SFL;
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
23 import dmd.backend.Symbol;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
24 import dmd.backend.Util;
68
ee3a9f34dc48 final bits of codegen implementation to compile Phobos
korDen
parents: 22
diff changeset
25 import dmd.backend.LIST;
ee3a9f34dc48 final bits of codegen implementation to compile Phobos
korDen
parents: 22
diff changeset
26 import dmd.backend.Classsym;
ee3a9f34dc48 final bits of codegen implementation to compile Phobos
korDen
parents: 22
diff changeset
27 import dmd.codegen.Util;
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
28
187
b0d41ff5e0df Added expandability scheme outlined in http://www.dsource.org/forums/viewtopic.php?t=5659&sid=6f2150ff5b0bffcd47512a6a7608d218
Abscissa
parents: 178
diff changeset
29 import dmd.DDMDExtensions;
b0d41ff5e0df Added expandability scheme outlined in http://www.dsource.org/forums/viewtopic.php?t=5659&sid=6f2150ff5b0bffcd47512a6a7608d218
Abscissa
parents: 178
diff changeset
30
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
31 class TypedefDeclaration : Declaration
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
32 {
187
b0d41ff5e0df Added expandability scheme outlined in http://www.dsource.org/forums/viewtopic.php?t=5659&sid=6f2150ff5b0bffcd47512a6a7608d218
Abscissa
parents: 178
diff changeset
33 mixin insertMemberExtension!(typeof(this));
b0d41ff5e0df Added expandability scheme outlined in http://www.dsource.org/forums/viewtopic.php?t=5659&sid=6f2150ff5b0bffcd47512a6a7608d218
Abscissa
parents: 178
diff changeset
34
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
35 Type basetype;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
36 Initializer init;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
37 int sem = 0;// 0: semantic() has not been run
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
38 // 1: semantic() is in progress
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
39 // 2: semantic() has been run
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
40 // 3: semantic2() has been run
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
41
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
42 this(Loc loc, Identifier id, Type basetype, Initializer init)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
43 {
178
e3afd1303184 Many small bugs fixed
korDen
parents: 154
diff changeset
44 register();
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
45 super(id);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
46
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
47 this.type = new TypeTypedef(this);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
48 this.basetype = basetype.toBasetype();
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
49 this.init = init;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
50
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
51 version (_DH) {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
52 this.htype = null;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
53 this.hbasetype = null;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
54 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
55 this.loc = loc;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
56 this.sinit = null;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
57 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
58
154
14feb7ae01a6 * changed the build system to build a release version if the debug one compiles
trass3r
parents: 135
diff changeset
59 override Dsymbol syntaxCopy(Dsymbol s)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
60 {
154
14feb7ae01a6 * changed the build system to build a release version if the debug one compiles
trass3r
parents: 135
diff changeset
61 Type basetype = this.basetype.syntaxCopy();
14feb7ae01a6 * changed the build system to build a release version if the debug one compiles
trass3r
parents: 135
diff changeset
62
14feb7ae01a6 * changed the build system to build a release version if the debug one compiles
trass3r
parents: 135
diff changeset
63 Initializer init = null;
14feb7ae01a6 * changed the build system to build a release version if the debug one compiles
trass3r
parents: 135
diff changeset
64 if (this.init)
14feb7ae01a6 * changed the build system to build a release version if the debug one compiles
trass3r
parents: 135
diff changeset
65 init = this.init.syntaxCopy();
14feb7ae01a6 * changed the build system to build a release version if the debug one compiles
trass3r
parents: 135
diff changeset
66
14feb7ae01a6 * changed the build system to build a release version if the debug one compiles
trass3r
parents: 135
diff changeset
67 assert(!s);
14feb7ae01a6 * changed the build system to build a release version if the debug one compiles
trass3r
parents: 135
diff changeset
68 TypedefDeclaration st;
14feb7ae01a6 * changed the build system to build a release version if the debug one compiles
trass3r
parents: 135
diff changeset
69 st = new TypedefDeclaration(loc, ident, basetype, init);
14feb7ae01a6 * changed the build system to build a release version if the debug one compiles
trass3r
parents: 135
diff changeset
70 version(_DH)
14feb7ae01a6 * changed the build system to build a release version if the debug one compiles
trass3r
parents: 135
diff changeset
71 {
14feb7ae01a6 * changed the build system to build a release version if the debug one compiles
trass3r
parents: 135
diff changeset
72 // Syntax copy for header file
14feb7ae01a6 * changed the build system to build a release version if the debug one compiles
trass3r
parents: 135
diff changeset
73 if (!htype) // Don't overwrite original
14feb7ae01a6 * changed the build system to build a release version if the debug one compiles
trass3r
parents: 135
diff changeset
74 {
14feb7ae01a6 * changed the build system to build a release version if the debug one compiles
trass3r
parents: 135
diff changeset
75 if (type) // Make copy for both old and new instances
14feb7ae01a6 * changed the build system to build a release version if the debug one compiles
trass3r
parents: 135
diff changeset
76 {
14feb7ae01a6 * changed the build system to build a release version if the debug one compiles
trass3r
parents: 135
diff changeset
77 htype = type.syntaxCopy();
14feb7ae01a6 * changed the build system to build a release version if the debug one compiles
trass3r
parents: 135
diff changeset
78 st.htype = type.syntaxCopy();
14feb7ae01a6 * changed the build system to build a release version if the debug one compiles
trass3r
parents: 135
diff changeset
79 }
14feb7ae01a6 * changed the build system to build a release version if the debug one compiles
trass3r
parents: 135
diff changeset
80 }
14feb7ae01a6 * changed the build system to build a release version if the debug one compiles
trass3r
parents: 135
diff changeset
81 else // Make copy of original for new instance
14feb7ae01a6 * changed the build system to build a release version if the debug one compiles
trass3r
parents: 135
diff changeset
82 st.htype = htype.syntaxCopy();
14feb7ae01a6 * changed the build system to build a release version if the debug one compiles
trass3r
parents: 135
diff changeset
83 if (!hbasetype)
14feb7ae01a6 * changed the build system to build a release version if the debug one compiles
trass3r
parents: 135
diff changeset
84 {
14feb7ae01a6 * changed the build system to build a release version if the debug one compiles
trass3r
parents: 135
diff changeset
85 if (basetype)
14feb7ae01a6 * changed the build system to build a release version if the debug one compiles
trass3r
parents: 135
diff changeset
86 {
14feb7ae01a6 * changed the build system to build a release version if the debug one compiles
trass3r
parents: 135
diff changeset
87 hbasetype = basetype.syntaxCopy();
14feb7ae01a6 * changed the build system to build a release version if the debug one compiles
trass3r
parents: 135
diff changeset
88 st.hbasetype = basetype.syntaxCopy();
14feb7ae01a6 * changed the build system to build a release version if the debug one compiles
trass3r
parents: 135
diff changeset
89 }
14feb7ae01a6 * changed the build system to build a release version if the debug one compiles
trass3r
parents: 135
diff changeset
90 }
14feb7ae01a6 * changed the build system to build a release version if the debug one compiles
trass3r
parents: 135
diff changeset
91 else
14feb7ae01a6 * changed the build system to build a release version if the debug one compiles
trass3r
parents: 135
diff changeset
92 st.hbasetype = hbasetype.syntaxCopy();
14feb7ae01a6 * changed the build system to build a release version if the debug one compiles
trass3r
parents: 135
diff changeset
93 }
14feb7ae01a6 * changed the build system to build a release version if the debug one compiles
trass3r
parents: 135
diff changeset
94 return st;
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
95 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
96
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 68
diff changeset
97 override void semantic(Scope sc)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
98 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
99 //printf("TypedefDeclaration::semantic(%s) sem = %d\n", toChars(), sem);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
100 if (sem == 0)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
101 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
102 sem = 1;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
103 basetype = basetype.semantic(loc, sc);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
104 sem = 2;
135
af1bebfd96a4 dmd 2.038
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 114
diff changeset
105 version(DMDV2) {
af1bebfd96a4 dmd 2.038
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 114
diff changeset
106 type = type.addStorageClass(storage_class);
af1bebfd96a4 dmd 2.038
Eldar Insafutdinov <e.insafutdinov@gmail.com>
parents: 114
diff changeset
107 }
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
108 type = type.semantic(loc, sc);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
109 if (sc.parent.isFuncDeclaration() && init)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
110 semantic2(sc);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
111 storage_class |= sc.stc & STCdeprecated;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
112 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
113 else if (sem == 1)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
114 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
115 error("circular definition");
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
116 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
117 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
118
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 68
diff changeset
119 override void semantic2(Scope sc)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
120 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
121 //printf("TypedefDeclaration::semantic2(%s) sem = %d\n", toChars(), sem);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
122 if (sem == 2)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
123 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
124 sem = 3;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
125 if (init)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
126 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
127 init = init.semantic(sc, basetype);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
128
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
129 ExpInitializer ie = init.isExpInitializer();
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
130 if (ie)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
131 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
132 if (ie.exp.type == basetype)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
133 ie.exp.type = type;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
134 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
135 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
136 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
137 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
138
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 68
diff changeset
139 override string mangle()
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
140 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
141 //printf("TypedefDeclaration::mangle() '%s'\n", toChars());
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
142 return Dsymbol.mangle();
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
143 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
144
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 68
diff changeset
145 override string kind()
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
146 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
147 assert(false);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
148 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
149
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 68
diff changeset
150 override Type getType()
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
151 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
152 return type;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
153 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
154
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 68
diff changeset
155 override void toCBuffer(OutBuffer buf, HdrGenState* hgs)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
156 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
157 assert(false);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
158 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
159
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
160 version (_DH) {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
161 Type htype;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
162 Type hbasetype;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
163 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
164
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 68
diff changeset
165 override void toDocBuffer(OutBuffer buf)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
166 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
167 assert(false);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
168 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
169
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 68
diff changeset
170 override void toObjFile(int multiobj) // compile to .obj file
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
171 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
172 //printf("TypedefDeclaration::toObjFile('%s')\n", toChars());
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
173 if (global.params.symdebug)
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
174 toDebug();
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
175
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
176 type.getTypeInfo(null); // generate TypeInfo
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
177
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
178 TypeTypedef tc = cast(TypeTypedef)type;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
179 if (type.isZeroInit(Loc(0)) || !tc.sym.init) {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
180 ;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
181 } else
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
182 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
183 SC scclass = SCglobal;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
184 if (inTemplateInstance())
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
185 scclass = SCcomdat;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
186
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
187 // Generate static initializer
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
188 toInitializer();
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
189 sinit.Sclass = scclass;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
190 sinit.Sfl = FLdata;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
191
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
192 version (ELFOBJ) { // Burton
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
193 sinit.Sseg = Segment.CDATA;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
194 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
195 version (MACHOBJ) {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
196 sinit.Sseg = Segment.DATA;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
197 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
198 sinit.Sdt = tc.sym.init.toDt();
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
199 outdata(sinit);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
200 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
201 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
202
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
203 void toDebug()
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
204 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
205 assert(false);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
206 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
207
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 68
diff changeset
208 override int cvMember(ubyte* p)
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
209 {
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
210 assert(false);
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
211 }
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
212
72
2e2a5c3f943a reduced warnings by adding override to the methods
Trass3r
parents: 68
diff changeset
213 override TypedefDeclaration isTypedefDeclaration() { return this; }
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
214
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
215 Symbol* sinit;
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
216 Symbol* toInitializer()
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
217 {
68
ee3a9f34dc48 final bits of codegen implementation to compile Phobos
korDen
parents: 22
diff changeset
218 Symbol* s;
ee3a9f34dc48 final bits of codegen implementation to compile Phobos
korDen
parents: 22
diff changeset
219 Classsym* stag;
ee3a9f34dc48 final bits of codegen implementation to compile Phobos
korDen
parents: 22
diff changeset
220
ee3a9f34dc48 final bits of codegen implementation to compile Phobos
korDen
parents: 22
diff changeset
221 if (!sinit)
ee3a9f34dc48 final bits of codegen implementation to compile Phobos
korDen
parents: 22
diff changeset
222 {
ee3a9f34dc48 final bits of codegen implementation to compile Phobos
korDen
parents: 22
diff changeset
223 stag = fake_classsym(Id.ClassInfo);
ee3a9f34dc48 final bits of codegen implementation to compile Phobos
korDen
parents: 22
diff changeset
224 s = toSymbolX("__init", SCextern, stag.Stype, "Z");
ee3a9f34dc48 final bits of codegen implementation to compile Phobos
korDen
parents: 22
diff changeset
225 s.Sfl = FLextern;
ee3a9f34dc48 final bits of codegen implementation to compile Phobos
korDen
parents: 22
diff changeset
226 s.Sflags |= SFLnodebug;
ee3a9f34dc48 final bits of codegen implementation to compile Phobos
korDen
parents: 22
diff changeset
227 slist_add(s);
ee3a9f34dc48 final bits of codegen implementation to compile Phobos
korDen
parents: 22
diff changeset
228 sinit = s;
ee3a9f34dc48 final bits of codegen implementation to compile Phobos
korDen
parents: 22
diff changeset
229 }
ee3a9f34dc48 final bits of codegen implementation to compile Phobos
korDen
parents: 22
diff changeset
230 return sinit;
0
10317f0c89a5 Initial commit
korDen
parents:
diff changeset
231 }
22
fd4acc376c45 Implemented object file output and linking on linux.
Robert Clipsham <robert@octarineparrot.com>
parents: 0
diff changeset
232 }