summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/CHANGELOG.md9
-rw-r--r--src/walk.zig8
2 files changed, 9 insertions, 8 deletions
diff --git a/src/CHANGELOG.md b/src/CHANGELOG.md
index ce98a862..b12fc2c5 100644
--- a/src/CHANGELOG.md
+++ b/src/CHANGELOG.md
@@ -41,15 +41,16 @@
A column resizes by its box, left of its tag; a pane by its own box,
or in a window by the rule above it.
-- An edit to the core recompiles it about 1.5 s sooner again (`core-test`,
- 14 % fewer of the compiler's instructions, 4.4 MB less code in a Debug
+- An edit to the core recompiles it about 2 s sooner again (`core-test`,
+ 16 % fewer of the compiler's instructions, 4.4 MB less code in a Debug
test): a load's note on a field (another build's dump) is written from
the type's and the field's names at run time, where every type and
field had its own copy of the code that writes one; one byte dump's
reader serves a session, a pane and the rest, where each had its own;
and what tells a replica's build from another's (`wire.semantics`)
- joins its two long parts on, and writes the tape's numbers itself,
- where it formatted them, at every compile.
+ joins its two long parts on, and the tape's shape writes its numbers
+ itself and copies each line it builds once, where it formatted them
+ and copied the line again for each piece, at every compile.
- An edit to the core recompiles it about 3 s sooner (`core-test`, 13 s to
10 s): the build keeps each grammar's highlight patterns that pardes
diff --git a/src/walk.zig b/src/walk.zig
index 8747937d..0f181cfa 100644
--- a/src/walk.zig
+++ b/src/walk.zig
@@ -367,7 +367,7 @@ pub fn shape(comptime types: []const type) []const u8 {
comptime {
@setEvalBranchQuota(10_000_000);
var out: []const u8 = "";
- for (types) |T| out = out ++ shapeOf(T, 0) ++ "\n";
+ for (types) |T| out = out ++ (shapeOf(T, 0) ++ "\n");
return out;
}
}
@@ -382,7 +382,7 @@ fn shapeOf(comptime T: type, comptime depth: u8) []const u8 {
.float => |f| "f" ++ decimal(f.bits),
.@"enum" => |e| blk: {
var out: []const u8 = shapeOf(e.tag_type, depth + 1) ++ "{";
- for (e.field_names, e.field_values) |n, v| out = out ++ n ++ "=" ++ decimal(v) ++ ",";
+ for (e.field_names, e.field_values) |n, v| out = out ++ (n ++ "=" ++ decimal(v) ++ ",");
break :blk out ++ "}";
},
.optional => |o| if (machinery(o.child)) "0" else "?" ++ shapeOf(o.child, depth + 1),
@@ -397,13 +397,13 @@ fn shapeOf(comptime T: type, comptime depth: u8) []const u8 {
var out: []const u8 = if (s.layout == .@"packed") "p{" else "{";
for (s.field_names, s.field_types, s.field_attrs) |name, F, attr| {
if (attr.@"comptime" or excluded(T, name)) continue;
- out = out ++ name ++ ":" ++ shapeOf(F, depth + 1) ++ ",";
+ out = out ++ (name ++ ":" ++ shapeOf(F, depth + 1) ++ ",");
}
break :blk out ++ "}";
},
.@"union" => |u| blk: {
var out: []const u8 = shapeOf(u.tag_type.?, depth + 1) ++ "(";
- for (u.field_names, u.field_types) |name, F| out = out ++ name ++ ":" ++ shapeOf(F, depth + 1) ++ ",";
+ for (u.field_names, u.field_types) |name, F| out = out ++ (name ++ ":" ++ shapeOf(F, depth + 1) ++ ",");
break :blk out ++ ")";
},
.error_set => "error",