<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>The compiler/runtime protocol on Staticvar Learn</title><link>https://learn.staticvar.dev/courses/jetpack-compose-internals/02-the-compiler-runtime-protocol/</link><description>Recent content in The compiler/runtime protocol on Staticvar Learn</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><atom:link href="https://learn.staticvar.dev/courses/jetpack-compose-internals/02-the-compiler-runtime-protocol/index.xml" rel="self" type="application/rss+xml"/><item><title>What `@Composable` changes</title><link>https://learn.staticvar.dev/courses/jetpack-compose-internals/02-the-compiler-runtime-protocol/01-what-composable-changes/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://learn.staticvar.dev/courses/jetpack-compose-internals/02-the-compiler-runtime-protocol/01-what-composable-changes/</guid><description>Status: The idea that @Composable changes a function’s type and supplies a composition context is Durable . The names and generated calls below are Version-specific at the pinned revisions.
Outcome You should be able to explain why this function cannot be called from an ordinary function:
@Composable fun Greeting(name: String) { Text(&amp;#34;Hello, $name&amp;#34;) } The short answer is not “the annotation turns on magic.” It changes the function’s type. A call now participates in a compiler/runtime protocol.</description></item><item><title>The hidden `Composer` and mask parameters</title><link>https://learn.staticvar.dev/courses/jetpack-compose-internals/02-the-compiler-runtime-protocol/02-hidden-composer-and-mask-parameters/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://learn.staticvar.dev/courses/jetpack-compose-internals/02-the-compiler-runtime-protocol/02-hidden-composer-and-mask-parameters/</guid><description>Status: A composable needs a composer context and change metadata to support the protocol. That division is Durable . Parameter counts, names, and bit positions are Version-specific .
Outcome Given a source declaration such as this one, you should be able to point at the hidden values and explain their jobs:
@Composable fun Greeting(name: String = &amp;#34;world&amp;#34;, punctuation: String = &amp;#34;!&amp;#34;) { Text(&amp;#34;Hello, $name$punctuation&amp;#34;) } The current compiler lowers the visible parameters, then appends a nullable Composer, one or more changed-mask integers, and default-mask integers when defaults need protocol handling.</description></item><item><title>Transformed calls and composable function references</title><link>https://learn.staticvar.dev/courses/jetpack-compose-internals/02-the-compiler-runtime-protocol/03-transformed-calls-and-function-references/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://learn.staticvar.dev/courses/jetpack-compose-internals/02-the-compiler-runtime-protocol/03-transformed-calls-and-function-references/</guid><description>Status: A call and a function reference are different compiler problems even when both eventually invoke composable code. That distinction is Durable . Adapter shapes, memoization, and feature detection are Version-specific .
Outcome You should be able to answer this question:
Why can Child(value) look like an ordinary call while ::Child needs an adapter?
A direct call is rewritten in the caller’s current composer context. A reference must be represented as a value with a callable type, exposing composer and change information while hiding synthetic default-mask details.</description></item><item><title>Groups, restart scopes, and source keys</title><link>https://learn.staticvar.dev/courses/jetpack-compose-internals/02-the-compiler-runtime-protocol/04-groups-restart-scopes-and-source-keys/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://learn.staticvar.dev/courses/jetpack-compose-internals/02-the-compiler-runtime-protocol/04-groups-restart-scopes-and-source-keys/</guid><description>Status: Groups mark protocol boundaries that let the runtime reconcile control flow or restart a region. That mental model is Durable . Which calls are emitted, and which groups are elided, are Version-specific .
Outcome You should be able to explain three different generated structures:
a function-level restart group; a replace group around a conditional branch; and no group around a non-restartable function whose surrounding control flow is already safe.</description></item><item><title>Replace, movable, and reusable groups</title><link>https://learn.staticvar.dev/courses/jetpack-compose-internals/02-the-compiler-runtime-protocol/05-replace-movable-and-reusable-groups/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://learn.staticvar.dev/courses/jetpack-compose-internals/02-the-compiler-runtime-protocol/05-replace-movable-and-reusable-groups/</guid><description>Status: The three roles—replace a control-flow region, move keyed content, and reuse content or nodes—are Durable protocol distinctions. Their method names and lifecycle details are Version-specific at the pinned revision.
Outcome When you see a group call, ask what kind of continuity it promises:
Group Continuity question Replace Can this region only be inserted, removed, or replaced? Movable Can this keyed content move to another position while keeping identity? Reusable Can existing content or nodes be prepared for a different data key?</description></item></channel></rss>