Skip to content

format: spec the inlined-call virtual activation contract#229

Merged
gnidan merged 4 commits into
transform-contextfrom
architect-inline-spec
Jul 2, 2026
Merged

format: spec the inlined-call virtual activation contract#229
gnidan merged 4 commits into
transform-contextfrom
architect-inline-spec

Conversation

@gnidan

@gnidan gnidan commented Jul 2, 2026

Copy link
Copy Markdown
Member

Documents how an inlined internal call is represented in the program-context format and how a debugger reconstructs its virtual activation — the format half of the inlining design (task #16), landed against the frozen contract.

This is spec-prose only: no schema change and no compiler code. It follows gnidan's rulings on the design — reuse jump:true, omit arg/return value pointers in v1, and adopt DWARF's "activation" vocabulary for the derived call-stack entry.

invoke.mdx

  • Inlined internal callsjump:true marks the internal-call kind, not a literal JUMP (an inlined call has none); target omitted; sibling transform:["inline"]. Notes that a helper inlined at several sites yields several independent virtual activations.
  • Reconstructing activations — defines activation (DWARF call-stack entry), the real-vs-virtual distinction (target + runtime corroboration vs. no-target + inline-transform + none), annotation-driven per-instruction membership (robust to optimization passes making inlined bodies non-contiguous), graceful identity degradation, and v1 value resolution (structure + resolvable locals; no arguments/data pointers).

transform.mdx

  • Enriches the inline identifier (virtual activation + cross-link) and adds an inlined-call-site worked example.

Guardrail preserved

No new frame/activation context type — an activation is derived from invoke/return + transform:["inline"]. The existing frame context stays cleanly = compilation-layer (keeping #152 unentangled).

Scope

Written scope-agnostically re: the bugc single- vs multi-site heuristic (pass-scope decision #3, still open) — only a future worked example's exact scope wording depends on it. yarn workspace @ethdebug/format-web build passes (MDX + cross-page anchors validated).

gnidan added 2 commits July 2, 2026 17:03
Document how an inlined internal call is represented and how a
debugger reconstructs its virtual activation, per the inlining
design (gnidan rulings: reuse jump:true, omit arg/return value
pointers in v1, adopt DWARF "activation" naming).

- invoke.mdx: add "Inlined internal calls" (jump:true = call
  kind not a literal JUMP; target omitted; transform:["inline"])
  and a "Reconstructing activations" section defining the
  real-vs-virtual activation distinction, annotation-driven
  per-instruction membership (robust to non-contiguous inlined
  bodies), graceful identity degradation, and v1 value resolution
  (structure + locals; no arguments/data pointers).
- transform.mdx: enrich the inline id (virtual activation, cross-
  link) and add an inlined-call-site worked example noting that a
  helper inlined at N sites yields N virtual activations.

No schema change. Scope-agnostic re: the single- vs multi-site
heuristic (bugc pass scope, decision #3, still open).
Reflect gnidan's #3 heuristic (leaf or small, non-recursive,
internal, at all call sites) as compiler-typical, keeping the
threshold qualitative — the format is invariant to the eligibility
rule.
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-07-02 22:49 UTC

gnidan added 2 commits July 2, 2026 18:04
Apply debugger review precision notes on #229:
- Real-vs-virtual: the reliable discriminator is the inline
  transform marker, not target-absence — a real internal call may
  also omit target (#213), so no-target does NOT imply virtual.
  Reword the real/virtual clauses accordingly.
- Membership: reword "iff it carries transform:["inline"]" (read
  as exact array equality) to "carries an inline identifier in its
  transform list" so composed markers like ["inline","fold"] still
  confer membership.
Apply debugger note (a): "reliably carries ... identity"
contradicted the graceful-degradation paragraph (identity is
optional). Reword to "an inlining compiler typically preserves
declaration and per-instruction source ranges; identity fields
remain optional and degrade gracefully" — a compiler-behavior
expectation, not a format guarantee.
@gnidan gnidan merged commit f5f66a9 into transform-context Jul 2, 2026
4 checks passed
@gnidan gnidan deleted the architect-inline-spec branch July 2, 2026 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant