Sri Harsha Chilakapati
06/24/2026, 11:44 AMFirMetadataSerializerPlugin API? My use case is I rewrite function parameters, body, along with function names to prevent signature clashes. I want to attach some mapping in FIR that this symbol will be rewritten as following, and have that accessible to downstream compilations.dmitriy.novozhilov
06/24/2026, 12:05 PMSri Harsha Chilakapati
06/24/2026, 12:11 PMSri Harsha Chilakapati
06/26/2026, 10:08 PMdmitriy.novozhilov
06/29/2026, 6:11 AM@Ann
• for all annotated functions create _optimized versions, which are invisible for callers
• replace all call-sites to original functions with optimized versions
• you can do it even for functions from dependencies, if they were compiled with your plugin
// original code
@Ann
fun foo(x: Point<Int, Int>): String { ... }
fun test() {
foo(1 to 2)
}
// transformed by plugin
@Ann
fun foo(x: Point<Int, Int>): String {
return foo_optimized(x.first, x.second)
}
@Deprecated(HIDDEN) // invisible for users, visible for the compiler
fun foo_optimized(x: Int, y: Int) { ... }
fun test() {
foo_optimized(1, 2)
}