https://kotlinlang.org logo
#compiler
Title
# compiler
m

Marc Knaup

10/16/2020, 12:38 AM
Is it still the case that the bytecode viewer in IDEA doesn’t properly reflect the final Java class output? Simple things like
(0..10).forEach { … }
cause an
IntRange
and an iterator to be allocated. If I recall correctly calls like that are supposed to be optimized.
i

Iaroslav Postovalov

10/16/2020, 2:19 AM
It's unstable feature with many restrictions. I usually run
javap -v
for generated classes, and it works OK
🙏 2
However, it would be nice if Kotlin had a decompiler at least for subset of code emitted by backend :(
2 Views