IR: don't use descriptors in rendering (work in progress)

There's some descriptor-based code remaining. Need some more work on IR.
This commit is contained in:
Dmitry Petrov
2019-03-14 14:17:26 +03:00
parent bd3d5a9dbb
commit e49eae528c
319 changed files with 18613 additions and 18703 deletions
@@ -1,54 +1,53 @@
FILE fqName:<root> fileName:/whenWithSubjectVariable.kt
FUN name:foo visibility:public modality:FINAL <> () returnType:kotlin.Any flags:
FUN name:foo visibility:public modality:FINAL <> () returnType:kotlin.Any flags:[]
BLOCK_BODY
RETURN type=kotlin.Nothing from='foo(): Any'
RETURN type=kotlin.Nothing from='FUN name:foo visibility:public modality:FINAL <> () returnType:kotlin.Any flags:[]'
CONST Int type=kotlin.Int value=1
FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Int flags:
FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Int flags:[]
BLOCK_BODY
RETURN type=kotlin.Nothing from='test(): Int'
RETURN type=kotlin.Nothing from='FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Int flags:[]'
BLOCK type=kotlin.Int origin=WHEN
VAR name:y type:kotlin.Any flags:val
CALL 'foo(): Any' type=kotlin.Any origin=null
VAR name:y type:kotlin.Any flags:[val]
CALL 'FUN name:foo visibility:public modality:FINAL <> () returnType:kotlin.Any flags:[]' type=kotlin.Any origin=null
WHEN type=kotlin.Int origin=WHEN
BRANCH
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
arg0: GET_VAR 'y: Any' type=kotlin.Any origin=null
if: CALL 'FUN IR_BUILTINS_STUB name:EQEQ visibility:public modality:FINAL <> (arg0:kotlin.Any?, arg1:kotlin.Any?) returnType:kotlin.Boolean flags:[]' type=kotlin.Boolean origin=EQEQ
arg0: GET_VAR 'VAR name:y type:kotlin.Any flags:[val]' type=kotlin.Any origin=null
arg1: CONST Int type=kotlin.Int value=42
then: CONST Int type=kotlin.Int value=1
BRANCH
if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.String
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:String modality:FINAL visibility:public flags: superTypes:[kotlin.Comparable<kotlin.String>; kotlin.CharSequence; java.io.Serializable]
GET_VAR 'y: Any' type=kotlin.Any origin=null
then: CALL '<get-length>(): Int' type=kotlin.Int origin=GET_PROPERTY
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:String modality:FINAL visibility:public flags:[] superTypes:[kotlin.Comparable<kotlin.String>; kotlin.CharSequence; java.io.Serializable]
GET_VAR 'VAR name:y type:kotlin.Any flags:[val]' type=kotlin.Any origin=null
then: CALL 'FUN IR_EXTERNAL_DECLARATION_STUB name:<get-length> visibility:public modality:OPEN <> ($this:kotlin.String) returnType:kotlin.Int flags:[]' type=kotlin.Int origin=GET_PROPERTY
$this: TYPE_OP type=kotlin.String origin=IMPLICIT_CAST typeOperand=kotlin.String
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:String modality:FINAL visibility:public flags: superTypes:[kotlin.Comparable<kotlin.String>; kotlin.CharSequence; java.io.Serializable]
GET_VAR 'y: Any' type=kotlin.Any origin=null
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:String modality:FINAL visibility:public flags:[] superTypes:[kotlin.Comparable<kotlin.String>; kotlin.CharSequence; java.io.Serializable]
GET_VAR 'VAR name:y type:kotlin.Any flags:[val]' type=kotlin.Any origin=null
BRANCH
if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCL
if: CALL 'FUN IR_BUILTINS_STUB name:NOT visibility:public modality:FINAL <> (arg0:kotlin.Boolean) returnType:kotlin.Boolean flags:[]' type=kotlin.Boolean origin=EXCL
arg0: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Int
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Int modality:FINAL visibility:public flags: superTypes:[kotlin.Number; kotlin.Comparable<kotlin.Int>; java.io.Serializable]
GET_VAR 'y: Any' type=kotlin.Any origin=null
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Int modality:FINAL visibility:public flags:[] superTypes:[kotlin.Number; kotlin.Comparable<kotlin.Int>; java.io.Serializable]
GET_VAR 'VAR name:y type:kotlin.Any flags:[val]' type=kotlin.Any origin=null
then: CONST Int type=kotlin.Int value=2
BRANCH
if: CALL 'contains(Int): Boolean' type=kotlin.Boolean origin=IN
$this: CALL 'rangeTo(Int): IntRange' type=kotlin.ranges.IntRange origin=RANGE
if: CALL 'FUN IR_EXTERNAL_DECLARATION_STUB name:contains visibility:public modality:OPEN <> ($this:kotlin.ranges.IntRange, value:kotlin.Int) returnType:kotlin.Boolean flags:[]' type=kotlin.Boolean origin=IN
$this: CALL 'FUN IR_EXTERNAL_DECLARATION_STUB name:rangeTo visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Int) returnType:kotlin.ranges.IntRange flags:[]' type=kotlin.ranges.IntRange origin=RANGE
$this: CONST Int type=kotlin.Int value=0
other: CONST Int type=kotlin.Int value=10
value: TYPE_OP type=kotlin.Int origin=IMPLICIT_CAST typeOperand=kotlin.Int
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Int modality:FINAL visibility:public flags: superTypes:[kotlin.Number; kotlin.Comparable<kotlin.Int>; java.io.Serializable]
GET_VAR 'y: Any' type=kotlin.Any origin=null
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Int modality:FINAL visibility:public flags:[] superTypes:[kotlin.Number; kotlin.Comparable<kotlin.Int>; java.io.Serializable]
GET_VAR 'VAR name:y type:kotlin.Any flags:[val]' type=kotlin.Any origin=null
then: CONST Int type=kotlin.Int value=3
BRANCH
if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCL
arg0: CALL 'contains(Int): Boolean' type=kotlin.Boolean origin=NOT_IN
$this: CALL 'rangeTo(Int): IntRange' type=kotlin.ranges.IntRange origin=RANGE
if: CALL 'FUN IR_BUILTINS_STUB name:NOT visibility:public modality:FINAL <> (arg0:kotlin.Boolean) returnType:kotlin.Boolean flags:[]' type=kotlin.Boolean origin=EXCL
arg0: CALL 'FUN IR_EXTERNAL_DECLARATION_STUB name:contains visibility:public modality:OPEN <> ($this:kotlin.ranges.IntRange, value:kotlin.Int) returnType:kotlin.Boolean flags:[]' type=kotlin.Boolean origin=NOT_IN
$this: CALL 'FUN IR_EXTERNAL_DECLARATION_STUB name:rangeTo visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Int) returnType:kotlin.ranges.IntRange flags:[]' type=kotlin.ranges.IntRange origin=RANGE
$this: CONST Int type=kotlin.Int value=10
other: CONST Int type=kotlin.Int value=20
value: TYPE_OP type=kotlin.Int origin=IMPLICIT_CAST typeOperand=kotlin.Int
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Int modality:FINAL visibility:public flags: superTypes:[kotlin.Number; kotlin.Comparable<kotlin.Int>; java.io.Serializable]
GET_VAR 'y: Any' type=kotlin.Any origin=null
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Int modality:FINAL visibility:public flags:[] superTypes:[kotlin.Number; kotlin.Comparable<kotlin.Int>; java.io.Serializable]
GET_VAR 'VAR name:y type:kotlin.Any flags:[val]' type=kotlin.Any origin=null
then: CONST Int type=kotlin.Int value=4
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CONST Int type=kotlin.Int value=-1