Mercurial > projects > ldc
annotate tests/mini/throw1.d @ 920:545f54041d91
Implemented proper support for naked asm using llvm module level asm. Still not 100% complete, but already 1000 times better that what we had before. Don's BignumX86 implementation from Tango (when turned into a standalone unittest) seems to fully work with no changes, and great performance :)
Fixed align N; in asm blocks.
Fixed inreg parameter passing on x86 for ref/out params.
Removed support for lazy initialization of function local static variables, I have no idea why I ever implemented this, it's not in the D spec, and DMD doesn't support it :P
Some of the global variable related changes might cause minor regressions, but they should be easily fixable.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Tue, 03 Feb 2009 08:54:57 +0100 |
parents | 1bb99290e03a |
children |
rev | line source |
---|---|
34 | 1 module throw1; |
2 | |
3 extern(C) int rand(); | |
4 | |
5 class C | |
6 { | |
7 } | |
8 | |
100 | 9 void func(bool b) |
34 | 10 { |
100 | 11 if (b) |
34 | 12 throw new C; |
13 } | |
14 | |
15 int main() | |
16 { | |
100 | 17 bool b = true; |
34 | 18 try |
19 { | |
100 | 20 func(b); |
34 | 21 } |
22 catch(Object) | |
23 { | |
341
1bb99290e03a
[svn r362] Started merging the old 'test' dir as well as the newer 'tangotests' dir into 'tests/mini' and 'tests/minicomplex'.
lindquist
parents:
100
diff
changeset
|
24 return 0; |
34 | 25 } |
341
1bb99290e03a
[svn r362] Started merging the old 'test' dir as well as the newer 'tangotests' dir into 'tests/mini' and 'tests/minicomplex'.
lindquist
parents:
100
diff
changeset
|
26 return 1; |
34 | 27 } |