diff 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
line wrap: on
line diff
--- a/lphobos/internal/objectimpl.d	Sun Nov 25 03:58:55 2007 +0100
+++ b/lphobos/internal/objectimpl.d	Sun Nov 25 18:55:52 2007 +0100
@@ -33,7 +33,8 @@
  */
 
 /*
- * This copy is modified to work with LLVMDC by Tomas Lindquist Olsen 2007
+ * This copy is modified to work with LLVMDC
+ * by Tomas Lindquist Olsen, September 2007
  */
 
 module object;
@@ -1120,6 +1121,30 @@
 }
 
 /**
+ * Information about each module.
+ */
+class ModuleInfo
+{
+    char[] name;
+    ModuleInfo[] importedModules;
+    ClassInfo[] localClasses;
+
+    uint flags;     // initialization state
+
+    void function() ctor;
+    void function() dtor;
+    void function() unitTest;
+
+    /******************
+     * Return collection of all modules in the program.
+     */
+    static ModuleInfo[] modules()
+    {
+    return std.moduleinit._moduleinfo_array;
+    }
+}
+
+/**
  * All recoverable exceptions should be derived from class Exception.
  */
 class Exception : Object