refactor(mir): phase260 p0 edge-args plumbing (strangler) + ssot api + docs

This commit is contained in:
2025-12-21 04:34:22 +09:00
parent 4496b6243d
commit 4dfe3349bf
42 changed files with 1044 additions and 187 deletions

View File

@ -394,7 +394,7 @@ impl MirInterpreter {
};
Ok(BlockOutcome::Return(result))
}
Some(MirInstruction::Jump { target }) => Ok(BlockOutcome::Next {
Some(MirInstruction::Jump { target, .. }) => Ok(BlockOutcome::Next {
target: *target,
predecessor: block.id,
}),
@ -402,6 +402,7 @@ impl MirInterpreter {
condition,
then_bb,
else_bb,
..
}) => {
// Dev counter: count branch terminators actually evaluated
self.branch_count = self.branch_count.saturating_add(1);

View File

@ -388,7 +388,7 @@ impl WasmCodegen {
}
// Control Flow Instructions (Critical for loops and conditions)
MirInstruction::Jump { target } => {
MirInstruction::Jump { target, .. } => {
// Unconditional jump to target basic block
// Use WASM br instruction to break to the target block
Ok(vec![format!("br $block_{}", target.as_u32())])
@ -398,6 +398,7 @@ impl WasmCodegen {
condition,
then_bb,
else_bb,
..
} => {
// Conditional branch based on condition value
// Load condition value and branch accordingly