Skip to content

Commit 2999770

Browse files
Remove static states from K2JKlibCompiler
1 parent d300e79 commit 2999770

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

compiler/cli/src/org/jetbrains/kotlin/cli/jklib/JKlibMangler.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ import org.jetbrains.kotlin.types.typeUtil.replaceAnnotations
7777
* transitions to K2, code in this file should no longer be needed.
7878
*/
7979

80-
object JKlibIrMangler : IrBasedKotlinManglerImpl() {
80+
class JKlibIrMangler : IrBasedKotlinManglerImpl() {
8181
private class JKlibIrExportChecker(compatibleMode: Boolean) : IrExportCheckerVisitor(compatibleMode) {
8282
override fun IrDeclaration.isPlatformSpecificExported() = false
8383
}

compiler/cli/src/org/jetbrains/kotlin/cli/jklib/JKlibModuleSerializer.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import org.jetbrains.kotlin.backend.common.serialization.*
99
import org.jetbrains.kotlin.ir.IrDiagnosticReporter
1010
import org.jetbrains.kotlin.ir.declarations.IrFile
1111

12-
object JKlibGlobalDeclarationTable : GlobalDeclarationTable(JKlibIrMangler)
12+
class JKlibGlobalDeclarationTable : GlobalDeclarationTable(JKlibIrMangler())
1313

1414
class JKlibModuleSerializer(
1515
settings: IrSerializationSettings,
@@ -18,7 +18,7 @@ class JKlibModuleSerializer(
1818
settings, diagnosticReporter
1919
) {
2020

21-
override val globalDeclarationTable = JKlibGlobalDeclarationTable
21+
override val globalDeclarationTable = JKlibGlobalDeclarationTable()
2222

2323

2424
override fun createSerializerForFile(file: IrFile): IrFileSerializer =

compiler/cli/src/org/jetbrains/kotlin/cli/jklib/K2JKlibCompiler.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ class K2JKlibCompiler : CLICompiler<K2JKlibCompilerArguments>() {
191191
override val fakeOverrideBuilder = IrLinkerFakeOverrideProvider(
192192
linker = this,
193193
symbolTable = symbolTable,
194-
mangler = JKlibIrMangler,
194+
mangler = JKlibIrMangler(),
195195
typeSystem = IrTypeSystemContextImpl(builtIns),
196196
friendModules = emptyMap(),
197197
partialLinkageSupport = partialLinkageSupport,

0 commit comments

Comments
 (0)