InvalidationProcessTracingFirstTransformer

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())
}

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())
}

Constructors

constructor(context: IrPluginContext, messageCollector: MessageCollector, tables: IrInvalidationTraceTableHolder, stabilityInferencer: StabilityInferencer)

Functions

Link copied to clipboard
override fun visitAnonymousInitializer(declaration: IrAnonymousInitializer): IrStatement
override fun visitAnonymousInitializer(declaration: IrAnonymousInitializer, data: Nothing?): IrStatement
Link copied to clipboard
open fun visitAnonymousInitializerNew(declaration: IrAnonymousInitializer): IrStatement
Link copied to clipboard
open fun visitBlock(expression: IrBlock): IrExpression
override fun visitBlock(expression: IrBlock, data: Nothing?): IrExpression
Link copied to clipboard
open fun visitBlockBody(body: IrBlockBody): IrBody
override fun visitBlockBody(body: IrBlockBody, data: Nothing?): IrBody
Link copied to clipboard
open fun visitBody(body: IrBody): IrBody
override fun visitBody(body: IrBody, data: Nothing?): IrBody
Link copied to clipboard
open fun visitBranch(branch: IrBranch): IrBranch
override fun visitBranch(branch: IrBranch, data: Nothing?): IrBranch
Link copied to clipboard
open fun visitBreak(jump: IrBreak): IrExpression
override fun visitBreak(jump: IrBreak, data: Nothing?): IrExpression
Link copied to clipboard
open fun visitBreakContinue(jump: IrBreakContinue): IrExpression
override fun visitBreakContinue(jump: IrBreakContinue, data: Nothing?): IrExpression
Link copied to clipboard
override fun visitCall(expression: IrCall): IrExpression
override fun visitCall(expression: IrCall, data: Nothing?): IrElement
Link copied to clipboard
open fun visitCallableReference(expression: IrCallableReference<*>): IrExpression
override fun visitCallableReference(expression: IrCallableReference<*>, data: Nothing?): IrElement
Link copied to clipboard
open fun visitCatch(aCatch: IrCatch): IrCatch
override fun visitCatch(aCatch: IrCatch, data: Nothing?): IrCatch
Link copied to clipboard
override fun visitClass(declaration: IrClass): IrStatement
override fun visitClass(declaration: IrClass, data: Nothing?): IrStatement
Link copied to clipboard
open fun visitClassNew(declaration: IrClass): IrStatement
Link copied to clipboard
open fun visitClassReference(expression: IrClassReference): IrExpression
override fun visitClassReference(expression: IrClassReference, data: Nothing?): IrExpression
Link copied to clipboard
open fun visitComposite(expression: IrComposite): IrExpression
override fun visitComposite(expression: IrComposite, data: Nothing?): IrExpression
Link copied to clipboard
open fun visitConst(expression: IrConst): IrExpression
override fun visitConst(expression: IrConst, data: Nothing?): IrExpression
Link copied to clipboard
open fun visitConstantArray(expression: IrConstantArray): IrConstantValue
override fun visitConstantArray(expression: IrConstantArray, data: Nothing?): IrConstantValue
Link copied to clipboard
open fun visitConstantObject(expression: IrConstantObject): IrConstantValue
override fun visitConstantObject(expression: IrConstantObject, data: Nothing?): IrConstantValue
Link copied to clipboard
open fun visitConstantPrimitive(expression: IrConstantPrimitive): IrConstantValue
override fun visitConstantPrimitive(expression: IrConstantPrimitive, data: Nothing?): IrConstantValue
Link copied to clipboard
open fun visitConstantValue(expression: IrConstantValue): IrConstantValue
override fun visitConstantValue(expression: IrConstantValue, data: Nothing?): IrConstantValue
Link copied to clipboard
open fun visitConstructor(declaration: IrConstructor): IrStatement
override fun visitConstructor(declaration: IrConstructor, data: Nothing?): IrStatement
Link copied to clipboard
open fun visitConstructorCall(expression: IrConstructorCall): IrExpression
override fun visitConstructorCall(expression: IrConstructorCall, data: Nothing?): IrElement
Link copied to clipboard
open fun visitContainerExpression(expression: IrContainerExpression): IrExpression
override fun visitContainerExpression(expression: IrContainerExpression, data: Nothing?): IrExpression
Link copied to clipboard
open fun visitContinue(jump: IrContinue): IrExpression
override fun visitContinue(jump: IrContinue, data: Nothing?): IrExpression
Link copied to clipboard
open fun visitDeclaration(declaration: IrDeclarationBase): IrStatement
override fun visitDeclaration(declaration: IrDeclarationBase, data: Nothing?): IrStatement
Link copied to clipboard
open fun visitDeclarationReference(expression: IrDeclarationReference): IrExpression
override fun visitDeclarationReference(expression: IrDeclarationReference, data: Nothing?): IrExpression
Link copied to clipboard
open fun visitDelegatingConstructorCall(expression: IrDelegatingConstructorCall): IrExpression
override fun visitDelegatingConstructorCall(expression: IrDelegatingConstructorCall, data: Nothing?): IrElement
Link copied to clipboard
open fun visitDoWhileLoop(loop: IrDoWhileLoop): IrExpression
override fun visitDoWhileLoop(loop: IrDoWhileLoop, data: Nothing?): IrExpression
Link copied to clipboard
open fun visitDynamicExpression(expression: IrDynamicExpression): IrExpression
override fun visitDynamicExpression(expression: IrDynamicExpression, data: Nothing?): IrExpression
Link copied to clipboard
open fun visitDynamicMemberExpression(expression: IrDynamicMemberExpression): IrExpression
override fun visitDynamicMemberExpression(expression: IrDynamicMemberExpression, data: Nothing?): IrExpression
Link copied to clipboard
open fun visitDynamicOperatorExpression(expression: IrDynamicOperatorExpression): IrExpression
override fun visitDynamicOperatorExpression(expression: IrDynamicOperatorExpression, data: Nothing?): IrExpression
Link copied to clipboard
open fun visitElement(element: IrElement): IrElement
override fun visitElement(element: IrElement, data: Nothing?): IrElement
Link copied to clipboard
open fun visitElseBranch(branch: IrElseBranch): IrElseBranch
override fun visitElseBranch(branch: IrElseBranch, data: Nothing?): IrElseBranch
Link copied to clipboard
open fun visitEnumConstructorCall(expression: IrEnumConstructorCall): IrExpression
override fun visitEnumConstructorCall(expression: IrEnumConstructorCall, data: Nothing?): IrElement
Link copied to clipboard
open fun visitEnumEntry(declaration: IrEnumEntry): IrStatement
override fun visitEnumEntry(declaration: IrEnumEntry, data: Nothing?): IrStatement
Link copied to clipboard
open fun visitErrorCallExpression(expression: IrErrorCallExpression): IrExpression
override fun visitErrorCallExpression(expression: IrErrorCallExpression, data: Nothing?): IrExpression
Link copied to clipboard
open fun visitErrorDeclaration(declaration: IrErrorDeclaration): IrStatement
override fun visitErrorDeclaration(declaration: IrErrorDeclaration, data: Nothing?): IrStatement
Link copied to clipboard
open fun visitErrorExpression(expression: IrErrorExpression): IrExpression
override fun visitErrorExpression(expression: IrErrorExpression, data: Nothing?): IrExpression
Link copied to clipboard
open fun visitExpression(expression: IrExpression): IrExpression
override fun visitExpression(expression: IrExpression, data: Nothing?): IrExpression
Link copied to clipboard
open fun visitExpressionBody(body: IrExpressionBody): IrBody
override fun visitExpressionBody(body: IrExpressionBody, data: Nothing?): IrBody
Link copied to clipboard
open fun visitExternalPackageFragment(declaration: IrExternalPackageFragment): IrExternalPackageFragment
override fun visitExternalPackageFragment(declaration: IrExternalPackageFragment, data: Nothing?): IrExternalPackageFragment
Link copied to clipboard
override fun visitField(declaration: IrField): IrStatement
override fun visitField(declaration: IrField, data: Nothing?): IrStatement
Link copied to clipboard
open fun visitFieldAccess(expression: IrFieldAccessExpression): IrExpression
override fun visitFieldAccess(expression: IrFieldAccessExpression, data: Nothing?): IrExpression
Link copied to clipboard
open fun visitFieldNew(declaration: IrField): IrStatement
Link copied to clipboard
override fun visitFile(declaration: IrFile): IrFile
override fun visitFile(declaration: IrFile, data: Nothing?): IrFile
Link copied to clipboard
override fun visitFileNew(declaration: IrFile): IrFile
Link copied to clipboard
override fun visitFunction(declaration: IrFunction): IrStatement
override fun visitFunction(declaration: IrFunction, data: Nothing?): IrStatement
Link copied to clipboard
open fun visitFunctionAccess(expression: IrFunctionAccessExpression): IrExpression
override fun visitFunctionAccess(expression: IrFunctionAccessExpression, data: Nothing?): IrElement
Link copied to clipboard
open fun visitFunctionExpression(expression: IrFunctionExpression): IrExpression
override fun visitFunctionExpression(expression: IrFunctionExpression, data: Nothing?): IrElement
Link copied to clipboard
open fun visitFunctionNew(declaration: IrFunction): IrStatement
Link copied to clipboard
open fun visitFunctionReference(expression: IrFunctionReference): IrExpression
override fun visitFunctionReference(expression: IrFunctionReference, data: Nothing?): IrElement
Link copied to clipboard
open fun visitGetClass(expression: IrGetClass): IrExpression
override fun visitGetClass(expression: IrGetClass, data: Nothing?): IrExpression
Link copied to clipboard
open fun visitGetEnumValue(expression: IrGetEnumValue): IrExpression
override fun visitGetEnumValue(expression: IrGetEnumValue, data: Nothing?): IrExpression
Link copied to clipboard
open fun visitGetField(expression: IrGetField): IrExpression
override fun visitGetField(expression: IrGetField, data: Nothing?): IrExpression
Link copied to clipboard
open fun visitGetObjectValue(expression: IrGetObjectValue): IrExpression
override fun visitGetObjectValue(expression: IrGetObjectValue, data: Nothing?): IrExpression
Link copied to clipboard
open fun visitGetValue(expression: IrGetValue): IrExpression
override fun visitGetValue(expression: IrGetValue, data: Nothing?): IrExpression
Link copied to clipboard
open fun visitInlinedFunctionBlock(inlinedBlock: IrInlinedFunctionBlock): IrExpression
override fun visitInlinedFunctionBlock(inlinedBlock: IrInlinedFunctionBlock, data: Nothing?): IrExpression
Link copied to clipboard
open fun visitInstanceInitializerCall(expression: IrInstanceInitializerCall): IrExpression
override fun visitInstanceInitializerCall(expression: IrInstanceInitializerCall, data: Nothing?): IrExpression
Link copied to clipboard
override fun visitLocalDelegatedProperty(declaration: IrLocalDelegatedProperty): IrStatement
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
open fun visitLoop(loop: IrLoop): IrExpression
override fun visitLoop(loop: IrLoop, data: Nothing?): IrExpression
Link copied to clipboard
open fun visitMemberAccess(expression: IrMemberAccessExpression<*>): IrExpression
override fun visitMemberAccess(expression: IrMemberAccessExpression<*>, data: Nothing?): IrElement
Link copied to clipboard
open fun visitModuleFragment(declaration: IrModuleFragment): IrModuleFragment
override fun visitModuleFragment(declaration: IrModuleFragment, data: Nothing?): IrModuleFragment
Link copied to clipboard
open fun visitPackageFragment(declaration: IrPackageFragment): IrPackageFragment
override fun visitPackageFragment(declaration: IrPackageFragment, data: Nothing?): IrElement
Link copied to clipboard
override fun visitProperty(declaration: IrProperty): IrStatement
override fun visitProperty(declaration: IrProperty, data: Nothing?): IrStatement
Link copied to clipboard
open fun visitPropertyNew(declaration: IrProperty): IrStatement
Link copied to clipboard
open fun visitPropertyReference(expression: IrPropertyReference): IrExpression
override fun visitPropertyReference(expression: IrPropertyReference, data: Nothing?): IrElement
Link copied to clipboard
open fun visitRawFunctionReference(expression: IrRawFunctionReference): IrExpression
override fun visitRawFunctionReference(expression: IrRawFunctionReference, data: Nothing?): IrExpression
Link copied to clipboard
open fun visitReturn(expression: IrReturn): IrExpression
override fun visitReturn(expression: IrReturn, data: Nothing?): IrExpression
Link copied to clipboard
open fun visitReturnableBlock(expression: IrReturnableBlock): IrExpression
override fun visitReturnableBlock(expression: IrReturnableBlock, data: Nothing?): IrExpression
Link copied to clipboard
override fun visitScript(declaration: IrScript): IrStatement
override fun visitScript(declaration: IrScript, data: Nothing?): IrStatement
Link copied to clipboard
open fun visitScriptNew(declaration: IrScript): IrStatement
Link copied to clipboard
open fun visitSetField(expression: IrSetField): IrExpression
override fun visitSetField(expression: IrSetField, data: Nothing?): IrExpression
Link copied to clipboard
open fun visitSetValue(expression: IrSetValue): IrExpression
override fun visitSetValue(expression: IrSetValue, data: Nothing?): IrExpression
Link copied to clipboard
override fun visitSimpleFunction(declaration: IrSimpleFunction): IrStatement
override fun visitSimpleFunction(declaration: IrSimpleFunction, data: Nothing?): IrStatement
Link copied to clipboard
open fun visitSingletonReference(expression: IrGetSingletonValue): IrExpression
override fun visitSingletonReference(expression: IrGetSingletonValue, data: Nothing?): IrExpression
Link copied to clipboard
open fun visitSpreadElement(spread: IrSpreadElement): IrSpreadElement
override fun visitSpreadElement(spread: IrSpreadElement, data: Nothing?): IrSpreadElement
Link copied to clipboard
open fun visitStringConcatenation(expression: IrStringConcatenation): IrExpression
override fun visitStringConcatenation(expression: IrStringConcatenation, data: Nothing?): IrExpression
Link copied to clipboard
open fun visitSuspendableExpression(expression: IrSuspendableExpression): IrExpression
override fun visitSuspendableExpression(expression: IrSuspendableExpression, data: Nothing?): IrExpression
Link copied to clipboard
open fun visitSuspensionPoint(expression: IrSuspensionPoint): IrExpression
override fun visitSuspensionPoint(expression: IrSuspensionPoint, data: Nothing?): IrExpression
Link copied to clipboard
open fun visitSyntheticBody(body: IrSyntheticBody): IrBody
override fun visitSyntheticBody(body: IrSyntheticBody, data: Nothing?): IrBody
Link copied to clipboard
open fun visitThrow(expression: IrThrow): IrExpression
override fun visitThrow(expression: IrThrow, data: Nothing?): IrExpression
Link copied to clipboard
open fun visitTry(aTry: IrTry): IrExpression
override fun visitTry(aTry: IrTry, data: Nothing?): IrExpression
Link copied to clipboard
open fun visitTypeAlias(declaration: IrTypeAlias): IrStatement
override fun visitTypeAlias(declaration: IrTypeAlias, data: Nothing?): IrStatement
Link copied to clipboard
open fun visitTypeOperator(expression: IrTypeOperatorCall): IrExpression
override fun visitTypeOperator(expression: IrTypeOperatorCall, data: Nothing?): IrExpression
Link copied to clipboard
open fun visitTypeParameter(declaration: IrTypeParameter): IrStatement
override fun visitTypeParameter(declaration: IrTypeParameter, data: Nothing?): IrStatement
Link copied to clipboard
open fun visitValueAccess(expression: IrValueAccessExpression): IrExpression
override fun visitValueAccess(expression: IrValueAccessExpression, data: Nothing?): IrExpression
Link copied to clipboard
override fun visitValueParameter(declaration: IrValueParameter): IrStatement
override fun visitValueParameter(declaration: IrValueParameter, data: Nothing?): IrStatement
Link copied to clipboard
open fun visitValueParameterNew(declaration: IrValueParameter): IrStatement
Link copied to clipboard
open fun visitVararg(expression: IrVararg): IrExpression
override fun visitVararg(expression: IrVararg, data: Nothing?): IrExpression
Link copied to clipboard
override fun visitVariable(declaration: IrVariable): IrStatement
override fun visitVariable(declaration: IrVariable, data: Nothing?): IrStatement
Link copied to clipboard
open fun visitWhen(expression: IrWhen): IrExpression
override fun visitWhen(expression: IrWhen, data: Nothing?): IrExpression
Link copied to clipboard
open fun visitWhileLoop(loop: IrWhileLoop): IrExpression
override fun visitWhileLoop(loop: IrWhileLoop, data: Nothing?): IrExpression