diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/descriptors/KonanSharedVariablesManager.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/descriptors/KonanSharedVariablesManager.kt index 8ab0b157434..89702ad81fb 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/descriptors/KonanSharedVariablesManager.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/descriptors/KonanSharedVariablesManager.kt @@ -66,7 +66,6 @@ internal class KonanSharedVariablesManager(val context: KonanBackendContext) : S IrCallImpl(initializer.startOffset, initializer.endOffset, context.irBuiltIns.unitType, elementProperty.setter!!.symbol, elementProperty.setter!!.typeParameters.size, elementProperty.setter!!.valueParameters.size) - sharedVariableInitialization.dispatchReceiver = IrGetValueImpl(initializer.startOffset, initializer.endOffset, sharedVariableDeclaration.type, sharedVariableDeclaration.symbol) diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/Autoboxing.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/Autoboxing.kt index 9214a28f481..02bcf832aaa 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/Autoboxing.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/Autoboxing.kt @@ -93,7 +93,7 @@ private class AutoboxingTransformer(val context: Context) : AbstractValueUsageTr override fun IrExpression.useAs(type: IrType): IrExpression { if (this.isNullConst() && type.isNullablePointer()) { // TODO: consider using IrConst with proper type. - return IrCallImpl( + return IrCallImpl.fromSymbolDescriptor( startOffset, endOffset, symbols.getNativeNullPtr.owner.returnType, diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/BridgesBuilding.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/BridgesBuilding.kt index f28e5e2ed0b..ac353c98d9a 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/BridgesBuilding.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/BridgesBuilding.kt @@ -234,7 +234,7 @@ private fun Context.buildBridge(startOffset: Int, endOffset: Int, val typeSafeBarrierDescription = BuiltinMethodsWithSpecialGenericSignature.getDefaultValueForOverriddenBuiltinFunction(overriddenFunction.overriddenFunction.descriptor) typeSafeBarrierDescription?.let { buildTypeSafeBarrier(bridge, overriddenFunction.function, it) } - val delegatingCall = IrCallImpl( + val delegatingCall = IrCallImpl.fromSymbolDescriptor( startOffset, endOffset, targetSymbol.owner.returnType, diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/BuiltinOperatorLowering.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/BuiltinOperatorLowering.kt index a1f9f27881e..082f34c8240 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/BuiltinOperatorLowering.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/BuiltinOperatorLowering.kt @@ -56,7 +56,8 @@ internal class BuiltinOperatorLowering(val context: Context) : FileLoweringPass, irBuiltins.checkNotNullSymbol -> lowerCheckNotNull(expression) - irBuiltins.noWhenBranchMatchedExceptionSymbol -> IrCallImpl(expression.startOffset, expression.endOffset, + irBuiltins.noWhenBranchMatchedExceptionSymbol -> IrCallImpl.fromSymbolDescriptor( + expression.startOffset, expression.endOffset, context.ir.symbols.throwNoWhenBranchMatchedException.owner.returnType, context.ir.symbols.throwNoWhenBranchMatchedException, context.ir.symbols.throwNoWhenBranchMatchedException.owner.typeParameters.size, diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/EnumClassLowering.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/EnumClassLowering.kt index 1d6c273a26e..ad89024f187 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/EnumClassLowering.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/EnumClassLowering.kt @@ -110,7 +110,7 @@ internal class EnumUsageLowering(val context: Context) private fun loadEnumEntry(startOffset: Int, endOffset: Int, enumClass: IrClass, name: Name): IrExpression { val loweredEnum = context.specialDeclarationsFactory.getLoweredEnum(enumClass) val ordinal = loweredEnum.entriesMap.getValue(name) - return IrCallImpl( + return IrCallImpl.fromSymbolDescriptor( startOffset, endOffset, enumClass.defaultType, loweredEnum.itemGetterSymbol.owner.symbol, typeArgumentsCount = 0, diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/RedundantCoercionsCleaner.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/RedundantCoercionsCleaner.kt index 45395e7843f..ddbc37926d0 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/RedundantCoercionsCleaner.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/RedundantCoercionsCleaner.kt @@ -256,4 +256,4 @@ internal class RedundantCoercionsCleaner(val context: Context) : FileLoweringPas else -> PossiblyFoldedExpression(expression.transformIfAsked(), false) } } -} \ No newline at end of file +} diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/optimizations/DFGBuilder.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/optimizations/DFGBuilder.kt index 0f3d5afd7aa..b906b3ec31a 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/optimizations/DFGBuilder.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/optimizations/DFGBuilder.kt @@ -332,7 +332,7 @@ internal class ModuleDFGBuilder(val context: Context, val irModule: IrModuleFrag if (expression is IrCall && expression.symbol == executeImplSymbol) { // Producer and job of executeImpl are called externally, we need to reflect this somehow. - val producerInvocation = IrCallImpl(expression.startOffset, expression.endOffset, + val producerInvocation = IrCallImpl.fromSymbolDescriptor(expression.startOffset, expression.endOffset, executeImplProducerInvoke.returnType, executeImplProducerInvoke.symbol, executeImplProducerInvoke.symbol.owner.typeParameters.size, @@ -343,7 +343,7 @@ internal class ModuleDFGBuilder(val context: Context, val irModule: IrModuleFrag val jobFunctionReference = expression.getValueArgument(3) as? IrFunctionReference ?: error("A function reference expected") - val jobInvocation = IrCallImpl(expression.startOffset, expression.endOffset, + val jobInvocation = IrCallImpl.fromSymbolDescriptor(expression.startOffset, expression.endOffset, jobFunctionReference.symbol.owner.returnType, jobFunctionReference.symbol as IrSimpleFunctionSymbol, jobFunctionReference.symbol.owner.typeParameters.size, @@ -357,7 +357,7 @@ internal class ModuleDFGBuilder(val context: Context, val irModule: IrModuleFrag // See ObjC instanceOf code generation for details. if (expression is IrTypeOperatorCall && expression.operator.callsInstanceOf() && expression.typeOperand.isObjCObjectType()) { - val objcObjGetter = IrCallImpl(expression.startOffset, expression.endOffset, + val objcObjGetter = IrCallImpl.fromSymbolDescriptor(expression.startOffset, expression.endOffset, objCObjectRawValueGetter.owner.returnType, objCObjectRawValueGetter, objCObjectRawValueGetter.owner.typeParameters.size, diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/ir/util/IrUtils2.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/ir/util/IrUtils2.kt index 1527fd5f480..6d1c44d3d62 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/ir/util/IrUtils2.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/ir/util/IrUtils2.kt @@ -239,7 +239,7 @@ fun IrBuilderWithScope.irCall(irFunction: IrFunction, typeArguments: List): IrCall = - IrCallImpl( + IrCallImpl.fromSymbolDescriptor( startOffset, endOffset, irFunction.substitutedReturnType(typeArguments), irFunction.symbol, typeArguments.size, irFunction.valueParameters.size ).apply {