summaryrefslogtreecommitdiff
path: root/core/tape.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-23 02:23:34 -0300
committerGabriel Schneider <[email protected]>2026-11-23 02:23:34 -0300
commit1ebae0db0a185455b2a03f22f5106113c6407a2f (patch)
treedb0e473c2c060e6bf7d4f4d169ffff11178056c3 /core/tape.zig
parent5393ce743d7848d26e60fd7d4d27a4119272df9f (diff)
parentde0e85daa8ad0bf9618734e16568823aa2b61a54 (diff)
downloadpardes-1ebae0db0a185455b2a03f22f5106113c6407a2f.tar.gz
pardes-1ebae0db0a185455b2a03f22f5106113c6407a2f.zip
integration (a base for the next rounds, not yet the gathered line): the one decision on the tree to install: pardes-merge60 (`krovvoum`: the viewport, a client's way back at an Upgrade, the pair's round 12, the lanes on the glide; in its whole gate) and pardes-one-decision (`ltvyvwru` on `wllwukuk` on `trmpwtso`, on pardes-viewport: one count of an emulator's writes in the core (`Pardes.outside`), copied, digested and dumped, which `Replica.confirm` reads once a unit where four spread checks stood; the rollback copy walks every type unless it declares `outside_copy`: the Changes layer's heap was not walked and was freed twice); no conflict; core-test 919/1083 (164 skipped), shell-test 1125/1128 (2026-11-23)
Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'core/tape.zig')
-rw-r--r--core/tape.zig36
1 files changed, 0 insertions, 36 deletions
diff --git a/core/tape.zig b/core/tape.zig
index dc53a7c9..5f98238d 100644
--- a/core/tape.zig
+++ b/core/tape.zig
@@ -294,9 +294,6 @@ pub const Tape = struct {
/// The authority's last yes or no to each question a replayed unit
/// asked it (`authority`), a speculation's guess.
answers: std.AutoHashMapUnmanaged(u64, bool) = .empty,
- /// It read a terminal (its rows) or moved one's view: what it did
- /// depends on the emulator, which deltas write (`touchTerminal`).
- touched: bool = false,
/// The allocator of the core a replay makes (a replica's rollback epoch,
/// core/rollback.zig), when it is not the tape's own.
core_gpa: ?std.mem.Allocator = null,
@@ -890,11 +887,6 @@ pub const Tape = struct {
return true;
}
- /// A speculation read a terminal's rows or moved its view (`Tape.touched`).
- pub fn touchTerminal(t: *Tape) void {
- if (t.speculating) t.touched = true;
- }
-
/// The core a Restore made is the session's from here.
pub fn adopt(t: *Tape, p: *Pardes) void {
p.tape = t;
@@ -1339,10 +1331,6 @@ pub fn authorityOnly(comptime why: []const u8) bool {
return (on orelse &none).authorityOnly(why);
}
-pub fn touchTerminal() void {
- (on orelse &none).touchTerminal();
-}
-
/// A harmless stand-in for what a host call or a syscall would have
/// returned to a speculation that is thrown away once it returns: an
/// error where one can be said, else zeroes.
@@ -1426,7 +1414,6 @@ pub fn beginSpeculation(t: *Tape) void {
t.speculating = true;
t.poisoned = false;
t.poisoned_by = "";
- t.touched = false;
t.no_digest = true;
t.yields = pardes.turn.yields;
t.buf.clearRetainingCapacity();
@@ -1446,29 +1433,6 @@ pub fn endSpeculation(t: *Tape) bool {
/// a message may be (replica.zig `lag_max`'s neighbour, wire's bound).
pub const unit_max = 1 << 20;
-/// Whether a unit writes a terminal's emulator: feeds one its program's
-/// output (a pty's read; an input kept by hash is taken to), or reloads
-/// every one at a join (`Site.reload`; a join refused too, which moves
-/// nothing a digest covers): never taken as moving nothing (the replica
-/// engine's one rule, core/replica.zig `confirm`).
-pub fn feedsTerminal(bytes: []const u8) bool {
- const Tag = std.meta.Tag(Input);
- const EventTag = std.meta.Tag(pardes.Event);
- const reload: u16 = @as(u16, host_fns.len) + @backingInt(Site.reload);
- var r: walk.Reader = .{ .bytes = bytes };
- while (nextRecord(&r)) |rec| switch (rec.kind) {
- .blob => if (rec.payload.len > 0 and rec.payload[0] == @backingInt(Kind.input)) return true,
- .host => if (rec.payload.len >= 2 and std.mem.bytesToValue(u16, rec.payload[0..2]) == reload) return true,
- .input => {
- if (rec.payload.len < @sizeOf(Tag) + @sizeOf(EventTag)) continue;
- if (!std.mem.eql(u8, rec.payload[0..@sizeOf(Tag)], std.mem.asBytes(&@as(Tag, .update)))) continue;
- if (std.mem.eql(u8, rec.payload[@sizeOf(Tag)..][0..@sizeOf(EventTag)], std.mem.asBytes(&@as(EventTag, .output)))) return true;
- },
- else => {},
- };
- return false;
-}
-
/// Whether two tapes record the same inputs, host calls and answers,
/// their digests aside.
pub fn sameRecords(a: []const u8, b: []const u8) bool {