hg: valhalla/valhalla: 8197792: Allow updates to instance fields of value types via withfield by any method in the same nest (original) (raw)

Srikanth srikanth.adayapalam at oracle.com
Tue Feb 20 07:23:58 UTC 2018


On Tuesday 20 February 2018 12:33 PM, srikanth.adayapalam at oracle.com wrote:

Changeset: f039363534f3 Author: sadayapalam Date: 2018-02-20 12:28 +0530 URL: http://hg.openjdk.java.net/valhalla/valhalla/rev/f039363534f3

8197792: Allow updates to instance fields of value types via withfield by any method in the same nest

Notes:

    - This commit gets rid of all traces of the erstwhile static value factory mechanism (__ValueFactory modifier carried over from the VVT prototype)     - Now __MakeDefault can be invoked anywhere - not just in the (no longer extant) value factories.     - Updates to instance fields of value classes can occur from any method in the same nest and would be lowered using withfield     - As of this commit, javac does not handle some complicate cases of field updates - it is statically enforced that the field being updated with withfield is a member of a value instance that is a local variable. (see JDK-8198408 for follow up)

Thanks! Srikanth

! src/jdk.compiler/share/classes/com/sun/tools/javac/code/Flags.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/jvm/Gen.java ! src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java ! src/jdk.compiler/share/classes/com/sun/tools/javac/parser/Tokens.java ! src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties ! src/jdk.jshell/share/classes/jdk/jshell/CompletenessAnalyzer.java ! test/langtools/tools/javac/diags/examples.not-yet.txt ! test/langtools/tools/javac/valhalla/lworld-values/CheckMakeDefault.java ! test/langtools/tools/javac/valhalla/lworld-values/CheckMakeDefault.out - test/langtools/tools/javac/valhalla/lworld-values/CheckStaticFactoryNonValueClass.java - test/langtools/tools/javac/valhalla/lworld-values/CheckStaticFactoryNonValueClass.out ! test/langtools/tools/javac/valhalla/lworld-values/CheckStaticFinalAssign.java - test/langtools/tools/javac/valhalla/lworld-values/CheckStaticValueFactory.java - test/langtools/tools/javac/valhalla/lworld-values/CheckStaticValueFactory.out ! test/langtools/tools/javac/valhalla/lworld-values/Point.java ! test/langtools/tools/javac/valhalla/lworld-values/ValueCreationTest.java + test/langtools/tools/javac/valhalla/lworld-values/WithFieldNegativeTests.java + test/langtools/tools/javac/valhalla/lworld-values/WithFieldNegativeTests.out



More information about the valhalla-dev mailing list