From 23480a5698c8503a55d65f37c0cb2056a4a84f68 Mon Sep 17 00:00:00 2001 From: Michael Bogdanov Date: Mon, 18 Jan 2016 14:59:43 +0300 Subject: [PATCH] Supported inline of array convention simple cases; Fix for KT-9211: M13 an extension function that is inline, and for get(v) causes an exception when called using brackets #KT-9211 Fixed --- .../kotlin/codegen/ExpressionCodegen.java | 8 +-- .../jetbrains/kotlin/codegen/FrameMap.java | 2 +- .../jetbrains/kotlin/codegen/StackValue.java | 51 ++++++++++++++++--- .../arrayConvention/simpleAccess.1.kt | 15 ++++++ .../arrayConvention/simpleAccess.2.kt | 9 ++++ .../arrayConvention/simpleAccessInClass.1.kt | 17 +++++++ .../arrayConvention/simpleAccessInClass.2.kt | 13 +++++ .../simpleAccessWithDefault.1.kt | 16 ++++++ .../simpleAccessWithDefault.2.kt | 9 ++++ .../simpleAccessWithDefaultInClass.1.kt | 19 +++++++ .../simpleAccessWithDefaultInClass.2.kt | 12 +++++ .../simpleAccessWithLambda.1.kt | 16 ++++++ .../simpleAccessWithLambda.2.kt | 9 ++++ .../simpleAccessWithLambdaInClass.1.kt | 19 +++++++ .../simpleAccessWithLambdaInClass.2.kt | 13 +++++ .../BlackBoxInlineCodegenTestGenerated.java | 45 ++++++++++++++++ ...otlinAgainstInlineKotlinTestGenerated.java | 45 ++++++++++++++++ 17 files changed, 303 insertions(+), 15 deletions(-) create mode 100644 compiler/testData/codegen/boxInline/arrayConvention/simpleAccess.1.kt create mode 100644 compiler/testData/codegen/boxInline/arrayConvention/simpleAccess.2.kt create mode 100644 compiler/testData/codegen/boxInline/arrayConvention/simpleAccessInClass.1.kt create mode 100644 compiler/testData/codegen/boxInline/arrayConvention/simpleAccessInClass.2.kt create mode 100644 compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefault.1.kt create mode 100644 compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefault.2.kt create mode 100644 compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefaultInClass.1.kt create mode 100644 compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefaultInClass.2.kt create mode 100644 compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambda.1.kt create mode 100644 compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambda.2.kt create mode 100644 compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambdaInClass.1.kt create mode 100644 compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambdaInClass.2.kt diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/ExpressionCodegen.java b/compiler/backend/src/org/jetbrains/kotlin/codegen/ExpressionCodegen.java index ac2db0800cb..e6b3e6390a5 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/ExpressionCodegen.java +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/ExpressionCodegen.java @@ -2443,7 +2443,7 @@ public class ExpressionCodegen extends KtVisitor impleme } @NotNull - private CallGenerator getOrCreateCallGenerator(@NotNull ResolvedCall resolvedCall) { + CallGenerator getOrCreateCallGenerator(@NotNull ResolvedCall resolvedCall) { Map typeArguments = resolvedCall.getTypeArguments(); TypeParameterMappings mappings = new TypeParameterMappings(); for (Map.Entry entry : typeArguments.entrySet()) { @@ -3476,10 +3476,6 @@ public class ExpressionCodegen extends KtVisitor impleme ResolvedCall resolvedCall = isGetter ? resolvedGetCall : resolvedSetCall; assert resolvedCall != null : "couldn't find resolved call: " + expression.getText(); - ArgumentGenerator argumentGenerator = new CallBasedArgumentGenerator( - this, defaultCallGenerator, resolvedCall.getResultingDescriptor().getValueParameters(), callable.getValueParameterTypes() - ); - List valueArguments = resolvedCall.getValueArgumentsByIndex(); assert valueArguments != null : "Failed to arrange value arguments by index: " + operationDescriptor; @@ -3490,7 +3486,7 @@ public class ExpressionCodegen extends KtVisitor impleme } return new StackValue.CollectionElementReceiver( - callable, receiver, resolvedGetCall, resolvedSetCall, isGetter, this, argumentGenerator, valueArguments + callable, receiver, resolvedGetCall, resolvedSetCall, isGetter, this, valueArguments ); } diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/FrameMap.java b/compiler/backend/src/org/jetbrains/kotlin/codegen/FrameMap.java index 187cc74a6fd..10bf511574b 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/FrameMap.java +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/FrameMap.java @@ -47,7 +47,7 @@ public class FrameMap { myVarSizes.remove(descriptor); int oldIndex = myVarIndex.remove(descriptor); if (oldIndex != myMaxIndex) { - throw new IllegalStateException("descriptor can be left only if it is last"); + throw new IllegalStateException("Descriptor can be left only if it is last: " + descriptor); } return oldIndex; } diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/StackValue.java b/compiler/backend/src/org/jetbrains/kotlin/codegen/StackValue.java index d2d595cd484..fe77c459d94 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/StackValue.java +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/StackValue.java @@ -17,8 +17,9 @@ package org.jetbrains.kotlin.codegen; import com.intellij.psi.tree.IElementType; -import kotlin.collections.ArraysKt; import kotlin.Unit; +import kotlin.collections.ArraysKt; +import kotlin.collections.CollectionsKt; import kotlin.jvm.functions.Function1; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; @@ -768,13 +769,14 @@ public abstract class StackValue { private final Callable callable; private final boolean isGetter; private final ExpressionCodegen codegen; - private final ArgumentGenerator argumentGenerator; private final List valueArguments; private final FrameMap frame; private final StackValue receiver; private final ResolvedCall resolvedGetCall; private final ResolvedCall resolvedSetCall; private DefaultCallMask mask; + private CallGenerator callGenerator; + boolean isComplexOperationWithDup; public CollectionElementReceiver( @NotNull Callable callable, @@ -783,7 +785,6 @@ public abstract class StackValue { ResolvedCall resolvedSetCall, boolean isGetter, @NotNull ExpressionCodegen codegen, - ArgumentGenerator argumentGenerator, List valueArguments ) { super(OBJECT_TYPE); @@ -793,7 +794,6 @@ public abstract class StackValue { this.receiver = receiver; this.resolvedGetCall = resolvedGetCall; this.resolvedSetCall = resolvedSetCall; - this.argumentGenerator = argumentGenerator; this.valueArguments = valueArguments; this.codegen = codegen; this.frame = codegen.myFrameMap; @@ -803,8 +803,25 @@ public abstract class StackValue { public void putSelector(@NotNull Type type, @NotNull InstructionAdapter v) { ResolvedCall call = isGetter ? resolvedGetCall : resolvedSetCall; StackValue newReceiver = StackValue.receiver(call, receiver, codegen, callable); + ArgumentGenerator generator = createArgumentGenerator(); newReceiver.put(newReceiver.type, v); - mask = argumentGenerator.generate(valueArguments, valueArguments); + callGenerator.putHiddenParams(); + + mask = generator.generate(valueArguments, valueArguments); + } + + private ArgumentGenerator createArgumentGenerator() { + assert callGenerator == null : + "'putSelector' and 'createArgumentGenerator' methods should be called once for CollectionElementReceiver: " + callable; + ResolvedCall resolvedCall = isGetter ? resolvedGetCall : resolvedSetCall; + assert resolvedCall != null : "Resolved call should be non-null: " + callable; + callGenerator = + !isComplexOperationWithDup ? codegen.getOrCreateCallGenerator(resolvedCall) : codegen.defaultCallGenerator; + return new CallBasedArgumentGenerator( + codegen, + callGenerator, + resolvedCall.getResultingDescriptor().getValueParameters(), callable.getValueParameterTypes() + ); } @Override @@ -932,7 +949,7 @@ public abstract class StackValue { if (getter == null) { throw new UnsupportedOperationException("no getter specified"); } - CallGenerator callGenerator = codegen.defaultCallGenerator; + CallGenerator callGenerator = getCallGenerator(); callGenerator.genCall(getter, resolvedGetCall, genDefaultMaskIfPresent(callGenerator), codegen); coerceTo(type, v); } @@ -942,6 +959,14 @@ public abstract class StackValue { return mask.generateOnStackIfNeeded(callGenerator); } + private CallGenerator getCallGenerator() { + CallGenerator generator = ((CollectionElementReceiver) receiver).callGenerator; + assert generator != null : + "CollectionElementReceiver should be putted on stack before CollectionElement:" + + " getCall = " + resolvedGetCall + ", setCall = " + resolvedSetCall; + return generator; + } + @Override public int receiverSize() { if (isStandardStack(codegen.typeMapper, resolvedGetCall, 1) && isStandardStack(codegen.typeMapper, resolvedSetCall, 2)) { @@ -991,8 +1016,13 @@ public abstract class StackValue { Type lastParameterType = ArraysKt.last(setter.getParameterTypes()); coerce(topOfStackType, lastParameterType, v); - //*Convention setter couldn't have default parameters, just getter can have it at last positions + + getCallGenerator().afterParameterPut(lastParameterType, StackValue.onStack(lastParameterType), + CollectionsKt.getLastIndex(setter.getValueParameterTypes())); + + //Convention setter couldn't have default parameters, just getter can have it at last positions //We should remove default parameters of getter from stack*/ + //Note that it works only for non-inline case CollectionElementReceiver collectionElementReceiver = (CollectionElementReceiver) receiver; if (collectionElementReceiver.isGetter) { List arguments = collectionElementReceiver.valueArguments; @@ -1007,7 +1037,7 @@ public abstract class StackValue { } } - codegen.defaultCallGenerator.genCall(setter, resolvedSetCall, false, codegen); + getCallGenerator().genCall(setter, resolvedSetCall, false, codegen); Type returnType = setter.getReturnType(); if (returnType != Type.VOID_TYPE) { pop(v, returnType); @@ -1529,6 +1559,11 @@ public abstract class StackValue { super(value.type, value.receiver.canHaveSideEffects()); this.originalValueWithReceiver = value; this.isReadOperations = isReadOperations; + if (value instanceof CollectionElement) { + if (value.receiver instanceof CollectionElementReceiver) { + ((CollectionElementReceiver) value.receiver).isComplexOperationWithDup = true; + } + } } @Override diff --git a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccess.1.kt b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccess.1.kt new file mode 100644 index 00000000000..1d31b27135e --- /dev/null +++ b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccess.1.kt @@ -0,0 +1,15 @@ +import test.* + + +fun box(): String { + + val z = 1; + + val p = z[2, 3] + if (p != 6) return "fail 1: $p" + + z[2, 3] = p + if (res != 12) return "fail 2: $res" + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccess.2.kt b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccess.2.kt new file mode 100644 index 00000000000..0a8fb85ccb1 --- /dev/null +++ b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccess.2.kt @@ -0,0 +1,9 @@ +package test + +var res = 1 + +inline operator fun Int.get(z: Int, p: Int) = this + z + p + +inline operator fun Int.set(z: Int, p: Int, l: Int) { + res = this + z + p + l +} diff --git a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessInClass.1.kt b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessInClass.1.kt new file mode 100644 index 00000000000..ec7f5272558 --- /dev/null +++ b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessInClass.1.kt @@ -0,0 +1,17 @@ +import test.* + + +fun box(): String { + + with(A()) { + val z = 1; + + val p = z[2, 3] + if (p != 6) return "fail 1: $p" + + z[2, 3] = p + if (res != 12) return "fail 2: $res" + } + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessInClass.2.kt b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessInClass.2.kt new file mode 100644 index 00000000000..3c98afa7a89 --- /dev/null +++ b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessInClass.2.kt @@ -0,0 +1,13 @@ +package test + +var res = 1 + +class A { + + inline operator fun Int.get(z: Int, p: Int) = this + z + p + + inline operator fun Int.set(z: Int, p: Int, l: Int) { + res = this + z + p + l + } + +} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefault.1.kt b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefault.1.kt new file mode 100644 index 00000000000..b43bb3ee1f1 --- /dev/null +++ b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefault.1.kt @@ -0,0 +1,16 @@ +import test.* + + +fun box(): String { + + val z = 1; + + val p = z[2, { 3 }] + if (p != 106) return "fail 1: $p" + + val captured = 3; + z[2, { captured } ] = p + if (res != 112) return "fail 2: $res" + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefault.2.kt b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefault.2.kt new file mode 100644 index 00000000000..e18bd8a4ec8 --- /dev/null +++ b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefault.2.kt @@ -0,0 +1,9 @@ +package test + +var res = 1 + +inline operator fun Int.get(z: Int, p: () -> Int, defaultt: Int = 100) = this + z + p() + defaultt + +inline operator fun Int.set(z: Int, p: () -> Int, l: Int/*, x : Int = 1000*/) { + res = this + z + p() + l /*+ x*/ +} diff --git a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefaultInClass.1.kt b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefaultInClass.1.kt new file mode 100644 index 00000000000..a1c9d8acd37 --- /dev/null +++ b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefaultInClass.1.kt @@ -0,0 +1,19 @@ +import test.* + + +fun box(): String { + + val z = 1; + + with(A()) { + + val p = z[2, { 3 }] + if (p != 106) return "fail 1: $p" + + val captured = 3; + z[2, { captured }] = p + if (res != 112) return "fail 2: $res" + } + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefaultInClass.2.kt b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefaultInClass.2.kt new file mode 100644 index 00000000000..e90dc1d6a5b --- /dev/null +++ b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefaultInClass.2.kt @@ -0,0 +1,12 @@ +package test + +var res = 1 + +class A { + + inline operator fun Int.get(z: Int, p: () -> Int, defaultt: Int = 100) = this + z + p() + defaultt + + inline operator fun Int.set(z: Int, p: () -> Int, l: Int/*, x : Int = 1000*/) { + res = this + z + p() + l /*+ x*/ + } +} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambda.1.kt b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambda.1.kt new file mode 100644 index 00000000000..3f3f796d0eb --- /dev/null +++ b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambda.1.kt @@ -0,0 +1,16 @@ +import test.* + + +fun box(): String { + + val z = 1; + + val p = z[2, { 3 }] + if (p != 6) return "fail 1: $p" + + val captured = 3; + z[2, { captured } ] = p + if (res != 12) return "fail 2: $res" + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambda.2.kt b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambda.2.kt new file mode 100644 index 00000000000..5dfcb79e9df --- /dev/null +++ b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambda.2.kt @@ -0,0 +1,9 @@ +package test + +var res = 1 + +inline operator fun Int.get(z: Int, p: () -> Int) = this + z + p() + +inline operator fun Int.set(z: Int, p: () -> Int, l: Int) { + res = this + z + p() + l +} diff --git a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambdaInClass.1.kt b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambdaInClass.1.kt new file mode 100644 index 00000000000..9f7f1ba0345 --- /dev/null +++ b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambdaInClass.1.kt @@ -0,0 +1,19 @@ +import test.* + + +fun box(): String { + + val z = 1; + + with(A()) { + + val p = z[2, { 3 }] + if (p != 6) return "fail 1: $p" + + val captured = 3; + z[2, { captured }] = p + if (res != 12) return "fail 2: $res" + } + + return "OK" +} diff --git a/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambdaInClass.2.kt b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambdaInClass.2.kt new file mode 100644 index 00000000000..785f954fcb3 --- /dev/null +++ b/compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambdaInClass.2.kt @@ -0,0 +1,13 @@ +package test + +var res = 1 + +class A { + + inline operator fun Int.get(z: Int, p: () -> Int) = this + z + p() + + inline operator fun Int.set(z: Int, p: () -> Int, l: Int) { + res = this + z + p() + l + } + +} \ No newline at end of file diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/generated/BlackBoxInlineCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/generated/BlackBoxInlineCodegenTestGenerated.java index 3f5fb158684..ec0b302566f 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/generated/BlackBoxInlineCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/generated/BlackBoxInlineCodegenTestGenerated.java @@ -386,6 +386,51 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo } } + @TestMetadata("compiler/testData/codegen/boxInline/arrayConvention") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ArrayConvention extends AbstractBlackBoxInlineCodegenTest { + public void testAllFilesPresentInArrayConvention() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/arrayConvention"), Pattern.compile("^(.+)\\.1.kt$"), true); + } + + @TestMetadata("simpleAccess.1.kt") + public void testSimpleAccess() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccess.1.kt"); + doTestMultiFileWithInlineCheck(fileName); + } + + @TestMetadata("simpleAccessInClass.1.kt") + public void testSimpleAccessInClass() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessInClass.1.kt"); + doTestMultiFileWithInlineCheck(fileName); + } + + @TestMetadata("simpleAccessWithDefault.1.kt") + public void testSimpleAccessWithDefault() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefault.1.kt"); + doTestMultiFileWithInlineCheck(fileName); + } + + @TestMetadata("simpleAccessWithDefaultInClass.1.kt") + public void testSimpleAccessWithDefaultInClass() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefaultInClass.1.kt"); + doTestMultiFileWithInlineCheck(fileName); + } + + @TestMetadata("simpleAccessWithLambda.1.kt") + public void testSimpleAccessWithLambda() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambda.1.kt"); + doTestMultiFileWithInlineCheck(fileName); + } + + @TestMetadata("simpleAccessWithLambdaInClass.1.kt") + public void testSimpleAccessWithLambdaInClass() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambdaInClass.1.kt"); + doTestMultiFileWithInlineCheck(fileName); + } + } + @TestMetadata("compiler/testData/codegen/boxInline/builders") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/compiler/tests/org/jetbrains/kotlin/jvm/compiler/CompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/jvm/compiler/CompileKotlinAgainstInlineKotlinTestGenerated.java index 51fdbced475..f2fe8cd69db 100644 --- a/compiler/tests/org/jetbrains/kotlin/jvm/compiler/CompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/jvm/compiler/CompileKotlinAgainstInlineKotlinTestGenerated.java @@ -386,6 +386,51 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi } } + @TestMetadata("compiler/testData/codegen/boxInline/arrayConvention") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ArrayConvention extends AbstractCompileKotlinAgainstInlineKotlinTest { + public void testAllFilesPresentInArrayConvention() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/arrayConvention"), Pattern.compile("^(.+)\\.1.kt$"), true); + } + + @TestMetadata("simpleAccess.1.kt") + public void testSimpleAccess() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccess.1.kt"); + doBoxTestWithInlineCheck(fileName); + } + + @TestMetadata("simpleAccessInClass.1.kt") + public void testSimpleAccessInClass() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessInClass.1.kt"); + doBoxTestWithInlineCheck(fileName); + } + + @TestMetadata("simpleAccessWithDefault.1.kt") + public void testSimpleAccessWithDefault() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefault.1.kt"); + doBoxTestWithInlineCheck(fileName); + } + + @TestMetadata("simpleAccessWithDefaultInClass.1.kt") + public void testSimpleAccessWithDefaultInClass() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefaultInClass.1.kt"); + doBoxTestWithInlineCheck(fileName); + } + + @TestMetadata("simpleAccessWithLambda.1.kt") + public void testSimpleAccessWithLambda() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambda.1.kt"); + doBoxTestWithInlineCheck(fileName); + } + + @TestMetadata("simpleAccessWithLambdaInClass.1.kt") + public void testSimpleAccessWithLambdaInClass() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambdaInClass.1.kt"); + doBoxTestWithInlineCheck(fileName); + } + } + @TestMetadata("compiler/testData/codegen/boxInline/builders") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class)