[Native] Drop irSetVar from IrUtils2
We can reuse `irSet` function
This commit is contained in:
+1
-1
@@ -82,7 +82,7 @@ internal class CEnumByValueFunctionGenerator(
|
||||
type = irBuiltIns.unitType,
|
||||
condition = irEquals(entryValue, irGet(irValueParameter)),
|
||||
thenPart = irReturn(irGet(entry)),
|
||||
elsePart = irSetVar(
|
||||
elsePart = irSet(
|
||||
inductionVariable,
|
||||
irCallOp(plusFun, irBuiltIns.intType,
|
||||
irGet(inductionVariable),
|
||||
|
||||
+1
-1
@@ -159,7 +159,7 @@ internal class NativeSuspendFunctionsLowering(
|
||||
val scope = liveLocals[suspensionPoint]!!
|
||||
return irBlock(expression) {
|
||||
scope.forEach {
|
||||
+irSetVar(localsMap[it]
|
||||
+irSet(localsMap[it]
|
||||
?: it, irGetField(irGet(thisReceiver), localToPropertyMap[it.symbol]!!))
|
||||
}
|
||||
}
|
||||
|
||||
-3
@@ -173,9 +173,6 @@ fun IrBuilderWithScope.irCallOp(
|
||||
putValueArgument(0, argument)
|
||||
}
|
||||
|
||||
fun IrBuilderWithScope.irSetVar(variable: IrVariable, value: IrExpression) =
|
||||
irSet(variable.symbol, value)
|
||||
|
||||
fun IrBuilderWithScope.irCatch(type: IrType) =
|
||||
IrCatchImpl(
|
||||
startOffset, endOffset,
|
||||
|
||||
Reference in New Issue
Block a user