hg: amber/amber/langtools: add the hasIntrinsicConstValue predicate to Type

vicente.romero at oracle.com vicente.romero at oracle.com
Fri Aug 25 15:44:04 UTC 2017

Changeset: 02be4bd2f363
Author:    vromero
Date:      2017-08-25 11:41 -0400
URL:       http://hg.openjdk.java.net/amber/amber/langtools/rev/02be4bd2f363

add the hasIntrinsicConstValue predicate to Type
there is a common pattern in the compiler which is: type.constValue == or != null
must of the time this corresponds to the more complex question:
does this type has an associated constant that can be folded?
with the advent of constables, it is more complicated to answer to this question
so the need of the new predicate

! 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/Check.java
! src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ConstFold.java
! src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java
! src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java

More information about the amber-dev mailing list