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
23 lines
453 B
Kotlin
Vendored
23 lines
453 B
Kotlin
Vendored
fun box(x: Int) {
|
|
println(
|
|
when (
|
|
x
|
|
) {
|
|
1,
|
|
2,
|
|
3 ->
|
|
55
|
|
|
|
4,
|
|
5 ->
|
|
66
|
|
|
|
else ->
|
|
77
|
|
}
|
|
)
|
|
}
|
|
|
|
// LINES(JS): 1 19 4 4 3 3 4 6 9 9 6 11 13 13 11 16 16 3 2
|
|
// LINES(JS_IR): 1 1 2 8 7 6 4 6 7 4 7 8 4 8 9 12 11 4 11 12 4 12 13 16
|