type unescaped in *.kt files
This commit is contained in:
@@ -54,12 +54,12 @@ public trait Eval {
|
||||
}
|
||||
|
||||
class SingleInstructionInterpreter(private val eval: Eval) : Interpreter<Value>(ASM5) {
|
||||
override fun newValue(`type`: Type?): Value? {
|
||||
if (`type` == null) {
|
||||
override fun newValue(type: Type?): Value? {
|
||||
if (type == null) {
|
||||
return NOT_A_VALUE
|
||||
}
|
||||
|
||||
return makeNotInitializedValue(`type`)
|
||||
return makeNotInitializedValue(type)
|
||||
}
|
||||
|
||||
override fun newOperation(insn: AbstractInsnNode): Value? {
|
||||
|
||||
@@ -103,7 +103,7 @@ public fun interpreterLoop(
|
||||
fun exceptionCaught(exceptionValue: Value, instanceOf: (Type) -> Boolean): Boolean {
|
||||
val catchBlocks = handlers[m.instructions.indexOf(currentInsn)] ?: listOf()
|
||||
for (catch in catchBlocks) {
|
||||
val exceptionTypeInternalName = catch.`type`
|
||||
val exceptionTypeInternalName = catch.type
|
||||
if (exceptionTypeInternalName != null) {
|
||||
val exceptionType = Type.getObjectType(exceptionTypeInternalName)
|
||||
if (instanceOf(exceptionType)) {
|
||||
|
||||
@@ -35,14 +35,14 @@ public class JDIEval(
|
||||
) : Eval {
|
||||
|
||||
private val primitiveTypes = mapOf(
|
||||
Type.BOOLEAN_TYPE.getClassName() to vm.mirrorOf(true).`type`(),
|
||||
Type.BYTE_TYPE.getClassName() to vm.mirrorOf(1.toByte()).`type`(),
|
||||
Type.SHORT_TYPE.getClassName() to vm.mirrorOf(1.toShort()).`type`(),
|
||||
Type.INT_TYPE.getClassName() to vm.mirrorOf(1.toInt()).`type`(),
|
||||
Type.CHAR_TYPE.getClassName() to vm.mirrorOf('1').`type`(),
|
||||
Type.LONG_TYPE.getClassName() to vm.mirrorOf(1L).`type`(),
|
||||
Type.FLOAT_TYPE.getClassName() to vm.mirrorOf(1.0f).`type`(),
|
||||
Type.DOUBLE_TYPE.getClassName() to vm.mirrorOf(1.0).`type`()
|
||||
Type.BOOLEAN_TYPE.getClassName() to vm.mirrorOf(true).type(),
|
||||
Type.BYTE_TYPE.getClassName() to vm.mirrorOf(1.toByte()).type(),
|
||||
Type.SHORT_TYPE.getClassName() to vm.mirrorOf(1.toShort()).type(),
|
||||
Type.INT_TYPE.getClassName() to vm.mirrorOf(1.toInt()).type(),
|
||||
Type.CHAR_TYPE.getClassName() to vm.mirrorOf('1').type(),
|
||||
Type.LONG_TYPE.getClassName() to vm.mirrorOf(1L).type(),
|
||||
Type.FLOAT_TYPE.getClassName() to vm.mirrorOf(1.0f).type(),
|
||||
Type.DOUBLE_TYPE.getClassName() to vm.mirrorOf(1.0).type()
|
||||
)
|
||||
|
||||
override fun loadClass(classType: Type): Value {
|
||||
@@ -178,7 +178,7 @@ public class JDIEval(
|
||||
throwBrokenCodeException(NoSuchFieldError("Can't a field in a non-class: $field"))
|
||||
}
|
||||
|
||||
val jdiValue = newValue.asJdiValue(vm, field.`type`().asType())
|
||||
val jdiValue = newValue.asJdiValue(vm, field.type().asType())
|
||||
mayThrow { _class.setValue(field, jdiValue) }
|
||||
}
|
||||
|
||||
@@ -220,7 +220,7 @@ public class JDIEval(
|
||||
val field = findField(fieldDesc)
|
||||
val obj = instance.jdiObj.checkNull()
|
||||
|
||||
val jdiValue = newValue.asJdiValue(vm, field.`type`().asType())
|
||||
val jdiValue = newValue.asJdiValue(vm, field.type().asType())
|
||||
mayThrow { obj.setValue(field, jdiValue) }
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ public fun jdi.Value?.asValue(): Value {
|
||||
is jdi.LongValue -> LongValue(longValue())
|
||||
is jdi.FloatValue -> FloatValue(floatValue())
|
||||
is jdi.DoubleValue -> DoubleValue(doubleValue())
|
||||
is jdi.ObjectReference -> ObjectValue(this, `type`().asType())
|
||||
is jdi.ObjectReference -> ObjectValue(this, type().asType())
|
||||
else -> throw JDIFailureException("Unknown value: $this")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user