mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2025-01-09 00:14:10 -08:00
Fix bugs in propagating names via register allocator
This commit is contained in:
parent
593dafdd73
commit
43b0700c10
|
@ -72,7 +72,9 @@ public class RegisterAllocator {
|
||||||
String[] classNames = new String[maxClass];
|
String[] classNames = new String[maxClass];
|
||||||
for (int i = 0; i < categories.length; ++i) {
|
for (int i = 0; i < categories.length; ++i) {
|
||||||
classCategories[classArray[i]] = categories[i];
|
classCategories[classArray[i]] = categories[i];
|
||||||
classNames[classArray[i]] = names[i];
|
if (names[i] != null) {
|
||||||
|
classNames[classArray[i]] = names[i];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
colorer.colorize(interferenceGraph, colors, classCategories, classNames);
|
colorer.colorize(interferenceGraph, colors, classCategories, classNames);
|
||||||
|
|
||||||
|
@ -86,7 +88,7 @@ public class RegisterAllocator {
|
||||||
for (int i = 0; i < colors.length; ++i) {
|
for (int i = 0; i < colors.length; ++i) {
|
||||||
Variable var = program.variableAt(i);
|
Variable var = program.variableAt(i);
|
||||||
if (var.getDebugName() != null && var.getRegister() >= 0) {
|
if (var.getDebugName() != null && var.getRegister() >= 0) {
|
||||||
namesByRegister[var.getRegister()] = var.getDebugName();
|
namesByRegister[var.getRegister()] = classNames[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (int i = 0; i < colors.length; ++i) {
|
for (int i = 0; i < colors.length; ++i) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user