mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8146201: [AOT] Class static initializers that are not pure should not be executed during static compilation
Reviewed-by: kvn
This commit is contained in:
parent
0df6b5baee
commit
91649ef44b
3 changed files with 14 additions and 11 deletions
|
@ -480,6 +480,9 @@ C2V_END
|
|||
C2V_VMENTRY(jobject, resolveTypeInPool, (JNIEnv*, jobject, jobject jvmci_constant_pool, jint index))
|
||||
constantPoolHandle cp = CompilerToVM::asConstantPool(jvmci_constant_pool);
|
||||
Klass* resolved_klass = cp->klass_at(index, CHECK_NULL);
|
||||
if (resolved_klass->is_instance_klass()) {
|
||||
InstanceKlass::cast(resolved_klass)->link_class_or_fail(THREAD);
|
||||
}
|
||||
oop klass = CompilerToVM::get_jvmci_type(resolved_klass, CHECK_NULL);
|
||||
return JNIHandles::make_local(THREAD, klass);
|
||||
C2V_END
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue