[JS IR] Implement MoveTemporaryVariableDeclarationToAssignment optimization
This commit is contained in:
committed by
Space Team
parent
25f7b81d51
commit
524c475834
+16
@@ -6919,6 +6919,22 @@ public class FirJsBoxTestGenerated extends AbstractFirJsBoxTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/box/jsAstOptimizations")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class JsAstOptimizations {
|
||||
@Test
|
||||
public void testAllFilesPresentInJsAstOptimizations() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/box/jsAstOptimizations"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("tempVarDeclOnAssignment.kt")
|
||||
public void testTempVarDeclOnAssignment() throws Exception {
|
||||
runTest("js/js.translator/testData/box/jsAstOptimizations/tempVarDeclOnAssignment.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/box/jsCode")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+16
@@ -7025,6 +7025,22 @@ public class IrBoxJsES6TestGenerated extends AbstractIrBoxJsES6Test {
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/box/jsAstOptimizations")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class JsAstOptimizations {
|
||||
@Test
|
||||
public void testAllFilesPresentInJsAstOptimizations() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/box/jsAstOptimizations"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("tempVarDeclOnAssignment.kt")
|
||||
public void testTempVarDeclOnAssignment() throws Exception {
|
||||
runTest("js/js.translator/testData/box/jsAstOptimizations/tempVarDeclOnAssignment.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/box/jsCode")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+16
@@ -6919,6 +6919,22 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/box/jsAstOptimizations")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class JsAstOptimizations {
|
||||
@Test
|
||||
public void testAllFilesPresentInJsAstOptimizations() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/box/jsAstOptimizations"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("tempVarDeclOnAssignment.kt")
|
||||
public void testTempVarDeclOnAssignment() throws Exception {
|
||||
runTest("js/js.translator/testData/box/jsAstOptimizations/tempVarDeclOnAssignment.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("js/js.translator/testData/box/jsCode")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
Reference in New Issue
Block a user