Leopold Toetsch <[EMAIL PROTECTED]> writes: > Piers Cawley <[EMAIL PROTECTED]> wrote: > >> Then, at runtime, 'fred' gets set up as the implemntation for an op. > >> Which, given your implementation, means that each function call that >> fred makes should be protected with savetop/restoretop pairs. Oops. > > The implementation checks register usage of the called sub at *runtime*, > or more precisely at first invocation of the sub and caches the value. > It would need a notification (similar to the method cache), if the sub > got recompiled.
Who's talking about recompiling. I'm talking about fred being registered as the handler for some op at runtime. ISTM that, either fred has to get recompiled (assuming the source is kicking about) so that every function call it makes is guarded with a saveall, or you *always* do a saveall as you call fred so that the compiled in, optimized saves will continue to work. With the fingerprint approach I outlined, one can at least avoid the saveall in some cases.