Mercurial > projects > ldc
annotate test/classinfo3.d @ 203:e881c9b1c738 trunk
[svn r219] Fixed: the tango/lib/gc/basic garbage collector now compiles and links into an executable (change in tango/lib/llvmdc-posix.mak), closes #5 .
Changed: removed the crappy realloc based dynamic memory runtime and started moving over to DMD style runtime support, part of moving to real GC.
Fixed: dynamic arrays now use GC runtime for allocating memory.
Fixed: new expression now use GC for allocating memory.
Changed: revamped the dynamic array support routines related to dynamic memory.
Fixed: assertions no longer create exsessive allocas.
Changed: misc. minor cleanups.
author | lindquist |
---|---|
date | Tue, 13 May 2008 14:42:09 +0200 |
parents | e8da7856a260 |
children |
rev | line source |
---|---|
110 | 1 module classinfo3; |
2 | |
3 class C | |
4 { | |
5 int i; | |
6 float f; | |
7 long l; | |
8 int j; | |
9 } | |
10 | |
11 void main() | |
12 { | |
13 auto c = C.classinfo; | |
14 assert(c.offTi !is null); | |
15 assert(c.offTi.length == 4); | |
16 | |
17 size_t base = 2*size_t.sizeof; | |
18 | |
19 assert(c.offTi[0].offset == base); | |
20 assert(c.offTi[0].ti == typeid(int)); | |
21 assert(c.offTi[1].offset == base+4); | |
22 assert(c.offTi[1].ti == typeid(float)); | |
23 assert(c.offTi[2].offset == base+8); | |
24 assert(c.offTi[2].ti == typeid(long)); | |
25 assert(c.offTi[3].offset == base+16); | |
26 assert(c.offTi[3].ti == typeid(int)); | |
27 } |