[JS IR] IC improvements

- Reuse a built fragment
  - Use cache for saving built JS code
This commit is contained in:
Alexander Korepanov
2022-03-30 18:19:28 +03:00
committed by Space
parent f8ae097e50
commit 9952d43252
137 changed files with 1280 additions and 899 deletions
@@ -0,0 +1,12 @@
fun box(stepId: Int): String {
when (stepId) {
0 -> if (qux() != 44) return "Fail"
1 -> if (qux() != 66) return "Fail"
2 -> if (qux() != 40) return "Fail"
3 -> if (qux() != 18) return "Fail"
4 -> if (qux() != 14) return "Fail"
else -> return "Unknown"
}
return "OK"
}
@@ -0,0 +1,11 @@
fun box(stepId: Int): String {
when (stepId) {
5 -> if (qux() != 14) return "Fail"
6 -> if (qux() != 104) return "Fail"
else -> return "Unknown"
}
if (baz(77) != 79) return "Fail"
if (baz("test") != 4) return "Fail"
return "OK"
}
@@ -0,0 +1,12 @@
STEP 0:
dependencies: stdlib, lib1, lib2
dirty: m.kt
STEP 1..4:
dependencies: stdlib, lib1, lib2
STEP 5:
dependencies: stdlib, lib1, lib2
modifications:
U : m.kt.5.txt -> m.kt
dirty: m.kt
STEP 6:
dependencies: stdlib, lib1, lib2