mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
C: fix bug in virtual table builder
This commit is contained in:
parent
336590314c
commit
d818b62686
|
@ -126,13 +126,12 @@ public class VirtualTableBuilder {
|
|||
List<MethodDescriptor> methodsAtCallSites = methodsUsedAtCallSites.get(className);
|
||||
if (methodsAtCallSites != null) {
|
||||
for (MethodDescriptor methodDesc : methodsAtCallSites) {
|
||||
if (cls.hasModifier(ElementModifier.FINAL) && !table.entries.containsKey(methodDesc)) {
|
||||
continue;
|
||||
}
|
||||
MethodReader method = cls.getMethod(methodDesc);
|
||||
if (method != null) {
|
||||
if (method.hasModifier(ElementModifier.FINAL)
|
||||
|| method.getLevel() == AccessLevel.PRIVATE
|
||||
|| cls.hasModifier(ElementModifier.FINAL)) {
|
||||
continue;
|
||||
}
|
||||
if (method != null && method.getLevel() == AccessLevel.PRIVATE) {
|
||||
continue;
|
||||
}
|
||||
table.entries.computeIfAbsent(methodDesc, k -> new EntryBuilder());
|
||||
}
|
||||
|
@ -148,9 +147,7 @@ public class VirtualTableBuilder {
|
|||
|
||||
EntryBuilder entry = table.entries.get(method.getDescriptor());
|
||||
if (entry == null) {
|
||||
if (method.hasModifier(ElementModifier.FINAL)
|
||||
|| method.getLevel() == AccessLevel.PRIVATE
|
||||
|| cls.hasModifier(ElementModifier.FINAL)) {
|
||||
if (cls.hasModifier(ElementModifier.FINAL)) {
|
||||
continue;
|
||||
}
|
||||
entry = new EntryBuilder();
|
||||
|
|
Loading…
Reference in New Issue
Block a user