Phase 25.1b: VM undefined-value diagnostics and builder SSA helpers
This commit is contained in:
@ -215,6 +215,12 @@ impl BasicBlock {
|
||||
/// Insert instruction at the beginning (after phi instructions)
|
||||
pub fn insert_instruction_after_phis(&mut self, instruction: MirInstruction) {
|
||||
let phi_count = self.phi_instructions().count();
|
||||
if std::env::var("NYASH_SCHEDULE_TRACE").ok().as_deref() == Some("1") {
|
||||
if let MirInstruction::Copy { dst, src } = &instruction {
|
||||
eprintln!("[insert-after-phis] bb={:?} phi_count={} inserting Copy dst=%{} src=%{} total_inst={}",
|
||||
self.id, phi_count, dst.0, src.0, self.instructions.len());
|
||||
}
|
||||
}
|
||||
self.effects = self.effects | instruction.effects();
|
||||
self.instructions.insert(phi_count, instruction);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user