annotate run/typeid_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 7e8e5013a030
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
374
f87ba6507260 added missing meta-data
thomask
parents: 18
diff changeset
1 // $HeadURL$
f87ba6507260 added missing meta-data
thomask
parents: 18
diff changeset
2 // $Date$
f87ba6507260 added missing meta-data
thomask
parents: 18
diff changeset
3 // $Author$
f87ba6507260 added missing meta-data
thomask
parents: 18
diff changeset
4
f87ba6507260 added missing meta-data
thomask
parents: 18
diff changeset
5 module dstress.run.typeid_01;
f87ba6507260 added missing meta-data
thomask
parents: 18
diff changeset
6
2
de27ca625bf7 extended abstract/alias and template tests
thomask
parents:
diff changeset
7 class MyClass{
de27ca625bf7 extended abstract/alias and template tests
thomask
parents:
diff changeset
8 }
de27ca625bf7 extended abstract/alias and template tests
thomask
parents:
diff changeset
9
de27ca625bf7 extended abstract/alias and template tests
thomask
parents:
diff changeset
10 int main(){
de27ca625bf7 extended abstract/alias and template tests
thomask
parents:
diff changeset
11 TypeInfo ti = typeid(MyClass[]);
1086
7e8e5013a030 gdc-0.19 review
thomask
parents: 538
diff changeset
12 if(ti is null){
7e8e5013a030 gdc-0.19 review
thomask
parents: 538
diff changeset
13 assert(0);
7e8e5013a030 gdc-0.19 review
thomask
parents: 538
diff changeset
14 }
7e8e5013a030 gdc-0.19 review
thomask
parents: 538
diff changeset
15 if(!ti){
7e8e5013a030 gdc-0.19 review
thomask
parents: 538
diff changeset
16 assert(0);
7e8e5013a030 gdc-0.19 review
thomask
parents: 538
diff changeset
17 }
7e8e5013a030 gdc-0.19 review
thomask
parents: 538
diff changeset
18 if(ti.tsize != (MyClass[]).sizeof){
7e8e5013a030 gdc-0.19 review
thomask
parents: 538
diff changeset
19 assert(0);
7e8e5013a030 gdc-0.19 review
thomask
parents: 538
diff changeset
20 }
7e8e5013a030 gdc-0.19 review
thomask
parents: 538
diff changeset
21 if(ti.toString != "dstress.run.typeid_01.MyClass[]"){
7e8e5013a030 gdc-0.19 review
thomask
parents: 538
diff changeset
22 assert(0);
7e8e5013a030 gdc-0.19 review
thomask
parents: 538
diff changeset
23 }
538
5320be2851e8 fixed typeid checks for classes
thomask
parents: 374
diff changeset
24
5320be2851e8 fixed typeid checks for classes
thomask
parents: 374
diff changeset
25 TypeInfo_Array ta = cast(TypeInfo_Array) ti;
1086
7e8e5013a030 gdc-0.19 review
thomask
parents: 538
diff changeset
26 if(ta is null){
7e8e5013a030 gdc-0.19 review
thomask
parents: 538
diff changeset
27 assert(0);
7e8e5013a030 gdc-0.19 review
thomask
parents: 538
diff changeset
28 }
7e8e5013a030 gdc-0.19 review
thomask
parents: 538
diff changeset
29 if(!ta){
7e8e5013a030 gdc-0.19 review
thomask
parents: 538
diff changeset
30 assert(0);
7e8e5013a030 gdc-0.19 review
thomask
parents: 538
diff changeset
31 }
7e8e5013a030 gdc-0.19 review
thomask
parents: 538
diff changeset
32 if(ta.tsize != (MyClass[]).sizeof){
7e8e5013a030 gdc-0.19 review
thomask
parents: 538
diff changeset
33 assert(0);
7e8e5013a030 gdc-0.19 review
thomask
parents: 538
diff changeset
34 }
7e8e5013a030 gdc-0.19 review
thomask
parents: 538
diff changeset
35 if(ta.toString != "dstress.run.typeid_01.MyClass[]"){
7e8e5013a030 gdc-0.19 review
thomask
parents: 538
diff changeset
36 assert(0);
7e8e5013a030 gdc-0.19 review
thomask
parents: 538
diff changeset
37 }
2
de27ca625bf7 extended abstract/alias and template tests
thomask
parents:
diff changeset
38
de27ca625bf7 extended abstract/alias and template tests
thomask
parents:
diff changeset
39 return 0;
de27ca625bf7 extended abstract/alias and template tests
thomask
parents:
diff changeset
40 }