summaryrefslogtreecommitdiff
path: root/anim/src/disasm.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-11 06:49:10 -0300
committerGabriel Schneider <[email protected]>2026-11-11 06:50:11 -0300
commit378379807fb4cd751e90808c8363caddb365bcd8 (patch)
treef84c7d0e7cbd42a9b9c93e791ab2b5376499d23d /anim/src/disasm.zig
parent5922ee911b9a6604f60dc83be36ba9e6c9abac98 (diff)
downloadcomputeranim-378379807fb4cd751e90808c8363caddb365bcd8.tar.gz
computeranim-378379807fb4cd751e90808c8363caddb365bcd8.zip
canim: nothing changes in one frame; the map's space is used; the heap scene at its storyboard's length
The motion check counts a third of the one-frame changes it did: the minimap's changes fade, and a register's value, a flag, a role, a pin's names, a tag's note, a backtrace row, a call tree's node and a dump row crossfade where they changed at once. What still fires is named in the README; an encoder's keyframe and the gallery's cuts are exempt by name. No caption stands over twelve seconds or under its reading time. The heap scene is 78 s: what the storyboard does not narrate runs, and each free's line cascades onto its call row (line stepping stops at a breakpoint for that). On the map, leftover space holds the stack continued, dumps round what the registers and the stack point at, open loupes and the key: between 1% and 13% of a map is page, where it was 14% to 42%. Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa
Diffstat (limited to 'anim/src/disasm.zig')
-rw-r--r--anim/src/disasm.zig16
1 files changed, 13 insertions, 3 deletions
diff --git a/anim/src/disasm.zig b/anim/src/disasm.zig
index e871cc6..cf16c6a 100644
--- a/anim/src/disasm.zig
+++ b/anim/src/disasm.zig
@@ -85,8 +85,18 @@ pub const Disasm = struct {
if (ui.mapping) map.measure(.disasm, listing(u, rec, now.marks[1], theme.map.disasm_rows, (theme.map.disasm_rows - 1) / 2).rows.len);
const pc = [2]u64{ rec.register(now.marks[0], "rip"), rec.register(now.marks[1], "rip") };
- const name = rec.strings.get(pc[if (going >= 0.5) 1 else 0]) orelse "";
- const body = u.panel(box.w, box.h, "disassembly", .{ .focus = d.focus, .note = name[0 .. std.mem.lastIndexOfScalar(u8, name, '+') orelse name.len] });
+ // The function's name: one that changes with the advance crossfades over it.
+ var names: [2][]const u8 = undefined;
+ for (pc, &names) |at_pc, *name| {
+ const sym = rec.strings.get(at_pc) orelse "";
+ name.* = sym[0 .. std.mem.lastIndexOfScalar(u8, sym, '+') orelse sym.len];
+ }
+ const renamed = !std.mem.eql(u8, names[0], names[1]);
+ const body = u.panel(box.w, box.h, "disassembly", .{ .focus = d.focus, .note = if (renamed) "" else names[1] });
+ if (renamed) {
+ u.faded(1 - going).tagNote(box.w, names[0]);
+ u.faded(going).tagNote(box.w, names[1]);
+ }
const top = body.y + m.pad;
u.clip(.{ .x = theme.stroke.rule, .y = m.tag, .w = box.w - 2 * theme.stroke.rule, .h = box.h - m.tag - theme.stroke.rule });
defer u.unclip();
@@ -172,7 +182,7 @@ pub const Disasm = struct {
break :blk rec.register(at - 1, "rip");
};
- if (shown.rows.len > 0) map.window(.disasm, shown.rows[0].addr, shown.rows[shown.rows.len - 1].addr);
+ if (to.rows.len > 0) map.window(.disasm, .{ to.rows[0].addr, to.rows[to.rows.len - 1].addr }, if (from.rows.len > 0) .{ from.rows[0].addr, from.rows[from.rows.len - 1].addr } else .{ to.rows[0].addr, to.rows[to.rows.len - 1].addr }, cursors.glide(going));
var last_line: ?u32 = null;
// A source of many lines (SQLite's) has wider numbers, as wide as
// its largest: what is right of them moves right by as much.