Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ethdebug/format
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: ethdebug/format
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: transform-context-backup
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 7 commits
  • 38 files changed
  • 1 contributor

Commits on Jul 16, 2026

  1. format: add the transform context for compiler optimizations

    Introduce the `transform` context: a flat sibling key on an instruction
    listing the optimization passes (fold, coalesce, tailcall, inline) the
    compiler applied to it, so a debugger can distinguish
    compiler-synthesized code from the source the user wrote.
    
    Adds the schema, the format TypeScript type, and the spec page, and
    registers the context page in the docs schema index.
    gnidan committed Jul 16, 2026
    Configuration menu
    Copy the full SHA
    73d57e4 View commit details
    Browse the repository at this point in the history
  2. tailcall: emit, render, and document the tail-call transform

    Emit `transform: ["tailcall"]` on the TCO back-edge JUMP, alongside the
    invoke/return pair it already carries, so a debugger sees the pair as a
    tail-call-optimized back-edge rather than a real frame push/pop and does
    not invent a spurious frame.
    
    Render it in the tracer drawer — an optimizer-level (O0-O3) selector and a
    tail-call-aware call stack — and document it with a tracing example and a
    walkthrough homed in the trace playground.
    
    Introduces the shared `Ir.Utils.addTransform` helper — the fold, coalesce,
    and inline emitters all route through it — and the transform-emission test
    file (`transform-contexts.test.ts`, with the `countTransform` helper),
    covering the tailcall marker: absent at O0/O1, present at O2/O3.
    gnidan committed Jul 16, 2026
    Configuration menu
    Copy the full SHA
    962c5aa View commit details
    Browse the repository at this point in the history
  3. bugc: emit the fold transform on constant folding

    Mark constant-folded values with `transform: ["fold"]` through a shared
    `addTransform` helper, so the tracer can show a value as a
    compile-time-evaluated constant rather than source. The marker composes
    with later passes into a multiset (e.g. `["fold", "coalesce"]`).
    gnidan committed Jul 16, 2026
    Configuration menu
    Copy the full SHA
    4fc242c View commit details
    Browse the repository at this point in the history
  4. bugc: emit the coalesce transform on read-write merging

    Mark the SHL/OR field-packing sequence produced by read-write merging
    with `transform: ["coalesce"]`, so a packed-storage write reads as
    compiler-synthesized rather than source the user wrote. Composes with a
    folded value into `["fold", "coalesce"]`.
    gnidan committed Jul 16, 2026
    Configuration menu
    Copy the full SHA
    5640bfd View commit details
    Browse the repository at this point in the history
  5. inline: spec, compiler pass, tracer reconstruction, and examples

    Add the function-inlining transform end to end:
    
    - spec the inlined-call virtual-activation contract — push/pop pairing
      via the virtual invoke/return versus the per-instruction `inline`
      membership marker;
    - add the bugc inlining pass (level 2): splice eligible leaf callees into
      their call sites, emit `transform: ["inline"]` on the spliced body, and
      bracket it with a virtual invoke/return; bracket those boundary ops in
      evmgen so the activation nests correctly;
    - reconstruct the inline virtual activations in the tracer's call stack;
    - add the inlining showcase examples and the trace-playground section.
    gnidan committed Jul 16, 2026
    Configuration menu
    Copy the full SHA
    db92840 View commit details
    Browse the repository at this point in the history
  6. format: correlate activations with an activation identifier

    Correlate activations with an `activation` identifier on invoke, return,
    and revert: the invoke that opens an activation and the return or revert
    that closes it carry the same value, so a debugger pairs a call with its
    return independent of trace order. It lives inside the
    invoke/return/revert object, keeping a tail call's two facts flat without
    a `gather`.
    gnidan committed Jul 16, 2026
    Configuration menu
    Copy the full SHA
    c00252e View commit details
    Browse the repository at this point in the history
  7. web: surface optimizer transforms in the tracer instruction list

    Show the tailcall and inline transform annotations inline in the tracer's
    instruction list, so the optimizer passes applied to each instruction are
    visible as you step through the trace.
    gnidan committed Jul 16, 2026
    Configuration menu
    Copy the full SHA
    c8355db View commit details
    Browse the repository at this point in the history
Loading