Wiki Roadmap Timeline Tickets New Ticket Source Search Help / Guide About Trac Login

Changeset 1455:89e38fbfef1f

Show
Ignore:
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
  • gen/classes.cpp

    r1434 r1455  
    679679//         void *destructor; 
    680680//         void *invariant;        // class invariant 
     681//         version(D_Version2) 
     682//          void *xgetMembers;  
    681683//         uint flags; 
    682684//         void *deallocator; 
     
    697699    ClassDeclaration* cinfo = ClassDeclaration::classinfo; 
    698700 
     701#if DMDV2 
     702    if (cinfo->fields.dim != 13) 
     703#else 
    699704    if (cinfo->fields.dim != 12) 
     705#endif 
    700706    { 
    701707        error("object.d ClassInfo class is incorrect"); 
  • gen/classes.cpp

    r1453 r1455  
    515515////////////////////////////////////////////////////////////////////////////////////////// 
    516516 
    517 LLValue* DtoVirtualFunctionPointer(DValue* inst, FuncDeclaration* fdecl
     517LLValue* DtoVirtualFunctionPointer(DValue* inst, FuncDeclaration* fdecl, char* name
    518518{ 
    519519    // sanity checks 
     
    534534    funcval = DtoLoad(funcval); 
    535535    // 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()); 
    537539    // load funcptr 
    538540    funcval = DtoAlignedLoad(funcval); 
     
    543545    // cast to final funcptr type 
    544546    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 
    545551    if (Logger::enabled()) 
    546552        Logger::cout() << "funcval casted: " << *funcval << '\n'; 
Copyright © 2008, LDC Development Team.