Mercurial > projects > ldc
diff gen/classes.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 | 89e38fbfef1f |
children | d9c5f5a43403 |
line wrap: on
line diff
--- a/gen/classes.cpp Tue Jun 02 20:28:53 2009 +0200 +++ b/gen/classes.cpp Wed Jun 03 02:28:48 2009 +0200 @@ -486,12 +486,14 @@ src = DtoBitCast(src, st); // gep to the index +#if 0 if (Logger::enabled()) { Logger::cout() << "src2: " << *src << '\n'; Logger::cout() << "index: " << field->index << '\n'; Logger::cout() << "srctype: " << *src->getType() << '\n'; } +#endif LLValue* val = DtoGEPi(src, 0, field->index); // do we need to offset further? (union area) @@ -678,12 +680,12 @@ // ClassInfo *base; // base class // void *destructor; // void *invariant; // class invariant -// version(D_Version2) -// void *xgetMembers; // uint flags; // void *deallocator; // OffsetTypeInfo[] offTi; // void *defaultConstructor; +// version(D_Version2) +// const(MemberInfo[]) function(string) xgetMembers; // TypeInfo typeinfo; // since dmd 1.045 // } @@ -798,9 +800,6 @@ // default constructor b.push_funcptr(cd->defaultCtor, Type::tvoid->pointerTo()); - // typeinfo - since 1.045 - b.push_typeinfo(cd->type); - #if DMDV2 // xgetMembers @@ -811,6 +810,9 @@ #endif + // typeinfo - since 1.045 + b.push_typeinfo(cd->type); + /*size_t n = inits.size(); for (size_t i=0; i<n; ++i) {