Handle withIndex() on arrays and CharSequences in ForLoopsLowering.

This commit is contained in:
Mark Punzalan
2019-11-04 16:13:56 -08:00
committed by max-kammerer
parent 735535dd5a
commit a54d9482dd
25 changed files with 633 additions and 142 deletions
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JVM_IR
val arr = arrayOf("a", "b", "c", "d")
fun box(): String {
@@ -19,3 +18,6 @@ fun box(): String {
// 0 component1
// 0 component2
// 1 ARRAYLENGTH
// The 1st ICONST_0 is for initializing the array. 2nd is for initializing the index in the lowered for-loop.
// 2 ICONST_0
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JVM_IR
val arr = arrayOf("a", "b", "c", "d")
fun box(): String {
@@ -19,3 +18,6 @@ fun box(): String {
// 0 component1
// 0 component2
// 1 ARRAYLENGTH
// The 1st ICONST_0 is for initializing the array. 2nd is for initializing the index in the lowered for-loop.
// 2 ICONST_0
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JVM_IR
val arr = intArrayOf()
fun box(): String {
@@ -16,3 +15,6 @@ fun box(): String {
// 0 component1
// 0 component2
// 1 ARRAYLENGTH
// The 1st ICONST_0 is for initializing the array. 2nd is for initializing the index in the lowered for-loop.
// 2 ICONST_0
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JVM_IR
val arr = intArrayOf(10, 20, 30, 40)
fun box(): String {
@@ -17,3 +16,6 @@ fun box(): String {
// 0 component1
// 0 component2
// 1 ARRAYLENGTH
// The 1st ICONST_0 is for initializing the array. 2nd is for initializing the index in the lowered for-loop.
// 2 ICONST_0
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JVM_IR
val arr = arrayOf("a", "b", "c", "d")
fun box(): String {
@@ -19,3 +18,6 @@ fun box(): String {
// 0 component1
// 0 component2
// 1 ARRAYLENGTH
// The 1st ICONST_0 is for initializing the array. 2nd is for initializing the index in the lowered for-loop.
// 2 ICONST_0