Automatic dependencies

Peter Lobsinger plobsing at gmail.com
Wed Sep 22 04:28:33 UTC 2010


On Mon, Sep 20, 2010 at 6:27 PM, Paul Wolneykien
<wolneykien at altlinux.org> wrote:
> * The module scan tool *
>
>  As far as I understand the system of Parrot, a source code module of
> any program in any language is finally translated into a bytecode module
> (i.e. *.pbc) that is then run by the Parrot interpreter (VM). Each
> bytecode module generally has three types of possible dependencies:
>
>  a) an other bytecode module (via load_bytecode instruction);
>
>  b) a language/dialect support module (via load_language instruction);
>
>  c) a platform native library (via loadlib instruction).

You've overlooked the .loadlib compiler directive (note the preceding
dot character). This will load the library at compile time, which then
(through the horrible, horrible magic of the ParrotInterpreter freeze
hack) gets encoded in PBC files and loaded when the PBC file is read
(specifically, when the constant table is decoded).

If  anything were a true static dependancy, these would be they.

However, I'd like to see this explicitly in the bytecode format in the
future in stead of the awful ParrotInterpreter abuse (did I mention I
don't like that part enough yet?).


More information about the parrot-dev mailing list