At 06:26 PM 9/25/2001 -0700, Benjamin Stuhl wrote:
>--- Dan Sugalski <[EMAIL PROTECTED]> wrote:
> > At 06:07 PM 9/25/2001 -0700, Benjamin Stuhl wrote:
> > >But why store it in this
> > >format? What we really need to store is the list of what
> > we
> > >expect in the table and where.
> >
> > We have 8 bytes per entry. We can store a lot in there.
> > :)
>
>But not enought to allow us to vector Perl-level variable
>references - to support run-time aliasing, we need to have
>the fixup table entry be built from the symbol names:

That stuff's all handled by either the global symbol tables or the lexical 
pads, both of which are different animals entirely. The fixup section's for 
referencing constants. Anything else needs more stuff.

> > >Can't we just have the bytecode header
> > >have
> > >
> > >int32 *data_template;
> > >int32 fixup_space_needed;
> > >
> > >and build the final table as needed?
> >
> > If we do that, the fixup section won't be part of the
> > same section of
> > memory as the bytecode, which means we'll need to touch
> > at least some of
> > the actual bytecode so we can set the absolute address of
> > the fixups.
> > Sticking it on the end means we can access it relatively,
> > and padding to 8k
> > means the section should start on its own memory page so
> > we won't be making
> > a private copy of anything but the fixup section.
>
>But it should be just as cheap to have a pointer to the
>current fixup section in the interpreter structure and just
>vector off of that, rather than doing relative lookups.

Nope, it isn't. We can have multiple bytecode sections, so one static 
pointer's not enough. We need to set it up on scope entry and exit (well, 
on changed bytecode section scope entry and exit).

>Besides, for non-constant entries in the fixup table (PMCs,
>again), the fixup section needs to be per-interpreter,
>since different interpreters will want to reference their
>own PMCs, not someone else's.

There won't be non-constant entries in the fixup table.

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to