Don't mark compiler-created PSI elements as generated

This saves some memory on storing the generated flag in the PsiElement
userdata and time required to store the flag.
This commit is contained in:
Dmitry Jemerov
2017-03-21 17:53:58 +01:00
parent dc3aa26e3f
commit 3c7678092e
14 changed files with 26 additions and 18 deletions
@@ -161,6 +161,6 @@ object CodegenUtil {
val fakeFunctionCall = StringBuilder("callableReferenceFakeCall(")
fakeFunctionCall.append(referencedFunction.valueParameters.map { "p${it.index}" }.joinToString(", "))
fakeFunctionCall.append(")")
return KtPsiFactory(project).createExpression(fakeFunctionCall.toString()) as KtCallExpression
return KtPsiFactory(project, markGenerated = false).createExpression(fakeFunctionCall.toString()) as KtCallExpression
}
}