Skip to content

DWARF Phase 3: synthetic DIEs for adapter / inlined code (#130) #144

@avrabe

Description

@avrabe

Sub-issue of #130 — Phase 3 (final phase) of the witness-mapping epic.

Phase 2 (#143) gets source attribution working for original component code in the fused output. Phase 3 covers the generated code: cross-component adapters that meld itself emits and that have no original source.

Scope

Per #130's plan §"Phase 3 — adapters and inlined code":

  • Synthesise DIEs that point at a placeholder source file `` line N, where N encodes the adapter's role:
    • 1 = memory.copy / canonical-ABI transcode loop
    • 2 = `cabi_realloc` trampoline
    • 3 = canonical-ABI lift
    • 4 = canonical-ABI lower
    • (extend as new adapter classes ship)
  • Witness's truth-table view then surfaces these as "adapter" branches that don't require source-level MC/DC coverage, rather than as un-attributed gaps.
  • Alternative explicitly considered: accept the gap. Witness already has a strict-per-`br_if` fallback when DWARF is absent or sparse. Decision-time question.

Done criteria

  • Synthesised DIEs covering every adapter-class function body
  • Witness verifies adapter ranges resolve to `:N` rather than `unknown`
  • LS-N for "adapter branches accounted in MC/DC line map"

Dependencies

Out of scope

Rivet artifact

  • New requirement SR-36 — "Synthesised DWARF DIEs for meld-generated adapter functions".

Milestone

v0.11.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions