summaryrefslogtreecommitdiffstats
path: root/runtime/hprof
diff options
context:
space:
mode:
authorBrian Carlstrom <bdc@google.com>2013-07-30 01:26:50 -0700
committerIan Rogers <irogers@google.com>2013-08-13 18:09:46 -0700
commitea46f950e7a51585db293cd7f047de190a482414 (patch)
tree9dddc8073547a2dcb58a19e1728932a89cb149c3 /runtime/hprof
parent5e3572709b5a5d59957f835db4f73760ecef08da (diff)
downloadart-ea46f950e7a51585db293cd7f047de190a482414.tar.gz
art-ea46f950e7a51585db293cd7f047de190a482414.tar.bz2
art-ea46f950e7a51585db293cd7f047de190a482414.zip
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
Diffstat (limited to 'runtime/hprof')
-rw-r--r--runtime/hprof/hprof.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/runtime/hprof/hprof.cc b/runtime/hprof/hprof.cc
index d3bb2e8f5f..0b2e741527 100644
--- a/runtime/hprof/hprof.cc
+++ b/runtime/hprof/hprof.cc
@@ -48,10 +48,9 @@
#include "gc/heap.h"
#include "gc/space/space.h"
#include "globals.h"
+#include "mirror/art_field-inl.h"
#include "mirror/class.h"
#include "mirror/class-inl.h"
-#include "mirror/field.h"
-#include "mirror/field-inl.h"
#include "mirror/object-inl.h"
#include "object_utils.h"
#include "os.h"
@@ -922,7 +921,7 @@ int Hprof::DumpHeapObject(mirror::Object* obj) {
rec->AddId(CLASS_STATICS_ID(obj));
for (size_t i = 0; i < sFieldCount; ++i) {
- mirror::Field* f = thisClass->GetStaticField(i);
+ mirror::ArtField* f = thisClass->GetStaticField(i);
fh.ChangeField(f);
size_t size;
@@ -947,7 +946,7 @@ int Hprof::DumpHeapObject(mirror::Object* obj) {
int iFieldCount = thisClass->IsObjectClass() ? 0 : thisClass->NumInstanceFields();
rec->AddU2((uint16_t)iFieldCount);
for (int i = 0; i < iFieldCount; ++i) {
- mirror::Field* f = thisClass->GetInstanceField(i);
+ mirror::ArtField* f = thisClass->GetInstanceField(i);
fh.ChangeField(f);
HprofBasicType t = SignatureToBasicTypeAndSize(fh.GetTypeDescriptor(), NULL);
rec->AddId(LookupStringId(fh.GetName()));
@@ -1010,7 +1009,7 @@ int Hprof::DumpHeapObject(mirror::Object* obj) {
while (!sclass->IsObjectClass()) {
int ifieldCount = sclass->NumInstanceFields();
for (int i = 0; i < ifieldCount; ++i) {
- mirror::Field* f = sclass->GetInstanceField(i);
+ mirror::ArtField* f = sclass->GetInstanceField(i);
fh.ChangeField(f);
size_t size;
SignatureToBasicTypeAndSize(fh.GetTypeDescriptor(), &size);