[vmkit-commits] [vmkit] r103340 - in /vmkit/trunk/lib/J3: Compiler/JavaJIT.cpp VMCore/JavaClass.cpp
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Sat May 8 10:58:02 PDT 2010
Author: geoffray
Date: Sat May 8 12:58:02 2010
New Revision: 103340
URL: http://llvm.org/viewvc/llvm-project?rev=103340&view=rev
Log:
Add a TODO on miranda methods.
Modified:
vmkit/trunk/lib/J3/Compiler/JavaJIT.cpp
vmkit/trunk/lib/J3/VMCore/JavaClass.cpp
Modified: vmkit/trunk/lib/J3/Compiler/JavaJIT.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Compiler/JavaJIT.cpp?rev=103340&r1=103339&r2=103340&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/Compiler/JavaJIT.cpp (original)
+++ vmkit/trunk/lib/J3/Compiler/JavaJIT.cpp Sat May 8 12:58:02 2010
@@ -87,8 +87,11 @@
canBeDirect = true;
}
- assert((!meth || !isInterface(meth->classDef->access)) &&
- "invokevirtual on an interface");
+ if (meth && isInterface(meth->classDef->access)) {
+ // This can happen because we compute miranda methods before resolving
+ // interfaces.
+ return invokeInterface(index);
+ }
const UTF8* name = 0;
Signdef* signature = ctpInfo->infoOfInterfaceOrVirtualMethod(index, name);
Modified: vmkit/trunk/lib/J3/VMCore/JavaClass.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/VMCore/JavaClass.cpp?rev=103340&r1=103339&r2=103340&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/VMCore/JavaClass.cpp (original)
+++ vmkit/trunk/lib/J3/VMCore/JavaClass.cpp Sat May 8 12:58:02 2010
@@ -831,6 +831,8 @@
Class* baseClass, std::vector<JavaMethod*>& mirandaMethods) {
for (uint32 i = 0; i < current->nbInterfaces; i++) {
Class* I = current->interfaces[i];
+ // TODO: At this point, the interface may have not been read, so there
+ // is no methods yet.
for (uint32 j = 0; j < I->nbVirtualMethods; j++) {
JavaMethod& orig = I->virtualMethods[j];
JavaMethod* meth = baseClass->lookupMethodDontThrow(orig.name, orig.type,
More information about the vmkit-commits
mailing list