I want to write a plugin that adds a method (a sha...
# compiler
y
I want to write a plugin that adds a method (a shallow-copy method) to compiler-generated continuation classes.
IrGenerationExtension
seems to be before that step happens. I'm also unsure if the logic for continuation classes is platform-specific or not. What extensions do you think would be involved here. I can imagine
ClassBuilderExtension
would likely work for JVM?
u
You can use
org.jetbrains.kotlin.backend.jvm.extensions.ClassGeneratorExtension
to process the resulting bytecode via ASM
y
That sounds promising, but what about other platforms? Any simple way to intercept the JS or even the LLVM IR to add my own methods?
🤷 1