annotate test/nested8.d @ 131:5825d48b27d1 trunk

[svn r135] * Merged DMD 1.025 * * Fixed a minor linking order mishap * * Added an command line option -annotate * * Fixed some problems with running optimizations * * Added std.stdio and dependencies to lphobos (still not 100% working, but compiles and links) * * Fixed problems with passing aggregate types to variadic functions * * Added initial code towards full GC support, currently based on malloc and friends, not all the runtime calls the GC yet for memory * * Fixed problems with resolving nested function context pointers for some heavily nested cases * * Redid function argument passing + other minor code cleanups, still lots to do on this end... *
author lindquist
date Fri, 04 Jan 2008 01:38:42 +0100
parents 8096ba7082db
children d9d5d59873d8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
129
8096ba7082db [svn r133] Fixed some problems with inlining not happening :P
lindquist
parents:
diff changeset
1 module nested8;
8096ba7082db [svn r133] Fixed some problems with inlining not happening :P
lindquist
parents:
diff changeset
2
8096ba7082db [svn r133] Fixed some problems with inlining not happening :P
lindquist
parents:
diff changeset
3 void main()
8096ba7082db [svn r133] Fixed some problems with inlining not happening :P
lindquist
parents:
diff changeset
4 {
8096ba7082db [svn r133] Fixed some problems with inlining not happening :P
lindquist
parents:
diff changeset
5 int i = 1;
8096ba7082db [svn r133] Fixed some problems with inlining not happening :P
lindquist
parents:
diff changeset
6 void func()
8096ba7082db [svn r133] Fixed some problems with inlining not happening :P
lindquist
parents:
diff changeset
7 {
8096ba7082db [svn r133] Fixed some problems with inlining not happening :P
lindquist
parents:
diff changeset
8 printf("func()\n");
8096ba7082db [svn r133] Fixed some problems with inlining not happening :P
lindquist
parents:
diff changeset
9 i++;
8096ba7082db [svn r133] Fixed some problems with inlining not happening :P
lindquist
parents:
diff changeset
10 void func2()
8096ba7082db [svn r133] Fixed some problems with inlining not happening :P
lindquist
parents:
diff changeset
11 {
8096ba7082db [svn r133] Fixed some problems with inlining not happening :P
lindquist
parents:
diff changeset
12 printf(" func2()\n");
8096ba7082db [svn r133] Fixed some problems with inlining not happening :P
lindquist
parents:
diff changeset
13 int j = i + 1;
8096ba7082db [svn r133] Fixed some problems with inlining not happening :P
lindquist
parents:
diff changeset
14 void func3()
8096ba7082db [svn r133] Fixed some problems with inlining not happening :P
lindquist
parents:
diff changeset
15 {
8096ba7082db [svn r133] Fixed some problems with inlining not happening :P
lindquist
parents:
diff changeset
16 printf(" func3()\n");
8096ba7082db [svn r133] Fixed some problems with inlining not happening :P
lindquist
parents:
diff changeset
17 j++;
8096ba7082db [svn r133] Fixed some problems with inlining not happening :P
lindquist
parents:
diff changeset
18 printf(" done = %d\n", j);
8096ba7082db [svn r133] Fixed some problems with inlining not happening :P
lindquist
parents:
diff changeset
19 }
8096ba7082db [svn r133] Fixed some problems with inlining not happening :P
lindquist
parents:
diff changeset
20 func3();
8096ba7082db [svn r133] Fixed some problems with inlining not happening :P
lindquist
parents:
diff changeset
21 i = j;
8096ba7082db [svn r133] Fixed some problems with inlining not happening :P
lindquist
parents:
diff changeset
22 printf(" done = %d\n", j);
8096ba7082db [svn r133] Fixed some problems with inlining not happening :P
lindquist
parents:
diff changeset
23 }
8096ba7082db [svn r133] Fixed some problems with inlining not happening :P
lindquist
parents:
diff changeset
24 func2();
8096ba7082db [svn r133] Fixed some problems with inlining not happening :P
lindquist
parents:
diff changeset
25 printf("done\n");
8096ba7082db [svn r133] Fixed some problems with inlining not happening :P
lindquist
parents:
diff changeset
26 }
8096ba7082db [svn r133] Fixed some problems with inlining not happening :P
lindquist
parents:
diff changeset
27 func();
8096ba7082db [svn r133] Fixed some problems with inlining not happening :P
lindquist
parents:
diff changeset
28 printf("i == %d\n", i);
8096ba7082db [svn r133] Fixed some problems with inlining not happening :P
lindquist
parents:
diff changeset
29 assert(i == 4);
8096ba7082db [svn r133] Fixed some problems with inlining not happening :P
lindquist
parents:
diff changeset
30 }