Skip to content

Commit 02e58ea

Browse files
authored
Upgrade jacodb: fix type names (#257)
1 parent df9c103 commit 02e58ea

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

buildSrc/src/main/kotlin/Dependencies.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ object Versions {
66
const val clikt = "5.0.0"
77
const val detekt = "1.23.7"
88
const val ini4j = "0.5.4"
9-
const val jacodb = "ad9d0475be"
9+
const val jacodb = "453ec7c0b3"
1010
const val juliet = "1.3.2"
1111
const val junit = "5.9.3"
1212
const val kotlin = "2.1.0"

usvm-jvm-instrumentation/src/main/kotlin/org/usvm/instrumentation/instrumentation/TraceHelper.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ class TraceHelper(
3333
private fun createJcVirtualMethod(jMethod: Method): JcVirtualMethod = JcVirtualMethodImpl(
3434
name = jMethod.name,
3535
access = jMethod.modifiers,
36-
returnType = TypeNameImpl(jMethod.returnType.name),
36+
returnType = TypeNameImpl.fromTypeName(jMethod.returnType.name),
3737
parameters = createJcVirtualMethodParams(jMethod),
3838
description = ""
3939
)
4040

4141
private fun createJcVirtualMethodParams(jMethod: Method): List<JcVirtualParameter> =
42-
jMethod.parameters.mapIndexed { i, p -> JcVirtualParameter(i, TypeNameImpl(p.type.typeName)) }
42+
jMethod.parameters.mapIndexed { i, p -> JcVirtualParameter(i, TypeNameImpl.fromTypeName(p.type.typeName)) }
4343

4444
/**
4545
* This method create instrumenting method call to insert it in instruction list

usvm-jvm-instrumentation/src/main/kotlin/org/usvm/instrumentation/util/Jacodb.kt

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,7 @@ fun JcClasspath.findFieldByFullNameOrNull(fieldFullName: String): JcField? {
2424
operator fun JcClasspath.get(klass: Class<*>) = this.findClassOrNull(klass.name)
2525

2626
val JcClassOrInterface.typename
27-
get() = TypeNameImpl(this.name)
28-
29-
val JcMethod.typename
30-
get() = TypeNameImpl(this.name)
31-
32-
val JcTypedMethod.typename
33-
get() = TypeNameImpl(this.name)
27+
get() = TypeNameImpl.fromTypeName(this.name)
3428

3529
fun JcType.toStringType(): String =
3630
when (this) {
@@ -40,7 +34,7 @@ fun JcType.toStringType(): String =
4034
else -> typeName
4135
}
4236

43-
fun JcType.getTypename() = TypeNameImpl(this.typeName)
37+
fun JcType.getTypename() = TypeNameImpl.fromTypeName(this.typeName)
4438

4539
val JcInst.enclosingClass
4640
get() = this.location.method.enclosingClass

0 commit comments

Comments
 (0)