Skip to content

Commit 22f2475

Browse files
committed
test: require direct HIR lowering in dual-path corpus
1 parent 0dc888a commit 22f2475

2 files changed

Lines changed: 9 additions & 8 deletions

File tree

crates/rsscript-sdk/tests/mir_migration.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
//! Reusable migration gate for the typed MIR rollout.
22
//!
33
//! Add a capability by declaring its stage and a small source case. A
4-
//! `DualPath` case must compile to verified MIR and produce the same result in
5-
//! the legacy VM, the feature-gated MIR reference interpreter, and the
6-
//! verified-bytecode VM emitted directly from MIR.
4+
//! `DualPath` case must lower directly from checked HIR to verified MIR and
5+
//! produce the same result in the legacy VM, the feature-gated MIR reference
6+
//! interpreter, and the verified-bytecode VM emitted directly from MIR.
77
88
use rsscript_abi_model::WireType;
99
use rsscript_compiler::{compile_source_to_ir, compile_validated_to_ir};
@@ -186,9 +186,9 @@ fn dual_path_cases_match_the_legacy_vm() {
186186
case.name, case.capability
187187
)
188188
});
189-
let mir = compiled.mir().unwrap_or_else(|error| {
189+
let mir = compiled.checked_hir_mir().unwrap_or_else(|error| {
190190
panic!(
191-
"{} must lower to MIR during dual-path migration: {error}",
191+
"{} must lower directly from checked HIR during dual-path migration: {error}",
192192
case.name
193193
)
194194
});

docs/architecture/migration-baseline.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -388,9 +388,10 @@ mechanical acceptance condition holds.
388388
- [ ] **M05.1 — Add pure-control-flow differential fixtures.** Compare return
389389
values, errors, and usage reports.
390390
- [x] **M05.1a — Establish the dual-path harness.** Declarative capability
391-
stages and pure-control-flow fixtures compile, verify, execute through the
392-
test-only MIR reference interpreter, and compare return values with the
393-
legacy VM.
391+
stages and pure-control-flow fixtures lower directly from checked HIR,
392+
verify, execute through the test-only MIR reference interpreter, and
393+
compare return values with the legacy VM. A DualPath fixture cannot hide
394+
a fallback through `ExecutableIr`.
394395
- [x] **M05.1b — Close the initial MIR/VM bytecode loop.** The same scalar,
395396
CFG, direct-call, `read`, `mut`, and `take` fixtures now compile MIR
396397
directly to a bytecode artifact, pass the ordinary bytecode verifier, and

0 commit comments

Comments
 (0)