diff options
author | 2012-06-06 21:21:43 -0700 | |
---|---|---|
committer | 2012-06-06 22:57:13 -0700 | |
commit | d24e264ff85ad8c6f142ac6d33055fdc1881fa2f (patch) | |
tree | 37e1ba1dd328828205e5c9340ae64eddd915a154 /src/class_linker.cc | |
parent | d06dfe7b09de95c035fa736d2b62aa9fee2347b5 (diff) |
Fix recursive static field lookup.
Change-Id: I892696e6e98be9f31a7900d10130cae204f9127a
Diffstat (limited to 'src/class_linker.cc')
-rw-r--r-- | src/class_linker.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/class_linker.cc b/src/class_linker.cc index 4133a861bf..543948944d 100644 --- a/src/class_linker.cc +++ b/src/class_linker.cc @@ -386,11 +386,11 @@ void ClassLinker::InitFromCompiler(const std::vector<const DexFile*>& boot_class // Sanity check Class[] and Object[]'s interfaces ClassHelper kh(class_array_class.get(), this); - CHECK_EQ(java_lang_Cloneable, kh.GetInterface(0)); - CHECK_EQ(java_io_Serializable, kh.GetInterface(1)); + CHECK_EQ(java_lang_Cloneable, kh.GetDirectInterface(0)); + CHECK_EQ(java_io_Serializable, kh.GetDirectInterface(1)); kh.ChangeClass(object_array_class.get()); - CHECK_EQ(java_lang_Cloneable, kh.GetInterface(0)); - CHECK_EQ(java_io_Serializable, kh.GetInterface(1)); + CHECK_EQ(java_lang_Cloneable, kh.GetDirectInterface(0)); + CHECK_EQ(java_io_Serializable, kh.GetDirectInterface(1)); // run Class, Constructor, Field, and Method through FindSystemClass. // this initializes their dex_cache_ fields and register them in classes_. Class* Class_class = FindSystemClass("Ljava/lang/Class;"); @@ -2889,10 +2889,10 @@ bool ClassLinker::LinkInterfaceMethods(SirtRef<Class>& klass, ObjectArray<Class> } size_t ifcount = super_ifcount; ClassHelper kh(klass.get(), this); - uint32_t num_interfaces = interfaces == NULL ? kh.NumInterfaces() : interfaces->GetLength(); + uint32_t num_interfaces = interfaces == NULL ? kh.NumDirectInterfaces() : interfaces->GetLength(); ifcount += num_interfaces; for (size_t i = 0; i < num_interfaces; i++) { - Class* interface = interfaces == NULL ? kh.GetInterface(i) : interfaces->Get(i); + Class* interface = interfaces == NULL ? kh.GetDirectInterface(i) : interfaces->Get(i); ifcount += interface->GetIfTableCount(); } if (ifcount == 0) { @@ -2912,7 +2912,7 @@ bool ClassLinker::LinkInterfaceMethods(SirtRef<Class>& klass, ObjectArray<Class> // Flatten the interface inheritance hierarchy. size_t idx = super_ifcount; for (size_t i = 0; i < num_interfaces; i++) { - Class* interface = interfaces == NULL ? kh.GetInterface(i) : interfaces->Get(i); + Class* interface = interfaces == NULL ? kh.GetDirectInterface(i) : interfaces->Get(i); DCHECK(interface != NULL); if (!interface->IsInterface()) { ClassHelper ih(interface); |