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
+30 -30
View File
@@ -1,59 +1,59 @@
FILE fqName:<root> fileName:/coercionToUnit.kt
PROPERTY name:test1 visibility:public modality:FINAL flags:val
FIELD PROPERTY_BACKING_FIELD name:test1 type:kotlin.Function0<kotlin.Unit> visibility:public flags:final,static
PROPERTY name:test1 visibility:public modality:FINAL flags:[val]
FIELD PROPERTY_BACKING_FIELD name:test1 type:kotlin.Function0<kotlin.Unit> visibility:public flags:[final,static]
EXPRESSION_BODY
BLOCK type=kotlin.Function0<kotlin.Unit> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.Unit flags:
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.Unit flags:[]
BLOCK_BODY
RETURN type=kotlin.Nothing from='<anonymous>(): Unit'
RETURN type=kotlin.Nothing from='FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.Unit flags:[]'
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: superTypes:[kotlin.Any]
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public flags:[] superTypes:[kotlin.Any]
CONST Int type=kotlin.Int value=42
FUNCTION_REFERENCE '<anonymous>(): Unit' type=kotlin.Function0<kotlin.Unit> origin=LAMBDA
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test1> visibility:public modality:FINAL <> () returnType:kotlin.Function0<kotlin.Unit> flags:
correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL flags:val
FUNCTION_REFERENCE 'FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.Unit flags:[]' type=kotlin.Function0<kotlin.Unit> origin=LAMBDA
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test1> visibility:public modality:FINAL <> () returnType:kotlin.Function0<kotlin.Unit> flags:[]
correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL flags:[val]
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test1>(): () -> Unit'
GET_FIELD 'test1: () -> Unit' type=kotlin.Function0<kotlin.Unit> origin=null
FUN name:test2 visibility:public modality:FINAL <> (mc:kotlin.collections.MutableCollection<kotlin.String>) returnType:kotlin.Unit flags:
VALUE_PARAMETER name:mc index:0 type:kotlin.collections.MutableCollection<kotlin.String> flags:
RETURN type=kotlin.Nothing from='FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test1> visibility:public modality:FINAL <> () returnType:kotlin.Function0<kotlin.Unit> flags:[]'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test1 type:kotlin.Function0<kotlin.Unit> visibility:public flags:[final,static]' type=kotlin.Function0<kotlin.Unit> origin=null
FUN name:test2 visibility:public modality:FINAL <> (mc:kotlin.collections.MutableCollection<kotlin.String>) returnType:kotlin.Unit flags:[]
VALUE_PARAMETER name:mc index:0 type:kotlin.collections.MutableCollection<kotlin.String> flags:[]
BLOCK_BODY
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: superTypes:[kotlin.Any]
CALL 'add(E): Boolean' type=kotlin.Boolean origin=null
$this: GET_VAR 'value-parameter mc: MutableCollection<String>' type=kotlin.collections.MutableCollection<kotlin.String> origin=null
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public flags:[] superTypes:[kotlin.Any]
CALL 'FUN IR_EXTERNAL_DECLARATION_STUB name:add visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableCollection<kotlin.collections.MutableCollection.E>, element:kotlin.collections.MutableCollection.E) returnType:kotlin.Boolean flags:[]' type=kotlin.Boolean origin=null
$this: GET_VAR 'VALUE_PARAMETER name:mc index:0 type:kotlin.collections.MutableCollection<kotlin.String> flags:[]' type=kotlin.collections.MutableCollection<kotlin.String> origin=null
element: CONST String type=kotlin.String value=""
FUN name:test3 visibility:public modality:FINAL <> () returnType:kotlin.Unit flags:
FUN name:test3 visibility:public modality:FINAL <> () returnType:kotlin.Unit flags:[]
BLOCK_BODY
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: superTypes:[kotlin.Any]
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public flags:[] superTypes:[kotlin.Any]
BLOCK type=kotlin.Unit? origin=SAFE_CALL
VAR IR_TEMPORARY_VARIABLE name:tmp0_safe_receiver type:java.io.PrintStream? flags:val
GET_FIELD 'out: PrintStream!' type=java.io.PrintStream? origin=GET_PROPERTY
VAR IR_TEMPORARY_VARIABLE name:tmp0_safe_receiver type:java.io.PrintStream? flags:[val]
GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:out type:java.io.PrintStream? visibility:public flags:[final,static]' type=java.io.PrintStream? origin=GET_PROPERTY
WHEN type=kotlin.Unit? origin=null
BRANCH
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
arg0: GET_VAR 'tmp0_safe_receiver: PrintStream?' type=java.io.PrintStream? 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 IR_TEMPORARY_VARIABLE name:tmp0_safe_receiver type:java.io.PrintStream? flags:[val]' type=java.io.PrintStream? origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Null type=kotlin.Nothing? value=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CALL 'println(String!): Unit' type=kotlin.Unit origin=null
$this: GET_VAR 'tmp0_safe_receiver: PrintStream?' type=java.io.PrintStream? origin=null
then: CALL 'FUN IR_EXTERNAL_JAVA_DECLARATION_STUB name:println visibility:public modality:OPEN <> ($this:java.io.PrintStream, x:kotlin.String?) returnType:kotlin.Unit flags:[]' type=kotlin.Unit origin=null
$this: GET_VAR 'VAR IR_TEMPORARY_VARIABLE name:tmp0_safe_receiver type:java.io.PrintStream? flags:[val]' type=java.io.PrintStream? origin=null
x: CONST String type=kotlin.String value="Hello,"
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: superTypes:[kotlin.Any]
typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public flags:[] superTypes:[kotlin.Any]
BLOCK type=kotlin.Unit? origin=SAFE_CALL
VAR IR_TEMPORARY_VARIABLE name:tmp1_safe_receiver type:java.io.PrintStream? flags:val
GET_FIELD 'out: PrintStream!' type=java.io.PrintStream? origin=GET_PROPERTY
VAR IR_TEMPORARY_VARIABLE name:tmp1_safe_receiver type:java.io.PrintStream? flags:[val]
GET_FIELD 'FIELD IR_EXTERNAL_JAVA_DECLARATION_STUB name:out type:java.io.PrintStream? visibility:public flags:[final,static]' type=java.io.PrintStream? origin=GET_PROPERTY
WHEN type=kotlin.Unit? origin=null
BRANCH
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
arg0: GET_VAR 'tmp1_safe_receiver: PrintStream?' type=java.io.PrintStream? 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 IR_TEMPORARY_VARIABLE name:tmp1_safe_receiver type:java.io.PrintStream? flags:[val]' type=java.io.PrintStream? origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST Null type=kotlin.Nothing? value=null
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CALL 'println(String!): Unit' type=kotlin.Unit origin=null
$this: GET_VAR 'tmp1_safe_receiver: PrintStream?' type=java.io.PrintStream? origin=null
then: CALL 'FUN IR_EXTERNAL_JAVA_DECLARATION_STUB name:println visibility:public modality:OPEN <> ($this:java.io.PrintStream, x:kotlin.String?) returnType:kotlin.Unit flags:[]' type=kotlin.Unit origin=null
$this: GET_VAR 'VAR IR_TEMPORARY_VARIABLE name:tmp1_safe_receiver type:java.io.PrintStream? flags:[val]' type=java.io.PrintStream? origin=null
x: CONST String type=kotlin.String value="world!"