Changeset 853

Show
Ignore:
Timestamp:
10/10/08 20:56:40 (9 months ago)
Author:
sean
Message:

This commit includes all the changes necessary for Phobos to run against druntime. Here is a sucinct list of the changes made:

  • Removed gcstats. Garbage collector statistics will be avaialable in durintime's 'memory' module.
  • Removed object.d. This module is replaced by the object.d provided by druntime.
  • Removed std.array. To trap an array bounds error, import 'exception' from druntime and catch ArrayBoundsException?.
  • Removed std.asserterror. To trap an asertion failure, import 'exception' from druntime and catch AssertException?.
  • Removed std.gc. To interact with the garbage collector, import 'memory' from druntime.
  • Removed std.hiddenfunc. No equivalent exception is currently exposed by druntime, but if one is exposed it will be called HiddenFuncException? and be declared in 'exception'.
  • Removed std.moduleinit. druntime declares ModuleInfo? in object.d, so it is implicitly availble without importing.
  • Removed std.outofmemory. To trap an out of memory error, import 'exception' from druntime and catch OutOfMemoryException?.
  • Removed std.switcherr. To trap a switch error, import 'exception' from druntime and catch SwitchException?.
  • Removed std.synchro. This functionality will exist within druintime.
  • Removed std.thread. A Thread class is available within druntime's 'thread' module. An interface comparison will be provided separately.
  • Removed std.typeinfo. The classes defined in this package are for runtime use and should not be visible to the user.

