Invalidation Process Tracing First Transformer
class InvalidationProcessTracingFirstTransformer(context: IrPluginContext, messageCollector: MessageCollector, tables: IrInvalidationTraceTableHolder, stabilityInferencer: StabilityInferencer) : ComposeInvestigatorBaseLower
Generate code to find and report value arguments whose values have changed whenever a Composable function becomes (re)composed.
Original
@Composable fun DisplayPlusResult(a: Int, b: Int) {
Text((a + b).toString())
}
Content copied to clipboard
Transformed
@Composable fun DisplayPlusResult(a: Int, b: Int) {
val currentValueArguments = listOf(
ValueArgument(
name = "a",
type = "kotlin.Int",
valueString = a.toString(),
valueHashCode = a.hashCode(),
stability = Stability.Stable,
),
ValueArgument(
name = "b",
type = "kotlin.Int",
valueString = b.toString(),
valueHashCode = b.hashCode(),
stability = Stability.Stable,
),
)
val affectedComposable = ComposableInformation(
name = "DisplayPlusResult",
packageName = "land.sungbin.composeinvestigator.sample",
fileName = "DisplayPlusResult.kt",
compoundKey = androidx.compose.runtime.currentCompositeKeyHash,
)
val invalidationReason = currentComposableInvalidationTracer.computeInvalidationReason(
keyName = "fun-DisplayPlusResult(Int,Int)Unit... (truncated)",
compoundKey = androidx.compose.runtime.currentCompositeKeyHash,
arguments = currentValueArguments,
)
ComposeInvestigator.logger.log(affectedComposable, invalidationReason)
Text((a + b).toString())
}
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(context: IrPluginContext, messageCollector: MessageCollector, tables: IrInvalidationTraceTableHolder, stabilityInferencer: StabilityInferencer)
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