C: fix virtual tables
@@ -107,11 +107,14 @@ public class VirtualTableProvider {
private void copyEntriesFromSupertype(VirtualTable table, VirtualTable supertypeTable) {
for (VirtualTableEntry parentEntry : supertypeTable.entries.values()) {
+ VirtualTableEntry existingEntry = table.entries.get(parentEntry.getMethod());
+ if (existingEntry == null || existingEntry.getImplementor() == null) {
VirtualTableEntry entry = new VirtualTableEntry(table, parentEntry.getMethod(),
parentEntry.getImplementor(), parentEntry.getIndex());
table.entries.put(entry.getMethod(), entry);
}
}
+ }
public VirtualTableEntry lookup(MethodReference method) {
VirtualTable vtable = virtualTables.get(interfaceMapping.mapClass(method.getClassName()));
