org.jetbrains.kotlin.ir.backend.js.JsMapping.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kotlin-compiler-embeddable Show documentation
Show all versions of kotlin-compiler-embeddable Show documentation
the Kotlin compiler embeddable
/*
* Copyright 2010-2022 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.ir.backend.js
import org.jetbrains.kotlin.backend.common.DefaultDelegateFactory
import org.jetbrains.kotlin.backend.common.DefaultMapping
import org.jetbrains.kotlin.ir.backend.js.utils.MutableReference
import org.jetbrains.kotlin.ir.declarations.*
import java.util.WeakHashMap
class JsMapping : DefaultMapping() {
val classToItsDefaultConstructor = WeakHashMap()
val esClassWhichNeedBoxParameters = DefaultDelegateFactory.newDeclarationToValueMapping()
val esClassToPossibilityForOptimization = DefaultDelegateFactory.newDeclarationToValueMapping>()
// Main function wrappers
val mainFunctionToItsWrapper = DefaultDelegateFactory.newDeclarationToDeclarationMapping()
val outerThisFieldSymbols = DefaultDelegateFactory.newDeclarationToDeclarationMapping()
val innerClassConstructors = DefaultDelegateFactory.newDeclarationToDeclarationMapping()
val originalInnerClassPrimaryConstructorByClass = DefaultDelegateFactory.newDeclarationToDeclarationMapping()
val secondaryConstructorToDelegate = DefaultDelegateFactory.newDeclarationToDeclarationMapping()
val secondaryConstructorToFactory = DefaultDelegateFactory.newDeclarationToDeclarationMapping()
val objectToGetInstanceFunction = DefaultDelegateFactory.newDeclarationToDeclarationMapping()
val objectToInstanceField = DefaultDelegateFactory.newDeclarationToDeclarationMapping()
val classToSyntheticPrimaryConstructor = DefaultDelegateFactory.newDeclarationToDeclarationMapping()
val privateMemberToCorrespondingStatic = DefaultDelegateFactory.newDeclarationToDeclarationMapping()
val enumEntryToGetInstanceFun = DefaultDelegateFactory.newDeclarationToDeclarationMapping()
val enumEntryToInstanceField = DefaultDelegateFactory.newDeclarationToDeclarationMapping()
val enumConstructorToNewConstructor = DefaultDelegateFactory.newDeclarationToDeclarationMapping()
val enumClassToCorrespondingEnumEntry = DefaultDelegateFactory.newDeclarationToDeclarationMapping()
val enumConstructorOldToNewValueParameters = DefaultDelegateFactory.newDeclarationToDeclarationMapping()
val enumEntryToCorrespondingField = DefaultDelegateFactory.newDeclarationToDeclarationMapping()
val fieldToEnumEntry = DefaultDelegateFactory.newDeclarationToDeclarationMapping()
val enumClassToInitEntryInstancesFun = DefaultDelegateFactory.newDeclarationToDeclarationMapping()
val suspendArityStore = DefaultDelegateFactory.newDeclarationToDeclarationCollectionMapping>()
val objectsWithPureInitialization = DefaultDelegateFactory.newDeclarationToValueMapping()
val inlineFunctionsBeforeInlining = DefaultDelegateFactory.newDeclarationToDeclarationMapping()
// Wasm mappings
val wasmJsInteropFunctionToWrapper =
DefaultDelegateFactory.newDeclarationToDeclarationMapping()
val wasmNestedExternalToNewTopLevelFunction =
DefaultDelegateFactory.newDeclarationToDeclarationMapping()
val wasmExternalObjectToGetInstanceFunction =
DefaultDelegateFactory.newDeclarationToDeclarationMapping()
val wasmExternalClassToInstanceCheck =
DefaultDelegateFactory.newDeclarationToDeclarationMapping()
val wasmGetJsClass =
DefaultDelegateFactory.newDeclarationToDeclarationMapping()
}