Package org.ek9lang.compiler.backend.jvm.support
package org.ek9lang.compiler.backend.jvm.support
JVM Backend Support Utilities - Extracted utilities for bytecode generation.
This package contains focused utility classes extracted from the AbstractAsmGenerator base class, following the EK9 pattern of small, single-responsibility classes.
Context and State:
MethodContext- Shared method contextLocalVariableInfo- Local variable metadataScopeInfo- Scope boundary trackingTempVariableSource- Temp variable sources
Bytecode Generation:
LiteralBytecodeGenerator- Literal value generationVariableAccessGenerator- Variable load/storeDebugInfoGenerator- Debug info and LocalVariableTable
These utilities are composed by AbstractAsmGenerator and used by the specialized AsmGenerator subclasses.
-
ClassDescriptionGenerates debug information for JVM bytecode.THE closed taxonomy of EK9 compiler-generated method kinds carried by the
Ek9MethodKindsclass attribute (C.2), each with its debuggerMethodDebugPolicybitset.The versionedEk9MethodKindsclass attribute (C.2): a per-method map of (name, descriptor) ->Ek9MethodKind+MethodDebugPolicybitset, letting the EK9 debug semantics layer decide step-filtering and frame re-presentation.One per-method record: the method (name, descriptor), theEk9MethodKindwirekindCode, and itsMethodDebugPolicybitset.Shared JVM opcode selection for the bytecode generators: primitive/reference local-variable load/store opcodes and optimal integer-constant loading.Shared construction of JVM method/constructor descriptors from already-JVM-internal type names.Generates JVM bytecode for EK9 literal values.Metadata for a local variable needed for LocalVariableTable generation.Shared context for a method that must be coordinated across all generators.THE debugger step-filter / frame-decoder policy bits carried per generated method by theEk9MethodKindsclass attribute (C.2).Per-class accumulator ofEk9MethodKindentries, populated as methods are emitted and turned into theEk9MethodKindsclass attribute just beforevisitEnd()(mirroring how the SMAP is collected then attached).Scope boundary information for tracking variable lifetimes.Support for stack-oriented code generation.Represents the source of a temp variable for stack-oriented code generation.The type of source for a temp variable.Generates JVM bytecode for variable load and store operations.