mirror of
https://github.com/konsoletyper/teavm.git
synced 2024-11-27 01:30:35 +08:00
Fix infinite loop in inlining
This commit is contained in:
parent
98b6fff2f0
commit
149970f162
@ -98,7 +98,7 @@ public class Inlining {
|
||||
program.createBasicBlock();
|
||||
}
|
||||
while (depthsByBlock.size() < program.basicBlockCount()) {
|
||||
depthsByBlock.add(planEntry.depth);
|
||||
depthsByBlock.add(planEntry.depth + 1);
|
||||
}
|
||||
|
||||
int variableOffset = program.variableCount();
|
||||
@ -225,6 +225,9 @@ public class Inlining {
|
||||
|
||||
if (originalDepth == 0) {
|
||||
depth = depthsByBlock.get(block.getIndex());
|
||||
if (depth >= MAX_DEPTH) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
for (Instruction insn : block) {
|
||||
|
Loading…
Reference in New Issue
Block a user