[K/Wasm] Convert non-capturing lambdas into singletons ^KT-64803 Fixed
This commit is contained in:
+6
@@ -7342,6 +7342,12 @@ public class LLFirBlackBoxCodegenBasedTestGenerated extends AbstractLLFirBlackBo
|
||||
runTest("compiler/testData/codegen/box/closures/closureWithParameterAndBoxing.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("closuresAsSingleton.kt")
|
||||
public void testClosuresAsSingleton() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/closures/closuresAsSingleton.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("crossinlineLocalDeclaration.kt")
|
||||
public void testCrossinlineLocalDeclaration() throws Exception {
|
||||
|
||||
+6
@@ -7342,6 +7342,12 @@ public class LLFirReversedBlackBoxCodegenBasedTestGenerated extends AbstractLLFi
|
||||
runTest("compiler/testData/codegen/box/closures/closureWithParameterAndBoxing.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("closuresAsSingleton.kt")
|
||||
public void testClosuresAsSingleton() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/closures/closuresAsSingleton.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("crossinlineLocalDeclaration.kt")
|
||||
public void testCrossinlineLocalDeclaration() throws Exception {
|
||||
|
||||
+6
@@ -7343,6 +7343,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
|
||||
runTest("compiler/testData/codegen/box/closures/closureWithParameterAndBoxing.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("closuresAsSingleton.kt")
|
||||
public void testClosuresAsSingleton() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/closures/closuresAsSingleton.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("crossinlineLocalDeclaration.kt")
|
||||
public void testCrossinlineLocalDeclaration() throws Exception {
|
||||
|
||||
+6
@@ -7343,6 +7343,12 @@ public class FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated
|
||||
runTest("compiler/testData/codegen/box/closures/closureWithParameterAndBoxing.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("closuresAsSingleton.kt")
|
||||
public void testClosuresAsSingleton() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/closures/closuresAsSingleton.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("crossinlineLocalDeclaration.kt")
|
||||
public void testCrossinlineLocalDeclaration() throws Exception {
|
||||
|
||||
+6
@@ -7343,6 +7343,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
|
||||
runTest("compiler/testData/codegen/box/closures/closureWithParameterAndBoxing.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("closuresAsSingleton.kt")
|
||||
public void testClosuresAsSingleton() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/closures/closuresAsSingleton.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("crossinlineLocalDeclaration.kt")
|
||||
public void testCrossinlineLocalDeclaration() throws Exception {
|
||||
|
||||
@@ -26,6 +26,7 @@ class JsMapping : DefaultMapping() {
|
||||
val secondaryConstructorToFactory = DefaultDelegateFactory.newDeclarationToDeclarationMapping<IrConstructor, IrSimpleFunction>()
|
||||
val objectToGetInstanceFunction = DefaultDelegateFactory.newDeclarationToDeclarationMapping<IrClass, IrSimpleFunction>()
|
||||
val objectToInstanceField = DefaultDelegateFactory.newDeclarationToDeclarationMapping<IrClass, IrField>()
|
||||
val functionToInstanceField = DefaultDelegateFactory.newDeclarationToDeclarationMapping<IrClass, IrField>()
|
||||
val classToSyntheticPrimaryConstructor = DefaultDelegateFactory.newDeclarationToDeclarationMapping<IrClass, IrConstructor>()
|
||||
val privateMemberToCorrespondingStatic = DefaultDelegateFactory.newDeclarationToDeclarationMapping<IrFunction, IrSimpleFunction>()
|
||||
|
||||
|
||||
@@ -120,10 +120,6 @@ fun IrSimpleFunction.isObjectInstanceGetter(): Boolean {
|
||||
return origin == JsLoweredDeclarationOrigin.OBJECT_GET_INSTANCE_FUNCTION
|
||||
}
|
||||
|
||||
fun IrDeclaration.isObjectInstanceField(): Boolean {
|
||||
return this is IrField && isObjectInstanceField()
|
||||
}
|
||||
|
||||
fun IrField.isObjectInstanceField(): Boolean {
|
||||
return origin == IrDeclarationOrigin.FIELD_FOR_OBJECT_INSTANCE
|
||||
}
|
||||
|
||||
+8
-1
@@ -286,7 +286,6 @@ private val singleAbstractMethodPhase = makeIrModulePhase(
|
||||
description = "Replace SAM conversions with instances of interface-implementing classes"
|
||||
)
|
||||
|
||||
|
||||
private val localDelegatedPropertiesLoweringPhase = makeIrModulePhase<WasmBackendContext>(
|
||||
{ LocalDelegatedPropertiesLowering() },
|
||||
name = "LocalDelegatedPropertiesLowering",
|
||||
@@ -307,6 +306,13 @@ private val localClassExtractionPhase = makeIrModulePhase(
|
||||
prerequisite = setOf(localDeclarationsLoweringPhase)
|
||||
)
|
||||
|
||||
private val staticCallableReferenceLoweringPhase = makeIrModulePhase(
|
||||
::WasmStaticCallableReferenceLowering,
|
||||
name = "WasmStaticCallableReferenceLowering",
|
||||
description = "Turn static callable references into singletons",
|
||||
prerequisite = setOf(callableReferencePhase, localClassExtractionPhase)
|
||||
)
|
||||
|
||||
private val innerClassesLoweringPhase = makeIrModulePhase<WasmBackendContext>(
|
||||
{ context -> InnerClassesLowering(context, context.innerClassesSupport) },
|
||||
name = "InnerClassesLowering",
|
||||
@@ -653,6 +659,7 @@ val loweringList = listOf(
|
||||
localDelegatedPropertiesLoweringPhase,
|
||||
localDeclarationsLoweringPhase,
|
||||
localClassExtractionPhase,
|
||||
staticCallableReferenceLoweringPhase,
|
||||
innerClassesLoweringPhase,
|
||||
innerClassesMemberBodyLoweringPhase,
|
||||
innerClassConstructorCallsLoweringPhase,
|
||||
|
||||
+3
-2
@@ -7,6 +7,7 @@ package org.jetbrains.kotlin.backend.wasm.dce
|
||||
|
||||
import org.jetbrains.kotlin.backend.wasm.WasmBackendContext
|
||||
import org.jetbrains.kotlin.backend.wasm.ir2wasm.*
|
||||
import org.jetbrains.kotlin.backend.wasm.lower.isFunctionReferenceInstanceField
|
||||
import org.jetbrains.kotlin.backend.wasm.utils.*
|
||||
import org.jetbrains.kotlin.ir.backend.js.dce.UsefulDeclarationProcessor
|
||||
import org.jetbrains.kotlin.ir.backend.js.utils.*
|
||||
@@ -48,7 +49,7 @@ internal class WasmUsefulDeclarationProcessor(
|
||||
}
|
||||
|
||||
override fun visitSetField(expression: IrSetField, data: IrDeclaration) {
|
||||
if (!expression.symbol.owner.isObjectInstanceField()) {
|
||||
if (!expression.symbol.owner.run { isObjectInstanceField() || isFunctionReferenceInstanceField() }) {
|
||||
super.visitSetField(expression, data)
|
||||
}
|
||||
}
|
||||
@@ -56,7 +57,7 @@ internal class WasmUsefulDeclarationProcessor(
|
||||
override fun visitGetField(expression: IrGetField, data: IrDeclaration) {
|
||||
val field = expression.symbol.owner
|
||||
|
||||
if (field.isObjectInstanceField()) {
|
||||
if (field.isObjectInstanceField() || field.isFunctionReferenceInstanceField()) {
|
||||
field.type.classOrFail.owner.primaryConstructor?.enqueue(field, "object lazy initialization")
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -6,6 +6,7 @@
|
||||
package org.jetbrains.kotlin.backend.wasm.dce
|
||||
|
||||
import org.jetbrains.kotlin.backend.wasm.WasmBackendContext
|
||||
import org.jetbrains.kotlin.backend.wasm.lower.isFunctionReferenceInstanceField
|
||||
import org.jetbrains.kotlin.ir.IrElement
|
||||
import org.jetbrains.kotlin.ir.backend.js.utils.isObjectInstanceField
|
||||
import org.jetbrains.kotlin.ir.declarations.*
|
||||
@@ -56,7 +57,7 @@ class WasmUselessDeclarationsRemover(
|
||||
|
||||
private fun IrSimpleFunction.removeUnusedObjectsInitializers() {
|
||||
(body as? IrBlockBody)?.statements?.removeIf {
|
||||
it is IrSetField && it.symbol.owner.isObjectInstanceField() && it.symbol.owner !in usefulDeclarations
|
||||
it is IrSetField && it.symbol.owner.run { isObjectInstanceField() || isFunctionReferenceInstanceField() } && it.symbol.owner !in usefulDeclarations
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -310,7 +310,7 @@ internal class WasmPropertyReferenceLowering(val context: WasmBackendContext) :
|
||||
return type.classifier == expectedClass
|
||||
}
|
||||
|
||||
private companion object {
|
||||
private val DECLARATION_ORIGIN_KPROPERTIES_FOR_DELEGATION = IrDeclarationOriginImpl("KPROPERTIES_FOR_DELEGATION")
|
||||
companion object {
|
||||
val DECLARATION_ORIGIN_KPROPERTIES_FOR_DELEGATION = IrDeclarationOriginImpl("KPROPERTIES_FOR_DELEGATION")
|
||||
}
|
||||
}
|
||||
|
||||
+93
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.backend.wasm.lower
|
||||
|
||||
import org.jetbrains.kotlin.backend.common.FileLoweringPass
|
||||
import org.jetbrains.kotlin.backend.common.getOrPut
|
||||
import org.jetbrains.kotlin.backend.common.lower.createIrBuilder
|
||||
import org.jetbrains.kotlin.backend.wasm.WasmBackendContext
|
||||
import org.jetbrains.kotlin.backend.wasm.lower.WasmPropertyReferenceLowering.Companion.DECLARATION_ORIGIN_KPROPERTIES_FOR_DELEGATION
|
||||
import org.jetbrains.kotlin.descriptors.DescriptorVisibilities
|
||||
import org.jetbrains.kotlin.ir.IrStatement
|
||||
import org.jetbrains.kotlin.ir.backend.js.lower.CallableReferenceLowering.Companion.FUNCTION_REFERENCE_IMPL
|
||||
import org.jetbrains.kotlin.ir.backend.js.lower.CallableReferenceLowering.Companion.LAMBDA_IMPL
|
||||
import org.jetbrains.kotlin.ir.builders.declarations.buildField
|
||||
import org.jetbrains.kotlin.ir.builders.irCall
|
||||
import org.jetbrains.kotlin.ir.builders.irExprBody
|
||||
import org.jetbrains.kotlin.ir.declarations.*
|
||||
import org.jetbrains.kotlin.ir.expressions.IrConstructorCall
|
||||
import org.jetbrains.kotlin.ir.expressions.IrExpression
|
||||
import org.jetbrains.kotlin.ir.expressions.impl.IrGetFieldImpl
|
||||
import org.jetbrains.kotlin.ir.types.makeNullable
|
||||
import org.jetbrains.kotlin.ir.util.constructedClass
|
||||
import org.jetbrains.kotlin.ir.util.defaultType
|
||||
import org.jetbrains.kotlin.ir.util.primaryConstructor
|
||||
import org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid
|
||||
import org.jetbrains.kotlin.ir.visitors.transformChildrenVoid
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
|
||||
class WasmStaticCallableReferenceLowering(val context: WasmBackendContext) : FileLoweringPass {
|
||||
override fun lower(irFile: IrFile) {
|
||||
val irFields = mutableSetOf<IrField>()
|
||||
val firstKProperty = irFile.declarations.indexOfFirst { it.origin == DECLARATION_ORIGIN_KPROPERTIES_FOR_DELEGATION }
|
||||
|
||||
irFile.transformChildrenVoid(object : IrElementTransformerVoid() {
|
||||
override fun visitClass(declaration: IrClass): IrStatement {
|
||||
declaration.transformChildrenVoid()
|
||||
if (declaration.isSyntheticSingleton) {
|
||||
val functionReferenceField = declaration.getOrCreateInstanceField().apply {
|
||||
parent = irFile
|
||||
initializer = context.createIrBuilder(symbol).run {
|
||||
irExprBody(irCall(declaration.primaryConstructor!!))
|
||||
}
|
||||
}
|
||||
irFields.add(functionReferenceField)
|
||||
}
|
||||
return declaration
|
||||
}
|
||||
|
||||
override fun visitConstructorCall(expression: IrConstructorCall): IrExpression {
|
||||
val constructedClass = expression.symbol.owner.constructedClass
|
||||
if (!constructedClass.isSyntheticSingleton)
|
||||
return super.visitConstructorCall(expression)
|
||||
|
||||
val instanceField = constructedClass.getOrCreateInstanceField()
|
||||
return IrGetFieldImpl(expression.startOffset, expression.endOffset, instanceField.symbol, expression.type)
|
||||
}
|
||||
})
|
||||
|
||||
// Should be placed before KProperty initializations
|
||||
if (firstKProperty != -1) {
|
||||
irFile.declarations.addAll(firstKProperty, irFields)
|
||||
} else {
|
||||
irFile.declarations.addAll(irFields)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private fun IrClass.getOrCreateInstanceField(): IrField = context.mapping.functionToInstanceField.getOrPut(this) {
|
||||
val klass = this
|
||||
context.irFactory.buildField {
|
||||
name = Name.identifier(klass.name.asString() + "_instance")
|
||||
type = klass.defaultType.makeNullable()
|
||||
isStatic = true
|
||||
isFinal = true
|
||||
origin = FUNCTION_REFERENCE_SINGLETON_FIELD
|
||||
visibility = DescriptorVisibilities.PRIVATE
|
||||
}.apply {
|
||||
initializer = null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val FUNCTION_REFERENCE_SINGLETON_FIELD by IrDeclarationOriginImpl
|
||||
|
||||
fun IrField.isFunctionReferenceInstanceField(): Boolean {
|
||||
return origin == FUNCTION_REFERENCE_SINGLETON_FIELD
|
||||
}
|
||||
|
||||
val IrClass.isSyntheticSingleton: Boolean
|
||||
get() = (origin == LAMBDA_IMPL || origin == FUNCTION_REFERENCE_IMPL) && primaryConstructor!!.valueParameters.isEmpty()
|
||||
@@ -0,0 +1,7 @@
|
||||
// KT-64803
|
||||
|
||||
fun generateClosure(): () -> Unit = {}
|
||||
|
||||
fun box(): String {
|
||||
return if (generateClosure().hashCode() != generateClosure().hashCode()) "Fail: hashCode are not equals" else "OK"
|
||||
}
|
||||
+1
-1
@@ -25,7 +25,7 @@ fun box() {
|
||||
|
||||
// EXPECTATIONS WASM
|
||||
// test.kt:1 $box
|
||||
// test.kt:7 $box (9, 9, 4)
|
||||
// test.kt:7 $box (9, 4)
|
||||
// test.kt:4 $eval (27, 30)
|
||||
// test.kt:8 $box$lambda.invoke (9, 9, 9, 9)
|
||||
// String.kt:141 $kotlin.stringLiteral (17, 28, 17)
|
||||
|
||||
@@ -18,7 +18,7 @@ fun box() {
|
||||
|
||||
// EXPECTATIONS WASM
|
||||
// test.kt:1 $box
|
||||
// test.kt:5 $box (4, 4, 4)
|
||||
// test.kt:5 $box
|
||||
// test.kt:6 $box$lambda.invoke (9, 9, 9, 9)
|
||||
// String.kt:141 $kotlin.stringLiteral (17, 28, 17)
|
||||
// Array.kt:59 $kotlin.Array.get (19, 26, 34, 8)
|
||||
|
||||
+1
-1
@@ -234,7 +234,7 @@ fun box() {
|
||||
// Number2String.kt:55 $kotlin.wasm.internal.itoa32 (8, 26, 8)
|
||||
// Number2String.kt:57 $kotlin.wasm.internal.itoa32 (15, 31, 15)
|
||||
// Number2String.kt:58 $kotlin.wasm.internal.itoa32 (11, 19, 11, 24, 32, 24, 4)
|
||||
// Assertions.kt:14 $kotlin.assert (11, 18, 18, 4, 11, 18, 18, 4, 11, 18, 18, 4, 11, 18, 18, 4, 11, 18, 18, 4)
|
||||
// Assertions.kt:14 $kotlin.assert (11, 18, 4, 11, 18, 4, 11, 18, 4, 11, 18, 4, 11, 18, 4)
|
||||
// Assertions.kt:21 $kotlin.assert (9, 8, 9, 8, 9, 8, 9, 8, 9, 8)
|
||||
// Assertions.kt:25 $kotlin.assert (1, 1, 1, 1, 1)
|
||||
// Assertions.kt:15 $kotlin.assert (1, 1, 1, 1, 1)
|
||||
|
||||
@@ -45,10 +45,10 @@ fun foo(f: () -> Unit) {
|
||||
|
||||
// EXPECTATIONS WASM
|
||||
// test.kt:1 $box
|
||||
// test.kt:5 $box (8, 8, 4)
|
||||
// test.kt:5 $box (8, 4)
|
||||
// test.kt:15 $foo (4, 4)
|
||||
// test.kt:6 $box$lambda.invoke (20, 12, 21)
|
||||
// test.kt:16 $foo (1, 1)
|
||||
// test.kt:9 $box (10, 10, 4)
|
||||
// test.kt:9 $box (10, 4)
|
||||
// test.kt:10 $box$lambda.invoke (16, 8, 17)
|
||||
// test.kt:12 $box
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ inline fun foo() = {
|
||||
// EXPECTATIONS WASM
|
||||
// test.kt:1 $box
|
||||
// test.kt:6 $box (4, 4)
|
||||
// test1.kt:10 $box (19, 19)
|
||||
// test1.kt:10 $box
|
||||
// test1.kt:11 $box
|
||||
// test.kt:8 $box$lambda.invoke
|
||||
// test.kt:7 $box
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ inline fun foo() = {
|
||||
// EXPECTATIONS WASM
|
||||
// test.kt:1 $box
|
||||
// test.kt:6 $box
|
||||
// test1.kt:11 $box (19, 19)
|
||||
// test1.kt:11 $box
|
||||
// test1.kt:12 $box
|
||||
// test.kt:7 $box
|
||||
// test.kt:9 $box$lambda.invoke
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ fun baz(v:(() -> Unit)) {
|
||||
// EXPECTATIONS WASM
|
||||
// test.kt:1 $box
|
||||
// test.kt:6 $box (8, 4)
|
||||
// test1.kt:12 $box (19, 19, 19, 19)
|
||||
// test1.kt:12 $box (19, 19)
|
||||
// test1.kt:13 $box (1, 1)
|
||||
// test3.kt:16 $baz (4, 4)
|
||||
// test.kt:10 $box$lambda.invoke
|
||||
|
||||
@@ -35,7 +35,7 @@ fun g() {}
|
||||
// EXPECTATIONS WASM
|
||||
// test.kt:1 $box
|
||||
// test.kt:4 $box (12, 4)
|
||||
// test.kt:5 $box (6, 6, 4)
|
||||
// test.kt:5 $box (6, 4)
|
||||
// test.kt:9 $f
|
||||
// test.kt:12 $g
|
||||
// test.kt:10 $f
|
||||
|
||||
@@ -54,7 +54,7 @@ fun box() {
|
||||
// Number2String.kt:55 $kotlin.wasm.internal.itoa32 (8, 26, 8)
|
||||
// Number2String.kt:57 $kotlin.wasm.internal.itoa32 (15, 31, 15)
|
||||
// Number2String.kt:58 $kotlin.wasm.internal.itoa32 (11, 19, 11, 24, 32, 24, 4)
|
||||
// Assertions.kt:14 $kotlin.assert (11, 18, 18, 4, 11, 18, 18, 4, 11, 18, 18, 4, 11, 18, 18, 4, 11, 18, 18, 4, 11, 18, 18, 4)
|
||||
// Assertions.kt:14 $kotlin.assert (11, 18, 4, 11, 18, 4, 11, 18, 4, 11, 18, 4, 11, 18, 4, 11, 18, 4)
|
||||
// Assertions.kt:21 $kotlin.assert (9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8)
|
||||
// Assertions.kt:25 $kotlin.assert (1, 1, 1, 1, 1, 1)
|
||||
// Assertions.kt:15 $kotlin.assert (1, 1, 1, 1, 1, 1)
|
||||
|
||||
+6
@@ -7343,6 +7343,12 @@ public class JvmAbiConsistencyTestBoxGenerated extends AbstractJvmAbiConsistency
|
||||
runTest("compiler/testData/codegen/box/closures/closureWithParameterAndBoxing.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("closuresAsSingleton.kt")
|
||||
public void testClosuresAsSingleton() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/closures/closuresAsSingleton.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("crossinlineLocalDeclaration.kt")
|
||||
public void testCrossinlineLocalDeclaration() throws Exception {
|
||||
|
||||
+6
@@ -7103,6 +7103,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/closures/closureWithParameterAndBoxing.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("closuresAsSingleton.kt")
|
||||
public void testClosuresAsSingleton() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/closures/closuresAsSingleton.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("crossinlineLocalDeclaration.kt")
|
||||
public void testCrossinlineLocalDeclaration() throws Exception {
|
||||
|
||||
+6
@@ -7343,6 +7343,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/closures/closureWithParameterAndBoxing.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("closuresAsSingleton.kt")
|
||||
public void testClosuresAsSingleton() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/closures/closuresAsSingleton.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("crossinlineLocalDeclaration.kt")
|
||||
public void testCrossinlineLocalDeclaration() throws Exception {
|
||||
|
||||
+6
@@ -7343,6 +7343,12 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack
|
||||
runTest("compiler/testData/codegen/box/closures/closureWithParameterAndBoxing.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("closuresAsSingleton.kt")
|
||||
public void testClosuresAsSingleton() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/closures/closuresAsSingleton.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("crossinlineLocalDeclaration.kt")
|
||||
public void testCrossinlineLocalDeclaration() throws Exception {
|
||||
|
||||
+5
@@ -6427,6 +6427,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/closures/closureWithParameterAndBoxing.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("closuresAsSingleton.kt")
|
||||
public void testClosuresAsSingleton() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/closures/closuresAsSingleton.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("crossinlineLocalDeclaration.kt")
|
||||
public void testCrossinlineLocalDeclaration() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/closures/crossinlineLocalDeclaration.kt");
|
||||
|
||||
+6
@@ -5555,6 +5555,12 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/closures/closureWithParameterAndBoxing.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("closuresAsSingleton.kt")
|
||||
public void testClosuresAsSingleton() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/closures/closuresAsSingleton.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("crossinlineLocalDeclaration.kt")
|
||||
public void testCrossinlineLocalDeclaration() throws Exception {
|
||||
|
||||
Generated
+6
@@ -5555,6 +5555,12 @@ public class FirJsES6CodegenBoxTestGenerated extends AbstractFirJsES6CodegenBoxT
|
||||
runTest("compiler/testData/codegen/box/closures/closureWithParameterAndBoxing.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("closuresAsSingleton.kt")
|
||||
public void testClosuresAsSingleton() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/closures/closuresAsSingleton.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("crossinlineLocalDeclaration.kt")
|
||||
public void testCrossinlineLocalDeclaration() throws Exception {
|
||||
|
||||
+6
@@ -5555,6 +5555,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/closures/closureWithParameterAndBoxing.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("closuresAsSingleton.kt")
|
||||
public void testClosuresAsSingleton() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/closures/closuresAsSingleton.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("crossinlineLocalDeclaration.kt")
|
||||
public void testCrossinlineLocalDeclaration() throws Exception {
|
||||
|
||||
+6
@@ -5555,6 +5555,12 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes
|
||||
runTest("compiler/testData/codegen/box/closures/closureWithParameterAndBoxing.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("closuresAsSingleton.kt")
|
||||
public void testClosuresAsSingleton() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/closures/closuresAsSingleton.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("crossinlineLocalDeclaration.kt")
|
||||
public void testCrossinlineLocalDeclaration() throws Exception {
|
||||
|
||||
+6
@@ -6163,6 +6163,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe
|
||||
runTest("compiler/testData/codegen/box/closures/closureWithParameterAndBoxing.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("closuresAsSingleton.kt")
|
||||
public void testClosuresAsSingleton() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/closures/closuresAsSingleton.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("crossinlineLocalDeclaration.kt")
|
||||
public void testCrossinlineLocalDeclaration() throws Exception {
|
||||
|
||||
+6
@@ -6295,6 +6295,12 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB
|
||||
runTest("compiler/testData/codegen/box/closures/closureWithParameterAndBoxing.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("closuresAsSingleton.kt")
|
||||
public void testClosuresAsSingleton() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/closures/closuresAsSingleton.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("crossinlineLocalDeclaration.kt")
|
||||
public void testCrossinlineLocalDeclaration() throws Exception {
|
||||
|
||||
+6
@@ -6031,6 +6031,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
|
||||
runTest("compiler/testData/codegen/box/closures/closureWithParameterAndBoxing.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("closuresAsSingleton.kt")
|
||||
public void testClosuresAsSingleton() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/closures/closuresAsSingleton.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("crossinlineLocalDeclaration.kt")
|
||||
public void testCrossinlineLocalDeclaration() throws Exception {
|
||||
|
||||
+6
@@ -6164,6 +6164,12 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT
|
||||
runTest("compiler/testData/codegen/box/closures/closureWithParameterAndBoxing.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("closuresAsSingleton.kt")
|
||||
public void testClosuresAsSingleton() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/closures/closuresAsSingleton.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("crossinlineLocalDeclaration.kt")
|
||||
public void testCrossinlineLocalDeclaration() throws Exception {
|
||||
|
||||
Generated
+6
@@ -5537,6 +5537,12 @@ public class FirWasmJsCodegenBoxTestGenerated extends AbstractFirWasmJsCodegenBo
|
||||
runTest("compiler/testData/codegen/box/closures/closureWithParameterAndBoxing.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("closuresAsSingleton.kt")
|
||||
public void testClosuresAsSingleton() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/closures/closuresAsSingleton.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("crossinlineLocalDeclaration.kt")
|
||||
public void testCrossinlineLocalDeclaration() throws Exception {
|
||||
|
||||
Generated
+6
@@ -5537,6 +5537,12 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest
|
||||
runTest("compiler/testData/codegen/box/closures/closureWithParameterAndBoxing.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("closuresAsSingleton.kt")
|
||||
public void testClosuresAsSingleton() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/closures/closuresAsSingleton.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("crossinlineLocalDeclaration.kt")
|
||||
public void testCrossinlineLocalDeclaration() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user