hg: valhalla/valhalla/langtools: Enhancement: add support for abstract peels in methods

maurizio.cimadamore at oracle.com maurizio.cimadamore at oracle.com
Tue Nov 24 13:14:16 UTC 2015


Changeset: 85d6aa1e1c79
Author:    mcimadamore
Date:      2015-11-24 13:13 +0000
URL:       http://hg.openjdk.java.net/valhalla/valhalla/langtools/rev/85d6aa1e1c79

Enhancement: add support for abstract peels in methods

Example:

    interface Foo<any X> {
        void m() {
            __WhereRef(X) { System.out.println("Hello!"); }
            __WhereVal(X) abstract
        }
    }

    class SubRef implements Foo<String> { } //ok
    class SubVal implements Foo<int> { } //error

! src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java
! src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java
! src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java
! src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java
! src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java
! src/jdk.compiler/share/classes/com/sun/tools/javac/comp/MemberEnter.java
! src/jdk.compiler/share/classes/com/sun/tools/javac/comp/SpecializeTypes.java
! src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassWriter.java
! src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Items.java
! src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java
+ test/tools/javac/valhalla/typespec/AbstractPeel01.java
+ test/tools/javac/valhalla/typespec/AbstractPeel02.java
+ test/tools/javac/valhalla/typespec/AbstractPeel02.out
+ test/tools/javac/valhalla/typespec/AbstractPeel03.java
+ test/tools/javac/valhalla/typespec/AbstractPeel03.out
+ test/tools/javac/valhalla/typespec/TestRefOnly10.java
+ test/tools/javac/valhalla/typespec/TestRefOnly10.out
! test/tools/javac/valhalla/typespec/items/tests/TestValOnly.java



More information about the valhalla-dev mailing list