Phase 25.1b: VM undefined-value diagnostics and builder SSA helpers
This commit is contained in:
@ -29,8 +29,9 @@ impl MirInterpreter {
|
||||
.map(|k| format!("{:?}", k))
|
||||
.collect();
|
||||
eprintln!(
|
||||
"[vm-trace] reg_load undefined id={:?} last_block={:?} last_inst={:?} regs={}",
|
||||
"[vm-trace] reg_load undefined id={:?} fn={} last_block={:?} last_inst={:?} regs={}",
|
||||
id,
|
||||
self.cur_fn.as_deref().unwrap_or("<unknown>"),
|
||||
self.last_block,
|
||||
self.last_inst,
|
||||
keys.join(", ")
|
||||
@ -43,9 +44,13 @@ impl MirInterpreter {
|
||||
if tolerate {
|
||||
return Ok(VMValue::Void);
|
||||
}
|
||||
let fn_name = self.cur_fn.as_deref().unwrap_or("<unknown>");
|
||||
Err(VMError::InvalidValue(format!(
|
||||
"use of undefined value {:?}",
|
||||
id
|
||||
"use of undefined value {:?} (fn={}, last_block={:?}, last_inst={:?})",
|
||||
id,
|
||||
fn_name,
|
||||
self.last_block,
|
||||
self.last_inst,
|
||||
)))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user