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

Changeset 761:fa306ca8843b

Show
Ignore:
Timestamp:
11/11/08 20:30:28 (2 months ago)
Author:
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
branch:
default
Message:

Applied fvbommel's patch from #112
Added missing TypeInfoInvariant? codegen for D2

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • dmd/root.c

    r741 r761  
    16141614    int count; 
    16151615 
     1616    // On some platforms (i.e. x86_64) va_list is an array and thus passed by 
     1617    // reference. Copy the input list so we can copy it back before retrying. 
     1618    va_list orig_args; 
     1619    va_copy(orig_args, args); 
     1620 
    16161621    p = buffer; 
    16171622    psize = sizeof(buffer); 
     
    16231628        break; 
    16241629    psize *= 2; 
    1625 #endif 
    1626 #if POSIX 
     1630#elif POSIX 
    16271631    count = vsnprintf(p,psize,format,args); 
    16281632    if (count == -1) 
     
    16331637        break; 
    16341638#endif 
     1639    va_copy(args, orig_args); 
    16351640    p = (char *) alloca(psize); // buffer too small, try again with larger size 
    16361641    } 
  • dmd2/root.c

    r758 r761  
    16141614    int count; 
    16151615 
     1616    // On some platforms (i.e. x86_64) va_list is an array and thus passed by 
     1617    // reference. Copy the input list so we can copy it back before retrying. 
     1618    va_list orig_args; 
     1619    va_copy(orig_args, args); 
     1620 
    16161621    p = buffer; 
    16171622    psize = sizeof(buffer); 
     
    16231628        break; 
    16241629    psize *= 2; 
    1625 #endif 
    1626 #if POSIX 
     1630#elif POSIX 
    16271631    count = vsnprintf(p,psize,format,args); 
    16281632    if (count == -1) 
     
    16331637        break; 
    16341638#endif 
     1639    va_copy(args, orig_args); 
    16351640    p = (char *) alloca(psize); // buffer too small, try again with larger size 
    16361641    } 
  • gen/typinf.cpp

    r758 r761  
    12301230} 
    12311231 
    1232 // void TypeInfoConstDeclaration::toDt(dt_t **pdt) 
    1233 // { 
    1234 //     //printf("TypeInfoConstDeclaration::toDt() %s\n", toChars()); 
    1235 //     dtxoff(pdt, Type::typeinfoconst->toVtblSymbol(), 0, TYnptr); // vtbl for TypeInfo_Const 
    1236 //     dtdword(pdt, 0);                // monitor 
    1237 //     Type *tm = tinfo->mutableOf(); 
    1238 //     tm = tm->merge(); 
    1239 //     tm->getTypeInfo(NULL); 
    1240 //     dtxoff(pdt, tm->vtinfo->toSymbol(), 0, TYnptr); 
    1241 // } 
    1242  
    12431232/////////////////////////////////////////////////////////// 
    12441233 
    12451234/* ========================================================================= */ 
    12461235 
     1236void TypeInfoInvariantDeclaration::llvmDeclare() 
     1237{ 
     1238    Logger::println("TypeInfoInvariantDeclaration::toDt() %s", toChars()); 
     1239    LOG_SCOPE; 
     1240 
     1241    LLVM_D_Declare_TypeInfoBase(this, Type::typeinfoinvariant); 
     1242} 
     1243 
     1244void TypeInfoInvariantDeclaration::llvmDefine() 
     1245{ 
     1246    Logger::println("TypeInfoInvariantDeclaration::toDt() %s", toChars()); 
     1247    LOG_SCOPE; 
     1248 
     1249    Type *tm = tinfo->mutableOf(); 
     1250    tm = tm->merge(); 
     1251 
     1252    LLVM_D_Define_TypeInfoBase(tm, this, Type::typeinfoinvariant); 
     1253} 
     1254 
    12471255void TypeInfoInvariantDeclaration::toDt(dt_t **pdt) 
    12481256{ 
    1249     assert(0 && "TypeInfoInvariantDeclaration::toDt"); 
    1250 
    1251  
    1252 void TypeInfoInvariantDeclaration::llvmDeclare() 
    1253 
    1254     assert(0 && "TypeInfoInvariantDeclaration::llvmDeclare"); 
    1255 
    1256  
    1257 void TypeInfoInvariantDeclaration::llvmDefine() 
    1258 
    1259     assert(0 && "TypeInfoInvariantDeclaration::llvmDeclare"); 
    1260 
    1261  
    1262 // void TypeInfoInvariantDeclaration::toDt(dt_t **pdt) 
    1263 // { 
    1264 //     //printf("TypeInfoInvariantDeclaration::toDt() %s\n", toChars()); 
    1265 //     dtxoff(pdt, Type::typeinfoinvariant->toVtblSymbol(), 0, TYnptr); // vtbl for TypeInfo_Invariant 
    1266 //     dtdword(pdt, 0);                // monitor 
    1267 //     Type *tm = tinfo->mutableOf(); 
    1268 //     tm = tm->merge(); 
    1269 //     tm->getTypeInfo(NULL); 
    1270 //     dtxoff(pdt, tm->vtinfo->toSymbol(), 0, TYnptr); 
    1271 // } 
     1257    assert(0); 
     1258
    12721259 
    12731260#endif 
Copyright © 2008, LDC Development Team.