From 6b964cb61de316cf154527a41380dc6a78ca8df4 Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Wed, 8 Jul 2020 11:47:53 +0300 Subject: [PATCH] [FIR2IR] Drop explicit receiver double-conversion for objects --- .../fir/backend/generators/CallAndReferenceGenerator.kt | 4 ---- .../testData/codegen/box/coroutines/beginWithException.kt | 1 - .../testData/codegen/box/coroutines/simpleWithHandleResult.kt | 1 - compiler/testData/codegen/box/jvmName/functionWithDefault.kt | 1 - .../box/polymorphicSignature/varargOfObjects_before.kt | 1 - .../codegen/box/reflection/constructors/primaryConstructor.kt | 1 - .../codegen/box/reflection/mapping/extensionProperty.kt | 1 - .../codegen/box/reflection/mapping/topLevelProperty.kt | 1 - 8 files changed, 11 deletions(-) diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/CallAndReferenceGenerator.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/CallAndReferenceGenerator.kt index 1f8749da06f..d756792876e 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/CallAndReferenceGenerator.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/CallAndReferenceGenerator.kt @@ -475,10 +475,6 @@ class CallAndReferenceGenerator( private fun FirQualifiedAccess.findIrReceiver(explicitReceiverExpression: IrExpression?, isDispatch: Boolean): IrExpression? { val firReceiver = if (isDispatch) dispatchReceiver else extensionReceiver if (firReceiver == explicitReceiver) { - // TODO: remove after fix of KT-35730 (temporary hack to prevent receiver duplication) - if (!isDispatch && dispatchReceiver is FirNoReceiverExpression) { - return visitor.convertToIrExpression(firReceiver) - } return explicitReceiverExpression } if (firReceiver is FirResolvedQualifier) { diff --git a/compiler/testData/codegen/box/coroutines/beginWithException.kt b/compiler/testData/codegen/box/coroutines/beginWithException.kt index 7ad8356d1ad..d259f4b6e45 100644 --- a/compiler/testData/codegen/box/coroutines/beginWithException.kt +++ b/compiler/testData/codegen/box/coroutines/beginWithException.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // WITH_RUNTIME // WITH_COROUTINES // COMMON_COROUTINES_TEST diff --git a/compiler/testData/codegen/box/coroutines/simpleWithHandleResult.kt b/compiler/testData/codegen/box/coroutines/simpleWithHandleResult.kt index 67c14eef99b..25ca2d4562c 100644 --- a/compiler/testData/codegen/box/coroutines/simpleWithHandleResult.kt +++ b/compiler/testData/codegen/box/coroutines/simpleWithHandleResult.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // WITH_RUNTIME // WITH_COROUTINES // COMMON_COROUTINES_TEST diff --git a/compiler/testData/codegen/box/jvmName/functionWithDefault.kt b/compiler/testData/codegen/box/jvmName/functionWithDefault.kt index acceda4b1dc..6ab5ff8b77b 100644 --- a/compiler/testData/codegen/box/jvmName/functionWithDefault.kt +++ b/compiler/testData/codegen/box/jvmName/functionWithDefault.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/polymorphicSignature/varargOfObjects_before.kt b/compiler/testData/codegen/box/polymorphicSignature/varargOfObjects_before.kt index ce882be1f1c..e90515034b7 100644 --- a/compiler/testData/codegen/box/polymorphicSignature/varargOfObjects_before.kt +++ b/compiler/testData/codegen/box/polymorphicSignature/varargOfObjects_before.kt @@ -1,5 +1,4 @@ // !LANGUAGE: -PolymorphicSignature -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // FULL_JDK // SKIP_JDK6 diff --git a/compiler/testData/codegen/box/reflection/constructors/primaryConstructor.kt b/compiler/testData/codegen/box/reflection/constructors/primaryConstructor.kt index a2f4694f9f8..9bd589f6ca2 100644 --- a/compiler/testData/codegen/box/reflection/constructors/primaryConstructor.kt +++ b/compiler/testData/codegen/box/reflection/constructors/primaryConstructor.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // IGNORE_BACKEND: JS_IR // IGNORE_BACKEND: JS_IR_ES6 // TODO: muted automatically, investigate should it be ran for JS or not diff --git a/compiler/testData/codegen/box/reflection/mapping/extensionProperty.kt b/compiler/testData/codegen/box/reflection/mapping/extensionProperty.kt index 4af186593a3..a27df99d6f8 100644 --- a/compiler/testData/codegen/box/reflection/mapping/extensionProperty.kt +++ b/compiler/testData/codegen/box/reflection/mapping/extensionProperty.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_REFLECT diff --git a/compiler/testData/codegen/box/reflection/mapping/topLevelProperty.kt b/compiler/testData/codegen/box/reflection/mapping/topLevelProperty.kt index 8168e8a8454..d6743c7379a 100644 --- a/compiler/testData/codegen/box/reflection/mapping/topLevelProperty.kt +++ b/compiler/testData/codegen/box/reflection/mapping/topLevelProperty.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND_FIR: JVM_IR // TARGET_BACKEND: JVM // WITH_REFLECT