All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jetbrains.kotlin.ir.backend.js.JsMapping.kt Maven / Gradle / Ivy

There is a newer version: 2.1.0-RC
Show newest version
/*
 * 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>()

    // Check if we need concurrency here
    val chunkToOriginalFile = WeakHashMap()

    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()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy