Skip to content

Commit

Permalink
[Frontend] Drop OperatorNames.MOD
Browse files Browse the repository at this point in the history
#KT-36107
  • Loading branch information
ivandev0 authored and qodana-bot committed Oct 1, 2024
1 parent f06c689 commit 3f47633
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class JsIrArithBuilder(val context: JsIrBackendContext) {
fun sub(l: IrExpression, r: IrExpression) = buildBinaryOperator(OperatorNames.SUB, l, r)
fun mul(l: IrExpression, r: IrExpression) = buildBinaryOperator(OperatorNames.MUL, l, r)
fun div(l: IrExpression, r: IrExpression) = buildBinaryOperator(OperatorNames.DIV, l, r)
fun mod(l: IrExpression, r: IrExpression) = buildBinaryOperator(OperatorNames.MOD, l, r)
fun rem(l: IrExpression, r: IrExpression) = buildBinaryOperator(OperatorNames.REM, l, r)
fun and(l: IrExpression, r: IrExpression) = buildBinaryOperator(OperatorNames.AND, l, r)
fun or(l: IrExpression, r: IrExpression) = buildBinaryOperator(OperatorNames.OR, l, r)
fun shl(l: IrExpression, r: IrExpression) = buildBinaryOperator(OperatorNames.SHL, l, r)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ class NumberOperatorCallsTransformer(context: JsIrBackendContext) : CallsTransfo
add(type, OperatorNames.SUB, withLongCoercion(::transformSub))
add(type, OperatorNames.MUL, withLongCoercion(::transformMul))
add(type, OperatorNames.DIV, withLongCoercion(::transformDiv))
add(type, OperatorNames.MOD, withLongCoercion(::transformRem))
add(type, OperatorNames.REM, withLongCoercion(::transformRem))
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ object OperatorNames {
val SUB = OperatorNameConventions.MINUS
val MUL = OperatorNameConventions.TIMES
val DIV = OperatorNameConventions.DIV
val MOD = OperatorNameConventions.MOD
val REM = OperatorNameConventions.REM

val AND = OperatorNameConventions.AND
Expand All @@ -33,7 +32,7 @@ object OperatorNames {
val DEC = OperatorNameConventions.DEC


val BINARY = setOf(ADD, SUB, MUL, DIV, MOD, REM, AND, OR, XOR, SHL, SHR, SHRU)
val BINARY = setOf(ADD, SUB, MUL, DIV, REM, AND, OR, XOR, SHL, SHR, SHRU)
val UNARY = setOf(UNARY_PLUS, UNARY_MINUS, INV, NOT, INC, DEC)
val ALL = BINARY + UNARY
}

0 comments on commit 3f47633

Please sign in to comment.