[FIR] Implement IR body generators for all FIR declarations generators in plugin prototype
This commit is contained in:
committed by
TeamCityServer
parent
9a0e73e132
commit
86404b8027
@@ -187,6 +187,8 @@ class NaiveSourceBasedFileEntryImpl(
|
||||
override val name: String,
|
||||
private val lineStartOffsets: IntArray = intArrayOf()
|
||||
) : IrFileEntry {
|
||||
val lineStartOffsetsAreEmpty: Boolean
|
||||
get() = lineStartOffsets.isEmpty()
|
||||
|
||||
private val MAX_SAVED_LINE_NUMBERS = 50
|
||||
|
||||
@@ -254,4 +256,4 @@ inline fun MemberScope.findFirstFunction(name: String, predicate: (CallableMembe
|
||||
|
||||
fun filterOutAnnotations(fqName: FqName, annotations: List<IrConstructorCall>): List<IrConstructorCall> {
|
||||
return annotations.filterNot { it.annotationClass.hasEqualFqName(fqName) }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,6 +42,11 @@ fun IrFile.dumpTreesFromLineNumber(lineNumber: Int, normalizeNames: Boolean = fa
|
||||
return sb.toString()
|
||||
}
|
||||
|
||||
fun IrFile.shouldSkipDump(): Boolean {
|
||||
val entry = fileEntry as? NaiveSourceBasedFileEntryImpl ?: return false
|
||||
return entry.lineStartOffsetsAreEmpty
|
||||
}
|
||||
|
||||
class DumpIrTreeVisitor(
|
||||
out: Appendable,
|
||||
normalizeNames: Boolean = false,
|
||||
|
||||
Reference in New Issue
Block a user