[JVM] Drop I : Interpreter<V> type parameter from FastAnalyzer

This commit is contained in:
Ivan Kylchik
2023-09-06 11:48:40 +02:00
committed by Space Team
parent 87c46db3d5
commit 895afc736d
4 changed files with 5 additions and 5 deletions
@@ -15,10 +15,10 @@ import org.jetbrains.org.objectweb.asm.tree.analysis.Frame
import org.jetbrains.org.objectweb.asm.tree.analysis.Interpreter
import org.jetbrains.org.objectweb.asm.tree.analysis.Value
abstract class FastAnalyzer<V : Value, I : Interpreter<V>, F : Frame<V>>(
abstract class FastAnalyzer<V : Value, F : Frame<V>>(
private val owner: String,
private val method: MethodNode,
private val interpreter: I,
private val interpreter: Interpreter<V>,
private val pruneExceptionEdges: Boolean,
) {
private val nInsns = method.instructions.size()
@@ -48,6 +48,6 @@ class FastMethodAnalyzer<V : Value>
interpreter: Interpreter<V>,
pruneExceptionEdges: Boolean = false,
private val createFrame: (Int, Int) -> Frame<V> = { nLocals, nStack -> Frame<V>(nLocals, nStack) }
) : FastAnalyzer<V, Interpreter<V>, Frame<V>>(owner, method, interpreter, pruneExceptionEdges) {
) : FastAnalyzer<V, Frame<V>>(owner, method, interpreter, pruneExceptionEdges) {
override fun newFrame(nLocals: Int, nStack: Int): Frame<V> = createFrame(nLocals, nStack)
}
@@ -48,7 +48,7 @@ internal open class FastStackAnalyzer<V : Value, F : Frame<V>>(
owner: String,
method: MethodNode,
interpreter: Interpreter<V>
) : FastAnalyzer<V, Interpreter<V>, F>(owner, method, interpreter, pruneExceptionEdges = false) {
) : FastAnalyzer<V, F>(owner, method, interpreter, pruneExceptionEdges = false) {
@Suppress("UNCHECKED_CAST")
override fun newFrame(nLocals: Int, nStack: Int): F = Frame<V>(nLocals, nStack) as F
@@ -66,6 +66,6 @@ class FastStoreLoadAnalyzer<V : Value>(
owner: String,
method: MethodNode,
interpreter: Interpreter<V>
) : FastAnalyzer<V, Interpreter<V>, StoreLoadFrame<V>>(owner, method, interpreter, pruneExceptionEdges = false) {
) : FastAnalyzer<V, StoreLoadFrame<V>>(owner, method, interpreter, pruneExceptionEdges = false) {
override fun newFrame(nLocals: Int, nStack: Int): StoreLoadFrame<V> = StoreLoadFrame(nLocals)
}