Dan Sugalski <[EMAIL PROTECTED]> wrote:

> Calling into another bytecode segment is simple--you just make a call
> to a sub/method/function that lives in that segment. The sub PMCs are
> either in variables, either globals or lexicals, or passed in as
> parameters so they're available to use.

I'm currently on the constant PMC stuff for subroutine entries. What I
don't know yet, how a call into a different packfile should look like
(in assembly). Current idea is:

  load_bytecode "s2.pbc"
  $P0 = global "_sub2"
    .pcc_begin prototyped
    .pcc_call $P0
    ret:
    .pcc_end
  end

The global "_sub2" is coming from the pf->const_table, where it has a
start offset into the PBC. When C<load_bytecode> is done, the address is
converted to an absolute one in that packfile, and the global symbol is
put into the global stash.

Does that somehow match your ideas?

> I'll throw something together and see about getting it checked into
> docs/ and we can go from there.

Yeah ;-)

leo

Reply via email to