[JS IR] Don't use JVM-specific mangler in JS IR backend
^KT-54638 Fixed
This commit is contained in:
committed by
Space Team
parent
185097f82e
commit
78d19e143c
@@ -5,6 +5,7 @@ plugins {
|
||||
|
||||
dependencies {
|
||||
api(project(":compiler:ir.psi2ir"))
|
||||
api(project(":compiler:fir:fir2ir"))
|
||||
api(project(":compiler:ir.serialization.common"))
|
||||
api(project(":js:js.frontend"))
|
||||
|
||||
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.fir.backend.js
|
||||
|
||||
import org.jetbrains.kotlin.backend.common.serialization.mangle.KotlinExportChecker
|
||||
import org.jetbrains.kotlin.backend.common.serialization.mangle.KotlinMangleComputer
|
||||
import org.jetbrains.kotlin.backend.common.serialization.mangle.MangleMode
|
||||
import org.jetbrains.kotlin.fir.NoMutableState
|
||||
import org.jetbrains.kotlin.fir.backend.FirBasedKotlinMangler
|
||||
import org.jetbrains.kotlin.fir.backend.FirExportCheckerVisitor
|
||||
import org.jetbrains.kotlin.fir.backend.FirMangleComputer
|
||||
import org.jetbrains.kotlin.fir.declarations.FirDeclaration
|
||||
|
||||
@NoMutableState
|
||||
class FirJsKotlinMangler : FirBasedKotlinMangler() {
|
||||
|
||||
private class JsFirExportChecker : FirExportCheckerVisitor() {
|
||||
override fun FirDeclaration.isPlatformSpecificExported() = false
|
||||
}
|
||||
|
||||
override fun getExportChecker(compatibleMode: Boolean): KotlinExportChecker<FirDeclaration> {
|
||||
return JsFirExportChecker()
|
||||
}
|
||||
|
||||
override fun getMangleComputer(mode: MangleMode, compatibleMode: Boolean): KotlinMangleComputer<FirDeclaration> {
|
||||
return FirMangleComputer(StringBuilder(256), mode)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user