summaryrefslogtreecommitdiff
path: root/core/Query.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-19 14:41:03 -0300
committerGabriel Schneider <[email protected]>2026-11-19 15:51:13 -0300
commitee2e79dea10c93c104b70cf1eedccd7ba85003fc (patch)
tree0a7796a729e1e324a09c21dead12a01b375fd541 /core/Query.zig
parentf1db5eaf5a5cc5f891cc2c180aa706fefc39971d (diff)
downloadpardes-ee2e79dea10c93c104b70cf1eedccd7ba85003fc.tar.gz
pardes-ee2e79dea10c93c104b70cf1eedccd7ba85003fc.zip
the small ones: their tape calls are the handle's, `p.tape` (the handle's step 5, P20, pardes-handle-sizing section 3's fifth noun): sixteen calls in ten files, each in a function that holds the core: Output (History's dumps and Config's default dump directory asked of the authority, Fonts' listing a site), Query (Recent's rows and the closed panes asked of the authority, a preview's read a site), Store (a closed pane's record, the authority's), Plumb (a port's readers, the authority's; its `const tape = @import("tape.zig")` gone, 1 line apart from the count), Stream (a search run on the loop, a site), mouse (whether a script reads a pane's events, the authority's), File (an edit's mtime, a clock), ninep/events (the boot's event when not replaying), ninep/tree (/sessions, a site), builtins (Get's label, Mount's probe and Term's shell check: `c.p.tape`, a word's context holds the core); no function gains the parameter (row: 0); Stream.runHere, the host's search on its loop when it has no worker, holds the core and reads its field, which is the tape the global names whenever a step is under way (the safe build's check at every entry); the five numbers: (1) functions that gained the parameter 0 (row: 0); (2) the 97 per-operation counts within 0.1%, the largest image-frame on medium +0.0332%; no function on a per-row path touched; (3) nothing stopped compiling for want of an io; (4) global io uses 7 (unchanged), free calls into the tape 45 -> 29, machine_lines rows unchanged; (5) lines changed: tests 0, code +16/-16 (and the import's one line). Lines in files not this work's: none. Gate: tui core-test 840/983 (143 skipped), shell-test 1018/1021, pane-test 183/184, term-test 15/15, kitty-test 45/45, behaviour-test 275/275 and --replay 20 seeds 0 failures, process-test lspcomplete and lspcompletemoved (the base's; winch failed once, passed on the runner's retry), replicas --clients 5 diverged 0, unequal 0, deltas wrong 0 (2033/0, 1978/0, 1682/0), quiet 568/0, 581/0, 748/0, stops not at may_wait 0 (its "corpus through a client" fails as on the base, steps 18 to 21), gui unit-test 1616/1620 (BaselineHarnessMismatch, the base's), daemon.py plain, --far, --games, --window-clients pass, test/cross_replay.py tui to tui: 28 digests agree in each of the three replicas, semantics 313a99190b93a8c5 (unmoved); frames (gpu/handle2-5b against tree1, run again after the machine's reboot cut handle2-5 short) 77/77 byte-identical in Debug, gui unit-test 1616/1620, perfab corpus2x +0.035% (session noise 0.089%, threshold 0.4%), pictures identical in all 10 runs, perfops PASS
Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'core/Query.zig')
-rw-r--r--core/Query.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/Query.zig b/core/Query.zig
index e8011a1f..ce83a6ac 100644
--- a/core/Query.zig
+++ b/core/Query.zig
@@ -719,7 +719,7 @@ fn startSource(p: *Pardes, id: usize, q: *Query, source: Source, owner_id: ?usiz
.recent => {
var out: std.Io.Writer.Allocating = .init(gpa);
defer out.deinit();
- var lines = std.mem.splitScalar(u8, pardes.tape.authority(recentRows, .{ p, &out }), '\n');
+ var lines = std.mem.splitScalar(u8, p.tape.authority(recentRows, .{ p, &out }), '\n');
while (lines.next()) |ln| {
if (ln.len == 0) continue;
const rel = relative(ln, dir);
@@ -742,7 +742,7 @@ fn startSource(p: *Pardes, id: usize, q: *Query, source: Source, owner_id: ?usiz
// `(closed)` and dimmer (makeNameRows): Enter brings one back
// where it was. Its name alone is matched, not the word. The
// session's, which a replica has from the authority.
- for (pardes.tape.authority(Store.closedNames, .{p})) |c| {
+ for (p.tape.authority(Store.closedNames, .{p})) |c| {
var buf: [4096 + 48]u8 = undefined;
const row = std.fmt.bufPrint(&buf, config.pane_addr ++ "{d} {s}" ++ closed_word, .{ c.serial, relative(c.name, dir) }) catch continue;
const key_at = std.mem.indexOfScalar(u8, row, ' ').? + 1;
@@ -1668,7 +1668,7 @@ fn displayPreview(p: *Pardes, qid: usize, path: []const u8, at: look.Spot) void
const f = &pane.file.?;
if (!std.mem.eql(u8, f.path, path)) {
if (exec.kindOf(p.tape, path)) |kind| if (kind != .file) return;
- const bytes = pardes.tape.site(.preview, p.gpa, filesystem.read, .{ p, path }) catch return;
+ const bytes = p.tape.site(.preview, p.gpa, filesystem.read, .{ p, path }) catch return;
if (std.mem.indexOfScalar(u8, bytes[0..@min(bytes.len, 8000)], 0) != null) {
p.gpa.free(bytes);
return;