update to latest zig, remove silkdot
This commit is contained in:
parent
9257ce6074
commit
1f41e5da8e
6 changed files with 29 additions and 115 deletions
|
@ -54,13 +54,13 @@ const Stack = struct {
|
|||
}
|
||||
|
||||
pub fn pop(self: *Stack, comptime T: type) T {
|
||||
self.sp -%= @intCast(@divExact(@typeInfo(T).Int.bits, 8));
|
||||
self.sp -%= @intCast(@divExact(@typeInfo(T).int.bits, 8));
|
||||
return self.peek(T);
|
||||
}
|
||||
|
||||
pub fn push(self: *Stack, comptime T: type, v: T) void {
|
||||
self.poke(T, v);
|
||||
self.sp +%= @intCast(@divExact(@typeInfo(T).Int.bits, 8));
|
||||
self.sp +%= @intCast(@divExact(@typeInfo(T).int.bits, 8));
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -458,6 +458,8 @@ fn jsr(self: *Uxn, stack: *Stack, comptime T: type, comptime keep: bool) void {
|
|||
}
|
||||
}
|
||||
|
||||
// this one uses a bool instead of a *Stack, because it needs access to both stacks
|
||||
// TODO now that I think about it, just use a bool everywhere
|
||||
fn sth(self: *Uxn, comptime swap: bool, comptime T: type, comptime keep: bool) void {
|
||||
var src = if (swap) self.rs else self.ws;
|
||||
var dst = if (swap) self.ws else self.rs;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue