update Zig code to 0.15.0

This commit is contained in:
りき萌 2025-09-02 20:15:35 +02:00
parent 449f2b59df
commit 45099916fe
4 changed files with 17 additions and 15 deletions

View file

@ -167,7 +167,7 @@ pub fn push(vm: *Vm, val: Value) Error!void {
if (vm.stack_top >= vm.stack.len) {
return vm.throw("too many live temporary values (local variables and expression operands)", .{});
}
log.debug("PUSH {any} <- {}", .{ vm.stack[0..vm.stack_top], val });
log.debug("PUSH {any} <- {f}", .{ vm.stack[0..vm.stack_top], val });
vm.stack[vm.stack_top] = val;
vm.stack_top += 1;
}
@ -176,7 +176,7 @@ pub fn pop(vm: *Vm) Error!Value {
try vm.validateBytecode(vm.stack_top > 0, "value stack underflow", .{});
vm.stack_top -= 1;
const result = vm.stack[vm.stack_top];
log.debug("POP {any} -> {}", .{ vm.stack[0..vm.stack_top], result });
log.debug("POP {any} -> {f}", .{ vm.stack[0..vm.stack_top], result });
return vm.stack[vm.stack_top];
}