comparison src/share/vm/prims/jvm.cpp @ 8124:5fc51c1ecdeb

Merge.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Tue, 05 Mar 2013 23:44:54 +0100
parents 3ac7d10a6572 927a311d00f9
children b9a918201d47
comparison
equal deleted inserted replaced
7943:a413bcd552a4 8124:5fc51c1ecdeb
1573 ResourceMark rm(THREAD); 1573 ResourceMark rm(THREAD);
1574 // Return null for arrays and primitives 1574 // Return null for arrays and primitives
1575 if (!java_lang_Class::is_primitive(JNIHandles::resolve(cls))) { 1575 if (!java_lang_Class::is_primitive(JNIHandles::resolve(cls))) {
1576 Klass* k = java_lang_Class::as_Klass(JNIHandles::resolve(cls)); 1576 Klass* k = java_lang_Class::as_Klass(JNIHandles::resolve(cls));
1577 if (k->oop_is_instance()) { 1577 if (k->oop_is_instance()) {
1578 Annotations* type_annotations = InstanceKlass::cast(k)->type_annotations(); 1578 AnnotationArray* type_annotations = InstanceKlass::cast(k)->class_type_annotations();
1579 if (type_annotations != NULL) { 1579 if (type_annotations != NULL) {
1580 typeArrayOop a = Annotations::make_java_array(type_annotations->class_annotations(), CHECK_NULL); 1580 typeArrayOop a = Annotations::make_java_array(type_annotations, CHECK_NULL);
1581 return (jbyteArray) JNIHandles::make_local(env, a); 1581 return (jbyteArray) JNIHandles::make_local(env, a);
1582 } 1582 }
1583 } 1583 }
1584 } 1584 }
1585 return NULL; 1585 return NULL;
1620 for (int i = 0; i < num_params; i++) { 1620 for (int i = 0; i < num_params; i++) {
1621 MethodParametersElement* params = mh->method_parameters_start(); 1621 MethodParametersElement* params = mh->method_parameters_start();
1622 // For a 0 index, give a NULL symbol 1622 // For a 0 index, give a NULL symbol
1623 Symbol* const sym = 0 != params[i].name_cp_index ? 1623 Symbol* const sym = 0 != params[i].name_cp_index ?
1624 mh->constants()->symbol_at(params[i].name_cp_index) : NULL; 1624 mh->constants()->symbol_at(params[i].name_cp_index) : NULL;
1625 int flags = build_int_from_shorts(params[i].flags_lo, params[i].flags_hi); 1625 int flags = params[i].flags;
1626 oop param = Reflection::new_parameter(reflected_method, i, sym, 1626 oop param = Reflection::new_parameter(reflected_method, i, sym,
1627 flags, CHECK_NULL); 1627 flags, CHECK_NULL);
1628 result->obj_at_put(i, param); 1628 result->obj_at_put(i, param);
1629 } 1629 }
1630 return (jobjectArray)JNIHandles::make_local(env, result()); 1630 return (jobjectArray)JNIHandles::make_local(env, result());
2301 k = JvmtiThreadState::class_to_verify_considering_redefinition(k, thread); 2301 k = JvmtiThreadState::class_to_verify_considering_redefinition(k, thread);
2302 Method* method = InstanceKlass::cast(k)->methods()->at(method_index); 2302 Method* method = InstanceKlass::cast(k)->methods()->at(method_index);
2303 return method->name() == vmSymbols::object_initializer_name(); 2303 return method->name() == vmSymbols::object_initializer_name();
2304 JVM_END 2304 JVM_END
2305 2305
2306
2307 JVM_QUICK_ENTRY(jboolean, JVM_IsVMGeneratedMethodIx(JNIEnv *env, jclass cls, int method_index))
2308 JVMWrapper("JVM_IsVMGeneratedMethodIx");
2309 ResourceMark rm(THREAD);
2310 Klass* k = java_lang_Class::as_Klass(JNIHandles::resolve_non_null(cls));
2311 k = JvmtiThreadState::class_to_verify_considering_redefinition(k, thread);
2312 Method* method = InstanceKlass::cast(k)->methods()->at(method_index);
2313 return method->is_overpass();
2314 JVM_END
2306 2315
2307 JVM_ENTRY(const char*, JVM_GetMethodIxNameUTF(JNIEnv *env, jclass cls, jint method_index)) 2316 JVM_ENTRY(const char*, JVM_GetMethodIxNameUTF(JNIEnv *env, jclass cls, jint method_index))
2308 JVMWrapper("JVM_GetMethodIxIxUTF"); 2317 JVMWrapper("JVM_GetMethodIxIxUTF");
2309 Klass* k = java_lang_Class::as_Klass(JNIHandles::resolve_non_null(cls)); 2318 Klass* k = java_lang_Class::as_Klass(JNIHandles::resolve_non_null(cls));
2310 k = JvmtiThreadState::class_to_verify_considering_redefinition(k, thread); 2319 k = JvmtiThreadState::class_to_verify_considering_redefinition(k, thread);
4519 4528
4520 // when we add a new capability in the jvm_version_info struct, we should also 4529 // when we add a new capability in the jvm_version_info struct, we should also
4521 // consider to expose this new capability in the sun.rt.jvmCapabilities jvmstat 4530 // consider to expose this new capability in the sun.rt.jvmCapabilities jvmstat
4522 // counter defined in runtimeService.cpp. 4531 // counter defined in runtimeService.cpp.
4523 info->is_attachable = AttachListener::is_attach_supported(); 4532 info->is_attachable = AttachListener::is_attach_supported();
4524 #ifdef KERNEL 4533 }
4525 info->is_kernel_jvm = 1; // true; 4534 JVM_END
4526 #else // KERNEL
4527 info->is_kernel_jvm = 0; // false;
4528 #endif // KERNEL
4529 }
4530 JVM_END