Automatic Resource Management, V.2

Rémi Forax forax at
Tue Apr 21 09:12:07 PDT 2009

Neal Gafter a écrit :
> On Tue, Apr 21, 2009 at 8:34 AM, Joshua Bloch <jjb at> wrote:
>> Yes, this is the situation that Bruce Chapman pointed out earlier.  As a
>> practical matter, I suspect that resources will have rather simple types,
>> but still the spec does have to cover this situation.  If you have a good
>> solution, feel free to share.  Otherwise, hang on, and we'll see what we can
>> come up with.
> In the LocalVariableTypeTable, conjunctive types should be simple to add.
> Recursive types can be handled by introducing backreferences.
> You can probably avoid this mess by being explicit about the specification
> rather than attempting the "as-if" rewriting.  If a construct like this is
> to be integrated into the JLS that would probably be required anyway, and a
> new set of issues is likely to be exposed by the attempt.  It would be
> better to get the specification wrung out earlier rather than later (I don't
> think Alex will be eager to do it himself).
Why the local var need to be visible in these tables ?

The compiler already introduced new local var , by example, in case of 
++/-- and
compound assignments on boxed type (using the hidden instruction LetExpr).
In that case the local var is flagged SYNTHETIC and doesn't appear in 
local vars tables.


More information about the coin-dev mailing list