alias size_t hash_t;\r
alias int equals_t;\r
\r
-alias char[] string;\r
-alias wchar[] wstring;\r
-alias dchar[] dstring;\r
+alias invariant(char)[] string;\r
+alias invariant(wchar)[] wstring;\r
+alias invariant(dchar)[] dstring;\r
\r
class Object\r
{\r
// 2: // has no possible pointers into GC memory\r
// 4: // has offTi[] member\r
// 8: // has constructors\r
+ // 16: // has xgetMembers member\r
void* deallocator;\r
OffsetTypeInfo[] offTi;\r
void* defaultConstructor;\r
+ const(MemberInfo[]) function(string) xgetMembers;\r
\r
static ClassInfo find(in char[] classname);\r
Object create();\r
+ const(MemberInfo[]) getMembers(in char[] classname);\r
}\r
\r
struct OffsetTypeInfo\r
uint flags();\r
// 1: // has possible pointers into GC memory\r
OffsetTypeInfo[] offTi();\r
+ void destroy(void* p);\r
+ void postblit(void* p);\r
}\r
\r
class TypeInfo_Typedef : TypeInfo\r
\r
class TypeInfo_Enum : TypeInfo_Typedef\r
{\r
+\r
}\r
\r
class TypeInfo_Pointer : TypeInfo\r
\r
uint m_flags;\r
\r
+ const(MemberInfo[]) function(in char[]) xgetMembers;\r
+ void function(void*) xdtor;\r
+ void function(void*) xpostblit;\r
}\r
\r
class TypeInfo_Tuple : TypeInfo\r
TypeInfo[] elements;\r
}\r
\r
+class TypeInfo_Const : TypeInfo\r
+{\r
+ TypeInfo next;\r
+}\r
+\r
+class TypeInfo_Invariant : TypeInfo_Const\r
+{\r
+\r
+}\r
+\r
+abstract class MemberInfo\r
+{\r
+ string name();\r
+}\r
+\r
+class MemberInfo_field : MemberInfo\r
+{\r
+ this(string name, TypeInfo ti, size_t offset);\r
+\r
+ override string name();\r
+ TypeInfo typeInfo();\r
+ size_t offset();\r
+}\r
+\r
+class MemberInfo_function : MemberInfo\r
+{\r
+ enum\r
+ {\r
+ Virtual = 1,\r
+ Member = 2,\r
+ Static = 4,\r
+ }\r
+\r
+ this(string name, TypeInfo ti, void* fp, uint flags);\r
+\r
+ override string name();\r
+ TypeInfo typeInfo();\r
+ void* fp();\r
+ uint flags();\r
+}\r
+\r
class ModuleInfo\r
{\r
string name;\r
{\r
interface TraceInfo\r
{\r
- int opApply( int delegate( inout char[] ) );\r
+ int opApply( int delegate(inout char[]) );\r
string toString();\r
}\r
\r