[vmkit-commits] [vmkit] r101713 - /vmkit/trunk/lib/J3/VMCore/JavaMetaJIT.cpp
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Sun Apr 18 02:51:15 PDT 2010
Author: geoffray
Date: Sun Apr 18 04:51:15 2010
New Revision: 101713
URL: http://llvm.org/viewvc/llvm-project?rev=101713&view=rev
Log:
Continue optimizing a bit invokevirtual in JNI.
Modified:
vmkit/trunk/lib/J3/VMCore/JavaMetaJIT.cpp
Modified: vmkit/trunk/lib/J3/VMCore/JavaMetaJIT.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/VMCore/JavaMetaJIT.cpp?rev=101713&r1=101712&r2=101713&view=diff
==============================================================================
--- vmkit/trunk/lib/J3/VMCore/JavaMetaJIT.cpp (original)
+++ vmkit/trunk/lib/J3/VMCore/JavaMetaJIT.cpp Sun Apr 18 04:51:15 2010
@@ -109,7 +109,11 @@
llvm_gcroot(obj, 0); \
verifyNull(obj); \
UserClass* objCl = obj->getClass()->isArray() ? obj->getClass()->super : obj->getClass()->asClass(); \
- JavaMethod* meth = (objCl == classDef) ? this : objCl->lookupMethodDontThrow(name, type, false, true, &cl); \
+ if (objCl == classDef || isFinal(access)) { \
+ meth = this; \
+ } else { \
+ meth = objCl->lookupMethodDontThrow(name, type, false, true, &cl); \
+ } \
assert(meth && "No method found"); \
void* func = meth->compiledPtr(); \
Signdef* sign = getSignature(); \
@@ -167,7 +171,12 @@
verifyNull(obj);\
Signdef* sign = getSignature(); \
UserClass* objCl = obj->getClass()->isArray() ? obj->getClass()->super : obj->getClass()->asClass(); \
- JavaMethod* meth = (objCl == classDef) ? this : objCl->lookupMethodDontThrow(name, type, false, true, &cl); \
+ JavaMethod* meth = NULL; \
+ if (objCl == classDef || isFinal(access)) { \
+ meth = this; \
+ } else { \
+ meth = objCl->lookupMethodDontThrow(name, type, false, true, &cl); \
+ } \
assert(meth && "No method found"); \
void* func = meth->compiledPtr(); \
FUNC_TYPE_VIRTUAL_BUF call = (FUNC_TYPE_VIRTUAL_BUF)sign->getVirtualCallBuf(); \
More information about the vmkit-commits
mailing list