Changeset 336:aaade6ded589
- Timestamp:
- 07/12/08 13:38:31
(6 months ago)
- Author:
- lindquist
- branch:
- trunk
- Message:
[svn r357] Merged DMD 1.033
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r1 |
r336 |
|
| 254 | 254 | { |
|---|
| 255 | 255 | error(loc, "member %s is not accessible", smember->toChars()); |
|---|
| 256 | | } |
|---|
| 257 | | } |
|---|
| 258 | | |
|---|
| 259 | | /**************************************** |
|---|
| | 256 | halt(); |
|---|
| | 257 | } |
|---|
| | 258 | } |
|---|
| | 259 | |
|---|
| | 260 | /**************************************** |
|---|
| 260 | 261 | * Determine if this is the same or friend of cd. |
|---|
| 261 | 262 | */ |
|---|
| r159 |
r336 |
|
| 65 | 65 | int isdeprecated; // !=0 if deprecated |
|---|
| 66 | 66 | Scope *scope; // !=NULL means context to use |
|---|
| 67 | | FuncDeclarations dtors; // Array of destructors |
|---|
| 68 | | FuncDeclaration *dtor; // aggregate destructor |
|---|
| 69 | 67 | |
|---|
| 70 | 68 | // Special member functions |
|---|
| … | … | |
| 72 | 70 | NewDeclaration *aggNew; // allocator |
|---|
| 73 | 71 | DeleteDeclaration *aggDelete; // deallocator |
|---|
| | 72 | |
|---|
| | 73 | FuncDeclarations dtors; // Array of destructors |
|---|
| | 74 | FuncDeclaration *dtor; // aggregate destructor |
|---|
| 74 | 75 | |
|---|
| 75 | 76 | #ifdef IN_GCC |
|---|
| … | … | |
| 120 | 121 | { |
|---|
| 121 | 122 | int zeroInit; // !=0 if initialize with 0 fill |
|---|
| | 123 | #if DMDV2 |
|---|
| | 124 | int hasIdentityAssign; // !=0 if has identity opAssign |
|---|
| | 125 | FuncDeclaration *cpctor; // generated copy-constructor, if any |
|---|
| | 126 | |
|---|
| | 127 | FuncDeclarations postblits; // Array of postblit functions |
|---|
| | 128 | FuncDeclaration *postblit; // aggregate postblit |
|---|
| | 129 | #endif |
|---|
| 122 | 130 | |
|---|
| 123 | 131 | StructDeclaration(Loc loc, Identifier *id); |
|---|
| … | … | |
| 126 | 134 | void toCBuffer(OutBuffer *buf, HdrGenState *hgs); |
|---|
| 127 | 135 | char *mangle(); |
|---|
| 128 | | char *kind(); |
|---|
| | 136 | const char *kind(); |
|---|
| 129 | 137 | Expression *cloneMembers(); |
|---|
| 130 | 138 | void toDocBuffer(OutBuffer *buf); |
|---|
| … | … | |
| 132 | 140 | PROT getAccess(Dsymbol *smember); // determine access to smember |
|---|
| 133 | 141 | |
|---|
| 134 | | void toObjFile(); // compile to .obj file |
|---|
| | 142 | void toObjFile(int multiobj); // compile to .obj file |
|---|
| 135 | 143 | void toDt(dt_t **pdt); |
|---|
| 136 | 144 | void toDebug(); // to symbolic debug info |
|---|
| … | … | |
| 143 | 151 | UnionDeclaration(Loc loc, Identifier *id); |
|---|
| 144 | 152 | Dsymbol *syntaxCopy(Dsymbol *s); |
|---|
| 145 | | char *kind(); |
|---|
| | 153 | const char *kind(); |
|---|
| 146 | 154 | |
|---|
| 147 | 155 | UnionDeclaration *isUnionDeclaration() { return this; } |
|---|
| … | … | |
| 169 | 177 | }; |
|---|
| 170 | 178 | |
|---|
| 171 | | #if V2 |
|---|
| | 179 | #if DMDV2 |
|---|
| 172 | 180 | #define CLASSINFO_SIZE (0x3C+16) // value of ClassInfo.size |
|---|
| 173 | 181 | #else |
|---|
| … | … | |
| 219 | 227 | |
|---|
| 220 | 228 | Dsymbol *search(Loc, Identifier *ident, int flags); |
|---|
| 221 | | #if V2 |
|---|
| | 229 | #if DMDV2 |
|---|
| 222 | 230 | int isFuncHidden(FuncDeclaration *fd); |
|---|
| 223 | 231 | #endif |
|---|
| … | … | |
| 227 | 235 | int isCOMclass(); |
|---|
| 228 | 236 | virtual int isCOMinterface(); |
|---|
| 229 | | #if V2 |
|---|
| | 237 | #if DMDV2 |
|---|
| 230 | 238 | virtual int isCPPinterface(); |
|---|
| 231 | 239 | #endif |
|---|
| 232 | 240 | int isAbstract(); |
|---|
| 233 | 241 | virtual int vtblOffset(); |
|---|
| 234 | | char *kind(); |
|---|
| | 242 | const char *kind(); |
|---|
| 235 | 243 | char *mangle(); |
|---|
| 236 | 244 | void toDocBuffer(OutBuffer *buf); |
|---|
| … | … | |
| 241 | 249 | |
|---|
| 242 | 250 | // Back end |
|---|
| 243 | | void toObjFile(); // compile to .obj file |
|---|
| | 251 | void toObjFile(int multiobj); // compile to .obj file |
|---|
| 244 | 252 | void toDebug(); |
|---|
| 245 | 253 | unsigned baseVtblOffset(BaseClass *bc); |
|---|
| … | … | |
| 259 | 267 | struct InterfaceDeclaration : ClassDeclaration |
|---|
| 260 | 268 | { |
|---|
| 261 | | #if V2 |
|---|
| | 269 | #if DMDV2 |
|---|
| 262 | 270 | int cpp; // !=0 if this is a C++ interface |
|---|
| 263 | 271 | #endif |
|---|
| … | … | |
| 267 | 275 | int isBaseOf(ClassDeclaration *cd, int *poffset); |
|---|
| 268 | 276 | int isBaseOf(BaseClass *bc, int *poffset); |
|---|
| 269 | | char *kind(); |
|---|
| | 277 | const char *kind(); |
|---|
| 270 | 278 | int vtblOffset(); |
|---|
| 271 | | #if V2 |
|---|
| | 279 | #if DMDV2 |
|---|
| 272 | 280 | int isCPPinterface(); |
|---|
| 273 | 281 | #endif |
|---|
| 274 | 282 | virtual int isCOMinterface(); |
|---|
| 275 | 283 | |
|---|
| 276 | | void toObjFile(); // compile to .obj file |
|---|
| | 284 | void toObjFile(int multiobj); // compile to .obj file |
|---|
| 277 | 285 | Symbol *toSymbol(); |
|---|
| 278 | 286 | |
|---|
| r159 |
r336 |
|
| 1 | 1 | |
|---|
| 2 | 2 | // Compiler implementation of the D programming language |
|---|
| 3 | | // Copyright (c) 1999-2007 by Digital Mars |
|---|
| | 3 | // Copyright (c) 1999-2008 by Digital Mars |
|---|
| 4 | 4 | // All Rights Reserved |
|---|
| 5 | 5 | // written by Walter Bright |
|---|
| … | … | |
| 36 | 36 | |
|---|
| 37 | 37 | extern void obj_includelib(char *name); |
|---|
| | 38 | void obj_startaddress(Symbol *s); |
|---|
| 38 | 39 | |
|---|
| 39 | 40 | |
|---|
| … | … | |
| 53 | 54 | int AttribDeclaration::addMember(Scope *sc, ScopeDsymbol *sd, int memnum) |
|---|
| 54 | 55 | { |
|---|
| 55 | | unsigned i; |
|---|
| 56 | 56 | int m = 0; |
|---|
| 57 | 57 | Array *d = include(sc, sd); |
|---|
| … | … | |
| 59 | 59 | if (d) |
|---|
| 60 | 60 | { |
|---|
| 61 | | for (i = 0; i < d->dim; i++) |
|---|
| 62 | | { Dsymbol *s; |
|---|
| 63 | | |
|---|
| 64 | | s = (Dsymbol *)d->data[i]; |
|---|
| | 61 | for (unsigned i = 0; i < d->dim; i++) |
|---|
| | 62 | { Dsymbol *s = (Dsymbol *)d->data[i]; |
|---|
| 65 | 63 | m |= s->addMember(sc, sd, m | memnum); |
|---|
| 66 | 64 | } |
|---|
| … | … | |
| 73 | 71 | Array *d = include(sc, NULL); |
|---|
| 74 | 72 | |
|---|
| 75 | | //printf("\tAttribDeclaration::semantic '%s'\n",toChars()); |
|---|
| | 73 | //printf("\tAttribDeclaration::semantic '%s', d = %p\n",toChars(), d); |
|---|
| 76 | 74 | if (d) |
|---|
| 77 | 75 | { |
|---|
| … | … | |
| 87 | 85 | void AttribDeclaration::semantic2(Scope *sc) |
|---|
| 88 | 86 | { |
|---|
| 89 | | unsigned i; |
|---|
| 90 | 87 | Array *d = include(sc, NULL); |
|---|
| 91 | 88 | |
|---|
| 92 | 89 | if (d) |
|---|
| 93 | 90 | { |
|---|
| 94 | | for (i = 0; i < d->dim; i++) |
|---|
| 95 | | { Dsymbol *s; |
|---|
| 96 | | |
|---|
| 97 | | s = (Dsymbol *)d->data[i]; |
|---|
| | 91 | for (unsigned i = 0; i < d->dim; i++) |
|---|
| | 92 | { Dsymbol *s = (Dsymbol *)d->data[i]; |
|---|
| 98 | 93 | s->semantic2(sc); |
|---|
| 99 | 94 | } |
|---|
| … | … | |
| 103 | 98 | void AttribDeclaration::semantic3(Scope *sc) |
|---|
| 104 | 99 | { |
|---|
| 105 | | unsigned i; |
|---|
| 106 | 100 | Array *d = include(sc, NULL); |
|---|
| 107 | 101 | |
|---|
| 108 | 102 | if (d) |
|---|
| 109 | 103 | { |
|---|
| 110 | | for (i = 0; i < d->dim; i++) |
|---|
| 111 | | { Dsymbol *s; |
|---|
| 112 | | |
|---|
| 113 | | s = (Dsymbol *)d->data[i]; |
|---|
| | 104 | for (unsigned i = 0; i < d->dim; i++) |
|---|
| | 105 | { Dsymbol *s = (Dsymbol *)d->data[i]; |
|---|
| 114 | 106 | s->semantic3(sc); |
|---|
| 115 | 107 | } |
|---|
| … | … | |
| 119 | 111 | void AttribDeclaration::inlineScan() |
|---|
| 120 | 112 | { |
|---|
| 121 | | unsigned i; |
|---|
| 122 | 113 | Array *d = include(NULL, NULL); |
|---|
| 123 | 114 | |
|---|
| 124 | 115 | if (d) |
|---|
| 125 | 116 | { |
|---|
| 126 | | for (i = 0; i < d->dim; i++) |
|---|
| 127 | | { Dsymbol *s; |
|---|
| 128 | | |
|---|
| 129 | | s = (Dsymbol *)d->data[i]; |
|---|
| | 117 | for (unsigned i = 0; i < d->dim; i++) |
|---|
| | 118 | { Dsymbol *s = (Dsymbol *)d->data[i]; |
|---|
| 130 | 119 | //printf("AttribDeclaration::inlineScan %s\n", s->toChars()); |
|---|
| 131 | 120 | s->inlineScan(); |
|---|
| … | … | |
| 138 | 127 | if (comment) |
|---|
| 139 | 128 | { |
|---|
| 140 | | unsigned i; |
|---|
| 141 | 129 | Array *d = include(NULL, NULL); |
|---|
| 142 | 130 | |
|---|
| 143 | 131 | if (d) |
|---|
| 144 | 132 | { |
|---|
| 145 | | for (i = 0; i < d->dim; i++) |
|---|
| 146 | | { Dsymbol *s; |
|---|
| 147 | | |
|---|
| 148 | | s = (Dsymbol *)d->data[i]; |
|---|
| | 133 | for (unsigned i = 0; i < d->dim; i++) |
|---|
| | 134 | { Dsymbol *s = (Dsymbol *)d->data[i]; |
|---|
| 149 | 135 | //printf("AttribDeclaration::addComment %s\n", s->toChars()); |
|---|
| 150 | 136 | s->addComment(comment); |
|---|
| … | … | |
| 164 | 150 | // return; |
|---|
| 165 | 151 | |
|---|
| 166 | | unsigned i; |
|---|
| 167 | 152 | Array *d = include(NULL, NULL); |
|---|
| 168 | 153 | |
|---|
| 169 | 154 | if (d) |
|---|
| 170 | 155 | { |
|---|
| 171 | | for (i = 0; i < d->dim; i++) |
|---|
| 172 | | { Dsymbol *s; |
|---|
| 173 | | |
|---|
| 174 | | s = (Dsymbol *)d->data[i]; |
|---|
| | 156 | for (unsigned i = 0; i < d->dim; i++) |
|---|
| | 157 | { Dsymbol *s = (Dsymbol *)d->data[i]; |
|---|
| 175 | 158 | //printf("AttribDeclaration::emitComment %s\n", s->toChars()); |
|---|
| 176 | 159 | s->emitComment(sc); |
|---|
| … | … | |
| 179 | 162 | } |
|---|
| 180 | 163 | |
|---|
| 181 | | void AttribDeclaration::toObjFile() |
|---|
| 182 | | { |
|---|
| 183 | | unsigned i; |
|---|
| | 164 | void AttribDeclaration::toObjFile(int multiobj) |
|---|
| | 165 | { |
|---|
| 184 | 166 | Array *d = include(NULL, NULL); |
|---|
| 185 | 167 | |
|---|
| 186 | 168 | if (d) |
|---|
| 187 | 169 | { |
|---|
| 188 | | for (i = 0; i < d->dim; i++) |
|---|
| 189 | | { Dsymbol *s; |
|---|
| 190 | | |
|---|
| 191 | | s = (Dsymbol *)d->data[i]; |
|---|
| 192 | | s->toObjFile(); |
|---|
| | 170 | for (unsigned i = 0; i < d->dim; i++) |
|---|
| | 171 | { Dsymbol *s = (Dsymbol *)d->data[i]; |
|---|
| | 172 | s->toObjFile(multiobj); |
|---|
| 193 | 173 | } |
|---|
| 194 | 174 | } |
|---|
| … | … | |
| 197 | 177 | int AttribDeclaration::cvMember(unsigned char *p) |
|---|
| 198 | 178 | { |
|---|
| 199 | | unsigned i; |
|---|
| 200 | 179 | int nwritten = 0; |
|---|
| 201 | 180 | int n; |
|---|
| … | … | |
| 204 | 183 | if (d) |
|---|
| 205 | 184 | { |
|---|
| 206 | | for (i = 0; i < d->dim; i++) |
|---|
| 207 | | { Dsymbol *s; |
|---|
| 208 | | |
|---|
| 209 | | s = (Dsymbol *)d->data[i]; |
|---|
| | 185 | for (unsigned i = 0; i < d->dim; i++) |
|---|
| | 186 | { Dsymbol *s = (Dsymbol *)d->data[i]; |
|---|
| 210 | 187 | n = s->cvMember(p); |
|---|
| 211 | 188 | if (p) |
|---|
| … | … | |
| 233 | 210 | } |
|---|
| 234 | 211 | |
|---|
| 235 | | char *AttribDeclaration::kind() |
|---|
| | 212 | const char *AttribDeclaration::kind() |
|---|
| 236 | 213 | { |
|---|
| 237 | 214 | return "attribute"; |
|---|
| … | … | |
| 247 | 224 | void AttribDeclaration::checkCtorConstInit() |
|---|
| 248 | 225 | { |
|---|
| 249 | | unsigned i; |
|---|
| 250 | 226 | Array *d = include(NULL, NULL); |
|---|
| 251 | 227 | |
|---|
| 252 | 228 | if (d) |
|---|
| 253 | 229 | { |
|---|
| 254 | | for (i = 0; i < d->dim; i++) |
|---|
| 255 | | { Dsymbol *s; |
|---|
| 256 | | |
|---|
| 257 | | s = (Dsymbol *)d->data[i]; |
|---|
| | 230 | for (unsigned i = 0; i < d->dim; i++) |
|---|
| | 231 | { Dsymbol *s = (Dsymbol *)d->data[i]; |
|---|
| 258 | 232 | s->checkCtorConstInit(); |
|---|
| 259 | 233 | } |
|---|
| … | … | |
| 265 | 239 | |
|---|
| 266 | 240 | void AttribDeclaration::addLocalClass(ClassDeclarations *aclasses) |
|---|
| 267 | | { unsigned i; |
|---|
| | 241 | { |
|---|
| 268 | 242 | Array *d = include(NULL, NULL); |
|---|
| 269 | 243 | |
|---|
| 270 | 244 | if (d) |
|---|
| 271 | 245 | { |
|---|
| 272 | | for (i = 0; i < d->dim; i++) |
|---|
| 273 | | { Dsymbol *s; |
|---|
| 274 | | |
|---|
| 275 | | s = (Dsymbol *)d->data[i]; |
|---|
| | 246 | for (unsigned i = 0; i < d->dim; i++) |
|---|
| | 247 | { Dsymbol *s = (Dsymbol *)d->data[i]; |
|---|
| 276 | 248 | s->addLocalClass(aclasses); |
|---|
| 277 | 249 | } |
|---|
| … | … | |
| 724 | 696 | } |
|---|
| 725 | 697 | |
|---|
| 726 | | char *AnonDeclaration::kind() |
|---|
| | 698 | const char *AnonDeclaration::kind() |
|---|
| 727 | 699 | { |
|---|
| 728 | 700 | return (char *)(isunion ? "anonymous union" : "anonymous struct"); |
|---|
| … | … | |
| 1024 | 996 | } |
|---|
| 1025 | 997 | |
|---|
| 1026 | | char *PragmaDeclaration::kind() |
|---|
| | 998 | const char *PragmaDeclaration::kind() |
|---|
| 1027 | 999 | { |
|---|
| 1028 | 1000 | return "pragma"; |
|---|
| 1029 | 1001 | } |
|---|
| 1030 | 1002 | |
|---|
| 1031 | | void PragmaDeclaration::toObjFile() |
|---|
| | 1003 | void PragmaDeclaration::toObjFile(int multiobj) |
|---|
| 1032 | 1004 | { |
|---|
| 1033 | 1005 | if (ident == Id::lib) |
|---|
| … | … | |
| 1045 | 1017 | obj_includelib(name); |
|---|
| 1046 | 1018 | } |
|---|
| 1047 | | AttribDeclaration::toObjFile(); |
|---|
| | 1019 | AttribDeclaration::toObjFile(multiobj); |
|---|
| 1048 | 1020 | } |
|---|
| 1049 | 1021 | |
|---|
| … | … | |
| 1215 | 1187 | int StaticIfDeclaration::addMember(Scope *sc, ScopeDsymbol *sd, int memnum) |
|---|
| 1216 | 1188 | { |
|---|
| | 1189 | //printf("StaticIfDeclaration::addMember() '%s'\n",toChars()); |
|---|
| 1217 | 1190 | /* This is deferred until semantic(), so that |
|---|
| 1218 | 1191 | * expressions in the condition can refer to declarations |
|---|
| … | … | |
| 1241 | 1214 | Array *d = include(sc, sd); |
|---|
| 1242 | 1215 | |
|---|
| 1243 | | //printf("\tStaticIfDeclaration::semantic '%s'\n",toChars()); |
|---|
| | 1216 | //printf("\tStaticIfDeclaration::semantic '%s', d = %p\n",toChars(), d); |
|---|
| 1244 | 1217 | if (d) |
|---|
| 1245 | 1218 | { |
|---|
| … | … | |
| 1258 | 1231 | } |
|---|
| 1259 | 1232 | |
|---|
| 1260 | | char *StaticIfDeclaration::kind() |
|---|
| | 1233 | const char *StaticIfDeclaration::kind() |
|---|
| 1261 | 1234 | { |
|---|
| 1262 | 1235 | return "static if"; |
|---|
| … | … | |
| 1269 | 1242 | : AttribDeclaration(NULL) |
|---|
| 1270 | 1243 | { |
|---|
| | 1244 | this->loc = loc; |
|---|
| 1271 | 1245 | this->exp = exp; |
|---|
| 1272 | 1246 | this->sd = NULL; |
|---|
| | 1247 | this->compiled = 0; |
|---|
| 1273 | 1248 | } |
|---|
| 1274 | 1249 | |
|---|
| … | … | |
| 1282 | 1257 | int CompileDeclaration::addMember(Scope *sc, ScopeDsymbol *sd, int memnum) |
|---|
| 1283 | 1258 | { |
|---|
| | 1259 | //printf("CompileDeclaration::addMember(sc = %p)\n", sc); |
|---|
| 1284 | 1260 | this->sd = sd; |
|---|
| | 1261 | if (memnum == 0) |
|---|
| | 1262 | { /* No members yet, so parse the mixin now |
|---|
| | 1263 | */ |
|---|
| | 1264 | compileIt(sc); |
|---|
| | 1265 | memnum |= AttribDeclaration::addMember(sc, sd, memnum); |
|---|
| | 1266 | compiled = 1; |
|---|
| | 1267 | } |
|---|
| 1285 | 1268 | return memnum; |
|---|
| 1286 | 1269 | } |
|---|
| 1287 | 1270 | |
|---|
| 1288 | | void CompileDeclaration::semantic(Scope *sc) |
|---|
| 1289 | | { |
|---|
| 1290 | | //printf("CompileDeclaration::semantic()\n"); |
|---|
| | 1271 | void CompileDeclaration::compileIt(Scope *sc) |
|---|
| | 1272 | { |
|---|
| | 1273 | //printf("CompileDeclaration::compileIt()\n"); |
|---|
| 1291 | 1274 | exp = exp->semantic(sc); |
|---|
| 1292 | 1275 | exp = resolveProperties(sc, exp); |
|---|
| 1293 | 1276 | exp = exp->optimize(WANTvalue | WANTinterpret); |
|---|
| 1294 | 1277 | if (exp->op != TOKstring) |
|---|
| 1295 | | { error("argument to mixin must be a string, not (%s)", exp->toChars()); |
|---|
| 1296 | | return; |
|---|
| 1297 | | } |
|---|
| 1298 | | StringExp *se = (StringExp *)exp; |
|---|
| 1299 | | se = se->toUTF8(sc); |
|---|
| 1300 | | Parser p(sc->module, (unsigned char *)se->string, se->len, 0); |
|---|
| 1301 | | p.loc = loc; |
|---|
| 1302 | | p.nextToken(); |
|---|
| 1303 | | decl = p.parseDeclDefs(0); |
|---|
| 1304 | | if (p.token.value != TOKeof) |
|---|
| 1305 | | { |
|---|
| 1306 | | error("incomplete mixin declaration (%s)", se->toChars()); |
|---|
| 1307 | | } |
|---|
| 1308 | | |
|---|
| 1309 | | AttribDeclaration::addMember(sc, sd, 0); |
|---|
| | 1278 | { exp->error("argument to mixin must be a string, not (%s)", exp->toChars()); |
|---|
| | 1279 | } |
|---|
| | 1280 | else |
|---|
| | 1281 | { |
|---|
| | 1282 | StringExp *se = (StringExp *)exp; |
|---|
| | 1283 | se = se->toUTF8(sc); |
|---|
| | 1284 | Parser p(sc->module, (unsigned char *)se->string, se->len, 0); |
|---|
| | 1285 | p.loc = loc; |
|---|
| | 1286 | p.nextToken(); |
|---|
| | 1287 | decl = p.parseDeclDefs(0); |
|---|
| | 1288 | if (p.token.value != TOKeof) |
|---|
| | 1289 | exp->error("incomplete mixin declaration (%s)", se->toChars()); |
|---|
| | 1290 | } |
|---|
| | 1291 | } |
|---|
| | 1292 | |
|---|
| | 1293 | void CompileDeclaration::semantic(Scope *sc) |
|---|
| | 1294 | { |
|---|
| | 1295 | //printf("CompileDeclaration::semantic()\n"); |
|---|
| | 1296 | |
|---|
| | 1297 | if (!compiled) |
|---|
| | 1298 | { |
|---|
| | 1299 | compileIt(sc); |
|---|
| | 1300 | AttribDeclaration::addMember(sc, sd, 0); |
|---|
| | 1301 | compiled = 1; |
|---|
| | 1302 | } |
|---|
| 1310 | 1303 | AttribDeclaration::semantic(sc); |
|---|
| 1311 | 1304 | } |
|---|
| r19 |
r336 |
|
| 43 | 43 | void addComment(unsigned char *comment); |
|---|
| 44 | 44 | void emitComment(Scope *sc); |
|---|
| 45 | | char *kind(); |
|---|
| | 45 | const char *kind(); |
|---|
| 46 | 46 | int oneMember(Dsymbol **ps); |
|---|
| 47 | 47 | int hasPointers(); |
|---|
| … | … | |
| 51 | 51 | AttribDeclaration *isAttribDeclaration() { return this; } |
|---|
| 52 | 52 | |
|---|
| 53 | | void toObjFile(); // compile to .obj file |
|---|
| | 53 | void toObjFile(int multiobj); // compile to .obj file |
|---|
| 54 | 54 | int cvMember(unsigned char *p); |
|---|
| 55 | 55 | }; |
|---|
| … | … | |
| 107 | 107 | void semantic(Scope *sc); |
|---|
| 108 | 108 | void toCBuffer(OutBuffer *buf, HdrGenState *hgs); |
|---|
| 109 | | char *kind(); |
|---|
| | 109 | const char *kind(); |
|---|
| 110 | 110 | }; |
|---|
| 111 | 111 | |
|---|
| … | … | |
| 119 | 119 | int oneMember(Dsymbol **ps); |
|---|
| 120 | 120 | void toCBuffer(OutBuffer *buf, HdrGenState *hgs); |
|---|
| 121 | | char *kind(); |
|---|
| 122 | | void toObjFile(); // compile to .obj file |
|---|
| | 121 | const char *kind(); |
|---|
| | 122 | void toObjFile(int multiobj); // compile to .obj file |
|---|
| 123 | 123 | }; |
|---|
| 124 | 124 | |
|---|
| … | … | |
| 146 | 146 | int addMember(Scope *sc, ScopeDsymbol *s, int memnum); |
|---|
| 147 | 147 | void semantic(Scope *sc); |
|---|
| 148 | | char *kind(); |
|---|
| | 148 | const char *kind(); |
|---|
| 149 | 149 | }; |
|---|
| 150 | 150 | |
|---|
| … | … | |
| 156 | 156 | |
|---|
| 157 | 157 | ScopeDsymbol *sd; |
|---|
| | 158 | int compiled; |
|---|
| 158 | 159 | |
|---|
| 159 | 160 | CompileDeclaration(Loc loc, Expression *exp); |
|---|
| 160 | 161 | Dsymbol *syntaxCopy(Dsymbol *s); |
|---|
| 161 | 162 | int addMember(Scope *sc, ScopeDsymbol *sd, int memnum); |
|---|
| | 163 | void compileIt(Scope *sc); |
|---|
| 162 | 164 | void semantic(Scope *sc); |
|---|
| 163 | 165 | void toCBuffer(OutBuffer *buf, HdrGenState *hgs); |
|---|
| r215 |
r336 |
|
| 1 | 1 | |
|---|
| 2 | | // Copyright (c) 1999-2006 by Digital Mars |
|---|
| | 2 | // Copyright (c) 1999-2008 by Digital Mars |
|---|
| 3 | 3 | // All Rights Reserved |
|---|
| 4 | 4 | // written by Walter Bright |
|---|
| … | … | |
| 1346 | 1346 | } |
|---|
| 1347 | 1347 | else if (t1->ty == Tclass || t2->ty == Tclass) |
|---|
| 1348 | | { int i1; |
|---|
| 1349 | | int i2; |
|---|
| 1350 | | |
|---|
| 1351 | | i1 = e2->implicitConvTo(t1); |
|---|
| 1352 | | i2 = e1->implicitConvTo(t2); |
|---|
| 1353 | | |
|---|
| 1354 | | if (i1 && i2) |
|---|
| 1355 | | { |
|---|
| 1356 | | // We have the case of class vs. void*, so pick class |
|---|
| 1357 | | if (t1->ty == Tpointer) |
|---|
| 1358 | | i1 = 0; |
|---|
| 1359 | | else if (t2->ty == Tpointer) |
|---|
| 1360 | | i2 = 0; |
|---|
| 1361 | | } |
|---|
| 1362 | | |
|---|
| 1363 | | if (i2) |
|---|
| 1364 | | { |
|---|
| 1365 | | goto Lt2; |
|---|
| 1366 | | } |
|---|
| 1367 | | else if (i1) |
|---|
| 1368 | | { |
|---|
| 1369 | | goto Lt1; |
|---|
| 1370 | | } |
|---|
| 1371 | | else |
|---|
| 1372 | | goto Lincompatible; |
|---|
| | 1348 | { |
|---|
| | 1349 | while (1) |
|---|
| | 1350 | { |
|---|
| | 1351 | int i1 = e2->implicitConvTo(t1); |
|---|
| | 1352 | int i2 = e1->implicitConvTo(t2); |
|---|
| | 1353 | |
|---|
| | 1354 | if (i1 && i2) |
|---|
| | 1355 | { |
|---|
| | 1356 | // We have the case of class vs. void*, so pick class |
|---|
| | 1357 | if (t1->ty == Tpointer) |
|---|
| | 1358 | i1 = 0; |
|---|
| | 1359 | else if (t2->ty == Tpointer) |
|---|
| | 1360 | i2 = 0; |
|---|
| | 1361 | } |
|---|
| | 1362 | |
|---|
| | 1363 | if (i2) |
|---|
| | 1364 | { |
|---|
| | 1365 | goto Lt2; |
|---|
| | 1366 | } |
|---|
| | 1367 | else if (i1) |
|---|
| | 1368 | { |
|---|
| | 1369 | goto Lt1; |
|---|
| | 1370 | } |
|---|
| | 1371 | else if (t1->ty == Tclass && t2->ty == Tclass) |
|---|
| | 1372 | { TypeClass *tc1 = (TypeClass *)t1; |
|---|
| | 1373 | TypeClass *tc2 = (TypeClass *)t2; |
|---|
| | 1374 | |
|---|
| | 1375 | /* Pick 'tightest' type |
|---|
| | 1376 | */ |
|---|
| | 1377 | ClassDeclaration *cd1 = tc1->sym->baseClass; |
|---|
| | 1378 | ClassDeclaration *cd2 = tc1->sym->baseClass; |
|---|
| | 1379 | |
|---|
| | 1380 | if (cd1 && cd2) |
|---|
| | 1381 | { t1 = cd1->type; |
|---|
| | 1382 | t2 = cd2->type; |
|---|
| | 1383 | } |
|---|
| | 1384 | else if (cd1) |
|---|
| | 1385 | t1 = cd1->type; |
|---|
| | 1386 | else if (cd2) |
|---|
| | 1387 | t2 = cd2->type; |
|---|
| | 1388 | else |
|---|
| | 1389 | goto Lincompatible; |
|---|
| | 1390 | } |
|---|
| | 1391 | else |
|---|
| | 1392 | goto Lincompatible; |
|---|
| | 1393 | } |
|---|
| 1373 | 1394 | } |
|---|
| 1374 | 1395 | else if ((e1->op == TOKstring || e1->op == TOKnull) && e1->implicitConvTo(t2)) |
|---|
| r159 |
r336 |
|
| 148 | 148 | } |
|---|
| 149 | 149 | |
|---|
| 150 | | #if V2 |
|---|
| | 150 | #if DMDV2 |
|---|
| 151 | 151 | if (id == Id::TypeInfo_Const) |
|---|
| 152 | 152 | { if (Type::typeinfoconst) |
|---|
| … | … | |
| 262 | 262 | |
|---|
| 263 | 263 | if (sc->stc & STCdeprecated) |
|---|
| 264 | | { //printf("test1: %s is deprecated\n", toChars()); |
|---|
| | 264 | { |
|---|
| 265 | 265 | isdeprecated = 1; |
|---|
| 266 | 266 | } |
|---|
| … | … | |
| 303 | 303 | { |
|---|
| 304 | 304 | tc = (TypeClass *)(tb); |
|---|
| | 305 | |
|---|
| 305 | 306 | if (tc->sym->isDeprecated()) |
|---|
| 306 | 307 | { |
|---|
| … | … | |
| 566 | 567 | scope->module->addDeferredSemantic(this); |
|---|
| 567 | 568 | |
|---|
| 568 | | //printf("\tsemantic('%s') failed\n", toChars()); |
|---|
| | 569 | //printf("\tsemantic('%s') failed due to forward references\n", toChars()); |
|---|
| 569 | 570 | return; |
|---|
| 570 | 571 | } |
|---|
| … | … | |
| 600 | 601 | { |
|---|
| 601 | 602 | //printf("Creating default this(){} for class %s\n", toChars()); |
|---|
| 602 | | ctor = new CtorDeclaration(0, 0, NULL, 0); |
|---|
| | 603 | ctor = new CtorDeclaration(loc, 0, NULL, 0); |
|---|
| 603 | 604 | ctor->fbody = new CompoundStatement(0, new Statements()); |
|---|
| 604 | 605 | members->push(ctor); |
|---|
| … | … | |
| 797 | 798 | */ |
|---|
| 798 | 799 | |
|---|
| 799 | | #if V2 |
|---|
| | 800 | #if DMDV2 |
|---|
| 800 | 801 | int isf(void *param, FuncDeclaration *fd) |
|---|
| 801 | 802 | { |
|---|
| … | … | |
| 858 | 859 | |
|---|
| 859 | 860 | void ClassDeclaration::interfaceSemantic(Scope *sc) |
|---|
| 860 | | { int i; |
|---|
| 861 | | |
|---|
| | 861 | { |
|---|
| 862 | 862 | vtblInterfaces = new BaseClasses(); |
|---|
| 863 | 863 | vtblInterfaces->reserve(interfaces_dim); |
|---|
| 864 | 864 | |
|---|
| 865 | | for (i = 0; i < interfaces_dim; i++) |
|---|
| | 865 | for (size_t i = 0; i < interfaces_dim; i++) |
|---|
| 866 | 866 | { |
|---|
| 867 | 867 | BaseClass *b = interfaces[i]; |
|---|
| … | … | |
| 911 | 911 | return FALSE; |
|---|
| 912 | 912 | } |
|---|
| | 913 | |
|---|
| 913 | 914 | |
|---|
| 914 | 915 | /**************************************** |
|---|
| … | … | |
| 937 | 938 | */ |
|---|
| 938 | 939 | |
|---|
| 939 | | char *ClassDeclaration::kind() |
|---|
| | 940 | const char *ClassDeclaration::kind() |
|---|
| 940 | 941 | { |
|---|
| 941 | 942 | return "class"; |
|---|
| … | … | |
| 1235 | 1236 | */ |
|---|
| 1236 | 1237 | |
|---|
| 1237 | | char *InterfaceDeclaration::kind() |
|---|
| | 1238 | const char *InterfaceDeclaration::kind() |
|---|
| 1238 | 1239 | { |
|---|
| 1239 | 1240 | return "interface"; |
|---|
| r159 |
r336 |
|
| 29 | 29 | */ |
|---|
| 30 | 30 | |
|---|
| 31 | | #if V2 |
|---|
| | 31 | #if DMDV2 |
|---|
| 32 | 32 | Expression *StructDeclaration::cloneMembers() |
|---|
| 33 | 33 | { |
|---|
| … | … | |
| 90 | 90 | Expression *e = NULL; |
|---|
| 91 | 91 | |
|---|
| 92 | | #if V2 |
|---|
| | 92 | #if DMDV2 |
|---|
| 93 | 93 | for (size_t i = 0; i < fields.dim; i++) |
|---|
| 94 | 94 | { |
|---|
| r305 |
r336 |
|
| 1426 | 1426 | e->type = type; |
|---|
| 1427 | 1427 | } |
|---|
| 1428 | | else if (e1->op == TOKarrayliteral && |
|---|
| | 1428 | else if ((e1->op == TOKarrayliteral || e1->op == TOKnull) && |
|---|
| 1429 | 1429 | e1->type->toBasetype()->nextOf()->equals(e2->type)) |
|---|
| 1430 | 1430 | { |
|---|
| 1431 | | ArrayLiteralExp *es1 = (ArrayLiteralExp *)e1; |
|---|
| 1432 | | |
|---|
| 1433 | | es1 = new ArrayLiteralExp(es1->loc, (Expressions *)es1->elements->copy()); |
|---|
| 1434 | | es1->elements->push(e2); |
|---|
| | 1431 | ArrayLiteralExp *es1; |
|---|
| | 1432 | if (e1->op == TOKarrayliteral) |
|---|
| | 1433 | { es1 = (ArrayLiteralExp *)e1; |
|---|
| | 1434 | es1 = new ArrayLiteralExp(es1->loc, (Expressions *)es1->elements->copy()); |
|---|
| | 1435 | es1->elements->push(e2); |
|---|
| | 1436 | } |
|---|
| | 1437 | else |
|---|
| | 1438 | { |
|---|
| | 1439 | es1 = new ArrayLiteralExp(e1->loc, e2); |
|---|
| | 1440 | } |
|---|
| 1435 | 1441 | e = es1; |
|---|
| 1436 | 1442 | |
|---|
| r305 |
r336 |
|
| 1 | 1 | |
|---|
| 2 | 2 | // Compiler implementation of the D programming language |
|---|
| 3 | | // Copyright (c) 1999-2007 by Digital Mars |
|---|
| | 3 | // Copyright (c) 1999-2008 by Digital Mars |
|---|
| 4 | 4 | // All Rights Reserved |
|---|
| 5 | 5 | // written by Walter Bright |
|---|
| … | … | |
| 40 | 40 | } |
|---|
| 41 | 41 | |
|---|
| 42 | | char *Declaration::kind() |
|---|
| | 42 | const char *Declaration::kind() |
|---|
| 43 | 43 | { |
|---|
| 44 | 44 | return "declaration"; |
|---|
| … | … | |
| 80 | 80 | return protection; |
|---|
| 81 | 81 | } |
|---|
| | 82 | |
|---|
| | 83 | /************************************* |
|---|
| | 84 | * Check to see if declaration can be modified in this context (sc). |
|---|
| | 85 | * Issue error if not. |
|---|
| | 86 | */ |
|---|
| | 87 | |
|---|
| | 88 | #if DMDV2 |
|---|
| | 89 | void Declaration::checkModify(Loc loc, Scope *sc, Type *t) |
|---|
| | 90 | { |
|---|
| | 91 | if (sc->incontract && isParameter()) |
|---|
| | 92 | error(loc, "cannot modify parameter '%s' in contract", toChars()); |
|---|
| | 93 | |
|---|
| | 94 | if (isCtorinit()) |
|---|
| | 95 | { // It's only modifiable if inside the right constructor |
|---|
| | 96 | Dsymbol *s = sc->func; |
|---|
| | 97 | while (1) |
|---|
| | 98 | { |
|---|
| | 99 | FuncDeclaration *fd = NULL; |
|---|
| | 100 | if (s) |
|---|
| | 101 | fd = s->isFuncDeclaration(); |
|---|
| | 102 | if (fd && |
|---|
| | 103 | ((fd->isCtorDeclaration() && storage_class & STCfield) || |
|---|
| | 104 | (fd->isStaticCtorDeclaration() && !(storage_class & STCfield))) && |
|---|
| | 105 | fd->toParent() == toParent() |
|---|
| | 106 | ) |
|---|
| | 107 | { |
|---|
| | 108 | VarDeclaration *v = isVarDeclaration(); |
|---|
| | 109 | assert(v); |
|---|
| | 110 | v->ctorinit = 1; |
|---|
| | 111 | //printf("setting ctorinit\n"); |
|---|
| | 112 | } |
|---|
| | 113 | else |
|---|
| | 114 | { |
|---|
| | 115 | if (s) |
|---|
| | 116 | { s = s->toParent2(); |
|---|
| | 117 | continue; |
|---|
| | 118 | } |
|---|
| | 119 | else |
|---|
| | 120 | { |
|---|
| | 121 | const char *p = isStatic() ? "static " : ""; |
|---|
| | 122 | error(loc, "can only initialize %sconst %s inside %sconstructor", |
|---|
| | 123 | p, toChars(), p); |
|---|
| | 124 | } |
|---|
| | 125 | } |
|---|
| | 126 | break; |
|---|
| | 127 | } |
|---|
| | 128 | } |
|---|
| | 129 | else |
|---|
| | 130 | { |
|---|
| | 131 | VarDeclaration *v = isVarDeclaration(); |
|---|
| | 132 | if (v && v->canassign == 0) |
|---|
| | 133 | { |
|---|
| | 134 | char *p = NULL; |
|---|
| | 135 | if (isConst()) |
|---|
| | 136 | p = "const"; |
|---|
| | 137 | else if (isInvariant()) |
|---|
| | 138 | p = "invariant"; |
|---|
| | 139 | else if (storage_class & STCmanifest) |
|---|
| | 140 | p = "manifest constant"; |
|---|
| | 141 | else if (!t->isAssignable()) |
|---|
| | 142 | p = "struct with immutable members"; |
|---|
| | 143 | if (p) |
|---|
| | 144 | { error(loc, "cannot modify %s", p); |
|---|
| | 145 | halt(); |
|---|
| | 146 | } |
|---|
| | 147 | } |
|---|
| | 148 | } |
|---|
| | 149 | } |
|---|
| | 150 | #endif |
|---|
| | 151 | |
|---|
| 82 | 152 | |
|---|
| 83 | 153 | /********************************* TupleDeclaration ****************************/ |
|---|
| … | … | |
| 98 | 168 | } |
|---|
| 99 | 169 | |
|---|
| 100 | | char *TupleDeclaration::kind() |
|---|
| | 170 | const char *TupleDeclaration::kind() |
|---|
| 101 | 171 | { |
|---|
| 102 | 172 | return "tuple"; |
|---|
| … | … | |
| 232 | 302 | if (sc->parent->isFuncDeclaration() && init) |
|---|
| 233 | 303 | semantic2(sc); |
|---|
| | 304 | storage_class |= sc->stc & STCdeprecated; |
|---|
| 234 | 305 | } |
|---|
| 235 | 306 | else if (sem == 1) |
|---|
| … | … | |
| 258 | 329 | } |
|---|
| 259 | 330 | |
|---|
| 260 | | char *TypedefDeclaration::kind() |
|---|
| | 331 | const char *TypedefDeclaration::kind() |
|---|
| 261 | 332 | { |
|---|
| 262 | 333 | return "typedef"; |
|---|
| … | … | |
| 319 | 390 | Dsymbol *AliasDeclaration::syntaxCopy(Dsymbol *s) |
|---|
| 320 | 391 | { |
|---|
| | 392 | //printf("AliasDeclaration::syntaxCopy()\n"); |
|---|
| 321 | 393 | assert(!s); |
|---|
| 322 | 394 | AliasDeclaration *sa; |
|---|
| … | … | |
| 467 | 539 | } |
|---|
| 468 | 540 | |
|---|
| 469 | | char *AliasDeclaration::kind() |
|---|
| | 541 | const char *AliasDeclaration::kind() |
|---|
| 470 | 542 | { |
|---|
| 471 | 543 | return "alias"; |
|---|
| … | … | |
| 602 | 674 | { |
|---|
| 603 | 675 | //printf("VarDeclaration::semantic('%s', parent = '%s')\n", toChars(), sc->parent->toChars()); |
|---|
| 604 | | //printf("type = %s\n", type->toChars()); |
|---|
| | 676 | //printf(" type = %s\n", type ? type->toChars() : "null"); |
|---|
| | 677 | //printf(" stc = x%x\n", sc->stc); |
|---|
| | 678 | //printf(" storage_class = x%x\n", storage_class); |
|---|
| 605 | 679 | //printf("linkage = %d\n", sc->linkage); |
|---|
| 606 | 680 | //if (strcmp(toChars(), "mul") == 0) halt(); |
|---|
| … | … | |
| 630 | 704 | type = type->semantic(loc, sc); |
|---|
| 631 | 705 | } |
|---|
| | 706 | //printf(" semantic type = %s\n", type ? type->toChars() : "null"); |
|---|
| 632 | 707 | |
|---|
| 633 | 708 | type->checkDeprecated(loc, sc); |
|---|
| … | … | |
| 637 | 712 | protection = sc->protection; |
|---|
| 638 | 713 | //printf("sc->stc = %x\n", sc->stc); |
|---|
| 639 | | //printf("storage_class = %x\n", storage_class); |
|---|
| | 714 | //printf("storage_class = x%x\n", storage_class); |
|---|
| 640 | 715 | |
|---|
| 641 | 716 | Dsymbol *parent = toParent(); |
|---|
| … | … | |
| 750 | 825 | } |
|---|
| 751 | 826 | |
|---|
| | 827 | /* Templates cannot add fields to aggregates |
|---|
| | 828 | */ |
|---|
| 752 | 829 | TemplateInstance *ti = parent->isTemplateInstance(); |
|---|
| 753 | 830 | if (ti) |
|---|
| … | … | |
| 854 | 931 | if (fd && !isStatic() && !isConst() && !init->isVoidInitializer()) |
|---|
| 855 | 932 | { |
|---|
| 856 | | Expression *e1; |
|---|
| 857 | | Type *t; |
|---|
| 858 | | int dim; |
|---|
| 859 | | |
|---|
| 860 | 933 | //printf("fd = '%s', var = '%s'\n", fd->toChars(), toChars()); |
|---|
| 861 | 934 | if (!ei) |
|---|
| … | … | |
| 875 | 948 | } |
|---|
| 876 | 949 | |
|---|
| 877 | | e1 = new VarExp(loc, this); |
|---|
| 878 | | |
|---|
| 879 | | t = type->toBasetype(); |
|---|
| | 950 | Expression *e1 = new VarExp(loc, this); |
|---|
| | 951 | |
|---|
| | 952 | Type *t = type->toBasetype(); |
|---|
| 880 | 953 | if (t->ty == Tsarray) |
|---|
| 881 | 954 | { |
|---|
| … | … | |
| 883 | 956 | if (!ei->exp->implicitConvTo(type)) |
|---|
| 884 | 957 | { |
|---|
| 885 | | dim = ((TypeSArray *)t)->dim->toInteger(); |
|---|
| | 958 | int dim = ((TypeSArray *)t)->dim->toInteger(); |
|---|
| 886 | 959 | // If multidimensional static array, treat as one large array |
|---|
| 887 | 960 | while (1) |
|---|
| … | … | |
| 975 | 1048 | else |
|---|
| 976 | 1049 | { |
|---|
| 977 | | Expression *e = type->defaultInit(); |
|---|
| | 1050 | Expression *e = type->defaultInit(loc); |
|---|
| 978 | 1051 | if (e) |
|---|
| 979 | 1052 | ei = new ExpInitializer(loc, e); |
|---|
| … | … | |
| 1002 | 1075 | } |
|---|
| 1003 | 1076 | |
|---|
| 1004 | | char *VarDeclaration::kind() |
|---|
| | 1077 | const char *VarDeclaration::kind() |
|---|
| 1005 | 1078 | { |
|---|
| 1006 | 1079 | return "variable"; |
|---|
| … | … | |
| 1021 | 1094 | if (storage_class & STCstatic) |
|---|
| 1022 | 1095 | buf->writestring("static "); |
|---|
| | 1096 | if (storage_class & STCauto) |
|---|
| | 1097 | buf->writestring("auto "); |
|---|
| | 1098 | #if DMDV2 |
|---|
| | 1099 | if (storage_class & STCmanifest) |
|---|
| | 1100 | buf->writestring("manifest "); |
|---|
| | 1101 | if (storage_class & STCinvariant) |
|---|
| | 1102 | buf->writestring("invariant "); |
|---|
| | 1103 | if (storage_class & STCtls) |
|---|
| | 1104 | buf->writestring("__thread "); |
|---|
| | 1105 | #endif |
|---|
| | 1106 | |
|---|
| 1023 | 1107 | if (type) |
|---|
| 1024 | 1108 | type->toCBuffer(buf, ident, hgs); |
|---|
| … | … | |
| 1053 | 1137 | |
|---|
| 1054 | 1138 | /************************************ |
|---|
| 1055 | | * Check to see if variable is a reference to an enclosing function |
|---|
| 1056 | | * or not. |
|---|
| | 1139 | * Check to see if this variable is actually in an enclosing function |
|---|
| | 1140 | * rather than the current one. |
|---|
| 1057 | 1141 | */ |
|---|
| 1058 | 1142 | |
|---|
| 1059 | 1143 | void VarDeclaration::checkNestedReference(Scope *sc, Loc loc) |
|---|
| 1060 | 1144 | { |
|---|
| | 1145 | //printf("VarDeclaration::checkNestedReference() %s\n", toChars()); |
|---|
| 1061 | 1146 | if (parent && !isDataseg() && parent != sc->parent) |
|---|
| 1062 | 1147 | { |
|---|
| | 1148 | // The function that this variable is in |
|---|
| 1063 | 1149 | FuncDeclaration *fdv = toParent()->isFuncDeclaration(); |
|---|
| | 1150 | // The current function |
|---|
| 1064 | 1151 | FuncDeclaration *fdthis = sc->parent->isFuncDeclaration(); |
|---|
| 1065 | 1152 | |
|---|
| … | … | |
| 1078 | 1165 | /******************************* |
|---|
| 1079 | 1166 | * Does symbol go into data segment? |
|---|
| | 1167 | |
|---|