State Initializer First Transformer
class StateInitializerFirstTransformer(context: IrPluginContext, messageCollector: MessageCollector, tables: IrInvalidationTraceTableHolder) : ComposeInvestigatorBaseLower
Transforms the code to add the use of ComposableInvalidationTraceTable#registerStateObject
in the definition of State
or StateObject
.
Original
@Composable fun MyComposable() {
val myState = remember { mutableStateOf(0) }
val myStateObject by remember { mutableStateMapOf(0 to 0) }
}
Content copied to clipboard
Transformed
@Composable fun MyComposable() {
val myState = remember { mutableStateOf(0) }.also { state ->
currentComposableInvalidationTracer.registerStateObject(state, name = "myState")
}
val myStateObject by remember { mutableStateMapOf(0 to 0) }.also { stateObject ->
currentComposableInvalidationTracer.registerStateObject(stateObject, name = "myStateObject")
}
}
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(context: IrPluginContext, messageCollector: MessageCollector, tables: IrInvalidationTraceTableHolder)
Functions
Link copied to clipboard
override fun visitAnonymousInitializer(declaration: IrAnonymousInitializer, data: Nothing?): IrStatement
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
override fun visitConstantPrimitive(expression: IrConstantPrimitive, data: Nothing?): IrConstantValue
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
override fun visitContainerExpression(expression: IrContainerExpression, data: Nothing?): IrExpression
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
override fun visitDeclarationReference(expression: IrDeclarationReference, data: Nothing?): IrExpression
Link copied to clipboard
override fun visitDelegatingConstructorCall(expression: IrDelegatingConstructorCall, data: Nothing?): IrElement
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
override fun visitDynamicMemberExpression(expression: IrDynamicMemberExpression, data: Nothing?): IrExpression
Link copied to clipboard
override fun visitDynamicOperatorExpression(expression: IrDynamicOperatorExpression, data: Nothing?): IrExpression
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
override fun visitErrorCallExpression(expression: IrErrorCallExpression, data: Nothing?): IrExpression
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun visitExternalPackageFragment(declaration: IrExternalPackageFragment): IrExternalPackageFragment
override fun visitExternalPackageFragment(declaration: IrExternalPackageFragment, data: Nothing?): IrExternalPackageFragment
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
override fun visitInlinedFunctionBlock(inlinedBlock: IrInlinedFunctionBlock, data: Nothing?): IrExpression
Link copied to clipboard
override fun visitInstanceInitializerCall(expression: IrInstanceInitializerCall, data: Nothing?): IrExpression
Link copied to clipboard
override fun visitLocalDelegatedProperty(declaration: IrLocalDelegatedProperty, data: Nothing?): IrStatement
Link copied to clipboard
open fun visitLocalDelegatedPropertyReference(expression: IrLocalDelegatedPropertyReference): IrExpression
override fun visitLocalDelegatedPropertyReference(expression: IrLocalDelegatedPropertyReference, data: Nothing?): IrElement
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
override fun visitRawFunctionReference(expression: IrRawFunctionReference, data: Nothing?): IrExpression
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
override fun visitStringConcatenation(expression: IrStringConcatenation, data: Nothing?): IrExpression
Link copied to clipboard
override fun visitSuspendableExpression(expression: IrSuspendableExpression, data: Nothing?): IrExpression
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard