[K2, MPP] Add common constructorCache to Fir2IrCommonMemberStorage
Use it in Fir2IrDeclarationStorage ^KT-56660 Fixed
This commit is contained in:
committed by
Space Team
parent
930237b60e
commit
227018624e
@@ -45,6 +45,8 @@ class Fir2IrCommonMemberStorage(
|
||||
|
||||
val functionCache: ConcurrentHashMap<FirFunction, IrSimpleFunction> = ConcurrentHashMap()
|
||||
|
||||
val constructorCache: ConcurrentHashMap<FirConstructor, IrConstructor> = ConcurrentHashMap()
|
||||
|
||||
val propertyCache: ConcurrentHashMap<FirProperty, IrProperty> = ConcurrentHashMap()
|
||||
|
||||
val fakeOverridesInClass: MutableMap<IrClass, MutableMap<FirCallableDeclaration, FirCallableDeclaration>> = mutableMapOf()
|
||||
|
||||
+1
-1
@@ -80,7 +80,7 @@ class Fir2IrDeclarationStorage(
|
||||
|
||||
private val functionCache: ConcurrentHashMap<FirFunction, IrSimpleFunction> = commonMemberStorage.functionCache
|
||||
|
||||
private val constructorCache: ConcurrentHashMap<FirConstructor, IrConstructor> = ConcurrentHashMap()
|
||||
private val constructorCache: ConcurrentHashMap<FirConstructor, IrConstructor> = commonMemberStorage.constructorCache
|
||||
|
||||
private val initializerCache: ConcurrentHashMap<FirAnonymousInitializer, IrAnonymousInitializer> = ConcurrentHashMap()
|
||||
|
||||
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
$TESTDATA_DIR$/firMppWithKlib/common.kt
|
||||
$TESTDATA_DIR$/firMppWithKlib/platform.kt
|
||||
-Xcommon-sources=$TESTDATA_DIR$/firMppWithKlib/common.kt
|
||||
-language-version
|
||||
2.0
|
||||
-ir-output-dir
|
||||
$TEMP_DIR$
|
||||
-ir-output-name
|
||||
firMppWithKlib
|
||||
-XXLanguage\:+MultiPlatformProjects
|
||||
-Xir-produce-klib-file=true
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
warning: ATTENTION!
|
||||
This build uses unsafe internal compiler arguments:
|
||||
|
||||
-XXLanguage:+MultiPlatformProjects
|
||||
|
||||
This mode is not recommended for production use,
|
||||
as no stability/compatibility guarantees are given on
|
||||
compiler or generated code. Use it at your own risk!
|
||||
|
||||
warning: language version 2.0 is experimental, there are no backwards compatibility guarantees for new language and library features
|
||||
OK
|
||||
@@ -0,0 +1 @@
|
||||
class Klass
|
||||
@@ -0,0 +1,3 @@
|
||||
fun foo() {
|
||||
Klass()
|
||||
}
|
||||
@@ -1328,6 +1328,11 @@ public class CliTestGenerated extends AbstractCliTest {
|
||||
runTest("compiler/testData/cli/js/firMpp.args");
|
||||
}
|
||||
|
||||
@TestMetadata("firMppWithKlib.args")
|
||||
public void testFirMppWithKlib() throws Exception {
|
||||
runTest("compiler/testData/cli/js/firMppWithKlib.args");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineCycle.args")
|
||||
public void testInlineCycle() throws Exception {
|
||||
runTest("compiler/testData/cli/js/inlineCycle.args");
|
||||
|
||||
Reference in New Issue
Block a user