From 49edb642e3d06bcbc93ef69c4869c5dfe3afbe45 Mon Sep 17 00:00:00 2001 From: torque Date: Thu, 1 Jun 2023 22:41:41 -0700 Subject: [PATCH] parser: work around compiler bug At some point, (probably during the llvm 16 upgrade, though I haven't done the legwork to actually narrow it down), zig developed a crash around the way inline was used here. Since using `inline` was an air quotes optimization, we can just chuck the designation for the time being so that compilation will succeed. This may remove more inlines than is strictly necessary, but I am bravely willing to make that sacrifice. See: ziglang/zig#15668 --- source/parser.zig | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/parser.zig b/source/parser.zig index f793189..fb4697b 100644 --- a/source/parser.zig +++ b/source/parser.zig @@ -274,7 +274,7 @@ pub fn Parser(comptime command: anytype, comptime callback: anytype) type { return 0; } - inline fn parse_long_tag( + fn parse_long_tag( self: *@This(), name: []const u8, arg: []const u8, @@ -304,7 +304,7 @@ pub fn Parser(comptime command: anytype, comptime callback: anytype) type { return ParseError.UnknownLongTagParameter; } - inline fn parse_short_tag( + fn parse_short_tag( self: *@This(), name: []const u8, arg: u8, @@ -334,7 +334,7 @@ pub fn Parser(comptime command: anytype, comptime callback: anytype) type { return ParseError.UnknownShortTagParameter; } - inline fn parse_ordinals( + fn parse_ordinals( self: *@This(), arg: []const u8, argit: *ncmeta.SliceIterator([][:0]u8), @@ -360,7 +360,7 @@ pub fn Parser(comptime command: anytype, comptime callback: anytype) type { return self.subcommands.get(arg) orelse ParseError.ExtraValue; } - inline fn push_intermediate_value( + fn push_intermediate_value( self: *@This(), comptime param: anytype, // @TypeOf(param).G.IntermediateValue() should work but appears to trigger a @@ -381,7 +381,7 @@ pub fn Parser(comptime command: anytype, comptime callback: anytype) type { } } - inline fn apply_param_values( + fn apply_param_values( self: *@This(), comptime param: anytype, argit: anytype, @@ -410,7 +410,7 @@ pub fn Parser(comptime command: anytype, comptime callback: anytype) type { } } - inline fn apply_fused_values( + fn apply_fused_values( self: *@This(), comptime param: anytype, value: []const u8,