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");
1919const tokenize = @import("./tokenize.zig");
2020const astgen = @import("./astgen.zig");
2121
22const callconv_inline: std.builtin.CallingConvention = if (builtin.mode == .Debug) .auto else .@"inline";
23
2422pub fn parse(comptime input: string) astgen.Value {
2523 return astgen.Value{ .element = astgen.do(tokenize.do(input, &.{ '[', '=', ']', '(', ')', '{', '}', '#', '/', '.', '<', '>' })) };
2624}
......@@ -44,7 +42,7 @@ pub fn compileInner(alloc: std.mem.Allocator, writer: anytype, comptime value: a
4442
4543pub 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 {
4846 comptime var skipindent = false;
4947 if (value == .element and comptime std.mem.eql(u8, value.element.name, "pre")) skipindent = true;
5048 return doInner(alloc, writer, value, data, ctx, .{
......@@ -55,7 +53,7 @@ fn do(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Value, d
5553 .escaped = opts.escaped,
5654 });
5755}
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 {
5957 switch (comptime value) {
6058 .element => |v| {
6159 const hastext = comptime for (v.children) |x| {