diff --git a/build.gradle.kts b/build.gradle.kts index 1201017..5a70f14 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,6 +1,6 @@ plugins { - kotlin("multiplatform") version "2.1.20" apply false - kotlin("jvm") version "2.1.20" apply false + kotlin("multiplatform") version "2.2.0" apply false + kotlin("jvm") version "2.2.0" apply false id("com.github.gmazzo.buildconfig") version "5.6.5" id("org.jetbrains.kotlinx.binary-compatibility-validator") version "0.16.3" apply false } diff --git a/compiler-plugin/src/org/jetbrains/kotlin/compiler/plugin/template/ir/AbstractTransformerForGenerator.kt b/compiler-plugin/src/org/jetbrains/kotlin/compiler/plugin/template/ir/AbstractTransformerForGenerator.kt index 626fda9..9879c5b 100644 --- a/compiler-plugin/src/org/jetbrains/kotlin/compiler/plugin/template/ir/AbstractTransformerForGenerator.kt +++ b/compiler-plugin/src/org/jetbrains/kotlin/compiler/plugin/template/ir/AbstractTransformerForGenerator.kt @@ -16,10 +16,10 @@ import org.jetbrains.kotlin.ir.expressions.impl.IrInstanceInitializerCallImpl import org.jetbrains.kotlin.ir.expressions.impl.IrReturnImpl import org.jetbrains.kotlin.ir.types.IrSimpleType import org.jetbrains.kotlin.ir.util.primaryConstructor -import org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid +import org.jetbrains.kotlin.ir.visitors.IrVisitorVoid import org.jetbrains.kotlin.ir.visitors.acceptChildrenVoid -abstract class AbstractTransformerForGenerator(protected val context: IrPluginContext) : IrElementVisitorVoid { +abstract class AbstractTransformerForGenerator(protected val context: IrPluginContext) : IrVisitorVoid() { protected val irFactory = context.irFactory protected val irBuiltIns = context.irBuiltIns diff --git a/compiler-plugin/testData/box/anotherBoxTest.fir.ir.txt b/compiler-plugin/testData/box/anotherBoxTest.fir.ir.txt index 9b17602..e263b96 100644 --- a/compiler-plugin/testData/box/anotherBoxTest.fir.ir.txt +++ b/compiler-plugin/testData/box/anotherBoxTest.fir.ir.txt @@ -1,32 +1,32 @@ FILE fqName: fileName:/anotherBoxTest.kt - FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String + FUN name:box visibility:public modality:FINAL returnType:kotlin.String BLOCK_BODY VAR name:list type:kotlin.collections.List [val] CALL 'public final fun listOf (vararg elements: T of kotlin.collections.listOf): kotlin.collections.List declared in kotlin.collections' type=kotlin.collections.List origin=null - : kotlin.String - elements: VARARG type=kotlin.Array varargElementType=kotlin.String + TYPE_ARG T: kotlin.String + ARG elements: VARARG type=kotlin.Array varargElementType=kotlin.String CONST String type=kotlin.String value="aaa" CONST String type=kotlin.String value="bb" CONST String type=kotlin.String value="c" VAR name:result type:kotlin.Int [val] - CALL 'public final fun sum (): kotlin.Int declared in kotlin.collections' type=kotlin.Int origin=null - $receiver: CALL 'public final fun map (transform: kotlin.Function1): kotlin.collections.List declared in kotlin.collections' type=kotlin.collections.List origin=null - : kotlin.String - : kotlin.Int - $receiver: GET_VAR 'val list: kotlin.collections.List declared in .box' type=kotlin.collections.List origin=null - transform: FUN_EXPR type=kotlin.Function1 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:kotlin.String) returnType:kotlin.Int - VALUE_PARAMETER name:it index:0 type:kotlin.String + CALL 'public final fun sum (: kotlin.collections.Iterable): kotlin.Int declared in kotlin.collections' type=kotlin.Int origin=null + ARG : CALL 'public final fun map (: kotlin.collections.Iterable, transform: kotlin.Function1): kotlin.collections.List declared in kotlin.collections' type=kotlin.collections.List origin=null + TYPE_ARG T: kotlin.String + TYPE_ARG R: kotlin.Int + ARG : GET_VAR 'val list: kotlin.collections.List declared in .box' type=kotlin.collections.List origin=null + ARG transform: FUN_EXPR type=kotlin.Function1 origin=LAMBDA + FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL returnType:kotlin.Int + VALUE_PARAMETER kind:Regular name:it index:0 type:kotlin.String BLOCK_BODY RETURN type=kotlin.Nothing from='local final fun (it: kotlin.String): kotlin.Int declared in .box' CALL 'public open fun (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=GET_PROPERTY - $this: GET_VAR 'it: kotlin.String declared in .box.' type=kotlin.String origin=null + ARG : GET_VAR 'it: kotlin.String declared in .box.' type=kotlin.String origin=null RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' WHEN type=kotlin.String origin=IF BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val result: kotlin.Int declared in .box' type=kotlin.Int origin=null - arg1: CONST Int type=kotlin.Int value=6 + ARG arg0: GET_VAR 'val result: kotlin.Int declared in .box' type=kotlin.Int origin=null + ARG arg1: CONST Int type=kotlin.Int value=6 then: CONST String type=kotlin.String value="OK" BRANCH if: CONST Boolean type=kotlin.Boolean value=true @@ -35,26 +35,26 @@ FILE fqName: fileName:/anotherBoxTest.kt GET_VAR 'val result: kotlin.Int declared in .box' type=kotlin.Int origin=null FILE fqName:foo.bar fileName:__GENERATED DECLARATIONS__.kt CLASS GENERATED[org.jetbrains.kotlin.compiler.plugin.template.fir.SimpleClassGenerator.Key] CLASS name:MyClass modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:foo.bar.MyClass - CONSTRUCTOR GENERATED[org.jetbrains.kotlin.compiler.plugin.template.fir.SimpleClassGenerator.Key] visibility:public <> () returnType:foo.bar.MyClass + thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:foo.bar.MyClass + CONSTRUCTOR GENERATED[org.jetbrains.kotlin.compiler.plugin.template.fir.SimpleClassGenerator.Key] visibility:public returnType:foo.bar.MyClass BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' 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 - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any overridden: public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any overridden: public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN GENERATED[org.jetbrains.kotlin.compiler.plugin.template.fir.SimpleClassGenerator.Key] name:foo visibility:public modality:FINAL <> ($this:foo.bar.MyClass) returnType:kotlin.String - $this: VALUE_PARAMETER name: type:foo.bar.MyClass + FUN GENERATED[org.jetbrains.kotlin.compiler.plugin.template.fir.SimpleClassGenerator.Key] name:foo visibility:public modality:FINAL returnType:kotlin.String + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.MyClass BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun foo (): kotlin.String declared in foo.bar.MyClass' CONST String type=kotlin.String value="Hello world" diff --git a/compiler-plugin/testData/box/simple.fir.ir.txt b/compiler-plugin/testData/box/simple.fir.ir.txt index 43a098e..14640c9 100644 --- a/compiler-plugin/testData/box/simple.fir.ir.txt +++ b/compiler-plugin/testData/box/simple.fir.ir.txt @@ -1,15 +1,15 @@ FILE fqName:foo.bar fileName:/simple.kt - FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String + FUN name:box visibility:public modality:FINAL returnType:kotlin.String BLOCK_BODY VAR name:result type:kotlin.String [val] CALL 'public final fun foo (): kotlin.String declared in foo.bar.MyClass' type=kotlin.String origin=null - $this: CONSTRUCTOR_CALL 'public constructor () declared in foo.bar.MyClass' type=foo.bar.MyClass origin=null + ARG : CONSTRUCTOR_CALL 'public constructor () declared in foo.bar.MyClass' type=foo.bar.MyClass origin=null RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in foo.bar' WHEN type=kotlin.String origin=IF BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val result: kotlin.String declared in foo.bar.box' type=kotlin.String origin=null - arg1: CONST String type=kotlin.String value="Hello world" + ARG arg0: GET_VAR 'val result: kotlin.String declared in foo.bar.box' type=kotlin.String origin=null + ARG arg1: CONST String type=kotlin.String value="Hello world" then: BLOCK type=kotlin.String origin=null CONST String type=kotlin.String value="OK" BRANCH @@ -20,26 +20,26 @@ FILE fqName:foo.bar fileName:/simple.kt GET_VAR 'val result: kotlin.String declared in foo.bar.box' type=kotlin.String origin=null FILE fqName:foo.bar fileName:__GENERATED DECLARATIONS__.kt CLASS GENERATED[org.jetbrains.kotlin.compiler.plugin.template.fir.SimpleClassGenerator.Key] CLASS name:MyClass modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:foo.bar.MyClass - CONSTRUCTOR GENERATED[org.jetbrains.kotlin.compiler.plugin.template.fir.SimpleClassGenerator.Key] visibility:public <> () returnType:foo.bar.MyClass + thisReceiver: VALUE_PARAMETER INSTANCE_RECEIVER kind:DispatchReceiver name: type:foo.bar.MyClass + CONSTRUCTOR GENERATED[org.jetbrains.kotlin.compiler.plugin.template.fir.SimpleClassGenerator.Key] visibility:public returnType:foo.bar.MyClass BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' 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 - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] + FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN returnType:kotlin.Boolean [fake_override,operator] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any + VALUE_PARAMETER kind:Regular name:other index:1 type:kotlin.Any? overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] + FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN returnType:kotlin.Int [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any overridden: public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] + FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN returnType:kotlin.String [fake_override] + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:kotlin.Any overridden: public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN GENERATED[org.jetbrains.kotlin.compiler.plugin.template.fir.SimpleClassGenerator.Key] name:foo visibility:public modality:FINAL <> ($this:foo.bar.MyClass) returnType:kotlin.String - $this: VALUE_PARAMETER name: type:foo.bar.MyClass + FUN GENERATED[org.jetbrains.kotlin.compiler.plugin.template.fir.SimpleClassGenerator.Key] name:foo visibility:public modality:FINAL returnType:kotlin.String + VALUE_PARAMETER kind:DispatchReceiver name: index:0 type:foo.bar.MyClass BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun foo (): kotlin.String declared in foo.bar.MyClass' CONST String type=kotlin.String value="Hello world" diff --git a/kotlin-js-store/wasm/yarn.lock b/kotlin-js-store/wasm/yarn.lock new file mode 100644 index 0000000..fb57ccd --- /dev/null +++ b/kotlin-js-store/wasm/yarn.lock @@ -0,0 +1,4 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + diff --git a/kotlin-js-store/yarn.lock b/kotlin-js-store/yarn.lock index f4373ae..55f9afb 100644 --- a/kotlin-js-store/yarn.lock +++ b/kotlin-js-store/yarn.lock @@ -456,11 +456,6 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" -typescript@5.5.4: - version "5.5.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.4.tgz#d9852d6c82bad2d2eda4fd74a5762a8f5909e9ba" - integrity sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q== - workerpool@^6.5.1: version "6.5.1" resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.5.1.tgz#060f73b39d0caf97c6db64da004cd01b4c099544"