[JS IR] Wrap private top level function with internal accessor stub

In case internal inline function references private top level function
after inline such function (T.L.P.) couldn't be referenced
in klib and IC cache. So create internally visible accessors for P.T.L.
function similar to what JVM backend does.

 - add box test
This commit is contained in:
Roman Artemev
2021-08-09 20:23:46 +03:00
committed by TeamCityServer
parent b3dbca7ea6
commit d3ddeef67f
11 changed files with 312 additions and 1 deletions
@@ -15980,6 +15980,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
runTest("compiler/testData/codegen/box/ir/privateSignatures/localFakeOverride.kt");
}
@TestMetadata("privateLeakThroughInline.kt")
public void testPrivateLeakThroughInline() throws Exception {
runTest("compiler/testData/codegen/box/ir/privateSignatures/privateLeakThroughInline.kt");
}
@TestMetadata("topLevelPrivateDelegate.kt")
public void testTopLevelPrivateDelegate() throws Exception {
runTest("compiler/testData/codegen/box/ir/privateSignatures/topLevelPrivateDelegate.kt");
@@ -15386,6 +15386,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/ir/privateSignatures/localFakeOverride.kt");
}
@TestMetadata("privateLeakThroughInline.kt")
public void testPrivateLeakThroughInline() throws Exception {
runTest("compiler/testData/codegen/box/ir/privateSignatures/privateLeakThroughInline.kt");
}
@TestMetadata("topLevelPrivateDelegate.kt")
public void testTopLevelPrivateDelegate() throws Exception {
runTest("compiler/testData/codegen/box/ir/privateSignatures/topLevelPrivateDelegate.kt");
@@ -15451,6 +15451,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/ir/privateSignatures/localFakeOverride.kt");
}
@TestMetadata("privateLeakThroughInline.kt")
public void testPrivateLeakThroughInline() throws Exception {
runTest("compiler/testData/codegen/box/ir/privateSignatures/privateLeakThroughInline.kt");
}
@TestMetadata("topLevelPrivateDelegate.kt")
public void testTopLevelPrivateDelegate() throws Exception {
runTest("compiler/testData/codegen/box/ir/privateSignatures/topLevelPrivateDelegate.kt");
@@ -9075,6 +9075,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
public void testEnumEntryArguments() throws Exception {
runTest("compiler/testData/codegen/box/ir/privateSignatures/enumEntryArguments.kt");
}
@TestMetadata("privateLeakThroughInline.kt")
public void testPrivateLeakThroughInline() throws Exception {
runTest("compiler/testData/codegen/box/ir/privateSignatures/privateLeakThroughInline.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/ir/serializationRegressions")