Change dex cache to be java object instead of array, add pointer to dex file in dex cache.
Generic clean up to facilitate having GDB macros for Pretty* helper functions.
Improved cleanliness of DexCache since having it as an object array was not the best solution.
Fixed a bug in InOrderWalk caused by ResolveType sometimes allocating classes.
Rename C++ Method to AbstractMethod and add two new classes Constructor, Method which both inherit from AbstractMethod.
Rename done to have the C++ code be closer to the java code.
Change-Id: I4995b4c5e47a3822192b08afa24a639d3b1f4da9
diff --git a/src/oat/runtime/support_invoke.cc b/src/oat/runtime/support_invoke.cc
index 540e46b..87497cc 100644
--- a/src/oat/runtime/support_invoke.cc
+++ b/src/oat/runtime/support_invoke.cc
@@ -19,10 +19,10 @@
namespace art {
-static uint64_t artInvokeCommon(uint32_t method_idx, Object* this_object, Method* caller_method,
- Thread* self, Method** sp, bool access_check, InvokeType type)
+static uint64_t artInvokeCommon(uint32_t method_idx, Object* this_object, AbstractMethod* caller_method,
+ Thread* self, AbstractMethod** sp, bool access_check, InvokeType type)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
- Method* method = FindMethodFast(method_idx, this_object, caller_method, access_check, type);
+ AbstractMethod* method = FindMethodFast(method_idx, this_object, caller_method, access_check, type);
if (UNLIKELY(method == NULL)) {
FinishCalleeSaveFrameSetup(self, sp, Runtime::kRefsAndArgs);
if (UNLIKELY(this_object == NULL && type != kDirect && type != kStatic)) {
@@ -54,16 +54,17 @@
// See comments in runtime_support_asm.S
extern "C" uint64_t artInvokeInterfaceTrampoline(uint32_t method_idx, Object* this_object,
- Method* caller_method, Thread* self,
- Method** sp)
+ AbstractMethod* caller_method, Thread* self,
+ AbstractMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
return artInvokeCommon(method_idx, this_object, caller_method, self, sp, false, kInterface);
}
extern "C" uint64_t artInvokeInterfaceTrampolineWithAccessCheck(uint32_t method_idx,
Object* this_object,
- Method* caller_method, Thread* self,
- Method** sp)
+ AbstractMethod* caller_method,
+ Thread* self,
+ AbstractMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
return artInvokeCommon(method_idx, this_object, caller_method, self, sp, true, kInterface);
}
@@ -71,32 +72,36 @@
extern "C" uint64_t artInvokeDirectTrampolineWithAccessCheck(uint32_t method_idx,
Object* this_object,
- Method* caller_method, Thread* self,
- Method** sp)
+ AbstractMethod* caller_method,
+ Thread* self,
+ AbstractMethod** 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,
Object* this_object,
- Method* caller_method, Thread* self,
- Method** sp)
+ AbstractMethod* caller_method,
+ Thread* self,
+ AbstractMethod** 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,
Object* this_object,
- Method* caller_method, Thread* self,
- Method** sp)
+ AbstractMethod* caller_method,
+ Thread* self,
+ AbstractMethod** 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,
Object* this_object,
- Method* caller_method, Thread* self,
- Method** sp)
+ AbstractMethod* caller_method,
+ Thread* self,
+ AbstractMethod** sp)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
return artInvokeCommon(method_idx, this_object, caller_method, self, sp, true, kVirtual);
}