< prev index next >

src/hotspot/share/jvmci/jvmciCompilerToVM.cpp

Print this page
*** 1603,11 ***
              }
  
              if (objects != nullptr) {
                RegisterMap reg_map(vf->register_map());
                bool realloc_failures = Deoptimization::realloc_objects(thread, vf->frame_pointer(), &reg_map, objects, CHECK_NULL);
!               Deoptimization::reassign_fields(vf->frame_pointer(), &reg_map, objects, realloc_failures, false);
                realloc_called = true;
              }
  
              GrowableArray<ScopeValue*>* local_values = scope->locals();
              for (int i = 0; i < local_values->length(); i++) {
--- 1603,11 ---
              }
  
              if (objects != nullptr) {
                RegisterMap reg_map(vf->register_map());
                bool realloc_failures = Deoptimization::realloc_objects(thread, vf->frame_pointer(), &reg_map, objects, CHECK_NULL);
!               Deoptimization::reassign_fields(vf->frame_pointer(), &reg_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++) {

*** 1854,11 ***
      // 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);
  
    for (int frame_index = 0; frame_index < virtualFrames->length(); frame_index++) {
      compiledVFrame* cvf = virtualFrames->at(frame_index);
  
      GrowableArray<ScopeValue*>* scopedValues = cvf->scope()->locals();
--- 1854,11 ---
      // 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, THREAD);
  
    for (int frame_index = 0; frame_index < virtualFrames->length(); frame_index++) {
      compiledVFrame* cvf = virtualFrames->at(frame_index);
  
      GrowableArray<ScopeValue*>* scopedValues = cvf->scope()->locals();

*** 2182,11 ***
  
    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_object_initializer()) {
        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++) {
--- 2182,11 ---
  
    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_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++) {

*** 2209,11 ***
  
    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_object_initializer() && !m->is_static_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++) {
--- 2209,11 ---
  
    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_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++) {

*** 2925,15 ***
  
  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_object_initializer()) {
      executable = Reflection::new_constructor(m, CHECK_NULL);
-   } else if (m->is_static_initializer()) {
-     JVMCI_THROW_MSG_NULL(IllegalArgumentException,
-         "Cannot create java.lang.reflect.Method for class initializer");
    } else {
      executable = Reflection::new_method(m, false, CHECK_NULL);
    }
    return JNIHandles::make_local(THREAD, executable);
  C2V_END
--- 2925,16 ---
  
  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_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);
  C2V_END
< prev index next >