Skip to content

Commit

Permalink
Module handle. Rename package
Browse files Browse the repository at this point in the history
  • Loading branch information
turansky committed Nov 23, 2024
1 parent 54c732c commit 0a5f900
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package seskar.compiler.workers.backend
package seskar.compiler.module.backend

import org.jetbrains.kotlin.backend.common.extensions.IrPluginContext
import org.jetbrains.kotlin.ir.IrStatement
Expand All @@ -9,7 +9,7 @@ import org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid
import seskar.compiler.common.backend.JsFileName
import seskar.compiler.common.backend.JsName

internal class WorkerFactoryTransformer(
internal class ModuleHandleTransformer(
private val context: IrPluginContext,
) : IrElementTransformerVoid() {
override fun visitProperty(declaration: IrProperty): IrStatement {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package seskar.compiler.workers.backend
package seskar.compiler.module.backend

import org.jetbrains.kotlin.ir.declarations.IrProperty
import org.jetbrains.kotlin.ir.types.classFqName
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package seskar.compiler.workers.extensions
package seskar.compiler.module.extensions

import org.jetbrains.kotlin.backend.common.extensions.IrGenerationExtension
import org.jetbrains.kotlin.backend.common.extensions.IrPluginContext
import org.jetbrains.kotlin.ir.declarations.IrModuleFragment
import org.jetbrains.kotlin.platform.isJs
import seskar.compiler.workers.backend.WorkerFactoryTransformer
import seskar.compiler.module.backend.ModuleHandleTransformer

internal class WorkerFactoryExtension : IrGenerationExtension {
internal class ModuleHandleExtension : IrGenerationExtension {
override fun generate(
moduleFragment: IrModuleFragment,
pluginContext: IrPluginContext,
Expand All @@ -15,6 +15,6 @@ internal class WorkerFactoryExtension : IrGenerationExtension {
?.takeIf { it.isJs() }
?: return

moduleFragment.transformChildren(WorkerFactoryTransformer(pluginContext), null)
moduleFragment.transformChildren(ModuleHandleTransformer(pluginContext), null)
}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package seskar.compiler.workers.extensions
package seskar.compiler.module.extensions

import org.jetbrains.kotlin.backend.common.extensions.IrGenerationExtension
import org.jetbrains.kotlin.config.CompilerConfiguration
import seskar.compiler.common.extensions.JsCompilerPluginRegistrar

class WorkerFactoryRegistrar : JsCompilerPluginRegistrar() {
class ModuleHandleRegistrar : JsCompilerPluginRegistrar() {
override fun ExtensionStorage.registerExtensions(
configuration: CompilerConfiguration,
) {
IrGenerationExtension.registerExtension(WorkerFactoryExtension())
IrGenerationExtension.registerExtension(ModuleHandleExtension())
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ seskar.compiler.suspend.extensions.ExternalSuspendRegistrar
seskar.compiler.typeguard.extensions.TypeGuardRegistrar
seskar.compiler.value.extensions.ValueRegistrar
seskar.compiler.value.extensions.ValueRegistrar
seskar.compiler.workers.extensions.WorkerFactoryRegistrar
seskar.compiler.module.extensions.ModuleHandleRegistrar

0 comments on commit 0a5f900

Please sign in to comment.