[IR] KotlinLikeDumper: add more TODOs and remove some obsolete ones
This commit is contained in:
committed by
teamcityserver
parent
bf20720590
commit
a128cdc99c
@@ -993,7 +993,6 @@ private class KotlinLikeDumper(val p: Printer, val options: KotlinLikeDumpOption
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun IrFieldAccessExpression.printFieldAccess(data: IrDeclaration?) {
|
private fun IrFieldAccessExpression.printFieldAccess(data: IrDeclaration?) {
|
||||||
// TODO type
|
|
||||||
// TODO is not valid kotlin
|
// TODO is not valid kotlin
|
||||||
receiver?.accept(this@KotlinLikeDumper, data)
|
receiver?.accept(this@KotlinLikeDumper, data)
|
||||||
superQualifierSymbol?.let {
|
superQualifierSymbol?.let {
|
||||||
@@ -1012,6 +1011,7 @@ private class KotlinLikeDumper(val p: Printer, val options: KotlinLikeDumpOption
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun visitReturn(expression: IrReturn, data: IrDeclaration?) {
|
override fun visitReturn(expression: IrReturn, data: IrDeclaration?) {
|
||||||
|
// TODO label
|
||||||
p.printWithNoIndent("return ")
|
p.printWithNoIndent("return ")
|
||||||
expression.value.accept(this, data)
|
expression.value.accept(this, data)
|
||||||
}
|
}
|
||||||
@@ -1022,7 +1022,6 @@ private class KotlinLikeDumper(val p: Printer, val options: KotlinLikeDumpOption
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun visitStringConcatenation(expression: IrStringConcatenation, data: IrDeclaration?) {
|
override fun visitStringConcatenation(expression: IrStringConcatenation, data: IrDeclaration?) {
|
||||||
// TODO type
|
|
||||||
// TODO escape? see IrTextTestCaseGenerated.Expressions#testStringTemplates
|
// TODO escape? see IrTextTestCaseGenerated.Expressions#testStringTemplates
|
||||||
// TODO optionally each argument at a separate line, another option add a wrapping
|
// TODO optionally each argument at a separate line, another option add a wrapping
|
||||||
expression.arguments.forEachIndexed { i, e ->
|
expression.arguments.forEachIndexed { i, e ->
|
||||||
@@ -1054,6 +1053,7 @@ private class KotlinLikeDumper(val p: Printer, val options: KotlinLikeDumpOption
|
|||||||
|
|
||||||
override fun visitVararg(expression: IrVararg, data: IrDeclaration?) {
|
override fun visitVararg(expression: IrVararg, data: IrDeclaration?) {
|
||||||
// TODO ???
|
// TODO ???
|
||||||
|
// TODO varargElementType
|
||||||
p.printWithNoIndent("[")
|
p.printWithNoIndent("[")
|
||||||
expression.elements.forEachIndexed { i, e ->
|
expression.elements.forEachIndexed { i, e ->
|
||||||
if (i > 0) p.printWithNoIndent(", ")
|
if (i > 0) p.printWithNoIndent(", ")
|
||||||
@@ -1068,6 +1068,7 @@ private class KotlinLikeDumper(val p: Printer, val options: KotlinLikeDumpOption
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun visitDeclarationReference(expression: IrDeclarationReference, data: IrDeclaration?) {
|
override fun visitDeclarationReference(expression: IrDeclarationReference, data: IrDeclaration?) {
|
||||||
|
// TODO support
|
||||||
super.visitDeclarationReference(expression, data)
|
super.visitDeclarationReference(expression, data)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1077,7 +1078,6 @@ private class KotlinLikeDumper(val p: Printer, val options: KotlinLikeDumpOption
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun visitGetValue(expression: IrGetValue, data: IrDeclaration?) {
|
override fun visitGetValue(expression: IrGetValue, data: IrDeclaration?) {
|
||||||
// TODO support `this` and receiver
|
|
||||||
p.printWithNoIndent(expression.symbol.owner.name.asString())
|
p.printWithNoIndent(expression.symbol.owner.name.asString())
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1093,6 +1093,13 @@ private class KotlinLikeDumper(val p: Printer, val options: KotlinLikeDumpOption
|
|||||||
|
|
||||||
override fun visitCallableReference(expression: IrCallableReference<*>, data: IrDeclaration?) {
|
override fun visitCallableReference(expression: IrCallableReference<*>, data: IrDeclaration?) {
|
||||||
// TODO check
|
// TODO check
|
||||||
|
/*
|
||||||
|
TODO
|
||||||
|
dispatchReceiver
|
||||||
|
extensionReceiver
|
||||||
|
getTypeArgument
|
||||||
|
getValueArgument
|
||||||
|
*/
|
||||||
p.printWithNoIndent("::")
|
p.printWithNoIndent("::")
|
||||||
p.printWithNoIndent(expression.referencedName.asString())
|
p.printWithNoIndent(expression.referencedName.asString())
|
||||||
}
|
}
|
||||||
@@ -1126,6 +1133,7 @@ private class KotlinLikeDumper(val p: Printer, val options: KotlinLikeDumpOption
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun visitWhen(expression: IrWhen, data: IrDeclaration?) {
|
override fun visitWhen(expression: IrWhen, data: IrDeclaration?) {
|
||||||
|
// TODO print if when possible?
|
||||||
p.printlnWithNoIndent("when {")
|
p.printlnWithNoIndent("when {")
|
||||||
p.pushIndent()
|
p.pushIndent()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user