https://kotlinlang.org logo
#compose
Title
# compose
c

Colton Idle

08/01/2022, 5:26 PM
Does anyone from the compose team know if the new k2 compiler is supported? https://blog.jetbrains.com/kotlin/2022/08/kotlin-1-7-20-beta/
d

Dominaezzz

08/01/2022, 5:29 PM
Isn't compose a backend plugin?
l

Landry Norris

08/01/2022, 6:05 PM
This may be a stupid question, but why would Compose be a backend plugin? Doesn’t it just generate cache boxes, generate if statements for recomposition, and tie together composable functions? Why would it need to interact with raw JVM bytecode/LLVM bitcode?
d

Dominaezzz

08/01/2022, 6:48 PM
I'm referring to backend IR. The representation just before platform specific byte code.
Front end IR is largely for symbol resolution.
l

Landry Norris

08/01/2022, 6:49 PM
Interesting. I thought Frontend was text -> IR and backend was IR -> bytecode
d

Dominaezzz

08/01/2022, 6:50 PM
It's text -> FIR -> IR -> bytecode.
l

Landry Norris

08/01/2022, 6:51 PM
Interesting.
s

shikasd

08/02/2022, 12:37 AM
Interesting. I thought Frontend was text -> IR and backend was IR -> bytecode
You are mostly right, but frontend plugins operate on FIR while it gets created (and before it is converted to IR) and backend plugins operate on IR, before optimization passes and bytecode transforms
Also I am not sure we have a clear date for Compose support of K2, there's a lot to be done to support FIR correctly + I believe there are no alternatives for at least one extension point Compose compiler uses just yet
d

Dominaezzz

08/02/2022, 9:08 AM
What does compose use FIR for?
17 Views