diff -uNr dmd-0.102/dmd/src/dmd/aggregate.h dmd-0.103/dmd/src/dmd/aggregate.h --- dmd-0.102/dmd/src/dmd/aggregate.h 2004-06-07 13:35:12.000000000 +0200 +++ dmd-0.103/dmd/src/dmd/aggregate.h 2004-10-04 16:26:16.000000000 +0200 @@ -77,6 +77,7 @@ void toObjFile(); // compile to .obj file void toDt(dt_t **pdt); + void toDebug(); // to symbolic debug info StructDeclaration *isStructDeclaration() { return this; } }; @@ -164,6 +165,7 @@ // Back end void toObjFile(); // compile to .obj file + void toDebug(); unsigned baseVtblOffset(BaseClass *bc); Symbol *toSymbol(); Symbol *toVtblSymbol(); diff -uNr dmd-0.102/dmd/src/dmd/attrib.c dmd-0.103/dmd/src/dmd/attrib.c --- dmd-0.102/dmd/src/dmd/attrib.c 2004-05-30 11:36:50.000000000 +0200 +++ dmd-0.103/dmd/src/dmd/attrib.c 2004-10-02 09:39:02.000000000 +0200 @@ -29,36 +29,54 @@ this->decl = decl; } -int AttribDeclaration::include() +Array *AttribDeclaration::include() { - return TRUE; + return decl; } void AttribDeclaration::addMember(ScopeDsymbol *sd) { unsigned i; + Array *d = include(); - if (include() && decl) + if (d) { - for (i = 0; i < decl->dim; i++) + for (i = 0; i < d->dim; i++) { Dsymbol *s; - s = (Dsymbol *)decl->data[i]; + s = (Dsymbol *)d->data[i]; s->addMember(sd); } } } +void AttribDeclaration::semantic(Scope *sc) +{ + Array *d = include(); + + //printf("\tAttribDeclaration::semantic '%s'\n",toChars()); + if (d) + { + for (unsigned i = 0; i < d->dim; i++) + { + Dsymbol *s = (Dsymbol *)d->data[i]; + + s->semantic(sc); + } + } +} + void AttribDeclaration::semantic2(Scope *sc) { unsigned i; + Array *d = include(); - if (include() && decl) + if (d) { - for (i = 0; i < decl->dim; i++) + for (i = 0; i < d->dim; i++) { Dsymbol *s; - s = (Dsymbol *)decl->data[i]; + s = (Dsymbol *)d->data[i]; s->semantic2(sc); } } @@ -67,13 +85,14 @@ void AttribDeclaration::semantic3(Scope *sc) { unsigned i; + Array *d = include(); - if (include() && decl) + if (d) { - for (i = 0; i < decl->dim; i++) + for (i = 0; i < d->dim; i++) { Dsymbol *s; - s = (Dsymbol *)decl->data[i]; + s = (Dsymbol *)d->data[i]; s->semantic3(sc); } } @@ -82,13 +101,14 @@ void AttribDeclaration::inlineScan() { unsigned i; + Array *d = include(); - if (include() && decl) + if (d) { - for (i = 0; i < decl->dim; i++) + for (i = 0; i < d->dim; i++) { Dsymbol *s; - s = (Dsymbol *)decl->data[i]; + s = (Dsymbol *)d->data[i]; s->inlineScan(); } } @@ -97,18 +117,37 @@ void AttribDeclaration::toObjFile() { unsigned i; + Array *d = include(); - if (include() && decl) + if (d) { - for (i = 0; i < decl->dim; i++) + for (i = 0; i < d->dim; i++) { Dsymbol *s; - s = (Dsymbol *)decl->data[i]; + s = (Dsymbol *)d->data[i]; s->toObjFile(); } } } +int AttribDeclaration::cvMember(unsigned char *p) +{ + unsigned i; + int nwritten = 0; + Array *d = include(); + + if (d) + { + for (i = 0; i < d->dim; i++) + { Dsymbol *s; + + s = (Dsymbol *)d->data[i]; + nwritten += s->cvMember(p); + } + } + return nwritten; +} + char *AttribDeclaration::kind() { return "attribute"; @@ -116,9 +155,10 @@ Dsymbol *AttribDeclaration::oneMember() { Dsymbol *s; + Array *d = include(); - if (decl && decl->dim == 1) - { s = (Dsymbol *)decl->data[0]; + if (d && d->dim == 1) + { s = (Dsymbol *)d->data[0]; return s->oneMember(); } return NULL; @@ -465,92 +505,12 @@ // Decide if debug code should be included -int DebugDeclaration::include() +Array *DebugDeclaration::include() { assert(condition); - return condition->include(); -} - -void DebugDeclaration::addMember(ScopeDsymbol *sd) -{ - unsigned i; - Array *d = include() ? decl : elsedecl; - - if (d) - { - for (i = 0; i < d->dim; i++) - { Dsymbol *s; - - s = (Dsymbol *)d->data[i]; - s->addMember(sd); - } - } + return condition->include() ? decl : elsedecl; } -void DebugDeclaration::semantic(Scope *sc) -{ - Array *d = include() ? decl : elsedecl; - - //printf("\tDebugDeclaration::semantic '%s'\n",toChars()); - if (d) - { - for (unsigned i = 0; i < d->dim; i++) - { - Dsymbol *s = (Dsymbol *)d->data[i]; - - s->semantic(sc); - } - } -} - - -void DebugDeclaration::semantic2(Scope *sc) -{ - unsigned i; - Array *d = include() ? decl : elsedecl; - - if (d) - { - for (i = 0; i < d->dim; i++) - { Dsymbol *s; - - s = (Dsymbol *)d->data[i]; - s->semantic2(sc); - } - } -} - -void DebugDeclaration::semantic3(Scope *sc) -{ - unsigned i; - Array *d = include() ? decl : elsedecl; - - if (d) - { - for (i = 0; i < d->dim; i++) - { Dsymbol *s; - - s = (Dsymbol *)d->data[i]; - s->semantic3(sc); - } - } -} - -void DebugDeclaration::toObjFile() -{ - unsigned i; - Array *d = include() ? decl : elsedecl; - - if (d) - { - for (i = 0; i < d->dim; i++) - { Dsymbol *s; - - s = (Dsymbol *)d->data[i]; - s->toObjFile(); - } - } -} void DebugDeclaration::toCBuffer(OutBuffer *buf) { diff -uNr dmd-0.102/dmd/src/dmd/attrib.h dmd-0.103/dmd/src/dmd/attrib.h --- dmd-0.102/dmd/src/dmd/attrib.h 2004-02-07 21:31:04.000000000 +0100 +++ dmd-0.103/dmd/src/dmd/attrib.h 2004-10-02 09:36:14.000000000 +0200 @@ -30,8 +30,9 @@ Array *decl; // array of Dsymbol's AttribDeclaration(Array *decl); - virtual int include(); + virtual Array *include(); void addMember(ScopeDsymbol *s); + void semantic(Scope *sc); void semantic2(Scope *sc); void semantic3(Scope *sc); void inlineScan(); @@ -40,6 +41,7 @@ void toCBuffer(OutBuffer *buf); void toObjFile(); // compile to .obj file + int cvMember(unsigned char *p); }; struct StorageClassDeclaration: AttribDeclaration @@ -101,14 +103,8 @@ DebugDeclaration(Condition *condition, Array *decl, Array *elsedecl); Dsymbol *syntaxCopy(Dsymbol *s); - int include(); - void addMember(ScopeDsymbol *s); - void semantic(Scope *sc); - void semantic2(Scope *sc); - void semantic3(Scope *sc); + Array *include(); void toCBuffer(OutBuffer *buf); - - void toObjFile(); // compile to .obj file }; struct VersionDeclaration : DebugDeclaration diff -uNr dmd-0.102/dmd/src/dmd/declaration.h dmd-0.103/dmd/src/dmd/declaration.h --- dmd-0.102/dmd/src/dmd/declaration.h 2004-09-15 01:03:26.000000000 +0200 +++ dmd-0.103/dmd/src/dmd/declaration.h 2004-10-03 16:03:38.000000000 +0200 @@ -116,6 +116,10 @@ Type *getType(); void toCBuffer(OutBuffer *buf); + void toObjFile(); // compile to .obj file + void toDebug(); + int cvMember(unsigned char *p); + TypedefDeclaration *isTypedefDeclaration() { return this; } }; @@ -159,6 +163,7 @@ Symbol *toSymbol(); void toObjFile(); // compile to .obj file + int cvMember(unsigned char *p); // Eliminate need for dynamic_cast VarDeclaration *isVarDeclaration() { return (VarDeclaration *)this; } @@ -262,6 +267,7 @@ int inlineNest; // !=0 if nested inline int semanticRun; // !=0 if semantic3() had been run int nestedFrameRef; // !=0 if nested variables referenced frame ptr + int introducing; // !=0 if 'introducing' function ForeachStatement *fes; // if foreach body, this is the foreach // Things that should really go into Scope @@ -306,6 +312,7 @@ Symbol *toSymbol(); Symbol *toThunkSymbol(int offset); // thunk version void toObjFile(); // compile to .obj file + int cvMember(unsigned char *p); FuncDeclaration *isFuncDeclaration() { return this; } }; diff -uNr dmd-0.102/dmd/src/dmd/dsymbol.c dmd-0.103/dmd/src/dmd/dsymbol.c --- dmd-0.102/dmd/src/dmd/dsymbol.c 2004-08-17 14:11:36.000000000 +0200 +++ dmd-0.103/dmd/src/dmd/dsymbol.c 2004-10-03 17:22:08.000000000 +0200 @@ -76,6 +76,36 @@ return ident ? ident->toChars() : (char *)"__anonymous"; } +char *Dsymbol::toPrettyChars() +{ Dsymbol *p; + char *s; + char *q; + size_t len; + + if (!parent) + return toChars(); + + len = 0; + for (p = this; p; p = p->parent) + len += strlen(p->toChars()) + 1; + + s = (char *)mem.malloc(len); + q = s + len - 1; + *q = 0; + for (p = this; 1; p = p->parent) + { + char *t = p->toChars(); + len = strlen(t); + q -= len; + memcpy(q, t, len); + if (q == s) + break; + q--; + *q = '.'; + } + return s; +} + char *Dsymbol::locToChars() { OutBuffer buf; @@ -251,7 +281,7 @@ printf("%s: ", p); mem.free(p); - printf("%s %s ", kind(), toChars()); + printf("%s %s ", kind(), toPrettyChars()); va_list ap; va_start(ap, format); @@ -274,7 +304,7 @@ printf("%s: ", p); mem.free(p); - printf("%s %s ", kind(), toChars()); + printf("%s %s ", kind(), toPrettyChars()); va_list ap; va_start(ap, format); @@ -411,7 +441,7 @@ { Declaration *d = s->isDeclaration(); if (d && d->protection == PROTprivate) - error("%s.%s is private", d->parent->toChars(), d->toChars()); + error("%s is private", d->toPrettyChars()); } } return s; @@ -465,13 +495,13 @@ //printf("s1 = '%s'\n", s1->toChars()); //printf("s2 = '%s', parent = %p\n", s2->toChars(), s2->parent); #if 1 - s1->error("conflicts with %s.%s at %s", - s2->parent->toChars(), s2->toChars(), + s1->error("conflicts with %s at %s", + s2->toPrettyChars(), s2->locToChars()); #else - s1->error("symbol %s.%s conflicts with %s.%s at %s", - s1->parent->toChars(), s1->toChars(), - s2->parent->toChars(), s2->toChars(), + s1->error("symbol %s conflicts with %s at %s", + s1->toPrettyChars(), + s2->toPrettyChars(), s2->locToChars()); #endif } diff -uNr dmd-0.102/dmd/src/dmd/dsymbol.h dmd-0.103/dmd/src/dmd/dsymbol.h --- dmd-0.102/dmd/src/dmd/dsymbol.h 2004-08-17 00:47:36.000000000 +0200 +++ dmd-0.103/dmd/src/dmd/dsymbol.h 2004-10-03 16:22:02.000000000 +0200 @@ -83,6 +83,7 @@ Dsymbol(); Dsymbol(Identifier *); char *toChars(); + char *toPrettyChars(); char *locToChars(); int equals(Object *o); int isAnonymous(); @@ -126,6 +127,7 @@ virtual Symbol *toSymbol(); // to backend symbol virtual void toObjFile(); // compile to .obj file + virtual int cvMember(unsigned char *p); // emit cv debug info for member Symbol *toImport(); // to backend import symbol static Symbol *toImport(Symbol *s); // to backend import symbol diff -uNr dmd-0.102/dmd/src/dmd/enum.h dmd-0.103/dmd/src/dmd/enum.h --- dmd-0.102/dmd/src/dmd/enum.h 2004-01-19 14:38:34.000000000 +0100 +++ dmd-0.103/dmd/src/dmd/enum.h 2004-10-03 17:28:04.000000000 +0200 @@ -37,6 +37,10 @@ void toCBuffer(OutBuffer *buf); Type *getType(); char *kind(); + + void toObjFile(); // compile to .obj file + void toDebug(); + int cvMember(unsigned char *p); }; diff -uNr dmd-0.102/dmd/src/dmd/expression.c dmd-0.103/dmd/src/dmd/expression.c --- dmd-0.102/dmd/src/dmd/expression.c 2004-09-19 12:59:50.000000000 +0200 +++ dmd-0.103/dmd/src/dmd/expression.c 2004-10-03 17:25:34.000000000 +0200 @@ -1950,7 +1950,8 @@ { if (!sc->insert(declaration) || (declaration->isFuncDeclaration() && !sc->func->localsymtab->insert(declaration))) - error("declaration %s.%s is already defined", sc->func->toChars(), declaration->toChars()); + //error("declaration %s.%s is already defined", sc->func->toChars(), declaration->toChars()); + error("declaration %s is already defined", declaration->toPrettyChars()); } if (!declaration->isVarDeclaration()) { declaration->semantic(sc); diff -uNr dmd-0.102/dmd/src/dmd/func.c dmd-0.103/dmd/src/dmd/func.c --- dmd-0.102/dmd/src/dmd/func.c 2004-08-26 00:55:50.000000000 +0200 +++ dmd-0.103/dmd/src/dmd/func.c 2004-10-02 16:37:34.000000000 +0200 @@ -55,6 +55,7 @@ inlineAsm = 0; semanticRun = 0; nestedFrameRef = 0; + introducing = 0; fes = NULL; } @@ -254,8 +255,10 @@ } } + // This is an 'introducing' function. // Append to end of vtbl[] //printf("\tappend with %p\n", this); + introducing = 1; vi = cd->vtbl.dim; cd->vtbl.push(this); vtblIndex = vi; diff -uNr dmd-0.102/dmd/src/dmd/mars.c dmd-0.103/dmd/src/dmd/mars.c --- dmd-0.102/dmd/src/dmd/mars.c 2004-09-06 23:34:00.000000000 +0200 +++ dmd-0.103/dmd/src/dmd/mars.c 2004-10-01 15:16:38.000000000 +0200 @@ -44,7 +44,7 @@ copyright = "Copyright (c) 1999-2004 by Digital Mars"; written = "written by Walter Bright"; - version = "v0.102"; + version = "v0.103"; global.structalign = 8; memset(¶ms, 0, sizeof(Param)); diff -uNr dmd-0.102/dmd/src/dmd/toobj.c dmd-0.103/dmd/src/dmd/toobj.c --- dmd-0.102/dmd/src/dmd/toobj.c 2004-09-19 02:18:12.000000000 +0200 +++ dmd-0.103/dmd/src/dmd/toobj.c 2004-10-04 20:04:24.000000000 +0200 @@ -184,6 +184,9 @@ if (!members) return; + if (global.params.symdebug) + toDebug(); + assert(!scope); // semantic() should have been run to completion if (parent && parent->isTemplateInstance()) @@ -591,6 +594,9 @@ //printf("InterfaceDeclaration::toObjFile('%s')\n", toChars()); + if (members && global.params.symdebug) + toDebug(); + if (parent && parent->isTemplateInstance()) scclass = SCcomdat; else @@ -721,6 +727,8 @@ // do not output forward referenced structs's if (!isAnonymous() && members) { + if (global.params.symdebug) + toDebug(); // Generate static initializer toInitializer(); @@ -851,3 +859,24 @@ } } +/* ================================================================== */ + +void TypedefDeclaration::toObjFile() +{ + //printf("TypedefDeclaration::toObjFile('%s')\n", toChars()); + + if (global.params.symdebug) + toDebug(); +} + +/* ================================================================== */ + +void EnumDeclaration::toObjFile() +{ + //printf("EnumDeclaration::toObjFile('%s')\n", toChars()); + + if (global.params.symdebug) + toDebug(); +} + + diff -uNr dmd-0.102/dmd/src/phobos/etc/c/zlib/linux.mak dmd-0.103/dmd/src/phobos/etc/c/zlib/linux.mak --- dmd-0.102/dmd/src/phobos/etc/c/zlib/linux.mak 2004-09-21 19:15:00.000000000 +0200 +++ dmd-0.103/dmd/src/phobos/etc/c/zlib/linux.mak 2004-10-21 01:23:02.000000000 +0200 @@ -63,11 +63,11 @@ zlib.a: $(OBJS) ar -r $@ $(OBJS) -examplee: example.o zlib.a - $(LD) $(LDFLAGS) example.o zlib.a +example: example.o zlib.a + $(CC) -o $@ example.o zlib.a -g minigzip: minigzip.o zlib.a - $(LD) $(LDFLAGS) minigzip.o zlib.a + $(CC) -o $@ minigzip.o zlib.a -g test: example minigzip ./example diff -uNr dmd-0.102/dmd/src/phobos/internal/aaA.d dmd-0.103/dmd/src/phobos/internal/aaA.d --- dmd-0.102/dmd/src/phobos/internal/aaA.d 2004-09-21 19:14:58.000000000 +0200 +++ dmd-0.103/dmd/src/phobos/internal/aaA.d 2004-10-21 01:23:00.000000000 +0200 @@ -1,5 +1,5 @@ //_ aaA.d -// Copyright (c) 2000-2003 by Digital Mars +// Copyright (c) 2000-2004 by Digital Mars // Written by Walter Bright import std.c.stdio; @@ -9,6 +9,16 @@ // Implementation of associative array +static uint[] prime_list = [ + 97ul, 389ul, + 1543ul, 6151ul, + 24593ul, 98317ul, + 393241ul, 1572869ul, + 6291469ul, 25165843ul, + 100663319ul, 402653189ul, + 1610612741ul, 4294967291ul +]; + struct Array { int length; @@ -19,7 +29,11 @@ { aaA *left; aaA *right; - uint hash; + union + { + uint nodes; // used in the head element to store the total # of AA elements + uint hash; + } /* key */ /* value */ } @@ -36,7 +50,7 @@ { uint i; - for (i = 0; i < aa.length; i++) + for (i = 1; i < aa.length; i++) { if (aa[i]) _aaInvAh_x(aa[i]); @@ -110,19 +124,22 @@ out (result) { assert(result >= 0); - //printf("_aaLen()-\n"); - } - body - { + int len = 0; uint i; - for (i = 0; i < aa.length; i++) + for (i = 1; i < aa.length; i++) { if (aa[i]) len += _aaLen_x(aa[i]); } - return len; + assert(len == result); + + //printf("_aaLen()-\n"); + } + body + { + return aa.length ? aa[0].nodes : 0; } private int _aaLen_x(aaA *e) @@ -171,12 +188,13 @@ { alias aaA *pa; - *aa = new pa[10]; + *aa = new pa[prime_list[0] + 1]; + (*aa)[0] = cast(aaA *) cast(void*) new byte[aaA.sizeof]; } key_hash = keyti.getHash(pkey); //printf("hash = %d\n", key_hash); - i = key_hash % (*aa).length; + i = (key_hash % ((*aa).length - 1)) + 1; pe = &(*aa)[i]; while ((e = *pe) != null) { int c; @@ -201,6 +219,14 @@ memcpy(e + 1, pkey, keysize); e.hash = key_hash; *pe = e; + + uint nodes = ++(*aa)[0].nodes; + //printf("length = %d, nodes = %d\n", (*aa).length, nodes); + if (nodes > (*aa).length * 4) + { + _aaRehash(aa,keyti); + } + Lret: return cast(void *)(e + 1) + keysize; } @@ -227,11 +253,11 @@ uint i; aaA *e; - if (aa.length) + if (aa.length > 1) { key_hash = keyti.getHash(pkey); //printf("hash = %d\n", key_hash); - i = key_hash % aa.length; + i = (key_hash % (aa.length - 1)) + 1; e = aa[i]; while (e != null) { int c; @@ -268,11 +294,11 @@ aaA *e; aaA **pe; - if (aa.length) + if (aa.length > 1) { key_hash = keyti.getHash(pkey); //printf("hash = %d\n", key_hash); - i = key_hash % aa.length; + i = (key_hash % (aa.length - 1)) + 1; pe = &aa[i]; while ((e = *pe) != null) // null means not found { int c; @@ -308,6 +334,8 @@ e.right = null; } + aa[0].nodes--; + // Should notify GC that e can be free'd now break; } @@ -334,7 +362,7 @@ a.length = _aaLen(aa); a.ptr = new byte[a.length * v]; resi = 0; - for (uint i = 0; i < aa.length; i++) + for (uint i = 1; i < aa.length; i++) { if (aa[i]) _aaValues_x(aa[i], a.ptr, resi, k, v); @@ -378,14 +406,24 @@ //printf("Rehash\n"); aa = *paa; len = _aaLen(aa); - if (len < 1) - len = 1; - newaa = new aaA*[len]; - - for (i = 0; i < aa.length; i++) + if (len) { - if (aa[i]) - _aaRehash_x(newaa, aa[i], keyti); + for (i = 0; i < prime_list.length - 1; i++) + { + if (len <= prime_list[i]) + break; + } + len = prime_list[i] + 1; + newaa = new aaA*[len]; + newaa[0] = cast(aaA *) cast(void*) new byte[aaA.sizeof]; + + for (i = 1; i < aa.length; i++) + { + if (aa[i]) + _aaRehash_x(newaa, aa[i], keyti); + } + + newaa[0].nodes = aa[0].nodes; } *paa = newaa; @@ -411,7 +449,7 @@ //printf("rehash %p\n", olde); key_hash = olde.hash; - i = key_hash % newaa.length; + i = (key_hash % (newaa.length - 1)) + 1; pe = &newaa[i]; while ((e = *pe) != null) { int c; @@ -456,7 +494,7 @@ len = _aaLen(aa); res = new byte[len * n]; resi = 0; - for (i = 0; i < aa.length; i++) + for (i = 1; i < aa.length; i++) { if (aa[i]) _aaKeys_x(aa[i], res, resi, n); @@ -525,7 +563,7 @@ return result; } - for (uint i = 0; i < aa.length; i++) + for (uint i = 1; i < aa.length; i++) { if (aa[i]) { @@ -565,7 +603,7 @@ return result; } - for (uint i = 0; i < aa.length; i++) + for (uint i = 1; i < aa.length; i++) { if (aa[i]) { diff -uNr dmd-0.102/dmd/src/phobos/internal/gc/gclinux.d dmd-0.103/dmd/src/phobos/internal/gc/gclinux.d --- dmd-0.102/dmd/src/phobos/internal/gc/gclinux.d 2004-09-21 19:15:00.000000000 +0200 +++ dmd-0.103/dmd/src/phobos/internal/gc/gclinux.d 2004-10-21 01:23:02.000000000 +0200 @@ -1,10 +1,12 @@ -// Copyright (C) 2001-2003 by Digital Mars, www.digitalmars.com +// Copyright (C) 2001-2004 by Digital Mars, www.digitalmars.com // All Rights Reserved // Written by Walter Bright import std.c.linux.linuxextern; +import std.c.linux.linux; +/+ extern (C) { // from @@ -17,6 +19,7 @@ enum { MAP_SHARED = 1, MAP_PRIVATE = 2, MAP_TYPE = 0x0F, MAP_FIXED = 0x10, MAP_FILE = 0, MAP_ANON = 0x20 } } ++/ /*********************************** * Map memory. diff -uNr dmd-0.102/dmd/src/phobos/internal/gc/linux.mak dmd-0.103/dmd/src/phobos/internal/gc/linux.mak --- dmd-0.102/dmd/src/phobos/internal/gc/linux.mak 2004-09-21 19:15:00.000000000 +0200 +++ dmd-0.103/dmd/src/phobos/internal/gc/linux.mak 2004-10-21 01:23:02.000000000 +0200 @@ -47,4 +47,4 @@ zip dmgc $(SRC) clean: - rm $(OBJS) dmgc.a testgc + rm $(OBJS) dmgc.a testgc testgc.o diff -uNr dmd-0.102/dmd/src/phobos/linux.mak dmd-0.103/dmd/src/phobos/linux.mak --- dmd-0.102/dmd/src/phobos/linux.mak 2004-09-21 19:14:58.000000000 +0200 +++ dmd-0.103/dmd/src/phobos/linux.mak 2004-10-21 01:22:56.000000000 +0200 @@ -17,7 +17,7 @@ CC=gcc #DMD=/dmd/bin/dmd -DMD=../dmd +DMD=dmd .c.o: $(CC) -c $(CFLAGS) $*.c @@ -246,31 +246,128 @@ etc/c/recls/linux.mak \ etc/c/recls/recls.lib +SRC_STLSOFT_NEW= \ + etc/c/stlsoft/winstl_file_path_buffer.h \ + etc/c/stlsoft/inetstl_connection.h \ + etc/c/stlsoft/inetstl_filesystem_traits.h \ + etc/c/stlsoft/inetstl_findfile_sequence.h \ + etc/c/stlsoft/inetstl_searchspec_sequence.h \ + etc/c/stlsoft/inetstl_session.h \ + etc/c/stlsoft/stlsoft.h \ + etc/c/stlsoft/stlsoft_allocator_base.h \ + etc/c/stlsoft/inetstl.h \ + etc/c/stlsoft/stlsoft_auto_buffer.h \ + etc/c/stlsoft/stlsoft_cccap_dmc.h \ + etc/c/stlsoft/stlsoft_cccap_gcc.h \ + etc/c/stlsoft/stlsoft_char_traits.h \ + etc/c/stlsoft/stlsoft_constraints.h \ + etc/c/stlsoft/stlsoft_exceptions.h \ + etc/c/stlsoft/stlsoft_iterator.h \ + etc/c/stlsoft/stlsoft_meta.h \ + etc/c/stlsoft/stlsoft_new_allocator.h \ + etc/c/stlsoft/stlsoft_any_caster.h \ + etc/c/stlsoft/stlsoft_nulldef.h \ + etc/c/stlsoft/stlsoft_sap_cast.h \ + etc/c/stlsoft/stlsoft_searchspec_sequence.h \ + etc/c/stlsoft/stlsoft_sign_traits.h \ + etc/c/stlsoft/stlsoft_simple_algorithms.h \ + etc/c/stlsoft/stlsoft_simple_string.h \ + etc/c/stlsoft/stlsoft_size_traits.h \ + etc/c/stlsoft/stlsoft_string_access.h \ + etc/c/stlsoft/stlsoft_string_tokeniser.h \ + etc/c/stlsoft/stlsoft_type_traits.h \ + etc/c/stlsoft/unixstl.h \ + etc/c/stlsoft/unixstl_filesystem_traits.h \ + etc/c/stlsoft/unixstl_file_path_buffer.h \ + etc/c/stlsoft/unixstl_glob_sequence.h \ + etc/c/stlsoft/unixstl_string_access.h \ + etc/c/stlsoft/unixstl_thread_mutex.h \ + etc/c/stlsoft/winstl.h \ + etc/c/stlsoft/winstl_atomic_functions.h \ + etc/c/stlsoft/winstl_char_conversions.h \ + etc/c/stlsoft/winstl_filesystem_traits.h \ + etc/c/stlsoft/winstl_spin_mutex.h \ + etc/c/stlsoft/winstl_findfile_sequence.h \ + etc/c/stlsoft/winstl_processheap_allocator.h \ + etc/c/stlsoft/winstl_system_version.h \ + etc/c/stlsoft/stlsoft_null.h + +SRC_RECLS_NEW= \ + etc/c/recls/recls_compiler_gcc.h \ + etc/c/recls/recls_retcodes.h \ + etc/c/recls/EntryFunctions.h \ + etc/c/recls/recls_platform_types.h \ + etc/c/recls/recls.h \ + etc/c/recls/recls_wininet_dl.h \ + etc/c/recls/ReclsFileSearch.h \ + etc/c/recls/ReclsFileSearchDirectoryNode_unix.cpp \ + etc/c/recls/ReclsFileSearchDirectoryNode_unix.h \ + etc/c/recls/ReclsFileSearchDirectoryNode_win32.cpp \ + etc/c/recls/ReclsFileSearchDirectoryNode_win32.h \ + etc/c/recls/recls_wininet_dl.cpp \ + etc/c/recls/ReclsFileSearch_unix.cpp \ + etc/c/recls/ReclsFileSearch_win32.cpp \ + etc/c/recls/recls_win32.h \ + etc/c/recls/ReclsFtpSearch.h \ + etc/c/recls/ReclsFtpSearchDirectoryNode_win32.cpp \ + etc/c/recls/ReclsFtpSearchDirectoryNode_win32.h \ + etc/c/recls/recls_util_win32.cpp \ + etc/c/recls/ReclsFtpSearch_win32.cpp \ + etc/c/recls/recls_util_unix.cpp \ + etc/c/recls/recls_api.cpp \ + etc/c/recls/recls_util.h \ + etc/c/recls/recls_api_unix.cpp \ + etc/c/recls/recls_api_win32.cpp \ + etc/c/recls/recls_util.cpp \ + etc/c/recls/recls_assert.h \ + etc/c/recls/recls_compiler.h \ + etc/c/recls/recls_compiler_dmc.h \ + etc/c/recls/recls_platform.h \ + etc/c/recls/recls_debug.h \ + etc/c/recls/recls_defs.h \ + etc/c/recls/recls_fileinfo.cpp \ + etc/c/recls/recls_fileinfo_unix.cpp \ + etc/c/recls/recls_fileinfo_win32.cpp \ + etc/c/recls/recls_unix.h \ + etc/c/recls/recls_ftp.h \ + etc/c/recls/recls_ftp_api_win32.cpp \ + etc/c/recls/recls_internal.cpp \ + etc/c/recls/recls_internal.h \ + etc/c/recls/recls_roots_win32.cpp \ + etc/c/recls/recls_language.h \ + etc/c/recls/recls_roots_unix.cpp \ + etc/c/recls/win32.mak \ + etc/c/recls/linux.mak + ALLSRCS = $(SRC) $(SRC_STD) $(SRC_STD_C) $(SRC_TI) $(SRC_INT) $(SRC_STD_WIN) \ $(SRC_STD_C_WIN) $(SRC_STD_C_LINUX) $(SRC_ETC) $(SRC_ETC_C) \ $(SRC_ZLIB) $(SRC_GC) \ $(SRC_RECLS) $(SRC_STLSOFT) -libphobos.a : $(OBJS) internal/gc/dmgc.a linux.mak +#libphobos.a : $(OBJS) internal/gc/dmgc.a linux.mak +libphobos.a : $(OBJS) internal/gc/dmgc.a $(ZLIB_OBJS) $(RECLS_OBJS) linux.mak ar -r $@ $(OBJS) $(ZLIB_OBJS) $(GC_OBJS) $(RECLS_OBJS) ########################################################### internal/gc/dmgc.a: - cd internal/gc - make -f linux.mak dmgc.a - cd ../.. +# cd internal/gc +# make -f linux.mak dmgc.a +# cd ../.. + make -C ./internal/gc -f linux.mak dmgc.a $(RECLS_OBJS): - cd etc/c/recls - make -f linux.mak - cd ../../.. +# cd etc/c/recls +# make -f linux.mak +# cd ../../.. + make -C ./etc/c/recls -f linux.mak $(ZLIB_OBJS): - cd etc/c/zlib - make -f linux.mak - cd ../../.. +# cd etc/c/zlib +# make -f linux.mak +# cd ../../.. + make -C ./etc/c/zlib -f linux.mak ### diff -uNr dmd-0.102/dmd/src/phobos/std/c/linux/linux.d dmd-0.103/dmd/src/phobos/std/c/linux/linux.d --- dmd-0.102/dmd/src/phobos/std/c/linux/linux.d 2004-09-21 19:15:00.000000000 +0200 +++ dmd-0.103/dmd/src/phobos/std/c/linux/linux.d 2004-10-21 01:23:00.000000000 +0200 @@ -85,7 +85,7 @@ unittest { - assert(struct_stat.size == 88); + assert(struct_stat.sizeof == 88); } enum : int diff -uNr dmd-0.102/dmd/src/phobos/std/thread.d dmd-0.103/dmd/src/phobos/std/thread.d --- dmd-0.102/dmd/src/phobos/std/thread.d 2004-09-21 19:14:58.000000000 +0200 +++ dmd-0.103/dmd/src/phobos/std/thread.d 2004-10-21 01:22:58.000000000 +0200 @@ -673,12 +673,12 @@ else npause++; // count of paused threads } + } - // Wait for each paused thread to acknowledge - while (npause--) - { - sem_wait(&flagSuspend); - } + // Wait for each paused thread to acknowledge + while (npause--) + { + sem_wait(&flagSuspend); } } } diff -uNr dmd-0.102/dmd/src/phobos/std/typeinfo/ti_Aa.d dmd-0.103/dmd/src/phobos/std/typeinfo/ti_Aa.d --- dmd-0.102/dmd/src/phobos/std/typeinfo/ti_Aa.d 2004-09-21 19:14:58.000000000 +0200 +++ dmd-0.103/dmd/src/phobos/std/typeinfo/ti_Aa.d 2004-10-21 01:22:58.000000000 +0200 @@ -13,6 +13,13 @@ char *str = s; uint hash = 0; +version (none) +{ + foreach (char c; s) + hash = hash * 31 + c; +} +else +{ while (1) { switch (len) @@ -44,7 +51,7 @@ break; } } - +} return hash; } diff -uNr dmd-0.102/dmd/src/phobos/win32.mak dmd-0.103/dmd/src/phobos/win32.mak --- dmd-0.102/dmd/src/phobos/win32.mak 2004-09-21 19:14:58.000000000 +0200 +++ dmd-0.103/dmd/src/phobos/win32.mak 2004-10-21 01:22:56.000000000 +0200 @@ -236,6 +236,99 @@ etc\c\recls\recls.lib +SRC_STLSOFT_NEW= \ + etc\c\stlsoft\winstl_file_path_buffer.h \ + etc\c\stlsoft\inetstl_connection.h \ + etc\c\stlsoft\inetstl_filesystem_traits.h \ + etc\c\stlsoft\inetstl_findfile_sequence.h \ + etc\c\stlsoft\inetstl_searchspec_sequence.h \ + etc\c\stlsoft\inetstl_session.h \ + etc\c\stlsoft\stlsoft.h \ + etc\c\stlsoft\stlsoft_allocator_base.h \ + etc\c\stlsoft\inetstl.h \ + etc\c\stlsoft\stlsoft_auto_buffer.h \ + etc\c\stlsoft\stlsoft_cccap_dmc.h \ + etc\c\stlsoft\stlsoft_cccap_gcc.h \ + etc\c\stlsoft\stlsoft_char_traits.h \ + etc\c\stlsoft\stlsoft_constraints.h \ + etc\c\stlsoft\stlsoft_exceptions.h \ + etc\c\stlsoft\stlsoft_iterator.h \ + etc\c\stlsoft\stlsoft_meta.h \ + etc\c\stlsoft\stlsoft_new_allocator.h \ + etc\c\stlsoft\stlsoft_any_caster.h \ + etc\c\stlsoft\stlsoft_nulldef.h \ + etc\c\stlsoft\stlsoft_sap_cast.h \ + etc\c\stlsoft\stlsoft_searchspec_sequence.h \ + etc\c\stlsoft\stlsoft_sign_traits.h \ + etc\c\stlsoft\stlsoft_simple_algorithms.h \ + etc\c\stlsoft\stlsoft_simple_string.h \ + etc\c\stlsoft\stlsoft_size_traits.h \ + etc\c\stlsoft\stlsoft_string_access.h \ + etc\c\stlsoft\stlsoft_string_tokeniser.h \ + etc\c\stlsoft\stlsoft_type_traits.h \ + etc\c\stlsoft\unixstl.h \ + etc\c\stlsoft\unixstl_filesystem_traits.h \ + etc\c\stlsoft\unixstl_file_path_buffer.h \ + etc\c\stlsoft\unixstl_glob_sequence.h \ + etc\c\stlsoft\unixstl_string_access.h \ + etc\c\stlsoft\unixstl_thread_mutex.h \ + etc\c\stlsoft\winstl.h \ + etc\c\stlsoft\winstl_atomic_functions.h \ + etc\c\stlsoft\winstl_char_conversions.h \ + etc\c\stlsoft\winstl_filesystem_traits.h \ + etc\c\stlsoft\winstl_spin_mutex.h \ + etc\c\stlsoft\winstl_findfile_sequence.h \ + etc\c\stlsoft\winstl_processheap_allocator.h \ + etc\c\stlsoft\winstl_system_version.h \ + etc\c\stlsoft\stlsoft_null.h + +SRC_RECLS_NEW= \ + etc\c\recls\recls_compiler_gcc.h \ + etc\c\recls\recls_retcodes.h \ + etc\c\recls\EntryFunctions.h \ + etc\c\recls\recls_platform_types.h \ + etc\c\recls\recls.h \ + etc\c\recls\recls_wininet_dl.h \ + etc\c\recls\ReclsFileSearch.h \ + etc\c\recls\ReclsFileSearchDirectoryNode_unix.cpp \ + etc\c\recls\ReclsFileSearchDirectoryNode_unix.h \ + etc\c\recls\ReclsFileSearchDirectoryNode_win32.cpp \ + etc\c\recls\ReclsFileSearchDirectoryNode_win32.h \ + etc\c\recls\recls_wininet_dl.cpp \ + etc\c\recls\ReclsFileSearch_unix.cpp \ + etc\c\recls\ReclsFileSearch_win32.cpp \ + etc\c\recls\recls_win32.h \ + etc\c\recls\ReclsFtpSearch.h \ + etc\c\recls\ReclsFtpSearchDirectoryNode_win32.cpp \ + etc\c\recls\ReclsFtpSearchDirectoryNode_win32.h \ + etc\c\recls\recls_util_win32.cpp \ + etc\c\recls\ReclsFtpSearch_win32.cpp \ + etc\c\recls\recls_util_unix.cpp \ + etc\c\recls\recls_api.cpp \ + etc\c\recls\recls_util.h \ + etc\c\recls\recls_api_unix.cpp \ + etc\c\recls\recls_api_win32.cpp \ + etc\c\recls\recls_util.cpp \ + etc\c\recls\recls_assert.h \ + etc\c\recls\recls_compiler.h \ + etc\c\recls\recls_compiler_dmc.h \ + etc\c\recls\recls_platform.h \ + etc\c\recls\recls_debug.h \ + etc\c\recls\recls_defs.h \ + etc\c\recls\recls_fileinfo.cpp \ + etc\c\recls\recls_fileinfo_unix.cpp \ + etc\c\recls\recls_fileinfo_win32.cpp \ + etc\c\recls\recls_unix.h \ + etc\c\recls\recls_ftp.h \ + etc\c\recls\recls_ftp_api_win32.cpp \ + etc\c\recls\recls_internal.cpp \ + etc\c\recls\recls_internal.h \ + etc\c\recls\recls_roots_win32.cpp \ + etc\c\recls\recls_language.h \ + etc\c\recls\recls_roots_unix.cpp \ + etc\c\recls\win32.mak \ + etc\c\recls\linux.mak + phobos.lib : $(OBJS) minit.obj internal\gc\dmgc.lib etc\c\zlib\zlib.lib \ win32.mak etc\c\recls\recls.lib lib -c phobos.lib $(OBJS) minit.obj internal\gc\dmgc.lib \