summaryrefslogtreecommitdiff
path: root/src/dump.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-06 18:22:04 -0300
committerGabriel Schneider <[email protected]>2026-11-06 20:00:43 -0300
commiteeb59b92295e74b956d32e66c3c318e105a391db (patch)
treed7178f0b87c5740a077119705331efa3d0319547 /src/dump.zig
parentb22fa2638bca470bbd8c5ea4768eb0eaaa3e8195 (diff)
downloadpardes-eeb59b92295e74b956d32e66c3c318e105a391db.tar.gz
pardes-eeb59b92295e74b956d32e66c3c318e105a391db.zip
kinds #38, a kind's ticks and views as units of the session's origin (§17.2 B 1): a step of the session's own (a tick, a job's answer, a 9P request, any input no client sends) tells each view whose facts moved and ticks a focus changed or a deadline come, a client's input ticks only the pane its key, click or word went to (which already waits), so a client never guesses a tick and never waits for one; the tick's prefix is in its taped outcome (a Shadow's tag is the authority's from the tape, `told` and the frame's prefix gone, the dump carrying the prefix), Kind.wake says a focus change, the tick wait and Kind.repaint are gone, the post-unit flush stays for the tick after a key; the stall test asserts the replay (0 mispredicted, 0 waited)
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/dump.zig')
-rw-r--r--src/dump.zig7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/dump.zig b/src/dump.zig
index 52002697..2f52d1d9 100644
--- a/src/dump.zig
+++ b/src/dump.zig
@@ -927,7 +927,8 @@ const SlotRecord = struct {
next_tick: u64 = 0,
views: [views.max]u64 = @splat(0),
focused: bool = false,
- told: []const u8 = "",
+ /// Its tick's prefix: a replica's tag laid out as the session's.
+ prefix: []const u8 = "",
/// A placeholder's why (its file not here).
refused: []const u8 = "",
/// What a step reads of it that its kind's open made (Kind.reopen) or
@@ -940,7 +941,7 @@ const SlotRecord = struct {
pub fn slotWrite(s: *const Kind.Slot, gpa: std.mem.Allocator, w: *std.Io.Writer) !void {
var place: [32]u8 = undefined;
- var r: SlotRecord = .{ .name = s.nameOf(), .version = s.version, .path = s.path, .art = s.art, .record = s.record, .where = s.where_text.slice(), .values = s.values.slice(), .live = s.live, .next_tick = s.next_tick, .views = s.views, .focused = s.focused, .told = s.told.slice(), .refused = s.refused.slice(), .tail = s.tail.slice(), .selection = s.selection };
+ var r: SlotRecord = .{ .name = s.nameOf(), .version = s.version, .path = s.path, .art = s.art, .record = s.record, .where = s.where_text.slice(), .values = s.values.slice(), .live = s.live, .next_tick = s.next_tick, .views = s.views, .focused = s.focused, .prefix = s.prefix.slice(), .refused = s.refused.slice(), .tail = s.tail.slice(), .selection = s.selection };
var owned: ?[]u8 = null;
defer if (owned) |o| s.gpa.free(o);
if (s.ops != null) {
@@ -977,7 +978,7 @@ pub fn slotRead(out: *Kind.Slot, gpa: std.mem.Allocator, bytes: []const u8) !voi
@memcpy(out.name[0..@min(15, r.name.len)], r.name[0..@min(15, r.name.len)]);
out.path = try gpa.dupe(u8, r.path);
out.where_text.set(r.where);
- out.told.set(r.told);
+ out.prefix.set(r.prefix);
out.refused.set(r.refused);
out.tail.set(r.tail);
out.values.set(r.values);