Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordwagelaar2014-12-15 09:57:28 +0000
committerdwagelaar2014-12-15 09:57:28 +0000
commit9cee0a69435734e771f2b266173bb9527afdc0c8 (patch)
tree0b3c4537851e62d5be8ac0aa0570d4af4aa1963f /plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse
parentd694049ac3f04dc2123a59e7528c6a5c4c5d0b25 (diff)
downloadorg.eclipse.atl-9cee0a69435734e771f2b266173bb9527afdc0c8.tar.gz
org.eclipse.atl-9cee0a69435734e771f2b266173bb9527afdc0c8.tar.xz
org.eclipse.atl-9cee0a69435734e771f2b266173bb9527afdc0c8.zip
454382: JIT miss for public boolean
org.eclipse.m2m.atl.emftvm.util.LazySet$IncludingSet.isEmpty() Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=454382
Diffstat (limited to 'plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse')
-rw-r--r--plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/jit/ByteCodeSwitch.java21
1 files changed, 12 insertions, 9 deletions
diff --git a/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/jit/ByteCodeSwitch.java b/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/jit/ByteCodeSwitch.java
index f8a40928..1ad77166 100644
--- a/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/jit/ByteCodeSwitch.java
+++ b/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/jit/ByteCodeSwitch.java
@@ -17,6 +17,7 @@ import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
+import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
@@ -1094,7 +1095,8 @@ public class ByteCodeSwitch extends EmftvmSwitch<MethodVisitor> implements Opcod
}
final int methodModifiers = getRelevantModifiers(method);
Class<?> dc = method.getDeclaringClass();
- Class<?>[] dis = dc.getInterfaces();
+ java.util.Set<Class<?>> dis = new LinkedHashSet<Class<?>>(
+ Arrays.asList(dc.getInterfaces()));
while ((dc = dc.getSuperclass()) != null) {
try {
Method superMethod = dc.getDeclaredMethod(method.getName(), method.getParameterTypes());
@@ -1104,23 +1106,24 @@ public class ByteCodeSwitch extends EmftvmSwitch<MethodVisitor> implements Opcod
break;
}
} catch (SecurityException e) {
- break;
} catch (NoSuchMethodException e) {
- break;
}
- dis = dc.getInterfaces();
+ dis.addAll(Arrays.asList(dc.getInterfaces()));
}
- while (dis.length > 0) {
- Class<?>[] newDis = new Class<?>[0];
+ while (!dis.isEmpty()) {
+ java.util.Set<Class<?>> newDis = new LinkedHashSet<Class<?>>();
for (Class<?> di : dis) {
try {
- method = di.getDeclaredMethod(method.getName(), method.getParameterTypes());
- newDis = di.getInterfaces();
- break; // skip sibling interfaces
+ // Only replace by method declared in a super-interface
+ if (di.isAssignableFrom(method.getDeclaringClass())) {
+ method = di.getDeclaredMethod(method.getName(), method.getParameterTypes());
+ }
} catch (SecurityException e) {
} catch (NoSuchMethodException e) {
}
+ newDis.addAll(Arrays.asList(di.getInterfaces()));
}
+ newDis.removeAll(dis);
dis = newDis;
}
return method;

Back to the top