builder+vm: unify method calls via emit_unified_call; add RouterPolicy trace; finalize LocalSSA/BlockSchedule guards; docs + selfhost quickstart
- Unify standard method calls to emit_unified_call; route via RouterPolicy and apply rewrite::{special,known} at a single entry.\n- Stabilize emit-time invariants: LocalSSA finalize + BlockSchedule PHI→Copy→Call ordering; metadata propagation on copies.\n- Known rewrite default ON (userbox only, strict guards) with opt-out flag NYASH_REWRITE_KNOWN_DEFAULT=0.\n- Expand TypeAnnotation whitelist (is_digit_char/is_hex_digit_char/is_alpha_char/Map.has).\n- Docs: unified-method-resolution design note; Quick Reference normalization note; selfhosting/quickstart.\n- Tools: add tools/selfhost_smoke.sh (dev-only).\n- Keep behavior unchanged for Unknown/core/user-instance via BoxCall fallback; all tests green (quick/integration).
This commit is contained in:
@ -146,11 +146,7 @@ impl super::MirBuilder {
|
||||
}
|
||||
}
|
||||
// Return void for declaration context
|
||||
let void_val = self.value_gen.next();
|
||||
self.emit_instruction(MirInstruction::Const {
|
||||
dst: void_val,
|
||||
value: ConstValue::Void,
|
||||
})?;
|
||||
let void_val = crate::mir::builder::emission::constant::emit_void(self);
|
||||
Ok(void_val)
|
||||
} else {
|
||||
// Instance box: register type and lower instance methods/ctors as functions
|
||||
@ -196,11 +192,7 @@ impl super::MirBuilder {
|
||||
}
|
||||
}
|
||||
}
|
||||
let void_val = self.value_gen.next();
|
||||
self.emit_instruction(MirInstruction::Const {
|
||||
dst: void_val,
|
||||
value: ConstValue::Void,
|
||||
})?;
|
||||
let void_val = crate::mir::builder::emission::constant::emit_void(self);
|
||||
Ok(void_val)
|
||||
}
|
||||
}
|
||||
@ -243,11 +235,7 @@ impl super::MirBuilder {
|
||||
})?;
|
||||
for (k, expr) in entries {
|
||||
// const string key
|
||||
let k_id = self.value_gen.next();
|
||||
self.emit_instruction(MirInstruction::Const {
|
||||
dst: k_id,
|
||||
value: ConstValue::String(k),
|
||||
})?;
|
||||
let k_id = crate::mir::builder::emission::constant::emit_string(self, k);
|
||||
let v_id = self.build_expression_impl(expr)?;
|
||||
self.emit_instruction(MirInstruction::BoxCall {
|
||||
dst: None,
|
||||
|
||||
Reference in New Issue
Block a user