mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-11 18:33:14 +01:00
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.
This commit is contained in:
@@ -486,12 +486,14 @@ LLValue* DtoIndexClass(LLValue* src, ClassDeclaration* cd, VarDeclaration* vd)
|
||||
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 @@ LLConstant* DtoDefineClassInfo(ClassDeclaration* cd)
|
||||
// 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 @@ LLConstant* DtoDefineClassInfo(ClassDeclaration* cd)
|
||||
// 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 @@ LLConstant* DtoDefineClassInfo(ClassDeclaration* cd)
|
||||
|
||||
#endif
|
||||
|
||||
// typeinfo - since 1.045
|
||||
b.push_typeinfo(cd->type);
|
||||
|
||||
/*size_t n = inits.size();
|
||||
for (size_t i=0; i<n; ++i)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user