hg: amber/amber/langtools: treating Intrinsics ldc as a poly signature method
vicente.romero at oracle.com
vicente.romero at oracle.com
Fri Aug 25 16:30:28 UTC 2017
Changeset: c791e4e04c3d
Author: vromero
Date: 2017-08-25 12:28 -0400
URL: http://hg.openjdk.java.net/amber/amber/langtools/rev/c791e4e04c3d
treating Intrinsics ldc as a poly signature method
this patch also adds to the already existing infrastructure for special constants
a method to duplicate a special constant was added, it is a 'soft' duplication in
the sense that it doesn't clone the content, only the container is duplicated
another method added allows replacing an existing value by a new one.
The criteria for equality is equality of references.
Special constants can contain primitives and Strings but those are wrapped inside the
special constant. If a particular code in the compiler tries to access the intrinsic
value of a constant, if any, then a difference should be made between an 'actual' accessible
value and one that is only accessible at run time, condy, for this reason the method hasIntrisicValue
was added to SpecialConstants, it was added in a previous patch though
! 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/ConstFold.java
! src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java
! src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Items.java
! src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Pool.java
! src/jdk.compiler/share/classes/com/sun/tools/javac/util/SpecialConstantUtils.java
! test/tools/javac/specialConstantFolding/CondyCodeGenerationTest.java
More information about the amber-dev
mailing list