IR to CFG: type operator unrolling
This commit is contained in:
committed by
Dmitry Petrov
parent
ea13386d0b
commit
07eae1d206
@@ -200,6 +200,14 @@ class FunctionGenerator(val function: IrFunction) {
|
|||||||
return expression
|
return expression
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun visitTypeOperator(expression: IrTypeOperatorCall, data: Boolean): IrElement? {
|
||||||
|
expression.argument.process()
|
||||||
|
if (data) {
|
||||||
|
builder.add(expression)
|
||||||
|
}
|
||||||
|
return expression
|
||||||
|
}
|
||||||
|
|
||||||
override fun visitElement(element: IrElement, data: Boolean): IrElement? {
|
override fun visitElement(element: IrElement, data: Boolean): IrElement? {
|
||||||
TODO("not implemented")
|
TODO("not implemented")
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-1
@@ -25,7 +25,11 @@ BB 2
|
|||||||
INCOMING <- BB 1
|
INCOMING <- BB 1
|
||||||
CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||||
CONTENT
|
CONTENT
|
||||||
1 TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
1 GET_VAR 'count: Int' type=kotlin.Int origin=POSTFIX_INCR
|
||||||
|
2 VAR IR_TEMPORARY_VARIABLE val tmp0: kotlin.Int
|
||||||
|
3 SET_VAR 'count: Int' type=kotlin.Unit origin=POSTFIX_INCR
|
||||||
|
4 GET_VAR 'tmp0: Int' type=kotlin.Int origin=null
|
||||||
|
5 TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||||
OUTGOING -> BB 3
|
OUTGOING -> BB 3
|
||||||
When exit: WHEN type=kotlin.Unit origin=null
|
When exit: WHEN type=kotlin.Unit origin=null
|
||||||
BB 3
|
BB 3
|
||||||
|
|||||||
Reference in New Issue
Block a user