google / closure-compiler

A JavaScript checker and optimizer.
https://developers.google.com/closure/compiler/
Apache License 2.0
7.34k stars 1.14k forks source link

ERROR - non-monotonic data-flow analysis #2628

Open aharui opened 7 years ago

aharui commented 7 years ago

The following code:

/**

results in "non-monotonic data-flow analysis" error. In stepping through it in the debugger, the flow() call in DataFlowAnalysis.java:analyze() keeps thinking that the last line in the while loop is affecting the top of the while loop so it adds the while line to the orderedWorkSet and you keep looping until you hit the MaxIterationsExceededException

I've gotten around it by specifying the type of curSpan to be ISpanElement instead. But is there something wrong with our code that the DataFlow can't get out of the loop?

TLFElements.zip

dimvar commented 6 years ago

There is not enough information here. Please provide exact steps how to build this code to reproduce the warning.