< prev index next > src/hotspot/share/jvmci/jvmciCompilerToVM.cpp
Print this page
}
if (objects != nullptr) {
RegisterMap reg_map(vf->register_map());
bool realloc_failures = Deoptimization::realloc_objects(thread, vf->frame_pointer(), ®_map, objects, CHECK_NULL);
- Deoptimization::reassign_fields(vf->frame_pointer(), ®_map, objects, realloc_failures, false);
+ Deoptimization::reassign_fields(vf->frame_pointer(), ®_map, objects, realloc_failures, false, CHECK_NULL);
realloc_called = true;
}
GrowableArray<ScopeValue*>* local_values = scope->locals();
for (int i = 0; i < local_values->length(); i++) {
// no objects to materialize
return;
}
bool realloc_failures = Deoptimization::realloc_objects(thread, fstAfterDeopt.current(), fstAfterDeopt.register_map(), objects, CHECK);
- Deoptimization::reassign_fields(fstAfterDeopt.current(), fstAfterDeopt.register_map(), objects, realloc_failures, false);
+ Deoptimization::reassign_fields(fstAfterDeopt.current(), fstAfterDeopt.register_map(), objects, realloc_failures, false, THREAD);
for (int frame_index = 0; frame_index < virtualFrames->length(); frame_index++) {
compiledVFrame* cvf = virtualFrames->at(frame_index);
GrowableArray<ScopeValue*>* scopedValues = cvf->scope()->locals();
InstanceKlass* iklass = InstanceKlass::cast(klass);
GrowableArray<Method*> constructors_array;
for (int i = 0; i < iklass->methods()->length(); i++) {
Method* m = iklass->methods()->at(i);
- if (m->is_initializer() && !m->is_static()) {
+ if (m->is_object_constructor()) {
constructors_array.append(m);
}
}
JVMCIObjectArray methods = JVMCIENV->new_ResolvedJavaMethod_array(constructors_array.length(), JVMCI_CHECK_NULL);
for (int i = 0; i < constructors_array.length(); i++) {
InstanceKlass* iklass = InstanceKlass::cast(klass);
GrowableArray<Method*> methods_array;
for (int i = 0; i < iklass->methods()->length(); i++) {
Method* m = iklass->methods()->at(i);
- if (!m->is_initializer() && !m->is_overpass()) {
+ if (!(m->is_object_constructor() || m->is_class_initializer()) && !m->is_overpass()) {
methods_array.append(m);
}
}
JVMCIObjectArray methods = JVMCIENV->new_ResolvedJavaMethod_array(methods_array.length(), JVMCI_CHECK_NULL);
for (int i = 0; i < methods_array.length(); i++) {
C2V_VMENTRY_NULL(jobject, asReflectionExecutable, (JNIEnv* env, jobject, ARGUMENT_PAIR(method)))
requireInHotSpot("asReflectionExecutable", JVMCI_CHECK_NULL);
methodHandle m(THREAD, UNPACK_PAIR(Method, method));
oop executable;
- if (m->is_initializer()) {
- if (m->is_static_initializer()) {
+ if (m->is_class_initializer()) {
JVMCI_THROW_MSG_NULL(IllegalArgumentException,
"Cannot create java.lang.reflect.Method for class initializer");
- }
+ }
+ else if (m->is_object_constructor()) {
executable = Reflection::new_constructor(m, CHECK_NULL);
} else {
executable = Reflection::new_method(m, false, CHECK_NULL);
}
return JNIHandles::make_local(THREAD, executable);
< prev index next >