提交 180af1b8 编写于 作者: A acorn

Merge

...@@ -188,6 +188,10 @@ bool Verifier::verify(instanceKlassHandle klass, Verifier::Mode mode, bool shoul ...@@ -188,6 +188,10 @@ bool Verifier::verify(instanceKlassHandle klass, Verifier::Mode mode, bool shoul
bool Verifier::is_eligible_for_verification(instanceKlassHandle klass, bool should_verify_class) { bool Verifier::is_eligible_for_verification(instanceKlassHandle klass, bool should_verify_class) {
Symbol* name = klass->name(); Symbol* name = klass->name();
Klass* refl_magic_klass = SystemDictionary::reflect_MagicAccessorImpl_klass(); 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 (should_verify_for(klass->class_loader(), should_verify_class) &&
// return if the class is a bootstrapping class // return if the class is a bootstrapping class
...@@ -210,9 +214,9 @@ bool Verifier::is_eligible_for_verification(instanceKlassHandle klass, bool shou ...@@ -210,9 +214,9 @@ bool Verifier::is_eligible_for_verification(instanceKlassHandle klass, bool shou
// sun/reflect/SerializationConstructorAccessor. // sun/reflect/SerializationConstructorAccessor.
// NOTE: this is called too early in the bootstrapping process to be // NOTE: this is called too early in the bootstrapping process to be
// guarded by Universe::is_gte_jdk14x_version()/UseNewReflection. // guarded by Universe::is_gte_jdk14x_version()/UseNewReflection.
(refl_magic_klass == NULL || // Also for lambda generated code, gte jdk8
!klass->is_subtype_of(refl_magic_klass) || (!is_reflect || VerifyReflectionBytecodes) &&
VerifyReflectionBytecodes) (!is_lambda || VerifyLambdaBytecodes)
); );
} }
......
...@@ -3514,6 +3514,8 @@ class CommandLineFlags { ...@@ -3514,6 +3514,8 @@ class CommandLineFlags {
"Temporary flag for transition to AbstractMethodError wrapped " \ "Temporary flag for transition to AbstractMethodError wrapped " \
"in InvocationTargetException. See 6531596") \ "in InvocationTargetException. See 6531596") \
\ \
develop(bool, VerifyLambdaBytecodes, false, \
"Force verification of jdk 8 lambda metafactory bytecodes.") \
\ \
develop(intx, FastSuperclassLimit, 8, \ develop(intx, FastSuperclassLimit, 8, \
"Depth of hardwired instanceof accelerator array") \ "Depth of hardwired instanceof accelerator array") \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册