Here's some stuff we need to add to the packfile format and the sub header to get things ready for more language work.

Packfiles need to have a symbol table. A series of name/type/location tuples so we can have global names that map to values in the bytecode, either variables or subroutines. When the bytecode is loaded, we need to put those symbols in the symbol table and construct the backing PMCs.

Subs need to have some metadata attached to them so we can properly instantiate them. Each sub PMC needs to have attached to it a start & end bytecode address (I know we have start, we need end too) and a pointer to the packfile that it came from (even if we construct it on the fly), and a set of security credentials (which we'll leave empty for now). Possibly other things too, I'm not sure. When we invoke a sub (or closure, or continuation, or whatever) we need to put that packfile pointer and bytecode start/end pointer in place, so constant lookups will find the right tables, line number/filename mappings can work, metadata lookups actually look up, and suchlike things.

There's a bit more, but this is a good start. If people want to bat this around some, we can put together a list in the repository and start getting it implemented.
--
Dan


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

Reply via email to