Andreas Gampe | c7ed09b | 2016-04-25 20:08:55 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2016 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | #ifndef ART_RUNTIME_ENTRYPOINTS_QUICK_QUICK_DEFAULT_INIT_ENTRYPOINTS_H_ |
| 18 | #define ART_RUNTIME_ENTRYPOINTS_QUICK_QUICK_DEFAULT_INIT_ENTRYPOINTS_H_ |
| 19 | |
| 20 | #include "base/logging.h" |
| 21 | #include "entrypoints/jni/jni_entrypoints.h" |
| 22 | #include "entrypoints/runtime_asm_entrypoints.h" |
| 23 | #include "quick_alloc_entrypoints.h" |
| 24 | #include "quick_default_externs.h" |
| 25 | #include "quick_entrypoints.h" |
| 26 | |
| 27 | namespace art { |
| 28 | |
| 29 | void DefaultInitEntryPoints(JniEntryPoints* jpoints, QuickEntryPoints* qpoints) { |
| 30 | // JNI |
| 31 | jpoints->pDlsymLookup = art_jni_dlsym_lookup_stub; |
| 32 | |
| 33 | // Alloc |
| 34 | ResetQuickAllocEntryPoints(qpoints); |
| 35 | |
| 36 | // DexCache |
| 37 | qpoints->pInitializeStaticStorage = art_quick_initialize_static_storage; |
| 38 | qpoints->pInitializeTypeAndVerifyAccess = art_quick_initialize_type_and_verify_access; |
| 39 | qpoints->pInitializeType = art_quick_initialize_type; |
| 40 | qpoints->pResolveString = art_quick_resolve_string; |
| 41 | |
| 42 | // Field |
| 43 | qpoints->pSet8Instance = art_quick_set8_instance; |
| 44 | qpoints->pSet8Static = art_quick_set8_static; |
| 45 | qpoints->pSet16Instance = art_quick_set16_instance; |
| 46 | qpoints->pSet16Static = art_quick_set16_static; |
| 47 | qpoints->pSet32Instance = art_quick_set32_instance; |
| 48 | qpoints->pSet32Static = art_quick_set32_static; |
| 49 | qpoints->pSet64Instance = art_quick_set64_instance; |
| 50 | qpoints->pSet64Static = art_quick_set64_static; |
| 51 | qpoints->pSetObjInstance = art_quick_set_obj_instance; |
| 52 | qpoints->pSetObjStatic = art_quick_set_obj_static; |
| 53 | qpoints->pGetByteInstance = art_quick_get_byte_instance; |
| 54 | qpoints->pGetBooleanInstance = art_quick_get_boolean_instance; |
| 55 | qpoints->pGetShortInstance = art_quick_get_short_instance; |
| 56 | qpoints->pGetCharInstance = art_quick_get_char_instance; |
| 57 | qpoints->pGet32Instance = art_quick_get32_instance; |
| 58 | qpoints->pGet64Instance = art_quick_get64_instance; |
| 59 | qpoints->pGetObjInstance = art_quick_get_obj_instance; |
| 60 | qpoints->pGetByteStatic = art_quick_get_byte_static; |
| 61 | qpoints->pGetBooleanStatic = art_quick_get_boolean_static; |
| 62 | qpoints->pGetShortStatic = art_quick_get_short_static; |
| 63 | qpoints->pGetCharStatic = art_quick_get_char_static; |
| 64 | qpoints->pGet32Static = art_quick_get32_static; |
| 65 | qpoints->pGet64Static = art_quick_get64_static; |
| 66 | qpoints->pGetObjStatic = art_quick_get_obj_static; |
| 67 | |
| 68 | // Array |
| 69 | qpoints->pAputObjectWithNullAndBoundCheck = art_quick_aput_obj_with_null_and_bound_check; |
| 70 | qpoints->pAputObjectWithBoundCheck = art_quick_aput_obj_with_bound_check; |
| 71 | qpoints->pAputObject = art_quick_aput_obj; |
| 72 | qpoints->pHandleFillArrayData = art_quick_handle_fill_data; |
| 73 | |
| 74 | // JNI |
| 75 | qpoints->pJniMethodStart = JniMethodStart; |
Igor Murashkin | 9d4b6da | 2016-07-29 09:51:58 -0700 | [diff] [blame] | 76 | qpoints->pJniMethodFastStart = JniMethodFastStart; |
Andreas Gampe | c7ed09b | 2016-04-25 20:08:55 -0700 | [diff] [blame] | 77 | qpoints->pJniMethodStartSynchronized = JniMethodStartSynchronized; |
| 78 | qpoints->pJniMethodEnd = JniMethodEnd; |
| 79 | qpoints->pJniMethodEndSynchronized = JniMethodEndSynchronized; |
| 80 | qpoints->pJniMethodEndWithReference = JniMethodEndWithReference; |
| 81 | qpoints->pJniMethodEndWithReferenceSynchronized = JniMethodEndWithReferenceSynchronized; |
Igor Murashkin | 9d4b6da | 2016-07-29 09:51:58 -0700 | [diff] [blame] | 82 | qpoints->pJniMethodFastEnd = JniMethodFastEnd; |
Andreas Gampe | c7ed09b | 2016-04-25 20:08:55 -0700 | [diff] [blame] | 83 | qpoints->pQuickGenericJniTrampoline = art_quick_generic_jni_trampoline; |
| 84 | |
| 85 | // Locks |
| 86 | if (UNLIKELY(VLOG_IS_ON(systrace_lock_logging))) { |
| 87 | qpoints->pLockObject = art_quick_lock_object_no_inline; |
| 88 | qpoints->pUnlockObject = art_quick_unlock_object_no_inline; |
| 89 | } else { |
| 90 | qpoints->pLockObject = art_quick_lock_object; |
| 91 | qpoints->pUnlockObject = art_quick_unlock_object; |
| 92 | } |
| 93 | |
| 94 | // Invocation |
| 95 | qpoints->pQuickImtConflictTrampoline = art_quick_imt_conflict_trampoline; |
| 96 | qpoints->pQuickResolutionTrampoline = art_quick_resolution_trampoline; |
| 97 | qpoints->pQuickToInterpreterBridge = art_quick_to_interpreter_bridge; |
| 98 | qpoints->pInvokeDirectTrampolineWithAccessCheck = |
| 99 | art_quick_invoke_direct_trampoline_with_access_check; |
| 100 | qpoints->pInvokeInterfaceTrampolineWithAccessCheck = |
| 101 | art_quick_invoke_interface_trampoline_with_access_check; |
| 102 | qpoints->pInvokeStaticTrampolineWithAccessCheck = |
| 103 | art_quick_invoke_static_trampoline_with_access_check; |
| 104 | qpoints->pInvokeSuperTrampolineWithAccessCheck = |
| 105 | art_quick_invoke_super_trampoline_with_access_check; |
| 106 | qpoints->pInvokeVirtualTrampolineWithAccessCheck = |
| 107 | art_quick_invoke_virtual_trampoline_with_access_check; |
| 108 | |
| 109 | // Thread |
| 110 | qpoints->pTestSuspend = art_quick_test_suspend; |
| 111 | |
| 112 | // Throws |
| 113 | qpoints->pDeliverException = art_quick_deliver_exception; |
| 114 | qpoints->pThrowArrayBounds = art_quick_throw_array_bounds; |
| 115 | qpoints->pThrowDivZero = art_quick_throw_div_zero; |
| 116 | qpoints->pThrowNoSuchMethod = art_quick_throw_no_such_method; |
| 117 | qpoints->pThrowNullPointer = art_quick_throw_null_pointer_exception; |
| 118 | qpoints->pThrowStackOverflow = art_quick_throw_stack_overflow; |
Vladimir Marko | 87f3fcb | 2016-04-28 15:52:11 +0100 | [diff] [blame] | 119 | qpoints->pThrowStringBounds = art_quick_throw_string_bounds; |
Andreas Gampe | c7ed09b | 2016-04-25 20:08:55 -0700 | [diff] [blame] | 120 | |
| 121 | // Deoptimize |
| 122 | qpoints->pDeoptimize = art_quick_deoptimize_from_compiled_code; |
| 123 | }; |
| 124 | |
| 125 | } // namespace art |
| 126 | |
| 127 | #endif // ART_RUNTIME_ENTRYPOINTS_QUICK_QUICK_DEFAULT_INIT_ENTRYPOINTS_H_ |