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
@@ -29,8 +29,7 @@ FILE fqName:<root> fileName:/classesWithAnnotations.kt
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS CLASS name:TestClass modality:FINAL visibility:public superTypes:[kotlin.Any]
annotations:
CALL 'public constructor <init> (x: kotlin.String) [primary] declared in <root>.TestAnn' type=<root>.TestAnn origin=null
x: CONST String type=kotlin.String value="class"
TestAnn(x = 'class')
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestClass
CONSTRUCTOR visibility:public <> () returnType:<root>.TestClass [primary]
BLOCK_BODY
@@ -51,8 +50,7 @@ FILE fqName:<root> fileName:/classesWithAnnotations.kt
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS INTERFACE name:TestInterface modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
annotations:
CALL 'public constructor <init> (x: kotlin.String) [primary] declared in <root>.TestAnn' type=<root>.TestAnn origin=null
x: CONST String type=kotlin.String value="interface"
TestAnn(x = 'interface')
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestInterface
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean
overridden:
@@ -69,8 +67,7 @@ FILE fqName:<root> fileName:/classesWithAnnotations.kt
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS OBJECT name:TestObject modality:FINAL visibility:public superTypes:[kotlin.Any]
annotations:
CALL 'public constructor <init> (x: kotlin.String) [primary] declared in <root>.TestAnn' type=<root>.TestAnn origin=null
x: CONST String type=kotlin.String value="object"
TestAnn(x = 'object')
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestObject
CONSTRUCTOR visibility:private <> () returnType:<root>.TestObject [primary]
BLOCK_BODY
@@ -97,8 +94,7 @@ FILE fqName:<root> fileName:/classesWithAnnotations.kt
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Host modality:FINAL visibility:public superTypes:[kotlin.Any]'
CLASS OBJECT name:TestCompanion modality:FINAL visibility:public [companion] superTypes:[kotlin.Any]
annotations:
CALL 'public constructor <init> (x: kotlin.String) [primary] declared in <root>.TestAnn' type=<root>.TestAnn origin=null
x: CONST String type=kotlin.String value="companion"
TestAnn(x = 'companion')
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Host.TestCompanion
CONSTRUCTOR visibility:private <> () returnType:<root>.Host.TestCompanion [primary]
BLOCK_BODY
@@ -132,8 +128,7 @@ FILE fqName:<root> fileName:/classesWithAnnotations.kt
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS ENUM_CLASS name:TestEnum modality:FINAL visibility:public superTypes:[kotlin.Enum<<root>.TestEnum>]
annotations:
CALL 'public constructor <init> (x: kotlin.String) [primary] declared in <root>.TestAnn' type=<root>.TestAnn origin=null
x: CONST String type=kotlin.String value="enum"
TestAnn(x = 'enum')
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestEnum
CONSTRUCTOR visibility:private <> () returnType:<root>.TestEnum [primary]
BLOCK_BODY
@@ -189,8 +184,7 @@ FILE fqName:<root> fileName:/classesWithAnnotations.kt
SYNTHETIC_BODY kind=ENUM_VALUEOF
CLASS ANNOTATION_CLASS name:TestAnnotation modality:FINAL visibility:public superTypes:[kotlin.Annotation]
annotations:
CALL 'public constructor <init> (x: kotlin.String) [primary] declared in <root>.TestAnn' type=<root>.TestAnn origin=null
x: CONST String type=kotlin.String value="annotation"
TestAnn(x = 'annotation')
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestAnnotation
CONSTRUCTOR visibility:public <> () returnType:<root>.TestAnnotation [primary]
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean