checkCFGFixedPointRuntime panics if a fixed point iteration loop runs beyond some upper bounded round number, determined by the number of blocks in the CFG of the analyzed function.
(passName string, currRound, numBlocks int)
| 32 | // checkCFGFixedPointRuntime panics if a fixed point iteration loop runs beyond some upper |
| 33 | // bounded round number, determined by the number of blocks in the CFG of the analyzed function. |
| 34 | func checkCFGFixedPointRuntime(passName string, currRound, numBlocks int) { |
| 35 | if maxRound := numBlocks * numBlocks * 2; currRound > maxRound { |
| 36 | panic(fmt.Sprintf("propagation over %d-block CFG in %q ran for "+ |
| 37 | "%d rounds, when maximum allowed was %d rounds.", |
| 38 | numBlocks, passName, currRound, maxRound), |
| 39 | ) |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | // GetDeclaringPath finds the path of nested AST nodes beginning with the passed interval `[start, end]` |
| 44 | func GetDeclaringPath(pass *analysishelper.EnhancedPass, start, end token.Pos) ([]ast.Node, bool) { |
no outgoing calls
no test coverage detected