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

@ -1,5 +1,6 @@
const std = @import("std");
const mem = std.mem;
const log = std.log.scoped(.bytecode);
/// NOTE: This must be mirrored in bytecode.rs.
pub const Opcode = enum(u8) {
@ -70,6 +71,8 @@ pub const Defs = struct {
.num_tags = mem.count(u8, tags_string, "\n"),
};
log.debug("parsed defs {*} tags {s}: {}", .{ defs_string, tags_string, d });
return d;
}