hg: lambda/lambda/langtools: Implemented features are:
Osvaldo Doederlein
opinali at gmail.com
Fri Jul 30 11:53:37 PDT 2010
2010/7/30 Maurizio Cimadamore <maurizio.cimadamore at oracle.com>:
> On 30/07/10 19:23, Osvaldo Doederlein wrote:
> 2010/7/30 <maurizio.cimadamore at oracle.com>:
>
> *) Effectively final analysis
> Local variables that are never assigned can now be referenced from a lambda
> body.
>
> Slightly offtopic, but... will the effectively-final feature benefit
> exception handling too (final rethrow and multi-catch, both currently
> requiring explicit 'final' declatration of the caught exception
> reference)?
>
> I think this is an interesting suggestion.
> Removing the need for the 'final' in the improved 'rethrow' feature is
> probably worthwhile. On the other hand I don't think that removing final
> from disjunctive type-parameters would be a good idea: the final is there
> because you want to forbid that variable to be re-assigned (note that the
> original proposal was orthogonal to actual support of disjunctive types in
> the type-system).
>
> On the other hand, since now we support even disjunctive types (because of
> exception transparency) I guess we could improve that as well: quoting from
> the original improved try/catch proposal:
One possible approach is: make disjunctive types not only eligible for
effectively-final analysis, but _obligatory_ final. Any attempt to
reassign results in error, and that's it. You're doing that on new
syntax and typing features, so there's no legacy or backwards-compat
issues. The user could still put an explicit 'final', that would be
redundant. Not perfect, but there is plenty precedent in Java for this
kind of redundancy and for qualifiers that are needed in some contexts
but default/obligatory (e.g. 'public' for interface members, or
'final' itself for private methods).
A+
Osvaldo
> " To avoid the need to add support for general disjunctive types, but
> leaving
> open the possibility of a future extension along these lines, a catch
> parameter whose type has more than one disjunct is required to be declared *
> final*."
>
> I guess we will be able to spot more of these inter-feature dependencies as
> we move forward ;-)
>
> Maurizio
>
> A+
> Osvaldo
>
>
>
> *) Removed explicit support for function types
> The option -XDallowFunctionTypes has been removed. As a result, SAM types
> are the only legitimate target types for lambda expressions/method refs.
>
> *) Miscellaneous bug fixes (thanks to Peter Levart for the feedback).
>
> TODO:
>
> *) break/continue/return
>
> ! src/share/classes/com/sun/runtime/ProxyHelper.java
> + src/share/classes/com/sun/source/tree/MemberReferenceTree.java
> ! src/share/classes/com/sun/source/tree/Tree.java
> ! src/share/classes/com/sun/source/tree/TreeVisitor.java
> ! src/share/classes/com/sun/source/util/SimpleTreeVisitor.java
> ! src/share/classes/com/sun/source/util/TreeScanner.java
> ! src/share/classes/com/sun/tools/classfile/ClassTranslator.java
> ! src/share/classes/com/sun/tools/classfile/ClassWriter.java
> ! src/share/classes/com/sun/tools/classfile/ConstantPool.java
> ! src/share/classes/com/sun/tools/classfile/Dependencies.java
> ! src/share/classes/com/sun/tools/javac/code/Flags.java
> ! src/share/classes/com/sun/tools/javac/code/Source.java
> ! src/share/classes/com/sun/tools/javac/code/Type.java
> ! src/share/classes/com/sun/tools/javac/code/Types.java
> ! src/share/classes/com/sun/tools/javac/comp/Attr.java
> ! src/share/classes/com/sun/tools/javac/comp/Check.java
> ! src/share/classes/com/sun/tools/javac/comp/Flow.java
> ! src/share/classes/com/sun/tools/javac/comp/Infer.java
> ! src/share/classes/com/sun/tools/javac/comp/Lower.java
> ! src/share/classes/com/sun/tools/javac/comp/MemberEnter.java
> ! src/share/classes/com/sun/tools/javac/comp/Resolve.java
> ! src/share/classes/com/sun/tools/javac/comp/TransTypes.java
> ! src/share/classes/com/sun/tools/javac/jvm/CRTable.java
> ! src/share/classes/com/sun/tools/javac/jvm/ClassFile.java
> ! src/share/classes/com/sun/tools/javac/jvm/ClassReader.java
> ! src/share/classes/com/sun/tools/javac/jvm/ClassWriter.java
> ! src/share/classes/com/sun/tools/javac/jvm/Code.java
> ! src/share/classes/com/sun/tools/javac/jvm/Gen.java
> ! src/share/classes/com/sun/tools/javac/jvm/Items.java
> ! src/share/classes/com/sun/tools/javac/jvm/Pool.java
> ! src/share/classes/com/sun/tools/javac/jvm/Target.java
> ! src/share/classes/com/sun/tools/javac/parser/JavacParser.java
> ! src/share/classes/com/sun/tools/javac/parser/Scanner.java
> ! src/share/classes/com/sun/tools/javac/resources/compiler.properties
> ! src/share/classes/com/sun/tools/javac/tree/JCTree.java
> ! src/share/classes/com/sun/tools/javac/tree/Pretty.java
> ! src/share/classes/com/sun/tools/javac/tree/TreeCopier.java
> ! src/share/classes/com/sun/tools/javac/tree/TreeInfo.java
> ! src/share/classes/com/sun/tools/javac/tree/TreeMaker.java
> ! src/share/classes/com/sun/tools/javac/tree/TreeScanner.java
> ! src/share/classes/com/sun/tools/javac/tree/TreeTranslator.java
> ! src/share/classes/com/sun/tools/javac/util/Names.java
> ! src/share/classes/com/sun/tools/javap/ConstantWriter.java
> ! test/tools/javac/lambda/BadAccess.java
> ! test/tools/javac/lambda/BadAccess.out
> + test/tools/javac/lambda/BadAccess02.java
> + test/tools/javac/lambda/BadAccess02.out
> ! test/tools/javac/lambda/BadConv01.java
> ! test/tools/javac/lambda/BadConv02.java
> ! test/tools/javac/lambda/FuncType01.java
> ! test/tools/javac/lambda/LambdaConv04.java
> + test/tools/javac/lambda/LambdaConv08.java
> + test/tools/javac/lambda/MethodReference01.java
> + test/tools/javac/lambda/MethodReference02.java
> + test/tools/javac/lambda/MethodReference02.out
> + test/tools/javac/lambda/MethodReference03.java
> + test/tools/javac/lambda/MethodReference04.java
> + test/tools/javac/lambda/MethodReference04.out
> + test/tools/javac/lambda/MethodReference05.java
> + test/tools/javac/lambda/MethodReference05.out
> + test/tools/javac/lambda/MethodReference06.java
> + test/tools/javac/lambda/TargetType07.java
> + test/tools/javac/lambda/TargetType08.java
> + test/tools/javac/lambda/TargetType09.java
>
>
>
>
>
More information about the lambda-dev
mailing list