[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
@@ -12,9 +12,12 @@ FILE: fib.kt
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(2).R|kotlin/Int.rangeTo|(R|<local>/n|).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|()
|
||||
lval temp: R|kotlin/Int| = R|<local>/current|
|
||||
R|<local>/current| = R|<local>/current|.R|kotlin/Int.plus|(R|<local>/prev|)
|
||||
R|<local>/prev| = R|<local>/temp|
|
||||
{
|
||||
lval temp: R|kotlin/Int| = R|<local>/current|
|
||||
R|<local>/current| = R|<local>/current|.R|kotlin/Int.plus|(R|<local>/prev|)
|
||||
R|<local>/prev| = R|<local>/temp|
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user