Skip to content

Commit f486810

Browse files
mcpiromangoodwinnk
authored andcommitted
[IR] Drop valueArgumentsCount from IrConstructorCallImpl
KT-70057
1 parent 95ef67f commit f486810

File tree

23 files changed

+9
-38
lines changed

23 files changed

+9
-38
lines changed

compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrBuiltinSymbolsContainer.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ class Fir2IrBuiltinSymbolsContainer(
135135
constructorSymbol,
136136
typeArgumentsCount = 0,
137137
constructorTypeArgumentsCount = 0,
138-
valueArgumentsCount = 0,
139138
)
140139
}
141140

compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/IrBuiltInsOverFir.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,6 @@ class IrBuiltInsOverFir(
377377
constructorSymbol,
378378
typeArgumentsCount = 0,
379379
constructorTypeArgumentsCount = 0,
380-
valueArgumentsCount = 0,
381380
)
382381

383382
annotationCall

compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/CallAndReferenceGenerator.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,7 @@ class CallAndReferenceGenerator(
873873
@OptIn(UnsafeDuringIrConstructionAPI::class) // Error class constructor is already created, see IrErrorClassImpl.
874874
IrConstructorCallImpl(
875875
startOffset, endOffset, type, type.symbol.owner.primaryConstructor!!.symbol,
876-
valueArgumentsCount = 0, typeArgumentsCount = 0, constructorTypeArgumentsCount = 0,
876+
typeArgumentsCount = 0, constructorTypeArgumentsCount = 0,
877877
source = FirAnnotationSourceElement(annotation),
878878
)
879879
}

compiler/ir/backend.common/test/org/jetbrains/kotlin/backend/common/IrValidatorTest.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,6 @@ class IrValidatorTest {
416416
symbol = annotationConstructor.symbol,
417417
typeArgumentsCount = 0,
418418
constructorTypeArgumentsCount = 0,
419-
valueArgumentsCount = 0,
420419
)
421420
)
422421
file2.addChild(annotatedClass)

compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/ir/IrBuilder.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ object JsIrBuilder {
9191
target,
9292
typeArgumentsCount = irClass.typeParameters.size,
9393
constructorTypeArgumentsCount = owner.typeParameters.size,
94-
valueArgumentsCount = owner.valueParameters.size,
9594
origin = origin
9695
).apply {
9796
typeArguments?.let {

compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/CallableReferenceLowering.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ class CallableReferenceLowering(private val context: JsCommonBackendContext) : B
9292
startOffset, endOffset, type, ctor.symbol,
9393
typeArgumentsCount = 0, /*TODO: properly set type arguments*/
9494
constructorTypeArgumentsCount = 0,
95-
valueArgumentsCount = vpCount,
9695
origin = JsStatementOrigins.CALLABLE_REFERENCE_CREATE
9796
).apply {
9897
boundReceiver?.let {
@@ -323,7 +322,6 @@ class CallableReferenceLowering(private val context: JsCommonBackendContext) : B
323322
callee.symbol,
324323
callee.countContextTypeParameters(),
325324
callee.typeParameters.size,
326-
callee.valueParameters.size,
327325
JsStatementOrigins.CALLABLE_REFERENCE_INVOKE
328326
)
329327
is IrSimpleFunction ->

compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/InteropCallableReferenceLowering.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,8 +535,7 @@ class InteropCallableReferenceLowering(val context: JsIrBackendContext) : BodyLo
535535
lambdaType,
536536
constructor.symbol,
537537
lambdaInfo.lambdaClass.typeParameters.size,
538-
constructor.typeParameters.size,
539-
constructor.valueParameters.size
538+
constructor.typeParameters.size
540539
)
541540

542541
for ((i, vp) in factoryFunction.valueParameters.withIndex()) {

compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/DirectInvokeLowering.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,7 @@ internal class DirectInvokeLowering(private val context: JvmBackendContext) : Fi
101101
IrConstructorCallImpl(
102102
expression.startOffset, expression.endOffset, expression.type, irFun.symbol,
103103
typeArgumentsCount = irFun.typeParameters.size,
104-
constructorTypeArgumentsCount = 0,
105-
valueArgumentsCount = irFun.valueParameters.size
104+
constructorTypeArgumentsCount = 0
106105
).apply {
107106
copyReceiverAndValueArgumentsForDirectInvoke(receiver, expression)
108107
}

compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/lower/BuiltInsLowering.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ class BuiltInsLowering(val context: WasmBackendContext) : FileLoweringPass {
184184
type = kclassConstructor.returnType,
185185
symbol = kclassConstructor.symbol,
186186
typeArgumentsCount = 1,
187-
valueArgumentsCount = 1,
188187
constructorTypeArgumentsCount = 0
189188
).also {
190189
it.putClassTypeArgument(0, type)

compiler/ir/backend.wasm/src/org/jetbrains/kotlin/backend/wasm/lower/WasmSharedVariablesManager.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ class WasmSharedVariablesManager(val context: WasmBackendContext) : SharedVariab
4141
type = boxClass.defaultType,
4242
symbol = constructorSymbol,
4343
typeArgumentsCount = boxClass.owner.typeParameters.size,
44-
constructorTypeArgumentsCount = constructorSymbol.owner.typeParameters.size,
45-
valueArgumentsCount = constructorSymbol.owner.valueParameters.size
44+
constructorTypeArgumentsCount = constructorSymbol.owner.typeParameters.size
4645
).apply {
4746
putValueArgument(0, initializer)
4847
}

0 commit comments

Comments
 (0)