[JS IR] Perform optimizations on the generated JS code

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
This commit is contained in:
Alexander Korepanov
2023-04-11 20:04:28 +02:00
committed by Space Team
parent 84b5af3c89
commit 79d378f2bd
87 changed files with 173 additions and 224 deletions
@@ -30,8 +30,4 @@ fun box(): String {
// test.kt:16 box
// EXPECTATIONS JS_IR
// test.kt:2 box
// test.kt:3 box
// test.kt:7 box
// test.kt:10 box
// test.kt:16 box