Phase 21.7 normalization: optimization pre-work + bench harness expansion
- Add opt-in optimizations (defaults OFF) - Ret purity verifier: NYASH_VERIFY_RET_PURITY=1 - strlen FAST enhancement for const handles - FAST_INT gate for same-BB SSA optimization - length cache for string literals in llvmlite - Expand bench harness (tools/perf/microbench.sh) - Add branch/call/stringchain/arraymap/chip8/kilo cases - Auto-calculate ratio vs C reference - Document in benchmarks/README.md - Compiler health improvements - Unify PHI insertion to insert_phi_at_head() - Add NYASH_LLVM_SKIP_BUILD=1 for build reuse - Runtime & safety enhancements - Clarify Rust/Hako ownership boundaries - Strengthen receiver localization (LocalSSA/pin/after-PHIs) - Stop excessive PluginInvoke→BoxCall rewrites - Update CURRENT_TASK.md, docs, and canaries 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -442,6 +442,12 @@ impl MirBuilder {
|
||||
};
|
||||
|
||||
if let Some(block) = function.get_block_mut(block_id) {
|
||||
// Invariant: Call must always carry a Callee (unified path).
|
||||
if let MirInstruction::Call { callee, .. } = &instruction {
|
||||
if callee.is_none() {
|
||||
return Err("builder invariant violated: MirInstruction::Call.callee must be Some (unified call)".into());
|
||||
}
|
||||
}
|
||||
if utils::builder_debug_enabled() {
|
||||
eprintln!(
|
||||
"[BUILDER] emit @bb{} -> {}",
|
||||
|
||||
Reference in New Issue
Block a user