Mercurial > projects > ldc
annotate lphobos/internal/moduleinit.d @ 94:61615fa85940 trunk
[svn r98] Added support for std.c.stdlib.alloca via pragma(LLVM_internal, "alloca").
Added support for array .sort and .reverse properties.
Fixed some bugs with pointer arithmetic.
Disabled some DMD AST optimizations that was messing things up, destroying valuable information.
Added a KDevelop project file, this is what I use for coding LLVMDC now :)
Other minor stuff.
author | lindquist |
---|---|
date | Mon, 12 Nov 2007 06:32:46 +0100 |
parents | c53b6e3fe49a |
children |
rev | line source |
---|---|
1 | 1 module internal.moduleinit; |
2 | |
3 private alias extern(C) void function() fptr_t; | |
4 | |
5 extern(C): | |
6 | |
7 fptr_t* _d_get_module_ctors(); | |
8 fptr_t* _d_get_module_dtors(); | |
9 | |
10 void _d_run_module_ctors() | |
11 { | |
12 auto p = _d_get_module_ctors(); | |
13 while(*p) { | |
14 (*p++)(); | |
15 } | |
16 } | |
17 | |
18 void _d_run_module_dtors() | |
19 { | |
20 auto p = _d_get_module_dtors(); | |
21 while(*p) { | |
22 (*p++)(); | |
23 } | |
24 } |