annotate run/opIndex_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 b8c0195059d9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
480
a3d84fdbfd53 -inline / opIndex / struct
thomask
parents:
diff changeset
1 // $HeadURI$
a3d84fdbfd53 -inline / opIndex / struct
thomask
parents:
diff changeset
2 // $Author$
a3d84fdbfd53 -inline / opIndex / struct
thomask
parents:
diff changeset
3 // $Date$
a3d84fdbfd53 -inline / opIndex / struct
thomask
parents:
diff changeset
4
a3d84fdbfd53 -inline / opIndex / struct
thomask
parents:
diff changeset
5 // @author@ Kevin Bealer <Kevin_member@pathlink.com>
a3d84fdbfd53 -inline / opIndex / struct
thomask
parents:
diff changeset
6 // @date@ 2005-04-24
1489
b8c0195059d9 changed nntp: URLs to http: URLs
thomask
parents: 736
diff changeset
7 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=3808
480
a3d84fdbfd53 -inline / opIndex / struct
thomask
parents:
diff changeset
8
a3d84fdbfd53 -inline / opIndex / struct
thomask
parents:
diff changeset
9 module dstress.run.opIndex_01;
a3d84fdbfd53 -inline / opIndex / struct
thomask
parents:
diff changeset
10
a3d84fdbfd53 -inline / opIndex / struct
thomask
parents:
diff changeset
11 struct Range{
a3d84fdbfd53 -inline / opIndex / struct
thomask
parents:
diff changeset
12 int width(){
a3d84fdbfd53 -inline / opIndex / struct
thomask
parents:
diff changeset
13 return 1;
a3d84fdbfd53 -inline / opIndex / struct
thomask
parents:
diff changeset
14 }
a3d84fdbfd53 -inline / opIndex / struct
thomask
parents:
diff changeset
15 }
a3d84fdbfd53 -inline / opIndex / struct
thomask
parents:
diff changeset
16
a3d84fdbfd53 -inline / opIndex / struct
thomask
parents:
diff changeset
17 class Container {
a3d84fdbfd53 -inline / opIndex / struct
thomask
parents:
diff changeset
18 Range opIndex(int i){
a3d84fdbfd53 -inline / opIndex / struct
thomask
parents:
diff changeset
19 return data[i];
a3d84fdbfd53 -inline / opIndex / struct
thomask
parents:
diff changeset
20 }
a3d84fdbfd53 -inline / opIndex / struct
thomask
parents:
diff changeset
21
a3d84fdbfd53 -inline / opIndex / struct
thomask
parents:
diff changeset
22 Range[2] data;
a3d84fdbfd53 -inline / opIndex / struct
thomask
parents:
diff changeset
23 }
a3d84fdbfd53 -inline / opIndex / struct
thomask
parents:
diff changeset
24
a3d84fdbfd53 -inline / opIndex / struct
thomask
parents:
diff changeset
25 int main(){
a3d84fdbfd53 -inline / opIndex / struct
thomask
parents:
diff changeset
26 Container ranges=new Container;
a3d84fdbfd53 -inline / opIndex / struct
thomask
parents:
diff changeset
27
a3d84fdbfd53 -inline / opIndex / struct
thomask
parents:
diff changeset
28 if (ranges[0].width == 1){
a3d84fdbfd53 -inline / opIndex / struct
thomask
parents:
diff changeset
29 return 0;
a3d84fdbfd53 -inline / opIndex / struct
thomask
parents:
diff changeset
30 }
a3d84fdbfd53 -inline / opIndex / struct
thomask
parents:
diff changeset
31
a3d84fdbfd53 -inline / opIndex / struct
thomask
parents:
diff changeset
32 assert(0);
a3d84fdbfd53 -inline / opIndex / struct
thomask
parents:
diff changeset
33 }
a3d84fdbfd53 -inline / opIndex / struct
thomask
parents:
diff changeset
34