FIR: don't flatten for loop blocks in raw FIR builder

This commit is contained in:
Mikhail Glukhikh
2021-04-16 15:47:44 +03:00
parent a736d62edd
commit 43a2ad0467
27 changed files with 1255 additions and 1105 deletions
@@ -3,18 +3,21 @@ FILE: manyLocalVariables.kt
lvar a: R|kotlin/Int| = Int(1)
lvar b: R|kotlin/Int| = Int(2)
lvar c: R|kotlin/Int| = Int(3)
lval <iterator>: R|kotlin/collections/IntIterator| = Int(0).R|kotlin/Int.rangeTo|(Int(5)).R|kotlin/ranges/IntProgression.iterator|()
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
when () {
==(R|<local>/a|, Int(2)) -> {
R|<local>/b| = R|<local>/c|
R|<local>/c| = R|<local>/a|
}
else -> {
R|<local>/b| = R|<local>/a|
R|<local>/c| = R|<local>/b|
{
lval <iterator>: R|kotlin/collections/IntIterator| = Int(0).R|kotlin/Int.rangeTo|(Int(5)).R|kotlin/ranges/IntProgression.iterator|()
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
when () {
==(R|<local>/a|, Int(2)) -> {
R|<local>/b| = R|<local>/c|
R|<local>/c| = R|<local>/a|
}
else -> {
R|<local>/b| = R|<local>/a|
R|<local>/c| = R|<local>/b|
}
}
}
}