Add kotlin.build.useIR property to compile project with JVM IR
The change in Devirtualization.kt is needed to workaround JVM IR issue reported at KT-43286. (cherry picked from commit 4a945686bae98c147a641c0b41d3e8474f133ca2)
This commit is contained in:
committed by
Stanislav Erokhin
parent
b919685795
commit
10a1ea9091
+1
-1
@@ -820,7 +820,7 @@ internal object Devirtualization {
|
||||
val value = fromId.toLong() or (toId.toLong() shl 32)
|
||||
// This is 64-bit extension of a hashing method from Knuth's "The Art of Computer Programming".
|
||||
// The magic constant is the closest prime to 2^64 * phi, where phi is the golden ratio.
|
||||
val bucketIdx = ((value.toULong() * 11400714819323198393UL) % bagOfEdges.size.toUInt()).toInt()
|
||||
val bucketIdx = ((value.toULong() * 11400714819323198393UL) % bagOfEdges.size.toULong()).toInt()
|
||||
val bucket = bagOfEdges[bucketIdx] ?: LongArrayList().also { bagOfEdges[bucketIdx] = it }
|
||||
for (x in bucket)
|
||||
if (x == value) return
|
||||
|
||||
Reference in New Issue
Block a user