annotate test/classes6.d @ 270:d9d5d59873d8 trunk

[svn r291] Fixed a bunch of the old Phobos tests to work with Tango. Branch statements now emit a new block after it. Fixed the _adSort runtime function had a bad signature. Added a missing dot prefix on compiler generated string tables for string switch. Fixed, PTRSIZE seems like it was wrong on 64bit, now it definitely gets set properly.
author lindquist
date Mon, 16 Jun 2008 16:01:19 +0200
parents d3ee9efe20e2
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9
dafae18f9c08 [svn r13] * Updated for LLVM 2.1
lindquist
parents:
diff changeset
1 module classes6;
270
d9d5d59873d8 [svn r291] Fixed a bunch of the old Phobos tests to work with Tango.
lindquist
parents: 11
diff changeset
2 extern(C) int printf(char*, ...);
9
dafae18f9c08 [svn r13] * Updated for LLVM 2.1
lindquist
parents:
diff changeset
3
dafae18f9c08 [svn r13] * Updated for LLVM 2.1
lindquist
parents:
diff changeset
4 class C
dafae18f9c08 [svn r13] * Updated for LLVM 2.1
lindquist
parents:
diff changeset
5 {
dafae18f9c08 [svn r13] * Updated for LLVM 2.1
lindquist
parents:
diff changeset
6 void f()
dafae18f9c08 [svn r13] * Updated for LLVM 2.1
lindquist
parents:
diff changeset
7 {
11
d3ee9efe20e2 [svn r15] * Fixed a bunch problems with virtual calls. Seems I did some rather poor testing.
lindquist
parents: 9
diff changeset
8 printf("world\n");
d3ee9efe20e2 [svn r15] * Fixed a bunch problems with virtual calls. Seems I did some rather poor testing.
lindquist
parents: 9
diff changeset
9 }
d3ee9efe20e2 [svn r15] * Fixed a bunch problems with virtual calls. Seems I did some rather poor testing.
lindquist
parents: 9
diff changeset
10 }
d3ee9efe20e2 [svn r15] * Fixed a bunch problems with virtual calls. Seems I did some rather poor testing.
lindquist
parents: 9
diff changeset
11
d3ee9efe20e2 [svn r15] * Fixed a bunch problems with virtual calls. Seems I did some rather poor testing.
lindquist
parents: 9
diff changeset
12 class D : C
d3ee9efe20e2 [svn r15] * Fixed a bunch problems with virtual calls. Seems I did some rather poor testing.
lindquist
parents: 9
diff changeset
13 {
d3ee9efe20e2 [svn r15] * Fixed a bunch problems with virtual calls. Seems I did some rather poor testing.
lindquist
parents: 9
diff changeset
14 void f()
d3ee9efe20e2 [svn r15] * Fixed a bunch problems with virtual calls. Seems I did some rather poor testing.
lindquist
parents: 9
diff changeset
15 {
d3ee9efe20e2 [svn r15] * Fixed a bunch problems with virtual calls. Seems I did some rather poor testing.
lindquist
parents: 9
diff changeset
16 printf("moon\n");
9
dafae18f9c08 [svn r13] * Updated for LLVM 2.1
lindquist
parents:
diff changeset
17 }
dafae18f9c08 [svn r13] * Updated for LLVM 2.1
lindquist
parents:
diff changeset
18 }
dafae18f9c08 [svn r13] * Updated for LLVM 2.1
lindquist
parents:
diff changeset
19
11
d3ee9efe20e2 [svn r15] * Fixed a bunch problems with virtual calls. Seems I did some rather poor testing.
lindquist
parents: 9
diff changeset
20
d3ee9efe20e2 [svn r15] * Fixed a bunch problems with virtual calls. Seems I did some rather poor testing.
lindquist
parents: 9
diff changeset
21 extern(C)
d3ee9efe20e2 [svn r15] * Fixed a bunch problems with virtual calls. Seems I did some rather poor testing.
lindquist
parents: 9
diff changeset
22 {
d3ee9efe20e2 [svn r15] * Fixed a bunch problems with virtual calls. Seems I did some rather poor testing.
lindquist
parents: 9
diff changeset
23 void srand(uint seed);
d3ee9efe20e2 [svn r15] * Fixed a bunch problems with virtual calls. Seems I did some rather poor testing.
lindquist
parents: 9
diff changeset
24 int rand();
d3ee9efe20e2 [svn r15] * Fixed a bunch problems with virtual calls. Seems I did some rather poor testing.
lindquist
parents: 9
diff changeset
25 }
d3ee9efe20e2 [svn r15] * Fixed a bunch problems with virtual calls. Seems I did some rather poor testing.
lindquist
parents: 9
diff changeset
26
d3ee9efe20e2 [svn r15] * Fixed a bunch problems with virtual calls. Seems I did some rather poor testing.
lindquist
parents: 9
diff changeset
27 import llvm.intrinsic;
d3ee9efe20e2 [svn r15] * Fixed a bunch problems with virtual calls. Seems I did some rather poor testing.
lindquist
parents: 9
diff changeset
28
9
dafae18f9c08 [svn r13] * Updated for LLVM 2.1
lindquist
parents:
diff changeset
29 void main()
dafae18f9c08 [svn r13] * Updated for LLVM 2.1
lindquist
parents:
diff changeset
30 {
11
d3ee9efe20e2 [svn r15] * Fixed a bunch problems with virtual calls. Seems I did some rather poor testing.
lindquist
parents: 9
diff changeset
31 C c;
d3ee9efe20e2 [svn r15] * Fixed a bunch problems with virtual calls. Seems I did some rather poor testing.
lindquist
parents: 9
diff changeset
32 srand(readcyclecounter());
d3ee9efe20e2 [svn r15] * Fixed a bunch problems with virtual calls. Seems I did some rather poor testing.
lindquist
parents: 9
diff changeset
33 if (rand() % 2)
d3ee9efe20e2 [svn r15] * Fixed a bunch problems with virtual calls. Seems I did some rather poor testing.
lindquist
parents: 9
diff changeset
34 c = new C;
d3ee9efe20e2 [svn r15] * Fixed a bunch problems with virtual calls. Seems I did some rather poor testing.
lindquist
parents: 9
diff changeset
35 else
d3ee9efe20e2 [svn r15] * Fixed a bunch problems with virtual calls. Seems I did some rather poor testing.
lindquist
parents: 9
diff changeset
36 c = new D;
9
dafae18f9c08 [svn r13] * Updated for LLVM 2.1
lindquist
parents:
diff changeset
37 c.f();
dafae18f9c08 [svn r13] * Updated for LLVM 2.1
lindquist
parents:
diff changeset
38 }