Mercurial > projects > ldc
comparison 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 |
comparison
equal
deleted
inserted
replaced
1462:f0423003caa6 | 1463:a5526b7a5ae6 |
---|---|
644 // uint m_flags; | 644 // uint m_flags; |
645 unsigned hasptrs = tc->hasPointers() ? 1 : 0; | 645 unsigned hasptrs = tc->hasPointers() ? 1 : 0; |
646 b.push_uint(hasptrs); | 646 b.push_uint(hasptrs); |
647 | 647 |
648 #if DMDV2 | 648 #if DMDV2 |
649 // just (void*)null for now | 649 // FIXME: just emit nulls for now |
650 | |
651 ClassDeclaration* tscd = Type::typeinfostruct; | |
652 | |
653 assert(tscd->fields.dim == 10); | |
650 | 654 |
651 // const(MemberInfo[]) function(in char[]) xgetMembers; | 655 // const(MemberInfo[]) function(in char[]) xgetMembers; |
652 b.push_null_vp(); | 656 VarDeclaration* xgetMembers = (VarDeclaration*)tscd->fields.data[7]; |
657 b.push_null(xgetMembers->type); | |
653 | 658 |
654 //void function(void*) xdtor; | 659 //void function(void*) xdtor; |
655 b.push_null_vp(); | 660 VarDeclaration* xdtor = (VarDeclaration*)tscd->fields.data[8]; |
661 b.push_null(xdtor->type); | |
656 | 662 |
657 //void function(void*) xpostblit; | 663 //void function(void*) xpostblit; |
658 b.push_null_vp(); | 664 VarDeclaration* xpostblit = (VarDeclaration*)tscd->fields.data[9]; |
665 b.push_null(xpostblit->type); | |
659 #endif | 666 #endif |
660 | 667 |
661 // finish | 668 // finish |
662 b.finalize(ir.irGlobal); | 669 b.finalize(ir.irGlobal); |
663 } | 670 } |