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

Changeset 2168

Show
Ignore:
Timestamp:
05/05/07 17:17:44 (2 years ago)
Author:
Gregor
Message:

patches/GDC-0.24-SVN.diff: Brought up to date with Tango changes.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/patches/GDC-0.24-SVN.diff

    r2119 r2168  
    11Index: object.di 
    22=================================================================== 
    3 --- object.di   (revision 2118
     3--- object.di   (revision 2167
    44+++ object.di   (working copy) 
    55@@ -47,13 +47,10 @@ 
     
    1919Index: lib/common/tango/core/Thread.d 
    2020=================================================================== 
    21 --- lib/common/tango/core/Thread.d  (revision 2118
     21--- lib/common/tango/core/Thread.d  (revision 2167
    2222+++ lib/common/tango/core/Thread.d  (working copy) 
    2323@@ -831,7 +831,8 @@ 
     
    4343Index: lib/compiler/gdc/genobj.d 
    4444=================================================================== 
    45 --- lib/compiler/gdc/genobj.d   (revision 2118
     45--- lib/compiler/gdc/genobj.d   (revision 2167
    4646+++ lib/compiler/gdc/genobj.d   (working copy) 
    47 @@ -155,6 +155,41 @@ 
    48      //  4:                      // has offTi[] member 
    49      void *deallocator; 
     47@@ -156,7 +156,6 @@ 
     48     //  8:                      // has constructors 
     49     void*       deallocator; 
    5050     OffsetTypeInfo[] offTi; 
    51 +    void function(Object) defaultConstructor;   // default Constructor 
    52 
    53 +    /** 
    54 +     * Search all modules for ClassInfo corresponding to classname. 
    55 +     * Returns: null if not found 
    56 +     */ 
    57 +    static ClassInfo find(char[] classname) 
    58 +    { 
    59 +        foreach (m; ModuleInfo.modules()) 
    60 +        { 
    61 +            //writefln("module %s, %d", m.name, m.localClasses.length); 
    62 +            foreach (c; m.localClasses) 
    63 +            { 
    64 +                //writefln("\tclass %s", c.name); 
    65 +                if (c.name == classname) 
    66 +                    return c; 
    67 +            } 
    68 +        } 
    69 +        return null; 
    70 +    } 
    71 
    72 +    /** 
    73 +     * Create instance of Object represented by 'this'. 
    74 +     */ 
    75 +    Object create() 
    76 +    { 
    77 +        if (flags & 8 && !defaultConstructor) 
    78 +            return null; 
    79 +        Object o = _d_newclass(this); 
    80 +        if (flags & 8 && defaultConstructor) 
    81 +        { 
    82 +            defaultConstructor(o); 
    83 +        } 
    84 +        return o; 
    85 +    } 
     51-/+ 
     52     void function(Object) defaultConstructor;   // default Constructor 
     53  
     54     /** 
     55@@ -192,7 +191,6 @@ 
     56         } 
     57         return o; 
     58     } 
     59-+/ 
    8660 } 
    8761  
    88   
     62 /** 
     63Index: patches/GDC-0.24-SVN.diff 
     64=================================================================== 
     65--- patches/GDC-0.24-SVN.diff   (revision 2167) 
     66+++ patches/GDC-0.24-SVN.diff   (working copy) 
     67@@ -1,6 +1,6 @@ 
     68 Index: object.di 
     69 =================================================================== 
     70---- object.di  (revision 2118) 
     71+--- object.di  (revision 2167) 
     72 +++ object.di  (working copy) 
     73 @@ -47,13 +47,10 @@ 
     74      // 8:       // has constructors 
     75@@ -18,7 +18,7 @@ 
     76  struct OffsetTypeInfo 
     77 Index: lib/common/tango/core/Thread.d 
     78 =================================================================== 
     79---- lib/common/tango/core/Thread.d (revision 2118) 
     80+--- lib/common/tango/core/Thread.d (revision 2167) 
     81 +++ lib/common/tango/core/Thread.d (working copy) 
     82 @@ -831,7 +831,8 @@ 
     83              { 
     84@@ -42,47 +42,21 @@ 
     85              } 
     86 Index: lib/compiler/gdc/genobj.d 
     87 =================================================================== 
     88---- lib/compiler/gdc/genobj.d  (revision 2118) 
     89+--- lib/compiler/gdc/genobj.d  (revision 2167) 
     90 +++ lib/compiler/gdc/genobj.d  (working copy) 
     91-@@ -155,6 +155,41 @@ 
     92-     //  4:                      // has offTi[] member 
     93-     void *deallocator; 
     94+@@ -156,7 +156,6 @@ 
     95+     //  8:                      // has constructors 
     96+     void*       deallocator; 
     97      OffsetTypeInfo[] offTi; 
     98-+    void function(Object) defaultConstructor;   // default Constructor 
     99-+ 
     100-+    /** 
     101-+     * Search all modules for ClassInfo corresponding to classname. 
     102-+     * Returns: null if not found 
     103-+     */ 
     104-+    static ClassInfo find(char[] classname) 
     105-+    { 
     106-+        foreach (m; ModuleInfo.modules()) 
     107-+        { 
     108-+            //writefln("module %s, %d", m.name, m.localClasses.length); 
     109-+            foreach (c; m.localClasses) 
     110-+            { 
     111-+                //writefln("\tclass %s", c.name); 
     112-+                if (c.name == classname) 
     113-+                    return c; 
     114-+            } 
     115-+        } 
     116-+        return null; 
     117-+    } 
     118-+ 
     119-+    /** 
     120-+     * Create instance of Object represented by 'this'. 
     121-+     */ 
     122-+    Object create() 
     123-+    { 
     124-+        if (flags & 8 && !defaultConstructor) 
     125-+            return null; 
     126-+        Object o = _d_newclass(this); 
     127-+        if (flags & 8 && defaultConstructor) 
     128-+        { 
     129-+            defaultConstructor(o); 
     130-+        } 
     131-+        return o; 
     132-+    } 
     133+-/+ 
     134+     void function(Object) defaultConstructor;   // default Constructor 
     135+  
     136+     /** 
     137+@@ -192,7 +191,6 @@ 
     138+         } 
     139+         return o; 
     140+     } 
     141+-+/ 
     142  } 
     143   
     144-  
     145+ /**