annotate run/m/mixin_16_A.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 902d2c168029
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
807
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
1 // $HeadURL$
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
2 // $Date$
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
3 // $Author$
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
4
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
5 // @author@ Chris Miller <chris@dprogramming.com>
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
6 // @date@ 2006-01-30
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
7 // @uri@ news:op.s36xvez5po9bzi@moe
1380
902d2c168029 updates for DMD-1.007
thomask
parents: 1269
diff changeset
8 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=711
807
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
9
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
10 module dstress.run.m.mixin_16_A;
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
11
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
12 int step;
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
13
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
14 template Mixer(){
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
15 char test(){
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
16 if(step == 2){
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
17 step++;
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
18 return 'M';
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
19 }
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
20 }
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
21 }
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
22
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
23 class Foo{
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
24 char test(){
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
25 assert(0);
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
26 }
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
27 }
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
28
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
29 class FooBar : Foo{
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
30 mixin Mixer mixer;
1091
9dcac8d4e97f post DMD-0.163 review
thomask
parents: 807
diff changeset
31
807
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
32 char test(){
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
33 if(step == 1){
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
34 step++;
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
35 return mixer.test();
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
36 }
1269
c99e8aac0e0c partial review
thomask
parents: 1091
diff changeset
37 assert(0);
807
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
38 }
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
39 }
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
40
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
41 int main(){
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
42 FooBar f = new FooBar;
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
43 if(step == 0){
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
44 step++;
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
45 if(f.test() == 'M'){
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
46 if(step == 3){
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
47 return 0;
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
48 }
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
49 assert(0);
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
50 }
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
51 assert(0);
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
52 }
b011c45bba66 Chris Miller <chris@dprogramming.com>
thomask
parents:
diff changeset
53 }