[IR] KotlinLikeDumper: minor, collapse an if to helper function and add few more todos

This commit is contained in:
Zalim Bashorov
2020-11-23 16:19:08 +03:00
committed by teamcityserver
parent c68040753d
commit f8690d0395
@@ -27,7 +27,9 @@ class KotlinLikeDumpOptions(
val printRegionsPerFile: Boolean = false, val printRegionsPerFile: Boolean = false,
val printFileName: Boolean = true, val printFileName: Boolean = true,
val printFilePath: Boolean = true, val printFilePath: Boolean = true,
// TODO support
val useNamedArguments: Boolean = false, val useNamedArguments: Boolean = false,
// TODO support
val labelPrintingStrategy: LabelPrintingStrategy = LabelPrintingStrategy.NEVER, val labelPrintingStrategy: LabelPrintingStrategy = LabelPrintingStrategy.NEVER,
val printFakeOverridesStrategy: FakeOverridesStrategy = FakeOverridesStrategy.ALL, val printFakeOverridesStrategy: FakeOverridesStrategy = FakeOverridesStrategy.ALL,
/* /*
@@ -302,9 +304,7 @@ private class KotlinLikeDumper(val p: Printer, val options: KotlinLikeDumpOption
} }
private fun Variance.printVarianceWithNoIndent() { private fun Variance.printVarianceWithNoIndent() {
if (this != Variance.INVARIANT) { p(this, Variance.INVARIANT) { label }
p.printWithNoIndent("$label ")
}
} }
private fun IrAnnotationContainer.printAnnotationsWithNoIndent() { private fun IrAnnotationContainer.printAnnotationsWithNoIndent() {
@@ -967,6 +967,7 @@ private class KotlinLikeDumper(val p: Printer, val options: KotlinLikeDumpOption
) { ) {
// TODO flag to omit comment block? // TODO flag to omit comment block?
val delegatingClass = symbol.owner.parentAsClass val delegatingClass = symbol.owner.parentAsClass
// TODO don't crash when parent isn't class
val currentClass = data?.parentAsClass val currentClass = data?.parentAsClass
val delegatingClassName = delegatingClass.name.asString() val delegatingClassName = delegatingClass.name.asString()