diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/JvmLower.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/JvmLower.kt index c77013dd84c..9561cb0f617 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/JvmLower.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/JvmLower.kt @@ -129,10 +129,7 @@ internal val localDeclarationsPhase = makeIrFilePhase( declaration.visibility override fun forCapturedField(value: IrValueSymbol): Visibility = - if (value is IrValueParameterSymbol && value.owner.isCrossinline) - JavaVisibilities.PACKAGE_VISIBILITY // avoid requiring a synthetic accessor for it - else - Visibilities.PRIVATE + JavaVisibilities.PACKAGE_VISIBILITY // avoid requiring a synthetic accessor for it private fun scopedVisibility(inInlineFunctionScope: Boolean): Visibility = if (inInlineFunctionScope) Visibilities.PUBLIC else JavaVisibilities.PACKAGE_VISIBILITY diff --git a/compiler/testData/codegen/bytecodeListing/annotations/literals.kt b/compiler/testData/codegen/bytecodeListing/annotations/literals.kt index 3edca14540d..f25566a7679 100644 --- a/compiler/testData/codegen/bytecodeListing/annotations/literals.kt +++ b/compiler/testData/codegen/bytecodeListing/annotations/literals.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JVM_IR @Target(AnnotationTarget.CLASS) annotation class ClsAnn diff --git a/compiler/testData/codegen/bytecodeListing/annotations/localClassWithCapturedParams.kt b/compiler/testData/codegen/bytecodeListing/annotations/localClassWithCapturedParams.kt index b69b4e2c3de..5bc9bd54e7f 100644 --- a/compiler/testData/codegen/bytecodeListing/annotations/localClassWithCapturedParams.kt +++ b/compiler/testData/codegen/bytecodeListing/annotations/localClassWithCapturedParams.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JVM_IR annotation class Simple(val value: String) fun localCaptured(): Any { diff --git a/compiler/testData/codegen/bytecodeListing/coroutines/spilling/booleanParameter_ir.txt b/compiler/testData/codegen/bytecodeListing/coroutines/spilling/booleanParameter_ir.txt index 2e508f4caf4..417c3e3a819 100644 --- a/compiler/testData/codegen/bytecodeListing/coroutines/spilling/booleanParameter_ir.txt +++ b/compiler/testData/codegen/bytecodeListing/coroutines/spilling/booleanParameter_ir.txt @@ -49,7 +49,7 @@ public abstract class helpers/ContinuationAdapter { @kotlin.Metadata public final class helpers/CoroutineUtilKt$handleExceptionContinuation$1 { // source: 'CoroutineUtil.kt' - private synthetic final field $x: kotlin.jvm.functions.Function1 + synthetic final field $x: kotlin.jvm.functions.Function1 private final @org.jetbrains.annotations.NotNull field context: kotlin.coroutines.EmptyCoroutineContext inner (anonymous) class helpers/CoroutineUtilKt$handleExceptionContinuation$1 method (p0: kotlin.jvm.functions.Function1): void @@ -61,7 +61,7 @@ public final class helpers/CoroutineUtilKt$handleExceptionContinuation$1 { @kotlin.Metadata public final class helpers/CoroutineUtilKt$handleResultContinuation$1 { // source: 'CoroutineUtil.kt' - private synthetic final field $x: kotlin.jvm.functions.Function1 + synthetic final field $x: kotlin.jvm.functions.Function1 private final @org.jetbrains.annotations.NotNull field context: kotlin.coroutines.EmptyCoroutineContext inner (anonymous) class helpers/CoroutineUtilKt$handleResultContinuation$1 method (p0: kotlin.jvm.functions.Function1): void diff --git a/compiler/testData/codegen/bytecodeText/fieldsForCapturedValues/extensionLambdaExtensionReceiver.kt b/compiler/testData/codegen/bytecodeText/fieldsForCapturedValues/extensionLambdaExtensionReceiver.kt index e9b02c64397..c96920c2398 100644 --- a/compiler/testData/codegen/bytecodeText/fieldsForCapturedValues/extensionLambdaExtensionReceiver.kt +++ b/compiler/testData/codegen/bytecodeText/fieldsForCapturedValues/extensionLambdaExtensionReceiver.kt @@ -19,4 +19,4 @@ fun test() { // 1 final synthetic LReceiver; \$this_useExtensionLambda // JVM_IR_TEMPLATES -// 1 private final synthetic LReceiver; \$this \ No newline at end of file +// 1 final synthetic LReceiver; \$this \ No newline at end of file diff --git a/compiler/testData/codegen/bytecodeText/fieldsForCapturedValues/extensionReceiver.kt b/compiler/testData/codegen/bytecodeText/fieldsForCapturedValues/extensionReceiver.kt index 790d6f96581..744061418c3 100644 --- a/compiler/testData/codegen/bytecodeText/fieldsForCapturedValues/extensionReceiver.kt +++ b/compiler/testData/codegen/bytecodeText/fieldsForCapturedValues/extensionReceiver.kt @@ -10,8 +10,4 @@ fun Receiver.bar() { } } -// JVM_TEMPLATES // 1 final synthetic LReceiver; \$this_bar - -// JVM_IR_TEMPLATES -// 1 private final synthetic LReceiver; \$this_bar \ No newline at end of file diff --git a/compiler/testData/codegen/bytecodeText/fieldsForCapturedValues/innerAndOuterThis.kt b/compiler/testData/codegen/bytecodeText/fieldsForCapturedValues/innerAndOuterThis.kt index e14ca81fb28..f530e4f2d50 100644 --- a/compiler/testData/codegen/bytecodeText/fieldsForCapturedValues/innerAndOuterThis.kt +++ b/compiler/testData/codegen/bytecodeText/fieldsForCapturedValues/innerAndOuterThis.kt @@ -15,9 +15,7 @@ class Outer { fun outerFoo() {} } -// JVM_TEMPLATES // 1 final synthetic LOuter\$Inner; this\$0 // JVM_IR_TEMPLATES -// 1 private final synthetic LOuter\$Inner; this\$0 -// 1 private final synthetic LOuter; this\$1 \ No newline at end of file +// 1 final synthetic LOuter; this\$1 diff --git a/compiler/testData/codegen/bytecodeText/fieldsForCapturedValues/labeledExtensionLambdaExtensionReceiver.kt b/compiler/testData/codegen/bytecodeText/fieldsForCapturedValues/labeledExtensionLambdaExtensionReceiver.kt index 34b30a1651b..ec8795c9160 100644 --- a/compiler/testData/codegen/bytecodeText/fieldsForCapturedValues/labeledExtensionLambdaExtensionReceiver.kt +++ b/compiler/testData/codegen/bytecodeText/fieldsForCapturedValues/labeledExtensionLambdaExtensionReceiver.kt @@ -19,4 +19,4 @@ fun test() { // 1 final synthetic LReceiver; \$this_label // JVM_IR_TEMPLATES -// 1 private final synthetic LReceiver; \$this \ No newline at end of file +// 1 final synthetic LReceiver; \$this \ No newline at end of file diff --git a/compiler/testData/codegen/bytecodeText/fieldsForCapturedValues/multipleExtensionReceivers.kt b/compiler/testData/codegen/bytecodeText/fieldsForCapturedValues/multipleExtensionReceivers.kt index c3d2c536853..cf5168efb62 100644 --- a/compiler/testData/codegen/bytecodeText/fieldsForCapturedValues/multipleExtensionReceivers.kt +++ b/compiler/testData/codegen/bytecodeText/fieldsForCapturedValues/multipleExtensionReceivers.kt @@ -22,5 +22,5 @@ fun Foo.test(bar: Bar) { // 1 final synthetic LBar; \$this_test // JVM_IR_TEMPLATES -// 1 private final synthetic LFoo; \$this_test -// 1 private final synthetic LBar; \$this_test\$1 \ No newline at end of file +// 1 final synthetic LFoo; \$this_test +// 1 final synthetic LBar; \$this_test\$1 \ No newline at end of file diff --git a/compiler/testData/codegen/bytecodeText/fieldsForCapturedValues/outerThis.kt b/compiler/testData/codegen/bytecodeText/fieldsForCapturedValues/outerThis.kt index c0dd6b397b4..247a5719e69 100644 --- a/compiler/testData/codegen/bytecodeText/fieldsForCapturedValues/outerThis.kt +++ b/compiler/testData/codegen/bytecodeText/fieldsForCapturedValues/outerThis.kt @@ -16,4 +16,4 @@ class Outer { // 1 final synthetic LOuter\$Inner; this\$0 // JVM_IR_TEMPLATES -// 1 private final synthetic LOuter; this\$0 \ No newline at end of file +// 2 final synthetic LOuter; this\$0 diff --git a/compiler/testData/codegen/bytecodeText/fieldsForCapturedValues/outerThisInInnerConstructor.kt b/compiler/testData/codegen/bytecodeText/fieldsForCapturedValues/outerThisInInnerConstructor.kt index 2f28c69d41b..38a0c94648b 100644 --- a/compiler/testData/codegen/bytecodeText/fieldsForCapturedValues/outerThisInInnerConstructor.kt +++ b/compiler/testData/codegen/bytecodeText/fieldsForCapturedValues/outerThisInInnerConstructor.kt @@ -16,4 +16,4 @@ class Outer { // 1 final synthetic LOuter\$Inner; this\$0 // JVM_IR_TEMPLATES -// 1 private final synthetic LOuter; this\$0 \ No newline at end of file +// 2 final synthetic LOuter; this\$0 \ No newline at end of file diff --git a/compiler/testData/codegen/bytecodeText/fieldsForCapturedValues/outerThisInInnerInitBlock.kt b/compiler/testData/codegen/bytecodeText/fieldsForCapturedValues/outerThisInInnerInitBlock.kt index 7002b02d586..47e9c1d9a30 100644 --- a/compiler/testData/codegen/bytecodeText/fieldsForCapturedValues/outerThisInInnerInitBlock.kt +++ b/compiler/testData/codegen/bytecodeText/fieldsForCapturedValues/outerThisInInnerInitBlock.kt @@ -16,4 +16,4 @@ class Outer { // 1 final synthetic LOuter\$Inner; this\$0 // JVM_IR_TEMPLATES -// 1 private final synthetic LOuter; this\$0 \ No newline at end of file +// 2 final synthetic LOuter; this\$0 diff --git a/compiler/testData/codegen/bytecodeText/fieldsForCapturedValues/this.kt b/compiler/testData/codegen/bytecodeText/fieldsForCapturedValues/this.kt index bdfd4ce7b34..7d3889dea11 100644 --- a/compiler/testData/codegen/bytecodeText/fieldsForCapturedValues/this.kt +++ b/compiler/testData/codegen/bytecodeText/fieldsForCapturedValues/this.kt @@ -10,8 +10,4 @@ class Host { fun foo() {} } -// JVM_TEMPLATES // 1 final synthetic LHost; this\$0 - -// JVM_IR_TEMPLATES -// 1 private final synthetic LHost; this\$0 \ No newline at end of file