annotate run/mixin_12.d @ 1630:d0efa3ae5522 default tip

run/mini/naked_asm5: New x86_64 ABI passes the arguments in reverse order.
author David Nadlinger <code@klickverbot.at>
date Sat, 23 Apr 2011 22:57:32 +0200
parents b8c0195059d9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
465
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
1 // $HeadURL$
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
2 // $Date$
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
3 // $Author$
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
4
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
5 // @author@ Jarrett Billingsley <kb3ctd2@yahoo.com>
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
6 // @date@ 2005-03-23
1489
b8c0195059d9 changed nntp: URLs to http: URLs
thomask
parents: 465
diff changeset
7 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=3319
465
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
8
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
9 module dstress.run.mixin_12;
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
10
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
11 class A{
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
12 template M(){
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
13 int C(){
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
14 return 10;
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
15 }
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
16
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
17 int opCall(){
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
18 return 15;
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
19 }
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
20 }
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
21
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
22 mixin M m;
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
23
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
24 template N(){
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
25 int C(){
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
26 return 20;
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
27 }
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
28
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
29 int opCall(){
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
30 return 25;
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
31 }
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
32 }
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
33
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
34 mixin N n;
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
35 }
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
36
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
37 int main(){
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
38 A a=new A;
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
39 assert(a.m.C()==10);
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
40 assert(a.n.C()==20);
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
41
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
42 assert(a.m()==15);
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
43 assert(a.n()==25);
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
44 return 0;
e224de1ae026 mixin opCall
thomask
parents:
diff changeset
45 }