diff options
Diffstat (limited to 'src/Kind.zig')
| -rw-r--r-- | src/Kind.zig | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/Kind.zig b/src/Kind.zig index 08c04154..71ff4890 100644 --- a/src/Kind.zig +++ b/src/Kind.zig @@ -126,8 +126,16 @@ pub const Registry = struct { /// What the core keeps of a pane of a kind, round the kind's own state. /// A rollback copy leaves it be, as a terminal's emulator; a dump writes -/// its record by hand (dump.zig). +/// its record by hand (dump.zig). A digest walks every field a step reads +/// (17.2), which a dump carries and test/panes.zig's parity walk checks. pub const Slot = struct { + pub const replica = .{ + // The kind's own and the authority's (its code and memory, its + // jobs' inputs, its file's hash, a placeholder's record, the place + // its kind says), and what a frame makes (the thumb, the pointer, + // whether one was drawn: a view's, never a step's). + .local = .{ "ops", "st", "gpa", "arena", "opened", "jobs", "tokens", "record", "where_text", "thumb_at", "thumb_span", "pointer", "painted", "over", "shadow", "used" }, + }; /// Its kind's code here; null in a placeholder (`live` false: its kind /// not in the registry, its record kept for the day it comes) or a /// Shadow (a replica's pane of a library's kind). @@ -205,13 +213,6 @@ pub const Slot = struct { return std.mem.eql(u8, s.nameOf(), name); } - pub fn digest(s: *const Slot, h: *walk.Hasher) void { - h.update(s.nameOf()); - h.update(s.path); - h.update(std.mem.asBytes(&s.art)); - h.update(std.mem.asBytes(&.{ s.next_tick, s.gen, @intFromBool(s.live), @intFromBool(s.focused) })); - } - pub fn free(s: *Slot) void { for (&s.jobs) |*j| if (j.*) |job| s.gpa.free(job.in); s.gpa.free(s.selection); |