The prior version of Phobos has been archived in tags/phobos-2.019 if needed.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/phobos/etc/gamma.d

    r697 r853  
    184184     * interval (2,3).  Large arguments are handled by Stirling's 
    185185     * formula. Large negative arguments are made positive using 
    186      * a reflection formula.  
    187      */  
     186     * a reflection formula. 
     187     */ 
    188188 
    189189    real q, z; 
     
    197197    if (x == 0) 
    198198    return 1.0 / x; // +- infinity depending on sign of x, create an exception. 
    199      
     199 
    200200    q = fabs(x); 
    201          
     201 
    202202    if ( q > 13.0L ) 
    203203    { 
    204204    // Large arguments are handled by Stirling's 
    205205    // formula. Large negative arguments are made positive using 
    206     // the reflection formula.   
     206    // the reflection formula. 
    207207 
    208208    if ( x < 0.0L ) 
     
    230230        return gammaStirling(x); 
    231231    } 
    232      
     232 
    233233    // Arguments |x| <= 13 are reduced by recurrence and the function 
    234234    // approximated by a rational function of degree 7/8 in the 
     
    241241    z *= x; 
    242242    } 
    243      
     243 
    244244    while ( x < -0.03125L ) 
    245245    { 
     
    247247    x += 1.0L; 
    248248    } 
    249      
     249 
    250250    if ( x <= 0.03125L ) 
    251251    { 
     
    262262    } 
    263263    } 
    264      
     264 
    265265    while ( x < 2.0L ) 
    266266    { 
     
    270270    if ( x == 2.0L ) 
    271271    return z; 
    272      
     272 
    273273    x -= 2.0L; 
    274274    return z * poly( x, GammaNumeratorCoeffs ) / poly( x, GammaDenominatorCoeffs ); 
     
    315315 *  <tr> <td> &plusmn;&infin;  <td> +&infin;      <td> no 
    316316 *  </table> 
    317  *  
     317 * 
    318318 */ 
    319319real lgamma(real x) 
     
    330330     */ 
    331331    real q, w, z, f, nx; 
    332      
     332 
    333333    if (isnan(x)) 
    334334    return x; 
    335335    if (fabs(x) == x.infinity) 
    336336    return x.infinity; 
    337      
     337 
    338338    if ( x < -34.0L ) 
    339339    { 
     
    386386            q = z / (x * poly( x, GammaSmallCoeffs)); 
    387387        return log( fabs(q) ); 
    388         }           
     388        } 
    389389        z /= nx +  f; 
    390390        nx += 1.0L; 
     
    398398    return ( log(z) + p ); 
    399399    } 
    400      
     400 
    401401    //const real MAXLGM = 1.04848146839019521116e+4928L; 
    402402    //if ( x > MAXLGM ) return sgngaml * real.infinity; 
     
    404404    /* log( sqrt( 2*pi ) ) */ 
    405405    const real LOGSQRT2PI  =  0.91893853320467274178L; 
    406      
     406 
    407407    q = ( x - 0.5L ) * log(x) - x + LOGSQRT2PI; 
    408408    if (x > 1.0e10L) return q; 
     
    415415{ 
    416416    // return true if x is +0.0 
    417     bit isPosZero(real x) 
     417    bool isPosZero(real x) 
    418418    { 
    419419       return (x==0) && (signbit(x)==0); 
     
    426426    assert(isPosZero(lgamma(1.0L))); 
    427427    assert(isPosZero(lgamma(2.0L))); 
    428   
     428 
    429429    // x, correct loggamma(x), correct d/dx loggamma(x). 
    430430    static real[] testpoints = 
    431     [  
     431    [ 
    432432     8.0L,                    8.525146484375L      + 1.48766904143001655310E-5,   2.01564147795560999654E0L, 
    433433     8.99993896484375e-1L,    6.6375732421875e-2L  + 5.11505711292524166220E-6L, -7.54938684259372234258E-1, 
     
    481481} 
    482482 
    483    
     483 
  • trunk/phobos/linux.mak

    r829 r853  
    3535      CFLAGS = 
    3636      DFLAGS = 
    37       LDFLAGS =  
     37      LDFLAGS = 
    3838else 
    3939      OBJDIR = obj/linux 
    4040      OBJEXT = o 
    4141      LIBEXT = a 
    42       EXEEXT =  
     42      EXEEXT = 
    4343      CC = gcc 
    4444      DMD = dmd 
     
    9191 
    9292ifneq (none,$(OBJDIR)) 
    93       DUMMY := $(shell mkdir --parents $(OBJDIR) $(OBJDIR)/etc/c/zlib   \ 
    94             $(OBJDIR)/internal $(OBJDIR)/internal/gc) 
     93      DUMMY := $(shell mkdir --parents $(OBJDIR) $(OBJDIR)/etc/c/zlib) 
    9594endif 
    9695 
     
    139138    for m in $(STD_MODULES); do echo public import std.$$m\;; done > $@ 
    140139 
    141 INTERNAL_MODULES = aApply aApplyR aaA adi alloca arraycast arraycat \ 
    142     cast cmath2 deh2 dmain2 invariant llmath memset monitor obj     \ 
    143     object qsort switch trace arrayassign \ 
    144     arrayfloat arraydouble arrayreal \ 
    145     arraybyte arrayshort arrayint 
    146 INTERNAL_CMODULES = complex critical 
    147 INTERNAL_CMODULES_NOTBUILT = deh 
    148 INTERNAL_EXTRAFILES = internal/mars.h internal/minit.asm 
    149  
    150 INTERNAL_GC_MODULES = gc gcold gcx gcbits gclinux 
    151 INTERNAL_GC_EXTRAFILES = \ 
    152     internal/gc/gcstub.d \ 
    153     internal/gc/win32.d \ 
    154     internal/gc/testgc.d \ 
    155     internal/gc/win32.mak \ 
    156     internal/gc/linux.mak 
    157  
    158 STD_MODULES = algorithm array asserterror atomics base64 bigint bind bitarray   \ 
     140STD_MODULES = algorithm atomics base64 bigint bind bitarray         \ 
    159141        bitmanip boxer compiler complex contracts conv cover cpuid  \ 
    160142        cstream ctype date dateparse demangle encoding file format  \ 
    161         functional  getopt hiddenfunc intrinsic iterator loader math   
    162         md5 metastrings mmfile moduleinit numeric openrj outbuffer
    163         outofmemory path perf process random regexp signals socket
    164         socketstream stdint stdio stream string switcherr syserror
    165         synchro system thread traits typecons typetuple uni uri utf     \ 
     143        functional  getopt intrinsic iterator loader math         
     144        md5 metastrings mmfile numeric openrj outbuffer                   
     145        path perf process random regexp signals socket                 
     146        socketstream stdint stdio stream string syserror           
     147        system traits typecons typetuple uni uri utf                    \ 
    166148        variant xml zip zlib 
    167 STD_MODULES_NOTBUILT = stdarg gc 
     149STD_MODULES_NOTBUILT = stdarg 
    168150 
    169151STD_C_MODULES = stdarg stdio 
     
    192174ETC_C_MODULES = zlib 
    193175 
    194 SRC = errno.c object.d unittest.d crc32.d  
     176SRC = errno.c object.d unittest.d crc32.d 
    195177 
    196178SRC_ZLIB = ChangeLog README adler32.c algorithm.txt compress.c crc32.c  \ 
     
    208190 
    209191SRC_RELEASEZIP = linux.mak win32.mak phoboslicense.txt $(SRC)       \ 
    210     $(SRC_ZLIB) $(INTERNAL_EXTRAFILES) $(INTERNAL_GC_EXTRAFILES)    \ 
    211     $(addprefix internal/,$(addsuffix .c,               \ 
    212     $(INTERNAL_CMODULES_NOTBUILT))) $(addprefix internal/,      \ 
    213     $(addsuffix .c, $(INTERNAL_CMODULES))) $(addprefix internal/,   \ 
    214     $(addsuffix .d, $(INTERNAL_MODULES))) $(addprefix       \ 
    215     internal/gc/, $(addsuffix .d, $(INTERNAL_GC_MODULES)))      \ 
    216     $(addprefix std/, $(addsuffix .d, $(STD_MODULES)        \ 
     192    $(SRC_ZLIB) $(addprefix std/, $(addsuffix .d, $(STD_MODULES)    \ 
    217193    $(STD_MODULES_NOTBUILT))) $(addprefix std/c/, $(addsuffix .d,   \ 
    218194    $(STD_C_MODULES) $(STD_C_MODULES_NOTBUILT))) $(addprefix    \ 
     
    220196    $(STD_C_LINUX_MODULES_NOTBUILT))) $(addprefix std/c/windows/,   \ 
    221197    $(addsuffix .d, $(STD_C_WINDOWS_MODULES_NOTBUILT)))     \ 
    222     $(addprefix std/typeinfo/, $(addsuffix .d,          \ 
    223     $(TYPEINFO_MODULES))) $(addprefix std/windows/, $(addsuffix \ 
     198    $(addprefix std/windows/, $(addsuffix                           \ 
    224199    .d, $(STD_WINDOWS_MODULES_NOTBUILT))) $(addprefix etc/,     \ 
    225200    $(addsuffix .d, $(ETC_MODULES_NOTBUILT))) $(addprefix etc/c/,   \ 
    226201    $(addsuffix .d, $(ETC_C_MODULES))) 
    227202 
    228 OBJS = errno $(addprefix internal/, $(INTERNAL_MODULES)     \ 
    229     $(INTERNAL_CMODULES)) $(addprefix internal/gc/,     \ 
    230     $(INTERNAL_GC_MODULES)) $(addprefix etc/c/zlib/,    \ 
    231     $(ZLIB_CMODULES)) 
     203OBJS = errno 
    232204 
    233205OBJS := $(addsuffix .$(OBJEXT),$(addprefix $(OBJDIR)/,$(OBJS))) 
    234206 
    235 SRC2LIB = crc32 gcstats $(addprefix std/, $(STD_MODULES)) $(addprefix   \ 
    236 std/typeinfo/, $(TYPEINFO_MODULES)) $(addprefix std/c/,         \ 
     207SRC2LIB = crc32 $(addprefix std/, $(STD_MODULES)) $(addprefix std/c/,   \ 
    237208$(STD_C_MODULES)) $(addprefix std/c/linux/, $(STD_C_LINUX_MODULES)) \ 
    238209$(addprefix etc/c/, $(ETC_C_MODULES)) 
     
    275246 
    276247HEADERDIR = include 
    277 HEADERS = object.d \ 
    278     $(addprefix std/,$(addsuffix .d,$(STD_MODULES))) \ 
     248HEADERS = $(addprefix std/,$(addsuffix .d,$(STD_MODULES))) \ 
    279249    $(addprefix std/,$(addsuffix .d,$(STD_MODULES_NOTBUILT))) \ 
    280250    $(addprefix std/c/,$(addsuffix .d,$(STD_C_MODULES))) \ 
    281251    $(addprefix std/c/,$(addsuffix .d,$(STD_C_MODULES_NOTBUILT))) \ 
    282252    $(addprefix std/c/linux/,$(addsuffix .d,$(STD_C_LINUX_MODULES))) \ 
    283     $(addprefix std/c/linux/,$(addsuffix .d,$(STD_C_LINUX_MODULES_NOTBUILT)))  
     253    $(addprefix std/c/linux/,$(addsuffix .d,$(STD_C_LINUX_MODULES_NOTBUILT))) 
    284254 
    285255HEADERS := $(addprefix $(HEADERDIR)/,$(HEADERS)) 
  • trunk/phobos/std/c/stdio.d

    r689 r853  
    196196size_t   fread(void *,size_t,size_t,FILE *);    /// 
    197197size_t   fwrite(in void *,size_t,size_t,FILE *);    /// 
    198 //int  printf(in char *,...); /// 
     198int    printf(in char *,...); /// 
    199199int  fprintf(FILE *,in char *,...); /// 
    200200int  vfprintf(FILE *,in char *,va_list);    /// 
  • trunk/phobos/std/encoding.d

    r693 r853  
    20742074    static void register(string className) 
    20752075    { 
    2076         auto scheme = cast(EncodingScheme)Object.factory(className); 
     2076        auto scheme = cast(EncodingScheme)ClassInfo.find(className).create(); 
    20772077        if (scheme is null) 
    20782078            throw new EncodingException("Unable to create class "~className); 
     
    21012101            throw new EncodingException("Unrecognized Encoding: "~encodingName); 
    21022102        string className = *p; 
    2103         auto scheme = cast(EncodingScheme)Object.factory(className); 
     2103        auto scheme = cast(EncodingScheme)ClassInfo.find(className).create(); 
    21042104        if (scheme is null) throw new EncodingException("Unable to create class "~className); 
    21052105        return scheme; 
  • trunk/phobos/std/file.d

    r840 r853  
    3838module std.file; 
    3939 
     40private import memory; 
    4041private import std.c.stdio; 
    4142private import std.c.stdlib; 
     
    4344private import std.string; 
    4445private import std.regexp; 
    45 private import std.gc; 
    4646private import std.c.string; 
    4747private import std.traits; 
     
    132132    goto err2; 
    133133 
    134     auto buf = std.gc.malloc(size); 
    135     if (buf) 
    136     std.gc.hasNoPointers(buf.ptr); 
     134    auto buf = GC.malloc(size, GC.BlkAttr.NO_SCAN)[0 .. size]; 
    137135 
    138136    if (ReadFile(h,buf.ptr,size,&numread,null) != 1) 
     
    955953    invariant size = statbuf.st_size; 
    956954    if (!size) return null; 
    957     auto buf = std.gc.malloc(size); 
     955    auto buf = GC.malloc(size, GC.BlkAttr.NO_SCAN); 
    958956    enforce(buf, "Out of memory"); 
    959957    scope(failure) delete buf; 
    960     std.gc.hasNoPointers(buf.ptr); 
    961958 
    962959    cenforce(std.c.linux.linux.read(fd, buf.ptr, size) == size, name); 
  • trunk/phobos/std/md5.d

    r689 r853  
    8989import std.string; 
    9090import std.contracts; 
     91import std.c.stdio : printf; 
    9192 
    9293/*************************************** 
  • trunk/phobos/std/outbuffer.d

    r689 r853  
    1919private 
    2020{ 
     21    import memory; 
    2122    import std.string; 
    22     import std.gc; 
    2323    import std.c.stdio; 
    2424    import std.c.stdlib; 
     
    8181        { 
    8282        data.length = (offset + nbytes) * 2; 
    83         std.gc.hasPointers(data.ptr); 
     83        GC.clrAttr(data.ptr, GC.BlkAttr.NO_SCAN); 
    8484        } 
    8585    } 
  • trunk/phobos/std/path.d

    r849 r853  
    3535    private import std.c.stdlib; 
    3636    private import std.c.linux.linux; 
    37     private import std.outofmemory
     37    private import exception : onOutOfMemoryError
    3838} 
    3939 
     
    12581258    if (extra_memory) 
    12591259    std.c.stdlib.free(extra_memory); 
    1260     _d_OutOfMemory(); 
     1260    onOutOfMemoryError(); 
    12611261    return null; 
    12621262} 
  • trunk/phobos/std/random.d

    r846 r853  
    2020Random) for whichever generator it finds the most fit for the target 
    2121environment. 
    22     
     22 
    2323Example: 
    2424 
     
    6666// Work derived from: 
    6767 
    68 /*  
     68/* 
    6969   A C-program for MT19937, with initialization improved 2002/1/26. 
    7070   Coded by Takuji Nishimura and Makoto Matsumoto. 
    7171 
    72    Before using, initialize the state by using init_genrand(seed)   
     72   Before using, initialize the state by using init_genrand(seed) 
    7373   or init_by_array(init_key, key_length). 
    7474 
    7575   Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura, 
    76    All rights reserved.                           
     76   All rights reserved. 
    7777 
    7878   Redistribution and use in source and binary forms, with or without 
     
    8787        documentation and/or other materials provided with the distribution. 
    8888 
    89      3. The names of its contributors may not be used to endorse or promote  
    90         products derived from this software without specific prior written  
     89     3. The names of its contributors may not be used to endorse or promote 
     90        products derived from this software without specific prior written 
    9191        permission. 
    9292 
     
    146146            modulus = m; 
    147147    } 
    148      
     148 
    149149    static assert(isIntegral!(UIntType)); 
    150150    static assert(m == 0 || a < m); 
     
    181181    UIntType next() 
    182182    { 
    183         static if (m)  
     183        static if (m) 
    184184            _x = cast(UIntType) ((cast(ulong) a * _x + c) % m); 
    185185        else 
     
    203203        return _x == rhs._x; 
    204204    } 
    205      
     205 
    206206    private UIntType _x = 1; 
    207207}; 
     
    318318        return result; 
    319319    } 
    320      
     320 
    321321/** 
    322322   Constructs a MersenneTwisterEngine object 
     
    334334        } 
    335335        for (mti = 1; mti < n; ++mti) { 
    336             mt[mti] =  
     336            mt[mti] = 
    337337                cast(UIntType) 
    338                 (1812433253UL * (mt[mti-1] ^ (mt[mti-1] >> (w - 2))) + mti);  
     338                (1812433253UL * (mt[mti-1] ^ (mt[mti-1] >> (w - 2))) + mti); 
    339339            /* See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier. */ 
    340340            /* In the previous versions, MSBs of the seed affect   */ 
     
    364364            if (mti == n + 1)   /* if init_genrand() has not been called, */ 
    365365                seed(5489UL); /* a default initial seed is used */ 
    366              
    367             int kk = 0;             
     366 
     367            int kk = 0; 
    368368            for (; kk < n - m; ++kk) 
    369369            { 
     
    381381            mt[n - 1] = cast(UIntType) (mt[m - 1] ^ (y >> 1) 
    382382                                        ^ mag01[cast(UIntType) y & 0x1U]); 
    383              
     383 
    384384            mti = 0; 
    385385        } 
    386          
     386 
    387387        y = mt[mti++]; 
    388          
     388 
    389389        /* Tempering */ 
    390390        y ^= (y >> temperingU); 
     
    392392        y ^= (y << temperingT) & temperingC; 
    393393        y ^= (y >> temperingL); 
    394          
     394 
    395395        return cast(UIntType) y; 
    396396    } 
     
    459459auto n = rnd.next; 
    460460... 
    461 ----    
     461---- 
    462462*/ 
    463463 
     
    467467    static MinstdRand0 rand; 
    468468    if (!seeded) { 
    469         rand.seed(getpid ^ getUTCtime); 
     469        rand.seed(getpid ^ cast(uint)getUTCtime); 
    470470        seeded = true; 
    471471    } 
     
    503503auto percentages = UniformDistribution!(double, "$(LPAREN)]")(0.0, 100.0); 
    504504// Get a digit in ['0', '9'] 
    505 auto digit = digits.next(gen);  
     505auto digit = digits.next(gen); 
    506506// Get a number in $(LPAREN)0.0, 100.0] 
    507507auto p = percentages.next(gen); 
     
    545545/** 
    546546Returns the the right bound of the random value generated. 
    547 */  
     547*/ 
    548548    ResultType b() { return rightLim == ']' ? _b : nextLarger(_b); } 
    549549 
     
    585585        } 
    586586    } 
    587      
    588 private:     
     587 
     588private: 
    589589    NumberType _a = 0, _b = NumberType.max; 
    590590 
     
    739739Note: This is more random, but slower, than C's $(D rand()) function. 
    740740To use C's $(D rand()) instead, import $(D std.c.stdlib). 
    741   
     741 
    742742BUGS: Shares a global single state, not multithreaded.  SCHEDULED FOR 
    743743DEPRECATION. 
  • trunk/phobos/std/signals.d

    r464 r853  
    5959import std.stdio; 
    6060import std.c.stdlib : calloc, realloc, free; 
    61 import std.outofmemory : _d_OutOfMemory
     61import exception : onOutOfMemoryError
    6262 
    6363// Special function for internal use only. 
     
    6666extern (C) Object _d_toObject(void* p); 
    6767 
     68// Used in place of Object.notifyRegister and Object.notifyUnRegister. 
     69alias void delegate(Object) DisposeEvt; 
     70extern (C) void  rt_attachDisposeEvent( Object obj, DisposeEvt evt ); 
     71extern (C) void  rt_detachDisposeEvent( Object obj, DisposeEvt evt ); 
    6872//debug=signal; 
    6973 
     
    171175        auto p = std.signals.calloc(slot_t.sizeof, len); 
    172176        if (!p) 
    173             std.signals._d_OutOfMemory(); 
     177            onOutOfMemoryError(); 
    174178        slots = (cast(slot_t*)p)[0 .. len]; 
    175179        } 
     
    179183        auto p = std.signals.realloc(slots.ptr, slot_t.sizeof * len); 
    180184        if (!p) 
    181             std.signals._d_OutOfMemory(); 
     185            onOutOfMemoryError(); 
    182186        slots = (cast(slot_t*)p)[0 .. len]; 
    183187        slots[slots_idx + 1 .. length] = null; 
     
    188192     L1: 
    189193    Object o = _d_toObject(slot.ptr); 
    190     o.notifyRegister(&unhook); 
     194    rt_attachDisposeEvent(o, &unhook); 
    191195    } 
    192196 
     
    205209 
    206210        Object o = _d_toObject(slot.ptr); 
    207         o.notifyUnRegister(&unhook); 
     211        rt_detachDisposeEvent(o, &unhook); 
    208212        } 
    209213        else 
     
    248252        if (slot) 
    249253        {   Object o = _d_toObject(slot.ptr); 
    250             o.notifyUnRegister(&unhook); 
     254            rt_detachDisposeEvent(o, &unhook); 
    251255        } 
    252256        } 
  • trunk/phobos/std/socket.d

    r851 r853  
    33/* 
    44    Copyright (C) 2004-2005 Christopher E. Miller 
    5      
     5 
    66    This software is provided 'as-is', without any express or implied 
    77    warranty.  In no event will the authors be held liable for any damages 
    88    arising from the use of this software. 
    9      
     9 
    1010    Permission is granted to anyone to use this software for any purpose, 
    1111    including commercial applications, and to alter it and redistribute it 
    1212    freely, subject to the following restrictions: 
    13      
     13 
    1414    1. The origin of this software must not be misrepresented; you must not 
    1515       claim that you wrote the original software. If you use this software 
     
    2020    3. This notice may not be removed or altered from any source 
    2121       distribution. 
    22      
     22 
    2323    socket.d 1.3 
    2424    Jan 2005 
    25      
     25 
    2626    Thanks to Benjamin Herr for his assistance. 
    2727*/ 
    2828 
    2929/** 
    30  * Notes: For Win32 systems, link with ws2_32.lib.  
     30 * Notes: For Win32 systems, link with ws2_32.lib. 
    3131 * Example: See /dmd/samples/d/listener.d. 
    32  * Authors: Christopher E. Miller  
     32 * Authors: Christopher E. Miller 
    3333 * Macros: 
    3434 *  WIKI=Phobos/StdSocket 
     
    3939private import std.string, std.stdint, std.c.string, std.c.stdlib; 
    4040 
     41version(unittest) 
     42{ 
     43    private import std.c.stdio : printf; 
     44} 
     45 
    4146 
    4247version(linux) 
     
    5358    private import std.c.windows.windows, std.c.windows.winsock; 
    5459    private alias std.c.windows.winsock.timeval _ctimeval; 
    55      
     60 
    5661    typedef SOCKET socket_t = INVALID_SOCKET; 
    5762    private const int _SOCKET_ERROR = SOCKET_ERROR; 
    58      
    59      
     63 
     64 
    6065    private int _lasterr() 
    6166    { 
     
    7075        private alias std.c.linux.linux.timeval _ctimeval; 
    7176    } 
    72      
     77 
    7378    typedef int32_t socket_t = -1; 
    7479    private const int _SOCKET_ERROR = -1; 
    75      
    76      
     80 
     81 
    7782    private int _lasterr() 
    7883    { 
     
    9095{ 
    9196    int errorCode; /// Platform-specific error code. 
    92      
     97 
    9398    this(string msg, int err = 0) 
    9499    { 
    95100        errorCode = err; 
    96          
     101 
    97102        version(linux) 
    98103        { 
     
    102107                auto cs = strerror_r(errorCode, buf.ptr, buf.length); 
    103108                auto len = strlen(cs); 
    104                  
     109 
    105110                if(cs[len - 1] == '\n') 
    106111                    len--; 
     
    110115            } 
    111116        } 
    112          
     117 
    113118        super(msg); 
    114119    } 
     
    121126    { 
    122127        WSADATA wd; 
    123          
     128 
    124129        // Winsock will still load if an older version is present. 
    125130        // The version is just a request. 
     
    192197    string name;        /// ditto 
    193198    string[] aliases;   /// ditto 
    194      
    195      
     199 
     200 
    196201    void populate(protoent* proto) 
    197202    { 
    198203        type = cast(ProtocolType)proto.p_proto; 
    199204        name = std.string.toString(proto.p_name).idup; 
    200          
     205 
    201206        int i; 
    202207        for(i = 0;; i++) 
     
    205210                break; 
    206211        } 
    207          
     212 
    208213        if(i) 
    209214        { 
     
    220225        } 
    221226    } 
    222      
     227 
    223228    /** Returns false on failure */ 
    224229    bool getProtocolByName(string name) 
     
    231236        return true; 
    232237    } 
    233      
    234      
     238 
     239 
    235240    /** Returns false on failure */ 
    236241    // Same as getprotobynumber(). 
     
    269274    ushort port;        /// ditto 
    270275    string protocolName;    /// ditto 
    271      
    272      
     276 
     277 
    273278    void populate(servent* serv) 
    274279    { 
     
    276281        port = ntohs(cast(ushort)serv.s_port); 
    277282        protocolName = std.string.toString(serv.s_proto).idup; 
    278          
     283 
    279284        int i; 
    280285        for(i = 0;; i++) 
     
    283288                break; 
    284289        } 
    285          
     290 
    286291        if(i) 
    287292        { 
     
    298303        } 
    299304    } 
    300      
     305 
    301306    /** 
    302307     * If a protocol name is omitted, any protocol will be matched. 
     
    312317        return true; 
    313318    } 
    314      
    315      
     319 
     320 
    316321    // Any protocol name will be matched. 
    317322    /// ditto 
     
    325330        return true; 
    326331    } 
    327      
    328      
     332 
     333 
    329334    /// ditto 
    330335    bool getServiceByPort(ushort port, string protocolName) 
     
    337342        return true; 
    338343    } 
    339      
    340      
     344 
     345 
    341346    // Any protocol name will be matched. 
    342347    /// ditto 
     
    378383{ 
    379384    int errorCode;  /// Platform-specific error code. 
    380      
    381      
     385 
     386 
    382387    this(string msg, int err = 0) 
    383388    { 
     
    396401    string[] aliases;   /// ditto 
    397402    uint32_t[] addrList;    /// ditto 
    398      
    399      
     403 
     404 
    400405    void validHostent(hostent* he) 
    401406    { 
     
    403408            throw new HostException("Address family mismatch", _lasterr()); 
    404409    } 
    405      
    406      
     410 
     411 
    407412    void populate(hostent* he) 
    408413    { 
    409414        int i; 
    410415        char* p; 
    411          
     416 
    412417        name = std.string.toString(he.h_name).idup; 
    413          
     418 
    414419        for(i = 0;; i++) 
    415420        { 
     
    418423                break; 
    419424        } 
    420          
     425 
    421426        if(i) 
    422427        { 
     
    432437            aliases = null; 
    433438        } 
    434          
     439 
    435440        for(i = 0;; i++) 
    436441        { 
     
    439444                break; 
    440445        } 
    441          
     446 
    442447        if(i) 
    443448        { 
     
    453458        } 
    454459    } 
    455      
     460 
    456461    /** 
    457462     * Resolve host name. Returns false if unable to resolve. 
    458      */     
     463     */ 
    459464    bool getHostByName(string name) 
    460465    { 
     
    467472        return true; 
    468473    } 
    469      
    470      
     474 
     475 
    471476    /** 
    472477     * Resolve IPv4 address number. Returns false if unable to resolve. 
    473      */     
     478     */ 
    474479    bool getHostByAddr(uint addr) 
    475480    { 
     
    483488        return true; 
    484489    } 
    485      
    486      
     490 
     491 
    487492    /** 
    488493     * Same as previous, but addr is an IPv4 address string in the 
    489494     * dotted-decimal form $(I a.b.c.d). 
    490495     * Returns false if unable to resolve. 
    491      */     
     496     */ 
    492497    bool getHostByAddr(string addr) 
    493498    { 
     
    517522        printf("aliases[%d] = %.*s\n", i, s); 
    518523    } 
    519      
     524 
    520525    printf("---\n"); 
    521      
     526 
    522527    assert(ih.getHostByAddr(ih.addrList[0])); 
    523528    printf("name = %.*s\n", ih.name); 
     
    559564    protected: 
    560565    sockaddr sa; 
    561      
    562      
     566 
     567 
    563568    override sockaddr* name() 
    564569    { 
    565570        return &sa; 
    566571    } 
    567      
    568      
     572 
     573 
    569574    override int nameLen() 
    570575    { 
    571576        return sa.sizeof; 
    572577    } 
    573      
    574      
     578 
     579 
    575580    public: 
    576581    override AddressFamily addressFamily() 
     
    578583        return cast(AddressFamily)sa.sa_family; 
    579584    } 
    580      
    581      
     585 
     586 
    582587    override string toString() 
    583588    { 
     
    601606        return cast(sockaddr*)&sin; 
    602607    } 
    603      
    604      
     608 
     609 
    605610    override int nameLen() 
    606611    { 
    607612        return sin.sizeof; 
    608613    } 
    609      
    610      
     614 
     615 
    611616    this() 
    612617    { 
    613618    } 
    614      
    615      
     619 
     620 
    616621    public: 
    617622    const uint ADDR_ANY = INADDR_ANY;   /// Any IPv4 address number. 
    618623    const uint ADDR_NONE = INADDR_NONE; /// An invalid IPv4 address number. 
    619624    const ushort PORT_ANY = 0;      /// Any IPv4 port number. 
    620      
     625 
    621626    /// Overridden to return AddressFamily.INET. 
    622627    override AddressFamily addressFamily() 
     
    624629        return cast(AddressFamily)AddressFamily.INET; 
    625630    } 
    626      
     631 
    627632    /// Returns the IPv4 port number. 
    628633    ushort port() 
     
    630635        return ntohs(sin.sin_port); 
    631636    } 
    632      
     637 
    633638    /// Returns the IPv4 address number. 
    634639    uint addr() 
     
    636641        return ntohl(sin.sin_addr.s_addr); 
    637642    } 
    638      
     643 
    639644    /** 
    640645     * Params: 
     
    659664        sin.sin_port = htons(port); 
    660665    } 
    661      
     666 
    662667    /** 
    663668     * Construct a new Address. addr may be ADDR_ANY (default) and port may 
     
    670675        sin.sin_port = htons(port); 
    671676    } 
    672      
    673     /// ditto   
     677 
     678    /// ditto 
    674679    this(ushort port) 
    675680    { 
     
    677682        sin.sin_port = htons(port); 
    678683    } 
    679      
    680     /// Human readable string representing the IPv4 address in dotted-decimal form.     
     684 
     685    /// Human readable string representing the IPv4 address in dotted-decimal form. 
    681686    string toAddrString() 
    682687    { 
    683688            return std.string.toString(inet_ntoa(sin.sin_addr)).idup; 
    684689    } 
    685      
     690 
    686691    /// Human readable string representing the IPv4 port. 
    687692    string toPortString() 
     
    689694        return std.string.toString(port()); 
    690695    } 
    691      
     696 
    692697    /// Human readable string representing the IPv4 address and port in the form $(I a.b.c.d:e). 
    693698    override string toString() 
     
    695700            return toAddrString() ~ ":" ~ toPortString(); 
    696701    } 
    697      
     702 
    698703    /** 
    699704     * Parse an IPv4 address string in the dotted-decimal form $(I a.b.c.d) 
     
    737742enum SocketFlags: int 
    738743{ 
    739     NONE =       0,             /// no flags specified  
    740      
     744    NONE =       0,             /// no flags specified 
     745 
    741746    OOB =        MSG_OOB,       /// out-of-band stream data 
    742747    PEEK =       MSG_PEEK,      /// peek at incoming data without removing it from the queue, only for receiving 
     
    752757    int seconds;        /// Number of seconds. 
    753758    int microseconds;   /// Number of additional microseconds. 
    754      
     759 
    755760    // C interface 
    756761    deprecated 
     
    768773    uint maxsockets; /// max desired sockets, the fd_set might be capable of holding more 
    769774    fd_set set; 
    770      
    771      
     775 
     776 
    772777    version(Win32) 
    773778    { 
     
    782787        uint count; 
    783788    } 
    784      
    785      
     789 
     790 
    786791    public: 
    787792 
     
    792797        reset(); 
    793798    } 
    794      
     799 
    795800    /// Uses the default maximum for the system. 
    796801    this() 
     
    798803        this(FD_SETSIZE); 
    799804    } 
    800      
    801     /// Reset the SocketSet so that there are 0 Sockets in the collection.  
     805 
     806    /// Reset the SocketSet so that there are 0 Sockets in the collection. 
    802807    void reset() 
    803808    { 
    804809        FD_ZERO(&set); 
    805          
     810 
    806811        version(BsdSockets) 
    807812        { 
     
    810815        } 
    811816    } 
    812      
    813      
     817 
     818 
    814819    void add(socket_t s) 
    815820    in 
     
    825830    { 
    826831        FD_SET(s, &set); 
    827          
     832 
    828833        version(BsdSockets) 
    829834        { 
     
    833838        } 
    834839    } 
    835      
     840 
    836841    /// Add a Socket to the collection. Adding more than the maximum has dangerous side affects. 
    837842    void add(Socket s) 
     
    839844        add(s.sock); 
    840845    } 
    841      
     846 
    842847    void remove(socket_t s) 
    843848    { 
     
    849854        } 
    850855    } 
    851      
    852      
     856 
     857 
    853858    /// Remove this Socket from the collection. 
    854859    void remove(Socket s) 
     
    856861        remove(s.sock); 
    857862    } 
    858      
     863 
    859864    int isSet(socket_t s) 
    860865    { 
    861866        return FD_ISSET(s, &set); 
    862867    } 
    863      
    864      
     868 
     869 
    865870    /// Returns nonzero if this Socket is in the collection. 
    866871    int isSet(Socket s) 
     
    868873        return isSet(s.sock); 
    869874    } 
    870      
     875 
    871876 
    872877    /// Return maximum amount of sockets that can be added, like FD_SETSIZE. 
     
    875880        return maxsockets; 
    876881    } 
    877      
    878      
     882 
     883 
    879884    fd_set* toFd_set() 
    880885    { 
    881886        return &set; 
    882887    } 
    883      
    884      
     888 
     889 
    885890    int selectn() 
    886891    { 
     
    926931        int32_t time; 
    927932    } 
    928      
     933 
    929934    // C interface 
    930935    deprecated 
     
    947952    RCVBUF =               SO_RCVBUF,   /// receive buffer size 
    948953    DONTROUTE =            SO_DONTROUTE,    /// do not route 
    949      
     954 
    950955    // SocketOptionLevel.TCP: 
    951956    TCP_NODELAY =          .TCP_NODELAY,    /// disable the Nagle algorithm for send coalescing 
    952      
     957 
    953958    // SocketOptionLevel.IPV6: 
    954959    IPV6_UNICAST_HOPS =    .IPV6_UNICAST_HOPS,  /// 
     
    969974    socket_t sock; 
    970975    AddressFamily _family; 
    971      
     976 
    972977    version(Win32) 
    973978        bool _blocking = false; /// Property to get or set whether the socket is blocking or nonblocking. 
    974      
    975      
     979 
     980 
    976981    // For use with accepting(). 
    977982    protected this() 
    978983    { 
    979984    } 
    980      
    981      
     985 
     986 
    982987    public: 
    983988 
     
    994999        _family = af; 
    9951000    } 
    996      
    997      
     1001 
     1002 
    9981003    // A single protocol exists to support this socket type within the 
    9991004    // protocol family, so the ProtocolType is assumed. 
     
    10031008        this(af, type, cast(ProtocolType)0); // Pseudo protocol number. 
    10041009    } 
    1005      
    1006      
     1010 
     1011 
    10071012    /// ditto 
    10081013    this(AddressFamily af, SocketType type, string protocolName) 
     
    10141019        this(af, type, cast(ProtocolType)proto.p_proto); 
    10151020    } 
    1016      
    1017      
     1021 
     1022 
    10181023    ~this() 
    10191024    { 
    10201025        close(); 
    10211026    } 
    1022      
    1023      
     1027 
     1028 
    10241029    /// Get underlying socket handle. 
    10251030    socket_t handle() 
     
    10331038     * When a socket is blocking, calls to receive(), accept(), and send() 
    10341039     * will block and wait for data/action. 
    1035      * A non-blocking socket will immediately return instead of blocking.  
     1040     * A non-blocking socket will immediately return instead of blocking. 
    10361041     */ 
    10371042    bool blocking() 
     
    10461051        } 
    10471052    } 
    1048      
     1053 
    10491054    /// ditto 
    10501055    void blocking(bool byes) 
     
    10701075        } 
    10711076        return; // Success. 
    1072          
     1077 
    10731078        err: 
    10741079        throw new SocketException("Unable to set socket blocking", _lasterr()); 
    10751080    } 
    1076      
    1077  
    1078     /// Get the socket's address family.    
     1081 
     1082 
     1083    /// Get the socket's address family. 
    10791084    AddressFamily addressFamily() // getter 
    10801085    { 
    10811086        return _family; 
    10821087    } 
    1083      
     1088 
    10841089    /// Property that indicates if this is a valid, alive socket. 
    10851090    bool isAlive() // getter 
     
    10881093        return !getsockopt(sock, SOL_SOCKET, SO_TYPE, cast(char*)&type, &typesize); 
    10891094    } 
    1090      
     1095 
    10911096    /// Associate a local address with this socket. 
    10921097    void bind(Address addr) 
     
    10951100            throw new SocketException("Unable to bind socket", _lasterr()); 
    10961101    } 
    1097      
     1102 
    10981103    /** 
    10991104     * Establish a connection. If the socket is blocking, connect waits for 
     
    11071112            int err; 
    11081113            err = _lasterr(); 
    1109              
     1114 
    11101115            if(!blocking) 
    11111116            { 
     
    11281133        } 
    11291134    } 
    1130      
     1135 
    11311136    /** 
    11321137     * Listen for an incoming connection. bind must be called before you can 
     
    11391144            throw new SocketException("Unable to listen on socket", _lasterr()); 
    11401145    } 
    1141      
     1146 
    11421147    /** 
    11431148     * Called by accept when a new Socket must be created for a new 
     
    11521157        return new Socket; 
    11531158    } 
    1154      
     1159 
    11551160    /** 
    11561161     * Accept an incoming connection. If the socket is blocking, accept 
     
    11661171        if(socket_t.init == newsock) 
    11671172            throw new SocketAcceptException("Unable to accept socket connection", _lasterr()); 
    1168          
     1173 
    11691174        Socket newSocket; 
    11701175        try 
     
    11721177            newSocket = accepting(); 
    11731178            assert(newSocket.sock == socket_t.init); 
    1174              
     1179 
    11751180            newSocket.sock = newsock; 
    11761181            version(Win32) 
     
    11831188            throw o; 
    11841189        } 
    1185          
     1190 
    11861191        return newSocket; 
    11871192    } 
    1188      
     1193 
    11891194    /// Disables sends and/or receives. 
    11901195    void shutdown(SocketShutdown how) 
     
    11921197        .shutdown(sock, cast(int)how); 
    11931198    } 
    1194      
    1195      
     1199 
     1200 
    11961201    private static void _close(socket_t sock) 
    11971202    { 
     
    12051210        } 
    12061211    } 
    1207      
     1212 
    12081213 
    12091214    /** 
     
    12191224        sock = socket_t.init; 
    12201225    } 
    1221      
    1222      
     1226 
     1227 
    12231228    private Address newFamilyObject() 
    12241229    { 
     
    12291234                result = new InternetAddress; 
    12301235                break; 
    1231              
     1236 
    12321237            default: 
    12331238                result = new UnknownAddress; 
     
    12351240        return result; 
    12361241    } 
    1237      
    1238      
     1242 
     1243 
    12391244    /// Returns the local machine's host name. Idea from mango. 
    12401245    static string hostName() // getter 
     
    12451250        return std.string.toString(cast(char*)result).idup; 
    12461251    } 
    1247      
     1252 
    12481253    /// Remote endpoint Address. 
    12491254    Address remoteAddress() 
     
    12561261        return addr; 
    12571262    } 
    1258      
     1263 
    12591264    /// Local endpoint Address. 
    12601265    Address localAddress() 
     
    12671272        return addr; 
    12681273    } 
    1269      
     1274 
    12701275    /// Send or receive error code. 
    12711276    const int ERROR = _SOCKET_ERROR; 
    1272      
     1277 
    12731278    /** 
    12741279     * Send data on the connection. Returns the number of bytes actually 
     
    12831288        return sent; 
    12841289    } 
    1285      
     1290 
    12861291    /// ditto 
    12871292    int send(const(void)[] buf) 
     
    12891294        return send(buf, SocketFlags.NOSIGNAL); 
    12901295    } 
    1291      
     1296 
    12921297    /** 
    12931298     * Send data to a specific destination Address. If the destination address is not specified, a connection must have been made and that address is used. If the socket is blocking and there is no buffer space left, sendTo waits. 
     
    12991304        return sent; 
    13001305    } 
    1301      
     1306 
    13021307    /// ditto 
    13031308    int sendTo(const(void)[] buf, Address to) 
     
    13051310        return sendTo(buf, SocketFlags.NONE, to); 
    13061311    } 
    1307      
    1308      
     1312 
     1313 
    13091314    //assumes you connect()ed 
    13101315    /// ditto 
     
    13151320        return sent; 
    13161321    } 
    1317      
    1318      
     1322 
     1323 
    13191324    //assumes you connect()ed 
    13201325    /// ditto 
     
    13231328        return sendTo(buf, SocketFlags.NONE); 
    13241329    } 
    1325      
     1330 
    13261331 
    13271332    /** 
     
    13401345        return read; 
    13411346    } 
    1342      
     1347 
    13431348    /// ditto 
    13441349    int receive(void[] buf) 
     
    13461351        return receive(buf, SocketFlags.NONE); 
    13471352    } 
    1348      
     1353 
    13491354    /** 
    13501355     * Receive data and get the remote endpoint Address. 
     
    13651370        return read; 
    13661371    } 
    1367      
    1368      
     1372 
     1373 
    13691374    /// ditto 
    13701375    int receiveFrom(void[] buf, out Address from) 
     
    13721377        return receiveFrom(buf, SocketFlags.NONE, from); 
    13731378    } 
    1374      
    1375      
     1379 
     1380 
    13761381    //assumes you connect()ed 
    13771382    /// ditto 
     
    13841389        return read; 
    13851390    } 
    1386      
    1387      
     1391 
     1392 
    13881393    //assumes you connect()ed 
    13891394    /// ditto 
     
    13921397        return receiveFrom(buf, SocketFlags.NONE); 
    13931398    } 
    1394      
    1395  
    1396     /// Get a socket option. Returns the number of bytes written to result.     
     1399 
     1400 
     1401    /// Get a socket option. Returns the number of bytes written to result. 
    13971402    //returns the length, in bytes, of the actual result - very different from getsockopt() 
    13981403    int getOption(SocketOptionLevel level, SocketOption option, void[] result) 
     
    14031408        return len; 
    14041409    } 
    1405      
    1406  
    1407     /// Common case of getting integer and boolean options.     
     1410 
     1411 
     1412    /// Common case of getting integer and boolean options. 
    14081413    int getOption(SocketOptionLevel level, SocketOption option, out int32_t result) 
    14091414    { 
     
    14121417 
    14131418 
    1414     /// Get the linger option.  
     1419    /// Get the linger option. 
    14151420    int getOption(SocketOptionLevel level, SocketOption option, out linger result) 
    14161421    { 
    14171422        //return getOption(cast(SocketOptionLevel)SocketOptionLevel.SOCKET, SocketOption.LINGER, (&result)[0 .. 1]); 
    1418         return getOption(level, option, (&result)[0 .. 1]);  
    1419     } 
    1420      
     1423        return getOption(level, option, (&result)[0 .. 1]); 
     1424    } 
     1425 
    14211426    // Set a socket option. 
    14221427    void setOption(SocketOptionLevel level, SocketOption option, void[] value) 
     
    14251430            throw new SocketException("Unable to set socket option", _lasterr()); 
    14261431    } 
    1427      
    1428      
     1432 
     1433 
    14291434    /// Common case for setting integer and boolean options. 
    14301435    void setOption(SocketOptionLevel level, SocketOption option, int32_t value) 
     
    14401445        setOption(level, option, (&value)[0 .. 1]); 
    14411446    } 
    1442      
     1447 
    14431448 
    14441449    /** 
     
    14681473        fd_set* fr, fw, fe; 
    14691474        int n = 0; 
    1470          
     1475 
    14711476        version(Win32) 
    14721477        { 
     
    14871492                fr = null; 
    14881493            } 
    1489              
     1494 
    14901495            if(checkWrite) 
    14911496            { 
     
    15001505                fw = null; 
    15011506            } 
    1502              
     1507 
    15031508            if(checkError) 
    15041509            { 
     
    15141519            } 
    15151520        } 
    1516          
     1521 
    15171522        int result = .select(n, fr, fw, fe, cast(_ctimeval*)tv); 
    1518          
     1523 
    15191524        version(Win32) 
    15201525        { 
     
    15311536            static assert(0); 
    15321537        } 
    1533          
     1538 
    15341539        if(_SOCKET_ERROR == result) 
    15351540            throw new SocketException("Socket select error", _lasterr()); 
    1536          
     1541 
    15371542        return result; 
    15381543    } 
     
    15471552        return select(checkRead, checkWrite, checkError, &tv); 
    15481553    } 
    1549      
    1550      
     1554 
     1555 
    15511556    /// ditto 
    15521557    //maximum timeout 
     
    15551560        return select(checkRead, checkWrite, checkError, null); 
    15561561    } 
    1557      
    1558      
     1562 
     1563 
    15591564    /+ 
    15601565    bool poll(events) 
     
    15751580        super(family, SocketType.STREAM, ProtocolType.TCP); 
    15761581    } 
    1577      
     1582 
    15781583    /// Constructs a blocking TCP Socket. 
    15791584    this() 
     
    15811586        this(cast(AddressFamily)AddressFamily.INET); 
    15821587    } 
    1583      
    1584      
     1588 
     1589 
    15851590    //shortcut 
    15861591    /// Constructs a blocking TCP Socket and connects to an InternetAddress. 
     
    16011606        super(family, SocketType.DGRAM, ProtocolType.UDP); 
    16021607    } 
    1603      
    1604      
     1608 
     1609 
    16051610    /// Constructs a blocking UDP Socket. 
    16061611    this() 
  • trunk/phobos/std/stdio.d

    r819 r853  
    2525public import std.c.stdio; 
    2626 
     27import memory; 
    2728import std.format; 
    2829import std.utf; 
    2930import std.string; 
    30 import std.gc; 
    3131import std.c.stdlib; 
    3232import std.c.string; 
     
    568568    } 
    569569 
    570     auto sz = std.gc.capacity(buf.ptr); 
     570    auto sz = GC.sizeOf(buf.ptr); 
    571571    //auto sz = buf.length; 
    572572    buf = buf.ptr[0 .. sz]; 
     
    587587        { 
    588588        sz = 64; 
    589         p = cast(char*) std.gc.malloc(sz); 
    590         std.gc.hasNoPointers(p); 
     589        p = cast(char*) GC.malloc(sz, GC.BlkAttr.NO_SCAN); 
    591590        buf = p[0 .. sz]; 
    592591        } 
     
    645644        if (i > sz) 
    646645        { 
    647             buf = cast(char[])std.gc.malloc(i); 
    648             std.gc.hasNoPointers(buf.ptr); 
     646            buf = cast(char[])GC.malloc(i, GC.BlkAttr.NO_SCAN)[0 .. i]; 
    649647        } 
    650648        if (i - 1) 
     
    668666        if (i > sz) 
    669667        { 
    670             buf = cast(char[])std.gc.malloc(i); 
    671             std.gc.hasNoPointers(buf.ptr); 
     668            buf = cast(char[])GC.malloc(i, GC.BlkAttr.NO_SCAN)[0 .. i]; 
    672669        } 
    673670        memcpy(buf.ptr, p, i); 
     
    749746                 return 0; 
    750747             } 
    751              buf = buf.ptr[0 .. std.gc.capacity(buf.ptr)]; 
     748             buf = buf.ptr[0 .. GC.sizeOf(buf.ptr)]; 
    752749             if (s <= buf.length) 
    753750             { 
  • trunk/phobos/std/string.d

    r826 r853  
    4040private import std.encoding; 
    4141private import std.uni; 
    42 private import std.array; 
    4342private import std.format; 
    4443private import std.ctype; 
     
    4847private import std.conv; 
    4948private import std.traits; 
     49private import exception : onArrayBoundsError; 
    5050 
    5151extern (C) 
     
    30443044    { 
    30453045        if (i >= s.length) 
    3046         throw new ArrayBoundsError("std.string.sformat", 0); 
     3046        onArrayBoundsError("std.string.sformat", 0); 
    30473047        s[i] = cast(char)c; 
    30483048        ++i; 
     
    30523052        auto b = std.utf.toUTF8(buf, c); 
    30533053        if (i + b.length > s.length) 
    3054         throw new ArrayBoundsError("std.string.sformat", 0); 
     3054        onArrayBoundsError("std.string.sformat", 0); 
    30553055        s[i..i+b.length] = b[]; 
    30563056        i += b.length; 
  • trunk/phobos/std/variant.d

    r816 r853  
    8484module std.variant; 
    8585 
    86 import std.traits, std.conv, std.c.string, std.typetuple, std.gc
     86import std.traits, std.conv, std.c.string, std.typetuple
    8787import std.stdio; // for testing only 
    8888import std.contracts; // for testing only 
  • trunk/phobos/unittest.d

    r719 r853  
    2626// Then, it prints out the arguments passed to main(). 
    2727 
    28 public import std.array; 
    29 public import std.asserterror; 
    3028public import std.base64; 
    3129public import std.bind; 
     
    4442public import std.file; 
    4543public import std.format; 
    46 public import std.gc; 
    4744public import std.getopt; 
    48 public import std.hiddenfunc; 
    4945public import std.intrinsic; 
    5046public import std.loader; 
     
    5349public import std.metastrings; 
    5450public import std.mmfile; 
    55 public import std.moduleinit; 
    5651public import std.openrj; 
    5752public import std.outbuffer; 
    58 public import std.outofmemory; 
    5953public import std.path; 
    6054public import std.perf; 
     
    7064public import std.stream; 
    7165public import std.string; 
    72 public import std.switcherr; 
    7366public import std.syserror; 
    7467public import std.system; 
    75 public import std.thread; 
    7668public import std.traits; 
    7769public import std.typetuple; 
  • trunk/phobos/win32.mak

    r850 r853  
    7171    $(CC) -c $* 
    7272 
    73 targets : phobos.lib gcstub.obj 
     73targets : phobos.lib 
    7474 
    7575test : test.exe 
     
    8181    $(DMD) test.obj -g -L/map 
    8282 
    83 OBJS= deh.obj icomplex.obj \ 
    84     object.obj monitor.obj \ 
    85     critical.obj process.obj \ 
    86     Czlib.obj Dzlib.obj \ 
     83OBJS= Czlib.obj Dzlib.obj \ 
    8784    oldsyserror.obj \ 
    8885    errno.obj \ 
    89     c_stdio.obj \ 
    90     complex.obj 
     86    c_stdio.obj 
    9187 
    9288#   ti_bit.obj ti_Abit.obj 
     
    9692    std\compiler.d std\cpuid.d std\format.d std\demangle.d \ 
    9793    std\path.d std\file.d std\outbuffer.d std\utf.d std\uri.d \ 
    98     std\ctype.d std\random.d std\array.d std\mmfile.d \ 
     94    std\ctype.d std\random.d std\mmfile.d \ 
    9995    std\bitarray.d std\algorithm.d std\numeric.d std\functional.d \ 
    100     std\metastrings.d std\hiddenfunc.d std\contracts.d std\getopt.d \ 
     96    std\metastrings.d std\contracts.d std\getopt.d \ 
    10197    std\signals.d std\typetuple.d std\traits.d std\bind.d \ 
    102     std\bitmanip.d std\typecons.d std\switcherr.d
    103     std\thread.d std\synchro.d std\moduleinit.d std\boxer.d \ 
    104     std\asserterror.d std\outofmemory.d std\system.d \ 
     98    std\bitmanip.d std\typecons.d
     99    std\boxer.d \ 
     100    std\system.d \ 
    105101    std\iterator.d std\encoding.d std\variant.d \ 
    106102    std\stream.d std\socket.d std\socketstream.d \ 
    107     std\perf.d std\openrj.d std\conv.d std\cover.d
     103    std\perf.d std\openrj.d std\conv.d
    108104    std\zip.d std\cstream.d std\loader.d \ 
    109     crc32.d gcstats.d \ 
    110     internal\aaA.d internal\adi.d internal\arrayassign.d \ 
    111     internal\aApply.d internal\aApplyR.d internal\memset.d \ 
    112     internal\arraycast.d internal\arraycat.d \ 
    113     internal\switch.d internal\qsort.d internal\invariant.d \ 
    114     internal\dmain2.d internal\cast.d internal\obj.d \ 
    115     internal\arrayfloat.d internal\arraydouble.d internal\arrayreal.d \ 
    116     internal\arraybyte.d internal\arrayshort.d internal\arrayint.d \ 
     105    crc32.d \ 
    117106    etc\gamma.d \ 
    118107    std\c\stdarg.d \ 
     
    124113    std\windows\iunknown.d \ 
    125114    std\windows\registry.d \ 
    126     std\windows\syserror.d \ 
    127     std\typeinfo\ti_ptr.d \ 
    128     std\typeinfo\ti_delegate.d \ 
    129     std\typeinfo\ti_void.d \ 
    130     std\typeinfo\ti_C.d \ 
    131     std\typeinfo\ti_byte.d \ 
    132     std\typeinfo\ti_ubyte.d \ 
    133     std\typeinfo\ti_short.d \ 
    134     std\typeinfo\ti_ushort.d \ 
    135     std\typeinfo\ti_int.d \ 
    136     std\typeinfo\ti_uint.d \ 
    137     std\typeinfo\ti_long.d \ 
    138     std\typeinfo\ti_ulong.d \ 
    139     std\typeinfo\ti_char.d \ 
    140     std\typeinfo\ti_wchar.d \ 
    141     std\typeinfo\ti_dchar.d \ 
    142     std\typeinfo\ti_cdouble.d \ 
    143     std\typeinfo\ti_double.d \ 
    144     std\typeinfo\ti_idouble.d \ 
    145     std\typeinfo\ti_cfloat.d \ 
    146     std\typeinfo\ti_float.d \ 
    147     std\typeinfo\ti_ifloat.d \ 
    148     std\typeinfo\ti_creal.d \ 
    149     std\typeinfo\ti_real.d \ 
    150     std\typeinfo\ti_ireal.d \ 
    151     std\typeinfo\ti_AC.d \ 
    152     std\typeinfo\ti_Ag.d \ 
    153     std\typeinfo\ti_Ashort.d \ 
    154     std\typeinfo\ti_Aint.d \ 
    155     std\typeinfo\ti_Along.d \ 
    156     std\typeinfo\ti_Afloat.d \ 
    157     std\typeinfo\ti_Adouble.d \ 
    158     std\typeinfo\ti_Areal.d \ 
    159     std\typeinfo\ti_Acfloat.d \ 
    160     std\typeinfo\ti_Acdouble.d \ 
    161     std\typeinfo\ti_Acreal.d 
     115    std\windows\syserror.d 
    162116 
    163117 
     
    169123    $(DOC)\std_md5.html $(DOC)\std_zip.html $(DOC)\std_zlib.html \ 
    170124    $(DOC)\std_algorithm.html \ 
    171     $(DOC)\std_array.html \ 
    172125    $(DOC)\std_bigint.html \ 
    173126    $(DOC)\std_bind.html \ 
     
    228181    $(DOC)\phobos.html 
    229182 
    230 SRC=    errno.c object.d unittest.d crc32.d gcstats.d phobos.d 
     183SRC=    errno.c unittest.d crc32.d phobos.d 
    231184 
    232185SRC_STD= std\zlib.d std\zip.d std\stdint.d std\conv.d std\utf.d std\uri.d \ 
    233     std\gc.d std\math.d std\string.d std\path.d std\date.d \ 
     186    std\math.d std\string.d std\path.d std\date.d \ 
    234187    std\ctype.d std\file.d std\compiler.d std\system.d std\moduleinit.d \ 
    235     std\outbuffer.d std\thread.d std\synchro.d std\md5.d std\atomics.d std\base64.d \ 
    236     std\asserterror.d std\dateparse.d std\outofmemory.d std\mmfile.d \ 
    237     std\intrinsic.d std\array.d std\switcherr.d std\syserror.d \ 
     188    std\outbuffer.d std\thread.d std\md5.d std\atomics.d std\base64.d \ 
     189    std\dateparse.d std\outofmemory.d std\mmfile.d \ 
     190    std\intrinsic.d std\switcherr.d std\syserror.d \ 
    238191    std\regexp.d std\random.d std\stream.d std\process.d \ 
    239192    std\socket.d std\socketstream.d std\loader.d std\stdarg.d std\format.d \ 
     
    241194    std\cstream.d std\demangle.d std\cover.d std\bitarray.d \ 
    242195    std\signals.d std\cpuid.d std\typetuple.d std\traits.d std\bind.d \ 
    243     std\metastrings.d std\hiddenfunc.d std\contracts.d std\getopt.d \ 
     196    std\metastrings.d std\contracts.d std\getopt.d \ 
    244197    std\variant.d std\numeric.d std\bitmanip.d std\complex.d \ 
    245198    std\functional.d std\algorithm.d std\typecons.d std\iterator.d \ 
     
    249202    std\c\math.d std\c\stdarg.d std\c\stddef.d std\c\fenv.d std\c\string.d \ 
    250203    std\c\locale.d std\c\wcharh.d 
    251  
    252 SRC_TI= \ 
    253     std\typeinfo\ti_wchar.d std\typeinfo\ti_uint.d \ 
    254     std\typeinfo\ti_short.d std\typeinfo\ti_ushort.d \ 
    255     std\typeinfo\ti_byte.d std\typeinfo\ti_ubyte.d \ 
    256     std\typeinfo\ti_long.d std\typeinfo\ti_ulong.d \ 
    257     std\typeinfo\ti_ptr.d std\typeinfo\ti_dchar.d \ 
    258     std\typeinfo\ti_float.d std\typeinfo\ti_double.d \ 
    259     std\typeinfo\ti_real.d std\typeinfo\ti_delegate.d \ 
    260     std\typeinfo\ti_creal.d std\typeinfo\ti_ireal.d \ 
    261     std\typeinfo\ti_cfloat.d std\typeinfo\ti_ifloat.d \ 
    262     std\typeinfo\ti_cdouble.d std\typeinfo\ti_idouble.d \ 
    263     std\typeinfo\ti_Ashort.d \ 
    264     std\typeinfo\ti_Ag.d \ 
    265     std\typeinfo\ti_AC.d std\typeinfo\ti_C.d \ 
    266     std\typeinfo\ti_int.d std\typeinfo\ti_char.d \ 
    267     std\typeinfo\ti_Aint.d \ 
    268     std\typeinfo\ti_Along.d \ 
    269     std\typeinfo\ti_Afloat.d std\typeinfo\ti_Adouble.d \ 
    270     std\typeinfo\ti_Areal.d \ 
    271     std\typeinfo\ti_Acfloat.d std\typeinfo\ti_Acdouble.d \ 
    272     std\typeinfo\ti_Acreal.d \ 
    273     std\typeinfo\ti_void.d 
    274  
    275 SRC_INT=    \ 
    276     internal\switch.d internal\complex.c internal\critical.c \ 
    277     internal\minit.asm internal\alloca.d internal\llmath.d internal\deh.c \ 
    278     internal\arraycat.d internal\invariant.d internal\monitor.d \ 
    279     internal\memset.d internal\arraycast.d internal\aaA.d internal\adi.d \ 
    280     internal\dmain2.d internal\cast.d internal\qsort.d internal\deh2.d \ 
    281     internal\cmath2.d internal\obj.d internal\mars.h internal\aApply.d \ 
    282     internal\aApplyR.d internal\object.d internal\trace.d \ 
    283     internal\qsort2.d internal\arrayassign.d \ 
    284     internal\arrayfloat.d internal\arraydouble.d internal\arrayreal.d \ 
    285     internal\arraybyte.d internal\arrayshort.d internal\arrayint.d 
    286  
    287204 
    288205SRC_STD_WIN= std\windows\registry.d \ 
     
    332249    etc\c\zlib\linux.mak 
    333250 
    334 SRC_GC= internal\gc\gc.d \ 
    335     internal\gc\gcold.d \ 
    336     internal\gc\gcx.d \ 
    337     internal\gc\gcstub.d \ 
    338     internal\gc\gcbits.d \ 
    339     internal\gc\win32.d \ 
    340     internal\gc\gclinux.d \ 
    341     internal\gc\testgc.d \ 
    342     internal\gc\win32.mak \ 
    343     internal\gc\linux.mak 
    344  
    345 phobos.lib : $(OBJS) $(SRCS) minit.obj internal\gc\dmgc.lib \ 
     251phobos.lib : $(OBJS) $(SRCS) minit.obj \ 
    346252    etc\c\zlib\zlib.lib win32.mak 
    347 #   lib -c -p64 phobos.lib $(OBJS) minit.obj internal\gc\dmgc.lib \ 
    348 #       etc\c\zlib\zlib.lib 
    349253    $(DMD) -lib -ofphobos.lib $(DFLAGS) $(SRCS) $(OBJS) minit.obj \ 
    350         internal\gc\dmgc.lib etc\c\zlib\zlib.lib 
     254        etc\c\zlib\zlib.lib 
    351255 
    352256unittest : $(SRCS) phobos.lib 
     
    369273###################################################### 
    370274 
    371 internal\gc\dmgc.lib: 
    372     cd internal\gc 
    373     make -f win32.mak dmgc.lib 
    374     cd ..\.. 
    375  
    376275etc\c\zlib\zlib.lib: 
    377276    cd etc\c\zlib 
     
    381280errno.obj : errno.c 
    382281 
    383 ### internal 
    384  
    385 aaA.obj : internal\aaA.d 
    386     $(DMD) -c $(DFLAGS) internal\aaA.d 
    387  
    388 aApply.obj : internal\aApply.d 
    389     $(DMD) -c $(DFLAGS) internal\aApply.d 
    390  
    391 aApplyR.obj : internal\aApplyR.d 
    392     $(DMD) -c $(DFLAGS) internal\aApplyR.d 
    393  
    394 adi.obj : internal\adi.d 
    395     $(DMD) -c $(DFLAGS) internal\adi.d 
    396  
    397 arrayassign.obj : internal\arrayassign.d 
    398     $(DMD) -c $(DFLAGS) internal\arrayassign.d 
    399  
    400 arraycast.obj : internal\arraycast.d 
    401     $(DMD) -c $(DFLAGS) internal\arraycast.d 
    402  
    403 arraycat.obj : internal\arraycat.d 
    404     $(DMD) -c $(DFLAGS) internal\arraycat.d 
    405  
    406 cast.obj : internal\cast.d 
    407     $(DMD) -c $(DFLAGS) internal\cast.d 
    408  
    409 icomplex.obj : internal\complex.c 
    410     $(CC) -c $(CFLAGS) internal\complex.c -oicomplex.obj 
    411  
    412 critical.obj : internal\critical.c 
    413     $(CC) -c $(CFLAGS) internal\critical.c 
    414  
    415 deh.obj : internal\mars.h internal\deh.c 
    416     $(CC) -c $(CFLAGS) internal\deh.c 
    417  
    418 dmain2.obj : internal\dmain2.d 
    419     $(DMD) -c $(DFLAGS) internal\dmain2.d 
    420  
    421 gcstub.obj : internal\gc\gcstub.d 
    422     $(DMD) -c $(DFLAGS) -Iinternal\gc internal\gc\gcstub.d 
    423  
    424 invariant.obj : internal\invariant.d 
    425     $(DMD) -c $(DFLAGS) internal\invariant.d 
    426  
    427 memset.obj : internal\memset.d 
    428     $(DMD) -c $(DFLAGS) internal\memset.d 
    429  
    430 minit.obj : internal\minit.asm 
    431     $(CC) -c internal\minit.asm 
    432  
    433 monitor.obj : internal\mars.h internal\monitor.d 
    434     $(DMD) -c $(DFLAGS) internal\monitor.d 
    435  
    436 obj.obj : internal\obj.d 
    437     $(DMD) -c $(DFLAGS) internal\obj.d 
    438  
    439 object.obj : internal\object.d 
    440     $(DMD) -c $(DFLAGS) internal\object.d 
    441  
    442 qsort.obj : internal\qsort.d 
    443     $(DMD) -c $(DFLAGS) internal\qsort.d 
    444  
    445 switch.obj : internal\switch.d 
    446     $(DMD) -c $(DFLAGS) internal\switch.d 
    447  
    448282### std 
    449283 
     
    451285    $(DMD) -c $(DFLAGS) std\algorithm.d 
    452286 
    453 array.obj : std\array.d 
    454     $(DMD) -c $(DFLAGS) std\array.d 
    455  
    456 asserterror.obj : std\asserterror.d 
    457     $(DMD) -c $(DFLAGS) std\asserterror.d 
    458  
    459287atomics.obj : std\atomics.d 
    460288    $(DMD) -c $(DFLAGS) -inline std\atomics.d 
     
    517345    $(DMD) -c $(DFLAGS) std\functional.d 
    518346 
    519 gc.obj : std\gc.d 
    520     $(DMD) -c $(DFLAGS) std\gc.d 
    521  
    522347getopt.obj : std\getopt.d 
    523348    $(DMD) -c $(DFLAGS) std\getopt.d 
    524349 
    525 hiddenfunc.obj : std\hiddenfunc.d 
    526     $(DMD) -c $(DFLAGS) std\hiddenfunc.d 
    527  
    528350iterator.obj : std\iterator.d 
    529351    $(DMD) -c $(DFLAGS) std\iterator.d 
     
    550372    $(DMD) -c $(DFLAGS) std\numeric.d 
    551373 
    552 #object.obj : object.d 
    553 #   $(DMD) -c $(DFLAGS) object.d 
    554  
    555374openrj.obj : std\openrj.d 
    556375    $(DMD) -c $(DFLAGS) std\openrj.d 
     
    607426    $(DMD) -c $(DFLAGS) std\thread.d 
    608427 
    609 synchro.obj : std\synchro.d 
    610     $(DMD) -c $(DFLAGS) std\synchro.d 
    611  
    612428traits.obj : std\traits.d 
    613429    $(DMD) -c $(DFLAGS) std\traits.d -oftraits.obj 
     
    689505    $(DMD) -c $(DFLAGS) std\c\windows\windows.d 
    690506 
    691 ### std\typeinfo 
    692  
    693 ti_void.obj : std\typeinfo\ti_void.d 
    694     $(DMD) -c $(DFLAGS) std\typeinfo\ti_void.d 
    695  
    696 ti_bit.obj : std\typeinfo\ti_bit.d 
    697     $(DMD) -c $(DFLAGS) std\typeinfo\ti_bit.d 
    698  
    699 ti_wchar.obj : std\typeinfo\ti_wchar.d 
    700     $(DMD) -c $(DFLAGS) std\typeinfo\ti_wchar.d 
    701  
    702 ti_dchar.obj : std\typeinfo\ti_dchar.d 
    703     $(DMD) -c $(DFLAGS) std\typeinfo\ti_dchar.d 
    704  
    705 ti_uint.obj : std\typeinfo\ti_uint.d 
    706     $(DMD) -c $(DFLAGS) std\typeinfo\ti_uint.d 
    707  
    708 ti_short.obj : std\typeinfo\ti_short.d 
    709     $(DMD) -c $(DFLAGS) std\typeinfo\ti_short.d 
    710  
    711 ti_ushort.obj : std\typeinfo\ti_ushort.d 
    712     $(DMD) -c $(DFLAGS) std\typeinfo\ti_ushort.d 
    713  
    714 ti_byte.obj : std\typeinfo\ti_byte.d 
    715     $(DMD) -c $(DFLAGS) std\typeinfo\ti_byte.d 
    716  
    717 ti_ubyte.obj : std\typeinfo\ti_ubyte.d 
    718     $(DMD) -c $(DFLAGS) std\typeinfo\ti_ubyte.d 
    719  
    720 ti_long.obj : std\typeinfo\ti_long.d 
    721     $(DMD) -c $(DFLAGS) std\typeinfo\ti_long.d 
    722  
    723 ti_ulong.obj : std\typeinfo\ti_ulong.d 
    724     $(DMD) -c $(DFLAGS) std\typeinfo\ti_ulong.d 
    725  
    726 ti_ptr.obj : std\typeinfo\ti_ptr.d 
    727     $(DMD) -c $(DFLAGS) std\typeinfo\ti_ptr.d 
    728  
    729 ti_float.obj : std\typeinfo\ti_float.d 
    730     $(DMD) -c $(DFLAGS) std\typeinfo\ti_float.d 
    731  
    732 ti_double.obj : std\typeinfo\ti_double.d 
    733     $(DMD) -c $(DFLAGS) std\typeinfo\ti_double.d 
    734  
    735 ti_real.obj : std\typeinfo\ti_real.d 
    736     $(DMD) -c $(DFLAGS) std\typeinfo\ti_real.d 
    737  
    738 ti_delegate.obj : std\typeinfo\ti_delegate.d 
    739     $(DMD) -c $(DFLAGS) std\typeinfo\ti_delegate.d 
    740  
    741 ti_creal.obj : std\typeinfo\ti_creal.d 
    742     $(DMD) -c $(DFLAGS) std\typeinfo\ti_creal.d 
    743  
    744 ti_ireal.obj : std\typeinfo\ti_ireal.d 
    745     $(DMD) -c $(DFLAGS) std\typeinfo\ti_ireal.d 
    746  
    747 ti_cfloat.obj : std\typeinfo\ti_cfloat.d 
    748     $(DMD) -c $(DFLAGS) std\typeinfo\ti_cfloat.d 
    749  
    750 ti_ifloat.obj : std\typeinfo\ti_ifloat.d 
    751     $(DMD) -c $(DFLAGS) std\typeinfo\ti_ifloat.d 
    752  
    753 ti_cdouble.obj : std\typeinfo\ti_cdouble.d 
    754     $(DMD) -c $(DFLAGS) std\typeinfo\ti_cdouble.d 
    755  
    756 ti_idouble.obj : std\typeinfo\ti_idouble.d 
    757     $(DMD) -c $(DFLAGS) std\typeinfo\ti_idouble.d 
    758  
    759 ti_AC.obj : std\typeinfo\ti_AC.d 
    760     $(DMD) -c $(DFLAGS) std\typeinfo\ti_AC.d 
    761  
    762 ti_Ag.obj : std\typeinfo\ti_Ag.d 
    763     $(DMD) -c $(DFLAGS) std\typeinfo\ti_Ag.d 
    764  
    765 ti_Abit.obj : std\typeinfo\ti_Abit.d 
    766     $(DMD) -c $(DFLAGS) std\typeinfo\ti_Abit.d 
    767  
    768 ti_Ashort.obj : std\typeinfo\ti_Ashort.d 
    769     $(DMD) -c $(DFLAGS) std\typeinfo\ti_Ashort.d 
    770  
    771 ti_Aint.obj : std\typeinfo\ti_Aint.d 
    772     $(DMD) -c $(DFLAGS) std\typeinfo\ti_Aint.d 
    773  
    774 ti_Along.obj : std\typeinfo\ti_Along.d 
    775     $(DMD) -c $(DFLAGS) std\typeinfo\ti_Along.d 
    776  
    777 ti_Afloat.obj : std\typeinfo\ti_Afloat.d 
    778     $(DMD) -c $(DFLAGS) std\typeinfo\ti_Afloat.d 
    779  
    780 ti_Adouble.obj : std\typeinfo\ti_Adouble.d 
    781     $(DMD) -c $(DFLAGS) std\typeinfo\ti_Adouble.d 
    782  
    783 ti_Areal.obj : std\typeinfo\ti_Areal.d 
    784     $(DMD) -c $(DFLAGS) std\typeinfo\ti_Areal.d 
    785  
    786 ti_Acfloat.obj : std\typeinfo\ti_Acfloat.d 
    787     $(DMD) -c $(DFLAGS) std\typeinfo\ti_Acfloat.d 
    788  
    789 ti_Acdouble.obj : std\typeinfo\ti_Acdouble.d 
    790     $(DMD) -c $(DFLAGS) std\typeinfo\ti_Acdouble.d 
    791  
    792 ti_Acreal.obj : std\typeinfo\ti_Acreal.d 
    793     $(DMD) -c $(DFLAGS) std\typeinfo\ti_Acreal.d 
    794  
    795 ti_C.obj : std\typeinfo\ti_C.d 
    796     $(DMD) -c $(DFLAGS) std\typeinfo\ti_C.d 
    797  
    798 ti_char.obj : std\typeinfo\ti_char.d 
    799     $(DMD) -c $(DFLAGS) std\typeinfo\ti_char.d 
    800  
    801 ti_int.obj : std\typeinfo\ti_int.d 
    802     $(DMD) -c $(DFLAGS) std\typeinfo\ti_int.d 
    803  
    804  
    805507################## DOCS #################################### 
    806508 
     
    811513    $(DMD) -c -o- $(DFLAGS) -Df$(DOC)\std_algorithm.html std.ddoc std\algorithm.d 
    812514 
    813 $(DOC)\std_array.html : std.ddoc std\array.d 
    814     $(DMD) -c -o- $(DFLAGS) -Df$(DOC)\std_array.html std.ddoc std\array.d 
    815  
    816515$(DOC)\std_atomics.html : std.ddoc std\atomics.d 
    817516    $(DMD) -c -o- $(DFLAGS) -Df$(DOC)\std_atomics.html std.ddoc std\atomics.d 
     
    874573    $(DMD) -c -o- $(DFLAGS) -Df$(DOC)\std_functional.html std.ddoc std\functional.d 
    875574 
    876 $(DOC)\std_gc.html : std.ddoc std\gc.d 
    877     $(DMD) -c -o- $(DFLAGS) -Df$(DOC)\std_gc.html std.ddoc std\gc.d 
    878  
    879575$(DOC)\std_getopt.html : std.ddoc std\getopt.d 
    880576    $(DMD) -c -o- $(DFLAGS) -Df$(DOC)\std_getopt.html std.ddoc std\getopt.d 
    881577 
    882 $(DOC)\std_hiddenfunc.html : std.ddoc std\hiddenfunc.d 
    883     $(DMD) -c -o- $(DFLAGS) -Df$(DOC)\std_hiddenfunc.html std.ddoc std\hiddenfunc.d 
    884  
    885578$(DOC)\std_iterator.html : std.ddoc std\iterator.d 
    886579    $(DMD) -c -o- $(DFLAGS) -Df$(DOC)\std_iterator.html std.ddoc std\iterator.d 
     
    955648    $(DMD) -c -o- $(DFLAGS) -Df$(DOC)\std_thread.html std.ddoc std\thread.d 
    956649 
    957 $(DOC)\std_synchro.html : std.ddoc std\synchro.d 
    958     $(DMD) -c -o- $(DFLAGS) -Df$(DOC)\std_synchro.html std.ddoc std\synchro.d 
    959  
    960650$(DOC)\std_traits.html : std.ddoc std\traits.d 
    961651    $(DMD) -c -o- $(DFLAGS) -Df$(DOC)\std_traits.html std.ddoc std\traits.d 
     
    993683$(DOC)\std_windows_charset.html : std.ddoc std\windows\charset.d 
    994684    $(DMD) -c -o- $(DFLAGS) -Df$(DOC)\std_windows_charset.html std.ddoc std\windows\charset.d 
    995  
    996 $(DOC)\object.html : std.ddoc internal\object.d 
    997     $(DMD) -c -o- $(DFLAGS) -Df$(DOC)\object.html std.ddoc internal\object.d 
    998685 
    999686$(DOC)\std_c_fenv.html : std.ddoc std\c\fenv.d 
     
    1052739 
    1053740clean: 
    1054     cd internal\gc 
    1055     make -f win32.mak clean 
    1056     cd ..\.. 
    1057741    cd etc\c\zlib 
    1058742    make -f win32.mak clean 
     
    1061745    del $(DOCS) 
    1062746    del unittest.obj unittest.map unittest.exe 
    1063     del phobos.lib gcstub.obj 
     747    del phobos.lib 
    1064748 
    1065749cleanhtml: 
     
    1072756    $(CP) $(SRC_STD) $(DIR)\src\phobos\std 
    1073757    $(CP) $(SRC_STD_C) $(DIR)\src\phobos\std\c 
    1074     $(CP) $(SRC_TI) $(DIR)\src\phobos\std\typeinfo 
    1075     $(CP) $(SRC_INT) $(DIR)\src\phobos\internal 
    1076758    $(CP) $(SRC_STD_WIN) $(DIR)\src\phobos\std\windows 
    1077759    $(CP) $(SRC_STD_C_WIN) $(DIR)\src\phobos\std\c\windows 
     
    1080762    $(CP) $(SRC_ETC_C) $(DIR)\src\phobos\etc\c 
    1081763    $(CP) $(SRC_ZLIB) $(DIR)\src\phobos\etc\c\zlib 
    1082     $(CP) $(SRC_GC) $(DIR)\src\phobos\internal\gc 
    1083