[bitc-dev] CLEANUP: pragmatics of closure conversion
Swaroop Sridhar
swaroop at cs.jhu.edu
Fri Jul 18 14:24:45 CDT 2008
Swaroop Sridhar wrote:
> Jonathan S. Shapiro wrote:
>> Rules: Given a lambda form L and some /id/ that is free in L:
>>
>> PHASE I: INITIAL CLOSURE CONSTRUCTION
>>
>> 1. If /id/ resolves to a globally defined identifier, stop. No
>> globally resolved identifier is ever inserted into a closure
>> record.
>> 2. If /id/ is locally bound:
>> A. if /id/ is mutable, it must be heap-converted, and the reference
>> to the heap-converted object must be included in the closure
>> record.
>
> Just to be super-precise, the /id/ must be heap converted only if it is
> shallowly mutable. If the mutability is within a reference in the value
> denoted by /id/ right?
Sorry, I meant to write: ``If the mutability is contained within a
reference in the value denoted by /id/, then it need not be heap
converted. right?''
Swaroop.
More information about the bitc-dev
mailing list