79d378f2bd
The patch adopts and reuses the optimizations from the legacy backend. The optimizations remove useless temporary variables, statements and simplify generated JS code. The optimizations can be disabled by `-Xoptimize-generated-js=false`. Related to KT-51139
16 lines
320 B
Kotlin
Vendored
16 lines
320 B
Kotlin
Vendored
fun box() {
|
|
println("1")
|
|
bar()
|
|
println("2")
|
|
bar()
|
|
println("3")
|
|
}
|
|
|
|
inline fun bar() {
|
|
println("bar1")
|
|
println("bar2")
|
|
}
|
|
|
|
// LINES(JS): 1 7 2 2 10 10 11 11 4 4 10 10 11 11 6 6 9 9 9 9 9 12 10 10 11 11
|
|
// LINES(JS_IR): 1 1 2 2 * 10 10 11 11 4 4 * 10 10 11 11 6 6 9 9 10 10 11 11
|