FIR/IDE: migrate FIR evaluator to idea-frontend-fir

This commit is contained in:
Jinseong Jeon
2021-06-15 11:48:18 -07:00
parent fcdb8866d2
commit 7a5d61928b
7 changed files with 4 additions and 24 deletions
-1
View File
@@ -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",
-16
View File
@@ -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() }
}
-1
View File
@@ -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"))
@@ -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<*>? =
@@ -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
-1
View File
@@ -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",
-1
View File
@@ -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",