[fpc-devel] Suggestion regarding dynamic packages

Max Vlasov max.vlasov at gmail.com
Mon Nov 22 06:51:33 CET 2010


On Mon, Nov 22, 2010 at 1:40 AM, Willibald Krenn <Willibald.Krenn at gmx.at>wrote:

>
> Hi,
>
> Am 21.11.2010 12:49, schrieb Max Vlasov:
>
>  I recently read the info about current implementation of packages and a
>> post that dynamic packages support is at the early stage or not started
>> yet. Knowing that fpc developers is very skilled and they probably the
>>
>
> I've been very busy lately, so the implementation did not really start yet.
> All I've done so far is contributing some fixes for the win64 target so that
> I can actually debug the fpc compiler on my machine... ;-)
>
> <...snip...>
>
>  So, I just wanted to suggest that regardless of the magic different
>> platform has about such dynamic linking, there's something similar to
>> this indirect addressing possibly should be done with interfaces
>> sections of the unit. So even without actual dynamic  packages
>> implementation details, the fpc compiler could start  support intdirect
>> addressing for ppu files. It may be a conditional mode and in this case
>> every ppu just can introduce a flag indicating the mode it was compiled
>> with or just be gradually implemented unconditionally. The latter is not
>> good for performance reasons and as I recall after the discovery about
>> indirect addressing we did some tests and some artificial projects (for
>> example a loop variable placed in the interface section of a unit)
>> showed very little performance degradation, but for general approach it
>> was almost unnoticeable.
>>
>> What you think?
>>
>
> This is interesting information and it sounds very reasonable.  However, I
> haven't made much progress on the package front yet and I still need to read
> up (better: read again) on what fpc stores in it's  .ppu files -- hence I
> cannot really say what is the best way to implement this feature.. ;)
> (Obviously I want to change as few things as possible in the fpc
> internals..)
>
> BTW: My main goal for this year still is to do a proof of concept and to
> compile the system unit into a "fpcrtl.ppl" with a simple application that
> uses this package.
>
>
>
Willi,
great to know  that there's a activity about it. And wanting to change as
few things as possible sounds also reasonable. This is also related to the
long-time question of the usability of packages in general. On one side they
remind Wirth's ideas in Oberon (modules) and would probably allow not only
make things better for Lazarus IDE, but also creating lite/full versions of
programs easily. On the other side, at least in Delphi the linkage was
always strictly bound to detect smallest version changes that is probably
good for compiler and not always for the developer. Good luck! :)

Max
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20101122/486ed87e/attachment.html>


More information about the fpc-devel mailing list