Skip to content

Commit 566f54f

Browse files
authored
Merge pull request #15 from Kotlin/bnorm/k22
Update template to Kotlin 2.2.0
2 parents 5912b6e + eb79c0f commit 566f54f

File tree

6 files changed

+48
-49
lines changed

6 files changed

+48
-49
lines changed

build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
2-
kotlin("multiplatform") version "2.1.20" apply false
3-
kotlin("jvm") version "2.1.20" apply false
2+
kotlin("multiplatform") version "2.2.0" apply false
3+
kotlin("jvm") version "2.2.0" apply false
44
id("com.github.gmazzo.buildconfig") version "5.6.5"
55
id("org.jetbrains.kotlinx.binary-compatibility-validator") version "0.16.3" apply false
66
}

compiler-plugin/src/org/jetbrains/kotlin/compiler/plugin/template/ir/AbstractTransformerForGenerator.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ import org.jetbrains.kotlin.ir.expressions.impl.IrInstanceInitializerCallImpl
1616
import org.jetbrains.kotlin.ir.expressions.impl.IrReturnImpl
1717
import org.jetbrains.kotlin.ir.types.IrSimpleType
1818
import org.jetbrains.kotlin.ir.util.primaryConstructor
19-
import org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid
19+
import org.jetbrains.kotlin.ir.visitors.IrVisitorVoid
2020
import org.jetbrains.kotlin.ir.visitors.acceptChildrenVoid
2121

