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:
Thanks for the detailed list.
*) System stack *) User stack and register stacks
*) Lexical pad pointer
Ok, these we already have.
*) Global namespace pointer
This would require a new opcode e.g. B<new_global_table Sx> to be useful. Also the global table handling as of pdd06 is missing. This global table stuff in pdd06 looks like we need a hash of hashes for the globals. Saving such a HoH seems rather expensive, we don't have COW hashes, so, with current data structures this would be a nested hash_clone() call.
*) Opcode function table because we may have different opcode functions in the new sub
This probably can wait some time.
*) Current bytecode segment pointer since we may be entering a new bytecode segment with a new constant table and such
Needs still some work in the packfile code, which currently is some PITA because of the compat stuff for assemble.pl Either we toss it or it has to use pack*.c.
*) Interp flags (maybe, I'm not sure)
Changing run cores needs restart opcodes. Just restoring the flags isn't very useful.
*) Warnings, since warnings are lexically scoped
Yep. Is there any reason that the warning flags are malloced instead of using an UINTVAL?
*) Permission and privilege info (which we don't have yet)
Yep
leo