[JS IR BE] Remove unused classifier symbol from IrTypeOperatorCall builder
This commit is contained in:
@@ -18,7 +18,6 @@ import org.jetbrains.kotlin.ir.expressions.impl.*
|
||||
import org.jetbrains.kotlin.ir.symbols.*
|
||||
import org.jetbrains.kotlin.ir.symbols.impl.*
|
||||
import org.jetbrains.kotlin.ir.types.IrType
|
||||
import org.jetbrains.kotlin.ir.types.classifierOrFail
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.types.Variance
|
||||
|
||||
@@ -240,12 +239,11 @@ object JsIrBuilder {
|
||||
fun buildWhen(type: IrType, branches: List<IrBranch>, origin: IrStatementOrigin = SYNTHESIZED_STATEMENT) =
|
||||
IrWhenImpl(UNDEFINED_OFFSET, UNDEFINED_OFFSET, type, origin, branches)
|
||||
|
||||
// TODO drop type symbol here, it's really not needed
|
||||
fun buildTypeOperator(type: IrType, operator: IrTypeOperator, argument: IrExpression, toType: IrType, symbol: IrClassifierSymbol) =
|
||||
IrTypeOperatorCallImpl(UNDEFINED_OFFSET, UNDEFINED_OFFSET, type, operator, toType, symbol, argument)
|
||||
fun buildTypeOperator(type: IrType, operator: IrTypeOperator, argument: IrExpression, toType: IrType) =
|
||||
IrTypeOperatorCallImpl(UNDEFINED_OFFSET, UNDEFINED_OFFSET, type, operator, toType, argument)
|
||||
|
||||
fun buildImplicitCast(value: IrExpression, toType: IrType) =
|
||||
buildTypeOperator(toType, IrTypeOperator.IMPLICIT_CAST, value, toType, toType.classifierOrFail)
|
||||
buildTypeOperator(toType, IrTypeOperator.IMPLICIT_CAST, value, toType)
|
||||
|
||||
|
||||
fun buildNull(type: IrType) = IrConstImpl.constNull(UNDEFINED_OFFSET, UNDEFINED_OFFSET, type)
|
||||
|
||||
+1
-2
@@ -657,8 +657,7 @@ class StateMachineBuilder(
|
||||
context.irBuiltIns.booleanType,
|
||||
IrTypeOperator.INSTANCEOF,
|
||||
value,
|
||||
toType,
|
||||
toType.classifierOrNull!!
|
||||
toType
|
||||
)
|
||||
|
||||
private fun tempVar(type: IrType, name: String = "tmp") =
|
||||
|
||||
Reference in New Issue
Block a user