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

AsmSyntax

[jvm]
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

Name Summary
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.

Inheritors

Name
CodegenSyntax

Do you like Arrow?

Arrow Org
<