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,113 +1,113 @@
FILE fqName:<root> fileName:/thisOfGenericOuterClass.kt
CLASS CLASS name:Outer modality:FINAL visibility:public flags: superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:Outer<T> flags:
CLASS CLASS name:Outer modality:FINAL visibility:public flags:[] superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Outer<<root>.Outer.T> flags:[]
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
CONSTRUCTOR visibility:public <> (x:T) returnType:Outer<T> flags:primary
VALUE_PARAMETER name:x index:0 type:T flags:
CONSTRUCTOR visibility:public <> (x:<root>.Outer.T) returnType:<root>.Outer<<root>.Outer.T> flags:[primary]
VALUE_PARAMETER name:x index:0 type:<root>.Outer.T flags:[]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='Outer'
PROPERTY name:x visibility:public modality:FINAL flags:val
FIELD PROPERTY_BACKING_FIELD name:x type:T visibility:public flags:final
DELEGATING_CONSTRUCTOR_CALL 'CONSTRUCTOR IR_EXTERNAL_DECLARATION_STUB visibility:public <> () returnType:kotlin.Any flags:[primary]'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Outer modality:FINAL visibility:public flags:[] superTypes:[kotlin.Any]'
PROPERTY name:x visibility:public modality:FINAL flags:[val]
FIELD PROPERTY_BACKING_FIELD name:x type:<root>.Outer.T visibility:public flags:[final]
EXPRESSION_BODY
GET_VAR 'value-parameter x: T' type=T origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-x> visibility:public modality:FINAL <> ($this:Outer<T>) returnType:T flags:
correspondingProperty: PROPERTY name:x visibility:public modality:FINAL flags:val
$this: VALUE_PARAMETER name:<this> type:Outer<T> flags:
GET_VAR 'VALUE_PARAMETER name:x index:0 type:<root>.Outer.T flags:[]' type=<root>.Outer.T origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-x> visibility:public modality:FINAL <> ($this:<root>.Outer<<root>.Outer.T>) returnType:<root>.Outer.T flags:[]
correspondingProperty: PROPERTY name:x visibility:public modality:FINAL flags:[val]
$this: VALUE_PARAMETER name:<this> type:<root>.Outer<<root>.Outer.T> flags:[]
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): T'
GET_FIELD 'x: T' type=T origin=null
receiver: GET_VAR 'this@Outer: Outer<T>' type=Outer<T> origin=null
CLASS CLASS name:Inner modality:OPEN visibility:public flags:inner superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:Outer.Inner<T> flags:
CONSTRUCTOR visibility:public <> ($this:Outer<T>, y:kotlin.Int) returnType:Outer.Inner<T> flags:primary
$outer: VALUE_PARAMETER name:<this> type:Outer<T> flags:
VALUE_PARAMETER name:y index:0 type:kotlin.Int flags:
RETURN type=kotlin.Nothing from='FUN DEFAULT_PROPERTY_ACCESSOR name:<get-x> visibility:public modality:FINAL <> ($this:<root>.Outer<<root>.Outer.T>) returnType:<root>.Outer.T flags:[]'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:<root>.Outer.T visibility:public flags:[final]' type=<root>.Outer.T origin=null
receiver: GET_VAR 'VALUE_PARAMETER name:<this> type:<root>.Outer<<root>.Outer.T> flags:[]' type=<root>.Outer<<root>.Outer.T> origin=null
CLASS CLASS name:Inner modality:OPEN visibility:public flags:[inner] superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Outer.Inner<<root>.Outer.T> flags:[]
CONSTRUCTOR visibility:public <> ($this:<root>.Outer<<root>.Outer.T>, y:kotlin.Int) returnType:<root>.Outer.Inner<<root>.Outer.T> flags:[primary]
$outer: VALUE_PARAMETER name:<this> type:<root>.Outer<<root>.Outer.T> flags:[]
VALUE_PARAMETER name:y index:0 type:kotlin.Int flags:[]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='Inner'
PROPERTY name:y visibility:public modality:FINAL flags:val
FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.Int visibility:public flags:final
DELEGATING_CONSTRUCTOR_CALL 'CONSTRUCTOR IR_EXTERNAL_DECLARATION_STUB visibility:public <> () returnType:kotlin.Any flags:[primary]'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Inner modality:OPEN visibility:public flags:[inner] superTypes:[kotlin.Any]'
PROPERTY name:y visibility:public modality:FINAL flags:[val]
FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.Int visibility:public flags:[final]
EXPRESSION_BODY
GET_VAR 'value-parameter y: Int' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-y> visibility:public modality:FINAL <> ($this:Outer.Inner<T>) returnType:kotlin.Int flags:
correspondingProperty: PROPERTY name:y visibility:public modality:FINAL flags:val
$this: VALUE_PARAMETER name:<this> type:Outer.Inner<T> flags:
GET_VAR 'VALUE_PARAMETER name:y index:0 type:kotlin.Int flags:[]' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-y> visibility:public modality:FINAL <> ($this:<root>.Outer.Inner<<root>.Outer.T>) returnType:kotlin.Int flags:[]
correspondingProperty: PROPERTY name:y visibility:public modality:FINAL flags:[val]
$this: VALUE_PARAMETER name:<this> type:<root>.Outer.Inner<<root>.Outer.T> flags:[]
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-y>(): Int'
GET_FIELD 'y: Int' type=kotlin.Int origin=null
receiver: GET_VAR 'this@Inner: Inner<T>' type=Outer.Inner<T> origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags:
RETURN type=kotlin.Nothing from='FUN DEFAULT_PROPERTY_ACCESSOR name:<get-y> visibility:public modality:FINAL <> ($this:<root>.Outer.Inner<<root>.Outer.T>) returnType:kotlin.Int flags:[]'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.Int visibility:public flags:[final]' type=kotlin.Int origin=null
receiver: GET_VAR 'VALUE_PARAMETER name:<this> type:<root>.Outer.Inner<<root>.Outer.T> flags:[]' type=<root>.Outer.Inner<<root>.Outer.T> origin=null
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags:[]
overridden:
FUN IR_EXTERNAL_DECLARATION_STUB name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags:
$this: VALUE_PARAMETER name:<this> type:kotlin.Any flags:
VALUE_PARAMETER name:other index:0 type:kotlin.Any? flags:
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int flags:
FUN IR_EXTERNAL_DECLARATION_STUB name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags:[]
$this: VALUE_PARAMETER name:<this> type:kotlin.Any flags:[]
VALUE_PARAMETER name:other index:0 type:kotlin.Any? flags:[]
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int flags:[]
overridden:
FUN IR_EXTERNAL_DECLARATION_STUB name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int flags:
$this: VALUE_PARAMETER name:<this> type:kotlin.Any flags:
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String flags:
FUN IR_EXTERNAL_DECLARATION_STUB name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int flags:[]
$this: VALUE_PARAMETER name:<this> type:kotlin.Any flags:[]
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String flags:[]
overridden:
FUN IR_EXTERNAL_DECLARATION_STUB name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String flags:
$this: VALUE_PARAMETER name:<this> type:kotlin.Any flags:
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags:
FUN IR_EXTERNAL_DECLARATION_STUB name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String flags:[]
$this: VALUE_PARAMETER name:<this> type:kotlin.Any flags:[]
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags:[]
overridden:
FUN IR_EXTERNAL_DECLARATION_STUB name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags:
$this: VALUE_PARAMETER name:<this> type:kotlin.Any flags:
VALUE_PARAMETER name:other index:0 type:kotlin.Any? flags:
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int flags:
FUN IR_EXTERNAL_DECLARATION_STUB name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags:[]
$this: VALUE_PARAMETER name:<this> type:kotlin.Any flags:[]
VALUE_PARAMETER name:other index:0 type:kotlin.Any? flags:[]
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int flags:[]
overridden:
FUN IR_EXTERNAL_DECLARATION_STUB name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int flags:
$this: VALUE_PARAMETER name:<this> type:kotlin.Any flags:
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String flags:
FUN IR_EXTERNAL_DECLARATION_STUB name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int flags:[]
$this: VALUE_PARAMETER name:<this> type:kotlin.Any flags:[]
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String flags:[]
overridden:
FUN IR_EXTERNAL_DECLARATION_STUB name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String flags:
$this: VALUE_PARAMETER name:<this> type:kotlin.Any flags:
FUN name:test visibility:public modality:FINAL <> ($receiver:Outer<kotlin.Int>) returnType:Outer.Inner<kotlin.Int> flags:
$receiver: VALUE_PARAMETER name:<this> type:Outer<kotlin.Int> flags:
FUN IR_EXTERNAL_DECLARATION_STUB name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String flags:[]
$this: VALUE_PARAMETER name:<this> type:kotlin.Any flags:[]
FUN name:test visibility:public modality:FINAL <> ($receiver:<root>.Outer<kotlin.Int>) returnType:<root>.Outer.Inner<kotlin.Int> flags:[]
$receiver: VALUE_PARAMETER name:<this> type:<root>.Outer<kotlin.Int> flags:[]
BLOCK_BODY
RETURN type=kotlin.Nothing from='test() on Outer<Int>: Outer<Int>.Inner'
BLOCK type=test.<no name provided> origin=OBJECT_LITERAL
CLASS CLASS name:<no name provided> modality:FINAL visibility:local flags: superTypes:[Outer.Inner<kotlin.Int>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:test.<no name provided> flags:
CONSTRUCTOR visibility:public <> () returnType:test.<no name provided> flags:primary
RETURN type=kotlin.Nothing from='FUN name:test visibility:public modality:FINAL <> ($receiver:<root>.Outer<kotlin.Int>) returnType:<root>.Outer.Inner<kotlin.Int> flags:[]'
BLOCK type=<root>.test.<no name provided> origin=OBJECT_LITERAL
CLASS CLASS name:<no name provided> modality:FINAL visibility:local flags:[] superTypes:[<root>.Outer.Inner<kotlin.Int>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.test.<no name provided> flags:[]
CONSTRUCTOR visibility:public <> () returnType:<root>.test.<no name provided> flags:[primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor Inner(Int)'
$this: GET_VAR 'this@test: Outer<Int>' type=Outer<kotlin.Int> origin=null
DELEGATING_CONSTRUCTOR_CALL 'CONSTRUCTOR visibility:public <> ($this:<root>.Outer<<root>.Outer.T>, y:kotlin.Int) returnType:<root>.Outer.Inner<<root>.Outer.T> flags:[primary]'
$this: GET_VAR 'VALUE_PARAMETER name:<this> type:<root>.Outer<kotlin.Int> flags:[]' type=<root>.Outer<kotlin.Int> origin=null
y: CONST Int type=kotlin.Int value=42
INSTANCE_INITIALIZER_CALL classDescriptor='<no name provided>'
PROPERTY name:xx visibility:public modality:FINAL flags:val
FIELD PROPERTY_BACKING_FIELD name:xx type:kotlin.Int visibility:public flags:final
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local flags:[] superTypes:[<root>.Outer.Inner<kotlin.Int>]'
PROPERTY name:xx visibility:public modality:FINAL flags:[val]
FIELD PROPERTY_BACKING_FIELD name:xx type:kotlin.Int visibility:public flags:[final]
EXPRESSION_BODY
CALL 'plus(Int): Int' type=kotlin.Int origin=PLUS
$this: CALL '<get-x>(): T' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR 'this@test: Outer<Int>' type=Outer<kotlin.Int> origin=null
other: CALL '<get-y>(): Int' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR 'this@<no name provided>: <no name provided>' type=test.<no name provided> origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-xx> visibility:public modality:FINAL <> ($this:test.<no name provided>) returnType:kotlin.Int flags:
correspondingProperty: PROPERTY name:xx visibility:public modality:FINAL flags:val
$this: VALUE_PARAMETER name:<this> type:test.<no name provided> flags:
CALL 'FUN IR_EXTERNAL_DECLARATION_STUB name:plus visibility:public modality:FINAL <> ($this:kotlin.Int, other:kotlin.Int) returnType:kotlin.Int flags:[]' type=kotlin.Int origin=PLUS
$this: CALL 'FUN DEFAULT_PROPERTY_ACCESSOR name:<get-x> visibility:public modality:FINAL <> ($this:<root>.Outer<<root>.Outer.T>) returnType:<root>.Outer.T flags:[]' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR 'VALUE_PARAMETER name:<this> type:<root>.Outer<kotlin.Int> flags:[]' type=<root>.Outer<kotlin.Int> origin=null
other: CALL 'FUN FAKE_OVERRIDE name:<get-y> visibility:public modality:FINAL <> ($this:<root>.Outer.Inner<kotlin.Int>) returnType:kotlin.Int flags:[]' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR 'VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.test.<no name provided> flags:[]' type=<root>.test.<no name provided> origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-xx> visibility:public modality:FINAL <> ($this:<root>.test.<no name provided>) returnType:kotlin.Int flags:[]
correspondingProperty: PROPERTY name:xx visibility:public modality:FINAL flags:[val]
$this: VALUE_PARAMETER name:<this> type:<root>.test.<no name provided> flags:[]
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-xx>(): Int'
GET_FIELD 'xx: Int' type=kotlin.Int origin=null
receiver: GET_VAR 'this@<no name provided>: <no name provided>' type=test.<no name provided> origin=null
PROPERTY FAKE_OVERRIDE name:y visibility:public modality:FINAL flags:val
FUN FAKE_OVERRIDE name:<get-y> visibility:public modality:FINAL <> ($this:Outer.Inner<kotlin.Int>) returnType:kotlin.Int flags:
correspondingProperty: PROPERTY FAKE_OVERRIDE name:y visibility:public modality:FINAL flags:val
RETURN type=kotlin.Nothing from='FUN DEFAULT_PROPERTY_ACCESSOR name:<get-xx> visibility:public modality:FINAL <> ($this:<root>.test.<no name provided>) returnType:kotlin.Int flags:[]'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:xx type:kotlin.Int visibility:public flags:[final]' type=kotlin.Int origin=null
receiver: GET_VAR 'VALUE_PARAMETER name:<this> type:<root>.test.<no name provided> flags:[]' type=<root>.test.<no name provided> origin=null
PROPERTY FAKE_OVERRIDE name:y visibility:public modality:FINAL flags:[val]
FUN FAKE_OVERRIDE name:<get-y> visibility:public modality:FINAL <> ($this:<root>.Outer.Inner<kotlin.Int>) returnType:kotlin.Int flags:[]
correspondingProperty: PROPERTY FAKE_OVERRIDE name:y visibility:public modality:FINAL flags:[val]
overridden:
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-y> visibility:public modality:FINAL <> ($this:Outer.Inner<T>) returnType:kotlin.Int flags:
$this: VALUE_PARAMETER name:<this> type:Outer.Inner<kotlin.Int> flags:
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags:
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-y> visibility:public modality:FINAL <> ($this:<root>.Outer.Inner<<root>.Outer.T>) returnType:kotlin.Int flags:[]
$this: VALUE_PARAMETER name:<this> type:<root>.Outer.Inner<kotlin.Int> flags:[]
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags:[]
overridden:
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags:
$this: VALUE_PARAMETER name:<this> type:kotlin.Any flags:
VALUE_PARAMETER name:other index:0 type:kotlin.Any? flags:
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int flags:
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags:[]
$this: VALUE_PARAMETER name:<this> type:kotlin.Any flags:[]
VALUE_PARAMETER name:other index:0 type:kotlin.Any? flags:[]
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int flags:[]
overridden:
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int flags:
$this: VALUE_PARAMETER name:<this> type:kotlin.Any flags:
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String flags:
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int flags:[]
$this: VALUE_PARAMETER name:<this> type:kotlin.Any flags:[]
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String flags:[]
overridden:
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String flags:
$this: VALUE_PARAMETER name:<this> type:kotlin.Any flags:
CALL 'constructor <no name provided>()' type=test.<no name provided> origin=OBJECT_LITERAL
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String flags:[]
$this: VALUE_PARAMETER name:<this> type:kotlin.Any flags:[]
CALL 'CONSTRUCTOR visibility:public <> () returnType:<root>.test.<no name provided> flags:[primary]' type=<root>.test.<no name provided> origin=OBJECT_LITERAL