diff --git a/build.gradle.kts b/build.gradle.kts index 1f2d5895d5f..f66389c7ce5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -275,7 +275,6 @@ extra["compilerModules"] = arrayOf( ":core:deserialization", ":core:util.runtime", ":compiler:fir:cones", - ":compiler:fir:evaluate", ":compiler:fir:resolve", ":compiler:fir:fir-serialization", ":compiler:fir:fir-deserialization", diff --git a/compiler/fir/evaluate/build.gradle.kts b/compiler/fir/evaluate/build.gradle.kts deleted file mode 100644 index 853d7e5bb7a..00000000000 --- a/compiler/fir/evaluate/build.gradle.kts +++ /dev/null @@ -1,16 +0,0 @@ -plugins { - kotlin("jvm") - id("jps-compatible") -} - -dependencies { - implementation(project(":compiler:fir:tree")) - implementation(project(":compiler:frontend.common")) - - compileOnly(intellijCoreDep()) { includeJars("intellij-core", rootProject = rootProject) } -} - -sourceSets { - "main" { projectDefault() } - "test" { none() } -} diff --git a/idea/idea-frontend-fir/build.gradle.kts b/idea/idea-frontend-fir/build.gradle.kts index 1ee3242bddf..cde3f77b190 100644 --- a/idea/idea-frontend-fir/build.gradle.kts +++ b/idea/idea-frontend-fir/build.gradle.kts @@ -13,7 +13,6 @@ dependencies { compile(project(":compiler:fir:fir2ir")) compile(project(":compiler:ir.tree")) compile(project(":compiler:fir:resolve")) - compile(project(":compiler:fir:evaluate")) compile(project(":compiler:fir:checkers")) compile(project(":compiler:fir:checkers:checkers.jvm")) compile(project(":compiler:fir:java")) diff --git a/compiler/fir/evaluate/src/org/jetbrains/kotlin/fir/evaluate/FirCompileTimeConstantEvaluator.kt b/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/fir/evaluate/FirCompileTimeConstantEvaluator.kt similarity index 98% rename from compiler/fir/evaluate/src/org/jetbrains/kotlin/fir/evaluate/FirCompileTimeConstantEvaluator.kt rename to idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/fir/evaluate/FirCompileTimeConstantEvaluator.kt index d31014b1002..ec083955bcd 100644 --- a/compiler/fir/evaluate/src/org/jetbrains/kotlin/fir/evaluate/FirCompileTimeConstantEvaluator.kt +++ b/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/fir/evaluate/FirCompileTimeConstantEvaluator.kt @@ -1,9 +1,9 @@ /* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2021 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.fir.evaluate +package org.jetbrains.kotlin.idea.fir.evaluate import org.jetbrains.kotlin.fir.FirSourceElement import org.jetbrains.kotlin.fir.declarations.FirCallableDeclaration @@ -23,7 +23,7 @@ import org.jetbrains.kotlin.types.ConstantValueKind * An evaluator that transform numeric operation, such as div, into compile-time constant iff involved operands, such as explicit receiver * and the argument, are compile-time constant as well. */ -class FirCompileTimeConstantEvaluator { +internal class FirCompileTimeConstantEvaluator { // TODO: Handle boolean operators, const property loading, class reference, array, annotation values, etc. fun evaluate(expression: FirExpression): FirConstExpression<*>? = diff --git a/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/frontend/api/fir/components/KtFirCompileTimeConstantProvider.kt b/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/frontend/api/fir/components/KtFirCompileTimeConstantProvider.kt index 9512265fbe1..0908ffa4240 100644 --- a/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/frontend/api/fir/components/KtFirCompileTimeConstantProvider.kt +++ b/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/frontend/api/fir/components/KtFirCompileTimeConstantProvider.kt @@ -6,7 +6,7 @@ package org.jetbrains.kotlin.idea.frontend.api.fir.components import org.jetbrains.kotlin.fir.expressions.FirExpression -import org.jetbrains.kotlin.fir.evaluate.FirCompileTimeConstantEvaluator +import org.jetbrains.kotlin.idea.fir.evaluate.FirCompileTimeConstantEvaluator import org.jetbrains.kotlin.idea.fir.low.level.api.api.getOrBuildFir import org.jetbrains.kotlin.idea.frontend.api.components.KtCompileTimeConstantProvider import org.jetbrains.kotlin.idea.frontend.api.fir.KtFirAnalysisSession diff --git a/prepare/idea-plugin/build.gradle.kts b/prepare/idea-plugin/build.gradle.kts index bda6c94dd55..79dd2042db3 100644 --- a/prepare/idea-plugin/build.gradle.kts +++ b/prepare/idea-plugin/build.gradle.kts @@ -48,7 +48,6 @@ val projectsToShadow by extra(listOf( ":compiler:fir:checkers", ":compiler:fir:checkers:checkers.jvm", ":compiler:fir:entrypoint", - ":compiler:fir:evaluate", ":compiler:fir:resolve", ":compiler:fir:fir-serialization", ":compiler:fir:fir-deserialization", diff --git a/settings.gradle b/settings.gradle index bd54e0caf25..dad0c69737e 100644 --- a/settings.gradle +++ b/settings.gradle @@ -269,7 +269,6 @@ include ":compiler:fir:cones", ":compiler:fir:raw-fir:light-tree2fir", ":compiler:fir:fir2ir", ":compiler:fir:fir2ir:jvm-backend", - ":compiler:fir:evaluate", ":compiler:fir:resolve", ":compiler:fir:fir-serialization", ":compiler:fir:fir-deserialization",