JVM FastMethodAnalyzer: prune some exception edges

This commit is contained in:
Dmitry Petrov
2021-07-09 09:06:47 +03:00
committed by teamcityserver
parent 07b89c6b4b
commit c54e680021
2 changed files with 3 additions and 1 deletions
@@ -306,6 +306,7 @@ class FastMethodAnalyzer<V : Value>(
val begin = tcb.start.indexOf()
val end = tcb.end.indexOf()
for (j in begin until end) {
if (!insnsArray[j].isMeaningful) continue
var insnHandlers: MutableList<TryCatchBlockNode>? = handlers[j]
if (insnHandlers == null) {
insnHandlers = SmartList()
@@ -126,9 +126,10 @@ class InstructionLivenessAnalyzer(val method: MethodNode) {
val begin = tcb.start.indexOf
val end = tcb.end.indexOf
for (j in begin until end) {
if (!instructions[j].isMeaningful) continue
var insnHandlers = handlers[j]
if (insnHandlers == null) {
insnHandlers = ArrayList<TryCatchBlockNode>()
insnHandlers = ArrayList()
handlers[j] = insnHandlers
}
insnHandlers.add(tcb)