JVM IR: extract separate module backend.jvm.codegen
The main benefit is that now lowerings and codegen are compiled in parallel, which speeds up the build. Hopefully, this will also improve incremental compilation in case of implementation changes because the rest of the compiler (cli & tests) has no "api" dependency on lowerings and codegen.
This commit is contained in:
@@ -242,6 +242,7 @@ val fe10CompilerModules = arrayOf(
|
||||
":compiler:ir.psi2ir",
|
||||
":compiler:backend.jvm",
|
||||
":compiler:backend.jvm.lower",
|
||||
":compiler:backend.jvm.codegen",
|
||||
":compiler:backend.jvm.entrypoint",
|
||||
":compiler:backend.js",
|
||||
":compiler:backend.wasm",
|
||||
|
||||
@@ -4,13 +4,12 @@ plugins {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api(project(":kotlin-annotations-jvm"))
|
||||
api(project(":compiler:backend"))
|
||||
api(project(":compiler:ir.tree"))
|
||||
api(project(":compiler:ir.backend.common"))
|
||||
api(project(":compiler:backend.common.jvm"))
|
||||
compileOnly(project(":compiler:ir.tree.impl"))
|
||||
compileOnly(intellijCoreDep()) { includeJars("intellij-core", "asm-all", "guava", rootProject = rootProject) }
|
||||
compileOnly(intellijCoreDep()) { includeJars("intellij-core", "asm-all", rootProject = rootProject) }
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
id("jps-compatible")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api(project(":compiler:ir.tree"))
|
||||
api(project(":compiler:ir.backend.common"))
|
||||
api(project(":compiler:backend.jvm"))
|
||||
implementation(project(":compiler:ir.tree.impl"))
|
||||
compileOnly(intellijCoreDep()) { includeJars("intellij-core", rootProject = rootProject) }
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
"main" {
|
||||
projectDefault()
|
||||
}
|
||||
"test" {}
|
||||
}
|
||||
@@ -9,6 +9,7 @@ dependencies {
|
||||
api(project(":compiler:ir.tree.impl"))
|
||||
api(project(":compiler:ir.serialization.jvm"))
|
||||
implementation(project(":compiler:backend.jvm.lower"))
|
||||
implementation(project(":compiler:backend.jvm.codegen"))
|
||||
compileOnly(intellijCoreDep()) { includeJars("intellij-core", rootProject = rootProject) }
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -67,7 +67,7 @@ private class IrJvmFlexibleTypeImpl(
|
||||
}
|
||||
}
|
||||
|
||||
internal fun IrType.isWithFlexibleNullability(): Boolean =
|
||||
fun IrType.isWithFlexibleNullability(): Boolean =
|
||||
hasAnnotation(JvmSymbols.FLEXIBLE_NULLABILITY_ANNOTATION_FQ_NAME)
|
||||
|
||||
internal fun IrType.isWithFlexibleMutability(): Boolean =
|
||||
|
||||
+1
-1
@@ -385,7 +385,7 @@ class MethodSignatureMapper(private val context: JvmBackendContext) {
|
||||
}
|
||||
|
||||
// TODO get rid of 'caller' argument
|
||||
internal fun mapToCallableMethod(expression: IrCall, caller: IrFunction?): IrCallableMethod {
|
||||
fun mapToCallableMethod(expression: IrCall, caller: IrFunction?): IrCallableMethod {
|
||||
val callee = expression.symbol.owner
|
||||
val calleeParent = expression.superQualifierSymbol?.owner
|
||||
?: expression.dispatchReceiver?.type?.classOrNull?.owner?.let {
|
||||
|
||||
@@ -140,6 +140,7 @@ include ":benchmarks",
|
||||
":compiler:backend.wasm",
|
||||
":compiler:backend.jvm",
|
||||
":compiler:backend.jvm.lower",
|
||||
":compiler:backend.jvm.codegen",
|
||||
":compiler:backend.jvm.entrypoint",
|
||||
":compiler:backend-common",
|
||||
":compiler:backend",
|
||||
@@ -588,6 +589,7 @@ project(':compiler:backend.js').projectDir = "$rootDir/compiler/ir/backend.js" a
|
||||
project(':compiler:backend.wasm').projectDir = "$rootDir/compiler/ir/backend.wasm" as File
|
||||
project(':compiler:backend.jvm').projectDir = "$rootDir/compiler/ir/backend.jvm" as File
|
||||
project(':compiler:backend.jvm.lower').projectDir = "$rootDir/compiler/ir/backend.jvm/lower" as File
|
||||
project(':compiler:backend.jvm.codegen').projectDir = "$rootDir/compiler/ir/backend.jvm/codegen" as File
|
||||
project(':compiler:backend.jvm.entrypoint').projectDir = "$rootDir/compiler/ir/backend.jvm/entrypoint" as File
|
||||
project(':compiler:ir.serialization.common').projectDir = "$rootDir/compiler/ir/serialization.common" as File
|
||||
project(':compiler:ir.serialization.jvm').projectDir = "$rootDir/compiler/ir/serialization.jvm" as File
|
||||
|
||||
Reference in New Issue
Block a user