22-
abstract class AbstractTransformerForGenerator(protected val context: IrPluginContext) : IrElementVisitorVoid {
22+
abstract class AbstractTransformerForGenerator(protected val context: IrPluginContext) : IrVisitorVoid() {
2323
protected val irFactory = context.irFactory
2424
protected val irBuiltIns = context.irBuiltIns
2525

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
FILE fqName:<root> fileName:/anotherBoxTest.kt
2-
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String
2+
FUN name:box visibility:public modality:FINAL returnType:kotlin.String
33
BLOCK_BODY
44
VAR name:list type:kotlin.collections.List<kotlin.String> [val]
55
CALL 'public final fun listOf <T> (vararg elements: T of kotlin.collections.listOf): kotlin.collections.List<T of kotlin.collections.listOf> declared in kotlin.collections' type=kotlin.collections.List<kotlin.String> origin=null
6-
<T>: kotlin.String
7-
elements: VARARG type=kotlin.Array<out kotlin.String> varargElementType=kotlin.String
6+
TYPE_ARG T: kotlin.String
7+
ARG elements: VARARG type=kotlin.Array<out kotlin.String> varargElementType=kotlin.String
88
CONST String type=kotlin.String value="aaa"
99
CONST String type=kotlin.String value="bb"
1010
CONST String type=kotlin.String value="c"
1111
VAR name:result type:kotlin.Int [val]
12-
CALL 'public final fun sum (): kotlin.Int declared in kotlin.collections' type=kotlin.Int origin=null
13-
$receiver: CALL 'public final fun map <T, R> (transform: kotlin.Function1<T of kotlin.collections.map, R of kotlin.collections.map>): kotlin.collections.List<R of kotlin.collections.map> declared in kotlin.collections' type=kotlin.collections.List<kotlin.Int> origin=null
14-
<T>: kotlin.String
15-
<R>: kotlin.Int
16-
$receiver: GET_VAR 'val list: kotlin.collections.List<kotlin.String> declared in <root>.box' type=kotlin.collections.List<kotlin.String> origin=null
17-
transform: FUN_EXPR type=kotlin.Function1<kotlin.String, kotlin.Int> origin=LAMBDA
18-
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (it:kotlin.String) returnType:kotlin.Int
19-
VALUE_PARAMETER name:it index:0 type:kotlin.String
12+
CALL 'public final fun sum (<this>: kotlin.collections.Iterable<kotlin.Int>): kotlin.Int declared in kotlin.collections' type=kotlin.Int origin=null
13+
ARG <this>: CALL 'public final fun map <T, R> (<this>: kotlin.collections.Iterable<T of kotlin.collections.map>, transform: kotlin.Function1<T of kotlin.collections.map, R of kotlin.collections.map>): kotlin.collections.List<R of kotlin.collections.map> declared in kotlin.collections' type=kotlin.collections.List<kotlin.Int> origin=null
14+
TYPE_ARG T: kotlin.String
15+
TYPE_ARG R: kotlin.Int
16+
ARG <this>: GET_VAR 'val list: kotlin.collections.List<kotlin.String> declared in <root>.box' type=kotlin.collections.List<kotlin.String> origin=null
17+
ARG transform: FUN_EXPR type=kotlin.Function1<kotlin.String, kotlin.Int> origin=LAMBDA
18+
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL returnType:kotlin.Int
19+
VALUE_PARAMETER kind:Regular name:it index:0 type:kotlin.String
2020
BLOCK_BODY
2121
RETURN type=kotlin.Nothing from='local final fun <anonymous> (it: kotlin.String): kotlin.Int declared in <root>.box'
2222
CALL 'public open fun <get-length> (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=GET_PROPERTY
23-
$this: GET_VAR 'it: kotlin.String declared in <root>.box.<anonymous>' type=kotlin.String origin=null
23+
ARG <this>: GET_VAR 'it: kotlin.String declared in <root>.box.<anonymous>' type=kotlin.String origin=null
2424
RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
2525
WHEN type=kotlin.String origin=IF
2626
BRANCH
2727
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
28-
arg0: GET_VAR 'val result: kotlin.Int declared in <root>.box' type=kotlin.Int origin=null
29-
arg1: CONST Int type=kotlin.Int value=6
28+
ARG arg0: GET_VAR 'val result: kotlin.Int declared in <root>.box' type=kotlin.Int origin=null
29+
ARG arg1: CONST Int type=kotlin.Int value=6
3030
then: CONST String type=kotlin.String value="OK"
3131
BRANCH
3232
if: CONST Boolean type=kotlin.Boolean value=true
@@ -35,26 +35,26 @@ FILE fqName:<root> fileName:/anotherBoxTest.kt
3535
GET_VAR 'val result: kotlin.Int declared in <root>.box' type=kotlin.Int origin=null
3636
FILE fqName:foo.bar fileName:__GENERATED DECLARATIONS__.kt
3737
CLASS GENERATED[org.jetbrains.kotlin.compiler.plugin.template.fir.SimpleClassGenerator.Key] CLASS name:MyClass modality:FINAL visibility:public superTypes:[kotlin.Any]
38-
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:foo.bar.MyClass
39-
CONSTRUCTOR GENERATED[org.jetbrains.kotlin.compiler.plugin.template.fir.SimpleClassGenerator.Key] visibility:public <> () returnType:foo.bar.MyClass
38+
thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name:<this> type:foo.bar.MyClass
39+
CONSTRUCTOR GENERATED[org.jetbrains.kotlin.compiler.plugin.template.fir.SimpleClassGenerator.Key] visibility:public returnType:foo.bar.MyClass
4040
BLOCK_BODY
4141
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
4242
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS GENERATED[org.jetbrains.kotlin.compiler.plugin.template.fir.SimpleClassGenerator.Key] CLASS name:MyClass modality:FINAL visibility:public superTypes:[kotlin.Any]' type=foo.bar.MyClass
43-
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
43+
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator]
44+
VALUE_PARAMETER kind:DispatchReceiver name:<this> index:0 type:kotlin.Any
45+
VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any?
4446
overridden:
4547
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
46-
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
47-
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
48-
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
48+
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override]
49+
VALUE_PARAMETER kind:DispatchReceiver name:<this> index:0 type:kotlin.Any
4950
overridden:
5051
public open fun hashCode (): kotlin.Int declared in kotlin.Any
51-
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
52-
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
52+
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override]
53+
VALUE_PARAMETER kind:DispatchReceiver name:<this> index:0 type:kotlin.Any
5354
overridden:
5455
public open fun toString (): kotlin.String declared in kotlin.Any
55-
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
56-
FUN GENERATED[org.jetbrains.kotlin.compiler.plugin.template.fir.SimpleClassGenerator.Key] name:foo visibility:public modality:FINAL <> ($this:foo.bar.MyClass) returnType:kotlin.String
57-
$this: VALUE_PARAMETER name:<this> type:foo.bar.MyClass
56+
FUN GENERATED[org.jetbrains.kotlin.compiler.plugin.template.fir.SimpleClassGenerator.Key] name:foo visibility:public modality:FINAL returnType:kotlin.String
57+
VALUE_PARAMETER kind:DispatchReceiver name:<this> index:0 type:foo.bar.MyClass
5858
BLOCK_BODY
5959
RETURN type=kotlin.Nothing from='public final fun foo (): kotlin.String declared in foo.bar.MyClass'
6060
CONST String type=kotlin.String value="Hello world"
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
FILE fqName:foo.bar fileName:/simple.kt
2-
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String
2+
FUN name:box visibility:public modality:FINAL returnType:kotlin.String
33
BLOCK_BODY
44
VAR name:result type:kotlin.String [val]
55
CALL 'public final fun foo (): kotlin.String declared in foo.bar.MyClass' type=kotlin.String origin=null
6-
$this: CONSTRUCTOR_CALL 'public constructor <init> () declared in foo.bar.MyClass' type=foo.bar.MyClass origin=null
6+
ARG <this>: CONSTRUCTOR_CALL 'public constructor <init> () declared in foo.bar.MyClass' type=foo.bar.MyClass origin=null
77
RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in foo.bar'
88
WHEN type=kotlin.String origin=IF
99
BRANCH
1010
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
11-
arg0: GET_VAR 'val result: kotlin.String declared in foo.bar.box' type=kotlin.String origin=null
12-
arg1: CONST String type=kotlin.String value="Hello world"
11+
ARG arg0: GET_VAR 'val result: kotlin.String declared in foo.bar.box' type=kotlin.String origin=null
12+
ARG arg1: CONST String type=kotlin.String value="Hello world"
1313
then: BLOCK type=kotlin.String origin=null
1414
CONST String type=kotlin.String value="OK"
1515
BRANCH
@@ -20,26 +20,26 @@ FILE fqName:foo.bar fileName:/simple.kt
2020
GET_VAR 'val result: kotlin.String declared in foo.bar.box' type=kotlin.String origin=null
2121
FILE fqName:foo.bar fileName:__GENERATED DECLARATIONS__.kt
2222
CLASS GENERATED[org.jetbrains.kotlin.compiler.plugin.template.fir.SimpleClassGenerator.Key] CLASS name:MyClass modality:FINAL visibility:public superTypes:[kotlin.Any]
23-
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:foo.bar.MyClass
24-
CONSTRUCTOR GENERATED[org.jetbrains.kotlin.compiler.plugin.template.fir.SimpleClassGenerator.Key] visibility:public <> () returnType:foo.bar.MyClass
23+
thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name:<this> type:foo.bar.MyClass
24+
CONSTRUCTOR GENERATED[org.jetbrains.kotlin.compiler.plugin.template.fir.SimpleClassGenerator.Key] visibility:public returnType:foo.bar.MyClass
2525
BLOCK_BODY
2626
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
2727
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS GENERATED[org.jetbrains.kotlin.compiler.plugin.template.fir.SimpleClassGenerator.Key] CLASS name:MyClass modality:FINAL visibility:public superTypes:[kotlin.Any]' type=foo.bar.MyClass
28-
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
28+
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator]
29+
VALUE_PARAMETER kind:DispatchReceiver name:<this> index:0 type:kotlin.Any
30+
VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any?
2931
overridden:
3032
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
31-
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
32-
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
33-
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
33+
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override]
34+
VALUE_PARAMETER kind:DispatchReceiver name:<this> index:0 type:kotlin.Any
3435
overridden:
3536
public open fun hashCode (): kotlin.Int declared in kotlin.Any
36-
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
37-
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
37+
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override]
38+
VALUE_PARAMETER kind:DispatchReceiver name:<this> index:0 type:kotlin.Any
3839
overridden:
3940
public open fun toString (): kotlin.String declared in kotlin.Any
40-
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
41-
FUN GENERATED[org.jetbrains.kotlin.compiler.plugin.template.fir.SimpleClassGenerator.Key] name:foo visibility:public modality:FINAL <> ($this:foo.bar.MyClass) returnType:kotlin.String
42-
$this: VALUE_PARAMETER name:<this> type:foo.bar.MyClass
41+
FUN GENERATED[org.jetbrains.kotlin.compiler.plugin.template.fir.SimpleClassGenerator.Key] name:foo visibility:public modality:FINAL returnType:kotlin.String
42+
VALUE_PARAMETER kind:DispatchReceiver name:<this> index:0 type:foo.bar.MyClass
4343
BLOCK_BODY
4444
RETURN type=kotlin.Nothing from='public final fun foo (): kotlin.String declared in foo.bar.MyClass'
4545
CONST String type=kotlin.String value="Hello world"

kotlin-js-store/wasm/yarn.lock

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2+
# yarn lockfile v1
3+
4+

kotlin-js-store/yarn.lock

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -456,11 +456,6 @@ to-regex-range@^5.0.1:
456456
dependencies:
457457
is-number "^7.0.0"
458458

459-
typescript@5.5.4:
460-
version "5.5.4"
461-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.4.tgz#d9852d6c82bad2d2eda4fd74a5762a8f5909e9ba"
462-
integrity sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==
463-
464459
workerpool@^6.5.1:
465460
version "6.5.1"
466461
resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.5.1.tgz#060f73b39d0caf97c6db64da004cd01b4c099544"

0 commit comments

Comments
 (0)