Skip to content

Gate 2: execute aggregate Native MIR through QBE - #9

Merged
hiroki23 merged 1 commit into
mainfrom
feat/gate-two-mir-qbe
Aug 28, 2026
Merged

Gate 2: execute aggregate Native MIR through QBE#9
hiroki23 merged 1 commit into
mainfrom
feat/gate-two-mir-qbe

Conversation

@hiroki23

Copy link
Copy Markdown
Contributor

Summary

  • add nominal aggregate Native MIR for record and tagged-value construction,
    projection, tag tests, direct calls, returns, and block parameters
  • verify aggregate shapes, nominal identities, call edges, control-flow edges,
    source origins, and exact scalar semantics before code generation
  • lower non-escaping aggregates through caller-owned result storage, borrowed
    parameters, and distinct block transfer/value slots
  • zero aggregate storage and copy fixed-size values through explicit system
    memset/memcpy calls
  • dynamically check payload projections so malformed MIR fails deterministically
    instead of reading the wrong variant
  • build, link, and run a hand-authored record/tagged-value vertical slice through
    pinned QBE 1.3 on Darwin arm64

Verification

  • trb fmt --check .
  • trb check
  • TYPE_RB_NATIVE_ROOT="$PWD" TYPE_RB_NATIVE_QBE=/tmp/qbe-1.3/qbe trb test
    (31 tests, 0 failures)

The vertical slice covers a nested record payload, aggregate call arguments and
results, an aggregate block argument, exhaustive tag dispatch, scalar record
projection, and deterministic invalid payload projection.

Issue #7 remains open for the strict snapshot v3 bridge, real TypeRB source
corpus, and measurements.

@hiroki23
hiroki23 merged commit ca3c317 into main Aug 28, 2026
1 check passed
@hiroki23
hiroki23 deleted the feat/gate-two-mir-qbe branch August 28, 2026 07:04
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