changeset 2254:f2da85a9b08e

7001363: java/dyn/InvokeDynamic should not be a well-known class in the JVM Summary: Because of the removal of language support, the JDK 7 API for JSR 292 no longer includes a public class named java/dyn/InvokeDynamic. Reviewed-by: jrose, kvn
author twisti
date Tue, 30 Nov 2010 09:53:04 -0800
parents f95d63e2154a
children dbbf44db0107
files src/share/vm/classfile/systemDictionary.cpp src/share/vm/classfile/systemDictionary.hpp src/share/vm/prims/methodHandleWalk.cpp src/share/vm/prims/methodHandleWalk.hpp src/share/vm/prims/methodHandles.cpp src/share/vm/runtime/thread.cpp
diffstat 6 files changed, 8 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/classfile/systemDictionary.cpp	Tue Nov 23 13:22:55 2010 -0800
+++ b/src/share/vm/classfile/systemDictionary.cpp	Tue Nov 30 09:53:04 2010 -0800
@@ -2010,7 +2010,7 @@
     scan = WKID(meth_group_end+1);
   }
   WKID indy_group_start = WK_KLASS_ENUM_NAME(Linkage_klass);
-  WKID indy_group_end   = WK_KLASS_ENUM_NAME(InvokeDynamic_klass);
+  WKID indy_group_end   = WK_KLASS_ENUM_NAME(CallSite_klass);
   initialize_wk_klasses_until(indy_group_start, scan, CHECK);
   if (EnableInvokeDynamic) {
     initialize_wk_klasses_through(indy_group_end, scan, CHECK);
--- a/src/share/vm/classfile/systemDictionary.hpp	Tue Nov 23 13:22:55 2010 -0800
+++ b/src/share/vm/classfile/systemDictionary.hpp	Tue Nov 30 09:53:04 2010 -0800
@@ -156,8 +156,7 @@
   template(WrongMethodTypeException_klass, java_dyn_WrongMethodTypeException, Opt) \
   template(Linkage_klass,                java_dyn_Linkage,               Opt) \
   template(CallSite_klass,               java_dyn_CallSite,              Opt) \
-  template(InvokeDynamic_klass,          java_dyn_InvokeDynamic,         Opt) \
-  /* Note: MethodHandle must be first, and InvokeDynamic last in group */     \
+  /* Note: MethodHandle must be first, and CallSite last in group */          \
                                                                               \
   template(StringBuffer_klass,           java_lang_StringBuffer,         Pre) \
   template(StringBuilder_klass,          java_lang_StringBuilder,        Pre) \
--- a/src/share/vm/prims/methodHandleWalk.cpp	Tue Nov 23 13:22:55 2010 -0800
+++ b/src/share/vm/prims/methodHandleWalk.cpp	Tue Nov 30 09:53:04 2010 -0800
@@ -968,16 +968,11 @@
 
   if (tailcall) {
     // Actually, in order to make these methods more recognizable,
-    // let's put them in holder classes MethodHandle and InvokeDynamic.
-    // That way stack walkers and compiler heuristics can recognize them.
-    _target_klass = (for_invokedynamic()
-                     ? SystemDictionary::InvokeDynamic_klass()
-                     : SystemDictionary::MethodHandle_klass());
+    // let's put them in holder class MethodHandle.  That way stack
+    // walkers and compiler heuristics can recognize them.
+    _target_klass = SystemDictionary::MethodHandle_klass();
   }
 
-  // instanceKlass* ik = instanceKlass::cast(klass);
-  // tty->print_cr("MethodHandleCompiler::make_invoke: %s %s.%s%s", Bytecodes::name(op), ik->external_name(), name->as_C_string(), signature->as_C_string());
-
   // Inline the method.
   InvocationCounter* ic = m->invocation_counter();
   ic->set_carry_flag();
--- a/src/share/vm/prims/methodHandleWalk.hpp	Tue Nov 23 13:22:55 2010 -0800
+++ b/src/share/vm/prims/methodHandleWalk.hpp	Tue Nov 30 09:53:04 2010 -0800
@@ -412,8 +412,7 @@
 
   // Tests if the given class is a MH adapter holder.
   static bool klass_is_method_handle_adapter_holder(klassOop klass) {
-    return (klass == SystemDictionary::MethodHandle_klass() ||
-            klass == SystemDictionary::InvokeDynamic_klass());
+    return (klass == SystemDictionary::MethodHandle_klass());
   }
 };
 
--- a/src/share/vm/prims/methodHandles.cpp	Tue Nov 23 13:22:55 2010 -0800
+++ b/src/share/vm/prims/methodHandles.cpp	Tue Nov 30 09:53:04 2010 -0800
@@ -485,9 +485,8 @@
   Handle polymorphic_method_type;
   bool polymorphic_signature = false;
   if ((flags & ALL_KINDS) == IS_METHOD &&
-      (defc() == SystemDictionary::InvokeDynamic_klass() ||
-       (defc() == SystemDictionary::MethodHandle_klass() &&
-        methodOopDesc::is_method_handle_invoke_name(name()))))
+      (defc() == SystemDictionary::MethodHandle_klass() &&
+       methodOopDesc::is_method_handle_invoke_name(name())))
     polymorphic_signature = true;
 
   // convert the external string or reflective type to an internal signature
--- a/src/share/vm/runtime/thread.cpp	Tue Nov 23 13:22:55 2010 -0800
+++ b/src/share/vm/runtime/thread.cpp	Tue Nov 30 09:53:04 2010 -0800
@@ -3232,12 +3232,6 @@
       warning("java.lang.ArithmeticException has not been initialized");
       warning("java.lang.StackOverflowError has not been initialized");
     }
-
-    if (EnableInvokeDynamic) {
-      // JSR 292: An intialized java.dyn.InvokeDynamic is required in
-      // the compiler.
-      initialize_class(vmSymbolHandles::java_dyn_InvokeDynamic(), CHECK_0);
-    }
   }
 
   // See        : bugid 4211085.