[JVM] Drop I : Interpreter<V> type parameter from FastAnalyzer
This commit is contained in:
+2
-2
@@ -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.Interpreter
|
||||||
import org.jetbrains.org.objectweb.asm.tree.analysis.Value
|
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 owner: String,
|
||||||
private val method: MethodNode,
|
private val method: MethodNode,
|
||||||
private val interpreter: I,
|
private val interpreter: Interpreter<V>,
|
||||||
private val pruneExceptionEdges: Boolean,
|
private val pruneExceptionEdges: Boolean,
|
||||||
) {
|
) {
|
||||||
private val nInsns = method.instructions.size()
|
private val nInsns = method.instructions.size()
|
||||||
|
|||||||
+1
-1
@@ -48,6 +48,6 @@ class FastMethodAnalyzer<V : Value>
|
|||||||
interpreter: Interpreter<V>,
|
interpreter: Interpreter<V>,
|
||||||
pruneExceptionEdges: Boolean = false,
|
pruneExceptionEdges: Boolean = false,
|
||||||
private val createFrame: (Int, Int) -> Frame<V> = { nLocals, nStack -> Frame<V>(nLocals, nStack) }
|
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)
|
override fun newFrame(nLocals: Int, nStack: Int): Frame<V> = createFrame(nLocals, nStack)
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -48,7 +48,7 @@ internal open class FastStackAnalyzer<V : Value, F : Frame<V>>(
|
|||||||
owner: String,
|
owner: String,
|
||||||
method: MethodNode,
|
method: MethodNode,
|
||||||
interpreter: Interpreter<V>
|
interpreter: Interpreter<V>
|
||||||
) : FastAnalyzer<V, Interpreter<V>, F>(owner, method, interpreter, pruneExceptionEdges = false) {
|
) : FastAnalyzer<V, F>(owner, method, interpreter, pruneExceptionEdges = false) {
|
||||||
@Suppress("UNCHECKED_CAST")
|
@Suppress("UNCHECKED_CAST")
|
||||||
override fun newFrame(nLocals: Int, nStack: Int): F = Frame<V>(nLocals, nStack) as F
|
override fun newFrame(nLocals: Int, nStack: Int): F = Frame<V>(nLocals, nStack) as F
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -66,6 +66,6 @@ class FastStoreLoadAnalyzer<V : Value>(
|
|||||||
owner: String,
|
owner: String,
|
||||||
method: MethodNode,
|
method: MethodNode,
|
||||||
interpreter: Interpreter<V>
|
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)
|
override fun newFrame(nLocals: Int, nStack: Int): StoreLoadFrame<V> = StoreLoadFrame(nLocals)
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user