authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-05-27 15:27:12 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-05-27 15:27:12 -07:00
log56d9ca991fd9b30bc931ece2199b218fdec91fe9
tree75b2928a9a5d47d27a8809d044b3020f312e8f5b
parent43ce0dc6530f85b7d1ea6c9f9406e6e9bd9aa538
signaturebadge-check Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

remove callconv_inline

this crashed the compiler in 0.14 in release mode this caused LLVM Emit Object to take 23m in 0.15

1 files changed, 2 insertions(+), 4 deletions(-)

src/lib.zig+2-4
...@@ -19,8 +19,6 @@ const nio = @import("nio");...@@ -19,8 +19,6 @@ const nio = @import("nio");
19const tokenize = @import("./tokenize.zig");19const tokenize = @import("./tokenize.zig");
20const astgen = @import("./astgen.zig");20const astgen = @import("./astgen.zig");
2121
22const callconv_inline: std.builtin.CallingConvention = if (builtin.mode == .Debug) .auto else .@"inline";
23
24pub fn parse(comptime input: string) astgen.Value {22pub fn parse(comptime input: string) astgen.Value {
25 return astgen.Value{ .element = astgen.do(tokenize.do(input, &.{ '[', '=', ']', '(', ')', '{', '}', '#', '/', '.', '<', '>' })) };23 return astgen.Value{ .element = astgen.do(tokenize.do(input, &.{ '[', '=', ']', '(', ')', '{', '}', '#', '/', '.', '<', '>' })) };
26}24}
...@@ -44,7 +42,7 @@ pub fn compileInner(alloc: std.mem.Allocator, writer: anytype, comptime value: a...@@ -44,7 +42,7 @@ pub fn compileInner(alloc: std.mem.Allocator, writer: anytype, comptime value: a
4442
45pub const Writer = std.ArrayList(u8).Writer;43pub const Writer = std.ArrayList(u8).Writer;
4644
47fn do(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Value, data: anytype, ctx: anytype, comptime opts: DoOptions) callconv(callconv_inline) anyerror!void {45fn do(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Value, data: anytype, ctx: anytype, comptime opts: DoOptions) anyerror!void {
48 comptime var skipindent = false;46 comptime var skipindent = false;
49 if (value == .element and comptime std.mem.eql(u8, value.element.name, "pre")) skipindent = true;47 if (value == .element and comptime std.mem.eql(u8, value.element.name, "pre")) skipindent = true;
50 return doInner(alloc, writer, value, data, ctx, .{48 return doInner(alloc, writer, value, data, ctx, .{
...@@ -55,7 +53,7 @@ fn do(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Value, d...@@ -55,7 +53,7 @@ fn do(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Value, d
55 .escaped = opts.escaped,53 .escaped = opts.escaped,
56 });54 });
57}55}
58fn doInner(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Value, data: anytype, ctx: anytype, comptime opts: DoOptions) callconv(callconv_inline) anyerror!void {56fn doInner(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Value, data: anytype, ctx: anytype, comptime opts: DoOptions) anyerror!void {
59 switch (comptime value) {57 switch (comptime value) {
60 .element => |v| {58 .element => |v| {
61 const hastext = comptime for (v.children) |x| {59 const hastext = comptime for (v.children) |x| {