[IR] Push default values from base to implementation classes

The default value of those properties is a detail that should be handled
 by implementation or builder layer.

 This change will also simplify auto-generating and reasoning about
 generated implementation classes, and allow for potential further
 enhancements like intercepting all mutations.

^KT-65773 In Progress
This commit is contained in:
Wojciech Litewka
2024-02-13 15:41:29 +01:00
committed by Space Team
parent 5921706a15
commit 83bc12949b
58 changed files with 269 additions and 84 deletions
@@ -15,6 +15,7 @@ import org.jetbrains.kotlin.ir.IrStatement
import org.jetbrains.kotlin.ir.UNDEFINED_OFFSET
import org.jetbrains.kotlin.ir.backend.js.JsCommonBackendContext
import org.jetbrains.kotlin.ir.backend.js.ir.JsIrBuilder
import org.jetbrains.kotlin.ir.declarations.IrAttributeContainer
import org.jetbrains.kotlin.ir.declarations.IrSimpleFunction
import org.jetbrains.kotlin.ir.declarations.IrVariable
import org.jetbrains.kotlin.ir.expressions.*
@@ -52,6 +53,9 @@ class IrDispatchPoint(val target: SuspendState) : IrExpression() {
set(value) {
target.entryBlock.type = value
}
override var attributeOwnerId: IrAttributeContainer = this
override var originalBeforeInline: IrAttributeContainer? = null
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D) = visitor.visitExpression(this, data)
}