Changeset 1455:89e38fbfef1f
- Timestamp:
- 06/01/09 14:02:20
(3 years ago)
- Author:
- Robert Clipsham <robert@octarineparrot.com>
- Parents:
1449:301a916eceef 1454:ff707c518ad7
- branch:
- default
- Message:
Automated merge with http://hg.dsource.org/projects/ldc
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r1434 |
r1455 |
|
| 679 | 679 | // void *destructor; |
|---|
| 680 | 680 | // void *invariant; // class invariant |
|---|
| | 681 | // version(D_Version2) |
|---|
| | 682 | // void *xgetMembers; |
|---|
| 681 | 683 | // uint flags; |
|---|
| 682 | 684 | // void *deallocator; |
|---|
| … | … | |
| 697 | 699 | ClassDeclaration* cinfo = ClassDeclaration::classinfo; |
|---|
| 698 | 700 | |
|---|
| | 701 | #if DMDV2 |
|---|
| | 702 | if (cinfo->fields.dim != 13) |
|---|
| | 703 | #else |
|---|
| 699 | 704 | if (cinfo->fields.dim != 12) |
|---|
| | 705 | #endif |
|---|
| 700 | 706 | { |
|---|
| 701 | 707 | error("object.d ClassInfo class is incorrect"); |
|---|
| r1453 |
r1455 |
|
| 515 | 515 | ////////////////////////////////////////////////////////////////////////////////////////// |
|---|
| 516 | 516 | |
|---|
| 517 | | LLValue* DtoVirtualFunctionPointer(DValue* inst, FuncDeclaration* fdecl) |
|---|
| | 517 | LLValue* DtoVirtualFunctionPointer(DValue* inst, FuncDeclaration* fdecl, char* name) |
|---|
| 518 | 518 | { |
|---|
| 519 | 519 | // sanity checks |
|---|
| … | … | |
| 534 | 534 | funcval = DtoLoad(funcval); |
|---|
| 535 | 535 | // index vtbl |
|---|
| 536 | | funcval = DtoGEPi(funcval, 0, fdecl->vtblIndex, fdecl->toChars()); |
|---|
| | 536 | std::string vtblname = name; |
|---|
| | 537 | vtblname.append("@vtbl"); |
|---|
| | 538 | funcval = DtoGEPi(funcval, 0, fdecl->vtblIndex, vtblname.c_str()); |
|---|
| 537 | 539 | // load funcptr |
|---|
| 538 | 540 | funcval = DtoAlignedLoad(funcval); |
|---|
| … | … | |
| 543 | 545 | // cast to final funcptr type |
|---|
| 544 | 546 | funcval = DtoBitCast(funcval, getPtrToType(DtoType(fdecl->type))); |
|---|
| | 547 | |
|---|
| | 548 | // postpone naming until after casting to get the name in call instructions |
|---|
| | 549 | funcval->setName(name); |
|---|
| | 550 | |
|---|
| 545 | 551 | if (Logger::enabled()) |
|---|
| 546 | 552 | Logger::cout() << "funcval casted: " << *funcval << '\n'; |
|---|