[KLIB][tests] Reorganize "klib dump-ir" tests

- Keep the test data under "native/native.tests/testData/klib/" dir
- Rename tests from "klib ir" to "klib dump-ir"
This commit is contained in:
Dmitriy Dolovov
2023-08-15 15:03:20 +02:00
committed by Space Team
parent a8034b6baa
commit ec9370c30b
24 changed files with 28 additions and 28 deletions
@@ -0,0 +1,8 @@
MODULE_FRAGMENT name:<class.kt>
FILE fqName:test fileName:class.kt
CLASS CLASS name:A modality:FINAL visibility:public superTypes:[<unbound IrClassPublicSymbolImpl>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:test.A
CONSTRUCTOR visibility:public <> () returnType:test.A [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'UNBOUND IrConstructorPublicSymbolImpl'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:FINAL visibility:public superTypes:[<unbound IrClassPublicSymbolImpl>]'
+5
View File
@@ -0,0 +1,5 @@
// FIR_IDENTICAL
package test
class A {
}
@@ -0,0 +1,8 @@
MODULE_FRAGMENT name:<class.kt>
FILE fqName:test fileName:class.kt
CLASS CLASS name:A signature:test/A|null[0] modality:FINAL visibility:public superTypes:[<unbound IrClassPublicSymbolImpl>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:test.A
CONSTRUCTOR signature:test/A.<init>|<init>(){}[0] visibility:public <> () returnType:test.A [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'UNBOUND IrConstructorPublicSymbolImpl'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A signature:test/A|null[0] modality:FINAL visibility:public superTypes:[<unbound IrClassPublicSymbolImpl>]'
@@ -0,0 +1,35 @@
MODULE_FRAGMENT name:<constructor.kt>
FILE fqName:test fileName:constructor.kt
CLASS CLASS name:A modality:FINAL visibility:public superTypes:[<unbound IrClassPublicSymbolImpl>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:test.A
CONSTRUCTOR visibility:public <> (x:<unbound IrClassPublicSymbolImpl>) returnType:test.A [primary]
VALUE_PARAMETER name:x index:0 type:<unbound IrClassPublicSymbolImpl>
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'UNBOUND IrConstructorPublicSymbolImpl'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:FINAL visibility:public superTypes:[<unbound IrClassPublicSymbolImpl>]'
PROPERTY name:x visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:x type:<unbound IrClassPublicSymbolImpl> visibility:private [final]
EXPRESSION_BODY
GET_VAR 'x: <unbound IrClassPublicSymbolImpl> declared in test.A.<init>' type=<unbound IrClassPublicSymbolImpl> origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-x> visibility:public modality:FINAL <> ($this:test.A) returnType:<unbound IrClassPublicSymbolImpl>
correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:test.A
BLOCK_BODY
RETURN type=<unbound IrClassPublicSymbolImpl> from='public final fun <get-x> (): <unbound IrClassPublicSymbolImpl> declared in test.A'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:<unbound IrClassPublicSymbolImpl> visibility:private [final]' type=<unbound IrClassPublicSymbolImpl> origin=null
receiver: GET_VAR '<this>: test.A declared in test.A.<get-x>' type=test.A origin=null
CLASS OBJECT name:Companion modality:FINAL visibility:public [companion] superTypes:[<unbound IrClassPublicSymbolImpl>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:test.A.Companion
CONSTRUCTOR visibility:private <> () returnType:test.A.Companion [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'UNBOUND IrConstructorPublicSymbolImpl'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:Companion modality:FINAL visibility:public [companion] superTypes:[<unbound IrClassPublicSymbolImpl>]'
FUN name:create visibility:public modality:FINAL <> ($this:test.A.Companion, x:<unbound IrClassPublicSymbolImpl>) returnType:test.A
$this: VALUE_PARAMETER name:<this> type:test.A.Companion
VALUE_PARAMETER name:x index:0 type:<unbound IrClassPublicSymbolImpl>
BLOCK_BODY
RETURN type=<unbound IrClassPublicSymbolImpl> from='public final fun create (x: <unbound IrClassPublicSymbolImpl>): test.A declared in test.A.Companion'
CONSTRUCTOR_CALL 'public constructor <init> (x: <unbound IrClassPublicSymbolImpl>) [primary] declared in test.A' type=test.A origin=null
x: CALL 'UNBOUND IrSimpleFunctionPublicSymbolImpl' type=<unbound IrClassPublicSymbolImpl> origin=MUL
$this: GET_VAR 'x: <unbound IrClassPublicSymbolImpl> declared in test.A.Companion.create' type=<unbound IrClassPublicSymbolImpl> origin=null
1: CONST Int type=<unbound IrClassPublicSymbolImpl> value=2
@@ -0,0 +1,8 @@
// FIR_IDENTICAL
package test
class A constructor(val x: Int) {
companion object {
fun create(x: Int): A = A(x * 2)
}
}
@@ -0,0 +1,35 @@
MODULE_FRAGMENT name:<constructor.kt>
FILE fqName:test fileName:constructor.kt
CLASS CLASS name:A signature:test/A|null[0] modality:FINAL visibility:public superTypes:[<unbound IrClassPublicSymbolImpl>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:test.A
CONSTRUCTOR signature:test/A.<init>|<init>(kotlin.Int){}[0] visibility:public <> (x:<unbound IrClassPublicSymbolImpl>) returnType:test.A [primary]
VALUE_PARAMETER name:x index:0 type:<unbound IrClassPublicSymbolImpl>
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'UNBOUND IrConstructorPublicSymbolImpl'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A signature:test/A|null[0] modality:FINAL visibility:public superTypes:[<unbound IrClassPublicSymbolImpl>]'
PROPERTY name:x signature:test/A.x|{}x[0] visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:x signature:[ test/A.x|{}x[0] <- Local[<BF>|FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]] ] type:<unbound IrClassPublicSymbolImpl> visibility:private [final]
EXPRESSION_BODY
GET_VAR 'x: <unbound IrClassPublicSymbolImpl> declared in test.A.<init>' type=<unbound IrClassPublicSymbolImpl> origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-x> signature:test/A.x.<get-x>|<get-x>(){}[0] visibility:public modality:FINAL <> ($this:test.A) returnType:<unbound IrClassPublicSymbolImpl>
correspondingProperty: PROPERTY name:x signature:test/A.x|{}x[0] visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:test.A
BLOCK_BODY
RETURN type=<unbound IrClassPublicSymbolImpl> from='public final fun <get-x> (): <unbound IrClassPublicSymbolImpl> declared in test.A'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x signature:[ test/A.x|{}x[0] <- Local[<BF>|FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]] ] type:<unbound IrClassPublicSymbolImpl> visibility:private [final]' type=<unbound IrClassPublicSymbolImpl> origin=null
receiver: GET_VAR '<this>: test.A declared in test.A.<get-x>' type=test.A origin=null
CLASS OBJECT name:Companion signature:test/A.Companion|null[0] modality:FINAL visibility:public [companion] superTypes:[<unbound IrClassPublicSymbolImpl>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:test.A.Companion
CONSTRUCTOR signature:test/A.Companion.<init>|<init>(){}[0] visibility:private <> () returnType:test.A.Companion [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'UNBOUND IrConstructorPublicSymbolImpl'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:Companion signature:test/A.Companion|null[0] modality:FINAL visibility:public [companion] superTypes:[<unbound IrClassPublicSymbolImpl>]'
FUN name:create signature:test/A.Companion.create|create(kotlin.Int){}[0] visibility:public modality:FINAL <> ($this:test.A.Companion, x:<unbound IrClassPublicSymbolImpl>) returnType:test.A
$this: VALUE_PARAMETER name:<this> type:test.A.Companion
VALUE_PARAMETER name:x index:0 type:<unbound IrClassPublicSymbolImpl>
BLOCK_BODY
RETURN type=<unbound IrClassPublicSymbolImpl> from='public final fun create (x: <unbound IrClassPublicSymbolImpl>): test.A declared in test.A.Companion'
CONSTRUCTOR_CALL 'public constructor <init> (x: <unbound IrClassPublicSymbolImpl>) [primary] declared in test.A' type=test.A origin=null
x: CALL 'UNBOUND IrSimpleFunctionPublicSymbolImpl' type=<unbound IrClassPublicSymbolImpl> origin=MUL
$this: GET_VAR 'x: <unbound IrClassPublicSymbolImpl> declared in test.A.Companion.create' type=<unbound IrClassPublicSymbolImpl> origin=null
1: CONST Int type=<unbound IrClassPublicSymbolImpl> value=2
+42
View File
@@ -0,0 +1,42 @@
MODULE_FRAGMENT name:<enum.kt>
FILE fqName:test fileName:enum.kt
CLASS ENUM_CLASS name:Color modality:FINAL visibility:public superTypes:[<unbound IrClassPublicSymbolImpl><test.Color>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:test.Color
CONSTRUCTOR visibility:private <> (rgb:<unbound IrClassPublicSymbolImpl>) returnType:test.Color [primary]
VALUE_PARAMETER name:rgb index:0 type:<unbound IrClassPublicSymbolImpl>
BLOCK_BODY
ENUM_CONSTRUCTOR_CALL 'UNBOUND IrConstructorPublicSymbolImpl'
<1>: test.Color
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:Color modality:FINAL visibility:public superTypes:[<unbound IrClassPublicSymbolImpl><test.Color>]'
PROPERTY name:rgb visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:rgb type:<unbound IrClassPublicSymbolImpl> visibility:private [final]
EXPRESSION_BODY
GET_VAR 'rgb: <unbound IrClassPublicSymbolImpl> declared in test.Color.<init>' type=<unbound IrClassPublicSymbolImpl> origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-rgb> visibility:public modality:FINAL <> ($this:test.Color) returnType:<unbound IrClassPublicSymbolImpl>
correspondingProperty: PROPERTY name:rgb visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:test.Color
BLOCK_BODY
RETURN type=<unbound IrClassPublicSymbolImpl> from='public final fun <get-rgb> (): <unbound IrClassPublicSymbolImpl> declared in test.Color'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:rgb type:<unbound IrClassPublicSymbolImpl> visibility:private [final]' type=<unbound IrClassPublicSymbolImpl> origin=null
receiver: GET_VAR '<this>: test.Color declared in test.Color.<get-rgb>' type=test.Color origin=null
ENUM_ENTRY name:RED
init: EXPRESSION_BODY
ENUM_CONSTRUCTOR_CALL 'private constructor <init> (rgb: <unbound IrClassPublicSymbolImpl>) [primary] declared in test.Color'
rgb: CONST Int type=<unbound IrClassPublicSymbolImpl> value=16711680
ENUM_ENTRY name:GREEN
init: EXPRESSION_BODY
ENUM_CONSTRUCTOR_CALL 'private constructor <init> (rgb: <unbound IrClassPublicSymbolImpl>) [primary] declared in test.Color'
rgb: CONST Int type=<unbound IrClassPublicSymbolImpl> value=65280
ENUM_ENTRY name:BLUE
init: EXPRESSION_BODY
ENUM_CONSTRUCTOR_CALL 'private constructor <init> (rgb: <unbound IrClassPublicSymbolImpl>) [primary] declared in test.Color'
rgb: CONST Int type=<unbound IrClassPublicSymbolImpl> value=255
FUN ENUM_CLASS_SPECIAL_MEMBER name:values visibility:public modality:FINAL <> () returnType:<unbound IrClassPublicSymbolImpl><test.Color>
SYNTHETIC_BODY kind=ENUM_VALUES
FUN ENUM_CLASS_SPECIAL_MEMBER name:valueOf visibility:public modality:FINAL <> (value:<unbound IrClassPublicSymbolImpl>) returnType:test.Color
VALUE_PARAMETER name:value index:0 type:<unbound IrClassPublicSymbolImpl>
SYNTHETIC_BODY kind=ENUM_VALUEOF
PROPERTY ENUM_CLASS_SPECIAL_MEMBER name:entries visibility:public modality:FINAL [val]
FUN ENUM_CLASS_SPECIAL_MEMBER name:<get-entries> visibility:public modality:FINAL <> () returnType:<unbound IrClassPublicSymbolImpl><test.Color>
correspondingProperty: PROPERTY ENUM_CLASS_SPECIAL_MEMBER name:entries visibility:public modality:FINAL [val]
SYNTHETIC_BODY kind=ENUM_ENTRIES
+8
View File
@@ -0,0 +1,8 @@
// FIR_IDENTICAL
package test
enum class Color(val rgb: Int) {
RED(0xFF0000),
GREEN(0x00FF00),
BLUE(0x0000FF)
}
@@ -0,0 +1,42 @@
MODULE_FRAGMENT name:<enum.kt>
FILE fqName:test fileName:enum.kt
CLASS ENUM_CLASS name:Color signature:test/Color|null[0] modality:FINAL visibility:public superTypes:[<unbound IrClassPublicSymbolImpl><test.Color>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:test.Color
CONSTRUCTOR signature:test/Color.<init>|<init>(kotlin.Int){}[0] visibility:private <> (rgb:<unbound IrClassPublicSymbolImpl>) returnType:test.Color [primary]
VALUE_PARAMETER name:rgb index:0 type:<unbound IrClassPublicSymbolImpl>
BLOCK_BODY
ENUM_CONSTRUCTOR_CALL 'UNBOUND IrConstructorPublicSymbolImpl'
<1>: test.Color
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:Color signature:test/Color|null[0] modality:FINAL visibility:public superTypes:[<unbound IrClassPublicSymbolImpl><test.Color>]'
PROPERTY name:rgb signature:test/Color.rgb|{}rgb[0] visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:rgb signature:[ test/Color.rgb|{}rgb[0] <- Local[<BF>|FIELD PROPERTY_BACKING_FIELD name:rgb type:kotlin.Int visibility:private [final]] ] type:<unbound IrClassPublicSymbolImpl> visibility:private [final]
EXPRESSION_BODY
GET_VAR 'rgb: <unbound IrClassPublicSymbolImpl> declared in test.Color.<init>' type=<unbound IrClassPublicSymbolImpl> origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-rgb> signature:test/Color.rgb.<get-rgb>|<get-rgb>(){}[0] visibility:public modality:FINAL <> ($this:test.Color) returnType:<unbound IrClassPublicSymbolImpl>
correspondingProperty: PROPERTY name:rgb signature:test/Color.rgb|{}rgb[0] visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:test.Color
BLOCK_BODY
RETURN type=<unbound IrClassPublicSymbolImpl> from='public final fun <get-rgb> (): <unbound IrClassPublicSymbolImpl> declared in test.Color'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:rgb signature:[ test/Color.rgb|{}rgb[0] <- Local[<BF>|FIELD PROPERTY_BACKING_FIELD name:rgb type:kotlin.Int visibility:private [final]] ] type:<unbound IrClassPublicSymbolImpl> visibility:private [final]' type=<unbound IrClassPublicSymbolImpl> origin=null
receiver: GET_VAR '<this>: test.Color declared in test.Color.<get-rgb>' type=test.Color origin=null
ENUM_ENTRY name:RED signature:test/Color.RED|null[0]
init: EXPRESSION_BODY
ENUM_CONSTRUCTOR_CALL 'private constructor <init> (rgb: <unbound IrClassPublicSymbolImpl>) [primary] declared in test.Color'
rgb: CONST Int type=<unbound IrClassPublicSymbolImpl> value=16711680
ENUM_ENTRY name:GREEN signature:test/Color.GREEN|null[0]
init: EXPRESSION_BODY
ENUM_CONSTRUCTOR_CALL 'private constructor <init> (rgb: <unbound IrClassPublicSymbolImpl>) [primary] declared in test.Color'
rgb: CONST Int type=<unbound IrClassPublicSymbolImpl> value=65280
ENUM_ENTRY name:BLUE signature:test/Color.BLUE|null[0]
init: EXPRESSION_BODY
ENUM_CONSTRUCTOR_CALL 'private constructor <init> (rgb: <unbound IrClassPublicSymbolImpl>) [primary] declared in test.Color'
rgb: CONST Int type=<unbound IrClassPublicSymbolImpl> value=255
FUN ENUM_CLASS_SPECIAL_MEMBER name:values signature:test/Color.values|values#static(){}[0] visibility:public modality:FINAL <> () returnType:<unbound IrClassPublicSymbolImpl><test.Color>
SYNTHETIC_BODY kind=ENUM_VALUES
FUN ENUM_CLASS_SPECIAL_MEMBER name:valueOf signature:test/Color.valueOf|valueOf#static(kotlin.String){}[0] visibility:public modality:FINAL <> (value:<unbound IrClassPublicSymbolImpl>) returnType:test.Color
VALUE_PARAMETER name:value index:0 type:<unbound IrClassPublicSymbolImpl>
SYNTHETIC_BODY kind=ENUM_VALUEOF
PROPERTY ENUM_CLASS_SPECIAL_MEMBER name:entries signature:test/Color.entries|#static{}entries[0] visibility:public modality:FINAL [val]
FUN ENUM_CLASS_SPECIAL_MEMBER name:<get-entries> signature:test/Color.entries.<get-entries>|<get-entries>#static(){}[0] visibility:public modality:FINAL <> () returnType:<unbound IrClassPublicSymbolImpl><test.Color>
correspondingProperty: PROPERTY ENUM_CLASS_SPECIAL_MEMBER name:entries signature:test/Color.entries|#static{}entries[0] visibility:public modality:FINAL [val]
SYNTHETIC_BODY kind=ENUM_ENTRIES
+38
View File
@@ -0,0 +1,38 @@
MODULE_FRAGMENT name:<field.kt>
FILE fqName:test fileName:field.kt
CLASS CLASS name:A modality:FINAL visibility:public superTypes:[<unbound IrClassPublicSymbolImpl>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:test.A
CONSTRUCTOR visibility:public <> () returnType:test.A [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'UNBOUND IrConstructorPublicSymbolImpl'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:FINAL visibility:public superTypes:[<unbound IrClassPublicSymbolImpl>]'
PROPERTY name:x visibility:public modality:FINAL [var]
FIELD PROPERTY_BACKING_FIELD name:x type:<unbound IrClassPublicSymbolImpl> visibility:private
EXPRESSION_BODY
CONST Int type=<unbound IrClassPublicSymbolImpl> value=5
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-x> visibility:public modality:FINAL <> ($this:test.A) returnType:<unbound IrClassPublicSymbolImpl>
correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [var]
$this: VALUE_PARAMETER name:<this> type:test.A
BLOCK_BODY
RETURN type=<unbound IrClassPublicSymbolImpl> from='public final fun <get-x> (): <unbound IrClassPublicSymbolImpl> declared in test.A'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:<unbound IrClassPublicSymbolImpl> visibility:private' type=<unbound IrClassPublicSymbolImpl> origin=null
receiver: GET_VAR '<this>: test.A declared in test.A.<get-x>' type=test.A origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-x> visibility:public modality:FINAL <> ($this:test.A, <set-?>:<unbound IrClassPublicSymbolImpl>) returnType:<unbound IrClassPublicSymbolImpl>
correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [var]
$this: VALUE_PARAMETER name:<this> type:test.A
VALUE_PARAMETER name:<set-?> index:0 type:<unbound IrClassPublicSymbolImpl>
BLOCK_BODY
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:<unbound IrClassPublicSymbolImpl> visibility:private' type=<unbound IrClassPublicSymbolImpl> origin=null
receiver: GET_VAR '<this>: test.A declared in test.A.<set-x>' type=test.A origin=null
value: GET_VAR '<set-?>: <unbound IrClassPublicSymbolImpl> declared in test.A.<set-x>' type=<unbound IrClassPublicSymbolImpl> origin=null
PROPERTY name:y visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:y type:<unbound IrClassPublicSymbolImpl> visibility:private [final]
EXPRESSION_BODY
CONST Int type=<unbound IrClassPublicSymbolImpl> value=10
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-y> visibility:public modality:FINAL <> ($this:test.A) returnType:<unbound IrClassPublicSymbolImpl>
correspondingProperty: PROPERTY name:y visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:test.A
BLOCK_BODY
RETURN type=<unbound IrClassPublicSymbolImpl> from='public final fun <get-y> (): <unbound IrClassPublicSymbolImpl> declared in test.A'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:<unbound IrClassPublicSymbolImpl> visibility:private [final]' type=<unbound IrClassPublicSymbolImpl> origin=null
receiver: GET_VAR '<this>: test.A declared in test.A.<get-y>' type=test.A origin=null
+7
View File
@@ -0,0 +1,7 @@
// FIR_IDENTICAL
package test
class A {
var x: Int = 5
final val y: Int = 10
}
@@ -0,0 +1,38 @@
MODULE_FRAGMENT name:<field.kt>
FILE fqName:test fileName:field.kt
CLASS CLASS name:A signature:test/A|null[0] modality:FINAL visibility:public superTypes:[<unbound IrClassPublicSymbolImpl>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:test.A
CONSTRUCTOR signature:test/A.<init>|<init>(){}[0] visibility:public <> () returnType:test.A [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'UNBOUND IrConstructorPublicSymbolImpl'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A signature:test/A|null[0] modality:FINAL visibility:public superTypes:[<unbound IrClassPublicSymbolImpl>]'
PROPERTY name:x signature:test/A.x|{}x[0] visibility:public modality:FINAL [var]
FIELD PROPERTY_BACKING_FIELD name:x signature:[ test/A.x|{}x[0] <- Local[<BF>|FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private] ] type:<unbound IrClassPublicSymbolImpl> visibility:private
EXPRESSION_BODY
CONST Int type=<unbound IrClassPublicSymbolImpl> value=5
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-x> signature:test/A.x.<get-x>|<get-x>(){}[0] visibility:public modality:FINAL <> ($this:test.A) returnType:<unbound IrClassPublicSymbolImpl>
correspondingProperty: PROPERTY name:x signature:test/A.x|{}x[0] visibility:public modality:FINAL [var]
$this: VALUE_PARAMETER name:<this> type:test.A
BLOCK_BODY
RETURN type=<unbound IrClassPublicSymbolImpl> from='public final fun <get-x> (): <unbound IrClassPublicSymbolImpl> declared in test.A'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x signature:[ test/A.x|{}x[0] <- Local[<BF>|FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private] ] type:<unbound IrClassPublicSymbolImpl> visibility:private' type=<unbound IrClassPublicSymbolImpl> origin=null
receiver: GET_VAR '<this>: test.A declared in test.A.<get-x>' type=test.A origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-x> signature:test/A.x.<set-x>|<set-x>(kotlin.Int){}[0] visibility:public modality:FINAL <> ($this:test.A, <set-?>:<unbound IrClassPublicSymbolImpl>) returnType:<unbound IrClassPublicSymbolImpl>
correspondingProperty: PROPERTY name:x signature:test/A.x|{}x[0] visibility:public modality:FINAL [var]
$this: VALUE_PARAMETER name:<this> type:test.A
VALUE_PARAMETER name:<set-?> index:0 type:<unbound IrClassPublicSymbolImpl>
BLOCK_BODY
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x signature:[ test/A.x|{}x[0] <- Local[<BF>|FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private] ] type:<unbound IrClassPublicSymbolImpl> visibility:private' type=<unbound IrClassPublicSymbolImpl> origin=null
receiver: GET_VAR '<this>: test.A declared in test.A.<set-x>' type=test.A origin=null
value: GET_VAR '<set-?>: <unbound IrClassPublicSymbolImpl> declared in test.A.<set-x>' type=<unbound IrClassPublicSymbolImpl> origin=null
PROPERTY name:y signature:test/A.y|{}y[0] visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:y signature:[ test/A.y|{}y[0] <- Local[<BF>|FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private] ] type:<unbound IrClassPublicSymbolImpl> visibility:private [final]
EXPRESSION_BODY
CONST Int type=<unbound IrClassPublicSymbolImpl> value=10
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-y> signature:test/A.y.<get-y>|<get-y>(){}[0] visibility:public modality:FINAL <> ($this:test.A) returnType:<unbound IrClassPublicSymbolImpl>
correspondingProperty: PROPERTY name:y signature:test/A.y|{}y[0] visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:test.A
BLOCK_BODY
RETURN type=<unbound IrClassPublicSymbolImpl> from='public final fun <get-y> (): <unbound IrClassPublicSymbolImpl> declared in test.A'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y signature:[ test/A.y|{}y[0] <- Local[<BF>|FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private] ] type:<unbound IrClassPublicSymbolImpl> visibility:private [final]' type=<unbound IrClassPublicSymbolImpl> origin=null
receiver: GET_VAR '<this>: test.A declared in test.A.<get-y>' type=test.A origin=null
+22
View File
@@ -0,0 +1,22 @@
MODULE_FRAGMENT name:<fun.kt>
FILE fqName:test fileName:fun.kt
CLASS CLASS name:A modality:FINAL visibility:public superTypes:[<unbound IrClassPublicSymbolImpl>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:test.A
CONSTRUCTOR visibility:public <> () returnType:test.A [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'UNBOUND IrConstructorPublicSymbolImpl'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:FINAL visibility:public superTypes:[<unbound IrClassPublicSymbolImpl>]'
FUN name:foo visibility:private modality:FINAL <> ($this:test.A) returnType:<unbound IrClassPublicSymbolImpl>
$this: VALUE_PARAMETER name:<this> type:test.A
BLOCK_BODY
RETURN type=<unbound IrClassPublicSymbolImpl> from='private final fun foo (): <unbound IrClassPublicSymbolImpl> declared in test.A'
CONST Int type=<unbound IrClassPublicSymbolImpl> value=42
FUN name:bar visibility:public modality:FINAL <> ($this:test.A, z:<unbound IrClassPublicSymbolImpl>) returnType:<unbound IrClassPublicSymbolImpl>
$this: VALUE_PARAMETER name:<this> type:test.A
VALUE_PARAMETER name:z index:0 type:<unbound IrClassPublicSymbolImpl>
BLOCK_BODY
RETURN type=<unbound IrClassPublicSymbolImpl> from='public final fun bar (z: <unbound IrClassPublicSymbolImpl>): <unbound IrClassPublicSymbolImpl> declared in test.A'
CALL 'UNBOUND IrSimpleFunctionPublicSymbolImpl' type=<unbound IrClassPublicSymbolImpl> origin=PLUS
$this: CALL 'private final fun foo (): <unbound IrClassPublicSymbolImpl> declared in test.A' type=<unbound IrClassPublicSymbolImpl> origin=null
$this: GET_VAR '<this>: test.A declared in test.A.bar' type=test.A origin=null
1: GET_VAR 'z: <unbound IrClassPublicSymbolImpl> declared in test.A.bar' type=<unbound IrClassPublicSymbolImpl> origin=null
+7
View File
@@ -0,0 +1,7 @@
// FIR_IDENTICAL
package test
class A {
private fun foo() = 42
public fun bar(z: Int) = foo() + z
}
@@ -0,0 +1,22 @@
MODULE_FRAGMENT name:<fun.kt>
FILE fqName:test fileName:fun.kt
CLASS CLASS name:A signature:test/A|null[0] modality:FINAL visibility:public superTypes:[<unbound IrClassPublicSymbolImpl>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:test.A
CONSTRUCTOR signature:test/A.<init>|<init>(){}[0] visibility:public <> () returnType:test.A [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'UNBOUND IrConstructorPublicSymbolImpl'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A signature:test/A|null[0] modality:FINAL visibility:public superTypes:[<unbound IrClassPublicSymbolImpl>]'
FUN name:foo signature:test/A.foo|foo(){}[0] visibility:private modality:FINAL <> ($this:test.A) returnType:<unbound IrClassPublicSymbolImpl>
$this: VALUE_PARAMETER name:<this> type:test.A
BLOCK_BODY
RETURN type=<unbound IrClassPublicSymbolImpl> from='private final fun foo (): <unbound IrClassPublicSymbolImpl> declared in test.A'
CONST Int type=<unbound IrClassPublicSymbolImpl> value=42
FUN name:bar signature:test/A.bar|bar(kotlin.Int){}[0] visibility:public modality:FINAL <> ($this:test.A, z:<unbound IrClassPublicSymbolImpl>) returnType:<unbound IrClassPublicSymbolImpl>
$this: VALUE_PARAMETER name:<this> type:test.A
VALUE_PARAMETER name:z index:0 type:<unbound IrClassPublicSymbolImpl>
BLOCK_BODY
RETURN type=<unbound IrClassPublicSymbolImpl> from='public final fun bar (z: <unbound IrClassPublicSymbolImpl>): <unbound IrClassPublicSymbolImpl> declared in test.A'
CALL 'UNBOUND IrSimpleFunctionPublicSymbolImpl' type=<unbound IrClassPublicSymbolImpl> origin=PLUS
$this: CALL 'private final fun foo (): <unbound IrClassPublicSymbolImpl> declared in test.A' type=<unbound IrClassPublicSymbolImpl> origin=null
$this: GET_VAR '<this>: test.A declared in test.A.bar' type=test.A origin=null
1: GET_VAR 'z: <unbound IrClassPublicSymbolImpl> declared in test.A.bar' type=<unbound IrClassPublicSymbolImpl> origin=null
@@ -0,0 +1,11 @@
MODULE_FRAGMENT name:<typealias.kt>
FILE fqName:test fileName:typealias.kt
TYPEALIAS name:PublicTypeAlias visibility:public expandedType:test.ClassName
TYPEALIAS name:InternalTypeAlias visibility:internal expandedType:test.ClassName
TYPEALIAS name:PrivateTypeAlias visibility:private expandedType:test.ClassName
CLASS CLASS name:ClassName modality:FINAL visibility:public superTypes:[<unbound IrClassPublicSymbolImpl>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:test.ClassName
CONSTRUCTOR visibility:public <> () returnType:test.ClassName [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'UNBOUND IrConstructorPublicSymbolImpl'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:ClassName modality:FINAL visibility:public superTypes:[<unbound IrClassPublicSymbolImpl>]'
@@ -0,0 +1,11 @@
MODULE_FRAGMENT name:<typealias.kt>
FILE fqName:test fileName:typealias.kt
CLASS CLASS name:ClassName modality:FINAL visibility:public superTypes:[<unbound IrClassPublicSymbolImpl>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:test.ClassName
CONSTRUCTOR visibility:public <> () returnType:test.ClassName [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'UNBOUND IrConstructorPublicSymbolImpl'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:ClassName modality:FINAL visibility:public superTypes:[<unbound IrClassPublicSymbolImpl>]'
TYPEALIAS name:PublicTypeAlias visibility:public expandedType:test.ClassName
TYPEALIAS name:InternalTypeAlias visibility:internal expandedType:test.ClassName
TYPEALIAS name:PrivateTypeAlias visibility:private expandedType:test.ClassName
@@ -0,0 +1,7 @@
package test
class ClassName
typealias PublicTypeAlias = ClassName
internal typealias InternalTypeAlias = ClassName
private typealias PrivateTypeAlias = ClassName
@@ -0,0 +1,11 @@
MODULE_FRAGMENT name:<typealias.kt>
FILE fqName:test fileName:typealias.kt
TYPEALIAS name:PublicTypeAlias signature:test/PublicTypeAlias|null[0] visibility:public expandedType:test.ClassName
TYPEALIAS name:InternalTypeAlias signature:test/InternalTypeAlias|null[0] visibility:internal expandedType:test.ClassName
TYPEALIAS name:PrivateTypeAlias signature:[ File 'typealias.kt' <- test/PrivateTypeAlias|null[0] ] visibility:private expandedType:test.ClassName
CLASS CLASS name:ClassName signature:test/ClassName|null[0] modality:FINAL visibility:public superTypes:[<unbound IrClassPublicSymbolImpl>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:test.ClassName
CONSTRUCTOR signature:test/ClassName.<init>|<init>(){}[0] visibility:public <> () returnType:test.ClassName [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'UNBOUND IrConstructorPublicSymbolImpl'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:ClassName signature:test/ClassName|null[0] modality:FINAL visibility:public superTypes:[<unbound IrClassPublicSymbolImpl>]'
@@ -0,0 +1,11 @@
MODULE_FRAGMENT name:<typealias.kt>
FILE fqName:test fileName:typealias.kt
CLASS CLASS name:ClassName signature:test/ClassName|null[0] modality:FINAL visibility:public superTypes:[<unbound IrClassPublicSymbolImpl>]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:test.ClassName
CONSTRUCTOR signature:test/ClassName.<init>|<init>(){}[0] visibility:public <> () returnType:test.ClassName [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'UNBOUND IrConstructorPublicSymbolImpl'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:ClassName signature:test/ClassName|null[0] modality:FINAL visibility:public superTypes:[<unbound IrClassPublicSymbolImpl>]'
TYPEALIAS name:PublicTypeAlias signature:test/PublicTypeAlias|null[0] visibility:public expandedType:test.ClassName
TYPEALIAS name:InternalTypeAlias signature:test/InternalTypeAlias|null[0] visibility:internal expandedType:test.ClassName
TYPEALIAS name:PrivateTypeAlias signature:[ File 'typealias.kt' <- test/PrivateTypeAlias|null[0] ] visibility:private expandedType:test.ClassName