mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
DataFlowRunner: check MAX_STATES_PER_BRANCH when there are no loops
This commit is contained in:
+5
-1
@@ -148,6 +148,10 @@ public class DataFlowRunner {
|
||||
int count = 0;
|
||||
while (!queue.isEmpty()) {
|
||||
List<DfaInstructionState> states = queue.getNextInstructionStates(joinInstructions);
|
||||
if (states.size() > MAX_STATES_PER_BRANCH) {
|
||||
LOG.trace("Too complex because too many different possible states");
|
||||
return RunnerResult.TOO_COMPLEX;
|
||||
}
|
||||
for (DfaInstructionState instructionState : states) {
|
||||
if (count++ > stateLimit) {
|
||||
LOG.trace("Too complex data flow: too many instruction states processed");
|
||||
@@ -171,7 +175,7 @@ public class DataFlowRunner {
|
||||
}
|
||||
if (processed.size() > MAX_STATES_PER_BRANCH) {
|
||||
LOG.trace("Too complex because too many different possible states");
|
||||
return RunnerResult.TOO_COMPLEX; // Too complex :(
|
||||
return RunnerResult.TOO_COMPLEX;
|
||||
}
|
||||
if (loopNumber[branching.getIndex()] != 0) {
|
||||
processedStates.putValue(branching, instructionState.getMemoryState().createCopy());
|
||||
|
||||
Reference in New Issue
Block a user