< prev index next >

src/share/vm/prims/jvm.cpp

Print this page

        

*** 339,349 **** HandleMark hm(THREAD); Handle key_str = java_lang_String::create_from_platform_dependent_str(key, CHECK); Handle value_str = java_lang_String::create_from_platform_dependent_str((value != NULL ? value : ""), CHECK); JavaCalls::call_virtual(&r, props, ! KlassHandle(THREAD, SystemDictionary::Properties_klass()), vmSymbols::put_name(), vmSymbols::object_object_object_signature(), key_str, value_str, THREAD); --- 339,349 ---- HandleMark hm(THREAD); Handle key_str = java_lang_String::create_from_platform_dependent_str(key, CHECK); Handle value_str = java_lang_String::create_from_platform_dependent_str((value != NULL ? value : ""), CHECK); JavaCalls::call_virtual(&r, props, ! SystemDictionary::Properties_klass(), vmSymbols::put_name(), vmSymbols::object_object_object_signature(), key_str, value_str, THREAD);
*** 619,629 **** JVM_ENTRY(jobject, JVM_Clone(JNIEnv* env, jobject handle)) JVMWrapper("JVM_Clone"); Handle obj(THREAD, JNIHandles::resolve_non_null(handle)); ! const KlassHandle klass (THREAD, obj->klass()); JvmtiVMObjectAllocEventCollector oam; #ifdef ASSERT // Just checking that the cloneable flag is set correct if (obj->is_array()) { --- 619,629 ---- JVM_ENTRY(jobject, JVM_Clone(JNIEnv* env, jobject handle)) JVMWrapper("JVM_Clone"); Handle obj(THREAD, JNIHandles::resolve_non_null(handle)); ! Klass* klass = obj->klass(); JvmtiVMObjectAllocEventCollector oam; #ifdef ASSERT // Just checking that the cloneable flag is set correct if (obj->is_array()) {
*** 995,1007 **** CHECK_NULL); #if INCLUDE_CDS if (k == NULL) { // If the class is not already loaded, try to see if it's in the shared // archive for the current classloader (h_loader). ! instanceKlassHandle ik = SystemDictionaryShared::find_or_load_shared_class( ! klass_name, h_loader, CHECK_NULL); ! k = ik(); } #endif return (k == NULL) ? NULL : (jclass) JNIHandles::make_local(env, k->java_mirror()); JVM_END --- 995,1005 ---- CHECK_NULL); #if INCLUDE_CDS if (k == NULL) { // If the class is not already loaded, try to see if it's in the shared // archive for the current classloader (h_loader). ! k = SystemDictionaryShared::find_or_load_shared_class(klass_name, h_loader, CHECK_NULL); } #endif return (k == NULL) ? NULL : (jclass) JNIHandles::make_local(env, k->java_mirror()); JVM_END
*** 1075,1089 **** // Primitive objects does not have any interfaces objArrayOop r = oopFactory::new_objArray(SystemDictionary::Class_klass(), 0, CHECK_NULL); return (jobjectArray) JNIHandles::make_local(env, r); } ! KlassHandle klass(thread, java_lang_Class::as_Klass(mirror)); // Figure size of result array int size; if (klass->is_instance_klass()) { ! size = InstanceKlass::cast(klass())->local_interfaces()->length(); } else { assert(klass->is_objArray_klass() || klass->is_typeArray_klass(), "Illegal mirror klass"); size = 2; } --- 1073,1087 ---- // Primitive objects does not have any interfaces objArrayOop r = oopFactory::new_objArray(SystemDictionary::Class_klass(), 0, CHECK_NULL); return (jobjectArray) JNIHandles::make_local(env, r); } ! Klass* klass = java_lang_Class::as_Klass(mirror); // Figure size of result array int size; if (klass->is_instance_klass()) { ! size = InstanceKlass::cast(klass)->local_interfaces()->length(); } else { assert(klass->is_objArray_klass() || klass->is_typeArray_klass(), "Illegal mirror klass"); size = 2; }
*** 1092,1102 **** objArrayHandle result (THREAD, r); // Fill in result if (klass->is_instance_klass()) { // Regular instance klass, fill in all local interfaces for (int index = 0; index < size; index++) { ! Klass* k = InstanceKlass::cast(klass())->local_interfaces()->at(index); result->obj_at_put(index, k->java_mirror()); } } else { // All arrays implement java.lang.Cloneable and java.io.Serializable result->obj_at_put(0, SystemDictionary::Cloneable_klass()->java_mirror()); --- 1090,1100 ---- objArrayHandle result (THREAD, r); // Fill in result if (klass->is_instance_klass()) { // Regular instance klass, fill in all local interfaces for (int index = 0; index < size; index++) { ! Klass* k = InstanceKlass::cast(klass)->local_interfaces()->at(index); result->obj_at_put(index, k->java_mirror()); } } else { // All arrays implement java.lang.Cloneable and java.io.Serializable result->obj_at_put(0, SystemDictionary::Cloneable_klass()->java_mirror());
*** 1176,1186 **** oop pd = java_lang_Class::protection_domain(JNIHandles::resolve(cls)); return (jobject) JNIHandles::make_local(env, pd); JVM_END ! static bool is_authorized(Handle context, instanceKlassHandle klass, TRAPS) { // If there is a security manager and protection domain, check the access // in the protection domain, otherwise it is authorized. if (java_lang_System::has_security_manager()) { // For bootstrapping, if pd implies method isn't in the JDK, allow --- 1174,1184 ---- oop pd = java_lang_Class::protection_domain(JNIHandles::resolve(cls)); return (jobject) JNIHandles::make_local(env, pd); JVM_END ! static bool is_authorized(Handle context, InstanceKlass* klass, TRAPS) { // If there is a security manager and protection domain, check the access // in the protection domain, otherwise it is authorized. if (java_lang_System::has_security_manager()) { // For bootstrapping, if pd implies method isn't in the JDK, allow
*** 1216,1226 **** oop create_dummy_access_control_context(TRAPS) { InstanceKlass* pd_klass = SystemDictionary::ProtectionDomain_klass(); Handle obj = pd_klass->allocate_instance_handle(CHECK_NULL); // Call constructor ProtectionDomain(null, null); JavaValue result(T_VOID); ! JavaCalls::call_special(&result, obj, KlassHandle(THREAD, pd_klass), vmSymbols::object_initializer_name(), vmSymbols::codesource_permissioncollection_signature(), Handle(), Handle(), CHECK_NULL); // new ProtectionDomain[] {pd}; --- 1214,1224 ---- oop create_dummy_access_control_context(TRAPS) { InstanceKlass* pd_klass = SystemDictionary::ProtectionDomain_klass(); Handle obj = pd_klass->allocate_instance_handle(CHECK_NULL); // Call constructor ProtectionDomain(null, null); JavaValue result(T_VOID); ! JavaCalls::call_special(&result, obj, pd_klass, vmSymbols::object_initializer_name(), vmSymbols::codesource_permissioncollection_signature(), Handle(), Handle(), CHECK_NULL); // new ProtectionDomain[] {pd};
*** 1247,1257 **** if (vfst.at_end()) { THROW_MSG_0(vmSymbols::java_lang_InternalError(), "no caller?"); } Method* method = vfst.method(); ! instanceKlassHandle klass (THREAD, method->method_holder()); // Check that action object understands "Object run()" Handle h_context; if (context != NULL) { h_context = Handle(THREAD, JNIHandles::resolve(context)); --- 1245,1255 ---- if (vfst.at_end()) { THROW_MSG_0(vmSymbols::java_lang_InternalError(), "no caller?"); } Method* method = vfst.method(); ! InstanceKlass* klass = method->method_holder(); // Check that action object understands "Object run()" Handle h_context; if (context != NULL) { h_context = Handle(THREAD, JNIHandles::resolve(context));
*** 1450,1460 **** ! java_lang_Class::as_Klass(JNIHandles::resolve_non_null(ofClass))->is_instance_klass()) { oop result = oopFactory::new_objArray(SystemDictionary::Class_klass(), 0, CHECK_NULL); return (jobjectArray)JNIHandles::make_local(env, result); } ! instanceKlassHandle k(thread, java_lang_Class::as_Klass(JNIHandles::resolve_non_null(ofClass))); InnerClassesIterator iter(k); if (iter.length() == 0) { // Neither an inner nor outer class oop result = oopFactory::new_objArray(SystemDictionary::Class_klass(), 0, CHECK_NULL); --- 1448,1458 ---- ! java_lang_Class::as_Klass(JNIHandles::resolve_non_null(ofClass))->is_instance_klass()) { oop result = oopFactory::new_objArray(SystemDictionary::Class_klass(), 0, CHECK_NULL); return (jobjectArray)JNIHandles::make_local(env, result); } ! InstanceKlass* k = InstanceKlass::cast(java_lang_Class::as_Klass(JNIHandles::resolve_non_null(ofClass))); InnerClassesIterator iter(k); if (iter.length() == 0) { // Neither an inner nor outer class oop result = oopFactory::new_objArray(SystemDictionary::Class_klass(), 0, CHECK_NULL);
*** 1477,1489 **** if (ioff != 0 && ooff != 0) { // Check to see if the name matches the class we're looking for // before attempting to find the class. if (cp->klass_name_at_matches(k, ooff)) { Klass* outer_klass = cp->klass_at(ooff, CHECK_NULL); ! if (outer_klass == k()) { Klass* ik = cp->klass_at(ioff, CHECK_NULL); ! instanceKlassHandle inner_klass (THREAD, ik); // Throws an exception if outer klass has not declared k as // an inner klass Reflection::check_for_inner_class(k, inner_klass, true, CHECK_NULL); --- 1475,1487 ---- if (ioff != 0 && ooff != 0) { // Check to see if the name matches the class we're looking for // before attempting to find the class. if (cp->klass_name_at_matches(k, ooff)) { Klass* outer_klass = cp->klass_at(ooff, CHECK_NULL); ! if (outer_klass == k) { Klass* ik = cp->klass_at(ioff, CHECK_NULL); ! InstanceKlass* inner_klass = InstanceKlass::cast(ik); // Throws an exception if outer klass has not declared k as // an inner klass Reflection::check_for_inner_class(k, inner_klass, true, CHECK_NULL);
*** 1530,1540 **** oop mirror = JNIHandles::resolve_non_null(cls); if (java_lang_Class::is_primitive(mirror) || !java_lang_Class::as_Klass(mirror)->is_instance_klass()) { return NULL; } ! instanceKlassHandle k(THREAD, InstanceKlass::cast(java_lang_Class::as_Klass(mirror))); int ooff = 0, noff = 0; if (InstanceKlass::find_inner_classes_attr(k, &ooff, &noff, THREAD)) { if (noff != 0) { constantPoolHandle i_cp(thread, k->constants()); Symbol* name = i_cp->symbol_at(noff); --- 1528,1538 ---- oop mirror = JNIHandles::resolve_non_null(cls); if (java_lang_Class::is_primitive(mirror) || !java_lang_Class::as_Klass(mirror)->is_instance_klass()) { return NULL; } ! InstanceKlass* k = InstanceKlass::cast(java_lang_Class::as_Klass(mirror)); int ooff = 0, noff = 0; if (InstanceKlass::find_inner_classes_attr(k, &ooff, &noff, THREAD)) { if (noff != 0) { constantPoolHandle i_cp(thread, k->constants()); Symbol* name = i_cp->symbol_at(noff);
*** 1588,1610 **** oop mirror = java_lang_reflect_Field::clazz(reflected); Klass* k = java_lang_Class::as_Klass(mirror); int slot = java_lang_reflect_Field::slot(reflected); int modifiers = java_lang_reflect_Field::modifiers(reflected); ! KlassHandle kh(THREAD, k); ! intptr_t offset = InstanceKlass::cast(kh())->field_offset(slot); if (modifiers & JVM_ACC_STATIC) { // for static fields we only look in the current class ! if (!InstanceKlass::cast(kh())->find_local_field_from_offset(offset, true, &fd)) { assert(false, "cannot find static field"); return false; } } else { // for instance fields we start with the current class and work // our way up through the superclass chain ! if (!InstanceKlass::cast(kh())->find_field_from_offset(offset, false, &fd)) { assert(false, "cannot find instance field"); return false; } } return true; --- 1586,1608 ---- oop mirror = java_lang_reflect_Field::clazz(reflected); Klass* k = java_lang_Class::as_Klass(mirror); int slot = java_lang_reflect_Field::slot(reflected); int modifiers = java_lang_reflect_Field::modifiers(reflected); ! InstanceKlass* ik = InstanceKlass::cast(k); ! intptr_t offset = ik->field_offset(slot); if (modifiers & JVM_ACC_STATIC) { // for static fields we only look in the current class ! if (!ik->find_local_field_from_offset(offset, true, &fd)) { assert(false, "cannot find static field"); return false; } } else { // for instance fields we start with the current class and work // our way up through the superclass chain ! if (!ik->find_field_from_offset(offset, false, &fd)) { assert(false, "cannot find instance field"); return false; } } return true;
*** 1755,1776 **** // Return empty array oop res = oopFactory::new_objArray(SystemDictionary::reflect_Field_klass(), 0, CHECK_NULL); return (jobjectArray) JNIHandles::make_local(env, res); } ! instanceKlassHandle k(THREAD, java_lang_Class::as_Klass(JNIHandles::resolve_non_null(ofClass))); constantPoolHandle cp(THREAD, k->constants()); // Ensure class is linked k->link_class(CHECK_NULL); // Allocate result int num_fields; if (publicOnly) { num_fields = 0; ! for (JavaFieldStream fs(k()); !fs.done(); fs.next()) { if (fs.access_flags().is_public()) ++num_fields; } } else { num_fields = k->java_fields_count(); } --- 1753,1774 ---- // Return empty array oop res = oopFactory::new_objArray(SystemDictionary::reflect_Field_klass(), 0, CHECK_NULL); return (jobjectArray) JNIHandles::make_local(env, res); } ! InstanceKlass* k = InstanceKlass::cast(java_lang_Class::as_Klass(JNIHandles::resolve_non_null(ofClass))); constantPoolHandle cp(THREAD, k->constants()); // Ensure class is linked k->link_class(CHECK_NULL); // Allocate result int num_fields; if (publicOnly) { num_fields = 0; ! for (JavaFieldStream fs(k); !fs.done(); fs.next()) { if (fs.access_flags().is_public()) ++num_fields; } } else { num_fields = k->java_fields_count(); }
*** 1780,1790 **** int out_idx = 0; fieldDescriptor fd; for (JavaFieldStream fs(k); !fs.done(); fs.next()) { if (!publicOnly || fs.access_flags().is_public()) { ! fd.reinitialize(k(), fs.index()); oop field = Reflection::new_field(&fd, CHECK_NULL); result->obj_at_put(out_idx, field); ++out_idx; } } --- 1778,1788 ---- int out_idx = 0; fieldDescriptor fd; for (JavaFieldStream fs(k); !fs.done(); fs.next()) { if (!publicOnly || fs.access_flags().is_public()) { ! fd.reinitialize(k, fs.index()); oop field = Reflection::new_field(&fd, CHECK_NULL); result->obj_at_put(out_idx, field); ++out_idx; } }
*** 1815,1825 **** // Return empty array oop res = oopFactory::new_objArray(klass, 0, CHECK_NULL); return (jobjectArray) JNIHandles::make_local(env, res); } ! instanceKlassHandle k(THREAD, java_lang_Class::as_Klass(JNIHandles::resolve_non_null(ofClass))); // Ensure class is linked k->link_class(CHECK_NULL); Array<Method*>* methods = k->methods(); --- 1813,1823 ---- // Return empty array oop res = oopFactory::new_objArray(klass, 0, CHECK_NULL); return (jobjectArray) JNIHandles::make_local(env, res); } ! InstanceKlass* k = InstanceKlass::cast(java_lang_Class::as_Klass(JNIHandles::resolve_non_null(ofClass))); // Ensure class is linked k->link_class(CHECK_NULL); Array<Method*>* methods = k->methods();
*** 1911,1921 **** // Return null for primitives and arrays if (!java_lang_Class::is_primitive(JNIHandles::resolve_non_null(cls))) { Klass* k = java_lang_Class::as_Klass(JNIHandles::resolve_non_null(cls)); if (k->is_instance_klass()) { ! instanceKlassHandle k_h(THREAD, k); Handle jcp = reflect_ConstantPool::create(CHECK_NULL); reflect_ConstantPool::set_cp(jcp(), k_h->constants()); return JNIHandles::make_local(jcp()); } } --- 1909,1919 ---- // Return null for primitives and arrays if (!java_lang_Class::is_primitive(JNIHandles::resolve_non_null(cls))) { Klass* k = java_lang_Class::as_Klass(JNIHandles::resolve_non_null(cls)); if (k->is_instance_klass()) { ! InstanceKlass* k_h = InstanceKlass::cast(k); Handle jcp = reflect_ConstantPool::create(CHECK_NULL); reflect_ConstantPool::set_cp(jcp(), k_h->constants()); return JNIHandles::make_local(jcp()); } }
*** 1973,1983 **** k_o = cp->klass_at(klass_ref, CHECK_NULL); } else { k_o = ConstantPool::klass_at_if_loaded(cp, klass_ref); if (k_o == NULL) return NULL; } ! instanceKlassHandle k(THREAD, k_o); Symbol* name = cp->uncached_name_ref_at(index); Symbol* sig = cp->uncached_signature_ref_at(index); methodHandle m (THREAD, k->find_method(name, sig)); if (m.is_null()) { THROW_MSG_0(vmSymbols::java_lang_RuntimeException(), "Unable to look up method in target class"); --- 1971,1981 ---- k_o = cp->klass_at(klass_ref, CHECK_NULL); } else { k_o = ConstantPool::klass_at_if_loaded(cp, klass_ref); if (k_o == NULL) return NULL; } ! InstanceKlass* k = InstanceKlass::cast(k_o); Symbol* name = cp->uncached_name_ref_at(index); Symbol* sig = cp->uncached_signature_ref_at(index); methodHandle m (THREAD, k->find_method(name, sig)); if (m.is_null()) { THROW_MSG_0(vmSymbols::java_lang_RuntimeException(), "Unable to look up method in target class");
*** 2024,2034 **** k_o = cp->klass_at(klass_ref, CHECK_NULL); } else { k_o = ConstantPool::klass_at_if_loaded(cp, klass_ref); if (k_o == NULL) return NULL; } ! instanceKlassHandle k(THREAD, k_o); Symbol* name = cp->uncached_name_ref_at(index); Symbol* sig = cp->uncached_signature_ref_at(index); fieldDescriptor fd; Klass* target_klass = k->find_field(name, sig, &fd); if (target_klass == NULL) { --- 2022,2032 ---- k_o = cp->klass_at(klass_ref, CHECK_NULL); } else { k_o = ConstantPool::klass_at_if_loaded(cp, klass_ref); if (k_o == NULL) return NULL; } ! InstanceKlass* k = InstanceKlass::cast(k_o); Symbol* name = cp->uncached_name_ref_at(index); Symbol* sig = cp->uncached_signature_ref_at(index); fieldDescriptor fd; Klass* target_klass = k->find_field(name, sig, &fd); if (target_klass == NULL) {
*** 2614,2624 **** ConstantPool* cp_called = InstanceKlass::cast(k_called)->constants(); switch (cp->tag_at(cp_index).value()) { case JVM_CONSTANT_Fieldref: { Symbol* name = cp->uncached_name_ref_at(cp_index); Symbol* signature = cp->uncached_signature_ref_at(cp_index); ! for (JavaFieldStream fs(k_called); !fs.done(); fs.next()) { if (fs.name() == name && fs.signature() == signature) { return fs.access_flags().as_short() & JVM_RECOGNIZED_FIELD_MODIFIERS; } } return -1; --- 2612,2623 ---- ConstantPool* cp_called = InstanceKlass::cast(k_called)->constants(); switch (cp->tag_at(cp_index).value()) { case JVM_CONSTANT_Fieldref: { Symbol* name = cp->uncached_name_ref_at(cp_index); Symbol* signature = cp->uncached_signature_ref_at(cp_index); ! InstanceKlass* ik = InstanceKlass::cast(k_called); ! for (JavaFieldStream fs(ik); !fs.done(); fs.next()) { if (fs.name() == name && fs.signature() == signature) { return fs.access_flags().as_short() & JVM_RECOGNIZED_FIELD_MODIFIERS; } } return -1;
*** 2768,2778 **** HandleMark hm(THREAD); Handle obj(THREAD, thread->threadObj()); JavaValue result(T_VOID); JavaCalls::call_virtual(&result, obj, ! KlassHandle(THREAD, SystemDictionary::Thread_klass()), vmSymbols::run_method_name(), vmSymbols::void_method_signature(), THREAD); } --- 2767,2777 ---- HandleMark hm(THREAD); Handle obj(THREAD, thread->threadObj()); JavaValue result(T_VOID); JavaCalls::call_virtual(&result, obj, ! SystemDictionary::Thread_klass(), vmSymbols::run_method_name(), vmSymbols::void_method_signature(), THREAD); }
*** 3224,3234 **** THROW_MSG_NULL(vmSymbols::java_lang_InternalError(), "JVM_GetClassContext must only be called from SecurityManager.getClassContext"); } } // Collect method holders ! GrowableArray<KlassHandle>* klass_array = new GrowableArray<KlassHandle>(); for (; !vfst.at_end(); vfst.security_next()) { Method* m = vfst.method(); // Native frames are not returned if (!m->is_ignored_by_security_stack_walk() && !m->is_native()) { Klass* holder = m->method_holder(); --- 3223,3233 ---- THROW_MSG_NULL(vmSymbols::java_lang_InternalError(), "JVM_GetClassContext must only be called from SecurityManager.getClassContext"); } } // Collect method holders ! GrowableArray<Klass*>* klass_array = new GrowableArray<Klass*>(); for (; !vfst.at_end(); vfst.security_next()) { Method* m = vfst.method(); // Native frames are not returned if (!m->is_ignored_by_security_stack_walk() && !m->is_native()) { Klass* holder = m->method_holder();
*** 3591,3606 **** // the checkPackageAccess relative to the initiating class loader via the // protection_domain. The protection_domain is passed as NULL by the java code // if there is no security manager in 3-arg Class.forName(). Klass* klass = SystemDictionary::resolve_or_fail(name, loader, protection_domain, throwError != 0, CHECK_NULL); - KlassHandle klass_handle(THREAD, klass); // Check if we should initialize the class ! if (init && klass_handle->is_instance_klass()) { ! klass_handle->initialize(CHECK_NULL); } ! return (jclass) JNIHandles::make_local(env, klass_handle->java_mirror()); } // Method /////////////////////////////////////////////////////////////////////////////////////////// --- 3590,3604 ---- // the checkPackageAccess relative to the initiating class loader via the // protection_domain. The protection_domain is passed as NULL by the java code // if there is no security manager in 3-arg Class.forName(). Klass* klass = SystemDictionary::resolve_or_fail(name, loader, protection_domain, throwError != 0, CHECK_NULL); // Check if we should initialize the class ! if (init && klass->is_instance_klass()) { ! klass->initialize(CHECK_NULL); } ! return (jclass) JNIHandles::make_local(env, klass->java_mirror()); } // Method ///////////////////////////////////////////////////////////////////////////////////////////
*** 3744,3772 **** } Klass* k = java_lang_Class::as_Klass(mirror()); if (!k->is_instance_klass()) { return NULL; } ! instanceKlassHandle ik_h(THREAD, k); ! int encl_method_class_idx = ik_h->enclosing_method_class_index(); if (encl_method_class_idx == 0) { return NULL; } objArrayOop dest_o = oopFactory::new_objArray(SystemDictionary::Object_klass(), 3, CHECK_NULL); objArrayHandle dest(THREAD, dest_o); ! Klass* enc_k = ik_h->constants()->klass_at(encl_method_class_idx, CHECK_NULL); dest->obj_at_put(0, enc_k->java_mirror()); ! int encl_method_method_idx = ik_h->enclosing_method_method_index(); if (encl_method_method_idx != 0) { ! Symbol* sym = ik_h->constants()->symbol_at( extract_low_short_from_int( ! ik_h->constants()->name_and_type_at(encl_method_method_idx))); Handle str = java_lang_String::create_from_symbol(sym, CHECK_NULL); dest->obj_at_put(1, str()); ! sym = ik_h->constants()->symbol_at( extract_high_short_from_int( ! ik_h->constants()->name_and_type_at(encl_method_method_idx))); str = java_lang_String::create_from_symbol(sym, CHECK_NULL); dest->obj_at_put(2, str()); } return (jobjectArray) JNIHandles::make_local(dest()); } --- 3742,3770 ---- } Klass* k = java_lang_Class::as_Klass(mirror()); if (!k->is_instance_klass()) { return NULL; } ! InstanceKlass* ik = InstanceKlass::cast(k); ! int encl_method_class_idx = ik->enclosing_method_class_index(); if (encl_method_class_idx == 0) { return NULL; } objArrayOop dest_o = oopFactory::new_objArray(SystemDictionary::Object_klass(), 3, CHECK_NULL); objArrayHandle dest(THREAD, dest_o); ! Klass* enc_k = ik->constants()->klass_at(encl_method_class_idx, CHECK_NULL); dest->obj_at_put(0, enc_k->java_mirror()); ! int encl_method_method_idx = ik->enclosing_method_method_index(); if (encl_method_method_idx != 0) { ! Symbol* sym = ik->constants()->symbol_at( extract_low_short_from_int( ! ik->constants()->name_and_type_at(encl_method_method_idx))); Handle str = java_lang_String::create_from_symbol(sym, CHECK_NULL); dest->obj_at_put(1, str()); ! sym = ik->constants()->symbol_at( extract_high_short_from_int( ! ik->constants()->name_and_type_at(encl_method_method_idx))); str = java_lang_String::create_from_symbol(sym, CHECK_NULL); dest->obj_at_put(2, str()); } return (jobjectArray) JNIHandles::make_local(dest()); }
*** 3797,3808 **** char** vm_flags = Arguments::jvm_flags_array(); char** vm_args = Arguments::jvm_args_array(); int num_flags = Arguments::num_jvm_flags(); int num_args = Arguments::num_jvm_args(); ! instanceKlassHandle ik (THREAD, SystemDictionary::String_klass()); ! objArrayOop r = oopFactory::new_objArray(ik(), num_args + num_flags, CHECK_NULL); objArrayHandle result_h(THREAD, r); int index = 0; for (int j = 0; j < num_flags; j++, index++) { Handle h = java_lang_String::create_from_platform_dependent_str(vm_flags[j], CHECK_NULL); --- 3795,3806 ---- char** vm_flags = Arguments::jvm_flags_array(); char** vm_args = Arguments::jvm_args_array(); int num_flags = Arguments::num_jvm_flags(); int num_args = Arguments::num_jvm_args(); ! InstanceKlass* ik = SystemDictionary::String_klass(); ! objArrayOop r = oopFactory::new_objArray(ik, num_args + num_flags, CHECK_NULL); objArrayHandle result_h(THREAD, r); int index = 0; for (int j = 0; j < num_flags; j++, index++) { Handle h = java_lang_String::create_from_platform_dependent_str(vm_flags[j], CHECK_NULL);
< prev index next >