IR: annotations are represented as IrConstructorCall elements

Also, they are rendered somewhat nicer
This commit is contained in:
Dmitry Petrov
2019-03-26 13:11:04 +03:00
parent db7bcb6464
commit e3fd74a580
66 changed files with 540 additions and 643 deletions
@@ -1,17 +1,17 @@
FILE fqName:<root> fileName:/extFunInvokeAsFun.kt
FUN name:with1 visibility:public modality:FINAL <> (receiver:kotlin.Any?, block:@[CALL 'public constructor <init> () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1<kotlin.Any?, kotlin.Unit>) returnType:kotlin.Unit
FUN name:with1 visibility:public modality:FINAL <> (receiver:kotlin.Any?, block:@[ExtensionFunctionType] kotlin.Function1<kotlin.Any?, kotlin.Unit>) returnType:kotlin.Unit
VALUE_PARAMETER name:receiver index:0 type:kotlin.Any?
VALUE_PARAMETER name:block index:1 type:@[CALL 'public constructor <init> () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1<kotlin.Any?, kotlin.Unit>
VALUE_PARAMETER name:block index:1 type:@[ExtensionFunctionType] kotlin.Function1<kotlin.Any?, kotlin.Unit>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun with1 (receiver: kotlin.Any?, block: @[CALL 'public constructor <init> () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1<kotlin.Any?, kotlin.Unit>): kotlin.Unit declared in <root>'
RETURN type=kotlin.Nothing from='public final fun with1 (receiver: kotlin.Any?, block: @[ExtensionFunctionType] kotlin.Function1<kotlin.Any?, kotlin.Unit>): kotlin.Unit declared in <root>'
CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 declared in kotlin.Function1' type=kotlin.Unit origin=INVOKE
$this: GET_VAR 'block: @[CALL 'public constructor <init> () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1<kotlin.Any?, kotlin.Unit> declared in <root>.with1' type=@[CALL 'public constructor <init> () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1<kotlin.Any?, kotlin.Unit> origin=VARIABLE_AS_FUNCTION
$this: GET_VAR 'block: @[ExtensionFunctionType] kotlin.Function1<kotlin.Any?, kotlin.Unit> declared in <root>.with1' type=@[ExtensionFunctionType] kotlin.Function1<kotlin.Any?, kotlin.Unit> origin=VARIABLE_AS_FUNCTION
p1: GET_VAR 'receiver: kotlin.Any? declared in <root>.with1' type=kotlin.Any? origin=null
FUN name:with2 visibility:public modality:FINAL <> (receiver:kotlin.Any?, block:@[CALL 'public constructor <init> () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1<kotlin.Any?, kotlin.Unit>) returnType:kotlin.Unit
FUN name:with2 visibility:public modality:FINAL <> (receiver:kotlin.Any?, block:@[ExtensionFunctionType] kotlin.Function1<kotlin.Any?, kotlin.Unit>) returnType:kotlin.Unit
VALUE_PARAMETER name:receiver index:0 type:kotlin.Any?
VALUE_PARAMETER name:block index:1 type:@[CALL 'public constructor <init> () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1<kotlin.Any?, kotlin.Unit>
VALUE_PARAMETER name:block index:1 type:@[ExtensionFunctionType] kotlin.Function1<kotlin.Any?, kotlin.Unit>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun with2 (receiver: kotlin.Any?, block: @[CALL 'public constructor <init> () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1<kotlin.Any?, kotlin.Unit>): kotlin.Unit declared in <root>'
RETURN type=kotlin.Nothing from='public final fun with2 (receiver: kotlin.Any?, block: @[ExtensionFunctionType] kotlin.Function1<kotlin.Any?, kotlin.Unit>): kotlin.Unit declared in <root>'
CALL 'public abstract fun invoke (p1: P1 of kotlin.Function1): R of kotlin.Function1 declared in kotlin.Function1' type=kotlin.Unit origin=INVOKE
$this: GET_VAR 'block: @[CALL 'public constructor <init> () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1<kotlin.Any?, kotlin.Unit> declared in <root>.with2' type=@[CALL 'public constructor <init> () [primary] declared in kotlin.ExtensionFunctionType' type=kotlin.ExtensionFunctionType origin=null] kotlin.Function1<kotlin.Any?, kotlin.Unit> origin=VARIABLE_AS_FUNCTION
$this: GET_VAR 'block: @[ExtensionFunctionType] kotlin.Function1<kotlin.Any?, kotlin.Unit> declared in <root>.with2' type=@[ExtensionFunctionType] kotlin.Function1<kotlin.Any?, kotlin.Unit> origin=VARIABLE_AS_FUNCTION
p1: GET_VAR 'receiver: kotlin.Any? declared in <root>.with2' type=kotlin.Any? origin=null