phase(9.78h): stabilize MIR/VM pipeline
- Add MIR26 doc≡code sync test (tests/mir_instruction_set_sync.rs) - Quiet snapshots; filter plugin/net logs; golden all green - Delegate VM phi selection to LoopExecutor (borrow-safe) - ResultBox migration: remove legacy box_trait::ResultBox paths - VM BoxRef arithmetic fallbacks via toString().parse::<i64>() - Bridge BoxCall(InstanceBox) to Class.method/arity in VM - Fix Effects purity (READ -> readonly, not pure) - Mark Catch as CONTROL to prevent DCE; Try/Catch test green - Add env-gated debug logs (effects, verifier, mir-printer, trycatch, ref, bin) - Update CURRENT_TASK with progress and next steps
This commit is contained in:
@ -844,6 +844,9 @@ impl MirBuilder {
|
||||
|
||||
// Set up exception handler for the try block (before we enter it)
|
||||
if let Some(catch_clause) = catch_clauses.first() {
|
||||
if std::env::var("NYASH_DEBUG_TRYCATCH").ok().as_deref() == Some("1") {
|
||||
eprintln!("[BUILDER] Emitting catch handler for {:?}", catch_clause.exception_type);
|
||||
}
|
||||
let exception_value = self.value_gen.next();
|
||||
|
||||
// Register catch handler for exceptions that may occur in try block
|
||||
@ -874,9 +877,15 @@ impl MirBuilder {
|
||||
|
||||
// Build catch block (reachable via exception handling)
|
||||
self.start_new_block(catch_block)?;
|
||||
if std::env::var("NYASH_DEBUG_TRYCATCH").ok().as_deref() == Some("1") {
|
||||
eprintln!("[BUILDER] Enter catch block {:?}", catch_block);
|
||||
}
|
||||
|
||||
// Handle catch clause
|
||||
if let Some(catch_clause) = catch_clauses.first() {
|
||||
if std::env::var("NYASH_DEBUG_TRYCATCH").ok().as_deref() == Some("1") {
|
||||
eprintln!("[BUILDER] Emitting catch handler for {:?}", catch_clause.exception_type);
|
||||
}
|
||||
// Build catch body
|
||||
let catch_ast = ASTNode::Program {
|
||||
statements: catch_clause.body.clone(),
|
||||
|
||||
Reference in New Issue
Block a user