[vmkit-commits] [vmkit] r145902 - in /vmkit/trunk/lib/j3/Compiler: JavaJIT.cpp JavaJITOpcodes.cpp
Will Dietz
wdietz2 at illinois.edu
Mon Dec 5 18:24:25 PST 2011
Author: wdietz2
Date: Mon Dec 5 20:24:25 2011
New Revision: 145902
URL: http://llvm.org/viewvc/llvm-project?rev=145902&view=rev
Log:
Flip inlining assignable checks, they were backwards.
A->isAssignableFrom(B) checks "is 'A a; B b = a;' legal?" not other way around.
(In other words it checks if A is a subtype of B, not B subtype of A)
Modified:
vmkit/trunk/lib/j3/Compiler/JavaJIT.cpp
vmkit/trunk/lib/j3/Compiler/JavaJITOpcodes.cpp
Modified: vmkit/trunk/lib/j3/Compiler/JavaJIT.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/j3/Compiler/JavaJIT.cpp?rev=145902&r1=145901&r2=145902&view=diff
==============================================================================
--- vmkit/trunk/lib/j3/Compiler/JavaJIT.cpp (original)
+++ vmkit/trunk/lib/j3/Compiler/JavaJIT.cpp Mon Dec 5 20:24:25 2011
@@ -141,7 +141,7 @@
if (thisReference && meth) {
isCustomizable = true;
if ((customizeFor != NULL)
- && cl->isAssignableFrom(customizeFor)) {
+ && customizeFor->isAssignableFrom(cl)) {
meth = customizeFor->lookupMethodDontThrow(
meth->name, meth->type, false, true, NULL);
assert(meth);
Modified: vmkit/trunk/lib/j3/Compiler/JavaJITOpcodes.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/j3/Compiler/JavaJITOpcodes.cpp?rev=145902&r1=145901&r2=145902&view=diff
==============================================================================
--- vmkit/trunk/lib/j3/Compiler/JavaJITOpcodes.cpp (original)
+++ vmkit/trunk/lib/j3/Compiler/JavaJITOpcodes.cpp Mon Dec 5 20:24:25 2011
@@ -3339,7 +3339,7 @@
bool customized = false;
if (!(isFinal(cl->access) || isFinal(meth->access))) {
if (customizeFor == NULL) return false;
- if (!cl->isAssignableFrom(customizeFor)) return false;
+ if (!customizeFor->isAssignableFrom(cl)) return false;
meth = customizeFor->lookupMethodDontThrow(
meth->name, meth->type, false, true, NULL);
assert(meth);
More information about the vmkit-commits
mailing list