hg: valhalla/valhalla: Scanner, parser, semantic analysis and attribution support for value types

Srikanth srikanth.adayapalam at oracle.com
Mon Feb 5 10:58:09 UTC 2018



On Monday 05 February 2018 04:11 PM, srikanth.adayapalam at oracle.com wrote:
> Changeset: 59af66a8c1be
> Author:    sadayapalam
> Date:      2018-02-05 16:07 +0530
> URL:       http://hg.openjdk.java.net/valhalla/valhalla/rev/59af66a8c1be
>
> Scanner, parser, semantic analysis and attribution support for value types

Notes:

     - Reversed the inadvertent push to "exp" branch and pushed an 
equivalent change set to lworld branch
     - This implements scanner, parser, semantic analysis and 
attribution support in Javac for value types
     - I have eliminated all the code in java.lang.__Value leaving just 
the skeleton of this as a (non-value) class. Removing it altogether is 
possible only after JVM and JDK purge all references to __Value.
      - There is one langtools test that is failing 
(tools/jdeprscan/tests/jdk/jdeprscan/TestRelease.java): I didn't invest 
time in this failure as it has to do with j.l.__Value. Once this type is 
completely purged, the test should be green (I think)
     - No code generation support yet.

Follow ups:

     - To align javac's treatment of null assignment to values, casting 
null to values and null comparison against values with the latest 
decisions of EG.
     - Determine javac's behavior for == and != operator with at least 
one statically discernible value instance operand (at present results in 
a compile time error)

Thanks!
Srikanth






