Skip to content

Commit 9a92abf

Browse files
Rebase fixes
1 parent 1af572d commit 9a92abf

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

usvm-core/src/main/kotlin/org/usvm/types/SupportTypeStream.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class USupportTypeStream<Type> private constructor(
7979
)
8080

8181
override fun take(n: Int): Set<Type> {
82-
val set = fromQueries.take(n).toMutableSet()
82+
val set = cacheFromQueries.take(n).toMutableSet()
8383
val iterator = cachingSequence.iterator()
8484
while (set.size < n && iterator.hasNext()) {
8585
set += iterator.next()

usvm-jvm/src/main/kotlin/org/usvm/machine/JcExprResolver.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ import org.usvm.machine.operator.JcUnaryOperator
9797
import org.usvm.machine.operator.ensureBvExpr
9898
import org.usvm.machine.operator.mkNarrow
9999
import org.usvm.machine.operator.wideTo32BitsIfNeeded
100+
import org.usvm.machine.resolver.JcInvokeResolver
100101
import org.usvm.machine.state.JcMethodResult
101102
import org.usvm.machine.state.JcState
102103
import org.usvm.machine.state.throwExceptionWithoutStackFrameDrop
@@ -336,7 +337,7 @@ class JcExprResolver(
336337
val argsWithTypes = expr.args.zip(method.parameters.map { it.type })
337338

338339
argsWithTypes.mapTo(arguments) { (expr, type) ->
339-
resolveJcExpr(expr, type) ?: return@resolveInvoke null
340+
resolveJcExpr(expr, type) ?: return null
340341
}
341342
with(invokeResolver) { resolveSpecialInvoke(method.method, arguments) }
342343
}
@@ -390,9 +391,9 @@ class JcExprResolver(
390391
}
391392
}
392393

393-
private fun resolveInvoke(
394+
private inline fun resolveInvoke(
394395
method: JcTypedMethod,
395-
resolveArguments: () -> List<UExpr<out USort>>?,
396+
onNoCallPresent: JcStepScope.() -> Unit,
396397
): UExpr<out USort>? = ensureStaticFieldsInitialized(method.enclosingType) {
397398
resolveInvokeNoStaticInitializationCheck(onNoCallPresent)
398399
}
@@ -408,8 +409,7 @@ class JcExprResolver(
408409
}
409410

410411
is JcMethodResult.NoCall -> {
411-
val arguments = resolveArguments() ?: return null
412-
scope.doWithState { addNewMethodCall(applicationGraph, method.method, arguments) }
412+
scope.onNoCallPresent()
413413
null
414414
}
415415

usvm-jvm/src/main/kotlin/org/usvm/machine/JcInterpreter.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import org.usvm.UBoolExpr
2929
import org.usvm.UHeapRef
3030
import org.usvm.UInterpreter
3131
import org.usvm.URegisterLValue
32-
import org.usvm.machine.resolver.JcExprResolver
3332
import org.usvm.machine.resolver.JcTypeSelector
3433
import org.usvm.machine.resolver.JcVirtualInvokeResolver
3534
import org.usvm.machine.state.JcMethodResult

usvm-jvm/src/test/kotlin/org/usvm/samples/invokes/SimpleInterfaceExampleTest.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import org.usvm.test.util.checkers.eq
77

88
internal class SimpleInterfaceExampleTest : JavaMethodTestRunner() {
99
@Test
10-
@Disabled("Expected exactly 3 executions, but 2 found. Virtual invokes are not supported yet")
1110
fun testOverrideMethod() {
1211
checkDiscoveredProperties(
1312
SimpleInterfaceExample::overrideMethod,

0 commit comments

Comments
 (0)