diff options
Diffstat (limited to 'runtime/art_method.cc')
| -rw-r--r-- | runtime/art_method.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/runtime/art_method.cc b/runtime/art_method.cc index 9d74e7c92b..5a71be6eb9 100644 --- a/runtime/art_method.cc +++ b/runtime/art_method.cc @@ -104,6 +104,16 @@ mirror::DexCache* ArtMethod::GetObsoleteDexCache() { UNREACHABLE(); } +uint16_t ArtMethod::FindObsoleteDexClassDefIndex() { + DCHECK(!Runtime::Current()->IsAotCompiler()) << PrettyMethod(); + DCHECK(IsObsolete()); + const DexFile* dex_file = GetDexFile(); + const dex::TypeIndex declaring_class_type = dex_file->GetMethodId(GetDexMethodIndex()).class_idx_; + const DexFile::ClassDef* class_def = dex_file->FindClassDef(declaring_class_type); + CHECK(class_def != nullptr); + return dex_file->GetIndexForClassDef(*class_def); +} + mirror::String* ArtMethod::GetNameAsString(Thread* self) { CHECK(!IsProxyMethod()); StackHandleScope<1> hs(self); @@ -327,7 +337,8 @@ void ArtMethod::Invoke(Thread* self, uint32_t* args, uint32_t args_size, JValue* // Ensure that we won't be accidentally calling quick compiled code when -Xint. if (kIsDebugBuild && runtime->GetInstrumentation()->IsForcedInterpretOnly()) { CHECK(!runtime->UseJitCompilation()); - const void* oat_quick_code = (IsNative() || !IsInvokable() || IsProxyMethod()) + const void* oat_quick_code = + (IsNative() || !IsInvokable() || IsProxyMethod() || IsObsolete()) ? nullptr : GetOatMethodQuickCode(runtime->GetClassLinker()->GetImagePointerSize()); CHECK(oat_quick_code == nullptr || oat_quick_code != GetEntryPointFromQuickCompiledCode()) |