vm/router: minimal special-method extension (equals/1); toString mapping kept

mir: add TypeCertainty to Callee::Method (diagnostic only); plumb through builder/JSON/printer; backends ignore behaviorally

using: confirm unified prelude resolver entry for all runner modes

docs: update Callee architecture with certainty; update call-instructions; CURRENT_TASK note

tests: quick 40/40 PASS; integration (LLVM) 17/17 PASS
This commit is contained in:
nyash-codex
2025-09-28 01:33:58 +09:00
parent 8ea95c9d76
commit 34be7d2d79
63 changed files with 5008 additions and 356 deletions

View File

@ -79,11 +79,24 @@ pub fn format_instruction(
super::Callee::Global(name) => {
format!("call_global {}({})", name, args_str)
}
super::Callee::Method { box_name, method, receiver } => {
super::Callee::Method { box_name, method, receiver, certainty } => {
if let Some(recv) = receiver {
format!("call_method {}.{}({}) [recv: {}]", box_name, method, args_str, recv)
format!(
"call_method {}.{}({}) [recv: {}] [{}]",
box_name,
method,
args_str,
recv,
match certainty { crate::mir::definitions::call_unified::TypeCertainty::Known => "Known", crate::mir::definitions::call_unified::TypeCertainty::Union => "Union" }
)
} else {
format!("call_method {}.{}({})", box_name, method, args_str)
format!(
"call_method {}.{}({}) [{}]",
box_name,
method,
args_str,
match certainty { crate::mir::definitions::call_unified::TypeCertainty::Known => "Known", crate::mir::definitions::call_unified::TypeCertainty::Union => "Union" }
)
}
}
super::Callee::Constructor { box_type } => {