authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-04-11 13:31:28 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-05-29 11:25:33 -07:00
logd23c43a9090331ac8114f10c596748e44f115557
tree27643964b454c89eeee32e912d60efb8aee9aee7
parent19658da57cd45200a7b357cc2667aa058a39a7b7

remove these extraneous traces

when enabled, balloons the size of the trace from 100s of kb to 10s of mb

1 files changed, 0 insertions(+), 15 deletions(-)

src/lib.zig-15
......@@ -35,9 +35,6 @@ pub fn compile(comptime Ctx: type, alloc: std.mem.Allocator, writer: anytype, co
3535}
3636
3737pub fn compileInner(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Value, comptime opts: DoOptions, data: anytype) !void {
38 const t = tracer.trace(@src(), "", .{});
39 defer t.end();
40
4138 try do(alloc, writer, value, data, data, opts);
4239 try writer.writeAll("\n");
4340}
......@@ -45,9 +42,6 @@ pub fn compileInner(alloc: std.mem.Allocator, writer: anytype, comptime value: a
4542pub const Writer = std.ArrayList(u8).Writer;
4643
4744fn do(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Value, data: anytype, ctx: anytype, comptime opts: DoOptions) anyerror!void {
48 const t = tracer.trace(@src(), "", .{});
49 defer t.end();
50
5145 switch (comptime value) {
5246 .element => |v| {
5347 const hastext = comptime for (v.children) |x| {
......@@ -368,9 +362,6 @@ fn Field(comptime T: type, comptime field_name: string) type {
368362}
369363
370364pub fn writeEscaped(s: string, writer: anytype) !void {
371 const t = tracer.trace(@src(), "", .{});
372 defer t.end();
373
374365 const view = std.unicode.Utf8View.initUnchecked(s);
375366 var iter = view.iterator();
376367 while (nextCodepointSliceLossy(&iter)) |sl| {
......@@ -455,9 +446,6 @@ fn contains(haystack: []const string, needle: string) bool {
455446}
456447
457448fn doif(alloc: std.mem.Allocator, writer: anytype, comptime top: astgen.Value, comptime bottom: astgen.Value, data: anytype, ctx: anytype, comptime opts: DoOptions, flag2: bool) anyerror!void {
458 const t = tracer.trace(@src(), "", .{});
459 defer t.end();
460
461449 if (flag2) {
462450 try do(alloc, writer, top, data, ctx, opts);
463451 } else {
......@@ -466,9 +454,6 @@ fn doif(alloc: std.mem.Allocator, writer: anytype, comptime top: astgen.Value, c
466454}
467455
468456fn docap(alloc: std.mem.Allocator, writer: anytype, comptime top: astgen.Value, comptime bottom: astgen.Value, data: anytype, ctx: anytype, comptime opts: DoOptions, flag2: anytype) anyerror!void {
469 const t = tracer.trace(@src(), "", .{});
470 defer t.end();
471
472457 if (flag2) |_| {
473458 try do(alloc, writer, top, data, ctx, opts);
474459 } else {