Skip to content

Commit 53386c2

Browse files
mcpiromangoodwinnk
authored andcommitted
[IR] Drop valueArgumentsCount and typeArgumentsCount from IrCallImpl.fromSymbolOwner
KT-70057
1 parent 0524f0f commit 53386c2

File tree

5 files changed

+5
-17
lines changed

5 files changed

+5
-17
lines changed

compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/inline/SyntheticAccessorGenerator.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ abstract class SyntheticAccessorGenerator<Context : BackendContext, ScopeInfo>(
173173
accessor.startOffset,
174174
accessor.endOffset,
175175
accessor.returnType,
176-
targetSymbol, targetSymbol.owner.typeParameters.size,
176+
targetSymbol,
177177
superQualifierSymbol = superQualifierSymbol
178178
).also {
179179
copyAllParamsToArgs(it, accessor)
@@ -436,7 +436,7 @@ abstract class SyntheticAccessorGenerator<Context : BackendContext, ScopeInfo>(
436436
return IrCallImpl.fromSymbolOwner(
437437
oldExpression.startOffset, oldExpression.endOffset,
438438
oldExpression.type,
439-
this as IrSimpleFunctionSymbol, oldExpression.typeArgumentsCount,
439+
this as IrSimpleFunctionSymbol,
440440
origin = oldExpression.origin
441441
)
442442
}
@@ -447,7 +447,7 @@ abstract class SyntheticAccessorGenerator<Context : BackendContext, ScopeInfo>(
447447
return IrDelegatingConstructorCallImpl.fromSymbolOwner(
448448
oldExpression.startOffset, oldExpression.endOffset,
449449
context.irBuiltIns.unitType,
450-
this as IrConstructorSymbol, oldExpression.typeArgumentsCount
450+
this as IrConstructorSymbol
451451
)
452452
}
453453

compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/expressions/impl/builders.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1054,12 +1054,10 @@ fun IrCallImpl.Companion.fromSymbolOwner(
10541054
endOffset: Int,
10551055
type: IrType,
10561056
symbol: IrSimpleFunctionSymbol,
1057-
typeArgumentsCount: Int = symbol.owner.typeParameters.size,
1058-
valueArgumentsCount: Int = symbol.owner.valueParameters.size,
10591057
origin: IrStatementOrigin? = null,
10601058
superQualifierSymbol: IrClassSymbol? = null,
10611059
): IrCallImpl =
1062-
IrCallImpl(startOffset, endOffset, type, symbol, typeArgumentsCount, valueArgumentsCount, origin, superQualifierSymbol)
1060+
IrCallImpl(startOffset, endOffset, type, symbol, origin = origin, superQualifierSymbol = superQualifierSymbol)
10631061

10641062
fun IrCallImpl.Companion.fromSymbolOwner(
10651063
startOffset: Int,

kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/BridgesBuilding.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,6 @@ private fun Context.buildBridge(startOffset: Int, endOffset: Int,
320320
endOffset,
321321
target.returnType,
322322
target.symbol,
323-
typeArgumentsCount = target.typeParameters.size,
324-
valueArgumentsCount = target.valueParameters.size,
325323
superQualifierSymbol = superQualifierSymbol /* Call non-virtually */
326324
).apply {
327325
bridge.dispatchReceiverParameter?.let { dispatchReceiver = irGet(it) }

kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/BuiltinOperatorLowering.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@ internal class BuiltinOperatorLowering(val context: Context) : FileLoweringPass,
5353
irBuiltins.noWhenBranchMatchedExceptionSymbol -> IrCallImpl.fromSymbolOwner(
5454
expression.startOffset, expression.endOffset,
5555
context.ir.symbols.throwNoWhenBranchMatchedException.owner.returnType,
56-
context.ir.symbols.throwNoWhenBranchMatchedException,
57-
context.ir.symbols.throwNoWhenBranchMatchedException.owner.typeParameters.size,
58-
context.ir.symbols.throwNoWhenBranchMatchedException.owner.valueParameters.size)
56+
context.ir.symbols.throwNoWhenBranchMatchedException)
5957

6058
irBuiltins.linkageErrorSymbol -> with(symbols.throwIrLinkageError) { irCall(expression, this, newReturnType = owner.returnType) }
6159

kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/optimizations/DFGBuilder.kt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,6 @@ internal class FunctionDFGBuilder(private val generationState: NativeGenerationS
234234
val producerInvocation = IrCallImpl.fromSymbolOwner(expression.startOffset, expression.endOffset,
235235
executeImplProducerInvoke.returnType,
236236
executeImplProducerInvoke.symbol,
237-
executeImplProducerInvoke.symbol.owner.typeParameters.size,
238-
executeImplProducerInvoke.symbol.owner.valueParameters.size,
239237
STATEMENT_ORIGIN_PRODUCER_INVOCATION)
240238
producerInvocation.dispatchReceiver = expression.getValueArgument(2)
241239

@@ -246,8 +244,6 @@ internal class FunctionDFGBuilder(private val generationState: NativeGenerationS
246244
val jobInvocation = IrCallImpl.fromSymbolOwner(expression.startOffset, expression.endOffset,
247245
jobFunctionReference.symbol.owner.returnType,
248246
jobFunctionReference.symbol as IrSimpleFunctionSymbol,
249-
jobFunctionReference.symbol.owner.typeParameters.size,
250-
jobFunctionReference.symbol.owner.valueParameters.size,
251247
STATEMENT_ORIGIN_JOB_INVOCATION)
252248
jobInvocation.putValueArgument(0, producerInvocation)
253249

@@ -281,8 +277,6 @@ internal class FunctionDFGBuilder(private val generationState: NativeGenerationS
281277
val objcObjGetter = IrCallImpl.fromSymbolOwner(expression.startOffset, expression.endOffset,
282278
objCObjectRawValueGetter.owner.returnType,
283279
objCObjectRawValueGetter,
284-
objCObjectRawValueGetter.owner.typeParameters.size,
285-
objCObjectRawValueGetter.owner.valueParameters.size
286280
).apply {
287281
extensionReceiver = expression.argument
288282
}

0 commit comments

Comments
 (0)