mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-31 12:24:10 -08:00
Includes catch instruction into interference analysis
This commit is contained in:
parent
f66233c6aa
commit
0deb7ac4e6
|
@ -50,6 +50,16 @@ class InterferenceGraphBuilder {
|
|||
for (Incoming outgoing : outgoings.get(i)) {
|
||||
live.add(nodes.get(outgoing.getValue().getIndex()));
|
||||
}
|
||||
for (TryCatchBlock tryCatch : block.getTryCatchBlocks()) {
|
||||
if (tryCatch.getExceptionVariable() != null) {
|
||||
nodes.get(tryCatch.getExceptionVariable().getIndex()).connectAll(live);
|
||||
}
|
||||
}
|
||||
for (TryCatchBlock tryCatch : block.getTryCatchBlocks()) {
|
||||
if (tryCatch.getExceptionVariable() != null) {
|
||||
live.remove(tryCatch.getExceptionVariable());
|
||||
}
|
||||
}
|
||||
for (int j = block.getInstructions().size() - 1; j >= 0; --j) {
|
||||
Instruction insn = block.getInstructions().get(j);
|
||||
insn.acceptVisitor(useExtractor);
|
||||
|
|
|
@ -66,6 +66,11 @@ public class LivenessAnalyzer {
|
|||
definitions[var.getIndex()] = i;
|
||||
}
|
||||
}
|
||||
for (TryCatchBlock tryCatch : block.getTryCatchBlocks()) {
|
||||
if (tryCatch.getExceptionVariable() != null) {
|
||||
definitions[tryCatch.getExceptionVariable().getIndex()] = i;
|
||||
}
|
||||
}
|
||||
for (Phi phi : block.getPhis()) {
|
||||
definitions[phi.getReceiver().getIndex()] = i;
|
||||
for (Incoming incoming : phi.getIncomings()) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user