[FIR] Create separated FirBlock for loop local val
Refactor FIR builders code for ForExpression
This commit is contained in:
committed by
Space Team
parent
e49bb1fe37
commit
a3e7a35cb1
Vendored
+11
-8
@@ -7,15 +7,18 @@ FILE: manyLocalVariables.kt
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(0).R|kotlin/Int.rangeTo|(Int(5)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/IntIterator.hasNext: R|kotlin/Boolean|>|()) {
|
||||
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|
|
||||
{
|
||||
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|
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user