diff options
Diffstat (limited to 'src/compiler_llvm')
| -rw-r--r-- | src/compiler_llvm/art_module.ll | 166 | ||||
| -rw-r--r-- | src/compiler_llvm/generated/art_module.cc | 828 | ||||
| -rw-r--r-- | src/compiler_llvm/procedure_linkage_table.cc | 4 | ||||
| -rw-r--r-- | src/compiler_llvm/runtime_support_func_list.h | 110 | ||||
| -rw-r--r-- | src/compiler_llvm/runtime_support_llvm.cc | 231 | ||||
| -rw-r--r-- | src/compiler_llvm/runtime_support_llvm.h | 51 |
6 files changed, 651 insertions, 739 deletions
diff --git a/src/compiler_llvm/art_module.ll b/src/compiler_llvm/art_module.ll index 32f9b51866..233692c079 100644 --- a/src/compiler_llvm/art_module.ll +++ b/src/compiler_llvm/art_module.ll @@ -35,17 +35,16 @@ declare void @__art_type_list(%JavaObject*, %ShadowFrame*) ; Thread ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -declare %JavaObject* @art_get_current_thread_from_code() -declare %JavaObject* @art_set_current_thread_from_code(%JavaObject*) +declare %JavaObject* @art_portable_get_current_thread_from_code() +declare %JavaObject* @art_portable_set_current_thread_from_code(%JavaObject*) -declare void @art_lock_object_from_code(%JavaObject*, %JavaObject*) -declare void @art_unlock_object_from_code(%JavaObject*, %JavaObject*) +declare void @art_portable_lock_object_from_code(%JavaObject*, %JavaObject*) +declare void @art_portable_unlock_object_from_code(%JavaObject*, %JavaObject*) -declare void @art_test_suspend_from_code(%JavaObject*) +declare void @art_portable_test_suspend_from_code(%JavaObject*) -declare %ShadowFrame* @art_push_shadow_frame_from_code(%JavaObject*, %ShadowFrame*, - %JavaObject*, i32) -declare void @art_pop_shadow_frame_from_code(%ShadowFrame*) +declare %ShadowFrame* @art_portable_push_shadow_frame_from_code(%JavaObject*, %ShadowFrame*, %JavaObject*, i32) +declare void @art_portable_pop_shadow_frame_from_code(%ShadowFrame*) @@ -53,15 +52,15 @@ declare void @art_pop_shadow_frame_from_code(%ShadowFrame*) ; Exception ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -declare %JavaObject* @art_get_and_clear_exception(%JavaObject*) -declare void @art_throw_div_zero_from_code() -declare void @art_throw_array_bounds_from_code(i32, i32) -declare void @art_throw_no_such_method_from_code(i32) -declare void @art_throw_null_pointer_exception_from_code(i32) -declare void @art_throw_stack_overflow_from_code() -declare void @art_throw_exception_from_code(%JavaObject*) +declare %JavaObject* @art_portable_get_and_clear_exception(%JavaObject*) +declare void @art_portable_throw_div_zero_from_code() +declare void @art_portable_throw_array_bounds_from_code(i32, i32) +declare void @art_portable_throw_no_such_method_from_code(i32) +declare void @art_portable_throw_null_pointer_exception_from_code(i32) +declare void @art_portable_throw_stack_overflow_from_code() +declare void @art_portable_throw_exception_from_code(%JavaObject*) -declare i32 @art_find_catch_block_from_code(%JavaObject*, i32) +declare i32 @art_portable_find_catch_block_from_code(%JavaObject*, i32) @@ -69,91 +68,58 @@ declare i32 @art_find_catch_block_from_code(%JavaObject*, i32) ; Object Space ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -declare %JavaObject* @art_alloc_object_from_code(i32, %JavaObject*, %JavaObject*) -declare %JavaObject* @art_alloc_object_from_code_with_access_check( - i32, %JavaObject*, %JavaObject*) +declare %JavaObject* @art_portable_alloc_object_from_code(i32, %JavaObject*, %JavaObject*) +declare %JavaObject* @art_portable_alloc_object_from_code_with_access_check(i32, %JavaObject*, %JavaObject*) -declare %JavaObject* @art_alloc_array_from_code(i32, %JavaObject*, i32, %JavaObject*) -declare %JavaObject* @art_alloc_array_from_code_with_access_check( - i32, %JavaObject*, i32, %JavaObject*) -declare %JavaObject* @art_check_and_alloc_array_from_code( - i32, %JavaObject*, i32, %JavaObject*) -declare %JavaObject* @art_check_and_alloc_array_from_code_with_access_check( - i32, %JavaObject*, i32, %JavaObject*) +declare %JavaObject* @art_portable_alloc_array_from_code(i32, %JavaObject*, i32, %JavaObject*) +declare %JavaObject* @art_portable_alloc_array_from_code_with_access_check(i32, %JavaObject*, i32, %JavaObject*) +declare %JavaObject* @art_portable_check_and_alloc_array_from_code(i32, %JavaObject*, i32, %JavaObject*) +declare %JavaObject* @art_portable_check_and_alloc_array_from_code_with_access_check(i32, %JavaObject*, i32, %JavaObject*) -declare void @art_find_instance_field_from_code(i32, %JavaObject*) -declare void @art_find_static_field_from_code(i32, %JavaObject*) +declare void @art_portable_find_instance_field_from_code(i32, %JavaObject*) +declare void @art_portable_find_static_field_from_code(i32, %JavaObject*) -declare %JavaObject* @art_find_static_method_from_code_with_access_check( - i32, %JavaObject*, %JavaObject*, %JavaObject*) -declare %JavaObject* @art_find_direct_method_from_code_with_access_check( - i32, %JavaObject*, %JavaObject*, %JavaObject*) -declare %JavaObject* @art_find_virtual_method_from_code_with_access_check( - i32, %JavaObject*, %JavaObject*, %JavaObject*) -declare %JavaObject* @art_find_super_method_from_code_with_access_check( - i32, %JavaObject*, %JavaObject*, %JavaObject*) -declare %JavaObject* @art_find_interface_method_from_code_with_access_check( - i32, %JavaObject*, %JavaObject*, %JavaObject*) -declare %JavaObject* @art_find_interface_method_from_code( - i32, %JavaObject*, %JavaObject*, %JavaObject*) +declare %JavaObject* @art_portable_find_static_method_from_code_with_access_check(i32, %JavaObject*, %JavaObject*, %JavaObject*) +declare %JavaObject* @art_portable_find_direct_method_from_code_with_access_check(i32, %JavaObject*, %JavaObject*, %JavaObject*) +declare %JavaObject* @art_portable_find_virtual_method_from_code_with_access_check(i32, %JavaObject*, %JavaObject*, %JavaObject*) +declare %JavaObject* @art_portable_find_super_method_from_code_with_access_check(i32, %JavaObject*, %JavaObject*, %JavaObject*) +declare %JavaObject* @art_portable_find_interface_method_from_code_with_access_check(i32, %JavaObject*, %JavaObject*, %JavaObject*) +declare %JavaObject* @art_portable_find_interface_method_from_code(i32, %JavaObject*, %JavaObject*, %JavaObject*) -declare %JavaObject* @art_initialize_static_storage_from_code(i32, %JavaObject*, %JavaObject*) -declare %JavaObject* @art_initialize_type_from_code(i32, %JavaObject*, %JavaObject*) -declare %JavaObject* @art_initialize_type_and_verify_access_from_code( - i32, %JavaObject*, %JavaObject*) +declare %JavaObject* @art_portable_initialize_static_storage_from_code(i32, %JavaObject*, %JavaObject*) +declare %JavaObject* @art_portable_initialize_type_from_code(i32, %JavaObject*, %JavaObject*) +declare %JavaObject* @art_portable_initialize_type_and_verify_access_from_code(i32, %JavaObject*, %JavaObject*) -declare %JavaObject* @art_resolve_string_from_code(%JavaObject*, i32) +declare %JavaObject* @art_portable_resolve_string_from_code(%JavaObject*, i32) -declare i32 @art_set32_static_from_code(i32, %JavaObject*, i32) -declare i32 @art_set64_static_from_code(i32, %JavaObject*, i64) -declare i32 @art_set_obj_static_from_code(i32, %JavaObject*, %JavaObject*) +declare i32 @art_portable_set32_static_from_code(i32, %JavaObject*, i32) +declare i32 @art_portable_set64_static_from_code(i32, %JavaObject*, i64) +declare i32 @art_portable_set_obj_static_from_code(i32, %JavaObject*, %JavaObject*) -declare i32 @art_get32_static_from_code(i32, %JavaObject*) -declare i64 @art_get64_static_from_code(i32, %JavaObject*) -declare %JavaObject* @art_get_obj_static_from_code(i32, %JavaObject*) +declare i32 @art_portable_get32_static_from_code(i32, %JavaObject*) +declare i64 @art_portable_get64_static_from_code(i32, %JavaObject*) +declare %JavaObject* @art_portable_get_obj_static_from_code(i32, %JavaObject*) -declare i32 @art_set32_instance_from_code(i32, - %JavaObject*, - %JavaObject*, - i32) +declare i32 @art_portable_set32_instance_from_code(i32, %JavaObject*, %JavaObject*, i32) +declare i32 @art_portable_set64_instance_from_code(i32, %JavaObject*, %JavaObject*, i64) +declare i32 @art_portable_set_obj_instance_from_code(i32, %JavaObject*, %JavaObject*, %JavaObject*) -declare i32 @art_set64_instance_from_code(i32, - %JavaObject*, - %JavaObject*, - i64) +declare i32 @art_portable_get32_instance_from_code(i32, %JavaObject*, %JavaObject*) +declare i64 @art_portable_get64_instance_from_code(i32, %JavaObject*, %JavaObject*) +declare %JavaObject* @art_portable_get_obj_instance_from_code(i32, %JavaObject*, %JavaObject*) -declare i32 @art_set_obj_instance_from_code(i32, - %JavaObject*, - %JavaObject*, - %JavaObject*) +declare %JavaObject* @art_portable_decode_jobject_in_thread(%JavaObject*, %JavaObject*) -declare i32 @art_get32_instance_from_code(i32, - %JavaObject*, - %JavaObject*) - -declare i64 @art_get64_instance_from_code(i32, - %JavaObject*, - %JavaObject*) - -declare %JavaObject* @art_get_obj_instance_from_code(i32, - %JavaObject*, - %JavaObject*) - -declare %JavaObject* @art_decode_jobject_in_thread(%JavaObject*, - %JavaObject*) - - -declare void @art_fill_array_data_from_code(%JavaObject*, i32, - %JavaObject*, i32) +declare void @art_portable_fill_array_data_from_code(%JavaObject*, i32, %JavaObject*, i32) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Type Checking, in the nature of casting ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -declare i32 @art_is_assignable_from_code(%JavaObject*, %JavaObject*) -declare void @art_check_cast_from_code(%JavaObject*, %JavaObject*) -declare void @art_check_put_array_element_from_code(%JavaObject*, %JavaObject*) +declare i32 @art_portable_is_assignable_from_code(%JavaObject*, %JavaObject*) +declare void @art_portable_check_cast_from_code(%JavaObject*, %JavaObject*) +declare void @art_portable_check_put_array_element_from_code(%JavaObject*, %JavaObject*) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Math @@ -168,34 +134,20 @@ declare i32 @art_f2i(float) ; JNI ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -declare i32 @art_jni_method_start(%JavaObject*) - -declare i32 @art_jni_method_start_synchronized(%JavaObject*, - %JavaObject*) - -declare void @art_jni_method_end(i32, - %JavaObject*) - - -declare void @art_jni_method_end_synchronized(i32, - %JavaObject*, - %JavaObject*) - -declare %JavaObject* @art_jni_method_end_with_reference(%JavaObject*, - i32, - %JavaObject*) +declare i32 @art_portable_jni_method_start(%JavaObject*) +declare i32 @art_portable_jni_method_start_synchronized(%JavaObject*, %JavaObject*) -declare %JavaObject* @art_jni_method_end_with_reference_synchronized(%JavaObject*, - i32, - %JavaObject*, - %JavaObject*) +declare void @art_portable_jni_method_end(i32, %JavaObject*) +declare void @art_portable_jni_method_end_synchronized(i32, %JavaObject*, %JavaObject*) +declare %JavaObject* @art_portable_jni_method_end_with_reference(%JavaObject*, i32, %JavaObject*) +declare %JavaObject* @art_portable_jni_method_end_with_reference_synchronized(%JavaObject*, i32, %JavaObject*, %JavaObject*) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Temporary runtime support, will be removed in the future ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -declare i1 @art_is_exception_pending_from_code() +declare i1 @art_portable_is_exception_pending_from_code() -declare void @art_mark_gc_card_from_code(%JavaObject*, %JavaObject*) +declare void @art_portable_mark_gc_card_from_code(%JavaObject*, %JavaObject*) -declare void @art_proxy_invoke_handler_from_code(%JavaObject*, ...) +declare void @art_portable_proxy_invoke_handler_from_code(%JavaObject*, ...) diff --git a/src/compiler_llvm/generated/art_module.cc b/src/compiler_llvm/generated/art_module.cc index ef8d6da2e5..f794be10e3 100644 --- a/src/compiler_llvm/generated/art_module.cc +++ b/src/compiler_llvm/generated/art_module.cc @@ -1,4 +1,4 @@ -// Generated with tools/gen_art_module_cc.sh +// Generated with ../tools/gen_art_module_cc.sh #pragma GCC diagnostic ignored "-Wframe-larger-than=" @@ -386,555 +386,555 @@ func___art_type_list->setCallingConv(CallingConv::C); AttrListPtr func___art_type_list_PAL; func___art_type_list->setAttributes(func___art_type_list_PAL); -Function* func_art_get_current_thread_from_code = mod->getFunction("art_get_current_thread_from_code"); -if (!func_art_get_current_thread_from_code) { -func_art_get_current_thread_from_code = Function::Create( +Function* func_art_portable_get_current_thread_from_code = mod->getFunction("art_portable_get_current_thread_from_code"); +if (!func_art_portable_get_current_thread_from_code) { +func_art_portable_get_current_thread_from_code = Function::Create( /*Type=*/FuncTy_3, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_get_current_thread_from_code", mod); // (external, no body) -func_art_get_current_thread_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_get_current_thread_from_code", mod); // (external, no body) +func_art_portable_get_current_thread_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_get_current_thread_from_code_PAL; -func_art_get_current_thread_from_code->setAttributes(func_art_get_current_thread_from_code_PAL); +AttrListPtr func_art_portable_get_current_thread_from_code_PAL; +func_art_portable_get_current_thread_from_code->setAttributes(func_art_portable_get_current_thread_from_code_PAL); -Function* func_art_set_current_thread_from_code = mod->getFunction("art_set_current_thread_from_code"); -if (!func_art_set_current_thread_from_code) { -func_art_set_current_thread_from_code = Function::Create( +Function* func_art_portable_set_current_thread_from_code = mod->getFunction("art_portable_set_current_thread_from_code"); +if (!func_art_portable_set_current_thread_from_code) { +func_art_portable_set_current_thread_from_code = Function::Create( /*Type=*/FuncTy_4, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_set_current_thread_from_code", mod); // (external, no body) -func_art_set_current_thread_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_set_current_thread_from_code", mod); // (external, no body) +func_art_portable_set_current_thread_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_set_current_thread_from_code_PAL; -func_art_set_current_thread_from_code->setAttributes(func_art_set_current_thread_from_code_PAL); +AttrListPtr func_art_portable_set_current_thread_from_code_PAL; +func_art_portable_set_current_thread_from_code->setAttributes(func_art_portable_set_current_thread_from_code_PAL); -Function* func_art_lock_object_from_code = mod->getFunction("art_lock_object_from_code"); -if (!func_art_lock_object_from_code) { -func_art_lock_object_from_code = Function::Create( +Function* func_art_portable_lock_object_from_code = mod->getFunction("art_portable_lock_object_from_code"); +if (!func_art_portable_lock_object_from_code) { +func_art_portable_lock_object_from_code = Function::Create( /*Type=*/FuncTy_5, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_lock_object_from_code", mod); // (external, no body) -func_art_lock_object_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_lock_object_from_code", mod); // (external, no body) +func_art_portable_lock_object_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_lock_object_from_code_PAL; -func_art_lock_object_from_code->setAttributes(func_art_lock_object_from_code_PAL); +AttrListPtr func_art_portable_lock_object_from_code_PAL; +func_art_portable_lock_object_from_code->setAttributes(func_art_portable_lock_object_from_code_PAL); -Function* func_art_unlock_object_from_code = mod->getFunction("art_unlock_object_from_code"); -if (!func_art_unlock_object_from_code) { -func_art_unlock_object_from_code = Function::Create( +Function* func_art_portable_unlock_object_from_code = mod->getFunction("art_portable_unlock_object_from_code"); +if (!func_art_portable_unlock_object_from_code) { +func_art_portable_unlock_object_from_code = Function::Create( /*Type=*/FuncTy_5, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_unlock_object_from_code", mod); // (external, no body) -func_art_unlock_object_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_unlock_object_from_code", mod); // (external, no body) +func_art_portable_unlock_object_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_unlock_object_from_code_PAL; -func_art_unlock_object_from_code->setAttributes(func_art_unlock_object_from_code_PAL); +AttrListPtr func_art_portable_unlock_object_from_code_PAL; +func_art_portable_unlock_object_from_code->setAttributes(func_art_portable_unlock_object_from_code_PAL); -Function* func_art_test_suspend_from_code = mod->getFunction("art_test_suspend_from_code"); -if (!func_art_test_suspend_from_code) { -func_art_test_suspend_from_code = Function::Create( +Function* func_art_portable_test_suspend_from_code = mod->getFunction("art_portable_test_suspend_from_code"); +if (!func_art_portable_test_suspend_from_code) { +func_art_portable_test_suspend_from_code = Function::Create( /*Type=*/FuncTy_6, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_test_suspend_from_code", mod); // (external, no body) -func_art_test_suspend_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_test_suspend_from_code", mod); // (external, no body) +func_art_portable_test_suspend_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_test_suspend_from_code_PAL; -func_art_test_suspend_from_code->setAttributes(func_art_test_suspend_from_code_PAL); +AttrListPtr func_art_portable_test_suspend_from_code_PAL; +func_art_portable_test_suspend_from_code->setAttributes(func_art_portable_test_suspend_from_code_PAL); -Function* func_art_push_shadow_frame_from_code = mod->getFunction("art_push_shadow_frame_from_code"); -if (!func_art_push_shadow_frame_from_code) { -func_art_push_shadow_frame_from_code = Function::Create( +Function* func_art_portable_push_shadow_frame_from_code = mod->getFunction("art_portable_push_shadow_frame_from_code"); +if (!func_art_portable_push_shadow_frame_from_code) { +func_art_portable_push_shadow_frame_from_code = Function::Create( /*Type=*/FuncTy_7, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_push_shadow_frame_from_code", mod); // (external, no body) -func_art_push_shadow_frame_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_push_shadow_frame_from_code", mod); // (external, no body) +func_art_portable_push_shadow_frame_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_push_shadow_frame_from_code_PAL; -func_art_push_shadow_frame_from_code->setAttributes(func_art_push_shadow_frame_from_code_PAL); +AttrListPtr func_art_portable_push_shadow_frame_from_code_PAL; +func_art_portable_push_shadow_frame_from_code->setAttributes(func_art_portable_push_shadow_frame_from_code_PAL); -Function* func_art_pop_shadow_frame_from_code = mod->getFunction("art_pop_shadow_frame_from_code"); -if (!func_art_pop_shadow_frame_from_code) { -func_art_pop_shadow_frame_from_code = Function::Create( +Function* func_art_portable_pop_shadow_frame_from_code = mod->getFunction("art_portable_pop_shadow_frame_from_code"); +if (!func_art_portable_pop_shadow_frame_from_code) { +func_art_portable_pop_shadow_frame_from_code = Function::Create( /*Type=*/FuncTy_8, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_pop_shadow_frame_from_code", mod); // (external, no body) -func_art_pop_shadow_frame_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_pop_shadow_frame_from_code", mod); // (external, no body) +func_art_portable_pop_shadow_frame_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_pop_shadow_frame_from_code_PAL; -func_art_pop_shadow_frame_from_code->setAttributes(func_art_pop_shadow_frame_from_code_PAL); +AttrListPtr func_art_portable_pop_shadow_frame_from_code_PAL; +func_art_portable_pop_shadow_frame_from_code->setAttributes(func_art_portable_pop_shadow_frame_from_code_PAL); -Function* func_art_get_and_clear_exception = mod->getFunction("art_get_and_clear_exception"); -if (!func_art_get_and_clear_exception) { -func_art_get_and_clear_exception = Function::Create( +Function* func_art_portable_get_and_clear_exception = mod->getFunction("art_portable_get_and_clear_exception"); +if (!func_art_portable_get_and_clear_exception) { +func_art_portable_get_and_clear_exception = Function::Create( /*Type=*/FuncTy_4, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_get_and_clear_exception", mod); // (external, no body) -func_art_get_and_clear_exception->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_get_and_clear_exception", mod); // (external, no body) +func_art_portable_get_and_clear_exception->setCallingConv(CallingConv::C); } -AttrListPtr func_art_get_and_clear_exception_PAL; -func_art_get_and_clear_exception->setAttributes(func_art_get_and_clear_exception_PAL); +AttrListPtr func_art_portable_get_and_clear_exception_PAL; +func_art_portable_get_and_clear_exception->setAttributes(func_art_portable_get_and_clear_exception_PAL); -Function* func_art_throw_div_zero_from_code = mod->getFunction("art_throw_div_zero_from_code"); -if (!func_art_throw_div_zero_from_code) { -func_art_throw_div_zero_from_code = Function::Create( +Function* func_art_portable_throw_div_zero_from_code = mod->getFunction("art_portable_throw_div_zero_from_code"); +if (!func_art_portable_throw_div_zero_from_code) { +func_art_portable_throw_div_zero_from_code = Function::Create( /*Type=*/FuncTy_9, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_throw_div_zero_from_code", mod); // (external, no body) -func_art_throw_div_zero_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_throw_div_zero_from_code", mod); // (external, no body) +func_art_portable_throw_div_zero_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_throw_div_zero_from_code_PAL; -func_art_throw_div_zero_from_code->setAttributes(func_art_throw_div_zero_from_code_PAL); +AttrListPtr func_art_portable_throw_div_zero_from_code_PAL; +func_art_portable_throw_div_zero_from_code->setAttributes(func_art_portable_throw_div_zero_from_code_PAL); -Function* func_art_throw_array_bounds_from_code = mod->getFunction("art_throw_array_bounds_from_code"); -if (!func_art_throw_array_bounds_from_code) { -func_art_throw_array_bounds_from_code = Function::Create( +Function* func_art_portable_throw_array_bounds_from_code = mod->getFunction("art_portable_throw_array_bounds_from_code"); +if (!func_art_portable_throw_array_bounds_from_code) { +func_art_portable_throw_array_bounds_from_code = Function::Create( /*Type=*/FuncTy_10, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_throw_array_bounds_from_code", mod); // (external, no body) -func_art_throw_array_bounds_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_throw_array_bounds_from_code", mod); // (external, no body) +func_art_portable_throw_array_bounds_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_throw_array_bounds_from_code_PAL; -func_art_throw_array_bounds_from_code->setAttributes(func_art_throw_array_bounds_from_code_PAL); +AttrListPtr func_art_portable_throw_array_bounds_from_code_PAL; +func_art_portable_throw_array_bounds_from_code->setAttributes(func_art_portable_throw_array_bounds_from_code_PAL); -Function* func_art_throw_no_such_method_from_code = mod->getFunction("art_throw_no_such_method_from_code"); -if (!func_art_throw_no_such_method_from_code) { -func_art_throw_no_such_method_from_code = Function::Create( +Function* func_art_portable_throw_no_such_method_from_code = mod->getFunction("art_portable_throw_no_such_method_from_code"); +if (!func_art_portable_throw_no_such_method_from_code) { +func_art_portable_throw_no_such_method_from_code = Function::Create( /*Type=*/FuncTy_11, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_throw_no_such_method_from_code", mod); // (external, no body) -func_art_throw_no_such_method_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_throw_no_such_method_from_code", mod); // (external, no body) +func_art_portable_throw_no_such_method_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_throw_no_such_method_from_code_PAL; -func_art_throw_no_such_method_from_code->setAttributes(func_art_throw_no_such_method_from_code_PAL); +AttrListPtr func_art_portable_throw_no_such_method_from_code_PAL; +func_art_portable_throw_no_such_method_from_code->setAttributes(func_art_portable_throw_no_such_method_from_code_PAL); -Function* func_art_throw_null_pointer_exception_from_code = mod->getFunction("art_throw_null_pointer_exception_from_code"); -if (!func_art_throw_null_pointer_exception_from_code) { -func_art_throw_null_pointer_exception_from_code = Function::Create( +Function* func_art_portable_throw_null_pointer_exception_from_code = mod->getFunction("art_portable_throw_null_pointer_exception_from_code"); +if (!func_art_portable_throw_null_pointer_exception_from_code) { +func_art_portable_throw_null_pointer_exception_from_code = Function::Create( /*Type=*/FuncTy_11, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_throw_null_pointer_exception_from_code", mod); // (external, no body) -func_art_throw_null_pointer_exception_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_throw_null_pointer_exception_from_code", mod); // (external, no body) +func_art_portable_throw_null_pointer_exception_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_throw_null_pointer_exception_from_code_PAL; -func_art_throw_null_pointer_exception_from_code->setAttributes(func_art_throw_null_pointer_exception_from_code_PAL); +AttrListPtr func_art_portable_throw_null_pointer_exception_from_code_PAL; +func_art_portable_throw_null_pointer_exception_from_code->setAttributes(func_art_portable_throw_null_pointer_exception_from_code_PAL); -Function* func_art_throw_stack_overflow_from_code = mod->getFunction("art_throw_stack_overflow_from_code"); -if (!func_art_throw_stack_overflow_from_code) { -func_art_throw_stack_overflow_from_code = Function::Create( +Function* func_art_portable_throw_stack_overflow_from_code = mod->getFunction("art_portable_throw_stack_overflow_from_code"); +if (!func_art_portable_throw_stack_overflow_from_code) { +func_art_portable_throw_stack_overflow_from_code = Function::Create( /*Type=*/FuncTy_9, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_throw_stack_overflow_from_code", mod); // (external, no body) -func_art_throw_stack_overflow_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_throw_stack_overflow_from_code", mod); // (external, no body) +func_art_portable_throw_stack_overflow_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_throw_stack_overflow_from_code_PAL; -func_art_throw_stack_overflow_from_code->setAttributes(func_art_throw_stack_overflow_from_code_PAL); +AttrListPtr func_art_portable_throw_stack_overflow_from_code_PAL; +func_art_portable_throw_stack_overflow_from_code->setAttributes(func_art_portable_throw_stack_overflow_from_code_PAL); -Function* func_art_throw_exception_from_code = mod->getFunction("art_throw_exception_from_code"); -if (!func_art_throw_exception_from_code) { -func_art_throw_exception_from_code = Function::Create( +Function* func_art_portable_throw_exception_from_code = mod->getFunction("art_portable_throw_exception_from_code"); +if (!func_art_portable_throw_exception_from_code) { +func_art_portable_throw_exception_from_code = Function::Create( /*Type=*/FuncTy_6, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_throw_exception_from_code", mod); // (external, no body) -func_art_throw_exception_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_throw_exception_from_code", mod); // (external, no body) +func_art_portable_throw_exception_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_throw_exception_from_code_PAL; -func_art_throw_exception_from_code->setAttributes(func_art_throw_exception_from_code_PAL); +AttrListPtr func_art_portable_throw_exception_from_code_PAL; +func_art_portable_throw_exception_from_code->setAttributes(func_art_portable_throw_exception_from_code_PAL); -Function* func_art_find_catch_block_from_code = mod->getFunction("art_find_catch_block_from_code"); -if (!func_art_find_catch_block_from_code) { -func_art_find_catch_block_from_code = Function::Create( +Function* func_art_portable_find_catch_block_from_code = mod->getFunction("art_portable_find_catch_block_from_code"); +if (!func_art_portable_find_catch_block_from_code) { +func_art_portable_find_catch_block_from_code = Function::Create( /*Type=*/FuncTy_12, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_find_catch_block_from_code", mod); // (external, no body) -func_art_find_catch_block_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_find_catch_block_from_code", mod); // (external, no body) +func_art_portable_find_catch_block_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_find_catch_block_from_code_PAL; -func_art_find_catch_block_from_code->setAttributes(func_art_find_catch_block_from_code_PAL); +AttrListPtr func_art_portable_find_catch_block_from_code_PAL; +func_art_portable_find_catch_block_from_code->setAttributes(func_art_portable_find_catch_block_from_code_PAL); -Function* func_art_alloc_object_from_code = mod->getFunction("art_alloc_object_from_code"); -if (!func_art_alloc_object_from_code) { -func_art_alloc_object_from_code = Function::Create( +Function* func_art_portable_alloc_object_from_code = mod->getFunction("art_portable_alloc_object_from_code"); +if (!func_art_portable_alloc_object_from_code) { +func_art_portable_alloc_object_from_code = Function::Create( /*Type=*/FuncTy_13, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_alloc_object_from_code", mod); // (external, no body) -func_art_alloc_object_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_alloc_object_from_code", mod); // (external, no body) +func_art_portable_alloc_object_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_alloc_object_from_code_PAL; -func_art_alloc_object_from_code->setAttributes(func_art_alloc_object_from_code_PAL); +AttrListPtr func_art_portable_alloc_object_from_code_PAL; +func_art_portable_alloc_object_from_code->setAttributes(func_art_portable_alloc_object_from_code_PAL); -Function* func_art_alloc_object_from_code_with_access_check = mod->getFunction("art_alloc_object_from_code_with_access_check"); -if (!func_art_alloc_object_from_code_with_access_check) { -func_art_alloc_object_from_code_with_access_check = Function::Create( +Function* func_art_portable_alloc_object_from_code_with_access_check = mod->getFunction("art_portable_alloc_object_from_code_with_access_check"); +if (!func_art_portable_alloc_object_from_code_with_access_check) { +func_art_portable_alloc_object_from_code_with_access_check = Function::Create( /*Type=*/FuncTy_13, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_alloc_object_from_code_with_access_check", mod); // (external, no body) -func_art_alloc_object_from_code_with_access_check->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_alloc_object_from_code_with_access_check", mod); // (external, no body) +func_art_portable_alloc_object_from_code_with_access_check->setCallingConv(CallingConv::C); } -AttrListPtr func_art_alloc_object_from_code_with_access_check_PAL; -func_art_alloc_object_from_code_with_access_check->setAttributes(func_art_alloc_object_from_code_with_access_check_PAL); +AttrListPtr func_art_portable_alloc_object_from_code_with_access_check_PAL; +func_art_portable_alloc_object_from_code_with_access_check->setAttributes(func_art_portable_alloc_object_from_code_with_access_check_PAL); -Function* func_art_alloc_array_from_code = mod->getFunction("art_alloc_array_from_code"); -if (!func_art_alloc_array_from_code) { -func_art_alloc_array_from_code = Function::Create( +Function* func_art_portable_alloc_array_from_code = mod->getFunction("art_portable_alloc_array_from_code"); +if (!func_art_portable_alloc_array_from_code) { +func_art_portable_alloc_array_from_code = Function::Create( /*Type=*/FuncTy_14, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_alloc_array_from_code", mod); // (external, no body) -func_art_alloc_array_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_alloc_array_from_code", mod); // (external, no body) +func_art_portable_alloc_array_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_alloc_array_from_code_PAL; -func_art_alloc_array_from_code->setAttributes(func_art_alloc_array_from_code_PAL); +AttrListPtr func_art_portable_alloc_array_from_code_PAL; +func_art_portable_alloc_array_from_code->setAttributes(func_art_portable_alloc_array_from_code_PAL); -Function* func_art_alloc_array_from_code_with_access_check = mod->getFunction("art_alloc_array_from_code_with_access_check"); -if (!func_art_alloc_array_from_code_with_access_check) { -func_art_alloc_array_from_code_with_access_check = Function::Create( +Function* func_art_portable_alloc_array_from_code_with_access_check = mod->getFunction("art_portable_alloc_array_from_code_with_access_check"); +if (!func_art_portable_alloc_array_from_code_with_access_check) { +func_art_portable_alloc_array_from_code_with_access_check = Function::Create( /*Type=*/FuncTy_14, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_alloc_array_from_code_with_access_check", mod); // (external, no body) -func_art_alloc_array_from_code_with_access_check->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_alloc_array_from_code_with_access_check", mod); // (external, no body) +func_art_portable_alloc_array_from_code_with_access_check->setCallingConv(CallingConv::C); } -AttrListPtr func_art_alloc_array_from_code_with_access_check_PAL; -func_art_alloc_array_from_code_with_access_check->setAttributes(func_art_alloc_array_from_code_with_access_check_PAL); +AttrListPtr func_art_portable_alloc_array_from_code_with_access_check_PAL; +func_art_portable_alloc_array_from_code_with_access_check->setAttributes(func_art_portable_alloc_array_from_code_with_access_check_PAL); -Function* func_art_check_and_alloc_array_from_code = mod->getFunction("art_check_and_alloc_array_from_code"); -if (!func_art_check_and_alloc_array_from_code) { -func_art_check_and_alloc_array_from_code = Function::Create( +Function* func_art_portable_check_and_alloc_array_from_code = mod->getFunction("art_portable_check_and_alloc_array_from_code"); +if (!func_art_portable_check_and_alloc_array_from_code) { +func_art_portable_check_and_alloc_array_from_code = Function::Create( /*Type=*/FuncTy_14, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_check_and_alloc_array_from_code", mod); // (external, no body) -func_art_check_and_alloc_array_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_check_and_alloc_array_from_code", mod); // (external, no body) +func_art_portable_check_and_alloc_array_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_check_and_alloc_array_from_code_PAL; -func_art_check_and_alloc_array_from_code->setAttributes(func_art_check_and_alloc_array_from_code_PAL); +AttrListPtr func_art_portable_check_and_alloc_array_from_code_PAL; +func_art_portable_check_and_alloc_array_from_code->setAttributes(func_art_portable_check_and_alloc_array_from_code_PAL); -Function* func_art_check_and_alloc_array_from_code_with_access_check = mod->getFunction("art_check_and_alloc_array_from_code_with_access_check"); -if (!func_art_check_and_alloc_array_from_code_with_access_check) { -func_art_check_and_alloc_array_from_code_with_access_check = Function::Create( +Function* func_art_portable_check_and_alloc_array_from_code_with_access_check = mod->getFunction("art_portable_check_and_alloc_array_from_code_with_access_check"); +if (!func_art_portable_check_and_alloc_array_from_code_with_access_check) { +func_art_portable_check_and_alloc_array_from_code_with_access_check = Function::Create( /*Type=*/FuncTy_14, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_check_and_alloc_array_from_code_with_access_check", mod); // (external, no body) -func_art_check_and_alloc_array_from_code_with_access_check->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_check_and_alloc_array_from_code_with_access_check", mod); // (external, no body) +func_art_portable_check_and_alloc_array_from_code_with_access_check->setCallingConv(CallingConv::C); } -AttrListPtr func_art_check_and_alloc_array_from_code_with_access_check_PAL; -func_art_check_and_alloc_array_from_code_with_access_check->setAttributes(func_art_check_and_alloc_array_from_code_with_access_check_PAL); +AttrListPtr func_art_portable_check_and_alloc_array_from_code_with_access_check_PAL; +func_art_portable_check_and_alloc_array_from_code_with_access_check->setAttributes(func_art_portable_check_and_alloc_array_from_code_with_access_check_PAL); -Function* func_art_find_instance_field_from_code = mod->getFunction("art_find_instance_field_from_code"); -if (!func_art_find_instance_field_from_code) { -func_art_find_instance_field_from_code = Function::Create( +Function* func_art_portable_find_instance_field_from_code = mod->getFunction("art_portable_find_instance_field_from_code"); +if (!func_art_portable_find_instance_field_from_code) { +func_art_portable_find_instance_field_from_code = Function::Create( /*Type=*/FuncTy_15, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_find_instance_field_from_code", mod); // (external, no body) -func_art_find_instance_field_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_find_instance_field_from_code", mod); // (external, no body) +func_art_portable_find_instance_field_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_find_instance_field_from_code_PAL; -func_art_find_instance_field_from_code->setAttributes(func_art_find_instance_field_from_code_PAL); +AttrListPtr func_art_portable_find_instance_field_from_code_PAL; +func_art_portable_find_instance_field_from_code->setAttributes(func_art_portable_find_instance_field_from_code_PAL); -Function* func_art_find_static_field_from_code = mod->getFunction("art_find_static_field_from_code"); -if (!func_art_find_static_field_from_code) { -func_art_find_static_field_from_code = Function::Create( +Function* func_art_portable_find_static_field_from_code = mod->getFunction("art_portable_find_static_field_from_code"); +if (!func_art_portable_find_static_field_from_code) { +func_art_portable_find_static_field_from_code = Function::Create( /*Type=*/FuncTy_15, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_find_static_field_from_code", mod); // (external, no body) -func_art_find_static_field_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_find_static_field_from_code", mod); // (external, no body) +func_art_portable_find_static_field_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_find_static_field_from_code_PAL; -func_art_find_static_field_from_code->setAttributes(func_art_find_static_field_from_code_PAL); +AttrListPtr func_art_portable_find_static_field_from_code_PAL; +func_art_portable_find_static_field_from_code->setAttributes(func_art_portable_find_static_field_from_code_PAL); -Function* func_art_find_static_method_from_code_with_access_check = mod->getFunction("art_find_static_method_from_code_with_access_check"); -if (!func_art_find_static_method_from_code_with_access_check) { -func_art_find_static_method_from_code_with_access_check = Function::Create( +Function* func_art_portable_find_static_method_from_code_with_access_check = mod->getFunction("art_portable_find_static_method_from_code_with_access_check"); +if (!func_art_portable_find_static_method_from_code_with_access_check) { +func_art_portable_find_static_method_from_code_with_access_check = Function::Create( /*Type=*/FuncTy_16, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_find_static_method_from_code_with_access_check", mod); // (external, no body) -func_art_find_static_method_from_code_with_access_check->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_find_static_method_from_code_with_access_check", mod); // (external, no body) +func_art_portable_find_static_method_from_code_with_access_check->setCallingConv(CallingConv::C); } -AttrListPtr func_art_find_static_method_from_code_with_access_check_PAL; -func_art_find_static_method_from_code_with_access_check->setAttributes(func_art_find_static_method_from_code_with_access_check_PAL); +AttrListPtr func_art_portable_find_static_method_from_code_with_access_check_PAL; +func_art_portable_find_static_method_from_code_with_access_check->setAttributes(func_art_portable_find_static_method_from_code_with_access_check_PAL); -Function* func_art_find_direct_method_from_code_with_access_check = mod->getFunction("art_find_direct_method_from_code_with_access_check"); -if (!func_art_find_direct_method_from_code_with_access_check) { -func_art_find_direct_method_from_code_with_access_check = Function::Create( +Function* func_art_portable_find_direct_method_from_code_with_access_check = mod->getFunction("art_portable_find_direct_method_from_code_with_access_check"); +if (!func_art_portable_find_direct_method_from_code_with_access_check) { +func_art_portable_find_direct_method_from_code_with_access_check = Function::Create( /*Type=*/FuncTy_16, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_find_direct_method_from_code_with_access_check", mod); // (external, no body) -func_art_find_direct_method_from_code_with_access_check->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_find_direct_method_from_code_with_access_check", mod); // (external, no body) +func_art_portable_find_direct_method_from_code_with_access_check->setCallingConv(CallingConv::C); } -AttrListPtr func_art_find_direct_method_from_code_with_access_check_PAL; -func_art_find_direct_method_from_code_with_access_check->setAttributes(func_art_find_direct_method_from_code_with_access_check_PAL); +AttrListPtr func_art_portable_find_direct_method_from_code_with_access_check_PAL; +func_art_portable_find_direct_method_from_code_with_access_check->setAttributes(func_art_portable_find_direct_method_from_code_with_access_check_PAL); -Function* func_art_find_virtual_method_from_code_with_access_check = mod->getFunction("art_find_virtual_method_from_code_with_access_check"); -if (!func_art_find_virtual_method_from_code_with_access_check) { -func_art_find_virtual_method_from_code_with_access_check = Function::Create( +Function* func_art_portable_find_virtual_method_from_code_with_access_check = mod->getFunction("art_portable_find_virtual_method_from_code_with_access_check"); +if (!func_art_portable_find_virtual_method_from_code_with_access_check) { +func_art_portable_find_virtual_method_from_code_with_access_check = Function::Create( /*Type=*/FuncTy_16, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_find_virtual_method_from_code_with_access_check", mod); // (external, no body) -func_art_find_virtual_method_from_code_with_access_check->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_find_virtual_method_from_code_with_access_check", mod); // (external, no body) +func_art_portable_find_virtual_method_from_code_with_access_check->setCallingConv(CallingConv::C); } -AttrListPtr func_art_find_virtual_method_from_code_with_access_check_PAL; -func_art_find_virtual_method_from_code_with_access_check->setAttributes(func_art_find_virtual_method_from_code_with_access_check_PAL); +AttrListPtr func_art_portable_find_virtual_method_from_code_with_access_check_PAL; +func_art_portable_find_virtual_method_from_code_with_access_check->setAttributes(func_art_portable_find_virtual_method_from_code_with_access_check_PAL); -Function* func_art_find_super_method_from_code_with_access_check = mod->getFunction("art_find_super_method_from_code_with_access_check"); -if (!func_art_find_super_method_from_code_with_access_check) { -func_art_find_super_method_from_code_with_access_check = Function::Create( +Function* func_art_portable_find_super_method_from_code_with_access_check = mod->getFunction("art_portable_find_super_method_from_code_with_access_check"); +if (!func_art_portable_find_super_method_from_code_with_access_check) { +func_art_portable_find_super_method_from_code_with_access_check = Function::Create( /*Type=*/FuncTy_16, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_find_super_method_from_code_with_access_check", mod); // (external, no body) -func_art_find_super_method_from_code_with_access_check->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_find_super_method_from_code_with_access_check", mod); // (external, no body) +func_art_portable_find_super_method_from_code_with_access_check->setCallingConv(CallingConv::C); } -AttrListPtr func_art_find_super_method_from_code_with_access_check_PAL; -func_art_find_super_method_from_code_with_access_check->setAttributes(func_art_find_super_method_from_code_with_access_check_PAL); +AttrListPtr func_art_portable_find_super_method_from_code_with_access_check_PAL; +func_art_portable_find_super_method_from_code_with_access_check->setAttributes(func_art_portable_find_super_method_from_code_with_access_check_PAL); -Function* func_art_find_interface_method_from_code_with_access_check = mod->getFunction("art_find_interface_method_from_code_with_access_check"); -if (!func_art_find_interface_method_from_code_with_access_check) { -func_art_find_interface_method_from_code_with_access_check = Function::Create( +Function* func_art_portable_find_interface_method_from_code_with_access_check = mod->getFunction("art_portable_find_interface_method_from_code_with_access_check"); +if (!func_art_portable_find_interface_method_from_code_with_access_check) { +func_art_portable_find_interface_method_from_code_with_access_check = Function::Create( /*Type=*/FuncTy_16, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_find_interface_method_from_code_with_access_check", mod); // (external, no body) -func_art_find_interface_method_from_code_with_access_check->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_find_interface_method_from_code_with_access_check", mod); // (external, no body) +func_art_portable_find_interface_method_from_code_with_access_check->setCallingConv(CallingConv::C); } -AttrListPtr func_art_find_interface_method_from_code_with_access_check_PAL; -func_art_find_interface_method_from_code_with_access_check->setAttributes(func_art_find_interface_method_from_code_with_access_check_PAL); +AttrListPtr func_art_portable_find_interface_method_from_code_with_access_check_PAL; +func_art_portable_find_interface_method_from_code_with_access_check->setAttributes(func_art_portable_find_interface_method_from_code_with_access_check_PAL); -Function* func_art_find_interface_method_from_code = mod->getFunction("art_find_interface_method_from_code"); -if (!func_art_find_interface_method_from_code) { -func_art_find_interface_method_from_code = Function::Create( +Function* func_art_portable_find_interface_method_from_code = mod->getFunction("art_portable_find_interface_method_from_code"); +if (!func_art_portable_find_interface_method_from_code) { +func_art_portable_find_interface_method_from_code = Function::Create( /*Type=*/FuncTy_16, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_find_interface_method_from_code", mod); // (external, no body) -func_art_find_interface_method_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_find_interface_method_from_code", mod); // (external, no body) +func_art_portable_find_interface_method_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_find_interface_method_from_code_PAL; -func_art_find_interface_method_from_code->setAttributes(func_art_find_interface_method_from_code_PAL); +AttrListPtr func_art_portable_find_interface_method_from_code_PAL; +func_art_portable_find_interface_method_from_code->setAttributes(func_art_portable_find_interface_method_from_code_PAL); -Function* func_art_initialize_static_storage_from_code = mod->getFunction("art_initialize_static_storage_from_code"); -if (!func_art_initialize_static_storage_from_code) { -func_art_initialize_static_storage_from_code = Function::Create( +Function* func_art_portable_initialize_static_storage_from_code = mod->getFunction("art_portable_initialize_static_storage_from_code"); +if (!func_art_portable_initialize_static_storage_from_code) { +func_art_portable_initialize_static_storage_from_code = Function::Create( /*Type=*/FuncTy_13, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_initialize_static_storage_from_code", mod); // (external, no body) -func_art_initialize_static_storage_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_initialize_static_storage_from_code", mod); // (external, no body) +func_art_portable_initialize_static_storage_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_initialize_static_storage_from_code_PAL; -func_art_initialize_static_storage_from_code->setAttributes(func_art_initialize_static_storage_from_code_PAL); +AttrListPtr func_art_portable_initialize_static_storage_from_code_PAL; +func_art_portable_initialize_static_storage_from_code->setAttributes(func_art_portable_initialize_static_storage_from_code_PAL); -Function* func_art_initialize_type_from_code = mod->getFunction("art_initialize_type_from_code"); -if (!func_art_initialize_type_from_code) { -func_art_initialize_type_from_code = Function::Create( +Function* func_art_portable_initialize_type_from_code = mod->getFunction("art_portable_initialize_type_from_code"); +if (!func_art_portable_initialize_type_from_code) { +func_art_portable_initialize_type_from_code = Function::Create( /*Type=*/FuncTy_13, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_initialize_type_from_code", mod); // (external, no body) -func_art_initialize_type_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_initialize_type_from_code", mod); // (external, no body) +func_art_portable_initialize_type_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_initialize_type_from_code_PAL; -func_art_initialize_type_from_code->setAttributes(func_art_initialize_type_from_code_PAL); +AttrListPtr func_art_portable_initialize_type_from_code_PAL; +func_art_portable_initialize_type_from_code->setAttributes(func_art_portable_initialize_type_from_code_PAL); -Function* func_art_initialize_type_and_verify_access_from_code = mod->getFunction("art_initialize_type_and_verify_access_from_code"); -if (!func_art_initialize_type_and_verify_access_from_code) { -func_art_initialize_type_and_verify_access_from_code = Function::Create( +Function* func_art_portable_initialize_type_and_verify_access_from_code = mod->getFunction("art_portable_initialize_type_and_verify_access_from_code"); +if (!func_art_portable_initialize_type_and_verify_access_from_code) { +func_art_portable_initialize_type_and_verify_access_from_code = Function::Create( /*Type=*/FuncTy_13, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_initialize_type_and_verify_access_from_code", mod); // (external, no body) -func_art_initialize_type_and_verify_access_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_initialize_type_and_verify_access_from_code", mod); // (external, no body) +func_art_portable_initialize_type_and_verify_access_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_initialize_type_and_verify_access_from_code_PAL; -func_art_initialize_type_and_verify_access_from_code->setAttributes(func_art_initialize_type_and_verify_access_from_code_PAL); +AttrListPtr func_art_portable_initialize_type_and_verify_access_from_code_PAL; +func_art_portable_initialize_type_and_verify_access_from_code->setAttributes(func_art_portable_initialize_type_and_verify_access_from_code_PAL); -Function* func_art_resolve_string_from_code = mod->getFunction("art_resolve_string_from_code"); -if (!func_art_resolve_string_from_code) { -func_art_resolve_string_from_code = Function::Create( +Function* func_art_portable_resolve_string_from_code = mod->getFunction("art_portable_resolve_string_from_code"); +if (!func_art_portable_resolve_string_from_code) { +func_art_portable_resolve_string_from_code = Function::Create( /*Type=*/FuncTy_17, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_resolve_string_from_code", mod); // (external, no body) -func_art_resolve_string_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_resolve_string_from_code", mod); // (external, no body) +func_art_portable_resolve_string_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_resolve_string_from_code_PAL; -func_art_resolve_string_from_code->setAttributes(func_art_resolve_string_from_code_PAL); +AttrListPtr func_art_portable_resolve_string_from_code_PAL; +func_art_portable_resolve_string_from_code->setAttributes(func_art_portable_resolve_string_from_code_PAL); -Function* func_art_set32_static_from_code = mod->getFunction("art_set32_static_from_code"); -if (!func_art_set32_static_from_code) { -func_art_set32_static_from_code = Function::Create( +Function* func_art_portable_set32_static_from_code = mod->getFunction("art_portable_set32_static_from_code"); +if (!func_art_portable_set32_static_from_code) { +func_art_portable_set32_static_from_code = Function::Create( /*Type=*/FuncTy_18, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_set32_static_from_code", mod); // (external, no body) -func_art_set32_static_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_set32_static_from_code", mod); // (external, no body) +func_art_portable_set32_static_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_set32_static_from_code_PAL; -func_art_set32_static_from_code->setAttributes(func_art_set32_static_from_code_PAL); +AttrListPtr func_art_portable_set32_static_from_code_PAL; +func_art_portable_set32_static_from_code->setAttributes(func_art_portable_set32_static_from_code_PAL); -Function* func_art_set64_static_from_code = mod->getFunction("art_set64_static_from_code"); -if (!func_art_set64_static_from_code) { -func_art_set64_static_from_code = Function::Create( +Function* func_art_portable_set64_static_from_code = mod->getFunction("art_portable_set64_static_from_code"); +if (!func_art_portable_set64_static_from_code) { +func_art_portable_set64_static_from_code = Function::Create( /*Type=*/FuncTy_19, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_set64_static_from_code", mod); // (external, no body) -func_art_set64_static_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_set64_static_from_code", mod); // (external, no body) +func_art_portable_set64_static_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_set64_static_from_code_PAL; -func_art_set64_static_from_code->setAttributes(func_art_set64_static_from_code_PAL); +AttrListPtr func_art_portable_set64_static_from_code_PAL; +func_art_portable_set64_static_from_code->setAttributes(func_art_portable_set64_static_from_code_PAL); -Function* func_art_set_obj_static_from_code = mod->getFunction("art_set_obj_static_from_code"); -if (!func_art_set_obj_static_from_code) { -func_art_set_obj_static_from_code = Function::Create( +Function* func_art_portable_set_obj_static_from_code = mod->getFunction("art_portable_set_obj_static_from_code"); +if (!func_art_portable_set_obj_static_from_code) { +func_art_portable_set_obj_static_from_code = Function::Create( /*Type=*/FuncTy_20, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_set_obj_static_from_code", mod); // (external, no body) -func_art_set_obj_static_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_set_obj_static_from_code", mod); // (external, no body) +func_art_portable_set_obj_static_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_set_obj_static_from_code_PAL; -func_art_set_obj_static_from_code->setAttributes(func_art_set_obj_static_from_code_PAL); +AttrListPtr func_art_portable_set_obj_static_from_code_PAL; +func_art_portable_set_obj_static_from_code->setAttributes(func_art_portable_set_obj_static_from_code_PAL); -Function* func_art_get32_static_from_code = mod->getFunction("art_get32_static_from_code"); -if (!func_art_get32_static_from_code) { -func_art_get32_static_from_code = Function::Create( +Function* func_art_portable_get32_static_from_code = mod->getFunction("art_portable_get32_static_from_code"); +if (!func_art_portable_get32_static_from_code) { +func_art_portable_get32_static_from_code = Function::Create( /*Type=*/FuncTy_21, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_get32_static_from_code", mod); // (external, no body) -func_art_get32_static_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_get32_static_from_code", mod); // (external, no body) +func_art_portable_get32_static_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_get32_static_from_code_PAL; -func_art_get32_static_from_code->setAttributes(func_art_get32_static_from_code_PAL); +AttrListPtr func_art_portable_get32_static_from_code_PAL; +func_art_portable_get32_static_from_code->setAttributes(func_art_portable_get32_static_from_code_PAL); -Function* func_art_get64_static_from_code = mod->getFunction("art_get64_static_from_code"); -if (!func_art_get64_static_from_code) { -func_art_get64_static_from_code = Function::Create( +Function* func_art_portable_get64_static_from_code = mod->getFunction("art_portable_get64_static_from_code"); +if (!func_art_portable_get64_static_from_code) { +func_art_portable_get64_static_from_code = Function::Create( /*Type=*/FuncTy_22, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_get64_static_from_code", mod); // (external, no body) -func_art_get64_static_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_get64_static_from_code", mod); // (external, no body) +func_art_portable_get64_static_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_get64_static_from_code_PAL; -func_art_get64_static_from_code->setAttributes(func_art_get64_static_from_code_PAL); +AttrListPtr func_art_portable_get64_static_from_code_PAL; +func_art_portable_get64_static_from_code->setAttributes(func_art_portable_get64_static_from_code_PAL); -Function* func_art_get_obj_static_from_code = mod->getFunction("art_get_obj_static_from_code"); -if (!func_art_get_obj_static_from_code) { -func_art_get_obj_static_from_code = Function::Create( +Function* func_art_portable_get_obj_static_from_code = mod->getFunction("art_portable_get_obj_static_from_code"); +if (!func_art_portable_get_obj_static_from_code) { +func_art_portable_get_obj_static_from_code = Function::Create( /*Type=*/FuncTy_23, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_get_obj_static_from_code", mod); // (external, no body) -func_art_get_obj_static_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_get_obj_static_from_code", mod); // (external, no body) +func_art_portable_get_obj_static_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_get_obj_static_from_code_PAL; -func_art_get_obj_static_from_code->setAttributes(func_art_get_obj_static_from_code_PAL); +AttrListPtr func_art_portable_get_obj_static_from_code_PAL; +func_art_portable_get_obj_static_from_code->setAttributes(func_art_portable_get_obj_static_from_code_PAL); -Function* func_art_set32_instance_from_code = mod->getFunction("art_set32_instance_from_code"); -if (!func_art_set32_instance_from_code) { -func_art_set32_instance_from_code = Function::Create( +Function* func_art_portable_set32_instance_from_code = mod->getFunction("art_portable_set32_instance_from_code"); +if (!func_art_portable_set32_instance_from_code) { +func_art_portable_set32_instance_from_code = Function::Create( /*Type=*/FuncTy_24, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_set32_instance_from_code", mod); // (external, no body) -func_art_set32_instance_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_set32_instance_from_code", mod); // (external, no body) +func_art_portable_set32_instance_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_set32_instance_from_code_PAL; -func_art_set32_instance_from_code->setAttributes(func_art_set32_instance_from_code_PAL); +AttrListPtr func_art_portable_set32_instance_from_code_PAL; +func_art_portable_set32_instance_from_code->setAttributes(func_art_portable_set32_instance_from_code_PAL); -Function* func_art_set64_instance_from_code = mod->getFunction("art_set64_instance_from_code"); -if (!func_art_set64_instance_from_code) { -func_art_set64_instance_from_code = Function::Create( +Function* func_art_portable_set64_instance_from_code = mod->getFunction("art_portable_set64_instance_from_code"); +if (!func_art_portable_set64_instance_from_code) { +func_art_portable_set64_instance_from_code = Function::Create( /*Type=*/FuncTy_25, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_set64_instance_from_code", mod); // (external, no body) -func_art_set64_instance_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_set64_instance_from_code", mod); // (external, no body) +func_art_portable_set64_instance_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_set64_instance_from_code_PAL; -func_art_set64_instance_from_code->setAttributes(func_art_set64_instance_from_code_PAL); +AttrListPtr func_art_portable_set64_instance_from_code_PAL; +func_art_portable_set64_instance_from_code->setAttributes(func_art_portable_set64_instance_from_code_PAL); -Function* func_art_set_obj_instance_from_code = mod->getFunction("art_set_obj_instance_from_code"); -if (!func_art_set_obj_instance_from_code) { -func_art_set_obj_instance_from_code = Function::Create( +Function* func_art_portable_set_obj_instance_from_code = mod->getFunction("art_portable_set_obj_instance_from_code"); +if (!func_art_portable_set_obj_instance_from_code) { +func_art_portable_set_obj_instance_from_code = Function::Create( /*Type=*/FuncTy_26, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_set_obj_instance_from_code", mod); // (external, no body) -func_art_set_obj_instance_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_set_obj_instance_from_code", mod); // (external, no body) +func_art_portable_set_obj_instance_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_set_obj_instance_from_code_PAL; -func_art_set_obj_instance_from_code->setAttributes(func_art_set_obj_instance_from_code_PAL); +AttrListPtr func_art_portable_set_obj_instance_from_code_PAL; +func_art_portable_set_obj_instance_from_code->setAttributes(func_art_portable_set_obj_instance_from_code_PAL); -Function* func_art_get32_instance_from_code = mod->getFunction("art_get32_instance_from_code"); -if (!func_art_get32_instance_from_code) { -func_art_get32_instance_from_code = Function::Create( +Function* func_art_portable_get32_instance_from_code = mod->getFunction("art_portable_get32_instance_from_code"); +if (!func_art_portable_get32_instance_from_code) { +func_art_portable_get32_instance_from_code = Function::Create( /*Type=*/FuncTy_20, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_get32_instance_from_code", mod); // (external, no body) -func_art_get32_instance_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_get32_instance_from_code", mod); // (external, no body) +func_art_portable_get32_instance_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_get32_instance_from_code_PAL; -func_art_get32_instance_from_code->setAttributes(func_art_get32_instance_from_code_PAL); +AttrListPtr func_art_portable_get32_instance_from_code_PAL; +func_art_portable_get32_instance_from_code->setAttributes(func_art_portable_get32_instance_from_code_PAL); -Function* func_art_get64_instance_from_code = mod->getFunction("art_get64_instance_from_code"); -if (!func_art_get64_instance_from_code) { -func_art_get64_instance_from_code = Function::Create( +Function* func_art_portable_get64_instance_from_code = mod->getFunction("art_portable_get64_instance_from_code"); +if (!func_art_portable_get64_instance_from_code) { +func_art_portable_get64_instance_from_code = Function::Create( /*Type=*/FuncTy_27, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_get64_instance_from_code", mod); // (external, no body) -func_art_get64_instance_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_get64_instance_from_code", mod); // (external, no body) +func_art_portable_get64_instance_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_get64_instance_from_code_PAL; -func_art_get64_instance_from_code->setAttributes(func_art_get64_instance_from_code_PAL); +AttrListPtr func_art_portable_get64_instance_from_code_PAL; +func_art_portable_get64_instance_from_code->setAttributes(func_art_portable_get64_instance_from_code_PAL); -Function* func_art_get_obj_instance_from_code = mod->getFunction("art_get_obj_instance_from_code"); -if (!func_art_get_obj_instance_from_code) { -func_art_get_obj_instance_from_code = Function::Create( +Function* func_art_portable_get_obj_instance_from_code = mod->getFunction("art_portable_get_obj_instance_from_code"); +if (!func_art_portable_get_obj_instance_from_code) { +func_art_portable_get_obj_instance_from_code = Function::Create( /*Type=*/FuncTy_13, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_get_obj_instance_from_code", mod); // (external, no body) -func_art_get_obj_instance_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_get_obj_instance_from_code", mod); // (external, no body) +func_art_portable_get_obj_instance_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_get_obj_instance_from_code_PAL; -func_art_get_obj_instance_from_code->setAttributes(func_art_get_obj_instance_from_code_PAL); +AttrListPtr func_art_portable_get_obj_instance_from_code_PAL; +func_art_portable_get_obj_instance_from_code->setAttributes(func_art_portable_get_obj_instance_from_code_PAL); -Function* func_art_decode_jobject_in_thread = mod->getFunction("art_decode_jobject_in_thread"); -if (!func_art_decode_jobject_in_thread) { -func_art_decode_jobject_in_thread = Function::Create( +Function* func_art_portable_decode_jobject_in_thread = mod->getFunction("art_portable_decode_jobject_in_thread"); +if (!func_art_portable_decode_jobject_in_thread) { +func_art_portable_decode_jobject_in_thread = Function::Create( /*Type=*/FuncTy_28, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_decode_jobject_in_thread", mod); // (external, no body) -func_art_decode_jobject_in_thread->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_decode_jobject_in_thread", mod); // (external, no body) +func_art_portable_decode_jobject_in_thread->setCallingConv(CallingConv::C); } -AttrListPtr func_art_decode_jobject_in_thread_PAL; -func_art_decode_jobject_in_thread->setAttributes(func_art_decode_jobject_in_thread_PAL); +AttrListPtr func_art_portable_decode_jobject_in_thread_PAL; +func_art_portable_decode_jobject_in_thread->setAttributes(func_art_portable_decode_jobject_in_thread_PAL); -Function* func_art_fill_array_data_from_code = mod->getFunction("art_fill_array_data_from_code"); -if (!func_art_fill_array_data_from_code) { -func_art_fill_array_data_from_code = Function::Create( +Function* func_art_portable_fill_array_data_from_code = mod->getFunction("art_portable_fill_array_data_from_code"); +if (!func_art_portable_fill_array_data_from_code) { +func_art_portable_fill_array_data_from_code = Function::Create( /*Type=*/FuncTy_29, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_fill_array_data_from_code", mod); // (external, no body) -func_art_fill_array_data_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_fill_array_data_from_code", mod); // (external, no body) +func_art_portable_fill_array_data_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_fill_array_data_from_code_PAL; -func_art_fill_array_data_from_code->setAttributes(func_art_fill_array_data_from_code_PAL); +AttrListPtr func_art_portable_fill_array_data_from_code_PAL; +func_art_portable_fill_array_data_from_code->setAttributes(func_art_portable_fill_array_data_from_code_PAL); -Function* func_art_is_assignable_from_code = mod->getFunction("art_is_assignable_from_code"); -if (!func_art_is_assignable_from_code) { -func_art_is_assignable_from_code = Function::Create( +Function* func_art_portable_is_assignable_from_code = mod->getFunction("art_portable_is_assignable_from_code"); +if (!func_art_portable_is_assignable_from_code) { +func_art_portable_is_assignable_from_code = Function::Create( /*Type=*/FuncTy_30, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_is_assignable_from_code", mod); // (external, no body) -func_art_is_assignable_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_is_assignable_from_code", mod); // (external, no body) +func_art_portable_is_assignable_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_is_assignable_from_code_PAL; -func_art_is_assignable_from_code->setAttributes(func_art_is_assignable_from_code_PAL); +AttrListPtr func_art_portable_is_assignable_from_code_PAL; +func_art_portable_is_assignable_from_code->setAttributes(func_art_portable_is_assignable_from_code_PAL); -Function* func_art_check_cast_from_code = mod->getFunction("art_check_cast_from_code"); -if (!func_art_check_cast_from_code) { -func_art_check_cast_from_code = Function::Create( +Function* func_art_portable_check_cast_from_code = mod->getFunction("art_portable_check_cast_from_code"); +if (!func_art_portable_check_cast_from_code) { +func_art_portable_check_cast_from_code = Function::Create( /*Type=*/FuncTy_5, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_check_cast_from_code", mod); // (external, no body) -func_art_check_cast_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_check_cast_from_code", mod); // (external, no body) +func_art_portable_check_cast_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_check_cast_from_code_PAL; -func_art_check_cast_from_code->setAttributes(func_art_check_cast_from_code_PAL); +AttrListPtr func_art_portable_check_cast_from_code_PAL; +func_art_portable_check_cast_from_code->setAttributes(func_art_portable_check_cast_from_code_PAL); -Function* func_art_check_put_array_element_from_code = mod->getFunction("art_check_put_array_element_from_code"); -if (!func_art_check_put_array_element_from_code) { -func_art_check_put_array_element_from_code = Function::Create( +Function* func_art_portable_check_put_array_element_from_code = mod->getFunction("art_portable_check_put_array_element_from_code"); +if (!func_art_portable_check_put_array_element_from_code) { +func_art_portable_check_put_array_element_from_code = Function::Create( /*Type=*/FuncTy_5, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_check_put_array_element_from_code", mod); // (external, no body) -func_art_check_put_array_element_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_check_put_array_element_from_code", mod); // (external, no body) +func_art_portable_check_put_array_element_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_check_put_array_element_from_code_PAL; -func_art_check_put_array_element_from_code->setAttributes(func_art_check_put_array_element_from_code_PAL); +AttrListPtr func_art_portable_check_put_array_element_from_code_PAL; +func_art_portable_check_put_array_element_from_code->setAttributes(func_art_portable_check_put_array_element_from_code_PAL); Function* func_art_d2l = mod->getFunction("art_d2l"); if (!func_art_d2l) { @@ -980,104 +980,104 @@ func_art_f2i->setCallingConv(CallingConv::C); AttrListPtr func_art_f2i_PAL; func_art_f2i->setAttributes(func_art_f2i_PAL); -Function* func_art_jni_method_start = mod->getFunction("art_jni_method_start"); -if (!func_art_jni_method_start) { -func_art_jni_method_start = Function::Create( +Function* func_art_portable_jni_method_start = mod->getFunction("art_portable_jni_method_start"); +if (!func_art_portable_jni_method_start) { +func_art_portable_jni_method_start = Function::Create( /*Type=*/FuncTy_35, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_jni_method_start", mod); // (external, no body) -func_art_jni_method_start->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_jni_method_start", mod); // (external, no body) +func_art_portable_jni_method_start->setCallingConv(CallingConv::C); } -AttrListPtr func_art_jni_method_start_PAL; -func_art_jni_method_start->setAttributes(func_art_jni_method_start_PAL); +AttrListPtr func_art_portable_jni_method_start_PAL; +func_art_portable_jni_method_start->setAttributes(func_art_portable_jni_method_start_PAL); -Function* func_art_jni_method_start_synchronized = mod->getFunction("art_jni_method_start_synchronized"); -if (!func_art_jni_method_start_synchronized) { -func_art_jni_method_start_synchronized = Function::Create( +Function* func_art_portable_jni_method_start_synchronized = mod->getFunction("art_portable_jni_method_start_synchronized"); +if (!func_art_portable_jni_method_start_synchronized) { +func_art_portable_jni_method_start_synchronized = Function::Create( /*Type=*/FuncTy_30, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_jni_method_start_synchronized", mod); // (external, no body) -func_art_jni_method_start_synchronized->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_jni_method_start_synchronized", mod); // (external, no body) +func_art_portable_jni_method_start_synchronized->setCallingConv(CallingConv::C); } -AttrListPtr func_art_jni_method_start_synchronized_PAL; -func_art_jni_method_start_synchronized->setAttributes(func_art_jni_method_start_synchronized_PAL); +AttrListPtr func_art_portable_jni_method_start_synchronized_PAL; +func_art_portable_jni_method_start_synchronized->setAttributes(func_art_portable_jni_method_start_synchronized_PAL); -Function* func_art_jni_method_end = mod->getFunction("art_jni_method_end"); -if (!func_art_jni_method_end) { -func_art_jni_method_end = Function::Create( +Function* func_art_portable_jni_method_end = mod->getFunction("art_portable_jni_method_end"); +if (!func_art_portable_jni_method_end) { +func_art_portable_jni_method_end = Function::Create( /*Type=*/FuncTy_15, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_jni_method_end", mod); // (external, no body) -func_art_jni_method_end->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_jni_method_end", mod); // (external, no body) +func_art_portable_jni_method_end->setCallingConv(CallingConv::C); } -AttrListPtr func_art_jni_method_end_PAL; -func_art_jni_method_end->setAttributes(func_art_jni_method_end_PAL); +AttrListPtr func_art_portable_jni_method_end_PAL; +func_art_portable_jni_method_end->setAttributes(func_art_portable_jni_method_end_PAL); -Function* func_art_jni_method_end_synchronized = mod->getFunction("art_jni_method_end_synchronized"); -if (!func_art_jni_method_end_synchronized) { -func_art_jni_method_end_synchronized = Function::Create( +Function* func_art_portable_jni_method_end_synchronized = mod->getFunction("art_portable_jni_method_end_synchronized"); +if (!func_art_portable_jni_method_end_synchronized) { +func_art_portable_jni_method_end_synchronized = Function::Create( /*Type=*/FuncTy_36, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_jni_method_end_synchronized", mod); // (external, no body) -func_art_jni_method_end_synchronized->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_jni_method_end_synchronized", mod); // (external, no body) +func_art_portable_jni_method_end_synchronized->setCallingConv(CallingConv::C); } -AttrListPtr func_art_jni_method_end_synchronized_PAL; -func_art_jni_method_end_synchronized->setAttributes(func_art_jni_method_end_synchronized_PAL); +AttrListPtr func_art_portable_jni_method_end_synchronized_PAL; +func_art_portable_jni_method_end_synchronized->setAttributes(func_art_portable_jni_method_end_synchronized_PAL); -Function* func_art_jni_method_end_with_reference = mod->getFunction("art_jni_method_end_with_reference"); -if (!func_art_jni_method_end_with_reference) { -func_art_jni_method_end_with_reference = Function::Create( +Function* func_art_portable_jni_method_end_with_reference = mod->getFunction("art_portable_jni_method_end_with_reference"); +if (!func_art_portable_jni_method_end_with_reference) { +func_art_portable_jni_method_end_with_reference = Function::Create( /*Type=*/FuncTy_37, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_jni_method_end_with_reference", mod); // (external, no body) -func_art_jni_method_end_with_reference->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_jni_method_end_with_reference", mod); // (external, no body) +func_art_portable_jni_method_end_with_reference->setCallingConv(CallingConv::C); } -AttrListPtr func_art_jni_method_end_with_reference_PAL; -func_art_jni_method_end_with_reference->setAttributes(func_art_jni_method_end_with_reference_PAL); +AttrListPtr func_art_portable_jni_method_end_with_reference_PAL; +func_art_portable_jni_method_end_with_reference->setAttributes(func_art_portable_jni_method_end_with_reference_PAL); -Function* func_art_jni_method_end_with_reference_synchronized = mod->getFunction("art_jni_method_end_with_reference_synchronized"); -if (!func_art_jni_method_end_with_reference_synchronized) { -func_art_jni_method_end_with_reference_synchronized = Function::Create( +Function* func_art_portable_jni_method_end_with_reference_synchronized = mod->getFunction("art_portable_jni_method_end_with_reference_synchronized"); +if (!func_art_portable_jni_method_end_with_reference_synchronized) { +func_art_portable_jni_method_end_with_reference_synchronized = Function::Create( /*Type=*/FuncTy_38, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_jni_method_end_with_reference_synchronized", mod); // (external, no body) -func_art_jni_method_end_with_reference_synchronized->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_jni_method_end_with_reference_synchronized", mod); // (external, no body) +func_art_portable_jni_method_end_with_reference_synchronized->setCallingConv(CallingConv::C); } -AttrListPtr func_art_jni_method_end_with_reference_synchronized_PAL; -func_art_jni_method_end_with_reference_synchronized->setAttributes(func_art_jni_method_end_with_reference_synchronized_PAL); +AttrListPtr func_art_portable_jni_method_end_with_reference_synchronized_PAL; +func_art_portable_jni_method_end_with_reference_synchronized->setAttributes(func_art_portable_jni_method_end_with_reference_synchronized_PAL); -Function* func_art_is_exception_pending_from_code = mod->getFunction("art_is_exception_pending_from_code"); -if (!func_art_is_exception_pending_from_code) { -func_art_is_exception_pending_from_code = Function::Create( +Function* func_art_portable_is_exception_pending_from_code = mod->getFunction("art_portable_is_exception_pending_from_code"); +if (!func_art_portable_is_exception_pending_from_code) { +func_art_portable_is_exception_pending_from_code = Function::Create( /*Type=*/FuncTy_39, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_is_exception_pending_from_code", mod); // (external, no body) -func_art_is_exception_pending_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_is_exception_pending_from_code", mod); // (external, no body) +func_art_portable_is_exception_pending_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_is_exception_pending_from_code_PAL; -func_art_is_exception_pending_from_code->setAttributes(func_art_is_exception_pending_from_code_PAL); +AttrListPtr func_art_portable_is_exception_pending_from_code_PAL; +func_art_portable_is_exception_pending_from_code->setAttributes(func_art_portable_is_exception_pending_from_code_PAL); -Function* func_art_mark_gc_card_from_code = mod->getFunction("art_mark_gc_card_from_code"); -if (!func_art_mark_gc_card_from_code) { -func_art_mark_gc_card_from_code = Function::Create( +Function* func_art_portable_mark_gc_card_from_code = mod->getFunction("art_portable_mark_gc_card_from_code"); +if (!func_art_portable_mark_gc_card_from_code) { +func_art_portable_mark_gc_card_from_code = Function::Create( /*Type=*/FuncTy_5, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_mark_gc_card_from_code", mod); // (external, no body) -func_art_mark_gc_card_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_mark_gc_card_from_code", mod); // (external, no body) +func_art_portable_mark_gc_card_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_mark_gc_card_from_code_PAL; -func_art_mark_gc_card_from_code->setAttributes(func_art_mark_gc_card_from_code_PAL); +AttrListPtr func_art_portable_mark_gc_card_from_code_PAL; +func_art_portable_mark_gc_card_from_code->setAttributes(func_art_portable_mark_gc_card_from_code_PAL); -Function* func_art_proxy_invoke_handler_from_code = mod->getFunction("art_proxy_invoke_handler_from_code"); -if (!func_art_proxy_invoke_handler_from_code) { -func_art_proxy_invoke_handler_from_code = Function::Create( +Function* func_art_portable_proxy_invoke_handler_from_code = mod->getFunction("art_portable_proxy_invoke_handler_from_code"); +if (!func_art_portable_proxy_invoke_handler_from_code) { +func_art_portable_proxy_invoke_handler_from_code = Function::Create( /*Type=*/FuncTy_40, /*Linkage=*/GlobalValue::ExternalLinkage, - /*Name=*/"art_proxy_invoke_handler_from_code", mod); // (external, no body) -func_art_proxy_invoke_handler_from_code->setCallingConv(CallingConv::C); + /*Name=*/"art_portable_proxy_invoke_handler_from_code", mod); // (external, no body) +func_art_portable_proxy_invoke_handler_from_code->setCallingConv(CallingConv::C); } -AttrListPtr func_art_proxy_invoke_handler_from_code_PAL; -func_art_proxy_invoke_handler_from_code->setAttributes(func_art_proxy_invoke_handler_from_code_PAL); +AttrListPtr func_art_portable_proxy_invoke_handler_from_code_PAL; +func_art_portable_proxy_invoke_handler_from_code->setAttributes(func_art_portable_proxy_invoke_handler_from_code_PAL); // Global Variable Declarations diff --git a/src/compiler_llvm/procedure_linkage_table.cc b/src/compiler_llvm/procedure_linkage_table.cc index 51d6cd28b7..b78db4ecb7 100644 --- a/src/compiler_llvm/procedure_linkage_table.cc +++ b/src/compiler_llvm/procedure_linkage_table.cc @@ -113,7 +113,7 @@ bool ProcedureLinkageTable::AllocateTable() { for (size_t i = 0; i < art_runtime_func_count; ++i, stub_ptr += stub_size) { const char* name = art_runtime_func_name_list[i]; - void* func = art_find_runtime_support_func(NULL, name); + void* func = art_portable_find_runtime_support_func(NULL, name); DCHECK(func != NULL); CreateStub(stub_ptr, func); } @@ -144,7 +144,7 @@ bool ProcedureLinkageTable::AllocateTable() { } for (size_t i = 0; i < crt_count; ++i, stub_ptr += stub_size) { - void* func = art_find_runtime_support_func(NULL, crt_name_list[i]); + void* func = art_portable_find_runtime_support_func(NULL, crt_name_list[i]); DCHECK(func != NULL); CreateStub(stub_ptr, func); } diff --git a/src/compiler_llvm/runtime_support_func_list.h b/src/compiler_llvm/runtime_support_func_list.h index b27754e9c4..a58b061e16 100644 --- a/src/compiler_llvm/runtime_support_func_list.h +++ b/src/compiler_llvm/runtime_support_func_list.h @@ -15,62 +15,62 @@ */ #define RUNTIME_SUPPORT_FUNC_LIST(V) \ - V(LockObject, art_lock_object_from_code) \ - V(UnlockObject, art_unlock_object_from_code) \ - V(GetCurrentThread, art_get_current_thread_from_code) \ - V(SetCurrentThread, art_set_current_thread_from_code) \ - V(PushShadowFrame, art_push_shadow_frame_from_code) \ - V(PopShadowFrame, art_pop_shadow_frame_from_code) \ - V(TestSuspend, art_test_suspend_from_code) \ - V(ThrowException, art_throw_exception_from_code) \ - V(ThrowStackOverflowException, art_throw_stack_overflow_from_code) \ - V(ThrowNullPointerException, art_throw_null_pointer_exception_from_code) \ - V(ThrowDivZeroException, art_throw_div_zero_from_code) \ - V(ThrowIndexOutOfBounds, art_throw_array_bounds_from_code) \ - V(InitializeTypeAndVerifyAccess, art_initialize_type_and_verify_access_from_code) \ - V(InitializeType, art_initialize_type_from_code) \ - V(IsAssignable, art_is_assignable_from_code) \ - V(CheckCast, art_check_cast_from_code) \ - V(CheckPutArrayElement, art_check_put_array_element_from_code) \ - V(AllocObject, art_alloc_object_from_code) \ - V(AllocObjectWithAccessCheck, art_alloc_object_from_code_with_access_check) \ - V(AllocArray, art_alloc_array_from_code) \ - V(AllocArrayWithAccessCheck, art_alloc_array_from_code_with_access_check) \ - V(CheckAndAllocArray, art_check_and_alloc_array_from_code) \ - V(CheckAndAllocArrayWithAccessCheck, art_check_and_alloc_array_from_code_with_access_check) \ - V(FindStaticMethodWithAccessCheck, art_find_static_method_from_code_with_access_check) \ - V(FindDirectMethodWithAccessCheck, art_find_direct_method_from_code_with_access_check) \ - V(FindVirtualMethodWithAccessCheck, art_find_virtual_method_from_code_with_access_check) \ - V(FindSuperMethodWithAccessCheck, art_find_super_method_from_code_with_access_check) \ - V(FindInterfaceMethodWithAccessCheck, art_find_interface_method_from_code_with_access_check) \ - V(FindInterfaceMethod, art_find_interface_method_from_code) \ - V(ResolveString, art_resolve_string_from_code) \ - V(Set32Static, art_set32_static_from_code) \ - V(Set64Static, art_set64_static_from_code) \ - V(SetObjectStatic, art_set_obj_static_from_code) \ - V(Get32Static, art_get32_static_from_code) \ - V(Get64Static, art_get64_static_from_code) \ - V(GetObjectStatic, art_get_obj_static_from_code) \ - V(Set32Instance, art_set32_instance_from_code) \ - V(Set64Instance, art_set64_instance_from_code) \ - V(SetObjectInstance, art_set_obj_instance_from_code) \ - V(Get32Instance, art_get32_instance_from_code) \ - V(Get64Instance, art_get64_instance_from_code) \ - V(GetObjectInstance, art_get_obj_instance_from_code) \ - V(InitializeStaticStorage, art_initialize_static_storage_from_code) \ - V(FillArrayData, art_fill_array_data_from_code) \ - V(GetAndClearException, art_get_and_clear_exception) \ - V(IsExceptionPending, art_is_exception_pending_from_code) \ - V(FindCatchBlock, art_find_catch_block_from_code) \ - V(MarkGCCard, art_mark_gc_card_from_code) \ - V(ProxyInvokeHandler, art_proxy_invoke_handler_from_code) \ + V(LockObject, art_portable_lock_object_from_code) \ + V(UnlockObject, art_portable_unlock_object_from_code) \ + V(GetCurrentThread, art_portable_get_current_thread_from_code) \ + V(SetCurrentThread, art_portable_set_current_thread_from_code) \ + V(PushShadowFrame, art_portable_push_shadow_frame_from_code) \ + V(PopShadowFrame, art_portable_pop_shadow_frame_from_code) \ + V(TestSuspend, art_portable_test_suspend_from_code) \ + V(ThrowException, art_portable_throw_exception_from_code) \ + V(ThrowStackOverflowException, art_portable_throw_stack_overflow_from_code) \ + V(ThrowNullPointerException, art_portable_throw_null_pointer_exception_from_code) \ + V(ThrowDivZeroException, art_portable_throw_div_zero_from_code) \ + V(ThrowIndexOutOfBounds, art_portable_throw_array_bounds_from_code) \ + V(InitializeTypeAndVerifyAccess, art_portable_initialize_type_and_verify_access_from_code) \ + V(InitializeType, art_portable_initialize_type_from_code) \ + V(IsAssignable, art_portable_is_assignable_from_code) \ + V(CheckCast, art_portable_check_cast_from_code) \ + V(CheckPutArrayElement, art_portable_check_put_array_element_from_code) \ + V(AllocObject, art_portable_alloc_object_from_code) \ + V(AllocObjectWithAccessCheck, art_portable_alloc_object_from_code_with_access_check) \ + V(AllocArray, art_portable_alloc_array_from_code) \ + V(AllocArrayWithAccessCheck, art_portable_alloc_array_from_code_with_access_check) \ + V(CheckAndAllocArray, art_portable_check_and_alloc_array_from_code) \ + V(CheckAndAllocArrayWithAccessCheck, art_portable_check_and_alloc_array_from_code_with_access_check) \ + V(FindStaticMethodWithAccessCheck, art_portable_find_static_method_from_code_with_access_check) \ + V(FindDirectMethodWithAccessCheck, art_portable_find_direct_method_from_code_with_access_check) \ + V(FindVirtualMethodWithAccessCheck, art_portable_find_virtual_method_from_code_with_access_check) \ + V(FindSuperMethodWithAccessCheck, art_portable_find_super_method_from_code_with_access_check) \ + V(FindInterfaceMethodWithAccessCheck, art_portable_find_interface_method_from_code_with_access_check) \ + V(FindInterfaceMethod, art_portable_find_interface_method_from_code) \ + V(ResolveString, art_portable_resolve_string_from_code) \ + V(Set32Static, art_portable_set32_static_from_code) \ + V(Set64Static, art_portable_set64_static_from_code) \ + V(SetObjectStatic, art_portable_set_obj_static_from_code) \ + V(Get32Static, art_portable_get32_static_from_code) \ + V(Get64Static, art_portable_get64_static_from_code) \ + V(GetObjectStatic, art_portable_get_obj_static_from_code) \ + V(Set32Instance, art_portable_set32_instance_from_code) \ + V(Set64Instance, art_portable_set64_instance_from_code) \ + V(SetObjectInstance, art_portable_set_obj_instance_from_code) \ + V(Get32Instance, art_portable_get32_instance_from_code) \ + V(Get64Instance, art_portable_get64_instance_from_code) \ + V(GetObjectInstance, art_portable_get_obj_instance_from_code) \ + V(InitializeStaticStorage, art_portable_initialize_static_storage_from_code) \ + V(FillArrayData, art_portable_fill_array_data_from_code) \ + V(GetAndClearException, art_portable_get_and_clear_exception) \ + V(IsExceptionPending, art_portable_is_exception_pending_from_code) \ + V(FindCatchBlock, art_portable_find_catch_block_from_code) \ + V(MarkGCCard, art_portable_mark_gc_card_from_code) \ + V(ProxyInvokeHandler, art_portable_proxy_invoke_handler_from_code) \ V(art_d2l, art_d2l) \ V(art_d2i, art_d2i) \ V(art_f2l, art_f2l) \ V(art_f2i, art_f2i) \ - V(JniMethodStart, art_jni_method_start) \ - V(JniMethodStartSynchronized, art_jni_method_start_synchronized) \ - V(JniMethodEnd, art_jni_method_end) \ - V(JniMethodEndSynchronized, art_jni_method_end_synchronized) \ - V(JniMethodEndWithReference, art_jni_method_end_with_reference) \ - V(JniMethodEndWithReferenceSynchronized, art_jni_method_end_with_reference_synchronized) + V(JniMethodStart, art_portable_jni_method_start) \ + V(JniMethodStartSynchronized, art_portable_jni_method_start_synchronized) \ + V(JniMethodEnd, art_portable_jni_method_end) \ + V(JniMethodEndSynchronized, art_portable_jni_method_end_synchronized) \ + V(JniMethodEndWithReference, art_portable_jni_method_end_with_reference) \ + V(JniMethodEndWithReferenceSynchronized, art_portable_jni_method_end_with_reference_synchronized) diff --git a/src/compiler_llvm/runtime_support_llvm.cc b/src/compiler_llvm/runtime_support_llvm.cc index d0fe4c307b..ccda55ce51 100644 --- a/src/compiler_llvm/runtime_support_llvm.cc +++ b/src/compiler_llvm/runtime_support_llvm.cc @@ -48,7 +48,9 @@ #include <stdint.h> #include <stdlib.h> -namespace art { +using namespace art; + +extern "C" { class ShadowFrameCopyVisitor : public StackVisitor { public: @@ -105,20 +107,20 @@ class ShadowFrameCopyVisitor : public StackVisitor { // Thread //---------------------------------------------------------------------------- -Thread* art_get_current_thread_from_code() { +Thread* art_portable_get_current_thread_from_code() { #if defined(__arm__) || defined(__i386__) LOG(FATAL) << "UNREACHABLE"; #endif return Thread::Current(); } -void* art_set_current_thread_from_code(void* thread_object_addr) { +void* art_portable_set_current_thread_from_code(void* thread_object_addr) { // Hijacked to set r9 on ARM. LOG(FATAL) << "UNREACHABLE"; return NULL; } -void art_lock_object_from_code(mirror::Object* obj, Thread* thread) +void art_portable_lock_object_from_code(mirror::Object* obj, Thread* thread) EXCLUSIVE_LOCK_FUNCTION(monitor_lock_) { DCHECK(obj != NULL); // Assumed to have been checked before entry obj->MonitorEnter(thread); // May block @@ -127,14 +129,14 @@ void art_lock_object_from_code(mirror::Object* obj, Thread* thread) DCHECK(!thread->IsExceptionPending()); } -void art_unlock_object_from_code(mirror::Object* obj, Thread* thread) +void art_portable_unlock_object_from_code(mirror::Object* obj, Thread* thread) UNLOCK_FUNCTION(monitor_lock_) { DCHECK(obj != NULL); // Assumed to have been checked before entry // MonitorExit may throw exception obj->MonitorExit(thread); } -void art_test_suspend_from_code(Thread* thread) +void art_portable_test_suspend_from_code(Thread* thread) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { CheckSuspend(thread); if (thread->ReadFlag(kEnterInterpreter)) { @@ -146,19 +148,21 @@ void art_test_suspend_from_code(Thread* thread) } } -ShadowFrame* art_push_shadow_frame_from_code(Thread* thread, ShadowFrame* new_shadow_frame, - mirror::AbstractMethod* method, uint32_t num_vregs) { +ShadowFrame* art_portable_push_shadow_frame_from_code(Thread* thread, + ShadowFrame* new_shadow_frame, + mirror::AbstractMethod* method, + uint32_t num_vregs) { ShadowFrame* old_frame = thread->PushShadowFrame(new_shadow_frame); new_shadow_frame->SetMethod(method); new_shadow_frame->SetNumberOfVRegs(num_vregs); return old_frame; } -void art_pop_shadow_frame_from_code(void*) { +void art_portable_pop_shadow_frame_from_code(void*) { LOG(FATAL) << "Implemented by IRBuilder."; } -void art_mark_gc_card_from_code(void *, void*) { +void art_portable_mark_gc_card_from_code(void *, void*) { LOG(FATAL) << "Implemented by IRBuilder."; } @@ -166,45 +170,45 @@ void art_mark_gc_card_from_code(void *, void*) { // Exception //---------------------------------------------------------------------------- -bool art_is_exception_pending_from_code() { +bool art_portable_is_exception_pending_from_code() { LOG(FATAL) << "Implemented by IRBuilder."; return false; } -void art_throw_div_zero_from_code() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { +void art_portable_throw_div_zero_from_code() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { Thread::Current()->ThrowNewException("Ljava/lang/ArithmeticException;", "divide by zero"); } -void art_throw_array_bounds_from_code(int32_t index, int32_t length) +void art_portable_throw_array_bounds_from_code(int32_t index, int32_t length) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { Thread::Current()->ThrowNewExceptionF("Ljava/lang/ArrayIndexOutOfBoundsException;", "length=%d; index=%d", length, index); } -void art_throw_no_such_method_from_code(int32_t method_idx) +void art_portable_throw_no_such_method_from_code(int32_t method_idx) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { // We need the calling method as context for the method_idx. mirror::AbstractMethod* method = Thread::Current()->GetCurrentMethod(); ThrowNoSuchMethodError(method_idx, method); } -void art_throw_null_pointer_exception_from_code(uint32_t dex_pc) +void art_portable_throw_null_pointer_exception_from_code(uint32_t dex_pc) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { mirror::AbstractMethod* throw_method = Thread::Current()->GetManagedStack()->GetTopShadowFrame()->GetMethod(); ThrowNullPointerExceptionFromDexPC(throw_method, dex_pc); } -void art_throw_stack_overflow_from_code() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { +void art_portable_throw_stack_overflow_from_code() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { ThrowStackOverflowError(Thread::Current()); } -void art_throw_exception_from_code(mirror::Object* exception) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { +void art_portable_throw_exception_from_code(mirror::Object* exception) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { Thread::Current()->DeliverException(static_cast<mirror::Throwable*>(exception)); } -void* art_get_and_clear_exception(Thread* self) +void* art_portable_get_and_clear_exception(Thread* self) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { DCHECK(self->IsExceptionPending()); mirror::Throwable* exception = self->GetException(); @@ -212,7 +216,7 @@ void* art_get_and_clear_exception(Thread* self) return exception; } -int32_t art_find_catch_block_from_code(mirror::AbstractMethod* current_method, uint32_t ti_offset) +int32_t art_portable_find_catch_block_from_code(mirror::AbstractMethod* current_method, uint32_t ti_offset) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { mirror::Throwable* exception = Thread::Current()->GetException(); // Check for magic deoptimization exception. @@ -253,48 +257,48 @@ int32_t art_find_catch_block_from_code(mirror::AbstractMethod* current_method, u // Object Space //---------------------------------------------------------------------------- -mirror::Object* art_alloc_object_from_code(uint32_t type_idx, - mirror::AbstractMethod* referrer, - Thread* thread) +mirror::Object* art_portable_alloc_object_from_code(uint32_t type_idx, + mirror::AbstractMethod* referrer, + Thread* thread) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { return AllocObjectFromCode(type_idx, referrer, thread, false); } -mirror::Object* art_alloc_object_from_code_with_access_check(uint32_t type_idx, - mirror::AbstractMethod* referrer, - Thread* thread) +mirror::Object* art_portable_alloc_object_from_code_with_access_check(uint32_t type_idx, + mirror::AbstractMethod* referrer, + Thread* thread) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { return AllocObjectFromCode(type_idx, referrer, thread, true); } -mirror::Object* art_alloc_array_from_code(uint32_t type_idx, - mirror::AbstractMethod* referrer, - uint32_t length, - Thread* self) +mirror::Object* art_portable_alloc_array_from_code(uint32_t type_idx, + mirror::AbstractMethod* referrer, + uint32_t length, + Thread* self) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { return AllocArrayFromCode(type_idx, referrer, length, self, false); } -mirror::Object* art_alloc_array_from_code_with_access_check(uint32_t type_idx, - mirror::AbstractMethod* referrer, - uint32_t length, - Thread* self) +mirror::Object* art_portable_alloc_array_from_code_with_access_check(uint32_t type_idx, + mirror::AbstractMethod* referrer, + uint32_t length, + Thread* self) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { return AllocArrayFromCode(type_idx, referrer, length, self, true); } -mirror::Object* art_check_and_alloc_array_from_code(uint32_t type_idx, - mirror::AbstractMethod* referrer, - uint32_t length, - Thread* thread) +mirror::Object* art_portable_check_and_alloc_array_from_code(uint32_t type_idx, + mirror::AbstractMethod* referrer, + uint32_t length, + Thread* thread) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { return CheckAndAllocArrayFromCode(type_idx, referrer, length, thread, false); } -mirror::Object* art_check_and_alloc_array_from_code_with_access_check(uint32_t type_idx, - mirror::AbstractMethod* referrer, - uint32_t length, - Thread* thread) +mirror::Object* art_portable_check_and_alloc_array_from_code_with_access_check(uint32_t type_idx, + mirror::AbstractMethod* referrer, + uint32_t length, + Thread* thread) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { return CheckAndAllocArrayFromCode(type_idx, referrer, length, thread, true); } @@ -324,84 +328,84 @@ static mirror::AbstractMethod* FindMethodHelper(uint32_t method_idx, mirror::Obj return method; } -mirror::Object* art_find_static_method_from_code_with_access_check(uint32_t method_idx, - mirror::Object* this_object, - mirror::AbstractMethod* referrer, - Thread* thread) +mirror::Object* art_portable_find_static_method_from_code_with_access_check(uint32_t method_idx, + mirror::Object* this_object, + mirror::AbstractMethod* referrer, + Thread* thread) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { return FindMethodHelper(method_idx, this_object, referrer, true, kStatic, thread); } -mirror::Object* art_find_direct_method_from_code_with_access_check(uint32_t method_idx, - mirror::Object* this_object, - mirror::AbstractMethod* referrer, - Thread* thread) +mirror::Object* art_portable_find_direct_method_from_code_with_access_check(uint32_t method_idx, + mirror::Object* this_object, + mirror::AbstractMethod* referrer, + Thread* thread) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { return FindMethodHelper(method_idx, this_object, referrer, true, kDirect, thread); } -mirror::Object* art_find_virtual_method_from_code_with_access_check(uint32_t method_idx, - mirror::Object* this_object, - mirror::AbstractMethod* referrer, - Thread* thread) +mirror::Object* art_portable_find_virtual_method_from_code_with_access_check(uint32_t method_idx, + mirror::Object* this_object, + mirror::AbstractMethod* referrer, + Thread* thread) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { return FindMethodHelper(method_idx, this_object, referrer, true, kVirtual, thread); } -mirror::Object* art_find_super_method_from_code_with_access_check(uint32_t method_idx, - mirror::Object* this_object, - mirror::AbstractMethod* referrer, - Thread* thread) +mirror::Object* art_portable_find_super_method_from_code_with_access_check(uint32_t method_idx, + mirror::Object* this_object, + mirror::AbstractMethod* referrer, + Thread* thread) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { return FindMethodHelper(method_idx, this_object, referrer, true, kSuper, thread); } mirror::Object* -art_find_interface_method_from_code_with_access_check(uint32_t method_idx, - mirror::Object* this_object, - mirror::AbstractMethod* referrer, - Thread* thread) +art_portable_find_interface_method_from_code_with_access_check(uint32_t method_idx, + mirror::Object* this_object, + mirror::AbstractMethod* referrer, + Thread* thread) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { return FindMethodHelper(method_idx, this_object, referrer, true, kInterface, thread); } -mirror::Object* art_find_interface_method_from_code(uint32_t method_idx, - mirror::Object* this_object, - mirror::AbstractMethod* referrer, - Thread* thread) +mirror::Object* art_portable_find_interface_method_from_code(uint32_t method_idx, + mirror::Object* this_object, + mirror::AbstractMethod* referrer, + Thread* thread) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { return FindMethodHelper(method_idx, this_object, referrer, false, kInterface, thread); } -mirror::Object* art_initialize_static_storage_from_code(uint32_t type_idx, - mirror::AbstractMethod* referrer, - Thread* thread) +mirror::Object* art_portable_initialize_static_storage_from_code(uint32_t type_idx, + mirror::AbstractMethod* referrer, + Thread* thread) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { return ResolveVerifyAndClinit(type_idx, referrer, thread, true, false); } -mirror::Object* art_initialize_type_from_code(uint32_t type_idx, - mirror::AbstractMethod* referrer, - Thread* thread) +mirror::Object* art_portable_initialize_type_from_code(uint32_t type_idx, + mirror::AbstractMethod* referrer, + Thread* thread) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { return ResolveVerifyAndClinit(type_idx, referrer, thread, false, false); } -mirror::Object* art_initialize_type_and_verify_access_from_code(uint32_t type_idx, - mirror::AbstractMethod* referrer, - Thread* thread) +mirror::Object* art_portable_initialize_type_and_verify_access_from_code(uint32_t type_idx, + mirror::AbstractMethod* referrer, + Thread* thread) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { // Called when caller isn't guaranteed to have access to a type and the dex cache may be // unpopulated return ResolveVerifyAndClinit(type_idx, referrer, thread, false, true); } -mirror::Object* art_resolve_string_from_code(mirror::AbstractMethod* referrer, uint32_t string_idx) +mirror::Object* art_portable_resolve_string_from_code(mirror::AbstractMethod* referrer, uint32_t string_idx) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { return ResolveStringFromCode(referrer, string_idx); } -int32_t art_set32_static_from_code(uint32_t field_idx, mirror::AbstractMethod* referrer, int32_t new_value) +int32_t art_portable_set32_static_from_code(uint32_t field_idx, mirror::AbstractMethod* referrer, int32_t new_value) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { mirror::Field* field = FindFieldFast(field_idx, referrer, StaticPrimitiveWrite, sizeof(uint32_t)); if (LIKELY(field != NULL)) { @@ -417,7 +421,7 @@ int32_t art_set32_static_from_code(uint32_t field_idx, mirror::AbstractMethod* r return -1; } -int32_t art_set64_static_from_code(uint32_t field_idx, mirror::AbstractMethod* referrer, int64_t new_value) +int32_t art_portable_set64_static_from_code(uint32_t field_idx, mirror::AbstractMethod* referrer, int64_t new_value) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { mirror::Field* field = FindFieldFast(field_idx, referrer, StaticPrimitiveWrite, sizeof(uint64_t)); if (LIKELY(field != NULL)) { @@ -433,7 +437,7 @@ int32_t art_set64_static_from_code(uint32_t field_idx, mirror::AbstractMethod* r return -1; } -int32_t art_set_obj_static_from_code(uint32_t field_idx, mirror::AbstractMethod* referrer, mirror::Object* new_value) +int32_t art_portable_set_obj_static_from_code(uint32_t field_idx, mirror::AbstractMethod* referrer, mirror::Object* new_value) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { mirror::Field* field = FindFieldFast(field_idx, referrer, StaticObjectWrite, sizeof(mirror::Object*)); if (LIKELY(field != NULL)) { @@ -449,7 +453,7 @@ int32_t art_set_obj_static_from_code(uint32_t field_idx, mirror::AbstractMethod* return -1; } -int32_t art_get32_static_from_code(uint32_t field_idx, mirror::AbstractMethod* referrer) +int32_t art_portable_get32_static_from_code(uint32_t field_idx, mirror::AbstractMethod* referrer) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { mirror::Field* field = FindFieldFast(field_idx, referrer, StaticPrimitiveRead, sizeof(uint32_t)); if (LIKELY(field != NULL)) { @@ -463,7 +467,7 @@ int32_t art_get32_static_from_code(uint32_t field_idx, mirror::AbstractMethod* r return 0; } -int64_t art_get64_static_from_code(uint32_t field_idx, mirror::AbstractMethod* referrer) +int64_t art_portable_get64_static_from_code(uint32_t field_idx, mirror::AbstractMethod* referrer) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { mirror::Field* field = FindFieldFast(field_idx, referrer, StaticPrimitiveRead, sizeof(uint64_t)); if (LIKELY(field != NULL)) { @@ -477,7 +481,7 @@ int64_t art_get64_static_from_code(uint32_t field_idx, mirror::AbstractMethod* r return 0; } -mirror::Object* art_get_obj_static_from_code(uint32_t field_idx, mirror::AbstractMethod* referrer) +mirror::Object* art_portable_get_obj_static_from_code(uint32_t field_idx, mirror::AbstractMethod* referrer) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { mirror::Field* field = FindFieldFast(field_idx, referrer, StaticObjectRead, sizeof(mirror::Object*)); if (LIKELY(field != NULL)) { @@ -491,7 +495,7 @@ mirror::Object* art_get_obj_static_from_code(uint32_t field_idx, mirror::Abstrac return 0; } -int32_t art_set32_instance_from_code(uint32_t field_idx, mirror::AbstractMethod* referrer, +int32_t art_portable_set32_instance_from_code(uint32_t field_idx, mirror::AbstractMethod* referrer, mirror::Object* obj, uint32_t new_value) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { mirror::Field* field = FindFieldFast(field_idx, referrer, InstancePrimitiveWrite, sizeof(uint32_t)); @@ -508,8 +512,8 @@ int32_t art_set32_instance_from_code(uint32_t field_idx, mirror::AbstractMethod* return -1; } -int32_t art_set64_instance_from_code(uint32_t field_idx, mirror::AbstractMethod* referrer, - mirror::Object* obj, int64_t new_value) +int32_t art_portable_set64_instance_from_code(uint32_t field_idx, mirror::AbstractMethod* referrer, + mirror::Object* obj, int64_t new_value) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { mirror::Field* field = FindFieldFast(field_idx, referrer, InstancePrimitiveWrite, sizeof(uint64_t)); if (LIKELY(field != NULL)) { @@ -525,8 +529,8 @@ int32_t art_set64_instance_from_code(uint32_t field_idx, mirror::AbstractMethod* return -1; } -int32_t art_set_obj_instance_from_code(uint32_t field_idx, mirror::AbstractMethod* referrer, - mirror::Object* obj, mirror::Object* new_value) +int32_t art_portable_set_obj_instance_from_code(uint32_t field_idx, mirror::AbstractMethod* referrer, + mirror::Object* obj, mirror::Object* new_value) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { mirror::Field* field = FindFieldFast(field_idx, referrer, InstanceObjectWrite, sizeof(mirror::Object*)); if (LIKELY(field != NULL)) { @@ -542,7 +546,7 @@ int32_t art_set_obj_instance_from_code(uint32_t field_idx, mirror::AbstractMetho return -1; } -int32_t art_get32_instance_from_code(uint32_t field_idx, mirror::AbstractMethod* referrer, mirror::Object* obj) +int32_t art_portable_get32_instance_from_code(uint32_t field_idx, mirror::AbstractMethod* referrer, mirror::Object* obj) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { mirror::Field* field = FindFieldFast(field_idx, referrer, InstancePrimitiveRead, sizeof(uint32_t)); if (LIKELY(field != NULL)) { @@ -556,7 +560,7 @@ int32_t art_get32_instance_from_code(uint32_t field_idx, mirror::AbstractMethod* return 0; } -int64_t art_get64_instance_from_code(uint32_t field_idx, mirror::AbstractMethod* referrer, mirror::Object* obj) +int64_t art_portable_get64_instance_from_code(uint32_t field_idx, mirror::AbstractMethod* referrer, mirror::Object* obj) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { mirror::Field* field = FindFieldFast(field_idx, referrer, InstancePrimitiveRead, sizeof(uint64_t)); if (LIKELY(field != NULL)) { @@ -570,7 +574,7 @@ int64_t art_get64_instance_from_code(uint32_t field_idx, mirror::AbstractMethod* return 0; } -mirror::Object* art_get_obj_instance_from_code(uint32_t field_idx, mirror::AbstractMethod* referrer, mirror::Object* obj) +mirror::Object* art_portable_get_obj_instance_from_code(uint32_t field_idx, mirror::AbstractMethod* referrer, mirror::Object* obj) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { mirror::Field* field = FindFieldFast(field_idx, referrer, InstanceObjectRead, sizeof(mirror::Object*)); if (LIKELY(field != NULL)) { @@ -584,12 +588,12 @@ mirror::Object* art_get_obj_instance_from_code(uint32_t field_idx, mirror::Abstr return 0; } -void art_fill_array_data_from_code(mirror::AbstractMethod* method, uint32_t dex_pc, - mirror::Array* array, uint32_t payload_offset) +void art_portable_fill_array_data_from_code(mirror::AbstractMethod* method, uint32_t dex_pc, + mirror::Array* array, uint32_t payload_offset) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { // Test: Is array equal to null? (Guard NullPointerException) if (UNLIKELY(array == NULL)) { - art_throw_null_pointer_exception_from_code(dex_pc); + art_portable_throw_null_pointer_exception_from_code(dex_pc); return; } @@ -610,7 +614,7 @@ void art_fill_array_data_from_code(mirror::AbstractMethod* method, uint32_t dex_ uint32_t array_len = static_cast<uint32_t>(array->GetLength()); if (UNLIKELY(array_len < payload->element_count)) { int32_t last_index = payload->element_count - 1; - art_throw_array_bounds_from_code(array_len, last_index); + art_portable_throw_array_bounds_from_code(array_len, last_index); return; } @@ -625,14 +629,14 @@ void art_fill_array_data_from_code(mirror::AbstractMethod* method, uint32_t dex_ // Type checking, in the nature of casting //---------------------------------------------------------------------------- -int32_t art_is_assignable_from_code(const mirror::Class* dest_type, const mirror::Class* src_type) +int32_t art_portable_is_assignable_from_code(const mirror::Class* dest_type, const mirror::Class* src_type) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { DCHECK(dest_type != NULL); DCHECK(src_type != NULL); return dest_type->IsAssignableFrom(src_type) ? 1 : 0; } -void art_check_cast_from_code(const mirror::Class* dest_type, const mirror::Class* src_type) +void art_portable_check_cast_from_code(const mirror::Class* dest_type, const mirror::Class* src_type) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { DCHECK(dest_type->IsClass()) << PrettyClass(dest_type); DCHECK(src_type->IsClass()) << PrettyClass(src_type); @@ -644,7 +648,7 @@ void art_check_cast_from_code(const mirror::Class* dest_type, const mirror::Clas } } -void art_check_put_array_element_from_code(const mirror::Object* element, const mirror::Object* array) +void art_portable_check_put_array_element_from_code(const mirror::Object* element, const mirror::Object* array) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { if (element == NULL) { return; @@ -668,7 +672,7 @@ void art_check_put_array_element_from_code(const mirror::Object* element, const //---------------------------------------------------------------------------- // Called on entry to JNI, transition out of Runnable and release share of mutator_lock_. -uint32_t art_jni_method_start(Thread* self) +uint32_t art_portable_jni_method_start(Thread* self) UNLOCK_FUNCTION(GlobalSynchronizatio::mutator_lock_) { JNIEnvExt* env = self->GetJniEnv(); uint32_t saved_local_ref_cookie = env->local_ref_cookie; @@ -677,10 +681,10 @@ uint32_t art_jni_method_start(Thread* self) return saved_local_ref_cookie; } -uint32_t art_jni_method_start_synchronized(jobject to_lock, Thread* self) +uint32_t art_portable_jni_method_start_synchronized(jobject to_lock, Thread* self) UNLOCK_FUNCTION(Locks::mutator_lock_) { self->DecodeJObject(to_lock)->MonitorEnter(self); - return art_jni_method_start(self); + return art_portable_jni_method_start(self); } static inline void PopLocalReferences(uint32_t saved_local_ref_cookie, Thread* self) { @@ -689,23 +693,24 @@ static inline void PopLocalReferences(uint32_t saved_local_ref_cookie, Thread* s env->local_ref_cookie = saved_local_ref_cookie; } -void art_jni_method_end(uint32_t saved_local_ref_cookie, Thread* self) +void art_portable_jni_method_end(uint32_t saved_local_ref_cookie, Thread* self) SHARED_LOCK_FUNCTION(Locks::mutator_lock_) { self->TransitionFromSuspendedToRunnable(); PopLocalReferences(saved_local_ref_cookie, self); } -void art_jni_method_end_synchronized(uint32_t saved_local_ref_cookie, jobject locked, - Thread* self) +void art_portable_jni_method_end_synchronized(uint32_t saved_local_ref_cookie, + jobject locked, + Thread* self) SHARED_LOCK_FUNCTION(Locks::mutator_lock_) { self->TransitionFromSuspendedToRunnable(); UnlockJniSynchronizedMethod(locked, self); // Must decode before pop. PopLocalReferences(saved_local_ref_cookie, self); } -mirror::Object* art_jni_method_end_with_reference(jobject result, uint32_t saved_local_ref_cookie, - Thread* self) +mirror::Object* art_portable_jni_method_end_with_reference(jobject result, uint32_t saved_local_ref_cookie, + Thread* self) SHARED_LOCK_FUNCTION(Locks::mutator_lock_) { self->TransitionFromSuspendedToRunnable(); mirror::Object* o = self->DecodeJObject(result); // Must decode before pop. @@ -720,9 +725,9 @@ mirror::Object* art_jni_method_end_with_reference(jobject result, uint32_t saved return o; } -mirror::Object* art_jni_method_end_with_reference_synchronized(jobject result, - uint32_t saved_local_ref_cookie, - jobject locked, Thread* self) +mirror::Object* art_portable_jni_method_end_with_reference_synchronized(jobject result, + uint32_t saved_local_ref_cookie, + jobject locked, Thread* self) SHARED_LOCK_FUNCTION(Locks::mutator_lock_) { self->TransitionFromSuspendedToRunnable(); UnlockJniSynchronizedMethod(locked, self); // Must decode before pop. @@ -747,8 +752,8 @@ extern "C" RETURN_TYPE NAME(__VA_ARGS__); COMPILER_RUNTIME_FUNC_LIST_NATIVE(EXTERNAL_LINKAGE) #undef EXTERNAL_LINKAGE -static void* art_find_compiler_runtime_func(const char* name) { -// TODO: If target support some math func, use the target's version. (e.g. art_d2i -> __aeabi_d2iz) +static void* art_portable_find_compiler_runtime_func(const char* name) { +// TODO: If target support some math func, use the target's version. (e.g. art_portable_d2i -> __aeabi_d2iz) static const char* const names[] = { #define DEFINE_ENTRY(NAME, RETURN_TYPE, ...) #NAME , COMPILER_RUNTIME_FUNC_LIST_NATIVE(DEFINE_ENTRY) @@ -781,7 +786,7 @@ static void* art_find_compiler_runtime_func(const char* name) { // Handler for invocation on proxy methods. Create a boxed argument array and invoke the invocation // handler which is a field within the proxy object receiver. The var args encode the arguments // with the last argument being a pointer to a JValue to store the result in. -void art_proxy_invoke_handler_from_code(mirror::AbstractMethod* proxy_method, ...) +void art_portable_proxy_invoke_handler_from_code(mirror::AbstractMethod* proxy_method, ...) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { va_list ap; va_start(ap, proxy_method); @@ -855,7 +860,7 @@ void art_proxy_invoke_handler_from_code(mirror::AbstractMethod* proxy_method, .. } } -void* art_find_runtime_support_func(void* context, const char* name) { +void* art_portable_find_runtime_support_func(void* context, const char* name) { struct func_entry_t { const char* name; size_t name_len; @@ -872,7 +877,7 @@ void* art_find_runtime_support_func(void* context, const char* name) { static size_t const tab_size = sizeof(tab) / sizeof(struct func_entry_t); // Search the compiler runtime (such as __divdi3) - void* result = art_find_compiler_runtime_func(name); + void* result = art_portable_find_compiler_runtime_func(name); if (result != NULL) { return result; } @@ -892,4 +897,4 @@ void* art_find_runtime_support_func(void* context, const char* name) { return 0; } -} // namespace art +} // extern "C" diff --git a/src/compiler_llvm/runtime_support_llvm.h b/src/compiler_llvm/runtime_support_llvm.h index bb0473b6f7..af99842089 100644 --- a/src/compiler_llvm/runtime_support_llvm.h +++ b/src/compiler_llvm/runtime_support_llvm.h @@ -17,59 +17,14 @@ #ifndef ART_SRC_COMPILER_LLVM_RUNTIME_SUPPORT_LLVM_H_ #define ART_SRC_COMPILER_LLVM_RUNTIME_SUPPORT_LLVM_H_ -#include <stdint.h> - -namespace art { -namespace mirror { -class AbstractMethod; -class Object; -} // namespace mirror - -class ShadowFrame; -class Thread; - -//---------------------------------------------------------------------------- -// Thread -//---------------------------------------------------------------------------- - -ShadowFrame* art_push_shadow_frame_from_code(Thread* thread, ShadowFrame* new_shadow_frame, - mirror::AbstractMethod* method, uint32_t num_vregs); - -void art_pop_shadow_frame_from_code(void*); - - -//---------------------------------------------------------------------------- -// Exception -//---------------------------------------------------------------------------- - -bool art_is_exception_pending_from_code(); - -void art_throw_div_zero_from_code(); - -void art_throw_array_bounds_from_code(int32_t length, int32_t index); - -void art_throw_no_such_method_from_code(int32_t method_idx); - -void art_throw_null_pointer_exception_from_code(uint32_t dex_pc); - -void art_throw_stack_overflow_from_code(); - -void art_throw_exception_from_code(mirror::Object* exception); - -int32_t art_find_catch_block_from_code(mirror::AbstractMethod* current_method, - uint32_t ti_offset); - - -void art_test_suspend_from_code(Thread* thread); - -void* art_set_current_thread_from_code(void* thread_object_addr); +extern "C" { //---------------------------------------------------------------------------- // Runtime Support Function Lookup Callback //---------------------------------------------------------------------------- -void* art_find_runtime_support_func(void* context, const char* name); +void* art_portable_find_runtime_support_func(void* context, const char* name); -} // namespace art +} // extern "C" #endif // ART_SRC_COMPILER_LLVM_RUNTIME_SUPPORT_LLVM_H_ |