Mercurial > projects > dstress
annotate run/new_10.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_10; | |
6 | |
7 int counter; | |
8 | |
9 class MyClass{ | |
10 this(){ | |
11 assert(counter==0); | |
12 counter++; | |
13 } | |
14 | |
15 new(size_t size){ | |
889 | 16 return (new byte[size]).ptr; |
378 | 17 } |
18 } | |
19 | |
20 int main(){ | |
21 MyClass c; | |
22 assert(counter==0); | |
23 c = new MyClass(); | |
24 assert(counter==1); | |
25 return 0; | |
26 } | |
27 |