annotate run/constructor_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 1f6cf5ccfbc9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
338
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
1 // $HeadURL$
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
2 // $Date$
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
3 // $Author$
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
4
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
5 // Static constructors within a module are executed in the lexical order in which they appear.
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
6
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
7 module dstress.run.constructor_10;
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
8
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
9 bool init;
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
10 bool initA;
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
11 bool initB;
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
12
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
13 static this(){
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
14 assert(!init);
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
15 assert(!initA);
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
16 assert(!initB);
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
17 init=true;
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
18 }
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
19
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
20 class B{
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
21 static this(){
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
22 assert(init);
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
23 assert(!initA);
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
24 assert(!initB);
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
25 initB=true;
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
26 }
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
27 }
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
28
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
29 class A{
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
30 static this(){
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
31 assert(init);
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
32 assert(!initA);
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
33 assert(initB);
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
34 initA=true;
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
35 }
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
36 }
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
37
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
38 int main(){
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
39 assert(init);
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
40 assert(initA);
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
41 assert(initB);
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
42 return 0;
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
43 }