>
> ! src/java.base/share/classes/java/lang/__Value.java
> ! src/java.compiler/share/classes/javax/lang/model/element/Modifier.java
> ! src/jdk.compiler/share/classes/com/sun/tools/javac/code/Flags.java
> ! src/jdk.compiler/share/classes/com/sun/tools/javac/code/Lint.java
> ! src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java
> ! src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java
> ! src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symtab.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/Check.java
> ! src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java
> ! src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java
> - src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ValueCapableClassAttr.java
> ! src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ByteCodes.java
> ! src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java
> ! src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassWriter.java
> ! src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Code.java
> ! src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.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
> ! src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties
> ! src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties
> ! src/jdk.compiler/share/classes/com/sun/tools/javac/util/Names.java
> ! test/langtools/tools/javac/diags/CheckResourceKeys.java
> ! test/langtools/tools/javac/diags/examples.not-yet.txt
> - test/langtools/tools/javac/diags/examples/ValueTypesDisabled.java
> + test/langtools/tools/javac/diags/examples/ValuesNotSupported.java
> + test/langtools/tools/javac/valhalla/lworld-values/CheckClone.java
> + test/langtools/tools/javac/valhalla/lworld-values/CheckClone.out
> + test/langtools/tools/javac/valhalla/lworld-values/CheckCyclicMembership.java
> + test/langtools/tools/javac/valhalla/lworld-values/CheckCyclicMembership.out
> + test/langtools/tools/javac/valhalla/lworld-values/CheckEquals.java
> + test/langtools/tools/javac/valhalla/lworld-values/CheckEquals.out
> + test/langtools/tools/javac/valhalla/lworld-values/CheckExtends.java
> + test/langtools/tools/javac/valhalla/lworld-values/CheckExtends.out
> + test/langtools/tools/javac/valhalla/lworld-values/CheckFinal.java
> + test/langtools/tools/javac/valhalla/lworld-values/CheckFinal.out
> + test/langtools/tools/javac/valhalla/lworld-values/CheckFinalize.java
> + test/langtools/tools/javac/valhalla/lworld-values/CheckFinalize.out
> + test/langtools/tools/javac/valhalla/lworld-values/CheckIdentityHash.java
> + test/langtools/tools/javac/valhalla/lworld-values/CheckIdentityHash.out
> + test/langtools/tools/javac/valhalla/lworld-values/CheckIdentityHash01.java
> + test/langtools/tools/javac/valhalla/lworld-values/CheckIdentityHash01.out
> + 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/CheckNullAssign.java
> + test/langtools/tools/javac/valhalla/lworld-values/CheckNullAssign.out
> + test/langtools/tools/javac/valhalla/lworld-values/CheckNullCastable.java
> + test/langtools/tools/javac/valhalla/lworld-values/CheckNullCastable.out
> + 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/CheckSuperCompileOnly.java
> + test/langtools/tools/javac/valhalla/lworld-values/CheckSync.java
> + test/langtools/tools/javac/valhalla/lworld-values/CheckSync.out
> + test/langtools/tools/javac/valhalla/lworld-values/CheckSynchronized.java
> + test/langtools/tools/javac/valhalla/lworld-values/CheckSynchronized.out
> + test/langtools/tools/javac/valhalla/lworld-values/CheckValueFactoryWithReference.java
> + test/langtools/tools/javac/valhalla/lworld-values/CheckValueFactoryWithReference.out
> + test/langtools/tools/javac/valhalla/lworld-values/CheckValueModifier.java
> + test/langtools/tools/javac/valhalla/lworld-values/CheckValueModifier.out
> + test/langtools/tools/javac/valhalla/lworld-values/Point.java
> - test/langtools/tools/javac/valhalla/minimalvalues/CheckClone.java
> - test/langtools/tools/javac/valhalla/minimalvalues/CheckClone.out
> - test/langtools/tools/javac/valhalla/minimalvalues/CheckCyclicMembership.java
> - test/langtools/tools/javac/valhalla/minimalvalues/CheckCyclicMembership.out
> - test/langtools/tools/javac/valhalla/minimalvalues/CheckEquals.java
> - test/langtools/tools/javac/valhalla/minimalvalues/CheckEquals.out
> - test/langtools/tools/javac/valhalla/minimalvalues/CheckExtends.java
> - test/langtools/tools/javac/valhalla/minimalvalues/CheckExtends.out
> - test/langtools/tools/javac/valhalla/minimalvalues/CheckFinal.java
> - test/langtools/tools/javac/valhalla/minimalvalues/CheckFinal.out
> - test/langtools/tools/javac/valhalla/minimalvalues/CheckFinalize.java
> - test/langtools/tools/javac/valhalla/minimalvalues/CheckFinalize.out
> - test/langtools/tools/javac/valhalla/minimalvalues/CheckIdentityHash.java
> - test/langtools/tools/javac/valhalla/minimalvalues/CheckIdentityHash.out
> - test/langtools/tools/javac/valhalla/minimalvalues/CheckIdentityHash01.java
> - test/langtools/tools/javac/valhalla/minimalvalues/CheckIdentityHash01.out
> - test/langtools/tools/javac/valhalla/minimalvalues/CheckNullAssign.java
> - test/langtools/tools/javac/valhalla/minimalvalues/CheckNullAssign.out
> - test/langtools/tools/javac/valhalla/minimalvalues/CheckNullCastable.java
> - test/langtools/tools/javac/valhalla/minimalvalues/CheckNullCastable.out
> - test/langtools/tools/javac/valhalla/minimalvalues/CheckSync.java
> - test/langtools/tools/javac/valhalla/minimalvalues/CheckSync.out
> - test/langtools/tools/javac/valhalla/minimalvalues/CheckSynchronized.java
> - test/langtools/tools/javac/valhalla/minimalvalues/CheckSynchronized.out
> - test/langtools/tools/javac/valhalla/minimalvalues/ClassFileReaderTest.java
> - test/langtools/tools/javac/valhalla/minimalvalues/ClassFileReaderTest.out
> - test/langtools/tools/javac/valhalla/minimalvalues/Point.java
> - test/langtools/tools/javac/valhalla/values/CheckClone.java
> - test/langtools/tools/javac/valhalla/values/CheckClone.out
> - test/langtools/tools/javac/valhalla/values/CheckCyclicMembership.java
> - test/langtools/tools/javac/valhalla/values/CheckCyclicMembership.out
> - test/langtools/tools/javac/valhalla/values/CheckEquals.java
> - test/langtools/tools/javac/valhalla/values/CheckEquals.out
> - test/langtools/tools/javac/valhalla/values/CheckExtends.java
> - test/langtools/tools/javac/valhalla/values/CheckExtends.out
> - test/langtools/tools/javac/valhalla/values/CheckFinal.java
> - test/langtools/tools/javac/valhalla/values/CheckFinal.out
> - test/langtools/tools/javac/valhalla/values/CheckFinalize.java
> - test/langtools/tools/javac/valhalla/values/CheckFinalize.out
> - test/langtools/tools/javac/valhalla/values/CheckFlags.java
> - test/langtools/tools/javac/valhalla/values/CheckIdentityHash.java
> - test/langtools/tools/javac/valhalla/values/CheckIdentityHash.out
> - test/langtools/tools/javac/valhalla/values/CheckIdentityHash01.java
> - test/langtools/tools/javac/valhalla/values/CheckIdentityHash01.out
> - test/langtools/tools/javac/valhalla/values/CheckInner.java
> - test/langtools/tools/javac/valhalla/values/CheckMakeDefault.java
> - test/langtools/tools/javac/valhalla/values/CheckMakeDefault.out
> - test/langtools/tools/javac/valhalla/values/CheckNoInvokeDirect.java
> - test/langtools/tools/javac/valhalla/values/CheckNullAssign.java
> - test/langtools/tools/javac/valhalla/values/CheckNullAssign.out
> - test/langtools/tools/javac/valhalla/values/CheckNullCastable.java
> - test/langtools/tools/javac/valhalla/values/CheckNullCastable.out
> - test/langtools/tools/javac/valhalla/values/CheckStaticValueFactory.java
> - test/langtools/tools/javac/valhalla/values/CheckStaticValueFactory.out
> - test/langtools/tools/javac/valhalla/values/CheckSuper.java
> - test/langtools/tools/javac/valhalla/values/CheckSuperCompileOnly.java
> - test/langtools/tools/javac/valhalla/values/CheckSync.java
> - test/langtools/tools/javac/valhalla/values/CheckSync.out
> - test/langtools/tools/javac/valhalla/values/CheckSynchronized.java
> - test/langtools/tools/javac/valhalla/values/CheckSynchronized.out
> - test/langtools/tools/javac/valhalla/values/CheckValueFactoryWithReference.java
> - test/langtools/tools/javac/valhalla/values/CheckValueFactoryWithReference.out
> - test/langtools/tools/javac/valhalla/values/CheckValueModifier.java
> - test/langtools/tools/javac/valhalla/values/CheckValueModifier.out
> - test/langtools/tools/javac/valhalla/values/Point.java
> - test/langtools/tools/javac/valhalla/values/VOpcodeTest.java
> - test/langtools/tools/javac/valhalla/values/ValueCreationTest.java
> - test/langtools/tools/javac/valhalla/values/WideOpcodeTest.java
>



More information about the valhalla-dev mailing list