Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2011 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 | |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 17 | #ifndef ART_RUNTIME_ART_METHOD_INL_H_ |
| 18 | #define ART_RUNTIME_ART_METHOD_INL_H_ |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 19 | |
Brian Carlstrom | ea46f95 | 2013-07-30 01:26:50 -0700 | [diff] [blame] | 20 | #include "art_method.h" |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 21 | |
Andreas Gampe | 58a5af8 | 2014-07-31 16:23:49 -0700 | [diff] [blame] | 22 | #include "art_field.h" |
Mathieu Chartier | 7c0fe5e | 2015-07-17 19:53:47 -0700 | [diff] [blame] | 23 | #include "base/logging.h" |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 24 | #include "dex_file.h" |
Elliott Hughes | 956af0f | 2014-12-11 14:34:28 -0800 | [diff] [blame] | 25 | #include "dex_file-inl.h" |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 26 | #include "gc_root-inl.h" |
| 27 | #include "mirror/class-inl.h" |
| 28 | #include "mirror/dex_cache.h" |
| 29 | #include "mirror/object-inl.h" |
| 30 | #include "mirror/object_array.h" |
Vladimir Marko | 96c6ab9 | 2014-04-08 14:00:50 +0100 | [diff] [blame] | 31 | #include "oat.h" |
Vladimir Marko | 7624d25 | 2014-05-02 14:40:15 +0100 | [diff] [blame] | 32 | #include "quick/quick_method_frame_info.h" |
Mingyao Yang | 98d1cc8 | 2014-05-15 17:02:16 -0700 | [diff] [blame] | 33 | #include "read_barrier-inl.h" |
Vladimir Marko | 7624d25 | 2014-05-02 14:40:15 +0100 | [diff] [blame] | 34 | #include "runtime-inl.h" |
Vladimir Marko | 80afd02 | 2015-05-19 18:08:00 +0100 | [diff] [blame] | 35 | #include "utils.h" |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 36 | |
| 37 | namespace art { |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 38 | |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 39 | inline mirror::Class* ArtMethod::GetDeclaringClassUnchecked() { |
Hiroshi Yamauchi | 3f64f25 | 2015-06-12 18:35:06 -0700 | [diff] [blame] | 40 | GcRootSource gc_root_source(this); |
| 41 | return declaring_class_.Read(&gc_root_source); |
Mingyao Yang | 98d1cc8 | 2014-05-15 17:02:16 -0700 | [diff] [blame] | 42 | } |
| 43 | |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 44 | inline mirror::Class* ArtMethod::GetDeclaringClassNoBarrier() { |
| 45 | return declaring_class_.Read<kWithoutReadBarrier>(); |
Mingyao Yang | 98d1cc8 | 2014-05-15 17:02:16 -0700 | [diff] [blame] | 46 | } |
| 47 | |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 48 | inline mirror::Class* ArtMethod::GetDeclaringClass() { |
| 49 | mirror::Class* result = GetDeclaringClassUnchecked(); |
| 50 | if (kIsDebugBuild) { |
| 51 | if (!IsRuntimeMethod()) { |
| 52 | CHECK(result != nullptr) << this; |
| 53 | CHECK(result->IsIdxLoaded() || result->IsErroneous()) |
| 54 | << result->GetStatus() << " " << PrettyClass(result); |
| 55 | } else { |
| 56 | CHECK(result == nullptr) << this; |
| 57 | } |
| 58 | } |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 59 | return result; |
| 60 | } |
| 61 | |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 62 | inline void ArtMethod::SetDeclaringClass(mirror::Class* new_declaring_class) { |
| 63 | declaring_class_ = GcRoot<mirror::Class>(new_declaring_class); |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 64 | } |
| 65 | |
Ian Rogers | ef7d42f | 2014-01-06 12:55:46 -0800 | [diff] [blame] | 66 | inline uint32_t ArtMethod::GetAccessFlags() { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 67 | DCHECK(IsRuntimeMethod() || GetDeclaringClass()->IsIdxLoaded() || |
| 68 | GetDeclaringClass()->IsErroneous()); |
| 69 | return access_flags_; |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 70 | } |
| 71 | |
Ian Rogers | ef7d42f | 2014-01-06 12:55:46 -0800 | [diff] [blame] | 72 | inline uint16_t ArtMethod::GetMethodIndex() { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 73 | DCHECK(IsRuntimeMethod() || GetDeclaringClass()->IsResolved() || |
| 74 | GetDeclaringClass()->IsErroneous()); |
| 75 | return method_index_; |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 76 | } |
| 77 | |
Mathieu Chartier | 9f3629d | 2014-10-28 18:23:02 -0700 | [diff] [blame] | 78 | inline uint16_t ArtMethod::GetMethodIndexDuringLinking() { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 79 | return method_index_; |
Mathieu Chartier | 9f3629d | 2014-10-28 18:23:02 -0700 | [diff] [blame] | 80 | } |
| 81 | |
Ian Rogers | ef7d42f | 2014-01-06 12:55:46 -0800 | [diff] [blame] | 82 | inline uint32_t ArtMethod::GetDexMethodIndex() { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 83 | DCHECK(IsRuntimeMethod() || GetDeclaringClass()->IsIdxLoaded() || |
| 84 | GetDeclaringClass()->IsErroneous()); |
| 85 | return dex_method_index_; |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 86 | } |
| 87 | |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 88 | inline mirror::PointerArray* ArtMethod::GetDexCacheResolvedMethods() { |
Hiroshi Yamauchi | 3f64f25 | 2015-06-12 18:35:06 -0700 | [diff] [blame] | 89 | GcRootSource gc_root_source(this); |
| 90 | return dex_cache_resolved_methods_.Read(&gc_root_source); |
Ian Rogers | 4f6ad8a | 2013-03-18 15:27:28 -0700 | [diff] [blame] | 91 | } |
| 92 | |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 93 | inline ArtMethod* ArtMethod::GetDexCacheResolvedMethod(uint16_t method_index, size_t ptr_size) { |
| 94 | auto* method = GetDexCacheResolvedMethods()->GetElementPtrSize<ArtMethod*>( |
| 95 | method_index, ptr_size); |
| 96 | if (LIKELY(method != nullptr)) { |
| 97 | auto* declaring_class = method->GetDeclaringClass(); |
| 98 | if (LIKELY(declaring_class == nullptr || !declaring_class->IsErroneous())) { |
| 99 | return method; |
| 100 | } |
Andreas Gampe | 58a5af8 | 2014-07-31 16:23:49 -0700 | [diff] [blame] | 101 | } |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 102 | return nullptr; |
Andreas Gampe | 58a5af8 | 2014-07-31 16:23:49 -0700 | [diff] [blame] | 103 | } |
| 104 | |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 105 | inline void ArtMethod::SetDexCacheResolvedMethod(uint16_t method_idx, ArtMethod* new_method, |
| 106 | size_t ptr_size) { |
| 107 | DCHECK(new_method == nullptr || new_method->GetDeclaringClass() != nullptr); |
| 108 | GetDexCacheResolvedMethods()->SetElementPtrSize(method_idx, new_method, ptr_size); |
Andreas Gampe | 58a5af8 | 2014-07-31 16:23:49 -0700 | [diff] [blame] | 109 | } |
| 110 | |
| 111 | inline bool ArtMethod::HasDexCacheResolvedMethods() { |
| 112 | return GetDexCacheResolvedMethods() != nullptr; |
| 113 | } |
| 114 | |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 115 | inline bool ArtMethod::HasSameDexCacheResolvedMethods(mirror::PointerArray* other_cache) { |
Andreas Gampe | 58a5af8 | 2014-07-31 16:23:49 -0700 | [diff] [blame] | 116 | return GetDexCacheResolvedMethods() == other_cache; |
| 117 | } |
| 118 | |
| 119 | inline bool ArtMethod::HasSameDexCacheResolvedMethods(ArtMethod* other) { |
| 120 | return GetDexCacheResolvedMethods() == other->GetDexCacheResolvedMethods(); |
| 121 | } |
| 122 | |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 123 | inline mirror::ObjectArray<mirror::Class>* ArtMethod::GetDexCacheResolvedTypes() { |
Hiroshi Yamauchi | 3f64f25 | 2015-06-12 18:35:06 -0700 | [diff] [blame] | 124 | GcRootSource gc_root_source(this); |
| 125 | return dex_cache_resolved_types_.Read(&gc_root_source); |
Ian Rogers | 4f6ad8a | 2013-03-18 15:27:28 -0700 | [diff] [blame] | 126 | } |
| 127 | |
Andreas Gampe | 58a5af8 | 2014-07-31 16:23:49 -0700 | [diff] [blame] | 128 | template <bool kWithCheck> |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 129 | inline mirror::Class* ArtMethod::GetDexCacheResolvedType(uint32_t type_index) { |
| 130 | mirror::Class* klass = kWithCheck ? |
| 131 | GetDexCacheResolvedTypes()->Get(type_index) : |
| 132 | GetDexCacheResolvedTypes()->GetWithoutChecks(type_index); |
Andreas Gampe | 58a5af8 | 2014-07-31 16:23:49 -0700 | [diff] [blame] | 133 | return (klass != nullptr && !klass->IsErroneous()) ? klass : nullptr; |
| 134 | } |
| 135 | |
| 136 | inline bool ArtMethod::HasDexCacheResolvedTypes() { |
| 137 | return GetDexCacheResolvedTypes() != nullptr; |
| 138 | } |
| 139 | |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 140 | inline bool ArtMethod::HasSameDexCacheResolvedTypes( |
| 141 | mirror::ObjectArray<mirror::Class>* other_cache) { |
Andreas Gampe | 58a5af8 | 2014-07-31 16:23:49 -0700 | [diff] [blame] | 142 | return GetDexCacheResolvedTypes() == other_cache; |
| 143 | } |
| 144 | |
| 145 | inline bool ArtMethod::HasSameDexCacheResolvedTypes(ArtMethod* other) { |
| 146 | return GetDexCacheResolvedTypes() == other->GetDexCacheResolvedTypes(); |
| 147 | } |
| 148 | |
Ian Rogers | a048560 | 2014-12-02 15:48:04 -0800 | [diff] [blame] | 149 | inline mirror::Class* ArtMethod::GetClassFromTypeIndex(uint16_t type_idx, bool resolve) { |
| 150 | mirror::Class* type = GetDexCacheResolvedType(type_idx); |
| 151 | if (type == nullptr && resolve) { |
| 152 | type = Runtime::Current()->GetClassLinker()->ResolveType(type_idx, this); |
| 153 | CHECK(type != nullptr || Thread::Current()->IsExceptionPending()); |
| 154 | } |
| 155 | return type; |
| 156 | } |
| 157 | |
Ian Rogers | ef7d42f | 2014-01-06 12:55:46 -0800 | [diff] [blame] | 158 | inline uint32_t ArtMethod::GetCodeSize() { |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 159 | DCHECK(!IsRuntimeMethod() && !IsProxyMethod()) << PrettyMethod(this); |
Mathieu Chartier | e5f13e5 | 2015-02-24 09:37:21 -0800 | [diff] [blame] | 160 | return GetCodeSize(EntryPointToCodePointer(GetEntryPointFromQuickCompiledCode())); |
| 161 | } |
| 162 | |
| 163 | inline uint32_t ArtMethod::GetCodeSize(const void* code) { |
Vladimir Marko | 8a63057 | 2014-04-09 18:45:35 +0100 | [diff] [blame] | 164 | if (code == nullptr) { |
| 165 | return 0u; |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 166 | } |
Vladimir Marko | 7624d25 | 2014-05-02 14:40:15 +0100 | [diff] [blame] | 167 | return reinterpret_cast<const OatQuickMethodHeader*>(code)[-1].code_size_; |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 168 | } |
| 169 | |
Brian Carlstrom | ea46f95 | 2013-07-30 01:26:50 -0700 | [diff] [blame] | 170 | inline bool ArtMethod::CheckIncompatibleClassChange(InvokeType type) { |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 171 | switch (type) { |
| 172 | case kStatic: |
| 173 | return !IsStatic(); |
| 174 | case kDirect: |
| 175 | return !IsDirect() || IsStatic(); |
| 176 | case kVirtual: { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 177 | mirror::Class* methods_class = GetDeclaringClass(); |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 178 | return IsDirect() || (methods_class->IsInterface() && !IsMiranda()); |
| 179 | } |
| 180 | case kSuper: |
Andreas Gampe | 8f252e6 | 2014-08-25 20:46:31 -0700 | [diff] [blame] | 181 | // Constructors and static methods are called with invoke-direct. |
| 182 | // Interface methods cannot be invoked with invoke-super. |
| 183 | return IsConstructor() || IsStatic() || GetDeclaringClass()->IsInterface(); |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 184 | case kInterface: { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 185 | mirror::Class* methods_class = GetDeclaringClass(); |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 186 | return IsDirect() || !(methods_class->IsInterface() || methods_class->IsObjectClass()); |
| 187 | } |
| 188 | default: |
| 189 | LOG(FATAL) << "Unreachable - invocation type: " << type; |
Ian Rogers | 2c4257b | 2014-10-24 14:20:06 -0700 | [diff] [blame] | 190 | UNREACHABLE(); |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 191 | } |
| 192 | } |
| 193 | |
Ian Rogers | ef7d42f | 2014-01-06 12:55:46 -0800 | [diff] [blame] | 194 | inline uint32_t ArtMethod::GetQuickOatCodeOffset() { |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 195 | DCHECK(!Runtime::Current()->IsStarted()); |
Ian Rogers | ef7d42f | 2014-01-06 12:55:46 -0800 | [diff] [blame] | 196 | return PointerToLowMemUInt32(GetEntryPointFromQuickCompiledCode()); |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 197 | } |
| 198 | |
Ian Rogers | ef7d42f | 2014-01-06 12:55:46 -0800 | [diff] [blame] | 199 | inline void ArtMethod::SetQuickOatCodeOffset(uint32_t code_offset) { |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 200 | DCHECK(!Runtime::Current()->IsStarted()); |
Ian Rogers | ef7d42f | 2014-01-06 12:55:46 -0800 | [diff] [blame] | 201 | SetEntryPointFromQuickCompiledCode(reinterpret_cast<void*>(code_offset)); |
| 202 | } |
| 203 | |
Mathieu Chartier | a7dd038 | 2014-11-20 17:08:58 -0800 | [diff] [blame] | 204 | inline const uint8_t* ArtMethod::GetMappingTable(size_t pointer_size) { |
| 205 | const void* code_pointer = GetQuickOatCodePointer(pointer_size); |
Vladimir Marko | 4c1c510 | 2014-05-14 16:51:16 +0100 | [diff] [blame] | 206 | if (code_pointer == nullptr) { |
| 207 | return nullptr; |
| 208 | } |
Mathieu Chartier | a7dd038 | 2014-11-20 17:08:58 -0800 | [diff] [blame] | 209 | return GetMappingTable(code_pointer, pointer_size); |
Vladimir Marko | 4c1c510 | 2014-05-14 16:51:16 +0100 | [diff] [blame] | 210 | } |
| 211 | |
Mathieu Chartier | a7dd038 | 2014-11-20 17:08:58 -0800 | [diff] [blame] | 212 | inline const uint8_t* ArtMethod::GetMappingTable(const void* code_pointer, size_t pointer_size) { |
Vladimir Marko | 4c1c510 | 2014-05-14 16:51:16 +0100 | [diff] [blame] | 213 | DCHECK(code_pointer != nullptr); |
Mathieu Chartier | a7dd038 | 2014-11-20 17:08:58 -0800 | [diff] [blame] | 214 | DCHECK_EQ(code_pointer, GetQuickOatCodePointer(pointer_size)); |
Vladimir Marko | 4c1c510 | 2014-05-14 16:51:16 +0100 | [diff] [blame] | 215 | uint32_t offset = |
| 216 | reinterpret_cast<const OatQuickMethodHeader*>(code_pointer)[-1].mapping_table_offset_; |
| 217 | if (UNLIKELY(offset == 0u)) { |
| 218 | return nullptr; |
| 219 | } |
| 220 | return reinterpret_cast<const uint8_t*>(code_pointer) - offset; |
| 221 | } |
| 222 | |
Mathieu Chartier | a7dd038 | 2014-11-20 17:08:58 -0800 | [diff] [blame] | 223 | inline const uint8_t* ArtMethod::GetVmapTable(size_t pointer_size) { |
| 224 | const void* code_pointer = GetQuickOatCodePointer(pointer_size); |
Vladimir Marko | 4c1c510 | 2014-05-14 16:51:16 +0100 | [diff] [blame] | 225 | if (code_pointer == nullptr) { |
| 226 | return nullptr; |
| 227 | } |
Mathieu Chartier | a7dd038 | 2014-11-20 17:08:58 -0800 | [diff] [blame] | 228 | return GetVmapTable(code_pointer, pointer_size); |
Vladimir Marko | 4c1c510 | 2014-05-14 16:51:16 +0100 | [diff] [blame] | 229 | } |
| 230 | |
Mathieu Chartier | a7dd038 | 2014-11-20 17:08:58 -0800 | [diff] [blame] | 231 | inline const uint8_t* ArtMethod::GetVmapTable(const void* code_pointer, size_t pointer_size) { |
| 232 | CHECK(!IsOptimized(pointer_size)) << "Unimplemented vmap table for optimized compiler"; |
Vladimir Marko | 4c1c510 | 2014-05-14 16:51:16 +0100 | [diff] [blame] | 233 | DCHECK(code_pointer != nullptr); |
Mathieu Chartier | a7dd038 | 2014-11-20 17:08:58 -0800 | [diff] [blame] | 234 | DCHECK_EQ(code_pointer, GetQuickOatCodePointer(pointer_size)); |
Vladimir Marko | 4c1c510 | 2014-05-14 16:51:16 +0100 | [diff] [blame] | 235 | uint32_t offset = |
| 236 | reinterpret_cast<const OatQuickMethodHeader*>(code_pointer)[-1].vmap_table_offset_; |
| 237 | if (UNLIKELY(offset == 0u)) { |
| 238 | return nullptr; |
| 239 | } |
| 240 | return reinterpret_cast<const uint8_t*>(code_pointer) - offset; |
| 241 | } |
| 242 | |
Nicolas Geoffray | e982f0b | 2014-08-13 02:11:24 +0100 | [diff] [blame] | 243 | inline CodeInfo ArtMethod::GetOptimizedCodeInfo() { |
Mathieu Chartier | a7dd038 | 2014-11-20 17:08:58 -0800 | [diff] [blame] | 244 | DCHECK(IsOptimized(sizeof(void*))); |
| 245 | const void* code_pointer = GetQuickOatCodePointer(sizeof(void*)); |
Nicolas Geoffray | 3946844 | 2014-09-02 15:17:15 +0100 | [diff] [blame] | 246 | DCHECK(code_pointer != nullptr); |
| 247 | uint32_t offset = |
| 248 | reinterpret_cast<const OatQuickMethodHeader*>(code_pointer)[-1].vmap_table_offset_; |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 249 | const void* data = |
| 250 | reinterpret_cast<const void*>(reinterpret_cast<const uint8_t*>(code_pointer) - offset); |
Nicolas Geoffray | e982f0b | 2014-08-13 02:11:24 +0100 | [diff] [blame] | 251 | return CodeInfo(data); |
Nicolas Geoffray | 3946844 | 2014-09-02 15:17:15 +0100 | [diff] [blame] | 252 | } |
| 253 | |
Mathieu Chartier | 957ca1c | 2014-11-21 16:51:29 -0800 | [diff] [blame] | 254 | inline const uint8_t* ArtMethod::GetNativeGcMap(size_t pointer_size) { |
| 255 | const void* code_pointer = GetQuickOatCodePointer(pointer_size); |
| 256 | if (code_pointer == nullptr) { |
| 257 | return nullptr; |
| 258 | } |
| 259 | return GetNativeGcMap(code_pointer, pointer_size); |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 260 | } |
| 261 | |
Mathieu Chartier | 957ca1c | 2014-11-21 16:51:29 -0800 | [diff] [blame] | 262 | inline const uint8_t* ArtMethod::GetNativeGcMap(const void* code_pointer, size_t pointer_size) { |
| 263 | DCHECK(code_pointer != nullptr); |
| 264 | DCHECK_EQ(code_pointer, GetQuickOatCodePointer(pointer_size)); |
| 265 | uint32_t offset = |
| 266 | reinterpret_cast<const OatQuickMethodHeader*>(code_pointer)[-1].gc_map_offset_; |
| 267 | if (UNLIKELY(offset == 0u)) { |
| 268 | return nullptr; |
| 269 | } |
| 270 | return reinterpret_cast<const uint8_t*>(code_pointer) - offset; |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 271 | } |
| 272 | |
Ian Rogers | ef7d42f | 2014-01-06 12:55:46 -0800 | [diff] [blame] | 273 | inline bool ArtMethod::IsRuntimeMethod() { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 274 | return dex_method_index_ == DexFile::kDexNoIndex; |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 275 | } |
| 276 | |
Ian Rogers | ef7d42f | 2014-01-06 12:55:46 -0800 | [diff] [blame] | 277 | inline bool ArtMethod::IsCalleeSaveMethod() { |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 278 | if (!IsRuntimeMethod()) { |
| 279 | return false; |
| 280 | } |
| 281 | Runtime* runtime = Runtime::Current(); |
| 282 | bool result = false; |
| 283 | for (int i = 0; i < Runtime::kLastCalleeSaveType; i++) { |
| 284 | if (this == runtime->GetCalleeSaveMethod(Runtime::CalleeSaveType(i))) { |
| 285 | result = true; |
| 286 | break; |
| 287 | } |
| 288 | } |
| 289 | return result; |
| 290 | } |
| 291 | |
Ian Rogers | ef7d42f | 2014-01-06 12:55:46 -0800 | [diff] [blame] | 292 | inline bool ArtMethod::IsResolutionMethod() { |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 293 | bool result = this == Runtime::Current()->GetResolutionMethod(); |
| 294 | // Check that if we do think it is phony it looks like the resolution method. |
| 295 | DCHECK(!result || IsRuntimeMethod()); |
| 296 | return result; |
| 297 | } |
Jeff Hao | 88474b4 | 2013-10-23 16:24:40 -0700 | [diff] [blame] | 298 | |
Ian Rogers | ef7d42f | 2014-01-06 12:55:46 -0800 | [diff] [blame] | 299 | inline bool ArtMethod::IsImtConflictMethod() { |
Jeff Hao | 88474b4 | 2013-10-23 16:24:40 -0700 | [diff] [blame] | 300 | bool result = this == Runtime::Current()->GetImtConflictMethod(); |
| 301 | // Check that if we do think it is phony it looks like the imt conflict method. |
| 302 | DCHECK(!result || IsRuntimeMethod()); |
| 303 | return result; |
| 304 | } |
Mathieu Chartier | 4e30541 | 2014-02-19 10:54:44 -0800 | [diff] [blame] | 305 | |
Mathieu Chartier | 2d2621a | 2014-10-23 16:48:06 -0700 | [diff] [blame] | 306 | inline bool ArtMethod::IsImtUnimplementedMethod() { |
| 307 | bool result = this == Runtime::Current()->GetImtUnimplementedMethod(); |
| 308 | // Check that if we do think it is phony it looks like the imt unimplemented method. |
| 309 | DCHECK(!result || IsRuntimeMethod()); |
| 310 | return result; |
| 311 | } |
| 312 | |
Ian Rogers | 6f3dbba | 2014-10-14 17:41:57 -0700 | [diff] [blame] | 313 | inline uintptr_t ArtMethod::NativeQuickPcOffset(const uintptr_t pc) { |
Mathieu Chartier | a7dd038 | 2014-11-20 17:08:58 -0800 | [diff] [blame] | 314 | const void* code = Runtime::Current()->GetInstrumentation()->GetQuickCodeFor( |
| 315 | this, sizeof(void*)); |
Vladimir Marko | 4c1c510 | 2014-05-14 16:51:16 +0100 | [diff] [blame] | 316 | return pc - reinterpret_cast<uintptr_t>(code); |
| 317 | } |
| 318 | |
Vladimir Marko | 4c1c510 | 2014-05-14 16:51:16 +0100 | [diff] [blame] | 319 | inline QuickMethodFrameInfo ArtMethod::GetQuickFrameInfo(const void* code_pointer) { |
| 320 | DCHECK(code_pointer != nullptr); |
Mathieu Chartier | 7c0fe5e | 2015-07-17 19:53:47 -0700 | [diff] [blame] | 321 | if (kIsDebugBuild && !IsProxyMethod()) { |
| 322 | CHECK_EQ(code_pointer, GetQuickOatCodePointer(sizeof(void*))); |
| 323 | } |
Vladimir Marko | 7624d25 | 2014-05-02 14:40:15 +0100 | [diff] [blame] | 324 | return reinterpret_cast<const OatQuickMethodHeader*>(code_pointer)[-1].frame_info_; |
| 325 | } |
| 326 | |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 327 | inline const DexFile* ArtMethod::GetDexFile() { |
Mathieu Chartier | 2d2621a | 2014-10-23 16:48:06 -0700 | [diff] [blame] | 328 | return GetDexCache()->GetDexFile(); |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 329 | } |
| 330 | |
| 331 | inline const char* ArtMethod::GetDeclaringClassDescriptor() { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 332 | uint32_t dex_method_idx = GetDexMethodIndex(); |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 333 | if (UNLIKELY(dex_method_idx == DexFile::kDexNoIndex)) { |
| 334 | return "<runtime method>"; |
| 335 | } |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 336 | DCHECK(!IsProxyMethod()); |
| 337 | const DexFile* dex_file = GetDexFile(); |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 338 | return dex_file->GetMethodDeclaringClassDescriptor(dex_file->GetMethodId(dex_method_idx)); |
| 339 | } |
| 340 | |
| 341 | inline const char* ArtMethod::GetShorty(uint32_t* out_length) { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 342 | DCHECK(!IsProxyMethod()); |
| 343 | const DexFile* dex_file = GetDexFile(); |
| 344 | return dex_file->GetMethodShorty(dex_file->GetMethodId(GetDexMethodIndex()), out_length); |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 345 | } |
| 346 | |
| 347 | inline const Signature ArtMethod::GetSignature() { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 348 | uint32_t dex_method_idx = GetDexMethodIndex(); |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 349 | if (dex_method_idx != DexFile::kDexNoIndex) { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 350 | DCHECK(!IsProxyMethod()); |
| 351 | const DexFile* dex_file = GetDexFile(); |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 352 | return dex_file->GetMethodSignature(dex_file->GetMethodId(dex_method_idx)); |
| 353 | } |
| 354 | return Signature::NoSignature(); |
| 355 | } |
| 356 | |
Ian Rogers | 1ff3c98 | 2014-08-12 02:30:58 -0700 | [diff] [blame] | 357 | inline const char* ArtMethod::GetName() { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 358 | uint32_t dex_method_idx = GetDexMethodIndex(); |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 359 | if (LIKELY(dex_method_idx != DexFile::kDexNoIndex)) { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 360 | DCHECK(!IsProxyMethod()); |
| 361 | const DexFile* dex_file = GetDexFile(); |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 362 | return dex_file->GetMethodName(dex_file->GetMethodId(dex_method_idx)); |
| 363 | } |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 364 | Runtime* const runtime = Runtime::Current(); |
| 365 | if (this == runtime->GetResolutionMethod()) { |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 366 | return "<runtime internal resolution method>"; |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 367 | } else if (this == runtime->GetImtConflictMethod()) { |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 368 | return "<runtime internal imt conflict method>"; |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 369 | } else if (this == runtime->GetCalleeSaveMethod(Runtime::kSaveAll)) { |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 370 | return "<runtime internal callee-save all registers method>"; |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 371 | } else if (this == runtime->GetCalleeSaveMethod(Runtime::kRefsOnly)) { |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 372 | return "<runtime internal callee-save reference registers method>"; |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 373 | } else if (this == runtime->GetCalleeSaveMethod(Runtime::kRefsAndArgs)) { |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 374 | return "<runtime internal callee-save reference and argument registers method>"; |
| 375 | } else { |
| 376 | return "<unknown runtime internal method>"; |
| 377 | } |
| 378 | } |
| 379 | |
| 380 | inline const DexFile::CodeItem* ArtMethod::GetCodeItem() { |
Mathieu Chartier | 12b3dd7 | 2014-12-11 13:25:33 -0800 | [diff] [blame] | 381 | return GetDeclaringClass()->GetDexFile().GetCodeItem(GetCodeItemOffset()); |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 382 | } |
| 383 | |
| 384 | inline bool ArtMethod::IsResolvedTypeIdx(uint16_t type_idx) { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 385 | DCHECK(!IsProxyMethod()); |
| 386 | return GetDexCacheResolvedType(type_idx) != nullptr; |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 387 | } |
| 388 | |
| 389 | inline int32_t ArtMethod::GetLineNumFromDexPC(uint32_t dex_pc) { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 390 | DCHECK(!IsProxyMethod()); |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 391 | if (dex_pc == DexFile::kDexNoIndex) { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 392 | return IsNative() ? -2 : -1; |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 393 | } |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 394 | return GetDexFile()->GetLineNumFromPC(this, dex_pc); |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 395 | } |
| 396 | |
| 397 | inline const DexFile::ProtoId& ArtMethod::GetPrototype() { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 398 | DCHECK(!IsProxyMethod()); |
| 399 | const DexFile* dex_file = GetDexFile(); |
| 400 | return dex_file->GetMethodPrototype(dex_file->GetMethodId(GetDexMethodIndex())); |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 401 | } |
| 402 | |
| 403 | inline const DexFile::TypeList* ArtMethod::GetParameterTypeList() { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 404 | DCHECK(!IsProxyMethod()); |
| 405 | const DexFile* dex_file = GetDexFile(); |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 406 | const DexFile::ProtoId& proto = dex_file->GetMethodPrototype( |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 407 | dex_file->GetMethodId(GetDexMethodIndex())); |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 408 | return dex_file->GetProtoParameters(proto); |
| 409 | } |
| 410 | |
| 411 | inline const char* ArtMethod::GetDeclaringClassSourceFile() { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 412 | DCHECK(!IsProxyMethod()); |
| 413 | return GetDeclaringClass()->GetSourceFile(); |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 414 | } |
| 415 | |
| 416 | inline uint16_t ArtMethod::GetClassDefIndex() { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 417 | DCHECK(!IsProxyMethod()); |
| 418 | return GetDeclaringClass()->GetDexClassDefIndex(); |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 419 | } |
| 420 | |
| 421 | inline const DexFile::ClassDef& ArtMethod::GetClassDef() { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 422 | DCHECK(!IsProxyMethod()); |
| 423 | return GetDexFile()->GetClassDef(GetClassDefIndex()); |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 424 | } |
| 425 | |
| 426 | inline const char* ArtMethod::GetReturnTypeDescriptor() { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 427 | DCHECK(!IsProxyMethod()); |
| 428 | const DexFile* dex_file = GetDexFile(); |
| 429 | const DexFile::MethodId& method_id = dex_file->GetMethodId(GetDexMethodIndex()); |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 430 | const DexFile::ProtoId& proto_id = dex_file->GetMethodPrototype(method_id); |
| 431 | uint16_t return_type_idx = proto_id.return_type_idx_; |
| 432 | return dex_file->GetTypeDescriptor(dex_file->GetTypeId(return_type_idx)); |
| 433 | } |
| 434 | |
| 435 | inline const char* ArtMethod::GetTypeDescriptorFromTypeIdx(uint16_t type_idx) { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 436 | DCHECK(!IsProxyMethod()); |
| 437 | const DexFile* dex_file = GetDexFile(); |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 438 | return dex_file->GetTypeDescriptor(dex_file->GetTypeId(type_idx)); |
| 439 | } |
| 440 | |
| 441 | inline mirror::ClassLoader* ArtMethod::GetClassLoader() { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 442 | DCHECK(!IsProxyMethod()); |
| 443 | return GetDeclaringClass()->GetClassLoader(); |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 444 | } |
| 445 | |
| 446 | inline mirror::DexCache* ArtMethod::GetDexCache() { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 447 | DCHECK(!IsProxyMethod()); |
| 448 | return GetDeclaringClass()->GetDexCache(); |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 449 | } |
| 450 | |
Ian Rogers | 03b6eaf | 2014-10-28 09:34:57 -0700 | [diff] [blame] | 451 | inline bool ArtMethod::IsProxyMethod() { |
| 452 | return GetDeclaringClass()->IsProxyClass(); |
| 453 | } |
| 454 | |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 455 | inline ArtMethod* ArtMethod::GetInterfaceMethodIfProxy(size_t pointer_size) { |
Ian Rogers | 03b6eaf | 2014-10-28 09:34:57 -0700 | [diff] [blame] | 456 | if (LIKELY(!IsProxyMethod())) { |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 457 | return this; |
| 458 | } |
Ian Rogers | 03b6eaf | 2014-10-28 09:34:57 -0700 | [diff] [blame] | 459 | mirror::Class* klass = GetDeclaringClass(); |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 460 | auto interface_method = GetDexCacheResolvedMethods()->GetElementPtrSize<ArtMethod*>( |
| 461 | GetDexMethodIndex(), pointer_size); |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 462 | DCHECK(interface_method != nullptr); |
| 463 | DCHECK_EQ(interface_method, |
| 464 | Runtime::Current()->GetClassLinker()->FindMethodForProxy(klass, this)); |
| 465 | return interface_method; |
| 466 | } |
| 467 | |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 468 | inline void ArtMethod::SetDexCacheResolvedMethods(mirror::PointerArray* new_dex_cache_methods) { |
| 469 | dex_cache_resolved_methods_ = GcRoot<mirror::PointerArray>(new_dex_cache_methods); |
Mathieu Chartier | 2d2621a | 2014-10-23 16:48:06 -0700 | [diff] [blame] | 470 | } |
| 471 | |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 472 | inline void ArtMethod::SetDexCacheResolvedTypes( |
| 473 | mirror::ObjectArray<mirror::Class>* new_dex_cache_types) { |
| 474 | dex_cache_resolved_types_ = GcRoot<mirror::ObjectArray<mirror::Class>>(new_dex_cache_types); |
Mathieu Chartier | 2d2621a | 2014-10-23 16:48:06 -0700 | [diff] [blame] | 475 | } |
| 476 | |
Ian Rogers | ded66a0 | 2014-10-28 18:12:55 -0700 | [diff] [blame] | 477 | inline mirror::Class* ArtMethod::GetReturnType(bool resolve) { |
| 478 | DCHECK(!IsProxyMethod()); |
| 479 | const DexFile* dex_file = GetDexFile(); |
| 480 | const DexFile::MethodId& method_id = dex_file->GetMethodId(GetDexMethodIndex()); |
| 481 | const DexFile::ProtoId& proto_id = dex_file->GetMethodPrototype(method_id); |
| 482 | uint16_t return_type_idx = proto_id.return_type_idx_; |
| 483 | mirror::Class* type = GetDexCacheResolvedType(return_type_idx); |
| 484 | if (type == nullptr && resolve) { |
| 485 | type = Runtime::Current()->GetClassLinker()->ResolveType(return_type_idx, this); |
| 486 | CHECK(type != nullptr || Thread::Current()->IsExceptionPending()); |
| 487 | } |
| 488 | return type; |
| 489 | } |
| 490 | |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 491 | template<typename RootVisitorType> |
| 492 | void ArtMethod::VisitRoots(RootVisitorType& visitor) { |
Mathieu Chartier | e3b034a | 2015-05-31 14:29:23 -0700 | [diff] [blame] | 493 | visitor.VisitRootIfNonNull(declaring_class_.AddressWithoutBarrier()); |
| 494 | visitor.VisitRootIfNonNull(dex_cache_resolved_methods_.AddressWithoutBarrier()); |
| 495 | visitor.VisitRootIfNonNull(dex_cache_resolved_types_.AddressWithoutBarrier()); |
Mathieu Chartier | 2d72101 | 2014-11-10 11:08:06 -0800 | [diff] [blame] | 496 | } |
| 497 | |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 498 | inline void ArtMethod::CopyFrom(const ArtMethod* src, size_t image_pointer_size) { |
| 499 | memcpy(reinterpret_cast<void*>(this), reinterpret_cast<const void*>(src), |
| 500 | ObjectSize(image_pointer_size)); |
| 501 | declaring_class_ = GcRoot<mirror::Class>(const_cast<ArtMethod*>(src)->GetDeclaringClass()); |
| 502 | dex_cache_resolved_methods_ = GcRoot<mirror::PointerArray>( |
| 503 | const_cast<ArtMethod*>(src)->GetDexCacheResolvedMethods()); |
| 504 | dex_cache_resolved_types_ = GcRoot<mirror::ObjectArray<mirror::Class>>( |
| 505 | const_cast<ArtMethod*>(src)->GetDexCacheResolvedTypes()); |
| 506 | } |
| 507 | |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 508 | } // namespace art |
| 509 | |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 510 | #endif // ART_RUNTIME_ART_METHOD_INL_H_ |