//arrow-meta/arrow.meta.dsl.codegen.asm/AsmSyntax/codegen
[jvm]
open fun codegen(applyFunction: CompilerContext.(receiver: StackValue, resolvedCall: ResolvedCall<>, c: ExpressionCodegenExtension.Context) -> StackValue?, applyProperty: CompilerContext.(receiver: StackValue, resolvedCall: ResolvedCall<>, c: ExpressionCodegenExtension.Context) -> StackValue?, generateClassSyntheticParts: CompilerContext.(codegen: ImplementationBodyCodegen) -> Unit): Codegen
The codegen function allows us to interact with applyFunction, applyProperty, and generateClassSyntheticParts. Each one of these functions are invoked as the compiled and type checked tree of KtElement and DeclarationDescriptor is processed for codegen. Here, we can alter the bytecode emitted using the Meta ASM DSL. This DSL mirrors the IR DSL offering a match + transform function that allows us to alter the codegen tree.
Do you like Arrow?
✖