Skip to content

Commit d4564b6

Browse files
committed
Extract const
1 parent f300014 commit d4564b6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

usvm-ts/src/main/kotlin/org/usvm/machine/expr/CallApproximations.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,13 +328,12 @@ private fun TsExprResolver.handleArrayFill(
328328
val auxArray = memory.allocConcrete(arrayType)
329329

330330
// Initialize the auxiliary array filled with the given `value`
331-
// TODO: why 10000?
332331
memory.initializeArray(
333332
auxArray,
334333
arrayType,
335334
elementSort,
336335
sizeSort,
337-
(0 until 10_000).asSequence().map { value.asExpr(elementSort) }
336+
(0 until ARRAY_FILL_SIZE).asSequence().map { value.asExpr(elementSort) }
338337
)
339338

340339
// Copy the initialized aux array to the target array
@@ -353,6 +352,9 @@ private fun TsExprResolver.handleArrayFill(
353352
}
354353
}
355354

355+
// TODO: why?
356+
private const val ARRAY_FILL_SIZE = 10_000
357+
356358
/**
357359
* Handle the `Array.shift()` method call.
358360
* Removes the first element from the array and returns it.

0 commit comments

Comments
 (0)