Mercurial > hg > truffle
comparison src/share/vm/prims/jni.cpp @ 9062:8be1318fbe77
Merge
author | dcubed |
---|---|
date | Fri, 05 Apr 2013 10:38:08 -0700 |
parents | cc32ccaaf47f |
children | 89e4d67fdd2a 6702da6b6082 |
comparison
equal
deleted
inserted
replaced
9055:dcdeb150988c | 9062:8be1318fbe77 |
---|---|
1287 JNI_STATIC, | 1287 JNI_STATIC, |
1288 JNI_VIRTUAL, | 1288 JNI_VIRTUAL, |
1289 JNI_NONVIRTUAL | 1289 JNI_NONVIRTUAL |
1290 }; | 1290 }; |
1291 | 1291 |
1292 static methodHandle jni_resolve_interface_call(Handle recv, methodHandle method, TRAPS) { | |
1293 assert(!method.is_null() , "method should not be null"); | |
1294 | |
1295 KlassHandle recv_klass; // Default to NULL (use of ?: can confuse gcc) | |
1296 if (recv.not_null()) recv_klass = KlassHandle(THREAD, recv->klass()); | |
1297 KlassHandle spec_klass (THREAD, method->method_holder()); | |
1298 Symbol* name = method->name(); | |
1299 Symbol* signature = method->signature(); | |
1300 CallInfo info; | |
1301 LinkResolver::resolve_interface_call(info, recv, recv_klass, spec_klass, name, signature, KlassHandle(), false, true, CHECK_(methodHandle())); | |
1302 return info.selected_method(); | |
1303 } | |
1304 | |
1305 static methodHandle jni_resolve_virtual_call(Handle recv, methodHandle method, TRAPS) { | |
1306 assert(!method.is_null() , "method should not be null"); | |
1307 | |
1308 KlassHandle recv_klass; // Default to NULL (use of ?: can confuse gcc) | |
1309 if (recv.not_null()) recv_klass = KlassHandle(THREAD, recv->klass()); | |
1310 KlassHandle spec_klass (THREAD, method->method_holder()); | |
1311 Symbol* name = method->name(); | |
1312 Symbol* signature = method->signature(); | |
1313 CallInfo info; | |
1314 LinkResolver::resolve_virtual_call(info, recv, recv_klass, spec_klass, name, signature, KlassHandle(), false, true, CHECK_(methodHandle())); | |
1315 return info.selected_method(); | |
1316 } | |
1317 | |
1318 | 1292 |
1319 | 1293 |
1320 static void jni_invoke_static(JNIEnv *env, JavaValue* result, jobject receiver, JNICallType call_type, jmethodID method_id, JNI_ArgumentPusher *args, TRAPS) { | 1294 static void jni_invoke_static(JNIEnv *env, JavaValue* result, jobject receiver, JNICallType call_type, jmethodID method_id, JNI_ArgumentPusher *args, TRAPS) { |
1321 methodHandle method(THREAD, Method::resolve_jmethod_id(method_id)); | 1295 methodHandle method(THREAD, Method::resolve_jmethod_id(method_id)); |
1322 | 1296 |
5051 unit_test_function_call | 5025 unit_test_function_call |
5052 | 5026 |
5053 void execute_internal_vm_tests() { | 5027 void execute_internal_vm_tests() { |
5054 if (ExecuteInternalVMTests) { | 5028 if (ExecuteInternalVMTests) { |
5055 tty->print_cr("Running internal VM tests"); | 5029 tty->print_cr("Running internal VM tests"); |
5030 run_unit_test(GlobalDefinitions::test_globals()); | |
5056 run_unit_test(arrayOopDesc::test_max_array_length()); | 5031 run_unit_test(arrayOopDesc::test_max_array_length()); |
5057 run_unit_test(CollectedHeap::test_is_in()); | 5032 run_unit_test(CollectedHeap::test_is_in()); |
5058 run_unit_test(QuickSort::test_quick_sort()); | 5033 run_unit_test(QuickSort::test_quick_sort()); |
5059 run_unit_test(AltHashing::test_alt_hash()); | 5034 run_unit_test(AltHashing::test_alt_hash()); |
5060 #if INCLUDE_VM_STRUCTS | 5035 #if INCLUDE_VM_STRUCTS |