[IR BE] Drop unused context member
This commit is contained in:
@@ -21,10 +21,7 @@ import org.jetbrains.kotlin.backend.common.ir.SharedVariablesManager
|
|||||||
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
|
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
|
||||||
import org.jetbrains.kotlin.ir.declarations.IrClass
|
import org.jetbrains.kotlin.ir.declarations.IrClass
|
||||||
import org.jetbrains.kotlin.ir.declarations.IrFactory
|
import org.jetbrains.kotlin.ir.declarations.IrFactory
|
||||||
import org.jetbrains.kotlin.ir.declarations.IrField
|
|
||||||
import org.jetbrains.kotlin.ir.descriptors.IrBuiltIns
|
import org.jetbrains.kotlin.ir.descriptors.IrBuiltIns
|
||||||
import org.jetbrains.kotlin.ir.symbols.IrFunctionSymbol
|
|
||||||
import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol
|
|
||||||
import org.jetbrains.kotlin.name.FqName
|
import org.jetbrains.kotlin.name.FqName
|
||||||
|
|
||||||
interface BackendContext {
|
interface BackendContext {
|
||||||
@@ -33,8 +30,6 @@ interface BackendContext {
|
|||||||
val irBuiltIns: IrBuiltIns
|
val irBuiltIns: IrBuiltIns
|
||||||
val sharedVariablesManager: SharedVariablesManager
|
val sharedVariablesManager: SharedVariablesManager
|
||||||
val internalPackageFqn: FqName
|
val internalPackageFqn: FqName
|
||||||
val transformedFunction: MutableMap<IrFunctionSymbol, IrSimpleFunctionSymbol>
|
|
||||||
val lateinitNullableFields: MutableMap<IrField, IrField>
|
|
||||||
val extractedLocalClasses: MutableSet<IrClass>
|
val extractedLocalClasses: MutableSet<IrClass>
|
||||||
val irFactory: IrFactory
|
val irFactory: IrFactory
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,12 +45,6 @@ class JsIrBackendContext(
|
|||||||
override val scriptMode: Boolean = false,
|
override val scriptMode: Boolean = false,
|
||||||
override val es6mode: Boolean = false
|
override val es6mode: Boolean = false
|
||||||
) : JsCommonBackendContext {
|
) : JsCommonBackendContext {
|
||||||
override val transformedFunction
|
|
||||||
get() = error("Use Mapping.inlineClassMemberToStatic instead")
|
|
||||||
|
|
||||||
override val lateinitNullableFields
|
|
||||||
get() = error("Use Mapping.lateInitFieldToNullableField instead")
|
|
||||||
|
|
||||||
override val extractedLocalClasses: MutableSet<IrClass> = hashSetOf()
|
override val extractedLocalClasses: MutableSet<IrClass> = hashSetOf()
|
||||||
|
|
||||||
override val builtIns = module.builtIns
|
override val builtIns = module.builtIns
|
||||||
|
|||||||
@@ -59,15 +59,11 @@ class JvmBackendContext(
|
|||||||
val classNameOverride: MutableMap<IrClass, JvmClassName>
|
val classNameOverride: MutableMap<IrClass, JvmClassName>
|
||||||
get() = generatorExtensions.classNameOverride
|
get() = generatorExtensions.classNameOverride
|
||||||
|
|
||||||
override val transformedFunction: MutableMap<IrFunctionSymbol, IrSimpleFunctionSymbol>
|
|
||||||
get() = TODO("not implemented")
|
|
||||||
|
|
||||||
override val extractedLocalClasses: MutableSet<IrClass> = hashSetOf()
|
override val extractedLocalClasses: MutableSet<IrClass> = hashSetOf()
|
||||||
|
|
||||||
override val irFactory: IrFactory = IrFactoryImpl
|
override val irFactory: IrFactory = IrFactoryImpl
|
||||||
|
|
||||||
override val scriptMode: Boolean = false
|
override val scriptMode: Boolean = false
|
||||||
override val lateinitNullableFields = mutableMapOf<IrField, IrField>()
|
|
||||||
|
|
||||||
override val builtIns = state.module.builtIns
|
override val builtIns = state.module.builtIns
|
||||||
val typeMapper = IrTypeMapper(this)
|
val typeMapper = IrTypeMapper(this)
|
||||||
|
|||||||
+1
-10
@@ -12,28 +12,21 @@ import org.jetbrains.kotlin.backend.wasm.lower.WasmSharedVariablesManager
|
|||||||
import org.jetbrains.kotlin.backend.wasm.utils.WasmInlineClassesUtils
|
import org.jetbrains.kotlin.backend.wasm.utils.WasmInlineClassesUtils
|
||||||
import org.jetbrains.kotlin.config.CompilerConfiguration
|
import org.jetbrains.kotlin.config.CompilerConfiguration
|
||||||
import org.jetbrains.kotlin.descriptors.ModuleDescriptor
|
import org.jetbrains.kotlin.descriptors.ModuleDescriptor
|
||||||
import org.jetbrains.kotlin.descriptors.PackageFragmentDescriptor
|
|
||||||
import org.jetbrains.kotlin.descriptors.impl.EmptyPackageFragmentDescriptor
|
import org.jetbrains.kotlin.descriptors.impl.EmptyPackageFragmentDescriptor
|
||||||
import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI
|
|
||||||
import org.jetbrains.kotlin.ir.IrElement
|
import org.jetbrains.kotlin.ir.IrElement
|
||||||
import org.jetbrains.kotlin.ir.SourceManager
|
import org.jetbrains.kotlin.ir.SourceManager
|
||||||
import org.jetbrains.kotlin.ir.SourceRangeInfo
|
import org.jetbrains.kotlin.ir.SourceRangeInfo
|
||||||
import org.jetbrains.kotlin.ir.UNDEFINED_OFFSET
|
import org.jetbrains.kotlin.ir.UNDEFINED_OFFSET
|
||||||
import org.jetbrains.kotlin.ir.backend.js.JsCommonBackendContext
|
import org.jetbrains.kotlin.ir.backend.js.JsCommonBackendContext
|
||||||
import org.jetbrains.kotlin.ir.backend.js.JsMapping
|
import org.jetbrains.kotlin.ir.backend.js.JsMapping
|
||||||
import org.jetbrains.kotlin.ir.backend.js.JsSharedVariablesManager
|
|
||||||
import org.jetbrains.kotlin.ir.backend.js.lower.JsInnerClassesSupport
|
import org.jetbrains.kotlin.ir.backend.js.lower.JsInnerClassesSupport
|
||||||
import org.jetbrains.kotlin.ir.builders.declarations.addFunction
|
|
||||||
import org.jetbrains.kotlin.ir.builders.declarations.buildFun
|
import org.jetbrains.kotlin.ir.builders.declarations.buildFun
|
||||||
import org.jetbrains.kotlin.ir.declarations.*
|
import org.jetbrains.kotlin.ir.declarations.*
|
||||||
import org.jetbrains.kotlin.ir.declarations.impl.IrExternalPackageFragmentImpl
|
import org.jetbrains.kotlin.ir.declarations.impl.IrExternalPackageFragmentImpl
|
||||||
import org.jetbrains.kotlin.ir.declarations.persistent.PersistentIrFactory
|
|
||||||
import org.jetbrains.kotlin.ir.declarations.impl.IrFileImpl
|
import org.jetbrains.kotlin.ir.declarations.impl.IrFileImpl
|
||||||
|
import org.jetbrains.kotlin.ir.declarations.persistent.PersistentIrFactory
|
||||||
import org.jetbrains.kotlin.ir.descriptors.IrBuiltIns
|
import org.jetbrains.kotlin.ir.descriptors.IrBuiltIns
|
||||||
import org.jetbrains.kotlin.ir.symbols.IrFunctionSymbol
|
|
||||||
import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol
|
|
||||||
import org.jetbrains.kotlin.ir.symbols.impl.DescriptorlessExternalPackageFragmentSymbol
|
import org.jetbrains.kotlin.ir.symbols.impl.DescriptorlessExternalPackageFragmentSymbol
|
||||||
import org.jetbrains.kotlin.ir.util.IdSignature
|
|
||||||
import org.jetbrains.kotlin.ir.util.SymbolTable
|
import org.jetbrains.kotlin.ir.util.SymbolTable
|
||||||
import org.jetbrains.kotlin.name.FqName
|
import org.jetbrains.kotlin.name.FqName
|
||||||
import org.jetbrains.kotlin.name.Name
|
import org.jetbrains.kotlin.name.Name
|
||||||
@@ -49,8 +42,6 @@ class WasmBackendContext(
|
|||||||
override val builtIns = module.builtIns
|
override val builtIns = module.builtIns
|
||||||
override var inVerbosePhase: Boolean = false
|
override var inVerbosePhase: Boolean = false
|
||||||
override val scriptMode = false
|
override val scriptMode = false
|
||||||
override val transformedFunction = mutableMapOf<IrFunctionSymbol, IrSimpleFunctionSymbol>()
|
|
||||||
override val lateinitNullableFields = mutableMapOf<IrField, IrField>()
|
|
||||||
override val extractedLocalClasses: MutableSet<IrClass> = hashSetOf()
|
override val extractedLocalClasses: MutableSet<IrClass> = hashSetOf()
|
||||||
override val irFactory: IrFactory = PersistentIrFactory
|
override val irFactory: IrFactory = PersistentIrFactory
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user