Changeset 664:eef8ac26c66c
- Timestamp:
- 10/06/08 16:54:08
(3 months ago)
- Author:
- Christian Kamm <kamm incasoftware de>
- branch:
- default
- Message:
Some missed LLVMDC -> LDC.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r434 |
r664 |
|
| 1 | | LLVMDC is released under the "three-clause BSD" license reproduced below with |
|---|
| | 1 | LDC is released under the "three-clause BSD" license reproduced below with |
|---|
| 2 | 2 | the following exceptions: |
|---|
| 3 | 3 | |
|---|
| … | … | |
| 11 | 11 | |
|---|
| 12 | 12 | -- "three-clause BSD" -- |
|---|
| 13 | | Copyright (c) 2007-2008 LLVMDC Team. |
|---|
| | 13 | Copyright (c) 2007-2008 LDC Team. |
|---|
| 14 | 14 | All rights reserved. |
|---|
| 15 | 15 | |
|---|
| … | … | |
| 22 | 22 | list of conditions and the following disclaimer in the documentation and/or |
|---|
| 23 | 23 | other materials provided with the distribution. |
|---|
| 24 | | * Neither the name of the LLVMDC Team nor the names of its contributors may be |
|---|
| | 24 | * Neither the name of the LDC Team nor the names of its contributors may be |
|---|
| 25 | 25 | used to endorse or promote products derived from this software without specific |
|---|
| 26 | 26 | prior written permission. |
|---|
| r620 |
r664 |
|
| 14 | 14 | } |
|---|
| 15 | 15 | |
|---|
| 16 | | version(LLVMDC) |
|---|
| | 16 | version(LDC) |
|---|
| 17 | 17 | { |
|---|
| 18 | 18 | pragma(intrinsic, "llvm.sqrt.f64") |
|---|
| r510 |
r664 |
|
| 309 | 309 | { /* In library, refer to it. |
|---|
| 310 | 310 | */ |
|---|
| 311 | | // LLVMDC FIXME |
|---|
| | 311 | // LDC FIXME |
|---|
| 312 | 312 | fd = FuncDeclaration::genCfunc(NULL, type, name); |
|---|
| 313 | 313 | } |
|---|
| r510 |
r664 |
|
| 1184 | 1184 | if (!t->equals(t2b)) |
|---|
| 1185 | 1185 | e2 = e2->castTo(sc, t); |
|---|
| 1186 | | // LLVMDC: llvm uses typesafe pointer arithmetic |
|---|
| | 1186 | // LDC: llvm uses typesafe pointer arithmetic |
|---|
| 1187 | 1187 | #if !IN_LLVM |
|---|
| 1188 | 1188 | if (t1b->next->isbit()) |
|---|
| r587 |
r664 |
|
| 128 | 128 | static char* reserved[] = |
|---|
| 129 | 129 | { |
|---|
| 130 | | "DigitalMars", "LLVM", "LLVMDC", "LLVM64", |
|---|
| | 130 | "DigitalMars", "LLVM", "LDC", "LLVM64", |
|---|
| 131 | 131 | "X86", "X86_64", "PPC", "PPC64", |
|---|
| 132 | 132 | "Windows", "Win32", "Win64", |
|---|
| r639 |
r664 |
|
| 268 | 268 | n++; |
|---|
| 269 | 269 | |
|---|
| 270 | | // LLVMDC seems dmd misses it sometimes here :/ |
|---|
| | 270 | // LDC seems dmd misses it sometimes here :/ |
|---|
| 271 | 271 | f->vthis->nestedref = 1; |
|---|
| 272 | 272 | |
|---|
| … | … | |
| 3757 | 3757 | } |
|---|
| 3758 | 3758 | |
|---|
| 3759 | | // LLVMDC: Fixes bug 1161, http://d.puremagic.com/issues/show_bug.cgi?id=1161 |
|---|
| | 3759 | // LDC: Fixes bug 1161, http://d.puremagic.com/issues/show_bug.cgi?id=1161 |
|---|
| 3760 | 3760 | // check access to VarDeclaration |
|---|
| 3761 | 3761 | accessCheck(loc, sc, NULL, var); |
|---|
| … | … | |
| 5556 | 5556 | { |
|---|
| 5557 | 5557 | e1 = e1->semantic(sc); |
|---|
| 5558 | | // LLVMDC we need a copy as we store the LLVM tpye in TypeFunction, and delegate/members have different types for 'this' |
|---|
| | 5558 | // LDC we need a copy as we store the LLVM tpye in TypeFunction, and delegate/members have different types for 'this' |
|---|
| 5559 | 5559 | type = new TypeDelegate(func->type->syntaxCopy()); |
|---|
| 5560 | 5560 | type = type->semantic(loc, sc); |
|---|
| … | … | |
| 6224 | 6224 | VarDeclaration *v = dve->var->isVarDeclaration(); |
|---|
| 6225 | 6225 | |
|---|
| 6226 | | // LLVMDC |
|---|
| | 6226 | // LDC |
|---|
| 6227 | 6227 | if (f && f->isIntrinsic()) |
|---|
| 6228 | 6228 | { |
|---|
| … | … | |
| 7844 | 7844 | e2 = e2->checkIntegral(); |
|---|
| 7845 | 7845 | //e2 = e2->castTo(sc, Type::tshiftcnt); |
|---|
| 7846 | | e2 = e2->castTo(sc, e1->type); // LLVMDC |
|---|
| | 7846 | e2 = e2->castTo(sc, e1->type); // LDC |
|---|
| 7847 | 7847 | return this; |
|---|
| 7848 | 7848 | } |
|---|
| … | … | |
| 7873 | 7873 | e2 = e2->checkIntegral(); |
|---|
| 7874 | 7874 | //e2 = e2->castTo(sc, Type::tshiftcnt); |
|---|
| 7875 | | e2 = e2->castTo(sc, e1->type); // LLVMDC |
|---|
| | 7875 | e2 = e2->castTo(sc, e1->type); // LDC |
|---|
| 7876 | 7876 | return this; |
|---|
| 7877 | 7877 | } |
|---|
| … | … | |
| 7902 | 7902 | e2 = e2->checkIntegral(); |
|---|
| 7903 | 7903 | //e2 = e2->castTo(sc, Type::tshiftcnt); |
|---|
| 7904 | | e2 = e2->castTo(sc, e1->type); // LLVMDC |
|---|
| | 7904 | e2 = e2->castTo(sc, e1->type); // LDC |
|---|
| 7905 | 7905 | return this; |
|---|
| 7906 | 7906 | } |
|---|
| … | … | |
| 8390 | 8390 | e1 = e1->integralPromotions(sc); |
|---|
| 8391 | 8391 | //e2 = e2->castTo(sc, Type::tshiftcnt); |
|---|
| 8392 | | e2 = e2->castTo(sc, e1->type); // LLVMDC |
|---|
| | 8392 | e2 = e2->castTo(sc, e1->type); // LDC |
|---|
| 8393 | 8393 | type = e1->type; |
|---|
| 8394 | 8394 | } |
|---|
| … | … | |
| 8415 | 8415 | e1 = e1->integralPromotions(sc); |
|---|
| 8416 | 8416 | //e2 = e2->castTo(sc, Type::tshiftcnt); |
|---|
| 8417 | | e2 = e2->castTo(sc, e1->type); // LLVMDC |
|---|
| | 8417 | e2 = e2->castTo(sc, e1->type); // LDC |
|---|
| 8418 | 8418 | type = e1->type; |
|---|
| 8419 | 8419 | } |
|---|
| … | … | |
| 8440 | 8440 | e1 = e1->integralPromotions(sc); |
|---|
| 8441 | 8441 | //e2 = e2->castTo(sc, Type::tshiftcnt); |
|---|
| 8442 | | e2 = e2->castTo(sc, e1->type); // LLVMDC |
|---|
| | 8442 | e2 = e2->castTo(sc, e1->type); // LDC |
|---|
| 8443 | 8443 | type = e1->type; |
|---|
| 8444 | 8444 | } |
|---|
| … | … | |
| 9093 | 9093 | #if IN_LLVM |
|---|
| 9094 | 9094 | |
|---|
| 9095 | | // Strictly LLVMDC specific stuff |
|---|
| | 9095 | // Strictly LDC specific stuff |
|---|
| 9096 | 9096 | |
|---|
| 9097 | 9097 | GEPExp::GEPExp(Loc loc, Expression* e, Identifier* id, unsigned idx) |
|---|
| r619 |
r664 |
|
| 159 | 159 | virtual elem *toElem(IRState *irs); |
|---|
| 160 | 160 | virtual dt_t **toDt(dt_t **pdt); |
|---|
| 161 | | // LLVMDC |
|---|
| | 161 | // LDC |
|---|
| 162 | 162 | virtual llvm::Constant *toConstElem(IRState *irs); |
|---|
| 163 | 163 | }; |
|---|
| … | … | |
| 186 | 186 | elem *toElem(IRState *irs); |
|---|
| 187 | 187 | dt_t **toDt(dt_t **pdt); |
|---|
| 188 | | // LLVMDC |
|---|
| | 188 | // LDC |
|---|
| 189 | 189 | virtual llvm::Constant *toConstElem(IRState *irs); |
|---|
| 190 | 190 | }; |
|---|
| … | … | |
| 211 | 211 | elem *toElem(IRState *irs); |
|---|
| 212 | 212 | dt_t **toDt(dt_t **pdt); |
|---|
| 213 | | // LLVMDC |
|---|
| | 213 | // LDC |
|---|
| 214 | 214 | virtual llvm::Constant *toConstElem(IRState *irs); |
|---|
| 215 | 215 | }; |
|---|
| … | … | |
| 239 | 239 | elem *toElem(IRState *irs); |
|---|
| 240 | 240 | dt_t **toDt(dt_t **pdt); |
|---|
| 241 | | // LLVMDC |
|---|
| | 241 | // LDC |
|---|
| 242 | 242 | virtual llvm::Constant *toConstElem(IRState *irs); |
|---|
| 243 | 243 | }; |
|---|
| … | … | |
| 318 | 318 | elem *toElem(IRState *irs); |
|---|
| 319 | 319 | dt_t **toDt(dt_t **pdt); |
|---|
| 320 | | // LLVMDC |
|---|
| | 320 | // LDC |
|---|
| 321 | 321 | virtual llvm::Constant *toConstElem(IRState *irs); |
|---|
| 322 | 322 | }; |
|---|
| … | … | |
| 348 | 348 | elem *toElem(IRState *irs); |
|---|
| 349 | 349 | dt_t **toDt(dt_t **pdt); |
|---|
| 350 | | // LLVMDC |
|---|
| | 350 | // LDC |
|---|
| 351 | 351 | virtual llvm::Constant *toConstElem(IRState *irs); |
|---|
| 352 | 352 | }; |
|---|
| … | … | |
| 401 | 401 | Expression *doInline(InlineDoState *ids); |
|---|
| 402 | 402 | Expression *inlineScan(InlineScanState *iss); |
|---|
| 403 | | // LLVMDC |
|---|
| | 403 | // LDC |
|---|
| 404 | 404 | virtual llvm::Constant *toConstElem(IRState *irs); |
|---|
| 405 | 405 | }; |
|---|
| … | … | |
| 428 | 428 | Expression *doInline(InlineDoState *ids); |
|---|
| 429 | 429 | Expression *inlineScan(InlineScanState *iss); |
|---|
| 430 | | // LLVMDC |
|---|
| | 430 | // LDC |
|---|
| 431 | 431 | virtual llvm::Constant *toConstElem(IRState *irs); |
|---|
| 432 | 432 | }; |
|---|
| … | … | |
| 461 | 461 | Expression *doInline(InlineDoState *ids); |
|---|
| 462 | 462 | Expression *inlineScan(InlineScanState *iss); |
|---|
| 463 | | // LLVMDC |
|---|
| | 463 | // LDC |
|---|
| 464 | 464 | virtual llvm::Constant *toConstElem(IRState *irs); |
|---|
| 465 | 465 | }; |
|---|
| … | … | |
| 595 | 595 | Expression *doInline(InlineDoState *ids); |
|---|
| 596 | 596 | //Expression *inlineScan(InlineScanState *iss); |
|---|
| 597 | | // LLVMDC |
|---|
| | 597 | // LDC |
|---|
| 598 | 598 | virtual llvm::Constant *toConstElem(IRState *irs); |
|---|
| 599 | 599 | }; |
|---|
| … | … | |
| 827 | 827 | elem *toElem(IRState *irs); |
|---|
| 828 | 828 | |
|---|
| 829 | | //LLVMDC: since we don't convert abc.def -> *(&abc + ABC.def.offsetof) |
|---|
| | 829 | //LDC: since we don't convert abc.def -> *(&abc + ABC.def.offsetof) |
|---|
| 830 | 830 | // these are needed |
|---|
| 831 | 831 | Expression *optimize(int result); |
|---|
| … | … | |
| 902 | 902 | Expression *castTo(Scope *sc, Type *t); |
|---|
| 903 | 903 | Expression *optimize(int result); |
|---|
| 904 | | // LLVMDC |
|---|
| | 904 | // LDC |
|---|
| 905 | 905 | virtual llvm::Constant *toConstElem(IRState *irs); |
|---|
| 906 | 906 | }; |
|---|
| … | … | |
| 1005 | 1005 | Identifier *opId(); |
|---|
| 1006 | 1006 | |
|---|
| 1007 | | // LLVMDC |
|---|
| | 1007 | // LDC |
|---|
| 1008 | 1008 | virtual llvm::Constant *toConstElem(IRState *irs); |
|---|
| 1009 | 1009 | }; |
|---|
| … | … | |
| 1502 | 1502 | #if IN_LLVM |
|---|
| 1503 | 1503 | |
|---|
| 1504 | | // this stuff is strictly LLVMDC |
|---|
| | 1504 | // this stuff is strictly LDC |
|---|
| 1505 | 1505 | |
|---|
| 1506 | 1506 | struct GEPExp : UnaExp |
|---|
| r658 |
r664 |
|
| 95 | 95 | assert(!fthrows); // deprecated |
|---|
| 96 | 96 | |
|---|
| 97 | | // LLVMDC |
|---|
| | 97 | // LDC |
|---|
| 98 | 98 | f->intrinsicName = intrinsicName; |
|---|
| 99 | 99 | |
|---|
| … | … | |
| 2021 | 2021 | |
|---|
| 2022 | 2022 | // |
|---|
| 2023 | | // LLVMDC: Adjusted to give argument info to the runtime function decl. |
|---|
| | 2023 | // LDC: Adjusted to give argument info to the runtime function decl. |
|---|
| 2024 | 2024 | // |
|---|
| 2025 | 2025 | |
|---|
| r658 |
r664 |
|
| 703 | 703 | else if (id == Id::VENDOR) |
|---|
| 704 | 704 | { |
|---|
| 705 | | t->ustring = (unsigned char *)"LLVMDC"; |
|---|
| | 705 | t->ustring = (unsigned char *)"LDC"; |
|---|
| 706 | 706 | goto Lstring; |
|---|
| 707 | 707 | } |
|---|
| r658 |
r664 |
|
| 162 | 162 | #endif |
|---|
| 163 | 163 | |
|---|
| 164 | | // LLVMDC specific |
|---|
| | 164 | // LDC specific |
|---|
| 165 | 165 | #if IN_LLVM |
|---|
| 166 | 166 | TOKgep, |
|---|
| r643 |
r664 |
|
| 123 | 123 | srcfile = new File(srcfilename); |
|---|
| 124 | 124 | |
|---|
| 125 | | // LLVMDC |
|---|
| | 125 | // LDC |
|---|
| 126 | 126 | llvmForceLogging = false; |
|---|
| 127 | 127 | this->doDocComment = doDocComment; |
|---|
| r604 |
r664 |
|
| 170 | 170 | void genmoduleinfo(); |
|---|
| 171 | 171 | |
|---|
| 172 | | // LLVMDC |
|---|
| | 172 | // LDC |
|---|
| 173 | 173 | void buildTargetFiles(); |
|---|
| 174 | 174 | File* buildFilePath(char* forcename, char* path, char* ext); |
|---|
| r658 |
r664 |
|
| 104 | 104 | ClassDeclaration *Type::typeinfotypelist; |
|---|
| 105 | 105 | |
|---|
| 106 | | // LLVMDC |
|---|
| | 106 | // LDC |
|---|
| 107 | 107 | Type* Type::topaque; |
|---|
| 108 | 108 | |
|---|
| … | … | |
| 211 | 211 | mangleChar[Tslice] = '@'; |
|---|
| 212 | 212 | |
|---|
| 213 | | // LLVMDC |
|---|
| | 213 | // LDC |
|---|
| 214 | 214 | mangleChar[Topaque] = 'O'; |
|---|
| 215 | 215 | |
|---|
| … | … | |
| 235 | 235 | tvoidptr = tvoid->pointerTo(); |
|---|
| 236 | 236 | |
|---|
| 237 | | // LLVMDC |
|---|
| | 237 | // LDC |
|---|
| 238 | 238 | topaque = new TypeOpaque(); |
|---|
| 239 | 239 | |
|---|
| … | … | |
| 727 | 727 | buf.writeByte(0); |
|---|
| 728 | 728 | sprintf(name, "_D%dTypeInfo_%s6__initZ", 9 + len, buf.data); |
|---|
| 729 | | // LLVMDC |
|---|
| | 729 | // LDC |
|---|
| 730 | 730 | // it is not clear where the underscore that's stripped here is added back in |
|---|
| 731 | 731 | // if (global.params.isWindows) |
|---|
| … | … | |
| 1003 | 1003 | switch (ty) |
|---|
| 1004 | 1004 | { |
|---|
| 1005 | | //LLVMDC: llvm aligns 12 byte reals to 4 byte |
|---|
| | 1005 | //LDC: llvm aligns 12 byte reals to 4 byte |
|---|
| 1006 | 1006 | case Tfloat80: |
|---|
| 1007 | 1007 | case Timaginary80: |
|---|
| … | … | |
| 1011 | 1011 | break; |
|---|
| 1012 | 1012 | |
|---|
| 1013 | | //LLVMDC: llvm aligns these to 4 byte boundaries |
|---|
| | 1013 | //LDC: llvm aligns these to 4 byte boundaries |
|---|
| 1014 | 1014 | case Tint64: |
|---|
| 1015 | 1015 | case Tuns64: |
|---|
| … | … | |
| 1555 | 1555 | Expressions *arguments; |
|---|
| 1556 | 1556 | |
|---|
| 1557 | | //LLVMDC: Build arguments. |
|---|
| | 1557 | //LDC: Build arguments. |
|---|
| 1558 | 1558 | static FuncDeclaration *adReverseChar_fd = NULL; |
|---|
| 1559 | 1559 | if(!adReverseChar_fd) { |
|---|
| … | … | |
| 1586 | 1586 | Expressions *arguments; |
|---|
| 1587 | 1587 | |
|---|
| 1588 | | //LLVMDC: Build arguments. |
|---|
| | 1588 | //LDC: Build arguments. |
|---|
| 1589 | 1589 | static FuncDeclaration *adSortChar_fd = NULL; |
|---|
| 1590 | 1590 | if(!adSortChar_fd) { |
|---|
| … | … | |
| 1621 | 1621 | assert(size); |
|---|
| 1622 | 1622 | dup = (ident == Id::dup); |
|---|
| 1623 | | //LLVMDC: Build arguments. |
|---|
| | 1623 | //LDC: Build arguments. |
|---|
| 1624 | 1624 | static FuncDeclaration *adDup_fd = NULL; |
|---|
| 1625 | 1625 | if(!adDup_fd) { |
|---|
| … | … | |
| 1657 | 1657 | bool isBit = (n->ty == Tbit); |
|---|
| 1658 | 1658 | |
|---|
| 1659 | | //LLVMDC: Build arguments. |
|---|
| | 1659 | //LDC: Build arguments. |
|---|
| 1660 | 1660 | static FuncDeclaration *adSort_fd = NULL; |
|---|
| 1661 | 1661 | if(!adSort_fd) { |
|---|
| … | … | |
| 1681 | 1681 | arguments->push(e); |
|---|
| 1682 | 1682 | if (next->ty != Tbit) |
|---|
| 1683 | | arguments->push(n->getTypeInfo(sc)); // LLVMDC, we don't support the getInternalTypeInfo |
|---|
| | 1683 | arguments->push(n->getTypeInfo(sc)); // LDC, we don't support the getInternalTypeInfo |
|---|
| 1684 | 1684 | // optimization arbitrarily, not yet at least... |
|---|
| 1685 | 1685 | e = new CallExp(e->loc, ec, arguments); |
|---|
| … | … | |
| 2347 | 2347 | Expressions *arguments; |
|---|
| 2348 | 2348 | |
|---|
| 2349 | | //LLVMDC: Build arguments. |
|---|
| | 2349 | //LDC: Build arguments. |
|---|
| 2350 | 2350 | static FuncDeclaration *aaLen_fd = NULL; |
|---|
| 2351 | 2351 | if(!aaLen_fd) { |
|---|
| … | … | |
| 2368 | 2368 | |
|---|
| 2369 | 2369 | assert(size); |
|---|
| 2370 | | //LLVMDC: Build arguments. |
|---|
| | 2370 | //LDC: Build arguments. |
|---|
| 2371 | 2371 | static FuncDeclaration *aaKeys_fd = NULL; |
|---|
| 2372 | 2372 | if(!aaKeys_fd) { |
|---|
| … | … | |
| 2389 | 2389 | Expressions *arguments; |
|---|
| 2390 | 2390 | |
|---|
| 2391 | | //LLVMDC: Build arguments. |
|---|
| | 2391 | //LDC: Build arguments. |
|---|
| 2392 | 2392 | static FuncDeclaration *aaValues_fd = NULL; |
|---|
| 2393 | 2393 | if(!aaValues_fd) { |
|---|
| … | … | |
| 2414 | 2414 | Expressions *arguments; |
|---|
| 2415 | 2415 | |
|---|
| 2416 | | //LLVMDC: Build arguments. |
|---|
| | 2416 | //LDC: Build arguments. |
|---|
| 2417 | 2417 | static FuncDeclaration *aaRehash_fd = NULL; |
|---|
| 2418 | 2418 | if(!aaRehash_fd) { |
|---|
| … | … | |
| 4466 | 4466 | accessCheck(e->loc, sc, e, d); |
|---|
| 4467 | 4467 | |
|---|
| 4468 | | // LLVMDC we don't want dot exprs turned into pointer arithmetic. it complicates things for no apparent gain |
|---|
| | 4468 | // LDC we don't want dot exprs turned into pointer arithmetic. it complicates things for no apparent gain |
|---|
| 4469 | 4469 | #ifndef IN_LLVM |
|---|
| 4470 | 4470 | b = new AddrExp(e->loc, e); |
|---|
| … | … | |
| 4731 | 4731 | } |
|---|
| 4732 | 4732 | |
|---|
| 4733 | | #endif // !LLVMDC |
|---|
| | 4733 | #endif // !LDC |
|---|
| 4734 | 4734 | |
|---|
| 4735 | 4735 | return e; |
|---|
| r510 |
r664 |
|
| 1599 | 1599 | * _aaApply(aggr, keysize, flde) |
|---|
| 1600 | 1600 | */ |
|---|
| 1601 | | //LLVMDC: Build arguments. |
|---|
| | 1601 | //LDC: Build arguments. |
|---|
| 1602 | 1602 | static FuncDeclaration *aaApply2_fd = NULL; |
|---|
| 1603 | 1603 | if(!aaApply2_fd) { |
|---|
| … | … | |
| 1668 | 1668 | int j = sprintf(fdname, "_aApply%s%.*s%d", r, 2, fntab[flag], dim); |
|---|
| 1669 | 1669 | assert(j < sizeof(fdname)); |
|---|
| 1670 | | //LLVMDC: Build arguments. |
|---|
| | 1670 | //LDC: Build arguments. |
|---|
| 1671 | 1671 | Arguments* args = new Arguments; |
|---|
| 1672 | 1672 | args->push(new Argument(STCin, Type::topaque->arrayOf(), NULL, NULL)); |
|---|
| … | … | |
| 2244 | 2244 | cases = NULL; |
|---|
| 2245 | 2245 | hasNoDefault = 0; |
|---|
| 2246 | | // LLVMDC |
|---|
| | 2246 | // LDC |
|---|
| 2247 | 2247 | enclosinghandler = NULL; |
|---|
| 2248 | 2248 | } |
|---|
| … | … | |
| 3201 | 3201 | this->esync = NULL; |
|---|
| 3202 | 3202 | this->enclosinghandler = NULL; |
|---|
| 3203 | | // LLVMDC |
|---|
| | 3203 | // LDC |
|---|
| 3204 | 3204 | this->llsync = NULL; |
|---|
| 3205 | 3205 | } |
|---|
| … | … | |
| 3212 | 3212 | this->esync = esync; |
|---|
| 3213 | 3213 | this->enclosinghandler = NULL; |
|---|
| 3214 | | // LLVMDC |
|---|
| | 3214 | // LDC |
|---|
| 3215 | 3215 | this->llsync = NULL; |
|---|
| 3216 | 3216 | } |
|---|
| … | … | |
| 3962 | 3962 | sc->pop(); |
|---|
| 3963 | 3963 | |
|---|
| 3964 | | // LLVMDC put in labmap |
|---|
| | 3964 | // LDC put in labmap |
|---|
| 3965 | 3965 | fd->labmap[ident->toChars()] = this; |
|---|
| 3966 | 3966 | |
|---|
| r510 |
r664 |
|
| 95 | 95 | }; |
|---|
| 96 | 96 | |
|---|
| 97 | | // LLVMDC this is used for tracking try-finally, synchronized and volatile scopes |
|---|
| | 97 | // LDC this is used for tracking try-finally, synchronized and volatile scopes |
|---|
| 98 | 98 | // definitions in gen/llvmhelpers.cpp |
|---|
| 99 | 99 | struct EnclosingHandler : Object |
|---|
| … | … | |
| 545 | 545 | CaseStatement* isCaseStatement() { return this; } |
|---|
| 546 | 546 | |
|---|
| 547 | | // LLVMDC |
|---|
| | 547 | // LDC |
|---|
| 548 | 548 | llvm::BasicBlock* bodyBB; |
|---|
| 549 | 549 | llvm::ConstantInt* llvmIdx; |
|---|
| … | … | |
| 571 | 571 | void toIR(IRState *irs); |
|---|
| 572 | 572 | |
|---|
| 573 | | // LLVMDC |
|---|
| | 573 | // LDC |
|---|
| 574 | 574 | llvm::BasicBlock* bodyBB; |
|---|
| 575 | 575 | }; |
|---|
| … | … | |
| 656 | 656 | void toIR(IRState *irs); |
|---|
| 657 | 657 | |
|---|
| 658 | | // LLVMDC: only set if ident is set: label statement to jump to |
|---|
| | 658 | // LDC: only set if ident is set: label statement to jump to |
|---|
| 659 | 659 | LabelStatement *target; |
|---|
| 660 | 660 | }; |
|---|
| … | … | |
| 675 | 675 | void toIR(IRState *irs); |
|---|
| 676 | 676 | |
|---|
| 677 | | // LLVMDC: only set if ident is set: label statement to jump to |
|---|
| | 677 | // LDC: only set if ident is set: label statement to jump to |
|---|
| 678 | 678 | LabelStatement *target; |
|---|
| 679 | 679 | }; |
|---|
| … | … | |
| 872 | 872 | void toIR(IRState *irs); |
|---|
| 873 | 873 | |
|---|
| 874 | | // LLVMDC |
|---|
| | 874 | // LDC |
|---|
| 875 | 875 | bool asmLabel; // for labels inside inline assembler |
|---|
| 876 | 876 | }; |
|---|
| … | … | |
| 904 | 904 | void toIR(IRState *irs); |
|---|
| 905 | 905 | |
|---|
| 906 | | // LLVMDC |
|---|
| | 906 | // LDC |
|---|
| 907 | 907 | // non-zero if this is a branch, contains the target labels identifier |
|---|
| 908 | 908 | Identifier* isBranchToLabel; |
|---|
| r561 |
r664 |
|
| 305 | 305 | td = new TemplateDeclaration(loc, ident, p, d); |
|---|
| 306 | 306 | |
|---|
| 307 | | // LLVMDC |
|---|
| | 307 | // LDC |
|---|
| 308 | 308 | td->intrinsicName = intrinsicName; |
|---|
| 309 | 309 | |
|---|
| r561 |
r664 |
|
| 87 | 87 | int isOverloadable(); |
|---|
| 88 | 88 | |
|---|
| 89 | | // LLVMDC |
|---|
| | 89 | // LDC |
|---|
| 90 | 90 | std::string intrinsicName; |
|---|
| 91 | 91 | }; |
|---|
| … | … | |
| 316 | 316 | AliasDeclaration *isAliasDeclaration(); |
|---|
| 317 | 317 | |
|---|
| 318 | | // LLVMDC |
|---|
| | 318 | // LDC |
|---|
| 319 | 319 | TemplateInstance *tinst; // enclosing template instance |
|---|
| 320 | 320 | void printInstantiationTrace(); |
|---|
| r458 |
r664 |
|
| 1 | | #ifndef LLVMDC_GEN_AA_H |
|---|
| 2 | | #define LLVMDC_GEN_AA_H |
|---|
| | 1 | #ifndef LDC_GEN_AA_H |
|---|
| | 2 | #define LDC_GEN_AA_H |
|---|
| 3 | 3 | |
|---|
| 4 | 4 | DValue* DtoAAIndex(Loc& loc, Type* type, DValue* aa, DValue* key, bool lvalue); |
|---|
| … | … | |
| 6 | 6 | void DtoAARemove(Loc& loc, DValue* aa, DValue* key); |
|---|
| 7 | 7 | |
|---|
| 8 | | #endif // LLVMDC_GEN_AA_H |
|---|
| | 8 | #endif // LDC_GEN_AA_H |
|---|
| r486 |
r664 |
|
| 1 | | #ifndef LLVMDC_GEN_CLASSES_H |
|---|
| 2 | | #define LLVMDC_GEN_CLASSES_H |
|---|
| | 1 | #ifndef LDC_GEN_CLASSES_H |
|---|
| | 2 | #define LDC_GEN_CLASSES_H |
|---|
| 3 | 3 | |
|---|
| 4 | 4 | #include "gen/structs.h" |
|---|
| r617 |
r664 |
|
| 1 | | #ifndef LLVMDC_GEN_COMPLEX_H |
|---|
| 2 | | #define LLVMDC_GEN_COMPLEX_H |
|---|
| | 1 | #ifndef LDC_GEN_COMPLEX_H |
|---|
| | 2 | #define LDC_GEN_COMPLEX_H |
|---|
| 3 | 3 | |
|---|
| 4 | 4 | const llvm::StructType* DtoComplexType(Type* t); |
|---|
| … | … | |
| 27 | 27 | DValue* DtoCastComplex(Loc& loc, DValue* val, Type* to); |
|---|
| 28 | 28 | |
|---|
| 29 | | #endif // LLVMDC_GEN_COMPLEX_H |
|---|
| | 29 | #endif // LDC_GEN_COMPLEX_H |
|---|
| r601 |
r664 |
|
| 1 | | #ifndef LLVMDC_GEN_DVALUE_H |
|---|
| 2 | | #define LLVMDC_GEN_DVALUE_H |
|---|
| | 1 | #ifndef LDC_GEN_DVALUE_H |
|---|
| | 2 | #define LDC_GEN_DVALUE_H |
|---|
| 3 | 3 | |
|---|
| 4 | 4 | /* |
|---|
| … | … | |
| 169 | 169 | }; |
|---|
| 170 | 170 | |
|---|
| 171 | | #endif // LLVMDC_GEN_DVALUE_H |
|---|
| | 171 | #endif // LDC_GEN_DVALUE_H |
|---|
| r486 |
r664 |
|
| 1 | | #ifndef LLVMDC_GEN_FUNCTIONS_H |
|---|
| 2 | | #define LLVMDC_GEN_FUNCTIONS_H |
|---|
| | 1 | #ifndef LDC_GEN_FUNCTIONS_H |
|---|
| | 2 | #define LDC_GEN_FUNCTIONS_H |
|---|
| 3 | 3 | |
|---|
| 4 | 4 | const llvm::FunctionType* DtoFunctionType(Type* t, const LLType* thistype, const LLType* nesttype, bool ismain = false); |
|---|
| r632 |
r664 |
|
| 1 | | #ifndef LLVMDC_GEN_IRSTATE_H |
|---|
| 2 | | #define LLVMDC_GEN_IRSTATE_H |
|---|
| | 1 | #ifndef LDC_GEN_IRSTATE_H |
|---|
| | 2 | #define LDC_GEN_IRSTATE_H |
|---|
| 3 | 3 | |
|---|
| 4 | 4 | #include <vector> |
|---|
| … | … | |
| 235 | 235 | } |
|---|
| 236 | 236 | |
|---|
| 237 | | #endif // LLVMDC_GEN_IRSTATE_H |
|---|
| | 237 | #endif // LDC_GEN_IRSTATE_H |
|---|
| r306 |
r664 |
|
| 1 | | #ifndef LLVMDC_GEN_LINKER_H |
|---|
| 2 | | #define LLVMDC_GEN_LINKER_H |
|---|
| | 1 | #ifndef LDC_GEN_LINKER_H |
|---|
| | 2 | #define LDC_GEN_LINKER_H |
|---|
| 3 | 3 | |
|---|
| 4 | 4 | #include <vector> |
|---|
| … | … | |
| 34 | 34 | int runExectuable(); |
|---|
| 35 | 35 | |
|---|
| 36 | | #endif // LLVMDC_GEN_LINKER_H |
|---|
| | 36 | #endif // LDC_GEN_LINKER_H |
|---|
| r632 |
r664 |
|
| 1 | | #ifndef LLVMDC_GEN_LLVMHELPERS_H |
|---|
| 2 | | #define LLVMDC_GEN_LLVMHELPERS_H |
|---|
| | 1 | #ifndef LDC_GEN_LLVMHELPERS_H |
|---|
| | 2 | #define LDC_GEN_LLVMHELPERS_H |
|---|
| 3 | 3 | |
|---|
| 4 | 4 | #include "gen/llvm.h" |
|---|
| r250 |
r664 |
|
| 1 | | #ifndef LLVMDC_GEN_TODEBUG_H |
|---|
| 2 | | #define LLVMDC_GEN_TODEBUG_H |
|---|
| | 1 | #ifndef LDC_GEN_TODEBUG_H |
|---|
| | 2 | #define LDC_GEN_TODEBUG_H |
|---|
| 3 | 3 | |
|---|
| 4 | 4 | void RegisterDwarfSymbols(llvm::Module* mod); |
|---|
| … | … | |
| 38 | 38 | LLGlobalVariable* DtoDwarfGlobalVariable(LLGlobalVariable* ll, VarDeclaration* vd); |
|---|
| 39 | 39 | |
|---|
| 40 | | #endif // LLVMDC_GEN_TODEBUG_H |
|---|
| | 40 | #endif // LDC_GEN_TODEBUG_H |
|---|
| 41 | 41 | |
|---|
| 42 | 42 | |
|---|
| r648 |
r664 |
|
| 1 | | #ifndef LLVMDC_GEN_TOLLVM_H |
|---|
| 2 | | #define LLVMDC_GEN_TOLLVM_H |
|---|
| | 1 | #ifndef LDC_GEN_TOLLVM_H |
|---|
| | 2 | #define LDC_GEN_TOLLVM_H |
|---|
| 3 | 3 | |
|---|
| 4 | 4 | #include "gen/llvm.h" |
|---|
| … | … | |
| 145 | 145 | #include "enums.h" |
|---|
| 146 | 146 | |
|---|
| 147 | | #endif // LLVMDC_GEN_TOLLVM_H |
|---|
| | 147 | #endif // LDC_GEN_TOLLVM_H |
|---|
| r102 |
r664 |
|
| 1 | | #ifndef LLVMDC_GEN_TYPEINF_H |
|---|
| 2 | | #define LLVMDC_GEN_TYPEINF_H |
|---|
| | 1 | #ifndef LDC_GEN_TYPEINF_H |
|---|
| | 2 | #define LDC_GEN_TYPEINF_H |
|---|
| 3 | 3 | |
|---|
| 4 | 4 | void DtoResolveTypeInfo(TypeInfoDeclaration* tid); |
|---|
| r136 |
r664 |
|
| 1 | 1 | // this head contains stuff used by all the IR |
|---|
| 2 | 2 | |
|---|
| 3 | | #ifndef LLVMDC_IR_IR_H |
|---|
| 4 | | #define LLVMDC_IR_IR_H |
|---|
| | 3 | #ifndef LDC_IR_IR_H |
|---|
| | 4 | #define LDC_IR_IR_H |
|---|
| 5 | 5 | |
|---|
| 6 | 6 | #include "ir/irforw.h" |
|---|
| r136 |
r664 |
|
| 1 | | #ifndef LLVMDC_IR_IRFORW_H |
|---|
| 2 | | #define LLVMDC_IR_IRFORW_H |
|---|
| | 1 | #ifndef LDC_IR_IRFORW_H |
|---|
| | 2 | #define LDC_IR_IRFORW_H |
|---|
| 3 | 3 | |
|---|
| 4 | 4 | // dmd forward declarations |
|---|
| r584 |
r664 |
|
| 1 | | #ifndef LLVMDC_IR_IRFUNCTION_H |
|---|
| 2 | | #define LLVMDC_IR_IRFUNCTION_H |
|---|
| | 1 | #ifndef LDC_IR_IRFUNCTION_H |
|---|
| | 2 | #define LDC_IR_IRFUNCTION_H |
|---|
| 3 | 3 | |
|---|
| 4 | 4 | #include "ir/ir.h" |
|---|
| r612 |
r664 |
|
| 1 | | #ifndef LLVMDC_IR_IRLANDINGPADINFO_H |
|---|
| 2 | | #define LLVMDC_IR_IRLANDINGPADINFO_H |
|---|
| | 1 | #ifndef LDC_IR_IRLANDINGPADINFO_H |
|---|
| | 2 | #define LDC_IR_IRLANDINGPADINFO_H |
|---|
| 3 | 3 | |
|---|
| 4 | 4 | #include "ir/ir.h" |
|---|
| r252 |
r664 |
|
| 1 | | #ifndef LLVMDC_IR_IRMODULE_H |
|---|
| 2 | | #define LLVMDC_IR_IRMODULE_H |
|---|
| | 1 | #ifndef LDC_IR_IRMODULE_H |
|---|
| | 2 | #define LDC_IR_IRMODULE_H |
|---|
| 3 | 3 | |
|---|
| 4 | 4 | #include "ir/ir.h" |
|---|
| r435 |
r664 |
|
| 1 | | #ifndef LLVMDC_IR_IRSTRUCT_H |
|---|
| 2 | | #define LLVMDC_IR_IRSTRUCT_H |
|---|
| | 1 | #ifndef LDC_IR_IRSTRUCT_H |
|---|
| | 2 | #define LDC_IR_IRSTRUCT_H |
|---|
| 3 | 3 | |
|---|
| 4 | 4 | #include "ir/ir.h" |
|---|
| r175 |
r664 |
|
| 1 | | #ifndef LLVMDC_IR_IRSYMBOL_H |
|---|
| 2 | | #define LLVMDC_IR_IRSYMBOL_H |
|---|
| | 1 | #ifndef LDC_IR_IRSYMBOL_H |
|---|
| | 2 | #define LDC_IR_IRSYMBOL_H |
|---|
| 3 | 3 | |
|---|
| 4 | 4 | #include <set> |
|---|
| r194 |
r664 |
|
| 1 | | #ifndef LLVMDC_IR_IRTYPE_H |
|---|
| 2 | | #define LLVMDC_IR_IRTYPE_H |
|---|
| | 1 | #ifndef LDC_IR_IRTYPE_H |
|---|
| | 2 | #define LDC_IR_IRTYPE_H |
|---|
| 3 | 3 | |
|---|
| 4 | 4 | #include <set> |
|---|
| r136 |
r664 |
|
| 1 | | #ifndef LLVMDC_IR_IRVAR_H |
|---|
| 2 | | #define LLVMDC_IR_IRVAR_H |
|---|
| | 1 | #ifndef LDC_IR_IRVAR_H |
|---|
| | 2 | #define LDC_IR_IRVAR_H |
|---|
| 3 | 3 | |
|---|
| 4 | 4 | #include "ir/ir.h" |
|---|
| r473 |
r664 |
|
| 29 | 29 | |
|---|
| 30 | 30 | /* |
|---|
| 31 | | * Modified for LLVMDC by Tomas Lindquist Olsen. |
|---|
| | 31 | * Modified for LDC by Tomas Lindquist Olsen. |
|---|
| 32 | 32 | * The DMD implementation wont quite work due to the differences in how |
|---|
| 33 | 33 | * structs are handled. |
|---|
| r473 |
r664 |
|
| 34 | 34 | |
|---|
| 35 | 35 | /* |
|---|
| 36 | | * This copy is modified to work with LLVMDC |
|---|
| | 36 | * This copy is modified to work with LDC |
|---|
| 37 | 37 | * by Tomas Lindquist Olsen, September 2007 |
|---|
| 38 | 38 | */ |
|---|
| r662 |
r664 |
|
| 13 | 13 | * Copyright (C) 2004-2006 by Digital Mars, www.digitalmars.com |
|---|
| 14 | 14 | * Written by Walter Bright |
|---|
| 15 | | * Modified for LLVMDC by Tomas Lindquist Olsen |
|---|
| | 15 | * Modified for LDC by Tomas Lindquist Olsen |
|---|
| 16 | 16 | * |
|---|
| 17 | 17 | * This software is provided 'as-is', without any express or implied |
|---|
| r473 |
r664 |
|
| 8 | 8 | work with the GDC compiler. |
|---|
| 9 | 9 | NOTE: This file has been patched from the original GDC distribution to |
|---|
| 10 | | work with the LLVMDC compiler. |
|---|
| | 10 | work with the LDC compiler. |
|---|
| 11 | 11 | |
|---|
| 12 | 12 | Modified by David Friedman, May 2006 |
|---|
| r473 |
r664 |
|
| 1 | | // Modified for LLVMDC |
|---|
| | 1 | // Modified for LDC |
|---|
| 2 | 2 | |
|---|
| 3 | 3 | module std.moduleinit; |
|---|
| r131 |
r664 |
|
| 7 | 7 | /* This is for use with variable argument lists with extern(D) linkage. */ |
|---|
| 8 | 8 | |
|---|
| 9 | | /* Modified for LLVMDC (LLVM D Compiler) by Tomas Lindquist Olsen, 2007 */ |
|---|
| | 9 | /* Modified for LDC (LLVM D Compiler) by Tomas Lindquist Olsen, 2007 */ |
|---|
| 10 | 10 | |
|---|