8025632: Remove all references to MagicLambdaImpl from Hotspot
Summary: MagicLambdaImpl was removed from jdk side, this should be done in vm side too
Reviewed-by: coleenp, hseigel, rdurbin
--- a/hotspot/src/share/vm/classfile/systemDictionary.hpp Wed Nov 13 07:31:26 2013 -0800
+++ b/hotspot/src/share/vm/classfile/systemDictionary.hpp Wed Nov 13 16:24:33 2013 -0800
@@ -141,7 +141,6 @@
/* NOTE: needed too early in bootstrapping process to have checks based on JDK version */ \
/* Universe::is_gte_jdk14x_version() is not set up by this point. */ \
/* It's okay if this turns out to be NULL in non-1.4 JDKs. */ \
- do_klass(lambda_MagicLambdaImpl_klass, java_lang_invoke_MagicLambdaImpl, Opt ) \
do_klass(reflect_MagicAccessorImpl_klass, sun_reflect_MagicAccessorImpl, Opt ) \
do_klass(reflect_MethodAccessorImpl_klass, sun_reflect_MethodAccessorImpl, Opt_Only_JDK14NewRef) \
do_klass(reflect_ConstructorAccessorImpl_klass, sun_reflect_ConstructorAccessorImpl, Opt_Only_JDK14NewRef) \
--- a/hotspot/src/share/vm/classfile/verifier.cpp Wed Nov 13 07:31:26 2013 -0800
+++ b/hotspot/src/share/vm/classfile/verifier.cpp Wed Nov 13 16:24:33 2013 -0800
@@ -188,10 +188,8 @@
bool Verifier::is_eligible_for_verification(instanceKlassHandle klass, bool should_verify_class) {
Symbol* name = klass->name();
Klass* refl_magic_klass = SystemDictionary::reflect_MagicAccessorImpl_klass();
- Klass* lambda_magic_klass = SystemDictionary::lambda_MagicLambdaImpl_klass();
bool is_reflect = refl_magic_klass != NULL && klass->is_subtype_of(refl_magic_klass);
- bool is_lambda = lambda_magic_klass != NULL && klass->is_subtype_of(lambda_magic_klass);
return (should_verify_for(klass->class_loader(), should_verify_class) &&
// return if the class is a bootstrapping class
@@ -215,9 +213,7 @@
// NOTE: this is called too early in the bootstrapping process to be
// guarded by Universe::is_gte_jdk14x_version()/UseNewReflection.
// Also for lambda generated code, gte jdk8
- (!is_reflect || VerifyReflectionBytecodes) &&
- (!is_lambda || VerifyLambdaBytecodes)
- );
+ (!is_reflect || VerifyReflectionBytecodes));
}
Symbol* Verifier::inference_verify(
--- a/hotspot/src/share/vm/classfile/vmSymbols.hpp Wed Nov 13 07:31:26 2013 -0800
+++ b/hotspot/src/share/vm/classfile/vmSymbols.hpp Wed Nov 13 16:24:33 2013 -0800
@@ -273,7 +273,6 @@
template(java_lang_invoke_Stable_signature, "Ljava/lang/invoke/Stable;") \
template(java_lang_invoke_LambdaForm_Compiled_signature, "Ljava/lang/invoke/LambdaForm$Compiled;") \
template(java_lang_invoke_LambdaForm_Hidden_signature, "Ljava/lang/invoke/LambdaForm$Hidden;") \
- template(java_lang_invoke_MagicLambdaImpl, "java/lang/invoke/MagicLambdaImpl") \
/* internal up-calls made only by the JVM, via class sun.invoke.MethodHandleNatives: */ \
template(findMethodHandleType_name, "findMethodHandleType") \
template(findMethodHandleType_signature, "(Ljava/lang/Class;[Ljava/lang/Class;)Ljava/lang/invoke/MethodType;") \
--- a/hotspot/src/share/vm/runtime/globals.hpp Wed Nov 13 07:31:26 2013 -0800
+++ b/hotspot/src/share/vm/runtime/globals.hpp Wed Nov 13 16:24:33 2013 -0800
@@ -3622,9 +3622,6 @@
"Temporary flag for transition to AbstractMethodError wrapped " \
"in InvocationTargetException. See 6531596") \
\
- develop(bool, VerifyLambdaBytecodes, false, \
- "Force verification of jdk 8 lambda metafactory bytecodes") \
- \
develop(intx, FastSuperclassLimit, 8, \
"Depth of hardwired instanceof accelerator array") \
\
--- a/hotspot/src/share/vm/runtime/reflection.cpp Wed Nov 13 07:31:26 2013 -0800
+++ b/hotspot/src/share/vm/runtime/reflection.cpp Wed Nov 13 16:24:33 2013 -0800
@@ -470,12 +470,6 @@
return true;
}
- // Also allow all accesses from
- // java/lang/invoke/MagicLambdaImpl subclasses to succeed trivially.
- if (current_class->is_subclass_of(SystemDictionary::lambda_MagicLambdaImpl_klass())) {
- return true;
- }
-
return can_relax_access_check_for(current_class, new_class, classloader_only);
}
@@ -570,12 +564,6 @@
return true;
}
- // Also allow all accesses from
- // java/lang/invoke/MagicLambdaImpl subclasses to succeed trivially.
- if (current_class->is_subclass_of(SystemDictionary::lambda_MagicLambdaImpl_klass())) {
- return true;
- }
-
return can_relax_access_check_for(
current_class, field_class, classloader_only);
}
--- a/hotspot/test/compiler/jsr292/ConcurrentClassLoadingTest.java Wed Nov 13 07:31:26 2013 -0800
+++ b/hotspot/test/compiler/jsr292/ConcurrentClassLoadingTest.java Wed Nov 13 16:24:33 2013 -0800
@@ -172,7 +172,6 @@
"java.lang.invoke.LambdaConversionException",
"java.lang.invoke.LambdaForm",
"java.lang.invoke.LambdaMetafactory",
- "java.lang.invoke.MagicLambdaImpl",
"java.lang.invoke.MemberName",
"java.lang.invoke.MethodHandle",
"java.lang.invoke.MethodHandleImpl",