haku2: add stats + fix crash w uninit vm

This commit is contained in:
りき萌 2025-06-16 16:39:54 +02:00
parent e667c6336a
commit 00a48527ca
12 changed files with 88 additions and 71 deletions

View file

@ -544,3 +544,8 @@ unsafe extern "C" fn haku_bytecode2(instance: *const Instance) -> *const u8 {
unsafe extern "C" fn haku_local_count2(instance: *const Instance) -> u8 {
compile_result(instance).closure_spec.local_count
}
#[unsafe(no_mangle)]
unsafe extern "C" fn haku_stat_ast_size(instance: *const Instance) -> usize {
compile_result(instance).stats.ast_size
}