Melvin Smith <[EMAIL PROTECTED]> wrote:
> op invoke(STR, INT) > PMC sub > if($2 == 0) { > sub = lookup $1 > $2 = sub # store the ref in the immediate data of the instruction
This doesn't really work: - byte-code is readonly, if mmap()ed and when running function core or CGoto
It doesn't have to be. Neither mmap() nor computed goto requires the bytecode to be readonly. Also it should be possible to execute readonly bytecode and detect when we are doing so.
- for prederefed cores, the assign instruction needs predereferencing - doesn't work with JIT
True.
- There is no means to invalidate the sub, when something changed.
See the other comment in the original message where I mentioned storing a "slot" number instead of the PMC itself. The slot can be a pointer to a method cache. A method cache can be known to the GC.
Also, invalidating PMCs can happen via event queues so it doesn't really matter where the PMC is stored.
That aside, I still think it is not worth committing since it is only a syntactical shortcut, and may actually obfuscate things.
-Melvin