Handle withIndex() on Iterables (including progressions) and Sequences

in ForLoopsLowering.
This commit is contained in:
Mark Punzalan
2019-11-05 11:15:33 -08:00
committed by max-kammerer
parent a54d9482dd
commit 7adffe0007
49 changed files with 1357 additions and 42 deletions

View File

@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JVM_IR
val xs = listOf<Any>()
fun box(): String {
@@ -15,3 +14,6 @@ fun box(): String {
// 1 next
// 0 component1
// 0 component2
// The 1st ICONST_0 is for initializing the list. 2nd is for initializing the index in the lowered for-loop.
// 2 ICONST_0

View File

@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JVM_IR
val xs = listOf("a", "b", "c", "d")
fun box(): String {
@@ -18,3 +17,6 @@ fun box(): String {
// 1 next
// 0 component1
// 0 component2
// The 1st ICONST_0 is for initializing the list. 2nd is for initializing the index in the lowered for-loop.
// 2 ICONST_0

View File

@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JVM_IR
val xs = listOf("a", "b", "c", "d")
fun box(): String {
@@ -18,3 +17,6 @@ fun box(): String {
// 1 next
// 0 component1
// 0 component2
// The 1st ICONST_0 is for initializing the list. 2nd is for initializing the index in the lowered for-loop.
// 2 ICONST_0

View File

@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JVM_IR
val xs = listOf("a", "b", "c", "d")
fun box(): String {
@@ -18,3 +17,6 @@ fun box(): String {
// 1 next
// 0 component1
// 0 component2
// The 1st ICONST_0 is for initializing the list. 2nd is for initializing the index in the lowered for-loop.
// 2 ICONST_0

View File

@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JVM_IR
val xs = listOf("a", "b", "c", "d")
fun useAny(x: Any) {}
@@ -21,3 +20,6 @@ fun box(): String {
// 1 next
// 0 component1
// 0 component2
// The 1st ICONST_0 is for initializing the list. 2nd is for initializing the index in the lowered for-loop.
// 2 ICONST_0