IR: use the correct descriptor for the booleanNotSymbol creation

NOTE corresponding function now has a dispatch receiver instead of a
single argument
This commit is contained in:
Anton Bannykh
2019-03-18 18:14:38 +03:00
parent 0546548ff3
commit a382956c19
15 changed files with 28 additions and 115 deletions
@@ -266,7 +266,7 @@ class BlockDecomposerTransformer(private val context: JsIrBackendContext) : IrEl
val newLoopCondition = newCondition.statements.last() as IrExpression
val breakCond = JsIrBuilder.buildCall(booleanNotSymbol).apply {
putValueArgument(0, newLoopCondition)
dispatchReceiver = newLoopCondition
}
newLoopBody.statements += JsIrBuilder.buildIfElse(unitType, breakCond, thenBlock)
@@ -233,7 +233,7 @@ class StateMachineBuilder(
l.condition.acceptVoid(this)
transformLastExpression {
val exitCond = JsIrBuilder.buildCall(booleanNotSymbol).apply { putValueArgument(0, it) }
val exitCond = JsIrBuilder.buildCall(booleanNotSymbol).apply { dispatchReceiver = it }
val irBreak = buildDispatchBlock(exit)
JsIrBuilder.buildIfElse(unit, exitCond, irBreak)
}
@@ -30,7 +30,7 @@ internal fun IrModuleFragment.replaceUnboundSymbols(context: JsIrBackendContext)
val collector = DeclarationSymbolCollector()
with(collector) {
with(irBuiltins) {
for (op in arrayOf(eqeqeqFun, eqeqFun, throwNpeFun, booleanNotFun, noWhenBranchMatchedExceptionFun) +
for (op in arrayOf(eqeqeqFun, eqeqFun, throwNpeFun, noWhenBranchMatchedExceptionFun) +
lessFunByOperandType.values +
lessOrEqualFunByOperandType.values +
greaterOrEqualFunByOperandType.values +