Mercurial > projects > ldc
comparison lphobos/internal/objectimpl.d @ 116:fd7ad91fd713 trunk
[svn r120] ModuleInfo implementation is now almost complete.
Fixed some nasty static array-initializer bugs.
Fixed bug in DtoArrayLen and DtoArrayPtr for full slices of static arrays.
author | lindquist |
---|---|
date | Sun, 25 Nov 2007 18:55:52 +0100 |
parents | 27b9f749d9fe |
children | a2c2c3c1a73d |
comparison
equal
deleted
inserted
replaced
115:5ba6d286c941 | 116:fd7ad91fd713 |
---|---|
31 * o This notice may not be removed or altered from any source | 31 * o This notice may not be removed or altered from any source |
32 * distribution. | 32 * distribution. |
33 */ | 33 */ |
34 | 34 |
35 /* | 35 /* |
36 * This copy is modified to work with LLVMDC by Tomas Lindquist Olsen 2007 | 36 * This copy is modified to work with LLVMDC |
37 * by Tomas Lindquist Olsen, September 2007 | |
37 */ | 38 */ |
38 | 39 |
39 module object; | 40 module object; |
40 | 41 |
41 import std.outofmemory; | 42 import std.outofmemory; |
1118 { | 1119 { |
1119 char[] toString() { return "invariant " ~ base.toString(); } | 1120 char[] toString() { return "invariant " ~ base.toString(); } |
1120 } | 1121 } |
1121 | 1122 |
1122 /** | 1123 /** |
1124 * Information about each module. | |
1125 */ | |
1126 class ModuleInfo | |
1127 { | |
1128 char[] name; | |
1129 ModuleInfo[] importedModules; | |
1130 ClassInfo[] localClasses; | |
1131 | |
1132 uint flags; // initialization state | |
1133 | |
1134 void function() ctor; | |
1135 void function() dtor; | |
1136 void function() unitTest; | |
1137 | |
1138 /****************** | |
1139 * Return collection of all modules in the program. | |
1140 */ | |
1141 static ModuleInfo[] modules() | |
1142 { | |
1143 return std.moduleinit._moduleinfo_array; | |
1144 } | |
1145 } | |
1146 | |
1147 /** | |
1123 * All recoverable exceptions should be derived from class Exception. | 1148 * All recoverable exceptions should be derived from class Exception. |
1124 */ | 1149 */ |
1125 class Exception : Object | 1150 class Exception : Object |
1126 { | 1151 { |
1127 char[] msg; | 1152 char[] msg; |