On Sep 25, 2004, at 11:15 AM, Dan Sugalski wrote:
At 2:10 PM -0400 9/25/04, Chip Salzenberg wrote:According to Dan Sugalski: > Leaf subs and methods can know [their call paths], if we stipulatethat vtable methods are on their own, which is OK with me.
So, given this sub and tied $*var:
sub getvar { my $i = rand; $*var }
the FETCH method implementing $*var might not be able to see $i? Which implies that there may be no pad and $i could be in a register?
Yeah, I think that's OK. I'm certainly OK with it, though there is an appeal to introspection. (Since you might want to fiddle with things in a debugger)
But for a debugging, you'd want to be able to compile with optimizations disabled, so there's no real problem there.
(And also, a clever-enough debugger might be able to let you do by-name manipulations of things stored in registers--you just need to preserve enough information at compile-time, in a form the debugger can use, like a separate symbols file).
JEff