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
+55 -55
View File
@@ -1,73 +1,73 @@
FILE fqName:<root> fileName:/lambdaInCAO.kt
FUN name:plusAssign visibility:public modality:FINAL <> ($receiver:kotlin.Any, lambda:kotlin.Function0<kotlin.Unit>) returnType:kotlin.Unit flags:
$receiver: VALUE_PARAMETER name:<this> type:kotlin.Any flags:
VALUE_PARAMETER name:lambda index:0 type:kotlin.Function0<kotlin.Unit> flags:
FUN name:plusAssign visibility:public modality:FINAL <> ($receiver:kotlin.Any, lambda:kotlin.Function0<kotlin.Unit>) returnType:kotlin.Unit flags:[]
$receiver: VALUE_PARAMETER name:<this> type:kotlin.Any flags:[]
VALUE_PARAMETER name:lambda index:0 type:kotlin.Function0<kotlin.Unit> flags:[]
BLOCK_BODY
FUN name:get visibility:public modality:FINAL <> ($receiver:kotlin.Any, index:kotlin.Function0<kotlin.Unit>) returnType:kotlin.Int flags:
$receiver: VALUE_PARAMETER name:<this> type:kotlin.Any flags:
VALUE_PARAMETER name:index index:0 type:kotlin.Function0<kotlin.Unit> flags:
FUN name:get visibility:public modality:FINAL <> ($receiver:kotlin.Any, index:kotlin.Function0<kotlin.Unit>) returnType:kotlin.Int flags:[]
$receiver: VALUE_PARAMETER name:<this> type:kotlin.Any flags:[]
VALUE_PARAMETER name:index index:0 type:kotlin.Function0<kotlin.Unit> flags:[]
BLOCK_BODY
RETURN type=kotlin.Nothing from='get(() -> Unit) on Any: Int'
RETURN type=kotlin.Nothing from='FUN name:get visibility:public modality:FINAL <> ($receiver:kotlin.Any, index:kotlin.Function0<kotlin.Unit>) returnType:kotlin.Int flags:[]'
CONST Int type=kotlin.Int value=42
FUN name:set visibility:public modality:FINAL <> ($receiver:kotlin.Any, index:kotlin.Function0<kotlin.Unit>, value:kotlin.Int) returnType:kotlin.Unit flags:
$receiver: VALUE_PARAMETER name:<this> type:kotlin.Any flags:
VALUE_PARAMETER name:index index:0 type:kotlin.Function0<kotlin.Unit> flags:
VALUE_PARAMETER name:value index:1 type:kotlin.Int flags:
FUN name:set visibility:public modality:FINAL <> ($receiver:kotlin.Any, index:kotlin.Function0<kotlin.Unit>, value:kotlin.Int) returnType:kotlin.Unit flags:[]
$receiver: VALUE_PARAMETER name:<this> type:kotlin.Any flags:[]
VALUE_PARAMETER name:index index:0 type:kotlin.Function0<kotlin.Unit> flags:[]
VALUE_PARAMETER name:value index:1 type:kotlin.Int flags:[]
BLOCK_BODY
FUN name:test1 visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit flags:
VALUE_PARAMETER name:a index:0 type:kotlin.Any flags:
FUN name:test1 visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit flags:[]
VALUE_PARAMETER name:a index:0 type:kotlin.Any flags:[]
BLOCK_BODY
CALL 'plusAssign(() -> Unit) on Any: Unit' type=kotlin.Unit origin=PLUSEQ
$receiver: GET_VAR 'value-parameter a: Any' type=kotlin.Any origin=PLUSEQ
CALL 'FUN name:plusAssign visibility:public modality:FINAL <> ($receiver:kotlin.Any, lambda:kotlin.Function0<kotlin.Unit>) returnType:kotlin.Unit flags:[]' type=kotlin.Unit origin=PLUSEQ
$receiver: GET_VAR 'VALUE_PARAMETER name:a index:0 type:kotlin.Any flags:[]' type=kotlin.Any origin=PLUSEQ
lambda: 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'
GET_OBJECT 'Unit' type=kotlin.Unit
FUNCTION_REFERENCE '<anonymous>(): Unit' type=kotlin.Function0<kotlin.Unit> origin=LAMBDA
FUN name:test2 visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit flags:
VALUE_PARAMETER name:a index:0 type:kotlin.Any flags:
RETURN type=kotlin.Nothing from='FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.Unit flags:[]'
GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public flags:[] superTypes:[kotlin.Any]' type=kotlin.Unit
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 name:test2 visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit flags:[]
VALUE_PARAMETER name:a index:0 type:kotlin.Any flags:[]
BLOCK_BODY
BLOCK type=kotlin.Unit origin=PLUSEQ
VAR IR_TEMPORARY_VARIABLE name:tmp0_array type:kotlin.Any flags:val
GET_VAR 'value-parameter a: Any' type=kotlin.Any origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp1_index0 type:kotlin.Function0<kotlin.Unit> flags:val
VAR IR_TEMPORARY_VARIABLE name:tmp0_array type:kotlin.Any flags:[val]
GET_VAR 'VALUE_PARAMETER name:a index:0 type:kotlin.Any flags:[]' type=kotlin.Any origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp1_index0 type:kotlin.Function0<kotlin.Unit> flags:[val]
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'
GET_OBJECT 'Unit' type=kotlin.Unit
FUNCTION_REFERENCE '<anonymous>(): Unit' type=kotlin.Function0<kotlin.Unit> origin=LAMBDA
CALL 'set(() -> Unit, Int) on Any: Unit' type=kotlin.Unit origin=PLUSEQ
$receiver: GET_VAR 'tmp0_array: Any' type=kotlin.Any origin=null
index: GET_VAR 'tmp1_index0: () -> Unit' type=kotlin.Function0<kotlin.Unit> origin=null
value: CALL 'plus(Int): Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'get(() -> Unit) on Any: Int' type=kotlin.Int origin=PLUSEQ
$receiver: GET_VAR 'tmp0_array: Any' type=kotlin.Any origin=null
index: GET_VAR 'tmp1_index0: () -> Unit' type=kotlin.Function0<kotlin.Unit> origin=null
RETURN type=kotlin.Nothing from='FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.Unit flags:[]'
GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public flags:[] superTypes:[kotlin.Any]' type=kotlin.Unit
FUNCTION_REFERENCE 'FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.Unit flags:[]' type=kotlin.Function0<kotlin.Unit> origin=LAMBDA
CALL 'FUN name:set visibility:public modality:FINAL <> ($receiver:kotlin.Any, index:kotlin.Function0<kotlin.Unit>, value:kotlin.Int) returnType:kotlin.Unit flags:[]' type=kotlin.Unit origin=PLUSEQ
$receiver: GET_VAR 'VAR IR_TEMPORARY_VARIABLE name:tmp0_array type:kotlin.Any flags:[val]' type=kotlin.Any origin=null
index: GET_VAR 'VAR IR_TEMPORARY_VARIABLE name:tmp1_index0 type:kotlin.Function0<kotlin.Unit> flags:[val]' type=kotlin.Function0<kotlin.Unit> origin=null
value: 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=PLUSEQ
$this: CALL 'FUN name:get visibility:public modality:FINAL <> ($receiver:kotlin.Any, index:kotlin.Function0<kotlin.Unit>) returnType:kotlin.Int flags:[]' type=kotlin.Int origin=PLUSEQ
$receiver: GET_VAR 'VAR IR_TEMPORARY_VARIABLE name:tmp0_array type:kotlin.Any flags:[val]' type=kotlin.Any origin=null
index: GET_VAR 'VAR IR_TEMPORARY_VARIABLE name:tmp1_index0 type:kotlin.Function0<kotlin.Unit> flags:[val]' type=kotlin.Function0<kotlin.Unit> origin=null
other: CONST Int type=kotlin.Int value=42
FUN name:test3 visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit flags:
VALUE_PARAMETER name:a index:0 type:kotlin.Any flags:
FUN name:test3 visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit flags:[]
VALUE_PARAMETER name:a index:0 type:kotlin.Any 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.Int origin=POSTFIX_INCR
VAR IR_TEMPORARY_VARIABLE name:tmp0_array type:kotlin.Any flags:val
GET_VAR 'value-parameter a: Any' type=kotlin.Any origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp1_index0 type:kotlin.Function0<kotlin.Unit> flags:val
VAR IR_TEMPORARY_VARIABLE name:tmp0_array type:kotlin.Any flags:[val]
GET_VAR 'VALUE_PARAMETER name:a index:0 type:kotlin.Any flags:[]' type=kotlin.Any origin=null
VAR IR_TEMPORARY_VARIABLE name:tmp1_index0 type:kotlin.Function0<kotlin.Unit> flags:[val]
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'
GET_OBJECT 'Unit' type=kotlin.Unit
FUNCTION_REFERENCE '<anonymous>(): Unit' type=kotlin.Function0<kotlin.Unit> origin=LAMBDA
VAR IR_TEMPORARY_VARIABLE name:tmp2 type:kotlin.Int flags:val
CALL 'get(() -> Unit) on Any: Int' type=kotlin.Int origin=POSTFIX_INCR
$receiver: GET_VAR 'tmp0_array: Any' type=kotlin.Any origin=null
index: GET_VAR 'tmp1_index0: () -> Unit' type=kotlin.Function0<kotlin.Unit> origin=null
CALL 'set(() -> Unit, Int) on Any: Unit' type=kotlin.Unit origin=POSTFIX_INCR
$receiver: GET_VAR 'tmp0_array: Any' type=kotlin.Any origin=null
index: GET_VAR 'tmp1_index0: () -> Unit' type=kotlin.Function0<kotlin.Unit> origin=null
value: CALL 'inc(): Int' type=kotlin.Int origin=POSTFIX_INCR
$this: GET_VAR 'tmp2: Int' type=kotlin.Int origin=null
GET_VAR 'tmp2: Int' type=kotlin.Int origin=null
RETURN type=kotlin.Nothing from='FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.Unit flags:[]'
GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public flags:[] superTypes:[kotlin.Any]' type=kotlin.Unit
FUNCTION_REFERENCE 'FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.Unit flags:[]' type=kotlin.Function0<kotlin.Unit> origin=LAMBDA
VAR IR_TEMPORARY_VARIABLE name:tmp2 type:kotlin.Int flags:[val]
CALL 'FUN name:get visibility:public modality:FINAL <> ($receiver:kotlin.Any, index:kotlin.Function0<kotlin.Unit>) returnType:kotlin.Int flags:[]' type=kotlin.Int origin=POSTFIX_INCR
$receiver: GET_VAR 'VAR IR_TEMPORARY_VARIABLE name:tmp0_array type:kotlin.Any flags:[val]' type=kotlin.Any origin=null
index: GET_VAR 'VAR IR_TEMPORARY_VARIABLE name:tmp1_index0 type:kotlin.Function0<kotlin.Unit> flags:[val]' type=kotlin.Function0<kotlin.Unit> origin=null
CALL 'FUN name:set visibility:public modality:FINAL <> ($receiver:kotlin.Any, index:kotlin.Function0<kotlin.Unit>, value:kotlin.Int) returnType:kotlin.Unit flags:[]' type=kotlin.Unit origin=POSTFIX_INCR
$receiver: GET_VAR 'VAR IR_TEMPORARY_VARIABLE name:tmp0_array type:kotlin.Any flags:[val]' type=kotlin.Any origin=null
index: GET_VAR 'VAR IR_TEMPORARY_VARIABLE name:tmp1_index0 type:kotlin.Function0<kotlin.Unit> flags:[val]' type=kotlin.Function0<kotlin.Unit> origin=null
value: CALL 'FUN IR_EXTERNAL_DECLARATION_STUB name:inc visibility:public modality:FINAL <> ($this:kotlin.Int) returnType:kotlin.Int flags:[]' type=kotlin.Int origin=POSTFIX_INCR
$this: GET_VAR 'VAR IR_TEMPORARY_VARIABLE name:tmp2 type:kotlin.Int flags:[val]' type=kotlin.Int origin=null
GET_VAR 'VAR IR_TEMPORARY_VARIABLE name:tmp2 type:kotlin.Int flags:[val]' type=kotlin.Int origin=null