phase_9_79b_2 (PIC skeleton): Add monomorphic PIC hit counters\n- VM stores per-(receiver-type, method_id/name) hit counts\n- execute_boxcall records hits before dispatch\n- CURRENT_TASK updated

This commit is contained in:
Moe Charm
2025-08-26 20:59:37 +09:00
parent edbc38daad
commit 35049606f3
3 changed files with 53 additions and 1 deletions

View File

@ -208,6 +208,8 @@ pub struct VM {
pub(super) instr_counter: std::collections::HashMap<&'static str, usize>,
/// Execution start time for optional stats
pub(super) exec_start: Option<Instant>,
/// Mono-PIC skeleton: global hit counters keyed by (recv_type, method_id/name)
pub(super) boxcall_pic_hits: std::collections::HashMap<String, u32>,
// Phase 9.78a: Add unified Box handling components
// TODO: Re-enable when interpreter refactoring is complete
// /// Box registry for creating all Box types
@ -268,6 +270,7 @@ impl VM {
module: None,
instr_counter: std::collections::HashMap::new(),
exec_start: None,
boxcall_pic_hits: std::collections::HashMap::new(),
// TODO: Re-enable when interpreter refactoring is complete
// box_registry: Arc::new(UnifiedBoxRegistry::new()),
// #[cfg(all(feature = "plugins", not(target_arch = "wasm32")))]
@ -293,6 +296,7 @@ impl VM {
module: None,
instr_counter: std::collections::HashMap::new(),
exec_start: None,
boxcall_pic_hits: std::collections::HashMap::new(),
}
}