At 8:25 PM +0200 6/19/03, Leopold Toetsch wrote:
The primary question is: Why do we save and restore what part of context.

Very good question:


*) System stack gets saved since we have important info on it. (Exception handlers when they're done, along with other control information)
*) User stack and register stacks, because all stacks need to be saved
*) Lexical pad pointer because we'll be entering (potentially) a new lexical scope and need to save the old one
*) Global namespace pointer since we have chained namespaces and the namespace chain for the sub we're using may not be the same as the sub we're calling
*) Opcode function table because we may have different opcode functions in the new sub
*) Current bytecode segment pointer since we may be entering a new bytecode segment with a new constant table and such
*) Interp flags (maybe, I'm not sure)
*) Warnings, since warnings are lexically scoped
*) Permission and privilege info (which we don't have yet)


I think that's about it, but there might be some more.
--
                                        Dan

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

Reply via email to