From 56d9ca991fd9b30bc931ece2199b218fdec91fe9 Mon Sep 17 00:00:00 2001 From: Meghan Denny Date: Wed, 27 May 2026 15:27:12 -0700 Subject: [PATCH] remove callconv_inline this crashed the compiler in 0.14 in release mode this caused LLVM Emit Object to take 23m in 0.15 --- src/lib.zig | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/lib.zig b/src/lib.zig index 648221b7921fdd08016b0023e588b815fbcae977..88e6ccdc31ac9dc3815888d4813bcf1ac91ebbea 100644 --- a/src/lib.zig +++ b/src/lib.zig @@ -19,8 +19,6 @@ const nio = @import("nio"); const tokenize = @import("./tokenize.zig"); const astgen = @import("./astgen.zig"); -const callconv_inline: std.builtin.CallingConvention = if (builtin.mode == .Debug) .auto else .@"inline"; - pub fn parse(comptime input: string) astgen.Value { return astgen.Value{ .element = astgen.do(tokenize.do(input, &.{ '[', '=', ']', '(', ')', '{', '}', '#', '/', '.', '<', '>' })) }; } @@ -44,7 +42,7 @@ pub fn compileInner(alloc: std.mem.Allocator, writer: anytype, comptime value: a pub const Writer = std.ArrayList(u8).Writer; -fn do(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Value, data: anytype, ctx: anytype, comptime opts: DoOptions) callconv(callconv_inline) anyerror!void { +fn do(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Value, data: anytype, ctx: anytype, comptime opts: DoOptions) anyerror!void { comptime var skipindent = false; if (value == .element and comptime std.mem.eql(u8, value.element.name, "pre")) skipindent = true; return doInner(alloc, writer, value, data, ctx, .{ @@ -55,7 +53,7 @@ fn do(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Value, d .escaped = opts.escaped, }); } -fn doInner(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Value, data: anytype, ctx: anytype, comptime opts: DoOptions) callconv(callconv_inline) anyerror!void { +fn doInner(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Value, data: anytype, ctx: anytype, comptime opts: DoOptions) anyerror!void { switch (comptime value) { .element => |v| { const hastext = comptime for (v.children) |x| { -- 2.54.0