Minor: fix warnings
This commit is contained in:
@@ -33,8 +33,8 @@ import org.jetbrains.kotlin.resolve.jvm.AsmTypes
|
||||
import org.jetbrains.org.objectweb.asm.Type
|
||||
|
||||
class FrameVisitor(context: EvaluationContextImpl) {
|
||||
private val project = context.getDebugProcess().getProject()
|
||||
private val frame = context.getFrameProxy()?.getStackFrame()
|
||||
private val project = context.debugProcess.project
|
||||
private val frame = context.frameProxy?.stackFrame
|
||||
|
||||
public fun findValue(name: String, asmType: Type?, checkType: Boolean, failIfNotFound: Boolean): Value? {
|
||||
if (frame == null) return null
|
||||
@@ -100,13 +100,12 @@ class FrameVisitor(context: EvaluationContextImpl) {
|
||||
}
|
||||
|
||||
private fun isFunctionType(type: Type?): Boolean {
|
||||
return type?.getSort() == Type.OBJECT &&
|
||||
type!!.getInternalName().startsWith(InlineCodegenUtil.NUMBERED_FUNCTION_PREFIX)
|
||||
return type?.sort == Type.OBJECT &&
|
||||
type!!.internalName.startsWith(InlineCodegenUtil.NUMBERED_FUNCTION_PREFIX)
|
||||
}
|
||||
|
||||
private fun findLocalVariable(name: String, asmType: Type?, checkType: Boolean): Value? {
|
||||
val localVariable = frame!!.visibleVariableByName(name)
|
||||
if (localVariable == null) return null
|
||||
val localVariable = frame!!.visibleVariableByName(name) ?: return null
|
||||
|
||||
val eval4jValue = frame.getValue(localVariable).asValue()
|
||||
val sharedVarValue = getValueIfSharedVar(eval4jValue, asmType, checkType)
|
||||
@@ -148,7 +147,7 @@ class FrameVisitor(context: EvaluationContextImpl) {
|
||||
if (!shouldCheckType || asmType == null || value.asmType == asmType) return true
|
||||
if (project == null) return false
|
||||
|
||||
if ((value.obj() as? com.sun.jdi.ObjectReference)?.referenceType().isSubclass(asmType.getClassName())) {
|
||||
if ((value.obj() as? com.sun.jdi.ObjectReference)?.referenceType().isSubclass(asmType.className)) {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -163,8 +162,7 @@ class FrameVisitor(context: EvaluationContextImpl) {
|
||||
if (obj !is ObjectReference) return null
|
||||
|
||||
val _class = obj.referenceType()
|
||||
val field = _class.fieldByName(name)
|
||||
if (field == null) return null
|
||||
val field = _class.fieldByName(name) ?: return null
|
||||
|
||||
val fieldValue = obj.getValue(field).asValue()
|
||||
if (isValueOfCorrectType(fieldValue, asmType, checkType)) return fieldValue
|
||||
@@ -176,7 +174,7 @@ class FrameVisitor(context: EvaluationContextImpl) {
|
||||
}
|
||||
|
||||
private fun Value.isSharedVar(): Boolean {
|
||||
return this.asmType.getSort() == Type.OBJECT && this.asmType.getInternalName().startsWith(AsmTypes.REF_TYPE_PREFIX)
|
||||
return this.asmType.sort == Type.OBJECT && this.asmType.internalName.startsWith(AsmTypes.REF_TYPE_PREFIX)
|
||||
}
|
||||
|
||||
fun getValueIfSharedVar(value: Value, expectedType: Type?, checkType: Boolean): Value? {
|
||||
|
||||
Reference in New Issue
Block a user