[JS IR] Optimize JS AST for closures
^KT-58891 Fixed
This commit is contained in:
committed by
Space Team
parent
524c475834
commit
a588e75c11
+6
-2
@@ -19,5 +19,9 @@ package org.jetbrains.kotlin.js.testOld.optimizer
|
||||
import org.junit.Test
|
||||
|
||||
class DeadCodeEliminationTest : BasicOptimizerTest("dead-code-elimination") {
|
||||
@Test fun switchCases() = box()
|
||||
}
|
||||
@Test
|
||||
fun switchCases() = box()
|
||||
|
||||
@Test
|
||||
fun afterReturn() = box()
|
||||
}
|
||||
|
||||
+6
@@ -6928,6 +6928,12 @@ public class FirJsBoxTestGenerated extends AbstractFirJsBoxTest {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/box/jsAstOptimizations"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("deadCodeElimination.kt")
|
||||
public void testDeadCodeElimination() throws Exception {
|
||||
runTest("js/js.translator/testData/box/jsAstOptimizations/deadCodeElimination.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("tempVarDeclOnAssignment.kt")
|
||||
public void testTempVarDeclOnAssignment() throws Exception {
|
||||
|
||||
+6
@@ -7034,6 +7034,12 @@ public class IrBoxJsES6TestGenerated extends AbstractIrBoxJsES6Test {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/box/jsAstOptimizations"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("deadCodeElimination.kt")
|
||||
public void testDeadCodeElimination() throws Exception {
|
||||
runTest("js/js.translator/testData/box/jsAstOptimizations/deadCodeElimination.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("tempVarDeclOnAssignment.kt")
|
||||
public void testTempVarDeclOnAssignment() throws Exception {
|
||||
|
||||
+6
@@ -6928,6 +6928,12 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/box/jsAstOptimizations"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("deadCodeElimination.kt")
|
||||
public void testDeadCodeElimination() throws Exception {
|
||||
runTest("js/js.translator/testData/box/jsAstOptimizations/deadCodeElimination.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("tempVarDeclOnAssignment.kt")
|
||||
public void testTempVarDeclOnAssignment() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user