Generate composable trace event start/end calls
Change-Id: Ia25620e969146f115fd7d88179e5975c5a14f894
diff --git a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/AbstractIrTransformTest.kt b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/AbstractIrTransformTest.kt
index 5bd414a..002cbff 100644
--- a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/AbstractIrTransformTest.kt
+++ b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/AbstractIrTransformTest.kt
@@ -171,7 +171,7 @@
extra: String = "",
validator: (element: IrElement) -> Unit = { },
dumpTree: Boolean = false,
- truncateTracingInfoMode: TruncateTracingInfoMode = TruncateTracingInfoMode.TRUNCATE_ALL,
+ truncateTracingInfoMode: TruncateTracingInfoMode = TruncateTracingInfoMode.TRUNCATE_KEY,
compilation: Compilation = JvmCompilation()
) {
if (!compilation.enabled) {
@@ -217,15 +217,16 @@
// replace traceEventStart values with a token
// TODO(174715171): capture actual values for testing
.replace(
- Regex("traceEventStart\\(-?\\d+, (-?\\d+, -?\\d+), (.*)")
+ Regex(
+ "traceEventStart\\(-?\\d+, (%dirty|%changed|-1), (%dirty1|%changed1|-1), (.*)"
+ )
) {
when (truncateTracingInfoMode) {
- TruncateTracingInfoMode.TRUNCATE_ALL ->
- "traceEventStart(<>)"
TruncateTracingInfoMode.TRUNCATE_KEY ->
- "traceEventStart(<>, ${it.groupValues[1]}, ${it.groupValues[2]}"
+ "traceEventStart(<>, ${it.groupValues[1]}, ${it.groupValues[2]}, <>)"
TruncateTracingInfoMode.KEEP_INFO_STRING ->
- "traceEventStart(<>, ${it.groupValues[2]}"
+ "traceEventStart(<>, ${it.groupValues[1]}, ${it.groupValues[2]}, " +
+ it.groupValues[3]
}
}
// replace source information with source it references
@@ -530,7 +531,6 @@
}
enum class TruncateTracingInfoMode {
- TRUNCATE_ALL, // truncates all trace information replacing it with a token
TRUNCATE_KEY, // truncates only the `key` parameter
KEEP_INFO_STRING, // truncates everything except for the `info` string
}
diff --git a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/ClassStabilityTransformTests.kt b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/ClassStabilityTransformTests.kt
index 75bc2ff..bf771fb 100644
--- a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/ClassStabilityTransformTests.kt
+++ b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/ClassStabilityTransformTests.kt
@@ -736,6 +736,9 @@
if (%default and 0b0001 !== 0) {
y = null
}
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(y)
A(null, %composer, 0, 0b0001)
A(EmptyClass(), %composer, EmptyClass.%stable, 0)
@@ -755,6 +758,9 @@
A(NonBackingFieldUnstableVar(), %composer, NonBackingFieldUnstableVar.%stable, 0)
A(StableDelegateProp(), %composer, StableDelegateProp.%stable, 0)
A(UnstableDelegateProp(), %composer, UnstableDelegateProp.%stable, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -860,10 +866,16 @@
fun A(y: Any, %composer: Composer?, %changed: Int) {
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(A)<A(X(li...>,<A(Stab...>,<A(Unst...>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(y)
A(X(listOf(StableClass())), %composer, 0b1000)
A(StableDelegateProp(), %composer, 0)
A(UnstableDelegateProp(), %composer, UnstableDelegate.%stable)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
A(y, %composer, %changed or 0b0001)
}
@@ -895,8 +907,14 @@
fun A(y: Any, %composer: Composer?, %changed: Int) {
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(A)<A(Wrap...>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(y)
A(Wrapper(Foo()), %composer, Wrapper.%stable)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
A(y, %composer, %changed or 0b0001)
}
@@ -939,7 +957,13 @@
%dirty = %dirty or if (%composer.changed(value)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
A(Wrapper(value), %composer, Wrapper.%stable or 0b1000 and %dirty)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -953,11 +977,17 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(X)P(1)*<itemCo...>:Test.kt")
val %dirty = %changed
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
val tmp0_iterator = items.iterator()
while (tmp0_iterator.hasNext()) {
val item = tmp0_iterator.next()
itemContent(item, %composer, 0b01110000 and %dirty)
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
X(items, itemContent, %composer, %changed or 0b0001)
}
@@ -966,7 +996,13 @@
fun C(items: List<String>, %composer: Composer?, %changed: Int) {
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(C)<X(item...>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
X(items, ComposableSingletons%TestKt.lambda-1, %composer, 0b00111000)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
C(items, %composer, %changed or 0b0001)
}
@@ -979,8 +1015,14 @@
%dirty = %dirty or if (%composer.changed(item)) 0b0100 else 0b0010
}
if (%dirty and 0b01011011 !== 0b00010010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
A(item, %composer, 0b1110 and %dirty)
A(Wrapper(item), %composer, Wrapper.%stable or 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -1030,8 +1072,14 @@
fun A(y: Int, x: Any, %composer: Composer?, %changed: Int) {
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(A)P(1)<B(x)>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(y)
B(x, %composer, 0b1000)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
A(y, x, %composer, %changed or 0b0001)
}
@@ -1040,7 +1088,13 @@
fun B(x: Any, %composer: Composer?, %changed: Int) {
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(B):Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(x)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
B(x, %composer, %changed or 0b0001)
}
@@ -1071,8 +1125,14 @@
fun A(y: Int, x: Foo, %composer: Composer?, %changed: Int) {
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(A)P(1)<B(x)>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(y)
B(x, %composer, 0b1000)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
A(y, x, %composer, %changed or 0b0001)
}
@@ -1081,7 +1141,13 @@
fun B(x: Any, %composer: Composer?, %changed: Int) {
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(B):Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(x)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
B(x, %composer, %changed or 0b0001)
}
diff --git a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/ComposerParamTransformTests.kt b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/ComposerParamTransformTests.kt
index ba83110..5fbdfd9 100644
--- a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/ComposerParamTransformTests.kt
+++ b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/ComposerParamTransformTests.kt
@@ -69,7 +69,13 @@
get() {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C:Test.kt#2487m")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val tmp0 = 123
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
return tmp0
}
@@ -78,7 +84,13 @@
fun Example(%composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)<bar>:Test.kt#2487m")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
bar
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -114,6 +126,12 @@
override fun bar(%composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(bar):Test.kt#2487m")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
static val %stable: Int = 0
@@ -148,6 +166,12 @@
fun Wat(%composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Wat):Test.kt#2487m")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
@NonRestartableComposable
@@ -155,13 +179,22 @@
fun Foo(x: Int, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Foo)<Wat()>,<goo()>,<baz()>:Test.kt#2487m")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Wat(%composer, 0)
@NonRestartableComposable
@Composable
fun goo(%composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(goo)<Wat()>:Test.kt#2487m")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Wat(%composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
class Bar {
@@ -170,12 +203,21 @@
fun baz(%composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(baz)<Wat()>:Test.kt#2487m")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Wat(%composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
}
goo(%composer, 0)
Bar().baz(%composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -199,7 +241,13 @@
fun VarArgsFirst(foo: Array<out Any?>, %composer: Composer?, %changed: Int) {
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(VarArgsFirst):Test.kt#2487m")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
println(foo)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
VarArgsFirst(*foo, %composer, %changed or 0b0001)
}
@@ -209,10 +257,16 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(VarArgsCaller)<VarArg...>:Test.kt#2487m")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
VarArgsFirst(
%composer = %composer,
%changed = 8
)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -296,7 +350,13 @@
fun Example(%composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)<Exampl...>:Test.kt#2487m")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Example(%composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -320,7 +380,13 @@
fun Example(content: Function2<Composer, Int, Unit>, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)<conten...>:Test.kt#2487m")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
content(%composer, 0b1110 and %changed)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
@NonRestartableComposable
@@ -328,16 +394,28 @@
fun Test(%composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Test)<Exampl...>:Test.kt#2487m")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Example({ %composer: Composer?, %changed: Int ->
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C:Test.kt#2487m")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Unit
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
%composer.endReplaceableGroup()
}, %composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -356,8 +434,14 @@
get() {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C:Test.kt#2487m")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val tmp0 = {
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
return tmp0
}
@@ -432,7 +516,13 @@
%dirty = %dirty or if (%composer.changed(block)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
block(%composer, 0b1110 and %dirty)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -449,7 +539,13 @@
%dirty = %dirty or if (%composer.changed(text)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(text)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -466,17 +562,29 @@
%dirty = %dirty or if (%composer.changed(value)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
%composer.startMovableGroup(<>, value)
sourceInformation(%composer, "<Wrappe...>")
Wrapper(composableLambda(%composer, <>, true) { %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C<Leaf("...>:Test.kt#2487m")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Leaf("Value %value", %composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
}, %composer, 0b0110)
%composer.endMovableGroup()
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -555,25 +663,43 @@
%dirty = %dirty or if (%composer.changed(composable)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
emit({ %composer: Composer?, %changed: Int ->
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C<emit>:Test.kt#2487m")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
emit({ %composer: Composer?, %changed: Int ->
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C<compos...>:Test.kt#2487m")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
composable(%composer, 0b1110 and %dirty)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
%composer.endReplaceableGroup()
}, %composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
%composer.endReplaceableGroup()
}, %composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -586,7 +712,13 @@
fun emit(composable: Function2<Composer, Int, Unit>, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(emit)<compos...>:Test.kt#2487m")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
composable(%composer, 0b1110 and %changed)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
""".trimIndent()
diff --git a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/ContextReceiversTransformTests.kt b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/ContextReceiversTransformTests.kt
index e44b17b..7d0cee9 100644
--- a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/ContextReceiversTransformTests.kt
+++ b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/ContextReceiversTransformTests.kt
@@ -61,6 +61,12 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test):Test.kt")
if (%changed and 0b0001 !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -93,6 +99,12 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(A):Test.kt")
if (%changed and 0b0001 !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -105,6 +117,12 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(B):Test.kt")
if (%changed and 0b0001 !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -137,6 +155,12 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(A):Test.kt")
if (%changed and 0b0001 !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -149,6 +173,12 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(B):Test.kt")
if (%changed and 0b0001 !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -188,6 +218,12 @@
if (%default and 0b0100 !== 0) {
a = 1
}
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -206,6 +242,12 @@
if (%default and 0b00100000 !== 0) {
c = 1
}
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -232,6 +274,12 @@
}
}
%composer.endDefaults()
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -266,6 +314,12 @@
if (%default and 0b00100000 !== 0) {
c = 1
}
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -304,9 +358,15 @@
%dirty = %dirty or if (%composer.changed(foo)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
with(foo) {
A(%this%with, %composer, 0)
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -352,12 +412,18 @@
%dirty = %dirty or if (%composer.changed(foo)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
with(foo) {
A(%this%with, %composer, 0)
with(Bar()) {
B(%this%with, %this%with, %composer, 0)
}
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -395,9 +461,15 @@
%dirty = %dirty or if (%composer.changed(foo)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
with(foo) {
"Hello".A(%this%with, 2, null, %composer, 0b000110000110, 0b0100)
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -436,6 +508,12 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test):Test.kt")
if (%changed and 0b0001 !== 0 || %changed1 and 0b0001 !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, %changed1, <>)
+ }
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -469,7 +547,13 @@
%dirty = %dirty or if (%composer.changed(b)) 0b000100000000 else 0b10000000
}
if (%dirty and 0b001010000001 !== 0b10000000 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
b("yay", %composer, 0b0110 or 0b01110000 and %dirty shr 0b0011)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -513,12 +597,18 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Parent)*<Test()>,<Test(a>,<Test(b>,<Test(a>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
with(Foo()) {
Test(%this%with, null, 0, %composer, 0, 0b0110)
Test(%this%with, "a", 0, %composer, 0b00110000, 0b0100)
Test(%this%with, null, 101, %composer, 0b000110000000, 0b0010)
Test(%this%with, "Yes", 10, %composer, 0b000110110000, 0)
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -553,10 +643,16 @@
if (%default and 0b0100 !== 0) {
b = 2
}
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val combineParams = a + b
if (%this%.someString == combineParams) {
println("Same same")
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
diff --git a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/ControlFlowTransformTests.kt b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/ControlFlowTransformTests.kt
index 6a38826..0659dd6 100644
--- a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/ControlFlowTransformTests.kt
+++ b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/ControlFlowTransformTests.kt
@@ -37,9 +37,15 @@
fun Example(x: Int, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example):Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
if (x > 0) {
NA()
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -60,8 +66,14 @@
fun Example(%composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)<B()>,<B()>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val tmp0_group = B(%composer, 0) && B(%composer, 0)
tmp0_group
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -82,8 +94,14 @@
fun Example(%composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)<B()>,<B()>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val tmp0_group = B(%composer, 0) || B(%composer, 0)
tmp0_group
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -107,9 +125,15 @@
fun Example(x: Int, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)<A()>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
if (x > 0) {
A(%composer, 0)
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -136,6 +160,9 @@
fun Example(x: Int, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example):Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
if (x > 0) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "<A(a)>")
@@ -147,6 +174,9 @@
A(b, %composer, 0)
%composer.endReplaceableGroup()
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -173,11 +203,17 @@
fun Example(x: Int, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)<B()>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
if (B(%composer, 0)) {
NA()
} else {
NA()
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -207,18 +243,33 @@
fun CustomTextBroken(condition: Boolean, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(CustomTextBroken)<FakeBo...>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
FakeBox({ %composer: Composer?, %changed: Int ->
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C<A()>:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
if (condition) {
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
}
A(%composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
%composer.endReplaceableGroup()
}, %composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
@Composable
@@ -226,7 +277,13 @@
fun FakeBox(content: Function2<Composer, Int, Unit>, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(FakeBox)<conten...>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
content(%composer, 0b1110 and %changed)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -257,6 +314,9 @@
fun Example(x: Int, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example):Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
if (%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "<B(a)>")
val tmp0_group = B(a, %composer, 0)
@@ -272,6 +332,9 @@
} else {
NA()
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -296,6 +359,9 @@
fun Example(x: Int, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example):Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val tmp0_subject = x
when {
tmp0_subject == 0 -> {
@@ -308,6 +374,9 @@
x
}
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -334,6 +403,9 @@
fun Example(x: Int, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example):Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val tmp0_subject = x
when {
tmp0_subject == 0 -> {
@@ -355,6 +427,9 @@
%composer.endReplaceableGroup()
}
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -381,6 +456,9 @@
fun Example(x: Int, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example):Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val y = val tmp0_subject = x
when {
tmp0_subject == 0 -> {
@@ -405,6 +483,9 @@
tmp2_group
}
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -431,6 +512,9 @@
fun Example(x: Int, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example):Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
when {
x < 0 -> {
%composer.startReplaceableGroup(<>)
@@ -451,6 +535,9 @@
%composer.endReplaceableGroup()
}
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -477,6 +564,9 @@
fun Example(x: Int, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example):Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
when {
x < 0 -> {
%composer.startReplaceableGroup(<>)
@@ -496,6 +586,9 @@
%composer.endReplaceableGroup()
}
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -523,6 +616,9 @@
fun Example(x: Int, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example):Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
when {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "<R(a)>")
@@ -542,6 +638,9 @@
NA()
}
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -569,6 +668,9 @@
fun Example(x: Int, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)<A()>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "")
when {
@@ -592,6 +694,9 @@
}
%composer.endReplaceableGroup()
A(%composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -614,7 +719,13 @@
fun Example(x: Int?, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)<A()>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
x?.A(%composer, 0b1110 and %changed)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -637,6 +748,9 @@
fun Example(x: Int?, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)<R()>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val y = val tmp0_elvis_lhs = x
val tmp0_group = when {
tmp0_elvis_lhs == null -> {
@@ -647,6 +761,9 @@
}
}
tmp0_group
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -671,11 +788,17 @@
fun Example(items: List<Int>, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)*<P(i)>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val tmp0_iterator = items.iterator()
while (tmp0_iterator.hasNext()) {
val i = tmp0_iterator.next()
P(i, %composer, 0)
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -700,6 +823,9 @@
fun Example(items: List<Int>, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)<A()>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "*<P(i)>")
val tmp0_iterator = items.iterator()
@@ -709,6 +835,9 @@
}
%composer.endReplaceableGroup()
A(%composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -732,11 +861,17 @@
fun Example(%composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)<L()>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val tmp0_iterator = L(%composer, 0).iterator()
while (tmp0_iterator.hasNext()) {
val i = tmp0_iterator.next()
print(i)
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -763,10 +898,16 @@
fun Example(items: MutableList<Int>, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)*<P(item...>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
while (items.isNotEmpty()) {
val item = items.removeAt(items.size - 1)
P(item, %composer, 0)
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -793,6 +934,9 @@
fun Example(items: MutableList<Int>, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)<A()>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "*<P(item...>")
while (items.isNotEmpty()) {
@@ -801,6 +945,9 @@
}
%composer.endReplaceableGroup()
A(%composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -825,9 +972,15 @@
fun Example(%composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)*<B()>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
while (B(%composer, 0)) {
print("hello world")
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -852,6 +1005,9 @@
fun Example(%composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)<A()>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "*<B()>")
while (B(%composer, 0)) {
@@ -859,6 +1015,9 @@
}
%composer.endReplaceableGroup()
A(%composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -883,9 +1042,15 @@
fun Example(%composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)*<B()>,<A()>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
while (B(%composer, 0)) {
A(%composer, 0)
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -911,6 +1076,9 @@
fun Example(%composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)<A(b)>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "*<B()>,<A(a)>")
while (B(%composer, 0)) {
@@ -918,6 +1086,9 @@
}
%composer.endReplaceableGroup()
A(b, %composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -942,12 +1113,21 @@
fun Example(x: Int, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)<A()>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
if (x > 0) {
A(%composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
return
}
print("hello")
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -971,11 +1151,20 @@
fun Example(x: Int, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)<A()>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
if (x > 0) {
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
return
}
A(%composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -999,17 +1188,25 @@
fun Example(x: Int, %composer: Composer?, %changed: Int): Int {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)<A()>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
if (x > 0) {
A(%composer, 0)
val tmp1_return = 1
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
return tmp1_return
}
val tmp0 = 2
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
return tmp0
}
-
"""
)
@@ -1031,13 +1228,22 @@
fun Example(x: Int, %composer: Composer?, %changed: Int): Int {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)<A()>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
if (x > 0) {
val tmp1_return = 1
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
return tmp1_return
}
A(%composer, 0)
val tmp0 = 2
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
return tmp0
}
@@ -1061,8 +1267,14 @@
fun Example(%composer: Composer?, %changed: Int): Int {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)<A()>,<R()>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
A(%composer, 0)
val tmp0 = R(%composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
return tmp0
}
@@ -1086,16 +1298,25 @@
fun Example(x: Int, %composer: Composer?, %changed: Int): Int {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)<R()>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "<R()>")
if (x > 0) {
val tmp1_return = R(%composer, 0)
%composer.endReplaceableGroup()
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
return tmp1_return
}
%composer.endReplaceableGroup()
val tmp0 = R(%composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
return tmp0
}
@@ -1129,6 +1350,9 @@
fun Example(items: Iterator<Int>, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)*<P(i)>,<P(l)>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
while (items.hasNext()) {
val i = items.next()
val j = i
@@ -1140,6 +1364,9 @@
sourceInformation(%composer, "<P(j)>")
P(j, %composer, 0)
%composer.endReplaceableGroup()
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
return
} else {
@@ -1150,6 +1377,9 @@
}
P(l, %composer, 0)
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -1181,6 +1411,9 @@
fun Example(items: Iterator<Int>, %composer: Composer?, %changed: Int) {
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Example)*<P(i)>,<P(l)>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
while (items.hasNext()) {
val i = items.next()
val j = i
@@ -1192,6 +1425,9 @@
sourceInformation(%composer, "<P(j)>")
P(j, %composer, 0)
%composer.endReplaceableGroup()
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
Example(items, %composer, %changed or 0b0001)
}
@@ -1204,6 +1440,9 @@
}
P(l, %composer, 0)
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
Example(items, %composer, %changed or 0b0001)
}
@@ -1231,6 +1470,9 @@
fun Example(items: Iterator<Int>, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)*<P(i)>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
while (items.hasNext()) {
val i = items.next()
if (i == 0) {
@@ -1238,6 +1480,9 @@
}
P(i, %composer, 0)
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -1263,6 +1508,9 @@
fun Example(items: Iterator<Int>, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)*<P(i)>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
while (items.hasNext()) {
val i = items.next()
P(i, %composer, 0)
@@ -1270,6 +1518,9 @@
break
}
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -1298,6 +1549,9 @@
fun Example(items: Iterator<Int>, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)*<P(i)>,<P(j)>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
while (items.hasNext()) {
val i = items.next()
val j = i
@@ -1307,6 +1561,9 @@
}
P(j, %composer, 0)
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -1335,6 +1592,9 @@
fun Example(items: Iterator<Int>, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)<A()>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "*<P(i)>,<P(i)>")
while (items.hasNext()) {
@@ -1347,6 +1607,9 @@
}
%composer.endReplaceableGroup()
A(%composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -1372,6 +1635,9 @@
fun Example(items: Iterator<Int>, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example):Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
while (items.hasNext()) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "<P(i)>")
@@ -1383,6 +1649,9 @@
P(i, %composer, 0)
%composer.endReplaceableGroup()
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -1409,6 +1678,9 @@
fun Example(items: Iterator<Int>, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example):Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
while (items.hasNext()) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "<P(i)>")
@@ -1421,6 +1693,9 @@
print(i)
%composer.endReplaceableGroup()
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -1447,6 +1722,9 @@
fun Example(items: Iterator<Int>, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example):Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
while (items.hasNext()) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "<P(i)>,<P(i)>")
@@ -1459,6 +1737,9 @@
P(i, %composer, 0)
%composer.endReplaceableGroup()
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -1484,14 +1765,23 @@
fun Example(a: Iterator<Int>, b: Iterator<Int>, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)*<A()>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
while (a.hasNext()) {
val x = a.next()
if (x > 100) {
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
return
}
A(%composer, 0)
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -1521,6 +1811,9 @@
fun Example(a: Iterator<Int>, b: Iterator<Int>, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)*<A()>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
a@while (a.hasNext()) {
val x = a.next()
%composer.startReplaceableGroup(<>)
@@ -1536,6 +1829,9 @@
%composer.endReplaceableGroup()
A(%composer, 0)
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -1574,6 +1870,9 @@
fun Example(a: Iterator<Int>, b: Iterator<Int>, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)*<A()>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
a@while (a.hasNext()) {
val x = a.next()
if (x == 0) {
@@ -1592,6 +1891,9 @@
}
if (y > 100) {
%composer.endReplaceableGroup()
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
return
}
@@ -1600,6 +1902,9 @@
%composer.endReplaceableGroup()
A(%composer, 0)
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -1625,6 +1930,9 @@
fun Example(a: Iterator<Int>, b: Iterator<Int>, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)<A()>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "*<A()>")
a@while (a.hasNext()) {
@@ -1638,6 +1946,9 @@
}
%composer.endReplaceableGroup()
A(%composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -1662,6 +1973,9 @@
fun Example(x: Int, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)<A()>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
if (x > 0) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "*<A()>")
@@ -1671,6 +1985,9 @@
%composer.endReplaceableGroup()
A(%composer, 0)
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -1695,12 +2012,18 @@
fun Example(x: Int, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)<A()>,*<A()>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
if (x > 0) {
A(%composer, 0)
while (x > 0) {
A(%composer, 0)
}
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -1724,11 +2047,17 @@
fun Example(x: Int, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)*<A()>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
if (x > 0) {
while (x > 0) {
A(%composer, 0)
}
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -1752,12 +2081,18 @@
fun Example(x: Int, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example):Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
while (x > 0) {
%composer.startMovableGroup(<>, x)
sourceInformation(%composer, "<A()>")
A(%composer, 0)
%composer.endMovableGroup()
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -1784,6 +2119,9 @@
fun Example(x: Int, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example):Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
while (x > 0) {
%composer.startMovableGroup(<>, x)
sourceInformation(%composer, "<A(a)>")
@@ -1794,6 +2132,9 @@
A(b, %composer, 0)
%composer.endMovableGroup()
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -1818,6 +2159,9 @@
fun Example(x: Int, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)*<A(b)>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
while (x > 0) {
%composer.startMovableGroup(<>, x)
sourceInformation(%composer, "<A(a)>")
@@ -1825,6 +2169,9 @@
%composer.endMovableGroup()
A(b, %composer, 0)
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -1849,6 +2196,9 @@
fun Example(x: Int, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)*<A(a)>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
while (x > 0) {
A(a, %composer, 0)
%composer.startMovableGroup(<>, x)
@@ -1856,6 +2206,9 @@
A(b, %composer, 0)
%composer.endMovableGroup()
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -1881,6 +2234,9 @@
fun Example(x: Int, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)*<A(a)>,<A(c)>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
while (x > 0) {
A(a, %composer, 0)
%composer.startMovableGroup(<>, x)
@@ -1889,6 +2245,9 @@
%composer.endMovableGroup()
A(c, %composer, 0)
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -1910,10 +2269,16 @@
fun Example(x: Int, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example):Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
%composer.startMovableGroup(<>, x)
sourceInformation(%composer, "<A()>")
A(%composer, 0)
%composer.endMovableGroup()
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -1936,11 +2301,17 @@
fun Example(x: Int, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)<A(b)>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
%composer.startMovableGroup(<>, x)
sourceInformation(%composer, "<A(a)>")
A(a, %composer, 0)
%composer.endMovableGroup()
A(b, %composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -1963,11 +2334,17 @@
fun Example(x: Int, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)<A(a)>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
A(a, %composer, 0)
%composer.startMovableGroup(<>, x)
sourceInformation(%composer, "<A(b)>")
A(b, %composer, 0)
%composer.endMovableGroup()
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -1991,12 +2368,18 @@
fun Example(x: Int, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example):Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
if (x > 0) {
%composer.startMovableGroup(<>, x)
sourceInformation(%composer, "<A()>")
A(%composer, 0)
%composer.endMovableGroup()
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -2021,6 +2404,9 @@
fun Example(x: Int, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)<A(b)>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
if (x > 0) {
%composer.startMovableGroup(<>, x)
sourceInformation(%composer, "<A(a)>")
@@ -2028,6 +2414,9 @@
%composer.endMovableGroup()
A(b, %composer, 0)
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -2052,6 +2441,9 @@
fun Example(x: Int, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)<A(a)>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
if (x > 0) {
A(a, %composer, 0)
%composer.startMovableGroup(<>, x)
@@ -2059,6 +2451,9 @@
A(b, %composer, 0)
%composer.endMovableGroup()
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -2080,10 +2475,16 @@
fun Example(a: Int, b: Int, c: Int, d: Int, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example):Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
%composer.startMovableGroup(<>, %composer.joinKey(%composer.joinKey(%composer.joinKey(a, b), c), d))
sourceInformation(%composer, "<A()>")
A(%composer, 0)
%composer.endMovableGroup()
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -2107,12 +2508,18 @@
fun Example(x: Int, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)*<R()>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
while (x > 0) {
%composer.startMovableGroup(<>, R(%composer, 0))
sourceInformation(%composer, "<A()>")
A(%composer, 0)
%composer.endMovableGroup()
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -2133,6 +2540,9 @@
fun Example(x: Int, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)<P(y)>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val y =
%composer.startMovableGroup(<>, x)
sourceInformation(%composer, "<R()>")
@@ -2140,6 +2550,9 @@
%composer.endMovableGroup()
tmp0
P(y, %composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -2163,6 +2576,9 @@
fun Example(x: Int, %composer: Composer?, %changed: Int): Int {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example):Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val tmp0 =
val tmp4_group = if (x > 0) {
val tmp3_group = if (%composer.startReplaceableGroup(<>)
@@ -2179,6 +2595,9 @@
4
}
tmp4_group
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
return tmp0
}
@@ -2236,6 +2655,9 @@
fun Simple(%composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Simple)<A()>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "*<A()>")
run {
@@ -2243,6 +2665,9 @@
}
%composer.endReplaceableGroup()
A(%composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
@NonRestartableComposable
@@ -2250,16 +2675,25 @@
fun WithReturn(%composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(WithReturn)<A()>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "*<A()>")
run {
A(%composer, 0)
%composer.endReplaceableGroup()
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
return
}
%composer.endReplaceableGroup()
A(%composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
@NonRestartableComposable
@@ -2267,10 +2701,16 @@
fun NoCalls(%composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(NoCalls)<A()>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
run {
println("hello world")
}
A(%composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
@NonRestartableComposable
@@ -2278,9 +2718,15 @@
fun NoCallsAfter(%composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(NoCallsAfter)*<A()>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
run {
A(%composer, 0)
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -2310,6 +2756,9 @@
%dirty = %dirty or if (%composer.changed(x)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val tmp0_safe_receiver = x
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "*<A(b)>")
@@ -2332,6 +2781,9 @@
%composer.endReplaceableGroup()
tmp0_group
A(c, %composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -2366,6 +2818,9 @@
%dirty = %dirty or if (%composer.changed(x)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
x?.let { it: Int ->
if (it > 0) {
NA()
@@ -2373,6 +2828,9 @@
NA()
}
A(%composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -2400,6 +2858,9 @@
fun <T> provided(value: T, %composer: Composer?, %changed: Int): State<T> {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(provided)*<rememb...>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val tmp0 = remember({
mutableStateOf(
value = value
@@ -2407,6 +2868,9 @@
}, %composer, 0).apply {
%this%apply.value = value
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
return tmp0
}
@@ -2433,6 +2897,9 @@
fun Test(x: Int, %composer: Composer?, %changed: Int): Int {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Test)*<A()>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val tmp0 =
val tmp1_group = x.let { it: Int ->
A(%composer, 0)
@@ -2440,6 +2907,9 @@
tmp0_return
}
tmp1_group
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
return tmp0
}
@@ -2462,7 +2932,13 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test)<W>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
W(ComposableSingletons%TestKt.lambda-1, %composer, 0b0110)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -2474,7 +2950,13 @@
val lambda-1: Function2<Composer, Int, Unit> = composableLambdaInstance(<>, false) { %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C<A()>:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
A(%composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -2499,16 +2981,28 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test)<IW>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
IW({ %composer: Composer?, %changed: Int ->
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C<A()>:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
A(%composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
%composer.endReplaceableGroup()
}, %composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -2540,7 +3034,13 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test)<Wrap>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Wrap(ComposableSingletons%TestKt.lambda-1, %composer, 0b0110)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -2552,6 +3052,9 @@
val lambda-1: Function2<Composer, Int, Unit> = composableLambdaInstance(<>, false) { %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C<effect>:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "*<effect>")
repeat(number) { it: Int ->
@@ -2563,6 +3066,9 @@
outside = effect({
"0"
}, %composer, 0b0110)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -2601,8 +3107,14 @@
%dirty = %dirty or if (%composer.changed(<unsafe-coerce>(value))) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(value)
A(%composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -2780,10 +3292,16 @@
%dirty = %dirty or if (%composer.changed(p3)) 0b100000000000 else 0b010000000000
}
if (%dirty and 0b0001011011011011 !== 0b010010010010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(p0)
used(p1)
used(p2)
used(p3)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -2809,10 +3327,16 @@
%dirty = %dirty or if (%composer.changed(p2)) 0b100000000000 else 0b010000000000
}
if (%dirty and 0b0001011011011011 !== 0b010010010010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(p0)
used(p1)
used(p2)
used(p3)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -2838,10 +3362,16 @@
%dirty = %dirty or if (%composer.changed(p3)) 0b100000000000 else 0b010000000000
}
if (%dirty and 0b0001011011011011 !== 0b010010010010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(p0)
used(p1)
used(p2)
used(p3)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -2867,10 +3397,16 @@
%dirty = %dirty or if (%composer.changed(p1)) 0b100000000000 else 0b010000000000
}
if (%dirty and 0b0001011011011011 !== 0b010010010010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(p0)
used(p1)
used(p2)
used(p3)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -2896,10 +3432,16 @@
%dirty = %dirty or if (%composer.changed(p2)) 0b100000000000 else 0b010000000000
}
if (%dirty and 0b0001011011011011 !== 0b010010010010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(p0)
used(p1)
used(p2)
used(p3)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -2925,10 +3467,16 @@
%dirty = %dirty or if (%composer.changed(p1)) 0b100000000000 else 0b010000000000
}
if (%dirty and 0b0001011011011011 !== 0b010010010010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(p0)
used(p1)
used(p2)
used(p3)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -2954,10 +3502,16 @@
%dirty = %dirty or if (%composer.changed(p3)) 0b100000000000 else 0b010000000000
}
if (%dirty and 0b0001011011011011 !== 0b010010010010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(p0)
used(p1)
used(p2)
used(p3)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -2983,10 +3537,16 @@
%dirty = %dirty or if (%composer.changed(p2)) 0b100000000000 else 0b010000000000
}
if (%dirty and 0b0001011011011011 !== 0b010010010010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(p0)
used(p1)
used(p2)
used(p3)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -3012,10 +3572,16 @@
%dirty = %dirty or if (%composer.changed(p3)) 0b100000000000 else 0b010000000000
}
if (%dirty and 0b0001011011011011 !== 0b010010010010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(p0)
used(p1)
used(p2)
used(p3)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -3041,10 +3607,16 @@
%dirty = %dirty or if (%composer.changed(p0)) 0b100000000000 else 0b010000000000
}
if (%dirty and 0b0001011011011011 !== 0b010010010010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(p0)
used(p1)
used(p2)
used(p3)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -3070,10 +3642,16 @@
%dirty = %dirty or if (%composer.changed(p2)) 0b100000000000 else 0b010000000000
}
if (%dirty and 0b0001011011011011 !== 0b010010010010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(p0)
used(p1)
used(p2)
used(p3)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -3099,10 +3677,16 @@
%dirty = %dirty or if (%composer.changed(p0)) 0b100000000000 else 0b010000000000
}
if (%dirty and 0b0001011011011011 !== 0b010010010010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(p0)
used(p1)
used(p2)
used(p3)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -3128,10 +3712,16 @@
%dirty = %dirty or if (%composer.changed(p3)) 0b100000000000 else 0b010000000000
}
if (%dirty and 0b0001011011011011 !== 0b010010010010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(p0)
used(p1)
used(p2)
used(p3)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -3157,10 +3747,16 @@
%dirty = %dirty or if (%composer.changed(p1)) 0b100000000000 else 0b010000000000
}
if (%dirty and 0b0001011011011011 !== 0b010010010010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(p0)
used(p1)
used(p2)
used(p3)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -3186,10 +3782,16 @@
%dirty = %dirty or if (%composer.changed(p3)) 0b100000000000 else 0b010000000000
}
if (%dirty and 0b0001011011011011 !== 0b010010010010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(p0)
used(p1)
used(p2)
used(p3)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -3215,10 +3817,16 @@
%dirty = %dirty or if (%composer.changed(p0)) 0b100000000000 else 0b010000000000
}
if (%dirty and 0b0001011011011011 !== 0b010010010010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(p0)
used(p1)
used(p2)
used(p3)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -3244,10 +3852,16 @@
%dirty = %dirty or if (%composer.changed(p1)) 0b100000000000 else 0b010000000000
}
if (%dirty and 0b0001011011011011 !== 0b010010010010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(p0)
used(p1)
used(p2)
used(p3)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -3273,10 +3887,16 @@
%dirty = %dirty or if (%composer.changed(p0)) 0b100000000000 else 0b010000000000
}
if (%dirty and 0b0001011011011011 !== 0b010010010010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(p0)
used(p1)
used(p2)
used(p3)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -3302,10 +3922,16 @@
%dirty = %dirty or if (%composer.changed(p2)) 0b100000000000 else 0b010000000000
}
if (%dirty and 0b0001011011011011 !== 0b010010010010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(p0)
used(p1)
used(p2)
used(p3)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -3331,10 +3957,16 @@
%dirty = %dirty or if (%composer.changed(p1)) 0b100000000000 else 0b010000000000
}
if (%dirty and 0b0001011011011011 !== 0b010010010010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(p0)
used(p1)
used(p2)
used(p3)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -3360,10 +3992,16 @@
%dirty = %dirty or if (%composer.changed(p2)) 0b100000000000 else 0b010000000000
}
if (%dirty and 0b0001011011011011 !== 0b010010010010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(p0)
used(p1)
used(p2)
used(p3)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -3389,10 +4027,16 @@
%dirty = %dirty or if (%composer.changed(p0)) 0b100000000000 else 0b010000000000
}
if (%dirty and 0b0001011011011011 !== 0b010010010010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(p0)
used(p1)
used(p2)
used(p3)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -3418,10 +4062,16 @@
%dirty = %dirty or if (%composer.changed(p1)) 0b100000000000 else 0b010000000000
}
if (%dirty and 0b0001011011011011 !== 0b010010010010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(p0)
used(p1)
used(p2)
used(p3)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -3447,10 +4097,16 @@
%dirty = %dirty or if (%composer.changed(p0)) 0b100000000000 else 0b010000000000
}
if (%dirty and 0b0001011011011011 !== 0b010010010010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(p0)
used(p1)
used(p2)
used(p3)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -3489,7 +4145,13 @@
%dirty = %dirty or if (%composer.changed(<unsafe-coerce>(value))) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, "androidx.compose.runtime.tests.Test (Test.kt:6)")
+ }
used(value)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -3527,8 +4189,14 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test)<b()>,<c()>,<d()>,<A(b(),>,<B()>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, "Test (Test.kt:4)")
+ }
A(b(%composer, 0), c(%composer, 0), d(%composer, 0), %composer, 0)
B(%composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -3577,8 +4245,14 @@
setContent(composableLambdaInstance(<>, true) { %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C<B(a)>,<B(a)>:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, "SomeClass.onCreate.<anonymous> (Test.kt:6)")
+ }
B(a, %composer, 0)
B(a, %composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -3592,8 +4266,14 @@
setContent(composableLambdaInstance(<>, true) { %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C<B(a)>,<B(a)>:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, "Test.<anonymous> (Test.kt:15)")
+ }
B(a, %composer, 0)
B(a, %composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -3635,7 +4315,13 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test)<W>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, "Test (Test.kt:4)")
+ }
W(ComposableSingletons%TestKt.lambda-1, %composer, 0b0110)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -3647,10 +4333,16 @@
val lambda-1: Function2<Composer, Int, Unit> = composableLambdaInstance(<>, false) { %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C<IW>:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, "ComposableSingletons%TestKt.lambda-1.<anonymous> (Test.kt:5)")
+ }
IW({ %composer: Composer?, %changed: Int ->
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C<T(2)>,<T(4)>:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, "ComposableSingletons%TestKt.lambda-1.<anonymous>.<anonymous> (Test.kt:6)")
+ }
T(2, %composer, 0b0110)
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "*<T(3)>")
@@ -3659,11 +4351,17 @@
}
%composer.endReplaceableGroup()
T(4, %composer, 0b0110)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
%composer.endReplaceableGroup()
}, %composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -3704,7 +4402,13 @@
@Composable @ReadOnlyComposable @JvmName(name = "getCurrent")
get() {
sourceInformationMarkerStart(%composer, <>, "C:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, "<get-current> (Test.kt:7)")
+ }
val tmp0 = 0
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
sourceInformationMarkerEnd(%composer)
return tmp0
}
@@ -3712,7 +4416,13 @@
@ReadOnlyComposable
fun calculateSometing(%composer: Composer?, %changed: Int): Int {
sourceInformationMarkerStart(%composer, <>, "C(calculateSometing):Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, "calculateSometing (Test.kt:11)")
+ }
val tmp0 = 0
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
sourceInformationMarkerEnd(%composer)
return tmp0
}
@@ -3721,18 +4431,30 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test)<curren...>,<calcul...>,<Layout>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, "Test (Test.kt:16)")
+ }
val c = current
val cl = calculateSometing(%composer, 0)
Layout({ %composer: Composer?, %changed: Int ->
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C<Text("...>:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, "Test.<anonymous> (Test.kt:19)")
+ }
Text("%c %cl", %composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
%composer.endReplaceableGroup()
}, %composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -3798,7 +4520,13 @@
@ReadOnlyComposable @Composable @JvmName(name = "getCurrent")
get() {
sourceInformationMarkerStart(%composer, <>, "C:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, "CurrentHolder.<get-current> (Test.kt:8)")
+ }
val tmp0 = 0
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
sourceInformationMarkerEnd(%composer)
return tmp0
}
@@ -3811,7 +4539,13 @@
@ReadOnlyComposable @Composable @JvmName(name = "getCurrent")
get() {
sourceInformationMarkerStart(%composer, <>, "C<curren...>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, "HolderHolder.<get-current> (Test.kt:16)")
+ }
val tmp0 = _currentHolder.current
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
sourceInformationMarkerEnd(%composer)
return tmp0
}
@@ -3822,7 +4556,13 @@
@ReadOnlyComposable
fun calculateSometing(%composer: Composer?, %changed: Int): Int {
sourceInformationMarkerStart(%composer, <>, "C(calculateSometing):Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, "calculateSometing (Test.kt:23)")
+ }
val tmp0 = 0
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
sourceInformationMarkerEnd(%composer)
return tmp0
}
@@ -3831,18 +4571,30 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test)<curren...>,<calcul...>,<Layout>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, "Test (Test.kt:28)")
+ }
val c = holderHolder.current
val cl = calculateSometing(%composer, 0)
Layout({ %composer: Composer?, %changed: Int ->
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C<Text("...>:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, "Test.<anonymous> (Test.kt:31)")
+ }
Text("%c %cl", %composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
%composer.endReplaceableGroup()
}, %composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -3880,12 +4632,18 @@
@Composable
fun getSomeValue(a: Int, %composer: Composer?, %changed: Int): Int {
sourceInformationMarkerStart(%composer, <>, "C(getSomeValue):Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
if (a < 100) {
val tmp1_return = 0
sourceInformationMarkerEnd(%composer)
return tmp1_return
}
val tmp0 = 1
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
sourceInformationMarkerEnd(%composer)
return tmp0
}
@@ -3915,10 +4673,16 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(AttemptedToRealizeGroupTwice)<Wrappe...>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Wrapper({ %composer: Composer?, %changed: Int ->
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C*<Leaf(0...>:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
repeat(1) { it: Int ->
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "*<Leaf(0...>")
@@ -3928,11 +4692,17 @@
%composer.endReplaceableGroup()
Leaf(0, %composer, 0b0110, 0)
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
%composer.endReplaceableGroup()
}, %composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -3996,6 +4766,9 @@
%dirty = %dirty or if (%composer.changed(end)) 0b00100000 else 0b00010000
}
if (%dirty and 0b01011011 !== 0b00010010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val a = remember({
A()
}, %composer, 0)
@@ -4010,6 +4783,9 @@
}
%composer.endReplaceableGroup()
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -4050,6 +4826,9 @@
%dirty = %dirty or if (%composer.changed(n)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Array(n) { it: Int ->
val tmp0_return = remember({
it
@@ -4104,6 +4883,9 @@
}, %composer, 0)
tmp0_return
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
diff --git a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/ControlFlowTransformTestsNoSource.kt b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/ControlFlowTransformTestsNoSource.kt
index 9a234ca..6d2b849 100644
--- a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/ControlFlowTransformTestsNoSource.kt
+++ b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/ControlFlowTransformTestsNoSource.kt
@@ -36,8 +36,14 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test)")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
A(a, %composer, 0)
A(b, %composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -62,8 +68,14 @@
private fun Test(%composer: Composer?, %changed: Int) {
%composer = %composer.startRestartGroup(<>)
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
A(a, %composer, 0)
A(b, %composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -71,6 +83,7 @@
Test(%composer, %changed or 0b0001)
}
}
+
"""
)
@@ -90,7 +103,13 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test)")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
W(ComposableSingletons%TestKt.lambda-1, %composer, 0b0110)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -101,7 +120,13 @@
internal object ComposableSingletons%TestKt {
val lambda-1: Function2<Composer, Int, Unit> = composableLambdaInstance(<>, false) { %composer: Composer?, %changed: Int ->
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
A(%composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -126,13 +151,25 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test)")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
IW({ %composer: Composer?, %changed: Int ->
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
A(%composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
}, %composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
diff --git a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/DefaultParamTransformTests.kt b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/DefaultParamTransformTests.kt
index f021d5c..4d2280d 100644
--- a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/DefaultParamTransformTests.kt
+++ b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/DefaultParamTransformTests.kt
@@ -66,9 +66,15 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test)<A(1)>,<B()>,<B(2)>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
A(1, %composer, 0b0110)
B(0, %composer, 0, 0b0001)
B(2, %composer, 0b0110, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -109,7 +115,13 @@
if (%default and 0b0001 !== 0) {
foo = Foo(0)
}
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
print(foo)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -122,7 +134,13 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test)<Exampl...>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Example(<unsafe-coerce>(0), %composer, 0, 0b0001)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -151,8 +169,14 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test)<A(0,>,<A(a>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
A(0, 1, 2, 0, 0, %composer, 0b000110110110, 0b00011000)
A(0, 0, 2, 0, 0, %composer, 0b000110000110, 0b00011010)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -176,7 +200,13 @@
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Unit
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -223,7 +253,13 @@
}
}
%composer.endDefaults()
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(x)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -276,8 +312,14 @@
}
}
%composer.endDefaults()
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
print(a)
print(b)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -618,6 +660,9 @@
if (%default and 0b01000000000000000000000000000000 !== 0) {
a30 = 0
}
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, %changed1, <>)
+ }
used(a00)
used(a01)
used(a02)
@@ -649,6 +694,9 @@
used(a28)
used(a29)
used(a30)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -999,6 +1047,9 @@
if (%default1 and 0b0001 !== 0) {
a31 = 0
}
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, %changed1, <>)
+ }
used(a00)
used(a01)
used(a02)
@@ -1031,6 +1082,9 @@
used(a29)
used(a30)
used(a31)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -1392,6 +1446,9 @@
}
}
%composer.endDefaults()
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, %changed1, <>)
+ }
used(a00)
used(a01)
used(a02)
@@ -1424,6 +1481,9 @@
used(a29)
used(a30)
used(a31)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -1459,6 +1519,12 @@
if (%default and 0b0001 !== 0) {
x = 0
}
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
static val %stable: Int = 0
@@ -1470,7 +1536,13 @@
fun Example(%composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)<foo()>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
foo(0, %composer, 0b01110000 and %changed shl 0b0011, 0b0001)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
static val %stable: Int = 0
@@ -1518,12 +1590,17 @@
fun Bar(%composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Bar)<HasDef...>,<NoDefa...>,<Multip...>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
HasDefault(null, %composer, 0b00110000, 0b0001)
NoDefault("Some Text", %composer, 0b00110110)
MultipleDefault(null, 0, %composer, 0b000110000000, 0b0011)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
-
"""
)
}
diff --git a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/FunctionBodySkippingTransformTests.kt b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/FunctionBodySkippingTransformTests.kt
index fa1da8c..e46e9b4 100644
--- a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/FunctionBodySkippingTransformTests.kt
+++ b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/FunctionBodySkippingTransformTests.kt
@@ -92,10 +92,16 @@
if (%default and 0b0010 !== 0) {
y = 0
}
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
used(y)
Wrap(composableLambda(%composer, <>, true) { %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
if (x > 0) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "<A(x)>")
@@ -107,10 +113,16 @@
A(x, 0, %composer, 0b1110 and %dirty, 0b0010)
%composer.endReplaceableGroup()
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
}, %composer, 0b0110)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -173,9 +185,15 @@
if (%default and 0b0100 !== 0) {
overflow = Companion.Clip
}
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(style)
used(onTextLayout)
used(overflow)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -216,7 +234,13 @@
if (%default and 0b0001 !== 0) {
arrangement = Arrangement.Top
}
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(arrangement)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -255,7 +279,13 @@
if (%default and 0b0001 !== 0) {
content = ComposableSingletons%TestKt.lambda-1
}
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
content(%composer, 0b1110 and %dirty)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -267,7 +297,13 @@
val lambda-1: Function2<Composer, Int, Unit> = composableLambdaInstance(<>, false) { %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Unit
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -302,7 +338,13 @@
%dirty = %dirty or if (%composer.changed(it)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
a.compute(it, %composer, 0b1110 and %dirty)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -354,7 +396,13 @@
%dirty = %dirty or if (%composer.changed(colors)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
Text("hello world", null, colors.getColor(%composer, 0b1110 and %dirty), <unsafe-coerce>(0L), null, null, null, <unsafe-coerce>(0L), null, null, <unsafe-coerce>(0L), <unsafe-coerce>(0), false, 0, null, null, %composer, 0b0110, 0, 0b1111111111111010)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -368,21 +416,33 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test)<Button>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Button(class <no name provided> : ButtonColors {
@Composable
override fun getColor(%composer: Composer?, %changed: Int): Color {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(getColor)<condit...>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val tmp0 = if (condition(%composer, 0)) {
Companion.Red
} else {
Companion.Blue
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
return tmp0
}
}
<no name provided>(), %composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -520,12 +580,18 @@
if (%default and 0b00010000 !== 0) {
crossAxisSize = SizeMode.Wrap
}
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
used(orientation)
used(modifier)
used(arrangement)
used(crossAxisAlignment)
used(crossAxisSize)
content(%composer, 0b1110 and %dirty shr 0b1111)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -569,9 +635,15 @@
if (%default and 0b0100 !== 0) {
horizontalGravity = Companion.Start
}
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
val tmp0_orientation = LayoutOrientation.Vertical
val tmp1_crossAxisSize = SizeMode.Wrap
RowColumnImpl(tmp0_orientation, modifier, verticalArrangement, horizontalGravity, tmp1_crossAxisSize, content, %composer, 0b0110000000000110 or 0b01110000 and %dirty shl 0b0011 or 0b001110000000 and %dirty shl 0b0011 or 0b0001110000000000 and %dirty shl 0b0011 or 0b01110000000000000000 and %dirty shl 0b0110, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -613,7 +685,13 @@
if (%default and 0b0001 !== 0) {
modifier = Companion
}
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(modifier)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -658,7 +736,13 @@
}
}
%composer.endDefaults()
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
print(a)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -693,14 +777,26 @@
%dirty = %dirty or if (%composer.changed(a)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
@Composable
fun Inner(%composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Inner)<A(a)>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
A(a, %composer, 0b1110 and %dirty)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
Inner(%composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -736,6 +832,9 @@
fun Example(%composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)<Call()>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Call(%composer, 0)
val tmp0_iterator = 0 .. 1.iterator()
while (tmp0_iterator.hasNext()) {
@@ -750,6 +849,9 @@
Call(%composer, 0)
%composer.endReplaceableGroup()
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -808,8 +910,14 @@
}
}
%composer.endDefaults()
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(modifier)
used(shape)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -861,8 +969,14 @@
if (%default and 0b0010 !== 0) {
content = ComposableSingletons%TestKt.lambda-1
}
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
used(modifier)
content(%composer, 0b1110 and %dirty shr 0b0011)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -874,7 +988,13 @@
val lambda-1: Function2<Composer, Int, Unit> = composableLambdaInstance(<>, false) { %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Unit
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -911,8 +1031,14 @@
%dirty = %dirty or if (%composer.changed(y)) 0b00100000 else 0b00010000
}
if (%dirty and 0b001011011011 !== 0b10010010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
A(x, %composer, 0b1110 and %dirty)
B(y, %composer, 0b1110 and %dirty shr 0b0011)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -939,8 +1065,14 @@
internal object ComposableSingletons%TestKt {
val lambda-1: Function4<Int, Foo, Composer, Int, Unit> = composableLambdaInstance(<>, false) { x: Int, y: Foo, %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C<A(x)>,<B(y)>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
A(x, %composer, 0b1110 and %changed)
B(y, %composer, 0b1000)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
}
}
"""
@@ -971,7 +1103,13 @@
%dirty = %dirty or if (%composer.changed(content)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
content(%composer, 0b1110 and %dirty)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -984,7 +1122,13 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Example)<SomeTh...>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
SomeThing(ComposableSingletons%TestKt.lambda-1, %composer, 0b0110)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -996,7 +1140,13 @@
val lambda-1: Function2<Composer, Int, Unit> = composableLambdaInstance(<>, false) { %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val id = object
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -1032,7 +1182,13 @@
%dirty = %dirty or 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
print(values)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -1072,7 +1228,13 @@
%dirty = %dirty or 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
print(values)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -1099,7 +1261,13 @@
fun B(values: Array<out Foo>, %composer: Composer?, %changed: Int) {
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(B):Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
print(values)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
B(*values, %composer, %changed or 0b0001)
}
@@ -1131,7 +1299,13 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(A):Test.kt")
if (%changed and 0b0001 !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
print("hello world")
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -1144,7 +1318,13 @@
fun B(%composer: Composer?, %changed: Int) {
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(B):Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
print(counter)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
val tmp0_rcvr = <this>
%composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
tmp0_rcvr.B(%composer, %changed or 0b0001)
@@ -1207,9 +1387,15 @@
}
}
%composer.endDefaults()
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(a)
used(b)
used(c)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -1252,7 +1438,13 @@
%dirty = %dirty or if (%composer.changed(content)) 0b00100000 else 0b00010000
}
if (%dirty and 0b01011011 !== 0b00010010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
content(y, %composer, 0b1110 and %dirty or 0b01110000 and %dirty)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -1282,6 +1474,9 @@
if (%default and 0b0010 !== 0) {
y = 0
}
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
used(y)
Wrap(10, composableLambda(%composer, <>, true) { it: Int, %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C<A(x)>:Test.kt")
@@ -1290,12 +1485,21 @@
%dirty = %dirty or if (%composer.changed(it)) 0b0100 else 0b0010
}
if (%dirty and 0b01011011 !== 0b00010010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(it)
A(x, 0, %composer, 0b1110 and %dirty, 0b0010)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
}, %composer, 0b00110110)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -1329,8 +1533,14 @@
if (%default and 0b0010 !== 0) {
y = 0
}
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
A(x, y, %composer, 0b1110 and %changed or 0b01110000 and %changed, 0)
val tmp0 = x + y
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
return tmp0
}
@@ -1357,7 +1567,13 @@
%dirty = %dirty or if (%composer.changed(x)) 0b0100 else 0b0010
}
if (%dirty and 0b01011011 !== 0b00010010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
A(x, 0, %composer, 0b1110 and %dirty, 0b0010)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -1379,7 +1595,13 @@
fun Test(x: Int, %composer: Composer?, %changed: Int): Int {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Test)<A()>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val tmp0 = A(0, 0, %composer, 0, 0b0011)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
return tmp0
}
@@ -1409,7 +1631,13 @@
%dirty = %dirty or if (%composer.changed(y)) 0b00100000 else 0b00010000
}
if (%dirty and 0b01011011 !== 0b00010010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
A(x, y, %composer, 0b1110 and %dirty or 0b01110000 and %dirty, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -1471,8 +1699,14 @@
}
}
%composer.endDefaults()
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(a)
used(b)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -1484,9 +1718,15 @@
fun CannotSkip(a: Int, b: Foo, %composer: Composer?, %changed: Int) {
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(CannotSkip):Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(a)
used(b)
print("Hello World")
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
CannotSkip(a, b, %composer, %changed or 0b0001)
}
@@ -1496,7 +1736,13 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(NoParams):Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
print("Hello World")
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -1538,7 +1784,13 @@
}
}
%composer.endDefaults()
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
print("Hello World")
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -1566,7 +1818,13 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test)<A()>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
A(%composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -1598,7 +1856,13 @@
%dirty = %dirty or if (%composer.changed(x)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
A(x, %composer, 0b1110 and %dirty)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -1640,7 +1904,13 @@
%dirty = %dirty or if (%composer.changed(text)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
B(text, <unsafe-coerce>(0), %composer, 0b1110 and %dirty, 0b0010)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -1667,8 +1937,14 @@
if (%default and 0b0010 !== 0) {
color = Companion.Unset
}
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(text)
used(color)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -1738,6 +2014,9 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(A)<D>,<C({})>,<C(stab...>,<C(16.d...>,<C(Dp(1...>,<C(16.d...>,<C(norm...>,<C(Int....>,<C(stab...>,<C(Modi...>,<C(Foo....>,<C(cons...>,<C(123)>,<C(123>,<C(x)>,<C(x>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val x = 123
D(ComposableSingletons%TestKt.lambda-1, %composer, 0b0110)
C({
@@ -1756,6 +2035,9 @@
C(123 + 345, %composer, 0b0110)
C(x, %composer, 0b0110)
C(x * 123, %composer, 0b0110)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -1768,8 +2050,14 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(B)<C(Math...>,<C(Math...>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
C(random(), %composer, 0)
C(random() / 100.0f, %composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -1781,7 +2069,13 @@
val lambda-1: Function2<Composer, Int, Unit> = composableLambdaInstance(<>, false) { %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Unit
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -1806,7 +2100,13 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Example)<D>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
D(ComposableSingletons%TestKt.lambda-1, %composer, 0b0110)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -1818,13 +2118,18 @@
val lambda-1: Function2<Composer, Int, Unit> = composableLambdaInstance(<>, false) { %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Unit
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
}
}
-
"""
)
@@ -1854,7 +2159,13 @@
if (%default and 0b0001 !== 0) {
x = 0
}
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
A(x, %composer, 0b1110 and %dirty)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -1900,7 +2211,13 @@
}
}
%composer.endDefaults()
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
A(x, %composer, 0b1110 and %dirty)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -1928,7 +2245,13 @@
fun Test(x: Foo, %composer: Composer?, %changed: Int) {
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test)<A(x)>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
A(x, %composer, 0b1000)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
Test(x, %composer, %changed or 0b0001)
}
@@ -1971,7 +2294,13 @@
}
}
%composer.endDefaults()
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
A(x, %composer, 0b1110 and %dirty)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -2045,7 +2374,13 @@
}
}
%composer.endDefaults()
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
A(a, b, c, d, e, %composer, 0b1000000000000000 or 0b1110 and %dirty or 0b01110000 and %dirty or 0b001110000000 and %dirty or 0b0001110000000000 and %dirty)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -2077,8 +2412,14 @@
%dirty = %dirty or if (%composer.changed(x)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
X(x + 1, %composer, 0)
X(x, %composer, 0b1110 and %dirty)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -2135,7 +2476,13 @@
val lambda-1: @[ExtensionFunctionType] Function5<LazyItemScope, Int, User?, Composer, Int, Unit> = composableLambdaInstance(<>, false) { index: Int, user: User?, %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C:Test.kt")
if (%changed and 0b0001010000000001 !== 0b010000000000 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
print("Hello World")
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -2166,7 +2513,13 @@
%dirty = %dirty or if (%composer.changed(<this>)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
doSomething(<this>, %composer, 0b1110 and %dirty)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -2179,6 +2532,12 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(doSomething):Test.kt")
if (%changed and 0b0001 !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -2219,7 +2578,13 @@
@Composable
@ExplicitGroupsComposable
fun A(foo: Foo, %composer: Composer?, %changed: Int) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
foo.b(null, %composer, 0b1110 and %changed, 0b0001)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
}
@Composable
@ExplicitGroupsComposable
@@ -2227,12 +2592,24 @@
if (%default and 0b0001 !== 0) {
label = ""
}
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
c(<this>, label, %composer, 0b1110 and %changed or 0b01110000 and %changed)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
}
@Composable
@ExplicitGroupsComposable
fun c(foo: Foo, label: String, %composer: Composer?, %changed: Int) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
print(label)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
}
"""
)
@@ -2268,7 +2645,13 @@
%dirty = %dirty or if (%composer.changed(x)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
B(x, x + 1, 123, fooGlobal, %composer, 0b110110000000 or 0b1110 and %dirty)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -2309,7 +2692,13 @@
val lambda-1: @[ExtensionFunctionType] Function3<Foo, Composer, Int, Unit> = composableLambdaInstance(<>, false) { %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C:Test.kt")
if (%changed and 0b01010001 !== 0b00010000 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Unit
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -2321,7 +2710,13 @@
%dirty = %dirty or if (%composer.changed(%this%null)) 0b0100 else 0b0010
}
if (%dirty and 0b01011011 !== 0b00010010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(%this%null.x)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -2329,7 +2724,13 @@
val lambda-3: @[ExtensionFunctionType] Function3<StableFoo, Composer, Int, Unit> = composableLambdaInstance(<>, false) { %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C:Test.kt")
if (%changed and 0b01010001 !== 0b00010000 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Unit
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -2341,7 +2742,13 @@
%dirty = %dirty or if (%composer.changed(%this%null)) 0b0100 else 0b0010
}
if (%dirty and 0b01011011 !== 0b00010010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(%this%null.x)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -2378,6 +2785,9 @@
%dirty = %dirty or if (%composer.changed(x)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
Provide(composableLambda(%composer, <>, true) { y: Int, %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C<Provid...>,<B(x,>:Test.kt")
val %dirty = %changed
@@ -2385,6 +2795,9 @@
%dirty = %dirty or if (%composer.changed(y)) 0b0100 else 0b0010
}
if (%dirty and 0b01011011 !== 0b00010010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
Provide(composableLambda(%composer, <>, true) { z: Int, %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C<B(x,>:Test.kt")
val %dirty = %changed
@@ -2392,17 +2805,29 @@
%dirty = %dirty or if (%composer.changed(z)) 0b0100 else 0b0010
}
if (%dirty and 0b01011011 !== 0b00010010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
B(x, y, z, %composer, 0b1110 and %dirty or 0b01110000 and %dirty shl 0b0011 or 0b001110000000 and %dirty shl 0b0110, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
}, %composer, 0b0110)
B(x, y, 0, %composer, 0b1110 and %dirty or 0b01110000 and %dirty shl 0b0011, 0b0100)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
}, %composer, 0b0110)
B(x, 0, 0, %composer, 0b1110 and %dirty, 0b0110)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -2437,14 +2862,26 @@
%dirty = %dirty or if (%composer.changed(x)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
@Composable
fun foo(y: Int, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(foo)<B(x,>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
B(x, y, %composer, 0b1110 and %dirty or 0b01110000 and %changed shl 0b0011)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
foo(x, %composer, 0b1110 and %dirty)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -2644,8 +3081,14 @@
if (%default and 0b0100000000000000 !== 0) {
a14 = 0
}
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, %dirty1, <>)
+ }
Example(a00, a01, a02, a03, a04, a05, a06, a07, a08, a09, a10, a11, a12, a13, a14, %composer, 0b1110 and %dirty or 0b01110000 and %dirty or 0b001110000000 and %dirty or 0b0001110000000000 and %dirty or 0b1110000000000000 and %dirty or 0b01110000000000000000 and %dirty or 0b001110000000000000000000 and %dirty or 0b0001110000000000000000000000 and %dirty or 0b1110000000000000000000000000 and %dirty or 0b01110000000000000000000000000000 and %dirty, 0b1110 and %dirty1 or 0b01110000 and %dirty1 or 0b001110000000 and %dirty1 or 0b0001110000000000 and %dirty1 or 0b1110000000000000 and %dirty1, 0)
Example(a14, a13, a12, a11, a10, a09, a08, a07, a06, a05, a04, a03, a02, a01, a00, %composer, 0b1110 and %dirty1 shr 0b1100 or 0b01110000 and %dirty1 shr 0b0110 or 0b001110000000 and %dirty1 or 0b0001110000000000 and %dirty1 shl 0b0110 or 0b1110000000000000 and %dirty1 shl 0b1100 or 0b01110000000000000000 and %dirty shr 0b1100 or 0b001110000000000000000000 and %dirty shr 0b0110 or 0b0001110000000000000000000000 and %dirty or 0b1110000000000000000000000000 and %dirty shl 0b0110 or 0b01110000000000000000000000000000 and %dirty shl 0b1100, 0b1110 and %dirty shr 0b1100 or 0b01110000 and %dirty shr 0b0110 or 0b001110000000 and %dirty or 0b0001110000000000 and %dirty shl 0b0110 or 0b1110000000000000 and %dirty shl 0b1100, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -2856,8 +3299,14 @@
if (%default and 0b1000000000000000 !== 0) {
a15 = 0
}
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, %dirty1, <>)
+ }
Example(a00, a01, a02, a03, a04, a05, a06, a07, a08, a09, a10, a11, a12, a13, a14, a15, %composer, 0b1110 and %dirty or 0b01110000 and %dirty or 0b001110000000 and %dirty or 0b0001110000000000 and %dirty or 0b1110000000000000 and %dirty or 0b01110000000000000000 and %dirty or 0b001110000000000000000000 and %dirty or 0b0001110000000000000000000000 and %dirty or 0b1110000000000000000000000000 and %dirty or 0b01110000000000000000000000000000 and %dirty, 0b1110 and %dirty1 or 0b01110000 and %dirty1 or 0b001110000000 and %dirty1 or 0b0001110000000000 and %dirty1 or 0b1110000000000000 and %dirty1 or 0b01110000000000000000 and %dirty1, 0)
Example(a15, a14, a13, a12, a11, a10, a09, a08, a07, a06, a05, a04, a03, a02, a01, a00, %composer, 0b1110 and %dirty1 shr 0b1111 or 0b01110000 and %dirty1 shr 0b1001 or 0b001110000000 and %dirty1 shr 0b0011 or 0b0001110000000000 and %dirty1 shl 0b0011 or 0b1110000000000000 and %dirty1 shl 0b1001 or 0b01110000000000000000 and %dirty1 shl 0b1111 or 0b001110000000000000000000 and %dirty shr 0b1001 or 0b0001110000000000000000000000 and %dirty shr 0b0011 or 0b1110000000000000000000000000 and %dirty shl 0b0011 or 0b01110000000000000000000000000000 and %dirty shl 0b1001, 0b1110 and %dirty shr 0b1111 or 0b01110000 and %dirty shr 0b1001 or 0b001110000000 and %dirty shr 0b0011 or 0b0001110000000000 and %dirty shl 0b0011 or 0b1110000000000000 and %dirty shl 0b1001 or 0b01110000000000000000 and %dirty shl 0b1111, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -2896,7 +3345,13 @@
@Composable @ReadOnlyComposable @JvmName(name = "getCurrent")
get() {
sourceInformationMarkerStart(%composer, <>, "C:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val tmp0 = %composer.hashCode()
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
sourceInformationMarkerEnd(%composer)
return tmp0
}
@@ -2904,7 +3359,13 @@
@Composable
fun getHashCode(%composer: Composer?, %changed: Int): Int {
sourceInformationMarkerStart(%composer, <>, "C(getHashCode):Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val tmp0 = %composer.hashCode()
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
sourceInformationMarkerEnd(%composer)
return tmp0
}
@@ -2914,7 +3375,13 @@
@Composable
fun getHashCode(%composer: Composer?, %changed: Int): Int {
sourceInformationMarkerStart(%composer, <>, "C(getHashCode):Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val tmp0 = %composer.hashCode()
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
sourceInformationMarkerEnd(%composer)
return tmp0
}
@@ -2970,8 +3437,14 @@
}
}
%composer.endDefaults()
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
A(wontChange, %composer, 0b1110 and %dirty)
A(mightChange, %composer, 0b1110 and %dirty shr 0b0011)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -3002,7 +3475,13 @@
%dirty = %dirty or if (%composer.changed(content)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
content(%composer, 0b1110 and %dirty)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -3026,7 +3505,13 @@
fun B() {
return A { %composer: Composer?, %changed: Int ->
%composer.startReplaceableGroup(<>)
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val tmp0 = 123
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
tmp0
}
@@ -3085,9 +3570,15 @@
if (%default and 0b0100 !== 0) {
content = ComposableSingletons%TestKt.lambda-1
}
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
used(modifier)
used(paddingStart)
content(%composer, 0b1110 and %dirty shr 0b0110)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -3099,7 +3590,13 @@
val lambda-1: Function2<Composer, Int, Unit> = composableLambdaInstance(<>, false) { %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Unit
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -3135,6 +3632,9 @@
%dirty = %dirty or if (%composer.changed(cond)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "<A()>")
if (cond) {
@@ -3144,6 +3644,9 @@
if (cond) {
B(%composer, 0)
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -3182,7 +3685,13 @@
fun Unskippable(a: Unstable, b: Stable, c: MaybeStable, %composer: Composer?, %changed: Int) {
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Unskippable):Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(a)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
Unskippable(a, b, c, %composer, %changed or 0b0001)
}
@@ -3196,7 +3705,13 @@
%dirty = %dirty or if (%composer.changed(b)) 0b00100000 else 0b00010000
}
if (%dirty and 0b01010001 !== 0b00010000 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(b)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -3213,7 +3728,13 @@
%dirty = %dirty or if (%composer.changed(c)) 0b000100000000 else 0b10000000
}
if (%dirty and 0b001010000001 !== 0b10000000 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(c)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -3226,6 +3747,12 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Skippable3):Test.kt")
if (%changed and 0b0001 !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -3264,8 +3791,14 @@
%dirty = %dirty or if (%composer.changed(x)) 0b00100000 else 0b00010000
}
if (%dirty and 0b01011011 !== 0b00010010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(<this>)
used(x)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -3285,8 +3818,14 @@
%dirty = %dirty or if (%composer.changed(it)) 0b00100000 else 0b00010000
}
if (%dirty and 0b001011011011 !== 0b10010010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
used(%this%null)
used(it)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -3345,7 +3884,13 @@
}
}
%composer.endDefaults()
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
state.value
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -3387,13 +3932,25 @@
val current: Int
@Composable @ReadOnlyComposable @JvmName(name = "getCurrent")
get() {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val tmp0 = %composer.hashCode()
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
return tmp0
}
@ReadOnlyComposable
@Composable
fun getHashCode(%composer: Composer?, %changed: Int): Int {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val tmp0 = %composer.hashCode()
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
return tmp0
}
static val %stable: Int = 0
@@ -3401,7 +3958,13 @@
@ReadOnlyComposable
@Composable
fun getHashCode(%composer: Composer?, %changed: Int): Int {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val tmp0 = %composer.hashCode()
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
return tmp0
}
"""
diff --git a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/LambdaMemoizationRegressionTests.kt b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/LambdaMemoizationRegressionTests.kt
index bb18ad9..7e02920 100644
--- a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/LambdaMemoizationRegressionTests.kt
+++ b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/LambdaMemoizationRegressionTests.kt
@@ -46,7 +46,13 @@
val lambda-1: Function2<Composer, Int, Unit> = composableLambdaInstance(<>, false) { %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Unit
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -80,7 +86,13 @@
val lambda-1: Function2<Composer, Int, Unit> = composableLambdaInstance(<>, false) { %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Unit
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -103,7 +115,13 @@
val lambda-1: Function2<Composer, Int, Unit> = composableLambdaInstance(<>, false) { %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Unit
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
diff --git a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/LambdaMemoizationTransformTests.kt b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/LambdaMemoizationTransformTests.kt
index 6c23f3a..6be5b38 100644
--- a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/LambdaMemoizationTransformTests.kt
+++ b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/LambdaMemoizationTransformTests.kt
@@ -38,7 +38,13 @@
val c: Function2<Composer, Int, Unit> = composableLambdaInstance(<>, true) { %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
print(b)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -69,10 +75,19 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Example):Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
@Composable
fun A(%composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(A):Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
@Composable
@@ -80,23 +95,44 @@
fun B(content: Function2<Composer, Int, Unit>, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(B)<conten...>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
content(%composer, 0b1110 and %changed)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
@Composable
fun C(%composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(C)<B>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
B(composableLambda(%composer, <>, false) { %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C<A()>:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
A(%composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
}, %composer, 0b0110)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -135,6 +171,9 @@
fun Err(%composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Err):Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
fun handler() {
{ x: Int ->
x
@@ -143,6 +182,9 @@
{
handler()
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
""",
@@ -174,6 +216,9 @@
fun Err(y: Int, z: Int, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Err)<{>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
class Local {
val w: Int = z
fun something(x: Int): Int {
@@ -185,6 +230,9 @@
Local().something(2)
}
}, %composer, 0b1110 and %changed or 0b01110000 and %changed)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
""",
@@ -213,6 +261,9 @@
fun Example(z: Int, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Example)<{>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
class Foo(val x: Int) {
val y: Int = z
}
@@ -221,6 +272,9 @@
Foo(1)
}
}, %composer, 0b1110 and %changed)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
""",
@@ -252,16 +306,34 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(SimpleAnimatedContentSample)<Animat...>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
@Composable
fun Foo(%composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Foo):Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
AnimatedContent(1.0f, null, null, null, composableLambda(%composer, <>, false) { it: Float, %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C<Foo()>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Foo(%composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
}, %composer, 0b0110000000000110, 0b1110)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -294,15 +366,27 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(A)<B>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
<<LOCALDELPROP>>
B(composableLambda(%composer, <>, true) { %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
print(<get-x>())
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
}, %composer, 0b0110)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -333,7 +417,13 @@
val lambda-1: Function2<Composer, Int, Unit> = composableLambdaInstance(<>, false) { %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Unit
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -341,7 +431,13 @@
val lambda-2: Function2<Composer, Int, Unit> = composableLambdaInstance(<>, false) { %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Unit
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -370,10 +466,16 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(A)<B(foo)>,<B(bar)>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val foo = ComposableSingletons%TestKt.lambda-1
val bar = ComposableSingletons%TestKt.lambda-2
B(foo, %composer, 0b0110)
B(bar, %composer, 0b0110)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -385,7 +487,13 @@
val lambda-1: Function2<Composer, Int, Unit> = composableLambdaInstance(<>, false) { %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Unit
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -393,7 +501,13 @@
val lambda-2: Function2<Composer, Int, Unit> = composableLambdaInstance(<>, false) { %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Unit
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -421,7 +535,13 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(A)<B>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
B(ComposableSingletons%TestKt.lambda-1, %composer, 0b0110)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -433,7 +553,13 @@
val lambda-1: Function2<Composer, Int, Unit> = composableLambdaInstance(<>, false) { %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Unit
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -480,13 +606,25 @@
content = composableLambda(%composer, <>, true) { %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C<Displa...>:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Display("%enabled", %composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
}
}
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
Wrap(content, %composer, 0b1110 and %dirty shr 0b0011)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -526,15 +664,27 @@
%dirty = %dirty or if (%composer.changed(enabled)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val content = composableLambda(%composer, <>, true) { %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C<Displa...>:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Display("%enabled", %composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
}
Wrap(content, %composer, 0b0110)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -579,7 +729,13 @@
%dirty = %dirty or if (%composer.changed(content)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
content()
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -592,9 +748,15 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test)<TestLa...>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
TestLambda({
println("Doesn't capture")
}, %composer, 0b0110)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -633,7 +795,13 @@
%dirty = %dirty or if (%composer.changed(content)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
content()
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -650,11 +818,17 @@
%dirty = %dirty or if (%composer.changed(a)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
TestLambda(remember(a, {
{
println("Captures a" + a)
}
}, %composer, 0b1110 and %dirty), %composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -685,12 +859,21 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test)*<it()>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
var lambda = null
f { s: String ->
lambda = composableLambdaInstance(<>, true) { %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C<Text(s...>:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Text(s, %composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -708,6 +891,9 @@
}
}
tmp0_group
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -746,11 +932,20 @@
%dirty = %dirty or if (%composer.changed(s)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
remember({
composableLambdaInstance(<>, true) { %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C<Text(s...>:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Text(s, %composer, 0b1110 and %dirty)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -760,13 +955,22 @@
composableLambdaInstance(<>, true) { %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C<Text(s...>:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Text(s, %composer, 0b1110 and %dirty)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
}
}
(%composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
diff --git a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/RememberIntrinsicTransformTests.kt b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/RememberIntrinsicTransformTests.kt
index 1a6a8e7..e503d2d 100644
--- a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/RememberIntrinsicTransformTests.kt
+++ b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/RememberIntrinsicTransformTests.kt
@@ -67,6 +67,9 @@
fun app(x: Boolean, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(app)<rememb...>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val a = %composer.startReplaceableGroup(<>)
val tmp0_group = if (x) {
%composer.cache(false) {
@@ -80,6 +83,9 @@
val b = remember({
2
}, %composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -113,10 +119,16 @@
if (%default and 0b0100 !== 0) {
failedResource = null
}
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val deferred = %composer.cache(%changed and 0b1110 xor 0b0110 > 4 && %composer.changed(key) || %changed and 0b0110 === 0b0100 or %changed and 0b01110000 xor 0b00110000 > 32 && %composer.changed(pendingResource) || %changed and 0b00110000 === 0b00100000 or %changed and 0b001110000000 xor 0b000110000000 > 256 && %composer.changed(failedResource) || %changed and 0b000110000000 === 0b000100000000) {
123
}
val tmp0 = deferred > 10
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
return tmp0
}
@@ -154,9 +166,15 @@
%dirty = %dirty or if (%composer.changed(x)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
%composer.cache(%dirty and 0b1110 === 0b0100) {
1
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -168,9 +186,15 @@
fun test2(x: KnownUnstable, %composer: Composer?, %changed: Int) {
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(test2):Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
%composer.cache(%composer.changed(x)) {
1
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
test2(x, %composer, %changed or 0b0001)
}
@@ -184,9 +208,15 @@
%dirty = %dirty or if (%composer.changed(x)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
%composer.cache(%dirty and 0b1110 === 0b0100 || %dirty and 0b1000 !== 0 && %composer.changed(x)) {
1
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -229,9 +259,15 @@
fun test1(x: KnownStable, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(test1):Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
%composer.cache(%changed and 0b1110 xor 0b0110 > 4 && %composer.changed(x) || %changed and 0b0110 === 0b0100) {
1
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
@Composable
@@ -239,9 +275,15 @@
fun test2(x: KnownUnstable, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(test2):Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
%composer.cache(%composer.changed(x)) {
1
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
@Composable
@@ -249,9 +291,15 @@
fun test3(x: Uncertain, %composer: Composer?, %changed: Int) {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(test3):Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
%composer.cache(%changed and 0b1110 xor 0b0110 > 4 && %composer.changed(x) || %changed and 0b0110 === 0b0100) {
1
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -271,9 +319,15 @@
fun rememberFoo(a: Int, b: Int, %composer: Composer?, %changed: Int): Foo {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(rememberFoo):Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val tmp0 = %composer.cache(%changed and 0b1110 xor 0b0110 > 4 && %composer.changed(a) || %changed and 0b0110 === 0b0100 or %changed and 0b01110000 xor 0b00110000 > 32 && %composer.changed(b) || %changed and 0b00110000 === 0b00100000) {
Foo(a, b)
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
return tmp0
}
@@ -301,6 +355,9 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test)<A()>,<rememb...>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val foo = %composer.cache(false) {
Foo()
}
@@ -311,6 +368,9 @@
val bam = remember({
Foo()
}, %composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -341,11 +401,17 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test):Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val a = someInt()
val b = someInt()
val foo = %composer.cache(%composer.changed(a) or %composer.changed(b)) {
Foo(a, b)
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -374,9 +440,15 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test)<CInt()...>,<rememb...>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val foo = remember(CInt(%composer, 0), {
Foo()
}, %composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -409,10 +481,16 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test)<curren...>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val bar = compositionLocalBar.current
val foo = %composer.cache(%composer.changed(bar)) {
Foo()
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -444,9 +522,15 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test)<curren...>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val foo = %composer.cache(%composer.changed(compositionLocalBar.current)) {
Foo()
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -476,10 +560,16 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test)<A()>,<rememb...>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
A(%composer, 0)
val foo = remember({
Foo()
}, %composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -515,12 +605,18 @@
%dirty = %dirty or if (%composer.changed(condition)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
A(%composer, 0)
if (condition) {
val foo = %composer.cache(false) {
Foo()
}
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -556,12 +652,18 @@
%dirty = %dirty or if (%composer.changed(condition)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
if (condition) {
A(%composer, 0)
val foo = remember({
Foo()
}, %composer, 0)
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -592,6 +694,9 @@
fun Test(items: List<Int>, %composer: Composer?, %changed: Int) {
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test)*<rememb...>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val tmp0_iterator = items.iterator()
while (tmp0_iterator.hasNext()) {
val item = tmp0_iterator.next()
@@ -601,6 +706,9 @@
print(foo)
print(item)
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
Test(items, %composer, %changed or 0b0001)
}
@@ -630,6 +738,9 @@
fun Test(items: List<Int>, %composer: Composer?, %changed: Int) {
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test)*<rememb...>,<A()>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val tmp0_iterator = items.iterator()
while (tmp0_iterator.hasNext()) {
val item = tmp0_iterator.next()
@@ -640,6 +751,9 @@
print(foo)
print(item)
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
Test(items, %composer, %changed or 0b0001)
}
@@ -664,10 +778,16 @@
fun Test(items: List<Int>, %composer: Composer?, %changed: Int) {
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test):Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val foo = %composer.cache(false) {
Foo()
}
used(items)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
Test(items, %composer, %changed or 0b0001)
}
@@ -706,9 +826,15 @@
%dirty = %dirty or if (%composer.changed(d)) 0b100000000000 else 0b010000000000
}
if (%dirty and 0b0001011011011011 !== 0b010010010010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
val foo = %composer.cache(%dirty and 0b1110 === 0b0100 or %dirty and 0b01110000 === 0b00100000 or %dirty and 0b001110000000 === 0b000100000000 or %dirty and 0b0001110000000000 === 0b100000000000) {
Foo()
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -736,9 +862,15 @@
fun Test(items: Array<Bar>, %composer: Composer?, %changed: Int) {
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test)<rememb...>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val foo = remember(*items, {
Foo()
}, %composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
Test(items, %composer, %changed or 0b0001)
}
@@ -769,10 +901,16 @@
%dirty = %dirty or if (%composer.changed(<unsafe-coerce>(inlineInt))) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
val a = InlineInt(123)
val foo = %composer.cache(%dirty and 0b1110 === 0b0100) {
Foo()
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -806,6 +944,9 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test):Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val a = someInt()
val b = someInt()
val foo = %composer.cache(%composer.changed(a) or %composer.changed(b)) {
@@ -816,6 +957,9 @@
val bar = %composer.cache(%composer.changed(c) or %composer.changed(d)) {
Foo(c, d)
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -849,10 +993,16 @@
%dirty = %dirty or if (%composer.changed(a)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
val b = someInt()
val foo = %composer.cache(%dirty and 0b1110 === 0b0100 or %composer.changed(b)) {
Foo(a, b)
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -881,10 +1031,16 @@
fun Test(a: Int, %composer: Composer?, %changed: Int): Foo {
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C(Test):Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val b = someInt()
val tmp0 = %composer.cache(%changed and 0b1110 xor 0b0110 > 4 && %composer.changed(a) || %changed and 0b0110 === 0b0100 or %composer.changed(b)) {
Foo(a, b)
}
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
return tmp0
}
@@ -910,12 +1066,18 @@
%dirty = %dirty or if (%composer.changed(a)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
used(%composer.cache(%dirty and 0b1110 === 0b0100) {
{
a
}
}
)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -947,7 +1109,13 @@
%dirty = %dirty or if (%composer.changed(a)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
used(%composer.cache(%dirty and 0b1110 === 0b0100, effect))
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -979,10 +1147,16 @@
%dirty = %dirty or if (%composer.changed(a)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
used(%composer.cache(%dirty and 0b1110 === 0b0100, {
effect()
}
))
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -1013,7 +1187,13 @@
%dirty = %dirty or if (%composer.changed(a)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
used(%composer.cache(%dirty and 0b1110 === 0b0100, a::value))
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
diff --git a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/StabilityPropagationTransformTests.kt b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/StabilityPropagationTransformTests.kt
index 10f5e0e..c502f11 100644
--- a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/StabilityPropagationTransformTests.kt
+++ b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/StabilityPropagationTransformTests.kt
@@ -68,11 +68,17 @@
%dirty = %dirty or if (%composer.changed(x)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
A(x, %composer, 0b1110 and %dirty)
A(Foo(0), %composer, 0)
A(remember({
Foo(0)
}, %composer, 0), %composer, 0b0110)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -104,11 +110,17 @@
fun Test(x: Foo, %composer: Composer?, %changed: Int) {
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test)<A(x)>,<A(Foo(...>,<rememb...>,<A(reme...>:Test.kt")
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
A(x, %composer, 0b1000)
A(Foo(0), %composer, 0b1000)
A(remember({
Foo(0)
}, %composer, 0), %composer, 0b1000)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endRestartGroup()?.updateScope { %composer: Composer?, %force: Int ->
Test(x, %composer, %changed or 0b0001)
}
@@ -133,7 +145,13 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Example)<A(list...>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
A(listOf("a"), %composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
diff --git a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/TargetAnnotationsTransformTests.kt b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/TargetAnnotationsTransformTests.kt
index 05baa8c..1281225 100644
--- a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/TargetAnnotationsTransformTests.kt
+++ b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/TargetAnnotationsTransformTests.kt
@@ -37,7 +37,13 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test)<Text("...>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Text("Hello", %composer, 0b0110)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -65,7 +71,13 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test)<Circle...>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Circle(%composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -91,6 +103,12 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test):Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -122,7 +140,13 @@
%dirty = %dirty or if (%composer.changed(content)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
content(%composer, 0b1110 and %dirty)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -152,7 +176,13 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test)<Row>:Test.kt")
if (%changed and 0b0001 !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Row(ComposableSingletons%TestKt.lambda-1, %composer, 0b0110)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -164,7 +194,13 @@
val lambda-1: Function2<Composer, Int, Unit> = composableLambdaInstance(<>, false) { %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C<Text("...>:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Text("test", %composer, 0b0110)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -192,16 +228,28 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test)<Inline...>:Test.kt")
if (%changed and 0b0001 !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
InlineRow({ %composer: Composer?, %changed: Int ->
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C<Text("...>:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Text("test", %composer, 0b0110)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
%composer.endReplaceableGroup()
}, %composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -231,7 +279,13 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test)<Wrappe...>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Wrapper(ComposableSingletons%TestKt.lambda-1, %composer, 0b0110)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -243,7 +297,13 @@
val lambda-1: Function2<Composer, Int, Unit> = composableLambdaInstance(<>, false) { %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C<Text("...>:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Text("test", %composer, 0b0110)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -272,11 +332,17 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test)<Compos...>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
CompositionLocalProvider(
content = ComposableSingletons%TestKt.lambda-1,
%composer = %composer,
%changed = 56
)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -288,7 +354,13 @@
val lambda-1: Function2<Composer, Int, Unit> = composableLambdaInstance(<>, false) { %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C<Text("...>:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Text("test", %composer, 0b0110)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -343,7 +415,13 @@
%dirty = %dirty or if (%composer.changed(content)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
content.call(%composer, 0b1110 and %dirty)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -361,8 +439,14 @@
%dirty = %dirty or if (%composer.changed(content)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
Text("Test", %composer, 0b0110)
content.call(%composer, 0b1110 and %dirty)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -376,6 +460,9 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test)<OpenCu...>,<Closed...>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
OpenCustom(class <no name provided> : CustomComposable {
@Composable
@ComposableTarget(applier = "UI")
@@ -383,7 +470,13 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(call)<Text("...>:Test.kt")
if (%changed and 0b0001 !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Text("Test", %composer, 0b0110)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -401,7 +494,13 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(call)<Text("...>:Test.kt")
if (%changed and 0b0001 !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Text("Test", %composer, 0b0110)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -412,6 +511,9 @@
}
}
<no name provided>(), %composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -442,6 +544,9 @@
%dirty = %dirty or if (%composer.changed(content)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val tmp0_safe_receiver = content
val tmp1_group = when {
tmp0_safe_receiver == null -> {
@@ -456,6 +561,9 @@
}
}
tmp1_group
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -523,6 +631,12 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Leaf):Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -540,7 +654,13 @@
%dirty = %dirty or if (%composer.changed(content)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
content(%composer, 0b1110 and %dirty)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -608,6 +728,9 @@
if (%default and 0b00100000 !== 0) {
six = null
}
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
one(%composer, 0b1110 and %dirty)
two?.invoke(%composer, 0b1110 and %dirty shr 0b0011)
val tmp1_safe_receiver = three
@@ -662,6 +785,9 @@
%composer.endReplaceableGroup()
tmp3_group
content(%composer, 0b1110 and %dirty shr 0b00010010)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -675,7 +801,13 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(UseOptional)<Option...>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Optional(null, null, null, null, null, null, ComposableSingletons%TestKt.lambda-2, %composer, 0b000110000000000000000000, 0b00111111)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -687,7 +819,13 @@
val lambda-1: Function2<Composer, Int, Unit> = composableLambdaInstance(<>, false) { %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Unit
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -695,7 +833,13 @@
val lambda-2: Function2<Composer, Int, Unit> = composableLambdaInstance(<>, false) { %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C<Leaf()>:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Leaf(%composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -774,17 +918,29 @@
if (%default and 0b0001 !== 0) {
modifier = Companion
}
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val tmp0_measurePolicy = localBoxMeasurePolicy
Layout({ %composer: Composer?, %changed: Int ->
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C<conten...>:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
content(LocalBoxScopeInstance, %composer, 0b0110 or 0b01110000 and %changed)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
%composer.endReplaceableGroup()
}, modifier, tmp0_measurePolicy, %composer, 0b000110000000 or 0b01110000 and %changed shl 0b0011, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
}
"""
@@ -847,11 +1003,20 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test1)<Layout...>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Layout({ %composer: Composer?, %changed: Int ->
%composer.startReplaceableGroup(<>)
sourceInformation(%composer, "C:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Unit
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -862,6 +1027,9 @@
}
}
<no name provided>(), %composer, 0, 0b0010)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -879,12 +1047,18 @@
%dirty = %dirty or if (%composer.changed(content)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
Layout(content, null, class <no name provided> : MeasurePolicy {
override fun measure(%this%Layout: MeasureScope, <anonymous parameter 0>: List<Measurable>, <anonymous parameter 1>: Constraints): MeasureResult {
return error("")
}
}
<no name provided>(), %composer, 0b1110 and %dirty, 0b0010)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -898,7 +1072,13 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test3)<Test1(...>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Test1(%composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -912,9 +1092,15 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test4)<BasicT...>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
BasicText(AnnotatedString(
text = "Some text"
), null, null, null, <unsafe-coerce>(0), false, 0, null, %composer, 0, 0b11111110)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -935,15 +1121,27 @@
%dirty = %dirty or if (%composer.changed(content)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
CompositionLocalProvider(Local provides 5, composableLambda(%composer, <>, true) { %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C<Test1(...>,<conten...>:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Test1(%composer, 0)
content(%composer, 0b1110 and %dirty)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
}, %composer, 0b00111000)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -961,15 +1159,27 @@
%dirty = %dirty or if (%composer.changed(test)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
CompositionLocalProvider(Local provides 6, composableLambda(%composer, <>, true) { %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C<T(test...>,<Test1(...>:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
T(test, %composer, 0b1110 and %dirty)
Test1(%composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
}, %composer, 0b00111000)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -982,6 +1192,12 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(T):Test.kt")
if (%changed and 0b0001 !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -1018,7 +1234,13 @@
if (%default and 0b0001 !== 0) {
context = EmptyCoroutineContext
}
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val tmp0 = collectAsState(value, context, %composer, 0b001000001000, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
return tmp0
}
@@ -1029,9 +1251,15 @@
if (%default and 0b0010 !== 0) {
context = EmptyCoroutineContext
}
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
val tmp0 = mutableStateOf(
value = initial
)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
%composer.endReplaceableGroup()
return tmp0
}
@@ -1071,24 +1299,42 @@
%dirty = %dirty or if (%composer.changed(content)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
<<LOCALDELPROP>>
Defer(composableLambda(%composer, <>, true) { %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
UiContent(composableLambda(%composer, <>, true) { %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C<update...>:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
<get-updatedContent>()(%composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
}
)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
}
)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -1120,7 +1366,13 @@
composableLambdaInstance(<>, true) { %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C<conten...>:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
content(%this%add, %composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -1153,7 +1405,13 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Test)<Widget...>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Widget(null, %composer, 0b0110)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -1195,7 +1453,13 @@
%dirty = %dirty or if (%composer.changed(decorator)) 0b0100 else 0b0010
}
if (%dirty and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %dirty, -1, <>)
+ }
decorator(ComposableSingletons%TestKt.lambda-1, %composer, 0b0110 or 0b01110000 and %dirty shl 0b0011)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -1207,7 +1471,13 @@
val lambda-1: Function2<Composer, Int, Unit> = composableLambdaInstance(<>, false) { %composer: Composer?, %changed: Int ->
sourceInformation(%composer, "C<Text("...>:Test.kt")
if (%changed and 0b1011 !== 0b0010 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Text("Some text", %composer, 0b0110)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -1240,7 +1510,13 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(NFromFile)<Open()>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
Open(%composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -1253,7 +1529,13 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(NFromInference)<N()>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
N(%composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -1295,7 +1577,13 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(InferN)<N()>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
N(%composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -1349,6 +1637,12 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(OpenTarget):Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -1370,7 +1664,13 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(Compose)<OpenTa...>:Test.kt")
if (%changed and 0b0001 !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
OpenTarget(%composer, 0)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
diff --git a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/TraceInformationTest.kt b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/TraceInformationTest.kt
index d1ab22a..f261e6e 100644
--- a/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/TraceInformationTest.kt
+++ b/compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/TraceInformationTest.kt
@@ -47,6 +47,12 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(B):Test.kt")
if (%changed and 0b0001 !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
@@ -62,7 +68,13 @@
%composer = %composer.startRestartGroup(<>)
sourceInformation(%composer, "C(C)<B(1337...>:Test.kt")
if (%changed !== 0 || !%composer.skipping) {
+ if (isTraceInProgress()) {
+ traceEventStart(<>, %changed, -1, <>)
+ }
A().B(1337, %composer, 0b0110)
+ if (isTraceInProgress()) {
+ traceEventEnd()
+ }
} else {
%composer.skipToGroupEnd()
}
diff --git a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/KtxNameConventions.kt b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/KtxNameConventions.kt
index ef4ab64..573991c 100644
--- a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/KtxNameConventions.kt
+++ b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/KtxNameConventions.kt
@@ -15,5 +15,8 @@
val UPDATE_SCOPE = Name.identifier("updateScope")
val SOURCEINFORMATION = "sourceInformation"
val SOURCEINFORMATIONMARKERSTART = "sourceInformationMarkerStart"
+ val IS_TRACE_IN_PROGRESS = "isTraceInProgress"
+ val TRACE_EVENT_START = "traceEventStart"
+ val TRACE_EVENT_END = "traceEventEnd"
val SOURCEINFORMATIONMARKEREND = "sourceInformationMarkerEnd"
}
\ No newline at end of file
diff --git a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/ComposableFunctionBodyTransformer.kt b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/ComposableFunctionBodyTransformer.kt
index 1bda2a7..7d23c51 100644
--- a/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/ComposableFunctionBodyTransformer.kt
+++ b/compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/ComposableFunctionBodyTransformer.kt
@@ -154,6 +154,7 @@
import org.jetbrains.kotlin.ir.util.getPropertyGetter
import org.jetbrains.kotlin.ir.util.isLocal
import org.jetbrains.kotlin.ir.util.isVararg
+import org.jetbrains.kotlin.ir.util.kotlinFqName
import org.jetbrains.kotlin.ir.util.parentClassOrNull
import org.jetbrains.kotlin.ir.util.patchDeclarationParents
import org.jetbrains.kotlin.ir.util.properties
@@ -285,6 +286,7 @@
interface IrChangedBitMaskValue {
val used: Boolean
+ val declarations: List<IrValueDeclaration>
fun irLowBit(): IrExpression
fun irIsolateBitsAtSlot(slot: Int, includeStableBit: Boolean): IrExpression
fun irSlotAnd(slot: Int, bits: Int): IrExpression
@@ -610,6 +612,35 @@
).map { it.owner }.first()
}
+ private val isTraceInProgressFunction by guardedLazy {
+ getTopLevelFunctions(
+ ComposeFqNames.fqNameFor(KtxNameConventions.IS_TRACE_IN_PROGRESS)
+ ).map { it.owner }.singleOrNull {
+ it.valueParameters.isEmpty()
+ }
+ }
+
+ private val traceEventStartFunction by guardedLazy {
+ getTopLevelFunctions(
+ ComposeFqNames.fqNameFor(KtxNameConventions.TRACE_EVENT_START)
+ ).map { it.owner }.singleOrNull {
+ it.valueParameters.map { p -> p.type } == listOf(
+ context.irBuiltIns.intType,
+ context.irBuiltIns.intType,
+ context.irBuiltIns.intType,
+ context.irBuiltIns.stringType
+ )
+ }
+ }
+
+ private val traceEventEndFunction by guardedLazy {
+ getTopLevelFunctions(
+ ComposeFqNames.fqNameFor(KtxNameConventions.TRACE_EVENT_END)
+ ).map { it.owner }.singleOrNull {
+ it.valueParameters.isEmpty()
+ }
+ }
+
private val sourceInformationMarkerEndFunction by guardedLazy {
getTopLevelFunctions(
ComposeFqNames.fqNameFor(KtxNameConventions.SOURCEINFORMATIONMARKEREND)
@@ -835,7 +866,10 @@
var (transformed, returnVar) = body.asBodyAndResultVar()
- transformed = transformed.apply { transformChildrenVoid() }
+ transformed = transformed.apply {
+ transformChildrenVoid()
+ wrapWithTraceEvents(irFunctionSourceKey(), scope)
+ }
buildPreambleStatementsAndReturnIfSkippingPossible(
body,
@@ -849,7 +883,14 @@
defaultScope,
)
- if (!elideGroups) scope.realizeGroup(::irEndReplaceableGroup)
+ if (!elideGroups) {
+ scope.realizeGroup {
+ irComposite(statements = listOfNotNull(
+ irTraceEventEnd(),
+ irEndReplaceableGroup()
+ ))
+ }
+ }
declaration.body = IrBlockBodyImpl(
body.startOffset,
@@ -958,7 +999,10 @@
// we must transform the body first, since that will allow us to see whether or not we
// are using the dispatchReceiverParameter or the extensionReceiverParameter
- val transformed = nonReturningBody.apply { transformChildrenVoid() }
+ val transformed = nonReturningBody.apply {
+ transformChildrenVoid()
+ wrapWithTraceEvents(irFunctionSourceKey(), scope)
+ }
canSkipExecution = buildPreambleStatementsAndReturnIfSkippingPossible(
body,
@@ -976,6 +1020,13 @@
skipPreamble.statements.addAll(0, dirty.asStatements())
dirty
} else changedParam
+
+ if (traceEventEndFunction != null) {
+ scope.realizeEndCalls {
+ irTraceEventEnd()!!
+ }
+ }
+
if (canSkipExecution) {
// We CANNOT skip if any of the following conditions are met
// 1. if any of the stable parameters have *differences* from last execution.
@@ -1092,11 +1143,24 @@
)
}
+ val endWithTraceEventEnd = {
+ irComposite(statements = listOfNotNull(
+ irTraceEventEnd(),
+ end()
+ ))
+ }
+
val defaultScope = transformDefaults(scope)
// we must transform the body first, since that will allow us to see whether or not we
// are using the dispatchReceiverParameter or the extensionReceiverParameter
- val transformed = nonReturningBody.apply { transformChildrenVoid() }
+ val transformed = nonReturningBody.apply {
+ transformChildrenVoid()
+ wrapWithTraceEvents(
+ irFunctionSourceKey(),
+ scope,
+ )
+ }
canSkipExecution = buildPreambleStatementsAndReturnIfSkippingPossible(
body,
@@ -1168,7 +1232,7 @@
statements = bodyPreamble.statements + transformed.statements
)
- scope.realizeGroup(end)
+ scope.realizeGroup(endWithTraceEventEnd)
declaration.body = IrBlockBodyImpl(
body.startOffset,
@@ -1753,6 +1817,18 @@
return false
}
+ private fun IrContainerExpression.wrapWithTraceEvents(
+ key: IrExpression,
+ scope: Scope.FunctionScope,
+ ) {
+ val start = irTraceEventStart(key, scope)
+ val end = irTraceEventEnd()
+ if (start != null && end != null) {
+ statements.add(0, start)
+ statements.add(end)
+ }
+ }
+
private fun IrBody.asBodyAndResultVar(): Pair<IrContainerExpression, IrVariable?> {
val original = IrCompositeImpl(
startOffset,
@@ -1941,6 +2017,49 @@
}
}
+ private fun irIsTraceInProgress(): IrExpression? =
+ isTraceInProgressFunction?.let { irCall(it) }
+
+ private fun irIfTraceInProgress(body: IrExpression): IrExpression? =
+ irIsTraceInProgress()?.let { isTraceInProgress ->
+ irIf(isTraceInProgress, body)
+ }
+
+ @OptIn(ObsoleteDescriptorBasedAPI::class)
+ private fun irTraceEventStart(key: IrExpression, scope: Scope.FunctionScope): IrExpression? =
+ traceEventStartFunction?.let { traceEventStart ->
+ val declaration = scope.function
+ val startOffset = declaration.body!!.startOffset
+ val endOffset = declaration.body!!.endOffset
+
+ val name = declaration.kotlinFqName
+ val file = declaration.file.name
+ val line = declaration.file.fileEntry.getLineNumber(declaration.startOffset)
+ val traceInfo = "$name ($file:$line)" // TODO(174715171) decide on what to log
+ val dirty = scope.dirty
+ val changed = scope.changedParameter
+ val params = if (dirty != null && dirty.used)
+ dirty.declarations
+ else
+ changed?.declarations
+ val dirty1 = params?.getOrNull(0)?.let { irGet(it) } ?: irConst(-1)
+ val dirty2 = params?.getOrNull(1)?.let { irGet(it) } ?: irConst(-1)
+
+ irIfTraceInProgress(
+ irCall(traceEventStart, startOffset, endOffset).also {
+ it.putValueArgument(0, key)
+ it.putValueArgument(1, dirty1)
+ it.putValueArgument(2, dirty2)
+ it.putValueArgument(3, irConst(traceInfo))
+ }
+ )
+ }
+
+ private fun irTraceEventEnd(): IrExpression? =
+ traceEventEndFunction?.let {
+ irIfTraceInProgress(irCall(it))
+ }
+
private fun irSourceInformationMarkerEnd(
element: IrElement,
): IrExpression {
@@ -4028,6 +4147,9 @@
override var used: Boolean = false
+ override val declarations: List<IrValueDeclaration>
+ get() = params
+
override fun irLowBit(): IrExpression {
used = true
return irAnd(
diff --git a/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Composer.kt b/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Composer.kt
index b527092..c9ff70b 100644
--- a/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Composer.kt
+++ b/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Composer.kt
@@ -1126,8 +1126,9 @@
*/
@OptIn(InternalComposeTracingApi::class)
@ComposeCompilerApi
-fun traceEventStart(key: Int, dirty1: Int, dirty2: Int, info: String): Unit =
- compositionTracer?.traceEventStart(key, dirty1, dirty2, info) ?: Unit
+fun traceEventStart(key: Int, dirty1: Int, dirty2: Int, info: String) {
+ compositionTracer?.traceEventStart(key, dirty1, dirty2, info)
+}
/**
* Internal tracing API.
@@ -1136,7 +1137,9 @@
*/
@OptIn(InternalComposeTracingApi::class)
@ComposeCompilerApi
-fun traceEventEnd(): Unit = compositionTracer?.traceEventEnd() ?: Unit
+fun traceEventEnd() {
+ compositionTracer?.traceEventEnd()
+}
/**
* A Compose internal function. DO NOT call directly.
diff --git a/development/build_log_simplifier/messages.ignore b/development/build_log_simplifier/messages.ignore
index dd30501..45e2858 100644
--- a/development/build_log_simplifier/messages.ignore
+++ b/development/build_log_simplifier/messages.ignore
@@ -131,6 +131,7 @@
Daemon will be stopped at the end of the build
# > Configure project :appsearch:appsearch\-local\-backend
Configuration on demand is an incubating feature\.
+You are using legacy USE_ANDROIDX_REMOTE_BUILD_CACHE=true type, this cache has been turned down, so you are \*not\* using a remote cache\. Please move to the new cache using http://go/androidx\-dev\#remote\-build\-cache
Configuration cache is an incubating feature\.
# > Configure project :
updated local\.properties
@@ -297,6 +298,10 @@
# > Task :glance:glance:reportLibraryMetrics
Info: Stripped invalid locals information from [0-9]+ methods?\.
Info: Methods with invalid locals information:
+androidx\.compose\.ui\.Modifier androidx\.compose\.animation\.AnimationModifierKt\$animateContentSize\$[0-9]+\.invoke\(androidx\.compose\.ui\.Modifier, androidx\.compose\.runtime\.Composer, int\)
+androidx\.compose\.ui\.Modifier androidx\.compose\.material[0-9]+\.SliderKt\$sliderTapModifier\$[0-9]+\.invoke\(androidx\.compose\.ui\.Modifier, androidx\.compose\.runtime\.Composer, int\)
+androidx\.compose\.ui\.Modifier androidx\.compose\.animation\.demos\.layoutanimation\.AnimatedPlacementDemoKt\$animatePlacement\$[0-9]+\.invoke\(androidx\.compose\.ui\.Modifier, androidx\.compose\.runtime\.Composer, int\)
+androidx\.compose\.ui\.Modifier androidx\.compose\.ui\.input\.nestedscroll\.NestedScrollModifierKt\$nestedScroll\$[0-9]+\.invoke\(androidx\.compose\.ui\.Modifier, androidx\.compose\.runtime\.Composer, int\)
void androidx\.wear\.compose\.material\.PickerKt\.Picker\-gjPtlC[0-9]+\(androidx\.wear\.compose\.material\.PickerState, java\.lang\.String, androidx\.compose\.ui\.Modifier, boolean, kotlin\.jvm\.functions\.Function[0-9]+, kotlin\.jvm\.functions\.Function[0-9]+, androidx\.wear\.compose\.material\.ScalingParams, float, float, long, androidx\.compose\.foundation\.gestures\.FlingBehavior, kotlin\.jvm\.functions\.Function[0-9]+, androidx\.compose\.runtime\.Composer, int, int, int\)
# https://youtrack.jetbrains.com/issue/KT-52702/
void androidx\.compose\.animation\.demos\.visualaid\.EasingFunctionDemoKt\.EasingInfoDemo\(androidx\.compose\.runtime\.Composer, int\)
@@ -315,6 +320,16 @@
void androidx\.compose\.foundation\.demos\.relocation\.BringIntoViewAndroidInteropDemoKt\.BringIntoViewAndroidInteropDemo\(androidx\.compose\.runtime\.Composer, int\)
void androidx\.compose\.ui\.demos\.keyinput\.InterceptEnterToSendMessageDemoKt\.InterceptEnterToSendMessageDemo\(androidx\.compose\.runtime\.Composer, int\)
Information in locals\-table is invalid with respect to the stack map table\. Local refers to non\-present stack map type for register: [0-9]+ with constraint [\-A-Z]*\.
+androidx\.compose\.ui\.Modifier androidx\.compose\.material\.SliderKt\$sliderTapModifier\$[0-9]+\.invoke\(androidx\.compose\.ui\.Modifier, androidx\.compose\.runtime\.Composer, int\)
+androidx\.compose\.ui\.Modifier androidx\.compose\.foundation\.FocusableKt\$focusable\$[0-9]+\.invoke\(androidx\.compose\.ui\.Modifier, androidx\.compose\.runtime\.Composer, int\)
+androidx\.compose\.ui\.Modifier androidx\.compose\.foundation\.ScrollKt\$scroll\$[0-9]+\.invoke\(androidx\.compose\.ui\.Modifier, androidx\.compose\.runtime\.Composer, int\)
+androidx\.compose\.ui\.Modifier androidx\.compose\.foundation\.text\.TextFieldPressGestureFilterKt\$tapPressTextFieldModifier\$[0-9]+\.invoke\(androidx\.compose\.ui\.Modifier, androidx\.compose\.runtime\.Composer, int\)
+androidx\.compose\.ui\.Modifier androidx\.compose\.foundation\.gestures\.ScrollableKt\$scrollable\$[0-9]+\.invoke\(androidx\.compose\.ui\.Modifier, androidx\.compose\.runtime\.Composer, int\)
+androidx\.compose\.ui\.Modifier androidx\.compose\.foundation\.HoverableKt\$hoverable\$[0-9]+\.invoke\(androidx\.compose\.ui\.Modifier, androidx\.compose\.runtime\.Composer, int\)
+androidx\.compose\.ui\.Modifier androidx\.compose\.ui\.samples\.OnPlacedSamplesKt\$OnPlaced\$animatePlacement\$[0-9]+\.invoke\(androidx\.compose\.ui\.Modifier, androidx\.compose\.runtime\.Composer, int\)
+androidx\.compose\.foundation\.demos\.GridDragDropState androidx\.compose\.foundation\.demos\.LazyGridDragAndDropDemoKt\.rememberGridDragDropState\(androidx\.compose\.foundation\.lazy\.grid\.LazyGridState, kotlin\.jvm\.functions\.Function[0-9]+, androidx\.compose\.runtime\.Composer, int\)
+void androidx\.compose\.foundation\.demos\.relocation\.BringNestedIntoViewDemoKt\.ControlGrid\(int, int, java\.util\.List, androidx\.compose\.runtime\.Composer, int\)
+androidx\.compose\.foundation\.demos\.DragDropState androidx\.compose\.foundation\.demos\.LazyColumnDragAndDropDemoKt\.rememberDragDropState\(androidx\.compose\.foundation\.lazy\.LazyListState, kotlin\.jvm\.functions\.Function[0-9]+, androidx\.compose\.runtime\.Composer, int\)
void androidx\.compose\.animation\.demos\.visualaid\.EasingFunctionDemoKt\.EasingGraph\(androidx\.compose\.animation\.core\.Easing, androidx\.compose\.ui\.Modifier, kotlinx\.coroutines\.CoroutineScope, androidx\.compose\.runtime\.Composer, int, int\)
void androidx\.compose\.animation\.demos\.gesture\.FancyScrollingDemoKt\.FancyScrollingDemo\(androidx\.compose\.runtime\.Composer, int\)
void androidx\.compose\.animation\.demos\.suspendfun\.SuspendDoubleTapToLikeDemoKt\.SuspendDoubleTapToLikeDemo\(androidx\.compose\.runtime\.Composer, int\)