Mercurial > hg > truffle
comparison src/share/vm/prims/jni.cpp @ 9088:89e4d67fdd2a
Merge
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Fri, 12 Apr 2013 14:05:42 +0200 |
parents | b9a918201d47 cc32ccaaf47f |
children | 836a62f43af9 |
comparison
equal
deleted
inserted
replaced
9037:b008f40b67d0 | 9088:89e4d67fdd2a |
---|---|
1290 JNI_STATIC, | 1290 JNI_STATIC, |
1291 JNI_VIRTUAL, | 1291 JNI_VIRTUAL, |
1292 JNI_NONVIRTUAL | 1292 JNI_NONVIRTUAL |
1293 }; | 1293 }; |
1294 | 1294 |
1295 static methodHandle jni_resolve_interface_call(Handle recv, methodHandle method, TRAPS) { | |
1296 assert(!method.is_null() , "method should not be null"); | |
1297 | |
1298 KlassHandle recv_klass; // Default to NULL (use of ?: can confuse gcc) | |
1299 if (recv.not_null()) recv_klass = KlassHandle(THREAD, recv->klass()); | |
1300 KlassHandle spec_klass (THREAD, method->method_holder()); | |
1301 Symbol* name = method->name(); | |
1302 Symbol* signature = method->signature(); | |
1303 CallInfo info; | |
1304 LinkResolver::resolve_interface_call(info, recv, recv_klass, spec_klass, name, signature, KlassHandle(), false, true, CHECK_(methodHandle())); | |
1305 return info.selected_method(); | |
1306 } | |
1307 | |
1308 static methodHandle jni_resolve_virtual_call(Handle recv, methodHandle method, TRAPS) { | |
1309 assert(!method.is_null() , "method should not be null"); | |
1310 | |
1311 KlassHandle recv_klass; // Default to NULL (use of ?: can confuse gcc) | |
1312 if (recv.not_null()) recv_klass = KlassHandle(THREAD, recv->klass()); | |
1313 KlassHandle spec_klass (THREAD, method->method_holder()); | |
1314 Symbol* name = method->name(); | |
1315 Symbol* signature = method->signature(); | |
1316 CallInfo info; | |
1317 LinkResolver::resolve_virtual_call(info, recv, recv_klass, spec_klass, name, signature, KlassHandle(), false, true, CHECK_(methodHandle())); | |
1318 return info.selected_method(); | |
1319 } | |
1320 | |
1321 | 1295 |
1322 | 1296 |
1323 static void jni_invoke_static(JNIEnv *env, JavaValue* result, jobject receiver, JNICallType call_type, jmethodID method_id, JNI_ArgumentPusher *args, TRAPS) { | 1297 static void jni_invoke_static(JNIEnv *env, JavaValue* result, jobject receiver, JNICallType call_type, jmethodID method_id, JNI_ArgumentPusher *args, TRAPS) { |
1324 methodHandle method(THREAD, Method::resolve_jmethod_id(method_id)); | 1298 methodHandle method(THREAD, Method::resolve_jmethod_id(method_id)); |
1325 | 1299 |
5054 unit_test_function_call | 5028 unit_test_function_call |
5055 | 5029 |
5056 void execute_internal_vm_tests() { | 5030 void execute_internal_vm_tests() { |
5057 if (ExecuteInternalVMTests) { | 5031 if (ExecuteInternalVMTests) { |
5058 tty->print_cr("Running internal VM tests"); | 5032 tty->print_cr("Running internal VM tests"); |
5033 run_unit_test(GlobalDefinitions::test_globals()); | |
5059 run_unit_test(arrayOopDesc::test_max_array_length()); | 5034 run_unit_test(arrayOopDesc::test_max_array_length()); |
5060 run_unit_test(CollectedHeap::test_is_in()); | 5035 run_unit_test(CollectedHeap::test_is_in()); |
5061 run_unit_test(QuickSort::test_quick_sort()); | 5036 run_unit_test(QuickSort::test_quick_sort()); |
5062 run_unit_test(AltHashing::test_alt_hash()); | 5037 run_unit_test(AltHashing::test_alt_hash()); |
5063 #if INCLUDE_VM_STRUCTS | 5038 #if INCLUDE_VM_STRUCTS |