KE2: Remove the declaration stack for now

Lets see if we still need it in KE2, or if there's a simpler way.
This commit is contained in:
Ian Lynagh
2024-09-26 14:38:35 +01:00
parent 52934ee5db
commit 0c2aedbb55
3 changed files with 4 additions and 6 deletions

View File

@@ -554,7 +554,6 @@ private fun doFile(
KotlinFileExtractor(
logger,
sftw,
KotlinFileExtractor.DeclarationStack()
/*
OLD: KE1
linesOfCode,

View File

@@ -87,7 +87,6 @@ context (KaSession)
open class KotlinFileExtractor(
override val logger: FileLogger,
override val tw: FileTrapWriter,
val declarationStack: DeclarationStack,
/*
OLD: KE1
val linesOfCode: LinesOfCode?,
@@ -8914,7 +8913,6 @@ OLD: KE1
}
}
*/
inner class DeclarationStackAdjuster(
val declaration: KaDeclarationSymbol,
val overriddenAttributes: OverriddenFunctionAttributes? = null
@@ -8944,6 +8942,7 @@ OLD: KE1
fun findOverriddenAttributes(f: KaFunctionSymbol) = stack.lastOrNull { it.first == f }?.second
}
*/
data class OverriddenFunctionAttributes(
val id: Label<out DbCallable>? = null,

View File

@@ -23,7 +23,7 @@ fun KotlinFileExtractor.extractClassSource(
*/
): Label<out DbClassorinterface> {
with("class source", c.psiSafe() ?: TODO()) {
DeclarationStackAdjuster(c).use {
// OLD: KE1: DeclarationStackAdjuster(c).use {
val id = useClassSource(c)
val pkg = c.classId?.packageFqName?.asString() ?: ""
val cls =
@@ -182,7 +182,7 @@ fun KotlinFileExtractor.extractClassSource(
*/
return id
}
// }
}
}
@@ -373,4 +373,4 @@ fun KotlinUsesExtractor.useType(t: KaType, context: TypeContext = TypeContext.OT
}
}
*/
}
}