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/arch/arm/context_arm.cc b/runtime/arch/arm/context_arm.cc
index 6b9538e..102e126 100644
--- a/runtime/arch/arm/context_arm.cc
+++ b/runtime/arch/arm/context_arm.cc
@@ -16,7 +16,7 @@
#include "context_arm.h"
-#include "mirror/abstract_method.h"
+#include "mirror/art_method.h"
#include "mirror/object-inl.h"
#include "stack.h"
#include "thread.h"
@@ -41,7 +41,7 @@
}
void ArmContext::FillCalleeSaves(const StackVisitor& fr) {
- mirror::AbstractMethod* method = fr.GetMethod();
+ mirror::ArtMethod* method = fr.GetMethod();
uint32_t core_spills = method->GetCoreSpillMask();
uint32_t fp_core_spills = method->GetFpSpillMask();
size_t spill_count = __builtin_popcount(core_spills);
diff --git a/runtime/arch/arm/entrypoints_init_arm.cc b/runtime/arch/arm/entrypoints_init_arm.cc
index 810a683..9e6902d 100644
--- a/runtime/arch/arm/entrypoints_init_arm.cc
+++ b/runtime/arch/arm/entrypoints_init_arm.cc
@@ -31,8 +31,8 @@
ShadowFrame* shadow_frame, JValue* result);
// Portable entrypoints.
-extern "C" void art_portable_resolution_trampoline(mirror::AbstractMethod*);
-extern "C" void art_portable_to_interpreter_bridge(mirror::AbstractMethod*);
+extern "C" void art_portable_resolution_trampoline(mirror::ArtMethod*);
+extern "C" void art_portable_to_interpreter_bridge(mirror::ArtMethod*);
// Alloc entrypoints.
extern "C" void* art_quick_alloc_array(uint32_t, void*, int32_t);
@@ -112,8 +112,8 @@
extern "C" int32_t art_quick_string_compareto(void*, void*);
// Invoke entrypoints.
-extern "C" void art_quick_resolution_trampoline(mirror::AbstractMethod*);
-extern "C" void art_quick_to_interpreter_bridge(mirror::AbstractMethod*);
+extern "C" void art_quick_resolution_trampoline(mirror::ArtMethod*);
+extern "C" void art_quick_to_interpreter_bridge(mirror::ArtMethod*);
extern "C" void art_quick_invoke_direct_trampoline_with_access_check(uint32_t, void*);
extern "C" void art_quick_invoke_interface_trampoline(uint32_t, void*);
extern "C" void art_quick_invoke_interface_trampoline_with_access_check(uint32_t, void*);
diff --git a/runtime/arch/mips/context_mips.cc b/runtime/arch/mips/context_mips.cc
index a78e5ee..b957708 100644
--- a/runtime/arch/mips/context_mips.cc
+++ b/runtime/arch/mips/context_mips.cc
@@ -16,7 +16,7 @@
#include "context_mips.h"
-#include "mirror/abstract_method.h"
+#include "mirror/art_method.h"
#include "mirror/object-inl.h"
#include "stack.h"
@@ -40,7 +40,7 @@
}
void MipsContext::FillCalleeSaves(const StackVisitor& fr) {
- mirror::AbstractMethod* method = fr.GetMethod();
+ mirror::ArtMethod* method = fr.GetMethod();
uint32_t core_spills = method->GetCoreSpillMask();
uint32_t fp_core_spills = method->GetFpSpillMask();
size_t spill_count = __builtin_popcount(core_spills);
diff --git a/runtime/arch/mips/entrypoints_init_mips.cc b/runtime/arch/mips/entrypoints_init_mips.cc
index a0d3995..40d7cd9 100644
--- a/runtime/arch/mips/entrypoints_init_mips.cc
+++ b/runtime/arch/mips/entrypoints_init_mips.cc
@@ -30,8 +30,8 @@
ShadowFrame* shadow_frame, JValue* result);
// Portable entrypoints.
-extern "C" void art_portable_resolution_trampoline(mirror::AbstractMethod*);
-extern "C" void art_portable_to_interpreter_bridge(mirror::AbstractMethod*);
+extern "C" void art_portable_resolution_trampoline(mirror::ArtMethod*);
+extern "C" void art_portable_to_interpreter_bridge(mirror::ArtMethod*);
// Alloc entrypoints.
extern "C" void* art_quick_alloc_array(uint32_t, void*, int32_t);
@@ -113,8 +113,8 @@
extern "C" int32_t art_quick_string_compareto(void*, void*);
// Invoke entrypoints.
-extern "C" void art_quick_resolution_trampoline(mirror::AbstractMethod*);
-extern "C" void art_quick_to_interpreter_bridge(mirror::AbstractMethod*);
+extern "C" void art_quick_resolution_trampoline(mirror::ArtMethod*);
+extern "C" void art_quick_to_interpreter_bridge(mirror::ArtMethod*);
extern "C" void art_quick_invoke_direct_trampoline_with_access_check(uint32_t, void*);
extern "C" void art_quick_invoke_interface_trampoline(uint32_t, void*);
extern "C" void art_quick_invoke_interface_trampoline_with_access_check(uint32_t, void*);
diff --git a/runtime/arch/x86/context_x86.cc b/runtime/arch/x86/context_x86.cc
index c728ae9..66a51f7 100644
--- a/runtime/arch/x86/context_x86.cc
+++ b/runtime/arch/x86/context_x86.cc
@@ -16,7 +16,7 @@
#include "context_x86.h"
-#include "mirror/abstract_method.h"
+#include "mirror/art_method.h"
#include "mirror/object-inl.h"
#include "stack.h"
@@ -36,7 +36,7 @@
}
void X86Context::FillCalleeSaves(const StackVisitor& fr) {
- mirror::AbstractMethod* method = fr.GetMethod();
+ mirror::ArtMethod* method = fr.GetMethod();
uint32_t core_spills = method->GetCoreSpillMask();
size_t spill_count = __builtin_popcount(core_spills);
DCHECK_EQ(method->GetFpSpillMask(), 0u);
diff --git a/runtime/arch/x86/entrypoints_init_x86.cc b/runtime/arch/x86/entrypoints_init_x86.cc
index 9b54d55..abc2990 100644
--- a/runtime/arch/x86/entrypoints_init_x86.cc
+++ b/runtime/arch/x86/entrypoints_init_x86.cc
@@ -29,8 +29,8 @@
ShadowFrame* shadow_frame, JValue* result);
// Portable entrypoints.
-extern "C" void art_portable_resolution_trampoline(mirror::AbstractMethod*);
-extern "C" void art_portable_to_interpreter_bridge(mirror::AbstractMethod*);
+extern "C" void art_portable_resolution_trampoline(mirror::ArtMethod*);
+extern "C" void art_portable_to_interpreter_bridge(mirror::ArtMethod*);
// Alloc entrypoints.
extern "C" void* art_quick_alloc_array(uint32_t, void*, int32_t);
@@ -95,8 +95,8 @@
extern "C" void* art_quick_memcpy(void*, const void*, size_t);
// Invoke entrypoints.
-extern "C" void art_quick_resolution_trampoline(mirror::AbstractMethod*);
-extern "C" void art_quick_to_interpreter_bridge(mirror::AbstractMethod*);
+extern "C" void art_quick_resolution_trampoline(mirror::ArtMethod*);
+extern "C" void art_quick_to_interpreter_bridge(mirror::ArtMethod*);
extern "C" void art_quick_invoke_direct_trampoline_with_access_check(uint32_t, void*);
extern "C" void art_quick_invoke_interface_trampoline(uint32_t, void*);
extern "C" void art_quick_invoke_interface_trampoline_with_access_check(uint32_t, void*);