annotate run/ptr_01.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 1a77f6d93b45
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
168
a9d16ec2b848 added basic ptr tests
thomask
parents:
diff changeset
1 // $HeadURL$
a9d16ec2b848 added basic ptr tests
thomask
parents:
diff changeset
2 // $Date$
199
1a77f6d93b45 1) added websvn links
thomask
parents: 168
diff changeset
3 // $Author$
168
a9d16ec2b848 added basic ptr tests
thomask
parents:
diff changeset
4
a9d16ec2b848 added basic ptr tests
thomask
parents:
diff changeset
5 module dstress.run.ptr_01;
a9d16ec2b848 added basic ptr tests
thomask
parents:
diff changeset
6
a9d16ec2b848 added basic ptr tests
thomask
parents:
diff changeset
7 int main(){
a9d16ec2b848 added basic ptr tests
thomask
parents:
diff changeset
8 Object[3] array;
a9d16ec2b848 added basic ptr tests
thomask
parents:
diff changeset
9 Object a = new Object();
a9d16ec2b848 added basic ptr tests
thomask
parents:
diff changeset
10 Object b = new Object();
a9d16ec2b848 added basic ptr tests
thomask
parents:
diff changeset
11 Object c = new Object();
a9d16ec2b848 added basic ptr tests
thomask
parents:
diff changeset
12
a9d16ec2b848 added basic ptr tests
thomask
parents:
diff changeset
13 array[1]=b;
a9d16ec2b848 added basic ptr tests
thomask
parents:
diff changeset
14 array[2]=c;
a9d16ec2b848 added basic ptr tests
thomask
parents:
diff changeset
15 array[0]=a;
a9d16ec2b848 added basic ptr tests
thomask
parents:
diff changeset
16
a9d16ec2b848 added basic ptr tests
thomask
parents:
diff changeset
17 assert(*array.ptr == a);
a9d16ec2b848 added basic ptr tests
thomask
parents:
diff changeset
18
a9d16ec2b848 added basic ptr tests
thomask
parents:
diff changeset
19 return 0;
a9d16ec2b848 added basic ptr tests
thomask
parents:
diff changeset
20 }