[Wasm] Add compiler.common.wasm module
This module is introduced to mirror K/JS code layout Add WasmStandardClassIds to use in checkers
This commit is contained in:
committed by
Space Team
parent
96a2da4906
commit
1ddcdb95bd
@@ -216,6 +216,7 @@
|
||||
/core/compiler.common.jvm/ "Kotlin Compiler Core"
|
||||
/core/compiler.common.js/ "Kotlin Compiler Core"
|
||||
/core/compiler.common.native/ "Kotlin Compiler Core"
|
||||
/core/compiler.common.wasm/ "Kotlin Compiler Core"
|
||||
/core/descriptors/ "Kotlin Compiler Core"
|
||||
/core/descriptors.jvm/ "Kotlin Compiler Core"
|
||||
/core/descriptors.runtime/ "Kotlin Libraries"
|
||||
|
||||
@@ -133,6 +133,7 @@ val commonCompilerModules = arrayOf(
|
||||
":core:compiler.common.jvm",
|
||||
":core:compiler.common.js",
|
||||
":core:compiler.common.native",
|
||||
":core:compiler.common.wasm",
|
||||
":core:util.runtime",
|
||||
":compiler:frontend.common.jvm",
|
||||
":compiler:frontend.java", // TODO this is fe10 module but some utils used in fir ide now
|
||||
@@ -243,6 +244,7 @@ extra["kotlinJpsPluginEmbeddedDependencies"] = listOf(
|
||||
":core:compiler.common.jvm",
|
||||
":core:compiler.common.js",
|
||||
":core:compiler.common.native",
|
||||
":core:compiler.common.wasm",
|
||||
":core:descriptors",
|
||||
":core:descriptors.jvm",
|
||||
":compiler:backend.common.jvm",
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
id("jps-compatible")
|
||||
}
|
||||
|
||||
project.configureJvmToolchain(JdkMajorVersion.JDK_1_8)
|
||||
|
||||
dependencies {
|
||||
api(project(":core:compiler.common"))
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* 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.name
|
||||
|
||||
import org.jetbrains.kotlin.name.StandardClassIds.BASE_KOTLIN_PACKAGE
|
||||
|
||||
object WasmStandardClassIds {
|
||||
val BASE_JS_PACKAGE = BASE_KOTLIN_PACKAGE.child(Name.identifier("js"))
|
||||
|
||||
object Annotations {
|
||||
@JvmField
|
||||
val JsQualifier = "JsQualifier".jsId()
|
||||
|
||||
@JvmField
|
||||
val JsModule = "JsModule".jsId()
|
||||
|
||||
@JvmField
|
||||
val JsName = "JsName".jsId()
|
||||
|
||||
@JvmField
|
||||
val JsExport = "JsExport".jsId()
|
||||
}
|
||||
|
||||
object Callables {
|
||||
@JvmField
|
||||
val JsDefinedExternally = "definedExternally".callableId(BASE_JS_PACKAGE)
|
||||
}
|
||||
}
|
||||
|
||||
private fun String.jsId() = ClassId(WasmStandardClassIds.BASE_JS_PACKAGE, Name.identifier(this))
|
||||
|
||||
private fun String.callableId(packageName: FqName) = CallableId(packageName, Name.identifier(this))
|
||||
@@ -113,6 +113,7 @@ include ":benchmarks",
|
||||
":core:compiler.common.jvm",
|
||||
":core:compiler.common.js",
|
||||
":core:compiler.common.native",
|
||||
":core:compiler.common.wasm",
|
||||
":compiler:backend.common.jvm",
|
||||
":core:descriptors",
|
||||
":core:descriptors.jvm",
|
||||
|
||||
Reference in New Issue
Block a user