[fpc-devel] The "implements" keyword
Peter Vreman
peter at freepascal.org
Sun Aug 6 21:30:35 CEST 2006
At 16:40 6-8-2006, you wrote:
>On Sunday 06 August 2006 12:12, Florian Klaempfl wrote:
> > Christian Iversen wrote:
> > > Finally I got some spare time for coding.
> > >
> > > So, after quite a bit of help from Florian (Thank you!), the
> > > implements-keyword is.... well, IMPLEMENTED! Finally!
> > >
> > > It's not yet in trunk, but it will be soon.
> > >
> > > As far as I can tell, it's completely hack-free, but I will submit the
> > > revisions as patches for code review.
> > >
> > > The code is still not complete, and there are some needed changes that
> > > will happen when I can find the time (for instance, what's the procedure
> > > to add new compiler messages? should I just add them to errore.msg?)
> >
> > Yes, at the appropriate place. Then run make msg in fpc/compiler and
> > commit the changed msg*.inc files as well.
>
>Ok, I'll do that.
>
> > > The current version of the patch adds 2*sizeof(pointer) to each
> > > TInterfaceEntry. That might seem like a lot, but with bitpacking this can
> > > be brought down to just 1*sizeof(pointer).
> > >
> > > Now, to make the bitpacking I need to be able to assume VMT's are always
> > > aligned to at least 4-byte boundaries. I think this is a safe assumption,
> > > but maybe it's not?
> >
> > Well, when compiling optimized for size it isn't I fear.
>
>It would really save a lot of space if we could just agree to always align
>VMTs to 4-byte boundaries. Trying to pack them together actually hurts the
>size, in the case of interfaces.
It is already always aligned. See code in nobj.pas. There is no check
for optimization on sizes.
Peter
More information about the fpc-devel
mailing list