[JS] Use just analysis results in js ir tests

This commit is contained in:
Ilya Goncharov
2023-06-14 15:19:35 +02:00
committed by Space Team
parent 5cf0fd116f
commit de3f57cbdf
2 changed files with 14 additions and 16 deletions
@@ -319,22 +319,18 @@ class ClassicFrontendFacade(
val friendLibraries = getDependencies(module, testServices, DependencyRelation.FriendDependency)
val allDependencies = runtimeKlibs + dependencyDescriptors + friendLibraries + friendsDescriptors + transitiveLibraries
val analyzer = AnalyzerWithCompilerReport(configuration)
val builtInModuleDescriptor = allDependencies.firstNotNullOfOrNull { it.builtIns }?.builtInsModule
analyzer.analyzeAndReport(files) {
TopDownAnalyzerFacadeForJSIR.analyzeFiles(
files,
project,
configuration,
allDependencies,
friendsDescriptors + friendLibraries,
compilerEnvironment,
thisIsBuiltInsModule = builtInModuleDescriptor == null,
customBuiltInsModule = builtInModuleDescriptor
)
}
return analyzer.analysisResult
return TopDownAnalyzerFacadeForJSIR.analyzeFiles(
files,
project,
configuration,
allDependencies,
friendsDescriptors + friendLibraries,
compilerEnvironment,
thisIsBuiltInsModule = builtInModuleDescriptor == null,
customBuiltInsModule = builtInModuleDescriptor
)
}
private fun performWasmModuleResolve(
@@ -10,8 +10,9 @@ import org.jetbrains.kotlin.test.TargetBackend
import org.jetbrains.kotlin.test.builders.TestConfigurationBuilder
import org.jetbrains.kotlin.test.builders.classicFrontendHandlersStep
import org.jetbrains.kotlin.test.builders.classicFrontendStep
import org.jetbrains.kotlin.test.directives.ConfigurationDirectives
import org.jetbrains.kotlin.test.directives.DiagnosticsDirectives
import org.jetbrains.kotlin.test.directives.JvmEnvironmentConfigurationDirectives
import org.jetbrains.kotlin.test.frontend.classic.ClassicFrontendFacade
import org.jetbrains.kotlin.test.frontend.classic.handlers.ClassicDiagnosticsHandler
import org.jetbrains.kotlin.test.frontend.classic.handlers.DeclarationsDumpHandler
import org.jetbrains.kotlin.test.frontend.classic.handlers.DynamicCallsDumpHandler
@@ -34,6 +35,7 @@ abstract class AbstractDiagnosticsTestWithJsStdLib : AbstractKotlinCompilerTest(
}
defaultDirectives {
+ConfigurationDirectives.WITH_STDLIB
+JvmEnvironmentConfigurationDirectives.USE_PSI_CLASS_FILES_READING
}
@@ -61,4 +63,4 @@ abstract class AbstractDiagnosticsTestWithJsStdLib : AbstractKotlinCompilerTest(
)
}
}
}
}