summaryrefslogtreecommitdiff
path: root/src/object.cc
diff options
context:
space:
mode:
author Ian Rogers <irogers@google.com> 2012-06-06 21:21:43 -0700
committer Ian Rogers <irogers@google.com> 2012-06-06 22:57:13 -0700
commitd24e264ff85ad8c6f142ac6d33055fdc1881fa2f (patch)
tree37e1ba1dd328828205e5c9340ae64eddd915a154 /src/object.cc
parentd06dfe7b09de95c035fa736d2b62aa9fee2347b5 (diff)
Fix recursive static field lookup.
Change-Id: I892696e6e98be9f31a7900d10130cae204f9127a
Diffstat (limited to 'src/object.cc')
-rw-r--r--src/object.cc26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/object.cc b/src/object.cc
index 6dda684cdf..9724e421f9 100644
--- a/src/object.cc
+++ b/src/object.cc
@@ -753,10 +753,10 @@ void Class::DumpClass(std::ostream& os, int flags) const {
if (IsArrayClass()) {
os << " componentType=" << PrettyClass(GetComponentType()) << "\n";
}
- if (kh.NumInterfaces() > 0) {
- os << " interfaces (" << kh.NumInterfaces() << "):\n";
- for (size_t i = 0; i < kh.NumInterfaces(); ++i) {
- Class* interface = kh.GetInterface(i);
+ if (kh.NumDirectInterfaces() > 0) {
+ os << " interfaces (" << kh.NumDirectInterfaces() << "):\n";
+ for (size_t i = 0; i < kh.NumDirectInterfaces(); ++i) {
+ Class* interface = kh.GetDirectInterface(i);
const ClassLoader* cl = interface->GetClassLoader();
os << StringPrintf(" %2zd: %s (cl=%p)\n", i, PrettyClass(interface).c_str(), cl);
}
@@ -1174,9 +1174,9 @@ Field* Class::FindStaticField(const StringPiece& name, const StringPiece& type)
}
// Is this field in any of this class' interfaces?
kh.ChangeClass(k);
- for (uint32_t i = 0; i < kh.NumInterfaces(); ++i) {
- Class* interface = kh.GetInterface(i);
- f = interface->FindDeclaredStaticField(name, type);
+ for (uint32_t i = 0; i < kh.NumDirectInterfaces(); ++i) {
+ Class* interface = kh.GetDirectInterface(i);
+ f = interface->FindStaticField(name, type);
if (f != NULL) {
return f;
}
@@ -1195,9 +1195,9 @@ Field* Class::FindStaticField(const DexCache* dex_cache, uint32_t dex_field_idx)
}
// Is this field in any of this class' interfaces?
kh.ChangeClass(k);
- for (uint32_t i = 0; i < kh.NumInterfaces(); ++i) {
- Class* interface = kh.GetInterface(i);
- f = interface->FindDeclaredStaticField(dex_cache, dex_field_idx);
+ for (uint32_t i = 0; i < kh.NumDirectInterfaces(); ++i) {
+ Class* interface = kh.GetDirectInterface(i);
+ f = interface->FindStaticField(dex_cache, dex_field_idx);
if (f != NULL) {
return f;
}
@@ -1221,9 +1221,9 @@ Field* Class::FindField(const StringPiece& name, const StringPiece& type) {
}
// Is this field in any of this class' interfaces?
kh.ChangeClass(k);
- for (uint32_t i = 0; i < kh.NumInterfaces(); ++i) {
- Class* interface = kh.GetInterface(i);
- f = interface->FindDeclaredStaticField(name, type);
+ for (uint32_t i = 0; i < kh.NumDirectInterfaces(); ++i) {
+ Class* interface = kh.GetDirectInterface(i);
+ f = interface->FindStaticField(name, type);
if (f != NULL) {
return f;
}