[IR] Autogenerate IrScriptImpl

^KT-65773 In Progress
This commit is contained in:
Wojciech Litewka
2024-02-16 12:47:08 +01:00
committed by Space Team
parent f30f2216cc
commit 97e2dab9f0
5 changed files with 57 additions and 22 deletions
@@ -98,7 +98,14 @@ object ImplementationConfigurator : AbstractIrTreeImplementationConfigurator() {
}
impl(script) {
implementation.doPrint = false
implementation.putImplementationOptInInConstructor = false
implementation.constructorParameterOrderOverride = listOf("symbol", "name", "factory", "startOffset", "endOffset")
defaultNull(
"thisReceiver", "baseClass", "resultProperty", "earlierScriptsParameter",
"importedScripts", "earlierScripts", "targetClass", "constructor"
)
isLateinit("explicitCallParameters", "implicitReceiversParameters", "providedProperties", "providedPropertiesParameters")
default("origin", "SCRIPT_ORIGIN")
}
impl(moduleFragment) {
@@ -537,6 +537,7 @@ object IrTree : AbstractTreeBuilder() {
parent(metadataSourceOwner)
+symbol(scriptSymbolType)
+descriptor("ScriptDescriptor")
// NOTE: is the result of the FE conversion, because there script interpreted as a class and has receiver
// TODO: consider removing from here and handle appropriately in the lowering
+field("thisReceiver", valueParameter, nullable = true) // K1