annotate tests/mini/classes6.d @ 445:cc40db549aea

Changed the handling of variadic intrinsics a bit. Removed the -fp80 option and made real be 80bit floats on X86, this is what the D spec really says it should be and fixes a bunch of issues. Changed the handling of parameter attributes to a bit more generalized approach. Added sext/zext attributes for byte/short/ubyte/ushort parameters, fixes #60 . Parameter attribs now properly set for intrinsic calls if necessary. Made the tango.math.Math patch less intrusive. Fixed/added some mini tests.
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Fri, 01 Aug 2008 17:59:58 +0200
parents 44f08170f4ef
children 6aaa3d3c1183
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
443
44f08170f4ef Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 341
diff changeset
27 import llvmdc.intrinsics;
11
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 }