annotate tests/mini/classinfo1.d @ 883:b52d5de7783f

GC defines and linkage changes.
author Christian Kamm <kamm incasoftware de>
date Thu, 08 Jan 2009 18:20:02 +0100
parents 1bb99290e03a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
90
16e88334bba7 [svn r94] started on complex support
lindquist
parents:
diff changeset
1 module classinfo1;
16e88334bba7 [svn r94] started on complex support
lindquist
parents:
diff changeset
2
270
d9d5d59873d8 [svn r291] Fixed a bunch of the old Phobos tests to work with Tango.
lindquist
parents: 112
diff changeset
3 extern(C) int printf(char*, ...);
d9d5d59873d8 [svn r291] Fixed a bunch of the old Phobos tests to work with Tango.
lindquist
parents: 112
diff changeset
4
102
027b8d8b71ec [svn r106] Turns out the last commit wasn't enough, now the D->LLVM process is even more split up.
lindquist
parents: 100
diff changeset
5 class NoPtrs
90
16e88334bba7 [svn r94] started on complex support
lindquist
parents:
diff changeset
6 {
16e88334bba7 [svn r94] started on complex support
lindquist
parents:
diff changeset
7 }
16e88334bba7 [svn r94] started on complex support
lindquist
parents:
diff changeset
8
102
027b8d8b71ec [svn r106] Turns out the last commit wasn't enough, now the D->LLVM process is even more split up.
lindquist
parents: 100
diff changeset
9 class HasPtrs
027b8d8b71ec [svn r106] Turns out the last commit wasn't enough, now the D->LLVM process is even more split up.
lindquist
parents: 100
diff changeset
10 {
027b8d8b71ec [svn r106] Turns out the last commit wasn't enough, now the D->LLVM process is even more split up.
lindquist
parents: 100
diff changeset
11 void* p;
027b8d8b71ec [svn r106] Turns out the last commit wasn't enough, now the D->LLVM process is even more split up.
lindquist
parents: 100
diff changeset
12 }
027b8d8b71ec [svn r106] Turns out the last commit wasn't enough, now the D->LLVM process is even more split up.
lindquist
parents: 100
diff changeset
13
90
16e88334bba7 [svn r94] started on complex support
lindquist
parents:
diff changeset
14 void main()
16e88334bba7 [svn r94] started on complex support
lindquist
parents:
diff changeset
15 {
102
027b8d8b71ec [svn r106] Turns out the last commit wasn't enough, now the D->LLVM process is even more split up.
lindquist
parents: 100
diff changeset
16 {
027b8d8b71ec [svn r106] Turns out the last commit wasn't enough, now the D->LLVM process is even more split up.
lindquist
parents: 100
diff changeset
17 ClassInfo ci = NoPtrs.classinfo;
027b8d8b71ec [svn r106] Turns out the last commit wasn't enough, now the D->LLVM process is even more split up.
lindquist
parents: 100
diff changeset
18 char[] name = ci.name;
027b8d8b71ec [svn r106] Turns out the last commit wasn't enough, now the D->LLVM process is even more split up.
lindquist
parents: 100
diff changeset
19 printf("%.*s\n", name.length, name.ptr);
027b8d8b71ec [svn r106] Turns out the last commit wasn't enough, now the D->LLVM process is even more split up.
lindquist
parents: 100
diff changeset
20 assert(ci.name == "classinfo1.NoPtrs");
112
368547b1cbe6 [svn r116] Implemented the ClassInfo.destructor field.
lindquist
parents: 102
diff changeset
21 assert(ci.flags & 2);
102
027b8d8b71ec [svn r106] Turns out the last commit wasn't enough, now the D->LLVM process is even more split up.
lindquist
parents: 100
diff changeset
22 }
027b8d8b71ec [svn r106] Turns out the last commit wasn't enough, now the D->LLVM process is even more split up.
lindquist
parents: 100
diff changeset
23 {
027b8d8b71ec [svn r106] Turns out the last commit wasn't enough, now the D->LLVM process is even more split up.
lindquist
parents: 100
diff changeset
24 ClassInfo ci = HasPtrs.classinfo;
027b8d8b71ec [svn r106] Turns out the last commit wasn't enough, now the D->LLVM process is even more split up.
lindquist
parents: 100
diff changeset
25 char[] name = ci.name;
027b8d8b71ec [svn r106] Turns out the last commit wasn't enough, now the D->LLVM process is even more split up.
lindquist
parents: 100
diff changeset
26 printf("%.*s\n", name.length, name.ptr);
027b8d8b71ec [svn r106] Turns out the last commit wasn't enough, now the D->LLVM process is even more split up.
lindquist
parents: 100
diff changeset
27 assert(ci.name == "classinfo1.HasPtrs");
112
368547b1cbe6 [svn r116] Implemented the ClassInfo.destructor field.
lindquist
parents: 102
diff changeset
28 assert(!(ci.flags & 2));
102
027b8d8b71ec [svn r106] Turns out the last commit wasn't enough, now the D->LLVM process is even more split up.
lindquist
parents: 100
diff changeset
29 }
90
16e88334bba7 [svn r94] started on complex support
lindquist
parents:
diff changeset
30 }