summaryrefslogtreecommitdiff
path: root/src/Kind.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-06 18:23:20 -0300
committerGabriel Schneider <[email protected]>2026-11-06 20:00:43 -0300
commit1b38ca0aa0bfae1177f80a6713ec6d787d2f77d4 (patch)
tree9c656ca528561286e07c099a8d770af89417100a /src/Kind.zig
parenteeb59b92295e74b956d32e66c3c318e105a391db (diff)
downloadpardes-1b38ca0aa0bfae1177f80a6713ec6d787d2f77d4.tar.gz
pardes-1b38ca0aa0bfae1177f80a6713ec6d787d2f77d4.zip
kinds #39, paint writes nothing a step reads and the digest is every Slot field a step reads (§17.2 B 2-3): the Slot says what is the kind's own or a frame's (its code and memory, its jobs' inputs, a placeholder's record, the place its kind says, the thumb, the pointer, whether a frame was drawn) and the walker digests the rest, `placed` and the prefix leave the Shadow's frame (the pointer its one byte), the dump carries the cancelled tokens a replica's job answers are dropped by, and a pane test dumps a session with a PDF and a picture, loads it on another core and compares every Slot field the walk does not leave out, so a field added and not dumped fails a test, not a soak
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/Kind.zig')
-rw-r--r--src/Kind.zig17
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);