mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2025-01-10 08:54:11 -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);
|
List<MethodDescriptor> methodsAtCallSites = methodsUsedAtCallSites.get(className);
|
||||||
if (methodsAtCallSites != null) {
|
if (methodsAtCallSites != null) {
|
||||||
for (MethodDescriptor methodDesc : methodsAtCallSites) {
|
for (MethodDescriptor methodDesc : methodsAtCallSites) {
|
||||||
|
if (cls.hasModifier(ElementModifier.FINAL) && !table.entries.containsKey(methodDesc)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
MethodReader method = cls.getMethod(methodDesc);
|
MethodReader method = cls.getMethod(methodDesc);
|
||||||
if (method != null) {
|
if (method != null && method.getLevel() == AccessLevel.PRIVATE) {
|
||||||
if (method.hasModifier(ElementModifier.FINAL)
|
continue;
|
||||||
|| method.getLevel() == AccessLevel.PRIVATE
|
|
||||||
|| cls.hasModifier(ElementModifier.FINAL)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
table.entries.computeIfAbsent(methodDesc, k -> new EntryBuilder());
|
table.entries.computeIfAbsent(methodDesc, k -> new EntryBuilder());
|
||||||
}
|
}
|
||||||
|
@ -148,9 +147,7 @@ public class VirtualTableBuilder {
|
||||||
|
|
||||||
EntryBuilder entry = table.entries.get(method.getDescriptor());
|
EntryBuilder entry = table.entries.get(method.getDescriptor());
|
||||||
if (entry == null) {
|
if (entry == null) {
|
||||||
if (method.hasModifier(ElementModifier.FINAL)
|
if (cls.hasModifier(ElementModifier.FINAL)) {
|
||||||
|| method.getLevel() == AccessLevel.PRIVATE
|
|
||||||
|| cls.hasModifier(ElementModifier.FINAL)) {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
entry = new EntryBuilder();
|
entry = new EntryBuilder();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user