FIR: Add some absent "replace" methods for callable declarations

It's necessary to avoid copying lambdas in LambdaAnalyzerImpl
This commit is contained in:
Denis Zharkov
2020-02-04 12:12:40 +03:00
parent c3e900b945
commit 8d24e0f842
18 changed files with 84 additions and 2 deletions
@@ -71,7 +71,7 @@ object NodeConfigurator : AbstractFieldConfigurator<FirTreeBuilder>(FirTreeBuild
callableDeclaration.configure {
withArg("F", "FirCallableDeclaration<F>")
parentArg(symbolOwner, "E", "F")
+field("receiverTypeRef", typeRef, nullable = true).withTransform()
+field("receiverTypeRef", typeRef, nullable = true, withReplace = true).withTransform()
+symbol("FirCallableSymbol", "F")
}
@@ -86,7 +86,7 @@ object NodeConfigurator : AbstractFieldConfigurator<FirTreeBuilder>(FirTreeBuild
parentArg(callableDeclaration, "F", "F")
+controlFlowGraphReferenceField.withTransform()
+symbol("FirFunctionSymbol", "F")
+valueParameters.withTransform()
+fieldList(valueParameter, withReplace = true).withTransform()
+body(nullable = true)
}