IR to CFG: type operator unrolling

This commit is contained in:
Mikhail Glukhikh
2016-09-23 17:30:58 +03:00
committed by Dmitry Petrov
parent ea13386d0b
commit 07eae1d206
2 changed files with 13 additions and 1 deletions
@@ -200,6 +200,14 @@ class FunctionGenerator(val function: IrFunction) {
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? {
TODO("not implemented")
}
+5 -1
View File
@@ -25,7 +25,11 @@ BB 2
INCOMING <- BB 1
CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
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
When exit: WHEN type=kotlin.Unit origin=null
BB 3