fix(JS_IR): add outer classes resolving inside the function inliner.
This commit is contained in:
+24
@@ -2602,6 +2602,30 @@ public class FirBlackBoxInlineCodegenTestGenerated extends AbstractFirBlackBoxIn
|
|||||||
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuter.kt");
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuter.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterByAnotherInlineFun.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterByAnotherInlineFun() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterByAnotherInlineFun.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterDeep.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterDeep() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterDeep.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterFunRef.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterFunRef() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterFunRef.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterWithInlineClass.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterWithInlineClass() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterWithInlineClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("innerLambda.kt")
|
@TestMetadata("innerLambda.kt")
|
||||||
public void testInnerLambda() throws Exception {
|
public void testInnerLambda() throws Exception {
|
||||||
|
|||||||
+45
-8
@@ -12,6 +12,7 @@ import org.jetbrains.kotlin.backend.common.IrElementTransformerVoidWithContext
|
|||||||
import org.jetbrains.kotlin.backend.common.ScopeWithIr
|
import org.jetbrains.kotlin.backend.common.ScopeWithIr
|
||||||
import org.jetbrains.kotlin.backend.common.ir.Symbols
|
import org.jetbrains.kotlin.backend.common.ir.Symbols
|
||||||
import org.jetbrains.kotlin.backend.common.ir.isPure
|
import org.jetbrains.kotlin.backend.common.ir.isPure
|
||||||
|
import org.jetbrains.kotlin.backend.common.lower.InnerClassesSupport
|
||||||
import org.jetbrains.kotlin.backend.common.lower.at
|
import org.jetbrains.kotlin.backend.common.lower.at
|
||||||
import org.jetbrains.kotlin.backend.common.lower.createIrBuilder
|
import org.jetbrains.kotlin.backend.common.lower.createIrBuilder
|
||||||
import org.jetbrains.kotlin.builtins.StandardNames
|
import org.jetbrains.kotlin.builtins.StandardNames
|
||||||
@@ -26,10 +27,7 @@ import org.jetbrains.kotlin.ir.symbols.IrFunctionSymbol
|
|||||||
import org.jetbrains.kotlin.ir.symbols.IrSymbol
|
import org.jetbrains.kotlin.ir.symbols.IrSymbol
|
||||||
import org.jetbrains.kotlin.ir.symbols.IrValueSymbol
|
import org.jetbrains.kotlin.ir.symbols.IrValueSymbol
|
||||||
import org.jetbrains.kotlin.ir.symbols.impl.IrReturnableBlockSymbolImpl
|
import org.jetbrains.kotlin.ir.symbols.impl.IrReturnableBlockSymbolImpl
|
||||||
import org.jetbrains.kotlin.ir.types.IrSimpleType
|
import org.jetbrains.kotlin.ir.types.*
|
||||||
import org.jetbrains.kotlin.ir.types.IrType
|
|
||||||
import org.jetbrains.kotlin.ir.types.isNullable
|
|
||||||
import org.jetbrains.kotlin.ir.types.typeOrNull
|
|
||||||
import org.jetbrains.kotlin.ir.util.*
|
import org.jetbrains.kotlin.ir.util.*
|
||||||
import org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid
|
import org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid
|
||||||
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
|
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
|
||||||
@@ -75,10 +73,16 @@ open class DefaultInlineFunctionResolver(open val context: CommonBackendContext)
|
|||||||
|
|
||||||
class FunctionInlining(
|
class FunctionInlining(
|
||||||
val context: CommonBackendContext,
|
val context: CommonBackendContext,
|
||||||
val inlineFunctionResolver: InlineFunctionResolver
|
val inlineFunctionResolver: InlineFunctionResolver,
|
||||||
|
val innerClassesSupport: InnerClassesSupport? = null
|
||||||
) : IrElementTransformerVoidWithContext(), BodyLoweringPass {
|
) : IrElementTransformerVoidWithContext(), BodyLoweringPass {
|
||||||
|
|
||||||
constructor(context: CommonBackendContext) : this(context, DefaultInlineFunctionResolver(context))
|
constructor(context: CommonBackendContext) : this(context, DefaultInlineFunctionResolver(context), null)
|
||||||
|
constructor(context: CommonBackendContext, innerClassesSupport: InnerClassesSupport) : this(
|
||||||
|
context,
|
||||||
|
DefaultInlineFunctionResolver(context),
|
||||||
|
innerClassesSupport
|
||||||
|
)
|
||||||
|
|
||||||
private var containerScope: ScopeWithIr? = null
|
private var containerScope: ScopeWithIr? = null
|
||||||
|
|
||||||
@@ -146,7 +150,6 @@ class FunctionInlining(
|
|||||||
|
|
||||||
fun inline() = inlineFunction(callSite, callee, true)
|
fun inline() = inlineFunction(callSite, callee, true)
|
||||||
|
|
||||||
|
|
||||||
private fun inlineFunction(
|
private fun inlineFunction(
|
||||||
callSite: IrFunctionAccessExpression,
|
callSite: IrFunctionAccessExpression,
|
||||||
callee: IrFunction,
|
callee: IrFunction,
|
||||||
@@ -407,6 +410,40 @@ class FunctionInlining(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private fun ParameterToArgument.andAllOuterClasses(): List<ParameterToArgument> {
|
||||||
|
val allParametersReplacements = mutableListOf(this)
|
||||||
|
|
||||||
|
if (innerClassesSupport == null) return allParametersReplacements
|
||||||
|
|
||||||
|
var currentThisSymbol = parameter.symbol
|
||||||
|
var parameterClassDeclaration = parameter.type.classifierOrNull?.owner as? IrClass ?: return allParametersReplacements
|
||||||
|
|
||||||
|
while (parameterClassDeclaration.isInner) {
|
||||||
|
val outerClass = parameterClassDeclaration.parentAsClass
|
||||||
|
val outerClassThis = outerClass.thisReceiver ?: error("${outerClass.name} has a null `thisReceiver` property")
|
||||||
|
|
||||||
|
val parameterToArgument = ParameterToArgument(
|
||||||
|
parameter = outerClassThis,
|
||||||
|
argumentExpression = IrGetFieldImpl(
|
||||||
|
UNDEFINED_OFFSET,
|
||||||
|
UNDEFINED_OFFSET,
|
||||||
|
innerClassesSupport.getOuterThisField(parameterClassDeclaration).symbol,
|
||||||
|
outerClassThis.type,
|
||||||
|
IrGetValueImpl(UNDEFINED_OFFSET, UNDEFINED_OFFSET, currentThisSymbol)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
allParametersReplacements.add(parameterToArgument)
|
||||||
|
|
||||||
|
currentThisSymbol = outerClassThis.symbol
|
||||||
|
parameterClassDeclaration = outerClass
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return allParametersReplacements
|
||||||
|
}
|
||||||
|
|
||||||
// callee might be a copied version of callsite.symbol.owner
|
// callee might be a copied version of callsite.symbol.owner
|
||||||
private fun buildParameterToArgument(callSite: IrFunctionAccessExpression, callee: IrFunction): List<ParameterToArgument> {
|
private fun buildParameterToArgument(callSite: IrFunctionAccessExpression, callee: IrFunction): List<ParameterToArgument> {
|
||||||
|
|
||||||
@@ -416,7 +453,7 @@ class FunctionInlining(
|
|||||||
parameterToArgument += ParameterToArgument(
|
parameterToArgument += ParameterToArgument(
|
||||||
parameter = callee.dispatchReceiverParameter!!,
|
parameter = callee.dispatchReceiverParameter!!,
|
||||||
argumentExpression = callSite.dispatchReceiver!!
|
argumentExpression = callSite.dispatchReceiver!!
|
||||||
)
|
).andAllOuterClasses()
|
||||||
|
|
||||||
val valueArguments =
|
val valueArguments =
|
||||||
callSite.symbol.owner.valueParameters.map { callSite.getValueArgument(it.index) }.toMutableList()
|
callSite.symbol.owner.valueParameters.map { callSite.getValueArgument(it.index) }.toMutableList()
|
||||||
|
|||||||
@@ -249,7 +249,7 @@ private val wrapInlineDeclarationsWithReifiedTypeParametersLowering = makeBodyLo
|
|||||||
)
|
)
|
||||||
|
|
||||||
private val functionInliningPhase = makeBodyLoweringPhase(
|
private val functionInliningPhase = makeBodyLoweringPhase(
|
||||||
::FunctionInlining,
|
{ FunctionInlining(it, it.innerClassesSupport) },
|
||||||
name = "FunctionInliningPhase",
|
name = "FunctionInliningPhase",
|
||||||
description = "Perform function inlining",
|
description = "Perform function inlining",
|
||||||
prerequisite = setOf(
|
prerequisite = setOf(
|
||||||
|
|||||||
-1
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_BACKEND: JS_IR
|
|
||||||
// FILE: 1.kt
|
// FILE: 1.kt
|
||||||
class E(val x: String) {
|
class E(val x: String) {
|
||||||
inner class Inner {
|
inner class Inner {
|
||||||
|
|||||||
Vendored
+15
@@ -0,0 +1,15 @@
|
|||||||
|
// FILE: 1.kt
|
||||||
|
class Outer(val a: String) {
|
||||||
|
inner class Inner(val b: String) {
|
||||||
|
inline fun bar() = b
|
||||||
|
}
|
||||||
|
inline fun foo(i: Inner) = a + i.bar()
|
||||||
|
}
|
||||||
|
// FILE: 2.kt
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
val outer = Outer("O")
|
||||||
|
val inner = outer.Inner("K")
|
||||||
|
|
||||||
|
return outer.foo(inner)
|
||||||
|
}
|
||||||
+19
@@ -0,0 +1,19 @@
|
|||||||
|
// FILE: 1.kt
|
||||||
|
class O(val a: String) {
|
||||||
|
inner class I1(val b: String) {
|
||||||
|
inner class I2(val c: String) {
|
||||||
|
inner class I3(val d: String) {
|
||||||
|
inline fun foo(e: String) = "$a $b $c $d$e"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: 2.kt
|
||||||
|
fun box(): String {
|
||||||
|
val result = O("A").I1("lot").I2("of").I3("layers").foo("!")
|
||||||
|
|
||||||
|
if (result != "A lot of layers!") return "fail: result is $result"
|
||||||
|
|
||||||
|
return "OK"
|
||||||
|
}
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
// FILE: 1.kt
|
||||||
|
class E(val x: String) {
|
||||||
|
fun bar() = x
|
||||||
|
inner class Inner {
|
||||||
|
inline fun foo() = this@E::bar
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: 2.kt
|
||||||
|
|
||||||
|
fun box() = E("OK").Inner().foo()()
|
||||||
Vendored
+12
@@ -0,0 +1,12 @@
|
|||||||
|
// FILE: 1.kt
|
||||||
|
class E<T>(val x: T) {
|
||||||
|
inner class Inner {
|
||||||
|
inline fun foo(): T = x
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: 2.kt
|
||||||
|
|
||||||
|
inline class IC(val s: String)
|
||||||
|
|
||||||
|
fun box(): String = E(IC("OK")).Inner().foo().s
|
||||||
+24
@@ -2602,6 +2602,30 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo
|
|||||||
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuter.kt");
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuter.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterByAnotherInlineFun.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterByAnotherInlineFun() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterByAnotherInlineFun.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterDeep.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterDeep() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterDeep.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterFunRef.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterFunRef() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterFunRef.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterWithInlineClass.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterWithInlineClass() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterWithInlineClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("innerLambda.kt")
|
@TestMetadata("innerLambda.kt")
|
||||||
public void testInnerLambda() throws Exception {
|
public void testInnerLambda() throws Exception {
|
||||||
|
|||||||
+24
@@ -2602,6 +2602,30 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi
|
|||||||
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuter.kt");
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuter.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterByAnotherInlineFun.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterByAnotherInlineFun() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterByAnotherInlineFun.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterDeep.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterDeep() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterDeep.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterFunRef.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterFunRef() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterFunRef.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterWithInlineClass.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterWithInlineClass() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterWithInlineClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("innerLambda.kt")
|
@TestMetadata("innerLambda.kt")
|
||||||
public void testInnerLambda() throws Exception {
|
public void testInnerLambda() throws Exception {
|
||||||
|
|||||||
+24
@@ -2602,6 +2602,30 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli
|
|||||||
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuter.kt");
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuter.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterByAnotherInlineFun.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterByAnotherInlineFun() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterByAnotherInlineFun.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterDeep.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterDeep() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterDeep.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterFunRef.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterFunRef() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterFunRef.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterWithInlineClass.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterWithInlineClass() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterWithInlineClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("innerLambda.kt")
|
@TestMetadata("innerLambda.kt")
|
||||||
public void testInnerLambda() throws Exception {
|
public void testInnerLambda() throws Exception {
|
||||||
|
|||||||
+24
@@ -2602,6 +2602,30 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC
|
|||||||
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuter.kt");
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuter.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterByAnotherInlineFun.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterByAnotherInlineFun() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterByAnotherInlineFun.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterDeep.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterDeep() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterDeep.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterFunRef.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterFunRef() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterFunRef.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterWithInlineClass.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterWithInlineClass() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterWithInlineClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("innerLambda.kt")
|
@TestMetadata("innerLambda.kt")
|
||||||
public void testInnerLambda() throws Exception {
|
public void testInnerLambda() throws Exception {
|
||||||
|
|||||||
+24
@@ -2602,6 +2602,30 @@ public class IrSerializeCompileKotlinAgainstInlineKotlinTestGenerated extends Ab
|
|||||||
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuter.kt");
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuter.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterByAnotherInlineFun.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterByAnotherInlineFun() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterByAnotherInlineFun.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterDeep.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterDeep() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterDeep.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterFunRef.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterFunRef() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterFunRef.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterWithInlineClass.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterWithInlineClass() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterWithInlineClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("innerLambda.kt")
|
@TestMetadata("innerLambda.kt")
|
||||||
public void testInnerLambda() throws Exception {
|
public void testInnerLambda() throws Exception {
|
||||||
|
|||||||
+24
@@ -2602,6 +2602,30 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO
|
|||||||
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuter.kt");
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuter.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterByAnotherInlineFun.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterByAnotherInlineFun() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterByAnotherInlineFun.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterDeep.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterDeep() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterDeep.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterFunRef.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterFunRef() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterFunRef.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterWithInlineClass.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterWithInlineClass() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterWithInlineClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("innerLambda.kt")
|
@TestMetadata("innerLambda.kt")
|
||||||
public void testInnerLambda() throws Exception {
|
public void testInnerLambda() throws Exception {
|
||||||
|
|||||||
+24
@@ -2602,6 +2602,30 @@ public class JvmOldAgainstIrBoxInlineTestGenerated extends AbstractJvmOldAgainst
|
|||||||
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuter.kt");
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuter.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterByAnotherInlineFun.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterByAnotherInlineFun() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterByAnotherInlineFun.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterDeep.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterDeep() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterDeep.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterFunRef.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterFunRef() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterFunRef.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterWithInlineClass.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterWithInlineClass() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterWithInlineClass.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("innerLambda.kt")
|
@TestMetadata("innerLambda.kt")
|
||||||
public void testInnerLambda() throws Exception {
|
public void testInnerLambda() throws Exception {
|
||||||
|
|||||||
+20
@@ -2100,6 +2100,26 @@ public class IrJsCodegenInlineES6TestGenerated extends AbstractIrJsCodegenInline
|
|||||||
public void testInnerInlineFunCapturesOuter() throws Exception {
|
public void testInnerInlineFunCapturesOuter() throws Exception {
|
||||||
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuter.kt");
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuter.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterByAnotherInlineFun.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterByAnotherInlineFun() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterByAnotherInlineFun.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterDeep.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterDeep() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterDeep.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterFunRef.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterFunRef() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterFunRef.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterWithInlineClass.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterWithInlineClass() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterWithInlineClass.kt");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/boxInline/invokedynamic")
|
@TestMetadata("compiler/testData/codegen/boxInline/invokedynamic")
|
||||||
|
|||||||
Generated
+20
@@ -2100,6 +2100,26 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes
|
|||||||
public void testInnerInlineFunCapturesOuter() throws Exception {
|
public void testInnerInlineFunCapturesOuter() throws Exception {
|
||||||
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuter.kt");
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuter.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterByAnotherInlineFun.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterByAnotherInlineFun() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterByAnotherInlineFun.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterDeep.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterDeep() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterDeep.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterFunRef.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterFunRef() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterFunRef.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterWithInlineClass.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterWithInlineClass() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterWithInlineClass.kt");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/boxInline/invokedynamic")
|
@TestMetadata("compiler/testData/codegen/boxInline/invokedynamic")
|
||||||
|
|||||||
+24
@@ -2319,6 +2319,30 @@ public class JsCodegenInlineTestGenerated extends AbstractJsCodegenInlineTest {
|
|||||||
public void testInnerInlineFunCapturesOuter() throws Exception {
|
public void testInnerInlineFunCapturesOuter() throws Exception {
|
||||||
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuter.kt");
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuter.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterByAnotherInlineFun.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterByAnotherInlineFun() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterByAnotherInlineFun.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterDeep.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterDeep() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterDeep.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterFunRef.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterFunRef() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterFunRef.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("innerInlineFunCapturesOuterWithInlineClass.kt")
|
||||||
|
public void testInnerInlineFunCapturesOuterWithInlineClass() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/boxInline/innerClasses/innerInlineFunCapturesOuterWithInlineClass.kt");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nested
|
@Nested
|
||||||
|
|||||||
Reference in New Issue
Block a user