diff --git a/build.gradle.kts b/build.gradle.kts index 4fe3e6fa76e..ad4aabf4668 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -256,8 +256,9 @@ extra["compilerModules"] = arrayOf( ":compiler:fir:cones", ":compiler:fir:resolve", ":compiler:fir:tree", - ":compiler:fir:psi2fir", - ":compiler:fir:lightTree", + ":compiler:fir:raw-fir:common", + ":compiler:fir:raw-fir:psi2fir", + ":compiler:fir:raw-fir:light-tree2fir", ":compiler:fir:fir2ir", ":compiler:fir:fir2ir:jvm-backend", ":compiler:fir:java", @@ -554,16 +555,16 @@ tasks { } register("firCompilerTest") { - dependsOn(":compiler:fir:psi2fir:test") + dependsOn(":compiler:fir:raw-fir:psi2fir:test") + dependsOn(":compiler:fir:raw-fir:light-tree2fir:test") dependsOn(":compiler:fir:analysis-tests:test") dependsOn(":compiler:fir:fir2ir:test") - dependsOn(":compiler:fir:lightTree:test") } register("firAllTest") { dependsOn( - ":compiler:fir:psi2fir:test", - ":compiler:fir:lightTree:test", + ":compiler:fir:raw-fir:psi2fir:test", + ":compiler:fir:raw-fir:light-tree2fir:test", ":compiler:fir:analysis-tests:test", ":compiler:fir:fir2ir:test", ":idea:idea-fir:test" diff --git a/compiler/build.gradle.kts b/compiler/build.gradle.kts index fc498e33af4..51800855da7 100644 --- a/compiler/build.gradle.kts +++ b/compiler/build.gradle.kts @@ -45,11 +45,10 @@ dependencies { testCompileOnly(project(":kotlin-test:kotlin-test-jvm")) testCompileOnly(project(":kotlin-test:kotlin-test-junit")) testCompile(projectTests(":compiler:tests-common")) - testCompile(projectTests(":compiler:fir:psi2fir")) + testCompile(projectTests(":compiler:fir:raw-fir:psi2fir")) + testCompile(projectTests(":compiler:fir:raw-fir:light-tree2fir")) testCompile(projectTests(":compiler:fir:fir2ir")) testCompile(projectTests(":compiler:fir:analysis-tests")) - testCompile(projectTests(":compiler:fir:analysis-tests")) - testCompile(projectTests(":compiler:fir:lightTree")) testCompile(projectTests(":compiler:visualizer")) testCompile(projectTests(":generators:test-generator")) testCompile(project(":compiler:ir.ir2cfg")) diff --git a/compiler/cli/build.gradle.kts b/compiler/cli/build.gradle.kts index 25d804652d5..cc1ef179d26 100644 --- a/compiler/cli/build.gradle.kts +++ b/compiler/cli/build.gradle.kts @@ -21,7 +21,7 @@ dependencies { compile(project(":native:frontend.native")) compile(commonDep("org.fusesource.jansi", "jansi")) compile(commonDep("org.jline", "jline")) - compile(project(":compiler:fir:psi2fir")) + compile(project(":compiler:fir:raw-fir:psi2fir")) compile(project(":compiler:fir:resolve")) compile(project(":compiler:fir:jvm")) compile(project(":compiler:fir:java")) diff --git a/compiler/fir/raw-fir/common/build.gradle.kts b/compiler/fir/raw-fir/common/build.gradle.kts new file mode 100644 index 00000000000..854785254f3 --- /dev/null +++ b/compiler/fir/raw-fir/common/build.gradle.kts @@ -0,0 +1,31 @@ +/* + * Copyright 2000-2018 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. + */ + +plugins { + kotlin("jvm") + id("jps-compatible") +} + +dependencies { + compile(project(":compiler:psi")) + compile(project(":core:descriptors")) + compile(project(":compiler:fir:tree")) + + compileOnly(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) } + + Platform[192].orHigher { + testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") } + testRuntimeOnly(intellijCoreDep()) { includeJars("intellij-core") } + } +} + +sourceSets { + "main" { projectDefault() } + "test" { none() } +} + +projectTest(parallel = true) { + workingDir = rootDir +} \ No newline at end of file diff --git a/compiler/fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/BaseFirBuilder.kt b/compiler/fir/raw-fir/common/src/org/jetbrains/kotlin/fir/builder/BaseFirBuilder.kt similarity index 100% rename from compiler/fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/BaseFirBuilder.kt rename to compiler/fir/raw-fir/common/src/org/jetbrains/kotlin/fir/builder/BaseFirBuilder.kt diff --git a/compiler/fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/Context.kt b/compiler/fir/raw-fir/common/src/org/jetbrains/kotlin/fir/builder/Context.kt similarity index 100% rename from compiler/fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/Context.kt rename to compiler/fir/raw-fir/common/src/org/jetbrains/kotlin/fir/builder/Context.kt diff --git a/compiler/fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/ConversionUtils.kt b/compiler/fir/raw-fir/common/src/org/jetbrains/kotlin/fir/builder/ConversionUtils.kt similarity index 79% rename from compiler/fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/ConversionUtils.kt rename to compiler/fir/raw-fir/common/src/org/jetbrains/kotlin/fir/builder/ConversionUtils.kt index a6cce99d054..31bf5611088 100644 --- a/compiler/fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/ConversionUtils.kt +++ b/compiler/fir/raw-fir/common/src/org/jetbrains/kotlin/fir/builder/ConversionUtils.kt @@ -17,8 +17,6 @@ import org.jetbrains.kotlin.fir.declarations.builder.buildPropertyAccessor import org.jetbrains.kotlin.fir.declarations.builder.buildValueParameter import org.jetbrains.kotlin.fir.declarations.impl.FirDeclarationStatusImpl import org.jetbrains.kotlin.fir.declarations.impl.FirDefaultPropertyAccessor -import org.jetbrains.kotlin.fir.diagnostics.DiagnosticKind -import org.jetbrains.kotlin.fir.diagnostics.ConeSimpleDiagnostic import org.jetbrains.kotlin.fir.expressions.* import org.jetbrains.kotlin.fir.expressions.builder.* import org.jetbrains.kotlin.fir.expressions.impl.FirSingleExpressionBlock @@ -42,7 +40,6 @@ import org.jetbrains.kotlin.fir.types.impl.FirImplicitKPropertyTypeRef import org.jetbrains.kotlin.fir.types.impl.FirQualifierPartImpl import org.jetbrains.kotlin.lexer.KtTokens import org.jetbrains.kotlin.name.Name -import org.jetbrains.kotlin.psi.* import org.jetbrains.kotlin.types.Variance import org.jetbrains.kotlin.types.expressions.OperatorConventions import org.jetbrains.kotlin.util.OperatorNameConventions @@ -195,68 +192,6 @@ fun FirExpression.generateLazyLogicalOperation( } } -internal fun KtWhenCondition.toFirWhenCondition( - subject: FirWhenSubject, - convert: KtExpression?.(String) -> FirExpression, - toFirOrErrorTypeRef: KtTypeReference?.() -> FirTypeRef, -): FirExpression { - val baseSource = this.toFirSourceElement() - val firSubjectExpression = buildWhenSubjectExpression { - source = baseSource - whenSubject = subject - } - return when (this) { - is KtWhenConditionWithExpression -> { - buildOperatorCall { - source = expression?.toFirSourceElement() - operation = FirOperation.EQ - argumentList = buildBinaryArgumentList( - firSubjectExpression, expression.convert("No expression in condition with expression") - ) - } - } - is KtWhenConditionInRange -> { - val firRange = rangeExpression.convert("No range in condition with range") - firRange.generateContainsOperation( - firSubjectExpression, - isNegated, - rangeExpression?.toFirSourceElement(), - operationReference.toFirSourceElement() - ) - } - is KtWhenConditionIsPattern -> { - buildTypeOperatorCall { - source = typeReference?.toFirSourceElement() - operation = if (isNegated) FirOperation.NOT_IS else FirOperation.IS - conversionTypeRef = typeReference.toFirOrErrorTypeRef() - argumentList = buildUnaryArgumentList(firSubjectExpression) - } - } - else -> { - buildErrorExpression(baseSource, ConeSimpleDiagnostic("Unsupported when condition: ${this.javaClass}", DiagnosticKind.Syntax)) - } - } -} - -internal fun Array.toFirWhenCondition( - baseSource: FirSourceElement?, - subject: FirWhenSubject, - convert: KtExpression?.(String) -> FirExpression, - toFirOrErrorTypeRef: KtTypeReference?.() -> FirTypeRef, -): FirExpression { - var firCondition: FirExpression? = null - for (condition in this) { - val firConditionElement = condition.toFirWhenCondition(subject, convert, toFirOrErrorTypeRef) - firCondition = when (firCondition) { - null -> firConditionElement - else -> firCondition.generateLazyLogicalOperation( - firConditionElement, false, baseSource, - ) - } - } - return firCondition!! -} - fun FirExpression.generateContainsOperation( argument: FirExpression, inverted: Boolean, @@ -339,42 +274,7 @@ fun generateResolvedAccessExpression(source: FirSourceElement?, variable: FirVar } } -internal fun generateDestructuringBlock( - session: FirSession, - multiDeclaration: KtDestructuringDeclaration, - container: FirVariable<*>, - tmpVariable: Boolean, - extractAnnotationsTo: KtAnnotated.(FirAnnotationContainerBuilder) -> Unit, - toFirOrImplicitTypeRef: KtTypeReference?.() -> FirTypeRef, -): FirExpression { - return buildBlock { - source = multiDeclaration.toFirSourceElement() - if (tmpVariable) { - statements += container - } - val isVar = multiDeclaration.isVar - for ((index, entry) in multiDeclaration.entries.withIndex()) { - val entrySource = entry.toFirSourceElement() - val name = entry.nameAsSafeName - statements += buildProperty { - source = entrySource - this.session = session - returnTypeRef = entry.typeReference.toFirOrImplicitTypeRef() - this.name = name - initializer = buildComponentCall { - source = entrySource - explicitReceiver = generateResolvedAccessExpression(entrySource, container) - componentIndex = index + 1 - } - this.isVar = isVar - isLocal = true - status = FirDeclarationStatusImpl(Visibilities.LOCAL, Modality.FINAL) - symbol = FirPropertySymbol(name) - entry.extractAnnotationsTo(this) - } - } - } -} + fun generateTemporaryVariable( session: FirSession, source: FirSourceElement?, name: Name, initializer: FirExpression, typeRef: FirTypeRef? = null, diff --git a/compiler/fir/lightTree/build.gradle.kts b/compiler/fir/raw-fir/light-tree2fir/build.gradle.kts similarity index 95% rename from compiler/fir/lightTree/build.gradle.kts rename to compiler/fir/raw-fir/light-tree2fir/build.gradle.kts index bdbcee166e6..2cdc8b7e9e0 100644 --- a/compiler/fir/lightTree/build.gradle.kts +++ b/compiler/fir/raw-fir/light-tree2fir/build.gradle.kts @@ -15,9 +15,7 @@ repositories { } dependencies { - compile(project(":compiler:psi")) - compile(project(":compiler:fir:tree")) - compile(project(":compiler:fir:psi2fir")) + compile(project(":compiler:fir:raw-fir:common")) compileOnly(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) } @@ -27,7 +25,7 @@ dependencies { testCompileOnly(project(":kotlin-test:kotlin-test-jvm")) testCompileOnly(project(":kotlin-test:kotlin-test-junit")) testCompile(projectTests(":compiler:tests-common")) - testCompile(projectTests(":compiler:fir:psi2fir")) + testCompile(projectTests(":compiler:fir:raw-fir:psi2fir")) testCompileOnly(project(":kotlin-reflect-api")) testRuntime(project(":kotlin-reflect")) diff --git a/compiler/fir/lightTree/src/org/jetbrains/kotlin/fir/lightTree/LightTree2Fir.kt b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/LightTree2Fir.kt similarity index 100% rename from compiler/fir/lightTree/src/org/jetbrains/kotlin/fir/lightTree/LightTree2Fir.kt rename to compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/LightTree2Fir.kt diff --git a/compiler/fir/lightTree/src/org/jetbrains/kotlin/fir/lightTree/converter/BaseConverter.kt b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/BaseConverter.kt similarity index 100% rename from compiler/fir/lightTree/src/org/jetbrains/kotlin/fir/lightTree/converter/BaseConverter.kt rename to compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/BaseConverter.kt diff --git a/compiler/fir/lightTree/src/org/jetbrains/kotlin/fir/lightTree/converter/ConverterUtil.kt b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/ConverterUtil.kt similarity index 100% rename from compiler/fir/lightTree/src/org/jetbrains/kotlin/fir/lightTree/converter/ConverterUtil.kt rename to compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/ConverterUtil.kt diff --git a/compiler/fir/lightTree/src/org/jetbrains/kotlin/fir/lightTree/converter/DeclarationsConverter.kt b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/DeclarationsConverter.kt similarity index 100% rename from compiler/fir/lightTree/src/org/jetbrains/kotlin/fir/lightTree/converter/DeclarationsConverter.kt rename to compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/DeclarationsConverter.kt diff --git a/compiler/fir/lightTree/src/org/jetbrains/kotlin/fir/lightTree/converter/ExpressionsConverter.kt b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/ExpressionsConverter.kt similarity index 100% rename from compiler/fir/lightTree/src/org/jetbrains/kotlin/fir/lightTree/converter/ExpressionsConverter.kt rename to compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/converter/ExpressionsConverter.kt diff --git a/compiler/fir/lightTree/src/org/jetbrains/kotlin/fir/lightTree/fir/ClassWrapper.kt b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/fir/ClassWrapper.kt similarity index 100% rename from compiler/fir/lightTree/src/org/jetbrains/kotlin/fir/lightTree/fir/ClassWrapper.kt rename to compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/fir/ClassWrapper.kt diff --git a/compiler/fir/lightTree/src/org/jetbrains/kotlin/fir/lightTree/fir/DestructuringDeclaration.kt b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/fir/DestructuringDeclaration.kt similarity index 100% rename from compiler/fir/lightTree/src/org/jetbrains/kotlin/fir/lightTree/fir/DestructuringDeclaration.kt rename to compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/fir/DestructuringDeclaration.kt diff --git a/compiler/fir/lightTree/src/org/jetbrains/kotlin/fir/lightTree/fir/PrimaryConstructor.kt b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/fir/PrimaryConstructor.kt similarity index 100% rename from compiler/fir/lightTree/src/org/jetbrains/kotlin/fir/lightTree/fir/PrimaryConstructor.kt rename to compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/fir/PrimaryConstructor.kt diff --git a/compiler/fir/lightTree/src/org/jetbrains/kotlin/fir/lightTree/fir/TypeConstraint.kt b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/fir/TypeConstraint.kt similarity index 100% rename from compiler/fir/lightTree/src/org/jetbrains/kotlin/fir/lightTree/fir/TypeConstraint.kt rename to compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/fir/TypeConstraint.kt diff --git a/compiler/fir/lightTree/src/org/jetbrains/kotlin/fir/lightTree/fir/ValueParameter.kt b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/fir/ValueParameter.kt similarity index 100% rename from compiler/fir/lightTree/src/org/jetbrains/kotlin/fir/lightTree/fir/ValueParameter.kt rename to compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/fir/ValueParameter.kt diff --git a/compiler/fir/lightTree/src/org/jetbrains/kotlin/fir/lightTree/fir/WhenEntry.kt b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/fir/WhenEntry.kt similarity index 100% rename from compiler/fir/lightTree/src/org/jetbrains/kotlin/fir/lightTree/fir/WhenEntry.kt rename to compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/fir/WhenEntry.kt diff --git a/compiler/fir/lightTree/src/org/jetbrains/kotlin/fir/lightTree/fir/modifier/Modifier.kt b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/fir/modifier/Modifier.kt similarity index 100% rename from compiler/fir/lightTree/src/org/jetbrains/kotlin/fir/lightTree/fir/modifier/Modifier.kt rename to compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/fir/modifier/Modifier.kt diff --git a/compiler/fir/lightTree/src/org/jetbrains/kotlin/fir/lightTree/fir/modifier/ModifierSets.kt b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/fir/modifier/ModifierSets.kt similarity index 100% rename from compiler/fir/lightTree/src/org/jetbrains/kotlin/fir/lightTree/fir/modifier/ModifierSets.kt rename to compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/fir/modifier/ModifierSets.kt diff --git a/compiler/fir/lightTree/src/org/jetbrains/kotlin/fir/lightTree/fir/modifier/ModifiersEnumSet.kt b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/fir/modifier/ModifiersEnumSet.kt similarity index 100% rename from compiler/fir/lightTree/src/org/jetbrains/kotlin/fir/lightTree/fir/modifier/ModifiersEnumSet.kt rename to compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/fir/modifier/ModifiersEnumSet.kt diff --git a/compiler/fir/lightTree/src/org/jetbrains/kotlin/fir/lightTree/fir/modifier/TypeModifier.kt b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/fir/modifier/TypeModifier.kt similarity index 100% rename from compiler/fir/lightTree/src/org/jetbrains/kotlin/fir/lightTree/fir/modifier/TypeModifier.kt rename to compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/fir/modifier/TypeModifier.kt diff --git a/compiler/fir/lightTree/src/org/jetbrains/kotlin/fir/lightTree/fir/modifier/TypeParameterModifier.kt b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/fir/modifier/TypeParameterModifier.kt similarity index 100% rename from compiler/fir/lightTree/src/org/jetbrains/kotlin/fir/lightTree/fir/modifier/TypeParameterModifier.kt rename to compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/fir/modifier/TypeParameterModifier.kt diff --git a/compiler/fir/lightTree/src/org/jetbrains/kotlin/fir/lightTree/fir/modifier/TypeProjectionModifier.kt b/compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/fir/modifier/TypeProjectionModifier.kt similarity index 100% rename from compiler/fir/lightTree/src/org/jetbrains/kotlin/fir/lightTree/fir/modifier/TypeProjectionModifier.kt rename to compiler/fir/raw-fir/light-tree2fir/src/org/jetbrains/kotlin/fir/lightTree/fir/modifier/TypeProjectionModifier.kt diff --git a/compiler/fir/lightTree/tests/org/jetbrains/kotlin/fir/lightTree/AbstractLightTree2FirConverterTestCase.kt b/compiler/fir/raw-fir/light-tree2fir/tests/org/jetbrains/kotlin/fir/lightTree/AbstractLightTree2FirConverterTestCase.kt similarity index 100% rename from compiler/fir/lightTree/tests/org/jetbrains/kotlin/fir/lightTree/AbstractLightTree2FirConverterTestCase.kt rename to compiler/fir/raw-fir/light-tree2fir/tests/org/jetbrains/kotlin/fir/lightTree/AbstractLightTree2FirConverterTestCase.kt diff --git a/compiler/fir/lightTree/tests/org/jetbrains/kotlin/fir/lightTree/LightTree2FirConverterTestCaseGenerated.java b/compiler/fir/raw-fir/light-tree2fir/tests/org/jetbrains/kotlin/fir/lightTree/LightTree2FirConverterTestCaseGenerated.java similarity index 56% rename from compiler/fir/lightTree/tests/org/jetbrains/kotlin/fir/lightTree/LightTree2FirConverterTestCaseGenerated.java rename to compiler/fir/raw-fir/light-tree2fir/tests/org/jetbrains/kotlin/fir/lightTree/LightTree2FirConverterTestCaseGenerated.java index 5179186923e..1e6af973f31 100644 --- a/compiler/fir/lightTree/tests/org/jetbrains/kotlin/fir/lightTree/LightTree2FirConverterTestCaseGenerated.java +++ b/compiler/fir/raw-fir/light-tree2fir/tests/org/jetbrains/kotlin/fir/lightTree/LightTree2FirConverterTestCaseGenerated.java @@ -16,7 +16,7 @@ import java.util.regex.Pattern; /** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ @SuppressWarnings("all") -@TestMetadata("compiler/fir/psi2fir/testData/rawBuilder") +@TestMetadata("compiler/fir/raw-fir/psi2fir/testData/rawBuilder") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class LightTree2FirConverterTestCaseGenerated extends AbstractLightTree2FirConverterTestCase { @@ -25,10 +25,10 @@ public class LightTree2FirConverterTestCaseGenerated extends AbstractLightTree2F } public void testAllFilesPresentInRawBuilder() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/psi2fir/testData/rawBuilder"), Pattern.compile("^(.+)\\.kt$"), null, true); + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/raw-fir/psi2fir/testData/rawBuilder"), Pattern.compile("^(.+)\\.kt$"), null, true); } - @TestMetadata("compiler/fir/psi2fir/testData/rawBuilder/declarations") + @TestMetadata("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Declarations extends AbstractLightTree2FirConverterTestCase { @@ -37,121 +37,121 @@ public class LightTree2FirConverterTestCaseGenerated extends AbstractLightTree2F } public void testAllFilesPresentInDeclarations() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/psi2fir/testData/rawBuilder/declarations"), Pattern.compile("^(.+)\\.kt$"), null, true); + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("annotation.kt") public void testAnnotation() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/annotation.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/annotation.kt"); } @TestMetadata("complexTypes.kt") public void testComplexTypes() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/complexTypes.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/complexTypes.kt"); } @TestMetadata("constructorInObject.kt") public void testConstructorInObject() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/constructorInObject.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/constructorInObject.kt"); } @TestMetadata("derivedClass.kt") public void testDerivedClass() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/derivedClass.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/derivedClass.kt"); } @TestMetadata("enums.kt") public void testEnums() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/enums.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/enums.kt"); } @TestMetadata("enums2.kt") public void testEnums2() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/enums2.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/enums2.kt"); } @TestMetadata("expectActual.kt") public void testExpectActual() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/expectActual.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/expectActual.kt"); } @TestMetadata("F.kt") public void testF() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/F.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/F.kt"); } @TestMetadata("functionTypes.kt") public void testFunctionTypes() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/functionTypes.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/functionTypes.kt"); } @TestMetadata("genericFunctions.kt") public void testGenericFunctions() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/genericFunctions.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/genericFunctions.kt"); } @TestMetadata("genericProperty.kt") public void testGenericProperty() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/genericProperty.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/genericProperty.kt"); } @TestMetadata("nestedClass.kt") public void testNestedClass() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/nestedClass.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/nestedClass.kt"); } @TestMetadata("NestedOfAliasedType.kt") public void testNestedOfAliasedType() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/NestedOfAliasedType.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/NestedOfAliasedType.kt"); } @TestMetadata("NestedSuperType.kt") public void testNestedSuperType() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/NestedSuperType.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/NestedSuperType.kt"); } @TestMetadata("noPrimaryConstructor.kt") public void testNoPrimaryConstructor() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/noPrimaryConstructor.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/noPrimaryConstructor.kt"); } @TestMetadata("simpleClass.kt") public void testSimpleClass() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/simpleClass.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/simpleClass.kt"); } @TestMetadata("simpleFun.kt") public void testSimpleFun() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/simpleFun.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/simpleFun.kt"); } @TestMetadata("simpleTypeAlias.kt") public void testSimpleTypeAlias() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/simpleTypeAlias.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/simpleTypeAlias.kt"); } @TestMetadata("typeAliasWithGeneric.kt") public void testTypeAliasWithGeneric() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/typeAliasWithGeneric.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/typeAliasWithGeneric.kt"); } @TestMetadata("typeParameterVsNested.kt") public void testTypeParameterVsNested() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/typeParameterVsNested.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/typeParameterVsNested.kt"); } @TestMetadata("typeParameters.kt") public void testTypeParameters() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/typeParameters.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/typeParameters.kt"); } @TestMetadata("where.kt") public void testWhere() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/where.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/where.kt"); } } - @TestMetadata("compiler/fir/psi2fir/testData/rawBuilder/expressions") + @TestMetadata("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Expressions extends AbstractLightTree2FirConverterTestCase { @@ -160,152 +160,152 @@ public class LightTree2FirConverterTestCaseGenerated extends AbstractLightTree2F } public void testAllFilesPresentInExpressions() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/psi2fir/testData/rawBuilder/expressions"), Pattern.compile("^(.+)\\.kt$"), null, true); + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("annotated.kt") public void testAnnotated() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/annotated.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/annotated.kt"); } @TestMetadata("arrayAccess.kt") public void testArrayAccess() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/arrayAccess.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/arrayAccess.kt"); } @TestMetadata("arrayAssignment.kt") public void testArrayAssignment() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/arrayAssignment.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/arrayAssignment.kt"); } @TestMetadata("branches.kt") public void testBranches() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/branches.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/branches.kt"); } @TestMetadata("callableReferences.kt") public void testCallableReferences() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/callableReferences.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/callableReferences.kt"); } @TestMetadata("calls.kt") public void testCalls() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/calls.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/calls.kt"); } @TestMetadata("classReference.kt") public void testClassReference() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/classReference.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/classReference.kt"); } @TestMetadata("collectionLiterals.kt") public void testCollectionLiterals() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/collectionLiterals.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/collectionLiterals.kt"); } @TestMetadata("destructuring.kt") public void testDestructuring() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/destructuring.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/destructuring.kt"); } @TestMetadata("for.kt") public void testFor() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/for.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/for.kt"); } @TestMetadata("genericCalls.kt") public void testGenericCalls() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/genericCalls.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/genericCalls.kt"); } @TestMetadata("in.kt") public void testIn() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/in.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/in.kt"); } @TestMetadata("inBrackets.kt") public void testInBrackets() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/inBrackets.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/inBrackets.kt"); } @TestMetadata("init.kt") public void testInit() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/init.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/init.kt"); } @TestMetadata("lambda.kt") public void testLambda() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/lambda.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/lambda.kt"); } @TestMetadata("lambdaAndAnonymousFunction.kt") public void testLambdaAndAnonymousFunction() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/lambdaAndAnonymousFunction.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/lambdaAndAnonymousFunction.kt"); } @TestMetadata("locals.kt") public void testLocals() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/locals.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/locals.kt"); } @TestMetadata("modifications.kt") public void testModifications() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/modifications.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/modifications.kt"); } @TestMetadata("namedArgument.kt") public void testNamedArgument() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/namedArgument.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/namedArgument.kt"); } @TestMetadata("nullability.kt") public void testNullability() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/nullability.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/nullability.kt"); } @TestMetadata("qualifierWithTypeArguments.kt") public void testQualifierWithTypeArguments() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/qualifierWithTypeArguments.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/qualifierWithTypeArguments.kt"); } @TestMetadata("simpleReturns.kt") public void testSimpleReturns() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/simpleReturns.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/simpleReturns.kt"); } @TestMetadata("super.kt") public void testSuper() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/super.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/super.kt"); } @TestMetadata("these.kt") public void testThese() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/these.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/these.kt"); } @TestMetadata("try.kt") public void testTry() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/try.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/try.kt"); } @TestMetadata("typeOperators.kt") public void testTypeOperators() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/typeOperators.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/typeOperators.kt"); } @TestMetadata("unary.kt") public void testUnary() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/unary.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/unary.kt"); } @TestMetadata("variables.kt") public void testVariables() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/variables.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/variables.kt"); } @TestMetadata("while.kt") public void testWhile() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/while.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/while.kt"); } } } diff --git a/compiler/fir/lightTree/tests/org/jetbrains/kotlin/fir/lightTree/PathWalker.kt b/compiler/fir/raw-fir/light-tree2fir/tests/org/jetbrains/kotlin/fir/lightTree/PathWalker.kt similarity index 100% rename from compiler/fir/lightTree/tests/org/jetbrains/kotlin/fir/lightTree/PathWalker.kt rename to compiler/fir/raw-fir/light-tree2fir/tests/org/jetbrains/kotlin/fir/lightTree/PathWalker.kt diff --git a/compiler/fir/lightTree/tests/org/jetbrains/kotlin/fir/lightTree/SimpleTestCase.kt b/compiler/fir/raw-fir/light-tree2fir/tests/org/jetbrains/kotlin/fir/lightTree/SimpleTestCase.kt similarity index 100% rename from compiler/fir/lightTree/tests/org/jetbrains/kotlin/fir/lightTree/SimpleTestCase.kt rename to compiler/fir/raw-fir/light-tree2fir/tests/org/jetbrains/kotlin/fir/lightTree/SimpleTestCase.kt diff --git a/compiler/fir/lightTree/tests/org/jetbrains/kotlin/fir/lightTree/TotalKotlinTest.kt b/compiler/fir/raw-fir/light-tree2fir/tests/org/jetbrains/kotlin/fir/lightTree/TotalKotlinTest.kt similarity index 100% rename from compiler/fir/lightTree/tests/org/jetbrains/kotlin/fir/lightTree/TotalKotlinTest.kt rename to compiler/fir/raw-fir/light-tree2fir/tests/org/jetbrains/kotlin/fir/lightTree/TotalKotlinTest.kt diff --git a/compiler/fir/lightTree/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/AbstractBenchmark.kt b/compiler/fir/raw-fir/light-tree2fir/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/AbstractBenchmark.kt similarity index 100% rename from compiler/fir/lightTree/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/AbstractBenchmark.kt rename to compiler/fir/raw-fir/light-tree2fir/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/AbstractBenchmark.kt diff --git a/compiler/fir/lightTree/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/AbstractBenchmarkForGivenPath.kt b/compiler/fir/raw-fir/light-tree2fir/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/AbstractBenchmarkForGivenPath.kt similarity index 100% rename from compiler/fir/lightTree/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/AbstractBenchmarkForGivenPath.kt rename to compiler/fir/raw-fir/light-tree2fir/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/AbstractBenchmarkForGivenPath.kt diff --git a/compiler/fir/lightTree/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/createdFiles/AbstractKotlinBenchmark.kt b/compiler/fir/raw-fir/light-tree2fir/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/createdFiles/AbstractKotlinBenchmark.kt similarity index 100% rename from compiler/fir/lightTree/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/createdFiles/AbstractKotlinBenchmark.kt rename to compiler/fir/raw-fir/light-tree2fir/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/createdFiles/AbstractKotlinBenchmark.kt diff --git a/compiler/fir/lightTree/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/createdFiles/TestCases.kt b/compiler/fir/raw-fir/light-tree2fir/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/createdFiles/TestCases.kt similarity index 100% rename from compiler/fir/lightTree/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/createdFiles/TestCases.kt rename to compiler/fir/raw-fir/light-tree2fir/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/createdFiles/TestCases.kt diff --git a/compiler/fir/lightTree/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/createdFiles/TestCasesGenerator.kt b/compiler/fir/raw-fir/light-tree2fir/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/createdFiles/TestCasesGenerator.kt similarity index 100% rename from compiler/fir/lightTree/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/createdFiles/TestCasesGenerator.kt rename to compiler/fir/raw-fir/light-tree2fir/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/createdFiles/TestCasesGenerator.kt diff --git a/compiler/fir/lightTree/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/firModule/AbstractFirModuleBenchmark.kt b/compiler/fir/raw-fir/light-tree2fir/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/firModule/AbstractFirModuleBenchmark.kt similarity index 100% rename from compiler/fir/lightTree/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/firModule/AbstractFirModuleBenchmark.kt rename to compiler/fir/raw-fir/light-tree2fir/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/firModule/AbstractFirModuleBenchmark.kt diff --git a/compiler/fir/lightTree/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/generators/LightTree2FirGenerator.kt b/compiler/fir/raw-fir/light-tree2fir/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/generators/LightTree2FirGenerator.kt similarity index 100% rename from compiler/fir/lightTree/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/generators/LightTree2FirGenerator.kt rename to compiler/fir/raw-fir/light-tree2fir/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/generators/LightTree2FirGenerator.kt diff --git a/compiler/fir/lightTree/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/generators/Psi2FirGenerator.kt b/compiler/fir/raw-fir/light-tree2fir/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/generators/Psi2FirGenerator.kt similarity index 100% rename from compiler/fir/lightTree/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/generators/Psi2FirGenerator.kt rename to compiler/fir/raw-fir/light-tree2fir/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/generators/Psi2FirGenerator.kt diff --git a/compiler/fir/lightTree/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/generators/TreeGenerator.kt b/compiler/fir/raw-fir/light-tree2fir/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/generators/TreeGenerator.kt similarity index 100% rename from compiler/fir/lightTree/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/generators/TreeGenerator.kt rename to compiler/fir/raw-fir/light-tree2fir/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/generators/TreeGenerator.kt diff --git a/compiler/fir/lightTree/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/totalKotlin/AbstractTotalKotlinBenchmark.kt b/compiler/fir/raw-fir/light-tree2fir/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/totalKotlin/AbstractTotalKotlinBenchmark.kt similarity index 100% rename from compiler/fir/lightTree/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/totalKotlin/AbstractTotalKotlinBenchmark.kt rename to compiler/fir/raw-fir/light-tree2fir/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/totalKotlin/AbstractTotalKotlinBenchmark.kt diff --git a/compiler/fir/lightTree/tests/org/jetbrains/kotlin/fir/lightTree/compare/TreesCompareTest.kt b/compiler/fir/raw-fir/light-tree2fir/tests/org/jetbrains/kotlin/fir/lightTree/compare/TreesCompareTest.kt similarity index 100% rename from compiler/fir/lightTree/tests/org/jetbrains/kotlin/fir/lightTree/compare/TreesCompareTest.kt rename to compiler/fir/raw-fir/light-tree2fir/tests/org/jetbrains/kotlin/fir/lightTree/compare/TreesCompareTest.kt diff --git a/compiler/fir/psi2fir/build.gradle.kts b/compiler/fir/raw-fir/psi2fir/build.gradle.kts similarity index 87% rename from compiler/fir/psi2fir/build.gradle.kts rename to compiler/fir/raw-fir/psi2fir/build.gradle.kts index 8c0f533427b..7d9f8d7b331 100644 --- a/compiler/fir/psi2fir/build.gradle.kts +++ b/compiler/fir/raw-fir/psi2fir/build.gradle.kts @@ -9,10 +9,7 @@ plugins { } dependencies { - compile(project(":compiler:psi")) - compile(project(":core:descriptors")) - compile(project(":compiler:fir:tree")) - compile(project(":compiler:ir.tree")) + compile(project(":compiler:fir:raw-fir:common")) compileOnly(intellijCoreDep()) { includeJars("intellij-core", "guava", rootProject = rootProject) } diff --git a/compiler/fir/raw-fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/PsiConversionUtils.kt b/compiler/fir/raw-fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/PsiConversionUtils.kt new file mode 100644 index 00000000000..d8835eee1a6 --- /dev/null +++ b/compiler/fir/raw-fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/PsiConversionUtils.kt @@ -0,0 +1,122 @@ +/* + * Copyright 2010-2020 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.builder + +import org.jetbrains.kotlin.descriptors.Modality +import org.jetbrains.kotlin.descriptors.Visibilities +import org.jetbrains.kotlin.fir.FirSession +import org.jetbrains.kotlin.fir.FirSourceElement +import org.jetbrains.kotlin.fir.FirWhenSubject +import org.jetbrains.kotlin.fir.declarations.FirVariable +import org.jetbrains.kotlin.fir.declarations.builder.buildProperty +import org.jetbrains.kotlin.fir.declarations.impl.FirDeclarationStatusImpl +import org.jetbrains.kotlin.fir.diagnostics.ConeSimpleDiagnostic +import org.jetbrains.kotlin.fir.diagnostics.DiagnosticKind +import org.jetbrains.kotlin.fir.expressions.* +import org.jetbrains.kotlin.fir.expressions.builder.* +import org.jetbrains.kotlin.fir.symbols.impl.FirPropertySymbol +import org.jetbrains.kotlin.fir.toFirSourceElement +import org.jetbrains.kotlin.fir.types.FirTypeRef +import org.jetbrains.kotlin.psi.* + +internal fun KtWhenCondition.toFirWhenCondition( + subject: FirWhenSubject, + convert: KtExpression?.(String) -> FirExpression, + toFirOrErrorTypeRef: KtTypeReference?.() -> FirTypeRef, +): FirExpression { + val baseSource = this.toFirSourceElement() + val firSubjectExpression = buildWhenSubjectExpression { + source = baseSource + whenSubject = subject + } + return when (this) { + is KtWhenConditionWithExpression -> { + buildOperatorCall { + source = expression?.toFirSourceElement() + operation = FirOperation.EQ + argumentList = buildBinaryArgumentList( + firSubjectExpression, expression.convert("No expression in condition with expression") + ) + } + } + is KtWhenConditionInRange -> { + val firRange = rangeExpression.convert("No range in condition with range") + firRange.generateContainsOperation( + firSubjectExpression, + isNegated, + rangeExpression?.toFirSourceElement(), + operationReference.toFirSourceElement() + ) + } + is KtWhenConditionIsPattern -> { + buildTypeOperatorCall { + source = typeReference?.toFirSourceElement() + operation = if (isNegated) FirOperation.NOT_IS else FirOperation.IS + conversionTypeRef = typeReference.toFirOrErrorTypeRef() + argumentList = buildUnaryArgumentList(firSubjectExpression) + } + } + else -> { + buildErrorExpression(baseSource, ConeSimpleDiagnostic("Unsupported when condition: ${this.javaClass}", DiagnosticKind.Syntax)) + } + } +} + +internal fun Array.toFirWhenCondition( + baseSource: FirSourceElement?, + subject: FirWhenSubject, + convert: KtExpression?.(String) -> FirExpression, + toFirOrErrorTypeRef: KtTypeReference?.() -> FirTypeRef, +): FirExpression { + var firCondition: FirExpression? = null + for (condition in this) { + val firConditionElement = condition.toFirWhenCondition(subject, convert, toFirOrErrorTypeRef) + firCondition = when (firCondition) { + null -> firConditionElement + else -> firCondition.generateLazyLogicalOperation( + firConditionElement, false, baseSource, + ) + } + } + return firCondition!! +} + +internal fun generateDestructuringBlock( + session: FirSession, + multiDeclaration: KtDestructuringDeclaration, + container: FirVariable<*>, + tmpVariable: Boolean, + extractAnnotationsTo: KtAnnotated.(FirAnnotationContainerBuilder) -> Unit, + toFirOrImplicitTypeRef: KtTypeReference?.() -> FirTypeRef, +): FirExpression { + return buildBlock { + source = multiDeclaration.toFirSourceElement() + if (tmpVariable) { + statements += container + } + val isVar = multiDeclaration.isVar + for ((index, entry) in multiDeclaration.entries.withIndex()) { + val entrySource = entry.toFirSourceElement() + val name = entry.nameAsSafeName + statements += buildProperty { + source = entrySource + this.session = session + returnTypeRef = entry.typeReference.toFirOrImplicitTypeRef() + this.name = name + initializer = buildComponentCall { + source = entrySource + explicitReceiver = generateResolvedAccessExpression(entrySource, container) + componentIndex = index + 1 + } + this.isVar = isVar + isLocal = true + status = FirDeclarationStatusImpl(Visibilities.LOCAL, Modality.FINAL) + symbol = FirPropertySymbol(name) + entry.extractAnnotationsTo(this) + } + } + } +} \ No newline at end of file diff --git a/compiler/fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/RawFirBuilder.kt b/compiler/fir/raw-fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/RawFirBuilder.kt similarity index 100% rename from compiler/fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/RawFirBuilder.kt rename to compiler/fir/raw-fir/psi2fir/src/org/jetbrains/kotlin/fir/builder/RawFirBuilder.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/F.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/F.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/F.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/F.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/F.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/F.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/F.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/F.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/NestedOfAliasedType.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/NestedOfAliasedType.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/NestedOfAliasedType.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/NestedOfAliasedType.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/NestedOfAliasedType.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/NestedOfAliasedType.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/NestedOfAliasedType.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/NestedOfAliasedType.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/NestedSuperType.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/NestedSuperType.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/NestedSuperType.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/NestedSuperType.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/NestedSuperType.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/NestedSuperType.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/NestedSuperType.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/NestedSuperType.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/annotation.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/annotation.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/annotation.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/annotation.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/annotation.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/annotation.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/annotation.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/annotation.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/complexTypes.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/complexTypes.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/complexTypes.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/complexTypes.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/complexTypes.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/complexTypes.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/complexTypes.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/complexTypes.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/constructorInObject.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/constructorInObject.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/constructorInObject.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/constructorInObject.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/constructorInObject.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/constructorInObject.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/constructorInObject.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/constructorInObject.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/derivedClass.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/derivedClass.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/derivedClass.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/derivedClass.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/derivedClass.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/derivedClass.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/derivedClass.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/derivedClass.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/enums.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/enums.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/enums.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/enums.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/enums.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/enums.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/enums.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/enums.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/enums2.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/enums2.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/enums2.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/enums2.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/enums2.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/enums2.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/enums2.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/enums2.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/expectActual.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/expectActual.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/expectActual.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/expectActual.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/expectActual.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/expectActual.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/expectActual.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/expectActual.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/functionTypes.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/functionTypes.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/functionTypes.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/functionTypes.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/functionTypes.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/functionTypes.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/functionTypes.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/functionTypes.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/genericFunctions.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/genericFunctions.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/genericFunctions.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/genericFunctions.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/genericFunctions.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/genericFunctions.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/genericFunctions.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/genericFunctions.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/genericProperty.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/genericProperty.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/genericProperty.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/genericProperty.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/genericProperty.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/genericProperty.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/genericProperty.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/genericProperty.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/nestedClass.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/nestedClass.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/nestedClass.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/nestedClass.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/nestedClass.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/nestedClass.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/nestedClass.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/nestedClass.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/noPrimaryConstructor.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/noPrimaryConstructor.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/noPrimaryConstructor.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/noPrimaryConstructor.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/noPrimaryConstructor.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/noPrimaryConstructor.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/noPrimaryConstructor.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/noPrimaryConstructor.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/simpleClass.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/simpleClass.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/simpleClass.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/simpleClass.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/simpleClass.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/simpleClass.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/simpleClass.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/simpleClass.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/simpleFun.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/simpleFun.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/simpleFun.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/simpleFun.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/simpleFun.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/simpleFun.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/simpleFun.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/simpleFun.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/simpleTypeAlias.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/simpleTypeAlias.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/simpleTypeAlias.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/simpleTypeAlias.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/simpleTypeAlias.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/simpleTypeAlias.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/simpleTypeAlias.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/simpleTypeAlias.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/typeAliasWithGeneric.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/typeAliasWithGeneric.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/typeAliasWithGeneric.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/typeAliasWithGeneric.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/typeAliasWithGeneric.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/typeAliasWithGeneric.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/typeAliasWithGeneric.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/typeAliasWithGeneric.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/typeParameterVsNested.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/typeParameterVsNested.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/typeParameterVsNested.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/typeParameterVsNested.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/typeParameterVsNested.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/typeParameterVsNested.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/typeParameterVsNested.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/typeParameterVsNested.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/typeParameters.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/typeParameters.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/typeParameters.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/typeParameters.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/typeParameters.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/typeParameters.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/typeParameters.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/typeParameters.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/where.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/where.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/where.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/where.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/declarations/where.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/where.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/declarations/where.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/where.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/annotated.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/annotated.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/annotated.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/annotated.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/annotated.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/annotated.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/annotated.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/annotated.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/arrayAccess.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/arrayAccess.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/arrayAccess.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/arrayAccess.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/arrayAccess.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/arrayAccess.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/arrayAccess.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/arrayAccess.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/arrayAssignment.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/arrayAssignment.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/arrayAssignment.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/arrayAssignment.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/arrayAssignment.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/arrayAssignment.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/arrayAssignment.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/arrayAssignment.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/branches.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/branches.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/branches.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/branches.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/branches.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/branches.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/branches.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/branches.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/callableReferences.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/callableReferences.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/callableReferences.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/callableReferences.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/callableReferences.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/callableReferences.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/callableReferences.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/callableReferences.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/calls.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/calls.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/calls.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/calls.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/calls.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/calls.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/calls.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/calls.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/classReference.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/classReference.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/classReference.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/classReference.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/classReference.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/classReference.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/classReference.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/classReference.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/collectionLiterals.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/collectionLiterals.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/collectionLiterals.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/collectionLiterals.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/collectionLiterals.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/collectionLiterals.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/collectionLiterals.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/collectionLiterals.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/destructuring.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/destructuring.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/destructuring.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/destructuring.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/destructuring.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/destructuring.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/destructuring.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/destructuring.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/for.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/for.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/for.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/for.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/for.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/for.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/for.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/for.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/genericCalls.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/genericCalls.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/genericCalls.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/genericCalls.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/genericCalls.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/genericCalls.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/genericCalls.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/genericCalls.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/in.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/in.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/in.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/in.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/in.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/in.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/in.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/in.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/inBrackets.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/inBrackets.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/inBrackets.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/inBrackets.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/inBrackets.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/inBrackets.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/inBrackets.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/inBrackets.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/init.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/init.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/init.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/init.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/init.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/init.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/init.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/init.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/lambda.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/lambda.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/lambda.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/lambda.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/lambda.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/lambda.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/lambda.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/lambda.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/lambdaAndAnonymousFunction.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/lambdaAndAnonymousFunction.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/lambdaAndAnonymousFunction.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/lambdaAndAnonymousFunction.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/lambdaAndAnonymousFunction.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/lambdaAndAnonymousFunction.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/lambdaAndAnonymousFunction.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/lambdaAndAnonymousFunction.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/locals.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/locals.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/locals.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/locals.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/locals.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/locals.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/locals.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/locals.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/modifications.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/modifications.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/modifications.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/modifications.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/modifications.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/modifications.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/modifications.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/modifications.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/namedArgument.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/namedArgument.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/namedArgument.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/namedArgument.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/namedArgument.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/namedArgument.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/namedArgument.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/namedArgument.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/nullability.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/nullability.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/nullability.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/nullability.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/nullability.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/nullability.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/nullability.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/nullability.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/qualifierWithTypeArguments.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/qualifierWithTypeArguments.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/qualifierWithTypeArguments.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/qualifierWithTypeArguments.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/qualifierWithTypeArguments.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/qualifierWithTypeArguments.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/qualifierWithTypeArguments.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/qualifierWithTypeArguments.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/simpleReturns.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/simpleReturns.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/simpleReturns.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/simpleReturns.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/simpleReturns.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/simpleReturns.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/simpleReturns.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/simpleReturns.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/super.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/super.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/super.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/super.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/super.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/super.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/super.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/super.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/these.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/these.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/these.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/these.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/these.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/these.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/these.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/these.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/try.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/try.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/try.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/try.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/try.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/try.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/try.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/try.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/typeOperators.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/typeOperators.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/typeOperators.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/typeOperators.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/typeOperators.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/typeOperators.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/typeOperators.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/typeOperators.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/unary.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/unary.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/unary.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/unary.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/unary.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/unary.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/unary.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/unary.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/variables.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/variables.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/variables.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/variables.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/variables.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/variables.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/variables.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/variables.txt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/while.kt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/while.kt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/while.kt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/while.kt diff --git a/compiler/fir/psi2fir/testData/rawBuilder/expressions/while.txt b/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/while.txt similarity index 100% rename from compiler/fir/psi2fir/testData/rawBuilder/expressions/while.txt rename to compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/while.txt diff --git a/compiler/fir/psi2fir/tests/org/jetbrains/kotlin/fir/builder/AbstractRawFirBuilderTestCase.kt b/compiler/fir/raw-fir/psi2fir/tests/org/jetbrains/kotlin/fir/builder/AbstractRawFirBuilderTestCase.kt similarity index 100% rename from compiler/fir/psi2fir/tests/org/jetbrains/kotlin/fir/builder/AbstractRawFirBuilderTestCase.kt rename to compiler/fir/raw-fir/psi2fir/tests/org/jetbrains/kotlin/fir/builder/AbstractRawFirBuilderTestCase.kt diff --git a/compiler/fir/psi2fir/tests/org/jetbrains/kotlin/fir/builder/RawFirBuilderTestCaseGenerated.java b/compiler/fir/raw-fir/psi2fir/tests/org/jetbrains/kotlin/fir/builder/RawFirBuilderTestCaseGenerated.java similarity index 56% rename from compiler/fir/psi2fir/tests/org/jetbrains/kotlin/fir/builder/RawFirBuilderTestCaseGenerated.java rename to compiler/fir/raw-fir/psi2fir/tests/org/jetbrains/kotlin/fir/builder/RawFirBuilderTestCaseGenerated.java index 106177ce142..ec9679aaf37 100644 --- a/compiler/fir/psi2fir/tests/org/jetbrains/kotlin/fir/builder/RawFirBuilderTestCaseGenerated.java +++ b/compiler/fir/raw-fir/psi2fir/tests/org/jetbrains/kotlin/fir/builder/RawFirBuilderTestCaseGenerated.java @@ -16,7 +16,7 @@ import java.util.regex.Pattern; /** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ @SuppressWarnings("all") -@TestMetadata("compiler/fir/psi2fir/testData/rawBuilder") +@TestMetadata("compiler/fir/raw-fir/psi2fir/testData/rawBuilder") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class RawFirBuilderTestCaseGenerated extends AbstractRawFirBuilderTestCase { @@ -25,10 +25,10 @@ public class RawFirBuilderTestCaseGenerated extends AbstractRawFirBuilderTestCas } public void testAllFilesPresentInRawBuilder() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/psi2fir/testData/rawBuilder"), Pattern.compile("^(.+)\\.kt$"), null, true); + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/raw-fir/psi2fir/testData/rawBuilder"), Pattern.compile("^(.+)\\.kt$"), null, true); } - @TestMetadata("compiler/fir/psi2fir/testData/rawBuilder/declarations") + @TestMetadata("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Declarations extends AbstractRawFirBuilderTestCase { @@ -37,121 +37,121 @@ public class RawFirBuilderTestCaseGenerated extends AbstractRawFirBuilderTestCas } public void testAllFilesPresentInDeclarations() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/psi2fir/testData/rawBuilder/declarations"), Pattern.compile("^(.+)\\.kt$"), null, true); + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("annotation.kt") public void testAnnotation() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/annotation.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/annotation.kt"); } @TestMetadata("complexTypes.kt") public void testComplexTypes() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/complexTypes.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/complexTypes.kt"); } @TestMetadata("constructorInObject.kt") public void testConstructorInObject() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/constructorInObject.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/constructorInObject.kt"); } @TestMetadata("derivedClass.kt") public void testDerivedClass() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/derivedClass.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/derivedClass.kt"); } @TestMetadata("enums.kt") public void testEnums() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/enums.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/enums.kt"); } @TestMetadata("enums2.kt") public void testEnums2() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/enums2.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/enums2.kt"); } @TestMetadata("expectActual.kt") public void testExpectActual() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/expectActual.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/expectActual.kt"); } @TestMetadata("F.kt") public void testF() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/F.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/F.kt"); } @TestMetadata("functionTypes.kt") public void testFunctionTypes() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/functionTypes.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/functionTypes.kt"); } @TestMetadata("genericFunctions.kt") public void testGenericFunctions() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/genericFunctions.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/genericFunctions.kt"); } @TestMetadata("genericProperty.kt") public void testGenericProperty() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/genericProperty.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/genericProperty.kt"); } @TestMetadata("nestedClass.kt") public void testNestedClass() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/nestedClass.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/nestedClass.kt"); } @TestMetadata("NestedOfAliasedType.kt") public void testNestedOfAliasedType() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/NestedOfAliasedType.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/NestedOfAliasedType.kt"); } @TestMetadata("NestedSuperType.kt") public void testNestedSuperType() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/NestedSuperType.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/NestedSuperType.kt"); } @TestMetadata("noPrimaryConstructor.kt") public void testNoPrimaryConstructor() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/noPrimaryConstructor.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/noPrimaryConstructor.kt"); } @TestMetadata("simpleClass.kt") public void testSimpleClass() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/simpleClass.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/simpleClass.kt"); } @TestMetadata("simpleFun.kt") public void testSimpleFun() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/simpleFun.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/simpleFun.kt"); } @TestMetadata("simpleTypeAlias.kt") public void testSimpleTypeAlias() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/simpleTypeAlias.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/simpleTypeAlias.kt"); } @TestMetadata("typeAliasWithGeneric.kt") public void testTypeAliasWithGeneric() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/typeAliasWithGeneric.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/typeAliasWithGeneric.kt"); } @TestMetadata("typeParameterVsNested.kt") public void testTypeParameterVsNested() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/typeParameterVsNested.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/typeParameterVsNested.kt"); } @TestMetadata("typeParameters.kt") public void testTypeParameters() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/typeParameters.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/typeParameters.kt"); } @TestMetadata("where.kt") public void testWhere() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/where.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/where.kt"); } } - @TestMetadata("compiler/fir/psi2fir/testData/rawBuilder/expressions") + @TestMetadata("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Expressions extends AbstractRawFirBuilderTestCase { @@ -160,152 +160,152 @@ public class RawFirBuilderTestCaseGenerated extends AbstractRawFirBuilderTestCas } public void testAllFilesPresentInExpressions() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/psi2fir/testData/rawBuilder/expressions"), Pattern.compile("^(.+)\\.kt$"), null, true); + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("annotated.kt") public void testAnnotated() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/annotated.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/annotated.kt"); } @TestMetadata("arrayAccess.kt") public void testArrayAccess() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/arrayAccess.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/arrayAccess.kt"); } @TestMetadata("arrayAssignment.kt") public void testArrayAssignment() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/arrayAssignment.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/arrayAssignment.kt"); } @TestMetadata("branches.kt") public void testBranches() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/branches.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/branches.kt"); } @TestMetadata("callableReferences.kt") public void testCallableReferences() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/callableReferences.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/callableReferences.kt"); } @TestMetadata("calls.kt") public void testCalls() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/calls.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/calls.kt"); } @TestMetadata("classReference.kt") public void testClassReference() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/classReference.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/classReference.kt"); } @TestMetadata("collectionLiterals.kt") public void testCollectionLiterals() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/collectionLiterals.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/collectionLiterals.kt"); } @TestMetadata("destructuring.kt") public void testDestructuring() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/destructuring.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/destructuring.kt"); } @TestMetadata("for.kt") public void testFor() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/for.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/for.kt"); } @TestMetadata("genericCalls.kt") public void testGenericCalls() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/genericCalls.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/genericCalls.kt"); } @TestMetadata("in.kt") public void testIn() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/in.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/in.kt"); } @TestMetadata("inBrackets.kt") public void testInBrackets() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/inBrackets.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/inBrackets.kt"); } @TestMetadata("init.kt") public void testInit() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/init.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/init.kt"); } @TestMetadata("lambda.kt") public void testLambda() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/lambda.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/lambda.kt"); } @TestMetadata("lambdaAndAnonymousFunction.kt") public void testLambdaAndAnonymousFunction() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/lambdaAndAnonymousFunction.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/lambdaAndAnonymousFunction.kt"); } @TestMetadata("locals.kt") public void testLocals() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/locals.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/locals.kt"); } @TestMetadata("modifications.kt") public void testModifications() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/modifications.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/modifications.kt"); } @TestMetadata("namedArgument.kt") public void testNamedArgument() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/namedArgument.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/namedArgument.kt"); } @TestMetadata("nullability.kt") public void testNullability() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/nullability.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/nullability.kt"); } @TestMetadata("qualifierWithTypeArguments.kt") public void testQualifierWithTypeArguments() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/qualifierWithTypeArguments.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/qualifierWithTypeArguments.kt"); } @TestMetadata("simpleReturns.kt") public void testSimpleReturns() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/simpleReturns.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/simpleReturns.kt"); } @TestMetadata("super.kt") public void testSuper() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/super.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/super.kt"); } @TestMetadata("these.kt") public void testThese() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/these.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/these.kt"); } @TestMetadata("try.kt") public void testTry() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/try.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/try.kt"); } @TestMetadata("typeOperators.kt") public void testTypeOperators() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/typeOperators.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/typeOperators.kt"); } @TestMetadata("unary.kt") public void testUnary() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/unary.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/unary.kt"); } @TestMetadata("variables.kt") public void testVariables() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/variables.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/variables.kt"); } @TestMetadata("while.kt") public void testWhile() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/while.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/while.kt"); } } } diff --git a/compiler/fir/psi2fir/tests/org/jetbrains/kotlin/fir/builder/RawFirBuilderTotalKotlinTestCase.kt b/compiler/fir/raw-fir/psi2fir/tests/org/jetbrains/kotlin/fir/builder/RawFirBuilderTotalKotlinTestCase.kt similarity index 100% rename from compiler/fir/psi2fir/tests/org/jetbrains/kotlin/fir/builder/RawFirBuilderTotalKotlinTestCase.kt rename to compiler/fir/raw-fir/psi2fir/tests/org/jetbrains/kotlin/fir/builder/RawFirBuilderTotalKotlinTestCase.kt diff --git a/compiler/fir/psi2fir/tests/org/jetbrains/kotlin/fir/builder/StubFirScopeProvider.kt b/compiler/fir/raw-fir/psi2fir/tests/org/jetbrains/kotlin/fir/builder/StubFirScopeProvider.kt similarity index 100% rename from compiler/fir/psi2fir/tests/org/jetbrains/kotlin/fir/builder/StubFirScopeProvider.kt rename to compiler/fir/raw-fir/psi2fir/tests/org/jetbrains/kotlin/fir/builder/StubFirScopeProvider.kt diff --git a/compiler/tests-common/build.gradle.kts b/compiler/tests-common/build.gradle.kts index a77262a5b35..60174673ac6 100644 --- a/compiler/tests-common/build.gradle.kts +++ b/compiler/tests-common/build.gradle.kts @@ -12,8 +12,8 @@ dependencies { testCompile(project(":compiler:util")) testCompile(project(":compiler:backend")) testCompile(project(":compiler:fir:tree")) - testCompile(project(":compiler:fir:psi2fir")) - testCompile(project(":compiler:fir:lightTree")) + testCompile(project(":compiler:fir:raw-fir:psi2fir")) + testCompile(project(":compiler:fir:raw-fir:light-tree2fir")) testCompile(project(":compiler:fir:fir2ir")) testCompile(project(":compiler:fir:jvm")) testCompile(project(":compiler:fir:fir2ir:jvm-backend")) diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 48d7849fbd0..cdc7bbfe220 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -19816,6 +19816,16 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/properties/classFieldInsideNested.kt"); } + @TestMetadata("classFieldInsideNestedLambda.kt") + public void testClassFieldInsideNestedLambda() throws Exception { + runTest("compiler/testData/codegen/box/properties/classFieldInsideNestedLambda.kt"); + } + + @TestMetadata("classFieldInsideNestedNestedLambda.kt") + public void testClassFieldInsideNestedNestedLambda() throws Exception { + runTest("compiler/testData/codegen/box/properties/classFieldInsideNestedNestedLambda.kt"); + } + @TestMetadata("classObjectProperties.kt") public void testClassObjectProperties() throws Exception { runTest("compiler/testData/codegen/box/properties/classObjectProperties.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateCompilerTests.kt b/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateCompilerTests.kt index 4f839bbf7e9..7e1f72c1259 100644 --- a/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateCompilerTests.kt +++ b/compiler/tests/org/jetbrains/kotlin/generators/tests/GenerateCompilerTests.kt @@ -533,13 +533,13 @@ fun main(args: Array) { } } - testGroup("compiler/fir/psi2fir/tests", "compiler/fir/psi2fir/testData") { + testGroup("compiler/fir/raw-fir/psi2fir/tests", "compiler/fir/raw-fir/psi2fir/testData") { testClass { model("rawBuilder", testMethod = "doRawFirTest") } } - testGroup("compiler/fir/lightTree/tests", "compiler/fir/psi2fir/testData") { + testGroup("compiler/fir/raw-fir/light-tree2fir/tests", "compiler/fir/raw-fir/psi2fir/testData") { testClass { model("rawBuilder") } @@ -609,7 +609,7 @@ fun main(args: Array) { } } - testGroup("compiler/visualizer/tests", "compiler/fir/psi2fir/testData") { + testGroup("compiler/visualizer/tests", "compiler/fir/raw-fir/psi2fir/testData") { testClass("PsiVisualizerForRawFirDataGenerated") { model("rawBuilder", testMethod = "doFirBuilderDataTest") } diff --git a/compiler/visualizer/build.gradle.kts b/compiler/visualizer/build.gradle.kts index ac38159201f..96207118d0b 100644 --- a/compiler/visualizer/build.gradle.kts +++ b/compiler/visualizer/build.gradle.kts @@ -6,7 +6,8 @@ plugins { dependencies { testRuntime(intellijDep()) testCompile(intellijCoreDep()) { includeJars("intellij-core") } - + + testCompile(project(":compiler:fir:raw-fir:psi2fir")) testCompile(project(":compiler:visualizer:render-psi")) testCompile(project(":compiler:visualizer:render-fir")) testCompile(project(":compiler:visualizer:common")) diff --git a/compiler/visualizer/render-fir/build.gradle.kts b/compiler/visualizer/render-fir/build.gradle.kts index 83a356befc7..65c35616fef 100644 --- a/compiler/visualizer/render-fir/build.gradle.kts +++ b/compiler/visualizer/render-fir/build.gradle.kts @@ -4,7 +4,7 @@ plugins { } dependencies { - compile(project(":compiler:fir:psi2fir")) + compile(project(":compiler:fir:raw-fir:psi2fir")) compile(project(":compiler:fir:resolve")) compile(project(":compiler:visualizer:common")) compileOnly(intellijCoreDep()) { includeJars("intellij-core") } diff --git a/compiler/visualizer/tests/org/jetbrains/kotlin/visualizer/fir/FirVisualizerForRawFirDataGenerated.java b/compiler/visualizer/tests/org/jetbrains/kotlin/visualizer/fir/FirVisualizerForRawFirDataGenerated.java index 70debab2430..d3086a95eb9 100644 --- a/compiler/visualizer/tests/org/jetbrains/kotlin/visualizer/fir/FirVisualizerForRawFirDataGenerated.java +++ b/compiler/visualizer/tests/org/jetbrains/kotlin/visualizer/fir/FirVisualizerForRawFirDataGenerated.java @@ -16,7 +16,7 @@ import java.util.regex.Pattern; /** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ @SuppressWarnings("all") -@TestMetadata("compiler/fir/psi2fir/testData/rawBuilder") +@TestMetadata("compiler/fir/raw-fir/psi2fir/testData/rawBuilder") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class FirVisualizerForRawFirDataGenerated extends AbstractFirVisualizer { @@ -25,10 +25,10 @@ public class FirVisualizerForRawFirDataGenerated extends AbstractFirVisualizer { } public void testAllFilesPresentInRawBuilder() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/psi2fir/testData/rawBuilder"), Pattern.compile("^(.+)\\.kt$"), null, true); + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/raw-fir/psi2fir/testData/rawBuilder"), Pattern.compile("^(.+)\\.kt$"), null, true); } - @TestMetadata("compiler/fir/psi2fir/testData/rawBuilder/declarations") + @TestMetadata("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Declarations extends AbstractFirVisualizer { @@ -37,121 +37,121 @@ public class FirVisualizerForRawFirDataGenerated extends AbstractFirVisualizer { } public void testAllFilesPresentInDeclarations() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/psi2fir/testData/rawBuilder/declarations"), Pattern.compile("^(.+)\\.kt$"), null, true); + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("annotation.kt") public void testAnnotation() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/annotation.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/annotation.kt"); } @TestMetadata("complexTypes.kt") public void testComplexTypes() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/complexTypes.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/complexTypes.kt"); } @TestMetadata("constructorInObject.kt") public void testConstructorInObject() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/constructorInObject.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/constructorInObject.kt"); } @TestMetadata("derivedClass.kt") public void testDerivedClass() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/derivedClass.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/derivedClass.kt"); } @TestMetadata("enums.kt") public void testEnums() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/enums.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/enums.kt"); } @TestMetadata("enums2.kt") public void testEnums2() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/enums2.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/enums2.kt"); } @TestMetadata("expectActual.kt") public void testExpectActual() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/expectActual.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/expectActual.kt"); } @TestMetadata("F.kt") public void testF() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/F.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/F.kt"); } @TestMetadata("functionTypes.kt") public void testFunctionTypes() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/functionTypes.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/functionTypes.kt"); } @TestMetadata("genericFunctions.kt") public void testGenericFunctions() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/genericFunctions.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/genericFunctions.kt"); } @TestMetadata("genericProperty.kt") public void testGenericProperty() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/genericProperty.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/genericProperty.kt"); } @TestMetadata("nestedClass.kt") public void testNestedClass() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/nestedClass.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/nestedClass.kt"); } @TestMetadata("NestedOfAliasedType.kt") public void testNestedOfAliasedType() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/NestedOfAliasedType.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/NestedOfAliasedType.kt"); } @TestMetadata("NestedSuperType.kt") public void testNestedSuperType() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/NestedSuperType.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/NestedSuperType.kt"); } @TestMetadata("noPrimaryConstructor.kt") public void testNoPrimaryConstructor() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/noPrimaryConstructor.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/noPrimaryConstructor.kt"); } @TestMetadata("simpleClass.kt") public void testSimpleClass() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/simpleClass.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/simpleClass.kt"); } @TestMetadata("simpleFun.kt") public void testSimpleFun() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/simpleFun.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/simpleFun.kt"); } @TestMetadata("simpleTypeAlias.kt") public void testSimpleTypeAlias() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/simpleTypeAlias.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/simpleTypeAlias.kt"); } @TestMetadata("typeAliasWithGeneric.kt") public void testTypeAliasWithGeneric() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/typeAliasWithGeneric.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/typeAliasWithGeneric.kt"); } @TestMetadata("typeParameterVsNested.kt") public void testTypeParameterVsNested() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/typeParameterVsNested.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/typeParameterVsNested.kt"); } @TestMetadata("typeParameters.kt") public void testTypeParameters() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/typeParameters.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/typeParameters.kt"); } @TestMetadata("where.kt") public void testWhere() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/where.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/where.kt"); } } - @TestMetadata("compiler/fir/psi2fir/testData/rawBuilder/expressions") + @TestMetadata("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Expressions extends AbstractFirVisualizer { @@ -160,152 +160,152 @@ public class FirVisualizerForRawFirDataGenerated extends AbstractFirVisualizer { } public void testAllFilesPresentInExpressions() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/psi2fir/testData/rawBuilder/expressions"), Pattern.compile("^(.+)\\.kt$"), null, true); + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("annotated.kt") public void testAnnotated() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/annotated.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/annotated.kt"); } @TestMetadata("arrayAccess.kt") public void testArrayAccess() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/arrayAccess.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/arrayAccess.kt"); } @TestMetadata("arrayAssignment.kt") public void testArrayAssignment() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/arrayAssignment.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/arrayAssignment.kt"); } @TestMetadata("branches.kt") public void testBranches() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/branches.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/branches.kt"); } @TestMetadata("callableReferences.kt") public void testCallableReferences() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/callableReferences.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/callableReferences.kt"); } @TestMetadata("calls.kt") public void testCalls() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/calls.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/calls.kt"); } @TestMetadata("classReference.kt") public void testClassReference() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/classReference.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/classReference.kt"); } @TestMetadata("collectionLiterals.kt") public void testCollectionLiterals() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/collectionLiterals.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/collectionLiterals.kt"); } @TestMetadata("destructuring.kt") public void testDestructuring() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/destructuring.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/destructuring.kt"); } @TestMetadata("for.kt") public void testFor() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/for.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/for.kt"); } @TestMetadata("genericCalls.kt") public void testGenericCalls() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/genericCalls.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/genericCalls.kt"); } @TestMetadata("in.kt") public void testIn() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/in.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/in.kt"); } @TestMetadata("inBrackets.kt") public void testInBrackets() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/inBrackets.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/inBrackets.kt"); } @TestMetadata("init.kt") public void testInit() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/init.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/init.kt"); } @TestMetadata("lambda.kt") public void testLambda() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/lambda.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/lambda.kt"); } @TestMetadata("lambdaAndAnonymousFunction.kt") public void testLambdaAndAnonymousFunction() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/lambdaAndAnonymousFunction.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/lambdaAndAnonymousFunction.kt"); } @TestMetadata("locals.kt") public void testLocals() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/locals.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/locals.kt"); } @TestMetadata("modifications.kt") public void testModifications() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/modifications.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/modifications.kt"); } @TestMetadata("namedArgument.kt") public void testNamedArgument() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/namedArgument.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/namedArgument.kt"); } @TestMetadata("nullability.kt") public void testNullability() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/nullability.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/nullability.kt"); } @TestMetadata("qualifierWithTypeArguments.kt") public void testQualifierWithTypeArguments() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/qualifierWithTypeArguments.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/qualifierWithTypeArguments.kt"); } @TestMetadata("simpleReturns.kt") public void testSimpleReturns() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/simpleReturns.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/simpleReturns.kt"); } @TestMetadata("super.kt") public void testSuper() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/super.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/super.kt"); } @TestMetadata("these.kt") public void testThese() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/these.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/these.kt"); } @TestMetadata("try.kt") public void testTry() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/try.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/try.kt"); } @TestMetadata("typeOperators.kt") public void testTypeOperators() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/typeOperators.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/typeOperators.kt"); } @TestMetadata("unary.kt") public void testUnary() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/unary.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/unary.kt"); } @TestMetadata("variables.kt") public void testVariables() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/variables.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/variables.kt"); } @TestMetadata("while.kt") public void testWhile() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/while.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/while.kt"); } } } diff --git a/compiler/visualizer/tests/org/jetbrains/kotlin/visualizer/psi/PsiVisualizerForRawFirDataGenerated.java b/compiler/visualizer/tests/org/jetbrains/kotlin/visualizer/psi/PsiVisualizerForRawFirDataGenerated.java index 9e0af85d6e6..1b0227394b3 100644 --- a/compiler/visualizer/tests/org/jetbrains/kotlin/visualizer/psi/PsiVisualizerForRawFirDataGenerated.java +++ b/compiler/visualizer/tests/org/jetbrains/kotlin/visualizer/psi/PsiVisualizerForRawFirDataGenerated.java @@ -16,7 +16,7 @@ import java.util.regex.Pattern; /** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ @SuppressWarnings("all") -@TestMetadata("compiler/fir/psi2fir/testData/rawBuilder") +@TestMetadata("compiler/fir/raw-fir/psi2fir/testData/rawBuilder") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class PsiVisualizerForRawFirDataGenerated extends AbstractPsiVisualizer { @@ -25,10 +25,10 @@ public class PsiVisualizerForRawFirDataGenerated extends AbstractPsiVisualizer { } public void testAllFilesPresentInRawBuilder() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/psi2fir/testData/rawBuilder"), Pattern.compile("^(.+)\\.kt$"), null, true); + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/raw-fir/psi2fir/testData/rawBuilder"), Pattern.compile("^(.+)\\.kt$"), null, true); } - @TestMetadata("compiler/fir/psi2fir/testData/rawBuilder/declarations") + @TestMetadata("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Declarations extends AbstractPsiVisualizer { @@ -37,121 +37,121 @@ public class PsiVisualizerForRawFirDataGenerated extends AbstractPsiVisualizer { } public void testAllFilesPresentInDeclarations() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/psi2fir/testData/rawBuilder/declarations"), Pattern.compile("^(.+)\\.kt$"), null, true); + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("annotation.kt") public void testAnnotation() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/annotation.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/annotation.kt"); } @TestMetadata("complexTypes.kt") public void testComplexTypes() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/complexTypes.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/complexTypes.kt"); } @TestMetadata("constructorInObject.kt") public void testConstructorInObject() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/constructorInObject.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/constructorInObject.kt"); } @TestMetadata("derivedClass.kt") public void testDerivedClass() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/derivedClass.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/derivedClass.kt"); } @TestMetadata("enums.kt") public void testEnums() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/enums.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/enums.kt"); } @TestMetadata("enums2.kt") public void testEnums2() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/enums2.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/enums2.kt"); } @TestMetadata("expectActual.kt") public void testExpectActual() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/expectActual.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/expectActual.kt"); } @TestMetadata("F.kt") public void testF() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/F.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/F.kt"); } @TestMetadata("functionTypes.kt") public void testFunctionTypes() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/functionTypes.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/functionTypes.kt"); } @TestMetadata("genericFunctions.kt") public void testGenericFunctions() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/genericFunctions.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/genericFunctions.kt"); } @TestMetadata("genericProperty.kt") public void testGenericProperty() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/genericProperty.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/genericProperty.kt"); } @TestMetadata("nestedClass.kt") public void testNestedClass() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/nestedClass.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/nestedClass.kt"); } @TestMetadata("NestedOfAliasedType.kt") public void testNestedOfAliasedType() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/NestedOfAliasedType.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/NestedOfAliasedType.kt"); } @TestMetadata("NestedSuperType.kt") public void testNestedSuperType() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/NestedSuperType.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/NestedSuperType.kt"); } @TestMetadata("noPrimaryConstructor.kt") public void testNoPrimaryConstructor() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/noPrimaryConstructor.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/noPrimaryConstructor.kt"); } @TestMetadata("simpleClass.kt") public void testSimpleClass() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/simpleClass.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/simpleClass.kt"); } @TestMetadata("simpleFun.kt") public void testSimpleFun() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/simpleFun.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/simpleFun.kt"); } @TestMetadata("simpleTypeAlias.kt") public void testSimpleTypeAlias() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/simpleTypeAlias.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/simpleTypeAlias.kt"); } @TestMetadata("typeAliasWithGeneric.kt") public void testTypeAliasWithGeneric() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/typeAliasWithGeneric.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/typeAliasWithGeneric.kt"); } @TestMetadata("typeParameterVsNested.kt") public void testTypeParameterVsNested() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/typeParameterVsNested.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/typeParameterVsNested.kt"); } @TestMetadata("typeParameters.kt") public void testTypeParameters() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/typeParameters.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/typeParameters.kt"); } @TestMetadata("where.kt") public void testWhere() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/where.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/where.kt"); } } - @TestMetadata("compiler/fir/psi2fir/testData/rawBuilder/expressions") + @TestMetadata("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Expressions extends AbstractPsiVisualizer { @@ -160,152 +160,152 @@ public class PsiVisualizerForRawFirDataGenerated extends AbstractPsiVisualizer { } public void testAllFilesPresentInExpressions() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/psi2fir/testData/rawBuilder/expressions"), Pattern.compile("^(.+)\\.kt$"), null, true); + KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions"), Pattern.compile("^(.+)\\.kt$"), null, true); } @TestMetadata("annotated.kt") public void testAnnotated() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/annotated.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/annotated.kt"); } @TestMetadata("arrayAccess.kt") public void testArrayAccess() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/arrayAccess.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/arrayAccess.kt"); } @TestMetadata("arrayAssignment.kt") public void testArrayAssignment() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/arrayAssignment.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/arrayAssignment.kt"); } @TestMetadata("branches.kt") public void testBranches() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/branches.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/branches.kt"); } @TestMetadata("callableReferences.kt") public void testCallableReferences() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/callableReferences.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/callableReferences.kt"); } @TestMetadata("calls.kt") public void testCalls() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/calls.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/calls.kt"); } @TestMetadata("classReference.kt") public void testClassReference() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/classReference.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/classReference.kt"); } @TestMetadata("collectionLiterals.kt") public void testCollectionLiterals() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/collectionLiterals.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/collectionLiterals.kt"); } @TestMetadata("destructuring.kt") public void testDestructuring() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/destructuring.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/destructuring.kt"); } @TestMetadata("for.kt") public void testFor() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/for.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/for.kt"); } @TestMetadata("genericCalls.kt") public void testGenericCalls() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/genericCalls.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/genericCalls.kt"); } @TestMetadata("in.kt") public void testIn() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/in.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/in.kt"); } @TestMetadata("inBrackets.kt") public void testInBrackets() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/inBrackets.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/inBrackets.kt"); } @TestMetadata("init.kt") public void testInit() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/init.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/init.kt"); } @TestMetadata("lambda.kt") public void testLambda() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/lambda.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/lambda.kt"); } @TestMetadata("lambdaAndAnonymousFunction.kt") public void testLambdaAndAnonymousFunction() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/lambdaAndAnonymousFunction.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/lambdaAndAnonymousFunction.kt"); } @TestMetadata("locals.kt") public void testLocals() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/locals.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/locals.kt"); } @TestMetadata("modifications.kt") public void testModifications() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/modifications.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/modifications.kt"); } @TestMetadata("namedArgument.kt") public void testNamedArgument() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/namedArgument.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/namedArgument.kt"); } @TestMetadata("nullability.kt") public void testNullability() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/nullability.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/nullability.kt"); } @TestMetadata("qualifierWithTypeArguments.kt") public void testQualifierWithTypeArguments() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/qualifierWithTypeArguments.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/qualifierWithTypeArguments.kt"); } @TestMetadata("simpleReturns.kt") public void testSimpleReturns() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/simpleReturns.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/simpleReturns.kt"); } @TestMetadata("super.kt") public void testSuper() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/super.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/super.kt"); } @TestMetadata("these.kt") public void testThese() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/these.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/these.kt"); } @TestMetadata("try.kt") public void testTry() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/try.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/try.kt"); } @TestMetadata("typeOperators.kt") public void testTypeOperators() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/typeOperators.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/typeOperators.kt"); } @TestMetadata("unary.kt") public void testUnary() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/unary.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/unary.kt"); } @TestMetadata("variables.kt") public void testVariables() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/variables.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/variables.kt"); } @TestMetadata("while.kt") public void testWhile() throws Exception { - runTest("compiler/fir/psi2fir/testData/rawBuilder/expressions/while.kt"); + runTest("compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/while.kt"); } } } diff --git a/idea/idea-core/build.gradle.kts b/idea/idea-core/build.gradle.kts index c4ef858bca9..4ce1268fdb8 100644 --- a/idea/idea-core/build.gradle.kts +++ b/idea/idea-core/build.gradle.kts @@ -19,7 +19,7 @@ dependencies { compile(project(":kotlin-util-klib-metadata")) compile(project(":plugins:android-extensions-compiler")) compile(project(":kotlin-scripting-compiler-impl")) - compile(project(":compiler:fir:psi2fir")) + compile(project(":compiler:fir:raw-fir:psi2fir")) compile(project(":compiler:fir:fir2ir")) compile(project(":compiler:fir:resolve")) compile(project(":compiler:fir:checkers")) diff --git a/idea/testData/gradle/highlighting/complexBuildGradleKts/build.gradle.kts b/idea/testData/gradle/highlighting/complexBuildGradleKts/build.gradle.kts index 94128aa439a..6721db3cdd1 100644 --- a/idea/testData/gradle/highlighting/complexBuildGradleKts/build.gradle.kts +++ b/idea/testData/gradle/highlighting/complexBuildGradleKts/build.gradle.kts @@ -116,7 +116,7 @@ extra["compilerModules"] = arrayOf( ":compiler:fir:cones", ":compiler:fir:resolve", ":compiler:fir:tree", - ":compiler:fir:psi2fir", + ":compiler:fir:raw-fir:psi2fir", ":compiler:fir:fir2ir", ":compiler:fir:java", ":compiler:fir:jvm", diff --git a/prepare/idea-plugin/build.gradle.kts b/prepare/idea-plugin/build.gradle.kts index ea4c237c58a..b49bcbe718f 100644 --- a/prepare/idea-plugin/build.gradle.kts +++ b/prepare/idea-plugin/build.gradle.kts @@ -49,7 +49,7 @@ val projectsToShadow by extra(listOf( ":compiler:fir:tree", ":compiler:fir:java", ":compiler:fir:jvm", - ":compiler:fir:psi2fir", + ":compiler:fir:raw-fir:psi2fir", ":compiler:fir:fir2ir", ":compiler:fir:fir2ir:jvm-backend", ":compiler:frontend", diff --git a/settings.gradle b/settings.gradle index a77804552a4..3080203463f 100644 --- a/settings.gradle +++ b/settings.gradle @@ -80,8 +80,9 @@ include ":kotlin-build-common", ":compiler:fir:cones", ":compiler:fir:tree", ":compiler:fir:tree:tree-generator", - ":compiler:fir:psi2fir", - ":compiler:fir:lightTree", + ":compiler:fir:raw-fir:common", + ":compiler:fir:raw-fir:psi2fir", + ":compiler:fir:raw-fir:light-tree2fir", ":compiler:fir:fir2ir", ":compiler:fir:fir2ir:jvm-backend", ":compiler:fir:resolve",