Class Ek9MethodKindsAttribute

java.lang.Object
org.objectweb.asm.Attribute
org.ek9lang.compiler.backend.jvm.support.Ek9MethodKindsAttribute

public final class Ek9MethodKindsAttribute extends org.objectweb.asm.Attribute
The versioned Ek9MethodKinds class attribute (C.2): a per-method map of (name, descriptor) -> Ek9MethodKind + MethodDebugPolicy bitset, letting the EK9 debug semantics layer decide step-filtering and frame re-presentation. One attribute per generated class. See docs/strategic/EK9_DEBUGGER_STRATEGY.md §18.3.

Keyed by name AND descriptor - name alone is ambiguous (_eq(MyType) vs _eq(Any), enum comparison overloads, hashCode(), bodied vs bodyless _call). Entries reference the constant pool (ClassWriter.newUTF8(String)), so each is 6 bytes (2+2+1+1) and adds near-zero bloat. The JVM ignores unknown class attributes (JVMS §4.7.1), so this is invisible at run time; the debugger parses it by registering an instance of this class as an ASM Attribute prototype on the ClassReader.

  • Field Details

  • Constructor Details

    • Ek9MethodKindsAttribute

      public Ek9MethodKindsAttribute()
      Prototype constructor used by ASM's ClassReader to recognise and parse the attribute.
    • Ek9MethodKindsAttribute

      public Ek9MethodKindsAttribute(List<Ek9MethodKindsAttribute.Entry> entries)
  • Method Details

    • entries

    • formatVersion

      public int formatVersion()
    • write

      protected org.objectweb.asm.ByteVector write(org.objectweb.asm.ClassWriter classWriter, byte[] code, int codeLength, int maxStack, int maxLocals)
      Overrides:
      write in class org.objectweb.asm.Attribute
    • read

      protected org.objectweb.asm.Attribute read(org.objectweb.asm.ClassReader classReader, int offset, int length, char[] charBuffer, int codeAttributeOffset, org.objectweb.asm.Label[] labels)
      Overrides:
      read in class org.objectweb.asm.Attribute