Class MethodKindTable
java.lang.Object
org.ek9lang.compiler.backend.jvm.support.MethodKindTable
Per-class accumulator of
Ek9MethodKind entries, populated as methods are emitted and
turned into the Ek9MethodKinds class attribute just before visitEnd() (mirroring
how the SMAP is collected then attached). One instance per generated class.
Both emission layers feed the same table: IR-funnel methods (keyed on their MethodSymbol)
and generator-invented, symbol-less methods (each generator records its own). See
docs/strategic/EK9_DEBUGGER_STRATEGY.md §18.4.
Keyed by (name, descriptor) with last-record-wins: when both layers classify the same
method (e.g. iterator() is retro-marked ENUM_OP then re-classified
ENUM_ITERATOR, §18.2), the later record(...) overrides — so exactly one wire entry
per method, never a conflicting pair. Insertion order is preserved for stable golden output.
The ACC_SYNTHETIC bit a kind implies is SyntheticFlag.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidattachTo(org.objectweb.asm.ClassWriter classWriter) Attach the accumulated kinds as theEk9MethodKindsclass attribute, iff any were recorded.booleanisEmpty()voidrecord(String name, String descriptor, Ek9MethodKind kind) Record a generated method's kind (last-wins per name+descriptor).Build the attribute to attach viaclassWriter.visitAttribute(...)before visitEnd.
-
Constructor Details
-
MethodKindTable
public MethodKindTable()
-
-
Method Details
-
record
Record a generated method's kind (last-wins per name+descriptor). Ordinary user-code methods are simply never recorded. -
isEmpty
public boolean isEmpty() -
toAttribute
Build the attribute to attach viaclassWriter.visitAttribute(...)before visitEnd. -
attachTo
public void attachTo(org.objectweb.asm.ClassWriter classWriter) Attach the accumulated kinds as theEk9MethodKindsclass attribute, iff any were recorded. Call this once, immediately beforeclassWriter.visitEnd()(the same slot the SMAP is attached). A class with no generated methods contributes no attribute.
-