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" |
Andreas Gampe | 8228cdf | 2017-05-30 15:03:54 -0700 | [diff] [blame] | 23 | #include "base/callee_save_type.h" |
Mathieu Chartier | 7c0fe5e | 2015-07-17 19:53:47 -0700 | [diff] [blame] | 24 | #include "base/logging.h" |
Hiroshi Yamauchi | 0037082 | 2015-08-18 14:47:25 -0700 | [diff] [blame] | 25 | #include "class_linker-inl.h" |
Mathieu Chartier | 69147f1 | 2017-11-06 20:02:24 -0800 | [diff] [blame^] | 26 | #include "code_item_accessors-inl.h" |
Vladimir Marko | 05792b9 | 2015-08-03 11:56:49 +0100 | [diff] [blame] | 27 | #include "common_throws.h" |
Andreas Gampe | 8cf9cb3 | 2017-07-19 09:28:38 -0700 | [diff] [blame] | 28 | #include "dex_file-inl.h" |
David Sehr | 9323e6e | 2016-09-13 08:58:35 -0700 | [diff] [blame] | 29 | #include "dex_file_annotations.h" |
Andreas Gampe | e2abbc6 | 2017-09-15 11:59:26 -0700 | [diff] [blame] | 30 | #include "dex_file_types.h" |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 31 | #include "gc_root-inl.h" |
Andreas Gampe | 5d08fcc | 2017-06-05 17:56:46 -0700 | [diff] [blame] | 32 | #include "invoke_type.h" |
Nicolas Geoffray | 5550ca8 | 2015-08-21 18:38:30 +0100 | [diff] [blame] | 33 | #include "jit/profiling_info.h" |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 34 | #include "mirror/class-inl.h" |
Vladimir Marko | 05792b9 | 2015-08-03 11:56:49 +0100 | [diff] [blame] | 35 | #include "mirror/dex_cache-inl.h" |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 36 | #include "mirror/object-inl.h" |
| 37 | #include "mirror/object_array.h" |
Nicolas Geoffray | 4c0b4bc | 2017-03-17 13:08:26 +0000 | [diff] [blame] | 38 | #include "mirror/string.h" |
Vladimir Marko | 96c6ab9 | 2014-04-08 14:00:50 +0100 | [diff] [blame] | 39 | #include "oat.h" |
Mathieu Chartier | 28357fa | 2016-10-18 16:27:40 -0700 | [diff] [blame] | 40 | #include "obj_ptr-inl.h" |
Alex Light | d766158 | 2017-05-01 13:48:16 -0700 | [diff] [blame] | 41 | #include "primitive.h" |
Vladimir Marko | 7624d25 | 2014-05-02 14:40:15 +0100 | [diff] [blame] | 42 | #include "quick/quick_method_frame_info.h" |
Alex Light | d766158 | 2017-05-01 13:48:16 -0700 | [diff] [blame] | 43 | #include "read_barrier-inl.h" |
Vladimir Marko | 7624d25 | 2014-05-02 14:40:15 +0100 | [diff] [blame] | 44 | #include "runtime-inl.h" |
Mathieu Chartier | 0795f23 | 2016-09-27 18:43:30 -0700 | [diff] [blame] | 45 | #include "scoped_thread_state_change-inl.h" |
Andreas Gampe | b486a98 | 2017-06-01 13:45:54 -0700 | [diff] [blame] | 46 | #include "thread-current-inl.h" |
Vladimir Marko | 80afd02 | 2015-05-19 18:08:00 +0100 | [diff] [blame] | 47 | #include "utils.h" |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 48 | |
| 49 | namespace art { |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 50 | |
Mathieu Chartier | e7f75f3 | 2016-02-01 16:08:15 -0800 | [diff] [blame] | 51 | template <ReadBarrierOption kReadBarrierOption> |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 52 | inline mirror::Class* ArtMethod::GetDeclaringClassUnchecked() { |
Hiroshi Yamauchi | 3f64f25 | 2015-06-12 18:35:06 -0700 | [diff] [blame] | 53 | GcRootSource gc_root_source(this); |
Mathieu Chartier | e7f75f3 | 2016-02-01 16:08:15 -0800 | [diff] [blame] | 54 | return declaring_class_.Read<kReadBarrierOption>(&gc_root_source); |
Mingyao Yang | 98d1cc8 | 2014-05-15 17:02:16 -0700 | [diff] [blame] | 55 | } |
| 56 | |
Mathieu Chartier | e7f75f3 | 2016-02-01 16:08:15 -0800 | [diff] [blame] | 57 | template <ReadBarrierOption kReadBarrierOption> |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 58 | inline mirror::Class* ArtMethod::GetDeclaringClass() { |
Mathieu Chartier | e7f75f3 | 2016-02-01 16:08:15 -0800 | [diff] [blame] | 59 | mirror::Class* result = GetDeclaringClassUnchecked<kReadBarrierOption>(); |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 60 | if (kIsDebugBuild) { |
| 61 | if (!IsRuntimeMethod()) { |
| 62 | CHECK(result != nullptr) << this; |
Andreas Gampe | b1106e2 | 2017-02-23 11:34:48 -0800 | [diff] [blame] | 63 | if (kCheckDeclaringClassState) { |
Nicolas Geoffray | 4c0b4bc | 2017-03-17 13:08:26 +0000 | [diff] [blame] | 64 | if (!(result->IsIdxLoaded() || result->IsErroneous())) { |
| 65 | LOG(FATAL_WITHOUT_ABORT) << "Class status: " << result->GetStatus(); |
| 66 | LOG(FATAL) << result->PrettyClass(); |
| 67 | } |
Andreas Gampe | b1106e2 | 2017-02-23 11:34:48 -0800 | [diff] [blame] | 68 | } |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 69 | } else { |
| 70 | CHECK(result == nullptr) << this; |
| 71 | } |
| 72 | } |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 73 | return result; |
| 74 | } |
| 75 | |
Mathieu Chartier | 28357fa | 2016-10-18 16:27:40 -0700 | [diff] [blame] | 76 | inline void ArtMethod::SetDeclaringClass(ObjPtr<mirror::Class> new_declaring_class) { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 77 | declaring_class_ = GcRoot<mirror::Class>(new_declaring_class); |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 78 | } |
| 79 | |
Mathieu Chartier | 10e5ea9 | 2015-08-13 12:56:31 -0700 | [diff] [blame] | 80 | inline bool ArtMethod::CASDeclaringClass(mirror::Class* expected_class, |
| 81 | mirror::Class* desired_class) { |
| 82 | GcRoot<mirror::Class> expected_root(expected_class); |
| 83 | GcRoot<mirror::Class> desired_root(desired_class); |
| 84 | return reinterpret_cast<Atomic<GcRoot<mirror::Class>>*>(&declaring_class_)-> |
| 85 | CompareExchangeStrongSequentiallyConsistent( |
| 86 | expected_root, desired_root); |
| 87 | } |
| 88 | |
Ian Rogers | ef7d42f | 2014-01-06 12:55:46 -0800 | [diff] [blame] | 89 | inline uint16_t ArtMethod::GetMethodIndex() { |
Vladimir Marko | 72ab684 | 2017-01-20 19:32:50 +0000 | [diff] [blame] | 90 | DCHECK(IsRuntimeMethod() || GetDeclaringClass()->IsResolved()); |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 91 | return method_index_; |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 92 | } |
| 93 | |
Mathieu Chartier | 9f3629d | 2014-10-28 18:23:02 -0700 | [diff] [blame] | 94 | inline uint16_t ArtMethod::GetMethodIndexDuringLinking() { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 95 | return method_index_; |
Mathieu Chartier | 9f3629d | 2014-10-28 18:23:02 -0700 | [diff] [blame] | 96 | } |
| 97 | |
Ian Rogers | ef7d42f | 2014-01-06 12:55:46 -0800 | [diff] [blame] | 98 | inline uint32_t ArtMethod::GetDexMethodIndex() { |
Andreas Gampe | b1106e2 | 2017-02-23 11:34:48 -0800 | [diff] [blame] | 99 | if (kCheckDeclaringClassState) { |
| 100 | CHECK(IsRuntimeMethod() || GetDeclaringClass()->IsIdxLoaded() || |
| 101 | GetDeclaringClass()->IsErroneous()); |
| 102 | } |
Nicolas Geoffray | 5d37c15 | 2017-01-12 13:25:19 +0000 | [diff] [blame] | 103 | return GetDexMethodIndexUnchecked(); |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 104 | } |
| 105 | |
Vladimir Marko | b45528c | 2017-07-27 14:14:28 +0100 | [diff] [blame] | 106 | inline ObjPtr<mirror::Class> ArtMethod::LookupResolvedClassFromTypeIndex(dex::TypeIndex type_idx) { |
Vladimir Marko | 4098a7a | 2017-11-06 16:00:51 +0000 | [diff] [blame] | 107 | ScopedAssertNoThreadSuspension ants(__FUNCTION__); |
Vladimir Marko | 942fd31 | 2017-01-16 20:52:19 +0000 | [diff] [blame] | 108 | ObjPtr<mirror::DexCache> dex_cache = GetDexCache(); |
| 109 | ObjPtr<mirror::Class> type = dex_cache->GetResolvedType(type_idx); |
Vladimir Marko | 8d6768d | 2017-03-14 10:13:21 +0000 | [diff] [blame] | 110 | if (UNLIKELY(type == nullptr)) { |
Vladimir Marko | b45528c | 2017-07-27 14:14:28 +0100 | [diff] [blame] | 111 | type = Runtime::Current()->GetClassLinker()->LookupResolvedType( |
| 112 | *dex_cache->GetDexFile(), type_idx, dex_cache, GetClassLoader()); |
| 113 | } |
| 114 | return type.Ptr(); |
| 115 | } |
| 116 | |
| 117 | inline ObjPtr<mirror::Class> ArtMethod::ResolveClassFromTypeIndex(dex::TypeIndex type_idx) { |
| 118 | ObjPtr<mirror::DexCache> dex_cache = GetDexCache(); |
| 119 | ObjPtr<mirror::Class> type = dex_cache->GetResolvedType(type_idx); |
| 120 | if (UNLIKELY(type == nullptr)) { |
| 121 | type = Runtime::Current()->GetClassLinker()->ResolveType(type_idx, this); |
| 122 | CHECK(type != nullptr || Thread::Current()->IsExceptionPending()); |
Ian Rogers | a048560 | 2014-12-02 15:48:04 -0800 | [diff] [blame] | 123 | } |
Vladimir Marko | 942fd31 | 2017-01-16 20:52:19 +0000 | [diff] [blame] | 124 | return type.Ptr(); |
Ian Rogers | a048560 | 2014-12-02 15:48:04 -0800 | [diff] [blame] | 125 | } |
| 126 | |
Brian Carlstrom | ea46f95 | 2013-07-30 01:26:50 -0700 | [diff] [blame] | 127 | inline bool ArtMethod::CheckIncompatibleClassChange(InvokeType type) { |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 128 | switch (type) { |
| 129 | case kStatic: |
| 130 | return !IsStatic(); |
| 131 | case kDirect: |
| 132 | return !IsDirect() || IsStatic(); |
| 133 | case kVirtual: { |
Alex Light | d6e0fa9 | 2016-10-17 13:02:39 -0700 | [diff] [blame] | 134 | // We have an error if we are direct or a non-copied (i.e. not part of a real class) interface |
| 135 | // method. |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 136 | mirror::Class* methods_class = GetDeclaringClass(); |
Alex Light | d6e0fa9 | 2016-10-17 13:02:39 -0700 | [diff] [blame] | 137 | return IsDirect() || (methods_class->IsInterface() && !IsCopied()); |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 138 | } |
| 139 | case kSuper: |
Andreas Gampe | 8f252e6 | 2014-08-25 20:46:31 -0700 | [diff] [blame] | 140 | // Constructors and static methods are called with invoke-direct. |
Alex Light | 705ad49 | 2015-09-21 11:36:30 -0700 | [diff] [blame] | 141 | return IsConstructor() || IsStatic(); |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 142 | case kInterface: { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 143 | mirror::Class* methods_class = GetDeclaringClass(); |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 144 | return IsDirect() || !(methods_class->IsInterface() || methods_class->IsObjectClass()); |
| 145 | } |
| 146 | default: |
| 147 | LOG(FATAL) << "Unreachable - invocation type: " << type; |
Ian Rogers | 2c4257b | 2014-10-24 14:20:06 -0700 | [diff] [blame] | 148 | UNREACHABLE(); |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 149 | } |
| 150 | } |
| 151 | |
Ian Rogers | ef7d42f | 2014-01-06 12:55:46 -0800 | [diff] [blame] | 152 | inline bool ArtMethod::IsCalleeSaveMethod() { |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 153 | if (!IsRuntimeMethod()) { |
| 154 | return false; |
| 155 | } |
| 156 | Runtime* runtime = Runtime::Current(); |
| 157 | bool result = false; |
Andreas Gampe | 8228cdf | 2017-05-30 15:03:54 -0700 | [diff] [blame] | 158 | for (uint32_t i = 0; i < static_cast<uint32_t>(CalleeSaveType::kLastCalleeSaveType); i++) { |
| 159 | if (this == runtime->GetCalleeSaveMethod(CalleeSaveType(i))) { |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 160 | result = true; |
| 161 | break; |
| 162 | } |
| 163 | } |
| 164 | return result; |
| 165 | } |
| 166 | |
Ian Rogers | ef7d42f | 2014-01-06 12:55:46 -0800 | [diff] [blame] | 167 | inline bool ArtMethod::IsResolutionMethod() { |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 168 | bool result = this == Runtime::Current()->GetResolutionMethod(); |
| 169 | // Check that if we do think it is phony it looks like the resolution method. |
| 170 | DCHECK(!result || IsRuntimeMethod()); |
| 171 | return result; |
| 172 | } |
Jeff Hao | 88474b4 | 2013-10-23 16:24:40 -0700 | [diff] [blame] | 173 | |
Mathieu Chartier | 2d2621a | 2014-10-23 16:48:06 -0700 | [diff] [blame] | 174 | inline bool ArtMethod::IsImtUnimplementedMethod() { |
| 175 | bool result = this == Runtime::Current()->GetImtUnimplementedMethod(); |
| 176 | // Check that if we do think it is phony it looks like the imt unimplemented method. |
| 177 | DCHECK(!result || IsRuntimeMethod()); |
| 178 | return result; |
| 179 | } |
| 180 | |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 181 | inline const DexFile* ArtMethod::GetDexFile() { |
Mathieu Chartier | 137cdfa | 2017-01-26 14:03:11 -0800 | [diff] [blame] | 182 | // It is safe to avoid the read barrier here since the dex file is constant, so if we read the |
| 183 | // from-space dex file pointer it will be equal to the to-space copy. |
| 184 | return GetDexCache<kWithoutReadBarrier>()->GetDexFile(); |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 185 | } |
| 186 | |
| 187 | inline const char* ArtMethod::GetDeclaringClassDescriptor() { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 188 | uint32_t dex_method_idx = GetDexMethodIndex(); |
Andreas Gampe | e2abbc6 | 2017-09-15 11:59:26 -0700 | [diff] [blame] | 189 | if (UNLIKELY(dex_method_idx == dex::kDexNoIndex)) { |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 190 | return "<runtime method>"; |
| 191 | } |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 192 | DCHECK(!IsProxyMethod()); |
| 193 | const DexFile* dex_file = GetDexFile(); |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 194 | return dex_file->GetMethodDeclaringClassDescriptor(dex_file->GetMethodId(dex_method_idx)); |
| 195 | } |
| 196 | |
Andreas Gampe | c6ea7d0 | 2017-02-01 16:46:28 -0800 | [diff] [blame] | 197 | inline const char* ArtMethod::GetShorty() { |
| 198 | uint32_t unused_length; |
| 199 | return GetShorty(&unused_length); |
| 200 | } |
| 201 | |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 202 | inline const char* ArtMethod::GetShorty(uint32_t* out_length) { |
Nicolas Geoffray | 3a09092 | 2015-11-24 09:17:30 +0000 | [diff] [blame] | 203 | DCHECK(!IsProxyMethod()); |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 204 | const DexFile* dex_file = GetDexFile(); |
| 205 | return dex_file->GetMethodShorty(dex_file->GetMethodId(GetDexMethodIndex()), out_length); |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 206 | } |
| 207 | |
| 208 | inline const Signature ArtMethod::GetSignature() { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 209 | uint32_t dex_method_idx = GetDexMethodIndex(); |
Andreas Gampe | e2abbc6 | 2017-09-15 11:59:26 -0700 | [diff] [blame] | 210 | if (dex_method_idx != dex::kDexNoIndex) { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 211 | DCHECK(!IsProxyMethod()); |
| 212 | const DexFile* dex_file = GetDexFile(); |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 213 | return dex_file->GetMethodSignature(dex_file->GetMethodId(dex_method_idx)); |
| 214 | } |
| 215 | return Signature::NoSignature(); |
| 216 | } |
| 217 | |
Ian Rogers | 1ff3c98 | 2014-08-12 02:30:58 -0700 | [diff] [blame] | 218 | inline const char* ArtMethod::GetName() { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 219 | uint32_t dex_method_idx = GetDexMethodIndex(); |
Andreas Gampe | e2abbc6 | 2017-09-15 11:59:26 -0700 | [diff] [blame] | 220 | if (LIKELY(dex_method_idx != dex::kDexNoIndex)) { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 221 | DCHECK(!IsProxyMethod()); |
| 222 | const DexFile* dex_file = GetDexFile(); |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 223 | return dex_file->GetMethodName(dex_file->GetMethodId(dex_method_idx)); |
| 224 | } |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 225 | Runtime* const runtime = Runtime::Current(); |
| 226 | if (this == runtime->GetResolutionMethod()) { |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 227 | return "<runtime internal resolution method>"; |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 228 | } else if (this == runtime->GetImtConflictMethod()) { |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 229 | return "<runtime internal imt conflict method>"; |
Andreas Gampe | 8228cdf | 2017-05-30 15:03:54 -0700 | [diff] [blame] | 230 | } else if (this == runtime->GetCalleeSaveMethod(CalleeSaveType::kSaveAllCalleeSaves)) { |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 231 | return "<runtime internal callee-save all registers method>"; |
Andreas Gampe | 8228cdf | 2017-05-30 15:03:54 -0700 | [diff] [blame] | 232 | } else if (this == runtime->GetCalleeSaveMethod(CalleeSaveType::kSaveRefsOnly)) { |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 233 | return "<runtime internal callee-save reference registers method>"; |
Andreas Gampe | 8228cdf | 2017-05-30 15:03:54 -0700 | [diff] [blame] | 234 | } else if (this == runtime->GetCalleeSaveMethod(CalleeSaveType::kSaveRefsAndArgs)) { |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 235 | return "<runtime internal callee-save reference and argument registers method>"; |
Andreas Gampe | 8228cdf | 2017-05-30 15:03:54 -0700 | [diff] [blame] | 236 | } else if (this == runtime->GetCalleeSaveMethod(CalleeSaveType::kSaveEverything)) { |
| 237 | return "<runtime internal save-every-register method>"; |
Mingyao Yang | 0a87a65 | 2017-04-12 13:43:15 -0700 | [diff] [blame] | 238 | } else if (this == runtime->GetCalleeSaveMethod(CalleeSaveType::kSaveEverythingForClinit)) { |
| 239 | return "<runtime internal save-every-register method for clinit>"; |
| 240 | } else if (this == runtime->GetCalleeSaveMethod(CalleeSaveType::kSaveEverythingForSuspendCheck)) { |
| 241 | return "<runtime internal save-every-register method for suspend check>"; |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 242 | } else { |
| 243 | return "<unknown runtime internal method>"; |
| 244 | } |
| 245 | } |
| 246 | |
| 247 | inline const DexFile::CodeItem* ArtMethod::GetCodeItem() { |
Alex Light | dba6148 | 2016-12-21 08:20:29 -0800 | [diff] [blame] | 248 | return GetDexFile()->GetCodeItem(GetCodeItemOffset()); |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 249 | } |
| 250 | |
Vladimir Marko | 942fd31 | 2017-01-16 20:52:19 +0000 | [diff] [blame] | 251 | inline bool ArtMethod::IsResolvedTypeIdx(dex::TypeIndex type_idx) { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 252 | DCHECK(!IsProxyMethod()); |
Vladimir Marko | b45528c | 2017-07-27 14:14:28 +0100 | [diff] [blame] | 253 | return LookupResolvedClassFromTypeIndex(type_idx) != nullptr; |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 254 | } |
| 255 | |
| 256 | inline int32_t ArtMethod::GetLineNumFromDexPC(uint32_t dex_pc) { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 257 | DCHECK(!IsProxyMethod()); |
Andreas Gampe | e2abbc6 | 2017-09-15 11:59:26 -0700 | [diff] [blame] | 258 | if (dex_pc == dex::kDexNoIndex) { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 259 | return IsNative() ? -2 : -1; |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 260 | } |
David Sehr | 9323e6e | 2016-09-13 08:58:35 -0700 | [diff] [blame] | 261 | return annotations::GetLineNumFromPC(GetDexFile(), this, dex_pc); |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 262 | } |
| 263 | |
| 264 | inline const DexFile::ProtoId& ArtMethod::GetPrototype() { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 265 | DCHECK(!IsProxyMethod()); |
| 266 | const DexFile* dex_file = GetDexFile(); |
| 267 | return dex_file->GetMethodPrototype(dex_file->GetMethodId(GetDexMethodIndex())); |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 268 | } |
| 269 | |
| 270 | inline const DexFile::TypeList* ArtMethod::GetParameterTypeList() { |
Nicolas Geoffray | 3a09092 | 2015-11-24 09:17:30 +0000 | [diff] [blame] | 271 | DCHECK(!IsProxyMethod()); |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 272 | const DexFile* dex_file = GetDexFile(); |
Nicolas Geoffray | 3a09092 | 2015-11-24 09:17:30 +0000 | [diff] [blame] | 273 | const DexFile::ProtoId& proto = dex_file->GetMethodPrototype( |
| 274 | dex_file->GetMethodId(GetDexMethodIndex())); |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 275 | return dex_file->GetProtoParameters(proto); |
| 276 | } |
| 277 | |
| 278 | inline const char* ArtMethod::GetDeclaringClassSourceFile() { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 279 | DCHECK(!IsProxyMethod()); |
| 280 | return GetDeclaringClass()->GetSourceFile(); |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 281 | } |
| 282 | |
| 283 | inline uint16_t ArtMethod::GetClassDefIndex() { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 284 | DCHECK(!IsProxyMethod()); |
Alex Light | f2f1c9d | 2017-03-15 15:35:46 +0000 | [diff] [blame] | 285 | if (LIKELY(!IsObsolete())) { |
| 286 | return GetDeclaringClass()->GetDexClassDefIndex(); |
| 287 | } else { |
| 288 | return FindObsoleteDexClassDefIndex(); |
| 289 | } |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 290 | } |
| 291 | |
| 292 | inline const DexFile::ClassDef& ArtMethod::GetClassDef() { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 293 | DCHECK(!IsProxyMethod()); |
| 294 | return GetDexFile()->GetClassDef(GetClassDefIndex()); |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 295 | } |
| 296 | |
| 297 | inline const char* ArtMethod::GetReturnTypeDescriptor() { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 298 | DCHECK(!IsProxyMethod()); |
| 299 | const DexFile* dex_file = GetDexFile(); |
| 300 | const DexFile::MethodId& method_id = dex_file->GetMethodId(GetDexMethodIndex()); |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 301 | const DexFile::ProtoId& proto_id = dex_file->GetMethodPrototype(method_id); |
Andreas Gampe | a5b09a6 | 2016-11-17 15:21:22 -0800 | [diff] [blame] | 302 | return dex_file->GetTypeDescriptor(dex_file->GetTypeId(proto_id.return_type_idx_)); |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 303 | } |
| 304 | |
Alex Light | d766158 | 2017-05-01 13:48:16 -0700 | [diff] [blame] | 305 | inline Primitive::Type ArtMethod::GetReturnTypePrimitive() { |
| 306 | return Primitive::GetType(GetReturnTypeDescriptor()[0]); |
| 307 | } |
| 308 | |
Andreas Gampe | a5b09a6 | 2016-11-17 15:21:22 -0800 | [diff] [blame] | 309 | inline const char* ArtMethod::GetTypeDescriptorFromTypeIdx(dex::TypeIndex type_idx) { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 310 | DCHECK(!IsProxyMethod()); |
| 311 | const DexFile* dex_file = GetDexFile(); |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 312 | return dex_file->GetTypeDescriptor(dex_file->GetTypeId(type_idx)); |
| 313 | } |
| 314 | |
| 315 | inline mirror::ClassLoader* ArtMethod::GetClassLoader() { |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 316 | DCHECK(!IsProxyMethod()); |
| 317 | return GetDeclaringClass()->GetClassLoader(); |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 318 | } |
| 319 | |
Mathieu Chartier | 137cdfa | 2017-01-26 14:03:11 -0800 | [diff] [blame] | 320 | template <ReadBarrierOption kReadBarrierOption> |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 321 | inline mirror::DexCache* ArtMethod::GetDexCache() { |
Alex Light | dba6148 | 2016-12-21 08:20:29 -0800 | [diff] [blame] | 322 | if (LIKELY(!IsObsolete())) { |
Mathieu Chartier | 137cdfa | 2017-01-26 14:03:11 -0800 | [diff] [blame] | 323 | mirror::Class* klass = GetDeclaringClass<kReadBarrierOption>(); |
| 324 | return klass->GetDexCache<kDefaultVerifyFlags, kReadBarrierOption>(); |
Alex Light | dba6148 | 2016-12-21 08:20:29 -0800 | [diff] [blame] | 325 | } else { |
| 326 | DCHECK(!IsProxyMethod()); |
| 327 | return GetObsoleteDexCache(); |
Alex Light | a01de59 | 2016-11-15 10:43:06 -0800 | [diff] [blame] | 328 | } |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 329 | } |
| 330 | |
Ian Rogers | 03b6eaf | 2014-10-28 09:34:57 -0700 | [diff] [blame] | 331 | inline bool ArtMethod::IsProxyMethod() { |
Mathieu Chartier | 90c5a9b | 2017-02-01 13:10:06 -0800 | [diff] [blame] | 332 | // Avoid read barrier since the from-space version of the class will have the correct proxy class |
| 333 | // flags since they are constant for the lifetime of the class. |
| 334 | return GetDeclaringClass<kWithoutReadBarrier>()->IsProxyClass(); |
Ian Rogers | 03b6eaf | 2014-10-28 09:34:57 -0700 | [diff] [blame] | 335 | } |
| 336 | |
Vladimir Marko | d1ee20f | 2017-08-17 09:21:16 +0000 | [diff] [blame] | 337 | inline ArtMethod* ArtMethod::GetInterfaceMethodForProxyUnchecked(PointerSize pointer_size) { |
| 338 | DCHECK(IsProxyMethod()); |
| 339 | // Do not check IsAssignableFrom() here as it relies on raw reference comparison |
| 340 | // which may give false negatives while visiting references for a non-CC moving GC. |
| 341 | return reinterpret_cast<ArtMethod*>(GetDataPtrSize(pointer_size)); |
| 342 | } |
| 343 | |
Andreas Gampe | 542451c | 2016-07-26 09:02:02 -0700 | [diff] [blame] | 344 | inline ArtMethod* ArtMethod::GetInterfaceMethodIfProxy(PointerSize pointer_size) { |
Ian Rogers | 03b6eaf | 2014-10-28 09:34:57 -0700 | [diff] [blame] | 345 | if (LIKELY(!IsProxyMethod())) { |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 346 | return this; |
| 347 | } |
Vladimir Marko | d1ee20f | 2017-08-17 09:21:16 +0000 | [diff] [blame] | 348 | ArtMethod* interface_method = GetInterfaceMethodForProxyUnchecked(pointer_size); |
| 349 | // We can check that the proxy class implements the interface only if the proxy class |
| 350 | // is resolved, otherwise the interface table is not yet initialized. |
| 351 | DCHECK(!GetDeclaringClass()->IsResolved() || |
| 352 | interface_method->GetDeclaringClass()->IsAssignableFrom(GetDeclaringClass())); |
Mathieu Chartier | bfd9a43 | 2014-05-21 17:43:44 -0700 | [diff] [blame] | 353 | return interface_method; |
| 354 | } |
| 355 | |
Vladimir Marko | b45528c | 2017-07-27 14:14:28 +0100 | [diff] [blame] | 356 | inline dex::TypeIndex ArtMethod::GetReturnTypeIndex() { |
Ian Rogers | ded66a0 | 2014-10-28 18:12:55 -0700 | [diff] [blame] | 357 | DCHECK(!IsProxyMethod()); |
| 358 | const DexFile* dex_file = GetDexFile(); |
| 359 | const DexFile::MethodId& method_id = dex_file->GetMethodId(GetDexMethodIndex()); |
| 360 | const DexFile::ProtoId& proto_id = dex_file->GetMethodPrototype(method_id); |
Vladimir Marko | b45528c | 2017-07-27 14:14:28 +0100 | [diff] [blame] | 361 | return proto_id.return_type_idx_; |
| 362 | } |
| 363 | |
| 364 | inline ObjPtr<mirror::Class> ArtMethod::LookupResolvedReturnType() { |
| 365 | return LookupResolvedClassFromTypeIndex(GetReturnTypeIndex()); |
| 366 | } |
| 367 | |
| 368 | inline ObjPtr<mirror::Class> ArtMethod::ResolveReturnType() { |
| 369 | return ResolveClassFromTypeIndex(GetReturnTypeIndex()); |
Ian Rogers | ded66a0 | 2014-10-28 18:12:55 -0700 | [diff] [blame] | 370 | } |
| 371 | |
Mingyao Yang | 063fc77 | 2016-08-02 11:02:54 -0700 | [diff] [blame] | 372 | inline bool ArtMethod::HasSingleImplementation() { |
| 373 | if (IsFinal() || GetDeclaringClass()->IsFinal()) { |
| 374 | // We don't set kAccSingleImplementation for these cases since intrinsic |
| 375 | // can use the flag also. |
| 376 | return true; |
| 377 | } |
| 378 | return (GetAccessFlags() & kAccSingleImplementation) != 0; |
| 379 | } |
| 380 | |
| 381 | inline void ArtMethod::SetIntrinsic(uint32_t intrinsic) { |
Mingyao Yang | 063fc77 | 2016-08-02 11:02:54 -0700 | [diff] [blame] | 382 | // Currently we only do intrinsics for static/final methods or methods of final |
| 383 | // classes. We don't set kHasSingleImplementation for those methods. |
| 384 | DCHECK(IsStatic() || IsFinal() || GetDeclaringClass()->IsFinal()) << |
| 385 | "Potential conflict with kAccSingleImplementation"; |
Orion Hodson | cfcc9cf | 2017-09-29 15:07:27 +0100 | [diff] [blame] | 386 | static const int kAccFlagsShift = CTZ(kAccIntrinsicBits); |
| 387 | DCHECK_LE(intrinsic, kAccIntrinsicBits >> kAccFlagsShift); |
| 388 | uint32_t intrinsic_bits = intrinsic << kAccFlagsShift; |
| 389 | uint32_t new_value = (GetAccessFlags() & ~kAccIntrinsicBits) | kAccIntrinsic | intrinsic_bits; |
Mingyao Yang | 063fc77 | 2016-08-02 11:02:54 -0700 | [diff] [blame] | 390 | if (kIsDebugBuild) { |
| 391 | uint32_t java_flags = (GetAccessFlags() & kAccJavaFlagsMask); |
| 392 | bool is_constructor = IsConstructor(); |
| 393 | bool is_synchronized = IsSynchronized(); |
| 394 | bool skip_access_checks = SkipAccessChecks(); |
| 395 | bool is_fast_native = IsFastNative(); |
| 396 | bool is_copied = IsCopied(); |
| 397 | bool is_miranda = IsMiranda(); |
| 398 | bool is_default = IsDefault(); |
| 399 | bool is_default_conflict = IsDefaultConflicting(); |
| 400 | bool is_compilable = IsCompilable(); |
| 401 | bool must_count_locks = MustCountLocks(); |
| 402 | SetAccessFlags(new_value); |
| 403 | DCHECK_EQ(java_flags, (GetAccessFlags() & kAccJavaFlagsMask)); |
| 404 | DCHECK_EQ(is_constructor, IsConstructor()); |
| 405 | DCHECK_EQ(is_synchronized, IsSynchronized()); |
| 406 | DCHECK_EQ(skip_access_checks, SkipAccessChecks()); |
| 407 | DCHECK_EQ(is_fast_native, IsFastNative()); |
| 408 | DCHECK_EQ(is_copied, IsCopied()); |
| 409 | DCHECK_EQ(is_miranda, IsMiranda()); |
| 410 | DCHECK_EQ(is_default, IsDefault()); |
| 411 | DCHECK_EQ(is_default_conflict, IsDefaultConflicting()); |
| 412 | DCHECK_EQ(is_compilable, IsCompilable()); |
| 413 | DCHECK_EQ(must_count_locks, MustCountLocks()); |
| 414 | } else { |
| 415 | SetAccessFlags(new_value); |
| 416 | } |
| 417 | } |
| 418 | |
Hiroshi Yamauchi | 7a62e67 | 2016-06-10 17:22:48 -0700 | [diff] [blame] | 419 | template<ReadBarrierOption kReadBarrierOption, typename RootVisitorType> |
Andreas Gampe | 542451c | 2016-07-26 09:02:02 -0700 | [diff] [blame] | 420 | void ArtMethod::VisitRoots(RootVisitorType& visitor, PointerSize pointer_size) { |
Hiroshi Yamauchi | 7a62e67 | 2016-06-10 17:22:48 -0700 | [diff] [blame] | 421 | if (LIKELY(!declaring_class_.IsNull())) { |
| 422 | visitor.VisitRoot(declaring_class_.AddressWithoutBarrier()); |
| 423 | mirror::Class* klass = declaring_class_.Read<kReadBarrierOption>(); |
Nicolas Geoffray | dec3a12 | 2016-02-13 12:38:36 +0000 | [diff] [blame] | 424 | if (UNLIKELY(klass->IsProxyClass())) { |
| 425 | // For normal methods, dex cache shortcuts will be visited through the declaring class. |
| 426 | // However, for proxies we need to keep the interface method alive, so we visit its roots. |
Vladimir Marko | d1ee20f | 2017-08-17 09:21:16 +0000 | [diff] [blame] | 427 | ArtMethod* interface_method = GetInterfaceMethodForProxyUnchecked(pointer_size); |
Nicolas Geoffray | dec3a12 | 2016-02-13 12:38:36 +0000 | [diff] [blame] | 428 | DCHECK(interface_method != nullptr); |
Nicolas Geoffray | dec3a12 | 2016-02-13 12:38:36 +0000 | [diff] [blame] | 429 | interface_method->VisitRoots(visitor, pointer_size); |
| 430 | } |
Nicolas Geoffray | 5550ca8 | 2015-08-21 18:38:30 +0100 | [diff] [blame] | 431 | } |
Mathieu Chartier | 2d72101 | 2014-11-10 11:08:06 -0800 | [diff] [blame] | 432 | } |
| 433 | |
Mathieu Chartier | fbc3108 | 2016-01-24 11:59:56 -0800 | [diff] [blame] | 434 | template <typename Visitor> |
Vladimir Marko | 5122e6b | 2017-08-17 16:10:09 +0100 | [diff] [blame] | 435 | inline void ArtMethod::UpdateObjectsForImageRelocation(const Visitor& visitor) { |
Mathieu Chartier | e7f75f3 | 2016-02-01 16:08:15 -0800 | [diff] [blame] | 436 | mirror::Class* old_class = GetDeclaringClassUnchecked<kWithoutReadBarrier>(); |
Mathieu Chartier | fbc3108 | 2016-01-24 11:59:56 -0800 | [diff] [blame] | 437 | mirror::Class* new_class = visitor(old_class); |
| 438 | if (old_class != new_class) { |
| 439 | SetDeclaringClass(new_class); |
| 440 | } |
Mathieu Chartier | fbc3108 | 2016-01-24 11:59:56 -0800 | [diff] [blame] | 441 | } |
| 442 | |
Mathieu Chartier | e7f75f3 | 2016-02-01 16:08:15 -0800 | [diff] [blame] | 443 | template <ReadBarrierOption kReadBarrierOption, typename Visitor> |
Andreas Gampe | 542451c | 2016-07-26 09:02:02 -0700 | [diff] [blame] | 444 | inline void ArtMethod::UpdateEntrypoints(const Visitor& visitor, PointerSize pointer_size) { |
Mathieu Chartier | e7f75f3 | 2016-02-01 16:08:15 -0800 | [diff] [blame] | 445 | if (IsNative<kReadBarrierOption>()) { |
Mathieu Chartier | 0b4cbd0 | 2016-03-08 16:49:58 -0800 | [diff] [blame] | 446 | const void* old_native_code = GetEntryPointFromJniPtrSize(pointer_size); |
Mathieu Chartier | fbc3108 | 2016-01-24 11:59:56 -0800 | [diff] [blame] | 447 | const void* new_native_code = visitor(old_native_code); |
| 448 | if (old_native_code != new_native_code) { |
Mathieu Chartier | 0b4cbd0 | 2016-03-08 16:49:58 -0800 | [diff] [blame] | 449 | SetEntryPointFromJniPtrSize(new_native_code, pointer_size); |
Mathieu Chartier | fbc3108 | 2016-01-24 11:59:56 -0800 | [diff] [blame] | 450 | } |
| 451 | } else { |
Andreas Gampe | 75f0885 | 2016-07-19 08:06:07 -0700 | [diff] [blame] | 452 | DCHECK(GetDataPtrSize(pointer_size) == nullptr); |
Mathieu Chartier | fbc3108 | 2016-01-24 11:59:56 -0800 | [diff] [blame] | 453 | } |
Mathieu Chartier | 0b4cbd0 | 2016-03-08 16:49:58 -0800 | [diff] [blame] | 454 | const void* old_code = GetEntryPointFromQuickCompiledCodePtrSize(pointer_size); |
Mathieu Chartier | fbc3108 | 2016-01-24 11:59:56 -0800 | [diff] [blame] | 455 | const void* new_code = visitor(old_code); |
| 456 | if (old_code != new_code) { |
Mathieu Chartier | 0b4cbd0 | 2016-03-08 16:49:58 -0800 | [diff] [blame] | 457 | SetEntryPointFromQuickCompiledCodePtrSize(new_code, pointer_size); |
Mathieu Chartier | fbc3108 | 2016-01-24 11:59:56 -0800 | [diff] [blame] | 458 | } |
| 459 | } |
| 460 | |
Mathieu Chartier | 69147f1 | 2017-11-06 20:02:24 -0800 | [diff] [blame^] | 461 | inline IterationRange<DexInstructionIterator> ArtMethod::DexInstructions() { |
| 462 | CodeItemInstructionAccessor accessor(this); |
| 463 | return { accessor.begin(), |
| 464 | accessor.end() }; |
| 465 | } |
| 466 | |
| 467 | inline IterationRange<DexInstructionIterator> ArtMethod::NullableDexInstructions() { |
| 468 | CodeItemInstructionAccessor accessor(CodeItemInstructionAccessor::CreateNullable(this)); |
| 469 | return { accessor.begin(), |
| 470 | accessor.end() }; |
| 471 | } |
| 472 | |
Ian Rogers | 2dd0e2c | 2013-01-24 12:42:14 -0800 | [diff] [blame] | 473 | } // namespace art |
| 474 | |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 475 | #endif // ART_RUNTIME_ART_METHOD_INL_H_ |