changeset 47875:9305c327eef9 condy-folding

Automatic merge with condy
author mcimadamore
date Thu, 09 Nov 2017 23:09:58 +0100
parents b0a87962f22e 82b444bd14e9
children 8c7655ebae35
files
diffstat 4 files changed, 12 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/runtime/globals.hpp	Tue Nov 07 11:52:56 2017 +0100
+++ b/src/hotspot/share/runtime/globals.hpp	Thu Nov 09 23:09:58 2017 +0100
@@ -3947,9 +3947,6 @@
   develop(bool, TraceInvokeDynamic, false,                                  \
           "trace internal invoke dynamic operations")                       \
                                                                             \
-  develop(bool, TraceDynamicConstants, false,                               \
-          "trace internal dynamic computed constant operations")            \
-                                                                            \
   diagnostic(int, UseBootstrapCallInfo, 1,                                  \
           "0: when resolving InDy or ConDy, force all BSM arguments to be " \
           "resolved before the bootstrap method is called; 1: when a BSM "  \
--- a/src/hotspot/share/runtime/reflection.cpp	Tue Nov 07 11:52:56 2017 +0100
+++ b/src/hotspot/share/runtime/reflection.cpp	Thu Nov 09 23:09:58 2017 +0100
@@ -765,15 +765,19 @@
 static oop get_mirror_from_signature(const methodHandle& method,
                                      SignatureStream* ss,
                                      TRAPS) {
-  oop mirror_oop = ss->as_java_mirror(method->method_holder(), SignatureStream::NCDFError, CHECK_NULL);
+  Klass* accessing_klass = method->method_holder();
+  assert(accessing_klass != NULL, "method has no accessing_klass");
+
+  oop mirror_oop = ss->as_java_mirror(Handle(THREAD, accessing_klass->class_loader()),
+                                      Handle(THREAD, accessing_klass->protection_domain()),
+                                      SignatureStream::NCDFError,
+                                      CHECK_NULL);
 
   // Special tracing logic for resolution of class names during reflection.
   if (log_is_enabled(Debug, class, resolve)) {
-    Klass* k = java_lang_Class::as_Klass(mirror_oop);
-    if (k != NULL)  {
-      mirror_oop = NULL;
-      trace_class_resolution(k);
-      mirror_oop = k->java_mirror();
+    Klass* result = java_lang_Class::as_Klass(mirror_oop);
+    if (result != NULL) {
+      trace_class_resolution(result);
     }
   }
 
--- a/src/hotspot/share/runtime/signature.hpp	Tue Nov 07 11:52:56 2017 +0100
+++ b/src/hotspot/share/runtime/signature.hpp	Thu Nov 09 23:09:58 2017 +0100
@@ -406,15 +406,6 @@
   enum FailureMode { ReturnNull, CNFException, NCDFError };
   Klass* as_klass(Handle class_loader, Handle protection_domain, FailureMode failure_mode, TRAPS);
   oop as_java_mirror(Handle class_loader, Handle protection_domain, FailureMode failure_mode, TRAPS);
-  oop as_java_mirror(Klass* accessing_klass, FailureMode failure_mode, TRAPS) {
-    Handle class_loader;
-    Handle protection_domain;
-    if (accessing_klass != NULL) {
-      class_loader      = Handle(THREAD, accessing_klass->class_loader());
-      protection_domain = Handle(THREAD, accessing_klass->protection_domain());
-    }
-    return as_java_mirror(class_loader, protection_domain, failure_mode, THREAD);
-  }
   const jbyte* raw_bytes()  { return _signature->bytes() + _begin; }
   int          raw_length() { return _end - _begin; }
 
--- a/src/hotspot/share/utilities/constantTag.cpp	Tue Nov 07 11:52:56 2017 +0100
+++ b/src/hotspot/share/utilities/constantTag.cpp	Thu Nov 09 23:09:58 2017 +0100
@@ -134,6 +134,8 @@
       return "MethodType Error";
     case JVM_CONSTANT_Dynamic :
       return "Dynamic";
+    case JVM_CONSTANT_DynamicInError :
+      return "Dynamic Error";
     case JVM_CONSTANT_InvokeDynamic :
       return "InvokeDynamic";
     case JVM_CONSTANT_Utf8 :