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/dex_file.cc b/runtime/dex_file.cc
index aaff0fc..45b3427 100644
--- a/runtime/dex_file.cc
+++ b/runtime/dex_file.cc
@@ -31,9 +31,8 @@
#include "dex_file_verifier.h"
#include "globals.h"
#include "leb128.h"
-#include "mirror/abstract_method-inl.h"
-#include "mirror/field.h"
-#include "mirror/field-inl.h"
+#include "mirror/art_field-inl.h"
+#include "mirror/art_method-inl.h"
#include "mirror/string.h"
#include "os.h"
#include "safe_map.h"
@@ -624,7 +623,7 @@
return descriptor;
}
-int32_t DexFile::GetLineNumFromPC(const mirror::AbstractMethod* method, uint32_t rel_pc) const {
+int32_t DexFile::GetLineNumFromPC(const mirror::ArtMethod* method, uint32_t rel_pc) const {
// For native method, lineno should be -2 to indicate it is native. Note that
// "line number == -2" is how libcore tells from StackTraceElement.
if (method->GetCodeItemOffset() == 0) {
@@ -1024,7 +1023,7 @@
ptr_ += width;
}
-void EncodedStaticFieldValueIterator::ReadValueToField(mirror::Field* field) const {
+void EncodedStaticFieldValueIterator::ReadValueToField(mirror::ArtField* field) const {
switch (type_) {
case kBoolean: field->SetBoolean(field->GetDeclaringClass(), jval_.z); break;
case kByte: field->SetByte(field->GetDeclaringClass(), jval_.b); break;