[fpc-devel] for-in-index loop

Jonas Maebe jonas.maebe at elis.ugent.be
Mon Jan 28 18:07:40 CET 2013


On 28 Jan 2013, at 18:00, Alexander Klenin wrote:

> On Tue, Jan 29, 2013 at 12:39 AM, Paul Ishenin <paul.ishenin at gmail.com> wrote:
>>> It offers nothing that objects didn't already have.
>> It offers understandable memory layout without VMT.
> Oops... so, FPC "object" type always creates VMT -- even if there is
> no virtual methods?

Not always, but there are other conditions when a VMT is generated for objects, just like in Delphi/TP: when a constructor or destructor exists. In general, I'd also strongly recommend to treat them as opaque types, especially because this VMT may be inserted in the middle of the object, and be subject to special alignment requirements because of the target (regardless of the current {$packrecords x} or packed setting).


Jonas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20130128/906bfdb0/attachment.html>


More information about the fpc-devel mailing list