[IR] Drop IrErrorCallExpressionImpl.addArgument

It was a remnant from the original IR implementation.

#KT-65773 In Progress
This commit is contained in:
Wojciech Litewka
2024-02-29 11:39:21 +01:00
committed by Space Team
parent 4c7c123fe8
commit 49db500369
4 changed files with 10 additions and 36 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@@ -925,7 +925,7 @@ class CallAndReferenceGenerator(
"Cannot bind $argumentsCount arguments to '$description' call with $valueArgumentsCount parameters"
).apply {
for (argument in call.arguments) {
addArgument(visitor.convertToIrExpression(argument))
arguments.add(visitor.convertToIrExpression(argument))
}
}
}
@@ -948,7 +948,7 @@ class CallAndReferenceGenerator(
is IrErrorCallExpressionImpl -> apply {
for (argument in call?.arguments.orEmpty()) {
addArgument(visitor.convertToIrExpression(argument))
arguments.add(visitor.convertToIrExpression(argument))
}
}
@@ -1,17 +1,6 @@
/*
* Copyright 2010-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.psi2ir.generators
@@ -59,7 +48,7 @@ internal class ErrorExpressionGenerator(statementGenerator: StatementGenerator)
(ktCall.valueArguments + ktCall.lambdaArguments).forEach {
val ktArgument = it.getArgumentExpression()
if (ktArgument != null) {
irErrorCall.addArgument(ktArgument.genExpr())
irErrorCall.arguments.add(ktArgument.genExpr())
}
}
@@ -1,17 +1,6 @@
/*
* Copyright 2010-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.ir.expressions.impl
@@ -33,8 +22,4 @@ class IrErrorCallExpressionImpl(
override var attributeOwnerId: IrAttributeContainer = this
override var originalBeforeInline: IrAttributeContainer? = null
fun addArgument(argument: IrExpression) {
arguments.add(argument)
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@@ -351,7 +351,7 @@ class IrBodyDeserializer(
explicitReceiver = deserializeExpression(proto.receiver)
}
proto.valueArgumentList.forEach {
addArgument(deserializeExpression(it))
arguments.add(deserializeExpression(it))
}
}