INSTANCEOF support
This commit is contained in:
committed by
Dmitry Petrov
parent
869f60a053
commit
bf822daa3b
+6
@@ -350,6 +350,12 @@ class ExpressionCodegen(
|
||||
generateAsCast(mv, expression.typeOperand, boxType(expression.typeOperand.asmType), expression.operator == IrTypeOperator.SAFE_CAST)
|
||||
}
|
||||
|
||||
IrTypeOperator.INSTANCEOF -> {
|
||||
gen(expression.argument, OBJECT_TYPE, data)
|
||||
val type = boxType(expression.typeOperand.asmType)
|
||||
generateIsCheck(mv, expression.typeOperand, type)
|
||||
}
|
||||
|
||||
else -> super.visitTypeOperator(expression, data)
|
||||
}
|
||||
return expression.onStack
|
||||
|
||||
Reference in New Issue
Block a user