Refactor java.lang.reflect implementation
Cherry-picked from commit ed41d5c44299ec5d44b8514f6e17f802f48094d1.
Move to ArtMethod/Field instead of AbstractMethod/Field and have
java.lang.reflect APIs delegate to ArtMethod/ArtField.
Bug: 10014286.
Change-Id: Iafc1d8c5b62562c9af8fb9fd8c5e1d61270536e7
diff --git a/runtime/entrypoints/entrypoint_utils.cc b/runtime/entrypoints/entrypoint_utils.cc
index c297841..6b8c41e 100644
--- a/runtime/entrypoints/entrypoint_utils.cc
+++ b/runtime/entrypoints/entrypoint_utils.cc
@@ -19,9 +19,9 @@
#include "class_linker-inl.h"
#include "dex_file-inl.h"
#include "gc/accounting/card_table-inl.h"
-#include "mirror/abstract_method-inl.h"
+#include "mirror/art_field-inl.h"
+#include "mirror/art_method-inl.h"
#include "mirror/class-inl.h"
-#include "mirror/field-inl.h"
#include "mirror/object-inl.h"
#include "mirror/object_array-inl.h"
#include "mirror/proxy.h"
@@ -33,7 +33,7 @@
namespace art {
// Helper function to allocate array for FILLED_NEW_ARRAY.
-mirror::Array* CheckAndAllocArrayFromCode(uint32_t type_idx, mirror::AbstractMethod* referrer,
+mirror::Array* CheckAndAllocArrayFromCode(uint32_t type_idx, mirror::ArtMethod* referrer,
int32_t component_count, Thread* self,
bool access_check) {
if (UNLIKELY(component_count < 0)) {
@@ -73,7 +73,7 @@
}
}
-mirror::Field* FindFieldFromCode(uint32_t field_idx, const mirror::AbstractMethod* referrer,
+mirror::ArtField* FindFieldFromCode(uint32_t field_idx, const mirror::ArtMethod* referrer,
Thread* self, FindFieldType type, size_t expected_size,
bool access_check) {
bool is_primitive;
@@ -91,7 +91,7 @@
default: is_primitive = true; is_set = true; is_static = true; break;
}
ClassLinker* class_linker = Runtime::Current()->GetClassLinker();
- mirror::Field* resolved_field = class_linker->ResolveField(field_idx, referrer, is_static);
+ mirror::ArtField* resolved_field = class_linker->ResolveField(field_idx, referrer, is_static);
if (UNLIKELY(resolved_field == NULL)) {
DCHECK(self->IsExceptionPending()); // Throw exception and unwind.
return NULL; // Failure.
@@ -158,12 +158,12 @@
}
// Slow path method resolution
-mirror::AbstractMethod* FindMethodFromCode(uint32_t method_idx, mirror::Object* this_object,
- mirror::AbstractMethod* referrer,
+mirror::ArtMethod* FindMethodFromCode(uint32_t method_idx, mirror::Object* this_object,
+ mirror::ArtMethod* referrer,
Thread* self, bool access_check, InvokeType type) {
ClassLinker* class_linker = Runtime::Current()->GetClassLinker();
bool is_direct = type == kStatic || type == kDirect;
- mirror::AbstractMethod* resolved_method = class_linker->ResolveMethod(method_idx, referrer, type);
+ mirror::ArtMethod* resolved_method = class_linker->ResolveMethod(method_idx, referrer, type);
if (UNLIKELY(resolved_method == NULL)) {
DCHECK(self->IsExceptionPending()); // Throw exception and unwind.
return NULL; // Failure.
@@ -179,7 +179,7 @@
if (is_direct) {
return resolved_method;
} else if (type == kInterface) {
- mirror::AbstractMethod* interface_method =
+ mirror::ArtMethod* interface_method =
this_object->GetClass()->FindVirtualMethodForInterface(resolved_method);
if (UNLIKELY(interface_method == NULL)) {
ThrowIncompatibleClassChangeErrorClassForInterfaceDispatch(resolved_method, this_object,
@@ -189,7 +189,7 @@
return interface_method;
}
} else {
- mirror::ObjectArray<mirror::AbstractMethod>* vtable;
+ mirror::ObjectArray<mirror::ArtMethod>* vtable;
uint16_t vtable_index = resolved_method->GetMethodIndex();
if (type == kSuper) {
vtable = referrer->GetDeclaringClass()->GetSuperClass()->GetVTable();
@@ -231,7 +231,7 @@
if (is_direct) {
return resolved_method;
} else if (type == kInterface) {
- mirror::AbstractMethod* interface_method =
+ mirror::ArtMethod* interface_method =
this_object->GetClass()->FindVirtualMethodForInterface(resolved_method);
if (UNLIKELY(interface_method == NULL)) {
ThrowIncompatibleClassChangeErrorClassForInterfaceDispatch(resolved_method, this_object,
@@ -241,7 +241,7 @@
return interface_method;
}
} else {
- mirror::ObjectArray<mirror::AbstractMethod>* vtable;
+ mirror::ObjectArray<mirror::ArtMethod>* vtable;
uint16_t vtable_index = resolved_method->GetMethodIndex();
if (type == kSuper) {
mirror::Class* super_class = referring_class->GetSuperClass();
@@ -326,17 +326,15 @@
}
}
- // Call InvocationHandler.invoke(Object proxy, Method method, Object[] args).
- jobject inv_hand = soa.Env()->GetObjectField(rcvr_jobj,
- WellKnownClasses::java_lang_reflect_Proxy_h);
+ // Call Proxy.invoke(Proxy proxy, ArtMethod method, Object[] args).
jvalue invocation_args[3];
invocation_args[0].l = rcvr_jobj;
invocation_args[1].l = interface_method_jobj;
invocation_args[2].l = args_jobj;
jobject result =
- soa.Env()->CallObjectMethodA(inv_hand,
- WellKnownClasses::java_lang_reflect_InvocationHandler_invoke,
- invocation_args);
+ soa.Env()->CallStaticObjectMethodA(WellKnownClasses::java_lang_reflect_Proxy,
+ WellKnownClasses::java_lang_reflect_Proxy_invoke,
+ invocation_args);
// Unbox result and handle error conditions.
if (LIKELY(!soa.Self()->IsExceptionPending())) {
@@ -346,10 +344,10 @@
} else {
mirror::Object* result_ref = soa.Decode<mirror::Object*>(result);
mirror::Object* rcvr = soa.Decode<mirror::Object*>(rcvr_jobj);
- mirror::AbstractMethod* interface_method =
- soa.Decode<mirror::AbstractMethod*>(interface_method_jobj);
+ mirror::ArtMethod* interface_method =
+ soa.Decode<mirror::ArtMethod*>(interface_method_jobj);
mirror::Class* result_type = MethodHelper(interface_method).GetReturnType();
- mirror::AbstractMethod* proxy_method;
+ mirror::ArtMethod* proxy_method;
if (interface_method->GetDeclaringClass()->IsInterface()) {
proxy_method = rcvr->GetClass()->FindVirtualMethodForInterface(interface_method);
} else {
@@ -373,9 +371,9 @@
mirror::Object* rcvr = soa.Decode<mirror::Object*>(rcvr_jobj);
mirror::SynthesizedProxyClass* proxy_class =
down_cast<mirror::SynthesizedProxyClass*>(rcvr->GetClass());
- mirror::AbstractMethod* interface_method =
- soa.Decode<mirror::AbstractMethod*>(interface_method_jobj);
- mirror::AbstractMethod* proxy_method =
+ mirror::ArtMethod* interface_method =
+ soa.Decode<mirror::ArtMethod*>(interface_method_jobj);
+ mirror::ArtMethod* proxy_method =
rcvr->GetClass()->FindVirtualMethodForInterface(interface_method);
int throws_index = -1;
size_t num_virt_methods = proxy_class->NumVirtualMethods();
diff --git a/runtime/entrypoints/entrypoint_utils.h b/runtime/entrypoints/entrypoint_utils.h
index b6781c0..2b73af4 100644
--- a/runtime/entrypoints/entrypoint_utils.h
+++ b/runtime/entrypoints/entrypoint_utils.h
@@ -23,7 +23,7 @@
#include "indirect_reference_table.h"
#include "invoke_type.h"
#include "jni_internal.h"
-#include "mirror/abstract_method.h"
+#include "mirror/art_method.h"
#include "mirror/array.h"
#include "mirror/class-inl.h"
#include "mirror/throwable.h"
@@ -34,7 +34,7 @@
namespace mirror {
class Class;
- class Field;
+ class ArtField;
class Object;
} // namespace mirror
@@ -42,7 +42,7 @@
// cannot be resolved, throw an error. If it can, use it to create an instance.
// When verification/compiler hasn't been able to verify access, optionally perform an access
// check.
-static inline mirror::Object* AllocObjectFromCode(uint32_t type_idx, mirror::AbstractMethod* method,
+static inline mirror::Object* AllocObjectFromCode(uint32_t type_idx, mirror::ArtMethod* method,
Thread* self,
bool access_check)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
@@ -80,7 +80,7 @@
// it cannot be resolved, throw an error. If it can, use it to create an array.
// When verification/compiler hasn't been able to verify access, optionally perform an access
// check.
-static inline mirror::Array* AllocArrayFromCode(uint32_t type_idx, mirror::AbstractMethod* method,
+static inline mirror::Array* AllocArrayFromCode(uint32_t type_idx, mirror::ArtMethod* method,
int32_t component_count,
Thread* self, bool access_check)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
@@ -107,7 +107,7 @@
return mirror::Array::Alloc(self, klass, component_count);
}
-extern mirror::Array* CheckAndAllocArrayFromCode(uint32_t type_idx, mirror::AbstractMethod* method,
+extern mirror::Array* CheckAndAllocArrayFromCode(uint32_t type_idx, mirror::ArtMethod* method,
int32_t component_count,
Thread* self, bool access_check)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
@@ -125,17 +125,17 @@
};
// Slow field find that can initialize classes and may throw exceptions.
-extern mirror::Field* FindFieldFromCode(uint32_t field_idx, const mirror::AbstractMethod* referrer,
- Thread* self, FindFieldType type, size_t expected_size,
- bool access_check)
+extern mirror::ArtField* FindFieldFromCode(uint32_t field_idx, const mirror::ArtMethod* referrer,
+ Thread* self, FindFieldType type, size_t expected_size,
+ bool access_check)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
// Fast path field resolution that can't initialize classes or throw exceptions.
-static inline mirror::Field* FindFieldFast(uint32_t field_idx,
- const mirror::AbstractMethod* referrer,
- FindFieldType type, size_t expected_size)
+static inline mirror::ArtField* FindFieldFast(uint32_t field_idx,
+ const mirror::ArtMethod* referrer,
+ FindFieldType type, size_t expected_size)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
- mirror::Field* resolved_field =
+ mirror::ArtField* resolved_field =
referrer->GetDeclaringClass()->GetDexCache()->GetResolvedField(field_idx);
if (UNLIKELY(resolved_field == NULL)) {
return NULL;
@@ -186,16 +186,16 @@
}
// Fast path method resolution that can't throw exceptions.
-static inline mirror::AbstractMethod* FindMethodFast(uint32_t method_idx,
- mirror::Object* this_object,
- const mirror::AbstractMethod* referrer,
- bool access_check, InvokeType type)
+static inline mirror::ArtMethod* FindMethodFast(uint32_t method_idx,
+ mirror::Object* this_object,
+ const mirror::ArtMethod* referrer,
+ bool access_check, InvokeType type)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
bool is_direct = type == kStatic || type == kDirect;
if (UNLIKELY(this_object == NULL && !is_direct)) {
return NULL;
}
- mirror::AbstractMethod* resolved_method =
+ mirror::ArtMethod* resolved_method =
referrer->GetDeclaringClass()->GetDexCache()->GetResolvedMethod(method_idx);
if (UNLIKELY(resolved_method == NULL)) {
return NULL;
@@ -228,13 +228,13 @@
}
}
-extern mirror::AbstractMethod* FindMethodFromCode(uint32_t method_idx, mirror::Object* this_object,
- mirror::AbstractMethod* referrer,
- Thread* self, bool access_check, InvokeType type)
+extern mirror::ArtMethod* FindMethodFromCode(uint32_t method_idx, mirror::Object* this_object,
+ mirror::ArtMethod* referrer,
+ Thread* self, bool access_check, InvokeType type)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
static inline mirror::Class* ResolveVerifyAndClinit(uint32_t type_idx,
- const mirror::AbstractMethod* referrer,
+ const mirror::ArtMethod* referrer,
Thread* self, bool can_run_clinit,
bool verify_access)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
@@ -271,7 +271,7 @@
extern void ThrowStackOverflowError(Thread* self) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
-static inline mirror::String* ResolveStringFromCode(const mirror::AbstractMethod* referrer,
+static inline mirror::String* ResolveStringFromCode(const mirror::ArtMethod* referrer,
uint32_t string_idx)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
ClassLinker* class_linker = Runtime::Current()->GetClassLinker();
@@ -307,7 +307,7 @@
if (o == NULL) {
return;
}
- mirror::AbstractMethod* m = self->GetCurrentMethod(NULL);
+ mirror::ArtMethod* m = self->GetCurrentMethod(NULL);
if (o == kInvalidIndirectRefObject) {
JniAbortF(NULL, "invalid reference returned from %s", PrettyMethod(m).c_str());
}
@@ -334,7 +334,7 @@
}
JValue InvokeProxyInvocationHandler(ScopedObjectAccessUnchecked& soa, const char* shorty,
- jobject rcvr_jobj, jobject interface_method_jobj,
+ jobject rcvr_jobj, jobject interface_art_method_jobj,
std::vector<jvalue>& args)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
@@ -356,12 +356,12 @@
return reinterpret_cast<uintptr_t>(art_quick_instrumentation_exit);
}
-extern "C" void art_portable_to_interpreter_bridge(mirror::AbstractMethod*);
+extern "C" void art_portable_to_interpreter_bridge(mirror::ArtMethod*);
static inline const void* GetPortableToInterpreterBridge() {
return reinterpret_cast<void*>(art_portable_to_interpreter_bridge);
}
-extern "C" void art_quick_to_interpreter_bridge(mirror::AbstractMethod*);
+extern "C" void art_quick_to_interpreter_bridge(mirror::ArtMethod*);
static inline const void* GetQuickToInterpreterBridge() {
return reinterpret_cast<void*>(art_quick_to_interpreter_bridge);
}
diff --git a/runtime/entrypoints/interpreter/interpreter_entrypoints.cc b/runtime/entrypoints/interpreter/interpreter_entrypoints.cc
index 67f6d98..f319a00 100644
--- a/runtime/entrypoints/interpreter/interpreter_entrypoints.cc
+++ b/runtime/entrypoints/interpreter/interpreter_entrypoints.cc
@@ -17,7 +17,7 @@
#include "class_linker.h"
#include "interpreter/interpreter.h"
#include "invoke_arg_array_builder.h"
-#include "mirror/abstract_method-inl.h"
+#include "mirror/art_method-inl.h"
#include "mirror/object-inl.h"
#include "object_utils.h"
#include "runtime.h"
@@ -29,7 +29,7 @@
const DexFile::CodeItem* code_item,
ShadowFrame* shadow_frame, JValue* result)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
- mirror::AbstractMethod* method = shadow_frame->GetMethod();
+ mirror::ArtMethod* method = shadow_frame->GetMethod();
// Ensure static methods are initialized.
if (method->IsStatic()) {
Runtime::Current()->GetClassLinker()->EnsureInitialized(method->GetDeclaringClass(), true, true);
diff --git a/runtime/entrypoints/jni/jni_entrypoints.cc b/runtime/entrypoints/jni/jni_entrypoints.cc
index 88b4936..83d3a58 100644
--- a/runtime/entrypoints/jni/jni_entrypoints.cc
+++ b/runtime/entrypoints/jni/jni_entrypoints.cc
@@ -16,7 +16,7 @@
#include "base/logging.h"
#include "entrypoints/entrypoint_utils.h"
-#include "mirror/abstract_method-inl.h"
+#include "mirror/art_method-inl.h"
#include "mirror/object-inl.h"
#include "object_utils.h"
#include "scoped_thread_state_change.h"
@@ -30,7 +30,7 @@
Locks::mutator_lock_->AssertNotHeld(self); // We come here as Native.
ScopedObjectAccess soa(self);
- mirror::AbstractMethod* method = self->GetCurrentMethod(NULL);
+ mirror::ArtMethod* method = self->GetCurrentMethod(NULL);
DCHECK(method != NULL);
// Lookup symbol address for method, on failure we'll return NULL with an exception set,
@@ -69,7 +69,7 @@
// | unused |
// | unused |
// | unused | <- sp
- mirror::AbstractMethod* jni_method = self->GetCurrentMethod(NULL);
+ mirror::ArtMethod* jni_method = self->GetCurrentMethod(NULL);
DCHECK(jni_method->IsNative()) << PrettyMethod(jni_method);
intptr_t* arg_ptr = sp + 4; // pointer to r1 on stack
// Fix up this/jclass argument
diff --git a/runtime/entrypoints/portable/portable_alloc_entrypoints.cc b/runtime/entrypoints/portable/portable_alloc_entrypoints.cc
index 2869269..91b7353 100644
--- a/runtime/entrypoints/portable/portable_alloc_entrypoints.cc
+++ b/runtime/entrypoints/portable/portable_alloc_entrypoints.cc
@@ -15,27 +15,27 @@
*/
#include "entrypoints/entrypoint_utils.h"
-#include "mirror/abstract_method-inl.h"
+#include "mirror/art_method-inl.h"
#include "mirror/object-inl.h"
namespace art {
extern "C" mirror::Object* art_portable_alloc_object_from_code(uint32_t type_idx,
- mirror::AbstractMethod* referrer,
+ mirror::ArtMethod* referrer,
Thread* thread)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
return AllocObjectFromCode(type_idx, referrer, thread, false);
}
extern "C" mirror::Object* art_portable_alloc_object_from_code_with_access_check(uint32_t type_idx,
- mirror::AbstractMethod* referrer,
+ mirror::ArtMethod* referrer,
Thread* thread)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
return AllocObjectFromCode(type_idx, referrer, thread, true);
}
extern "C" mirror::Object* art_portable_alloc_array_from_code(uint32_t type_idx,
- mirror::AbstractMethod* referrer,
+ mirror::ArtMethod* referrer,
uint32_t length,
Thread* self)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
@@ -43,7 +43,7 @@
}
extern "C" mirror::Object* art_portable_alloc_array_from_code_with_access_check(uint32_t type_idx,
- mirror::AbstractMethod* referrer,
+ mirror::ArtMethod* referrer,
uint32_t length,
Thread* self)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
@@ -51,7 +51,7 @@
}
extern "C" mirror::Object* art_portable_check_and_alloc_array_from_code(uint32_t type_idx,
- mirror::AbstractMethod* referrer,
+ mirror::ArtMethod* referrer,
uint32_t length,
Thread* thread)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
@@ -59,7 +59,7 @@
}
extern "C" mirror::Object* art_portable_check_and_alloc_array_from_code_with_access_check(uint32_t type_idx,
- mirror::AbstractMethod* referrer,
+ mirror::ArtMethod* referrer,
uint32_t length,
Thread* thread)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
diff --git a/runtime/entrypoints/portable/portable_dexcache_entrypoints.cc b/runtime/entrypoints/portable/portable_dexcache_entrypoints.cc
index bdab587..b37ebcf 100644
--- a/runtime/entrypoints/portable/portable_dexcache_entrypoints.cc
+++ b/runtime/entrypoints/portable/portable_dexcache_entrypoints.cc
@@ -16,27 +16,27 @@
#include "entrypoints/entrypoint_utils.h"
#include "gc/accounting/card_table-inl.h"
-#include "mirror/abstract_method-inl.h"
+#include "mirror/art_method-inl.h"
#include "mirror/object-inl.h"
namespace art {
extern "C" mirror::Object* art_portable_initialize_static_storage_from_code(uint32_t type_idx,
- mirror::AbstractMethod* referrer,
+ mirror::ArtMethod* referrer,
Thread* thread)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
return ResolveVerifyAndClinit(type_idx, referrer, thread, true, false);
}
extern "C" mirror::Object* art_portable_initialize_type_from_code(uint32_t type_idx,
- mirror::AbstractMethod* referrer,
+ mirror::ArtMethod* referrer,
Thread* thread)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
return ResolveVerifyAndClinit(type_idx, referrer, thread, false, false);
}
extern "C" mirror::Object* art_portable_initialize_type_and_verify_access_from_code(uint32_t type_idx,
- mirror::AbstractMethod* referrer,
+ mirror::ArtMethod* referrer,
Thread* thread)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
// Called when caller isn't guaranteed to have access to a type and the dex cache may be
@@ -44,7 +44,7 @@
return ResolveVerifyAndClinit(type_idx, referrer, thread, false, true);
}
-extern "C" mirror::Object* art_portable_resolve_string_from_code(mirror::AbstractMethod* referrer,
+extern "C" mirror::Object* art_portable_resolve_string_from_code(mirror::ArtMethod* referrer,
uint32_t string_idx)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
return ResolveStringFromCode(referrer, string_idx);
diff --git a/runtime/entrypoints/portable/portable_entrypoints.h b/runtime/entrypoints/portable/portable_entrypoints.h
index ec9e4f8..d456447 100644
--- a/runtime/entrypoints/portable/portable_entrypoints.h
+++ b/runtime/entrypoints/portable/portable_entrypoints.h
@@ -22,7 +22,7 @@
namespace art {
namespace mirror {
- class AbstractMethod;
+ class ArtMethod;
class Object;
} // namespace mirror
class Thread;
@@ -35,8 +35,8 @@
// compiler ABI.
struct PACKED(4) PortableEntryPoints {
// Invocation
- void (*pPortableResolutionTrampoline)(mirror::AbstractMethod*);
- void (*pPortableToInterpreterBridge)(mirror::AbstractMethod*);
+ void (*pPortableResolutionTrampoline)(mirror::ArtMethod*);
+ void (*pPortableToInterpreterBridge)(mirror::ArtMethod*);
};
} // namespace art
diff --git a/runtime/entrypoints/portable/portable_field_entrypoints.cc b/runtime/entrypoints/portable/portable_field_entrypoints.cc
index aa0f03c..bd6f795 100644
--- a/runtime/entrypoints/portable/portable_field_entrypoints.cc
+++ b/runtime/entrypoints/portable/portable_field_entrypoints.cc
@@ -15,17 +15,17 @@
*/
#include "entrypoints/entrypoint_utils.h"
-#include "mirror/abstract_method-inl.h"
-#include "mirror/field-inl.h"
+#include "mirror/art_field-inl.h"
+#include "mirror/art_method-inl.h"
#include "mirror/object-inl.h"
namespace art {
extern "C" int32_t art_portable_set32_static_from_code(uint32_t field_idx,
- mirror::AbstractMethod* referrer,
+ mirror::ArtMethod* referrer,
int32_t new_value)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
- mirror::Field* field = FindFieldFast(field_idx,
+ mirror::ArtField* field = FindFieldFast(field_idx,
referrer,
StaticPrimitiveWrite,
sizeof(uint32_t));
@@ -47,10 +47,10 @@
}
extern "C" int32_t art_portable_set64_static_from_code(uint32_t field_idx,
- mirror::AbstractMethod* referrer,
+ mirror::ArtMethod* referrer,
int64_t new_value)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
- mirror::Field* field = FindFieldFast(field_idx, referrer, StaticPrimitiveWrite, sizeof(uint64_t));
+ mirror::ArtField* field = FindFieldFast(field_idx, referrer, StaticPrimitiveWrite, sizeof(uint64_t));
if (LIKELY(field != NULL)) {
field->Set64(field->GetDeclaringClass(), new_value);
return 0;
@@ -69,11 +69,11 @@
}
extern "C" int32_t art_portable_set_obj_static_from_code(uint32_t field_idx,
- mirror::AbstractMethod* referrer,
+ mirror::ArtMethod* referrer,
mirror::Object* new_value)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
- mirror::Field* field = FindFieldFast(field_idx, referrer, StaticObjectWrite,
- sizeof(mirror::Object*));
+ mirror::ArtField* field = FindFieldFast(field_idx, referrer, StaticObjectWrite,
+ sizeof(mirror::Object*));
if (LIKELY(field != NULL)) {
field->SetObj(field->GetDeclaringClass(), new_value);
return 0;
@@ -88,9 +88,9 @@
}
extern "C" int32_t art_portable_get32_static_from_code(uint32_t field_idx,
- mirror::AbstractMethod* referrer)
+ mirror::ArtMethod* referrer)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
- mirror::Field* field = FindFieldFast(field_idx, referrer, StaticPrimitiveRead, sizeof(uint32_t));
+ mirror::ArtField* field = FindFieldFast(field_idx, referrer, StaticPrimitiveRead, sizeof(uint32_t));
if (LIKELY(field != NULL)) {
return field->Get32(field->GetDeclaringClass());
}
@@ -103,9 +103,9 @@
}
extern "C" int64_t art_portable_get64_static_from_code(uint32_t field_idx,
- mirror::AbstractMethod* referrer)
+ mirror::ArtMethod* referrer)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
- mirror::Field* field = FindFieldFast(field_idx, referrer, StaticPrimitiveRead, sizeof(uint64_t));
+ mirror::ArtField* field = FindFieldFast(field_idx, referrer, StaticPrimitiveRead, sizeof(uint64_t));
if (LIKELY(field != NULL)) {
return field->Get64(field->GetDeclaringClass());
}
@@ -118,10 +118,10 @@
}
extern "C" mirror::Object* art_portable_get_obj_static_from_code(uint32_t field_idx,
- mirror::AbstractMethod* referrer)
+ mirror::ArtMethod* referrer)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
- mirror::Field* field = FindFieldFast(field_idx, referrer, StaticObjectRead,
- sizeof(mirror::Object*));
+ mirror::ArtField* field = FindFieldFast(field_idx, referrer, StaticObjectRead,
+ sizeof(mirror::Object*));
if (LIKELY(field != NULL)) {
return field->GetObj(field->GetDeclaringClass());
}
@@ -134,10 +134,10 @@
}
extern "C" int32_t art_portable_set32_instance_from_code(uint32_t field_idx,
- mirror::AbstractMethod* referrer,
+ mirror::ArtMethod* referrer,
mirror::Object* obj, uint32_t new_value)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
- mirror::Field* field = FindFieldFast(field_idx, referrer, InstancePrimitiveWrite, sizeof(uint32_t));
+ mirror::ArtField* field = FindFieldFast(field_idx, referrer, InstancePrimitiveWrite, sizeof(uint32_t));
if (LIKELY(field != NULL)) {
field->Set32(obj, new_value);
return 0;
@@ -152,10 +152,10 @@
}
extern "C" int32_t art_portable_set64_instance_from_code(uint32_t field_idx,
- mirror::AbstractMethod* referrer,
+ mirror::ArtMethod* referrer,
mirror::Object* obj, int64_t new_value)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
- mirror::Field* field = FindFieldFast(field_idx, referrer, InstancePrimitiveWrite, sizeof(uint64_t));
+ mirror::ArtField* field = FindFieldFast(field_idx, referrer, InstancePrimitiveWrite, sizeof(uint64_t));
if (LIKELY(field != NULL)) {
field->Set64(obj, new_value);
return 0;
@@ -170,12 +170,12 @@
}
extern "C" int32_t art_portable_set_obj_instance_from_code(uint32_t field_idx,
- mirror::AbstractMethod* referrer,
+ mirror::ArtMethod* referrer,
mirror::Object* obj,
mirror::Object* new_value)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
- mirror::Field* field = FindFieldFast(field_idx, referrer, InstanceObjectWrite,
- sizeof(mirror::Object*));
+ mirror::ArtField* field = FindFieldFast(field_idx, referrer, InstanceObjectWrite,
+ sizeof(mirror::Object*));
if (LIKELY(field != NULL)) {
field->SetObj(obj, new_value);
return 0;
@@ -190,10 +190,10 @@
}
extern "C" int32_t art_portable_get32_instance_from_code(uint32_t field_idx,
- mirror::AbstractMethod* referrer,
+ mirror::ArtMethod* referrer,
mirror::Object* obj)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
- mirror::Field* field = FindFieldFast(field_idx, referrer, InstancePrimitiveRead, sizeof(uint32_t));
+ mirror::ArtField* field = FindFieldFast(field_idx, referrer, InstancePrimitiveRead, sizeof(uint32_t));
if (LIKELY(field != NULL)) {
return field->Get32(obj);
}
@@ -206,10 +206,10 @@
}
extern "C" int64_t art_portable_get64_instance_from_code(uint32_t field_idx,
- mirror::AbstractMethod* referrer,
+ mirror::ArtMethod* referrer,
mirror::Object* obj)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
- mirror::Field* field = FindFieldFast(field_idx, referrer, InstancePrimitiveRead, sizeof(uint64_t));
+ mirror::ArtField* field = FindFieldFast(field_idx, referrer, InstancePrimitiveRead, sizeof(uint64_t));
if (LIKELY(field != NULL)) {
return field->Get64(obj);
}
@@ -222,11 +222,11 @@
}
extern "C" mirror::Object* art_portable_get_obj_instance_from_code(uint32_t field_idx,
- mirror::AbstractMethod* referrer,
+ mirror::ArtMethod* referrer,
mirror::Object* obj)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
- mirror::Field* field = FindFieldFast(field_idx, referrer, InstanceObjectRead,
- sizeof(mirror::Object*));
+ mirror::ArtField* field = FindFieldFast(field_idx, referrer, InstanceObjectRead,
+ sizeof(mirror::Object*));
if (LIKELY(field != NULL)) {
return field->GetObj(obj);
}
diff --git a/runtime/entrypoints/portable/portable_fillarray_entrypoints.cc b/runtime/entrypoints/portable/portable_fillarray_entrypoints.cc
index 771608b..8cf4eed 100644
--- a/runtime/entrypoints/portable/portable_fillarray_entrypoints.cc
+++ b/runtime/entrypoints/portable/portable_fillarray_entrypoints.cc
@@ -16,12 +16,12 @@
#include "dex_instruction.h"
#include "entrypoints/entrypoint_utils.h"
-#include "mirror/abstract_method-inl.h"
+#include "mirror/art_method-inl.h"
#include "mirror/object-inl.h"
namespace art {
-extern "C" void art_portable_fill_array_data_from_code(mirror::AbstractMethod* method,
+extern "C" void art_portable_fill_array_data_from_code(mirror::ArtMethod* method,
uint32_t dex_pc,
mirror::Array* array,
uint32_t payload_offset)
diff --git a/runtime/entrypoints/portable/portable_invoke_entrypoints.cc b/runtime/entrypoints/portable/portable_invoke_entrypoints.cc
index 5911ba3..14cbd84 100644
--- a/runtime/entrypoints/portable/portable_invoke_entrypoints.cc
+++ b/runtime/entrypoints/portable/portable_invoke_entrypoints.cc
@@ -15,20 +15,20 @@
*/
#include "entrypoints/entrypoint_utils.h"
-#include "mirror/abstract_method-inl.h"
+#include "mirror/art_method-inl.h"
#include "mirror/dex_cache-inl.h"
#include "mirror/object-inl.h"
namespace art {
-static mirror::AbstractMethod* FindMethodHelper(uint32_t method_idx,
+static mirror::ArtMethod* FindMethodHelper(uint32_t method_idx,
mirror::Object* this_object,
- mirror::AbstractMethod* caller_method,
+ mirror::ArtMethod* caller_method,
bool access_check,
InvokeType type,
Thread* thread)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
- mirror::AbstractMethod* method = FindMethodFast(method_idx,
+ mirror::ArtMethod* method = FindMethodFast(method_idx,
this_object,
caller_method,
access_check,
@@ -55,7 +55,7 @@
extern "C" mirror::Object* art_portable_find_static_method_from_code_with_access_check(uint32_t method_idx,
mirror::Object* this_object,
- mirror::AbstractMethod* referrer,
+ mirror::ArtMethod* referrer,
Thread* thread)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
return FindMethodHelper(method_idx, this_object, referrer, true, kStatic, thread);
@@ -63,7 +63,7 @@
extern "C" mirror::Object* art_portable_find_direct_method_from_code_with_access_check(uint32_t method_idx,
mirror::Object* this_object,
- mirror::AbstractMethod* referrer,
+ mirror::ArtMethod* referrer,
Thread* thread)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
return FindMethodHelper(method_idx, this_object, referrer, true, kDirect, thread);
@@ -71,7 +71,7 @@
extern "C" mirror::Object* art_portable_find_virtual_method_from_code_with_access_check(uint32_t method_idx,
mirror::Object* this_object,
- mirror::AbstractMethod* referrer,
+ mirror::ArtMethod* referrer,
Thread* thread)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
return FindMethodHelper(method_idx, this_object, referrer, true, kVirtual, thread);
@@ -79,7 +79,7 @@
extern "C" mirror::Object* art_portable_find_super_method_from_code_with_access_check(uint32_t method_idx,
mirror::Object* this_object,
- mirror::AbstractMethod* referrer,
+ mirror::ArtMethod* referrer,
Thread* thread)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
return FindMethodHelper(method_idx, this_object, referrer, true, kSuper, thread);
@@ -87,7 +87,7 @@
extern "C" mirror::Object* art_portable_find_interface_method_from_code_with_access_check(uint32_t method_idx,
mirror::Object* this_object,
- mirror::AbstractMethod* referrer,
+ mirror::ArtMethod* referrer,
Thread* thread)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
return FindMethodHelper(method_idx, this_object, referrer, true, kInterface, thread);
@@ -95,7 +95,7 @@
extern "C" mirror::Object* art_portable_find_interface_method_from_code(uint32_t method_idx,
mirror::Object* this_object,
- mirror::AbstractMethod* referrer,
+ mirror::ArtMethod* referrer,
Thread* thread)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
return FindMethodHelper(method_idx, this_object, referrer, false, kInterface, thread);
diff --git a/runtime/entrypoints/portable/portable_jni_entrypoints.cc b/runtime/entrypoints/portable/portable_jni_entrypoints.cc
index 8df16ae..de1e32e 100644
--- a/runtime/entrypoints/portable/portable_jni_entrypoints.cc
+++ b/runtime/entrypoints/portable/portable_jni_entrypoints.cc
@@ -15,7 +15,7 @@
*/
#include "entrypoints/entrypoint_utils.h"
-#include "mirror/abstract_method-inl.h"
+#include "mirror/art_method-inl.h"
#include "mirror/object-inl.h"
#include "thread-inl.h"
diff --git a/runtime/entrypoints/portable/portable_thread_entrypoints.cc b/runtime/entrypoints/portable/portable_thread_entrypoints.cc
index dac7388..8a2c899 100644
--- a/runtime/entrypoints/portable/portable_thread_entrypoints.cc
+++ b/runtime/entrypoints/portable/portable_thread_entrypoints.cc
@@ -15,7 +15,7 @@
*/
#include "entrypoints/entrypoint_utils.h"
-#include "mirror/abstract_method.h"
+#include "mirror/art_method.h"
#include "mirror/object-inl.h"
#include "verifier/dex_gc_map.h"
#include "stack.h"
@@ -31,7 +31,7 @@
if (IsShadowFrame()) {
ShadowFrame* cur_frame = GetCurrentShadowFrame();
size_t num_regs = cur_frame->NumberOfVRegs();
- mirror::AbstractMethod* method = cur_frame->GetMethod();
+ mirror::ArtMethod* method = cur_frame->GetMethod();
uint32_t dex_pc = cur_frame->GetDexPC();
ShadowFrame* new_frame = ShadowFrame::Create(num_regs, NULL, method, dex_pc);
@@ -88,7 +88,7 @@
extern "C" ShadowFrame* art_portable_push_shadow_frame_from_code(Thread* thread,
ShadowFrame* new_shadow_frame,
- mirror::AbstractMethod* method,
+ mirror::ArtMethod* method,
uint32_t num_vregs) {
ShadowFrame* old_frame = thread->PushShadowFrame(new_shadow_frame);
new_shadow_frame->SetMethod(method);
diff --git a/runtime/entrypoints/portable/portable_throw_entrypoints.cc b/runtime/entrypoints/portable/portable_throw_entrypoints.cc
index 64a67eb..2a0df9b 100644
--- a/runtime/entrypoints/portable/portable_throw_entrypoints.cc
+++ b/runtime/entrypoints/portable/portable_throw_entrypoints.cc
@@ -16,7 +16,7 @@
#include "dex_instruction.h"
#include "entrypoints/entrypoint_utils.h"
-#include "mirror/abstract_method-inl.h"
+#include "mirror/art_method-inl.h"
#include "mirror/object-inl.h"
namespace art {
@@ -68,7 +68,7 @@
return exception;
}
-extern "C" int32_t art_portable_find_catch_block_from_code(mirror::AbstractMethod* current_method,
+extern "C" int32_t art_portable_find_catch_block_from_code(mirror::ArtMethod* current_method,
uint32_t ti_offset)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
Thread* self = Thread::Current(); // TODO: make an argument.
diff --git a/runtime/entrypoints/portable/portable_trampoline_entrypoints.cc b/runtime/entrypoints/portable/portable_trampoline_entrypoints.cc
index c02ace8..e1ce11a 100644
--- a/runtime/entrypoints/portable/portable_trampoline_entrypoints.cc
+++ b/runtime/entrypoints/portable/portable_trampoline_entrypoints.cc
@@ -20,7 +20,7 @@
#include "dex_instruction-inl.h"
#include "entrypoints/entrypoint_utils.h"
#include "interpreter/interpreter.h"
-#include "mirror/abstract_method-inl.h"
+#include "mirror/art_method-inl.h"
#include "mirror/object-inl.h"
#include "object_utils.h"
#include "scoped_thread_state_change.h"
@@ -52,7 +52,7 @@
#define PORTABLE_STACK_ARG_SKIP 0
#endif
- PortableArgumentVisitor(MethodHelper& caller_mh, mirror::AbstractMethod** sp)
+ PortableArgumentVisitor(MethodHelper& caller_mh, mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) :
caller_mh_(caller_mh),
args_in_regs_(ComputeArgsInRegs(caller_mh)),
@@ -140,7 +140,7 @@
// Visits arguments on the stack placing them into the shadow frame.
class BuildPortableShadowFrameVisitor : public PortableArgumentVisitor {
public:
- BuildPortableShadowFrameVisitor(MethodHelper& caller_mh, mirror::AbstractMethod** sp,
+ BuildPortableShadowFrameVisitor(MethodHelper& caller_mh, mirror::ArtMethod** sp,
ShadowFrame& sf, size_t first_arg_reg) :
PortableArgumentVisitor(caller_mh, sp), sf_(sf), cur_reg_(first_arg_reg) { }
virtual void Visit() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
@@ -176,8 +176,8 @@
DISALLOW_COPY_AND_ASSIGN(BuildPortableShadowFrameVisitor);
};
-extern "C" uint64_t artPortableToInterpreterBridge(mirror::AbstractMethod* method, Thread* self,
- mirror::AbstractMethod** sp)
+extern "C" uint64_t artPortableToInterpreterBridge(mirror::ArtMethod* method, Thread* self,
+ mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
// Ensure we don't get thread suspension until the object arguments are safely in the shadow
// frame.
@@ -225,7 +225,7 @@
// to jobjects.
class BuildPortableArgumentVisitor : public PortableArgumentVisitor {
public:
- BuildPortableArgumentVisitor(MethodHelper& caller_mh, mirror::AbstractMethod** sp,
+ BuildPortableArgumentVisitor(MethodHelper& caller_mh, mirror::ArtMethod** sp,
ScopedObjectAccessUnchecked& soa, std::vector<jvalue>& args) :
PortableArgumentVisitor(caller_mh, sp), soa_(soa), args_(args) {}
@@ -269,9 +269,9 @@
// which is responsible for recording callee save registers. We explicitly place into jobjects the
// incoming reference arguments (so they survive GC). We invoke the invocation handler, which is a
// field within the proxy object, which will box the primitive arguments and deal with error cases.
-extern "C" uint64_t artPortableProxyInvokeHandler(mirror::AbstractMethod* proxy_method,
+extern "C" uint64_t artPortableProxyInvokeHandler(mirror::ArtMethod* proxy_method,
mirror::Object* receiver,
- Thread* self, mirror::AbstractMethod** sp)
+ Thread* self, mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
// Ensure we don't get thread suspension until the object arguments are safely in jobjects.
const char* old_cause =
@@ -292,7 +292,7 @@
args.erase(args.begin());
// Convert proxy method into expected interface method.
- mirror::AbstractMethod* interface_method = proxy_method->FindOverriddenMethod();
+ mirror::ArtMethod* interface_method = proxy_method->FindOverriddenMethod();
DCHECK(interface_method != NULL);
DCHECK(!interface_method->IsProxyMethod()) << PrettyMethod(interface_method);
jobject interface_method_jobj = soa.AddLocalReference<jobject>(interface_method);
@@ -306,13 +306,13 @@
}
// Lazily resolve a method for portable. Called by stub code.
-extern "C" const void* artPortableResolutionTrampoline(mirror::AbstractMethod* called,
+extern "C" const void* artPortableResolutionTrampoline(mirror::ArtMethod* called,
mirror::Object* receiver,
Thread* thread,
- mirror::AbstractMethod** called_addr)
+ mirror::ArtMethod** called_addr)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
uint32_t dex_pc;
- mirror::AbstractMethod* caller = thread->GetCurrentMethod(&dex_pc);
+ mirror::ArtMethod* caller = thread->GetCurrentMethod(&dex_pc);
ClassLinker* linker = Runtime::Current()->GetClassLinker();
InvokeType invoke_type;
diff --git a/runtime/entrypoints/quick/callee_save_frame.h b/runtime/entrypoints/quick/callee_save_frame.h
index 0cb578d..8f70049 100644
--- a/runtime/entrypoints/quick/callee_save_frame.h
+++ b/runtime/entrypoints/quick/callee_save_frame.h
@@ -22,11 +22,11 @@
namespace art {
namespace mirror {
-class AbstractMethod;
+class ArtMethod;
} // namespace mirror
// Place a special frame at the TOS that will save the callee saves for the given type.
-static void FinishCalleeSaveFrameSetup(Thread* self, mirror::AbstractMethod** sp,
+static void FinishCalleeSaveFrameSetup(Thread* self, mirror::ArtMethod** sp,
Runtime::CalleeSaveType type)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
// Be aware the store below may well stomp on an incoming argument.
diff --git a/runtime/entrypoints/quick/quick_alloc_entrypoints.cc b/runtime/entrypoints/quick/quick_alloc_entrypoints.cc
index 9ed802a..420e63a 100644
--- a/runtime/entrypoints/quick/quick_alloc_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_alloc_entrypoints.cc
@@ -16,61 +16,61 @@
#include "callee_save_frame.h"
#include "entrypoints/entrypoint_utils.h"
+#include "mirror/art_method-inl.h"
#include "mirror/class-inl.h"
-#include "mirror/abstract_method-inl.h"
#include "mirror/object_array-inl.h"
#include "mirror/object-inl.h"
namespace art {
-extern "C" mirror::Object* artAllocObjectFromCode(uint32_t type_idx, mirror::AbstractMethod* method,
- Thread* self, mirror::AbstractMethod** sp)
+extern "C" mirror::Object* artAllocObjectFromCode(uint32_t type_idx, mirror::ArtMethod* method,
+ Thread* self, mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
FinishCalleeSaveFrameSetup(self, sp, Runtime::kRefsOnly);
return AllocObjectFromCode(type_idx, method, self, false);
}
extern "C" mirror::Object* artAllocObjectFromCodeWithAccessCheck(uint32_t type_idx,
- mirror::AbstractMethod* method,
+ mirror::ArtMethod* method,
Thread* self,
- mirror::AbstractMethod** sp)
+ mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
FinishCalleeSaveFrameSetup(self, sp, Runtime::kRefsOnly);
return AllocObjectFromCode(type_idx, method, self, true);
}
-extern "C" mirror::Array* artAllocArrayFromCode(uint32_t type_idx, mirror::AbstractMethod* method,
+extern "C" mirror::Array* artAllocArrayFromCode(uint32_t type_idx, mirror::ArtMethod* method,
int32_t component_count, Thread* self,
- mirror::AbstractMethod** sp)
+ mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
FinishCalleeSaveFrameSetup(self, sp, Runtime::kRefsOnly);
return AllocArrayFromCode(type_idx, method, component_count, self, false);
}
extern "C" mirror::Array* artAllocArrayFromCodeWithAccessCheck(uint32_t type_idx,
- mirror::AbstractMethod* method,
+ mirror::ArtMethod* method,
int32_t component_count,
Thread* self,
- mirror::AbstractMethod** sp)
+ mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
FinishCalleeSaveFrameSetup(self, sp, Runtime::kRefsOnly);
return AllocArrayFromCode(type_idx, method, component_count, self, true);
}
extern "C" mirror::Array* artCheckAndAllocArrayFromCode(uint32_t type_idx,
- mirror::AbstractMethod* method,
+ mirror::ArtMethod* method,
int32_t component_count, Thread* self,
- mirror::AbstractMethod** sp)
+ mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
FinishCalleeSaveFrameSetup(self, sp, Runtime::kRefsOnly);
return CheckAndAllocArrayFromCode(type_idx, method, component_count, self, false);
}
extern "C" mirror::Array* artCheckAndAllocArrayFromCodeWithAccessCheck(uint32_t type_idx,
- mirror::AbstractMethod* method,
+ mirror::ArtMethod* method,
int32_t component_count,
Thread* self,
- mirror::AbstractMethod** sp)
+ mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
FinishCalleeSaveFrameSetup(self, sp, Runtime::kRefsOnly);
return CheckAndAllocArrayFromCode(type_idx, method, component_count, self, true);
diff --git a/runtime/entrypoints/quick/quick_cast_entrypoints.cc b/runtime/entrypoints/quick/quick_cast_entrypoints.cc
index b810bb7..9ffa736 100644
--- a/runtime/entrypoints/quick/quick_cast_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_cast_entrypoints.cc
@@ -33,7 +33,7 @@
// Check whether it is safe to cast one class to the other, throw exception and return -1 on failure
extern "C" int artCheckCastFromCode(mirror::Class* src_type, mirror::Class* dest_type,
- Thread* self, mirror::AbstractMethod** sp)
+ Thread* self, mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
DCHECK(src_type->IsClass()) << PrettyClass(src_type);
DCHECK(dest_type->IsClass()) << PrettyClass(dest_type);
@@ -50,7 +50,7 @@
// Returns 0 on success and -1 if an exception is pending.
extern "C" int artCanPutArrayElementFromCode(const mirror::Object* element,
const mirror::Class* array_class,
- Thread* self, mirror::AbstractMethod** sp)
+ Thread* self, mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
DCHECK(array_class != NULL);
// element can't be NULL as we catch this is screened in runtime_support
diff --git a/runtime/entrypoints/quick/quick_deoptimization_entrypoints.cc b/runtime/entrypoints/quick/quick_deoptimization_entrypoints.cc
index 43fc9d2..51c647a 100644
--- a/runtime/entrypoints/quick/quick_deoptimization_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_deoptimization_entrypoints.cc
@@ -17,7 +17,7 @@
#include "callee_save_frame.h"
#include "dex_file-inl.h"
#include "interpreter/interpreter.h"
-#include "mirror/abstract_method-inl.h"
+#include "mirror/art_method-inl.h"
#include "mirror/class-inl.h"
#include "mirror/object_array-inl.h"
#include "mirror/object-inl.h"
@@ -28,7 +28,7 @@
namespace art {
-extern "C" void artDeoptimize(Thread* self, mirror::AbstractMethod** sp)
+extern "C" void artDeoptimize(Thread* self, mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
FinishCalleeSaveFrameSetup(self, sp, Runtime::kSaveAll);
self->SetException(ThrowLocation(), reinterpret_cast<mirror::Throwable*>(-1));
diff --git a/runtime/entrypoints/quick/quick_dexcache_entrypoints.cc b/runtime/entrypoints/quick/quick_dexcache_entrypoints.cc
index 6400161b..003047a 100644
--- a/runtime/entrypoints/quick/quick_dexcache_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_dexcache_entrypoints.cc
@@ -19,16 +19,16 @@
#include "class_linker-inl.h"
#include "dex_file-inl.h"
#include "gc/accounting/card_table-inl.h"
-#include "mirror/abstract_method-inl.h"
+#include "mirror/art_method-inl.h"
#include "mirror/object_array-inl.h"
#include "mirror/object-inl.h"
namespace art {
extern "C" mirror::Class* artInitializeStaticStorageFromCode(uint32_t type_idx,
- const mirror::AbstractMethod* referrer,
+ const mirror::ArtMethod* referrer,
Thread* self,
- mirror::AbstractMethod** sp)
+ mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
// Called to ensure static storage base is initialized for direct static field reads and writes.
// A class may be accessing another class' fields when it doesn't have access, as access has been
@@ -38,8 +38,8 @@
}
extern "C" mirror::Class* artInitializeTypeFromCode(uint32_t type_idx,
- const mirror::AbstractMethod* referrer,
- Thread* self, mirror::AbstractMethod** sp)
+ const mirror::ArtMethod* referrer,
+ Thread* self, mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
// Called when method->dex_cache_resolved_types_[] misses.
FinishCalleeSaveFrameSetup(self, sp, Runtime::kRefsOnly);
@@ -47,9 +47,9 @@
}
extern "C" mirror::Class* artInitializeTypeAndVerifyAccessFromCode(uint32_t type_idx,
- const mirror::AbstractMethod* referrer,
+ const mirror::ArtMethod* referrer,
Thread* self,
- mirror::AbstractMethod** sp)
+ mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
// Called when caller isn't guaranteed to have access to a type and the dex cache may be
// unpopulated.
@@ -57,9 +57,9 @@
return ResolveVerifyAndClinit(type_idx, referrer, self, false, true);
}
-extern "C" mirror::String* artResolveStringFromCode(mirror::AbstractMethod* referrer,
+extern "C" mirror::String* artResolveStringFromCode(mirror::ArtMethod* referrer,
int32_t string_idx,
- Thread* self, mirror::AbstractMethod** sp)
+ Thread* self, mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
FinishCalleeSaveFrameSetup(self, sp, Runtime::kRefsOnly);
return ResolveStringFromCode(referrer, string_idx);
diff --git a/runtime/entrypoints/quick/quick_entrypoints.h b/runtime/entrypoints/quick/quick_entrypoints.h
index e76679b..9d3b8ef 100644
--- a/runtime/entrypoints/quick/quick_entrypoints.h
+++ b/runtime/entrypoints/quick/quick_entrypoints.h
@@ -29,9 +29,9 @@
namespace art {
namespace mirror {
- class AbstractMethod;
- class Class;
- class Object;
+class ArtMethod;
+class Class;
+class Object;
} // namespace mirror
class Thread;
@@ -116,8 +116,8 @@
void* (*pMemcpy)(void*, const void*, size_t);
// Invocation
- void (*pQuickResolutionTrampoline)(mirror::AbstractMethod*);
- void (*pQuickToInterpreterBridge)(mirror::AbstractMethod*);
+ void (*pQuickResolutionTrampoline)(mirror::ArtMethod*);
+ void (*pQuickToInterpreterBridge)(mirror::ArtMethod*);
void (*pInvokeDirectTrampolineWithAccessCheck)(uint32_t, void*);
void (*pInvokeInterfaceTrampoline)(uint32_t, void*);
void (*pInvokeInterfaceTrampolineWithAccessCheck)(uint32_t, void*);
diff --git a/runtime/entrypoints/quick/quick_field_entrypoints.cc b/runtime/entrypoints/quick/quick_field_entrypoints.cc
index a4e9dc9..0ec1eb7 100644
--- a/runtime/entrypoints/quick/quick_field_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_field_entrypoints.cc
@@ -17,19 +17,20 @@
#include "callee_save_frame.h"
#include "dex_file-inl.h"
#include "entrypoints/entrypoint_utils.h"
-#include "mirror/abstract_method-inl.h"
+#include "mirror/art_field-inl.h"
+#include "mirror/art_method-inl.h"
#include "mirror/class-inl.h"
-#include "mirror/field-inl.h"
#include <stdint.h>
namespace art {
extern "C" uint32_t artGet32StaticFromCode(uint32_t field_idx,
- const mirror::AbstractMethod* referrer,
- Thread* self, mirror::AbstractMethod** sp)
+ const mirror::ArtMethod* referrer,
+ Thread* self, mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
- mirror::Field* field = FindFieldFast(field_idx, referrer, StaticPrimitiveRead, sizeof(int32_t));
+ mirror::ArtField* field = FindFieldFast(field_idx, referrer, StaticPrimitiveRead,
+ sizeof(int32_t));
if (LIKELY(field != NULL)) {
return field->Get32(field->GetDeclaringClass());
}
@@ -42,10 +43,11 @@
}
extern "C" uint64_t artGet64StaticFromCode(uint32_t field_idx,
- const mirror::AbstractMethod* referrer,
- Thread* self, mirror::AbstractMethod** sp)
+ const mirror::ArtMethod* referrer,
+ Thread* self, mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
- mirror::Field* field = FindFieldFast(field_idx, referrer, StaticPrimitiveRead, sizeof(int64_t));
+ mirror::ArtField* field = FindFieldFast(field_idx, referrer, StaticPrimitiveRead,
+ sizeof(int64_t));
if (LIKELY(field != NULL)) {
return field->Get64(field->GetDeclaringClass());
}
@@ -58,16 +60,17 @@
}
extern "C" mirror::Object* artGetObjStaticFromCode(uint32_t field_idx,
- const mirror::AbstractMethod* referrer,
- Thread* self, mirror::AbstractMethod** sp)
+ const mirror::ArtMethod* referrer,
+ Thread* self, mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
- mirror::Field* field = FindFieldFast(field_idx, referrer, StaticObjectRead,
+ mirror::ArtField* field = FindFieldFast(field_idx, referrer, StaticObjectRead,
sizeof(mirror::Object*));
if (LIKELY(field != NULL)) {
return field->GetObj(field->GetDeclaringClass());
}
FinishCalleeSaveFrameSetup(self, sp, Runtime::kRefsOnly);
- field = FindFieldFromCode(field_idx, referrer, self, StaticObjectRead, sizeof(mirror::Object*), true);
+ field = FindFieldFromCode(field_idx, referrer, self, StaticObjectRead, sizeof(mirror::Object*),
+ true);
if (LIKELY(field != NULL)) {
return field->GetObj(field->GetDeclaringClass());
}
@@ -75,15 +78,17 @@
}
extern "C" uint32_t artGet32InstanceFromCode(uint32_t field_idx, mirror::Object* obj,
- const mirror::AbstractMethod* referrer, Thread* self,
- mirror::AbstractMethod** sp)
+ const mirror::ArtMethod* referrer, Thread* self,
+ mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
- mirror::Field* field = FindFieldFast(field_idx, referrer, InstancePrimitiveRead, sizeof(int32_t));
+ mirror::ArtField* field = FindFieldFast(field_idx, referrer, InstancePrimitiveRead,
+ sizeof(int32_t));
if (LIKELY(field != NULL && obj != NULL)) {
return field->Get32(obj);
}
FinishCalleeSaveFrameSetup(self, sp, Runtime::kRefsOnly);
- field = FindFieldFromCode(field_idx, referrer, self, InstancePrimitiveRead, sizeof(int32_t), true);
+ field = FindFieldFromCode(field_idx, referrer, self, InstancePrimitiveRead, sizeof(int32_t),
+ true);
if (LIKELY(field != NULL)) {
if (UNLIKELY(obj == NULL)) {
ThrowLocation throw_location = self->GetCurrentLocationForThrow();
@@ -96,15 +101,17 @@
}
extern "C" uint64_t artGet64InstanceFromCode(uint32_t field_idx, mirror::Object* obj,
- const mirror::AbstractMethod* referrer, Thread* self,
- mirror::AbstractMethod** sp)
+ const mirror::ArtMethod* referrer, Thread* self,
+ mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
- mirror::Field* field = FindFieldFast(field_idx, referrer, InstancePrimitiveRead, sizeof(int64_t));
+ mirror::ArtField* field = FindFieldFast(field_idx, referrer, InstancePrimitiveRead,
+ sizeof(int64_t));
if (LIKELY(field != NULL && obj != NULL)) {
return field->Get64(obj);
}
FinishCalleeSaveFrameSetup(self, sp, Runtime::kRefsOnly);
- field = FindFieldFromCode(field_idx, referrer, self, InstancePrimitiveRead, sizeof(int64_t), true);
+ field = FindFieldFromCode(field_idx, referrer, self, InstancePrimitiveRead, sizeof(int64_t),
+ true);
if (LIKELY(field != NULL)) {
if (UNLIKELY(obj == NULL)) {
ThrowLocation throw_location = self->GetCurrentLocationForThrow();
@@ -117,16 +124,18 @@
}
extern "C" mirror::Object* artGetObjInstanceFromCode(uint32_t field_idx, mirror::Object* obj,
- const mirror::AbstractMethod* referrer,
+ const mirror::ArtMethod* referrer,
Thread* self,
- mirror::AbstractMethod** sp)
+ mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
- mirror::Field* field = FindFieldFast(field_idx, referrer, InstanceObjectRead, sizeof(mirror::Object*));
+ mirror::ArtField* field = FindFieldFast(field_idx, referrer, InstanceObjectRead,
+ sizeof(mirror::Object*));
if (LIKELY(field != NULL && obj != NULL)) {
return field->GetObj(obj);
}
FinishCalleeSaveFrameSetup(self, sp, Runtime::kRefsOnly);
- field = FindFieldFromCode(field_idx, referrer, self, InstanceObjectRead, sizeof(mirror::Object*), true);
+ field = FindFieldFromCode(field_idx, referrer, self, InstanceObjectRead, sizeof(mirror::Object*),
+ true);
if (LIKELY(field != NULL)) {
if (UNLIKELY(obj == NULL)) {
ThrowLocation throw_location = self->GetCurrentLocationForThrow();
@@ -139,10 +148,11 @@
}
extern "C" int artSet32StaticFromCode(uint32_t field_idx, uint32_t new_value,
- const mirror::AbstractMethod* referrer, Thread* self,
- mirror::AbstractMethod** sp)
+ const mirror::ArtMethod* referrer, Thread* self,
+ mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
- mirror::Field* field = FindFieldFast(field_idx, referrer, StaticPrimitiveWrite, sizeof(int32_t));
+ mirror::ArtField* field = FindFieldFast(field_idx, referrer, StaticPrimitiveWrite,
+ sizeof(int32_t));
if (LIKELY(field != NULL)) {
field->Set32(field->GetDeclaringClass(), new_value);
return 0; // success
@@ -156,10 +166,11 @@
return -1; // failure
}
-extern "C" int artSet64StaticFromCode(uint32_t field_idx, const mirror::AbstractMethod* referrer,
- uint64_t new_value, Thread* self, mirror::AbstractMethod** sp)
+extern "C" int artSet64StaticFromCode(uint32_t field_idx, const mirror::ArtMethod* referrer,
+ uint64_t new_value, Thread* self, mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
- mirror::Field* field = FindFieldFast(field_idx, referrer, StaticPrimitiveWrite, sizeof(int64_t));
+ mirror::ArtField* field = FindFieldFast(field_idx, referrer, StaticPrimitiveWrite,
+ sizeof(int64_t));
if (LIKELY(field != NULL)) {
field->Set64(field->GetDeclaringClass(), new_value);
return 0; // success
@@ -174,11 +185,11 @@
}
extern "C" int artSetObjStaticFromCode(uint32_t field_idx, mirror::Object* new_value,
- const mirror::AbstractMethod* referrer, Thread* self,
- mirror::AbstractMethod** sp)
+ const mirror::ArtMethod* referrer, Thread* self,
+ mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
- mirror::Field* field = FindFieldFast(field_idx, referrer, StaticObjectWrite,
- sizeof(mirror::Object*));
+ mirror::ArtField* field = FindFieldFast(field_idx, referrer, StaticObjectWrite,
+ sizeof(mirror::Object*));
if (LIKELY(field != NULL)) {
if (LIKELY(!FieldHelper(field).IsPrimitiveType())) {
field->SetObj(field->GetDeclaringClass(), new_value);
@@ -195,16 +206,18 @@
}
extern "C" int artSet32InstanceFromCode(uint32_t field_idx, mirror::Object* obj, uint32_t new_value,
- const mirror::AbstractMethod* referrer, Thread* self,
- mirror::AbstractMethod** sp)
+ const mirror::ArtMethod* referrer, Thread* self,
+ mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
- mirror::Field* field = FindFieldFast(field_idx, referrer, InstancePrimitiveWrite, sizeof(int32_t));
+ mirror::ArtField* field = FindFieldFast(field_idx, referrer, InstancePrimitiveWrite,
+ sizeof(int32_t));
if (LIKELY(field != NULL && obj != NULL)) {
field->Set32(obj, new_value);
return 0; // success
}
FinishCalleeSaveFrameSetup(self, sp, Runtime::kRefsOnly);
- field = FindFieldFromCode(field_idx, referrer, self, InstancePrimitiveWrite, sizeof(int32_t), true);
+ field = FindFieldFromCode(field_idx, referrer, self, InstancePrimitiveWrite, sizeof(int32_t),
+ true);
if (LIKELY(field != NULL)) {
if (UNLIKELY(obj == NULL)) {
ThrowLocation throw_location = self->GetCurrentLocationForThrow();
@@ -218,20 +231,21 @@
}
extern "C" int artSet64InstanceFromCode(uint32_t field_idx, mirror::Object* obj, uint64_t new_value,
- Thread* self, mirror::AbstractMethod** sp)
+ Thread* self, mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
- mirror::AbstractMethod* callee_save = Runtime::Current()->GetCalleeSaveMethod(Runtime::kRefsOnly);
- mirror::AbstractMethod* referrer =
- sp[callee_save->GetFrameSizeInBytes() / sizeof(mirror::AbstractMethod*)];
- mirror::Field* field = FindFieldFast(field_idx, referrer, InstancePrimitiveWrite,
- sizeof(int64_t));
+ mirror::ArtMethod* callee_save = Runtime::Current()->GetCalleeSaveMethod(Runtime::kRefsOnly);
+ mirror::ArtMethod* referrer =
+ sp[callee_save->GetFrameSizeInBytes() / sizeof(mirror::ArtMethod*)];
+ mirror::ArtField* field = FindFieldFast(field_idx, referrer, InstancePrimitiveWrite,
+ sizeof(int64_t));
if (LIKELY(field != NULL && obj != NULL)) {
field->Set64(obj, new_value);
return 0; // success
}
*sp = callee_save;
self->SetTopOfStack(sp, 0);
- field = FindFieldFromCode(field_idx, referrer, self, InstancePrimitiveWrite, sizeof(int64_t), true);
+ field = FindFieldFromCode(field_idx, referrer, self, InstancePrimitiveWrite, sizeof(int64_t),
+ true);
if (LIKELY(field != NULL)) {
if (UNLIKELY(obj == NULL)) {
ThrowLocation throw_location = self->GetCurrentLocationForThrow();
@@ -246,11 +260,11 @@
extern "C" int artSetObjInstanceFromCode(uint32_t field_idx, mirror::Object* obj,
mirror::Object* new_value,
- const mirror::AbstractMethod* referrer, Thread* self,
- mirror::AbstractMethod** sp)
+ const mirror::ArtMethod* referrer, Thread* self,
+ mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
- mirror::Field* field = FindFieldFast(field_idx, referrer, InstanceObjectWrite,
- sizeof(mirror::Object*));
+ mirror::ArtField* field = FindFieldFast(field_idx, referrer, InstanceObjectWrite,
+ sizeof(mirror::Object*));
if (LIKELY(field != NULL && obj != NULL)) {
field->SetObj(obj, new_value);
return 0; // success
diff --git a/runtime/entrypoints/quick/quick_fillarray_entrypoints.cc b/runtime/entrypoints/quick/quick_fillarray_entrypoints.cc
index b81ad12..ca0c92e 100644
--- a/runtime/entrypoints/quick/quick_fillarray_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_fillarray_entrypoints.cc
@@ -39,7 +39,7 @@
*/
extern "C" int artHandleFillArrayDataFromCode(mirror::Array* array,
const Instruction::ArrayDataPayload* payload,
- Thread* self, mirror::AbstractMethod** sp)
+ Thread* self, mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
FinishCalleeSaveFrameSetup(self, sp, Runtime::kRefsOnly);
DCHECK_EQ(payload->ident, static_cast<uint16_t>(Instruction::kArrayDataSignature));
diff --git a/runtime/entrypoints/quick/quick_instrumentation_entrypoints.cc b/runtime/entrypoints/quick/quick_instrumentation_entrypoints.cc
index 0e61942..633f580 100644
--- a/runtime/entrypoints/quick/quick_instrumentation_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_instrumentation_entrypoints.cc
@@ -16,17 +16,17 @@
#include "callee_save_frame.h"
#include "instrumentation.h"
-#include "mirror/abstract_method-inl.h"
+#include "mirror/art_method-inl.h"
#include "mirror/object-inl.h"
#include "runtime.h"
#include "thread-inl.h"
namespace art {
-extern "C" const void* artInstrumentationMethodEntryFromCode(mirror::AbstractMethod* method,
+extern "C" const void* artInstrumentationMethodEntryFromCode(mirror::ArtMethod* method,
mirror::Object* this_object,
Thread* self,
- mirror::AbstractMethod** sp,
+ mirror::ArtMethod** sp,
uintptr_t lr)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
FinishCalleeSaveFrameSetup(self, sp, Runtime::kRefsAndArgs);
@@ -39,7 +39,7 @@
return result;
}
-extern "C" uint64_t artInstrumentationMethodExitFromCode(Thread* self, mirror::AbstractMethod** sp,
+extern "C" uint64_t artInstrumentationMethodExitFromCode(Thread* self, mirror::ArtMethod** sp,
uint64_t gpr_result, uint64_t fpr_result)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
// TODO: use FinishCalleeSaveFrameSetup(self, sp, Runtime::kRefsOnly) not the hand inlined below.
@@ -47,7 +47,7 @@
// stack.
// Be aware the store below may well stomp on an incoming argument.
Locks::mutator_lock_->AssertSharedHeld(self);
- mirror::AbstractMethod* callee_save = Runtime::Current()->GetCalleeSaveMethod(Runtime::kRefsOnly);
+ mirror::ArtMethod* callee_save = Runtime::Current()->GetCalleeSaveMethod(Runtime::kRefsOnly);
*sp = callee_save;
uintptr_t* return_pc = reinterpret_cast<uintptr_t*>(reinterpret_cast<byte*>(sp) +
callee_save->GetReturnPcOffsetInBytes());
diff --git a/runtime/entrypoints/quick/quick_invoke_entrypoints.cc b/runtime/entrypoints/quick/quick_invoke_entrypoints.cc
index 53b3628..1d8022f 100644
--- a/runtime/entrypoints/quick/quick_invoke_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_invoke_entrypoints.cc
@@ -17,21 +17,21 @@
#include "callee_save_frame.h"
#include "dex_instruction-inl.h"
#include "entrypoints/entrypoint_utils.h"
+#include "mirror/art_method-inl.h"
#include "mirror/class-inl.h"
#include "mirror/dex_cache-inl.h"
-#include "mirror/abstract_method-inl.h"
#include "mirror/object-inl.h"
#include "mirror/object_array-inl.h"
namespace art {
// Determine target of interface dispatch. This object is known non-null.
-extern "C" uint64_t artInvokeInterfaceTrampoline(mirror::AbstractMethod* interface_method,
+extern "C" uint64_t artInvokeInterfaceTrampoline(mirror::ArtMethod* interface_method,
mirror::Object* this_object,
- mirror::AbstractMethod* caller_method,
- Thread* self, mirror::AbstractMethod** sp)
+ mirror::ArtMethod* caller_method,
+ Thread* self, mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
- mirror::AbstractMethod* method;
+ mirror::ArtMethod* method;
if (LIKELY(interface_method->GetDexMethodIndex() != DexFile::kDexNoIndex16)) {
method = this_object->GetClass()->FindVirtualMethodForInterface(interface_method);
if (UNLIKELY(method == NULL)) {
@@ -144,11 +144,11 @@
static uint64_t artInvokeCommon(uint32_t method_idx, mirror::Object* this_object,
- mirror::AbstractMethod* caller_method,
- Thread* self, mirror::AbstractMethod** sp, bool access_check,
+ mirror::ArtMethod* caller_method,
+ Thread* self, mirror::ArtMethod** sp, bool access_check,
InvokeType type)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
- mirror::AbstractMethod* method = FindMethodFast(method_idx, this_object, caller_method,
+ mirror::ArtMethod* method = FindMethodFast(method_idx, this_object, caller_method,
access_check, type);
if (UNLIKELY(method == NULL)) {
FinishCalleeSaveFrameSetup(self, sp, Runtime::kRefsAndArgs);
@@ -179,9 +179,9 @@
// See comments in runtime_support_asm.S
extern "C" uint64_t artInvokeInterfaceTrampolineWithAccessCheck(uint32_t method_idx,
mirror::Object* this_object,
- mirror::AbstractMethod* caller_method,
+ mirror::ArtMethod* caller_method,
Thread* self,
- mirror::AbstractMethod** sp)
+ mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
return artInvokeCommon(method_idx, this_object, caller_method, self, sp, true, kInterface);
}
@@ -189,36 +189,36 @@
extern "C" uint64_t artInvokeDirectTrampolineWithAccessCheck(uint32_t method_idx,
mirror::Object* this_object,
- mirror::AbstractMethod* caller_method,
+ mirror::ArtMethod* caller_method,
Thread* self,
- mirror::AbstractMethod** sp)
+ mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
return artInvokeCommon(method_idx, this_object, caller_method, self, sp, true, kDirect);
}
extern "C" uint64_t artInvokeStaticTrampolineWithAccessCheck(uint32_t method_idx,
mirror::Object* this_object,
- mirror::AbstractMethod* caller_method,
+ mirror::ArtMethod* caller_method,
Thread* self,
- mirror::AbstractMethod** sp)
+ mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
return artInvokeCommon(method_idx, this_object, caller_method, self, sp, true, kStatic);
}
extern "C" uint64_t artInvokeSuperTrampolineWithAccessCheck(uint32_t method_idx,
mirror::Object* this_object,
- mirror::AbstractMethod* caller_method,
+ mirror::ArtMethod* caller_method,
Thread* self,
- mirror::AbstractMethod** sp)
+ mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
return artInvokeCommon(method_idx, this_object, caller_method, self, sp, true, kSuper);
}
extern "C" uint64_t artInvokeVirtualTrampolineWithAccessCheck(uint32_t method_idx,
mirror::Object* this_object,
- mirror::AbstractMethod* caller_method,
+ mirror::ArtMethod* caller_method,
Thread* self,
- mirror::AbstractMethod** sp)
+ mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
return artInvokeCommon(method_idx, this_object, caller_method, self, sp, true, kVirtual);
}
diff --git a/runtime/entrypoints/quick/quick_jni_entrypoints.cc b/runtime/entrypoints/quick/quick_jni_entrypoints.cc
index 9907c04..27ae59b 100644
--- a/runtime/entrypoints/quick/quick_jni_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_jni_entrypoints.cc
@@ -16,8 +16,8 @@
#include "dex_file-inl.h"
#include "entrypoints/entrypoint_utils.h"
+#include "mirror/art_method-inl.h"
#include "mirror/class-inl.h"
-#include "mirror/abstract_method-inl.h"
#include "mirror/object.h"
#include "mirror/object-inl.h"
#include "mirror/object_array-inl.h"
diff --git a/runtime/entrypoints/quick/quick_lock_entrypoints.cc b/runtime/entrypoints/quick/quick_lock_entrypoints.cc
index 79bb7a6..36ca604 100644
--- a/runtime/entrypoints/quick/quick_lock_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_lock_entrypoints.cc
@@ -20,7 +20,7 @@
namespace art {
extern "C" int artUnlockObjectFromCode(mirror::Object* obj, Thread* self,
- mirror::AbstractMethod** sp)
+ mirror::ArtMethod** sp)
UNLOCK_FUNCTION(monitor_lock_) {
FinishCalleeSaveFrameSetup(self, sp, Runtime::kRefsOnly);
DCHECK(obj != NULL); // Assumed to have been checked before entry
@@ -29,7 +29,7 @@
}
extern "C" void artLockObjectFromCode(mirror::Object* obj, Thread* thread,
- mirror::AbstractMethod** sp)
+ mirror::ArtMethod** sp)
EXCLUSIVE_LOCK_FUNCTION(monitor_lock_) {
FinishCalleeSaveFrameSetup(thread, sp, Runtime::kRefsOnly);
DCHECK(obj != NULL); // Assumed to have been checked before entry
diff --git a/runtime/entrypoints/quick/quick_thread_entrypoints.cc b/runtime/entrypoints/quick/quick_thread_entrypoints.cc
index b4d6c0b..53e725e 100644
--- a/runtime/entrypoints/quick/quick_thread_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_thread_entrypoints.cc
@@ -28,7 +28,7 @@
CheckSuspend(thread);
}
-extern "C" void artTestSuspendFromCode(Thread* thread, mirror::AbstractMethod** sp)
+extern "C" void artTestSuspendFromCode(Thread* thread, mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
// Called when suspend count check value is 0 and thread->suspend_count_ != 0
FinishCalleeSaveFrameSetup(thread, sp, Runtime::kRefsOnly);
diff --git a/runtime/entrypoints/quick/quick_throw_entrypoints.cc b/runtime/entrypoints/quick/quick_throw_entrypoints.cc
index 3bfa2f2..f67b2fc 100644
--- a/runtime/entrypoints/quick/quick_throw_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_throw_entrypoints.cc
@@ -24,7 +24,7 @@
namespace art {
// Deliver an exception that's pending on thread helping set up a callee save frame on the way.
-extern "C" void artDeliverPendingExceptionFromCode(Thread* thread, mirror::AbstractMethod** sp)
+extern "C" void artDeliverPendingExceptionFromCode(Thread* thread, mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
FinishCalleeSaveFrameSetup(thread, sp, Runtime::kSaveAll);
thread->QuickDeliverException();
@@ -32,7 +32,7 @@
// Called by generated call to throw an exception.
extern "C" void artDeliverExceptionFromCode(mirror::Throwable* exception, Thread* self,
- mirror::AbstractMethod** sp)
+ mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
/*
* exception may be NULL, in which case this routine should
@@ -54,7 +54,7 @@
// Called by generated call to throw a NPE exception.
extern "C" void artThrowNullPointerExceptionFromCode(Thread* self,
- mirror::AbstractMethod** sp)
+ mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
FinishCalleeSaveFrameSetup(self, sp, Runtime::kSaveAll);
ThrowLocation throw_location = self->GetCurrentLocationForThrow();
@@ -64,7 +64,7 @@
// Called by generated call to throw an arithmetic divide by zero exception.
extern "C" void artThrowDivZeroFromCode(Thread* self,
- mirror::AbstractMethod** sp)
+ mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
FinishCalleeSaveFrameSetup(self, sp, Runtime::kSaveAll);
ThrowArithmeticExceptionDivideByZero();
@@ -73,14 +73,14 @@
// Called by generated call to throw an array index out of bounds exception.
extern "C" void artThrowArrayBoundsFromCode(int index, int length, Thread* self,
- mirror::AbstractMethod** sp)
+ mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
FinishCalleeSaveFrameSetup(self, sp, Runtime::kSaveAll);
ThrowArrayIndexOutOfBoundsException(index, length);
self->QuickDeliverException();
}
-extern "C" void artThrowStackOverflowFromCode(Thread* self, mirror::AbstractMethod** sp)
+extern "C" void artThrowStackOverflowFromCode(Thread* self, mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
FinishCalleeSaveFrameSetup(self, sp, Runtime::kSaveAll);
ThrowStackOverflowError(self);
@@ -88,7 +88,7 @@
}
extern "C" void artThrowNoSuchMethodFromCode(int32_t method_idx, Thread* self,
- mirror::AbstractMethod** sp)
+ mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
FinishCalleeSaveFrameSetup(self, sp, Runtime::kSaveAll);
ThrowNoSuchMethodError(method_idx);
diff --git a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
index 9bf02e8..392bcc5 100644
--- a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
@@ -19,7 +19,7 @@
#include "dex_instruction-inl.h"
#include "interpreter/interpreter.h"
#include "invoke_arg_array_builder.h"
-#include "mirror/abstract_method-inl.h"
+#include "mirror/art_method-inl.h"
#include "mirror/class-inl.h"
#include "mirror/object-inl.h"
#include "mirror/object_array-inl.h"
@@ -100,18 +100,18 @@
#define QUICK_STACK_ARG_SKIP 0
#endif
- static mirror::AbstractMethod* GetCallingMethod(mirror::AbstractMethod** sp) {
+ static mirror::ArtMethod* GetCallingMethod(mirror::ArtMethod** sp) {
byte* previous_sp = reinterpret_cast<byte*>(sp) +
QUICK_CALLEE_SAVE_FRAME__REF_AND_ARGS__FRAME_SIZE;
- return *reinterpret_cast<mirror::AbstractMethod**>(previous_sp);
+ return *reinterpret_cast<mirror::ArtMethod**>(previous_sp);
}
- static uintptr_t GetCallingPc(mirror::AbstractMethod** sp) {
+ static uintptr_t GetCallingPc(mirror::ArtMethod** sp) {
byte* lr = reinterpret_cast<byte*>(sp) + QUICK_CALLEE_SAVE_FRAME__REF_AND_ARGS__LR_OFFSET;
return *reinterpret_cast<uintptr_t*>(lr);
}
- QuickArgumentVisitor(mirror::AbstractMethod** sp, bool is_static,
+ QuickArgumentVisitor(mirror::ArtMethod** sp, bool is_static,
const char* shorty, uint32_t shorty_len)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) :
is_static_(is_static), shorty_(shorty), shorty_len_(shorty_len),
@@ -220,7 +220,7 @@
// Visits arguments on the stack placing them into the shadow frame.
class BuildShadowFrameVisitor : public QuickArgumentVisitor {
public:
- BuildShadowFrameVisitor(mirror::AbstractMethod** sp, bool is_static, const char* shorty,
+ BuildShadowFrameVisitor(mirror::ArtMethod** sp, bool is_static, const char* shorty,
uint32_t shorty_len, ShadowFrame& sf, size_t first_arg_reg) :
QuickArgumentVisitor(sp, is_static, shorty, shorty_len), sf_(sf), cur_reg_(first_arg_reg) {}
@@ -261,8 +261,8 @@
DISALLOW_COPY_AND_ASSIGN(BuildShadowFrameVisitor);
};
-extern "C" uint64_t artQuickToInterpreterBridge(mirror::AbstractMethod* method, Thread* self,
- mirror::AbstractMethod** sp)
+extern "C" uint64_t artQuickToInterpreterBridge(mirror::ArtMethod* method, Thread* self,
+ mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
// Ensure we don't get thread suspension until the object arguments are safely in the shadow
// frame.
@@ -311,7 +311,7 @@
// to jobjects.
class BuildQuickArgumentVisitor : public QuickArgumentVisitor {
public:
- BuildQuickArgumentVisitor(mirror::AbstractMethod** sp, bool is_static, const char* shorty,
+ BuildQuickArgumentVisitor(mirror::ArtMethod** sp, bool is_static, const char* shorty,
uint32_t shorty_len, ScopedObjectAccessUnchecked* soa,
std::vector<jvalue>* args) :
QuickArgumentVisitor(sp, is_static, shorty, shorty_len), soa_(soa), args_(args) {}
@@ -360,9 +360,9 @@
// which is responsible for recording callee save registers. We explicitly place into jobjects the
// incoming reference arguments (so they survive GC). We invoke the invocation handler, which is a
// field within the proxy object, which will box the primitive arguments and deal with error cases.
-extern "C" uint64_t artQuickProxyInvokeHandler(mirror::AbstractMethod* proxy_method,
+extern "C" uint64_t artQuickProxyInvokeHandler(mirror::ArtMethod* proxy_method,
mirror::Object* receiver,
- Thread* self, mirror::AbstractMethod** sp)
+ Thread* self, mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
// Ensure we don't get thread suspension until the object arguments are safely in jobjects.
const char* old_cause =
@@ -389,7 +389,7 @@
args.erase(args.begin());
// Convert proxy method into expected interface method.
- mirror::AbstractMethod* interface_method = proxy_method->FindOverriddenMethod();
+ mirror::ArtMethod* interface_method = proxy_method->FindOverriddenMethod();
DCHECK(interface_method != NULL);
DCHECK(!interface_method->IsProxyMethod()) << PrettyMethod(interface_method);
jobject interface_method_jobj = soa.AddLocalReference<jobject>(interface_method);
@@ -406,7 +406,7 @@
// so they don't get garbage collected.
class RememberFoGcArgumentVisitor : public QuickArgumentVisitor {
public:
- RememberFoGcArgumentVisitor(mirror::AbstractMethod** sp, bool is_static, const char* shorty,
+ RememberFoGcArgumentVisitor(mirror::ArtMethod** sp, bool is_static, const char* shorty,
uint32_t shorty_len, ScopedObjectAccessUnchecked* soa) :
QuickArgumentVisitor(sp, is_static, shorty, shorty_len), soa_(soa) {}
@@ -423,9 +423,9 @@
};
// Lazily resolve a method for quick. Called by stub code.
-extern "C" const void* artQuickResolutionTrampoline(mirror::AbstractMethod* called,
+extern "C" const void* artQuickResolutionTrampoline(mirror::ArtMethod* called,
mirror::Object* receiver,
- Thread* thread, mirror::AbstractMethod** sp)
+ Thread* thread, mirror::ArtMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
FinishCalleeSaveFrameSetup(thread, sp, Runtime::kRefsAndArgs);
// Start new JNI local reference state
@@ -436,7 +436,7 @@
// Compute details about the called method (avoid GCs)
ClassLinker* linker = Runtime::Current()->GetClassLinker();
- mirror::AbstractMethod* caller = QuickArgumentVisitor::GetCallingMethod(sp);
+ mirror::ArtMethod* caller = QuickArgumentVisitor::GetCallingMethod(sp);
InvokeType invoke_type;
const DexFile* dex_file;
uint32_t dex_method_idx;