Amanda Hinchman-Dominguez · @amanda
348 followers · 272 posts · Server androiddev.social

Thanks to @kotlinweekly for posting my article on K1 + K2 Frontends, Backends!

kotlinweekly.net/

#kotlin #compiler #crashcoursekotlinc

Last updated 1 year ago

Amanda Hinchman-Dominguez · @amanda
342 followers · 259 posts · Server androiddev.social

Crash Course on the Kotlin Compiler - Quick detour: K1 + K2 frontends, backends, and data transformations

link.medium.com/2PKnpiXI0zb

#kotlin #compiler #crashcoursekotlinc

Last updated 1 year ago

Amanda Hinchman-Dominguez · @amanda
340 followers · 257 posts · Server androiddev.social

Well, I've been sitting on part 2 of the Kotlin Compiler article forever, mostly due to the nature of the review comments for discussing the differences between K1 and K2.

To be able to continue writing on resolution in a cleaner manner, I've decided to pull that discussion out into a quick detour - watch for tomorrow's release of "Crash Course on the Kotlin Compiler | K1 + K2 Frontends, Backends"!

#kotlin #compiler #crashcoursekotlinc

Last updated 1 year ago

Amanda Hinchman-Dominguez · @amanda
322 followers · 201 posts · Server androiddev.social
Amanda Hinchman-Dominguez · @amanda
306 followers · 197 posts · Server androiddev.social

IR generation

:compiler:testData:ir

#kotlin #compiler #crashcoursekotlinc

Last updated 1 year ago

Amanda Hinchman-Dominguez · @amanda
306 followers · 196 posts · Server androiddev.social

RAW FIR generated

:compiler:fir:raw-fir:psi2fir

#kotlin #compiler #crashcoursekotlinc

Last updated 1 year ago

Amanda Hinchman-Dominguez · @amanda
305 followers · 195 posts · Server androiddev.social

Rendered PSI Visualizer.

:render-psi:testData:

arrayAssignment.kt shows augmented code with visual analysis recognizing types of declarations.

#kotlin #compiler #crashcoursekotlinc

Last updated 1 year ago

Amanda Hinchman-Dominguez · @amanda
305 followers · 194 posts · Server androiddev.social

Let's take a look at how `./gradlew generateTests` transforms the following code file to FIR and IR formats. The original code:

#kotlin #compiler #crashcoursekotlinc

Last updated 1 year ago

Amanda Hinchman-Dominguez · @amanda
304 followers · 191 posts · Server androiddev.social

The FIR frontend, otherwise known as k2 frontend for the Kotlin compiler. Not pictured is the first form as an AST tree before PSI.

Changes added as a new branch: github.com/ahinchman1/Kotlin-C

#kotlin #compiler #crashcoursekotlinc

Last updated 1 year ago

Amanda Hinchman-Dominguez · @amanda
304 followers · 190 posts · Server androiddev.social

Just realized that my diagrams have been a depiction of K1 frontend the entire time 🤦 time to make updates

#compiler #kotlin #crashcoursekotlinc

Last updated 1 year ago