Note: This website is archived. For up-to-date information about D projects and development, please visit wiki.dlang.org.

Changeset 224

Show
Ignore:
Timestamp:
10/29/09 05:06:58 (15 years ago)
Author:
walter
Message:

bugzilla 3349

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/typinf.c

    r221 r224  
    237237    tm->getTypeInfo(NULL); 
    238238    dtxoff(pdt, tm->vtinfo->toSymbol(), 0, TYnptr); 
    239239} 
    240240 
    241241void TypeInfoInvariantDeclaration::toDt(dt_t **pdt) 
    242242{ 
    243243    //printf("TypeInfoInvariantDeclaration::toDt() %s\n", toChars()); 
    244244    dtxoff(pdt, Type::typeinfoinvariant->toVtblSymbol(), 0, TYnptr); // vtbl for TypeInfo_Invariant 
    245245    dtdword(pdt, 0);                // monitor 
    246246    Type *tm = tinfo->mutableOf(); 
    247247    tm = tm->merge(); 
    248248    tm->getTypeInfo(NULL); 
    249249    dtxoff(pdt, tm->vtinfo->toSymbol(), 0, TYnptr); 
    250250} 
    251251 
    252252void TypeInfoSharedDeclaration::toDt(dt_t **pdt) 
    253253{ 
    254254    //printf("TypeInfoSharedDeclaration::toDt() %s\n", toChars()); 
    255255    dtxoff(pdt, Type::typeinfoshared->toVtblSymbol(), 0, TYnptr); // vtbl for TypeInfo_Shared 
    256256    dtdword(pdt, 0);                // monitor 
    257     Type *tm; 
    258     if (tinfo->isConst())       // it was 'shared const' 
    259     tm = tinfo->constOf(); 
    260     else                // it was just 'shared' 
    261     tm = tinfo->mutableOf(); 
     257    Type *tm = tinfo->unSharedOf(); 
    262258    tm = tm->merge(); 
    263259    tm->getTypeInfo(NULL); 
    264260    dtxoff(pdt, tm->vtinfo->toSymbol(), 0, TYnptr); 
    265261} 
    266262#endif 
    267263 
    268264void TypeInfoTypedefDeclaration::toDt(dt_t **pdt) 
    269265{ 
    270266    //printf("TypeInfoTypedefDeclaration::toDt() %s\n", toChars()); 
    271267 
    272268    dtxoff(pdt, Type::typeinfotypedef->toVtblSymbol(), 0, TYnptr); // vtbl for TypeInfo_Typedef 
    273269    dtdword(pdt, 0);                // monitor 
    274270 
    275271    assert(tinfo->ty == Ttypedef); 
    276272 
    277273    TypeTypedef *tc = (TypeTypedef *)tinfo; 
    278274    TypedefDeclaration *sd = tc->sym; 
    279275    //printf("basetype = %s\n", sd->basetype->toChars()); 
    280276 
    281277    /* Put out: