Initial version of RangeContainsLowering, which optimizes calls to

contains() on ClosedRanges.
This commit is contained in:
Mark Punzalan
2020-08-04 23:44:04 -07:00
committed by Alexander Udalov
parent ca541337d1
commit 1c1b1b4b0f
36 changed files with 1194 additions and 57 deletions
@@ -1,5 +1,3 @@
// IGNORE_BACKEND: JVM_IR
// TODO KT-36829 Optimize 'in' expressions in JVM_IR
fun testCharSequence(i: Int, cs: CharSequence) = i in cs.indices
fun testLongWithCharSequence(i: Long, cs: CharSequence) = i in cs.indices
@@ -7,5 +5,4 @@ fun testLongWithCharSequence(i: Long, cs: CharSequence) = i in cs.indices
// 0 getIndices
// 0 contains
// 2 length
// 1 I2L
// 1 I2L