Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Changeset 3725

Show
Ignore:
Timestamp:
07/08/08 13:40:55 (5 months ago)
Author:
keinfarbton
Message:

Merged DMD 2.015

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/experimental/D2.0/lib/common/tango/core/Exception.d

    r3724 r3725  
    116116 * Thrown on call to hidden func 
    117117 */ 
    118 class HiddenFuncException : TracedException 
     118class HiddenFuncException : Exception 
    119119{ 
    120120    this( ClassInfo ci ) 
  • branches/experimental/D2.0/lib/common/tango/core/Thread.d

    r3724 r3725  
    544544            //       a race condition with isRunning.  The operation is labeled 
    545545            //       volatile to prevent compiler reordering. 
    546             volatile m_addr = m_addr.init; 
     546            /+volatile+/ m_addr = m_addr.init; 
    547547            CloseHandle( m_hndl ); 
    548548            m_hndl = m_hndl.init; 
     
    556556            //       to zero ensures that pthread_detach will not be called 
    557557            //       on object destruction. 
    558             volatile m_addr = m_addr.init; 
     558            /+volatile+/ m_addr = m_addr.init; 
    559559        } 
    560560        if( rethrow && m_unhandled ) 
     
    670670     * the process. 
    671671     */ 
    672     static final int PRIORITY_MIN; 
     672    static const int PRIORITY_MIN; 
    673673 
    674674 
     
    679679     * the process. 
    680680     */ 
    681     static final int PRIORITY_MAX; 
     681    static const int PRIORITY_MAX; 
    682682 
    683683 
     
    22912291    } 
    22922292 
    2293     final size_t PAGESIZE; 
     2293    const size_t PAGESIZE; 
    22942294} 
    22952295 
     
    23342334 
    23352335        assert( Thread.getThis().m_curr is obj.m_ctxt ); 
    2336         volatile Thread.getThis().m_lock = false; 
     2336        /+volatile+/ Thread.getThis().m_lock = false; 
    23372337        obj.m_ctxt.tstack = obj.m_ctxt.bstack; 
    23382338        obj.m_state = Fiber.State.EXEC; 
     
    32013201        //       successive pop operations will succeed. 
    32023202        *oldp = getStackTop(); 
    3203         volatile tobj.m_lock = true; 
     3203        /+volatile+/ tobj.m_lock = true; 
    32043204        tobj.pushContext( m_ctxt ); 
    32053205 
     
    32093209        //       to prevent Bad Things from happening. 
    32103210        tobj.popContext(); 
    3211         volatile tobj.m_lock = false; 
     3211        /+volatile+/ tobj.m_lock = false; 
    32123212        tobj.m_curr.tstack = tobj.m_curr.bstack; 
    32133213    } 
     
    32353235        //       successive pop operations will succeed. 
    32363236        *oldp = getStackTop(); 
    3237         volatile tobj.m_lock = true; 
     3237        /+volatile+/ tobj.m_lock = true; 
    32383238 
    32393239        fiber_switchContext( oldp, newp ); 
     
    32413241        // NOTE: As above, these operations must be performed in a strict order 
    32423242        //       to prevent Bad Things from happening. 
    3243         volatile tobj.m_lock = false; 
     3243        /+volatile+/ tobj.m_lock = false; 
    32443244        tobj.m_curr.tstack = tobj.m_curr.bstack; 
    32453245    } 
  • branches/experimental/D2.0/lib/compiler/dmd/aaA.d

    r3724 r3725  
    250250body 
    251251{ 
     252    //printf("aaGet()\n"); 
    252253    auto pkey = cast(void *)(&valuesize + 1); 
    253254    size_t i; 
    254255    aaA *e; 
    255256    auto keysize = aligntsize(keyti.tsize()); 
     257    //printf("keysize = %d\n", keysize); 
    256258 
    257259    if (!aa.a) 
     
    577579                    break; 
    578580            } 
     581        //printf("rehash %d x%x\n", len, len); 
    579582            len = prime_list[i]; 
    580583            newb.b = new aaA*[len]; 
  • branches/experimental/D2.0/lib/compiler/dmd/typeinfo/ti_Aint.d

    r3724 r3725  
    7373} 
    7474 
     75unittest 
     76{ 
     77    int[][] a = [[5,3,8,7], [2,5,3,8,7]]; 
     78    a.sort; 
     79    assert(a == [[2,5,3,8,7], [5,3,8,7]]); 
     80 
     81    a = [[5,3,8,7], [5,3,8]]; 
     82    a.sort; 
     83    assert(a == [[5,3,8], [5,3,8,7]]); 
     84} 
     85 
    7586// uint[] 
    7687 
  • branches/experimental/D2.0/lib/compiler/dmd/typeinfo/ti_C.d

    r3724 r3725  
    11/* 
    2  *  Copyright (C) 2004-2005 by Digital Mars, www.digitalmars.com 
     2 *  Copyright (C) 2004-2008 by Digital Mars, www.digitalmars.com 
    33 *  Written by Walter Bright 
    44 * 
  • branches/experimental/D2.0/object.di

    r3724 r3725  
    8181    // 1:    // has possible pointers into GC memory 
    8282    OffsetTypeInfo[] offTi(); 
     83    void destroy(void *p); 
     84    void postblit(void *p); 
    8385} 
    8486 
     
    149151 
    150152    const(MemberInfo[]) function(Cutf8) xgetMembers; 
     153    void function(void*) xdtor; 
     154    void function(void*) xpostblit; 
    151155} 
    152156 
     
    177181 
    178182    static int opApply( int delegate( inout ModuleInfo ) ); 
     183} 
     184 
     185abstract class MemberInfo 
     186{ 
     187    Cutf8 name(); 
     188} 
     189 
     190class MemberInfo_field : MemberInfo 
     191{ 
     192    this(Cutf8 name, TypeInfo ti, size_t offset) 
     193    { 
     194    m_name = name; 
     195    m_typeinfo = ti; 
     196    m_offset = offset; 
     197    } 
     198 
     199    override Cutf8 name() { return m_name; } 
     200    TypeInfo typeInfo() { return m_typeinfo; } 
     201    size_t offset() { return m_offset; } 
     202 
     203    Cutf8 m_name; 
     204    TypeInfo m_typeinfo; 
     205    size_t m_offset; 
     206} 
     207 
     208class MemberInfo_function : MemberInfo 
     209{ 
     210    this(Cutf8 name, TypeInfo ti, void* fp, uint flags) 
     211    { 
     212    m_name = name; 
     213    m_typeinfo = ti; 
     214    m_fp = fp; 
     215    m_flags = flags; 
     216    } 
     217 
     218    override Cutf8 name() { return m_name; } 
     219    TypeInfo typeInfo() { return m_typeinfo; } 
     220    void* fp() { return m_fp; } 
     221    uint flags() { return m_flags; } 
     222 
     223 
     224    Cutf8 m_name; 
     225    TypeInfo m_typeinfo; 
     226    void* m_fp; 
     227    uint m_flags; 
    179228} 
    180229