mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 06:50:54 +07:00
[debugger] Fix statistics about evaluator compilation failures
Fixed evaluation.result event. Note, the statistics were correct for the analysis.compilation.result IDEA-366380 (cherry picked from commit 90b8f35bc6b9e8c08ef06b965088c509fc17d3c0) Merge-request: IJ-MR-153908 Merged-by: Alexey Merkulov <alexey.merkulov@jetbrains.com> GitOrigin-RevId: 47c80ce393305490a467cba3cd743f8b6c343218
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d43fe4c2e4
commit
c8080e5f06
@@ -22,6 +22,8 @@ import org.jetbrains.kotlin.resolve.jvm.diagnostics.ErrorsJvm
|
||||
import java.util.*
|
||||
|
||||
class K1KotlinCodeFragmentCompiler : KotlinCodeFragmentCompiler {
|
||||
override val compilerType: CompilerType = CompilerType.IR
|
||||
|
||||
override fun compileCodeFragment(
|
||||
context: ExecutionContext,
|
||||
codeFragment: KtCodeFragment
|
||||
|
||||
@@ -32,6 +32,8 @@ import org.jetbrains.kotlin.psi.KtOperationReferenceExpression
|
||||
import java.util.concurrent.ExecutionException
|
||||
|
||||
interface KotlinCodeFragmentCompiler {
|
||||
val compilerType: CompilerType
|
||||
|
||||
fun compileCodeFragment(context: ExecutionContext, codeFragment: KtCodeFragment): CompiledCodeFragmentData
|
||||
|
||||
companion object {
|
||||
@@ -40,6 +42,8 @@ interface KotlinCodeFragmentCompiler {
|
||||
}
|
||||
|
||||
class K2KotlinCodeFragmentCompiler : KotlinCodeFragmentCompiler {
|
||||
override val compilerType: CompilerType = CompilerType.K2
|
||||
|
||||
@OptIn(KaExperimentalApi::class)
|
||||
override fun compileCodeFragment(
|
||||
context: ExecutionContext,
|
||||
|
||||
@@ -139,7 +139,12 @@ class KotlinEvaluator(val codeFragment: KtCodeFragment, private val sourcePositi
|
||||
is EvaluateException -> StatisticsEvaluationResult.COMPILER_INTERNAL_ERROR
|
||||
else -> StatisticsEvaluationResult.UNCLASSIFIED_COMPILATION_PROBLEM
|
||||
}
|
||||
KotlinDebuggerEvaluatorStatisticsCollector.logEvaluationResult(codeFragment.project, evaluationResultValue, CompilerType.K2, context.evaluationContext.origin)
|
||||
KotlinDebuggerEvaluatorStatisticsCollector.logEvaluationResult(
|
||||
codeFragment.project,
|
||||
evaluationResultValue,
|
||||
KotlinCodeFragmentCompiler.getInstance().compilerType,
|
||||
context.evaluationContext.origin
|
||||
)
|
||||
}
|
||||
throw e
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user