Jeff Clites wrote:
Are we still planning to move the current return continuation and current sub, out of the registers and into their own spots in the interpreter context

The current sub, continuation, and object already have a storage in the context structure and are accessible via the C<interpinfo> opcode. Invocing a subroutine copies P0..P2 into the context already.


What's missing is the distinction between:

  invoke Px   # maybe return
  return      # use current continuation in context

... (in order to avoid the PMC creation overhead in the common case, etc.)?

The main reason for the storage in the context isn't that. We need it for the backtrace generation. Currently P1 could be swapped out into the register frame, so that's unknown, where the continuation (and the caller) is.


That said optimization isn't really possible with the calling scheme, because we need a storage for the context. This has to be a managed object so that we are able to cleanup dead code during GC.

JEff

leo



Reply via email to