changeset 49331:47f797792311 condy-folding

do DCE for instances of DynamicCallSiteRef too
author vromero
date Mon, 12 Mar 2018 11:40:08 -0400
parents f6a1ff6755b3
children 398f83f17970
files src/jdk.compiler/share/classes/com/sun/tools/javac/util/Constables.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Constables.java	Wed Mar 07 16:34:02 2018 -0500
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Constables.java	Mon Mar 12 11:40:08 2018 -0400
@@ -454,7 +454,8 @@
             boolean canMakeItToConstant = canMakeItToConstantValue(v.type);
             return (constant != null &&
                 (canMakeItToConstant ||
-                    constantRefClass.isInstance(constant)) &&
+                    constantRefClass.isInstance(constant) ||
+                    dynamicCallsiteRefClass.isInstance(constant)) &&
                 v.isLocal() &&
                 v.owner.kind == Kind.MTH &&
                 (v.isFinal() || v.isEffectivelyFinal()));