[JS IR] Support function type interfaces in incremental cache infrastructure
The patch removes logic of generating extra IrFiles (fake file) into IrModuleFragment for the function type interfaces during klib deserialization, because IC infrastructure can not process files which do not exist in klib. Instead of adding extra IrFiles during deserialization, the empty files with required packages are added into Kotlin/JS stdlib physically. These files are used as containers for function type interface declarations. Since Kotlin/WASM uses the same klib loading infrastructure as Kotlin/JS, the the empty files are added into Kotlin/WASM stdlib as well. The patch also adds a check that IrModuleFagment has files only from klib. ^KT-55720 Fixed
This commit is contained in:
committed by
Space Team
parent
1c3c5417ad
commit
9324cf3360
Generated
+5
@@ -170,6 +170,11 @@ public class JsIrES6InvalidationTestGenerated extends AbstractJsIrES6Invalidatio
|
||||
runTest("js/js.translator/testData/incremental/invalidation/functionSignature/");
|
||||
}
|
||||
|
||||
@TestMetadata("functionalInterface")
|
||||
public void testFunctionalInterface() throws Exception {
|
||||
runTest("js/js.translator/testData/incremental/invalidation/functionalInterface/");
|
||||
}
|
||||
|
||||
@TestMetadata("genericFunctions")
|
||||
public void testGenericFunctions() throws Exception {
|
||||
runTest("js/js.translator/testData/incremental/invalidation/genericFunctions/");
|
||||
|
||||
+5
@@ -170,6 +170,11 @@ public class JsIrInvalidationTestGenerated extends AbstractJsIrInvalidationTest
|
||||
runTest("js/js.translator/testData/incremental/invalidation/functionSignature/");
|
||||
}
|
||||
|
||||
@TestMetadata("functionalInterface")
|
||||
public void testFunctionalInterface() throws Exception {
|
||||
runTest("js/js.translator/testData/incremental/invalidation/functionalInterface/");
|
||||
}
|
||||
|
||||
@TestMetadata("genericFunctions")
|
||||
public void testGenericFunctions() throws Exception {
|
||||
runTest("js/js.translator/testData/incremental/invalidation/genericFunctions/");
|
||||
|
||||
@@ -861,6 +861,12 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
||||
public void testSuspendFunctionIsAs() throws Exception {
|
||||
runTest("js/js.translator/testData/box/coroutines/suspendFunctionIsAs.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("suspendFunctionalInterface.kt")
|
||||
public void testSuspendFunctionalInterface() throws Exception {
|
||||
runTest("js/js.translator/testData/box/coroutines/suspendFunctionalInterface.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
|
||||
+6
@@ -925,6 +925,12 @@ public class FirJsBoxTestGenerated extends AbstractFirJsBoxTest {
|
||||
public void testSuspendFunctionIsAs() throws Exception {
|
||||
runTest("js/js.translator/testData/box/coroutines/suspendFunctionIsAs.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("suspendFunctionalInterface.kt")
|
||||
public void testSuspendFunctionalInterface() throws Exception {
|
||||
runTest("js/js.translator/testData/box/coroutines/suspendFunctionalInterface.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
|
||||
+6
@@ -925,6 +925,12 @@ public class IrBoxJsES6TestGenerated extends AbstractIrBoxJsES6Test {
|
||||
public void testSuspendFunctionIsAs() throws Exception {
|
||||
runTest("js/js.translator/testData/box/coroutines/suspendFunctionIsAs.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("suspendFunctionalInterface.kt")
|
||||
public void testSuspendFunctionalInterface() throws Exception {
|
||||
runTest("js/js.translator/testData/box/coroutines/suspendFunctionalInterface.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
|
||||
+6
@@ -925,6 +925,12 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest {
|
||||
public void testSuspendFunctionIsAs() throws Exception {
|
||||
runTest("js/js.translator/testData/box/coroutines/suspendFunctionIsAs.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("suspendFunctionalInterface.kt")
|
||||
public void testSuspendFunctionalInterface() throws Exception {
|
||||
runTest("js/js.translator/testData/box/coroutines/suspendFunctionalInterface.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
|
||||
Reference in New Issue
Block a user