[vmkit-commits] [vmkit] r60038 - /vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp

Nicolas Geoffray nicolas.geoffray at lip6.fr
Tue Nov 25 10:30:59 PST 2008


Author: geoffray
Date: Tue Nov 25 12:30:59 2008
New Revision: 60038

URL: http://llvm.org/viewvc/llvm-project?rev=60038&view=rev
Log:
Also look at parents when looking for an interface method.


Modified:
    vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp

Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp?rev=60038&r1=60037&r2=60038&view=diff

==============================================================================
--- vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp (original)
+++ vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp Tue Nov 25 12:30:59 2008
@@ -421,12 +421,15 @@
 
 JavaMethod* CommonClass::lookupInterfaceMethodDontThrow(const UTF8* name,
                                                         const UTF8* type) {
-  for (uint16 i = 0; i < nbInterfaces; ++i) {
-    Class* I = interfaces[i];
-    JavaMethod* cur = I->lookupMethodDontThrow(name, type, false, true, 0);
-    if (cur) return cur;
+  JavaMethod* cur = lookupMethodDontThrow(name, type, false, false, 0);
+  if (!cur) {
+    for (uint16 i = 0; i < nbInterfaces; ++i) {
+      Class* I = interfaces[i];
+      cur = I->lookupInterfaceMethodDontThrow(name, type);
+      if (cur) return cur;
+    }
   }
-  return 0;
+  return cur;
 }
 
 JavaMethod* CommonClass::lookupMethodDontThrow(const UTF8* name,





More information about the vmkit-commits mailing list