Add type operand symbol for type operator expression

This commit is contained in:
Dmitry Petrov
2018-02-22 12:39:04 +03:00
parent e89047d2cc
commit b206bf199f
65 changed files with 442 additions and 61 deletions
@@ -48,18 +48,22 @@ FILE fqName:<root> fileName:/localDelegatedProperties.kt
property: LOCAL_DELEGATED_PROPERTY_REFERENCE 'x: Int' delegate='`x$delegate`: HashMap<String, Int> /* = HashMap<String, Int> */' getter='<get-x>(): Int' setter='<set-x>(Int): Unit' type=kotlin.reflect.KMutableProperty0<kotlin.Int> origin=PROPERTY_REFERENCE_FOR_DELEGATE
value: GET_VAR 'value-parameter value: Int' type=kotlin.Int origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public flags:
CALL '<set-x>(Int): Unit' type=kotlin.Int origin=EQ
value: CONST Int type=kotlin.Int value=0
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public flags:
BLOCK type=kotlin.Int origin=POSTFIX_INCR
VAR IR_TEMPORARY_VARIABLE name:tmp0 type:kotlin.Int flags:val
CALL '<get-x>(): Int' type=kotlin.Int origin=POSTFIX_INCR
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public flags:
CALL '<set-x>(Int): Unit' type=kotlin.Int origin=POSTFIX_INCR
value: CALL 'inc(): Int' type=kotlin.Int origin=POSTFIX_INCR
$this: GET_VAR 'tmp0: Int' type=kotlin.Int origin=null
GET_VAR 'tmp0: Int' type=kotlin.Int origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public flags:
CALL '<set-x>(Int): Unit' type=kotlin.Int origin=PLUSEQ
value: CALL 'plus(Int): Int' type=kotlin.Int origin=PLUSEQ
$this: CALL '<get-x>(): Int' type=kotlin.Int origin=PLUSEQ
@@ -100,6 +100,7 @@ FILE fqName:<root> fileName:/dataClassMembers.kt
if: CONST Boolean type=kotlin.Boolean value=true
then: CALL 'hashCode(): Int' type=kotlin.Int origin=null
$this: TYPE_OP type=kotlin.Any origin=IMPLICIT_CAST typeOperand=kotlin.Any
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Any modality:OPEN visibility:public flags:
GET_VAR 'tmp1: T' type=T origin=null
SET_VAR 'tmp0_result: Int' type=kotlin.Unit origin=EQ
CALL 'plus(Int): Int' type=kotlin.Int origin=null
@@ -127,11 +128,13 @@ FILE fqName:<root> fileName:/dataClassMembers.kt
WHEN type=kotlin.Unit origin=null
BRANCH
if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=Test<T>
typeOperand: CLASS CLASS name:Test modality:FINAL visibility:public flags:data
GET_VAR 'value-parameter other: Any?' type=kotlin.Any? origin=null
then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean'
CONST Boolean type=kotlin.Boolean value=false
VAR IR_TEMPORARY_VARIABLE name:tmp0_other_with_cast type:Test<T> flags:val
TYPE_OP type=Test<T> origin=CAST typeOperand=Test<T>
typeOperand: CLASS CLASS name:Test modality:FINAL visibility:public flags:data
GET_VAR 'value-parameter other: Any?' type=kotlin.Any? origin=null
WHEN type=kotlin.Unit origin=null
BRANCH
@@ -62,8 +62,7 @@ FILE fqName:<root> fileName:/delegatedMembers.kt
$this: GET_FIELD '`Test$IBase$delegate`: IBase<TT>' type=IBase<TT> origin=null
receiver: GET_VAR 'this@Test: Test<TT>' type=Test<TT> origin=null
t: GET_VAR 'value-parameter t: TT' type=TT origin=null
x: TYPE_OP type=X origin=IMPLICIT_CAST typeOperand=X
GET_VAR 'value-parameter x: X' type=X origin=null
x: GET_VAR 'value-parameter x: X' type=X origin=null
FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <> ($this:Test<TT>, x:kotlin.Int) returnType:Unit flags:
overridden:
FUN name:foo visibility:public modality:ABSTRACT <> ($this:IBase<T>, x:kotlin.Int) returnType:Unit flags: