< prev index next >

src/hotspot/share/jvmci/jvmciCompilerToVM.cpp

Print this page
*** 1255,11 ***
                      objects->append(sv);
                    }
                  }
                }
                bool realloc_failures = Deoptimization::realloc_objects(thread, fst.current(), fst.register_map(), objects, CHECK_NULL);
!               Deoptimization::reassign_fields(fst.current(), fst.register_map(), objects, realloc_failures, false);
                realloc_called = true;
  
                GrowableArray<ScopeValue*>* local_values = scope->locals();
                assert(local_values != NULL, "NULL locals");
                typeArrayOop array_oop = oopFactory::new_boolArray(local_values->length(), CHECK_NULL);
--- 1255,11 ---
                      objects->append(sv);
                    }
                  }
                }
                bool realloc_failures = Deoptimization::realloc_objects(thread, fst.current(), fst.register_map(), objects, CHECK_NULL);
!               Deoptimization::reassign_fields(fst.current(), fst.register_map(), objects, realloc_failures, false, CHECK_NULL);
                realloc_called = true;
  
                GrowableArray<ScopeValue*>* local_values = scope->locals();
                assert(local_values != NULL, "NULL locals");
                typeArrayOop array_oop = oopFactory::new_boolArray(local_values->length(), CHECK_NULL);

*** 1515,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*>* scopeLocals = cvf->scope()->locals();
--- 1515,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*>* scopeLocals = cvf->scope()->locals();

*** 1914,11 ***
    iklass->link_class(CHECK_NULL);
  
    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()) {
        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++) {
--- 1914,11 ---
    iklass->link_class(CHECK_NULL);
  
    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++) {

*** 1944,11 ***
    iklass->link_class(CHECK_NULL);
  
    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()) {
        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++) {
--- 1944,11 ---
    iklass->link_class(CHECK_NULL);
  
    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++) {

*** 2536,15 ***
  
  C2V_VMENTRY_NULL(jobject, asReflectionExecutable, (JNIEnv* env, jobject, jobject jvmci_method))
    requireInHotSpot("asReflectionExecutable", JVMCI_CHECK_NULL);
    methodHandle m(THREAD, JVMCIENV->asMethod(jvmci_method));
    oop executable;
!   if (m->is_initializer()) {
-     if (m->is_static_initializer()) {
        JVMCI_THROW_MSG_NULL(IllegalArgumentException,
            "Cannot create java.lang.reflect.Method for class initializer");
!     }
      executable = Reflection::new_constructor(m, CHECK_NULL);
    } else {
      executable = Reflection::new_method(m, false, CHECK_NULL);
    }
    return JNIHandles::make_local(THREAD, executable);
--- 2536,15 ---
  
  C2V_VMENTRY_NULL(jobject, asReflectionExecutable, (JNIEnv* env, jobject, jobject jvmci_method))
    requireInHotSpot("asReflectionExecutable", JVMCI_CHECK_NULL);
    methodHandle m(THREAD, JVMCIENV->asMethod(jvmci_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() || m->is_static_init_factory()) {
      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 >