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

Changeset 806:96b404ba7eb0

Show
Ignore:
Timestamp:
11/30/08 05:25:40 (1 month ago)
Author:
Christian Kamm <kamm incasoftware de>
branch:
default
Message:

Move storage of final vtbl from BaseClass? to IrInterface?: BaseClass? instances are shared!
Always use the target's irstruct interfaceMap when building the const initializer.
Tango helloworld works again.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • dmd/aggregate.h

    r797 r806  
    155155}; 
    156156 
     157// warning: two classes with the same base class share the same 
     158//   BaseClass instance. 
    157159struct BaseClass 
    158160{ 
  • gen/classes.cpp

    r805 r806  
    6767 
    6868    // build the interface vtable 
    69     b->fillVtbl(target, &b->vtbl, newinstance); 
     69    b->fillVtbl(target, &iri->vtblDecls, newinstance); 
    7070 
    7171    // add the vtable type 
     
    494494    } 
    495495 
    496     // if it's a class, and it implements interfaces, add the vtables 
    497     IrStruct* irstruct = cd->ir.irStruct; 
     496    // if it's a class, and it implements interfaces, add the vtables - as found in the target class! 
     497    IrStruct* irstruct = target->ir.irStruct; 
    498498 
    499499    size_t nvtbls = cd->vtblInterfaces->dim; 
     
    593593 
    594594        // build vtable intializer for this interface implementation 
    595         Array& arr = iri->base->vtbl
     595        Array& arr = iri->vtblDecls
    596596        size_t narr = arr.dim; 
    597597 
  • ir/irstruct.h

    r802 r806  
    165165    LLConstant* vtblInit; 
    166166    LLGlobalVariable* vtbl; 
     167    Array vtblDecls; // array of FuncDecls that make up the vtbl 
    167168 
    168169    const LLStructType* infoTy; 
Copyright © 2008, LDC Development Team.