compiler-plugin / arrow.meta.dsl.codegen.asm / AsmSyntax

AsmSyntax

interface AsmSyntax

When the compiler goes to codegen, and IR is not enabled by default, it goes into the codegen phase for the JVM where it uses the ASM libs to generate bytecode using the AST and associated descriptors coming from the resolution phase.

Functions

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.open fun codegen(applyFunction: CompilerContext.(receiver: StackValue, resolvedCall: ResolvedCall<*>, c: Context) -> StackValue?, applyProperty: CompilerContext.(receiver: StackValue, resolvedCall: ResolvedCall<*>, c: Context) -> StackValue?, generateClassSyntheticParts: CompilerContext.(codegen: ImplementationBodyCodegen) -> Unit): Codegen

Inheritors

CodegenSyntax interface CodegenSyntax : AsmSyntax, IrSyntax

Do you like Arrow?

Arrow Org
<