annotate run/InExpression_20.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 557e7af55dfc
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
312
557e7af55dfc associative arrays store copies (native, struct) and references (class)
thomask
parents:
diff changeset
1 // $HeadURL$
557e7af55dfc associative arrays store copies (native, struct) and references (class)
thomask
parents:
diff changeset
2 // $Date$
557e7af55dfc associative arrays store copies (native, struct) and references (class)
thomask
parents:
diff changeset
3 // $Author$
557e7af55dfc associative arrays store copies (native, struct) and references (class)
thomask
parents:
diff changeset
4
557e7af55dfc associative arrays store copies (native, struct) and references (class)
thomask
parents:
diff changeset
5 module dstress.run.InExpression_20;
557e7af55dfc associative arrays store copies (native, struct) and references (class)
thomask
parents:
diff changeset
6
557e7af55dfc associative arrays store copies (native, struct) and references (class)
thomask
parents:
diff changeset
7 class ArrayTest{
557e7af55dfc associative arrays store copies (native, struct) and references (class)
thomask
parents:
diff changeset
8 int i;
557e7af55dfc associative arrays store copies (native, struct) and references (class)
thomask
parents:
diff changeset
9 }
557e7af55dfc associative arrays store copies (native, struct) and references (class)
thomask
parents:
diff changeset
10
557e7af55dfc associative arrays store copies (native, struct) and references (class)
thomask
parents:
diff changeset
11 int main(){
557e7af55dfc associative arrays store copies (native, struct) and references (class)
thomask
parents:
diff changeset
12 ArrayTest[char[]] array;
557e7af55dfc associative arrays store copies (native, struct) and references (class)
thomask
parents:
diff changeset
13
557e7af55dfc associative arrays store copies (native, struct) and references (class)
thomask
parents:
diff changeset
14 ArrayTest at = new ArrayTest();
557e7af55dfc associative arrays store copies (native, struct) and references (class)
thomask
parents:
diff changeset
15 at.i=2;
557e7af55dfc associative arrays store copies (native, struct) and references (class)
thomask
parents:
diff changeset
16
557e7af55dfc associative arrays store copies (native, struct) and references (class)
thomask
parents:
diff changeset
17 array["key"]=at;
557e7af55dfc associative arrays store copies (native, struct) and references (class)
thomask
parents:
diff changeset
18
557e7af55dfc associative arrays store copies (native, struct) and references (class)
thomask
parents:
diff changeset
19 ArrayTest* ptr = "key" in array;
557e7af55dfc associative arrays store copies (native, struct) and references (class)
thomask
parents:
diff changeset
20 assert(at.i == 2);
557e7af55dfc associative arrays store copies (native, struct) and references (class)
thomask
parents:
diff changeset
21 assert(ptr.i == 2);
557e7af55dfc associative arrays store copies (native, struct) and references (class)
thomask
parents:
diff changeset
22
557e7af55dfc associative arrays store copies (native, struct) and references (class)
thomask
parents:
diff changeset
23 ptr.i = 3;
557e7af55dfc associative arrays store copies (native, struct) and references (class)
thomask
parents:
diff changeset
24 assert(at.i == 3);
557e7af55dfc associative arrays store copies (native, struct) and references (class)
thomask
parents:
diff changeset
25 assert(ptr.i == 3);
557e7af55dfc associative arrays store copies (native, struct) and references (class)
thomask
parents:
diff changeset
26
557e7af55dfc associative arrays store copies (native, struct) and references (class)
thomask
parents:
diff changeset
27 at.i = 4;
557e7af55dfc associative arrays store copies (native, struct) and references (class)
thomask
parents:
diff changeset
28 assert(at.i == 4);
557e7af55dfc associative arrays store copies (native, struct) and references (class)
thomask
parents:
diff changeset
29 assert(ptr.i == 4);
557e7af55dfc associative arrays store copies (native, struct) and references (class)
thomask
parents:
diff changeset
30
557e7af55dfc associative arrays store copies (native, struct) and references (class)
thomask
parents:
diff changeset
31 return 0;
557e7af55dfc associative arrays store copies (native, struct) and references (class)
thomask
parents:
diff changeset
32 }