Mercurial > projects > ldc
diff dmd/class.c @ 809:69a5e4a6fc0f
Changed some hardcoded offset/alignment for classes in DMD, broke offsets for 64bits.
Changed ClassInfo generation to no longer access the default initializer of ClassInfo, fixes problems with index mismatch.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Sun, 30 Nov 2008 20:22:09 +0100 |
parents | 50383e476c7e |
children | 330f999ade44 |
line wrap: on
line diff
--- a/dmd/class.c Sun Nov 30 19:19:39 2008 +0100 +++ b/dmd/class.c Sun Nov 30 20:22:09 2008 +0100 @@ -551,8 +551,8 @@ // sc->offset += PTRSIZE; // room for uplevel context pointer } else - { sc->offset = 8; // allow room for vptr[] and monitor - alignsize = 4; + { sc->offset = 2*PTRSIZE; // allow room for vptr[] and monitor + alignsize = PTRSIZE; } structsize = sc->offset; Scope scsave = *sc; @@ -1139,7 +1139,7 @@ sc->linkage = LINKwindows; sc->structalign = 8; structalign = sc->structalign; - sc->offset = 8; + sc->offset = 2*PTRSIZE; inuse++; for (i = 0; i < members->dim; i++) {