On Mon, Sep 15, 2003 at 03:30:06PM -0600, Luke Palmer wrote:The focus here, I think, is the following problem class:
sub twenty_five() { 25 } # Optimized to inline sub foo() { print twenty_five; # Inlined &twenty_five := { 36 }; print twenty_five; # Uh oh, inlined from before }
The problem is we need to somehow un-optimize while we're running. That is most likely a very very hard thing to do, so another solution is probably needed.
A naive approach would be to cache the names and positions of things that are optimized such that when one of the cached things are modified, the optimization could be replaced with either another optimization (as in the case above) or an instruction to execute some other code (when we can't optimize the change).
That doesn't work in the face of code motion, reordering, or simplification, unfortunately. :(
--
Dan
--------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk