diff options
| author | 2017-11-30 09:16:37 +0000 | |
|---|---|---|
| committer | 2017-11-30 09:16:37 +0000 | |
| commit | 61bca574a474c26e302bdbc0b23d3c311d218fc6 (patch) | |
| tree | cbcfcee8846c8f9298b64f52e3523d2268e179ca /runtime/art_method-inl.h | |
| parent | da1ea1403227713c81e53e5334106f89d20767ed (diff) | |
| parent | 8f8bd8bfce0f2433bc66ac90a471e5f58cd2e2cc (diff) | |
Merge "Revert "Revert "Revert "JIT JNI stubs.""""
am: 8f8bd8bfce
Change-Id: Ie74a0ae3c130a4bde4fec8f92373d5a9df17663b
Diffstat (limited to 'runtime/art_method-inl.h')
| -rw-r--r-- | runtime/art_method-inl.h | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/runtime/art_method-inl.h b/runtime/art_method-inl.h index 31abf94889..50913def93 100644 --- a/runtime/art_method-inl.h +++ b/runtime/art_method-inl.h @@ -95,12 +95,10 @@ inline uint16_t ArtMethod::GetMethodIndexDuringLinking() { return method_index_; } -template <ReadBarrierOption kReadBarrierOption> inline uint32_t ArtMethod::GetDexMethodIndex() { if (kCheckDeclaringClassState) { - CHECK(IsRuntimeMethod() || - GetDeclaringClass<kReadBarrierOption>()->IsIdxLoaded() || - GetDeclaringClass<kReadBarrierOption>()->IsErroneous()); + CHECK(IsRuntimeMethod() || GetDeclaringClass()->IsIdxLoaded() || + GetDeclaringClass()->IsErroneous()); } return GetDexMethodIndexUnchecked(); } @@ -204,14 +202,7 @@ inline const char* ArtMethod::GetShorty() { inline const char* ArtMethod::GetShorty(uint32_t* out_length) { DCHECK(!IsProxyMethod()); const DexFile* dex_file = GetDexFile(); - // Don't do a read barrier in the DCHECK() inside GetDexMethodIndex() as GetShorty() - // can be called when the declaring class is about to be unloaded and cannot be added - // to the mark stack (subsequent GC assertion would fail). - // It is safe to avoid the read barrier as the ArtMethod is constructed with a declaring - // Class already satisfying the DCHECK() inside GetDexMethodIndex(), so even if that copy - // of declaring class becomes a from-space object, it shall satisfy the DCHECK(). - return dex_file->GetMethodShorty(dex_file->GetMethodId(GetDexMethodIndex<kWithoutReadBarrier>()), - out_length); + return dex_file->GetMethodShorty(dex_file->GetMethodId(GetDexMethodIndex()), out_length); } inline const Signature ArtMethod::GetSignature() { @@ -328,7 +319,7 @@ inline mirror::ClassLoader* ArtMethod::GetClassLoader() { template <ReadBarrierOption kReadBarrierOption> inline mirror::DexCache* ArtMethod::GetDexCache() { - if (LIKELY(!IsObsolete<kReadBarrierOption>())) { + if (LIKELY(!IsObsolete())) { mirror::Class* klass = GetDeclaringClass<kReadBarrierOption>(); return klass->GetDexCache<kDefaultVerifyFlags, kReadBarrierOption>(); } else { |