Applied function type from D1 frontend that got removed in D2, it's critical for member function type to be correct.

Fixed a bunch of type discrepancies in druntime object.di vs. genobj.d .

Disabled (#if 0) some potentally very large type dumps for -vv .

Updated classinfo and typeinfo generation for D2, almost complete now.

Added finer grained checks for vtbl type mismatching, aids debugging.
This commit is contained in:
Tomas Lindquist Olsen
2009-06-03 02:28:48 +02:00
parent 2cd4d15be1
commit f6997cb604
12 changed files with 82 additions and 18 deletions

View File

@@ -151,7 +151,7 @@ class ClassInfo : Object
Interface[] interfaces; /// interfaces this class implements
ClassInfo base; /// base class
void* destructor;
void* classInvariant;
void(*classInvariant)(Object);
uint flags;
// 1: // is IUnknown or is derived from IUnknown
// 2: // has no possible pointers into GC memory
@@ -162,7 +162,7 @@ class ClassInfo : Object
void* deallocator;
OffsetTypeInfo[] offTi;
void* defaultConstructor; // default Constructor
const(MemberInfo[]) function(in char[]) xgetMembers;
const(MemberInfo[]) function(string) xgetMembers;
TypeInfo typeinfo;
/**
@@ -207,7 +207,7 @@ class ClassInfo : Object
* Search for all members with the name 'name'.
* If name[] is null, return all members.
*/
const(MemberInfo[]) getMembers(in char[] name)
const(MemberInfo[]) getMembers(string name)
{
if (flags & 16 && xgetMembers)
return xgetMembers(name);
@@ -230,7 +230,7 @@ struct OffsetTypeInfo
* Can be retrieved for any type using a
* <a href="../expression.html#typeidexpression">TypeidExpression</a>.
*/
class TypeInfo
class TypeInfo : Object
{
override hash_t toHash()
{
@@ -881,7 +881,7 @@ class TypeInfo_Struct : TypeInfo
hash_t function(in void*) xtoHash;
equals_t function(in void*, in void*) xopEquals;
int function(in void*, in void*) xopCmp;
char[] function(in void*) xtoString;
string function(in void*) xtoString;
uint m_flags;