summaryrefslogtreecommitdiff
path: root/runtime/art_method.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/art_method.cc')
-rw-r--r--runtime/art_method.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/runtime/art_method.cc b/runtime/art_method.cc
index 1392399bde..193bea167f 100644
--- a/runtime/art_method.cc
+++ b/runtime/art_method.cc
@@ -25,6 +25,7 @@
#include "class_linker-inl.h"
#include "debugger.h"
#include "dex_file-inl.h"
+#include "dex_file_annotations.h"
#include "dex_instruction.h"
#include "entrypoints/runtime_asm_entrypoints.h"
#include "gc/accounting/card_table-inl.h"
@@ -33,8 +34,8 @@
#include "jit/jit_code_cache.h"
#include "jit/profiling_info.h"
#include "jni_internal.h"
-#include "mirror/abstract_method.h"
#include "mirror/class-inl.h"
+#include "mirror/executable.h"
#include "mirror/object_array-inl.h"
#include "mirror/object-inl.h"
#include "mirror/string.h"
@@ -51,9 +52,9 @@ extern "C" void art_quick_invoke_static_stub(ArtMethod*, uint32_t*, uint32_t, Th
ArtMethod* ArtMethod::FromReflectedMethod(const ScopedObjectAccessAlreadyRunnable& soa,
jobject jlr_method) {
- auto* abstract_method = soa.Decode<mirror::AbstractMethod*>(jlr_method);
- DCHECK(abstract_method != nullptr);
- return abstract_method->GetArtMethod();
+ auto* executable = soa.Decode<mirror::Executable*>(jlr_method);
+ DCHECK(executable != nullptr);
+ return executable->GetArtMethod();
}
mirror::String* ArtMethod::GetNameAsString(Thread* self) {
@@ -107,7 +108,7 @@ size_t ArtMethod::NumArgRegisters(const StringPiece& shorty) {
}
bool ArtMethod::HasSameNameAndSignature(ArtMethod* other) {
- ScopedAssertNoThreadSuspension ants(Thread::Current(), "HasSameNameAndSignature");
+ ScopedAssertNoThreadSuspension ants("HasSameNameAndSignature");
const DexFile* dex_file = GetDexFile();
const DexFile::MethodId& mid = dex_file->GetMethodId(GetDexMethodIndex());
if (GetDexCache() == other->GetDexCache()) {
@@ -349,8 +350,6 @@ bool ArtMethod::IsAnnotatedWith(jclass klass, uint32_t visibility) {
ScopedObjectAccess soa(self);
StackHandleScope<1> shs(self);
- const DexFile& dex_file = GetDeclaringClass()->GetDexFile();
-
mirror::Class* annotation = soa.Decode<mirror::Class*>(klass);
DCHECK(annotation->IsAnnotation());
Handle<mirror::Class> annotation_handle(shs.NewHandle(annotation));
@@ -358,7 +357,7 @@ bool ArtMethod::IsAnnotatedWith(jclass klass, uint32_t visibility) {
// Note: Resolves any method annotations' classes as a side-effect.
// -- This seems allowed by the spec since it says we can preload any classes
// referenced by another classes's constant pool table.
- return dex_file.IsMethodAnnotationPresent(this, annotation_handle, visibility);
+ return annotations::IsMethodAnnotationPresent(this, annotation_handle, visibility);
}
bool ArtMethod::EqualParameters(Handle<mirror::ObjectArray<mirror::Class>> params) {