Mercurial > projects > dstress
annotate run/new_09.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 | b3da1b510a19 |
children |
rev | line source |
---|---|
378 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Auhthor$ | |
4 | |
5 module dstress.run.new_09; | |
6 | |
7 int counter; | |
8 | |
9 class MyClass{ | |
10 this(){ | |
11 assert(counter==1); | |
12 counter+=2; | |
13 } | |
14 | |
15 new(size_t size){ | |
16 assert(counter==0); | |
17 counter++; | |
889 | 18 return (new byte[size]).ptr; |
378 | 19 } |
20 } | |
21 | |
22 int main(){ | |
23 MyClass c; | |
24 assert(counter==0); | |
25 c = new MyClass(); | |
26 assert(counter==3); | |
27 return 0; | |
28 } | |
29 |