On Fri, Jul 24, 2009 at 9:34 AM, Ola Bini wrote:
> Subramanya Sastry wrote:
>>
>>
>> So, the real question here boils down to the previous one: can we safely
>> determine what local variables are captured by closures? In that sense,
>> this is not a new special case that we need
>
> No, that's not
On Wed, Jul 22, 2009 at 12:11 AM, Subramanya Sastry wrote:
>> So for example, if we know we're doing a call that is likely to access
>> the caller's frame, like "public" or "private", the IR could also
>> include information about preparing a frame or ensuring a frame has
>> already been prepared.
On Fri, Jul 24, 2009 at 9:34 AM, Ola Bini wrote:
> Subramanya Sastry wrote:
>
>>
>>
>> So, the real question here boils down to the previous one: can we safely
>> determine what local variables are captured by closures? In that sense,
>> this is not a new special case that we need
>>
> No, that'
Subramanya Sastry wrote:
So, the real question here boils down to the previous one: can we
safely determine what local variables are captured by closures? In
that sense, this is not a new special case that we need
No, that's not really possible. Seeing as you can do something like this:
de
Thanks for the clarifications subbu...This all makes sense.
More generically I consider ANY variable which a block you potentially
access/manipulate as captured by the block/closure. If you eval in
that block the eval can potentially access any variable it can reach
from the blocks scope. Since
> >
> > Consider this:
> >
> > o.m1(..)
> > o.m2(..)
> >
> > Since type of o hasn't changed between the 2 calls, you can skip the
> method
> > table load for the second call.Anyway, I need to understand the call
> > protocol in greater detail to comment more.
>
> This is an interesting use-case
On Wed, Jul 22, 2009 at 2:11 PM, Subramanya Sastry wrote:
>
>
>> Obviously the IR already captures whether a closure accesses its own
>> variables or captured variables, right?
>
> Implicitly yes. This information will become explicit after reaching defs /
> live variable analysis is done to know
Obviously the IR already captures whether a closure accesses its own
> variables or captured variables, right?
Implicitly yes. This information will become explicit after reaching defs /
live variable analysis is done to know whether the variables being access
live entirely within the closure bo
Subbu: I figured I'd move IR discussions to the dev list, so others
can jump in as needed. Reply to the list...
I had a few more thoughts on missing IR we probably want to
incorporate somehow: framing and scoping stuff.
Obviously the IR already captures whether a closure accesses its own
variable