Initial version of RangeContainsLowering, which optimizes calls to
contains() on ClosedRanges.
This commit is contained in:
committed by
Alexander Udalov
parent
ca541337d1
commit
1c1b1b4b0f
@@ -1,5 +1,3 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// TODO KT-36829 Optimize 'in' expressions in JVM_IR
|
||||
fun testPrimitiveArray(i: Int, ints: IntArray) = i in ints.indices
|
||||
|
||||
fun testObjectArray(i: Int, xs: Array<Any>) = i in xs.indices
|
||||
@@ -13,4 +11,9 @@ fun testLongWithObjectArray(i: Long, xs: Array<Any>) = i in xs.indices
|
||||
// 2 I2L
|
||||
// 4 ARRAYLENGTH
|
||||
// 2 LCONST_0
|
||||
|
||||
// JVM_TEMPLATES
|
||||
// 6 ICONST_0
|
||||
|
||||
// JVM_IR_TEMPLATES
|
||||
// 10 ICONST_0
|
||||
Reference in New Issue
Block a user