On Oct 21, 2004, at 4:13 AM, Leopold Toetsch wrote:

Jeff Clites <[EMAIL PROTECTED]> wrote:
On Oct 20, 2004, at 11:24 PM, Leopold Toetsch wrote:

And of course, lexicals and globals already have a storage, you don't
need to spill them.

I'm not sure that's true.

It should read: if there are lexical or global opcodes, lexicals and globals have a storage.

Ah yes, true.

tied namespaces and such, it may not be legitimate to re-fetch a global
(ie, to fetch it multiple times, if the code appears to only fetch it
once) -- one could pathologically have a global whose value appears to
increase each time it's fetched,

Then there's something horribly wrong with that usage of tie: not the value is refetched from the var - the var is refetched from the namespace.

I think there'll be two types of tie--tied variables (like Perl has already), and tied namespaces (as supposedly some people really need, though I don't fully know why). But even without the above pathological case: with tied namespaces, a namespace fetch potentially has unknown overhead, and a compiler can't know if re-fetching is better than spilling. But on the other hand, maybe that's just part of the deal with tied namespaces--they may be fetched from more often than the code would imply, so the tied namespace needs to be prepared for that.


JEff



Reply via email to