vm(hako): add v1 reader/dispatcher (flagged), commonize mir_call handler, share block scan; smokes: add v1 hakovm canary; docs: 20.37/20.38 plans, OOB policy; runner: v1 hakovm toggle; include SKIP summary

This commit is contained in:
nyash-codex
2025-11-03 23:21:48 +09:00
parent a4f30ae827
commit 06a729ff40
67 changed files with 3340 additions and 1520 deletions

View File

@ -44,7 +44,7 @@ impl MirBuilder {
// incoming の predecessor は "実際に merge に遷移してくる出口ブロック" を使用する
let mut inputs: Vec<(super::BasicBlockId, super::ValueId)> = Vec::new();
if let Some(tp) = then_exit_block_opt { inputs.push((tp, then_v)); }
if let Some(ep) = else_exit_block_opt.or(Some(else_block)) { inputs.push((ep, else_v)); }
if let Some(ep) = else_exit_block_opt { inputs.push((ep, else_v)); }
match inputs.len() {
0 => {}
1 => {
@ -77,7 +77,7 @@ impl MirBuilder {
.unwrap_or(*pre_val);
let mut inputs: Vec<(super::BasicBlockId, super::ValueId)> = Vec::new();
if let Some(tp) = then_exit_block_opt { inputs.push((tp, then_v)); }
if let Some(ep) = else_exit_block_opt.or(Some(else_block)) { inputs.push((ep, else_v)); }
if let Some(ep) = else_exit_block_opt { inputs.push((ep, else_v)); }
match inputs.len() {
0 => {}
1 => {
@ -146,7 +146,7 @@ impl MirBuilder {
// Build inputs from reachable predecessors only
let mut inputs: Vec<(BasicBlockId, ValueId)> = Vec::new();
if let Some(tp) = then_exit_block_opt { inputs.push((tp, then_value_for_var)); }
if let Some(ep) = else_exit_block_opt.or(Some(else_block)) { inputs.push((ep, else_value_for_var)); }
if let Some(ep) = else_exit_block_opt { inputs.push((ep, else_value_for_var)); }
match inputs.len() {
0 => {}
1 => {
@ -169,7 +169,7 @@ impl MirBuilder {
// No variable assignment pattern detected just emit Phi for expression result
let mut inputs: Vec<(BasicBlockId, ValueId)> = Vec::new();
if let Some(tp) = then_exit_block_opt { inputs.push((tp, then_value_raw)); }
if let Some(ep) = else_exit_block_opt.or(Some(else_block)) { inputs.push((ep, else_value_raw)); }
if let Some(ep) = else_exit_block_opt { inputs.push((ep, else_value_raw)); }
match inputs.len() {
0 => { /* leave result_val as fresh, but unused; synthesize void */
let v = crate::mir::builder::emission::constant::emit_void(self);