From f97bdcb65cc62dfed964c2720dd3a647d221148f Mon Sep 17 00:00:00 2001 From: Wojciech Litewka Date: Fri, 16 Aug 2024 22:22:34 +0200 Subject: [PATCH] [IR] Drop valueArgumentsCount from IrCallImpl KT-70057 --- .../kotlin/fir/backend/Fir2IrFakeOverrideStrategy.kt | 3 +-- .../kotlin/fir/backend/Fir2IrBuiltinSymbolsContainer.kt | 1 + .../kotlin/fir/backend/generators/AdapterGenerator.kt | 4 +--- .../fir/backend/generators/CallAndReferenceGenerator.kt | 6 +----- .../backend/generators/OperatorExpressionGenerator.kt | 1 - .../jetbrains/kotlin/backend/common/ir/IrInlineUtils.kt | 2 +- .../org/jetbrains/kotlin/backend/common/ir/IrUtils.kt | 1 - .../backend/common/lower/DefaultArgumentStubGenerator.kt | 1 - .../kotlin/backend/common/lower/EnumWhenLowering.kt | 3 +-- .../backend/common/lower/LocalDeclarationsLowering.kt | 1 - .../common/lower/inline/SyntheticAccessorGenerator.kt | 4 ++-- .../kotlin/backend/common/lower/loops/ProgressionType.kt | 9 +++------ .../jetbrains/kotlin/backend/common/lower/loops/Utils.kt | 5 +---- .../jetbrains/kotlin/backend/common/IrValidatorTest.kt | 2 -- .../kotlin/ir/backend/js/JsSharedVariablesManager.kt | 4 ---- .../org/jetbrains/kotlin/ir/backend/js/ir/IrBuilder.kt | 1 - .../ir/backend/js/lower/CallableReferenceLowering.kt | 1 - .../ir/backend/js/lower/CreateScriptFunctionsPhase.kt | 1 - .../ir/backend/js/lower/EscapedIdentifiersLowering.kt | 1 - .../backend/js/lower/InteropCallableReferenceLowering.kt | 4 +--- .../backend/js/lower/InvokeStaticInitializersLowering.kt | 1 - .../ir/backend/js/lower/JsDefaultParameterInjector.kt | 1 - .../kotlin/ir/backend/js/lower/PrivateMembersLowering.kt | 1 - .../ir/backend/js/lower/PropertyReferenceLowering.kt | 6 ++---- .../kotlin/ir/backend/js/lower/SecondaryCtorLowering.kt | 1 - .../kotlin/ir/backend/js/lower/ThrowableLowering.kt | 2 -- .../kotlin/ir/backend/js/lower/VarargLowering.kt | 9 +++------ .../lower/calls/EqualityAndComparisonCallsTransformer.kt | 3 +-- .../js/lower/calls/NumberOperatorCallsTransformer.kt | 9 +++------ .../calls/PrimitiveContainerMemberCallTransformer.kt | 3 +-- .../js/lower/inline/LegacySyntheticAccessorLowering.kt | 4 ++-- .../kotlin/backend/jvm/lower/DirectInvokeLowering.kt | 3 +-- .../kotlin/backend/jvm/lower/JvmInlineClassLowering.kt | 1 - .../jvm/lower/ReplaceNumberToCharCallSitesLowering.kt | 1 - .../org/jetbrains/kotlin/backend/jvm/ir/JvmIrUtils.kt | 2 -- ...lexExternalDeclarationsToTopLevelFunctionsLowering.kt | 1 - .../kotlin/backend/wasm/lower/UnitToVoidLowering.kt | 1 - .../backend/wasm/lower/WasmSharedVariablesManager.kt | 2 -- .../backend/wasm/lower/WhenBranchOptimiserLowering.kt | 3 +-- .../org/jetbrains/kotlin/ir/inline/FunctionInlining.kt | 1 - .../jetbrains/kotlin/ir/interpreter/IrTreeBuildUtils.kt | 2 +- .../jetbrains/kotlin/ir/builders/ExpressionHelpers.kt | 5 +---- .../src/org/jetbrains/kotlin/ir/builders/Primitives.kt | 2 -- .../org/jetbrains/kotlin/ir/expressions/impl/builders.kt | 4 +--- .../ir.tree/src/org/jetbrains/kotlin/ir/util/IrUtils.kt | 3 +-- .../partial/PartialLinkageSupportForLoweringsImpl.kt | 1 - .../test/backend/handlers/IrInterpreterBackendHandler.kt | 2 +- .../kotlin/codegen/ir/ComposeLikeGenerationExtension.kt | 2 -- .../backend/konan/ir/KonanSharedVariablesManager.kt | 8 ++++---- .../kotlin/backend/konan/lower/InitializersLowering.kt | 3 +-- .../backend/konan/lower/RedundantCoercionsCleaner.kt | 2 +- .../kotlin/backend/konan/optimizations/DFGBuilder.kt | 5 ++--- .../konan/optimizations/DevirtualizationAnalysis.kt | 2 -- .../optimizations/KonanBCEForLoopBodyTransformer.kt | 4 ++-- .../atomicfu/compiler/backend/js/TransformerUtil.kt | 2 -- .../atomicfu/compiler/backend/jvm/JvmAtomicSymbols.kt | 1 - .../plugins/kotlin/lower/AbstractComposeLowering.kt | 9 ++------- .../plugins/kotlin/lower/ComposerLambdaMemoization.kt | 1 - .../plugins/kotlin/lower/ComposerParamTransformer.kt | 1 - .../plugins/kotlin/lower/LiveLiteralTransformer.kt | 4 +--- .../kotlin/lower/WrapJsComposableLambdaLowering.kt | 7 ++----- .../jso/compiler/backend/JsObjectLoweringExtension.kt | 3 --- 62 files changed, 47 insertions(+), 136 deletions(-) diff --git a/compiler/fir/entrypoint/src/org/jetbrains/kotlin/fir/backend/Fir2IrFakeOverrideStrategy.kt b/compiler/fir/entrypoint/src/org/jetbrains/kotlin/fir/backend/Fir2IrFakeOverrideStrategy.kt index 5d9b6378cc1fe..dfbb7fbc28940 100644 --- a/compiler/fir/entrypoint/src/org/jetbrains/kotlin/fir/backend/Fir2IrFakeOverrideStrategy.kt +++ b/compiler/fir/entrypoint/src/org/jetbrains/kotlin/fir/backend/Fir2IrFakeOverrideStrategy.kt @@ -350,8 +350,7 @@ class Fir2IrDelegatedMembersGenerationStrategy( offset, callReturnType, delegateTargetFunction.symbol, - delegatedFunction.typeParameters.size, - delegatedFunction.valueParameters.size + delegatedFunction.typeParameters.size ).apply { val thisDispatchReceiverParameter = delegatedFunction.dispatchReceiverParameter!! val getField = IrGetFieldImpl( diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrBuiltinSymbolsContainer.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrBuiltinSymbolsContainer.kt index 649698546dacf..1e2b360172140 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrBuiltinSymbolsContainer.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrBuiltinSymbolsContainer.kt @@ -135,6 +135,7 @@ class Fir2IrBuiltinSymbolsContainer( constructorSymbol, typeArgumentsCount = 0, constructorTypeArgumentsCount = 0, + valueArgumentsCount = 0, ) } diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/AdapterGenerator.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/AdapterGenerator.kt index af469e455bafb..427f03adc2aee 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/AdapterGenerator.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/AdapterGenerator.kt @@ -284,7 +284,6 @@ internal class AdapterGenerator( type, adapteeSymbol, typeArgumentsCount = callableReferenceAccess.typeArguments.size, - valueArgumentsCount = firAdaptee.valueParameters.size + firAdaptee.contextReceivers.size, origin = null, superQualifierSymbol = null ) @@ -676,8 +675,7 @@ internal class AdapterGenerator( startOffset, endOffset, adapterFunction.returnType, invokeSymbol, - typeArgumentsCount = 0, - valueArgumentsCount = adapterFunction.valueParameters.size + typeArgumentsCount = 0 ) irCall.dispatchReceiver = adapterFunction.extensionReceiverParameter!!.toIrGetValue(startOffset, endOffset) for (irAdapterParameter in adapterFunction.valueParameters) { 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 a14fb56666342..5f28e5e9b182c 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 @@ -587,7 +587,6 @@ class CallAndReferenceGenerator( startOffset, endOffset, irType, declarationStorage.findGetterOfProperty(irSymbol), typeArgumentsCount = calleeReference.toResolvedCallableSymbol()!!.fir.typeParameters.size, - valueArgumentsCount = 0, origin = IrStatementOrigin.GET_LOCAL_PROPERTY, superQualifierSymbol = dispatchReceiver?.superQualifierSymbolForFunctionAndPropertyAccess() ) @@ -767,7 +766,6 @@ class CallAndReferenceGenerator( setterSymbol != null -> IrCallImpl( startOffset, endOffset, type, setterSymbol, typeArgumentsCount = firProperty.typeParameters.size, - valueArgumentsCount = 1 + firProperty.contextReceivers.size, origin = origin, superQualifierSymbol = variableAssignment.dispatchReceiver?.superQualifierSymbolForFunctionAndPropertyAccess() ).apply { @@ -812,7 +810,6 @@ class CallAndReferenceGenerator( IrCallImpl( startOffset, endOffset, type, symbol, typeArgumentsCount = firFunction?.typeParameters?.size ?: 0, - valueArgumentsCount = 1, origin = origin ).apply { putValueArgument(0, irRhsWithCast) @@ -1243,8 +1240,7 @@ class CallAndReferenceGenerator( startOffset, endOffset, firConversionFunction.fir.returnTypeRef.toIrType(), irConversionFunction, - typeArgumentsCount = 0, - valueArgumentsCount = 0 + typeArgumentsCount = 0 ).apply { extensionReceiver = this@applyToElement } diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/OperatorExpressionGenerator.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/OperatorExpressionGenerator.kt index c96d9dbf0cac4..953ec12dcbfa5 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/OperatorExpressionGenerator.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/OperatorExpressionGenerator.kt @@ -317,7 +317,6 @@ internal class OperatorExpressionGenerator( irExpression.startOffset, irExpression.endOffset, conversionFirFunction.resolvedReturnType.toIrType(c), conversionFunctionSymbol as IrSimpleFunctionSymbol, - valueArgumentsCount = 0, typeArgumentsCount = 0 ).also { it.dispatchReceiver = irExpression diff --git a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/ir/IrInlineUtils.kt b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/ir/IrInlineUtils.kt index 1370c19415bd5..52c57c49291fa 100644 --- a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/ir/IrInlineUtils.kt +++ b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/ir/IrInlineUtils.kt @@ -121,7 +121,7 @@ fun IrInlinable.inline(target: IrDeclarationParent, arguments: List( IrCallImpl( startOffset, endOffset, (it as IrSimpleFunctionSymbol).owner.returnType, it, typeArgumentsCount = typeArgumentsCount - typeParametersToRemove, - valueArgumentsCount = it.owner.valueParameters.size, origin = LoweredStatementOrigins.DEFAULT_DISPATCH_CALL, superQualifierSymbol = superQualifierSymbol ) diff --git a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/EnumWhenLowering.kt b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/EnumWhenLowering.kt index efcc9809fad8e..faef879167ee0 100644 --- a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/EnumWhenLowering.kt +++ b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/EnumWhenLowering.kt @@ -165,8 +165,7 @@ open class EnumWhenLowering(protected open val context: CommonBackendContext) : return IrCallImpl( expression.startOffset, expression.endOffset, expression.type, expression.symbol, - typeArgumentsCount = 0, - valueArgumentsCount = 2 + typeArgumentsCount = 0 ).apply { putValueArgument(0, IrGetValueImpl(lhs.startOffset, lhs.endOffset, subjectOrdinal.type, subjectOrdinal.symbol)) putValueArgument(1, IrConstImpl.int(rhs.startOffset, rhs.endOffset, context.irBuiltIns.intType, entryOrdinal)) diff --git a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/LocalDeclarationsLowering.kt b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/LocalDeclarationsLowering.kt index eaff96fe736d4..3b9db1a79323f 100644 --- a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/LocalDeclarationsLowering.kt +++ b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/LocalDeclarationsLowering.kt @@ -631,7 +631,6 @@ open class LocalDeclarationsLowering( oldCall.type, newCallee.symbol, typeArgumentsCount = newCallee.typeParameters.size, - valueArgumentsCount = newCallee.valueParameters.size, origin = oldCall.origin, superQualifierSymbol = oldCall.superQualifierSymbol ).also { diff --git a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/inline/SyntheticAccessorGenerator.kt b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/inline/SyntheticAccessorGenerator.kt index 1839e8033961c..e2deae77abc92 100644 --- a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/inline/SyntheticAccessorGenerator.kt +++ b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/inline/SyntheticAccessorGenerator.kt @@ -496,7 +496,7 @@ abstract class SyntheticAccessorGenerator( val call = IrCallImpl( oldExpression.startOffset, oldExpression.endOffset, oldExpression.type, - accessorSymbol, 0, accessorSymbol.owner.valueParameters.size, + accessorSymbol, 0, oldExpression.origin ) oldExpression.receiver?.let { @@ -541,7 +541,7 @@ abstract class SyntheticAccessorGenerator( val call = IrCallImpl( oldExpression.startOffset, oldExpression.endOffset, oldExpression.type, - accessorSymbol, 0, accessorSymbol.owner.valueParameters.size, + accessorSymbol, 0, oldExpression.origin ) oldExpression.receiver?.let { diff --git a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/loops/ProgressionType.kt b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/loops/ProgressionType.kt index f772e71854749..1b98ba8bdc62c 100644 --- a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/loops/ProgressionType.kt +++ b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/loops/ProgressionType.kt @@ -124,8 +124,7 @@ internal abstract class UnsignedProgressionType( startOffset, endOffset, unsignedType, unsafeCoerceIntrinsic, - typeArgumentsCount = 2, - valueArgumentsCount = 1 + typeArgumentsCount = 2 ).apply { putTypeArgument(0, fromType) putTypeArgument(1, unsignedType) @@ -136,8 +135,7 @@ internal abstract class UnsignedProgressionType( IrCallImpl( startOffset, endOffset, unsignedConversionFunction.owner.returnType, unsignedConversionFunction, - typeArgumentsCount = 0, - valueArgumentsCount = 0 + typeArgumentsCount = 0 ).apply { extensionReceiver = this@asUnsigned } @@ -152,8 +150,7 @@ internal abstract class UnsignedProgressionType( IrCallImpl( startOffset, endOffset, toType, unsafeCoerceIntrinsic, - typeArgumentsCount = 2, - valueArgumentsCount = 1 + typeArgumentsCount = 2 ).apply { putTypeArgument(0, unsignedType) putTypeArgument(1, toType) diff --git a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/loops/Utils.kt b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/loops/Utils.kt index 3052b8f22a399..25c1e9bd2b19c 100644 --- a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/loops/Utils.kt +++ b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/loops/Utils.kt @@ -38,7 +38,6 @@ internal fun IrExpression.negate(): IrExpression { IrCallImpl( startOffset, endOffset, unaryMinusFun.returnType, unaryMinusFun.symbol, - valueArgumentsCount = 0, typeArgumentsCount = 0 ).apply { dispatchReceiver = this@negate @@ -61,7 +60,6 @@ internal fun IrExpression.decrement(): IrExpression { IrCallImpl( startOffset, endOffset, type, decFun.symbol, - valueArgumentsCount = 0, typeArgumentsCount = 0 ).apply { dispatchReceiver = this@decrement @@ -201,8 +199,7 @@ private fun IrExpression.makeIrCallConversionToTargetClass( return IrCallImpl( startOffset, endOffset, castFun.returnType, castFun.symbol, - typeArgumentsCount = 0, - valueArgumentsCount = 0 + typeArgumentsCount = 0 ).also { it.dispatchReceiver = this } } diff --git a/compiler/ir/backend.common/test/org/jetbrains/kotlin/backend/common/IrValidatorTest.kt b/compiler/ir/backend.common/test/org/jetbrains/kotlin/backend/common/IrValidatorTest.kt index b2a6b0d7a23bc..cdaeccc212003 100644 --- a/compiler/ir/backend.common/test/org/jetbrains/kotlin/backend/common/IrValidatorTest.kt +++ b/compiler/ir/backend.common/test/org/jetbrains/kotlin/backend/common/IrValidatorTest.kt @@ -79,7 +79,6 @@ class IrValidatorTest { IrCallImpl( UNDEFINED_OFFSET, UNDEFINED_OFFSET, TestIrBuiltins.anyType, function.symbol, typeArgumentsCount = 0, - valueArgumentsCount = 1, ).apply { dispatchReceiver = stringConcatenationWithWrongType putValueArgument(0, stringConcatenationWithWrongType) @@ -105,7 +104,6 @@ class IrValidatorTest { IrCallImpl( 6, 23, TestIrBuiltins.anyType, function.symbol, typeArgumentsCount = 0, - valueArgumentsCount = 1, ).apply { dispatchReceiver = stringConcatenationWithWrongType putValueArgument(0, stringConcatenationWithWrongType) diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/JsSharedVariablesManager.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/JsSharedVariablesManager.kt index c67b16f7d5c07..3c9290f9759e2 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/JsSharedVariablesManager.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/JsSharedVariablesManager.kt @@ -17,7 +17,6 @@ import org.jetbrains.kotlin.ir.expressions.impl.IrConstImpl import org.jetbrains.kotlin.ir.expressions.impl.IrGetValueImpl import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol import org.jetbrains.kotlin.ir.symbols.IrValueSymbol -import org.jetbrains.kotlin.ir.symbols.IrVariableSymbol class JsSharedVariablesManager(context: JsIrBackendContext) : SharedVariablesManager { @@ -39,7 +38,6 @@ class JsSharedVariablesManager(context: JsIrBackendContext) : SharedVariablesMan IrCallImpl( initializer.startOffset, initializer.endOffset, dynamicType, createBox, - valueArgumentsCount = 1, typeArgumentsCount = 1 ).apply { putTypeArgument(0, valueType) @@ -68,7 +66,6 @@ class JsSharedVariablesManager(context: JsIrBackendContext) : SharedVariablesMan originalGet.type, readBox, typeArgumentsCount = 1, - valueArgumentsCount = 1, originalGet.origin ).apply { putTypeArgument(0, originalGet.type) @@ -91,7 +88,6 @@ class JsSharedVariablesManager(context: JsIrBackendContext) : SharedVariablesMan builtIns.unitType, writeBox, typeArgumentsCount = 1, - valueArgumentsCount = 2, originalSet.origin ).apply { putTypeArgument(0, originalSet.value.type) diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/ir/IrBuilder.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/ir/IrBuilder.kt index 629a1f1026b3d..cba5c26dfcb80 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/ir/IrBuilder.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/ir/IrBuilder.kt @@ -36,7 +36,6 @@ object JsIrBuilder { target, superQualifierSymbol = superQualifierSymbol, typeArgumentsCount = owner.typeParameters.size, - valueArgumentsCount = owner.valueParameters.size, origin = origin ).apply { typeArguments?.let { diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/CallableReferenceLowering.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/CallableReferenceLowering.kt index f9fc8961c9c9c..41b57199e12f1 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/CallableReferenceLowering.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/CallableReferenceLowering.kt @@ -331,7 +331,6 @@ class CallableReferenceLowering(private val context: JsCommonBackendContext) : B callee.returnType, callee.symbol, callee.typeParameters.size, - callee.valueParameters.size, JsStatementOrigins.CALLABLE_REFERENCE_INVOKE ) } diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/CreateScriptFunctionsPhase.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/CreateScriptFunctionsPhase.kt index 8774a7a48b33f..aed0e42d13cee 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/CreateScriptFunctionsPhase.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/CreateScriptFunctionsPhase.kt @@ -142,7 +142,6 @@ class CreateScriptFunctionsPhase(val context: CommonBackendContext) : FileLoweri return IrCallImpl( UNDEFINED_OFFSET, UNDEFINED_OFFSET, function.returnType, function.symbol, - valueArgumentsCount = function.valueParameters.size, typeArgumentsCount = function.typeParameters.size ) } diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/EscapedIdentifiersLowering.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/EscapedIdentifiersLowering.kt index 3310d57a1a9bf..fafeb078943c7 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/EscapedIdentifiersLowering.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/EscapedIdentifiersLowering.kt @@ -50,7 +50,6 @@ class EscapedIdentifiersLowering(context: JsIrBackendContext) : BodyLoweringPass type = context.dynamicType, symbol = context.intrinsics.globalThis.owner.getter!!.symbol, typeArgumentsCount = 0, - valueArgumentsCount = 0, ) private val IrFunction.dummyDispatchReceiverParameter diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/InteropCallableReferenceLowering.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/InteropCallableReferenceLowering.kt index 0a01de80e538d..c41b8b8782ff7 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/InteropCallableReferenceLowering.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/InteropCallableReferenceLowering.kt @@ -100,7 +100,6 @@ class InteropCallableReferenceLowering(val context: JsIrBackendContext) : BodyLo UNDEFINED_OFFSET, context.irBuiltIns.anyType, context.intrinsics.jsBind, - valueArgumentsCount = 2, typeArgumentsCount = 0, origin = JsStatementOrigins.BIND_CALL, ).apply { @@ -170,7 +169,7 @@ class InteropCallableReferenceLowering(val context: JsIrBackendContext) : BodyLo factory: IrSimpleFunctionSymbol ): IrCall { val newCall = expression.run { - IrCallImpl(startOffset, endOffset, type, factory, typeArgumentsCount, valueArgumentsCount, origin) + IrCallImpl(startOffset, endOffset, type, factory, typeArgumentsCount, origin) } newCall.dispatchReceiver = expression.dispatchReceiver @@ -434,7 +433,6 @@ class InteropCallableReferenceLowering(val context: JsIrBackendContext) : BodyLo invokeFun.returnType, invokeFun.symbol, typeArgumentsCount = 0, - valueArgumentsCount = invokeFun.valueParameters.size, origin = JsStatementOrigins.EXPLICIT_INVOKE, superQualifierSymbol = null ) diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/InvokeStaticInitializersLowering.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/InvokeStaticInitializersLowering.kt index 7d4b5bef06526..7988094dfcb2d 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/InvokeStaticInitializersLowering.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/InvokeStaticInitializersLowering.kt @@ -35,7 +35,6 @@ class InvokeStaticInitializersLowering(val context: JsCommonBackendContext) : Bo context.irBuiltIns.unitType, instance.symbol, typeArgumentsCount = 0, - valueArgumentsCount = 0, origin = JsStatementOrigins.SYNTHESIZED_STATEMENT ) diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/JsDefaultParameterInjector.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/JsDefaultParameterInjector.kt index 610e482234d4a..adbc10f5ed3f0 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/JsDefaultParameterInjector.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/JsDefaultParameterInjector.kt @@ -80,7 +80,6 @@ class JsDefaultParameterInjector(context: JsIrBackendContext) : context.dynamicType, context.intrinsics.jsPrototypeOfSymbol, typeArgumentsCount = 0, - valueArgumentsCount = 1 ).apply { putValueArgument(0, owner.jsConstructorReference(context)) } diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/PrivateMembersLowering.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/PrivateMembersLowering.kt index b98cda060e6c1..96690312b06be 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/PrivateMembersLowering.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/PrivateMembersLowering.kt @@ -187,7 +187,6 @@ class PrivateMemberBodiesLowering(val context: JsIrBackendContext) : BodyLowerin expression.type, staticTarget.symbol, typeArgumentsCount = expression.typeArgumentsCount, - valueArgumentsCount = expression.valueArgumentsCount + 1, origin = expression.origin, superQualifierSymbol = expression.superQualifierSymbol ) diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/PropertyReferenceLowering.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/PropertyReferenceLowering.kt index ea59686ad20ee..b1e9bdda8e10c 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/PropertyReferenceLowering.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/PropertyReferenceLowering.kt @@ -194,7 +194,6 @@ class PropertyReferenceLowering(private val context: JsIrBackendContext) : BodyL val irCall = IrCallImpl( startOffset, endOffset, jsClassSymbol.owner.returnType, jsClassSymbol, typeArgumentsCount = 1, - valueArgumentsCount = 0, ) irCall.putTypeArgument(0, type) return irCall @@ -212,8 +211,7 @@ class PropertyReferenceLowering(private val context: JsIrBackendContext) : BodyL expression.endOffset, expression.type, factoryFunction.symbol, - expression.typeArgumentsCount, - factoryFunction.valueParameters.size + expression.typeArgumentsCount ).apply { for (ti in 0 until typeArgumentsCount) { putTypeArgument(ti, expression.getTypeArgument(ti)) @@ -229,7 +227,7 @@ class PropertyReferenceLowering(private val context: JsIrBackendContext) : BodyL expression.transformChildrenVoid(this) val builderCall = expression.run { - IrCallImpl(startOffset, endOffset, type, localDelegateBuilderSymbol, typeArgumentsCount, valueArgumentsCount = 4) + IrCallImpl(startOffset, endOffset, type, localDelegateBuilderSymbol, typeArgumentsCount) } val localName = expression.symbol.owner.name.asString() diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/SecondaryCtorLowering.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/SecondaryCtorLowering.kt index c682c24fb9c8f..010261a1ab670 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/SecondaryCtorLowering.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/SecondaryCtorLowering.kt @@ -312,7 +312,6 @@ private class CallsiteRedirectionTransformer(private val context: JsIrBackendCon return IrCallImpl( call.startOffset, call.endOffset, call.type, newTarget, typeArgumentsCount = call.typeArgumentsCount, - valueArgumentsCount = newTarget.owner.valueParameters.size, superQualifierSymbol = irClass.symbol.takeIf { context.es6mode && call.isSyntheticDelegatingReplacement } ).apply { copyTypeArgumentsFrom(call) diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/ThrowableLowering.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/ThrowableLowering.kt index 08d38d5c4e23e..5ffa1a02b8bb1 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/ThrowableLowering.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/ThrowableLowering.kt @@ -72,7 +72,6 @@ class ThrowableLowering(val context: JsIrBackendContext, val extendThrowableFunc return expression.run { IrCallImpl( startOffset, endOffset, type, newThrowableFunction, - valueArgumentsCount = 2, typeArgumentsCount = 0 ).also { it.putValueArgument(0, messageArg) @@ -93,7 +92,6 @@ class ThrowableLowering(val context: JsIrBackendContext, val extendThrowableFunc val expressionReplacement = expression.run { IrCallImpl( startOffset, endOffset, type, extendThrowableFunction, - valueArgumentsCount = 3, typeArgumentsCount = 0 ).also { it.putValueArgument(0, thisReceiver) diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/VarargLowering.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/VarargLowering.kt index cdf27e773d8a7..bcd1e33f20c29 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/VarargLowering.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/VarargLowering.kt @@ -103,8 +103,7 @@ private class VarargTransformer( expression.endOffset, arrayInfo.primitiveArrayType, concatFun, - typeArgumentsCount = 0, - valueArgumentsCount = 1 + typeArgumentsCount = 0 ).apply { putValueArgument(0, arrayLiteral) } @@ -135,8 +134,7 @@ private class VarargTransformer( expression.endOffset, arrayInfo.primitiveArrayType, copyFunction, - typeArgumentsCount = 1, - valueArgumentsCount = 1 + typeArgumentsCount = 1 ).apply { putTypeArgument(0, arrayInfo.primitiveArrayType) putValueArgument(0, segment) @@ -198,8 +196,7 @@ private fun List.toArrayLiteral(context: JsIrBackendContext, type: return IrCallImpl( startOffset, endOffset, type, intrinsic, - typeArgumentsCount = if (intrinsic.owner.typeParameters.isNotEmpty()) 1 else 0, - valueArgumentsCount = 1 + typeArgumentsCount = if (intrinsic.owner.typeParameters.isNotEmpty()) 1 else 0 ).apply { if (typeArgumentsCount == 1) { putTypeArgument(0, varargElementType) diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/calls/EqualityAndComparisonCallsTransformer.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/calls/EqualityAndComparisonCallsTransformer.kt index d4ce51e5d502b..c1d160cfa0038 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/calls/EqualityAndComparisonCallsTransformer.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/calls/EqualityAndComparisonCallsTransformer.kt @@ -53,8 +53,7 @@ class EqualityAndComparisonCallsTransformer(context: JsIrBackendContext) : Calls call.endOffset, comparator.owner.returnType, comparator, - typeArgumentsCount = 0, - valueArgumentsCount = 2 + typeArgumentsCount = 0 ).apply { putValueArgument(0, irCall(call, intrinsics.longCompareToLong, argumentsAsReceivers = true)) putValueArgument(1, JsIrBuilder.buildInt(irBuiltIns.intType, 0)) diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/calls/NumberOperatorCallsTransformer.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/calls/NumberOperatorCallsTransformer.kt index 2dcc273db030d..2d9e865da3117 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/calls/NumberOperatorCallsTransformer.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/calls/NumberOperatorCallsTransformer.kt @@ -227,8 +227,7 @@ class NumberOperatorCallsTransformer(context: JsIrBackendContext) : CallsTransfo call.endOffset, intrinsics.longToDouble.owner.returnType, intrinsics.longToDouble, - typeArgumentsCount = 0, - valueArgumentsCount = 0 + typeArgumentsCount = 0 ).apply { dispatchReceiver = arg }) @@ -240,8 +239,7 @@ class NumberOperatorCallsTransformer(context: JsIrBackendContext) : CallsTransfo call.endOffset, intrinsics.longToFloat.owner.returnType, intrinsics.longToFloat, - typeArgumentsCount = 0, - valueArgumentsCount = 0 + typeArgumentsCount = 0 ).apply { dispatchReceiver = arg }) @@ -253,8 +251,7 @@ class NumberOperatorCallsTransformer(context: JsIrBackendContext) : CallsTransfo call.endOffset, intrinsics.jsNumberToLong.owner.returnType, intrinsics.jsNumberToLong, - typeArgumentsCount = 0, - valueArgumentsCount = 1 + typeArgumentsCount = 0 ).apply { putValueArgument(0, call.dispatchReceiver) } diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/calls/PrimitiveContainerMemberCallTransformer.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/calls/PrimitiveContainerMemberCallTransformer.kt index 24299232b778e..3b17fef0b8ec6 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/calls/PrimitiveContainerMemberCallTransformer.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/calls/PrimitiveContainerMemberCallTransformer.kt @@ -39,8 +39,7 @@ class PrimitiveContainerMemberCallTransformer(private val context: JsIrBackendCo call.endOffset, call.type, context.intrinsics.primitiveToSizeConstructor[elementType]!!, - typeArgumentsCount = 0, - valueArgumentsCount = 1 + typeArgumentsCount = 0 ).apply { putValueArgument(0, call.getValueArgument(0)) } diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/inline/LegacySyntheticAccessorLowering.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/inline/LegacySyntheticAccessorLowering.kt index 8cd817c5ac227..0884cfcc65f85 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/inline/LegacySyntheticAccessorLowering.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/inline/LegacySyntheticAccessorLowering.kt @@ -135,7 +135,7 @@ class LegacySyntheticAccessorLowering(private val context: CommonBackendContext) val copier = FunctionCopier(fileHash) val newFunction = copier.copy(this) - val irCall = IrCallImpl(startOffset, endOffset, newFunction.returnType, symbol, typeParameters.size, valueParameters.size) + val irCall = IrCallImpl(startOffset, endOffset, newFunction.returnType, symbol, typeParameters.size) newFunction.typeParameters.forEachIndexed { i, tp -> irCall.putTypeArgument(i, tp.defaultType) @@ -164,7 +164,7 @@ class LegacySyntheticAccessorLowering(private val context: CommonBackendContext) functionMap[callee]?.let { newFunction -> val newExpression = expression.run { - IrCallImpl(startOffset, endOffset, type, newFunction.symbol, typeArgumentsCount, valueArgumentsCount, origin) + IrCallImpl(startOffset, endOffset, type, newFunction.symbol, typeArgumentsCount, origin) } newExpression.copyTypeArgumentsFrom(expression) diff --git a/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/DirectInvokeLowering.kt b/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/DirectInvokeLowering.kt index cd1b50311d3a2..75ba9d62e40db 100644 --- a/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/DirectInvokeLowering.kt +++ b/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/DirectInvokeLowering.kt @@ -25,7 +25,6 @@ import org.jetbrains.kotlin.ir.expressions.impl.IrConstructorCallImpl import org.jetbrains.kotlin.ir.symbols.impl.IrVariableSymbolImpl import org.jetbrains.kotlin.ir.util.dump import org.jetbrains.kotlin.ir.util.explicitParameters -import org.jetbrains.kotlin.ir.util.render import org.jetbrains.kotlin.util.OperatorNameConventions @PhaseDescription( @@ -92,7 +91,7 @@ internal class DirectInvokeLowering(private val context: JvmBackendContext) : Fi is IrSimpleFunction -> IrCallImpl( expression.startOffset, expression.endOffset, expression.type, irFun.symbol, - typeArgumentsCount = irFun.typeParameters.size, valueArgumentsCount = irFun.valueParameters.size + typeArgumentsCount = irFun.typeParameters.size ).apply { copyReceiverAndValueArgumentsForDirectInvoke(receiver, expression) } diff --git a/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/JvmInlineClassLowering.kt b/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/JvmInlineClassLowering.kt index cb0d5c4a6a0fb..9aee1f1674562 100644 --- a/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/JvmInlineClassLowering.kt +++ b/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/JvmInlineClassLowering.kt @@ -246,7 +246,6 @@ internal class JvmInlineClassLowering(context: JvmBackendContext) : JvmValueClas type = function.returnType.substitute(expression.typeSubstitutionMap), symbol = replacement.symbol, typeArgumentsCount = replacement.typeParameters.size, - valueArgumentsCount = replacement.valueParameters.size, origin = expression.origin, superQualifierSymbol = (expression as? IrCall)?.superQualifierSymbol ).apply { diff --git a/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/ReplaceNumberToCharCallSitesLowering.kt b/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/ReplaceNumberToCharCallSitesLowering.kt index 9ffaabdbfc1ce..69af020b6b8cf 100644 --- a/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/ReplaceNumberToCharCallSitesLowering.kt +++ b/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/ReplaceNumberToCharCallSitesLowering.kt @@ -53,7 +53,6 @@ internal class ReplaceNumberToCharCallSitesLowering(val context: JvmBackendConte dispatchReceiver.startOffset, dispatchReceiver.endOffset, context.irBuiltIns.intType, context.irBuiltIns.numberClass.functionByName("toInt"), typeArgumentsCount = 0, - valueArgumentsCount = 0, ).also { toInt -> toInt.dispatchReceiver = dispatchReceiver } diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/ir/JvmIrUtils.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/ir/JvmIrUtils.kt index 79486a0506a2e..7cea9fb91de92 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/ir/JvmIrUtils.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/ir/JvmIrUtils.kt @@ -38,7 +38,6 @@ import org.jetbrains.kotlin.ir.expressions.* import org.jetbrains.kotlin.ir.expressions.impl.IrCallImpl import org.jetbrains.kotlin.ir.expressions.impl.IrClassReferenceImpl import org.jetbrains.kotlin.ir.expressions.impl.IrGetFieldImpl -import org.jetbrains.kotlin.ir.expressions.impl.fromSymbolOwner import org.jetbrains.kotlin.ir.symbols.IrFunctionSymbol import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol import org.jetbrains.kotlin.ir.symbols.IrVariableSymbol @@ -177,7 +176,6 @@ fun createDelegatingCallWithPlaceholderTypeArguments( existingCall.type, redirectTarget.symbol, typeArgumentsCount = redirectTarget.typeParameters.size, - valueArgumentsCount = redirectTarget.valueParameters.size, origin = existingCall.origin ).apply { copyFromWithPlaceholderTypeArguments(existingCall, irBuiltIns) diff --git a/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/lower/ComplexExternalDeclarationsToTopLevelFunctionsLowering.kt b/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/lower/ComplexExternalDeclarationsToTopLevelFunctionsLowering.kt index 68d8d0be98a23..7e618ff074c19 100644 --- a/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/lower/ComplexExternalDeclarationsToTopLevelFunctionsLowering.kt +++ b/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/lower/ComplexExternalDeclarationsToTopLevelFunctionsLowering.kt @@ -504,7 +504,6 @@ class ComplexExternalDeclarationsUsageLowering(val context: WasmBackendContext) endOffset = expression.endOffset, type = expression.type, symbol = externalGetInstance.symbol, - valueArgumentsCount = 0, typeArgumentsCount = 0 ) } diff --git a/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/lower/UnitToVoidLowering.kt b/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/lower/UnitToVoidLowering.kt index 75b2a56e10ead..30aec46da441e 100644 --- a/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/lower/UnitToVoidLowering.kt +++ b/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/lower/UnitToVoidLowering.kt @@ -137,7 +137,6 @@ class UnitToVoidLowering(val context: WasmBackendContext) : FileLoweringPass, Ab return IrCallImpl( expr.startOffset, expr.endOffset, symbols.voidType, symbols.findVoidConsumer(expr.type), typeArgumentsCount = 0, - valueArgumentsCount = 1, ).apply { putValueArgument(0, expr) } diff --git a/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/lower/WasmSharedVariablesManager.kt b/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/lower/WasmSharedVariablesManager.kt index f292823f5ee4b..4c6db94a4bbda 100644 --- a/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/lower/WasmSharedVariablesManager.kt +++ b/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/lower/WasmSharedVariablesManager.kt @@ -77,7 +77,6 @@ class WasmSharedVariablesManager(val context: WasmBackendContext) : SharedVariab type = propertyGetter.returnType, symbol = propertyGetter.symbol, typeArgumentsCount = 0, - valueArgumentsCount = 0, origin = originalGet.origin ).also { it.dispatchReceiver = IrGetValueImpl( @@ -112,7 +111,6 @@ class WasmSharedVariablesManager(val context: WasmBackendContext) : SharedVariab type = propertySetter.returnType, symbol = propertySetter.symbol, typeArgumentsCount = 0, - valueArgumentsCount = 1, origin = originalSet.origin ).also { it.dispatchReceiver = IrGetValueImpl( diff --git a/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/lower/WhenBranchOptimiserLowering.kt b/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/lower/WhenBranchOptimiserLowering.kt index 9d27e0d59665e..37c0c3e62fad6 100644 --- a/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/lower/WhenBranchOptimiserLowering.kt +++ b/compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/lower/WhenBranchOptimiserLowering.kt @@ -168,8 +168,7 @@ private class WhenBranchOptimiserTransformer( endOffset = UNDEFINED_OFFSET, type = context.irBuiltIns.nothingType, symbol = context.wasmSymbols.wasmUnreachable, - typeArgumentsCount = 0, - valueArgumentsCount = 0 + typeArgumentsCount = 0 ) branch.result = unreachable expression.branches.add(branch) diff --git a/compiler/ir/ir.inline/src/org/jetbrains/kotlin/ir/inline/FunctionInlining.kt b/compiler/ir/ir.inline/src/org/jetbrains/kotlin/ir/inline/FunctionInlining.kt index a0ae98e85d8a7..96f22dd31d24c 100644 --- a/compiler/ir/ir.inline/src/org/jetbrains/kotlin/ir/inline/FunctionInlining.kt +++ b/compiler/ir/ir.inline/src/org/jetbrains/kotlin/ir/inline/FunctionInlining.kt @@ -388,7 +388,6 @@ open class FunctionInlining( functionReferenceReturnType, inlinedFunction.symbol, inlinedFunction.typeParameters.size, - inlinedFunction.valueParameters.size, INLINED_FUNCTION_REFERENCE ) }.apply { diff --git a/compiler/ir/ir.interpreter/src/org/jetbrains/kotlin/ir/interpreter/IrTreeBuildUtils.kt b/compiler/ir/ir.interpreter/src/org/jetbrains/kotlin/ir/interpreter/IrTreeBuildUtils.kt index d8a949d4eef09..be372327bb1e4 100644 --- a/compiler/ir/ir.interpreter/src/org/jetbrains/kotlin/ir/interpreter/IrTreeBuildUtils.kt +++ b/compiler/ir/ir.interpreter/src/org/jetbrains/kotlin/ir/interpreter/IrTreeBuildUtils.kt @@ -37,7 +37,7 @@ fun Any?.toIrConst(irType: IrType, startOffset: Int = SYNTHETIC_OFFSET, endOffse internal fun IrFunction.createCall(origin: IrStatementOrigin? = null): IrCall { this as IrSimpleFunction - return IrCallImpl(SYNTHETIC_OFFSET, SYNTHETIC_OFFSET, returnType, symbol, typeParameters.size, valueParameters.size, origin) + return IrCallImpl(SYNTHETIC_OFFSET, SYNTHETIC_OFFSET, returnType, symbol, typeParameters.size, origin) } internal fun IrConstructor.createConstructorCall(irType: IrType = returnType): IrConstructorCall { diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/builders/ExpressionHelpers.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/builders/ExpressionHelpers.kt index b59b955750526..3fe205026cb2c 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/builders/ExpressionHelpers.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/builders/ExpressionHelpers.kt @@ -196,7 +196,6 @@ fun IrBuilderWithScope.irGet(type: IrType, receiver: IrExpression?, getterSymbol type, getterSymbol as IrSimpleFunctionSymbol, typeArgumentsCount = getterSymbol.owner.typeParameters.size, - valueArgumentsCount = 0, origin = IrStatementOrigin.GET_PROPERTY ).apply { dispatchReceiver = receiver @@ -208,7 +207,6 @@ fun IrBuilderWithScope.irSet(type: IrType, receiver: IrExpression?, setterSymbol type, setterSymbol as IrSimpleFunctionSymbol, typeArgumentsCount = setterSymbol.owner.typeParameters.size, - valueArgumentsCount = 1, origin = IrStatementOrigin.EQ ).apply { dispatchReceiver = receiver @@ -249,7 +247,6 @@ fun IrBuilderWithScope.irCall( IrCallImpl( startOffset, endOffset, type, callee, typeArgumentsCount = typeArgumentsCount, - valueArgumentsCount = valueArgumentsCount, origin = origin ) @@ -286,7 +283,7 @@ fun IrBuilderWithScope.irCall(callee: IrFunction, origin: IrStatementOrigin? = n IrCallImpl( startOffset, endOffset, callee.returnType, callee.symbol as IrSimpleFunctionSymbol, - callee.typeParameters.size, callee.valueParameters.size, + callee.typeParameters.size, origin, superQualifierSymbol ) diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/builders/Primitives.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/builders/Primitives.kt index 57f2aceabc6ce..34554ba3457ca 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/builders/Primitives.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/builders/Primitives.kt @@ -36,7 +36,6 @@ fun primitiveOp1( IrCallImpl( startOffset, endOffset, primitiveOpReturnType, primitiveOpSymbol, typeArgumentsCount = 0, - valueArgumentsCount = 0, origin = origin ).also { it.dispatchReceiver = dispatchReceiver @@ -54,7 +53,6 @@ fun primitiveOp2( primitiveOpReturnType, primitiveOpSymbol, typeArgumentsCount = 0, - valueArgumentsCount = 2, origin = origin ).apply { putValueArgument(0, argument1) diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/expressions/impl/builders.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/expressions/impl/builders.kt index e6e30e707ba5e..5584e79b57aed 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/expressions/impl/builders.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/expressions/impl/builders.kt @@ -799,9 +799,9 @@ fun IrCallImpl( type: IrType, symbol: IrSimpleFunctionSymbol, typeArgumentsCount: Int = symbol.getRealOwner().typeParameters.size, - valueArgumentsCount: Int = symbol.getRealOwner().valueParameters.size, origin: IrStatementOrigin? = null, superQualifierSymbol: IrClassSymbol? = null, + valueArgumentsCount: Int = symbol.getRealOwner().valueParameters.size, ): IrCallImpl = IrCallImplWithShape( startOffset = startOffset, endOffset = endOffset, @@ -1069,8 +1069,6 @@ fun IrCallImpl.Companion.fromSymbolOwner( endOffset, symbol.owner.returnType, symbol, - typeArgumentsCount = symbol.owner.typeParameters.size, - valueArgumentsCount = symbol.owner.valueParameters.size, origin = null, superQualifierSymbol = null ) diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/IrUtils.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/IrUtils.kt index bd5118d095edd..99b5372b7cf75 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/IrUtils.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/IrUtils.kt @@ -560,7 +560,6 @@ fun irCall( newReturnType ?: type, newSymbol, typeArgumentsCount, - valueArgumentsCount = newSymbol.owner.valueParameters.size, origin = origin, superQualifierSymbol = newSuperQualifierSymbol ).apply { @@ -779,7 +778,7 @@ fun IrExpression.remapReceiver(oldReceiver: IrValueParameter?, newReceiver: IrVa is IrGetValue -> IrGetValueImpl(startOffset, endOffset, type, newReceiver?.symbol.takeIf { symbol == oldReceiver?.symbol } ?: symbol, origin) is IrCall -> - IrCallImpl(startOffset, endOffset, type, symbol, typeArgumentsCount, valueArgumentsCount, origin, superQualifierSymbol).also { + IrCallImpl(startOffset, endOffset, type, symbol, typeArgumentsCount, origin, superQualifierSymbol).also { it.dispatchReceiver = dispatchReceiver?.remapReceiver(oldReceiver, newReceiver) it.extensionReceiver = extensionReceiver?.remapReceiver(oldReceiver, newReceiver) } diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/linkage/partial/PartialLinkageSupportForLoweringsImpl.kt b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/linkage/partial/PartialLinkageSupportForLoweringsImpl.kt index bc2ca76820692..b37ff4a0231f9 100644 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/linkage/partial/PartialLinkageSupportForLoweringsImpl.kt +++ b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/linkage/partial/PartialLinkageSupportForLoweringsImpl.kt @@ -70,7 +70,6 @@ internal class PartialLinkageSupportForLoweringsImpl( type = builtIns.nothingType, symbol = builtIns.linkageErrorSymbol, typeArgumentsCount = 0, - valueArgumentsCount = 1, origin = IrStatementOrigin.PARTIAL_LINKAGE_RUNTIME_ERROR ).apply { putValueArgument(0, IrConstImpl.string(startOffset, endOffset, builtIns.stringType, errorMessage)) diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/IrInterpreterBackendHandler.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/IrInterpreterBackendHandler.kt index e2590ec1fea34..6bbec599c429d 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/IrInterpreterBackendHandler.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/IrInterpreterBackendHandler.kt @@ -74,7 +74,7 @@ private class Evaluator(private val interpreter: IrInterpreter, private val glob val default = parameter.defaultValue?.expression as? IrCall ?: return@forEachIndexed val callWithNewOffsets = IrCallImpl( expression.startOffset, expression.endOffset, default.type, default.symbol, - default.typeArgumentsCount, default.valueArgumentsCount, default.origin, default.superQualifierSymbol + default.typeArgumentsCount, default.origin, default.superQualifierSymbol ) callWithNewOffsets.copyTypeAndValueArgumentsFrom(default) interpreter.interpret(callWithNewOffsets, irFile) diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/ir/ComposeLikeGenerationExtension.kt b/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/ir/ComposeLikeGenerationExtension.kt index af8a7516f4dd3..e2625ea603082 100644 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/ir/ComposeLikeGenerationExtension.kt +++ b/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/ir/ComposeLikeGenerationExtension.kt @@ -81,7 +81,6 @@ class ComposeLikeDefaultMethodCallRewriter(private val context: IrPluginContext, expression.type, expression.symbol, function.typeParameters.size, - function.valueParameters.size, expression.origin, expression.superQualifierSymbol ).also { @@ -300,7 +299,6 @@ class ComposeLikeDefaultArgumentRewriter( symbol.owner.returnType, symbol as IrSimpleFunctionSymbol, symbol.owner.typeParameters.size, - symbol.owner.valueParameters.size, origin ).also { if (dispatchReceiver != null) it.dispatchReceiver = dispatchReceiver diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ir/KonanSharedVariablesManager.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ir/KonanSharedVariablesManager.kt index 55949ae738705..221c96154fe66 100644 --- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ir/KonanSharedVariablesManager.kt +++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ir/KonanSharedVariablesManager.kt @@ -58,7 +58,7 @@ internal class KonanSharedVariablesManager(val context: KonanBackendContext) : S val sharedVariableInitialization = IrCallImpl(initializer.startOffset, initializer.endOffset, context.irBuiltIns.unitType, elementProperty.setter!!.symbol, - elementProperty.setter!!.typeParameters.size, elementProperty.setter!!.valueParameters.size) + elementProperty.setter!!.typeParameters.size) sharedVariableInitialization.dispatchReceiver = IrGetValueImpl(initializer.startOffset, initializer.endOffset, sharedVariableDeclaration.type, sharedVariableDeclaration.symbol) @@ -74,7 +74,7 @@ internal class KonanSharedVariablesManager(val context: KonanBackendContext) : S override fun getSharedValue(sharedVariableSymbol: IrValueSymbol, originalGet: IrGetValue) = IrCallImpl(originalGet.startOffset, originalGet.endOffset, originalGet.type, elementProperty.getter!!.symbol, - elementProperty.getter!!.typeParameters.size, elementProperty.getter!!.valueParameters.size).apply { + elementProperty.getter!!.typeParameters.size).apply { dispatchReceiver = IrGetValueImpl( originalGet.startOffset, originalGet.endOffset, sharedVariableSymbol.owner.type, sharedVariableSymbol @@ -83,8 +83,8 @@ internal class KonanSharedVariablesManager(val context: KonanBackendContext) : S override fun setSharedValue(sharedVariableSymbol: IrValueSymbol, originalSet: IrSetValue) = IrCallImpl(originalSet.startOffset, originalSet.endOffset, context.irBuiltIns.unitType, - elementProperty.setter!!.symbol, elementProperty.setter!!.typeParameters.size, - elementProperty.setter!!.valueParameters.size).apply { + elementProperty.setter!!.symbol, elementProperty.setter!!.typeParameters.size + ).apply { dispatchReceiver = IrGetValueImpl( originalSet.startOffset, originalSet.endOffset, sharedVariableSymbol.owner.type, sharedVariableSymbol diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/InitializersLowering.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/InitializersLowering.kt index af4093b2887b0..b614aa3acadf7 100644 --- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/InitializersLowering.kt +++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/InitializersLowering.kt @@ -177,8 +177,7 @@ internal class InitializersLowering(val context: CommonBackendContext) : ClassLo val endOffset = it.endOffset listOf(IrCallImpl(startOffset, endOffset, context.irBuiltIns.unitType, initializeMethodSymbol, - initializeMethodSymbol.owner.typeParameters.size, - initializeMethodSymbol.owner.valueParameters.size + initializeMethodSymbol.owner.typeParameters.size ).apply { dispatchReceiver = IrGetValueImpl( startOffset, endOffset, diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/RedundantCoercionsCleaner.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/RedundantCoercionsCleaner.kt index 76e9c21953a35..6247fcbc512dc 100644 --- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/RedundantCoercionsCleaner.kt +++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/RedundantCoercionsCleaner.kt @@ -76,7 +76,7 @@ internal class RedundantCoercionsCleaner(val context: Context) : FileLoweringPas } return with(coercion) { IrCallImpl( - startOffset, endOffset, type, symbol, typeArgumentsCount, valueArgumentsCount, origin + startOffset, endOffset, type, symbol, typeArgumentsCount, origin ).apply { putValueArgument(0, result) } diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/optimizations/DFGBuilder.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/optimizations/DFGBuilder.kt index 5a8e30ba85ef8..b507d5022d209 100644 --- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/optimizations/DFGBuilder.kt +++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/optimizations/DFGBuilder.kt @@ -91,7 +91,7 @@ private class ExpressionValuesExtractor(val context: Context, val unit = IrCallImpl( UNDEFINED_OFFSET, UNDEFINED_OFFSET, context.irBuiltIns.unitType, context.ir.symbols.theUnitInstance, - typeArgumentsCount = 0, valueArgumentsCount = 0) + typeArgumentsCount = 0) fun forEachValue(expression: IrExpression, block: (IrExpression) -> Unit) { when (expression) { @@ -353,8 +353,7 @@ internal class FunctionDFGBuilder(private val generationState: NativeGenerationS expression.startOffset, expression.endOffset, context.irBuiltIns.unitType, arraySetSymbol, - typeArgumentsCount = if (isGeneric) 1 else 0, - valueArgumentsCount = 2 + typeArgumentsCount = if (isGeneric) 1 else 0 ).apply { dispatchReceiver = expression if (isGeneric) putTypeArgument(0, value.type) diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/optimizations/DevirtualizationAnalysis.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/optimizations/DevirtualizationAnalysis.kt index 4a78b7da72e34..488355c7f028c 100644 --- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/optimizations/DevirtualizationAnalysis.kt +++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/optimizations/DevirtualizationAnalysis.kt @@ -35,7 +35,6 @@ import org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid import org.jetbrains.kotlin.ir.visitors.acceptChildrenVoid import org.jetbrains.kotlin.name.Name import java.util.* -import kotlin.collections.ArrayList object DevirtualizationUnfoldFactors { /** @@ -1421,7 +1420,6 @@ internal object DevirtualizationAnalysis { actualCallee.returnType, actualCallee.symbol, actualCallee.typeParameters.size, - actualCallee.valueParameters.size, callSite.origin, actualCallee.parentAsClass.symbol ) diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/optimizations/KonanBCEForLoopBodyTransformer.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/optimizations/KonanBCEForLoopBodyTransformer.kt index 2b3dc5c8583c1..8ee0156805a41 100644 --- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/optimizations/KonanBCEForLoopBodyTransformer.kt +++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/optimizations/KonanBCEForLoopBodyTransformer.kt @@ -300,8 +300,8 @@ class KonanBCEForLoopBodyTransformer : ForLoopBodyTransformer() { } ?: return expression return IrCallImpl( expression.startOffset, expression.endOffset, expression.type, operatorWithoutBoundCheck.symbol, - typeArgumentsCount = expression.typeArgumentsCount, - valueArgumentsCount = expression.valueArgumentsCount).apply { + typeArgumentsCount = expression.typeArgumentsCount + ).apply { dispatchReceiver = expression.dispatchReceiver for (argIndex in 0 until expression.valueArgumentsCount) { putValueArgument(argIndex, expression.getValueArgument(argIndex)) diff --git a/plugins/atomicfu/atomicfu-compiler/src/org/jetbrains/kotlinx/atomicfu/compiler/backend/js/TransformerUtil.kt b/plugins/atomicfu/atomicfu-compiler/src/org/jetbrains/kotlinx/atomicfu/compiler/backend/js/TransformerUtil.kt index 51d681ad5d6c0..64cf28e2c1847 100644 --- a/plugins/atomicfu/atomicfu-compiler/src/org/jetbrains/kotlinx/atomicfu/compiler/backend/js/TransformerUtil.kt +++ b/plugins/atomicfu/atomicfu-compiler/src/org/jetbrains/kotlinx/atomicfu/compiler/backend/js/TransformerUtil.kt @@ -19,7 +19,6 @@ import org.jetbrains.kotlin.ir.types.impl.* import org.jetbrains.kotlin.ir.util.* import org.jetbrains.kotlin.name.* import org.jetbrains.kotlin.types.* -import org.jetbrains.kotlin.util.capitalizeDecapitalize.* private const val KOTLIN = "kotlin" private const val GET = "get" @@ -47,7 +46,6 @@ internal fun buildCall( type ?: target.owner.returnType, target, typeArguments.size, - valueArguments.size, origin ).apply { typeArguments.let { diff --git a/plugins/atomicfu/atomicfu-compiler/src/org/jetbrains/kotlinx/atomicfu/compiler/backend/jvm/JvmAtomicSymbols.kt b/plugins/atomicfu/atomicfu-compiler/src/org/jetbrains/kotlinx/atomicfu/compiler/backend/jvm/JvmAtomicSymbols.kt index 972cc0c193529..54e73bf186296 100644 --- a/plugins/atomicfu/atomicfu-compiler/src/org/jetbrains/kotlinx/atomicfu/compiler/backend/jvm/JvmAtomicSymbols.kt +++ b/plugins/atomicfu/atomicfu-compiler/src/org/jetbrains/kotlinx/atomicfu/compiler/backend/jvm/JvmAtomicSymbols.kt @@ -476,7 +476,6 @@ class JvmAtomicSymbols( type, getterSymbol as IrSimpleFunctionSymbol, typeArgumentsCount = getterSymbol.owner.typeParameters.size, - valueArgumentsCount = 0, origin = IrStatementOrigin.GET_PROPERTY ).apply { dispatchReceiver = receiver diff --git a/plugins/compose/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/AbstractComposeLowering.kt b/plugins/compose/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/AbstractComposeLowering.kt index 7386b8c91268f..876c8ab61749c 100644 --- a/plugins/compose/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/AbstractComposeLowering.kt +++ b/plugins/compose/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/AbstractComposeLowering.kt @@ -351,7 +351,6 @@ abstract class AbstractComposeLowering( symbol.owner.returnType, symbol as IrSimpleFunctionSymbol, symbol.owner.typeParameters.size, - symbol.owner.valueParameters.size, origin ).also { if (dispatchReceiver != null) it.dispatchReceiver = dispatchReceiver @@ -593,7 +592,6 @@ abstract class AbstractComposeLowering( iteratorType, getIteratorFunction.symbol, getIteratorFunction.symbol.owner.typeParameters.size, - getIteratorFunction.symbol.owner.valueParameters.size, IrStatementOrigin.FOR_LOOP_ITERATOR ).also { it.dispatchReceiver = subject @@ -624,7 +622,6 @@ abstract class AbstractComposeLowering( startOffset = UNDEFINED_OFFSET, endOffset = UNDEFINED_OFFSET, typeArgumentsCount = nextSymbol.symbol.owner.typeParameters.size, - valueArgumentsCount = nextSymbol.symbol.owner.valueParameters.size, type = elementType ).also { it.dispatchReceiver = irGet(iteratorVar) @@ -1262,8 +1259,7 @@ abstract class AbstractComposeLowering( endOffset, returnType, symbol as IrSimpleFunctionSymbol, - symbol.owner.typeParameters.size, - symbol.owner.valueParameters.size + symbol.owner.typeParameters.size ).apply { extensionReceiver = currentComposer putValueArgument(0, invalid) @@ -1442,8 +1438,7 @@ abstract class AbstractComposeLowering( endOffset, type, symbol as IrSimpleFunctionSymbol, - symbol.owner.typeParameters.size, - symbol.owner.valueParameters.size + symbol.owner.typeParameters.size ) } diff --git a/plugins/compose/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/ComposerLambdaMemoization.kt b/plugins/compose/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/ComposerLambdaMemoization.kt index fb59e75ed592c..861948c85e7bb 100644 --- a/plugins/compose/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/ComposerLambdaMemoization.kt +++ b/plugins/compose/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/ComposerLambdaMemoization.kt @@ -427,7 +427,6 @@ class ComposerLambdaMemoization( composerIrClass.defaultType.replaceArgumentsWithStarProjections(), currentComposerSymbol as IrSimpleFunctionSymbol, currentComposerSymbol.owner.typeParameters.size, - currentComposerSymbol.owner.valueParameters.size, IrStatementOrigin.FOR_LOOP_ITERATOR, ) } diff --git a/plugins/compose/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/ComposerParamTransformer.kt b/plugins/compose/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/ComposerParamTransformer.kt index ffc76f2c8993b..7ff7563976d09 100644 --- a/plugins/compose/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/ComposerParamTransformer.kt +++ b/plugins/compose/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/ComposerParamTransformer.kt @@ -203,7 +203,6 @@ class ComposerParamTransformer( type, ownerFn.symbol, typeArgumentsCount, - ownerFn.valueParameters.size, origin, superQualifierSymbol ).also { diff --git a/plugins/compose/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/LiveLiteralTransformer.kt b/plugins/compose/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/LiveLiteralTransformer.kt index 1a0fb56d1586f..3c48273bfb832 100644 --- a/plugins/compose/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/LiveLiteralTransformer.kt +++ b/plugins/compose/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/LiveLiteralTransformer.kt @@ -379,7 +379,6 @@ open class LiveLiteralTransformer( literalType, stateGetValue, stateGetValue.owner.typeParameters.size, - stateGetValue.owner.valueParameters.size, IrStatementOrigin.FOR_LOOP_ITERATOR ).apply { dispatchReceiver = b @@ -445,8 +444,7 @@ open class LiveLiteralTransformer( expression.endOffset, expression.type, getter.symbol, - getter.symbol.owner.typeParameters.size, - getter.symbol.owner.valueParameters.size + getter.symbol.owner.typeParameters.size ).apply { dispatchReceiver = irGetLiveLiteralsClass(expression.startOffset, expression.endOffset) } diff --git a/plugins/compose/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/WrapJsComposableLambdaLowering.kt b/plugins/compose/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/WrapJsComposableLambdaLowering.kt index 1b5419d434303..ce386f72c43fa 100644 --- a/plugins/compose/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/WrapJsComposableLambdaLowering.kt +++ b/plugins/compose/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/WrapJsComposableLambdaLowering.kt @@ -24,7 +24,6 @@ import androidx.compose.compiler.plugins.kotlin.FeatureFlags import androidx.compose.compiler.plugins.kotlin.ModuleMetrics import androidx.compose.compiler.plugins.kotlin.analysis.StabilityInferencer import org.jetbrains.kotlin.backend.common.extensions.IrPluginContext -import org.jetbrains.kotlin.backend.common.serialization.signature.IdSignatureFactory import org.jetbrains.kotlin.descriptors.DescriptorVisibilities import org.jetbrains.kotlin.descriptors.Modality import org.jetbrains.kotlin.ir.IrImplementationDetail @@ -190,8 +189,7 @@ class WrapJsComposableLambdaLowering( endOffset = SYNTHETIC_OFFSET, type = lambda.type, symbol = rememberFunSymbol, - typeArgumentsCount = 1, - valueArgumentsCount = 4 + typeArgumentsCount = 1 ).apply { putTypeArgument(0, lambda.type) putValueArgument(0, irGet(composableLambdaVar)) // key1 @@ -230,8 +228,7 @@ class WrapJsComposableLambdaLowering( endOffset = SYNTHETIC_OFFSET, type = returnType, symbol = runSymbol, - typeArgumentsCount = 1, - valueArgumentsCount = 1 + typeArgumentsCount = 1 ).apply { putTypeArgument(0, returnType) putValueArgument(0, runBlock) diff --git a/plugins/js-plain-objects/compiler-plugin/js-plain-objects.backend/src/org/jetbrains/kotlinx/jso/compiler/backend/JsObjectLoweringExtension.kt b/plugins/js-plain-objects/compiler-plugin/js-plain-objects.backend/src/org/jetbrains/kotlinx/jso/compiler/backend/JsObjectLoweringExtension.kt index efab2d124058d..775340a588284 100644 --- a/plugins/js-plain-objects/compiler-plugin/js-plain-objects.backend/src/org/jetbrains/kotlinx/jso/compiler/backend/JsObjectLoweringExtension.kt +++ b/plugins/js-plain-objects/compiler-plugin/js-plain-objects.backend/src/org/jetbrains/kotlinx/jso/compiler/backend/JsObjectLoweringExtension.kt @@ -94,7 +94,6 @@ private class MoveExternalInlineFunctionsWithBodiesOutsideLowering(private val c declaration.returnType, proxyFunction.symbol, proxyFunction.typeParameters.size, - proxyFunction.valueParameters.size, ).apply { declaration.dispatchReceiverParameter?.let { extensionReceiver = IrGetValueImpl(UNDEFINED_OFFSET, UNDEFINED_OFFSET, it.symbol) @@ -125,7 +124,6 @@ private class MoveExternalInlineFunctionsWithBodiesOutsideLowering(private val c declaration.returnType, jsFunction, 0, - 1, ).apply { putValueArgument(0, createValueParametersObject(declaration.valueParameters).toIrConst(context.irBuiltIns.stringType)) } @@ -186,7 +184,6 @@ private class MoveExternalInlineFunctionsWithBodiesOutsideLowering(private val c declaration.returnType, jsFunction, 0, - 1, ).apply { val objectAssignCall = "Object.assign({}, ${selfName.identifier}, ${createValueParametersObject(declaration.valueParameters)})" putValueArgument(0, objectAssignCall.toIrConst(context.irBuiltIns.stringType))