Mercurial > projects > ldc
diff gen/typinf.cpp @ 1463:a5526b7a5ae6
D2:
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.
author | Tomas Lindquist Olsen <tomas.l.olsen gmail com> |
---|---|
date | Wed, 03 Jun 2009 02:28:48 +0200 |
parents | 638d16625da2 |
children | d9c5f5a43403 |
line wrap: on
line diff
--- a/gen/typinf.cpp Tue Jun 02 20:28:53 2009 +0200 +++ b/gen/typinf.cpp Wed Jun 03 02:28:48 2009 +0200 @@ -646,16 +646,23 @@ b.push_uint(hasptrs); #if DMDV2 - // just (void*)null for now + // FIXME: just emit nulls for now + + ClassDeclaration* tscd = Type::typeinfostruct; + + assert(tscd->fields.dim == 10); // const(MemberInfo[]) function(in char[]) xgetMembers; - b.push_null_vp(); + VarDeclaration* xgetMembers = (VarDeclaration*)tscd->fields.data[7]; + b.push_null(xgetMembers->type); //void function(void*) xdtor; - b.push_null_vp(); + VarDeclaration* xdtor = (VarDeclaration*)tscd->fields.data[8]; + b.push_null(xdtor->type); //void function(void*) xpostblit; - b.push_null_vp(); + VarDeclaration* xpostblit = (VarDeclaration*)tscd->fields.data[9]; + b.push_null(xpostblit->type); #endif // finish