[vmkit-commits] [vmkit] r139089 - /vmkit/trunk/lib/J3/VMCore/JavaRuntimeJIT.cpp
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Sun Sep 4 02:19:51 PDT 2011
Author: geoffray
Date: Sun Sep 4 04:19:51 2011
New Revision: 139089
URL: http://llvm.org/viewvc/llvm-project?rev=139089&view=rev
Log:
Remove asserts from critical path. Add comment.
Modified:
vmkit/trunk/lib/J3/VMCore/JavaRuntimeJIT.cpp
Modified: vmkit/trunk/lib/J3/VMCore/JavaRuntimeJIT.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/VMCore/JavaRuntimeJIT.cpp?rev=139089&r1=139088&r2=139089&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/VMCore/JavaRuntimeJIT.cpp (original)
+++ vmkit/trunk/lib/J3/VMCore/JavaRuntimeJIT.cpp Sun Sep 4 04:19:51 2011
@@ -694,10 +694,6 @@
extern "C" void* j3ResolveInterface(JavaObject* obj, JavaMethod* meth, uint32_t index) {
uintptr_t result = NULL;
InterfaceMethodTable* IMT = JavaObject::getClass(obj)->virtualVT->IMT;
- assert(JavaObject::instanceOf(obj, meth->classDef));
- assert(meth->classDef->isInterface() ||
- (meth->classDef == meth->classDef->classLoader->bootstrapLoader->upcalls->OfObject));
- assert(index == InterfaceMethodTable::getIndex(meth->name, meth->type));
if ((IMT->contents[index] & 1) == 0) {
result = IMT->contents[index];
} else {
@@ -707,7 +703,15 @@
assert(table[i] != 0);
result = table[i + 1];
}
- assert((result != 0) && "Bad IMT");
+ // TODO(ngeoffray): This code is too performance critical to get asserts.
+ // Ideally, it would be inlined by the compiler, so this method is
+ // only for debugging.
+ //
+ // assert(JavaObject::instanceOf(obj, meth->classDef));
+ // assert(meth->classDef->isInterface() ||
+ // (meth->classDef == meth->classDef->classLoader->bootstrapLoader->upcalls->OfObject));
+ // assert(index == InterfaceMethodTable::getIndex(meth->name, meth->type));
+ // assert((result != 0) && "Bad IMT");
return (void*)result;
}
More information about the vmkit-commits
mailing list