authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-07-17 22:51:23-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-09-24 19:57:28-07:00
logf49a54745ba67a4226cbe706727fb6817b64b1aa
tree198d12d258999dd7f081fdb6acb07978dffe11e8
parent91b0adc4c15a273b7a8a94371941a3f3f7fd2232

compiler: update aro and translate-c to latest; delete clang translate-c


73 files changed, 43508 insertions(+), 45478 deletions(-)

CMakeLists.txt-3
......@@ -197,7 +197,6 @@ set(ZIG_CPP_SOURCES
197197 # These are planned to stay even when we are self-hosted.
198198 src/zig_llvm.cpp
199199 src/zig_llvm-ar.cpp
200 src/zig_clang.cpp
201200 src/zig_clang_driver.cpp
202201 src/zig_clang_cc1_main.cpp
203202 src/zig_clang_cc1as_main.cpp
......@@ -537,7 +536,6 @@ set(ZIG_STAGE2_SOURCES
537536 src/Value.zig
538537 src/Zcu.zig
539538 src/Zcu/PerThread.zig
540 src/clang.zig
541539 src/clang_options.zig
542540 src/clang_options_data.zig
543541 src/codegen.zig
......@@ -641,7 +639,6 @@ set(ZIG_STAGE2_SOURCES
641639 src/register_manager.zig
642640 src/target.zig
643641 src/tracy.zig
644 src/translate_c.zig
645642 src/libs/wasi_libc.zig
646643)
647644
build.zig-6
......@@ -732,13 +732,7 @@ fn addCompilerMod(b: *std.Build, options: AddCompilerModOptions) *std.Build.Modu
732732 .root_source_file = b.path("lib/compiler/aro/aro.zig"),
733733 });
734734
735 const aro_translate_c_mod = b.createModule(.{
736 .root_source_file = b.path("lib/compiler/aro_translate_c.zig"),
737 });
738
739 aro_translate_c_mod.addImport("aro", aro_mod);
740735 compiler_mod.addImport("aro", aro_mod);
741 compiler_mod.addImport("aro_translate_c", aro_translate_c_mod);
742736
743737 return compiler_mod;
744738}
lib/compiler/aro/README.md deleted-26
......@@ -1,26 +0,0 @@
1<img src="https://aro.vexu.eu/aro-logo.svg" alt="Aro" width="120px"/>
2
3# Aro
4
5A C compiler with the goal of providing fast compilation and low memory usage with good diagnostics.
6
7Aro is included as an alternative C frontend in the [Zig compiler](https://github.com/ziglang/zig)
8for `translate-c` and eventually compiling C files by translating them to Zig first.
9Aro is developed in https://github.com/Vexu/arocc and the Zig dependency is
10updated from there when needed.
11
12Currently most of standard C is supported up to C23 and as are many of the common
13extensions from GNU, MSVC, and Clang
14
15Basic code generation is supported for x86-64 linux and can produce a valid hello world:
16```sh-session
17$ cat hello.c
18extern int printf(const char *restrict fmt, ...);
19int main(void) {
20 printf("Hello, world!\n");
21 return 0;
22}
23$ zig build && ./zig-out/bin/arocc hello.c -o hello
24$ ./hello
25Hello, world!
26```
lib/compiler/aro/aro.zig+6-3
......@@ -5,12 +5,14 @@ pub const Driver = @import("aro/Driver.zig");
55pub const Parser = @import("aro/Parser.zig");
66pub const Preprocessor = @import("aro/Preprocessor.zig");
77pub const Source = @import("aro/Source.zig");
8pub const StringInterner = @import("aro/StringInterner.zig");
9pub const target_util = @import("aro/target.zig");
810pub const Tokenizer = @import("aro/Tokenizer.zig");
911pub const Toolchain = @import("aro/Toolchain.zig");
1012pub const Tree = @import("aro/Tree.zig");
11pub const Type = @import("aro/Type.zig");
12pub const TypeMapper = @import("aro/StringInterner.zig").TypeMapper;
13pub const target_util = @import("aro/target.zig");
13pub const TypeStore = @import("aro/TypeStore.zig");
14pub const QualType = TypeStore.QualType;
15pub const Type = TypeStore.Type;
1416pub const Value = @import("aro/Value.zig");
1517
1618const backend = @import("backend.zig");
......@@ -18,6 +20,7 @@ pub const Interner = backend.Interner;
1820pub const Ir = backend.Ir;
1921pub const Object = backend.Object;
2022pub const CallingConvention = backend.CallingConvention;
23pub const Assembly = backend.Assembly;
2124
2225pub const version_str = backend.version_str;
2326pub const version = backend.version;
lib/compiler/aro/aro/Attribute.zig+425-253
......@@ -6,9 +6,8 @@ const Compilation = @import("Compilation.zig");
66const Diagnostics = @import("Diagnostics.zig");
77const Parser = @import("Parser.zig");
88const Tree = @import("Tree.zig");
9const NodeIndex = Tree.NodeIndex;
109const TokenIndex = Tree.TokenIndex;
11const Type = @import("Type.zig");
10const QualType = @import("TypeStore.zig").QualType;
1211const Value = @import("Value.zig");
1312
1413const Attribute = @This();
......@@ -39,79 +38,53 @@ pub const Kind = enum {
3938};
4039
4140pub const Iterator = struct {
42 source: union(enum) {
43 ty: Type,
44 slice: []const Attribute,
41 source: ?struct {
42 qt: QualType,
43 comp: *const Compilation,
4544 },
45 slice: []const Attribute,
4646 index: usize,
4747
48 pub fn initSlice(slice: ?[]const Attribute) Iterator {
49 return .{ .source = .{ .slice = slice orelse &.{} }, .index = 0 };
48 pub fn initSlice(slice: []const Attribute) Iterator {
49 return .{ .source = null, .slice = slice, .index = 0 };
5050 }
5151
52 pub fn initType(ty: Type) Iterator {
53 return .{ .source = .{ .ty = ty }, .index = 0 };
52 pub fn initType(qt: QualType, comp: *const Compilation) Iterator {
53 return .{ .source = .{ .qt = qt, .comp = comp }, .slice = &.{}, .index = 0 };
5454 }
5555
5656 /// returns the next attribute as well as its index within the slice or current type
5757 /// The index can be used to determine when a nested type has been recursed into
5858 pub fn next(self: *Iterator) ?struct { Attribute, usize } {
59 switch (self.source) {
60 .slice => |slice| {
61 if (self.index < slice.len) {
62 defer self.index += 1;
63 return .{ slice[self.index], self.index };
64 }
65 },
66 .ty => |ty| {
67 switch (ty.specifier) {
68 .typeof_type => {
69 self.* = .{ .source = .{ .ty = ty.data.sub_type.* }, .index = 0 };
70 return self.next();
71 },
72 .typeof_expr => {
73 self.* = .{ .source = .{ .ty = ty.data.expr.ty }, .index = 0 };
74 return self.next();
75 },
76 .attributed => {
77 if (self.index < ty.data.attributed.attributes.len) {
78 defer self.index += 1;
79 return .{ ty.data.attributed.attributes[self.index], self.index };
80 }
81 self.* = .{ .source = .{ .ty = ty.data.attributed.base }, .index = 0 };
82 return self.next();
83 },
84 else => {},
85 }
86 },
59 if (self.index < self.slice.len) {
60 defer self.index += 1;
61 return .{ self.slice[self.index], self.index };
62 }
63 if (self.source) |*source| {
64 var cur = source.qt;
65 if (cur.isInvalid()) {
66 self.source = null;
67 return null;
68 }
69 while (true) switch (cur.type(source.comp)) {
70 .typeof => |typeof| cur = typeof.base,
71 .attributed => |attributed| {
72 self.slice = attributed.attributes;
73 self.index = 1;
74 source.qt = attributed.base;
75 return .{ self.slice[0], 0 };
76 },
77 .typedef => |typedef| cur = typedef.base,
78 else => {
79 self.source = null;
80 break;
81 },
82 };
8783 }
8884 return null;
8985 }
9086};
9187
92pub const ArgumentType = enum {
93 string,
94 identifier,
95 int,
96 alignment,
97 float,
98 complex_float,
99 expression,
100 nullptr_t,
101
102 pub fn toString(self: ArgumentType) []const u8 {
103 return switch (self) {
104 .string => "a string",
105 .identifier => "an identifier",
106 .int, .alignment => "an integer constant",
107 .nullptr_t => "nullptr",
108 .float => "a floating point number",
109 .complex_float => "a complex floating point number",
110 .expression => "an expression",
111 };
112 }
113};
114
11588/// number of required arguments
11689pub fn requiredArgCount(attr: Tag) u32 {
11790 switch (attr) {
......@@ -211,21 +184,20 @@ pub fn wantsIdentEnum(attr: Tag) bool {
211184 }
212185}
213186
214pub fn diagnoseIdent(attr: Tag, arguments: *Arguments, ident: []const u8) ?Diagnostics.Message {
187pub fn diagnoseIdent(attr: Tag, arguments: *Arguments, ident: TokenIndex, p: *Parser) !bool {
215188 switch (attr) {
216189 inline else => |tag| {
217190 const fields = @typeInfo(@field(attributes, @tagName(tag))).@"struct".fields;
218191 if (fields.len == 0) unreachable;
219192 const Unwrapped = UnwrapOptional(fields[0].type);
220193 if (@typeInfo(Unwrapped) != .@"enum") unreachable;
221 if (std.meta.stringToEnum(Unwrapped, normalize(ident))) |enum_val| {
194 if (std.meta.stringToEnum(Unwrapped, normalize(p.tokSlice(ident)))) |enum_val| {
222195 @field(@field(arguments, @tagName(tag)), fields[0].name) = enum_val;
223 return null;
196 return false;
224197 }
225 return Diagnostics.Message{
226 .tag = .unknown_attr_enum,
227 .extra = .{ .attr_enum = .{ .tag = attr } },
228 };
198
199 try p.err(ident, .unknown_attr_enum, .{ @tagName(attr), Formatting.choices(attr) });
200 return true;
229201 },
230202 }
231203}
......@@ -244,7 +216,7 @@ pub fn wantsAlignment(attr: Tag, idx: usize) bool {
244216 }
245217}
246218
247pub fn diagnoseAlignment(attr: Tag, arguments: *Arguments, arg_idx: u32, res: Parser.Result, p: *Parser) !?Diagnostics.Message {
219pub fn diagnoseAlignment(attr: Tag, arguments: *Arguments, arg_idx: u32, res: Parser.Result, arg_start: TokenIndex, p: *Parser) !bool {
248220 switch (attr) {
249221 inline else => |tag| {
250222 const arg_fields = @typeInfo(@field(attributes, @tagName(tag))).@"struct".fields;
......@@ -254,17 +226,25 @@ pub fn diagnoseAlignment(attr: Tag, arguments: *Arguments, arg_idx: u32, res: Pa
254226 inline 0...arg_fields.len - 1 => |arg_i| {
255227 if (UnwrapOptional(arg_fields[arg_i].type) != Alignment) unreachable;
256228
257 if (!res.val.is(.int, p.comp)) return Diagnostics.Message{ .tag = .alignas_unavailable };
229 if (!res.val.is(.int, p.comp)) {
230 try p.err(arg_start, .alignas_unavailable, .{});
231 return true;
232 }
258233 if (res.val.compare(.lt, Value.zero, p.comp)) {
259 return Diagnostics.Message{ .tag = .negative_alignment, .extra = .{ .str = try res.str(p) } };
234 try p.err(arg_start, .negative_alignment, .{res});
235 return true;
260236 }
261237 const requested = res.val.toInt(u29, p.comp) orelse {
262 return Diagnostics.Message{ .tag = .maximum_alignment, .extra = .{ .str = try res.str(p) } };
238 try p.err(arg_start, .maximum_alignment, .{res});
239 return true;
263240 };
264 if (!std.mem.isValidAlign(requested)) return Diagnostics.Message{ .tag = .non_pow2_align };
241 if (!std.mem.isValidAlign(requested)) {
242 try p.err(arg_start, .non_pow2_align, .{});
243 return true;
244 }
265245
266 @field(@field(arguments, @tagName(tag)), arg_fields[arg_i].name) = Alignment{ .requested = requested };
267 return null;
246 @field(@field(arguments, @tagName(tag)), arg_fields[arg_i].name) = .{ .requested = requested };
247 return false;
268248 },
269249 else => unreachable,
270250 }
......@@ -278,102 +258,105 @@ fn diagnoseField(
278258 comptime Wanted: type,
279259 arguments: *Arguments,
280260 res: Parser.Result,
261 arg_start: TokenIndex,
281262 node: Tree.Node,
282263 p: *Parser,
283) !?Diagnostics.Message {
264) !bool {
265 const string = "a string";
266 const identifier = "an identifier";
267 const int = "an integer constant";
268 const alignment = "an integer constant";
269 const nullptr_t = "nullptr";
270 const float = "a floating point number";
271 const complex_float = "a complex floating point number";
272 const expression = "an expression";
273
274 const expected: []const u8 = switch (Wanted) {
275 Value => string,
276 Identifier => identifier,
277 u32 => int,
278 Alignment => alignment,
279 CallingConvention => identifier,
280 else => switch (@typeInfo(Wanted)) {
281 .@"enum" => if (Wanted.opts.enum_kind == .string) string else identifier,
282 else => unreachable,
283 },
284 };
285
284286 if (res.val.opt_ref == .none) {
285 if (Wanted == Identifier and node.tag == .decl_ref_expr) {
286 @field(@field(arguments, decl.name), field.name) = Identifier{ .tok = node.data.decl_ref };
287 return null;
287 if (Wanted == Identifier and node == .decl_ref_expr) {
288 @field(@field(arguments, decl.name), field.name) = .{ .tok = node.decl_ref_expr.name_tok };
289 return false;
288290 }
289 return invalidArgMsg(Wanted, .expression);
291
292 try p.err(arg_start, .attribute_arg_invalid, .{ expected, expression });
293 return true;
290294 }
291295 const key = p.comp.interner.get(res.val.ref());
292296 switch (key) {
293297 .int => {
294298 if (@typeInfo(Wanted) == .int) {
295 @field(@field(arguments, decl.name), field.name) = res.val.toInt(Wanted, p.comp) orelse return .{
296 .tag = .attribute_int_out_of_range,
297 .extra = .{ .str = try res.str(p) },
299 @field(@field(arguments, decl.name), field.name) = res.val.toInt(Wanted, p.comp) orelse {
300 try p.err(arg_start, .attribute_int_out_of_range, .{res});
301 return true;
298302 };
299 return null;
303
304 return false;
300305 }
301306 },
302307 .bytes => |bytes| {
303308 if (Wanted == Value) {
304 if (node.tag != .string_literal_expr or (!node.ty.elemType().is(.char) and !node.ty.elemType().is(.uchar))) {
305 return .{
306 .tag = .attribute_requires_string,
307 .extra = .{ .str = decl.name },
308 };
309 validate: {
310 if (node != .string_literal_expr) break :validate;
311 switch (node.string_literal_expr.qt.childType(p.comp).get(p.comp, .int).?) {
312 .char, .uchar, .schar => {},
313 else => break :validate,
314 }
315 @field(@field(arguments, decl.name), field.name) = try p.removeNull(res.val);
316 return false;
309317 }
310 @field(@field(arguments, decl.name), field.name) = try p.removeNull(res.val);
311 return null;
318
319 try p.err(arg_start, .attribute_requires_string, .{decl.name});
320 return true;
312321 } else if (@typeInfo(Wanted) == .@"enum" and @hasDecl(Wanted, "opts") and Wanted.opts.enum_kind == .string) {
313322 const str = bytes[0 .. bytes.len - 1];
314323 if (std.meta.stringToEnum(Wanted, str)) |enum_val| {
315324 @field(@field(arguments, decl.name), field.name) = enum_val;
316 return null;
317 } else {
318 return .{
319 .tag = .unknown_attr_enum,
320 .extra = .{ .attr_enum = .{ .tag = std.meta.stringToEnum(Tag, decl.name).? } },
321 };
325 return false;
322326 }
327
328 try p.err(arg_start, .unknown_attr_enum, .{ decl.name, Formatting.choices(@field(Tag, decl.name)) });
329 return true;
323330 }
324331 },
325332 else => {},
326333 }
327 return invalidArgMsg(Wanted, switch (key) {
328 .int => .int,
329 .bytes => .string,
330 .float => .float,
331 .complex => .complex_float,
332 .null => .nullptr_t,
333 .int_ty,
334 .float_ty,
335 .complex_ty,
336 .ptr_ty,
337 .noreturn_ty,
338 .void_ty,
339 .func_ty,
340 .array_ty,
341 .vector_ty,
342 .record_ty,
343 => unreachable,
344 });
345}
346334
347fn invalidArgMsg(comptime Expected: type, actual: ArgumentType) Diagnostics.Message {
348 return .{
349 .tag = .attribute_arg_invalid,
350 .extra = .{ .attr_arg_type = .{ .expected = switch (Expected) {
351 Value => .string,
352 Identifier => .identifier,
353 u32 => .int,
354 Alignment => .alignment,
355 CallingConvention => .identifier,
356 else => switch (@typeInfo(Expected)) {
357 .@"enum" => if (Expected.opts.enum_kind == .string) .string else .identifier,
358 else => unreachable,
359 },
360 }, .actual = actual } },
361 };
335 try p.err(arg_start, .attribute_arg_invalid, .{ expected, switch (key) {
336 .int => int,
337 .bytes => string,
338 .float => float,
339 .complex => complex_float,
340 .null => nullptr_t,
341 else => unreachable,
342 } });
343 return true;
362344}
363345
364pub fn diagnose(attr: Tag, arguments: *Arguments, arg_idx: u32, res: Parser.Result, node: Tree.Node, p: *Parser) !?Diagnostics.Message {
346pub fn diagnose(attr: Tag, arguments: *Arguments, arg_idx: u32, res: Parser.Result, arg_start: TokenIndex, node: Tree.Node, p: *Parser) !bool {
365347 switch (attr) {
366348 inline else => |tag| {
367349 const decl = @typeInfo(attributes).@"struct".decls[@intFromEnum(tag)];
368350 const max_arg_count = comptime maxArgCount(tag);
369 if (arg_idx >= max_arg_count) return Diagnostics.Message{
370 .tag = .attribute_too_many_args,
371 .extra = .{ .attr_arg_count = .{ .attribute = attr, .expected = max_arg_count } },
372 };
351 if (arg_idx >= max_arg_count) {
352 try p.err(arg_start, .attribute_too_many_args, .{ @tagName(attr), max_arg_count });
353 return true;
354 }
355
373356 const arg_fields = @typeInfo(@field(attributes, decl.name)).@"struct".fields;
374357 switch (arg_idx) {
375358 inline 0...arg_fields.len - 1 => |arg_i| {
376 return diagnoseField(decl, arg_fields[arg_i], UnwrapOptional(arg_fields[arg_i].type), arguments, res, node, p);
359 return diagnoseField(decl, arg_fields[arg_i], UnwrapOptional(arg_fields[arg_i].type), arguments, res, arg_start, node, p);
377360 },
378361 else => unreachable,
379362 }
......@@ -386,8 +369,8 @@ const EnumTypes = enum {
386369 identifier,
387370};
388371pub const Alignment = struct {
389 node: NodeIndex = .none,
390 requested: u29,
372 node: Tree.Node.OptIndex = .null,
373 requested: u32,
391374};
392375pub const Identifier = struct {
393376 tok: TokenIndex = 0,
......@@ -556,6 +539,7 @@ const attributes = struct {
556539 pub const nonstring = struct {};
557540 pub const noplt = struct {};
558541 pub const @"noreturn" = struct {};
542 pub const nothrow = struct {};
559543 // TODO: union args ?
560544 // const optimize = struct {
561545 // // optimize, // u32 | []const u8 -- optimize?
......@@ -697,6 +681,39 @@ const attributes = struct {
697681 pub const calling_convention = struct {
698682 cc: CallingConvention,
699683 };
684 pub const nullability = struct {
685 kind: enum {
686 nonnull,
687 nullable,
688 nullable_result,
689 unspecified,
690
691 const opts = struct {
692 const enum_kind = .identifier;
693 };
694 },
695 };
696 pub const unaligned = struct {};
697 pub const pcs = struct {
698 kind: enum {
699 aapcs,
700 @"aapcs-vfp",
701
702 const opts = struct {
703 const enum_kind = .string;
704 };
705 },
706 };
707 pub const riscv_vector_cc = struct {};
708 pub const aarch64_sve_pcs = struct {};
709 pub const aarch64_vector_pcs = struct {};
710 pub const fastcall = struct {};
711 pub const stdcall = struct {};
712 pub const vectorcall = struct {};
713 pub const cdecl = struct {};
714 pub const thiscall = struct {};
715 pub const sysv_abi = struct {};
716 pub const ms_abi = struct {};
700717};
701718
702719pub const Tag = std.meta.DeclEnum(attributes);
......@@ -786,108 +803,120 @@ fn ignoredAttrErr(p: *Parser, tok: TokenIndex, attr: Attribute.Tag, context: []c
786803}
787804
788805pub const applyParameterAttributes = applyVariableAttributes;
789pub fn applyVariableAttributes(p: *Parser, ty: Type, attr_buf_start: usize, tag: ?Diagnostics.Tag) !Type {
806pub fn applyVariableAttributes(p: *Parser, qt: QualType, attr_buf_start: usize, diagnostic: ?Parser.Diagnostic) !QualType {
790807 const attrs = p.attr_buf.items(.attr)[attr_buf_start..];
791808 const toks = p.attr_buf.items(.tok)[attr_buf_start..];
792809 p.attr_application_buf.items.len = 0;
793 var base_ty = ty;
810 var base_qt = qt;
794811 var common = false;
795812 var nocommon = false;
796813 for (attrs, toks) |attr, tok| switch (attr.tag) {
797814 // zig fmt: off
798815 .alias, .may_alias, .deprecated, .unavailable, .unused, .warn_if_not_aligned, .weak, .used,
799 .noinit, .retain, .persistent, .section, .mode, .asm_label,
816 .noinit, .retain, .persistent, .section, .mode, .asm_label, .nullability, .unaligned,
800817 => try p.attr_application_buf.append(p.gpa, attr),
801818 // zig fmt: on
802819 .common => if (nocommon) {
803 try p.errTok(.ignore_common, tok);
820 try p.err(tok, .ignore_common, .{});
804821 } else {
805822 try p.attr_application_buf.append(p.gpa, attr);
806823 common = true;
807824 },
808825 .nocommon => if (common) {
809 try p.errTok(.ignore_nocommon, tok);
826 try p.err(tok, .ignore_nocommon, .{});
810827 } else {
811828 try p.attr_application_buf.append(p.gpa, attr);
812829 nocommon = true;
813830 },
814 .vector_size => try attr.applyVectorSize(p, tok, &base_ty),
815 .aligned => try attr.applyAligned(p, base_ty, tag),
816 .nonstring => if (!base_ty.isArray() or !(base_ty.is(.char) or base_ty.is(.uchar) or base_ty.is(.schar))) {
817 try p.errStr(.non_string_ignored, tok, try p.typeStr(ty));
818 } else {
819 try p.attr_application_buf.append(p.gpa, attr);
831 .vector_size => try attr.applyVectorSize(p, tok, &base_qt),
832 .aligned => try attr.applyAligned(p, base_qt, diagnostic),
833 .nonstring => {
834 if (base_qt.get(p.comp, .array)) |array_ty| {
835 if (array_ty.elem.get(p.comp, .int)) |int_ty| switch (int_ty) {
836 .char, .uchar, .schar => {
837 try p.attr_application_buf.append(p.gpa, attr);
838 continue;
839 },
840 else => {},
841 };
842 }
843 try p.err(tok, .non_string_ignored, .{qt});
820844 },
821 .uninitialized => if (p.func.ty == null) {
822 try p.errStr(.local_variable_attribute, tok, "uninitialized");
845 .uninitialized => if (p.func.qt == null) {
846 try p.err(tok, .local_variable_attribute, .{"uninitialized"});
823847 } else {
824848 try p.attr_application_buf.append(p.gpa, attr);
825849 },
826 .cleanup => if (p.func.ty == null) {
827 try p.errStr(.local_variable_attribute, tok, "cleanup");
850 .cleanup => if (p.func.qt == null) {
851 try p.err(tok, .local_variable_attribute, .{"cleanup"});
828852 } else {
829853 try p.attr_application_buf.append(p.gpa, attr);
830854 },
855 .calling_convention => try applyCallingConvention(attr, p, tok, base_qt),
831856 .alloc_size,
832857 .copy,
833858 .tls_model,
834859 .visibility,
835 => |t| try p.errExtra(.attribute_todo, tok, .{ .attribute_todo = .{ .tag = t, .kind = .variables } }),
860 => |t| try p.err(tok, .attribute_todo, .{ @tagName(t), "variables" }),
861 // There is already an error in Parser for _Noreturn keyword
862 .noreturn => if (attr.syntax != .keyword) try ignoredAttrErr(p, tok, attr.tag, "variables"),
836863 else => try ignoredAttrErr(p, tok, attr.tag, "variables"),
837864 };
838 return base_ty.withAttributes(p.arena, p.attr_application_buf.items);
865 return applySelected(base_qt, p);
839866}
840867
841pub fn applyFieldAttributes(p: *Parser, field_ty: *Type, attr_buf_start: usize) ![]const Attribute {
868pub fn applyFieldAttributes(p: *Parser, field_qt: *QualType, attr_buf_start: usize) ![]const Attribute {
842869 const attrs = p.attr_buf.items(.attr)[attr_buf_start..];
843870 const toks = p.attr_buf.items(.tok)[attr_buf_start..];
844871 p.attr_application_buf.items.len = 0;
845872 for (attrs, toks) |attr, tok| switch (attr.tag) {
846873 // zig fmt: off
847 .@"packed", .may_alias, .deprecated, .unavailable, .unused, .warn_if_not_aligned, .mode, .warn_unused_result, .nodiscard,
874 .@"packed", .may_alias, .deprecated, .unavailable, .unused, .warn_if_not_aligned,
875 .mode, .warn_unused_result, .nodiscard, .nullability, .unaligned,
848876 => try p.attr_application_buf.append(p.gpa, attr),
849877 // zig fmt: on
850 .vector_size => try attr.applyVectorSize(p, tok, field_ty),
851 .aligned => try attr.applyAligned(p, field_ty.*, null),
878 .vector_size => try attr.applyVectorSize(p, tok, field_qt),
879 .aligned => try attr.applyAligned(p, field_qt.*, null),
880 .calling_convention => try applyCallingConvention(attr, p, tok, field_qt.*),
852881 else => try ignoredAttrErr(p, tok, attr.tag, "fields"),
853882 };
854 if (p.attr_application_buf.items.len == 0) return &[0]Attribute{};
855 return p.arena.dupe(Attribute, p.attr_application_buf.items);
883 return p.attr_application_buf.items;
856884}
857885
858pub fn applyTypeAttributes(p: *Parser, ty: Type, attr_buf_start: usize, tag: ?Diagnostics.Tag) !Type {
886pub fn applyTypeAttributes(p: *Parser, qt: QualType, attr_buf_start: usize, diagnostic: ?Parser.Diagnostic) !QualType {
859887 const attrs = p.attr_buf.items(.attr)[attr_buf_start..];
860888 const toks = p.attr_buf.items(.tok)[attr_buf_start..];
861889 p.attr_application_buf.items.len = 0;
862 var base_ty = ty;
890 var base_qt = qt;
863891 for (attrs, toks) |attr, tok| switch (attr.tag) {
864892 // zig fmt: off
865 .@"packed", .may_alias, .deprecated, .unavailable, .unused, .warn_if_not_aligned, .mode,
893 .@"packed", .may_alias, .deprecated, .unavailable, .unused, .warn_if_not_aligned, .mode, .nullability, .unaligned,
866894 => try p.attr_application_buf.append(p.gpa, attr),
867895 // zig fmt: on
868 .transparent_union => try attr.applyTransparentUnion(p, tok, base_ty),
869 .vector_size => try attr.applyVectorSize(p, tok, &base_ty),
870 .aligned => try attr.applyAligned(p, base_ty, tag),
871 .designated_init => if (base_ty.is(.@"struct")) {
896 .transparent_union => try attr.applyTransparentUnion(p, tok, base_qt),
897 .vector_size => try attr.applyVectorSize(p, tok, &base_qt),
898 .aligned => try attr.applyAligned(p, base_qt, diagnostic),
899 .designated_init => if (base_qt.is(p.comp, .@"struct")) {
872900 try p.attr_application_buf.append(p.gpa, attr);
873901 } else {
874 try p.errTok(.designated_init_invalid, tok);
902 try p.err(tok, .designated_init_invalid, .{});
875903 },
904 .calling_convention => try applyCallingConvention(attr, p, tok, base_qt),
876905 .alloc_size,
877906 .copy,
878907 .scalar_storage_order,
879908 .nonstring,
880 => |t| try p.errExtra(.attribute_todo, tok, .{ .attribute_todo = .{ .tag = t, .kind = .types } }),
909 => |t| try p.err(tok, .attribute_todo, .{ @tagName(t), "types" }),
881910 else => try ignoredAttrErr(p, tok, attr.tag, "types"),
882911 };
883 return base_ty.withAttributes(p.arena, p.attr_application_buf.items);
912 return applySelected(base_qt, p);
884913}
885914
886pub fn applyFunctionAttributes(p: *Parser, ty: Type, attr_buf_start: usize) !Type {
915pub fn applyFunctionAttributes(p: *Parser, qt: QualType, attr_buf_start: usize) !QualType {
887916 const attrs = p.attr_buf.items(.attr)[attr_buf_start..];
888917 const toks = p.attr_buf.items(.tok)[attr_buf_start..];
889918 p.attr_application_buf.items.len = 0;
890 var base_ty = ty;
919 var base_qt = qt;
891920 var hot = false;
892921 var cold = false;
893922 var @"noinline" = false;
......@@ -897,55 +926,153 @@ pub fn applyFunctionAttributes(p: *Parser, ty: Type, attr_buf_start: usize) !Typ
897926 .noreturn, .unused, .used, .warning, .deprecated, .unavailable, .weak, .pure, .leaf,
898927 .@"const", .warn_unused_result, .section, .returns_nonnull, .returns_twice, .@"error",
899928 .externally_visible, .retain, .flatten, .gnu_inline, .alias, .asm_label, .nodiscard,
900 .reproducible, .unsequenced,
929 .reproducible, .unsequenced, .nothrow, .nullability, .unaligned,
901930 => try p.attr_application_buf.append(p.gpa, attr),
902931 // zig fmt: on
903932 .hot => if (cold) {
904 try p.errTok(.ignore_hot, tok);
933 try p.err(tok, .ignore_hot, .{});
905934 } else {
906935 try p.attr_application_buf.append(p.gpa, attr);
907936 hot = true;
908937 },
909938 .cold => if (hot) {
910 try p.errTok(.ignore_cold, tok);
939 try p.err(tok, .ignore_cold, .{});
911940 } else {
912941 try p.attr_application_buf.append(p.gpa, attr);
913942 cold = true;
914943 },
915944 .always_inline => if (@"noinline") {
916 try p.errTok(.ignore_always_inline, tok);
945 try p.err(tok, .ignore_always_inline, .{});
917946 } else {
918947 try p.attr_application_buf.append(p.gpa, attr);
919948 always_inline = true;
920949 },
921950 .@"noinline" => if (always_inline) {
922 try p.errTok(.ignore_noinline, tok);
951 try p.err(tok, .ignore_noinline, .{});
923952 } else {
924953 try p.attr_application_buf.append(p.gpa, attr);
925954 @"noinline" = true;
926955 },
927 .aligned => try attr.applyAligned(p, base_ty, null),
928 .format => try attr.applyFormat(p, base_ty),
929 .calling_convention => switch (attr.args.calling_convention.cc) {
930 .C => continue,
931 .stdcall, .thiscall => switch (p.comp.target.cpu.arch) {
932 .x86 => try p.attr_application_buf.append(p.gpa, attr),
933 else => try p.errStr(.callconv_not_supported, tok, p.tok_ids[tok].lexeme().?),
934 },
935 .vectorcall => switch (p.comp.target.cpu.arch) {
936 .x86, .aarch64, .aarch64_be => try p.attr_application_buf.append(p.gpa, attr),
937 else => try p.errStr(.callconv_not_supported, tok, p.tok_ids[tok].lexeme().?),
938 },
956 .aligned => try attr.applyAligned(p, base_qt, null),
957 .format => try attr.applyFormat(p, base_qt),
958 .calling_convention => try applyCallingConvention(attr, p, tok, base_qt),
959 .fastcall => if (p.comp.target.cpu.arch == .x86) {
960 try p.attr_application_buf.append(p.gpa, .{
961 .tag = .calling_convention,
962 .args = .{ .calling_convention = .{ .cc = .fastcall } },
963 .syntax = attr.syntax,
964 });
965 } else {
966 try p.err(tok, .callconv_not_supported, .{"fastcall"});
967 },
968 .stdcall => if (p.comp.target.cpu.arch == .x86) {
969 try p.attr_application_buf.append(p.gpa, .{
970 .tag = .calling_convention,
971 .args = .{ .calling_convention = .{ .cc = .stdcall } },
972 .syntax = attr.syntax,
973 });
974 } else {
975 try p.err(tok, .callconv_not_supported, .{"stdcall"});
976 },
977 .thiscall => if (p.comp.target.cpu.arch == .x86) {
978 try p.attr_application_buf.append(p.gpa, .{
979 .tag = .calling_convention,
980 .args = .{ .calling_convention = .{ .cc = .thiscall } },
981 .syntax = attr.syntax,
982 });
983 } else {
984 try p.err(tok, .callconv_not_supported, .{"thiscall"});
985 },
986 .vectorcall => if (p.comp.target.cpu.arch == .x86 or p.comp.target.cpu.arch.isAARCH64()) {
987 try p.attr_application_buf.append(p.gpa, .{
988 .tag = .calling_convention,
989 .args = .{ .calling_convention = .{ .cc = .vectorcall } },
990 .syntax = attr.syntax,
991 });
992 } else {
993 try p.err(tok, .callconv_not_supported, .{"vectorcall"});
994 },
995 .cdecl => {},
996 .pcs => if (p.comp.target.cpu.arch.isArm()) {
997 try p.attr_application_buf.append(p.gpa, .{
998 .tag = .calling_convention,
999 .args = .{ .calling_convention = .{ .cc = switch (attr.args.pcs.kind) {
1000 .aapcs => .arm_aapcs,
1001 .@"aapcs-vfp" => .arm_aapcs_vfp,
1002 } } },
1003 .syntax = attr.syntax,
1004 });
1005 } else {
1006 try p.err(tok, .callconv_not_supported, .{"pcs"});
1007 },
1008 .riscv_vector_cc => if (p.comp.target.cpu.arch.isRISCV()) {
1009 try p.attr_application_buf.append(p.gpa, .{
1010 .tag = .calling_convention,
1011 .args = .{ .calling_convention = .{ .cc = .riscv_vector } },
1012 .syntax = attr.syntax,
1013 });
1014 } else {
1015 try p.err(tok, .callconv_not_supported, .{"pcs"});
1016 },
1017 .aarch64_sve_pcs => if (p.comp.target.cpu.arch.isAARCH64()) {
1018 try p.attr_application_buf.append(p.gpa, .{
1019 .tag = .calling_convention,
1020 .args = .{ .calling_convention = .{ .cc = .aarch64_sve_pcs } },
1021 .syntax = attr.syntax,
1022 });
1023 } else {
1024 try p.err(tok, .callconv_not_supported, .{"pcs"});
1025 },
1026 .aarch64_vector_pcs => if (p.comp.target.cpu.arch.isAARCH64()) {
1027 try p.attr_application_buf.append(p.gpa, .{
1028 .tag = .calling_convention,
1029 .args = .{ .calling_convention = .{ .cc = .aarch64_vector_pcs } },
1030 .syntax = attr.syntax,
1031 });
1032 } else {
1033 try p.err(tok, .callconv_not_supported, .{"pcs"});
1034 },
1035 .sysv_abi => if (p.comp.target.cpu.arch == .x86_64 and p.comp.target.os.tag == .windows) {
1036 try p.attr_application_buf.append(p.gpa, .{
1037 .tag = .calling_convention,
1038 .args = .{ .calling_convention = .{ .cc = .x86_64_sysv } },
1039 .syntax = attr.syntax,
1040 });
1041 },
1042 .ms_abi => if (p.comp.target.cpu.arch == .x86_64 and p.comp.target.os.tag != .windows) {
1043 try p.attr_application_buf.append(p.gpa, .{
1044 .tag = .calling_convention,
1045 .args = .{ .calling_convention = .{ .cc = .x86_64_win } },
1046 .syntax = attr.syntax,
1047 });
9391048 },
9401049 .malloc => {
941 if (base_ty.returnType().isPtr()) {
1050 if (base_qt.get(p.comp, .func).?.return_type.isPointer(p.comp)) {
9421051 try p.attr_application_buf.append(p.gpa, attr);
9431052 } else {
9441053 try ignoredAttrErr(p, tok, attr.tag, "functions that do not return pointers");
9451054 }
9461055 },
1056 .alloc_align => {
1057 const func_ty = base_qt.get(p.comp, .func).?;
1058 if (func_ty.return_type.isPointer(p.comp)) {
1059 if (attr.args.alloc_align.position == 0 or attr.args.alloc_align.position > func_ty.params.len) {
1060 try p.err(tok, .attribute_param_out_of_bounds, .{ "alloc_align", 1 });
1061 } else {
1062 const arg_qt = func_ty.params[attr.args.alloc_align.position - 1].qt;
1063 if (arg_qt.isInvalid()) continue;
1064 const arg_sk = arg_qt.scalarKind(p.comp);
1065 if (!arg_sk.isInt() or !arg_sk.isReal()) {
1066 try p.err(tok, .alloc_align_required_int_param, .{});
1067 } else {
1068 try p.attr_application_buf.append(p.gpa, attr);
1069 }
1070 }
1071 } else {
1072 try p.err(tok, .alloc_align_requires_ptr_return, .{});
1073 }
1074 },
9471075 .access,
948 .alloc_align,
9491076 .alloc_size,
9501077 .artificial,
9511078 .assume_aligned,
......@@ -984,13 +1111,13 @@ pub fn applyFunctionAttributes(p: *Parser, ty: Type, attr_buf_start: usize) !Typ
9841111 .visibility,
9851112 .weakref,
9861113 .zero_call_used_regs,
987 => |t| try p.errExtra(.attribute_todo, tok, .{ .attribute_todo = .{ .tag = t, .kind = .functions } }),
1114 => |t| try p.err(tok, .attribute_todo, .{ @tagName(t), "functions" }),
9881115 else => try ignoredAttrErr(p, tok, attr.tag, "functions"),
9891116 };
990 return ty.withAttributes(p.arena, p.attr_application_buf.items);
1117 return applySelected(qt, p);
9911118}
9921119
993pub fn applyLabelAttributes(p: *Parser, ty: Type, attr_buf_start: usize) !Type {
1120pub fn applyLabelAttributes(p: *Parser, attr_buf_start: usize) !QualType {
9941121 const attrs = p.attr_buf.items(.attr)[attr_buf_start..];
9951122 const toks = p.attr_buf.items(.tok)[attr_buf_start..];
9961123 p.attr_application_buf.items.len = 0;
......@@ -999,41 +1126,48 @@ pub fn applyLabelAttributes(p: *Parser, ty: Type, attr_buf_start: usize) !Type {
9991126 for (attrs, toks) |attr, tok| switch (attr.tag) {
10001127 .unused => try p.attr_application_buf.append(p.gpa, attr),
10011128 .hot => if (cold) {
1002 try p.errTok(.ignore_hot, tok);
1129 try p.err(tok, .ignore_hot, .{});
10031130 } else {
10041131 try p.attr_application_buf.append(p.gpa, attr);
10051132 hot = true;
10061133 },
10071134 .cold => if (hot) {
1008 try p.errTok(.ignore_cold, tok);
1135 try p.err(tok, .ignore_cold, .{});
10091136 } else {
10101137 try p.attr_application_buf.append(p.gpa, attr);
10111138 cold = true;
10121139 },
10131140 else => try ignoredAttrErr(p, tok, attr.tag, "labels"),
10141141 };
1015 return ty.withAttributes(p.arena, p.attr_application_buf.items);
1142 return applySelected(.void, p);
10161143}
10171144
1018pub fn applyStatementAttributes(p: *Parser, ty: Type, expr_start: TokenIndex, attr_buf_start: usize) !Type {
1145pub fn applyStatementAttributes(p: *Parser, expr_start: TokenIndex, attr_buf_start: usize) !QualType {
10191146 const attrs = p.attr_buf.items(.attr)[attr_buf_start..];
10201147 const toks = p.attr_buf.items(.tok)[attr_buf_start..];
10211148 p.attr_application_buf.items.len = 0;
10221149 for (attrs, toks) |attr, tok| switch (attr.tag) {
1023 .fallthrough => if (p.tok_ids[p.tok_i] != .keyword_case and p.tok_ids[p.tok_i] != .keyword_default) {
1024 // TODO: this condition is not completely correct; the last statement of a compound
1025 // statement is also valid if it precedes a switch label (so intervening '}' are ok,
1026 // but only if they close a compound statement)
1027 try p.errTok(.invalid_fallthrough, expr_start);
1028 } else {
1029 try p.attr_application_buf.append(p.gpa, attr);
1150 .fallthrough => {
1151 for (p.tok_ids[p.tok_i..]) |tok_id| {
1152 switch (tok_id) {
1153 .keyword_case, .keyword_default, .eof => {
1154 try p.attr_application_buf.append(p.gpa, attr);
1155 break;
1156 },
1157 .r_brace => {},
1158 else => {
1159 try p.err(expr_start, .invalid_fallthrough, .{});
1160 break;
1161 },
1162 }
1163 }
10301164 },
1031 else => try p.errStr(.cannot_apply_attribute_to_statement, tok, @tagName(attr.tag)),
1165 else => try p.err(tok, .cannot_apply_attribute_to_statement, .{@tagName(attr.tag)}),
10321166 };
1033 return ty.withAttributes(p.arena, p.attr_application_buf.items);
1167 return applySelected(.void, p);
10341168}
10351169
1036pub fn applyEnumeratorAttributes(p: *Parser, ty: Type, attr_buf_start: usize) !Type {
1170pub fn applyEnumeratorAttributes(p: *Parser, qt: QualType, attr_buf_start: usize) !QualType {
10371171 const attrs = p.attr_buf.items(.attr)[attr_buf_start..];
10381172 const toks = p.attr_buf.items(.tok)[attr_buf_start..];
10391173 p.attr_application_buf.items.len = 0;
......@@ -1041,80 +1175,118 @@ pub fn applyEnumeratorAttributes(p: *Parser, ty: Type, attr_buf_start: usize) !T
10411175 .deprecated, .unavailable => try p.attr_application_buf.append(p.gpa, attr),
10421176 else => try ignoredAttrErr(p, tok, attr.tag, "enums"),
10431177 };
1044 return ty.withAttributes(p.arena, p.attr_application_buf.items);
1178 return applySelected(qt, p);
10451179}
10461180
1047fn applyAligned(attr: Attribute, p: *Parser, ty: Type, tag: ?Diagnostics.Tag) !void {
1048 const base = ty.canonicalize(.standard);
1181fn applyAligned(attr: Attribute, p: *Parser, qt: QualType, diagnostic: ?Parser.Diagnostic) !void {
10491182 if (attr.args.aligned.alignment) |alignment| alignas: {
10501183 if (attr.syntax != .keyword) break :alignas;
10511184
10521185 const align_tok = attr.args.aligned.__name_tok;
1053 if (tag) |t| try p.errTok(t, align_tok);
1186 if (diagnostic) |d| try p.err(align_tok, d, .{});
10541187
1055 const default_align = base.alignof(p.comp);
1056 if (ty.isFunc()) {
1057 try p.errTok(.alignas_on_func, align_tok);
1188 if (qt.isInvalid()) return;
1189 const default_align = qt.base(p.comp).qt.alignof(p.comp);
1190 if (qt.is(p.comp, .func)) {
1191 try p.err(align_tok, .alignas_on_func, .{});
10581192 } else if (alignment.requested < default_align) {
1059 try p.errExtra(.minimum_alignment, align_tok, .{ .unsigned = default_align });
1193 try p.err(align_tok, .minimum_alignment, .{default_align});
10601194 }
10611195 }
10621196 try p.attr_application_buf.append(p.gpa, attr);
10631197}
10641198
1065fn applyTransparentUnion(attr: Attribute, p: *Parser, tok: TokenIndex, ty: Type) !void {
1066 const union_ty = ty.get(.@"union") orelse {
1067 return p.errTok(.transparent_union_wrong_type, tok);
1199fn applyTransparentUnion(attr: Attribute, p: *Parser, tok: TokenIndex, qt: QualType) !void {
1200 const union_ty = qt.get(p.comp, .@"union") orelse {
1201 return p.err(tok, .transparent_union_wrong_type, .{});
10681202 };
10691203 // TODO validate union defined at end
1070 if (union_ty.data.record.isIncomplete()) return;
1071 const fields = union_ty.data.record.fields;
1072 if (fields.len == 0) {
1073 return p.errTok(.transparent_union_one_field, tok);
1204 if (union_ty.layout == null) return;
1205 if (union_ty.fields.len == 0) {
1206 return p.err(tok, .transparent_union_one_field, .{});
10741207 }
1075 const first_field_size = fields[0].ty.bitSizeof(p.comp).?;
1076 for (fields[1..]) |field| {
1077 const field_size = field.ty.bitSizeof(p.comp).?;
1208 const first_field_size = union_ty.fields[0].qt.bitSizeof(p.comp);
1209 for (union_ty.fields[1..]) |field| {
1210 const field_size = field.qt.bitSizeof(p.comp);
10781211 if (field_size == first_field_size) continue;
1079 const mapper = p.comp.string_interner.getSlowTypeMapper();
1080 const str = try std.fmt.allocPrint(
1081 p.comp.diagnostics.arena.allocator(),
1082 "'{s}' ({d}",
1083 .{ mapper.lookup(field.name), field_size },
1084 );
1085 try p.errStr(.transparent_union_size, field.name_tok, str);
1086 return p.errExtra(.transparent_union_size_note, fields[0].name_tok, .{ .unsigned = first_field_size });
1212
1213 try p.err(field.name_tok, .transparent_union_size, .{ field.name.lookup(p.comp), field_size });
1214 return p.err(union_ty.fields[0].name_tok, .transparent_union_size_note, .{first_field_size});
10871215 }
10881216
10891217 try p.attr_application_buf.append(p.gpa, attr);
10901218}
10911219
1092fn applyVectorSize(attr: Attribute, p: *Parser, tok: TokenIndex, ty: *Type) !void {
1093 const base = ty.base();
1094 const is_enum = ty.is(.@"enum");
1095 if (!(ty.isInt() or ty.isFloat()) or !ty.isReal() or (is_enum and p.comp.langopts.emulate == .gcc)) {
1096 try p.errStr(.invalid_vec_elem_ty, tok, try p.typeStr(ty.*));
1220fn applyVectorSize(attr: Attribute, p: *Parser, tok: TokenIndex, qt: *QualType) !void {
1221 if (qt.isInvalid()) return;
1222 const scalar_kind = qt.scalarKind(p.comp);
1223 if (scalar_kind != .int and scalar_kind != .float) {
1224 if (qt.get(p.comp, .@"enum")) |enum_ty| {
1225 if (p.comp.langopts.emulate == .clang and enum_ty.incomplete) {
1226 return; // Clang silently ignores vector_size on incomplete enums.
1227 }
1228 }
1229 try p.err(tok, .invalid_vec_elem_ty, .{qt.*});
10971230 return error.ParsingFailed;
10981231 }
1099 if (is_enum) return;
1232 if (qt.get(p.comp, .bit_int)) |bit_int| {
1233 if (bit_int.bits < 8) {
1234 try p.err(tok, .bit_int_vec_too_small, .{});
1235 return error.ParsingFailed;
1236 } else if (!std.math.isPowerOfTwo(bit_int.bits)) {
1237 try p.err(tok, .bit_int_vec_not_pow2, .{});
1238 return error.ParsingFailed;
1239 }
1240 }
11001241
11011242 const vec_bytes = attr.args.vector_size.bytes;
1102 const ty_size = ty.sizeof(p.comp).?;
1103 if (vec_bytes % ty_size != 0) {
1104 return p.errTok(.vec_size_not_multiple, tok);
1243 const elem_size = qt.sizeof(p.comp);
1244 if (vec_bytes % elem_size != 0) {
1245 return p.err(tok, .vec_size_not_multiple, .{});
11051246 }
1106 const vec_size = vec_bytes / ty_size;
11071247
1108 const arr_ty = try p.arena.create(Type.Array);
1109 arr_ty.* = .{ .elem = ty.*, .len = vec_size };
1110 base.* = .{
1111 .specifier = .vector,
1112 .data = .{ .array = arr_ty },
1113 };
1248 qt.* = try p.comp.type_store.put(p.gpa, .{ .vector = .{
1249 .elem = qt.*,
1250 .len = @intCast(vec_bytes / elem_size),
1251 } });
11141252}
11151253
1116fn applyFormat(attr: Attribute, p: *Parser, ty: Type) !void {
1254fn applyFormat(attr: Attribute, p: *Parser, qt: QualType) !void {
11171255 // TODO validate
1118 _ = ty;
1256 _ = qt;
11191257 try p.attr_application_buf.append(p.gpa, attr);
11201258}
1259
1260fn applyCallingConvention(attr: Attribute, p: *Parser, tok: TokenIndex, qt: QualType) !void {
1261 if (!qt.is(p.comp, .func)) {
1262 return p.err(tok, .callconv_non_func, .{ p.tok_ids[tok].symbol(), qt });
1263 }
1264 switch (attr.args.calling_convention.cc) {
1265 .c => {},
1266 .stdcall, .thiscall, .fastcall, .regcall => switch (p.comp.target.cpu.arch) {
1267 .x86 => try p.attr_application_buf.append(p.gpa, attr),
1268 else => try p.err(tok, .callconv_not_supported, .{p.tok_ids[tok].symbol()}),
1269 },
1270 .vectorcall => switch (p.comp.target.cpu.arch) {
1271 .x86, .aarch64, .aarch64_be => try p.attr_application_buf.append(p.gpa, attr),
1272 else => try p.err(tok, .callconv_not_supported, .{p.tok_ids[tok].symbol()}),
1273 },
1274 .riscv_vector,
1275 .aarch64_sve_pcs,
1276 .aarch64_vector_pcs,
1277 .arm_aapcs,
1278 .arm_aapcs_vfp,
1279 .x86_64_sysv,
1280 .x86_64_win,
1281 => unreachable, // These can't come from keyword syntax
1282 }
1283}
1284
1285fn applySelected(qt: QualType, p: *Parser) !QualType {
1286 if (p.attr_application_buf.items.len == 0) return qt;
1287 if (qt.isInvalid()) return qt;
1288 return (try p.comp.type_store.put(p.gpa, .{ .attributed = .{
1289 .base = qt,
1290 .attributes = p.attr_application_buf.items,
1291 } })).withQualifiers(qt);
1292}
lib/compiler/aro/aro/Attribute/names.zig+890-810
......@@ -1,5 +1,4 @@
11//! Autogenerated by GenerateDef from src/aro/Attribute/names.def, do not edit
2// zig fmt: off
32
43const std = @import("std");
54
......@@ -11,7 +10,122 @@ properties: Properties,
1110
1211/// Integer starting at 0 derived from the unique index,
1312/// corresponds with the data array index.
14pub const Tag = enum(u16) { _ };
13pub const Tag = enum(u16) { aarch64_sve_pcs,
14 aarch64_vector_pcs,
15 access,
16 alias,
17 @"align",
18 aligned,
19 alloc_align,
20 alloc_size,
21 allocate,
22 allocator,
23 always_inline,
24 appdomain,
25 artificial,
26 assume_aligned,
27 cdecl,
28 cleanup,
29 code_seg,
30 cold,
31 common,
32 @"const",
33 constructor,
34 copy,
35 deprecated,
36 designated_init,
37 destructor,
38 dllexport,
39 dllimport,
40 @"error",
41 externally_visible,
42 fallthrough,
43 fastcall,
44 flatten,
45 format,
46 format_arg,
47 gnu_inline,
48 hot,
49 ifunc,
50 interrupt,
51 interrupt_handler,
52 jitintrinsic,
53 leaf,
54 malloc,
55 may_alias,
56 maybe_unused,
57 mode,
58 ms_abi,
59 naked,
60 no_address_safety_analysis,
61 no_icf,
62 no_instrument_function,
63 no_profile_instrument_function,
64 no_reorder,
65 no_sanitize,
66 no_sanitize_address,
67 no_sanitize_coverage,
68 no_sanitize_thread,
69 no_sanitize_undefined,
70 no_split_stack,
71 no_stack_limit,
72 no_stack_protector,
73 @"noalias",
74 noclone,
75 nocommon,
76 nodiscard,
77 noinit,
78 @"noinline",
79 noipa,
80 nonstring,
81 noplt,
82 @"noreturn",
83 nothrow,
84 @"packed",
85 patchable_function_entry,
86 pcs,
87 persistent,
88 process,
89 pure,
90 reproducible,
91 restrict,
92 retain,
93 returns_nonnull,
94 returns_twice,
95 riscv_vector_cc,
96 safebuffers,
97 scalar_storage_order,
98 section,
99 selectany,
100 sentinel,
101 simd,
102 spectre,
103 stack_protect,
104 stdcall,
105 symver,
106 sysv_abi,
107 target,
108 target_clones,
109 thiscall,
110 thread,
111 tls_model,
112 transparent_union,
113 unavailable,
114 uninitialized,
115 unsequenced,
116 unused,
117 used,
118 uuid,
119 vector_size,
120 vectorcall,
121 visibility,
122 warn_if_not_aligned,
123 warn_unused_result,
124 warning,
125 weak,
126 weakref,
127 zero_call_used_regs,
128};
15129
16130const Self = @This();
17131
......@@ -69,7 +183,7 @@ pub const longest_name = 30;
69183/// If found, returns the index of the node within the `dafsa` array.
70184/// Otherwise, returns `null`.
71185pub fn findInList(first_child_index: u16, char: u8) ?u16 {
72 @setEvalBranchQuota(206);
186 @setEvalBranchQuota(230);
73187 var index = first_child_index;
74188 while (true) {
75189 if (dafsa[index].char == char) return index;
......@@ -117,7 +231,7 @@ pub fn nameFromUniqueIndex(index: u16, buf: []u8) []u8 {
117231
118232 var node_index: u16 = 0;
119233 var count: u16 = index;
120 var w: std.Io.Writer = .fixed(buf);
234 var w = std.Io.Writer.fixed(buf);
121235
122236 while (true) {
123237 var sibling_index = dafsa[node_index].child_index;
......@@ -164,837 +278,803 @@ const Node = packed struct(u32) {
164278
165279const dafsa = [_]Node{
166280 .{ .char = 0, .end_of_word = false, .end_of_list = true, .number = 0, .child_index = 1 },
167 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 21 },
168 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 7, .child_index = 26 },
169 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 28 },
170 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 30 },
171 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 32 },
172 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 35 },
173 .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 36 },
174 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 37 },
175 .{ .char = 'j', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 39 },
176 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 40 },
177 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 41 },
178 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 24, .child_index = 43 },
179 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 45 },
180 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 49 },
181 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 50 },
182 .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 57 },
183 .{ .char = 'u', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 61 },
184 .{ .char = 'v', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 64 },
185 .{ .char = 'w', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 66 },
186 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 68 },
187 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 69 },
188 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 70 },
189 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 73 },
190 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 74 },
191 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 75 },
192 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 76 },
193 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 77 },
194 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 82 },
195 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 84 },
196 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 85 },
197 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 86 },
198 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 87 },
199 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 88 },
200 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 89 },
201 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 90 },
202 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 91 },
203 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 92 },
204 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 93 },
205 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 94 },
206 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 95 },
207 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 96 },
208 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 98 },
209 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 99 },
210 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 23, .child_index = 100 },
211 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 108 },
212 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 110 },
213 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 111 },
214 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 112 },
215 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 113 },
216 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 116 },
217 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 117 },
218 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 118 },
219 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 121 },
220 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 122 },
221 .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 123 },
222 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 124 },
223 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 125 },
224 .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 126 },
225 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 127 },
226 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 128 },
227 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 129 },
228 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 133 },
229 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 134 },
230 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 135 },
231 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 136 },
232 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 137 },
233 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 138 },
234 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 139 },
235 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 140 },
236 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 141 },
237 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 143 },
238 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 144 },
239 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 145 },
240 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 146 },
241 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 147 },
242 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 148 },
243 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 149 },
244 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 150 },
245 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 151 },
246 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 152 },
247 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 153 },
248 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 154 },
249 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 155 },
250 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 157 },
251 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 159 },
252 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 160 },
253 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 161 },
254 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 162 },
255 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 163 },
256 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 164 },
281 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 14, .child_index = 21 },
282 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 27 },
283 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 30 },
284 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 32 },
285 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 34 },
286 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 37 },
287 .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 38 },
288 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 39 },
289 .{ .char = 'j', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 41 },
290 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 42 },
291 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 43 },
292 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 25, .child_index = 46 },
293 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 48 },
294 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 53 },
295 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 11, .child_index = 55 },
296 .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 62 },
297 .{ .char = 'u', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 66 },
298 .{ .char = 'v', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 69 },
299 .{ .char = 'w', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 71 },
300 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 73 },
301 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 74 },
302 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 75 },
303 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 76 },
304 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 79 },
305 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 80 },
306 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 81 },
307 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 82 },
308 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 83 },
309 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 84 },
310 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 89 },
311 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 91 },
312 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 92 },
313 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 93 },
314 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 94 },
315 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 96 },
316 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 97 },
317 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 98 },
318 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 99 },
319 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 100 },
320 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 101 },
321 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 102 },
322 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 103 },
323 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 104 },
324 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 106 },
325 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 107 },
326 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 108 },
327 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 24, .child_index = 109 },
328 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 118 },
329 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 120 },
330 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 121 },
331 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 122 },
332 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 123 },
333 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 124 },
334 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 127 },
335 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 128 },
336 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 129 },
337 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 130 },
338 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 133 },
339 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 134 },
340 .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 135 },
341 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 137 },
342 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 139 },
343 .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 140 },
344 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 142 },
345 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 143 },
346 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 144 },
347 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 148 },
348 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 149 },
349 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 150 },
350 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 151 },
351 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 152 },
352 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 153 },
353 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 154 },
354 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 155 },
355 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 156 },
356 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 157 },
357 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 159 },
358 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 160 },
359 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 161 },
360 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 162 },
361 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 163 },
362 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 164 },
363 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 165 },
364 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 166 },
365 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 167 },
366 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 168 },
367 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 169 },
368 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 170 },
369 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 171 },
370 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 172 },
371 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 174 },
372 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 176 },
373 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 177 },
374 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 178 },
375 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 179 },
376 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 180 },
377 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 181 },
378 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 182 },
257379 .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
258 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 165 },
259 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 166 },
260 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 167 },
261 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 168 },
262 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 169 },
263 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 170 },
264 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 172 },
265 .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 133 },
266 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 13, .child_index = 173 },
267 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 178 },
268 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 179 },
269 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 181 },
270 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 182 },
271 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 184 },
272 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 185 },
273 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 186 },
274 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 99 },
275 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 187 },
276 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 188 },
277 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 69 },
278 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 172 },
279 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 189 },
280 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 190 },
281 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 191 },
282 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 193 },
283 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 194 },
284 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 195 },
285 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 196 },
286 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 197 },
287 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 150 },
288 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 198 },
289 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 199 },
290 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 200 },
291 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 201 },
292 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 202 },
293 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 203 },
294 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 204 },
295 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 205 },
296 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 206 },
297 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 207 },
298 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 208 },
299 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 150 },
300 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 150 },
301 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 209 },
302 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 210 },
303 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 211 },
304 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 212 },
305 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 213 },
306 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 214 },
307 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 215 },
308 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 216 },
309 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 217 },
310 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 218 },
311 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 219 },
312 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 220 },
313 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 221 },
314 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 222 },
315 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 223 },
380 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 183 },
381 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 184 },
382 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 185 },
383 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 186 },
384 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 187 },
385 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 188 },
386 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 190 },
387 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 191 },
388 .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 148 },
389 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 13, .child_index = 192 },
390 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 197 },
391 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 198 },
392 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 200 },
393 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 201 },
394 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 203 },
395 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 204 },
396 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 205 },
397 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 206 },
398 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 108 },
399 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 207 },
400 .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
401 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 208 },
402 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 75 },
403 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 190 },
404 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 209 },
405 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 210 },
406 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 211 },
407 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 213 },
408 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 214 },
409 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 215 },
410 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 216 },
411 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 217 },
412 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 218 },
413 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 167 },
414 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 219 },
415 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 220 },
416 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 221 },
417 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 222 },
418 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 223 },
419 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 224 },
420 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 225 },
421 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 226 },
422 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 227 },
423 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 228 },
424 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 229 },
425 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 230 },
426 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 231 },
427 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 232 },
428 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 167 },
429 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 167 },
430 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 233 },
431 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 234 },
432 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 235 },
433 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 236 },
434 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 237 },
435 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 238 },
436 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 239 },
437 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 120 },
438 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 240 },
439 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 241 },
440 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 242 },
441 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 243 },
442 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 244 },
443 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 245 },
444 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 246 },
445 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 247 },
446 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 248 },
316447 .{ .char = 'd', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
317 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 224 },
318 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 225 },
448 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 249 },
449 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 250 },
319450 .{ .char = 'y', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
320 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 226 },
321 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 227 },
322 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 228 },
323 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 229 },
324 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 230 },
325 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 231 },
326 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 232 },
327 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 233 },
328 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 234 },
329 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 235 },
330 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 236 },
331 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 237 },
332 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 238 },
333 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 239 },
451 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 251 },
452 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 252 },
453 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 253 },
454 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 254 },
455 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 255 },
456 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 256 },
457 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 257 },
458 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 258 },
459 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 221 },
460 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 259 },
461 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 260 },
462 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 261 },
463 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 262 },
464 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 263 },
465 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 264 },
334466 .{ .char = 'f', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
335 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 240 },
336 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 241 },
337 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 242 },
467 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 265 },
468 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 266 },
469 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 267 },
338470 .{ .char = 'e', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
339 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 243 },
340 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 244 },
341 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 246 },
342 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 247 },
343 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 248 },
344 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 251 },
345 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 252 },
346 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 253 },
347 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 254 },
348 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 255 },
349 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 257 },
350 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 258 },
351 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 91 },
352 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 259 },
353 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 260 },
354 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 261 },
355 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 262 },
356 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 263 },
357 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 264 },
358 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 265 },
359 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 266 },
360 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 267 },
361 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 268 },
362 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 269 },
363 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 270 },
364 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 271 },
365 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 272 },
366 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 273 },
367 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 274 },
368 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 275 },
369 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 276 },
370 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 277 },
371 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 278 },
372 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 279 },
373 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 280 },
374 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 133 },
375 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 281 },
376 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 282 },
377 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 283 },
378 .{ .char = 'k', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 285 },
379 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 286 },
380 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 215 },
381 .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
382 .{ .char = 'n', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 287 },
383 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 288 },
384 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 290 },
385 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 291 },
386 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 292 },
387 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 293 },
388 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 294 },
389 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 295 },
390 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 296 },
391 .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 297 },
392 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 298 },
393 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 299 },
394 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 300 },
395 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 301 },
396 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 301 },
397 .{ .char = 'r', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
398 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 302 },
399 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 303 },
400 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 304 },
401 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 305 },
402 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 306 },
403 .{ .char = 'c', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
404 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 307 },
471 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 268 },
472 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 269 },
473 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 270 },
474 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 272 },
475 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 273 },
476 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 274 },
477 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 277 },
478 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 278 },
479 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 279 },
480 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 280 },
481 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 281 },
482 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 283 },
483 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 284 },
484 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 99 },
485 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 285 },
486 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 286 },
487 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 287 },
488 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 288 },
489 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 289 },
490 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 290 },
491 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 291 },
492 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 292 },
493 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 293 },
494 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 294 },
495 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 295 },
496 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 296 },
497 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 297 },
498 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 298 },
499 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 299 },
500 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 300 },
501 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 301 },
502 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 302 },
503 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 107 },
504 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 303 },
505 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 221 },
506 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 304 },
507 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 305 },
508 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 306 },
509 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 307 },
405510 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 308 },
406 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 237 },
407 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 178 },
408511 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 309 },
409 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 310 },
410 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 168 },
411 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 311 },
412 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 312 },
413 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 313 },
414 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 314 },
415 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 315 },
416 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 316 },
417 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 317 },
418 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 318 },
419 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 151 },
420 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 319 },
421 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 91 },
422 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 320 },
423 .{ .char = 'a', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
424 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 321 },
425 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 322 },
426 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 323 },
427 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 324 },
428 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 325 },
429 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 326 },
430 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 296 },
431 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 327 },
432 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 328 },
433 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 329 },
434 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 224 },
435 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 330 },
436 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 331 },
437 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 112 },
438 .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 332 },
439 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 231 },
440 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 333 },
441 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 150 },
442 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 334 },
443 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 335 },
444 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 336 },
445 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 337 },
446 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 338 },
447 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 339 },
512 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 148 },
513 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 310 },
514 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 311 },
515 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 312 },
516 .{ .char = 'k', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 314 },
517 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 315 },
518 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 316 },
519 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 120 },
520 .{ .char = 'n', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 317 },
521 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 318 },
522 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 320 },
523 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 321 },
524 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 322 },
525 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 323 },
526 .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
527 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 324 },
528 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 325 },
529 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 326 },
530 .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 327 },
531 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 328 },
532 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 329 },
533 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 330 },
534 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 331 },
535 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 331 },
536 .{ .char = 'r', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
537 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 332 },
538 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 333 },
539 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 334 },
540 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 335 },
541 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 336 },
542 .{ .char = 'c', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
543 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 337 },
544 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 338 },
545 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 262 },
546 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 197 },
547 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 339 },
448548 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 340 },
449 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 341 },
450 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 343 },
451 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 344 },
452 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 345 },
453 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 150 },
454 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 346 },
455 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 348 },
456 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 164 },
457 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 349 },
458 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 350 },
459 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 351 },
460 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 352 },
461 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 353 },
549 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 341 },
550 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 186 },
551 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 342 },
552 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 343 },
553 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 344 },
554 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 345 },
555 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 346 },
556 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 347 },
557 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 348 },
558 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 349 },
559 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 168 },
560 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 350 },
561 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 99 },
562 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 351 },
563 .{ .char = 'a', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
564 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 352 },
565 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 353 },
566 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 354 },
567 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 355 },
568 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 356 },
569 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 357 },
570 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 358 },
571 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 326 },
572 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 359 },
573 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 360 },
574 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 361 },
575 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 362 },
576 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 249 },
577 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 363 },
578 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 364 },
579 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 123 },
580 .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 365 },
581 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 366 },
582 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 256 },
583 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 367 },
584 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 167 },
585 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 368 },
586 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 369 },
587 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 370 },
588 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 371 },
589 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 372 },
590 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 373 },
591 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 374 },
592 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 375 },
593 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 377 },
594 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 378 },
595 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 379 },
596 .{ .char = '6', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 380 },
597 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 167 },
598 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 381 },
599 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 383 },
600 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 182 },
601 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 384 },
602 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 385 },
603 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 386 },
604 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 387 },
605 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 388 },
462606 .{ .char = 'n', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
463 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 300 },
464 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 354 },
465 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 355 },
466 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 356 },
467 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 357 },
468 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 358 },
469 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 359 },
470 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 296 },
471 .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 360 },
472 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 361 },
473 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 362 },
474 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 363 },
475 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 364 },
476 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 365 },
477 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 366 },
478 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 367 },
479 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 368 },
480 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 369 },
481 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 370 },
482 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 371 },
483 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 215 },
484 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 172 },
485 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 372 },
486 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 318 },
487 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 373 },
488 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 374 },
489 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 375 },
490 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 376 },
491 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 377 },
492 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 378 },
493 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 379 },
494 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 380 },
495 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 381 },
496 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 382 },
497 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 383 },
498 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 384 },
499 .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 385 },
500 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 386 },
501 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 387 },
502 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 388 },
503 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 389 },
504 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 390 },
505 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 391 },
506 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 392 },
507 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 393 },
508 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 394 },
509 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 395 },
510 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 168 },
511 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 396 },
512 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 397 },
513 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 398 },
514 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 399 },
515 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 264 },
516 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 401 },
517 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 402 },
518 .{ .char = 'p', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
519 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 395 },
520 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 403 },
521 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 404 },
522 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 405 },
523 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 406 },
524 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 407 },
607 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 330 },
608 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 389 },
609 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 390 },
610 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 391 },
611 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 392 },
612 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 393 },
613 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 394 },
614 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 326 },
615 .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 395 },
616 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 396 },
617 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 397 },
618 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 398 },
619 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 399 },
620 .{ .char = 'i', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
621 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 400 },
622 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 401 },
623 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 402 },
624 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 403 },
625 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 404 },
626 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 405 },
627 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 406 },
628 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 120 },
629 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 190 },
630 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 407 },
631 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 349 },
525632 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 408 },
526 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 409 },
527 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 320 },
528 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 410 },
529 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 411 },
530 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 412 },
531 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 413 },
532 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 414 },
533 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 415 },
534 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 416 },
535 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 417 },
536 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 418 },
537 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 419 },
538 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 420 },
539 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 343 },
540 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 296 },
541 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 421 },
542 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 422 },
543 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 423 },
544 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 91 },
545 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 424 },
546 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 425 },
547 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 426 },
548 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 427 },
549 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 428 },
550 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 429 },
551 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 430 },
552 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 383 },
553 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 431 },
554 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 432 },
555 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 433 },
556 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 434 },
557 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 435 },
558 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 436 },
559 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 437 },
560 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 438 },
561 .{ .char = 'g', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
562 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 439 },
563 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 440 },
564 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 441 },
565 .{ .char = 'e', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
566 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 231 },
567 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 442 },
633 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 409 },
634 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 410 },
635 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 411 },
636 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 412 },
637 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 413 },
638 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 414 },
639 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 415 },
640 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 416 },
641 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 417 },
642 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 418 },
643 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 419 },
644 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 420 },
645 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 421 },
646 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 246 },
647 .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 422 },
648 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 423 },
649 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 424 },
650 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 425 },
651 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 426 },
652 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 427 },
653 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 428 },
654 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 430 },
655 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 431 },
656 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 432 },
657 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 433 },
658 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 186 },
659 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 434 },
660 .{ .char = '4', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 435 },
661 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 436 },
662 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 437 },
663 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 438 },
664 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 291 },
665 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 440 },
666 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 441 },
667 .{ .char = 'p', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
668 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 433 },
669 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 442 },
568670 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 443 },
569 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 133 },
570 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 444 },
571 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 159 },
572 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 91 },
573 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 445 },
574 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 446 },
575 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 447 },
576 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 448 },
577 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 449 },
578 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 450 },
579 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 451 },
671 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 444 },
672 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 445 },
673 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 446 },
674 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 447 },
675 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 448 },
676 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 351 },
677 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 449 },
678 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 450 },
679 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 451 },
580680 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 452 },
581 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 453 },
582 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 273 },
583 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 454 },
584 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 455 },
585 .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 456 },
586 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 150 },
587 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 457 },
588 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 458 },
589 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 459 },
590 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 460 },
591 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 462 },
592 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 463 },
593 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 153 },
594 .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
595 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 464 },
596 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 465 },
597 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 466 },
681 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 453 },
682 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 454 },
683 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 455 },
684 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 456 },
685 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 457 },
686 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 458 },
687 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 459 },
688 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 377 },
689 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 326 },
690 .{ .char = 'w', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
691 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 460 },
692 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 461 },
693 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 462 },
694 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 99 },
695 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 463 },
696 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 464 },
697 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 465 },
698 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 466 },
598699 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 467 },
599 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 468 },
600 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 469 },
601 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 398 },
602 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 470 },
603 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 471 },
604 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 472 },
605 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 473 },
606 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 474 },
607 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 172 },
608 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 428 },
700 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 246 },
701 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 468 },
702 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 469 },
703 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 420 },
704 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 470 },
705 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 471 },
706 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 472 },
707 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 473 },
708 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 474 },
709 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 301 },
609710 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 475 },
610 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 476 },
611 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 477 },
612 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 478 },
613 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 395 },
614 .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 479 },
615 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 480 },
616 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 208 },
617 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 481 },
618 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 482 },
619 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 483 },
620 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 484 },
621 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 485 },
622 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 486 },
623 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 488 },
624 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 91 },
625 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 467 },
626 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 489 },
627 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 490 },
628 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 491 },
629 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 492 },
630 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 493 },
631 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 494 },
632 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 495 },
633 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 496 },
634 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 497 },
635 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 133 },
636 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 153 },
637 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 498 },
638 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 499 },
639 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 500 },
640 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 296 },
641 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 501 },
642 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 502 },
643 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 503 },
644 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 504 },
645 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 505 },
646 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 506 },
647 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 507 },
648 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 508 },
649 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 509 },
650 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 510 },
651 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 511 },
652 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 512 },
653 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 513 },
654 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 514 },
655 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 515 },
656 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 516 },
657 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 215 },
658 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 517 },
659 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 518 },
660 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 519 },
661 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 520 },
662 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 172 },
663 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 521 },
664 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 522 },
665 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 523 },
666 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 524 },
667 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 525 },
668 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 526 },
669 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 527 },
670 .{ .char = 'h', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
671 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 528 },
672 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 237 },
711 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 476 },
712 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 477 },
713 .{ .char = 'g', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
714 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 478 },
715 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 479 },
716 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 481 },
717 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 482 },
718 .{ .char = 'e', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
719 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 256 },
720 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 483 },
721 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 484 },
722 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 148 },
723 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 485 },
724 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 176 },
725 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 99 },
726 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 486 },
727 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 487 },
728 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 488 },
729 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 489 },
730 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 490 },
731 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 491 },
732 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 492 },
733 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 493 },
734 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 494 },
735 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 302 },
736 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 495 },
737 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 496 },
738 .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 497 },
739 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 167 },
740 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 498 },
741 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 499 },
742 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 500 },
743 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 501 },
744 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 503 },
745 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 504 },
746 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 505 },
747 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 170 },
748 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 506 },
749 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 507 },
750 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 508 },
751 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 509 },
752 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 510 },
753 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 511 },
754 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 437 },
755 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 512 },
756 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 513 },
757 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 514 },
758 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 515 },
759 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 516 },
760 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 517 },
761 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 518 },
762 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 190 },
763 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 246 },
764 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 519 },
765 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 520 },
766 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 521 },
767 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 522 },
768 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 433 },
769 .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 523 },
770 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 524 },
771 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 232 },
772 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 525 },
773 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 526 },
774 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 527 },
775 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 528 },
673776 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 529 },
674 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 530 },
675 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 531 },
676 .{ .char = 'e', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 532 },
677 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 533 },
678 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 534 },
679 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 535 },
680 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 536 },
681 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 537 },
682 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 538 },
683 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 539 },
684 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 378 },
685 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 540 },
686 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 541 },
687 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 133 },
688 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 351 },
689 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 542 },
690 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 543 },
691 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 133 },
692 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 544 },
693 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 545 },
694 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 546 },
695 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 547 },
696 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 548 },
697 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 549 },
698 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 550 },
699 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 554 },
777 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 530 },
778 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 532 },
779 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 99 },
780 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 509 },
781 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 533 },
782 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 534 },
783 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 535 },
784 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 536 },
785 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 537 },
786 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 538 },
787 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 539 },
788 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 540 },
789 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 541 },
790 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 542 },
791 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 148 },
792 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 170 },
793 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 543 },
794 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 544 },
795 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 545 },
796 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 546 },
797 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 547 },
798 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 326 },
799 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 548 },
800 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 549 },
801 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 550 },
802 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 551 },
803 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 552 },
804 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 553 },
805 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 554 },
700806 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 555 },
701 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 556 },
702 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 557 },
703 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 558 },
704 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 172 },
705 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 559 },
706 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 215 },
707 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 560 },
807 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 556 },
808 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 557 },
809 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 558 },
810 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 559 },
811 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 560 },
708812 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 561 },
709 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 562 },
710 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 555 },
711 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 563 },
712 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 564 },
713 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 565 },
813 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 562 },
814 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 563 },
815 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 564 },
816 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 120 },
817 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 565 },
714818 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 566 },
715 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 311 },
716 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 567 },
717 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 568 },
718 .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 569 },
719 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 570 },
720 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 571 },
721 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 91 },
722 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 572 },
723 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 573 },
724 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 574 },
819 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 567 },
820 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 568 },
821 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 190 },
822 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 569 },
823 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 570 },
824 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 571 },
825 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 572 },
826 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 573 },
827 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 574 },
725828 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 575 },
726 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 576 },
727 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 577 },
728 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 578 },
729 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 459 },
730 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 579 },
731 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 580 },
829 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 576 },
830 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 577 },
831 .{ .char = 'h', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
832 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 578 },
833 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 262 },
834 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 579 },
835 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 580 },
732836 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 581 },
733 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 582 },
734 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 583 },
735 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 126 },
736 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 584 },
737 .{ .char = 'k', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
738 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 356 },
739 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 585 },
740 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 428 },
741 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 586 },
742 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 268 },
743 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 587 },
744 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 588 },
745 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 273 },
746 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 589 },
747 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 590 },
748 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 591 },
749 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 592 },
837 .{ .char = 'e', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 582 },
838 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 583 },
839 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 584 },
840 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 585 },
841 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 586 },
842 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 587 },
843 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 588 },
844 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 589 },
845 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 590 },
846 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 414 },
847 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 591 },
848 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 592 },
849 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 148 },
850 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 386 },
750851 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 593 },
751 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 594 },
752 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 313 },
753 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 595 },
754 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 596 },
755 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 597 },
756 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 598 },
757 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 140 },
758 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 599 },
759 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 600 },
760 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 601 },
761 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 185 },
762 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 602 },
763 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 603 },
764 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 604 },
765 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 605 },
766 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 606 },
767 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 607 },
768 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 608 },
769 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 609 },
770 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 195 },
771 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 610 },
772 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 525 },
852 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 594 },
853 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 595 },
854 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 596 },
855 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 148 },
856 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 597 },
857 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 598 },
858 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 599 },
859 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 600 },
860 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 601 },
861 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 602 },
862 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 603 },
863 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 607 },
864 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 608 },
865 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 609 },
866 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 610 },
773867 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 611 },
774 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 215 },
775 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 612 },
776 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 172 },
777 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 613 },
778 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 614 },
779 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 615 },
780 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 616 },
781 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 617 },
782 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 618 },
783 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 619 },
784 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 620 },
785 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 153 },
786 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 621 },
787 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 215 },
868 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 190 },
869 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 612 },
870 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 613 },
871 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 120 },
872 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 614 },
873 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 615 },
874 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 616 },
875 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 617 },
876 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 618 },
877 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 608 },
878 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 619 },
879 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 620 },
880 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 621 },
881 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 622 },
882 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 342 },
883 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 623 },
884 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 624 },
885 .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 625 },
886 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 626 },
887 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 627 },
888 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 99 },
889 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 628 },
890 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 629 },
891 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 366 },
892 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 630 },
893 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 631 },
894 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 632 },
895 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 633 },
896 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 634 },
897 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 120 },
898 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 573 },
899 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 500 },
900 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 635 },
901 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 636 },
902 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 637 },
903 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 638 },
904 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 639 },
905 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 640 },
906 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 641 },
907 .{ .char = 'k', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
908 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 391 },
909 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 642 },
910 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 262 },
911 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 643 },
912 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 296 },
913 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 644 },
914 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 645 },
915 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 302 },
916 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 646 },
917 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 647 },
918 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 648 },
919 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 649 },
920 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 226 },
921 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 650 },
922 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 651 },
923 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 344 },
924 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 652 },
925 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 653 },
926 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 654 },
927 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 655 },
928 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 156 },
929 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 656 },
930 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 657 },
931 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 658 },
932 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 204 },
933 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 659 },
934 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 660 },
935 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 661 },
936 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 662 },
937 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 663 },
938 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 664 },
939 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 665 },
940 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 666 },
941 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 216 },
942 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 667 },
943 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 575 },
944 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 668 },
945 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 120 },
946 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 669 },
947 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 190 },
948 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 670 },
949 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 671 },
950 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 672 },
951 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 673 },
952 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 674 },
953 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 675 },
954 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 676 },
955 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 677 },
956 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 170 },
957 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 678 },
958 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 120 },
788959};
789960pub const data = blk: {
790 @setEvalBranchQuota(721);
961 @setEvalBranchQuota(805);
791962 break :blk [_]@This(){
792 // access
793 .{ .tag = @enumFromInt(0), .properties = .{ .tag = .access, .gnu = true } },
794 // alias
795 .{ .tag = @enumFromInt(1), .properties = .{ .tag = .alias, .gnu = true } },
796 // align
797 .{ .tag = @enumFromInt(2), .properties = .{ .tag = .aligned, .declspec = true } },
798 // aligned
799 .{ .tag = @enumFromInt(3), .properties = .{ .tag = .aligned, .gnu = true } },
800 // alloc_align
801 .{ .tag = @enumFromInt(4), .properties = .{ .tag = .alloc_align, .gnu = true } },
802 // alloc_size
803 .{ .tag = @enumFromInt(5), .properties = .{ .tag = .alloc_size, .gnu = true } },
804 // allocate
805 .{ .tag = @enumFromInt(6), .properties = .{ .tag = .allocate, .declspec = true } },
806 // allocator
807 .{ .tag = @enumFromInt(7), .properties = .{ .tag = .allocator, .declspec = true } },
808 // always_inline
809 .{ .tag = @enumFromInt(8), .properties = .{ .tag = .always_inline, .gnu = true } },
810 // appdomain
811 .{ .tag = @enumFromInt(9), .properties = .{ .tag = .appdomain, .declspec = true } },
812 // artificial
813 .{ .tag = @enumFromInt(10), .properties = .{ .tag = .artificial, .gnu = true } },
814 // assume_aligned
815 .{ .tag = @enumFromInt(11), .properties = .{ .tag = .assume_aligned, .gnu = true } },
816 // cleanup
817 .{ .tag = @enumFromInt(12), .properties = .{ .tag = .cleanup, .gnu = true } },
818 // code_seg
819 .{ .tag = @enumFromInt(13), .properties = .{ .tag = .code_seg, .declspec = true } },
820 // cold
821 .{ .tag = @enumFromInt(14), .properties = .{ .tag = .cold, .gnu = true } },
822 // common
823 .{ .tag = @enumFromInt(15), .properties = .{ .tag = .common, .gnu = true } },
824 // const
825 .{ .tag = @enumFromInt(16), .properties = .{ .tag = .@"const", .gnu = true } },
826 // constructor
827 .{ .tag = @enumFromInt(17), .properties = .{ .tag = .constructor, .gnu = true } },
828 // copy
829 .{ .tag = @enumFromInt(18), .properties = .{ .tag = .copy, .gnu = true } },
830 // deprecated
831 .{ .tag = @enumFromInt(19), .properties = .{ .tag = .deprecated, .c23 = true, .gnu = true, .declspec = true } },
832 // designated_init
833 .{ .tag = @enumFromInt(20), .properties = .{ .tag = .designated_init, .gnu = true } },
834 // destructor
835 .{ .tag = @enumFromInt(21), .properties = .{ .tag = .destructor, .gnu = true } },
836 // dllexport
837 .{ .tag = @enumFromInt(22), .properties = .{ .tag = .dllexport, .declspec = true } },
838 // dllimport
839 .{ .tag = @enumFromInt(23), .properties = .{ .tag = .dllimport, .declspec = true } },
840 // error
841 .{ .tag = @enumFromInt(24), .properties = .{ .tag = .@"error", .gnu = true } },
842 // externally_visible
843 .{ .tag = @enumFromInt(25), .properties = .{ .tag = .externally_visible, .gnu = true } },
844 // fallthrough
845 .{ .tag = @enumFromInt(26), .properties = .{ .tag = .fallthrough, .c23 = true, .gnu = true } },
846 // flatten
847 .{ .tag = @enumFromInt(27), .properties = .{ .tag = .flatten, .gnu = true } },
848 // format
849 .{ .tag = @enumFromInt(28), .properties = .{ .tag = .format, .gnu = true } },
850 // format_arg
851 .{ .tag = @enumFromInt(29), .properties = .{ .tag = .format_arg, .gnu = true } },
852 // gnu_inline
853 .{ .tag = @enumFromInt(30), .properties = .{ .tag = .gnu_inline, .gnu = true } },
854 // hot
855 .{ .tag = @enumFromInt(31), .properties = .{ .tag = .hot, .gnu = true } },
856 // ifunc
857 .{ .tag = @enumFromInt(32), .properties = .{ .tag = .ifunc, .gnu = true } },
858 // interrupt
859 .{ .tag = @enumFromInt(33), .properties = .{ .tag = .interrupt, .gnu = true } },
860 // interrupt_handler
861 .{ .tag = @enumFromInt(34), .properties = .{ .tag = .interrupt_handler, .gnu = true } },
862 // jitintrinsic
863 .{ .tag = @enumFromInt(35), .properties = .{ .tag = .jitintrinsic, .declspec = true } },
864 // leaf
865 .{ .tag = @enumFromInt(36), .properties = .{ .tag = .leaf, .gnu = true } },
866 // malloc
867 .{ .tag = @enumFromInt(37), .properties = .{ .tag = .malloc, .gnu = true } },
868 // may_alias
869 .{ .tag = @enumFromInt(38), .properties = .{ .tag = .may_alias, .gnu = true } },
870 // maybe_unused
871 .{ .tag = @enumFromInt(39), .properties = .{ .tag = .unused, .c23 = true } },
872 // mode
873 .{ .tag = @enumFromInt(40), .properties = .{ .tag = .mode, .gnu = true } },
874 // naked
875 .{ .tag = @enumFromInt(41), .properties = .{ .tag = .naked, .declspec = true } },
876 // no_address_safety_analysis
877 .{ .tag = @enumFromInt(42), .properties = .{ .tag = .no_address_safety_analysis, .gnu = true } },
878 // no_icf
879 .{ .tag = @enumFromInt(43), .properties = .{ .tag = .no_icf, .gnu = true } },
880 // no_instrument_function
881 .{ .tag = @enumFromInt(44), .properties = .{ .tag = .no_instrument_function, .gnu = true } },
882 // no_profile_instrument_function
883 .{ .tag = @enumFromInt(45), .properties = .{ .tag = .no_profile_instrument_function, .gnu = true } },
884 // no_reorder
885 .{ .tag = @enumFromInt(46), .properties = .{ .tag = .no_reorder, .gnu = true } },
886 // no_sanitize
887 .{ .tag = @enumFromInt(47), .properties = .{ .tag = .no_sanitize, .gnu = true } },
888 // no_sanitize_address
889 .{ .tag = @enumFromInt(48), .properties = .{ .tag = .no_sanitize_address, .gnu = true, .declspec = true } },
890 // no_sanitize_coverage
891 .{ .tag = @enumFromInt(49), .properties = .{ .tag = .no_sanitize_coverage, .gnu = true } },
892 // no_sanitize_thread
893 .{ .tag = @enumFromInt(50), .properties = .{ .tag = .no_sanitize_thread, .gnu = true } },
894 // no_sanitize_undefined
895 .{ .tag = @enumFromInt(51), .properties = .{ .tag = .no_sanitize_undefined, .gnu = true } },
896 // no_split_stack
897 .{ .tag = @enumFromInt(52), .properties = .{ .tag = .no_split_stack, .gnu = true } },
898 // no_stack_limit
899 .{ .tag = @enumFromInt(53), .properties = .{ .tag = .no_stack_limit, .gnu = true } },
900 // no_stack_protector
901 .{ .tag = @enumFromInt(54), .properties = .{ .tag = .no_stack_protector, .gnu = true } },
902 // noalias
903 .{ .tag = @enumFromInt(55), .properties = .{ .tag = .@"noalias", .declspec = true } },
904 // noclone
905 .{ .tag = @enumFromInt(56), .properties = .{ .tag = .noclone, .gnu = true } },
906 // nocommon
907 .{ .tag = @enumFromInt(57), .properties = .{ .tag = .nocommon, .gnu = true } },
908 // nodiscard
909 .{ .tag = @enumFromInt(58), .properties = .{ .tag = .nodiscard, .c23 = true } },
910 // noinit
911 .{ .tag = @enumFromInt(59), .properties = .{ .tag = .noinit, .gnu = true } },
912 // noinline
913 .{ .tag = @enumFromInt(60), .properties = .{ .tag = .@"noinline", .gnu = true, .declspec = true } },
914 // noipa
915 .{ .tag = @enumFromInt(61), .properties = .{ .tag = .noipa, .gnu = true } },
916 // nonstring
917 .{ .tag = @enumFromInt(62), .properties = .{ .tag = .nonstring, .gnu = true } },
918 // noplt
919 .{ .tag = @enumFromInt(63), .properties = .{ .tag = .noplt, .gnu = true } },
920 // noreturn
921 .{ .tag = @enumFromInt(64), .properties = .{ .tag = .@"noreturn", .c23 = true, .gnu = true, .declspec = true } },
922 // packed
923 .{ .tag = @enumFromInt(65), .properties = .{ .tag = .@"packed", .gnu = true } },
924 // patchable_function_entry
925 .{ .tag = @enumFromInt(66), .properties = .{ .tag = .patchable_function_entry, .gnu = true } },
926 // persistent
927 .{ .tag = @enumFromInt(67), .properties = .{ .tag = .persistent, .gnu = true } },
928 // process
929 .{ .tag = @enumFromInt(68), .properties = .{ .tag = .process, .declspec = true } },
930 // pure
931 .{ .tag = @enumFromInt(69), .properties = .{ .tag = .pure, .gnu = true } },
932 // reproducible
933 .{ .tag = @enumFromInt(70), .properties = .{ .tag = .reproducible, .c23 = true } },
934 // restrict
935 .{ .tag = @enumFromInt(71), .properties = .{ .tag = .restrict, .declspec = true } },
936 // retain
937 .{ .tag = @enumFromInt(72), .properties = .{ .tag = .retain, .gnu = true } },
938 // returns_nonnull
939 .{ .tag = @enumFromInt(73), .properties = .{ .tag = .returns_nonnull, .gnu = true } },
940 // returns_twice
941 .{ .tag = @enumFromInt(74), .properties = .{ .tag = .returns_twice, .gnu = true } },
942 // safebuffers
943 .{ .tag = @enumFromInt(75), .properties = .{ .tag = .safebuffers, .declspec = true } },
944 // scalar_storage_order
945 .{ .tag = @enumFromInt(76), .properties = .{ .tag = .scalar_storage_order, .gnu = true } },
946 // section
947 .{ .tag = @enumFromInt(77), .properties = .{ .tag = .section, .gnu = true } },
948 // selectany
949 .{ .tag = @enumFromInt(78), .properties = .{ .tag = .selectany, .declspec = true } },
950 // sentinel
951 .{ .tag = @enumFromInt(79), .properties = .{ .tag = .sentinel, .gnu = true } },
952 // simd
953 .{ .tag = @enumFromInt(80), .properties = .{ .tag = .simd, .gnu = true } },
954 // spectre
955 .{ .tag = @enumFromInt(81), .properties = .{ .tag = .spectre, .declspec = true } },
956 // stack_protect
957 .{ .tag = @enumFromInt(82), .properties = .{ .tag = .stack_protect, .gnu = true } },
958 // symver
959 .{ .tag = @enumFromInt(83), .properties = .{ .tag = .symver, .gnu = true } },
960 // target
961 .{ .tag = @enumFromInt(84), .properties = .{ .tag = .target, .gnu = true } },
962 // target_clones
963 .{ .tag = @enumFromInt(85), .properties = .{ .tag = .target_clones, .gnu = true } },
964 // thread
965 .{ .tag = @enumFromInt(86), .properties = .{ .tag = .thread, .declspec = true } },
966 // tls_model
967 .{ .tag = @enumFromInt(87), .properties = .{ .tag = .tls_model, .gnu = true } },
968 // transparent_union
969 .{ .tag = @enumFromInt(88), .properties = .{ .tag = .transparent_union, .gnu = true } },
970 // unavailable
971 .{ .tag = @enumFromInt(89), .properties = .{ .tag = .unavailable, .gnu = true } },
972 // uninitialized
973 .{ .tag = @enumFromInt(90), .properties = .{ .tag = .uninitialized, .gnu = true } },
974 // unsequenced
975 .{ .tag = @enumFromInt(91), .properties = .{ .tag = .unsequenced, .c23 = true } },
976 // unused
977 .{ .tag = @enumFromInt(92), .properties = .{ .tag = .unused, .gnu = true } },
978 // used
979 .{ .tag = @enumFromInt(93), .properties = .{ .tag = .used, .gnu = true } },
980 // uuid
981 .{ .tag = @enumFromInt(94), .properties = .{ .tag = .uuid, .declspec = true } },
982 // vector_size
983 .{ .tag = @enumFromInt(95), .properties = .{ .tag = .vector_size, .gnu = true } },
984 // visibility
985 .{ .tag = @enumFromInt(96), .properties = .{ .tag = .visibility, .gnu = true } },
986 // warn_if_not_aligned
987 .{ .tag = @enumFromInt(97), .properties = .{ .tag = .warn_if_not_aligned, .gnu = true } },
988 // warn_unused_result
989 .{ .tag = @enumFromInt(98), .properties = .{ .tag = .warn_unused_result, .gnu = true } },
990 // warning
991 .{ .tag = @enumFromInt(99), .properties = .{ .tag = .warning, .gnu = true } },
992 // weak
993 .{ .tag = @enumFromInt(100), .properties = .{ .tag = .weak, .gnu = true } },
994 // weakref
995 .{ .tag = @enumFromInt(101), .properties = .{ .tag = .weakref, .gnu = true } },
996 // zero_call_used_regs
997 .{ .tag = @enumFromInt(102), .properties = .{ .tag = .zero_call_used_regs, .gnu = true } },
963 .{ .tag = .aarch64_sve_pcs, .properties = .{ .tag = .aarch64_sve_pcs, .gnu = true } },
964 .{ .tag = .aarch64_vector_pcs, .properties = .{ .tag = .aarch64_vector_pcs, .gnu = true } },
965 .{ .tag = .access, .properties = .{ .tag = .access, .gnu = true } },
966 .{ .tag = .alias, .properties = .{ .tag = .alias, .gnu = true } },
967 .{ .tag = .@"align", .properties = .{ .tag = .aligned, .declspec = true } },
968 .{ .tag = .aligned, .properties = .{ .tag = .aligned, .gnu = true } },
969 .{ .tag = .alloc_align, .properties = .{ .tag = .alloc_align, .gnu = true } },
970 .{ .tag = .alloc_size, .properties = .{ .tag = .alloc_size, .gnu = true } },
971 .{ .tag = .allocate, .properties = .{ .tag = .allocate, .declspec = true } },
972 .{ .tag = .allocator, .properties = .{ .tag = .allocator, .declspec = true } },
973 .{ .tag = .always_inline, .properties = .{ .tag = .always_inline, .gnu = true } },
974 .{ .tag = .appdomain, .properties = .{ .tag = .appdomain, .declspec = true } },
975 .{ .tag = .artificial, .properties = .{ .tag = .artificial, .gnu = true } },
976 .{ .tag = .assume_aligned, .properties = .{ .tag = .assume_aligned, .gnu = true } },
977 .{ .tag = .cdecl, .properties = .{ .tag = .cdecl, .gnu = true } },
978 .{ .tag = .cleanup, .properties = .{ .tag = .cleanup, .gnu = true } },
979 .{ .tag = .code_seg, .properties = .{ .tag = .code_seg, .declspec = true } },
980 .{ .tag = .cold, .properties = .{ .tag = .cold, .gnu = true } },
981 .{ .tag = .common, .properties = .{ .tag = .common, .gnu = true } },
982 .{ .tag = .@"const", .properties = .{ .tag = .@"const", .gnu = true } },
983 .{ .tag = .constructor, .properties = .{ .tag = .constructor, .gnu = true } },
984 .{ .tag = .copy, .properties = .{ .tag = .copy, .gnu = true } },
985 .{ .tag = .deprecated, .properties = .{ .tag = .deprecated, .c23 = true, .gnu = true, .declspec = true } },
986 .{ .tag = .designated_init, .properties = .{ .tag = .designated_init, .gnu = true } },
987 .{ .tag = .destructor, .properties = .{ .tag = .destructor, .gnu = true } },
988 .{ .tag = .dllexport, .properties = .{ .tag = .dllexport, .declspec = true } },
989 .{ .tag = .dllimport, .properties = .{ .tag = .dllimport, .declspec = true } },
990 .{ .tag = .@"error", .properties = .{ .tag = .@"error", .gnu = true } },
991 .{ .tag = .externally_visible, .properties = .{ .tag = .externally_visible, .gnu = true } },
992 .{ .tag = .fallthrough, .properties = .{ .tag = .fallthrough, .c23 = true, .gnu = true } },
993 .{ .tag = .fastcall, .properties = .{ .tag = .fastcall, .gnu = true } },
994 .{ .tag = .flatten, .properties = .{ .tag = .flatten, .gnu = true } },
995 .{ .tag = .format, .properties = .{ .tag = .format, .gnu = true } },
996 .{ .tag = .format_arg, .properties = .{ .tag = .format_arg, .gnu = true } },
997 .{ .tag = .gnu_inline, .properties = .{ .tag = .gnu_inline, .gnu = true } },
998 .{ .tag = .hot, .properties = .{ .tag = .hot, .gnu = true } },
999 .{ .tag = .ifunc, .properties = .{ .tag = .ifunc, .gnu = true } },
1000 .{ .tag = .interrupt, .properties = .{ .tag = .interrupt, .gnu = true } },
1001 .{ .tag = .interrupt_handler, .properties = .{ .tag = .interrupt_handler, .gnu = true } },
1002 .{ .tag = .jitintrinsic, .properties = .{ .tag = .jitintrinsic, .declspec = true } },
1003 .{ .tag = .leaf, .properties = .{ .tag = .leaf, .gnu = true } },
1004 .{ .tag = .malloc, .properties = .{ .tag = .malloc, .gnu = true } },
1005 .{ .tag = .may_alias, .properties = .{ .tag = .may_alias, .gnu = true } },
1006 .{ .tag = .maybe_unused, .properties = .{ .tag = .unused, .c23 = true } },
1007 .{ .tag = .mode, .properties = .{ .tag = .mode, .gnu = true } },
1008 .{ .tag = .ms_abi, .properties = .{ .tag = .ms_abi, .gnu = true } },
1009 .{ .tag = .naked, .properties = .{ .tag = .naked, .declspec = true } },
1010 .{ .tag = .no_address_safety_analysis, .properties = .{ .tag = .no_address_safety_analysis, .gnu = true } },
1011 .{ .tag = .no_icf, .properties = .{ .tag = .no_icf, .gnu = true } },
1012 .{ .tag = .no_instrument_function, .properties = .{ .tag = .no_instrument_function, .gnu = true } },
1013 .{ .tag = .no_profile_instrument_function, .properties = .{ .tag = .no_profile_instrument_function, .gnu = true } },
1014 .{ .tag = .no_reorder, .properties = .{ .tag = .no_reorder, .gnu = true } },
1015 .{ .tag = .no_sanitize, .properties = .{ .tag = .no_sanitize, .gnu = true } },
1016 .{ .tag = .no_sanitize_address, .properties = .{ .tag = .no_sanitize_address, .gnu = true, .declspec = true } },
1017 .{ .tag = .no_sanitize_coverage, .properties = .{ .tag = .no_sanitize_coverage, .gnu = true } },
1018 .{ .tag = .no_sanitize_thread, .properties = .{ .tag = .no_sanitize_thread, .gnu = true } },
1019 .{ .tag = .no_sanitize_undefined, .properties = .{ .tag = .no_sanitize_undefined, .gnu = true } },
1020 .{ .tag = .no_split_stack, .properties = .{ .tag = .no_split_stack, .gnu = true } },
1021 .{ .tag = .no_stack_limit, .properties = .{ .tag = .no_stack_limit, .gnu = true } },
1022 .{ .tag = .no_stack_protector, .properties = .{ .tag = .no_stack_protector, .gnu = true } },
1023 .{ .tag = .@"noalias", .properties = .{ .tag = .@"noalias", .declspec = true } },
1024 .{ .tag = .noclone, .properties = .{ .tag = .noclone, .gnu = true } },
1025 .{ .tag = .nocommon, .properties = .{ .tag = .nocommon, .gnu = true } },
1026 .{ .tag = .nodiscard, .properties = .{ .tag = .nodiscard, .c23 = true } },
1027 .{ .tag = .noinit, .properties = .{ .tag = .noinit, .gnu = true } },
1028 .{ .tag = .@"noinline", .properties = .{ .tag = .@"noinline", .gnu = true, .declspec = true } },
1029 .{ .tag = .noipa, .properties = .{ .tag = .noipa, .gnu = true } },
1030 .{ .tag = .nonstring, .properties = .{ .tag = .nonstring, .gnu = true } },
1031 .{ .tag = .noplt, .properties = .{ .tag = .noplt, .gnu = true } },
1032 .{ .tag = .@"noreturn", .properties = .{ .tag = .@"noreturn", .c23 = true, .gnu = true, .declspec = true } },
1033 .{ .tag = .nothrow, .properties = .{ .tag = .nothrow, .gnu = true } },
1034 .{ .tag = .@"packed", .properties = .{ .tag = .@"packed", .gnu = true } },
1035 .{ .tag = .patchable_function_entry, .properties = .{ .tag = .patchable_function_entry, .gnu = true } },
1036 .{ .tag = .pcs, .properties = .{ .tag = .pcs, .gnu = true } },
1037 .{ .tag = .persistent, .properties = .{ .tag = .persistent, .gnu = true } },
1038 .{ .tag = .process, .properties = .{ .tag = .process, .declspec = true } },
1039 .{ .tag = .pure, .properties = .{ .tag = .pure, .gnu = true } },
1040 .{ .tag = .reproducible, .properties = .{ .tag = .reproducible, .c23 = true } },
1041 .{ .tag = .restrict, .properties = .{ .tag = .restrict, .declspec = true } },
1042 .{ .tag = .retain, .properties = .{ .tag = .retain, .gnu = true } },
1043 .{ .tag = .returns_nonnull, .properties = .{ .tag = .returns_nonnull, .gnu = true } },
1044 .{ .tag = .returns_twice, .properties = .{ .tag = .returns_twice, .gnu = true } },
1045 .{ .tag = .riscv_vector_cc, .properties = .{ .tag = .riscv_vector_cc, .gnu = true } },
1046 .{ .tag = .safebuffers, .properties = .{ .tag = .safebuffers, .declspec = true } },
1047 .{ .tag = .scalar_storage_order, .properties = .{ .tag = .scalar_storage_order, .gnu = true } },
1048 .{ .tag = .section, .properties = .{ .tag = .section, .gnu = true } },
1049 .{ .tag = .selectany, .properties = .{ .tag = .selectany, .declspec = true } },
1050 .{ .tag = .sentinel, .properties = .{ .tag = .sentinel, .gnu = true } },
1051 .{ .tag = .simd, .properties = .{ .tag = .simd, .gnu = true } },
1052 .{ .tag = .spectre, .properties = .{ .tag = .spectre, .declspec = true } },
1053 .{ .tag = .stack_protect, .properties = .{ .tag = .stack_protect, .gnu = true } },
1054 .{ .tag = .stdcall, .properties = .{ .tag = .stdcall, .gnu = true } },
1055 .{ .tag = .symver, .properties = .{ .tag = .symver, .gnu = true } },
1056 .{ .tag = .sysv_abi, .properties = .{ .tag = .sysv_abi, .gnu = true } },
1057 .{ .tag = .target, .properties = .{ .tag = .target, .gnu = true } },
1058 .{ .tag = .target_clones, .properties = .{ .tag = .target_clones, .gnu = true } },
1059 .{ .tag = .thiscall, .properties = .{ .tag = .thiscall, .gnu = true } },
1060 .{ .tag = .thread, .properties = .{ .tag = .thread, .declspec = true } },
1061 .{ .tag = .tls_model, .properties = .{ .tag = .tls_model, .gnu = true } },
1062 .{ .tag = .transparent_union, .properties = .{ .tag = .transparent_union, .gnu = true } },
1063 .{ .tag = .unavailable, .properties = .{ .tag = .unavailable, .gnu = true } },
1064 .{ .tag = .uninitialized, .properties = .{ .tag = .uninitialized, .gnu = true } },
1065 .{ .tag = .unsequenced, .properties = .{ .tag = .unsequenced, .c23 = true } },
1066 .{ .tag = .unused, .properties = .{ .tag = .unused, .gnu = true } },
1067 .{ .tag = .used, .properties = .{ .tag = .used, .gnu = true } },
1068 .{ .tag = .uuid, .properties = .{ .tag = .uuid, .declspec = true } },
1069 .{ .tag = .vector_size, .properties = .{ .tag = .vector_size, .gnu = true } },
1070 .{ .tag = .vectorcall, .properties = .{ .tag = .vectorcall, .gnu = true } },
1071 .{ .tag = .visibility, .properties = .{ .tag = .visibility, .gnu = true } },
1072 .{ .tag = .warn_if_not_aligned, .properties = .{ .tag = .warn_if_not_aligned, .gnu = true } },
1073 .{ .tag = .warn_unused_result, .properties = .{ .tag = .warn_unused_result, .gnu = true } },
1074 .{ .tag = .warning, .properties = .{ .tag = .warning, .gnu = true } },
1075 .{ .tag = .weak, .properties = .{ .tag = .weak, .gnu = true } },
1076 .{ .tag = .weakref, .properties = .{ .tag = .weakref, .gnu = true } },
1077 .{ .tag = .zero_call_used_regs, .properties = .{ .tag = .zero_call_used_regs, .gnu = true } },
9981078 };
9991079};
10001080};
lib/compiler/aro/aro/Builtins.zig+141-150
......@@ -1,21 +1,23 @@
11const std = @import("std");
2
23const Compilation = @import("Compilation.zig");
3const Type = @import("Type.zig");
4const TypeDescription = @import("Builtins/TypeDescription.zig");
5const target_util = @import("target.zig");
6const StringId = @import("StringInterner.zig").StringId;
74const LangOpts = @import("LangOpts.zig");
85const Parser = @import("Parser.zig");
6const target_util = @import("target.zig");
7const TypeStore = @import("TypeStore.zig");
8const QualType = TypeStore.QualType;
9const Builder = TypeStore.Builder;
10const TypeDescription = @import("Builtins/TypeDescription.zig");
911
1012const Properties = @import("Builtins/Properties.zig");
1113pub const Builtin = @import("Builtins/Builtin.zig").with(Properties);
1214
1315const Expanded = struct {
14 ty: Type,
16 qt: QualType,
1517 builtin: Builtin,
1618};
1719
18const NameToTypeMap = std.StringHashMapUnmanaged(Type);
20const NameToTypeMap = std.StringHashMapUnmanaged(QualType);
1921
2022const Builtins = @This();
2123
......@@ -25,38 +27,38 @@ pub fn deinit(b: *Builtins, gpa: std.mem.Allocator) void {
2527 b._name_to_type_map.deinit(gpa);
2628}
2729
28fn specForSize(comp: *const Compilation, size_bits: u32) Type.Builder.Specifier {
29 var ty = Type{ .specifier = .short };
30 if (ty.sizeof(comp).? * 8 == size_bits) return .short;
30fn specForSize(comp: *const Compilation, size_bits: u32) TypeStore.Builder.Specifier {
31 var qt: QualType = .short;
32 if (qt.bitSizeof(comp) == size_bits) return .short;
3133
32 ty.specifier = .int;
33 if (ty.sizeof(comp).? * 8 == size_bits) return .int;
34 qt = .int;
35 if (qt.bitSizeof(comp) == size_bits) return .int;
3436
35 ty.specifier = .long;
36 if (ty.sizeof(comp).? * 8 == size_bits) return .long;
37 qt = .long;
38 if (qt.bitSizeof(comp) == size_bits) return .long;
3739
38 ty.specifier = .long_long;
39 if (ty.sizeof(comp).? * 8 == size_bits) return .long_long;
40 qt = .long_long;
41 if (qt.bitSizeof(comp) == size_bits) return .long_long;
4042
4143 unreachable;
4244}
4345
44fn createType(desc: TypeDescription, it: *TypeDescription.TypeIterator, comp: *const Compilation, allocator: std.mem.Allocator) !Type {
45 var builder: Type.Builder = .{ .error_on_invalid = true };
46fn createType(desc: TypeDescription, it: *TypeDescription.TypeIterator, comp: *Compilation) !QualType {
47 var parser: Parser = undefined;
48 parser.comp = comp;
49 var builder: TypeStore.Builder = .{ .parser = &parser, .error_on_invalid = true };
50
4651 var require_native_int32 = false;
4752 var require_native_int64 = false;
4853 for (desc.prefix) |prefix| {
4954 switch (prefix) {
50 .L => builder.combine(undefined, .long, 0) catch unreachable,
51 .LL => {
52 builder.combine(undefined, .long, 0) catch unreachable;
53 builder.combine(undefined, .long, 0) catch unreachable;
54 },
55 .L => builder.combine(.long, 0) catch unreachable,
56 .LL => builder.combine(.long_long, 0) catch unreachable,
5557 .LLL => {
56 switch (builder.specifier) {
57 .none => builder.specifier = .int128,
58 .signed => builder.specifier = .sint128,
59 .unsigned => builder.specifier = .uint128,
58 switch (builder.type) {
59 .none => builder.type = .int128,
60 .signed => builder.type = .sint128,
61 .unsigned => builder.type = .uint128,
6062 else => unreachable,
6163 }
6264 },
......@@ -65,239 +67,226 @@ fn createType(desc: TypeDescription, it: *TypeDescription.TypeIterator, comp: *c
6567 .N => {
6668 std.debug.assert(desc.spec == .i);
6769 if (!target_util.isLP64(comp.target)) {
68 builder.combine(undefined, .long, 0) catch unreachable;
70 builder.combine(.long, 0) catch unreachable;
6971 }
7072 },
7173 .O => {
72 builder.combine(undefined, .long, 0) catch unreachable;
74 builder.combine(.long, 0) catch unreachable;
7375 if (comp.target.os.tag != .opencl) {
74 builder.combine(undefined, .long, 0) catch unreachable;
76 builder.combine(.long, 0) catch unreachable;
7577 }
7678 },
77 .S => builder.combine(undefined, .signed, 0) catch unreachable,
78 .U => builder.combine(undefined, .unsigned, 0) catch unreachable,
79 .S => builder.combine(.signed, 0) catch unreachable,
80 .U => builder.combine(.unsigned, 0) catch unreachable,
7981 .I => {
8082 // Todo: compile-time constant integer
8183 },
8284 }
8385 }
8486 switch (desc.spec) {
85 .v => builder.combine(undefined, .void, 0) catch unreachable,
86 .b => builder.combine(undefined, .bool, 0) catch unreachable,
87 .c => builder.combine(undefined, .char, 0) catch unreachable,
88 .s => builder.combine(undefined, .short, 0) catch unreachable,
87 .v => builder.combine(.void, 0) catch unreachable,
88 .b => builder.combine(.bool, 0) catch unreachable,
89 .c => builder.combine(.char, 0) catch unreachable,
90 .s => builder.combine(.short, 0) catch unreachable,
8991 .i => {
9092 if (require_native_int32) {
91 builder.specifier = specForSize(comp, 32);
93 builder.type = specForSize(comp, 32);
9294 } else if (require_native_int64) {
93 builder.specifier = specForSize(comp, 64);
95 builder.type = specForSize(comp, 64);
9496 } else {
95 switch (builder.specifier) {
97 switch (builder.type) {
9698 .int128, .sint128, .uint128 => {},
97 else => builder.combine(undefined, .int, 0) catch unreachable,
99 else => builder.combine(.int, 0) catch unreachable,
98100 }
99101 }
100102 },
101 .h => builder.combine(undefined, .fp16, 0) catch unreachable,
102 .x => builder.combine(undefined, .float16, 0) catch unreachable,
103 .h => builder.combine(.fp16, 0) catch unreachable,
104 .x => builder.combine(.float16, 0) catch unreachable,
103105 .y => {
104106 // Todo: __bf16
105 return .{ .specifier = .invalid };
107 return .invalid;
106108 },
107 .f => builder.combine(undefined, .float, 0) catch unreachable,
109 .f => builder.combine(.float, 0) catch unreachable,
108110 .d => {
109 if (builder.specifier == .long_long) {
110 builder.specifier = .float128;
111 if (builder.type == .long_long) {
112 builder.type = .float128;
111113 } else {
112 builder.combine(undefined, .double, 0) catch unreachable;
114 builder.combine(.double, 0) catch unreachable;
113115 }
114116 },
115117 .z => {
116 std.debug.assert(builder.specifier == .none);
117 builder.specifier = Type.Builder.fromType(comp.types.size);
118 std.debug.assert(builder.type == .none);
119 builder.type = Builder.fromType(comp, comp.type_store.size);
118120 },
119121 .w => {
120 std.debug.assert(builder.specifier == .none);
121 builder.specifier = Type.Builder.fromType(comp.types.wchar);
122 std.debug.assert(builder.type == .none);
123 builder.type = Builder.fromType(comp, comp.type_store.wchar);
122124 },
123125 .F => {
124 std.debug.assert(builder.specifier == .none);
125 builder.specifier = Type.Builder.fromType(comp.types.ns_constant_string.ty);
126 std.debug.assert(builder.type == .none);
127 builder.type = Builder.fromType(comp, comp.type_store.ns_constant_string);
126128 },
127129 .G => {
128130 // Todo: id
129 return .{ .specifier = .invalid };
131 return .invalid;
130132 },
131133 .H => {
132134 // Todo: SEL
133 return .{ .specifier = .invalid };
135 return .invalid;
134136 },
135137 .M => {
136138 // Todo: struct objc_super
137 return .{ .specifier = .invalid };
139 return .invalid;
138140 },
139141 .a => {
140 std.debug.assert(builder.specifier == .none);
142 std.debug.assert(builder.type == .none);
141143 std.debug.assert(desc.suffix.len == 0);
142 builder.specifier = Type.Builder.fromType(comp.types.va_list);
144 builder.type = Builder.fromType(comp, comp.type_store.va_list);
143145 },
144146 .A => {
145 std.debug.assert(builder.specifier == .none);
147 std.debug.assert(builder.type == .none);
146148 std.debug.assert(desc.suffix.len == 0);
147 var va_list = comp.types.va_list;
148 if (va_list.isArray()) va_list.decayArray();
149 builder.specifier = Type.Builder.fromType(va_list);
149 var va_list = comp.type_store.va_list;
150 std.debug.assert(!va_list.is(comp, .array));
151 builder.type = Builder.fromType(comp, va_list);
150152 },
151153 .V => |element_count| {
152154 std.debug.assert(desc.suffix.len == 0);
153155 const child_desc = it.next().?;
154 const child_ty = try createType(child_desc, undefined, comp, allocator);
155 const arr_ty = try allocator.create(Type.Array);
156 arr_ty.* = .{
156 const elem_qt = try createType(child_desc, undefined, comp);
157 const vector_qt = try comp.type_store.put(comp.gpa, .{ .vector = .{
158 .elem = elem_qt,
157159 .len = element_count,
158 .elem = child_ty,
159 };
160 const vector_ty: Type = .{ .specifier = .vector, .data = .{ .array = arr_ty } };
161 builder.specifier = Type.Builder.fromType(vector_ty);
160 } });
161 builder.type = .{ .other = vector_qt };
162162 },
163163 .q => {
164164 // Todo: scalable vector
165 return .{ .specifier = .invalid };
165 return .invalid;
166166 },
167167 .E => {
168168 // Todo: ext_vector (OpenCL vector)
169 return .{ .specifier = .invalid };
169 return .invalid;
170170 },
171171 .X => |child| {
172 builder.combine(undefined, .complex, 0) catch unreachable;
172 builder.combine(.complex, 0) catch unreachable;
173173 switch (child) {
174 .float => builder.combine(undefined, .float, 0) catch unreachable,
175 .double => builder.combine(undefined, .double, 0) catch unreachable,
174 .float => builder.combine(.float, 0) catch unreachable,
175 .double => builder.combine(.double, 0) catch unreachable,
176176 .longdouble => {
177 builder.combine(undefined, .long, 0) catch unreachable;
178 builder.combine(undefined, .double, 0) catch unreachable;
177 builder.combine(.long, 0) catch unreachable;
178 builder.combine(.double, 0) catch unreachable;
179179 },
180180 }
181181 },
182182 .Y => {
183 std.debug.assert(builder.specifier == .none);
183 std.debug.assert(builder.type == .none);
184184 std.debug.assert(desc.suffix.len == 0);
185 builder.specifier = Type.Builder.fromType(comp.types.ptrdiff);
185 builder.type = Builder.fromType(comp, comp.type_store.ptrdiff);
186186 },
187187 .P => {
188 std.debug.assert(builder.specifier == .none);
189 if (comp.types.file.specifier == .invalid) {
190 return comp.types.file;
188 std.debug.assert(builder.type == .none);
189 if (comp.type_store.file.isInvalid()) {
190 return comp.type_store.file;
191191 }
192 builder.specifier = Type.Builder.fromType(comp.types.file);
192 builder.type = Builder.fromType(comp, comp.type_store.file);
193193 },
194194 .J => {
195 std.debug.assert(builder.specifier == .none);
195 std.debug.assert(builder.type == .none);
196196 std.debug.assert(desc.suffix.len == 0);
197 if (comp.types.jmp_buf.specifier == .invalid) {
198 return comp.types.jmp_buf;
197 if (comp.type_store.jmp_buf.isInvalid()) {
198 return comp.type_store.jmp_buf;
199199 }
200 builder.specifier = Type.Builder.fromType(comp.types.jmp_buf);
200 builder.type = Builder.fromType(comp, comp.type_store.jmp_buf);
201201 },
202202 .SJ => {
203 std.debug.assert(builder.specifier == .none);
203 std.debug.assert(builder.type == .none);
204204 std.debug.assert(desc.suffix.len == 0);
205 if (comp.types.sigjmp_buf.specifier == .invalid) {
206 return comp.types.sigjmp_buf;
205 if (comp.type_store.sigjmp_buf.isInvalid()) {
206 return comp.type_store.sigjmp_buf;
207207 }
208 builder.specifier = Type.Builder.fromType(comp.types.sigjmp_buf);
208 builder.type = Builder.fromType(comp, comp.type_store.sigjmp_buf);
209209 },
210210 .K => {
211 std.debug.assert(builder.specifier == .none);
212 if (comp.types.ucontext_t.specifier == .invalid) {
213 return comp.types.ucontext_t;
211 std.debug.assert(builder.type == .none);
212 if (comp.type_store.ucontext_t.isInvalid()) {
213 return comp.type_store.ucontext_t;
214214 }
215 builder.specifier = Type.Builder.fromType(comp.types.ucontext_t);
215 builder.type = Builder.fromType(comp, comp.type_store.ucontext_t);
216216 },
217217 .p => {
218 std.debug.assert(builder.specifier == .none);
218 std.debug.assert(builder.type == .none);
219219 std.debug.assert(desc.suffix.len == 0);
220 builder.specifier = Type.Builder.fromType(comp.types.pid_t);
220 builder.type = Builder.fromType(comp, comp.type_store.pid_t);
221221 },
222 .@"!" => return .{ .specifier = .invalid },
222 .@"!" => return .invalid,
223223 }
224224 for (desc.suffix) |suffix| {
225225 switch (suffix) {
226226 .@"*" => |address_space| {
227227 _ = address_space; // TODO: handle address space
228 const elem_ty = try allocator.create(Type);
229 elem_ty.* = builder.finish(undefined) catch unreachable;
230 const ty = Type{
231 .specifier = .pointer,
232 .data = .{ .sub_type = elem_ty },
233 };
234 builder.qual = .{};
235 builder.specifier = Type.Builder.fromType(ty);
228 const pointer_qt = try comp.type_store.put(comp.gpa, .{ .pointer = .{
229 .child = builder.finish() catch unreachable,
230 .decayed = null,
231 } });
232
233 builder.@"const" = null;
234 builder.@"volatile" = null;
235 builder.restrict = null;
236 builder.type = .{ .other = pointer_qt };
236237 },
237 .C => builder.qual.@"const" = 0,
238 .D => builder.qual.@"volatile" = 0,
239 .R => builder.qual.restrict = 0,
238 .C => builder.@"const" = 0,
239 .D => builder.@"volatile" = 0,
240 .R => builder.restrict = 0,
240241 }
241242 }
242 return builder.finish(undefined) catch unreachable;
243 return builder.finish() catch unreachable;
243244}
244245
245fn createBuiltin(comp: *const Compilation, builtin: Builtin, type_arena: std.mem.Allocator) !Type {
246fn createBuiltin(comp: *Compilation, builtin: Builtin) !QualType {
246247 var it = TypeDescription.TypeIterator.init(builtin.properties.param_str);
247248
248249 const ret_ty_desc = it.next().?;
249250 if (ret_ty_desc.spec == .@"!") {
250251 // Todo: handle target-dependent definition
251252 }
252 const ret_ty = try createType(ret_ty_desc, &it, comp, type_arena);
253 const ret_ty = try createType(ret_ty_desc, &it, comp);
253254 var param_count: usize = 0;
254 var params: [Builtin.max_param_count]Type.Func.Param = undefined;
255 var params: [Builtin.max_param_count]TypeStore.Type.Func.Param = undefined;
255256 while (it.next()) |desc| : (param_count += 1) {
256 params[param_count] = .{ .name_tok = 0, .ty = try createType(desc, &it, comp, type_arena), .name = .empty };
257 params[param_count] = .{ .name_tok = 0, .qt = try createType(desc, &it, comp), .name = .empty, .node = .null };
257258 }
258259
259 const duped_params = try type_arena.dupe(Type.Func.Param, params[0..param_count]);
260 const func = try type_arena.create(Type.Func);
261
262 func.* = .{
260 return comp.type_store.put(comp.gpa, .{ .func = .{
263261 .return_type = ret_ty,
264 .params = duped_params,
265 };
266 return .{
267 .specifier = if (builtin.properties.isVarArgs()) .var_args_func else .func,
268 .data = .{ .func = func },
269 };
262 .kind = if (builtin.properties.isVarArgs()) .variadic else .normal,
263 .params = params[0..param_count],
264 } });
270265}
271266
272267/// Asserts that the builtin has already been created
273268pub fn lookup(b: *const Builtins, name: []const u8) Expanded {
274269 const builtin = Builtin.fromName(name).?;
275 const ty = b._name_to_type_map.get(name).?;
276 return .{
277 .builtin = builtin,
278 .ty = ty,
279 };
270 const qt = b._name_to_type_map.get(name).?;
271 return .{ .builtin = builtin, .qt = qt };
280272}
281273
282pub fn getOrCreate(b: *Builtins, comp: *Compilation, name: []const u8, type_arena: std.mem.Allocator) !?Expanded {
283 const ty = b._name_to_type_map.get(name) orelse {
274pub fn getOrCreate(b: *Builtins, comp: *Compilation, name: []const u8) !?Expanded {
275 const qt = b._name_to_type_map.get(name) orelse {
284276 const builtin = Builtin.fromName(name) orelse return null;
285277 if (!comp.hasBuiltinFunction(builtin)) return null;
286278
287279 try b._name_to_type_map.ensureUnusedCapacity(comp.gpa, 1);
288 const ty = try createBuiltin(comp, builtin, type_arena);
289 b._name_to_type_map.putAssumeCapacity(name, ty);
280 const qt = try createBuiltin(comp, builtin);
281 b._name_to_type_map.putAssumeCapacity(name, qt);
290282
291283 return .{
292284 .builtin = builtin,
293 .ty = ty,
285 .qt = qt,
294286 };
295287 };
296288 const builtin = Builtin.fromName(name).?;
297 return .{
298 .builtin = builtin,
299 .ty = ty,
300 };
289 return .{ .builtin = builtin, .qt = qt };
301290}
302291
303292pub const Iterator = struct {
......@@ -350,19 +339,21 @@ test Iterator {
350339}
351340
352341test "All builtins" {
353 var comp = Compilation.init(std.testing.allocator, std.fs.cwd());
342 var arena_state: std.heap.ArenaAllocator = .init(std.testing.allocator);
343 defer arena_state.deinit();
344 const arena = arena_state.allocator();
345
346 var comp = Compilation.init(std.testing.allocator, arena, undefined, std.fs.cwd());
354347 defer comp.deinit();
355 _ = try comp.generateBuiltinMacros(.include_system_defines);
356 var arena = std.heap.ArenaAllocator.init(std.testing.allocator);
357 defer arena.deinit();
358348
359 const type_arena = arena.allocator();
349 try comp.type_store.initNamedTypes(&comp);
350 comp.type_store.va_list = try comp.type_store.va_list.decay(&comp);
360351
361352 var builtin_it = Iterator{};
362353 while (builtin_it.next()) |entry| {
363 const name = try type_arena.dupe(u8, entry.name);
364 if (try comp.builtins.getOrCreate(&comp, name, type_arena)) |func_ty| {
365 const get_again = (try comp.builtins.getOrCreate(&comp, name, std.testing.failing_allocator)).?;
354 const name = try arena.dupe(u8, entry.name);
355 if (try comp.builtins.getOrCreate(&comp, name)) |func_ty| {
356 const get_again = (try comp.builtins.getOrCreate(&comp, name)).?;
366357 const found_by_lookup = comp.builtins.lookup(name);
367358 try std.testing.expectEqual(func_ty.builtin.tag, get_again.builtin.tag);
368359 try std.testing.expectEqual(func_ty.builtin.tag, found_by_lookup.builtin.tag);
......@@ -373,19 +364,19 @@ test "All builtins" {
373364test "Allocation failures" {
374365 const Test = struct {
375366 fn testOne(allocator: std.mem.Allocator) !void {
376 var comp = Compilation.init(allocator, std.fs.cwd());
367 var arena_state: std.heap.ArenaAllocator = .init(allocator);
368 defer arena_state.deinit();
369 const arena = arena_state.allocator();
370
371 var comp = Compilation.init(allocator, arena, undefined, std.fs.cwd());
377372 defer comp.deinit();
378373 _ = try comp.generateBuiltinMacros(.include_system_defines);
379 var arena = std.heap.ArenaAllocator.init(comp.gpa);
380 defer arena.deinit();
381
382 const type_arena = arena.allocator();
383374
384375 const num_builtins = 40;
385376 var builtin_it = Iterator{};
386377 for (0..num_builtins) |_| {
387378 const entry = builtin_it.next().?;
388 _ = try comp.builtins.getOrCreate(&comp, entry.name, type_arena);
379 _ = try comp.builtins.getOrCreate(&comp, entry.name);
389380 }
390381 }
391382 };
lib/compiler/aro/aro/Builtins/Builtin.zig+11611-11566
......@@ -1,5 +1,4 @@
11//! Autogenerated by GenerateDef from src/aro/Builtins/Builtin.def, do not edit
2// zig fmt: off
32
43const std = @import("std");
54
......@@ -13,7 +12,3998 @@ properties: Properties,
1312
1413/// Integer starting at 0 derived from the unique index,
1514/// corresponds with the data array index.
16pub const Tag = enum(u16) { _ };
15pub const Tag = enum(u16) { _Block_object_assign,
16 _Block_object_dispose,
17 _Exit,
18 _InterlockedAnd,
19 _InterlockedAnd16,
20 _InterlockedAnd8,
21 _InterlockedCompareExchange,
22 _InterlockedCompareExchange16,
23 _InterlockedCompareExchange64,
24 _InterlockedCompareExchange8,
25 _InterlockedCompareExchangePointer,
26 _InterlockedCompareExchangePointer_nf,
27 _InterlockedDecrement,
28 _InterlockedDecrement16,
29 _InterlockedExchange,
30 _InterlockedExchange16,
31 _InterlockedExchange8,
32 _InterlockedExchangeAdd,
33 _InterlockedExchangeAdd16,
34 _InterlockedExchangeAdd8,
35 _InterlockedExchangePointer,
36 _InterlockedExchangeSub,
37 _InterlockedExchangeSub16,
38 _InterlockedExchangeSub8,
39 _InterlockedIncrement,
40 _InterlockedIncrement16,
41 _InterlockedOr,
42 _InterlockedOr16,
43 _InterlockedOr8,
44 _InterlockedXor,
45 _InterlockedXor16,
46 _InterlockedXor8,
47 _MoveFromCoprocessor,
48 _MoveFromCoprocessor2,
49 _MoveToCoprocessor,
50 _MoveToCoprocessor2,
51 _ReturnAddress,
52 __GetExceptionInfo,
53 __abnormal_termination,
54 __annotation,
55 __arithmetic_fence,
56 __assume,
57 __atomic_add_fetch,
58 __atomic_always_lock_free,
59 __atomic_and_fetch,
60 __atomic_clear,
61 __atomic_compare_exchange,
62 __atomic_compare_exchange_n,
63 __atomic_exchange,
64 __atomic_exchange_n,
65 __atomic_fetch_add,
66 __atomic_fetch_and,
67 __atomic_fetch_max,
68 __atomic_fetch_min,
69 __atomic_fetch_nand,
70 __atomic_fetch_or,
71 __atomic_fetch_sub,
72 __atomic_fetch_xor,
73 __atomic_is_lock_free,
74 __atomic_load,
75 __atomic_load_n,
76 __atomic_max_fetch,
77 __atomic_min_fetch,
78 __atomic_nand_fetch,
79 __atomic_or_fetch,
80 __atomic_signal_fence,
81 __atomic_store,
82 __atomic_store_n,
83 __atomic_sub_fetch,
84 __atomic_test_and_set,
85 __atomic_thread_fence,
86 __atomic_xor_fetch,
87 __builtin___CFStringMakeConstantString,
88 __builtin___NSStringMakeConstantString,
89 __builtin___clear_cache,
90 __builtin___fprintf_chk,
91 __builtin___get_unsafe_stack_bottom,
92 __builtin___get_unsafe_stack_ptr,
93 __builtin___get_unsafe_stack_start,
94 __builtin___get_unsafe_stack_top,
95 __builtin___memccpy_chk,
96 __builtin___memcpy_chk,
97 __builtin___memmove_chk,
98 __builtin___mempcpy_chk,
99 __builtin___memset_chk,
100 __builtin___printf_chk,
101 __builtin___snprintf_chk,
102 __builtin___sprintf_chk,
103 __builtin___stpcpy_chk,
104 __builtin___stpncpy_chk,
105 __builtin___strcat_chk,
106 __builtin___strcpy_chk,
107 __builtin___strlcat_chk,
108 __builtin___strlcpy_chk,
109 __builtin___strncat_chk,
110 __builtin___strncpy_chk,
111 __builtin___vfprintf_chk,
112 __builtin___vprintf_chk,
113 __builtin___vsnprintf_chk,
114 __builtin___vsprintf_chk,
115 __builtin_abort,
116 __builtin_abs,
117 __builtin_acos,
118 __builtin_acosf,
119 __builtin_acosf128,
120 __builtin_acosh,
121 __builtin_acoshf,
122 __builtin_acoshf128,
123 __builtin_acoshl,
124 __builtin_acosl,
125 __builtin_add_overflow,
126 __builtin_addc,
127 __builtin_addcb,
128 __builtin_addcl,
129 __builtin_addcll,
130 __builtin_addcs,
131 __builtin_align_down,
132 __builtin_align_up,
133 __builtin_alloca,
134 __builtin_alloca_uninitialized,
135 __builtin_alloca_with_align,
136 __builtin_alloca_with_align_uninitialized,
137 __builtin_amdgcn_alignbit,
138 __builtin_amdgcn_alignbyte,
139 __builtin_amdgcn_atomic_dec32,
140 __builtin_amdgcn_atomic_dec64,
141 __builtin_amdgcn_atomic_inc32,
142 __builtin_amdgcn_atomic_inc64,
143 __builtin_amdgcn_buffer_wbinvl1,
144 __builtin_amdgcn_class,
145 __builtin_amdgcn_classf,
146 __builtin_amdgcn_cosf,
147 __builtin_amdgcn_cubeid,
148 __builtin_amdgcn_cubema,
149 __builtin_amdgcn_cubesc,
150 __builtin_amdgcn_cubetc,
151 __builtin_amdgcn_cvt_pk_i16,
152 __builtin_amdgcn_cvt_pk_u16,
153 __builtin_amdgcn_cvt_pk_u8_f32,
154 __builtin_amdgcn_cvt_pknorm_i16,
155 __builtin_amdgcn_cvt_pknorm_u16,
156 __builtin_amdgcn_cvt_pkrtz,
157 __builtin_amdgcn_dispatch_ptr,
158 __builtin_amdgcn_div_fixup,
159 __builtin_amdgcn_div_fixupf,
160 __builtin_amdgcn_div_fmas,
161 __builtin_amdgcn_div_fmasf,
162 __builtin_amdgcn_div_scale,
163 __builtin_amdgcn_div_scalef,
164 __builtin_amdgcn_ds_append,
165 __builtin_amdgcn_ds_bpermute,
166 __builtin_amdgcn_ds_consume,
167 __builtin_amdgcn_ds_faddf,
168 __builtin_amdgcn_ds_fmaxf,
169 __builtin_amdgcn_ds_fminf,
170 __builtin_amdgcn_ds_permute,
171 __builtin_amdgcn_ds_swizzle,
172 __builtin_amdgcn_endpgm,
173 __builtin_amdgcn_exp2f,
174 __builtin_amdgcn_fcmp,
175 __builtin_amdgcn_fcmpf,
176 __builtin_amdgcn_fence,
177 __builtin_amdgcn_fmed3f,
178 __builtin_amdgcn_fract,
179 __builtin_amdgcn_fractf,
180 __builtin_amdgcn_frexp_exp,
181 __builtin_amdgcn_frexp_expf,
182 __builtin_amdgcn_frexp_mant,
183 __builtin_amdgcn_frexp_mantf,
184 __builtin_amdgcn_grid_size_x,
185 __builtin_amdgcn_grid_size_y,
186 __builtin_amdgcn_grid_size_z,
187 __builtin_amdgcn_groupstaticsize,
188 __builtin_amdgcn_iglp_opt,
189 __builtin_amdgcn_implicitarg_ptr,
190 __builtin_amdgcn_interp_mov,
191 __builtin_amdgcn_interp_p1,
192 __builtin_amdgcn_interp_p1_f16,
193 __builtin_amdgcn_interp_p2,
194 __builtin_amdgcn_interp_p2_f16,
195 __builtin_amdgcn_is_private,
196 __builtin_amdgcn_is_shared,
197 __builtin_amdgcn_kernarg_segment_ptr,
198 __builtin_amdgcn_ldexp,
199 __builtin_amdgcn_ldexpf,
200 __builtin_amdgcn_lerp,
201 __builtin_amdgcn_log_clampf,
202 __builtin_amdgcn_logf,
203 __builtin_amdgcn_mbcnt_hi,
204 __builtin_amdgcn_mbcnt_lo,
205 __builtin_amdgcn_mqsad_pk_u16_u8,
206 __builtin_amdgcn_mqsad_u32_u8,
207 __builtin_amdgcn_msad_u8,
208 __builtin_amdgcn_qsad_pk_u16_u8,
209 __builtin_amdgcn_queue_ptr,
210 __builtin_amdgcn_rcp,
211 __builtin_amdgcn_rcpf,
212 __builtin_amdgcn_read_exec,
213 __builtin_amdgcn_read_exec_hi,
214 __builtin_amdgcn_read_exec_lo,
215 __builtin_amdgcn_readfirstlane,
216 __builtin_amdgcn_readlane,
217 __builtin_amdgcn_rsq,
218 __builtin_amdgcn_rsq_clamp,
219 __builtin_amdgcn_rsq_clampf,
220 __builtin_amdgcn_rsqf,
221 __builtin_amdgcn_s_barrier,
222 __builtin_amdgcn_s_dcache_inv,
223 __builtin_amdgcn_s_decperflevel,
224 __builtin_amdgcn_s_getpc,
225 __builtin_amdgcn_s_getreg,
226 __builtin_amdgcn_s_incperflevel,
227 __builtin_amdgcn_s_sendmsg,
228 __builtin_amdgcn_s_sendmsghalt,
229 __builtin_amdgcn_s_setprio,
230 __builtin_amdgcn_s_setreg,
231 __builtin_amdgcn_s_sleep,
232 __builtin_amdgcn_s_waitcnt,
233 __builtin_amdgcn_sad_hi_u8,
234 __builtin_amdgcn_sad_u16,
235 __builtin_amdgcn_sad_u8,
236 __builtin_amdgcn_sbfe,
237 __builtin_amdgcn_sched_barrier,
238 __builtin_amdgcn_sched_group_barrier,
239 __builtin_amdgcn_sicmp,
240 __builtin_amdgcn_sicmpl,
241 __builtin_amdgcn_sinf,
242 __builtin_amdgcn_sqrt,
243 __builtin_amdgcn_sqrtf,
244 __builtin_amdgcn_trig_preop,
245 __builtin_amdgcn_trig_preopf,
246 __builtin_amdgcn_ubfe,
247 __builtin_amdgcn_uicmp,
248 __builtin_amdgcn_uicmpl,
249 __builtin_amdgcn_wave_barrier,
250 __builtin_amdgcn_workgroup_id_x,
251 __builtin_amdgcn_workgroup_id_y,
252 __builtin_amdgcn_workgroup_id_z,
253 __builtin_amdgcn_workgroup_size_x,
254 __builtin_amdgcn_workgroup_size_y,
255 __builtin_amdgcn_workgroup_size_z,
256 __builtin_amdgcn_workitem_id_x,
257 __builtin_amdgcn_workitem_id_y,
258 __builtin_amdgcn_workitem_id_z,
259 __builtin_annotation,
260 __builtin_arm_cdp,
261 __builtin_arm_cdp2,
262 __builtin_arm_clrex,
263 __builtin_arm_cls,
264 __builtin_arm_cls64,
265 __builtin_arm_clz,
266 __builtin_arm_clz64,
267 __builtin_arm_cmse_TT,
268 __builtin_arm_cmse_TTA,
269 __builtin_arm_cmse_TTAT,
270 __builtin_arm_cmse_TTT,
271 __builtin_arm_dbg,
272 __builtin_arm_dmb,
273 __builtin_arm_dsb,
274 __builtin_arm_get_fpscr,
275 __builtin_arm_isb,
276 __builtin_arm_ldaex,
277 __builtin_arm_ldc,
278 __builtin_arm_ldc2,
279 __builtin_arm_ldc2l,
280 __builtin_arm_ldcl,
281 __builtin_arm_ldrex,
282 __builtin_arm_ldrexd,
283 __builtin_arm_mcr,
284 __builtin_arm_mcr2,
285 __builtin_arm_mcrr,
286 __builtin_arm_mcrr2,
287 __builtin_arm_mrc,
288 __builtin_arm_mrc2,
289 __builtin_arm_mrrc,
290 __builtin_arm_mrrc2,
291 __builtin_arm_nop,
292 __builtin_arm_prefetch,
293 __builtin_arm_qadd,
294 __builtin_arm_qadd16,
295 __builtin_arm_qadd8,
296 __builtin_arm_qasx,
297 __builtin_arm_qdbl,
298 __builtin_arm_qsax,
299 __builtin_arm_qsub,
300 __builtin_arm_qsub16,
301 __builtin_arm_qsub8,
302 __builtin_arm_rbit,
303 __builtin_arm_rbit64,
304 __builtin_arm_rsr,
305 __builtin_arm_rsr64,
306 __builtin_arm_rsrp,
307 __builtin_arm_sadd16,
308 __builtin_arm_sadd8,
309 __builtin_arm_sasx,
310 __builtin_arm_sel,
311 __builtin_arm_set_fpscr,
312 __builtin_arm_sev,
313 __builtin_arm_sevl,
314 __builtin_arm_shadd16,
315 __builtin_arm_shadd8,
316 __builtin_arm_shasx,
317 __builtin_arm_shsax,
318 __builtin_arm_shsub16,
319 __builtin_arm_shsub8,
320 __builtin_arm_smlabb,
321 __builtin_arm_smlabt,
322 __builtin_arm_smlad,
323 __builtin_arm_smladx,
324 __builtin_arm_smlald,
325 __builtin_arm_smlaldx,
326 __builtin_arm_smlatb,
327 __builtin_arm_smlatt,
328 __builtin_arm_smlawb,
329 __builtin_arm_smlawt,
330 __builtin_arm_smlsd,
331 __builtin_arm_smlsdx,
332 __builtin_arm_smlsld,
333 __builtin_arm_smlsldx,
334 __builtin_arm_smuad,
335 __builtin_arm_smuadx,
336 __builtin_arm_smulbb,
337 __builtin_arm_smulbt,
338 __builtin_arm_smultb,
339 __builtin_arm_smultt,
340 __builtin_arm_smulwb,
341 __builtin_arm_smulwt,
342 __builtin_arm_smusd,
343 __builtin_arm_smusdx,
344 __builtin_arm_ssat,
345 __builtin_arm_ssat16,
346 __builtin_arm_ssax,
347 __builtin_arm_ssub16,
348 __builtin_arm_ssub8,
349 __builtin_arm_stc,
350 __builtin_arm_stc2,
351 __builtin_arm_stc2l,
352 __builtin_arm_stcl,
353 __builtin_arm_stlex,
354 __builtin_arm_strex,
355 __builtin_arm_strexd,
356 __builtin_arm_sxtab16,
357 __builtin_arm_sxtb16,
358 __builtin_arm_tcancel,
359 __builtin_arm_tcommit,
360 __builtin_arm_tstart,
361 __builtin_arm_ttest,
362 __builtin_arm_uadd16,
363 __builtin_arm_uadd8,
364 __builtin_arm_uasx,
365 __builtin_arm_uhadd16,
366 __builtin_arm_uhadd8,
367 __builtin_arm_uhasx,
368 __builtin_arm_uhsax,
369 __builtin_arm_uhsub16,
370 __builtin_arm_uhsub8,
371 __builtin_arm_uqadd16,
372 __builtin_arm_uqadd8,
373 __builtin_arm_uqasx,
374 __builtin_arm_uqsax,
375 __builtin_arm_uqsub16,
376 __builtin_arm_uqsub8,
377 __builtin_arm_usad8,
378 __builtin_arm_usada8,
379 __builtin_arm_usat,
380 __builtin_arm_usat16,
381 __builtin_arm_usax,
382 __builtin_arm_usub16,
383 __builtin_arm_usub8,
384 __builtin_arm_uxtab16,
385 __builtin_arm_uxtb16,
386 __builtin_arm_vcvtr_d,
387 __builtin_arm_vcvtr_f,
388 __builtin_arm_wfe,
389 __builtin_arm_wfi,
390 __builtin_arm_wsr,
391 __builtin_arm_wsr64,
392 __builtin_arm_wsrp,
393 __builtin_arm_yield,
394 __builtin_asin,
395 __builtin_asinf,
396 __builtin_asinf128,
397 __builtin_asinh,
398 __builtin_asinhf,
399 __builtin_asinhf128,
400 __builtin_asinhl,
401 __builtin_asinl,
402 __builtin_assume,
403 __builtin_assume_aligned,
404 __builtin_assume_separate_storage,
405 __builtin_atan,
406 __builtin_atan2,
407 __builtin_atan2f,
408 __builtin_atan2f128,
409 __builtin_atan2l,
410 __builtin_atanf,
411 __builtin_atanf128,
412 __builtin_atanh,
413 __builtin_atanhf,
414 __builtin_atanhf128,
415 __builtin_atanhl,
416 __builtin_atanl,
417 __builtin_bcmp,
418 __builtin_bcopy,
419 __builtin_bitoffsetof,
420 __builtin_bitrev,
421 __builtin_bitreverse16,
422 __builtin_bitreverse32,
423 __builtin_bitreverse64,
424 __builtin_bitreverse8,
425 __builtin_bswap16,
426 __builtin_bswap32,
427 __builtin_bswap64,
428 __builtin_bzero,
429 __builtin_cabs,
430 __builtin_cabsf,
431 __builtin_cabsl,
432 __builtin_cacos,
433 __builtin_cacosf,
434 __builtin_cacosh,
435 __builtin_cacoshf,
436 __builtin_cacoshl,
437 __builtin_cacosl,
438 __builtin_call_with_static_chain,
439 __builtin_calloc,
440 __builtin_canonicalize,
441 __builtin_canonicalizef,
442 __builtin_canonicalizef16,
443 __builtin_canonicalizel,
444 __builtin_carg,
445 __builtin_cargf,
446 __builtin_cargl,
447 __builtin_casin,
448 __builtin_casinf,
449 __builtin_casinh,
450 __builtin_casinhf,
451 __builtin_casinhl,
452 __builtin_casinl,
453 __builtin_catan,
454 __builtin_catanf,
455 __builtin_catanh,
456 __builtin_catanhf,
457 __builtin_catanhl,
458 __builtin_catanl,
459 __builtin_cbrt,
460 __builtin_cbrtf,
461 __builtin_cbrtf128,
462 __builtin_cbrtl,
463 __builtin_ccos,
464 __builtin_ccosf,
465 __builtin_ccosh,
466 __builtin_ccoshf,
467 __builtin_ccoshl,
468 __builtin_ccosl,
469 __builtin_ceil,
470 __builtin_ceilf,
471 __builtin_ceilf128,
472 __builtin_ceilf16,
473 __builtin_ceill,
474 __builtin_cexp,
475 __builtin_cexpf,
476 __builtin_cexpl,
477 __builtin_char_memchr,
478 __builtin_choose_expr,
479 __builtin_cimag,
480 __builtin_cimagf,
481 __builtin_cimagl,
482 __builtin_classify_type,
483 __builtin_clog,
484 __builtin_clogf,
485 __builtin_clogl,
486 __builtin_clrsb,
487 __builtin_clrsbl,
488 __builtin_clrsbll,
489 __builtin_clz,
490 __builtin_clzl,
491 __builtin_clzll,
492 __builtin_clzs,
493 __builtin_complex,
494 __builtin_conj,
495 __builtin_conjf,
496 __builtin_conjl,
497 __builtin_constant_p,
498 __builtin_convertvector,
499 __builtin_copysign,
500 __builtin_copysignf,
501 __builtin_copysignf128,
502 __builtin_copysignf16,
503 __builtin_copysignl,
504 __builtin_cos,
505 __builtin_cosf,
506 __builtin_cosf128,
507 __builtin_cosf16,
508 __builtin_cosh,
509 __builtin_coshf,
510 __builtin_coshf128,
511 __builtin_coshl,
512 __builtin_cosl,
513 __builtin_cpow,
514 __builtin_cpowf,
515 __builtin_cpowl,
516 __builtin_cproj,
517 __builtin_cprojf,
518 __builtin_cprojl,
519 __builtin_cpu_init,
520 __builtin_cpu_is,
521 __builtin_cpu_supports,
522 __builtin_creal,
523 __builtin_crealf,
524 __builtin_creall,
525 __builtin_csin,
526 __builtin_csinf,
527 __builtin_csinh,
528 __builtin_csinhf,
529 __builtin_csinhl,
530 __builtin_csinl,
531 __builtin_csqrt,
532 __builtin_csqrtf,
533 __builtin_csqrtl,
534 __builtin_ctan,
535 __builtin_ctanf,
536 __builtin_ctanh,
537 __builtin_ctanhf,
538 __builtin_ctanhl,
539 __builtin_ctanl,
540 __builtin_ctz,
541 __builtin_ctzl,
542 __builtin_ctzll,
543 __builtin_ctzs,
544 __builtin_dcbf,
545 __builtin_debugtrap,
546 __builtin_dump_struct,
547 __builtin_dwarf_cfa,
548 __builtin_dwarf_sp_column,
549 __builtin_dynamic_object_size,
550 __builtin_eh_return,
551 __builtin_eh_return_data_regno,
552 __builtin_elementwise_abs,
553 __builtin_elementwise_add_sat,
554 __builtin_elementwise_bitreverse,
555 __builtin_elementwise_canonicalize,
556 __builtin_elementwise_ceil,
557 __builtin_elementwise_copysign,
558 __builtin_elementwise_cos,
559 __builtin_elementwise_exp,
560 __builtin_elementwise_exp2,
561 __builtin_elementwise_floor,
562 __builtin_elementwise_fma,
563 __builtin_elementwise_log,
564 __builtin_elementwise_log10,
565 __builtin_elementwise_log2,
566 __builtin_elementwise_max,
567 __builtin_elementwise_min,
568 __builtin_elementwise_nearbyint,
569 __builtin_elementwise_pow,
570 __builtin_elementwise_rint,
571 __builtin_elementwise_round,
572 __builtin_elementwise_roundeven,
573 __builtin_elementwise_sin,
574 __builtin_elementwise_sqrt,
575 __builtin_elementwise_sub_sat,
576 __builtin_elementwise_trunc,
577 __builtin_erf,
578 __builtin_erfc,
579 __builtin_erfcf,
580 __builtin_erfcf128,
581 __builtin_erfcl,
582 __builtin_erff,
583 __builtin_erff128,
584 __builtin_erfl,
585 __builtin_exp,
586 __builtin_exp10,
587 __builtin_exp10f,
588 __builtin_exp10f128,
589 __builtin_exp10f16,
590 __builtin_exp10l,
591 __builtin_exp2,
592 __builtin_exp2f,
593 __builtin_exp2f128,
594 __builtin_exp2f16,
595 __builtin_exp2l,
596 __builtin_expect,
597 __builtin_expect_with_probability,
598 __builtin_expf,
599 __builtin_expf128,
600 __builtin_expf16,
601 __builtin_expl,
602 __builtin_expm1,
603 __builtin_expm1f,
604 __builtin_expm1f128,
605 __builtin_expm1l,
606 __builtin_extend_pointer,
607 __builtin_extract_return_addr,
608 __builtin_fabs,
609 __builtin_fabsf,
610 __builtin_fabsf128,
611 __builtin_fabsf16,
612 __builtin_fabsl,
613 __builtin_fdim,
614 __builtin_fdimf,
615 __builtin_fdimf128,
616 __builtin_fdiml,
617 __builtin_ffs,
618 __builtin_ffsl,
619 __builtin_ffsll,
620 __builtin_floor,
621 __builtin_floorf,
622 __builtin_floorf128,
623 __builtin_floorf16,
624 __builtin_floorl,
625 __builtin_flt_rounds,
626 __builtin_fma,
627 __builtin_fmaf,
628 __builtin_fmaf128,
629 __builtin_fmaf16,
630 __builtin_fmal,
631 __builtin_fmax,
632 __builtin_fmaxf,
633 __builtin_fmaxf128,
634 __builtin_fmaxf16,
635 __builtin_fmaxl,
636 __builtin_fmin,
637 __builtin_fminf,
638 __builtin_fminf128,
639 __builtin_fminf16,
640 __builtin_fminl,
641 __builtin_fmod,
642 __builtin_fmodf,
643 __builtin_fmodf128,
644 __builtin_fmodf16,
645 __builtin_fmodl,
646 __builtin_fpclassify,
647 __builtin_fprintf,
648 __builtin_frame_address,
649 __builtin_free,
650 __builtin_frexp,
651 __builtin_frexpf,
652 __builtin_frexpf128,
653 __builtin_frexpf16,
654 __builtin_frexpl,
655 __builtin_frob_return_addr,
656 __builtin_fscanf,
657 __builtin_getid,
658 __builtin_getps,
659 __builtin_huge_val,
660 __builtin_huge_valf,
661 __builtin_huge_valf128,
662 __builtin_huge_valf16,
663 __builtin_huge_vall,
664 __builtin_hypot,
665 __builtin_hypotf,
666 __builtin_hypotf128,
667 __builtin_hypotl,
668 __builtin_ia32_rdpmc,
669 __builtin_ia32_rdtsc,
670 __builtin_ia32_rdtscp,
671 __builtin_ilogb,
672 __builtin_ilogbf,
673 __builtin_ilogbf128,
674 __builtin_ilogbl,
675 __builtin_index,
676 __builtin_inf,
677 __builtin_inff,
678 __builtin_inff128,
679 __builtin_inff16,
680 __builtin_infl,
681 __builtin_init_dwarf_reg_size_table,
682 __builtin_is_aligned,
683 __builtin_isfinite,
684 __builtin_isfpclass,
685 __builtin_isgreater,
686 __builtin_isgreaterequal,
687 __builtin_isinf,
688 __builtin_isinf_sign,
689 __builtin_isless,
690 __builtin_islessequal,
691 __builtin_islessgreater,
692 __builtin_isnan,
693 __builtin_isnormal,
694 __builtin_isunordered,
695 __builtin_labs,
696 __builtin_launder,
697 __builtin_ldexp,
698 __builtin_ldexpf,
699 __builtin_ldexpf128,
700 __builtin_ldexpf16,
701 __builtin_ldexpl,
702 __builtin_lgamma,
703 __builtin_lgammaf,
704 __builtin_lgammaf128,
705 __builtin_lgammal,
706 __builtin_llabs,
707 __builtin_llrint,
708 __builtin_llrintf,
709 __builtin_llrintf128,
710 __builtin_llrintl,
711 __builtin_llround,
712 __builtin_llroundf,
713 __builtin_llroundf128,
714 __builtin_llroundl,
715 __builtin_log,
716 __builtin_log10,
717 __builtin_log10f,
718 __builtin_log10f128,
719 __builtin_log10f16,
720 __builtin_log10l,
721 __builtin_log1p,
722 __builtin_log1pf,
723 __builtin_log1pf128,
724 __builtin_log1pl,
725 __builtin_log2,
726 __builtin_log2f,
727 __builtin_log2f128,
728 __builtin_log2f16,
729 __builtin_log2l,
730 __builtin_logb,
731 __builtin_logbf,
732 __builtin_logbf128,
733 __builtin_logbl,
734 __builtin_logf,
735 __builtin_logf128,
736 __builtin_logf16,
737 __builtin_logl,
738 __builtin_longjmp,
739 __builtin_lrint,
740 __builtin_lrintf,
741 __builtin_lrintf128,
742 __builtin_lrintl,
743 __builtin_lround,
744 __builtin_lroundf,
745 __builtin_lroundf128,
746 __builtin_lroundl,
747 __builtin_malloc,
748 __builtin_matrix_column_major_load,
749 __builtin_matrix_column_major_store,
750 __builtin_matrix_transpose,
751 __builtin_memchr,
752 __builtin_memcmp,
753 __builtin_memcpy,
754 __builtin_memcpy_inline,
755 __builtin_memmove,
756 __builtin_mempcpy,
757 __builtin_memset,
758 __builtin_memset_inline,
759 __builtin_mips_absq_s_ph,
760 __builtin_mips_absq_s_qb,
761 __builtin_mips_absq_s_w,
762 __builtin_mips_addq_ph,
763 __builtin_mips_addq_s_ph,
764 __builtin_mips_addq_s_w,
765 __builtin_mips_addqh_ph,
766 __builtin_mips_addqh_r_ph,
767 __builtin_mips_addqh_r_w,
768 __builtin_mips_addqh_w,
769 __builtin_mips_addsc,
770 __builtin_mips_addu_ph,
771 __builtin_mips_addu_qb,
772 __builtin_mips_addu_s_ph,
773 __builtin_mips_addu_s_qb,
774 __builtin_mips_adduh_qb,
775 __builtin_mips_adduh_r_qb,
776 __builtin_mips_addwc,
777 __builtin_mips_append,
778 __builtin_mips_balign,
779 __builtin_mips_bitrev,
780 __builtin_mips_bposge32,
781 __builtin_mips_cmp_eq_ph,
782 __builtin_mips_cmp_le_ph,
783 __builtin_mips_cmp_lt_ph,
784 __builtin_mips_cmpgdu_eq_qb,
785 __builtin_mips_cmpgdu_le_qb,
786 __builtin_mips_cmpgdu_lt_qb,
787 __builtin_mips_cmpgu_eq_qb,
788 __builtin_mips_cmpgu_le_qb,
789 __builtin_mips_cmpgu_lt_qb,
790 __builtin_mips_cmpu_eq_qb,
791 __builtin_mips_cmpu_le_qb,
792 __builtin_mips_cmpu_lt_qb,
793 __builtin_mips_dpa_w_ph,
794 __builtin_mips_dpaq_s_w_ph,
795 __builtin_mips_dpaq_sa_l_w,
796 __builtin_mips_dpaqx_s_w_ph,
797 __builtin_mips_dpaqx_sa_w_ph,
798 __builtin_mips_dpau_h_qbl,
799 __builtin_mips_dpau_h_qbr,
800 __builtin_mips_dpax_w_ph,
801 __builtin_mips_dps_w_ph,
802 __builtin_mips_dpsq_s_w_ph,
803 __builtin_mips_dpsq_sa_l_w,
804 __builtin_mips_dpsqx_s_w_ph,
805 __builtin_mips_dpsqx_sa_w_ph,
806 __builtin_mips_dpsu_h_qbl,
807 __builtin_mips_dpsu_h_qbr,
808 __builtin_mips_dpsx_w_ph,
809 __builtin_mips_extp,
810 __builtin_mips_extpdp,
811 __builtin_mips_extr_r_w,
812 __builtin_mips_extr_rs_w,
813 __builtin_mips_extr_s_h,
814 __builtin_mips_extr_w,
815 __builtin_mips_insv,
816 __builtin_mips_lbux,
817 __builtin_mips_lhx,
818 __builtin_mips_lwx,
819 __builtin_mips_madd,
820 __builtin_mips_maddu,
821 __builtin_mips_maq_s_w_phl,
822 __builtin_mips_maq_s_w_phr,
823 __builtin_mips_maq_sa_w_phl,
824 __builtin_mips_maq_sa_w_phr,
825 __builtin_mips_modsub,
826 __builtin_mips_msub,
827 __builtin_mips_msubu,
828 __builtin_mips_mthlip,
829 __builtin_mips_mul_ph,
830 __builtin_mips_mul_s_ph,
831 __builtin_mips_muleq_s_w_phl,
832 __builtin_mips_muleq_s_w_phr,
833 __builtin_mips_muleu_s_ph_qbl,
834 __builtin_mips_muleu_s_ph_qbr,
835 __builtin_mips_mulq_rs_ph,
836 __builtin_mips_mulq_rs_w,
837 __builtin_mips_mulq_s_ph,
838 __builtin_mips_mulq_s_w,
839 __builtin_mips_mulsa_w_ph,
840 __builtin_mips_mulsaq_s_w_ph,
841 __builtin_mips_mult,
842 __builtin_mips_multu,
843 __builtin_mips_packrl_ph,
844 __builtin_mips_pick_ph,
845 __builtin_mips_pick_qb,
846 __builtin_mips_preceq_w_phl,
847 __builtin_mips_preceq_w_phr,
848 __builtin_mips_precequ_ph_qbl,
849 __builtin_mips_precequ_ph_qbla,
850 __builtin_mips_precequ_ph_qbr,
851 __builtin_mips_precequ_ph_qbra,
852 __builtin_mips_preceu_ph_qbl,
853 __builtin_mips_preceu_ph_qbla,
854 __builtin_mips_preceu_ph_qbr,
855 __builtin_mips_preceu_ph_qbra,
856 __builtin_mips_precr_qb_ph,
857 __builtin_mips_precr_sra_ph_w,
858 __builtin_mips_precr_sra_r_ph_w,
859 __builtin_mips_precrq_ph_w,
860 __builtin_mips_precrq_qb_ph,
861 __builtin_mips_precrq_rs_ph_w,
862 __builtin_mips_precrqu_s_qb_ph,
863 __builtin_mips_prepend,
864 __builtin_mips_raddu_w_qb,
865 __builtin_mips_rddsp,
866 __builtin_mips_repl_ph,
867 __builtin_mips_repl_qb,
868 __builtin_mips_shilo,
869 __builtin_mips_shll_ph,
870 __builtin_mips_shll_qb,
871 __builtin_mips_shll_s_ph,
872 __builtin_mips_shll_s_w,
873 __builtin_mips_shra_ph,
874 __builtin_mips_shra_qb,
875 __builtin_mips_shra_r_ph,
876 __builtin_mips_shra_r_qb,
877 __builtin_mips_shra_r_w,
878 __builtin_mips_shrl_ph,
879 __builtin_mips_shrl_qb,
880 __builtin_mips_subq_ph,
881 __builtin_mips_subq_s_ph,
882 __builtin_mips_subq_s_w,
883 __builtin_mips_subqh_ph,
884 __builtin_mips_subqh_r_ph,
885 __builtin_mips_subqh_r_w,
886 __builtin_mips_subqh_w,
887 __builtin_mips_subu_ph,
888 __builtin_mips_subu_qb,
889 __builtin_mips_subu_s_ph,
890 __builtin_mips_subu_s_qb,
891 __builtin_mips_subuh_qb,
892 __builtin_mips_subuh_r_qb,
893 __builtin_mips_wrdsp,
894 __builtin_modf,
895 __builtin_modff,
896 __builtin_modff128,
897 __builtin_modfl,
898 __builtin_msa_add_a_b,
899 __builtin_msa_add_a_d,
900 __builtin_msa_add_a_h,
901 __builtin_msa_add_a_w,
902 __builtin_msa_adds_a_b,
903 __builtin_msa_adds_a_d,
904 __builtin_msa_adds_a_h,
905 __builtin_msa_adds_a_w,
906 __builtin_msa_adds_s_b,
907 __builtin_msa_adds_s_d,
908 __builtin_msa_adds_s_h,
909 __builtin_msa_adds_s_w,
910 __builtin_msa_adds_u_b,
911 __builtin_msa_adds_u_d,
912 __builtin_msa_adds_u_h,
913 __builtin_msa_adds_u_w,
914 __builtin_msa_addv_b,
915 __builtin_msa_addv_d,
916 __builtin_msa_addv_h,
917 __builtin_msa_addv_w,
918 __builtin_msa_addvi_b,
919 __builtin_msa_addvi_d,
920 __builtin_msa_addvi_h,
921 __builtin_msa_addvi_w,
922 __builtin_msa_and_v,
923 __builtin_msa_andi_b,
924 __builtin_msa_asub_s_b,
925 __builtin_msa_asub_s_d,
926 __builtin_msa_asub_s_h,
927 __builtin_msa_asub_s_w,
928 __builtin_msa_asub_u_b,
929 __builtin_msa_asub_u_d,
930 __builtin_msa_asub_u_h,
931 __builtin_msa_asub_u_w,
932 __builtin_msa_ave_s_b,
933 __builtin_msa_ave_s_d,
934 __builtin_msa_ave_s_h,
935 __builtin_msa_ave_s_w,
936 __builtin_msa_ave_u_b,
937 __builtin_msa_ave_u_d,
938 __builtin_msa_ave_u_h,
939 __builtin_msa_ave_u_w,
940 __builtin_msa_aver_s_b,
941 __builtin_msa_aver_s_d,
942 __builtin_msa_aver_s_h,
943 __builtin_msa_aver_s_w,
944 __builtin_msa_aver_u_b,
945 __builtin_msa_aver_u_d,
946 __builtin_msa_aver_u_h,
947 __builtin_msa_aver_u_w,
948 __builtin_msa_bclr_b,
949 __builtin_msa_bclr_d,
950 __builtin_msa_bclr_h,
951 __builtin_msa_bclr_w,
952 __builtin_msa_bclri_b,
953 __builtin_msa_bclri_d,
954 __builtin_msa_bclri_h,
955 __builtin_msa_bclri_w,
956 __builtin_msa_binsl_b,
957 __builtin_msa_binsl_d,
958 __builtin_msa_binsl_h,
959 __builtin_msa_binsl_w,
960 __builtin_msa_binsli_b,
961 __builtin_msa_binsli_d,
962 __builtin_msa_binsli_h,
963 __builtin_msa_binsli_w,
964 __builtin_msa_binsr_b,
965 __builtin_msa_binsr_d,
966 __builtin_msa_binsr_h,
967 __builtin_msa_binsr_w,
968 __builtin_msa_binsri_b,
969 __builtin_msa_binsri_d,
970 __builtin_msa_binsri_h,
971 __builtin_msa_binsri_w,
972 __builtin_msa_bmnz_v,
973 __builtin_msa_bmnzi_b,
974 __builtin_msa_bmz_v,
975 __builtin_msa_bmzi_b,
976 __builtin_msa_bneg_b,
977 __builtin_msa_bneg_d,
978 __builtin_msa_bneg_h,
979 __builtin_msa_bneg_w,
980 __builtin_msa_bnegi_b,
981 __builtin_msa_bnegi_d,
982 __builtin_msa_bnegi_h,
983 __builtin_msa_bnegi_w,
984 __builtin_msa_bnz_b,
985 __builtin_msa_bnz_d,
986 __builtin_msa_bnz_h,
987 __builtin_msa_bnz_v,
988 __builtin_msa_bnz_w,
989 __builtin_msa_bsel_v,
990 __builtin_msa_bseli_b,
991 __builtin_msa_bset_b,
992 __builtin_msa_bset_d,
993 __builtin_msa_bset_h,
994 __builtin_msa_bset_w,
995 __builtin_msa_bseti_b,
996 __builtin_msa_bseti_d,
997 __builtin_msa_bseti_h,
998 __builtin_msa_bseti_w,
999 __builtin_msa_bz_b,
1000 __builtin_msa_bz_d,
1001 __builtin_msa_bz_h,
1002 __builtin_msa_bz_v,
1003 __builtin_msa_bz_w,
1004 __builtin_msa_ceq_b,
1005 __builtin_msa_ceq_d,
1006 __builtin_msa_ceq_h,
1007 __builtin_msa_ceq_w,
1008 __builtin_msa_ceqi_b,
1009 __builtin_msa_ceqi_d,
1010 __builtin_msa_ceqi_h,
1011 __builtin_msa_ceqi_w,
1012 __builtin_msa_cfcmsa,
1013 __builtin_msa_cle_s_b,
1014 __builtin_msa_cle_s_d,
1015 __builtin_msa_cle_s_h,
1016 __builtin_msa_cle_s_w,
1017 __builtin_msa_cle_u_b,
1018 __builtin_msa_cle_u_d,
1019 __builtin_msa_cle_u_h,
1020 __builtin_msa_cle_u_w,
1021 __builtin_msa_clei_s_b,
1022 __builtin_msa_clei_s_d,
1023 __builtin_msa_clei_s_h,
1024 __builtin_msa_clei_s_w,
1025 __builtin_msa_clei_u_b,
1026 __builtin_msa_clei_u_d,
1027 __builtin_msa_clei_u_h,
1028 __builtin_msa_clei_u_w,
1029 __builtin_msa_clt_s_b,
1030 __builtin_msa_clt_s_d,
1031 __builtin_msa_clt_s_h,
1032 __builtin_msa_clt_s_w,
1033 __builtin_msa_clt_u_b,
1034 __builtin_msa_clt_u_d,
1035 __builtin_msa_clt_u_h,
1036 __builtin_msa_clt_u_w,
1037 __builtin_msa_clti_s_b,
1038 __builtin_msa_clti_s_d,
1039 __builtin_msa_clti_s_h,
1040 __builtin_msa_clti_s_w,
1041 __builtin_msa_clti_u_b,
1042 __builtin_msa_clti_u_d,
1043 __builtin_msa_clti_u_h,
1044 __builtin_msa_clti_u_w,
1045 __builtin_msa_copy_s_b,
1046 __builtin_msa_copy_s_d,
1047 __builtin_msa_copy_s_h,
1048 __builtin_msa_copy_s_w,
1049 __builtin_msa_copy_u_b,
1050 __builtin_msa_copy_u_d,
1051 __builtin_msa_copy_u_h,
1052 __builtin_msa_copy_u_w,
1053 __builtin_msa_ctcmsa,
1054 __builtin_msa_div_s_b,
1055 __builtin_msa_div_s_d,
1056 __builtin_msa_div_s_h,
1057 __builtin_msa_div_s_w,
1058 __builtin_msa_div_u_b,
1059 __builtin_msa_div_u_d,
1060 __builtin_msa_div_u_h,
1061 __builtin_msa_div_u_w,
1062 __builtin_msa_dotp_s_d,
1063 __builtin_msa_dotp_s_h,
1064 __builtin_msa_dotp_s_w,
1065 __builtin_msa_dotp_u_d,
1066 __builtin_msa_dotp_u_h,
1067 __builtin_msa_dotp_u_w,
1068 __builtin_msa_dpadd_s_d,
1069 __builtin_msa_dpadd_s_h,
1070 __builtin_msa_dpadd_s_w,
1071 __builtin_msa_dpadd_u_d,
1072 __builtin_msa_dpadd_u_h,
1073 __builtin_msa_dpadd_u_w,
1074 __builtin_msa_dpsub_s_d,
1075 __builtin_msa_dpsub_s_h,
1076 __builtin_msa_dpsub_s_w,
1077 __builtin_msa_dpsub_u_d,
1078 __builtin_msa_dpsub_u_h,
1079 __builtin_msa_dpsub_u_w,
1080 __builtin_msa_fadd_d,
1081 __builtin_msa_fadd_w,
1082 __builtin_msa_fcaf_d,
1083 __builtin_msa_fcaf_w,
1084 __builtin_msa_fceq_d,
1085 __builtin_msa_fceq_w,
1086 __builtin_msa_fclass_d,
1087 __builtin_msa_fclass_w,
1088 __builtin_msa_fcle_d,
1089 __builtin_msa_fcle_w,
1090 __builtin_msa_fclt_d,
1091 __builtin_msa_fclt_w,
1092 __builtin_msa_fcne_d,
1093 __builtin_msa_fcne_w,
1094 __builtin_msa_fcor_d,
1095 __builtin_msa_fcor_w,
1096 __builtin_msa_fcueq_d,
1097 __builtin_msa_fcueq_w,
1098 __builtin_msa_fcule_d,
1099 __builtin_msa_fcule_w,
1100 __builtin_msa_fcult_d,
1101 __builtin_msa_fcult_w,
1102 __builtin_msa_fcun_d,
1103 __builtin_msa_fcun_w,
1104 __builtin_msa_fcune_d,
1105 __builtin_msa_fcune_w,
1106 __builtin_msa_fdiv_d,
1107 __builtin_msa_fdiv_w,
1108 __builtin_msa_fexdo_h,
1109 __builtin_msa_fexdo_w,
1110 __builtin_msa_fexp2_d,
1111 __builtin_msa_fexp2_w,
1112 __builtin_msa_fexupl_d,
1113 __builtin_msa_fexupl_w,
1114 __builtin_msa_fexupr_d,
1115 __builtin_msa_fexupr_w,
1116 __builtin_msa_ffint_s_d,
1117 __builtin_msa_ffint_s_w,
1118 __builtin_msa_ffint_u_d,
1119 __builtin_msa_ffint_u_w,
1120 __builtin_msa_ffql_d,
1121 __builtin_msa_ffql_w,
1122 __builtin_msa_ffqr_d,
1123 __builtin_msa_ffqr_w,
1124 __builtin_msa_fill_b,
1125 __builtin_msa_fill_d,
1126 __builtin_msa_fill_h,
1127 __builtin_msa_fill_w,
1128 __builtin_msa_flog2_d,
1129 __builtin_msa_flog2_w,
1130 __builtin_msa_fmadd_d,
1131 __builtin_msa_fmadd_w,
1132 __builtin_msa_fmax_a_d,
1133 __builtin_msa_fmax_a_w,
1134 __builtin_msa_fmax_d,
1135 __builtin_msa_fmax_w,
1136 __builtin_msa_fmin_a_d,
1137 __builtin_msa_fmin_a_w,
1138 __builtin_msa_fmin_d,
1139 __builtin_msa_fmin_w,
1140 __builtin_msa_fmsub_d,
1141 __builtin_msa_fmsub_w,
1142 __builtin_msa_fmul_d,
1143 __builtin_msa_fmul_w,
1144 __builtin_msa_frcp_d,
1145 __builtin_msa_frcp_w,
1146 __builtin_msa_frint_d,
1147 __builtin_msa_frint_w,
1148 __builtin_msa_frsqrt_d,
1149 __builtin_msa_frsqrt_w,
1150 __builtin_msa_fsaf_d,
1151 __builtin_msa_fsaf_w,
1152 __builtin_msa_fseq_d,
1153 __builtin_msa_fseq_w,
1154 __builtin_msa_fsle_d,
1155 __builtin_msa_fsle_w,
1156 __builtin_msa_fslt_d,
1157 __builtin_msa_fslt_w,
1158 __builtin_msa_fsne_d,
1159 __builtin_msa_fsne_w,
1160 __builtin_msa_fsor_d,
1161 __builtin_msa_fsor_w,
1162 __builtin_msa_fsqrt_d,
1163 __builtin_msa_fsqrt_w,
1164 __builtin_msa_fsub_d,
1165 __builtin_msa_fsub_w,
1166 __builtin_msa_fsueq_d,
1167 __builtin_msa_fsueq_w,
1168 __builtin_msa_fsule_d,
1169 __builtin_msa_fsule_w,
1170 __builtin_msa_fsult_d,
1171 __builtin_msa_fsult_w,
1172 __builtin_msa_fsun_d,
1173 __builtin_msa_fsun_w,
1174 __builtin_msa_fsune_d,
1175 __builtin_msa_fsune_w,
1176 __builtin_msa_ftint_s_d,
1177 __builtin_msa_ftint_s_w,
1178 __builtin_msa_ftint_u_d,
1179 __builtin_msa_ftint_u_w,
1180 __builtin_msa_ftq_h,
1181 __builtin_msa_ftq_w,
1182 __builtin_msa_ftrunc_s_d,
1183 __builtin_msa_ftrunc_s_w,
1184 __builtin_msa_ftrunc_u_d,
1185 __builtin_msa_ftrunc_u_w,
1186 __builtin_msa_hadd_s_d,
1187 __builtin_msa_hadd_s_h,
1188 __builtin_msa_hadd_s_w,
1189 __builtin_msa_hadd_u_d,
1190 __builtin_msa_hadd_u_h,
1191 __builtin_msa_hadd_u_w,
1192 __builtin_msa_hsub_s_d,
1193 __builtin_msa_hsub_s_h,
1194 __builtin_msa_hsub_s_w,
1195 __builtin_msa_hsub_u_d,
1196 __builtin_msa_hsub_u_h,
1197 __builtin_msa_hsub_u_w,
1198 __builtin_msa_ilvev_b,
1199 __builtin_msa_ilvev_d,
1200 __builtin_msa_ilvev_h,
1201 __builtin_msa_ilvev_w,
1202 __builtin_msa_ilvl_b,
1203 __builtin_msa_ilvl_d,
1204 __builtin_msa_ilvl_h,
1205 __builtin_msa_ilvl_w,
1206 __builtin_msa_ilvod_b,
1207 __builtin_msa_ilvod_d,
1208 __builtin_msa_ilvod_h,
1209 __builtin_msa_ilvod_w,
1210 __builtin_msa_ilvr_b,
1211 __builtin_msa_ilvr_d,
1212 __builtin_msa_ilvr_h,
1213 __builtin_msa_ilvr_w,
1214 __builtin_msa_insert_b,
1215 __builtin_msa_insert_d,
1216 __builtin_msa_insert_h,
1217 __builtin_msa_insert_w,
1218 __builtin_msa_insve_b,
1219 __builtin_msa_insve_d,
1220 __builtin_msa_insve_h,
1221 __builtin_msa_insve_w,
1222 __builtin_msa_ld_b,
1223 __builtin_msa_ld_d,
1224 __builtin_msa_ld_h,
1225 __builtin_msa_ld_w,
1226 __builtin_msa_ldi_b,
1227 __builtin_msa_ldi_d,
1228 __builtin_msa_ldi_h,
1229 __builtin_msa_ldi_w,
1230 __builtin_msa_ldr_d,
1231 __builtin_msa_ldr_w,
1232 __builtin_msa_madd_q_h,
1233 __builtin_msa_madd_q_w,
1234 __builtin_msa_maddr_q_h,
1235 __builtin_msa_maddr_q_w,
1236 __builtin_msa_maddv_b,
1237 __builtin_msa_maddv_d,
1238 __builtin_msa_maddv_h,
1239 __builtin_msa_maddv_w,
1240 __builtin_msa_max_a_b,
1241 __builtin_msa_max_a_d,
1242 __builtin_msa_max_a_h,
1243 __builtin_msa_max_a_w,
1244 __builtin_msa_max_s_b,
1245 __builtin_msa_max_s_d,
1246 __builtin_msa_max_s_h,
1247 __builtin_msa_max_s_w,
1248 __builtin_msa_max_u_b,
1249 __builtin_msa_max_u_d,
1250 __builtin_msa_max_u_h,
1251 __builtin_msa_max_u_w,
1252 __builtin_msa_maxi_s_b,
1253 __builtin_msa_maxi_s_d,
1254 __builtin_msa_maxi_s_h,
1255 __builtin_msa_maxi_s_w,
1256 __builtin_msa_maxi_u_b,
1257 __builtin_msa_maxi_u_d,
1258 __builtin_msa_maxi_u_h,
1259 __builtin_msa_maxi_u_w,
1260 __builtin_msa_min_a_b,
1261 __builtin_msa_min_a_d,
1262 __builtin_msa_min_a_h,
1263 __builtin_msa_min_a_w,
1264 __builtin_msa_min_s_b,
1265 __builtin_msa_min_s_d,
1266 __builtin_msa_min_s_h,
1267 __builtin_msa_min_s_w,
1268 __builtin_msa_min_u_b,
1269 __builtin_msa_min_u_d,
1270 __builtin_msa_min_u_h,
1271 __builtin_msa_min_u_w,
1272 __builtin_msa_mini_s_b,
1273 __builtin_msa_mini_s_d,
1274 __builtin_msa_mini_s_h,
1275 __builtin_msa_mini_s_w,
1276 __builtin_msa_mini_u_b,
1277 __builtin_msa_mini_u_d,
1278 __builtin_msa_mini_u_h,
1279 __builtin_msa_mini_u_w,
1280 __builtin_msa_mod_s_b,
1281 __builtin_msa_mod_s_d,
1282 __builtin_msa_mod_s_h,
1283 __builtin_msa_mod_s_w,
1284 __builtin_msa_mod_u_b,
1285 __builtin_msa_mod_u_d,
1286 __builtin_msa_mod_u_h,
1287 __builtin_msa_mod_u_w,
1288 __builtin_msa_move_v,
1289 __builtin_msa_msub_q_h,
1290 __builtin_msa_msub_q_w,
1291 __builtin_msa_msubr_q_h,
1292 __builtin_msa_msubr_q_w,
1293 __builtin_msa_msubv_b,
1294 __builtin_msa_msubv_d,
1295 __builtin_msa_msubv_h,
1296 __builtin_msa_msubv_w,
1297 __builtin_msa_mul_q_h,
1298 __builtin_msa_mul_q_w,
1299 __builtin_msa_mulr_q_h,
1300 __builtin_msa_mulr_q_w,
1301 __builtin_msa_mulv_b,
1302 __builtin_msa_mulv_d,
1303 __builtin_msa_mulv_h,
1304 __builtin_msa_mulv_w,
1305 __builtin_msa_nloc_b,
1306 __builtin_msa_nloc_d,
1307 __builtin_msa_nloc_h,
1308 __builtin_msa_nloc_w,
1309 __builtin_msa_nlzc_b,
1310 __builtin_msa_nlzc_d,
1311 __builtin_msa_nlzc_h,
1312 __builtin_msa_nlzc_w,
1313 __builtin_msa_nor_v,
1314 __builtin_msa_nori_b,
1315 __builtin_msa_or_v,
1316 __builtin_msa_ori_b,
1317 __builtin_msa_pckev_b,
1318 __builtin_msa_pckev_d,
1319 __builtin_msa_pckev_h,
1320 __builtin_msa_pckev_w,
1321 __builtin_msa_pckod_b,
1322 __builtin_msa_pckod_d,
1323 __builtin_msa_pckod_h,
1324 __builtin_msa_pckod_w,
1325 __builtin_msa_pcnt_b,
1326 __builtin_msa_pcnt_d,
1327 __builtin_msa_pcnt_h,
1328 __builtin_msa_pcnt_w,
1329 __builtin_msa_sat_s_b,
1330 __builtin_msa_sat_s_d,
1331 __builtin_msa_sat_s_h,
1332 __builtin_msa_sat_s_w,
1333 __builtin_msa_sat_u_b,
1334 __builtin_msa_sat_u_d,
1335 __builtin_msa_sat_u_h,
1336 __builtin_msa_sat_u_w,
1337 __builtin_msa_shf_b,
1338 __builtin_msa_shf_h,
1339 __builtin_msa_shf_w,
1340 __builtin_msa_sld_b,
1341 __builtin_msa_sld_d,
1342 __builtin_msa_sld_h,
1343 __builtin_msa_sld_w,
1344 __builtin_msa_sldi_b,
1345 __builtin_msa_sldi_d,
1346 __builtin_msa_sldi_h,
1347 __builtin_msa_sldi_w,
1348 __builtin_msa_sll_b,
1349 __builtin_msa_sll_d,
1350 __builtin_msa_sll_h,
1351 __builtin_msa_sll_w,
1352 __builtin_msa_slli_b,
1353 __builtin_msa_slli_d,
1354 __builtin_msa_slli_h,
1355 __builtin_msa_slli_w,
1356 __builtin_msa_splat_b,
1357 __builtin_msa_splat_d,
1358 __builtin_msa_splat_h,
1359 __builtin_msa_splat_w,
1360 __builtin_msa_splati_b,
1361 __builtin_msa_splati_d,
1362 __builtin_msa_splati_h,
1363 __builtin_msa_splati_w,
1364 __builtin_msa_sra_b,
1365 __builtin_msa_sra_d,
1366 __builtin_msa_sra_h,
1367 __builtin_msa_sra_w,
1368 __builtin_msa_srai_b,
1369 __builtin_msa_srai_d,
1370 __builtin_msa_srai_h,
1371 __builtin_msa_srai_w,
1372 __builtin_msa_srar_b,
1373 __builtin_msa_srar_d,
1374 __builtin_msa_srar_h,
1375 __builtin_msa_srar_w,
1376 __builtin_msa_srari_b,
1377 __builtin_msa_srari_d,
1378 __builtin_msa_srari_h,
1379 __builtin_msa_srari_w,
1380 __builtin_msa_srl_b,
1381 __builtin_msa_srl_d,
1382 __builtin_msa_srl_h,
1383 __builtin_msa_srl_w,
1384 __builtin_msa_srli_b,
1385 __builtin_msa_srli_d,
1386 __builtin_msa_srli_h,
1387 __builtin_msa_srli_w,
1388 __builtin_msa_srlr_b,
1389 __builtin_msa_srlr_d,
1390 __builtin_msa_srlr_h,
1391 __builtin_msa_srlr_w,
1392 __builtin_msa_srlri_b,
1393 __builtin_msa_srlri_d,
1394 __builtin_msa_srlri_h,
1395 __builtin_msa_srlri_w,
1396 __builtin_msa_st_b,
1397 __builtin_msa_st_d,
1398 __builtin_msa_st_h,
1399 __builtin_msa_st_w,
1400 __builtin_msa_str_d,
1401 __builtin_msa_str_w,
1402 __builtin_msa_subs_s_b,
1403 __builtin_msa_subs_s_d,
1404 __builtin_msa_subs_s_h,
1405 __builtin_msa_subs_s_w,
1406 __builtin_msa_subs_u_b,
1407 __builtin_msa_subs_u_d,
1408 __builtin_msa_subs_u_h,
1409 __builtin_msa_subs_u_w,
1410 __builtin_msa_subsus_u_b,
1411 __builtin_msa_subsus_u_d,
1412 __builtin_msa_subsus_u_h,
1413 __builtin_msa_subsus_u_w,
1414 __builtin_msa_subsuu_s_b,
1415 __builtin_msa_subsuu_s_d,
1416 __builtin_msa_subsuu_s_h,
1417 __builtin_msa_subsuu_s_w,
1418 __builtin_msa_subv_b,
1419 __builtin_msa_subv_d,
1420 __builtin_msa_subv_h,
1421 __builtin_msa_subv_w,
1422 __builtin_msa_subvi_b,
1423 __builtin_msa_subvi_d,
1424 __builtin_msa_subvi_h,
1425 __builtin_msa_subvi_w,
1426 __builtin_msa_vshf_b,
1427 __builtin_msa_vshf_d,
1428 __builtin_msa_vshf_h,
1429 __builtin_msa_vshf_w,
1430 __builtin_msa_xor_v,
1431 __builtin_msa_xori_b,
1432 __builtin_mul_overflow,
1433 __builtin_nan,
1434 __builtin_nanf,
1435 __builtin_nanf128,
1436 __builtin_nanf16,
1437 __builtin_nanl,
1438 __builtin_nans,
1439 __builtin_nansf,
1440 __builtin_nansf128,
1441 __builtin_nansf16,
1442 __builtin_nansl,
1443 __builtin_nearbyint,
1444 __builtin_nearbyintf,
1445 __builtin_nearbyintf128,
1446 __builtin_nearbyintl,
1447 __builtin_nextafter,
1448 __builtin_nextafterf,
1449 __builtin_nextafterf128,
1450 __builtin_nextafterl,
1451 __builtin_nexttoward,
1452 __builtin_nexttowardf,
1453 __builtin_nexttowardf128,
1454 __builtin_nexttowardl,
1455 __builtin_nondeterministic_value,
1456 __builtin_nontemporal_load,
1457 __builtin_nontemporal_store,
1458 __builtin_objc_memmove_collectable,
1459 __builtin_object_size,
1460 __builtin_offsetof,
1461 __builtin_operator_delete,
1462 __builtin_operator_new,
1463 __builtin_os_log_format,
1464 __builtin_os_log_format_buffer_size,
1465 __builtin_pack_longdouble,
1466 __builtin_parity,
1467 __builtin_parityl,
1468 __builtin_parityll,
1469 __builtin_popcount,
1470 __builtin_popcountl,
1471 __builtin_popcountll,
1472 __builtin_pow,
1473 __builtin_powf,
1474 __builtin_powf128,
1475 __builtin_powf16,
1476 __builtin_powi,
1477 __builtin_powif,
1478 __builtin_powil,
1479 __builtin_powl,
1480 __builtin_ppc_alignx,
1481 __builtin_ppc_cmpb,
1482 __builtin_ppc_compare_and_swap,
1483 __builtin_ppc_compare_and_swaplp,
1484 __builtin_ppc_dcbfl,
1485 __builtin_ppc_dcbflp,
1486 __builtin_ppc_dcbst,
1487 __builtin_ppc_dcbt,
1488 __builtin_ppc_dcbtst,
1489 __builtin_ppc_dcbtstt,
1490 __builtin_ppc_dcbtt,
1491 __builtin_ppc_dcbz,
1492 __builtin_ppc_eieio,
1493 __builtin_ppc_fcfid,
1494 __builtin_ppc_fcfud,
1495 __builtin_ppc_fctid,
1496 __builtin_ppc_fctidz,
1497 __builtin_ppc_fctiw,
1498 __builtin_ppc_fctiwz,
1499 __builtin_ppc_fctudz,
1500 __builtin_ppc_fctuwz,
1501 __builtin_ppc_fetch_and_add,
1502 __builtin_ppc_fetch_and_addlp,
1503 __builtin_ppc_fetch_and_and,
1504 __builtin_ppc_fetch_and_andlp,
1505 __builtin_ppc_fetch_and_or,
1506 __builtin_ppc_fetch_and_orlp,
1507 __builtin_ppc_fetch_and_swap,
1508 __builtin_ppc_fetch_and_swaplp,
1509 __builtin_ppc_fmsub,
1510 __builtin_ppc_fmsubs,
1511 __builtin_ppc_fnabs,
1512 __builtin_ppc_fnabss,
1513 __builtin_ppc_fnmadd,
1514 __builtin_ppc_fnmadds,
1515 __builtin_ppc_fnmsub,
1516 __builtin_ppc_fnmsubs,
1517 __builtin_ppc_fre,
1518 __builtin_ppc_fres,
1519 __builtin_ppc_fric,
1520 __builtin_ppc_frim,
1521 __builtin_ppc_frims,
1522 __builtin_ppc_frin,
1523 __builtin_ppc_frins,
1524 __builtin_ppc_frip,
1525 __builtin_ppc_frips,
1526 __builtin_ppc_friz,
1527 __builtin_ppc_frizs,
1528 __builtin_ppc_frsqrte,
1529 __builtin_ppc_frsqrtes,
1530 __builtin_ppc_fsel,
1531 __builtin_ppc_fsels,
1532 __builtin_ppc_fsqrt,
1533 __builtin_ppc_fsqrts,
1534 __builtin_ppc_get_timebase,
1535 __builtin_ppc_iospace_eieio,
1536 __builtin_ppc_iospace_lwsync,
1537 __builtin_ppc_iospace_sync,
1538 __builtin_ppc_isync,
1539 __builtin_ppc_ldarx,
1540 __builtin_ppc_load2r,
1541 __builtin_ppc_load4r,
1542 __builtin_ppc_lwarx,
1543 __builtin_ppc_lwsync,
1544 __builtin_ppc_maxfe,
1545 __builtin_ppc_maxfl,
1546 __builtin_ppc_maxfs,
1547 __builtin_ppc_mfmsr,
1548 __builtin_ppc_mfspr,
1549 __builtin_ppc_mftbu,
1550 __builtin_ppc_minfe,
1551 __builtin_ppc_minfl,
1552 __builtin_ppc_minfs,
1553 __builtin_ppc_mtfsb0,
1554 __builtin_ppc_mtfsb1,
1555 __builtin_ppc_mtfsf,
1556 __builtin_ppc_mtfsfi,
1557 __builtin_ppc_mtmsr,
1558 __builtin_ppc_mtspr,
1559 __builtin_ppc_mulhd,
1560 __builtin_ppc_mulhdu,
1561 __builtin_ppc_mulhw,
1562 __builtin_ppc_mulhwu,
1563 __builtin_ppc_popcntb,
1564 __builtin_ppc_poppar4,
1565 __builtin_ppc_poppar8,
1566 __builtin_ppc_rdlam,
1567 __builtin_ppc_recipdivd,
1568 __builtin_ppc_recipdivf,
1569 __builtin_ppc_rldimi,
1570 __builtin_ppc_rlwimi,
1571 __builtin_ppc_rlwnm,
1572 __builtin_ppc_rsqrtd,
1573 __builtin_ppc_rsqrtf,
1574 __builtin_ppc_stdcx,
1575 __builtin_ppc_stfiw,
1576 __builtin_ppc_store2r,
1577 __builtin_ppc_store4r,
1578 __builtin_ppc_stwcx,
1579 __builtin_ppc_swdiv,
1580 __builtin_ppc_swdiv_nochk,
1581 __builtin_ppc_swdivs,
1582 __builtin_ppc_swdivs_nochk,
1583 __builtin_ppc_sync,
1584 __builtin_ppc_tdw,
1585 __builtin_ppc_trap,
1586 __builtin_ppc_trapd,
1587 __builtin_ppc_tw,
1588 __builtin_prefetch,
1589 __builtin_preserve_access_index,
1590 __builtin_printf,
1591 __builtin_ptx_get_image_channel_data_typei_,
1592 __builtin_ptx_get_image_channel_orderi_,
1593 __builtin_ptx_get_image_depthi_,
1594 __builtin_ptx_get_image_heighti_,
1595 __builtin_ptx_get_image_widthi_,
1596 __builtin_ptx_read_image2Dff_,
1597 __builtin_ptx_read_image2Dfi_,
1598 __builtin_ptx_read_image2Dif_,
1599 __builtin_ptx_read_image2Dii_,
1600 __builtin_ptx_read_image3Dff_,
1601 __builtin_ptx_read_image3Dfi_,
1602 __builtin_ptx_read_image3Dif_,
1603 __builtin_ptx_read_image3Dii_,
1604 __builtin_ptx_write_image2Df_,
1605 __builtin_ptx_write_image2Di_,
1606 __builtin_ptx_write_image2Dui_,
1607 __builtin_r600_implicitarg_ptr,
1608 __builtin_r600_read_tgid_x,
1609 __builtin_r600_read_tgid_y,
1610 __builtin_r600_read_tgid_z,
1611 __builtin_r600_read_tidig_x,
1612 __builtin_r600_read_tidig_y,
1613 __builtin_r600_read_tidig_z,
1614 __builtin_r600_recipsqrt_ieee,
1615 __builtin_r600_recipsqrt_ieeef,
1616 __builtin_readcyclecounter,
1617 __builtin_readflm,
1618 __builtin_realloc,
1619 __builtin_reduce_add,
1620 __builtin_reduce_and,
1621 __builtin_reduce_max,
1622 __builtin_reduce_min,
1623 __builtin_reduce_mul,
1624 __builtin_reduce_or,
1625 __builtin_reduce_xor,
1626 __builtin_remainder,
1627 __builtin_remainderf,
1628 __builtin_remainderf128,
1629 __builtin_remainderl,
1630 __builtin_remquo,
1631 __builtin_remquof,
1632 __builtin_remquof128,
1633 __builtin_remquol,
1634 __builtin_return_address,
1635 __builtin_rindex,
1636 __builtin_rint,
1637 __builtin_rintf,
1638 __builtin_rintf128,
1639 __builtin_rintf16,
1640 __builtin_rintl,
1641 __builtin_rotateleft16,
1642 __builtin_rotateleft32,
1643 __builtin_rotateleft64,
1644 __builtin_rotateleft8,
1645 __builtin_rotateright16,
1646 __builtin_rotateright32,
1647 __builtin_rotateright64,
1648 __builtin_rotateright8,
1649 __builtin_round,
1650 __builtin_roundeven,
1651 __builtin_roundevenf,
1652 __builtin_roundevenf128,
1653 __builtin_roundevenf16,
1654 __builtin_roundevenl,
1655 __builtin_roundf,
1656 __builtin_roundf128,
1657 __builtin_roundf16,
1658 __builtin_roundl,
1659 __builtin_sadd_overflow,
1660 __builtin_saddl_overflow,
1661 __builtin_saddll_overflow,
1662 __builtin_scalbln,
1663 __builtin_scalblnf,
1664 __builtin_scalblnf128,
1665 __builtin_scalblnl,
1666 __builtin_scalbn,
1667 __builtin_scalbnf,
1668 __builtin_scalbnf128,
1669 __builtin_scalbnl,
1670 __builtin_scanf,
1671 __builtin_set_flt_rounds,
1672 __builtin_setflm,
1673 __builtin_setjmp,
1674 __builtin_setps,
1675 __builtin_setrnd,
1676 __builtin_shufflevector,
1677 __builtin_signbit,
1678 __builtin_signbitf,
1679 __builtin_signbitl,
1680 __builtin_sin,
1681 __builtin_sinf,
1682 __builtin_sinf128,
1683 __builtin_sinf16,
1684 __builtin_sinh,
1685 __builtin_sinhf,
1686 __builtin_sinhf128,
1687 __builtin_sinhl,
1688 __builtin_sinl,
1689 __builtin_smul_overflow,
1690 __builtin_smull_overflow,
1691 __builtin_smulll_overflow,
1692 __builtin_snprintf,
1693 __builtin_sponentry,
1694 __builtin_sprintf,
1695 __builtin_sqrt,
1696 __builtin_sqrtf,
1697 __builtin_sqrtf128,
1698 __builtin_sqrtf16,
1699 __builtin_sqrtl,
1700 __builtin_sscanf,
1701 __builtin_ssub_overflow,
1702 __builtin_ssubl_overflow,
1703 __builtin_ssubll_overflow,
1704 __builtin_stdarg_start,
1705 __builtin_stpcpy,
1706 __builtin_stpncpy,
1707 __builtin_strcasecmp,
1708 __builtin_strcat,
1709 __builtin_strchr,
1710 __builtin_strcmp,
1711 __builtin_strcpy,
1712 __builtin_strcspn,
1713 __builtin_strdup,
1714 __builtin_strlen,
1715 __builtin_strncasecmp,
1716 __builtin_strncat,
1717 __builtin_strncmp,
1718 __builtin_strncpy,
1719 __builtin_strndup,
1720 __builtin_strpbrk,
1721 __builtin_strrchr,
1722 __builtin_strspn,
1723 __builtin_strstr,
1724 __builtin_sub_overflow,
1725 __builtin_subc,
1726 __builtin_subcb,
1727 __builtin_subcl,
1728 __builtin_subcll,
1729 __builtin_subcs,
1730 __builtin_tan,
1731 __builtin_tanf,
1732 __builtin_tanf128,
1733 __builtin_tanh,
1734 __builtin_tanhf,
1735 __builtin_tanhf128,
1736 __builtin_tanhl,
1737 __builtin_tanl,
1738 __builtin_tgamma,
1739 __builtin_tgammaf,
1740 __builtin_tgammaf128,
1741 __builtin_tgammal,
1742 __builtin_thread_pointer,
1743 __builtin_trap,
1744 __builtin_trunc,
1745 __builtin_truncf,
1746 __builtin_truncf128,
1747 __builtin_truncf16,
1748 __builtin_truncl,
1749 __builtin_types_compatible_p,
1750 __builtin_uadd_overflow,
1751 __builtin_uaddl_overflow,
1752 __builtin_uaddll_overflow,
1753 __builtin_umul_overflow,
1754 __builtin_umull_overflow,
1755 __builtin_umulll_overflow,
1756 __builtin_unpack_longdouble,
1757 __builtin_unpredictable,
1758 __builtin_unreachable,
1759 __builtin_unwind_init,
1760 __builtin_usub_overflow,
1761 __builtin_usubl_overflow,
1762 __builtin_usubll_overflow,
1763 __builtin_va_arg,
1764 __builtin_va_copy,
1765 __builtin_va_end,
1766 __builtin_va_start,
1767 __builtin_ve_vl_andm_MMM,
1768 __builtin_ve_vl_andm_mmm,
1769 __builtin_ve_vl_eqvm_MMM,
1770 __builtin_ve_vl_eqvm_mmm,
1771 __builtin_ve_vl_extract_vm512l,
1772 __builtin_ve_vl_extract_vm512u,
1773 __builtin_ve_vl_fencec_s,
1774 __builtin_ve_vl_fencei,
1775 __builtin_ve_vl_fencem_s,
1776 __builtin_ve_vl_fidcr_sss,
1777 __builtin_ve_vl_insert_vm512l,
1778 __builtin_ve_vl_insert_vm512u,
1779 __builtin_ve_vl_lcr_sss,
1780 __builtin_ve_vl_lsv_vvss,
1781 __builtin_ve_vl_lvm_MMss,
1782 __builtin_ve_vl_lvm_mmss,
1783 __builtin_ve_vl_lvsd_svs,
1784 __builtin_ve_vl_lvsl_svs,
1785 __builtin_ve_vl_lvss_svs,
1786 __builtin_ve_vl_lzvm_sml,
1787 __builtin_ve_vl_negm_MM,
1788 __builtin_ve_vl_negm_mm,
1789 __builtin_ve_vl_nndm_MMM,
1790 __builtin_ve_vl_nndm_mmm,
1791 __builtin_ve_vl_orm_MMM,
1792 __builtin_ve_vl_orm_mmm,
1793 __builtin_ve_vl_pack_f32a,
1794 __builtin_ve_vl_pack_f32p,
1795 __builtin_ve_vl_pcvm_sml,
1796 __builtin_ve_vl_pfchv_ssl,
1797 __builtin_ve_vl_pfchvnc_ssl,
1798 __builtin_ve_vl_pvadds_vsvMvl,
1799 __builtin_ve_vl_pvadds_vsvl,
1800 __builtin_ve_vl_pvadds_vsvvl,
1801 __builtin_ve_vl_pvadds_vvvMvl,
1802 __builtin_ve_vl_pvadds_vvvl,
1803 __builtin_ve_vl_pvadds_vvvvl,
1804 __builtin_ve_vl_pvaddu_vsvMvl,
1805 __builtin_ve_vl_pvaddu_vsvl,
1806 __builtin_ve_vl_pvaddu_vsvvl,
1807 __builtin_ve_vl_pvaddu_vvvMvl,
1808 __builtin_ve_vl_pvaddu_vvvl,
1809 __builtin_ve_vl_pvaddu_vvvvl,
1810 __builtin_ve_vl_pvand_vsvMvl,
1811 __builtin_ve_vl_pvand_vsvl,
1812 __builtin_ve_vl_pvand_vsvvl,
1813 __builtin_ve_vl_pvand_vvvMvl,
1814 __builtin_ve_vl_pvand_vvvl,
1815 __builtin_ve_vl_pvand_vvvvl,
1816 __builtin_ve_vl_pvbrd_vsMvl,
1817 __builtin_ve_vl_pvbrd_vsl,
1818 __builtin_ve_vl_pvbrd_vsvl,
1819 __builtin_ve_vl_pvbrv_vvMvl,
1820 __builtin_ve_vl_pvbrv_vvl,
1821 __builtin_ve_vl_pvbrv_vvvl,
1822 __builtin_ve_vl_pvbrvlo_vvl,
1823 __builtin_ve_vl_pvbrvlo_vvmvl,
1824 __builtin_ve_vl_pvbrvlo_vvvl,
1825 __builtin_ve_vl_pvbrvup_vvl,
1826 __builtin_ve_vl_pvbrvup_vvmvl,
1827 __builtin_ve_vl_pvbrvup_vvvl,
1828 __builtin_ve_vl_pvcmps_vsvMvl,
1829 __builtin_ve_vl_pvcmps_vsvl,
1830 __builtin_ve_vl_pvcmps_vsvvl,
1831 __builtin_ve_vl_pvcmps_vvvMvl,
1832 __builtin_ve_vl_pvcmps_vvvl,
1833 __builtin_ve_vl_pvcmps_vvvvl,
1834 __builtin_ve_vl_pvcmpu_vsvMvl,
1835 __builtin_ve_vl_pvcmpu_vsvl,
1836 __builtin_ve_vl_pvcmpu_vsvvl,
1837 __builtin_ve_vl_pvcmpu_vvvMvl,
1838 __builtin_ve_vl_pvcmpu_vvvl,
1839 __builtin_ve_vl_pvcmpu_vvvvl,
1840 __builtin_ve_vl_pvcvtsw_vvl,
1841 __builtin_ve_vl_pvcvtsw_vvvl,
1842 __builtin_ve_vl_pvcvtws_vvMvl,
1843 __builtin_ve_vl_pvcvtws_vvl,
1844 __builtin_ve_vl_pvcvtws_vvvl,
1845 __builtin_ve_vl_pvcvtwsrz_vvMvl,
1846 __builtin_ve_vl_pvcvtwsrz_vvl,
1847 __builtin_ve_vl_pvcvtwsrz_vvvl,
1848 __builtin_ve_vl_pveqv_vsvMvl,
1849 __builtin_ve_vl_pveqv_vsvl,
1850 __builtin_ve_vl_pveqv_vsvvl,
1851 __builtin_ve_vl_pveqv_vvvMvl,
1852 __builtin_ve_vl_pveqv_vvvl,
1853 __builtin_ve_vl_pveqv_vvvvl,
1854 __builtin_ve_vl_pvfadd_vsvMvl,
1855 __builtin_ve_vl_pvfadd_vsvl,
1856 __builtin_ve_vl_pvfadd_vsvvl,
1857 __builtin_ve_vl_pvfadd_vvvMvl,
1858 __builtin_ve_vl_pvfadd_vvvl,
1859 __builtin_ve_vl_pvfadd_vvvvl,
1860 __builtin_ve_vl_pvfcmp_vsvMvl,
1861 __builtin_ve_vl_pvfcmp_vsvl,
1862 __builtin_ve_vl_pvfcmp_vsvvl,
1863 __builtin_ve_vl_pvfcmp_vvvMvl,
1864 __builtin_ve_vl_pvfcmp_vvvl,
1865 __builtin_ve_vl_pvfcmp_vvvvl,
1866 __builtin_ve_vl_pvfmad_vsvvMvl,
1867 __builtin_ve_vl_pvfmad_vsvvl,
1868 __builtin_ve_vl_pvfmad_vsvvvl,
1869 __builtin_ve_vl_pvfmad_vvsvMvl,
1870 __builtin_ve_vl_pvfmad_vvsvl,
1871 __builtin_ve_vl_pvfmad_vvsvvl,
1872 __builtin_ve_vl_pvfmad_vvvvMvl,
1873 __builtin_ve_vl_pvfmad_vvvvl,
1874 __builtin_ve_vl_pvfmad_vvvvvl,
1875 __builtin_ve_vl_pvfmax_vsvMvl,
1876 __builtin_ve_vl_pvfmax_vsvl,
1877 __builtin_ve_vl_pvfmax_vsvvl,
1878 __builtin_ve_vl_pvfmax_vvvMvl,
1879 __builtin_ve_vl_pvfmax_vvvl,
1880 __builtin_ve_vl_pvfmax_vvvvl,
1881 __builtin_ve_vl_pvfmin_vsvMvl,
1882 __builtin_ve_vl_pvfmin_vsvl,
1883 __builtin_ve_vl_pvfmin_vsvvl,
1884 __builtin_ve_vl_pvfmin_vvvMvl,
1885 __builtin_ve_vl_pvfmin_vvvl,
1886 __builtin_ve_vl_pvfmin_vvvvl,
1887 __builtin_ve_vl_pvfmkaf_Ml,
1888 __builtin_ve_vl_pvfmkat_Ml,
1889 __builtin_ve_vl_pvfmkseq_MvMl,
1890 __builtin_ve_vl_pvfmkseq_Mvl,
1891 __builtin_ve_vl_pvfmkseqnan_MvMl,
1892 __builtin_ve_vl_pvfmkseqnan_Mvl,
1893 __builtin_ve_vl_pvfmksge_MvMl,
1894 __builtin_ve_vl_pvfmksge_Mvl,
1895 __builtin_ve_vl_pvfmksgenan_MvMl,
1896 __builtin_ve_vl_pvfmksgenan_Mvl,
1897 __builtin_ve_vl_pvfmksgt_MvMl,
1898 __builtin_ve_vl_pvfmksgt_Mvl,
1899 __builtin_ve_vl_pvfmksgtnan_MvMl,
1900 __builtin_ve_vl_pvfmksgtnan_Mvl,
1901 __builtin_ve_vl_pvfmksle_MvMl,
1902 __builtin_ve_vl_pvfmksle_Mvl,
1903 __builtin_ve_vl_pvfmkslenan_MvMl,
1904 __builtin_ve_vl_pvfmkslenan_Mvl,
1905 __builtin_ve_vl_pvfmksloeq_mvl,
1906 __builtin_ve_vl_pvfmksloeq_mvml,
1907 __builtin_ve_vl_pvfmksloeqnan_mvl,
1908 __builtin_ve_vl_pvfmksloeqnan_mvml,
1909 __builtin_ve_vl_pvfmksloge_mvl,
1910 __builtin_ve_vl_pvfmksloge_mvml,
1911 __builtin_ve_vl_pvfmkslogenan_mvl,
1912 __builtin_ve_vl_pvfmkslogenan_mvml,
1913 __builtin_ve_vl_pvfmkslogt_mvl,
1914 __builtin_ve_vl_pvfmkslogt_mvml,
1915 __builtin_ve_vl_pvfmkslogtnan_mvl,
1916 __builtin_ve_vl_pvfmkslogtnan_mvml,
1917 __builtin_ve_vl_pvfmkslole_mvl,
1918 __builtin_ve_vl_pvfmkslole_mvml,
1919 __builtin_ve_vl_pvfmkslolenan_mvl,
1920 __builtin_ve_vl_pvfmkslolenan_mvml,
1921 __builtin_ve_vl_pvfmkslolt_mvl,
1922 __builtin_ve_vl_pvfmkslolt_mvml,
1923 __builtin_ve_vl_pvfmksloltnan_mvl,
1924 __builtin_ve_vl_pvfmksloltnan_mvml,
1925 __builtin_ve_vl_pvfmkslonan_mvl,
1926 __builtin_ve_vl_pvfmkslonan_mvml,
1927 __builtin_ve_vl_pvfmkslone_mvl,
1928 __builtin_ve_vl_pvfmkslone_mvml,
1929 __builtin_ve_vl_pvfmkslonenan_mvl,
1930 __builtin_ve_vl_pvfmkslonenan_mvml,
1931 __builtin_ve_vl_pvfmkslonum_mvl,
1932 __builtin_ve_vl_pvfmkslonum_mvml,
1933 __builtin_ve_vl_pvfmkslt_MvMl,
1934 __builtin_ve_vl_pvfmkslt_Mvl,
1935 __builtin_ve_vl_pvfmksltnan_MvMl,
1936 __builtin_ve_vl_pvfmksltnan_Mvl,
1937 __builtin_ve_vl_pvfmksnan_MvMl,
1938 __builtin_ve_vl_pvfmksnan_Mvl,
1939 __builtin_ve_vl_pvfmksne_MvMl,
1940 __builtin_ve_vl_pvfmksne_Mvl,
1941 __builtin_ve_vl_pvfmksnenan_MvMl,
1942 __builtin_ve_vl_pvfmksnenan_Mvl,
1943 __builtin_ve_vl_pvfmksnum_MvMl,
1944 __builtin_ve_vl_pvfmksnum_Mvl,
1945 __builtin_ve_vl_pvfmksupeq_mvl,
1946 __builtin_ve_vl_pvfmksupeq_mvml,
1947 __builtin_ve_vl_pvfmksupeqnan_mvl,
1948 __builtin_ve_vl_pvfmksupeqnan_mvml,
1949 __builtin_ve_vl_pvfmksupge_mvl,
1950 __builtin_ve_vl_pvfmksupge_mvml,
1951 __builtin_ve_vl_pvfmksupgenan_mvl,
1952 __builtin_ve_vl_pvfmksupgenan_mvml,
1953 __builtin_ve_vl_pvfmksupgt_mvl,
1954 __builtin_ve_vl_pvfmksupgt_mvml,
1955 __builtin_ve_vl_pvfmksupgtnan_mvl,
1956 __builtin_ve_vl_pvfmksupgtnan_mvml,
1957 __builtin_ve_vl_pvfmksuple_mvl,
1958 __builtin_ve_vl_pvfmksuple_mvml,
1959 __builtin_ve_vl_pvfmksuplenan_mvl,
1960 __builtin_ve_vl_pvfmksuplenan_mvml,
1961 __builtin_ve_vl_pvfmksuplt_mvl,
1962 __builtin_ve_vl_pvfmksuplt_mvml,
1963 __builtin_ve_vl_pvfmksupltnan_mvl,
1964 __builtin_ve_vl_pvfmksupltnan_mvml,
1965 __builtin_ve_vl_pvfmksupnan_mvl,
1966 __builtin_ve_vl_pvfmksupnan_mvml,
1967 __builtin_ve_vl_pvfmksupne_mvl,
1968 __builtin_ve_vl_pvfmksupne_mvml,
1969 __builtin_ve_vl_pvfmksupnenan_mvl,
1970 __builtin_ve_vl_pvfmksupnenan_mvml,
1971 __builtin_ve_vl_pvfmksupnum_mvl,
1972 __builtin_ve_vl_pvfmksupnum_mvml,
1973 __builtin_ve_vl_pvfmkweq_MvMl,
1974 __builtin_ve_vl_pvfmkweq_Mvl,
1975 __builtin_ve_vl_pvfmkweqnan_MvMl,
1976 __builtin_ve_vl_pvfmkweqnan_Mvl,
1977 __builtin_ve_vl_pvfmkwge_MvMl,
1978 __builtin_ve_vl_pvfmkwge_Mvl,
1979 __builtin_ve_vl_pvfmkwgenan_MvMl,
1980 __builtin_ve_vl_pvfmkwgenan_Mvl,
1981 __builtin_ve_vl_pvfmkwgt_MvMl,
1982 __builtin_ve_vl_pvfmkwgt_Mvl,
1983 __builtin_ve_vl_pvfmkwgtnan_MvMl,
1984 __builtin_ve_vl_pvfmkwgtnan_Mvl,
1985 __builtin_ve_vl_pvfmkwle_MvMl,
1986 __builtin_ve_vl_pvfmkwle_Mvl,
1987 __builtin_ve_vl_pvfmkwlenan_MvMl,
1988 __builtin_ve_vl_pvfmkwlenan_Mvl,
1989 __builtin_ve_vl_pvfmkwloeq_mvl,
1990 __builtin_ve_vl_pvfmkwloeq_mvml,
1991 __builtin_ve_vl_pvfmkwloeqnan_mvl,
1992 __builtin_ve_vl_pvfmkwloeqnan_mvml,
1993 __builtin_ve_vl_pvfmkwloge_mvl,
1994 __builtin_ve_vl_pvfmkwloge_mvml,
1995 __builtin_ve_vl_pvfmkwlogenan_mvl,
1996 __builtin_ve_vl_pvfmkwlogenan_mvml,
1997 __builtin_ve_vl_pvfmkwlogt_mvl,
1998 __builtin_ve_vl_pvfmkwlogt_mvml,
1999 __builtin_ve_vl_pvfmkwlogtnan_mvl,
2000 __builtin_ve_vl_pvfmkwlogtnan_mvml,
2001 __builtin_ve_vl_pvfmkwlole_mvl,
2002 __builtin_ve_vl_pvfmkwlole_mvml,
2003 __builtin_ve_vl_pvfmkwlolenan_mvl,
2004 __builtin_ve_vl_pvfmkwlolenan_mvml,
2005 __builtin_ve_vl_pvfmkwlolt_mvl,
2006 __builtin_ve_vl_pvfmkwlolt_mvml,
2007 __builtin_ve_vl_pvfmkwloltnan_mvl,
2008 __builtin_ve_vl_pvfmkwloltnan_mvml,
2009 __builtin_ve_vl_pvfmkwlonan_mvl,
2010 __builtin_ve_vl_pvfmkwlonan_mvml,
2011 __builtin_ve_vl_pvfmkwlone_mvl,
2012 __builtin_ve_vl_pvfmkwlone_mvml,
2013 __builtin_ve_vl_pvfmkwlonenan_mvl,
2014 __builtin_ve_vl_pvfmkwlonenan_mvml,
2015 __builtin_ve_vl_pvfmkwlonum_mvl,
2016 __builtin_ve_vl_pvfmkwlonum_mvml,
2017 __builtin_ve_vl_pvfmkwlt_MvMl,
2018 __builtin_ve_vl_pvfmkwlt_Mvl,
2019 __builtin_ve_vl_pvfmkwltnan_MvMl,
2020 __builtin_ve_vl_pvfmkwltnan_Mvl,
2021 __builtin_ve_vl_pvfmkwnan_MvMl,
2022 __builtin_ve_vl_pvfmkwnan_Mvl,
2023 __builtin_ve_vl_pvfmkwne_MvMl,
2024 __builtin_ve_vl_pvfmkwne_Mvl,
2025 __builtin_ve_vl_pvfmkwnenan_MvMl,
2026 __builtin_ve_vl_pvfmkwnenan_Mvl,
2027 __builtin_ve_vl_pvfmkwnum_MvMl,
2028 __builtin_ve_vl_pvfmkwnum_Mvl,
2029 __builtin_ve_vl_pvfmkwupeq_mvl,
2030 __builtin_ve_vl_pvfmkwupeq_mvml,
2031 __builtin_ve_vl_pvfmkwupeqnan_mvl,
2032 __builtin_ve_vl_pvfmkwupeqnan_mvml,
2033 __builtin_ve_vl_pvfmkwupge_mvl,
2034 __builtin_ve_vl_pvfmkwupge_mvml,
2035 __builtin_ve_vl_pvfmkwupgenan_mvl,
2036 __builtin_ve_vl_pvfmkwupgenan_mvml,
2037 __builtin_ve_vl_pvfmkwupgt_mvl,
2038 __builtin_ve_vl_pvfmkwupgt_mvml,
2039 __builtin_ve_vl_pvfmkwupgtnan_mvl,
2040 __builtin_ve_vl_pvfmkwupgtnan_mvml,
2041 __builtin_ve_vl_pvfmkwuple_mvl,
2042 __builtin_ve_vl_pvfmkwuple_mvml,
2043 __builtin_ve_vl_pvfmkwuplenan_mvl,
2044 __builtin_ve_vl_pvfmkwuplenan_mvml,
2045 __builtin_ve_vl_pvfmkwuplt_mvl,
2046 __builtin_ve_vl_pvfmkwuplt_mvml,
2047 __builtin_ve_vl_pvfmkwupltnan_mvl,
2048 __builtin_ve_vl_pvfmkwupltnan_mvml,
2049 __builtin_ve_vl_pvfmkwupnan_mvl,
2050 __builtin_ve_vl_pvfmkwupnan_mvml,
2051 __builtin_ve_vl_pvfmkwupne_mvl,
2052 __builtin_ve_vl_pvfmkwupne_mvml,
2053 __builtin_ve_vl_pvfmkwupnenan_mvl,
2054 __builtin_ve_vl_pvfmkwupnenan_mvml,
2055 __builtin_ve_vl_pvfmkwupnum_mvl,
2056 __builtin_ve_vl_pvfmkwupnum_mvml,
2057 __builtin_ve_vl_pvfmsb_vsvvMvl,
2058 __builtin_ve_vl_pvfmsb_vsvvl,
2059 __builtin_ve_vl_pvfmsb_vsvvvl,
2060 __builtin_ve_vl_pvfmsb_vvsvMvl,
2061 __builtin_ve_vl_pvfmsb_vvsvl,
2062 __builtin_ve_vl_pvfmsb_vvsvvl,
2063 __builtin_ve_vl_pvfmsb_vvvvMvl,
2064 __builtin_ve_vl_pvfmsb_vvvvl,
2065 __builtin_ve_vl_pvfmsb_vvvvvl,
2066 __builtin_ve_vl_pvfmul_vsvMvl,
2067 __builtin_ve_vl_pvfmul_vsvl,
2068 __builtin_ve_vl_pvfmul_vsvvl,
2069 __builtin_ve_vl_pvfmul_vvvMvl,
2070 __builtin_ve_vl_pvfmul_vvvl,
2071 __builtin_ve_vl_pvfmul_vvvvl,
2072 __builtin_ve_vl_pvfnmad_vsvvMvl,
2073 __builtin_ve_vl_pvfnmad_vsvvl,
2074 __builtin_ve_vl_pvfnmad_vsvvvl,
2075 __builtin_ve_vl_pvfnmad_vvsvMvl,
2076 __builtin_ve_vl_pvfnmad_vvsvl,
2077 __builtin_ve_vl_pvfnmad_vvsvvl,
2078 __builtin_ve_vl_pvfnmad_vvvvMvl,
2079 __builtin_ve_vl_pvfnmad_vvvvl,
2080 __builtin_ve_vl_pvfnmad_vvvvvl,
2081 __builtin_ve_vl_pvfnmsb_vsvvMvl,
2082 __builtin_ve_vl_pvfnmsb_vsvvl,
2083 __builtin_ve_vl_pvfnmsb_vsvvvl,
2084 __builtin_ve_vl_pvfnmsb_vvsvMvl,
2085 __builtin_ve_vl_pvfnmsb_vvsvl,
2086 __builtin_ve_vl_pvfnmsb_vvsvvl,
2087 __builtin_ve_vl_pvfnmsb_vvvvMvl,
2088 __builtin_ve_vl_pvfnmsb_vvvvl,
2089 __builtin_ve_vl_pvfnmsb_vvvvvl,
2090 __builtin_ve_vl_pvfsub_vsvMvl,
2091 __builtin_ve_vl_pvfsub_vsvl,
2092 __builtin_ve_vl_pvfsub_vsvvl,
2093 __builtin_ve_vl_pvfsub_vvvMvl,
2094 __builtin_ve_vl_pvfsub_vvvl,
2095 __builtin_ve_vl_pvfsub_vvvvl,
2096 __builtin_ve_vl_pvldz_vvMvl,
2097 __builtin_ve_vl_pvldz_vvl,
2098 __builtin_ve_vl_pvldz_vvvl,
2099 __builtin_ve_vl_pvldzlo_vvl,
2100 __builtin_ve_vl_pvldzlo_vvmvl,
2101 __builtin_ve_vl_pvldzlo_vvvl,
2102 __builtin_ve_vl_pvldzup_vvl,
2103 __builtin_ve_vl_pvldzup_vvmvl,
2104 __builtin_ve_vl_pvldzup_vvvl,
2105 __builtin_ve_vl_pvmaxs_vsvMvl,
2106 __builtin_ve_vl_pvmaxs_vsvl,
2107 __builtin_ve_vl_pvmaxs_vsvvl,
2108 __builtin_ve_vl_pvmaxs_vvvMvl,
2109 __builtin_ve_vl_pvmaxs_vvvl,
2110 __builtin_ve_vl_pvmaxs_vvvvl,
2111 __builtin_ve_vl_pvmins_vsvMvl,
2112 __builtin_ve_vl_pvmins_vsvl,
2113 __builtin_ve_vl_pvmins_vsvvl,
2114 __builtin_ve_vl_pvmins_vvvMvl,
2115 __builtin_ve_vl_pvmins_vvvl,
2116 __builtin_ve_vl_pvmins_vvvvl,
2117 __builtin_ve_vl_pvor_vsvMvl,
2118 __builtin_ve_vl_pvor_vsvl,
2119 __builtin_ve_vl_pvor_vsvvl,
2120 __builtin_ve_vl_pvor_vvvMvl,
2121 __builtin_ve_vl_pvor_vvvl,
2122 __builtin_ve_vl_pvor_vvvvl,
2123 __builtin_ve_vl_pvpcnt_vvMvl,
2124 __builtin_ve_vl_pvpcnt_vvl,
2125 __builtin_ve_vl_pvpcnt_vvvl,
2126 __builtin_ve_vl_pvpcntlo_vvl,
2127 __builtin_ve_vl_pvpcntlo_vvmvl,
2128 __builtin_ve_vl_pvpcntlo_vvvl,
2129 __builtin_ve_vl_pvpcntup_vvl,
2130 __builtin_ve_vl_pvpcntup_vvmvl,
2131 __builtin_ve_vl_pvpcntup_vvvl,
2132 __builtin_ve_vl_pvrcp_vvl,
2133 __builtin_ve_vl_pvrcp_vvvl,
2134 __builtin_ve_vl_pvrsqrt_vvl,
2135 __builtin_ve_vl_pvrsqrt_vvvl,
2136 __builtin_ve_vl_pvrsqrtnex_vvl,
2137 __builtin_ve_vl_pvrsqrtnex_vvvl,
2138 __builtin_ve_vl_pvseq_vl,
2139 __builtin_ve_vl_pvseq_vvl,
2140 __builtin_ve_vl_pvseqlo_vl,
2141 __builtin_ve_vl_pvseqlo_vvl,
2142 __builtin_ve_vl_pvsequp_vl,
2143 __builtin_ve_vl_pvsequp_vvl,
2144 __builtin_ve_vl_pvsla_vvsMvl,
2145 __builtin_ve_vl_pvsla_vvsl,
2146 __builtin_ve_vl_pvsla_vvsvl,
2147 __builtin_ve_vl_pvsla_vvvMvl,
2148 __builtin_ve_vl_pvsla_vvvl,
2149 __builtin_ve_vl_pvsla_vvvvl,
2150 __builtin_ve_vl_pvsll_vvsMvl,
2151 __builtin_ve_vl_pvsll_vvsl,
2152 __builtin_ve_vl_pvsll_vvsvl,
2153 __builtin_ve_vl_pvsll_vvvMvl,
2154 __builtin_ve_vl_pvsll_vvvl,
2155 __builtin_ve_vl_pvsll_vvvvl,
2156 __builtin_ve_vl_pvsra_vvsMvl,
2157 __builtin_ve_vl_pvsra_vvsl,
2158 __builtin_ve_vl_pvsra_vvsvl,
2159 __builtin_ve_vl_pvsra_vvvMvl,
2160 __builtin_ve_vl_pvsra_vvvl,
2161 __builtin_ve_vl_pvsra_vvvvl,
2162 __builtin_ve_vl_pvsrl_vvsMvl,
2163 __builtin_ve_vl_pvsrl_vvsl,
2164 __builtin_ve_vl_pvsrl_vvsvl,
2165 __builtin_ve_vl_pvsrl_vvvMvl,
2166 __builtin_ve_vl_pvsrl_vvvl,
2167 __builtin_ve_vl_pvsrl_vvvvl,
2168 __builtin_ve_vl_pvsubs_vsvMvl,
2169 __builtin_ve_vl_pvsubs_vsvl,
2170 __builtin_ve_vl_pvsubs_vsvvl,
2171 __builtin_ve_vl_pvsubs_vvvMvl,
2172 __builtin_ve_vl_pvsubs_vvvl,
2173 __builtin_ve_vl_pvsubs_vvvvl,
2174 __builtin_ve_vl_pvsubu_vsvMvl,
2175 __builtin_ve_vl_pvsubu_vsvl,
2176 __builtin_ve_vl_pvsubu_vsvvl,
2177 __builtin_ve_vl_pvsubu_vvvMvl,
2178 __builtin_ve_vl_pvsubu_vvvl,
2179 __builtin_ve_vl_pvsubu_vvvvl,
2180 __builtin_ve_vl_pvxor_vsvMvl,
2181 __builtin_ve_vl_pvxor_vsvl,
2182 __builtin_ve_vl_pvxor_vsvvl,
2183 __builtin_ve_vl_pvxor_vvvMvl,
2184 __builtin_ve_vl_pvxor_vvvl,
2185 __builtin_ve_vl_pvxor_vvvvl,
2186 __builtin_ve_vl_scr_sss,
2187 __builtin_ve_vl_svm_sMs,
2188 __builtin_ve_vl_svm_sms,
2189 __builtin_ve_vl_svob,
2190 __builtin_ve_vl_tovm_sml,
2191 __builtin_ve_vl_tscr_ssss,
2192 __builtin_ve_vl_vaddsl_vsvl,
2193 __builtin_ve_vl_vaddsl_vsvmvl,
2194 __builtin_ve_vl_vaddsl_vsvvl,
2195 __builtin_ve_vl_vaddsl_vvvl,
2196 __builtin_ve_vl_vaddsl_vvvmvl,
2197 __builtin_ve_vl_vaddsl_vvvvl,
2198 __builtin_ve_vl_vaddswsx_vsvl,
2199 __builtin_ve_vl_vaddswsx_vsvmvl,
2200 __builtin_ve_vl_vaddswsx_vsvvl,
2201 __builtin_ve_vl_vaddswsx_vvvl,
2202 __builtin_ve_vl_vaddswsx_vvvmvl,
2203 __builtin_ve_vl_vaddswsx_vvvvl,
2204 __builtin_ve_vl_vaddswzx_vsvl,
2205 __builtin_ve_vl_vaddswzx_vsvmvl,
2206 __builtin_ve_vl_vaddswzx_vsvvl,
2207 __builtin_ve_vl_vaddswzx_vvvl,
2208 __builtin_ve_vl_vaddswzx_vvvmvl,
2209 __builtin_ve_vl_vaddswzx_vvvvl,
2210 __builtin_ve_vl_vaddul_vsvl,
2211 __builtin_ve_vl_vaddul_vsvmvl,
2212 __builtin_ve_vl_vaddul_vsvvl,
2213 __builtin_ve_vl_vaddul_vvvl,
2214 __builtin_ve_vl_vaddul_vvvmvl,
2215 __builtin_ve_vl_vaddul_vvvvl,
2216 __builtin_ve_vl_vadduw_vsvl,
2217 __builtin_ve_vl_vadduw_vsvmvl,
2218 __builtin_ve_vl_vadduw_vsvvl,
2219 __builtin_ve_vl_vadduw_vvvl,
2220 __builtin_ve_vl_vadduw_vvvmvl,
2221 __builtin_ve_vl_vadduw_vvvvl,
2222 __builtin_ve_vl_vand_vsvl,
2223 __builtin_ve_vl_vand_vsvmvl,
2224 __builtin_ve_vl_vand_vsvvl,
2225 __builtin_ve_vl_vand_vvvl,
2226 __builtin_ve_vl_vand_vvvmvl,
2227 __builtin_ve_vl_vand_vvvvl,
2228 __builtin_ve_vl_vbrdd_vsl,
2229 __builtin_ve_vl_vbrdd_vsmvl,
2230 __builtin_ve_vl_vbrdd_vsvl,
2231 __builtin_ve_vl_vbrdl_vsl,
2232 __builtin_ve_vl_vbrdl_vsmvl,
2233 __builtin_ve_vl_vbrdl_vsvl,
2234 __builtin_ve_vl_vbrds_vsl,
2235 __builtin_ve_vl_vbrds_vsmvl,
2236 __builtin_ve_vl_vbrds_vsvl,
2237 __builtin_ve_vl_vbrdw_vsl,
2238 __builtin_ve_vl_vbrdw_vsmvl,
2239 __builtin_ve_vl_vbrdw_vsvl,
2240 __builtin_ve_vl_vbrv_vvl,
2241 __builtin_ve_vl_vbrv_vvmvl,
2242 __builtin_ve_vl_vbrv_vvvl,
2243 __builtin_ve_vl_vcmpsl_vsvl,
2244 __builtin_ve_vl_vcmpsl_vsvmvl,
2245 __builtin_ve_vl_vcmpsl_vsvvl,
2246 __builtin_ve_vl_vcmpsl_vvvl,
2247 __builtin_ve_vl_vcmpsl_vvvmvl,
2248 __builtin_ve_vl_vcmpsl_vvvvl,
2249 __builtin_ve_vl_vcmpswsx_vsvl,
2250 __builtin_ve_vl_vcmpswsx_vsvmvl,
2251 __builtin_ve_vl_vcmpswsx_vsvvl,
2252 __builtin_ve_vl_vcmpswsx_vvvl,
2253 __builtin_ve_vl_vcmpswsx_vvvmvl,
2254 __builtin_ve_vl_vcmpswsx_vvvvl,
2255 __builtin_ve_vl_vcmpswzx_vsvl,
2256 __builtin_ve_vl_vcmpswzx_vsvmvl,
2257 __builtin_ve_vl_vcmpswzx_vsvvl,
2258 __builtin_ve_vl_vcmpswzx_vvvl,
2259 __builtin_ve_vl_vcmpswzx_vvvmvl,
2260 __builtin_ve_vl_vcmpswzx_vvvvl,
2261 __builtin_ve_vl_vcmpul_vsvl,
2262 __builtin_ve_vl_vcmpul_vsvmvl,
2263 __builtin_ve_vl_vcmpul_vsvvl,
2264 __builtin_ve_vl_vcmpul_vvvl,
2265 __builtin_ve_vl_vcmpul_vvvmvl,
2266 __builtin_ve_vl_vcmpul_vvvvl,
2267 __builtin_ve_vl_vcmpuw_vsvl,
2268 __builtin_ve_vl_vcmpuw_vsvmvl,
2269 __builtin_ve_vl_vcmpuw_vsvvl,
2270 __builtin_ve_vl_vcmpuw_vvvl,
2271 __builtin_ve_vl_vcmpuw_vvvmvl,
2272 __builtin_ve_vl_vcmpuw_vvvvl,
2273 __builtin_ve_vl_vcp_vvmvl,
2274 __builtin_ve_vl_vcvtdl_vvl,
2275 __builtin_ve_vl_vcvtdl_vvvl,
2276 __builtin_ve_vl_vcvtds_vvl,
2277 __builtin_ve_vl_vcvtds_vvvl,
2278 __builtin_ve_vl_vcvtdw_vvl,
2279 __builtin_ve_vl_vcvtdw_vvvl,
2280 __builtin_ve_vl_vcvtld_vvl,
2281 __builtin_ve_vl_vcvtld_vvmvl,
2282 __builtin_ve_vl_vcvtld_vvvl,
2283 __builtin_ve_vl_vcvtldrz_vvl,
2284 __builtin_ve_vl_vcvtldrz_vvmvl,
2285 __builtin_ve_vl_vcvtldrz_vvvl,
2286 __builtin_ve_vl_vcvtsd_vvl,
2287 __builtin_ve_vl_vcvtsd_vvvl,
2288 __builtin_ve_vl_vcvtsw_vvl,
2289 __builtin_ve_vl_vcvtsw_vvvl,
2290 __builtin_ve_vl_vcvtwdsx_vvl,
2291 __builtin_ve_vl_vcvtwdsx_vvmvl,
2292 __builtin_ve_vl_vcvtwdsx_vvvl,
2293 __builtin_ve_vl_vcvtwdsxrz_vvl,
2294 __builtin_ve_vl_vcvtwdsxrz_vvmvl,
2295 __builtin_ve_vl_vcvtwdsxrz_vvvl,
2296 __builtin_ve_vl_vcvtwdzx_vvl,
2297 __builtin_ve_vl_vcvtwdzx_vvmvl,
2298 __builtin_ve_vl_vcvtwdzx_vvvl,
2299 __builtin_ve_vl_vcvtwdzxrz_vvl,
2300 __builtin_ve_vl_vcvtwdzxrz_vvmvl,
2301 __builtin_ve_vl_vcvtwdzxrz_vvvl,
2302 __builtin_ve_vl_vcvtwssx_vvl,
2303 __builtin_ve_vl_vcvtwssx_vvmvl,
2304 __builtin_ve_vl_vcvtwssx_vvvl,
2305 __builtin_ve_vl_vcvtwssxrz_vvl,
2306 __builtin_ve_vl_vcvtwssxrz_vvmvl,
2307 __builtin_ve_vl_vcvtwssxrz_vvvl,
2308 __builtin_ve_vl_vcvtwszx_vvl,
2309 __builtin_ve_vl_vcvtwszx_vvmvl,
2310 __builtin_ve_vl_vcvtwszx_vvvl,
2311 __builtin_ve_vl_vcvtwszxrz_vvl,
2312 __builtin_ve_vl_vcvtwszxrz_vvmvl,
2313 __builtin_ve_vl_vcvtwszxrz_vvvl,
2314 __builtin_ve_vl_vdivsl_vsvl,
2315 __builtin_ve_vl_vdivsl_vsvmvl,
2316 __builtin_ve_vl_vdivsl_vsvvl,
2317 __builtin_ve_vl_vdivsl_vvsl,
2318 __builtin_ve_vl_vdivsl_vvsmvl,
2319 __builtin_ve_vl_vdivsl_vvsvl,
2320 __builtin_ve_vl_vdivsl_vvvl,
2321 __builtin_ve_vl_vdivsl_vvvmvl,
2322 __builtin_ve_vl_vdivsl_vvvvl,
2323 __builtin_ve_vl_vdivswsx_vsvl,
2324 __builtin_ve_vl_vdivswsx_vsvmvl,
2325 __builtin_ve_vl_vdivswsx_vsvvl,
2326 __builtin_ve_vl_vdivswsx_vvsl,
2327 __builtin_ve_vl_vdivswsx_vvsmvl,
2328 __builtin_ve_vl_vdivswsx_vvsvl,
2329 __builtin_ve_vl_vdivswsx_vvvl,
2330 __builtin_ve_vl_vdivswsx_vvvmvl,
2331 __builtin_ve_vl_vdivswsx_vvvvl,
2332 __builtin_ve_vl_vdivswzx_vsvl,
2333 __builtin_ve_vl_vdivswzx_vsvmvl,
2334 __builtin_ve_vl_vdivswzx_vsvvl,
2335 __builtin_ve_vl_vdivswzx_vvsl,
2336 __builtin_ve_vl_vdivswzx_vvsmvl,
2337 __builtin_ve_vl_vdivswzx_vvsvl,
2338 __builtin_ve_vl_vdivswzx_vvvl,
2339 __builtin_ve_vl_vdivswzx_vvvmvl,
2340 __builtin_ve_vl_vdivswzx_vvvvl,
2341 __builtin_ve_vl_vdivul_vsvl,
2342 __builtin_ve_vl_vdivul_vsvmvl,
2343 __builtin_ve_vl_vdivul_vsvvl,
2344 __builtin_ve_vl_vdivul_vvsl,
2345 __builtin_ve_vl_vdivul_vvsmvl,
2346 __builtin_ve_vl_vdivul_vvsvl,
2347 __builtin_ve_vl_vdivul_vvvl,
2348 __builtin_ve_vl_vdivul_vvvmvl,
2349 __builtin_ve_vl_vdivul_vvvvl,
2350 __builtin_ve_vl_vdivuw_vsvl,
2351 __builtin_ve_vl_vdivuw_vsvmvl,
2352 __builtin_ve_vl_vdivuw_vsvvl,
2353 __builtin_ve_vl_vdivuw_vvsl,
2354 __builtin_ve_vl_vdivuw_vvsmvl,
2355 __builtin_ve_vl_vdivuw_vvsvl,
2356 __builtin_ve_vl_vdivuw_vvvl,
2357 __builtin_ve_vl_vdivuw_vvvmvl,
2358 __builtin_ve_vl_vdivuw_vvvvl,
2359 __builtin_ve_vl_veqv_vsvl,
2360 __builtin_ve_vl_veqv_vsvmvl,
2361 __builtin_ve_vl_veqv_vsvvl,
2362 __builtin_ve_vl_veqv_vvvl,
2363 __builtin_ve_vl_veqv_vvvmvl,
2364 __builtin_ve_vl_veqv_vvvvl,
2365 __builtin_ve_vl_vex_vvmvl,
2366 __builtin_ve_vl_vfaddd_vsvl,
2367 __builtin_ve_vl_vfaddd_vsvmvl,
2368 __builtin_ve_vl_vfaddd_vsvvl,
2369 __builtin_ve_vl_vfaddd_vvvl,
2370 __builtin_ve_vl_vfaddd_vvvmvl,
2371 __builtin_ve_vl_vfaddd_vvvvl,
2372 __builtin_ve_vl_vfadds_vsvl,
2373 __builtin_ve_vl_vfadds_vsvmvl,
2374 __builtin_ve_vl_vfadds_vsvvl,
2375 __builtin_ve_vl_vfadds_vvvl,
2376 __builtin_ve_vl_vfadds_vvvmvl,
2377 __builtin_ve_vl_vfadds_vvvvl,
2378 __builtin_ve_vl_vfcmpd_vsvl,
2379 __builtin_ve_vl_vfcmpd_vsvmvl,
2380 __builtin_ve_vl_vfcmpd_vsvvl,
2381 __builtin_ve_vl_vfcmpd_vvvl,
2382 __builtin_ve_vl_vfcmpd_vvvmvl,
2383 __builtin_ve_vl_vfcmpd_vvvvl,
2384 __builtin_ve_vl_vfcmps_vsvl,
2385 __builtin_ve_vl_vfcmps_vsvmvl,
2386 __builtin_ve_vl_vfcmps_vsvvl,
2387 __builtin_ve_vl_vfcmps_vvvl,
2388 __builtin_ve_vl_vfcmps_vvvmvl,
2389 __builtin_ve_vl_vfcmps_vvvvl,
2390 __builtin_ve_vl_vfdivd_vsvl,
2391 __builtin_ve_vl_vfdivd_vsvmvl,
2392 __builtin_ve_vl_vfdivd_vsvvl,
2393 __builtin_ve_vl_vfdivd_vvvl,
2394 __builtin_ve_vl_vfdivd_vvvmvl,
2395 __builtin_ve_vl_vfdivd_vvvvl,
2396 __builtin_ve_vl_vfdivs_vsvl,
2397 __builtin_ve_vl_vfdivs_vsvmvl,
2398 __builtin_ve_vl_vfdivs_vsvvl,
2399 __builtin_ve_vl_vfdivs_vvvl,
2400 __builtin_ve_vl_vfdivs_vvvmvl,
2401 __builtin_ve_vl_vfdivs_vvvvl,
2402 __builtin_ve_vl_vfmadd_vsvvl,
2403 __builtin_ve_vl_vfmadd_vsvvmvl,
2404 __builtin_ve_vl_vfmadd_vsvvvl,
2405 __builtin_ve_vl_vfmadd_vvsvl,
2406 __builtin_ve_vl_vfmadd_vvsvmvl,
2407 __builtin_ve_vl_vfmadd_vvsvvl,
2408 __builtin_ve_vl_vfmadd_vvvvl,
2409 __builtin_ve_vl_vfmadd_vvvvmvl,
2410 __builtin_ve_vl_vfmadd_vvvvvl,
2411 __builtin_ve_vl_vfmads_vsvvl,
2412 __builtin_ve_vl_vfmads_vsvvmvl,
2413 __builtin_ve_vl_vfmads_vsvvvl,
2414 __builtin_ve_vl_vfmads_vvsvl,
2415 __builtin_ve_vl_vfmads_vvsvmvl,
2416 __builtin_ve_vl_vfmads_vvsvvl,
2417 __builtin_ve_vl_vfmads_vvvvl,
2418 __builtin_ve_vl_vfmads_vvvvmvl,
2419 __builtin_ve_vl_vfmads_vvvvvl,
2420 __builtin_ve_vl_vfmaxd_vsvl,
2421 __builtin_ve_vl_vfmaxd_vsvmvl,
2422 __builtin_ve_vl_vfmaxd_vsvvl,
2423 __builtin_ve_vl_vfmaxd_vvvl,
2424 __builtin_ve_vl_vfmaxd_vvvmvl,
2425 __builtin_ve_vl_vfmaxd_vvvvl,
2426 __builtin_ve_vl_vfmaxs_vsvl,
2427 __builtin_ve_vl_vfmaxs_vsvmvl,
2428 __builtin_ve_vl_vfmaxs_vsvvl,
2429 __builtin_ve_vl_vfmaxs_vvvl,
2430 __builtin_ve_vl_vfmaxs_vvvmvl,
2431 __builtin_ve_vl_vfmaxs_vvvvl,
2432 __builtin_ve_vl_vfmind_vsvl,
2433 __builtin_ve_vl_vfmind_vsvmvl,
2434 __builtin_ve_vl_vfmind_vsvvl,
2435 __builtin_ve_vl_vfmind_vvvl,
2436 __builtin_ve_vl_vfmind_vvvmvl,
2437 __builtin_ve_vl_vfmind_vvvvl,
2438 __builtin_ve_vl_vfmins_vsvl,
2439 __builtin_ve_vl_vfmins_vsvmvl,
2440 __builtin_ve_vl_vfmins_vsvvl,
2441 __builtin_ve_vl_vfmins_vvvl,
2442 __builtin_ve_vl_vfmins_vvvmvl,
2443 __builtin_ve_vl_vfmins_vvvvl,
2444 __builtin_ve_vl_vfmkdeq_mvl,
2445 __builtin_ve_vl_vfmkdeq_mvml,
2446 __builtin_ve_vl_vfmkdeqnan_mvl,
2447 __builtin_ve_vl_vfmkdeqnan_mvml,
2448 __builtin_ve_vl_vfmkdge_mvl,
2449 __builtin_ve_vl_vfmkdge_mvml,
2450 __builtin_ve_vl_vfmkdgenan_mvl,
2451 __builtin_ve_vl_vfmkdgenan_mvml,
2452 __builtin_ve_vl_vfmkdgt_mvl,
2453 __builtin_ve_vl_vfmkdgt_mvml,
2454 __builtin_ve_vl_vfmkdgtnan_mvl,
2455 __builtin_ve_vl_vfmkdgtnan_mvml,
2456 __builtin_ve_vl_vfmkdle_mvl,
2457 __builtin_ve_vl_vfmkdle_mvml,
2458 __builtin_ve_vl_vfmkdlenan_mvl,
2459 __builtin_ve_vl_vfmkdlenan_mvml,
2460 __builtin_ve_vl_vfmkdlt_mvl,
2461 __builtin_ve_vl_vfmkdlt_mvml,
2462 __builtin_ve_vl_vfmkdltnan_mvl,
2463 __builtin_ve_vl_vfmkdltnan_mvml,
2464 __builtin_ve_vl_vfmkdnan_mvl,
2465 __builtin_ve_vl_vfmkdnan_mvml,
2466 __builtin_ve_vl_vfmkdne_mvl,
2467 __builtin_ve_vl_vfmkdne_mvml,
2468 __builtin_ve_vl_vfmkdnenan_mvl,
2469 __builtin_ve_vl_vfmkdnenan_mvml,
2470 __builtin_ve_vl_vfmkdnum_mvl,
2471 __builtin_ve_vl_vfmkdnum_mvml,
2472 __builtin_ve_vl_vfmklaf_ml,
2473 __builtin_ve_vl_vfmklat_ml,
2474 __builtin_ve_vl_vfmkleq_mvl,
2475 __builtin_ve_vl_vfmkleq_mvml,
2476 __builtin_ve_vl_vfmkleqnan_mvl,
2477 __builtin_ve_vl_vfmkleqnan_mvml,
2478 __builtin_ve_vl_vfmklge_mvl,
2479 __builtin_ve_vl_vfmklge_mvml,
2480 __builtin_ve_vl_vfmklgenan_mvl,
2481 __builtin_ve_vl_vfmklgenan_mvml,
2482 __builtin_ve_vl_vfmklgt_mvl,
2483 __builtin_ve_vl_vfmklgt_mvml,
2484 __builtin_ve_vl_vfmklgtnan_mvl,
2485 __builtin_ve_vl_vfmklgtnan_mvml,
2486 __builtin_ve_vl_vfmklle_mvl,
2487 __builtin_ve_vl_vfmklle_mvml,
2488 __builtin_ve_vl_vfmkllenan_mvl,
2489 __builtin_ve_vl_vfmkllenan_mvml,
2490 __builtin_ve_vl_vfmkllt_mvl,
2491 __builtin_ve_vl_vfmkllt_mvml,
2492 __builtin_ve_vl_vfmklltnan_mvl,
2493 __builtin_ve_vl_vfmklltnan_mvml,
2494 __builtin_ve_vl_vfmklnan_mvl,
2495 __builtin_ve_vl_vfmklnan_mvml,
2496 __builtin_ve_vl_vfmklne_mvl,
2497 __builtin_ve_vl_vfmklne_mvml,
2498 __builtin_ve_vl_vfmklnenan_mvl,
2499 __builtin_ve_vl_vfmklnenan_mvml,
2500 __builtin_ve_vl_vfmklnum_mvl,
2501 __builtin_ve_vl_vfmklnum_mvml,
2502 __builtin_ve_vl_vfmkseq_mvl,
2503 __builtin_ve_vl_vfmkseq_mvml,
2504 __builtin_ve_vl_vfmkseqnan_mvl,
2505 __builtin_ve_vl_vfmkseqnan_mvml,
2506 __builtin_ve_vl_vfmksge_mvl,
2507 __builtin_ve_vl_vfmksge_mvml,
2508 __builtin_ve_vl_vfmksgenan_mvl,
2509 __builtin_ve_vl_vfmksgenan_mvml,
2510 __builtin_ve_vl_vfmksgt_mvl,
2511 __builtin_ve_vl_vfmksgt_mvml,
2512 __builtin_ve_vl_vfmksgtnan_mvl,
2513 __builtin_ve_vl_vfmksgtnan_mvml,
2514 __builtin_ve_vl_vfmksle_mvl,
2515 __builtin_ve_vl_vfmksle_mvml,
2516 __builtin_ve_vl_vfmkslenan_mvl,
2517 __builtin_ve_vl_vfmkslenan_mvml,
2518 __builtin_ve_vl_vfmkslt_mvl,
2519 __builtin_ve_vl_vfmkslt_mvml,
2520 __builtin_ve_vl_vfmksltnan_mvl,
2521 __builtin_ve_vl_vfmksltnan_mvml,
2522 __builtin_ve_vl_vfmksnan_mvl,
2523 __builtin_ve_vl_vfmksnan_mvml,
2524 __builtin_ve_vl_vfmksne_mvl,
2525 __builtin_ve_vl_vfmksne_mvml,
2526 __builtin_ve_vl_vfmksnenan_mvl,
2527 __builtin_ve_vl_vfmksnenan_mvml,
2528 __builtin_ve_vl_vfmksnum_mvl,
2529 __builtin_ve_vl_vfmksnum_mvml,
2530 __builtin_ve_vl_vfmkweq_mvl,
2531 __builtin_ve_vl_vfmkweq_mvml,
2532 __builtin_ve_vl_vfmkweqnan_mvl,
2533 __builtin_ve_vl_vfmkweqnan_mvml,
2534 __builtin_ve_vl_vfmkwge_mvl,
2535 __builtin_ve_vl_vfmkwge_mvml,
2536 __builtin_ve_vl_vfmkwgenan_mvl,
2537 __builtin_ve_vl_vfmkwgenan_mvml,
2538 __builtin_ve_vl_vfmkwgt_mvl,
2539 __builtin_ve_vl_vfmkwgt_mvml,
2540 __builtin_ve_vl_vfmkwgtnan_mvl,
2541 __builtin_ve_vl_vfmkwgtnan_mvml,
2542 __builtin_ve_vl_vfmkwle_mvl,
2543 __builtin_ve_vl_vfmkwle_mvml,
2544 __builtin_ve_vl_vfmkwlenan_mvl,
2545 __builtin_ve_vl_vfmkwlenan_mvml,
2546 __builtin_ve_vl_vfmkwlt_mvl,
2547 __builtin_ve_vl_vfmkwlt_mvml,
2548 __builtin_ve_vl_vfmkwltnan_mvl,
2549 __builtin_ve_vl_vfmkwltnan_mvml,
2550 __builtin_ve_vl_vfmkwnan_mvl,
2551 __builtin_ve_vl_vfmkwnan_mvml,
2552 __builtin_ve_vl_vfmkwne_mvl,
2553 __builtin_ve_vl_vfmkwne_mvml,
2554 __builtin_ve_vl_vfmkwnenan_mvl,
2555 __builtin_ve_vl_vfmkwnenan_mvml,
2556 __builtin_ve_vl_vfmkwnum_mvl,
2557 __builtin_ve_vl_vfmkwnum_mvml,
2558 __builtin_ve_vl_vfmsbd_vsvvl,
2559 __builtin_ve_vl_vfmsbd_vsvvmvl,
2560 __builtin_ve_vl_vfmsbd_vsvvvl,
2561 __builtin_ve_vl_vfmsbd_vvsvl,
2562 __builtin_ve_vl_vfmsbd_vvsvmvl,
2563 __builtin_ve_vl_vfmsbd_vvsvvl,
2564 __builtin_ve_vl_vfmsbd_vvvvl,
2565 __builtin_ve_vl_vfmsbd_vvvvmvl,
2566 __builtin_ve_vl_vfmsbd_vvvvvl,
2567 __builtin_ve_vl_vfmsbs_vsvvl,
2568 __builtin_ve_vl_vfmsbs_vsvvmvl,
2569 __builtin_ve_vl_vfmsbs_vsvvvl,
2570 __builtin_ve_vl_vfmsbs_vvsvl,
2571 __builtin_ve_vl_vfmsbs_vvsvmvl,
2572 __builtin_ve_vl_vfmsbs_vvsvvl,
2573 __builtin_ve_vl_vfmsbs_vvvvl,
2574 __builtin_ve_vl_vfmsbs_vvvvmvl,
2575 __builtin_ve_vl_vfmsbs_vvvvvl,
2576 __builtin_ve_vl_vfmuld_vsvl,
2577 __builtin_ve_vl_vfmuld_vsvmvl,
2578 __builtin_ve_vl_vfmuld_vsvvl,
2579 __builtin_ve_vl_vfmuld_vvvl,
2580 __builtin_ve_vl_vfmuld_vvvmvl,
2581 __builtin_ve_vl_vfmuld_vvvvl,
2582 __builtin_ve_vl_vfmuls_vsvl,
2583 __builtin_ve_vl_vfmuls_vsvmvl,
2584 __builtin_ve_vl_vfmuls_vsvvl,
2585 __builtin_ve_vl_vfmuls_vvvl,
2586 __builtin_ve_vl_vfmuls_vvvmvl,
2587 __builtin_ve_vl_vfmuls_vvvvl,
2588 __builtin_ve_vl_vfnmadd_vsvvl,
2589 __builtin_ve_vl_vfnmadd_vsvvmvl,
2590 __builtin_ve_vl_vfnmadd_vsvvvl,
2591 __builtin_ve_vl_vfnmadd_vvsvl,
2592 __builtin_ve_vl_vfnmadd_vvsvmvl,
2593 __builtin_ve_vl_vfnmadd_vvsvvl,
2594 __builtin_ve_vl_vfnmadd_vvvvl,
2595 __builtin_ve_vl_vfnmadd_vvvvmvl,
2596 __builtin_ve_vl_vfnmadd_vvvvvl,
2597 __builtin_ve_vl_vfnmads_vsvvl,
2598 __builtin_ve_vl_vfnmads_vsvvmvl,
2599 __builtin_ve_vl_vfnmads_vsvvvl,
2600 __builtin_ve_vl_vfnmads_vvsvl,
2601 __builtin_ve_vl_vfnmads_vvsvmvl,
2602 __builtin_ve_vl_vfnmads_vvsvvl,
2603 __builtin_ve_vl_vfnmads_vvvvl,
2604 __builtin_ve_vl_vfnmads_vvvvmvl,
2605 __builtin_ve_vl_vfnmads_vvvvvl,
2606 __builtin_ve_vl_vfnmsbd_vsvvl,
2607 __builtin_ve_vl_vfnmsbd_vsvvmvl,
2608 __builtin_ve_vl_vfnmsbd_vsvvvl,
2609 __builtin_ve_vl_vfnmsbd_vvsvl,
2610 __builtin_ve_vl_vfnmsbd_vvsvmvl,
2611 __builtin_ve_vl_vfnmsbd_vvsvvl,
2612 __builtin_ve_vl_vfnmsbd_vvvvl,
2613 __builtin_ve_vl_vfnmsbd_vvvvmvl,
2614 __builtin_ve_vl_vfnmsbd_vvvvvl,
2615 __builtin_ve_vl_vfnmsbs_vsvvl,
2616 __builtin_ve_vl_vfnmsbs_vsvvmvl,
2617 __builtin_ve_vl_vfnmsbs_vsvvvl,
2618 __builtin_ve_vl_vfnmsbs_vvsvl,
2619 __builtin_ve_vl_vfnmsbs_vvsvmvl,
2620 __builtin_ve_vl_vfnmsbs_vvsvvl,
2621 __builtin_ve_vl_vfnmsbs_vvvvl,
2622 __builtin_ve_vl_vfnmsbs_vvvvmvl,
2623 __builtin_ve_vl_vfnmsbs_vvvvvl,
2624 __builtin_ve_vl_vfrmaxdfst_vvl,
2625 __builtin_ve_vl_vfrmaxdfst_vvvl,
2626 __builtin_ve_vl_vfrmaxdlst_vvl,
2627 __builtin_ve_vl_vfrmaxdlst_vvvl,
2628 __builtin_ve_vl_vfrmaxsfst_vvl,
2629 __builtin_ve_vl_vfrmaxsfst_vvvl,
2630 __builtin_ve_vl_vfrmaxslst_vvl,
2631 __builtin_ve_vl_vfrmaxslst_vvvl,
2632 __builtin_ve_vl_vfrmindfst_vvl,
2633 __builtin_ve_vl_vfrmindfst_vvvl,
2634 __builtin_ve_vl_vfrmindlst_vvl,
2635 __builtin_ve_vl_vfrmindlst_vvvl,
2636 __builtin_ve_vl_vfrminsfst_vvl,
2637 __builtin_ve_vl_vfrminsfst_vvvl,
2638 __builtin_ve_vl_vfrminslst_vvl,
2639 __builtin_ve_vl_vfrminslst_vvvl,
2640 __builtin_ve_vl_vfsqrtd_vvl,
2641 __builtin_ve_vl_vfsqrtd_vvvl,
2642 __builtin_ve_vl_vfsqrts_vvl,
2643 __builtin_ve_vl_vfsqrts_vvvl,
2644 __builtin_ve_vl_vfsubd_vsvl,
2645 __builtin_ve_vl_vfsubd_vsvmvl,
2646 __builtin_ve_vl_vfsubd_vsvvl,
2647 __builtin_ve_vl_vfsubd_vvvl,
2648 __builtin_ve_vl_vfsubd_vvvmvl,
2649 __builtin_ve_vl_vfsubd_vvvvl,
2650 __builtin_ve_vl_vfsubs_vsvl,
2651 __builtin_ve_vl_vfsubs_vsvmvl,
2652 __builtin_ve_vl_vfsubs_vsvvl,
2653 __builtin_ve_vl_vfsubs_vvvl,
2654 __builtin_ve_vl_vfsubs_vvvmvl,
2655 __builtin_ve_vl_vfsubs_vvvvl,
2656 __builtin_ve_vl_vfsumd_vvl,
2657 __builtin_ve_vl_vfsumd_vvml,
2658 __builtin_ve_vl_vfsums_vvl,
2659 __builtin_ve_vl_vfsums_vvml,
2660 __builtin_ve_vl_vgt_vvssl,
2661 __builtin_ve_vl_vgt_vvssml,
2662 __builtin_ve_vl_vgt_vvssmvl,
2663 __builtin_ve_vl_vgt_vvssvl,
2664 __builtin_ve_vl_vgtlsx_vvssl,
2665 __builtin_ve_vl_vgtlsx_vvssml,
2666 __builtin_ve_vl_vgtlsx_vvssmvl,
2667 __builtin_ve_vl_vgtlsx_vvssvl,
2668 __builtin_ve_vl_vgtlsxnc_vvssl,
2669 __builtin_ve_vl_vgtlsxnc_vvssml,
2670 __builtin_ve_vl_vgtlsxnc_vvssmvl,
2671 __builtin_ve_vl_vgtlsxnc_vvssvl,
2672 __builtin_ve_vl_vgtlzx_vvssl,
2673 __builtin_ve_vl_vgtlzx_vvssml,
2674 __builtin_ve_vl_vgtlzx_vvssmvl,
2675 __builtin_ve_vl_vgtlzx_vvssvl,
2676 __builtin_ve_vl_vgtlzxnc_vvssl,
2677 __builtin_ve_vl_vgtlzxnc_vvssml,
2678 __builtin_ve_vl_vgtlzxnc_vvssmvl,
2679 __builtin_ve_vl_vgtlzxnc_vvssvl,
2680 __builtin_ve_vl_vgtnc_vvssl,
2681 __builtin_ve_vl_vgtnc_vvssml,
2682 __builtin_ve_vl_vgtnc_vvssmvl,
2683 __builtin_ve_vl_vgtnc_vvssvl,
2684 __builtin_ve_vl_vgtu_vvssl,
2685 __builtin_ve_vl_vgtu_vvssml,
2686 __builtin_ve_vl_vgtu_vvssmvl,
2687 __builtin_ve_vl_vgtu_vvssvl,
2688 __builtin_ve_vl_vgtunc_vvssl,
2689 __builtin_ve_vl_vgtunc_vvssml,
2690 __builtin_ve_vl_vgtunc_vvssmvl,
2691 __builtin_ve_vl_vgtunc_vvssvl,
2692 __builtin_ve_vl_vld2d_vssl,
2693 __builtin_ve_vl_vld2d_vssvl,
2694 __builtin_ve_vl_vld2dnc_vssl,
2695 __builtin_ve_vl_vld2dnc_vssvl,
2696 __builtin_ve_vl_vld_vssl,
2697 __builtin_ve_vl_vld_vssvl,
2698 __builtin_ve_vl_vldl2dsx_vssl,
2699 __builtin_ve_vl_vldl2dsx_vssvl,
2700 __builtin_ve_vl_vldl2dsxnc_vssl,
2701 __builtin_ve_vl_vldl2dsxnc_vssvl,
2702 __builtin_ve_vl_vldl2dzx_vssl,
2703 __builtin_ve_vl_vldl2dzx_vssvl,
2704 __builtin_ve_vl_vldl2dzxnc_vssl,
2705 __builtin_ve_vl_vldl2dzxnc_vssvl,
2706 __builtin_ve_vl_vldlsx_vssl,
2707 __builtin_ve_vl_vldlsx_vssvl,
2708 __builtin_ve_vl_vldlsxnc_vssl,
2709 __builtin_ve_vl_vldlsxnc_vssvl,
2710 __builtin_ve_vl_vldlzx_vssl,
2711 __builtin_ve_vl_vldlzx_vssvl,
2712 __builtin_ve_vl_vldlzxnc_vssl,
2713 __builtin_ve_vl_vldlzxnc_vssvl,
2714 __builtin_ve_vl_vldnc_vssl,
2715 __builtin_ve_vl_vldnc_vssvl,
2716 __builtin_ve_vl_vldu2d_vssl,
2717 __builtin_ve_vl_vldu2d_vssvl,
2718 __builtin_ve_vl_vldu2dnc_vssl,
2719 __builtin_ve_vl_vldu2dnc_vssvl,
2720 __builtin_ve_vl_vldu_vssl,
2721 __builtin_ve_vl_vldu_vssvl,
2722 __builtin_ve_vl_vldunc_vssl,
2723 __builtin_ve_vl_vldunc_vssvl,
2724 __builtin_ve_vl_vldz_vvl,
2725 __builtin_ve_vl_vldz_vvmvl,
2726 __builtin_ve_vl_vldz_vvvl,
2727 __builtin_ve_vl_vmaxsl_vsvl,
2728 __builtin_ve_vl_vmaxsl_vsvmvl,
2729 __builtin_ve_vl_vmaxsl_vsvvl,
2730 __builtin_ve_vl_vmaxsl_vvvl,
2731 __builtin_ve_vl_vmaxsl_vvvmvl,
2732 __builtin_ve_vl_vmaxsl_vvvvl,
2733 __builtin_ve_vl_vmaxswsx_vsvl,
2734 __builtin_ve_vl_vmaxswsx_vsvmvl,
2735 __builtin_ve_vl_vmaxswsx_vsvvl,
2736 __builtin_ve_vl_vmaxswsx_vvvl,
2737 __builtin_ve_vl_vmaxswsx_vvvmvl,
2738 __builtin_ve_vl_vmaxswsx_vvvvl,
2739 __builtin_ve_vl_vmaxswzx_vsvl,
2740 __builtin_ve_vl_vmaxswzx_vsvmvl,
2741 __builtin_ve_vl_vmaxswzx_vsvvl,
2742 __builtin_ve_vl_vmaxswzx_vvvl,
2743 __builtin_ve_vl_vmaxswzx_vvvmvl,
2744 __builtin_ve_vl_vmaxswzx_vvvvl,
2745 __builtin_ve_vl_vminsl_vsvl,
2746 __builtin_ve_vl_vminsl_vsvmvl,
2747 __builtin_ve_vl_vminsl_vsvvl,
2748 __builtin_ve_vl_vminsl_vvvl,
2749 __builtin_ve_vl_vminsl_vvvmvl,
2750 __builtin_ve_vl_vminsl_vvvvl,
2751 __builtin_ve_vl_vminswsx_vsvl,
2752 __builtin_ve_vl_vminswsx_vsvmvl,
2753 __builtin_ve_vl_vminswsx_vsvvl,
2754 __builtin_ve_vl_vminswsx_vvvl,
2755 __builtin_ve_vl_vminswsx_vvvmvl,
2756 __builtin_ve_vl_vminswsx_vvvvl,
2757 __builtin_ve_vl_vminswzx_vsvl,
2758 __builtin_ve_vl_vminswzx_vsvmvl,
2759 __builtin_ve_vl_vminswzx_vsvvl,
2760 __builtin_ve_vl_vminswzx_vvvl,
2761 __builtin_ve_vl_vminswzx_vvvmvl,
2762 __builtin_ve_vl_vminswzx_vvvvl,
2763 __builtin_ve_vl_vmrg_vsvml,
2764 __builtin_ve_vl_vmrg_vsvmvl,
2765 __builtin_ve_vl_vmrg_vvvml,
2766 __builtin_ve_vl_vmrg_vvvmvl,
2767 __builtin_ve_vl_vmrgw_vsvMl,
2768 __builtin_ve_vl_vmrgw_vsvMvl,
2769 __builtin_ve_vl_vmrgw_vvvMl,
2770 __builtin_ve_vl_vmrgw_vvvMvl,
2771 __builtin_ve_vl_vmulsl_vsvl,
2772 __builtin_ve_vl_vmulsl_vsvmvl,
2773 __builtin_ve_vl_vmulsl_vsvvl,
2774 __builtin_ve_vl_vmulsl_vvvl,
2775 __builtin_ve_vl_vmulsl_vvvmvl,
2776 __builtin_ve_vl_vmulsl_vvvvl,
2777 __builtin_ve_vl_vmulslw_vsvl,
2778 __builtin_ve_vl_vmulslw_vsvvl,
2779 __builtin_ve_vl_vmulslw_vvvl,
2780 __builtin_ve_vl_vmulslw_vvvvl,
2781 __builtin_ve_vl_vmulswsx_vsvl,
2782 __builtin_ve_vl_vmulswsx_vsvmvl,
2783 __builtin_ve_vl_vmulswsx_vsvvl,
2784 __builtin_ve_vl_vmulswsx_vvvl,
2785 __builtin_ve_vl_vmulswsx_vvvmvl,
2786 __builtin_ve_vl_vmulswsx_vvvvl,
2787 __builtin_ve_vl_vmulswzx_vsvl,
2788 __builtin_ve_vl_vmulswzx_vsvmvl,
2789 __builtin_ve_vl_vmulswzx_vsvvl,
2790 __builtin_ve_vl_vmulswzx_vvvl,
2791 __builtin_ve_vl_vmulswzx_vvvmvl,
2792 __builtin_ve_vl_vmulswzx_vvvvl,
2793 __builtin_ve_vl_vmulul_vsvl,
2794 __builtin_ve_vl_vmulul_vsvmvl,
2795 __builtin_ve_vl_vmulul_vsvvl,
2796 __builtin_ve_vl_vmulul_vvvl,
2797 __builtin_ve_vl_vmulul_vvvmvl,
2798 __builtin_ve_vl_vmulul_vvvvl,
2799 __builtin_ve_vl_vmuluw_vsvl,
2800 __builtin_ve_vl_vmuluw_vsvmvl,
2801 __builtin_ve_vl_vmuluw_vsvvl,
2802 __builtin_ve_vl_vmuluw_vvvl,
2803 __builtin_ve_vl_vmuluw_vvvmvl,
2804 __builtin_ve_vl_vmuluw_vvvvl,
2805 __builtin_ve_vl_vmv_vsvl,
2806 __builtin_ve_vl_vmv_vsvmvl,
2807 __builtin_ve_vl_vmv_vsvvl,
2808 __builtin_ve_vl_vor_vsvl,
2809 __builtin_ve_vl_vor_vsvmvl,
2810 __builtin_ve_vl_vor_vsvvl,
2811 __builtin_ve_vl_vor_vvvl,
2812 __builtin_ve_vl_vor_vvvmvl,
2813 __builtin_ve_vl_vor_vvvvl,
2814 __builtin_ve_vl_vpcnt_vvl,
2815 __builtin_ve_vl_vpcnt_vvmvl,
2816 __builtin_ve_vl_vpcnt_vvvl,
2817 __builtin_ve_vl_vrand_vvl,
2818 __builtin_ve_vl_vrand_vvml,
2819 __builtin_ve_vl_vrcpd_vvl,
2820 __builtin_ve_vl_vrcpd_vvvl,
2821 __builtin_ve_vl_vrcps_vvl,
2822 __builtin_ve_vl_vrcps_vvvl,
2823 __builtin_ve_vl_vrmaxslfst_vvl,
2824 __builtin_ve_vl_vrmaxslfst_vvvl,
2825 __builtin_ve_vl_vrmaxsllst_vvl,
2826 __builtin_ve_vl_vrmaxsllst_vvvl,
2827 __builtin_ve_vl_vrmaxswfstsx_vvl,
2828 __builtin_ve_vl_vrmaxswfstsx_vvvl,
2829 __builtin_ve_vl_vrmaxswfstzx_vvl,
2830 __builtin_ve_vl_vrmaxswfstzx_vvvl,
2831 __builtin_ve_vl_vrmaxswlstsx_vvl,
2832 __builtin_ve_vl_vrmaxswlstsx_vvvl,
2833 __builtin_ve_vl_vrmaxswlstzx_vvl,
2834 __builtin_ve_vl_vrmaxswlstzx_vvvl,
2835 __builtin_ve_vl_vrminslfst_vvl,
2836 __builtin_ve_vl_vrminslfst_vvvl,
2837 __builtin_ve_vl_vrminsllst_vvl,
2838 __builtin_ve_vl_vrminsllst_vvvl,
2839 __builtin_ve_vl_vrminswfstsx_vvl,
2840 __builtin_ve_vl_vrminswfstsx_vvvl,
2841 __builtin_ve_vl_vrminswfstzx_vvl,
2842 __builtin_ve_vl_vrminswfstzx_vvvl,
2843 __builtin_ve_vl_vrminswlstsx_vvl,
2844 __builtin_ve_vl_vrminswlstsx_vvvl,
2845 __builtin_ve_vl_vrminswlstzx_vvl,
2846 __builtin_ve_vl_vrminswlstzx_vvvl,
2847 __builtin_ve_vl_vror_vvl,
2848 __builtin_ve_vl_vror_vvml,
2849 __builtin_ve_vl_vrsqrtd_vvl,
2850 __builtin_ve_vl_vrsqrtd_vvvl,
2851 __builtin_ve_vl_vrsqrtdnex_vvl,
2852 __builtin_ve_vl_vrsqrtdnex_vvvl,
2853 __builtin_ve_vl_vrsqrts_vvl,
2854 __builtin_ve_vl_vrsqrts_vvvl,
2855 __builtin_ve_vl_vrsqrtsnex_vvl,
2856 __builtin_ve_vl_vrsqrtsnex_vvvl,
2857 __builtin_ve_vl_vrxor_vvl,
2858 __builtin_ve_vl_vrxor_vvml,
2859 __builtin_ve_vl_vsc_vvssl,
2860 __builtin_ve_vl_vsc_vvssml,
2861 __builtin_ve_vl_vscl_vvssl,
2862 __builtin_ve_vl_vscl_vvssml,
2863 __builtin_ve_vl_vsclnc_vvssl,
2864 __builtin_ve_vl_vsclnc_vvssml,
2865 __builtin_ve_vl_vsclncot_vvssl,
2866 __builtin_ve_vl_vsclncot_vvssml,
2867 __builtin_ve_vl_vsclot_vvssl,
2868 __builtin_ve_vl_vsclot_vvssml,
2869 __builtin_ve_vl_vscnc_vvssl,
2870 __builtin_ve_vl_vscnc_vvssml,
2871 __builtin_ve_vl_vscncot_vvssl,
2872 __builtin_ve_vl_vscncot_vvssml,
2873 __builtin_ve_vl_vscot_vvssl,
2874 __builtin_ve_vl_vscot_vvssml,
2875 __builtin_ve_vl_vscu_vvssl,
2876 __builtin_ve_vl_vscu_vvssml,
2877 __builtin_ve_vl_vscunc_vvssl,
2878 __builtin_ve_vl_vscunc_vvssml,
2879 __builtin_ve_vl_vscuncot_vvssl,
2880 __builtin_ve_vl_vscuncot_vvssml,
2881 __builtin_ve_vl_vscuot_vvssl,
2882 __builtin_ve_vl_vscuot_vvssml,
2883 __builtin_ve_vl_vseq_vl,
2884 __builtin_ve_vl_vseq_vvl,
2885 __builtin_ve_vl_vsfa_vvssl,
2886 __builtin_ve_vl_vsfa_vvssmvl,
2887 __builtin_ve_vl_vsfa_vvssvl,
2888 __builtin_ve_vl_vshf_vvvsl,
2889 __builtin_ve_vl_vshf_vvvsvl,
2890 __builtin_ve_vl_vslal_vvsl,
2891 __builtin_ve_vl_vslal_vvsmvl,
2892 __builtin_ve_vl_vslal_vvsvl,
2893 __builtin_ve_vl_vslal_vvvl,
2894 __builtin_ve_vl_vslal_vvvmvl,
2895 __builtin_ve_vl_vslal_vvvvl,
2896 __builtin_ve_vl_vslawsx_vvsl,
2897 __builtin_ve_vl_vslawsx_vvsmvl,
2898 __builtin_ve_vl_vslawsx_vvsvl,
2899 __builtin_ve_vl_vslawsx_vvvl,
2900 __builtin_ve_vl_vslawsx_vvvmvl,
2901 __builtin_ve_vl_vslawsx_vvvvl,
2902 __builtin_ve_vl_vslawzx_vvsl,
2903 __builtin_ve_vl_vslawzx_vvsmvl,
2904 __builtin_ve_vl_vslawzx_vvsvl,
2905 __builtin_ve_vl_vslawzx_vvvl,
2906 __builtin_ve_vl_vslawzx_vvvmvl,
2907 __builtin_ve_vl_vslawzx_vvvvl,
2908 __builtin_ve_vl_vsll_vvsl,
2909 __builtin_ve_vl_vsll_vvsmvl,
2910 __builtin_ve_vl_vsll_vvsvl,
2911 __builtin_ve_vl_vsll_vvvl,
2912 __builtin_ve_vl_vsll_vvvmvl,
2913 __builtin_ve_vl_vsll_vvvvl,
2914 __builtin_ve_vl_vsral_vvsl,
2915 __builtin_ve_vl_vsral_vvsmvl,
2916 __builtin_ve_vl_vsral_vvsvl,
2917 __builtin_ve_vl_vsral_vvvl,
2918 __builtin_ve_vl_vsral_vvvmvl,
2919 __builtin_ve_vl_vsral_vvvvl,
2920 __builtin_ve_vl_vsrawsx_vvsl,
2921 __builtin_ve_vl_vsrawsx_vvsmvl,
2922 __builtin_ve_vl_vsrawsx_vvsvl,
2923 __builtin_ve_vl_vsrawsx_vvvl,
2924 __builtin_ve_vl_vsrawsx_vvvmvl,
2925 __builtin_ve_vl_vsrawsx_vvvvl,
2926 __builtin_ve_vl_vsrawzx_vvsl,
2927 __builtin_ve_vl_vsrawzx_vvsmvl,
2928 __builtin_ve_vl_vsrawzx_vvsvl,
2929 __builtin_ve_vl_vsrawzx_vvvl,
2930 __builtin_ve_vl_vsrawzx_vvvmvl,
2931 __builtin_ve_vl_vsrawzx_vvvvl,
2932 __builtin_ve_vl_vsrl_vvsl,
2933 __builtin_ve_vl_vsrl_vvsmvl,
2934 __builtin_ve_vl_vsrl_vvsvl,
2935 __builtin_ve_vl_vsrl_vvvl,
2936 __builtin_ve_vl_vsrl_vvvmvl,
2937 __builtin_ve_vl_vsrl_vvvvl,
2938 __builtin_ve_vl_vst2d_vssl,
2939 __builtin_ve_vl_vst2d_vssml,
2940 __builtin_ve_vl_vst2dnc_vssl,
2941 __builtin_ve_vl_vst2dnc_vssml,
2942 __builtin_ve_vl_vst2dncot_vssl,
2943 __builtin_ve_vl_vst2dncot_vssml,
2944 __builtin_ve_vl_vst2dot_vssl,
2945 __builtin_ve_vl_vst2dot_vssml,
2946 __builtin_ve_vl_vst_vssl,
2947 __builtin_ve_vl_vst_vssml,
2948 __builtin_ve_vl_vstl2d_vssl,
2949 __builtin_ve_vl_vstl2d_vssml,
2950 __builtin_ve_vl_vstl2dnc_vssl,
2951 __builtin_ve_vl_vstl2dnc_vssml,
2952 __builtin_ve_vl_vstl2dncot_vssl,
2953 __builtin_ve_vl_vstl2dncot_vssml,
2954 __builtin_ve_vl_vstl2dot_vssl,
2955 __builtin_ve_vl_vstl2dot_vssml,
2956 __builtin_ve_vl_vstl_vssl,
2957 __builtin_ve_vl_vstl_vssml,
2958 __builtin_ve_vl_vstlnc_vssl,
2959 __builtin_ve_vl_vstlnc_vssml,
2960 __builtin_ve_vl_vstlncot_vssl,
2961 __builtin_ve_vl_vstlncot_vssml,
2962 __builtin_ve_vl_vstlot_vssl,
2963 __builtin_ve_vl_vstlot_vssml,
2964 __builtin_ve_vl_vstnc_vssl,
2965 __builtin_ve_vl_vstnc_vssml,
2966 __builtin_ve_vl_vstncot_vssl,
2967 __builtin_ve_vl_vstncot_vssml,
2968 __builtin_ve_vl_vstot_vssl,
2969 __builtin_ve_vl_vstot_vssml,
2970 __builtin_ve_vl_vstu2d_vssl,
2971 __builtin_ve_vl_vstu2d_vssml,
2972 __builtin_ve_vl_vstu2dnc_vssl,
2973 __builtin_ve_vl_vstu2dnc_vssml,
2974 __builtin_ve_vl_vstu2dncot_vssl,
2975 __builtin_ve_vl_vstu2dncot_vssml,
2976 __builtin_ve_vl_vstu2dot_vssl,
2977 __builtin_ve_vl_vstu2dot_vssml,
2978 __builtin_ve_vl_vstu_vssl,
2979 __builtin_ve_vl_vstu_vssml,
2980 __builtin_ve_vl_vstunc_vssl,
2981 __builtin_ve_vl_vstunc_vssml,
2982 __builtin_ve_vl_vstuncot_vssl,
2983 __builtin_ve_vl_vstuncot_vssml,
2984 __builtin_ve_vl_vstuot_vssl,
2985 __builtin_ve_vl_vstuot_vssml,
2986 __builtin_ve_vl_vsubsl_vsvl,
2987 __builtin_ve_vl_vsubsl_vsvmvl,
2988 __builtin_ve_vl_vsubsl_vsvvl,
2989 __builtin_ve_vl_vsubsl_vvvl,
2990 __builtin_ve_vl_vsubsl_vvvmvl,
2991 __builtin_ve_vl_vsubsl_vvvvl,
2992 __builtin_ve_vl_vsubswsx_vsvl,
2993 __builtin_ve_vl_vsubswsx_vsvmvl,
2994 __builtin_ve_vl_vsubswsx_vsvvl,
2995 __builtin_ve_vl_vsubswsx_vvvl,
2996 __builtin_ve_vl_vsubswsx_vvvmvl,
2997 __builtin_ve_vl_vsubswsx_vvvvl,
2998 __builtin_ve_vl_vsubswzx_vsvl,
2999 __builtin_ve_vl_vsubswzx_vsvmvl,
3000 __builtin_ve_vl_vsubswzx_vsvvl,
3001 __builtin_ve_vl_vsubswzx_vvvl,
3002 __builtin_ve_vl_vsubswzx_vvvmvl,
3003 __builtin_ve_vl_vsubswzx_vvvvl,
3004 __builtin_ve_vl_vsubul_vsvl,
3005 __builtin_ve_vl_vsubul_vsvmvl,
3006 __builtin_ve_vl_vsubul_vsvvl,
3007 __builtin_ve_vl_vsubul_vvvl,
3008 __builtin_ve_vl_vsubul_vvvmvl,
3009 __builtin_ve_vl_vsubul_vvvvl,
3010 __builtin_ve_vl_vsubuw_vsvl,
3011 __builtin_ve_vl_vsubuw_vsvmvl,
3012 __builtin_ve_vl_vsubuw_vsvvl,
3013 __builtin_ve_vl_vsubuw_vvvl,
3014 __builtin_ve_vl_vsubuw_vvvmvl,
3015 __builtin_ve_vl_vsubuw_vvvvl,
3016 __builtin_ve_vl_vsuml_vvl,
3017 __builtin_ve_vl_vsuml_vvml,
3018 __builtin_ve_vl_vsumwsx_vvl,
3019 __builtin_ve_vl_vsumwsx_vvml,
3020 __builtin_ve_vl_vsumwzx_vvl,
3021 __builtin_ve_vl_vsumwzx_vvml,
3022 __builtin_ve_vl_vxor_vsvl,
3023 __builtin_ve_vl_vxor_vsvmvl,
3024 __builtin_ve_vl_vxor_vsvvl,
3025 __builtin_ve_vl_vxor_vvvl,
3026 __builtin_ve_vl_vxor_vvvmvl,
3027 __builtin_ve_vl_vxor_vvvvl,
3028 __builtin_ve_vl_xorm_MMM,
3029 __builtin_ve_vl_xorm_mmm,
3030 __builtin_vfprintf,
3031 __builtin_vfscanf,
3032 __builtin_vprintf,
3033 __builtin_vscanf,
3034 __builtin_vsnprintf,
3035 __builtin_vsprintf,
3036 __builtin_vsscanf,
3037 __builtin_wasm_max_f32,
3038 __builtin_wasm_max_f64,
3039 __builtin_wasm_memory_grow,
3040 __builtin_wasm_memory_size,
3041 __builtin_wasm_min_f32,
3042 __builtin_wasm_min_f64,
3043 __builtin_wasm_trunc_s_i32_f32,
3044 __builtin_wasm_trunc_s_i32_f64,
3045 __builtin_wasm_trunc_s_i64_f32,
3046 __builtin_wasm_trunc_s_i64_f64,
3047 __builtin_wasm_trunc_u_i32_f32,
3048 __builtin_wasm_trunc_u_i32_f64,
3049 __builtin_wasm_trunc_u_i64_f32,
3050 __builtin_wasm_trunc_u_i64_f64,
3051 __builtin_wcschr,
3052 __builtin_wcscmp,
3053 __builtin_wcslen,
3054 __builtin_wcsncmp,
3055 __builtin_wmemchr,
3056 __builtin_wmemcmp,
3057 __builtin_wmemcpy,
3058 __builtin_wmemmove,
3059 __c11_atomic_compare_exchange_strong,
3060 __c11_atomic_compare_exchange_weak,
3061 __c11_atomic_exchange,
3062 __c11_atomic_fetch_add,
3063 __c11_atomic_fetch_and,
3064 __c11_atomic_fetch_max,
3065 __c11_atomic_fetch_min,
3066 __c11_atomic_fetch_nand,
3067 __c11_atomic_fetch_or,
3068 __c11_atomic_fetch_sub,
3069 __c11_atomic_fetch_xor,
3070 __c11_atomic_init,
3071 __c11_atomic_is_lock_free,
3072 __c11_atomic_load,
3073 __c11_atomic_signal_fence,
3074 __c11_atomic_store,
3075 __c11_atomic_thread_fence,
3076 __clear_cache,
3077 __cospi,
3078 __cospif,
3079 __debugbreak,
3080 __dmb,
3081 __dsb,
3082 __emit,
3083 __exception_code,
3084 __exception_info,
3085 __exp10,
3086 __exp10f,
3087 __fastfail,
3088 __finite,
3089 __finitef,
3090 __finitel,
3091 __isb,
3092 __iso_volatile_load16,
3093 __iso_volatile_load32,
3094 __iso_volatile_load64,
3095 __iso_volatile_load8,
3096 __iso_volatile_store16,
3097 __iso_volatile_store32,
3098 __iso_volatile_store64,
3099 __iso_volatile_store8,
3100 __ldrexd,
3101 __lzcnt,
3102 __lzcnt16,
3103 __lzcnt64,
3104 __noop,
3105 __nvvm_add_rm_d,
3106 __nvvm_add_rm_f,
3107 __nvvm_add_rm_ftz_f,
3108 __nvvm_add_rn_d,
3109 __nvvm_add_rn_f,
3110 __nvvm_add_rn_ftz_f,
3111 __nvvm_add_rp_d,
3112 __nvvm_add_rp_f,
3113 __nvvm_add_rp_ftz_f,
3114 __nvvm_add_rz_d,
3115 __nvvm_add_rz_f,
3116 __nvvm_add_rz_ftz_f,
3117 __nvvm_atom_add_gen_f,
3118 __nvvm_atom_add_gen_i,
3119 __nvvm_atom_add_gen_l,
3120 __nvvm_atom_add_gen_ll,
3121 __nvvm_atom_and_gen_i,
3122 __nvvm_atom_and_gen_l,
3123 __nvvm_atom_and_gen_ll,
3124 __nvvm_atom_cas_gen_i,
3125 __nvvm_atom_cas_gen_l,
3126 __nvvm_atom_cas_gen_ll,
3127 __nvvm_atom_dec_gen_ui,
3128 __nvvm_atom_inc_gen_ui,
3129 __nvvm_atom_max_gen_i,
3130 __nvvm_atom_max_gen_l,
3131 __nvvm_atom_max_gen_ll,
3132 __nvvm_atom_max_gen_ui,
3133 __nvvm_atom_max_gen_ul,
3134 __nvvm_atom_max_gen_ull,
3135 __nvvm_atom_min_gen_i,
3136 __nvvm_atom_min_gen_l,
3137 __nvvm_atom_min_gen_ll,
3138 __nvvm_atom_min_gen_ui,
3139 __nvvm_atom_min_gen_ul,
3140 __nvvm_atom_min_gen_ull,
3141 __nvvm_atom_or_gen_i,
3142 __nvvm_atom_or_gen_l,
3143 __nvvm_atom_or_gen_ll,
3144 __nvvm_atom_sub_gen_i,
3145 __nvvm_atom_sub_gen_l,
3146 __nvvm_atom_sub_gen_ll,
3147 __nvvm_atom_xchg_gen_i,
3148 __nvvm_atom_xchg_gen_l,
3149 __nvvm_atom_xchg_gen_ll,
3150 __nvvm_atom_xor_gen_i,
3151 __nvvm_atom_xor_gen_l,
3152 __nvvm_atom_xor_gen_ll,
3153 __nvvm_bar0_and,
3154 __nvvm_bar0_or,
3155 __nvvm_bar0_popc,
3156 __nvvm_bar_sync,
3157 __nvvm_bitcast_d2ll,
3158 __nvvm_bitcast_f2i,
3159 __nvvm_bitcast_i2f,
3160 __nvvm_bitcast_ll2d,
3161 __nvvm_ceil_d,
3162 __nvvm_ceil_f,
3163 __nvvm_ceil_ftz_f,
3164 __nvvm_compiler_error,
3165 __nvvm_compiler_warn,
3166 __nvvm_cos_approx_f,
3167 __nvvm_cos_approx_ftz_f,
3168 __nvvm_d2f_rm,
3169 __nvvm_d2f_rm_ftz,
3170 __nvvm_d2f_rn,
3171 __nvvm_d2f_rn_ftz,
3172 __nvvm_d2f_rp,
3173 __nvvm_d2f_rp_ftz,
3174 __nvvm_d2f_rz,
3175 __nvvm_d2f_rz_ftz,
3176 __nvvm_d2i_hi,
3177 __nvvm_d2i_lo,
3178 __nvvm_d2i_rm,
3179 __nvvm_d2i_rn,
3180 __nvvm_d2i_rp,
3181 __nvvm_d2i_rz,
3182 __nvvm_d2ll_rm,
3183 __nvvm_d2ll_rn,
3184 __nvvm_d2ll_rp,
3185 __nvvm_d2ll_rz,
3186 __nvvm_d2ui_rm,
3187 __nvvm_d2ui_rn,
3188 __nvvm_d2ui_rp,
3189 __nvvm_d2ui_rz,
3190 __nvvm_d2ull_rm,
3191 __nvvm_d2ull_rn,
3192 __nvvm_d2ull_rp,
3193 __nvvm_d2ull_rz,
3194 __nvvm_div_approx_f,
3195 __nvvm_div_approx_ftz_f,
3196 __nvvm_div_rm_d,
3197 __nvvm_div_rm_f,
3198 __nvvm_div_rm_ftz_f,
3199 __nvvm_div_rn_d,
3200 __nvvm_div_rn_f,
3201 __nvvm_div_rn_ftz_f,
3202 __nvvm_div_rp_d,
3203 __nvvm_div_rp_f,
3204 __nvvm_div_rp_ftz_f,
3205 __nvvm_div_rz_d,
3206 __nvvm_div_rz_f,
3207 __nvvm_div_rz_ftz_f,
3208 __nvvm_ex2_approx_d,
3209 __nvvm_ex2_approx_f,
3210 __nvvm_ex2_approx_ftz_f,
3211 __nvvm_f2h_rn,
3212 __nvvm_f2h_rn_ftz,
3213 __nvvm_f2i_rm,
3214 __nvvm_f2i_rm_ftz,
3215 __nvvm_f2i_rn,
3216 __nvvm_f2i_rn_ftz,
3217 __nvvm_f2i_rp,
3218 __nvvm_f2i_rp_ftz,
3219 __nvvm_f2i_rz,
3220 __nvvm_f2i_rz_ftz,
3221 __nvvm_f2ll_rm,
3222 __nvvm_f2ll_rm_ftz,
3223 __nvvm_f2ll_rn,
3224 __nvvm_f2ll_rn_ftz,
3225 __nvvm_f2ll_rp,
3226 __nvvm_f2ll_rp_ftz,
3227 __nvvm_f2ll_rz,
3228 __nvvm_f2ll_rz_ftz,
3229 __nvvm_f2ui_rm,
3230 __nvvm_f2ui_rm_ftz,
3231 __nvvm_f2ui_rn,
3232 __nvvm_f2ui_rn_ftz,
3233 __nvvm_f2ui_rp,
3234 __nvvm_f2ui_rp_ftz,
3235 __nvvm_f2ui_rz,
3236 __nvvm_f2ui_rz_ftz,
3237 __nvvm_f2ull_rm,
3238 __nvvm_f2ull_rm_ftz,
3239 __nvvm_f2ull_rn,
3240 __nvvm_f2ull_rn_ftz,
3241 __nvvm_f2ull_rp,
3242 __nvvm_f2ull_rp_ftz,
3243 __nvvm_f2ull_rz,
3244 __nvvm_f2ull_rz_ftz,
3245 __nvvm_fabs_d,
3246 __nvvm_fabs_f,
3247 __nvvm_fabs_ftz_f,
3248 __nvvm_floor_d,
3249 __nvvm_floor_f,
3250 __nvvm_floor_ftz_f,
3251 __nvvm_fma_rm_d,
3252 __nvvm_fma_rm_f,
3253 __nvvm_fma_rm_ftz_f,
3254 __nvvm_fma_rn_d,
3255 __nvvm_fma_rn_f,
3256 __nvvm_fma_rn_ftz_f,
3257 __nvvm_fma_rp_d,
3258 __nvvm_fma_rp_f,
3259 __nvvm_fma_rp_ftz_f,
3260 __nvvm_fma_rz_d,
3261 __nvvm_fma_rz_f,
3262 __nvvm_fma_rz_ftz_f,
3263 __nvvm_fmax_d,
3264 __nvvm_fmax_f,
3265 __nvvm_fmax_ftz_f,
3266 __nvvm_fmin_d,
3267 __nvvm_fmin_f,
3268 __nvvm_fmin_ftz_f,
3269 __nvvm_i2d_rm,
3270 __nvvm_i2d_rn,
3271 __nvvm_i2d_rp,
3272 __nvvm_i2d_rz,
3273 __nvvm_i2f_rm,
3274 __nvvm_i2f_rn,
3275 __nvvm_i2f_rp,
3276 __nvvm_i2f_rz,
3277 __nvvm_isspacep_const,
3278 __nvvm_isspacep_global,
3279 __nvvm_isspacep_local,
3280 __nvvm_isspacep_shared,
3281 __nvvm_ldg_c,
3282 __nvvm_ldg_c2,
3283 __nvvm_ldg_c4,
3284 __nvvm_ldg_d,
3285 __nvvm_ldg_d2,
3286 __nvvm_ldg_f,
3287 __nvvm_ldg_f2,
3288 __nvvm_ldg_f4,
3289 __nvvm_ldg_h,
3290 __nvvm_ldg_h2,
3291 __nvvm_ldg_i,
3292 __nvvm_ldg_i2,
3293 __nvvm_ldg_i4,
3294 __nvvm_ldg_l,
3295 __nvvm_ldg_l2,
3296 __nvvm_ldg_ll,
3297 __nvvm_ldg_ll2,
3298 __nvvm_ldg_s,
3299 __nvvm_ldg_s2,
3300 __nvvm_ldg_s4,
3301 __nvvm_ldg_sc,
3302 __nvvm_ldg_sc2,
3303 __nvvm_ldg_sc4,
3304 __nvvm_ldg_uc,
3305 __nvvm_ldg_uc2,
3306 __nvvm_ldg_uc4,
3307 __nvvm_ldg_ui,
3308 __nvvm_ldg_ui2,
3309 __nvvm_ldg_ui4,
3310 __nvvm_ldg_ul,
3311 __nvvm_ldg_ul2,
3312 __nvvm_ldg_ull,
3313 __nvvm_ldg_ull2,
3314 __nvvm_ldg_us,
3315 __nvvm_ldg_us2,
3316 __nvvm_ldg_us4,
3317 __nvvm_ldu_c,
3318 __nvvm_ldu_c2,
3319 __nvvm_ldu_c4,
3320 __nvvm_ldu_d,
3321 __nvvm_ldu_d2,
3322 __nvvm_ldu_f,
3323 __nvvm_ldu_f2,
3324 __nvvm_ldu_f4,
3325 __nvvm_ldu_h,
3326 __nvvm_ldu_h2,
3327 __nvvm_ldu_i,
3328 __nvvm_ldu_i2,
3329 __nvvm_ldu_i4,
3330 __nvvm_ldu_l,
3331 __nvvm_ldu_l2,
3332 __nvvm_ldu_ll,
3333 __nvvm_ldu_ll2,
3334 __nvvm_ldu_s,
3335 __nvvm_ldu_s2,
3336 __nvvm_ldu_s4,
3337 __nvvm_ldu_sc,
3338 __nvvm_ldu_sc2,
3339 __nvvm_ldu_sc4,
3340 __nvvm_ldu_uc,
3341 __nvvm_ldu_uc2,
3342 __nvvm_ldu_uc4,
3343 __nvvm_ldu_ui,
3344 __nvvm_ldu_ui2,
3345 __nvvm_ldu_ui4,
3346 __nvvm_ldu_ul,
3347 __nvvm_ldu_ul2,
3348 __nvvm_ldu_ull,
3349 __nvvm_ldu_ull2,
3350 __nvvm_ldu_us,
3351 __nvvm_ldu_us2,
3352 __nvvm_ldu_us4,
3353 __nvvm_lg2_approx_d,
3354 __nvvm_lg2_approx_f,
3355 __nvvm_lg2_approx_ftz_f,
3356 __nvvm_ll2d_rm,
3357 __nvvm_ll2d_rn,
3358 __nvvm_ll2d_rp,
3359 __nvvm_ll2d_rz,
3360 __nvvm_ll2f_rm,
3361 __nvvm_ll2f_rn,
3362 __nvvm_ll2f_rp,
3363 __nvvm_ll2f_rz,
3364 __nvvm_lohi_i2d,
3365 __nvvm_membar_cta,
3366 __nvvm_membar_gl,
3367 __nvvm_membar_sys,
3368 __nvvm_memcpy,
3369 __nvvm_memset,
3370 __nvvm_mul24_i,
3371 __nvvm_mul24_ui,
3372 __nvvm_mul_rm_d,
3373 __nvvm_mul_rm_f,
3374 __nvvm_mul_rm_ftz_f,
3375 __nvvm_mul_rn_d,
3376 __nvvm_mul_rn_f,
3377 __nvvm_mul_rn_ftz_f,
3378 __nvvm_mul_rp_d,
3379 __nvvm_mul_rp_f,
3380 __nvvm_mul_rp_ftz_f,
3381 __nvvm_mul_rz_d,
3382 __nvvm_mul_rz_f,
3383 __nvvm_mul_rz_ftz_f,
3384 __nvvm_mulhi_i,
3385 __nvvm_mulhi_ll,
3386 __nvvm_mulhi_ui,
3387 __nvvm_mulhi_ull,
3388 __nvvm_prmt,
3389 __nvvm_rcp_approx_ftz_d,
3390 __nvvm_rcp_approx_ftz_f,
3391 __nvvm_rcp_rm_d,
3392 __nvvm_rcp_rm_f,
3393 __nvvm_rcp_rm_ftz_f,
3394 __nvvm_rcp_rn_d,
3395 __nvvm_rcp_rn_f,
3396 __nvvm_rcp_rn_ftz_f,
3397 __nvvm_rcp_rp_d,
3398 __nvvm_rcp_rp_f,
3399 __nvvm_rcp_rp_ftz_f,
3400 __nvvm_rcp_rz_d,
3401 __nvvm_rcp_rz_f,
3402 __nvvm_rcp_rz_ftz_f,
3403 __nvvm_read_ptx_sreg_clock,
3404 __nvvm_read_ptx_sreg_clock64,
3405 __nvvm_read_ptx_sreg_ctaid_w,
3406 __nvvm_read_ptx_sreg_ctaid_x,
3407 __nvvm_read_ptx_sreg_ctaid_y,
3408 __nvvm_read_ptx_sreg_ctaid_z,
3409 __nvvm_read_ptx_sreg_gridid,
3410 __nvvm_read_ptx_sreg_laneid,
3411 __nvvm_read_ptx_sreg_lanemask_eq,
3412 __nvvm_read_ptx_sreg_lanemask_ge,
3413 __nvvm_read_ptx_sreg_lanemask_gt,
3414 __nvvm_read_ptx_sreg_lanemask_le,
3415 __nvvm_read_ptx_sreg_lanemask_lt,
3416 __nvvm_read_ptx_sreg_nctaid_w,
3417 __nvvm_read_ptx_sreg_nctaid_x,
3418 __nvvm_read_ptx_sreg_nctaid_y,
3419 __nvvm_read_ptx_sreg_nctaid_z,
3420 __nvvm_read_ptx_sreg_nsmid,
3421 __nvvm_read_ptx_sreg_ntid_w,
3422 __nvvm_read_ptx_sreg_ntid_x,
3423 __nvvm_read_ptx_sreg_ntid_y,
3424 __nvvm_read_ptx_sreg_ntid_z,
3425 __nvvm_read_ptx_sreg_nwarpid,
3426 __nvvm_read_ptx_sreg_pm0,
3427 __nvvm_read_ptx_sreg_pm1,
3428 __nvvm_read_ptx_sreg_pm2,
3429 __nvvm_read_ptx_sreg_pm3,
3430 __nvvm_read_ptx_sreg_smid,
3431 __nvvm_read_ptx_sreg_tid_w,
3432 __nvvm_read_ptx_sreg_tid_x,
3433 __nvvm_read_ptx_sreg_tid_y,
3434 __nvvm_read_ptx_sreg_tid_z,
3435 __nvvm_read_ptx_sreg_warpid,
3436 __nvvm_round_d,
3437 __nvvm_round_f,
3438 __nvvm_round_ftz_f,
3439 __nvvm_rsqrt_approx_d,
3440 __nvvm_rsqrt_approx_f,
3441 __nvvm_rsqrt_approx_ftz_f,
3442 __nvvm_sad_i,
3443 __nvvm_sad_ui,
3444 __nvvm_saturate_d,
3445 __nvvm_saturate_f,
3446 __nvvm_saturate_ftz_f,
3447 __nvvm_shfl_bfly_f32,
3448 __nvvm_shfl_bfly_i32,
3449 __nvvm_shfl_down_f32,
3450 __nvvm_shfl_down_i32,
3451 __nvvm_shfl_idx_f32,
3452 __nvvm_shfl_idx_i32,
3453 __nvvm_shfl_up_f32,
3454 __nvvm_shfl_up_i32,
3455 __nvvm_sin_approx_f,
3456 __nvvm_sin_approx_ftz_f,
3457 __nvvm_sqrt_approx_f,
3458 __nvvm_sqrt_approx_ftz_f,
3459 __nvvm_sqrt_rm_d,
3460 __nvvm_sqrt_rm_f,
3461 __nvvm_sqrt_rm_ftz_f,
3462 __nvvm_sqrt_rn_d,
3463 __nvvm_sqrt_rn_f,
3464 __nvvm_sqrt_rn_ftz_f,
3465 __nvvm_sqrt_rp_d,
3466 __nvvm_sqrt_rp_f,
3467 __nvvm_sqrt_rp_ftz_f,
3468 __nvvm_sqrt_rz_d,
3469 __nvvm_sqrt_rz_f,
3470 __nvvm_sqrt_rz_ftz_f,
3471 __nvvm_trunc_d,
3472 __nvvm_trunc_f,
3473 __nvvm_trunc_ftz_f,
3474 __nvvm_ui2d_rm,
3475 __nvvm_ui2d_rn,
3476 __nvvm_ui2d_rp,
3477 __nvvm_ui2d_rz,
3478 __nvvm_ui2f_rm,
3479 __nvvm_ui2f_rn,
3480 __nvvm_ui2f_rp,
3481 __nvvm_ui2f_rz,
3482 __nvvm_ull2d_rm,
3483 __nvvm_ull2d_rn,
3484 __nvvm_ull2d_rp,
3485 __nvvm_ull2d_rz,
3486 __nvvm_ull2f_rm,
3487 __nvvm_ull2f_rn,
3488 __nvvm_ull2f_rp,
3489 __nvvm_ull2f_rz,
3490 __nvvm_vote_all,
3491 __nvvm_vote_any,
3492 __nvvm_vote_ballot,
3493 __nvvm_vote_uni,
3494 __popcnt,
3495 __popcnt16,
3496 __popcnt64,
3497 __rdtsc,
3498 __sev,
3499 __sevl,
3500 __sigsetjmp,
3501 __sinpi,
3502 __sinpif,
3503 __sync_add_and_fetch,
3504 __sync_add_and_fetch_1,
3505 __sync_add_and_fetch_16,
3506 __sync_add_and_fetch_2,
3507 __sync_add_and_fetch_4,
3508 __sync_add_and_fetch_8,
3509 __sync_and_and_fetch,
3510 __sync_and_and_fetch_1,
3511 __sync_and_and_fetch_16,
3512 __sync_and_and_fetch_2,
3513 __sync_and_and_fetch_4,
3514 __sync_and_and_fetch_8,
3515 __sync_bool_compare_and_swap,
3516 __sync_bool_compare_and_swap_1,
3517 __sync_bool_compare_and_swap_16,
3518 __sync_bool_compare_and_swap_2,
3519 __sync_bool_compare_and_swap_4,
3520 __sync_bool_compare_and_swap_8,
3521 __sync_fetch_and_add,
3522 __sync_fetch_and_add_1,
3523 __sync_fetch_and_add_16,
3524 __sync_fetch_and_add_2,
3525 __sync_fetch_and_add_4,
3526 __sync_fetch_and_add_8,
3527 __sync_fetch_and_and,
3528 __sync_fetch_and_and_1,
3529 __sync_fetch_and_and_16,
3530 __sync_fetch_and_and_2,
3531 __sync_fetch_and_and_4,
3532 __sync_fetch_and_and_8,
3533 __sync_fetch_and_max,
3534 __sync_fetch_and_min,
3535 __sync_fetch_and_nand,
3536 __sync_fetch_and_nand_1,
3537 __sync_fetch_and_nand_16,
3538 __sync_fetch_and_nand_2,
3539 __sync_fetch_and_nand_4,
3540 __sync_fetch_and_nand_8,
3541 __sync_fetch_and_or,
3542 __sync_fetch_and_or_1,
3543 __sync_fetch_and_or_16,
3544 __sync_fetch_and_or_2,
3545 __sync_fetch_and_or_4,
3546 __sync_fetch_and_or_8,
3547 __sync_fetch_and_sub,
3548 __sync_fetch_and_sub_1,
3549 __sync_fetch_and_sub_16,
3550 __sync_fetch_and_sub_2,
3551 __sync_fetch_and_sub_4,
3552 __sync_fetch_and_sub_8,
3553 __sync_fetch_and_umax,
3554 __sync_fetch_and_umin,
3555 __sync_fetch_and_xor,
3556 __sync_fetch_and_xor_1,
3557 __sync_fetch_and_xor_16,
3558 __sync_fetch_and_xor_2,
3559 __sync_fetch_and_xor_4,
3560 __sync_fetch_and_xor_8,
3561 __sync_lock_release,
3562 __sync_lock_release_1,
3563 __sync_lock_release_16,
3564 __sync_lock_release_2,
3565 __sync_lock_release_4,
3566 __sync_lock_release_8,
3567 __sync_lock_test_and_set,
3568 __sync_lock_test_and_set_1,
3569 __sync_lock_test_and_set_16,
3570 __sync_lock_test_and_set_2,
3571 __sync_lock_test_and_set_4,
3572 __sync_lock_test_and_set_8,
3573 __sync_nand_and_fetch,
3574 __sync_nand_and_fetch_1,
3575 __sync_nand_and_fetch_16,
3576 __sync_nand_and_fetch_2,
3577 __sync_nand_and_fetch_4,
3578 __sync_nand_and_fetch_8,
3579 __sync_or_and_fetch,
3580 __sync_or_and_fetch_1,
3581 __sync_or_and_fetch_16,
3582 __sync_or_and_fetch_2,
3583 __sync_or_and_fetch_4,
3584 __sync_or_and_fetch_8,
3585 __sync_sub_and_fetch,
3586 __sync_sub_and_fetch_1,
3587 __sync_sub_and_fetch_16,
3588 __sync_sub_and_fetch_2,
3589 __sync_sub_and_fetch_4,
3590 __sync_sub_and_fetch_8,
3591 __sync_swap,
3592 __sync_swap_1,
3593 __sync_swap_16,
3594 __sync_swap_2,
3595 __sync_swap_4,
3596 __sync_swap_8,
3597 __sync_synchronize,
3598 __sync_val_compare_and_swap,
3599 __sync_val_compare_and_swap_1,
3600 __sync_val_compare_and_swap_16,
3601 __sync_val_compare_and_swap_2,
3602 __sync_val_compare_and_swap_4,
3603 __sync_val_compare_and_swap_8,
3604 __sync_xor_and_fetch,
3605 __sync_xor_and_fetch_1,
3606 __sync_xor_and_fetch_16,
3607 __sync_xor_and_fetch_2,
3608 __sync_xor_and_fetch_4,
3609 __sync_xor_and_fetch_8,
3610 __syncthreads,
3611 __tanpi,
3612 __tanpif,
3613 __va_start,
3614 __warn_memset_zero_len,
3615 __wfe,
3616 __wfi,
3617 __xray_customevent,
3618 __xray_typedevent,
3619 __yield,
3620 _abnormal_termination,
3621 _alloca,
3622 _bittest,
3623 _bittest64,
3624 _bittestandcomplement,
3625 _bittestandcomplement64,
3626 _bittestandreset,
3627 _bittestandreset64,
3628 _bittestandset,
3629 _bittestandset64,
3630 _byteswap_uint64,
3631 _byteswap_ulong,
3632 _byteswap_ushort,
3633 _exception_code,
3634 _exception_info,
3635 _exit,
3636 _interlockedbittestandreset,
3637 _interlockedbittestandreset64,
3638 _interlockedbittestandreset_acq,
3639 _interlockedbittestandreset_nf,
3640 _interlockedbittestandreset_rel,
3641 _interlockedbittestandset,
3642 _interlockedbittestandset64,
3643 _interlockedbittestandset_acq,
3644 _interlockedbittestandset_nf,
3645 _interlockedbittestandset_rel,
3646 _longjmp,
3647 _lrotl,
3648 _lrotr,
3649 _rotl,
3650 _rotl16,
3651 _rotl64,
3652 _rotl8,
3653 _rotr,
3654 _rotr16,
3655 _rotr64,
3656 _rotr8,
3657 _setjmp,
3658 _setjmpex,
3659 abort,
3660 abs,
3661 acos,
3662 acosf,
3663 acosh,
3664 acoshf,
3665 acoshl,
3666 acosl,
3667 aligned_alloc,
3668 alloca,
3669 asin,
3670 asinf,
3671 asinh,
3672 asinhf,
3673 asinhl,
3674 asinl,
3675 atan,
3676 atan2,
3677 atan2f,
3678 atan2l,
3679 atanf,
3680 atanh,
3681 atanhf,
3682 atanhl,
3683 atanl,
3684 bcmp,
3685 bcopy,
3686 bzero,
3687 cabs,
3688 cabsf,
3689 cabsl,
3690 cacos,
3691 cacosf,
3692 cacosh,
3693 cacoshf,
3694 cacoshl,
3695 cacosl,
3696 calloc,
3697 carg,
3698 cargf,
3699 cargl,
3700 casin,
3701 casinf,
3702 casinh,
3703 casinhf,
3704 casinhl,
3705 casinl,
3706 catan,
3707 catanf,
3708 catanh,
3709 catanhf,
3710 catanhl,
3711 catanl,
3712 cbrt,
3713 cbrtf,
3714 cbrtl,
3715 ccos,
3716 ccosf,
3717 ccosh,
3718 ccoshf,
3719 ccoshl,
3720 ccosl,
3721 ceil,
3722 ceilf,
3723 ceill,
3724 cexp,
3725 cexpf,
3726 cexpl,
3727 cimag,
3728 cimagf,
3729 cimagl,
3730 clog,
3731 clogf,
3732 clogl,
3733 conj,
3734 conjf,
3735 conjl,
3736 copysign,
3737 copysignf,
3738 copysignl,
3739 cos,
3740 cosf,
3741 cosh,
3742 coshf,
3743 coshl,
3744 cosl,
3745 cpow,
3746 cpowf,
3747 cpowl,
3748 cproj,
3749 cprojf,
3750 cprojl,
3751 creal,
3752 crealf,
3753 creall,
3754 csin,
3755 csinf,
3756 csinh,
3757 csinhf,
3758 csinhl,
3759 csinl,
3760 csqrt,
3761 csqrtf,
3762 csqrtl,
3763 ctan,
3764 ctanf,
3765 ctanh,
3766 ctanhf,
3767 ctanhl,
3768 ctanl,
3769 erf,
3770 erfc,
3771 erfcf,
3772 erfcl,
3773 erff,
3774 erfl,
3775 exit,
3776 exp,
3777 exp2,
3778 exp2f,
3779 exp2l,
3780 expf,
3781 expl,
3782 expm1,
3783 expm1f,
3784 expm1l,
3785 fabs,
3786 fabsf,
3787 fabsl,
3788 fdim,
3789 fdimf,
3790 fdiml,
3791 finite,
3792 finitef,
3793 finitel,
3794 floor,
3795 floorf,
3796 floorl,
3797 fma,
3798 fmaf,
3799 fmal,
3800 fmax,
3801 fmaxf,
3802 fmaxl,
3803 fmin,
3804 fminf,
3805 fminl,
3806 fmod,
3807 fmodf,
3808 fmodl,
3809 fopen,
3810 fprintf,
3811 fread,
3812 free,
3813 frexp,
3814 frexpf,
3815 frexpl,
3816 fscanf,
3817 fwrite,
3818 getcontext,
3819 hypot,
3820 hypotf,
3821 hypotl,
3822 ilogb,
3823 ilogbf,
3824 ilogbl,
3825 index,
3826 isalnum,
3827 isalpha,
3828 isblank,
3829 iscntrl,
3830 isdigit,
3831 isgraph,
3832 islower,
3833 isprint,
3834 ispunct,
3835 isspace,
3836 isupper,
3837 isxdigit,
3838 labs,
3839 ldexp,
3840 ldexpf,
3841 ldexpl,
3842 lgamma,
3843 lgammaf,
3844 lgammal,
3845 llabs,
3846 llrint,
3847 llrintf,
3848 llrintl,
3849 llround,
3850 llroundf,
3851 llroundl,
3852 log,
3853 log10,
3854 log10f,
3855 log10l,
3856 log1p,
3857 log1pf,
3858 log1pl,
3859 log2,
3860 log2f,
3861 log2l,
3862 logb,
3863 logbf,
3864 logbl,
3865 logf,
3866 logl,
3867 longjmp,
3868 lrint,
3869 lrintf,
3870 lrintl,
3871 lround,
3872 lroundf,
3873 lroundl,
3874 malloc,
3875 memalign,
3876 memccpy,
3877 memchr,
3878 memcmp,
3879 memcpy,
3880 memmove,
3881 mempcpy,
3882 memset,
3883 modf,
3884 modff,
3885 modfl,
3886 nan,
3887 nanf,
3888 nanl,
3889 nearbyint,
3890 nearbyintf,
3891 nearbyintl,
3892 nextafter,
3893 nextafterf,
3894 nextafterl,
3895 nexttoward,
3896 nexttowardf,
3897 nexttowardl,
3898 pow,
3899 powf,
3900 powl,
3901 printf,
3902 realloc,
3903 remainder,
3904 remainderf,
3905 remainderl,
3906 remquo,
3907 remquof,
3908 remquol,
3909 rindex,
3910 rint,
3911 rintf,
3912 rintl,
3913 round,
3914 roundeven,
3915 roundevenf,
3916 roundevenl,
3917 roundf,
3918 roundl,
3919 savectx,
3920 scalbln,
3921 scalblnf,
3922 scalblnl,
3923 scalbn,
3924 scalbnf,
3925 scalbnl,
3926 scanf,
3927 setjmp,
3928 siglongjmp,
3929 sigsetjmp,
3930 sin,
3931 sinf,
3932 sinh,
3933 sinhf,
3934 sinhl,
3935 sinl,
3936 snprintf,
3937 sprintf,
3938 sqrt,
3939 sqrtf,
3940 sqrtl,
3941 sscanf,
3942 stpcpy,
3943 stpncpy,
3944 strcasecmp,
3945 strcat,
3946 strchr,
3947 strcmp,
3948 strcpy,
3949 strcspn,
3950 strdup,
3951 strerror,
3952 strlcat,
3953 strlcpy,
3954 strlen,
3955 strncasecmp,
3956 strncat,
3957 strncmp,
3958 strncpy,
3959 strndup,
3960 strpbrk,
3961 strrchr,
3962 strspn,
3963 strstr,
3964 strtod,
3965 strtof,
3966 strtok,
3967 strtol,
3968 strtold,
3969 strtoll,
3970 strtoul,
3971 strtoull,
3972 strxfrm,
3973 tan,
3974 tanf,
3975 tanh,
3976 tanhf,
3977 tanhl,
3978 tanl,
3979 tgamma,
3980 tgammaf,
3981 tgammal,
3982 tolower,
3983 toupper,
3984 trunc,
3985 truncf,
3986 truncl,
3987 va_copy,
3988 va_end,
3989 va_start,
3990 vfork,
3991 vfprintf,
3992 vfscanf,
3993 vprintf,
3994 vscanf,
3995 vsnprintf,
3996 vsprintf,
3997 vsscanf,
3998 wcschr,
3999 wcscmp,
4000 wcslen,
4001 wcsncmp,
4002 wmemchr,
4003 wmemcmp,
4004 wmemcpy,
4005 wmemmove,
4006};
174007
184008const Self = @This();
194009
......@@ -71,7 +4061,7 @@ pub const longest_name = 43;
714061/// If found, returns the index of the node within the `dafsa` array.
724062/// Otherwise, returns `null`.
734063pub fn findInList(first_child_index: u16, char: u8) ?u16 {
74 @setEvalBranchQuota(7972);
4064 @setEvalBranchQuota(7982);
754065 var index = first_child_index;
764066 while (true) {
774067 if (dafsa[index].char == char) return index;
......@@ -119,7 +4109,7 @@ pub fn nameFromUniqueIndex(index: u16, buf: []u8) []u8 {
1194109
1204110 var node_index: u16 = 0;
1214111 var count: u16 = index;
122 var w: std.Io.Writer = .fixed(buf);
4112 var w = std.Io.Writer.fixed(buf);
1234113
1244114 while (true) {
1254115 var sibling_index = dafsa[node_index].child_index;
......@@ -176,7 +4166,7 @@ const Node = packed struct(u64) {
1764166
1774167const dafsa = [_]Node{
1784168 .{ .char = 0, .end_of_word = false, .end_of_list = true, .number = 0, .child_index = 1 },
179 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 3639, .child_index = 19 },
4169 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 3644, .child_index = 19 },
1804170 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 25, .child_index = 32 },
1814171 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 37 },
1824172 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 82, .child_index = 39 },
......@@ -199,7 +4189,7 @@ const dafsa = [_]Node{
1994189 .{ .char = 'I', .end_of_word = false, .end_of_list = false, .number = 29, .child_index = 104 },
2004190 .{ .char = 'M', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 105 },
2014191 .{ .char = 'R', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 106 },
202 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 3563, .child_index = 107 },
4192 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 3568, .child_index = 107 },
2034193 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 125 },
2044194 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 11, .child_index = 127 },
2054195 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 129 },
......@@ -284,7 +4274,7 @@ const dafsa = [_]Node{
2844274 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 241 },
2854275 .{ .char = 'G', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 242 },
2864276 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 34, .child_index = 243 },
287 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 2967, .child_index = 248 },
4277 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 2972, .child_index = 248 },
2884278 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 20, .child_index = 249 },
2894279 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 252 },
2904280 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 255 },
......@@ -423,7 +4413,7 @@ const dafsa = [_]Node{
4234413 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 404 },
4244414 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 405 },
4254415 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 30, .child_index = 406 },
426 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2967, .child_index = 407 },
4416 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2972, .child_index = 407 },
4274417 .{ .char = '1', .end_of_word = false, .end_of_list = false, .number = 17, .child_index = 408 },
4284418 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 409 },
4294419 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 410 },
......@@ -582,7 +4572,7 @@ const dafsa = [_]Node{
5824572 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 534 },
5834573 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 535 },
5844574 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 30, .child_index = 536 },
585 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2967, .child_index = 537 },
4575 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2972, .child_index = 537 },
5864576 .{ .char = '1', .end_of_word = false, .end_of_list = true, .number = 17, .child_index = 538 },
5874577 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 539 },
5884578 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 540 },
......@@ -712,7 +4702,7 @@ const dafsa = [_]Node{
7124702 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 625 },
7134703 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 626 },
7144704 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 30, .child_index = 627 },
715 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2967, .child_index = 628 },
4705 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2972, .child_index = 628 },
7164706 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 17, .child_index = 629 },
7174707 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 630 },
7184708 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 631 },
......@@ -803,7 +4793,7 @@ const dafsa = [_]Node{
8034793 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 675 },
8044794 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 572 },
8054795 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 30, .child_index = 676 },
806 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2967, .child_index = 677 },
4796 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2972, .child_index = 677 },
8074797 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 17, .child_index = 678 },
8084798 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 679 },
8094799 .{ .char = 'i', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 680 },
......@@ -852,7 +4842,7 @@ const dafsa = [_]Node{
8524842 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 731 },
8534843 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 732 },
8544844 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 30, .child_index = 733 },
855 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2967, .child_index = 734 },
4845 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2972, .child_index = 734 },
8564846 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 17, .child_index = 735 },
8574847 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 736 },
8584848 .{ .char = 'f', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
......@@ -909,7 +4899,7 @@ const dafsa = [_]Node{
9094899 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 804 },
9104900 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 805 },
9114901 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 30, .child_index = 806 },
912 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2967, .child_index = 818 },
4902 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2972, .child_index = 818 },
9134903 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 17, .child_index = 819 },
9144904 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 820 },
9154905 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 821 },
......@@ -993,7 +4983,7 @@ const dafsa = [_]Node{
9934983 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 905 },
9944984 .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 908 },
9954985 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 910 },
996 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2967, .child_index = 911 },
4986 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2972, .child_index = 911 },
9974987 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 17, .child_index = 932 },
9984988 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 933 },
9994989 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 934 },
......@@ -1088,8 +5078,8 @@ const dafsa = [_]Node{
10885078 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 904 },
10895079 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 28, .child_index = 1018 },
10905080 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 302, .child_index = 1019 },
1091 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 11, .child_index = 1028 },
1092 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 114, .child_index = 1032 },
5081 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 1028 },
5082 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 115, .child_index = 1032 },
10935083 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 1044 },
10945084 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 58, .child_index = 1049 },
10955085 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 49, .child_index = 1053 },
......@@ -1099,707 +5089,716 @@ const dafsa = [_]Node{
10995089 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 52, .child_index = 1068 },
11005090 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 686, .child_index = 1074 },
11015091 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 25, .child_index = 1080 },
1102 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 1083 },
1103 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 142, .child_index = 1086 },
1104 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 52, .child_index = 1091 },
1105 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 71, .child_index = 1095 },
1106 .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 19, .child_index = 1107 },
1107 .{ .char = 'u', .end_of_word = false, .end_of_list = false, .number = 13, .child_index = 1111 },
1108 .{ .char = 'v', .end_of_word = false, .end_of_list = false, .number = 1273, .child_index = 1115 },
1109 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 22, .child_index = 1120 },
1110 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 17, .child_index = 1123 },
1111 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1124 },
5092 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 7, .child_index = 1083 },
5093 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 142, .child_index = 1087 },
5094 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 52, .child_index = 1092 },
5095 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 71, .child_index = 1096 },
5096 .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 20, .child_index = 1108 },
5097 .{ .char = 'u', .end_of_word = false, .end_of_list = false, .number = 13, .child_index = 1113 },
5098 .{ .char = 'v', .end_of_word = false, .end_of_list = false, .number = 1274, .child_index = 1117 },
5099 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 22, .child_index = 1122 },
5100 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 17, .child_index = 1125 },
5101 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1126 },
11125102 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 521 },
1113 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1125 },
1114 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 1126 },
1115 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 36, .child_index = 1127 },
1116 .{ .char = '0', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1128 },
1117 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1129 },
1118 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1130 },
1119 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1131 },
1120 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1132 },
1121 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1133 },
1122 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1134 },
1123 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1135 },
5103 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1127 },
5104 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 1128 },
5105 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 36, .child_index = 1129 },
5106 .{ .char = '0', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1130 },
5107 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1131 },
5108 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1132 },
5109 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1133 },
5110 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1134 },
5111 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1135 },
5112 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1136 },
5113 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1137 },
11245114 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 960 },
11255115 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 960 },
11265116 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 946 },
1127 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 14, .child_index = 1138 },
1128 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1140 },
1129 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1141 },
5117 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 14, .child_index = 1140 },
5118 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1142 },
5119 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1143 },
11305120 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 944 },
11315121 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 944 },
11325122 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 952 },
1133 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1131 },
1134 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1142 },
1135 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 1126 },
1136 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1131 },
1137 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1131 },
1138 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1143 },
1139 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1144 },
1140 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 36, .child_index = 1145 },
1141 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1153 },
1142 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1154 },
5123 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1133 },
5124 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1144 },
5125 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 1128 },
5126 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1133 },
5127 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1133 },
5128 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1145 },
5129 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1146 },
5130 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 36, .child_index = 1147 },
5131 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1155 },
5132 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1156 },
11435133 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 292 },
11445134 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 486 },
1145 .{ .char = '2', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1155 },
1146 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 1126 },
1147 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1156 },
1148 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 14, .child_index = 1157 },
1149 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 33, .child_index = 1159 },
1150 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1160 },
1151 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1161 },
1152 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1162 },
1153 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1164 },
1154 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1165 },
5135 .{ .char = '2', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1157 },
5136 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 1128 },
5137 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1158 },
5138 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 14, .child_index = 1159 },
5139 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 33, .child_index = 1161 },
5140 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1162 },
5141 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1163 },
5142 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1164 },
5143 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1166 },
5144 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1167 },
11555145 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 14, .child_index = 949 },
1156 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1166 },
1157 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1167 },
1158 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 40, .child_index = 1168 },
1159 .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 1169 },
1160 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1170 },
1161 .{ .char = 'p', .end_of_word = true, .end_of_list = true, .number = 6, .child_index = 1171 },
1162 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1172 },
1163 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1173 },
1164 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1174 },
1165 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1175 },
1166 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1176 },
1167 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1177 },
5146 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1168 },
5147 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1169 },
5148 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 40, .child_index = 1170 },
5149 .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 1171 },
5150 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1172 },
5151 .{ .char = 'p', .end_of_word = true, .end_of_list = true, .number = 6, .child_index = 1173 },
5152 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1174 },
5153 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1175 },
5154 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1176 },
5155 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1177 },
11685156 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1178 },
1169 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1179 },
1170 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1182 },
1171 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1185 },
1172 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 1187 },
1173 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1188 },
1174 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 29, .child_index = 1189 },
1175 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1196 },
1176 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1197 },
1177 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1198 },
1178 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1199 },
5157 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1179 },
5158 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1180 },
5159 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1181 },
5160 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1184 },
5161 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1187 },
5162 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 1189 },
5163 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1190 },
5164 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 29, .child_index = 1191 },
5165 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1198 },
5166 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1199 },
5167 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1200 },
5168 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1201 },
11795169 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1012 },
1180 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1200 },
1181 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1201 },
1182 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1202 },
1183 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1203 },
1184 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1204 },
1185 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1205 },
1186 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1206 },
5170 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1202 },
5171 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1203 },
5172 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1204 },
5173 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1205 },
5174 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1206 },
5175 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1207 },
5176 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1208 },
11875177 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1012 },
11885178 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1012 },
11895179 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1001 },
1190 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1207 },
1191 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1208 },
1192 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1209 },
5180 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1209 },
5181 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1210 },
5182 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1211 },
11935183 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1012 },
1194 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1210 },
1195 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1211 },
1196 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 28, .child_index = 1212 },
5184 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1212 },
5185 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1213 },
5186 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 28, .child_index = 1214 },
11975187 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 135 },
1198 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 1221 },
1199 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 1222 },
1200 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 1223 },
1201 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 122, .child_index = 1225 },
5188 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 1223 },
5189 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 1224 },
5190 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 1225 },
5191 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 122, .child_index = 1227 },
12025192 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 403 },
1203 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 134, .child_index = 1226 },
1204 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 11, .child_index = 1227 },
1205 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 1229 },
5193 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 134, .child_index = 1228 },
5194 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 11, .child_index = 1229 },
5195 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 1231 },
12065196 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 142 },
1207 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 1230 },
1208 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1231 },
5197 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 1232 },
5198 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1233 },
12095199 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 144 },
1210 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 30, .child_index = 1232 },
1211 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1239 },
5200 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 30, .child_index = 1234 },
5201 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1241 },
12125202 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 137 },
1213 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 1240 },
1214 .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1242 },
5203 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 1242 },
5204 .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1244 },
12155205 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 154 },
1216 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 11, .child_index = 1243 },
1217 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 20, .child_index = 1247 },
1218 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 1251 },
5206 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 11, .child_index = 1246 },
5207 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 20, .child_index = 1250 },
5208 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 1254 },
12195209 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 161 },
12205210 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 162 },
1221 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 1254 },
1222 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1256 },
1223 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1257 },
1224 .{ .char = 'u', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1258 },
1225 .{ .char = 'w', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1259 },
1226 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1260 },
1227 .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1261 },
1228 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 25, .child_index = 1262 },
1229 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 1263 },
1230 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 23, .child_index = 1264 },
1231 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 1266 },
1232 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1267 },
1233 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1268 },
1234 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 1269 },
1235 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 20, .child_index = 1271 },
1236 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1274 },
1237 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 1276 },
5211 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 1257 },
5212 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1259 },
5213 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1260 },
5214 .{ .char = 'u', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1261 },
5215 .{ .char = 'w', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1262 },
5216 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1263 },
5217 .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1264 },
5218 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 25, .child_index = 1265 },
5219 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 1266 },
5220 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 23, .child_index = 1267 },
5221 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 1269 },
5222 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1270 },
5223 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1271 },
5224 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 1272 },
5225 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 20, .child_index = 1274 },
5226 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1277 },
5227 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 1279 },
12385228 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 178 },
1239 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1279 },
1240 .{ .char = 'u', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 1280 },
1241 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1281 },
1242 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1282 },
1243 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1283 },
1244 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 7, .child_index = 1284 },
1245 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 13, .child_index = 1287 },
1246 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1294 },
1247 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 1296 },
1248 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1297 },
1249 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 1298 },
1250 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 24, .child_index = 1300 },
1251 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1302 },
1252 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1304 },
1253 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 1306 },
1254 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 135, .child_index = 1307 },
1255 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1308 },
1256 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 534, .child_index = 1309 },
1257 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1310 },
1258 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 10, .child_index = 1311 },
1259 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 1312 },
1260 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1314 },
1261 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1315 },
1262 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1316 },
1263 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1317 },
1264 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1318 },
1265 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 11, .child_index = 1320 },
1266 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 108, .child_index = 1322 },
1267 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1323 },
1268 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 1325 },
1269 .{ .char = '6', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 1326 },
1270 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 19, .child_index = 1327 },
1271 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 1331 },
1272 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 18, .child_index = 1332 },
1273 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1334 },
1274 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 1335 },
1275 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 1336 },
1276 .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1337 },
1277 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 1338 },
1278 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1340 },
5229 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1282 },
5230 .{ .char = 'u', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 1283 },
5231 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1284 },
5232 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1285 },
5233 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1286 },
5234 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 7, .child_index = 1287 },
5235 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 13, .child_index = 1290 },
5236 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1297 },
5237 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 1299 },
5238 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1300 },
5239 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 1301 },
5240 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 24, .child_index = 1303 },
5241 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1305 },
5242 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1307 },
5243 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 1309 },
5244 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 135, .child_index = 1310 },
5245 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1311 },
5246 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 534, .child_index = 1312 },
5247 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1313 },
5248 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 10, .child_index = 1314 },
5249 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 1315 },
5250 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1317 },
5251 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1318 },
5252 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1319 },
5253 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1320 },
5254 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1321 },
5255 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1322 },
5256 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 11, .child_index = 1324 },
5257 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 108, .child_index = 1326 },
5258 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1327 },
5259 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 1329 },
5260 .{ .char = '6', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 1330 },
5261 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 19, .child_index = 1331 },
5262 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 1335 },
5263 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 18, .child_index = 1336 },
5264 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1338 },
5265 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 1339 },
5266 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 1340 },
5267 .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1341 },
5268 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 1342 },
5269 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1344 },
12795270 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 220 },
1280 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1341 },
1281 .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 1343 },
1282 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1344 },
1283 .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 20, .child_index = 1346 },
1284 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1349 },
1285 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 1350 },
1286 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1297 },
1287 .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1351 },
1288 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1352 },
1289 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1334 },
1290 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1340 },
1291 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1354 },
1292 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1357 },
1293 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 227 },
1294 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1263, .child_index = 1358 },
1295 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1359 },
5271 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1345 },
5272 .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 1347 },
5273 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1348 },
5274 .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 20, .child_index = 1350 },
5275 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1353 },
5276 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 1354 },
5277 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1300 },
5278 .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1355 },
5279 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 1356 },
5280 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1358 },
5281 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1338 },
5282 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1344 },
5283 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1359 },
5284 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1362 },
5285 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1363 },
5286 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1263, .child_index = 1364 },
5287 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1365 },
12965288 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 176 },
12975289 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 231 },
1298 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 14, .child_index = 1361 },
5290 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 14, .child_index = 1367 },
12995291 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 235 },
13005292 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 236 },
1301 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 17, .child_index = 1362 },
5293 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 17, .child_index = 1368 },
13025294 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 572 },
1303 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1363 },
1304 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 1364 },
1305 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 36, .child_index = 1368 },
1306 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1376 },
1307 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1379 },
1308 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1380 },
1309 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1381 },
1310 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1383 },
1311 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1384 },
1312 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1385 },
1313 .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1389 },
5295 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1369 },
5296 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 1370 },
5297 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 36, .child_index = 1374 },
5298 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1382 },
5299 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1385 },
5300 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1386 },
5301 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1387 },
5302 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1389 },
5303 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1390 },
5304 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1391 },
5305 .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1395 },
13145306 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 451 },
1315 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1390 },
1316 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1384 },
1317 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 1364 },
1318 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1394 },
1319 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1395 },
1320 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1131 },
1321 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1390 },
1322 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1396 },
1323 .{ .char = 'c', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 1397 },
1324 .{ .char = 'd', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 1399 },
1325 .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 1397 },
1326 .{ .char = 'h', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 1399 },
1327 .{ .char = 'i', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 1397 },
1328 .{ .char = 'l', .end_of_word = true, .end_of_list = false, .number = 4, .child_index = 1400 },
1329 .{ .char = 's', .end_of_word = true, .end_of_list = false, .number = 6, .child_index = 1402 },
1330 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 13, .child_index = 1405 },
1331 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1409 },
1332 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1410 },
5307 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1396 },
5308 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1390 },
5309 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 1370 },
5310 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1400 },
5311 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1401 },
5312 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1133 },
5313 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1396 },
5314 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1402 },
5315 .{ .char = 'c', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 1403 },
5316 .{ .char = 'd', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 1405 },
5317 .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 1403 },
5318 .{ .char = 'h', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 1405 },
5319 .{ .char = 'i', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 1403 },
5320 .{ .char = 'l', .end_of_word = true, .end_of_list = false, .number = 4, .child_index = 1406 },
5321 .{ .char = 's', .end_of_word = true, .end_of_list = false, .number = 6, .child_index = 1408 },
5322 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 13, .child_index = 1411 },
5323 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1415 },
5324 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1416 },
13335325 .{ .char = '4', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 974 },
1334 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1411 },
1335 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1412 },
1336 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 1364 },
1337 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 33, .child_index = 1413 },
1338 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1131 },
5326 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1417 },
5327 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1418 },
5328 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 1370 },
5329 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 33, .child_index = 1419 },
5330 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1133 },
13395331 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 950 },
13405332 .{ .char = 'i', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
1341 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1389 },
1342 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1414 },
1343 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1415 },
1344 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1131 },
1345 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1419 },
1346 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 40, .child_index = 1422 },
1347 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 1423 },
1348 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1425 },
1349 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1426 },
1350 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1430 },
1351 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1431 },
5333 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1395 },
5334 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1420 },
5335 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1421 },
5336 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1133 },
5337 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1425 },
5338 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 40, .child_index = 1428 },
5339 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 1429 },
5340 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1431 },
5341 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1432 },
5342 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1436 },
5343 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1437 },
13525344 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 344 },
1353 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1432 },
1354 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1433 },
1355 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1434 },
1356 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1435 },
1357 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1436 },
1358 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1437 },
1359 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1438 },
1360 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1439 },
1361 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1440 },
1362 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1441 },
1363 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1442 },
1364 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1443 },
1365 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 1444 },
1366 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1445 },
1367 .{ .char = 'A', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1446 },
1368 .{ .char = 'C', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 1447 },
1369 .{ .char = 'D', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1448 },
1370 .{ .char = 'E', .end_of_word = false, .end_of_list = false, .number = 10, .child_index = 1449 },
1371 .{ .char = 'I', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1450 },
1372 .{ .char = 'O', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1451 },
1373 .{ .char = 'X', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1452 },
1374 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1453 },
5345 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1438 },
5346 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1439 },
5347 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1440 },
5348 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1441 },
5349 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1442 },
5350 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1443 },
5351 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1444 },
5352 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1445 },
5353 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1446 },
5354 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1447 },
5355 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1448 },
5356 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1449 },
5357 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 1450 },
5358 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1451 },
5359 .{ .char = 'A', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1452 },
5360 .{ .char = 'C', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 1453 },
5361 .{ .char = 'D', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1454 },
5362 .{ .char = 'E', .end_of_word = false, .end_of_list = false, .number = 10, .child_index = 1455 },
5363 .{ .char = 'I', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1456 },
5364 .{ .char = 'O', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1457 },
5365 .{ .char = 'X', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1458 },
5366 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1459 },
13755367 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 344 },
1376 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1454 },
1377 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1455 },
1378 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1456 },
5368 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1460 },
5369 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1461 },
5370 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1462 },
13795371 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 585 },
1380 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1457 },
1381 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1458 },
1382 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1459 },
1383 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1460 },
1384 .{ .char = 'd', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 1461 },
1385 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1462 },
1386 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1463 },
1387 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1464 },
1388 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1465 },
1389 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1466 },
1390 .{ .char = 'C', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1467 },
1391 .{ .char = 'N', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1468 },
1392 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1469 },
1393 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1470 },
1394 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1471 },
1395 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 1472 },
1396 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1473 },
1397 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 10, .child_index = 1474 },
1398 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1477 },
1399 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1480 },
1400 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1481 },
1401 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1483 },
1402 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1484 },
1403 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 122, .child_index = 1485 },
1404 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 134, .child_index = 1486 },
1405 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 1350 },
1406 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1487 },
1407 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 1488 },
1408 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1489 },
1409 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1490 },
5372 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1463 },
5373 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1464 },
5374 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1465 },
5375 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1466 },
5376 .{ .char = 'd', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 1467 },
5377 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1468 },
5378 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1469 },
5379 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1470 },
5380 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1471 },
5381 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1472 },
5382 .{ .char = 'C', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1473 },
5383 .{ .char = 'N', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1474 },
5384 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1475 },
5385 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1476 },
5386 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1477 },
5387 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 1478 },
5388 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1479 },
5389 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 10, .child_index = 1480 },
5390 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1483 },
5391 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1486 },
5392 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1487 },
5393 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1489 },
5394 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1490 },
5395 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 122, .child_index = 1491 },
5396 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 134, .child_index = 1492 },
5397 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 1354 },
5398 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1493 },
5399 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 1494 },
5400 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1495 },
5401 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1497 },
14105402 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 294 },
14115403 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 137 },
1412 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1491 },
1413 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1492 },
5404 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1498 },
5405 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1499 },
14145406 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 296 },
14155407 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 140 },
14165408 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 164 },
1417 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1493 },
1418 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 1494 },
5409 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1500 },
5410 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 1501 },
14195411 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 299 },
1420 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1495 },
1421 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1496 },
5412 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1502 },
5413 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1503 },
5414 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1504 },
14225415 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 296 },
1423 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1497 },
1424 .{ .char = 'z', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 1498 },
1425 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1500 },
1426 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 1501 },
1427 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 1504 },
1428 .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 9, .child_index = 1505 },
5416 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1505 },
5417 .{ .char = 'z', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 1506 },
5418 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1508 },
5419 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 1509 },
5420 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 1512 },
5421 .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 9, .child_index = 1513 },
14295422 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 209 },
14305423 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 306 },
1431 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1508 },
5424 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1516 },
14325425 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 223 },
1433 .{ .char = 'z', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 1498 },
5426 .{ .char = 'z', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 1506 },
14345427 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 496 },
1435 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1509 },
1436 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1510 },
1437 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1511 },
1438 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1512 },
1439 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1513 },
1440 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 25, .child_index = 1514 },
1441 .{ .char = 'f', .end_of_word = true, .end_of_list = true, .number = 8, .child_index = 1515 },
1442 .{ .char = 'p', .end_of_word = true, .end_of_list = false, .number = 21, .child_index = 1518 },
1443 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1524 },
1444 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1526 },
1445 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1527 },
1446 .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 1528 },
1447 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 1529 },
1448 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1530 },
1449 .{ .char = 'a', .end_of_word = true, .end_of_list = false, .number = 10, .child_index = 1531 },
1450 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 1534 },
1451 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1535 },
1452 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1536 },
5428 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1517 },
5429 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1518 },
5430 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1519 },
5431 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1520 },
5432 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1521 },
5433 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 25, .child_index = 1522 },
5434 .{ .char = 'f', .end_of_word = true, .end_of_list = true, .number = 8, .child_index = 1523 },
5435 .{ .char = 'p', .end_of_word = true, .end_of_list = false, .number = 21, .child_index = 1526 },
5436 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1532 },
5437 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1534 },
5438 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1535 },
5439 .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 1536 },
5440 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 1537 },
5441 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1538 },
5442 .{ .char = 'a', .end_of_word = true, .end_of_list = false, .number = 10, .child_index = 1539 },
5443 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 1542 },
5444 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1543 },
5445 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1544 },
14535446 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 210 },
1454 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1537 },
1455 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 1538 },
1456 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1540 },
1457 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1541 },
1458 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1543 },
1459 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1544 },
1460 .{ .char = '3', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1545 },
1461 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1546 },
5447 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1545 },
5448 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 1546 },
5449 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1548 },
5450 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1549 },
5451 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1551 },
5452 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1552 },
5453 .{ .char = '3', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1553 },
5454 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1554 },
14625455 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 332 },
1463 .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 5, .child_index = 1547 },
1464 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1549 },
1465 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1550 },
1466 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1551 },
1467 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1553 },
1468 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1554 },
1469 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1555 },
1470 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1556 },
1471 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1558 },
5456 .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 5, .child_index = 1555 },
5457 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1557 },
5458 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1558 },
5459 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1559 },
5460 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1561 },
5461 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1562 },
5462 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1563 },
5463 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1564 },
5464 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1566 },
14725465 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 344 },
1473 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1559 },
1474 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1560 },
1475 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1561 },
5466 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1567 },
5467 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1568 },
5468 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1569 },
14765469 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 194 },
1477 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1302 },
1478 .{ .char = 'g', .end_of_word = true, .end_of_list = false, .number = 23, .child_index = 1562 },
5470 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1305 },
5471 .{ .char = 'g', .end_of_word = true, .end_of_list = false, .number = 23, .child_index = 1570 },
14795472 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 352 },
1480 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1567 },
1481 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1568 },
5473 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1575 },
5474 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1576 },
14825475 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 295 },
1483 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1569 },
1484 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1570 },
1485 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 135, .child_index = 1574 },
1486 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1575 },
1487 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 534, .child_index = 1576 },
1488 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1577 },
1489 .{ .char = 'n', .end_of_word = true, .end_of_list = true, .number = 10, .child_index = 1578 },
1490 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1581 },
1491 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1582 },
1492 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1583 },
1493 .{ .char = 'j', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1585 },
1494 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1587 },
1495 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1588 },
1496 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1589 },
1497 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1590 },
1498 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1591 },
1499 .{ .char = 'w', .end_of_word = true, .end_of_list = true, .number = 8, .child_index = 1592 },
1500 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 108, .child_index = 1595 },
1501 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1596 },
5476 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1577 },
5477 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1578 },
5478 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 135, .child_index = 1582 },
5479 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1583 },
5480 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 534, .child_index = 1584 },
5481 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1585 },
5482 .{ .char = 'n', .end_of_word = true, .end_of_list = true, .number = 10, .child_index = 1586 },
5483 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1589 },
5484 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1590 },
5485 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1591 },
5486 .{ .char = 'j', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1593 },
5487 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1595 },
5488 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1596 },
5489 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1597 },
5490 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1598 },
5491 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1599 },
5492 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1600 },
5493 .{ .char = 'w', .end_of_word = true, .end_of_list = true, .number = 8, .child_index = 1601 },
5494 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 108, .child_index = 1604 },
5495 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1605 },
15025496 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 365 },
1503 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 1598 },
1504 .{ .char = '0', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 1599 },
1505 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1600 },
1506 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 7, .child_index = 1602 },
1507 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 1603 },
1508 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1605 },
1509 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1606 },
1510 .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 1608 },
1511 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 1609 },
1512 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1610 },
1513 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 1611 },
1514 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1613 },
1515 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1618 },
1516 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1619 },
1517 .{ .char = 'n', .end_of_word = true, .end_of_list = true, .number = 9, .child_index = 1505 },
1518 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1620 },
1519 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1621 },
5497 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 1607 },
5498 .{ .char = '0', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 1608 },
5499 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1609 },
5500 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 7, .child_index = 1611 },
5501 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 1612 },
5502 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1614 },
5503 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1615 },
5504 .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 1617 },
5505 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 1618 },
5506 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1619 },
5507 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 1620 },
5508 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1622 },
5509 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1627 },
5510 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1628 },
5511 .{ .char = 'n', .end_of_word = true, .end_of_list = true, .number = 9, .child_index = 1513 },
5512 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1629 },
5513 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1630 },
15205514 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 210 },
1521 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1622 },
5515 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1631 },
15225516 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 327 },
1523 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1623 },
1524 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1624 },
5517 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1632 },
5518 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1633 },
15255519 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 377 },
1526 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 17, .child_index = 1625 },
1527 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1481 },
1528 .{ .char = 'n', .end_of_word = true, .end_of_list = true, .number = 8, .child_index = 1632 },
1529 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1635 },
5520 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 17, .child_index = 1634 },
5521 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1487 },
5522 .{ .char = 'n', .end_of_word = true, .end_of_list = true, .number = 8, .child_index = 1641 },
5523 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1644 },
15305524 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 291 },
1531 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1636 },
1532 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1637 },
1533 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1639 },
1534 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1640 },
1535 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1623 },
1536 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1263, .child_index = 1641 },
5525 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1645 },
5526 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1646 },
5527 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1647 },
5528 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1649 },
5529 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1650 },
5530 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1632 },
5531 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1651 },
5532 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1263, .child_index = 1655 },
15375533 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 176 },
15385534 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 178 },
1539 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 14, .child_index = 1642 },
1540 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 17, .child_index = 1643 },
1541 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1650 },
1542 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1131 },
1543 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1131 },
1544 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1131 },
1545 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1131 },
1546 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 7, .child_index = 1651 },
1547 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1653 },
1548 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1654 },
1549 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1655 },
1550 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 1656 },
1551 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1658 },
1552 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1659 },
1553 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1660 },
5535 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 14, .child_index = 1656 },
5536 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 17, .child_index = 1657 },
5537 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1664 },
5538 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1133 },
5539 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1133 },
5540 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1133 },
5541 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1133 },
5542 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 7, .child_index = 1665 },
5543 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1667 },
5544 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1668 },
5545 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1669 },
5546 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 1670 },
5547 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1672 },
5548 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1673 },
5549 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1674 },
15545550 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 519 },
15555551 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 585 },
1556 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1662 },
1557 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1663 },
1558 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1664 },
5552 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1676 },
5553 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1677 },
5554 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1678 },
15595555 .{ .char = 'd', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
1560 .{ .char = 'f', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 1665 },
1561 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1666 },
1562 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1667 },
1563 .{ .char = 'm', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 1668 },
1564 .{ .char = 'n', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 1668 },
1565 .{ .char = 'p', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 1668 },
1566 .{ .char = 'z', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 1668 },
5556 .{ .char = 'f', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 1679 },
5557 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1680 },
5558 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1681 },
5559 .{ .char = 'm', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 1682 },
5560 .{ .char = 'n', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 1682 },
5561 .{ .char = 'p', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 1682 },
5562 .{ .char = 'z', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 1682 },
15675563 .{ .char = 'i', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
15685564 .{ .char = 'm', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
15695565 .{ .char = 'n', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
15705566 .{ .char = 'p', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
15715567 .{ .char = 'z', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
1572 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1669 },
1573 .{ .char = 'n', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 1668 },
1574 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1670 },
5568 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1683 },
5569 .{ .char = 'n', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 1682 },
5570 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1684 },
15755571 .{ .char = '2', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
15765572 .{ .char = '4', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
15775573 .{ .char = '2', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
15785574 .{ .char = '2', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
1579 .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 1399 },
5575 .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 1405 },
15805576 .{ .char = '2', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
15815577 .{ .char = '4', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
1582 .{ .char = 'c', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 1397 },
1583 .{ .char = 'c', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 1397 },
1584 .{ .char = 'i', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 1397 },
1585 .{ .char = 'l', .end_of_word = true, .end_of_list = false, .number = 4, .child_index = 1400 },
1586 .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 1397 },
1587 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1671 },
1588 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1672 },
1589 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1673 },
1590 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1676 },
1591 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 33, .child_index = 1677 },
1592 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1678 },
1593 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1679 },
1594 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1680 },
1595 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1681 },
1596 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1682 },
1597 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1683 },
1598 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1685 },
1599 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1686 },
1600 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 40, .child_index = 1687 },
1601 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 1688 },
1602 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1689 },
1603 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1690 },
1604 .{ .char = '1', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 1691 },
5578 .{ .char = 'c', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 1403 },
5579 .{ .char = 'c', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 1403 },
5580 .{ .char = 'i', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 1403 },
5581 .{ .char = 'l', .end_of_word = true, .end_of_list = false, .number = 4, .child_index = 1406 },
5582 .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 1403 },
5583 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1685 },
5584 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1686 },
5585 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1687 },
5586 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1690 },
5587 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 33, .child_index = 1691 },
5588 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1692 },
5589 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1693 },
5590 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1694 },
5591 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1695 },
5592 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1696 },
5593 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1697 },
5594 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1699 },
5595 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1700 },
5596 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 40, .child_index = 1701 },
5597 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 1702 },
5598 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1703 },
5599 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1704 },
5600 .{ .char = '1', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 1705 },
16055601 .{ .char = '2', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
16065602 .{ .char = '4', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
16075603 .{ .char = '8', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
1608 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1692 },
1609 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1693 },
1610 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1694 },
1611 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1434 },
1612 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1695 },
1613 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1696 },
1614 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1697 },
1615 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1698 },
1616 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1699 },
1617 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1700 },
1618 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1701 },
1619 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1702 },
1620 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1703 },
1621 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1704 },
1622 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 1705 },
1623 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1706 },
1624 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1708 },
1625 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1709 },
1626 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1710 },
1627 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 1711 },
1628 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1710 },
1629 .{ .char = 'r', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 1712 },
1630 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1451 },
1631 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1714 },
1632 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1715 },
1633 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1716 },
5604 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1706 },
5605 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1707 },
5606 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1708 },
5607 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1440 },
5608 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1709 },
5609 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1710 },
5610 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1711 },
5611 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1712 },
5612 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1713 },
5613 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1714 },
5614 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1715 },
5615 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1716 },
5616 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1717 },
5617 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1718 },
5618 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 1719 },
5619 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1720 },
5620 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1722 },
5621 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1723 },
5622 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1724 },
5623 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 1725 },
5624 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1724 },
5625 .{ .char = 'r', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 1726 },
5626 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1457 },
5627 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1728 },
5628 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1729 },
5629 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1730 },
16345630 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 899 },
1635 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1717 },
1636 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1718 },
1637 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1719 },
1638 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1720 },
5631 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1731 },
5632 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1732 },
5633 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1733 },
5634 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1734 },
16395635 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 457 },
1640 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1721 },
1641 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1722 },
1642 .{ .char = 'e', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 1461 },
1643 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1723 },
1644 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1724 },
1645 .{ .char = 'F', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1725 },
1646 .{ .char = 'S', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1725 },
5636 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1735 },
5637 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1736 },
5638 .{ .char = 'e', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 1467 },
5639 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1737 },
5640 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1738 },
5641 .{ .char = 'F', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1739 },
5642 .{ .char = 'S', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1739 },
16475643 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 409 },
1648 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1473 },
1649 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1726 },
1650 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1727 },
1651 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1728 },
1652 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1470 },
1653 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1473 },
1654 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1729 },
1655 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1470 },
1656 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1473 },
1657 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1731 },
1658 .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 8, .child_index = 1632 },
1659 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1733 },
1660 .{ .char = 'c', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 1734 },
1661 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1737 },
1662 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1738 },
1663 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 122, .child_index = 1739 },
1664 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 134, .child_index = 1740 },
1665 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1756 },
1666 .{ .char = 'n', .end_of_word = true, .end_of_list = true, .number = 12, .child_index = 1757 },
1667 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1761 },
1668 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1762 },
1669 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1763 },
1670 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1765 },
1671 .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 1766 },
1672 .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 1547 },
1673 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1768 },
1674 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1769 },
1675 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1770 },
5644 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1479 },
5645 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1740 },
5646 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1741 },
5647 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1742 },
5648 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1476 },
5649 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1479 },
5650 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1743 },
5651 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1476 },
5652 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1479 },
5653 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1745 },
5654 .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 8, .child_index = 1641 },
5655 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1747 },
5656 .{ .char = 'c', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 1748 },
5657 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1751 },
5658 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1752 },
5659 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 122, .child_index = 1753 },
5660 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 134, .child_index = 1754 },
5661 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1770 },
5662 .{ .char = 'n', .end_of_word = true, .end_of_list = true, .number = 12, .child_index = 1771 },
5663 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1775 },
5664 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1776 },
5665 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1777 },
5666 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1778 },
5667 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1780 },
5668 .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 1781 },
5669 .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 1555 },
5670 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1783 },
5671 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1784 },
5672 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1785 },
5673 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1786 },
16765674 .{ .char = 'l', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 549 },
16775675 .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
1678 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1771 },
5676 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1787 },
16795677 .{ .char = 'j', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 361 },
1680 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1772 },
1681 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1773 },
1682 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1774 },
1683 .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 1775 },
1684 .{ .char = 'h', .end_of_word = true, .end_of_list = false, .number = 4, .child_index = 1766 },
5678 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1788 },
5679 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1789 },
5680 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1790 },
5681 .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 1791 },
5682 .{ .char = 'h', .end_of_word = true, .end_of_list = false, .number = 4, .child_index = 1781 },
16855683 .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
1686 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1776 },
1687 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1778 },
1688 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1779 },
1689 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1780 },
1690 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1781 },
1691 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1782 },
1692 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 25, .child_index = 1783 },
1693 .{ .char = 'c', .end_of_word = true, .end_of_list = false, .number = 4, .child_index = 1766 },
1694 .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 1784 },
5684 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1792 },
5685 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1794 },
5686 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1795 },
5687 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1796 },
5688 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1797 },
5689 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1798 },
5690 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 25, .child_index = 1799 },
5691 .{ .char = 'c', .end_of_word = true, .end_of_list = false, .number = 4, .child_index = 1781 },
5692 .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 1800 },
16955693 .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
1696 .{ .char = '1', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 1785 },
1697 .{ .char = '2', .end_of_word = true, .end_of_list = false, .number = 5, .child_index = 1547 },
1698 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1786 },
1699 .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 1775 },
5694 .{ .char = '1', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 1801 },
5695 .{ .char = '2', .end_of_word = true, .end_of_list = false, .number = 5, .child_index = 1555 },
5696 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1802 },
5697 .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 1791 },
17005698 .{ .char = 'l', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
1701 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1787 },
1702 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1788 },
1703 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1789 },
1704 .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 1547 },
1705 .{ .char = 'm', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 1766 },
5699 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1803 },
5700 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1804 },
5701 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1805 },
5702 .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 1555 },
5703 .{ .char = 'm', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 1781 },
17065704 .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 549 },
1707 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1790 },
1708 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1791 },
1709 .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 1775 },
5705 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1806 },
5706 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1807 },
5707 .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 1791 },
17105708 .{ .char = 'l', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
1711 .{ .char = 'x', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 1547 },
1712 .{ .char = 'n', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 1547 },
1713 .{ .char = 'd', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 1547 },
1714 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1792 },
1715 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1793 },
5709 .{ .char = 'x', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 1555 },
5710 .{ .char = 'n', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 1555 },
5711 .{ .char = 'd', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 1555 },
5712 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1808 },
5713 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1809 },
17165714 .{ .char = 'e', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
1717 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1794 },
1718 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1795 },
5715 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1810 },
5716 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1811 },
17195717 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 458 },
17205718 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 344 },
1721 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1796 },
1722 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1493 },
1723 .{ .char = '2', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1797 },
1724 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1798 },
1725 .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 1775 },
5719 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1812 },
5720 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1500 },
5721 .{ .char = '2', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1813 },
5722 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1814 },
5723 .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 1791 },
17265724 .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
1727 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1799 },
1728 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1800 },
1729 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1801 },
1730 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1802 },
1731 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1803 },
1732 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1804 },
1733 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1805 },
5725 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1815 },
5726 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1816 },
5727 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1817 },
5728 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1818 },
5729 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1819 },
5730 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1820 },
5731 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1821 },
17345732 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 457 },
1735 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1806 },
1736 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1807 },
1737 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1808 },
1738 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1794 },
1739 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1809 },
1740 .{ .char = '1', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 1810 },
1741 .{ .char = '2', .end_of_word = true, .end_of_list = false, .number = 5, .child_index = 1547 },
1742 .{ .char = 'b', .end_of_word = true, .end_of_list = false, .number = 4, .child_index = 1766 },
1743 .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 1775 },
5733 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1822 },
5734 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1823 },
5735 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1824 },
5736 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1810 },
5737 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1825 },
5738 .{ .char = '1', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 1826 },
5739 .{ .char = '2', .end_of_word = true, .end_of_list = false, .number = 5, .child_index = 1555 },
5740 .{ .char = 'b', .end_of_word = true, .end_of_list = false, .number = 4, .child_index = 1781 },
5741 .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 1791 },
17445742 .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
1745 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1493 },
1746 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1812 },
1747 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1813 },
1748 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1814 },
5743 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1500 },
5744 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1828 },
5745 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1829 },
5746 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1830 },
17495747 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 484 },
17505748 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 485 },
1751 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1817 },
1752 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 135, .child_index = 1818 },
1753 .{ .char = 'f', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 1766 },
1754 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 534, .child_index = 1819 },
1755 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1733 },
1756 .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 1775 },
5749 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1833 },
5750 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 135, .child_index = 1834 },
5751 .{ .char = 'f', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 1781 },
5752 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 534, .child_index = 1835 },
5753 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1747 },
5754 .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 1791 },
17575755 .{ .char = 'l', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
1758 .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 1547 },
1759 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1834 },
1760 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1835 },
1761 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1837 },
1762 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1838 },
1763 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1839 },
1764 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1840 },
1765 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1841 },
1766 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1842 },
1767 .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1843 },
1768 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1844 },
1769 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1845 },
1770 .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 1775 },
5756 .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 1555 },
5757 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1850 },
5758 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1851 },
5759 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1853 },
5760 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1854 },
5761 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1855 },
5762 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1856 },
5763 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1857 },
5764 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1858 },
5765 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1859 },
5766 .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1860 },
5767 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1861 },
5768 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1862 },
5769 .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 1791 },
17715770 .{ .char = 'i', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 361 },
17725771 .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
1773 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 108, .child_index = 1846 },
1774 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1462 },
1775 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1859 },
1776 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 1860 },
1777 .{ .char = '0', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 1863 },
1778 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1864 },
5772 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 108, .child_index = 1863 },
5773 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1468 },
5774 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1876 },
5775 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 1877 },
5776 .{ .char = '0', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 1880 },
5777 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1881 },
17795778 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 295 },
1780 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 7, .child_index = 1866 },
1781 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1867 },
1782 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1868 },
1783 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1869 },
5779 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 7, .child_index = 1883 },
5780 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1884 },
5781 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1885 },
5782 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1886 },
17845783 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 332 },
1785 .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 1547 },
1786 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1870 },
1787 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 1871 },
1788 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1872 },
1789 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 1874 },
5784 .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 1555 },
5785 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1887 },
5786 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 1888 },
5787 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1889 },
5788 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 1891 },
17905789 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 496 },
1791 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1875 },
1792 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1876 },
5790 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1892 },
5791 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1893 },
17935792 .{ .char = 'j', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 497 },
17945793 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 344 },
17955794 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 519 },
1796 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1877 },
1797 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1878 },
1798 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1872 },
1799 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1879 },
1800 .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 1547 },
1801 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1872 },
1802 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1880 },
5795 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1894 },
5796 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1895 },
5797 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1889 },
5798 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1896 },
5799 .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 1555 },
5800 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1889 },
5801 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1897 },
18035802 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 500 },
18045803 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 505 },
18055804 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 323 },
......@@ -1807,11338 +5806,7384 @@ const dafsa = [_]Node{
18075806 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 511 },
18085807 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 512 },
18095808 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 513 },
1810 .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 1784 },
1811 .{ .char = 'h', .end_of_word = true, .end_of_list = false, .number = 4, .child_index = 1766 },
5809 .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 1800 },
5810 .{ .char = 'h', .end_of_word = true, .end_of_list = false, .number = 4, .child_index = 1781 },
18125811 .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
1813 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1881 },
1814 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1882 },
1815 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1883 },
1816 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1884 },
1817 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1885 },
1818 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1886 },
1819 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1263, .child_index = 1887 },
1820 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 14, .child_index = 1888 },
1821 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1889 },
1822 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1890 },
5812 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1898 },
5813 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1899 },
5814 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1900 },
5815 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1901 },
5816 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1902 },
5817 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1903 },
5818 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1904 },
5819 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1905 },
5820 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 518 },
5821 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 519 },
5822 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 520 },
5823 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1263, .child_index = 1906 },
5824 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 14, .child_index = 1907 },
5825 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1908 },
5826 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1909 },
18235827 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 898 },
1824 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1891 },
1825 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1893 },
1826 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1894 },
1827 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1896 },
1828 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1897 },
1829 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1898 },
1830 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1899 },
1831 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1900 },
1832 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1901 },
1833 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1901 },
1834 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 1902 },
1835 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1903 },
1836 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1904 },
1837 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1905 },
1838 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1906 },
1839 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1658 },
1840 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1907 },
5828 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1910 },
5829 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1912 },
5830 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1913 },
5831 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1915 },
5832 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1916 },
5833 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 1917 },
5834 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1918 },
5835 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1919 },
5836 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1920 },
5837 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1920 },
5838 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 1921 },
5839 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1922 },
5840 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1923 },
5841 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1924 },
5842 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1925 },
5843 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1672 },
5844 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1926 },
18415845 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 569 },
1842 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1908 },
1843 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1909 },
1844 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1910 },
1845 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1911 },
1846 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1912 },
1847 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1913 },
1848 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1914 },
5846 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1927 },
5847 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1928 },
5848 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1929 },
5849 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1930 },
5850 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1931 },
5851 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1932 },
5852 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1933 },
18495853 .{ .char = '2', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 458 },
1850 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1915 },
5854 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1934 },
18515855 .{ .char = 'i', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
18525856 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 655 },
1853 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1918 },
1854 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1920 },
1855 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 33, .child_index = 1921 },
1856 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1922 },
1857 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1923 },
1858 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1924 },
1859 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1925 },
1860 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1926 },
5857 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1937 },
5858 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1939 },
5859 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 33, .child_index = 1940 },
5860 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1941 },
5861 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1942 },
5862 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1943 },
5863 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1944 },
5864 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1945 },
18615865 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 655 },
18625866 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 450 },
1863 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1927 },
1864 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1389 },
1865 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 40, .child_index = 1928 },
1866 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1929 },
1867 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1930 },
1868 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1931 },
5867 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1946 },
5868 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1395 },
5869 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 40, .child_index = 1947 },
5870 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1948 },
5871 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1949 },
5872 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1950 },
18695873 .{ .char = '6', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
1870 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1932 },
1871 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1933 },
1872 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1934 },
1873 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1935 },
1874 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1936 },
1875 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1937 },
1876 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1438 },
1877 .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 1938 },
1878 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1939 },
1879 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1940 },
5874 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1951 },
5875 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1952 },
5876 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1953 },
5877 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1954 },
5878 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1955 },
5879 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1956 },
5880 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1444 },
5881 .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 1957 },
5882 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1958 },
5883 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1959 },
18805884 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 286 },
18815885 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 572 },
18825886 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 451 },
1883 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 1941 },
1884 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1942 },
1885 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1943 },
1886 .{ .char = 'd', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 1712 },
1887 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1944 },
1888 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1945 },
1889 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 1946 },
5887 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 1960 },
5888 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1961 },
5889 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1962 },
5890 .{ .char = 'd', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 1726 },
5891 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1963 },
5892 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1964 },
5893 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 1965 },
18905894 .{ .char = '1', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 648 },
18915895 .{ .char = '8', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
1892 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1947 },
1893 .{ .char = 'I', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1443 },
1894 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1948 },
1895 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1949 },
1896 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1950 },
1897 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1951 },
1898 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1957 },
1899 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1958 },
1900 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1199 },
1901 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1959 },
1902 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1199 },
1903 .{ .char = 'S', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1960 },
1904 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1961 },
1905 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1962 },
1906 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1966 },
1907 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1967 },
1908 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1969 },
1909 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1470 },
1910 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1473 },
1911 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1972 },
5896 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1966 },
5897 .{ .char = 'I', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1449 },
5898 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1967 },
5899 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1968 },
5900 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1969 },
5901 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 1970 },
5902 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1976 },
5903 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1977 },
5904 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1201 },
5905 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1978 },
5906 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1201 },
5907 .{ .char = 'S', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1979 },
5908 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1980 },
5909 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1981 },
5910 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1985 },
5911 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 1986 },
5912 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 1988 },
5913 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1476 },
5914 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1479 },
5915 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1991 },
19125916 .{ .char = 'b', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
19135917 .{ .char = 'l', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 549 },
19145918 .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
1915 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1973 },
1916 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1974 },
1917 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 122, .child_index = 1975 },
1918 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 11, .child_index = 1976 },
1919 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1979 },
1920 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1982 },
1921 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1983 },
1922 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 7, .child_index = 1984 },
1923 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 1985 },
5919 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1992 },
5920 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1993 },
5921 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 122, .child_index = 1994 },
5922 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 11, .child_index = 1995 },
5923 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1998 },
5924 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2001 },
5925 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2002 },
5926 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 7, .child_index = 2003 },
5927 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2004 },
19245928 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 420 },
1925 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1987 },
1926 .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 1988 },
1927 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 1991 },
1928 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 51, .child_index = 1993 },
1929 .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2000 },
1930 .{ .char = 'u', .end_of_word = false, .end_of_list = false, .number = 24, .child_index = 2003 },
1931 .{ .char = 'v', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2008 },
1932 .{ .char = 'w', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 2009 },
5929 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2006 },
5930 .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 2007 },
5931 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 2010 },
5932 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 51, .child_index = 2012 },
5933 .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2019 },
5934 .{ .char = 'u', .end_of_word = false, .end_of_list = false, .number = 24, .child_index = 2022 },
5935 .{ .char = 'v', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2027 },
5936 .{ .char = 'w', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 2028 },
19335937 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 274 },
1934 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2011 },
1935 .{ .char = '2', .end_of_word = true, .end_of_list = false, .number = 4, .child_index = 1766 },
1936 .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 1784 },
1937 .{ .char = 'h', .end_of_word = true, .end_of_list = false, .number = 4, .child_index = 1766 },
5938 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2030 },
5939 .{ .char = '2', .end_of_word = true, .end_of_list = false, .number = 4, .child_index = 1781 },
5940 .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 1800 },
5941 .{ .char = 'h', .end_of_word = true, .end_of_list = false, .number = 4, .child_index = 1781 },
19385942 .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
1939 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 2012 },
1940 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2013 },
1941 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2016 },
5943 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1319 },
5944 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 2031 },
5945 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2032 },
5946 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2035 },
19425947 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 569 },
1943 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2017 },
1944 .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 1784 },
5948 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2036 },
5949 .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 1800 },
19455950 .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
1946 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2018 },
1947 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2019 },
1948 .{ .char = 'b', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 1528 },
5951 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2037 },
5952 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2038 },
5953 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2039 },
5954 .{ .char = 'b', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 1536 },
19495955 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 332 },
1950 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2020 },
1951 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2021 },
1952 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 2022 },
1953 .{ .char = '1', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2023 },
1954 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2025 },
1955 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2027 },
1956 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2028 },
1957 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2029 },
1958 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2030 },
1959 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2031 },
1960 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2032 },
1961 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 25, .child_index = 2033 },
1962 .{ .char = '1', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2034 },
1963 .{ .char = '0', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 1547 },
1964 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2035 },
1965 .{ .char = '1', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 1766 },
1966 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2036 },
1967 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2037 },
1968 .{ .char = 'r', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 1547 },
1969 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2038 },
1970 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2039 },
1971 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2040 },
1972 .{ .char = 'p', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 1547 },
1973 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2041 },
1974 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 2042 },
1975 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2043 },
1976 .{ .char = 'b', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 1766 },
1977 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2044 },
1978 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2045 },
5956 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2040 },
5957 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2041 },
5958 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 2042 },
5959 .{ .char = '1', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2043 },
5960 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2045 },
5961 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2047 },
5962 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2048 },
5963 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2049 },
5964 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2050 },
5965 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2051 },
5966 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2052 },
5967 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 25, .child_index = 2053 },
5968 .{ .char = '1', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2054 },
5969 .{ .char = '0', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 1555 },
5970 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2055 },
5971 .{ .char = '1', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 1781 },
5972 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2056 },
5973 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2057 },
5974 .{ .char = 'r', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 1555 },
5975 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2058 },
5976 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2059 },
5977 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2060 },
5978 .{ .char = 'p', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 1555 },
5979 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2061 },
5980 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 2062 },
5981 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2063 },
5982 .{ .char = 'b', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 1781 },
5983 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2064 },
5984 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2065 },
19795985 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 328 },
1980 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2046 },
1981 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2047 },
1982 .{ .char = 'f', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 2048 },
1983 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2049 },
1984 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2050 },
1985 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2051 },
5986 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2066 },
5987 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2067 },
5988 .{ .char = 'f', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 2068 },
5989 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2069 },
5990 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2070 },
5991 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2071 },
19865992 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 579 },
1987 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2052 },
1988 .{ .char = '0', .end_of_word = true, .end_of_list = false, .number = 5, .child_index = 1547 },
1989 .{ .char = 'p', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 1766 },
1990 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2053 },
1991 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2054 },
5993 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2072 },
5994 .{ .char = '0', .end_of_word = true, .end_of_list = false, .number = 5, .child_index = 1555 },
5995 .{ .char = 'p', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 1781 },
5996 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2073 },
5997 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2074 },
19925998 .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 585 },
19935999 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 291 },
1994 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2055 },
1995 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2056 },
1996 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 135, .child_index = 2057 },
1997 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 50, .child_index = 2069 },
1998 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 56, .child_index = 2073 },
1999 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 50, .child_index = 2079 },
2000 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 26, .child_index = 2084 },
2001 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 106, .child_index = 2087 },
2002 .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 2098 },
2003 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 24, .child_index = 2100 },
2004 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 10, .child_index = 2102 },
2005 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 73, .child_index = 2103 },
2006 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 10, .child_index = 2108 },
2007 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2110 },
2008 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 2111 },
2009 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 97, .child_index = 2112 },
2010 .{ .char = 'v', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2119 },
2011 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2120 },
2012 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2121 },
2013 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2122 },
2014 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2123 },
2015 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2124 },
2016 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2125 },
2017 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2126 },
2018 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2127 },
2019 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2128 },
2020 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2129 },
2021 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2130 },
2022 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2131 },
2023 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2132 },
2024 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2133 },
2025 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2134 },
2026 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2136 },
2027 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2137 },
2028 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 41, .child_index = 2138 },
2029 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2144 },
2030 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2145 },
2031 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 2147 },
2032 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 19, .child_index = 2150 },
2033 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2155 },
2034 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2156 },
2035 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 10, .child_index = 2160 },
2036 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2163 },
2037 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2166 },
2038 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 2167 },
2039 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2168 },
2040 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2169 },
2041 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 2170 },
2042 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2172 },
2043 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1876 },
2044 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 7, .child_index = 2173 },
2045 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2174 },
2046 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2175 },
2047 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2176 },
2048 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2177 },
2049 .{ .char = 'd', .end_of_word = true, .end_of_list = true, .number = 10, .child_index = 2178 },
2050 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1733 },
2051 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2181 },
2052 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2183 },
2053 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2185 },
6000 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2075 },
6001 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2076 },
6002 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 135, .child_index = 2077 },
6003 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 50, .child_index = 2089 },
6004 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 56, .child_index = 2093 },
6005 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 50, .child_index = 2099 },
6006 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 26, .child_index = 2104 },
6007 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 106, .child_index = 2107 },
6008 .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 2118 },
6009 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 24, .child_index = 2120 },
6010 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 10, .child_index = 2122 },
6011 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 73, .child_index = 2123 },
6012 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 10, .child_index = 2128 },
6013 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2130 },
6014 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 2131 },
6015 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 97, .child_index = 2132 },
6016 .{ .char = 'v', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2139 },
6017 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2140 },
6018 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2141 },
6019 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2142 },
6020 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2143 },
6021 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2144 },
6022 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2145 },
6023 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2146 },
6024 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2147 },
6025 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2148 },
6026 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2149 },
6027 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2150 },
6028 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2151 },
6029 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2152 },
6030 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2153 },
6031 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2154 },
6032 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2155 },
6033 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2157 },
6034 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2158 },
6035 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 41, .child_index = 2159 },
6036 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2165 },
6037 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2166 },
6038 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 2168 },
6039 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 19, .child_index = 2171 },
6040 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2176 },
6041 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2177 },
6042 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 10, .child_index = 2181 },
6043 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2184 },
6044 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2187 },
6045 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 2188 },
6046 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2189 },
6047 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2190 },
6048 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 2191 },
6049 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2193 },
6050 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1893 },
6051 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 7, .child_index = 2194 },
6052 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2195 },
6053 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2196 },
6054 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2197 },
6055 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2198 },
6056 .{ .char = 'd', .end_of_word = true, .end_of_list = true, .number = 10, .child_index = 2199 },
6057 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1747 },
6058 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2202 },
6059 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2204 },
6060 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2206 },
20546061 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 654 },
2055 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2186 },
2056 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2187 },
2057 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2188 },
2058 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2189 },
2059 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2036 },
2060 .{ .char = 'c', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 1547 },
2061 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1589 },
2062 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2190 },
2063 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2191 },
2064 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2192 },
2065 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1263, .child_index = 2193 },
2066 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 14, .child_index = 2194 },
2067 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2196 },
2068 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2197 },
6062 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2207 },
6063 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2208 },
6064 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2209 },
6065 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2210 },
6066 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2056 },
6067 .{ .char = 'c', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 1555 },
6068 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2211 },
6069 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1598 },
6070 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2212 },
6071 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2213 },
6072 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2214 },
6073 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1959 },
6074 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1263, .child_index = 2215 },
6075 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 14, .child_index = 2216 },
6076 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2218 },
6077 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2219 },
20696078 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 238 },
20706079 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1007 },
2071 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2198 },
6080 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2220 },
20726081 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1013 },
2073 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2199 },
6082 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2221 },
20746083 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1017 },
2075 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2200 },
2076 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2202 },
2077 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1904 },
2078 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1904 },
2079 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2203 },
2080 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2204 },
2081 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2204 },
2082 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2205 },
2083 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1904 },
2084 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2206 },
6084 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2222 },
6085 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2224 },
6086 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1923 },
6087 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1923 },
6088 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2225 },
6089 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2226 },
6090 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2226 },
6091 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2227 },
6092 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1923 },
6093 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2228 },
20856094 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 569 },
2086 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2207 },
2087 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2211 },
2088 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2212 },
2089 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2213 },
2090 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2214 },
2091 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2215 },
2092 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2216 },
2093 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2217 },
6095 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2229 },
6096 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2233 },
6097 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2234 },
6098 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2235 },
6099 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2236 },
6100 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2237 },
6101 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2238 },
6102 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2239 },
20946103 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 655 },
2095 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2218 },
6104 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2240 },
20966105 .{ .char = 'i', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
20976106 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 655 },
2098 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2219 },
2099 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 33, .child_index = 2220 },
2100 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1131 },
2101 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2221 },
2102 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2222 },
2103 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1926 },
2104 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2223 },
2105 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2225 },
2106 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 40, .child_index = 2226 },
2107 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2227 },
2108 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2228 },
2109 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2229 },
2110 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2230 },
2111 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2231 },
2112 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2232 },
6107 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2241 },
6108 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 33, .child_index = 2242 },
6109 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1133 },
6110 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2243 },
6111 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2244 },
6112 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1945 },
6113 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2245 },
6114 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2247 },
6115 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 40, .child_index = 2248 },
6116 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2249 },
6117 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2250 },
6118 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2251 },
6119 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2252 },
6120 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2253 },
6121 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2254 },
21136122 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 580 },
2114 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2233 },
2115 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2234 },
6123 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2255 },
6124 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2256 },
21166125 .{ .char = '6', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 649 },
21176126 .{ .char = '6', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 649 },
21186127 .{ .char = 'g', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
2119 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 2235 },
2120 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2236 },
2121 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2237 },
2122 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2238 },
2123 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2239 },
2124 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 2240 },
2125 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2241 },
6128 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 2257 },
6129 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2258 },
6130 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2259 },
6131 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2260 },
6132 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2261 },
6133 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 2262 },
6134 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2263 },
21266135 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 582 },
2127 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2242 },
2128 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1464 },
2129 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2243 },
2130 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2245 },
2131 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2247 },
6136 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2264 },
6137 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1470 },
6138 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2265 },
6139 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2267 },
6140 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2269 },
21326141 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 585 },
2133 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2248 },
6142 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2270 },
21346143 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 664 },
2135 .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2249 },
6144 .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2271 },
21366145 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 656 },
2137 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2250 },
2138 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2251 },
2139 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2252 },
2140 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2253 },
2141 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2255 },
2142 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2256 },
2143 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2257 },
2144 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2258 },
2145 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2259 },
2146 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2256 },
2147 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2260 },
2148 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2262 },
2149 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2262 },
2150 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2263 },
2151 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2264 },
2152 .{ .char = 'a', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 2266 },
2153 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 122, .child_index = 2267 },
2154 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2268 },
2155 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 2269 },
2156 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2272 },
2157 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1940 },
6146 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2272 },
6147 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2273 },
6148 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2274 },
6149 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2275 },
6150 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2277 },
6151 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2278 },
6152 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2279 },
6153 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2280 },
6154 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2281 },
6155 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2278 },
6156 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2282 },
6157 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2284 },
6158 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2284 },
6159 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2285 },
6160 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2286 },
6161 .{ .char = 'a', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 2288 },
6162 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 122, .child_index = 2289 },
6163 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2290 },
6164 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 2291 },
6165 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2294 },
6166 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1959 },
21586167 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 412 },
21596168 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 412 },
2160 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2273 },
6169 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2295 },
21616170 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 412 },
2162 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 7, .child_index = 2274 },
2163 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2277 },
2164 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2278 },
2165 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2280 },
2166 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2281 },
2167 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2283 },
2168 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2284 },
2169 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2286 },
2170 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2287 },
2171 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2288 },
2172 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2290 },
2173 .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2293 },
2174 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 24, .child_index = 2295 },
2175 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 2297 },
2176 .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 7, .child_index = 2299 },
2177 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2302 },
2178 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2303 },
6171 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 7, .child_index = 2296 },
6172 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2299 },
6173 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2300 },
6174 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2302 },
6175 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2303 },
6176 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2305 },
6177 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2306 },
6178 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2308 },
6179 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2309 },
6180 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2310 },
6181 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2312 },
6182 .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2315 },
6183 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 24, .child_index = 2317 },
6184 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 2319 },
6185 .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 7, .child_index = 2321 },
6186 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2324 },
6187 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2325 },
21796188 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 520 },
2180 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2305 },
2181 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2288 },
2182 .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2293 },
2183 .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2293 },
2184 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 7, .child_index = 2306 },
2185 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2302 },
2186 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2308 },
6189 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2327 },
6190 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2310 },
6191 .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2315 },
6192 .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2315 },
6193 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 7, .child_index = 2328 },
6194 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2324 },
6195 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2330 },
21876196 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 431 },
2188 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2287 },
2189 .{ .char = 'e', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 2309 },
2190 .{ .char = 'v', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 2310 },
6197 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2309 },
6198 .{ .char = 'e', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 2331 },
6199 .{ .char = 'v', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 2332 },
21916200 .{ .char = '1', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 648 },
2192 .{ .char = '3', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2311 },
6201 .{ .char = '3', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2333 },
21936202 .{ .char = '6', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 649 },
2194 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2312 },
2195 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2313 },
2196 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2314 },
2197 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2315 },
2198 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2316 },
2199 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2317 },
2200 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 2318 },
2201 .{ .char = '2', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2319 },
6203 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2334 },
6204 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2335 },
6205 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2336 },
6206 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2337 },
6207 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2338 },
6208 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2339 },
6209 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2340 },
6210 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 2341 },
6211 .{ .char = '2', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2342 },
22026212 .{ .char = '6', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
22036213 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 238 },
22046214 .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
2205 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2320 },
2206 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2321 },
2207 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2322 },
2208 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2323 },
2209 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2325 },
2210 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2326 },
2211 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 25, .child_index = 2327 },
2212 .{ .char = '2', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2319 },
2213 .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 2328 },
2214 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2329 },
2215 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2330 },
2216 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2331 },
2217 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2332 },
2218 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2333 },
2219 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2334 },
2220 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 2335 },
2221 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2336 },
2222 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2337 },
2223 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2338 },
2224 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2339 },
2225 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2340 },
2226 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2236 },
2227 .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 2341 },
2228 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2343 },
2229 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2344 },
2230 .{ .char = 'a', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 1766 },
2231 .{ .char = 'd', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 1766 },
2232 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2345 },
2233 .{ .char = 'y', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 2346 },
2234 .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 2346 },
2235 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 19, .child_index = 2347 },
2236 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2350 },
2237 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 2353 },
2238 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 16, .child_index = 2354 },
2239 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2355 },
2240 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2356 },
2241 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2357 },
2242 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 24, .child_index = 2360 },
2243 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 21, .child_index = 2365 },
2244 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2368 },
2245 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 25, .child_index = 2371 },
2246 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2373 },
2247 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 24, .child_index = 2374 },
2248 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2375 },
2249 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2376 },
2250 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 2377 },
2251 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2378 },
2252 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 16, .child_index = 2379 },
2253 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2380 },
2254 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 13, .child_index = 2382 },
2255 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 10, .child_index = 2384 },
2256 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 2385 },
2257 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2386 },
2258 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2387 },
2259 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 32, .child_index = 2388 },
2260 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2390 },
2261 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2387 },
2262 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2391 },
2263 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2392 },
2264 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 2098 },
2265 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2393 },
2266 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 24, .child_index = 2394 },
2267 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2400 },
2268 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2401 },
2269 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2402 },
2270 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2404 },
2271 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2405 },
2272 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 14, .child_index = 2406 },
2273 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2410 },
2274 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 26, .child_index = 2413 },
2275 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 2420 },
2276 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2423 },
2277 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2424 },
2278 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 16, .child_index = 2425 },
2279 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2426 },
2280 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 2427 },
2281 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 28, .child_index = 2430 },
2282 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 20, .child_index = 2432 },
2283 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 2433 },
2284 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2435 },
2285 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2436 },
2286 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2437 },
2287 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2110 },
2288 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2439 },
2289 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 2441 },
2290 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2443 },
2291 .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2444 },
2292 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 16, .child_index = 2445 },
2293 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2447 },
2294 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 32, .child_index = 2448 },
2295 .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2450 },
2296 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 24, .child_index = 2452 },
2297 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2453 },
2298 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2110 },
2299 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2454 },
2300 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2455 },
2301 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2456 },
2302 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2457 },
2303 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2458 },
2304 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2459 },
2305 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2460 },
2306 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2461 },
2307 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2462 },
2308 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2463 },
2309 .{ .char = 'y', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 1528 },
2310 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2464 },
2311 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2465 },
2312 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2466 },
2313 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2467 },
2314 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2468 },
2315 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2469 },
2316 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2470 },
2317 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2472 },
2318 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2473 },
2319 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2474 },
2320 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 13, .child_index = 2476 },
2321 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2479 },
2322 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2481 },
2323 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2482 },
2324 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1379 },
2325 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2483 },
2326 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2484 },
2327 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2485 },
2328 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2487 },
2329 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2488 },
2330 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2491 },
2331 .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2492 },
2332 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2495 },
2333 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2496 },
2334 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2497 },
2335 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2498 },
2336 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2499 },
2337 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2501 },
2338 .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 2502 },
2339 .{ .char = 'w', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2506 },
2340 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1663 },
6215 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2343 },
6216 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2344 },
6217 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2345 },
6218 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2346 },
6219 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2348 },
6220 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2349 },
6221 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 25, .child_index = 2350 },
6222 .{ .char = '2', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2342 },
6223 .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 2351 },
6224 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2352 },
6225 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2353 },
6226 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2354 },
6227 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2355 },
6228 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2356 },
6229 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2357 },
6230 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 2358 },
6231 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2359 },
6232 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2360 },
6233 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2361 },
6234 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2362 },
6235 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2363 },
6236 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2258 },
6237 .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 2364 },
6238 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2366 },
6239 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2367 },
6240 .{ .char = 'a', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 1781 },
6241 .{ .char = 'd', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 1781 },
6242 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2368 },
6243 .{ .char = 'y', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 2369 },
6244 .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 2369 },
6245 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 19, .child_index = 2370 },
6246 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2373 },
6247 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 2376 },
6248 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 16, .child_index = 2377 },
6249 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2378 },
6250 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2379 },
6251 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2380 },
6252 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 24, .child_index = 2383 },
6253 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 21, .child_index = 2388 },
6254 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2391 },
6255 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 25, .child_index = 2394 },
6256 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2396 },
6257 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 24, .child_index = 2397 },
6258 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2398 },
6259 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2399 },
6260 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 2400 },
6261 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2401 },
6262 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 16, .child_index = 2402 },
6263 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2403 },
6264 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 13, .child_index = 2405 },
6265 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 10, .child_index = 2407 },
6266 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 2408 },
6267 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2409 },
6268 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2410 },
6269 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 32, .child_index = 2411 },
6270 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2413 },
6271 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2410 },
6272 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2414 },
6273 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2415 },
6274 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 2118 },
6275 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2416 },
6276 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 24, .child_index = 2417 },
6277 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2423 },
6278 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2424 },
6279 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2425 },
6280 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2427 },
6281 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2428 },
6282 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 14, .child_index = 2429 },
6283 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2433 },
6284 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 26, .child_index = 2436 },
6285 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 2443 },
6286 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2446 },
6287 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2447 },
6288 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 16, .child_index = 2448 },
6289 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2449 },
6290 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 2450 },
6291 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 28, .child_index = 2453 },
6292 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 20, .child_index = 2455 },
6293 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 2456 },
6294 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2458 },
6295 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2459 },
6296 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2460 },
6297 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2130 },
6298 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2462 },
6299 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 2464 },
6300 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2466 },
6301 .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2467 },
6302 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 16, .child_index = 2468 },
6303 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2470 },
6304 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 32, .child_index = 2471 },
6305 .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2473 },
6306 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 24, .child_index = 2475 },
6307 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2476 },
6308 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2130 },
6309 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2477 },
6310 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2478 },
6311 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2479 },
6312 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2480 },
6313 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2481 },
6314 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2482 },
6315 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2483 },
6316 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2484 },
6317 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2485 },
6318 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2486 },
6319 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2487 },
6320 .{ .char = 'y', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 1536 },
6321 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2488 },
6322 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2489 },
6323 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2490 },
6324 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2491 },
6325 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2492 },
6326 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2493 },
6327 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2494 },
6328 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2496 },
6329 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2497 },
6330 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2498 },
6331 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 13, .child_index = 2500 },
6332 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2503 },
6333 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2505 },
6334 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2506 },
6335 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1385 },
23416336 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2507 },
2342 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2508 },
6337 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2508 },
6338 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2509 },
6339 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2511 },
6340 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2512 },
6341 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2515 },
6342 .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2516 },
6343 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2519 },
6344 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2520 },
6345 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2521 },
6346 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2522 },
6347 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2523 },
6348 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2525 },
6349 .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 2526 },
6350 .{ .char = 'w', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2530 },
6351 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1677 },
6352 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2531 },
6353 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2532 },
23436354 .{ .char = 'w', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
2344 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2509 },
2345 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 2510 },
2346 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2511 },
2347 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2512 },
2348 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2513 },
2349 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2514 },
2350 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2515 },
2351 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 7, .child_index = 2516 },
2352 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2517 },
2353 .{ .char = 'o', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 1766 },
2354 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2040 },
2355 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2518 },
2356 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 2520 },
2357 .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 1775 },
6355 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2533 },
6356 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 2534 },
6357 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2535 },
6358 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2536 },
6359 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2537 },
6360 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2538 },
6361 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2539 },
6362 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 7, .child_index = 2540 },
6363 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2541 },
6364 .{ .char = 'o', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 1781 },
6365 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2060 },
6366 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2542 },
6367 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 2544 },
6368 .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 3, .child_index = 1791 },
23586369 .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
2359 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1733 },
2360 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1577 },
2361 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2521 },
2362 .{ .char = 'n', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 1766 },
2363 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2522 },
2364 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2523 },
6370 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1747 },
6371 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1585 },
6372 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2545 },
6373 .{ .char = 'n', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 1781 },
6374 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2546 },
6375 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2547 },
23656376 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 297 },
2366 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2524 },
6377 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2548 },
23676378 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 429 },
2368 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2525 },
2369 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2526 },
2370 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2527 },
2371 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1263, .child_index = 2528 },
2372 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2540 },
2373 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2543 },
2374 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2544 },
2375 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2545 },
6379 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2549 },
6380 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2550 },
6381 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2551 },
6382 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2552 },
6383 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1263, .child_index = 2553 },
6384 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2565 },
6385 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2568 },
6386 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2569 },
6387 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2570 },
23766388 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 458 },
2377 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2546 },
2378 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2547 },
2379 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2548 },
2380 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2549 },
2381 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2550 },
2382 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2551 },
2383 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2552 },
2384 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1904 },
2385 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2553 },
2386 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2554 },
2387 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2555 },
2388 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2556 },
6389 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2571 },
6390 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2572 },
6391 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2573 },
6392 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2574 },
6393 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2575 },
6394 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2576 },
6395 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2577 },
6396 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1923 },
6397 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2578 },
6398 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2579 },
6399 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2580 },
6400 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2581 },
23896401 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 496 },
2390 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2557 },
2391 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2559 },
2392 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2560 },
2393 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2561 },
2394 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2562 },
6402 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2582 },
6403 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2584 },
6404 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2585 },
6405 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2586 },
6406 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2587 },
23956407 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 568 },
23966408 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 344 },
2397 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2566 },
2398 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 33, .child_index = 2567 },
2399 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1926 },
2400 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1926 },
2401 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2568 },
2402 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2568 },
2403 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2569 },
2404 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 40, .child_index = 2570 },
2405 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2571 },
2406 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2572 },
2407 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2573 },
2408 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2574 },
2409 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2575 },
2410 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2576 },
6409 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2591 },
6410 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 33, .child_index = 2592 },
6411 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1945 },
6412 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1945 },
6413 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2593 },
6414 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2593 },
6415 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2594 },
6416 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 40, .child_index = 2595 },
6417 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2596 },
6418 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2597 },
6419 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2598 },
6420 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2599 },
6421 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2600 },
6422 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2601 },
24116423 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 674 },
2412 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2577 },
2413 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 2578 },
6424 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2602 },
6425 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 2603 },
24146426 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 584 },
2415 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2579 },
2416 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2580 },
2417 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2581 },
2418 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 2582 },
2419 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2583 },
2420 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2584 },
6427 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2604 },
6428 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2605 },
6429 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2606 },
6430 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 2607 },
6431 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2608 },
6432 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2609 },
24216433 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 458 },
24226434 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 458 },
24236435 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 463 },
24246436 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 457 },
24256437 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 519 },
24266438 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 412 },
2427 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2585 },
2428 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2586 },
2429 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2587 },
2430 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2588 },
2431 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2259 },
2432 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2589 },
2433 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2590 },
2434 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2259 },
2435 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2591 },
2436 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2592 },
2437 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2589 },
2438 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2591 },
2439 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2589 },
2440 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2260 },
2441 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2593 },
2442 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2594 },
6439 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2610 },
6440 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2611 },
6441 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2612 },
6442 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2613 },
6443 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2281 },
6444 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2614 },
6445 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2615 },
6446 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2281 },
6447 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2616 },
6448 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2617 },
6449 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2614 },
6450 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2616 },
6451 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2614 },
6452 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2282 },
6453 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2618 },
6454 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2619 },
24436455 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 291 },
2444 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2595 },
2445 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 122, .child_index = 2597 },
2446 .{ .char = 'p', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 1399 },
6456 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2620 },
6457 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 122, .child_index = 2622 },
6458 .{ .char = 'p', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 1405 },
24476459 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 332 },
2448 .{ .char = 's', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 1938 },
2449 .{ .char = 'z', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 1938 },
2450 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2614 },
2451 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2615 },
6460 .{ .char = 's', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 1957 },
6461 .{ .char = 'z', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 1957 },
6462 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2639 },
6463 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2640 },
24526464 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 332 },
2453 .{ .char = 'c', .end_of_word = true, .end_of_list = false, .number = 4, .child_index = 2616 },
2454 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2618 },
2455 .{ .char = 'r', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 2619 },
2456 .{ .char = 'c', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 1399 },
2457 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2621 },
2458 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1207 },
2459 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1708 },
6465 .{ .char = 'c', .end_of_word = true, .end_of_list = false, .number = 4, .child_index = 2641 },
6466 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2643 },
6467 .{ .char = 'r', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 2644 },
6468 .{ .char = 'c', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 1405 },
6469 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2646 },
6470 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1209 },
6471 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 1722 },
24606472 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 463 },
24616473 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 655 },
24626474 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 463 },
2463 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2622 },
2464 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1699 },
2465 .{ .char = 'r', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 2623 },
2466 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2625 },
6475 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2647 },
6476 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1713 },
6477 .{ .char = 'r', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 2648 },
6478 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2650 },
24676479 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 463 },
24686480 .{ .char = 'l', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
2469 .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2615 },
6481 .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2640 },
24706482 .{ .char = 'v', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 549 },
2471 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2288 },
2472 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2626 },
2473 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 14, .child_index = 2628 },
2474 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 2630 },
2475 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2633 },
2476 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2635 },
2477 .{ .char = 'c', .end_of_word = true, .end_of_list = false, .number = 4, .child_index = 2616 },
6483 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2310 },
6484 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2651 },
6485 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 14, .child_index = 2653 },
6486 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 2655 },
6487 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2658 },
6488 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2660 },
6489 .{ .char = 'c', .end_of_word = true, .end_of_list = false, .number = 4, .child_index = 2641 },
24786490 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 332 },
2479 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2618 },
2480 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2636 },
2481 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2638 },
2482 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2639 },
2483 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2640 },
2484 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 2641 },
2485 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2635 },
2486 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2644 },
2487 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2645 },
2488 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2647 },
6491 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2643 },
6492 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2661 },
6493 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2663 },
6494 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2664 },
6495 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2665 },
6496 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 2666 },
6497 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2660 },
6498 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2669 },
6499 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2670 },
6500 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2672 },
24896501 .{ .char = '2', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
2490 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2648 },
2491 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2649 },
2492 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2650 },
2493 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2651 },
2494 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2652 },
2495 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2653 },
2496 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1534 },
6502 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2673 },
6503 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2674 },
6504 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2675 },
6505 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2676 },
6506 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2677 },
6507 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2678 },
6508 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2679 },
6509 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1542 },
24976510 .{ .char = '8', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
2498 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2654 },
2499 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2655 },
2500 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2656 },
2501 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2657 },
2502 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2658 },
2503 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2659 },
2504 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2660 },
2505 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 25, .child_index = 2661 },
2506 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2662 },
2507 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2663 },
2508 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1795 },
2509 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2664 },
2510 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2665 },
6511 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2680 },
6512 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2681 },
6513 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2682 },
6514 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2683 },
6515 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2684 },
6516 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2685 },
6517 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2686 },
6518 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 25, .child_index = 2687 },
6519 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2688 },
6520 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2689 },
6521 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1811 },
6522 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2690 },
6523 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2691 },
25116524 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 729 },
2512 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2666 },
2513 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1494 },
2514 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2667 },
2515 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2669 },
2516 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2670 },
2517 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1197 },
2518 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2671 },
2519 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2672 },
2520 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2673 },
6525 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2692 },
6526 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1501 },
6527 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2693 },
6528 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2695 },
6529 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2696 },
6530 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1199 },
6531 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2697 },
6532 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2698 },
6533 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2699 },
25216534 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 655 },
2522 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2674 },
2523 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2675 },
2524 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2677 },
2525 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2678 },
2526 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 15, .child_index = 2679 },
2527 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2680 },
6535 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2700 },
6536 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2701 },
6537 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2703 },
6538 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 2704 },
6539 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 15, .child_index = 2705 },
6540 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2706 },
25286541 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 479 },
2529 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2681 },
2530 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2682 },
2531 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 2683 },
2532 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 2684 },
2533 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2686 },
2534 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2687 },
2535 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2688 },
6542 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2707 },
6543 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2708 },
6544 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 2709 },
6545 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 2710 },
6546 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2712 },
6547 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2713 },
6548 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2714 },
25366549 .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 463 },
25376550 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 463 },
2538 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2689 },
2539 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2691 },
2540 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2692 },
2541 .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2693 },
2542 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 14, .child_index = 2694 },
2543 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2695 },
2544 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2696 },
2545 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 18, .child_index = 2697 },
2546 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2698 },
2547 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2699 },
2548 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2700 },
2549 .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 2701 },
2550 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 13, .child_index = 2704 },
2551 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2699 },
2552 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 24, .child_index = 2705 },
2553 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2439 },
2554 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2708 },
2555 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 2709 },
2556 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2711 },
2557 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 2712 },
2558 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2713 },
2559 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2439 },
2560 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2714 },
2561 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 2385 },
2562 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 2715 },
2563 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 2717 },
2564 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2722 },
2565 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2724 },
2566 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 16, .child_index = 2725 },
2567 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 2725 },
2568 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2727 },
2569 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2728 },
2570 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2729 },
2571 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2730 },
2572 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2731 },
2573 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2732 },
2574 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2733 },
2575 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2736 },
2576 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2737 },
2577 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 2738 },
2578 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2741 },
2579 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2742 },
2580 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2745 },
2581 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2746 },
2582 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2748 },
2583 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2749 },
2584 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2750 },
2585 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2752 },
2586 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2753 },
2587 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2754 },
2588 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2755 },
2589 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2756 },
2590 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2757 },
2591 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2731 },
2592 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2732 },
2593 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2758 },
2594 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2736 },
2595 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2737 },
2596 .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2760 },
2597 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 2761 },
2598 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2745 },
2599 .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2765 },
2600 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2766 },
2601 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2767 },
2602 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2768 },
2603 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 2769 },
2604 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2773 },
2605 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2775 },
2606 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2779 },
2607 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2780 },
2608 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2781 },
2609 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 20, .child_index = 2782 },
2610 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 20, .child_index = 2782 },
2611 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2728 },
2612 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2784 },
2613 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2785 },
2614 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2786 },
2615 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2789 },
2616 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2789 },
2617 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2790 },
2618 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2791 },
2619 .{ .char = 'k', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2792 },
2620 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2794 },
2621 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2728 },
2622 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2795 },
2623 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2722 },
2624 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2722 },
2625 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2796 },
2626 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 16, .child_index = 2797 },
2627 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 2797 },
2628 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2775 },
2629 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2780 },
2630 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 24, .child_index = 2800 },
2631 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2802 },
2632 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1567 },
2633 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2803 },
2634 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2804 },
2635 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2805 },
2636 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2806 },
2637 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2807 },
2638 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2808 },
2639 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2809 },
2640 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2810 },
2641 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2811 },
2642 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2812 },
2643 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2813 },
6551 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2715 },
6552 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2717 },
6553 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2718 },
6554 .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2719 },
6555 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 14, .child_index = 2720 },
6556 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2721 },
6557 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2722 },
6558 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 18, .child_index = 2723 },
6559 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2724 },
6560 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2725 },
6561 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2726 },
6562 .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 2727 },
6563 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 13, .child_index = 2730 },
6564 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2725 },
6565 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 24, .child_index = 2731 },
6566 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2462 },
6567 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2734 },
6568 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 2735 },
6569 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2737 },
6570 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 2738 },
6571 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2739 },
6572 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2462 },
6573 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2740 },
6574 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 2408 },
6575 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 2741 },
6576 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 2743 },
6577 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2748 },
6578 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2750 },
6579 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 16, .child_index = 2751 },
6580 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 2751 },
6581 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2753 },
6582 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2754 },
6583 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2755 },
6584 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2756 },
6585 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2757 },
6586 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2758 },
6587 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2759 },
6588 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2762 },
6589 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2763 },
6590 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 2764 },
6591 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2767 },
6592 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2768 },
6593 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2771 },
6594 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2772 },
6595 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2774 },
6596 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2775 },
6597 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2776 },
6598 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2778 },
6599 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2779 },
6600 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2780 },
6601 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2781 },
6602 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2782 },
6603 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2783 },
6604 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2757 },
6605 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2758 },
6606 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2784 },
6607 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2762 },
6608 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2763 },
6609 .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2786 },
6610 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 2787 },
6611 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2771 },
6612 .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2791 },
6613 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2792 },
6614 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2793 },
6615 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2794 },
6616 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 2795 },
6617 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2799 },
6618 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2801 },
6619 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2805 },
6620 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2806 },
6621 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2807 },
6622 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 20, .child_index = 2808 },
6623 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 20, .child_index = 2808 },
6624 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2754 },
6625 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2810 },
6626 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2811 },
6627 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2812 },
6628 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2815 },
6629 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2815 },
6630 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2816 },
6631 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2817 },
6632 .{ .char = 'k', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2818 },
6633 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2820 },
6634 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2754 },
6635 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2821 },
6636 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2748 },
6637 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2748 },
6638 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2822 },
6639 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 16, .child_index = 2823 },
6640 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 2823 },
6641 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2801 },
6642 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2806 },
6643 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 24, .child_index = 2826 },
6644 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2828 },
6645 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 1575 },
6646 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2829 },
6647 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2830 },
6648 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2831 },
6649 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2832 },
6650 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2833 },
6651 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2834 },
6652 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 496 },
6653 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2835 },
6654 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2836 },
6655 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2837 },
6656 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2838 },
6657 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2839 },
26446658 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 412 },
2645 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2814 },
2646 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2815 },
2647 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2819 },
2648 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2820 },
2649 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2822 },
2650 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2824 },
2651 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2825 },
2652 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2826 },
2653 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2827 },
2654 .{ .char = 'e', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 2829 },
2655 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 2830 },
2656 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2835 },
2657 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2836 },
2658 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2837 },
2659 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2838 },
2660 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2839 },
2661 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2840 },
2662 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2841 },
2663 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2840 },
2664 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1379 },
2665 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2842 },
2666 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2843 },
2667 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2844 },
2668 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2845 },
2669 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2842 },
2670 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2846 },
2671 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2843 },
2672 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2844 },
2673 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2847 },
2674 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2848 },
2675 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2850 },
2676 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2851 },
2677 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2852 },
2678 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2853 },
2679 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2855 },
2680 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2856 },
2681 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2857 },
2682 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2858 },
2683 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2856 },
2684 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2859 },
6659 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2840 },
6660 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2841 },
6661 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2845 },
6662 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2846 },
6663 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2848 },
6664 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2850 },
6665 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2851 },
6666 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2852 },
6667 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2853 },
6668 .{ .char = 'e', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 2855 },
6669 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 2856 },
6670 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2861 },
6671 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2862 },
6672 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2863 },
6673 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2864 },
6674 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2865 },
6675 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2866 },
6676 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2867 },
6677 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2866 },
6678 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1385 },
6679 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2868 },
6680 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2869 },
6681 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2870 },
6682 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2871 },
6683 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2868 },
6684 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2872 },
6685 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2869 },
6686 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2870 },
6687 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2873 },
6688 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2874 },
6689 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2876 },
6690 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2877 },
6691 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2878 },
6692 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2879 },
6693 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2881 },
6694 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2882 },
6695 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2883 },
6696 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2884 },
6697 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2882 },
6698 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2885 },
26856699 .{ .char = 'w', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
2686 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2860 },
2687 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2861 },
2688 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 2862 },
2689 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2863 },
2690 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2864 },
2691 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2865 },
2692 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2866 },
2693 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2868 },
2694 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 7, .child_index = 2869 },
2695 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2803 },
2696 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2873 },
2697 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2874 },
2698 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 2875 },
2699 .{ .char = 'n', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 1766 },
2700 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1530 },
2701 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2653 },
2702 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2876 },
2703 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2877 },
2704 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2878 },
2705 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2879 },
2706 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2880 },
2707 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2881 },
2708 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2883 },
2709 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2885 },
2710 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2886 },
2711 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2890 },
2712 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2892 },
2713 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 393, .child_index = 2893 },
2714 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2897 },
2715 .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2899 },
2716 .{ .char = 'v', .end_of_word = false, .end_of_list = false, .number = 836, .child_index = 2901 },
2717 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2915 },
2718 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2916 },
2719 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2917 },
2720 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2918 },
2721 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2919 },
2722 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2920 },
2723 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2921 },
6700 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2886 },
6701 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2887 },
6702 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 2888 },
6703 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2889 },
6704 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2890 },
6705 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2891 },
6706 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2892 },
6707 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2894 },
6708 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 7, .child_index = 2895 },
6709 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2829 },
6710 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2899 },
6711 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2900 },
6712 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 2901 },
6713 .{ .char = 'n', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 1781 },
6714 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1538 },
6715 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2679 },
6716 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2902 },
6717 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2903 },
6718 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2904 },
6719 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2905 },
6720 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2906 },
6721 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2907 },
6722 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2908 },
6723 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2910 },
6724 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2912 },
6725 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2913 },
6726 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2917 },
6727 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2919 },
6728 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 393, .child_index = 2920 },
6729 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2924 },
6730 .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2926 },
6731 .{ .char = 'v', .end_of_word = false, .end_of_list = false, .number = 836, .child_index = 2928 },
6732 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2942 },
6733 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2943 },
6734 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2944 },
6735 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2945 },
6736 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2946 },
6737 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2947 },
6738 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2948 },
27246739 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 572 },
2725 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2922 },
2726 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2923 },
2727 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2924 },
2728 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2925 },
2729 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2926 },
2730 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2927 },
2731 .{ .char = '2', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2928 },
2732 .{ .char = '2', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1389 },
6740 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2949 },
6741 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2950 },
6742 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2951 },
6743 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2952 },
6744 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2953 },
6745 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2954 },
6746 .{ .char = '2', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2955 },
6747 .{ .char = '2', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1395 },
27336748 .{ .char = '2', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 496 },
2734 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1671 },
6749 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1685 },
27356750 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 506 },
2736 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2929 },
2737 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2930 },
6751 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2956 },
6752 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2957 },
27386753 .{ .char = 'z', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
2739 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1131 },
2740 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2931 },
2741 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2932 },
2742 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2933 },
2743 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2934 },
2744 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2935 },
2745 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 33, .child_index = 2936 },
2746 .{ .char = '3', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2311 },
6754 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1133 },
6755 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2958 },
6756 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2959 },
6757 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2960 },
6758 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2961 },
6759 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2962 },
6760 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 33, .child_index = 2963 },
6761 .{ .char = '3', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2333 },
27476762 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 311 },
2748 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 40, .child_index = 2937 },
2749 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2944 },
2750 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2945 },
2751 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2946 },
6763 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 40, .child_index = 2964 },
6764 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2971 },
6765 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2972 },
6766 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2973 },
27526767 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 572 },
2753 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2947 },
2754 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2948 },
2755 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2949 },
2756 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 2950 },
2757 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2951 },
2758 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2952 },
2759 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2953 },
2760 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 2954 },
2761 .{ .char = 'r', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 1399 },
6768 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2974 },
6769 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2975 },
6770 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2976 },
6771 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 2977 },
6772 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2978 },
6773 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 2979 },
6774 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2980 },
6775 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 2981 },
6776 .{ .char = 'r', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 1405 },
27626777 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 897 },
2763 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2955 },
2764 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2956 },
2765 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2957 },
2766 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2958 },
2767 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2959 },
2768 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2960 },
2769 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2959 },
2770 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2959 },
2771 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2961 },
2772 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2962 },
2773 .{ .char = 'u', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2963 },
2774 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2964 },
2775 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2965 },
2776 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2967 },
2777 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 13, .child_index = 2968 },
2778 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 15, .child_index = 2972 },
2779 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2974 },
2780 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 10, .child_index = 2976 },
2781 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2980 },
2782 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 2981 },
2783 .{ .char = 'k', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2985 },
2784 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 2986 },
2785 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 2989 },
2786 .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2992 },
2787 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 11, .child_index = 2994 },
2788 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 23, .child_index = 2997 },
2789 .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3003 },
2790 .{ .char = 'u', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3004 },
2791 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 3006 },
2792 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3008 },
2793 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3009 },
6778 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2982 },
6779 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2983 },
6780 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2984 },
6781 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2985 },
6782 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2986 },
6783 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2987 },
6784 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2986 },
6785 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2986 },
6786 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2988 },
6787 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2989 },
6788 .{ .char = 'u', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2990 },
6789 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2991 },
6790 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 2992 },
6791 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2994 },
6792 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 13, .child_index = 2995 },
6793 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 15, .child_index = 2999 },
6794 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3001 },
6795 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 10, .child_index = 3003 },
6796 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3007 },
6797 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 3008 },
6798 .{ .char = 'k', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3012 },
6799 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 3013 },
6800 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 3016 },
6801 .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3019 },
6802 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 11, .child_index = 3021 },
6803 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 23, .child_index = 3024 },
6804 .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3030 },
6805 .{ .char = 'u', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3031 },
6806 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 3033 },
6807 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3035 },
6808 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3036 },
27946809 .{ .char = '2', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 549 },
27956810 .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
2796 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3010 },
6811 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3037 },
27976812 .{ .char = '2', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
2798 .{ .char = 'r', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 1399 },
2799 .{ .char = 'c', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 1399 },
2800 .{ .char = 'b', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 1712 },
6813 .{ .char = 'r', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 1405 },
6814 .{ .char = 'c', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 1405 },
6815 .{ .char = 'b', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 1726 },
28016816 .{ .char = '6', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 649 },
28026817 .{ .char = 'p', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
2803 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3011 },
6818 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3038 },
28046819 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 463 },
2805 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2635 },
2806 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 10, .child_index = 3013 },
2807 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3018 },
2808 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3020 },
2809 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3021 },
2810 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3020 },
2811 .{ .char = 't', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 3024 },
6820 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2660 },
6821 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 10, .child_index = 3040 },
6822 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3045 },
6823 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3047 },
6824 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3048 },
6825 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3047 },
6826 .{ .char = 't', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 3051 },
28126827 .{ .char = 'x', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
2813 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3011 },
2814 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3025 },
2815 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3026 },
2816 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3027 },
2817 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3028 },
6828 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3038 },
6829 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3052 },
6830 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3053 },
6831 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3054 },
6832 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3055 },
28186833 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 311 },
2819 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3029 },
2820 .{ .char = 't', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 3024 },
6834 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3056 },
6835 .{ .char = 't', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 3051 },
28216836 .{ .char = 'x', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
2822 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3031 },
2823 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1800 },
2824 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3032 },
2825 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3033 },
2826 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3034 },
2827 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3035 },
6837 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3058 },
6838 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1816 },
6839 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3059 },
6840 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3060 },
6841 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3061 },
6842 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3062 },
28286843 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 512 },
2829 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3036 },
2830 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3037 },
2831 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3038 },
2832 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3039 },
6844 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3063 },
6845 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3064 },
6846 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3065 },
6847 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3066 },
6848 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3067 },
28336849 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 291 },
2834 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3040 },
6850 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3068 },
28356851 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 568 },
2836 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3041 },
2837 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3042 },
2838 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3043 },
2839 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 25, .child_index = 3044 },
2840 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3045 },
2841 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3046 },
2842 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1174 },
2843 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3047 },
2844 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3048 },
2845 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3049 },
2846 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3050 },
2847 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3051 },
2848 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3052 },
2849 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3053 },
2850 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3054 },
2851 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3055 },
2852 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3056 },
2853 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3057 },
2854 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3058 },
2855 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3059 },
2856 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3060 },
2857 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 15, .child_index = 3061 },
2858 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3065 },
2859 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3066 },
2860 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3067 },
2861 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 3068 },
2862 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 3071 },
2863 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3071 },
2864 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3075 },
2865 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2790 },
6852 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3069 },
6853 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3070 },
6854 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3071 },
6855 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 25, .child_index = 3072 },
6856 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3073 },
6857 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3074 },
6858 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1176 },
6859 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3075 },
6860 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3076 },
6861 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3077 },
6862 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3078 },
6863 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3079 },
6864 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3080 },
6865 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3081 },
6866 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3082 },
6867 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3083 },
6868 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3084 },
6869 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3085 },
6870 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3086 },
6871 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3087 },
6872 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3088 },
6873 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 15, .child_index = 3089 },
6874 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3093 },
6875 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3094 },
6876 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3095 },
6877 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 3096 },
6878 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 3099 },
6879 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3099 },
6880 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3103 },
6881 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2816 },
28666882 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 463 },
2867 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3077 },
2868 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3078 },
2869 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3079 },
2870 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3080 },
2871 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3081 },
2872 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 14, .child_index = 3082 },
2873 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3087 },
2874 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3088 },
2875 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 18, .child_index = 3089 },
2876 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3091 },
2877 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3092 },
2878 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3093 },
2879 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3094 },
2880 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3095 },
2881 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 7, .child_index = 3096 },
2882 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 13, .child_index = 3098 },
2883 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3100 },
2884 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3101 },
2885 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2722 },
2886 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2728 },
2887 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 3102 },
2888 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2728 },
2889 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2722 },
2890 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 3104 },
2891 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2439 },
2892 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2722 },
2893 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2439 },
2894 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2722 },
6883 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3105 },
6884 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3106 },
6885 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3107 },
6886 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3108 },
6887 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3109 },
6888 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 14, .child_index = 3110 },
6889 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3115 },
6890 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3116 },
6891 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 18, .child_index = 3117 },
6892 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3119 },
6893 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3120 },
6894 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3121 },
6895 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3122 },
6896 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3123 },
6897 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 7, .child_index = 3124 },
6898 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 13, .child_index = 3126 },
6899 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3128 },
6900 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3129 },
6901 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2748 },
6902 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2754 },
6903 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 3130 },
6904 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2754 },
6905 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2748 },
6906 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 3132 },
6907 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2462 },
6908 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2748 },
6909 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2462 },
6910 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2748 },
28956911 .{ .char = 'b', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
28966912 .{ .char = 'd', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
28976913 .{ .char = 'h', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
28986914 .{ .char = 'v', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
28996915 .{ .char = 'w', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
2900 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2775 },
2901 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2779 },
2902 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3106 },
2903 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 3102 },
2904 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2728 },
2905 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2728 },
2906 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3102 },
2907 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3107 },
2908 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2780 },
2909 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2780 },
2910 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2780 },
2911 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3108 },
2912 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2780 },
2913 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2780 },
2914 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2780 },
2915 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2780 },
2916 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2732 },
2917 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2758 },
2918 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3109 },
2919 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2780 },
2920 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3111 },
2921 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3112 },
2922 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3113 },
2923 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3114 },
2924 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2780 },
2925 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2780 },
2926 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2779 },
2927 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3112 },
2928 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2730 },
2929 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3115 },
2930 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3115 },
2931 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3116 },
2932 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2780 },
2933 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2780 },
2934 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3117 },
2935 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2760 },
2936 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2780 },
2937 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2780 },
2938 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3117 },
2939 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2780 },
2940 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2732 },
2941 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2758 },
2942 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3109 },
2943 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3118 },
2944 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3120 },
2945 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3107 },
2946 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3107 },
2947 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3121 },
2948 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2779 },
2949 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3122 },
2950 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2779 },
2951 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3123 },
2952 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3124 },
6916 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2801 },
6917 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2805 },
6918 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3134 },
6919 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 3130 },
6920 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2754 },
6921 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2754 },
6922 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3130 },
6923 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3135 },
6924 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2806 },
6925 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2806 },
6926 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2806 },
6927 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3136 },
6928 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2806 },
6929 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2806 },
6930 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2806 },
6931 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2806 },
6932 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2758 },
6933 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2784 },
6934 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3137 },
6935 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2806 },
6936 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3139 },
6937 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3140 },
6938 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3141 },
6939 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3142 },
6940 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2806 },
6941 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2806 },
6942 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2805 },
6943 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3140 },
6944 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2756 },
6945 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3143 },
6946 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3143 },
6947 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3144 },
6948 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2806 },
6949 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2806 },
6950 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3145 },
6951 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2786 },
6952 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2806 },
6953 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2806 },
6954 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3145 },
6955 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2806 },
6956 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2758 },
6957 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2784 },
6958 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3137 },
6959 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3146 },
6960 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3148 },
6961 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3135 },
6962 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3135 },
6963 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3149 },
6964 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2805 },
6965 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3150 },
6966 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2805 },
6967 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3151 },
6968 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3152 },
29536969 .{ .char = 'b', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
29546970 .{ .char = 'd', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
29556971 .{ .char = 'h', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
29566972 .{ .char = 'w', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
2957 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2775 },
2958 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3125 },
2959 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2786 },
2960 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3127 },
2961 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2728 },
2962 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3130 },
2963 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2786 },
2964 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3131 },
2965 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3132 },
2966 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2779 },
2967 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2779 },
6973 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2801 },
6974 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3153 },
6975 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2812 },
6976 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3155 },
6977 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2754 },
6978 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3158 },
6979 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2812 },
6980 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3159 },
6981 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3160 },
6982 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2805 },
6983 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2805 },
29686984 .{ .char = 'v', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
29696985 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 412 },
2970 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3121 },
2971 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3122 },
2972 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2779 },
2973 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3133 },
2974 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3136 },
2975 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2775 },
2976 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2779 },
2977 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2722 },
2978 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 16, .child_index = 3137 },
2979 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2722 },
2980 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2779 },
2981 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3139 },
2982 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3140 },
2983 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3141 },
2984 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3142 },
2985 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3143 },
2986 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2230 },
2987 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3144 },
2988 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3145 },
2989 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3146 },
2990 .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 1528 },
2991 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3147 },
2992 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3148 },
2993 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3149 },
6986 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3149 },
6987 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3150 },
6988 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2805 },
6989 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3161 },
6990 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3164 },
6991 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2801 },
6992 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2805 },
6993 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2748 },
6994 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 16, .child_index = 3165 },
6995 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2748 },
6996 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2805 },
6997 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3167 },
6998 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3168 },
6999 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3169 },
7000 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3170 },
7001 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3171 },
7002 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2252 },
7003 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3172 },
7004 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3173 },
7005 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3174 },
7006 .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 1536 },
7007 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3175 },
7008 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3176 },
7009 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3177 },
29947010 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 311 },
2995 .{ .char = 't', .end_of_word = true, .end_of_list = false, .number = 4, .child_index = 3150 },
7011 .{ .char = 't', .end_of_word = true, .end_of_list = false, .number = 4, .child_index = 3178 },
29967012 .{ .char = 'z', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
29977013 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 451 },
29987014 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 458 },
29997015 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 458 },
3000 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3152 },
3001 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3154 },
3002 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3156 },
3003 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3157 },
3004 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3158 },
3005 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3159 },
3006 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2825 },
7016 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3180 },
7017 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3182 },
7018 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3184 },
7019 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3185 },
7020 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3186 },
7021 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3187 },
7022 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2851 },
30077023 .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
30087024 .{ .char = 'c', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
3009 .{ .char = 'm', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 2829 },
3010 .{ .char = 'n', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 2829 },
3011 .{ .char = 'p', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 2829 },
3012 .{ .char = 'z', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 2829 },
3013 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3160 },
3014 .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 2829 },
3015 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3161 },
3016 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3162 },
3017 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3163 },
7025 .{ .char = 'm', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 2855 },
7026 .{ .char = 'n', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 2855 },
7027 .{ .char = 'p', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 2855 },
7028 .{ .char = 'z', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 2855 },
7029 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3188 },
7030 .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 2855 },
7031 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3189 },
7032 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3190 },
7033 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3191 },
30187034 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 463 },
3019 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3164 },
3020 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3166 },
7035 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3192 },
7036 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3194 },
30217037 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 585 },
30227038 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 585 },
3023 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3169 },
3024 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3170 },
3025 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3172 },
3026 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3174 },
3027 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3175 },
7039 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3197 },
7040 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3198 },
7041 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3200 },
7042 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3202 },
7043 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3203 },
30287044 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 654 },
3029 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3176 },
3030 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3177 },
3031 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3177 },
7045 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3204 },
7046 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3205 },
7047 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3205 },
30327048 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 654 },
3033 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3178 },
7049 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3206 },
30347050 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 463 },
3035 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2507 },
3036 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3179 },
3037 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3180 },
3038 .{ .char = 'p', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3181 },
3039 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3182 },
3040 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 3183 },
3041 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3184 },
3042 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3185 },
3043 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3186 },
3044 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3187 },
3045 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3188 },
3046 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3189 },
3047 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2243 },
3048 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3190 },
7051 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2531 },
7052 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3207 },
7053 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3208 },
7054 .{ .char = 'p', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3209 },
7055 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3210 },
7056 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 3211 },
7057 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3212 },
7058 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3213 },
7059 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3214 },
7060 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3215 },
7061 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3216 },
7062 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3217 },
7063 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2265 },
7064 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3218 },
30497065 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 585 },
30507066 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 664 },
3051 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3193 },
3052 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3194 },
3053 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1534 },
7067 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3221 },
7068 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3222 },
7069 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 1542 },
30547070 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 450 },
3055 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3195 },
3056 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3196 },
3057 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3197 },
3058 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3198 },
3059 .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3199 },
3060 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3200 },
3061 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3201 },
3062 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3202 },
3063 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3203 },
3064 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3204 },
3065 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3205 },
3066 .{ .char = 'v', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 3206 },
3067 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3208 },
3068 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3209 },
3069 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3198 },
3070 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3210 },
3071 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3211 },
3072 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3208 },
3073 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3212 },
3074 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 388, .child_index = 3213 },
3075 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3204 },
3076 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3225 },
3077 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3208 },
3078 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3227 },
3079 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 36, .child_index = 3228 },
3080 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 15, .child_index = 3230 },
3081 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 71, .child_index = 3231 },
3082 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 45, .child_index = 3234 },
3083 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 7, .child_index = 3235 },
3084 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 294, .child_index = 3237 },
3085 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 32, .child_index = 3244 },
3086 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 35, .child_index = 3245 },
3087 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 81, .child_index = 3246 },
3088 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3251 },
3089 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3252 },
3090 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 42, .child_index = 3253 },
3091 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 163, .child_index = 3259 },
3092 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3267 },
3093 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2892 },
3094 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3268 },
3095 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3269 },
3096 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3268 },
3097 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3270 },
3098 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3271 },
3099 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3272 },
3100 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3273 },
3101 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3274 },
3102 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3275 },
3103 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3276 },
3104 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3277 },
3105 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3278 },
7071 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3223 },
7072 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3224 },
7073 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3225 },
7074 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3226 },
7075 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3227 },
7076 .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3228 },
7077 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3229 },
7078 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3230 },
7079 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3231 },
7080 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3232 },
7081 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3233 },
7082 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3234 },
7083 .{ .char = 'v', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 3235 },
7084 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3237 },
7085 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3238 },
7086 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3227 },
7087 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3239 },
7088 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3240 },
7089 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3237 },
7090 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3241 },
7091 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 388, .child_index = 3242 },
7092 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3233 },
7093 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3254 },
7094 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3237 },
7095 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3256 },
7096 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 36, .child_index = 3257 },
7097 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 15, .child_index = 3259 },
7098 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 71, .child_index = 3260 },
7099 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 45, .child_index = 3263 },
7100 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 7, .child_index = 3264 },
7101 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 294, .child_index = 3266 },
7102 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 32, .child_index = 3273 },
7103 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 35, .child_index = 3274 },
7104 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 81, .child_index = 3275 },
7105 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3280 },
7106 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3281 },
7107 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 42, .child_index = 3282 },
7108 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 163, .child_index = 3288 },
7109 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3296 },
7110 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2919 },
7111 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3297 },
7112 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3298 },
7113 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3297 },
7114 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3299 },
7115 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3300 },
7116 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3301 },
7117 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3302 },
7118 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3303 },
7119 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3304 },
7120 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3305 },
7121 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3306 },
7122 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3307 },
31067123 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 655 },
3107 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3279 },
3108 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3280 },
3109 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3281 },
3110 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3282 },
3111 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3283 },
3112 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3284 },
3113 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3285 },
3114 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 33, .child_index = 3286 },
3115 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3287 },
3116 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2245 },
3117 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3289 },
3118 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3290 },
3119 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3291 },
3120 .{ .char = 'u', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3292 },
3121 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3293 },
3122 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3294 },
3123 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3295 },
3124 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3296 },
3125 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3297 },
3126 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3298 },
3127 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3299 },
3128 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 3300 },
3129 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3301 },
3130 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3302 },
3131 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3303 },
3132 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 3304 },
3133 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3305 },
7124 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3308 },
7125 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3309 },
7126 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3310 },
7127 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3311 },
7128 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3312 },
7129 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3313 },
7130 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3314 },
7131 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 33, .child_index = 3315 },
7132 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3316 },
7133 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2267 },
7134 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3318 },
7135 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3319 },
7136 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3320 },
7137 .{ .char = 'u', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3321 },
7138 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3322 },
7139 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3323 },
7140 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3324 },
7141 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3325 },
7142 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3326 },
7143 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3327 },
7144 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3328 },
7145 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 3329 },
7146 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3330 },
7147 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3331 },
7148 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3332 },
7149 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 3333 },
7150 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3334 },
31347151 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 486 },
3135 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3306 },
3136 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3307 },
3137 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3308 },
3138 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2959 },
3139 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3309 },
7152 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3335 },
7153 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3336 },
7154 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3337 },
7155 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2986 },
7156 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3338 },
31407157 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 457 },
3141 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3310 },
3142 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3311 },
3143 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3312 },
3144 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3313 },
3145 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3314 },
3146 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3315 },
3147 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3316 },
3148 .{ .char = 'u', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3317 },
3149 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3318 },
3150 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 7, .child_index = 3319 },
3151 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3321 },
3152 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3322 },
3153 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3323 },
3154 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3324 },
3155 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1948 },
3156 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3325 },
3157 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3326 },
3158 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3328 },
3159 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3330 },
3160 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2865 },
3161 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 3331 },
3162 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3332 },
3163 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3333 },
3164 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3334 },
3165 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3335 },
3166 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3336 },
3167 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3337 },
3168 .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3338 },
3169 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3339 },
3170 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3340 },
3171 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3341 },
3172 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3342 },
3173 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 3343 },
3174 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3344 },
3175 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3345 },
3176 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3351 },
3177 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3352 },
7158 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3339 },
7159 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3340 },
7160 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3341 },
7161 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3342 },
7162 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3343 },
7163 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3344 },
7164 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3345 },
7165 .{ .char = 'u', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3346 },
7166 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3347 },
7167 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 7, .child_index = 3348 },
7168 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3350 },
7169 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3351 },
7170 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3352 },
31787171 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3353 },
3179 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3354 },
3180 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3356 },
3181 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3357 },
3182 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3352 },
3183 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3358 },
3184 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3359 },
3185 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 3360 },
3186 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3361 },
3187 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3362 },
3188 .{ .char = 'x', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3181 },
7172 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1967 },
7173 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3354 },
7174 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3355 },
7175 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3357 },
7176 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3359 },
7177 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2891 },
7178 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 3360 },
7179 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3361 },
7180 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3362 },
7181 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3363 },
7182 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3364 },
7183 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3365 },
7184 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3366 },
7185 .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3367 },
7186 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3368 },
7187 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3369 },
7188 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3370 },
7189 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3371 },
7190 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 3372 },
7191 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3373 },
7192 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3374 },
7193 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3380 },
7194 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3381 },
7195 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3382 },
7196 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3383 },
7197 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3385 },
7198 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3386 },
7199 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3381 },
7200 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3387 },
7201 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3388 },
7202 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 3389 },
7203 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3390 },
7204 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3391 },
7205 .{ .char = 'x', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3209 },
31897206 .{ .char = '1', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 648 },
31907207 .{ .char = '8', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
3191 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3363 },
3192 .{ .char = 'd', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 3365 },
3193 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3020 },
3194 .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3363 },
3195 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3363 },
3196 .{ .char = 'd', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 3365 },
3197 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3020 },
3198 .{ .char = 'd', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3365 },
3199 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3363 },
3200 .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3363 },
3201 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3363 },
7208 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3392 },
7209 .{ .char = 'd', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 3394 },
7210 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3047 },
7211 .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3392 },
7212 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3392 },
7213 .{ .char = 'd', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 3394 },
7214 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3047 },
7215 .{ .char = 'd', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3394 },
7216 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3392 },
7217 .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3392 },
7218 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3392 },
32027219 .{ .char = '1', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 648 },
3203 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3026 },
7220 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3053 },
32047221 .{ .char = '1', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 648 },
3205 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3366 },
7222 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3395 },
32067223 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 238 },
32077224 .{ .char = '8', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
3208 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2319 },
3209 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3367 },
3210 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3368 },
3211 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3369 },
3212 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3370 },
3213 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3371 },
3214 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3372 },
7225 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2342 },
7226 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3396 },
7227 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3397 },
7228 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3398 },
7229 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3399 },
7230 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3400 },
7231 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2870 },
7232 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3401 },
32157233 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 291 },
3216 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3373 },
3217 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3374 },
7234 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3402 },
7235 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3403 },
32187236 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 581 },
3219 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3375 },
3220 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3376 },
3221 .{ .char = 'n', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3377 },
3222 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 25, .child_index = 3378 },
3223 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3379 },
3224 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3380 },
7237 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3404 },
7238 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3405 },
7239 .{ .char = 'n', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3406 },
7240 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 25, .child_index = 3407 },
7241 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3408 },
7242 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3409 },
32257243 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 450 },
3226 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3381 },
7244 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3410 },
32277245 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 569 },
3228 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3382 },
3229 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3383 },
7246 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3411 },
7247 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3412 },
32307248 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 458 },
3231 .{ .char = 'r', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3384 },
3232 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2343 },
3233 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3385 },
3234 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3052 },
3235 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3386 },
3236 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3387 },
3237 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3388 },
3238 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3389 },
3239 .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 7, .child_index = 3390 },
7249 .{ .char = 'r', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3413 },
7250 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2366 },
7251 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3414 },
7252 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3080 },
7253 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3415 },
7254 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3416 },
7255 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3417 },
7256 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3418 },
7257 .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 7, .child_index = 3419 },
32407258 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 569 },
3241 .{ .char = 'u', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3392 },
7259 .{ .char = 'u', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3421 },
32427260 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 569 },
32437261 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 519 },
3244 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3394 },
3245 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3395 },
3246 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3396 },
3247 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3398 },
3248 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3400 },
3249 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3401 },
3250 .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3402 },
3251 .{ .char = 'u', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3404 },
3252 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3405 },
3253 .{ .char = 'p', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 3406 },
3254 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3407 },
3255 .{ .char = 'd', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3408 },
3256 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3409 },
3257 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2248 },
3258 .{ .char = 'b', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3408 },
3259 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3410 },
3260 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3411 },
3261 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3413 },
3262 .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3415 },
3263 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3416 },
3264 .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3408 },
3265 .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3417 },
3266 .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3418 },
3267 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 17, .child_index = 3419 },
3268 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3065 },
3269 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3421 },
7262 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3423 },
7263 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3424 },
7264 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3425 },
7265 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3427 },
7266 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3429 },
7267 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3430 },
7268 .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3431 },
7269 .{ .char = 'u', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3433 },
7270 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3434 },
7271 .{ .char = 'p', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 3435 },
7272 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3436 },
7273 .{ .char = 'd', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3437 },
7274 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3438 },
7275 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2270 },
7276 .{ .char = 'b', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3437 },
7277 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3439 },
7278 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3440 },
7279 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3442 },
7280 .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3444 },
7281 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3445 },
7282 .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3437 },
7283 .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3446 },
7284 .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3447 },
7285 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 17, .child_index = 3448 },
7286 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3093 },
7287 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3450 },
32707288 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 291 },
3271 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3418 },
7289 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3447 },
32727290 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 451 },
3273 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3422 },
3274 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 3423 },
3275 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3418 },
3276 .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 7, .child_index = 3390 },
3277 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3392 },
3278 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2779 },
3279 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 3127 },
3280 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2779 },
3281 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2779 },
3282 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2722 },
3283 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2722 },
7291 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3451 },
7292 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 3452 },
7293 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3447 },
7294 .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 7, .child_index = 3419 },
7295 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3421 },
7296 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2805 },
7297 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 3155 },
7298 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2805 },
7299 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2805 },
7300 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 2748 },
7301 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2748 },
32847302 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 568 },
3285 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3424 },
3286 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3426 },
3287 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3125 },
3288 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2780 },
3289 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2765 },
3290 .{ .char = '2', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2780 },
3291 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2746 },
3292 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3427 },
3293 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3428 },
3294 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2780 },
3295 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2780 },
7303 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3453 },
7304 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3455 },
7305 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3153 },
7306 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2806 },
7307 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2791 },
7308 .{ .char = '2', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2806 },
7309 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2772 },
7310 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3456 },
7311 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3457 },
7312 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2806 },
7313 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2806 },
32967314 .{ .char = 'h', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
32977315 .{ .char = 'w', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
3298 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3431 },
3299 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2779 },
3300 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2779 },
3301 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2794 },
3302 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2779 },
7316 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3460 },
7317 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2805 },
7318 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2805 },
7319 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2820 },
7320 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2805 },
33037321 .{ .char = 'd', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
33047322 .{ .char = 'w', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
3305 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2779 },
3306 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2779 },
3307 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2779 },
3308 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2790 },
3309 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2765 },
3310 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3131 },
7323 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2805 },
7324 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 2805 },
7325 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2805 },
7326 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2816 },
7327 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2791 },
7328 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3159 },
33117329 .{ .char = 'b', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
33127330 .{ .char = 'h', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
33137331 .{ .char = 'w', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
3314 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2722 },
3315 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 3102 },
3316 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3432 },
3317 .{ .char = 'r', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 1766 },
3318 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2053 },
3319 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3434 },
3320 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3435 },
3321 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3436 },
3322 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3437 },
3323 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3439 },
3324 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3440 },
7332 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 2748 },
7333 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 3130 },
7334 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3461 },
7335 .{ .char = 'r', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 1781 },
7336 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2073 },
7337 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3463 },
7338 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3464 },
7339 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3465 },
7340 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3466 },
7341 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3468 },
7342 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3469 },
33257343 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 463 },
3326 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3441 },
3327 .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3442 },
3328 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3443 },
7344 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3470 },
7345 .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3471 },
7346 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3472 },
33297347 .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
3330 .{ .char = 'd', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 3444 },
3331 .{ .char = 'w', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3444 },
3332 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2560 },
3333 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2560 },
3334 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3445 },
3335 .{ .char = 'b', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 2829 },
3336 .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 2829 },
3337 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3446 },
3338 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3447 },
3339 .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 2829 },
3340 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3448 },
3341 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3449 },
7348 .{ .char = 'd', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 3473 },
7349 .{ .char = 'w', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3473 },
7350 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2585 },
7351 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2585 },
7352 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3474 },
7353 .{ .char = 'b', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 2855 },
7354 .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 2855 },
7355 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3475 },
7356 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3476 },
7357 .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 2855 },
7358 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3477 },
7359 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3478 },
33427360 .{ .char = '2', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 585 },
33437361 .{ .char = '4', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 585 },
33447362 .{ .char = 'e', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
33457363 .{ .char = 'l', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
33467364 .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
33477365 .{ .char = 'u', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
3348 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3450 },
3349 .{ .char = 'f', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3452 },
3350 .{ .char = 'd', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 3408 },
3351 .{ .char = 'w', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3408 },
3352 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3453 },
3353 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3454 },
3354 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3455 },
3355 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1389 },
3356 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3456 },
3357 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3164 },
3358 .{ .char = 'v', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 3458 },
7366 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3479 },
7367 .{ .char = 'f', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3481 },
7368 .{ .char = 'd', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 3437 },
7369 .{ .char = 'w', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3437 },
7370 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3482 },
7371 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3483 },
7372 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3484 },
7373 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1395 },
7374 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3485 },
7375 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3192 },
7376 .{ .char = 'v', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 3487 },
33597377 .{ .char = 'd', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
3360 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3460 },
3361 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 3461 },
3362 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3462 },
3363 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3463 },
3364 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3464 },
3365 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3465 },
3366 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3466 },
3367 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3467 },
7378 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3489 },
7379 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 3490 },
7380 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3491 },
7381 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3492 },
7382 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3493 },
7383 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3494 },
7384 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3495 },
7385 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3496 },
33687386 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 463 },
33697387 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 457 },
33707388 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 655 },
3371 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3468 },
3372 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3469 },
3373 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2878 },
3374 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3470 },
7389 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3497 },
7390 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3498 },
7391 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3499 },
7392 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2905 },
7393 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3500 },
33757394 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 238 },
3376 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3210 },
3377 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3210 },
3378 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3471 },
3379 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3472 },
3380 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3473 },
3381 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3474 },
3382 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3475 },
3383 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3476 },
3384 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3477 },
3385 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3478 },
3386 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3481 },
3387 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3482 },
3388 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3483 },
3389 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3484 },
3390 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3485 },
3391 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 18, .child_index = 3486 },
3392 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3488 },
3393 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 20, .child_index = 3489 },
3394 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3491 },
3395 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 242, .child_index = 3492 },
3396 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 3497 },
3397 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3498 },
3398 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3500 },
3399 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 3501 },
3400 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3502 },
3401 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 42, .child_index = 3504 },
3402 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3508 },
3403 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3509 },
7395 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3239 },
7396 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3239 },
7397 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3501 },
7398 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3502 },
7399 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3503 },
7400 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3504 },
7401 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3505 },
7402 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3506 },
7403 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3507 },
7404 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3508 },
7405 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3511 },
7406 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3512 },
7407 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3513 },
7408 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3514 },
7409 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3515 },
7410 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 18, .child_index = 3516 },
7411 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3518 },
7412 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 20, .child_index = 3519 },
7413 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3521 },
7414 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 242, .child_index = 3522 },
7415 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 3527 },
7416 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3528 },
7417 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3530 },
7418 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 3531 },
7419 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3532 },
7420 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 42, .child_index = 3534 },
7421 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3538 },
7422 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3539 },
34047423 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 412 },
3405 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3510 },
3406 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 30, .child_index = 3511 },
3407 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3512 },
3408 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 15, .child_index = 3513 },
3409 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 30, .child_index = 3515 },
3410 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3516 },
3411 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 40, .child_index = 3517 },
3412 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 45, .child_index = 3518 },
3413 .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3519 },
3414 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3516 },
3415 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3520 },
3416 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3521 },
3417 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3522 },
3418 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 186, .child_index = 3523 },
3419 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 36, .child_index = 3528 },
3420 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 16, .child_index = 3529 },
3421 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 20, .child_index = 3530 },
3422 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 32, .child_index = 3532 },
3423 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 35, .child_index = 3536 },
3424 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 18, .child_index = 3542 },
3425 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 18, .child_index = 3543 },
3426 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 3544 },
3427 .{ .char = 'u', .end_of_word = false, .end_of_list = false, .number = 34, .child_index = 3545 },
3428 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3546 },
3429 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3547 },
3430 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3548 },
3431 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3549 },
3432 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3550 },
3433 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 24, .child_index = 3551 },
3434 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3553 },
3435 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 3554 },
3436 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3555 },
3437 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 24, .child_index = 3556 },
3438 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3561 },
3439 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3562 },
3440 .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3563 },
3441 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 24, .child_index = 3564 },
3442 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 24, .child_index = 3564 },
3443 .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 48, .child_index = 3566 },
3444 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 36, .child_index = 3572 },
3445 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3251 },
3446 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3574 },
3447 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3575 },
3448 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3576 },
3449 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3577 },
3450 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3578 },
3451 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3579 },
3452 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3369 },
3453 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3583 },
3454 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3584 },
3455 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3585 },
3456 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3586 },
7424 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3540 },
7425 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 30, .child_index = 3541 },
7426 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3542 },
7427 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 15, .child_index = 3543 },
7428 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 30, .child_index = 3545 },
7429 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3546 },
7430 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 40, .child_index = 3547 },
7431 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 45, .child_index = 3548 },
7432 .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3549 },
7433 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3546 },
7434 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3550 },
7435 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3551 },
7436 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3552 },
7437 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 186, .child_index = 3553 },
7438 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 36, .child_index = 3558 },
7439 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 16, .child_index = 3559 },
7440 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 20, .child_index = 3560 },
7441 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 32, .child_index = 3562 },
7442 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 35, .child_index = 3566 },
7443 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 18, .child_index = 3572 },
7444 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 18, .child_index = 3573 },
7445 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 3574 },
7446 .{ .char = 'u', .end_of_word = false, .end_of_list = false, .number = 34, .child_index = 3575 },
7447 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3576 },
7448 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3577 },
7449 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3578 },
7450 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3579 },
7451 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3580 },
7452 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 24, .child_index = 3581 },
7453 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3583 },
7454 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 3584 },
7455 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3585 },
7456 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 24, .child_index = 3586 },
7457 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3591 },
7458 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3592 },
7459 .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3593 },
7460 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 24, .child_index = 3594 },
7461 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 24, .child_index = 3594 },
7462 .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 48, .child_index = 3596 },
7463 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 36, .child_index = 3602 },
7464 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3280 },
7465 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3604 },
7466 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3605 },
7467 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3606 },
7468 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3607 },
7469 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3608 },
7470 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3609 },
7471 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3398 },
7472 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3613 },
7473 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3614 },
7474 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3615 },
7475 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3616 },
34577476 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 457 },
3458 .{ .char = 'f', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 1665 },
3459 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2640 },
3460 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3588 },
3461 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2343 },
3462 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3056 },
3463 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3589 },
3464 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 33, .child_index = 3590 },
3465 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3591 },
3466 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3591 },
3467 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3592 },
3468 .{ .char = 'r', .end_of_word = true, .end_of_list = true, .number = 6, .child_index = 1171 },
3469 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3593 },
3470 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2245 },
3471 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3290 },
3472 .{ .char = 'e', .end_of_word = true, .end_of_list = true, .number = 6, .child_index = 1171 },
3473 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3594 },
3474 .{ .char = 'h', .end_of_word = true, .end_of_list = true, .number = 6, .child_index = 1171 },
3475 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3595 },
3476 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3596 },
3477 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3597 },
3478 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 3598 },
7477 .{ .char = 'f', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 1679 },
7478 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2665 },
7479 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3618 },
7480 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2366 },
7481 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3084 },
7482 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3619 },
7483 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 33, .child_index = 3620 },
7484 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3621 },
7485 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3621 },
7486 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3622 },
7487 .{ .char = 'r', .end_of_word = true, .end_of_list = true, .number = 6, .child_index = 1173 },
7488 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3623 },
7489 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2267 },
7490 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3319 },
7491 .{ .char = 'e', .end_of_word = true, .end_of_list = true, .number = 6, .child_index = 1173 },
7492 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3624 },
7493 .{ .char = 'h', .end_of_word = true, .end_of_list = true, .number = 6, .child_index = 1173 },
7494 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3625 },
7495 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3626 },
7496 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3627 },
7497 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 3628 },
34797498 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 572 },
3480 .{ .char = 'E', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3599 },
3481 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3600 },
3482 .{ .char = 'e', .end_of_word = true, .end_of_list = true, .number = 10, .child_index = 3601 },
7499 .{ .char = 'E', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3629 },
7500 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3630 },
7501 .{ .char = 'e', .end_of_word = true, .end_of_list = true, .number = 10, .child_index = 3631 },
34837502 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 572 },
3484 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3606 },
3485 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3607 },
3486 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3608 },
3487 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3609 },
3488 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3610 },
3489 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3611 },
3490 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3612 },
3491 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3613 },
3492 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3614 },
3493 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3615 },
7503 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3636 },
7504 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3637 },
7505 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3638 },
7506 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3639 },
7507 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3640 },
7508 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3641 },
7509 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3642 },
7510 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3643 },
7511 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3644 },
7512 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3645 },
34947513 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 496 },
3495 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3616 },
3496 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3617 },
3497 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3618 },
3498 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3619 },
3499 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3620 },
3500 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3626 },
3501 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2555 },
3502 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3342 },
3503 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3627 },
3504 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3628 },
3505 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3629 },
3506 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3630 },
3507 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3631 },
3508 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3632 },
3509 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 3633 },
3510 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3634 },
3511 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3636 },
3512 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3637 },
7514 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3646 },
7515 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3647 },
7516 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3648 },
7517 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3649 },
7518 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3650 },
7519 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3656 },
7520 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2580 },
7521 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3371 },
7522 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3657 },
7523 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3658 },
7524 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3659 },
7525 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3660 },
7526 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3661 },
7527 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3662 },
7528 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 3663 },
7529 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3664 },
7530 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3666 },
7531 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3667 },
35137532 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 291 },
3514 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3638 },
3515 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3640 },
3516 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3641 },
3517 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3642 },
3518 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3643 },
3519 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3644 },
7533 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3668 },
7534 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3670 },
7535 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3671 },
7536 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3672 },
7537 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3673 },
7538 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3674 },
35207539 .{ .char = 'p', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 680 },
3521 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 3645 },
3522 .{ .char = 'q', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 3646 },
3523 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3648 },
3524 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3649 },
3525 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3651 },
3526 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3652 },
3527 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 3653 },
3528 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3655 },
3529 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3656 },
7540 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 3675 },
7541 .{ .char = 'q', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 3676 },
7542 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3678 },
7543 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3679 },
7544 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3681 },
7545 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3682 },
7546 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 3683 },
7547 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3685 },
7548 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3686 },
35307549 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 572 },
3531 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3657 },
3532 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3658 },
7550 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3687 },
7551 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3688 },
35337552 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 496 },
3534 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3659 },
3535 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3660 },
3536 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3658 },
3537 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3661 },
3538 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 3662 },
3539 .{ .char = 'T', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3663 },
3540 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3664 },
7553 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3689 },
7554 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3690 },
7555 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3688 },
7556 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3691 },
7557 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 3692 },
7558 .{ .char = 'T', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3693 },
7559 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3694 },
35417560 .{ .char = 'b', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
35427561 .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
35437562 .{ .char = 'x', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
35447563 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 655 },
3545 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3456 },
3546 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3665 },
3547 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3579 },
3548 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3666 },
3549 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3667 },
3550 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3668 },
3551 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3669 },
3552 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3670 },
3553 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3671 },
3554 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3672 },
3555 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3673 },
3556 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 25, .child_index = 3674 },
3557 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3675 },
3558 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3676 },
3559 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3677 },
3560 .{ .char = 'c', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3442 },
3561 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3678 },
3562 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2672 },
3563 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3679 },
3564 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3680 },
3565 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3681 },
3566 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3682 },
3567 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3683 },
3568 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3684 },
3569 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3686 },
3570 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3687 },
3571 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3690 },
3572 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2790 },
3573 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3691 },
3574 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3692 },
3575 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3693 },
3576 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3695 },
3577 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3400 },
3578 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3696 },
3579 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3698 },
3580 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3699 },
3581 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3700 },
3582 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3701 },
3583 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3401 },
7564 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3485 },
7565 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3695 },
7566 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3609 },
7567 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3696 },
7568 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3697 },
7569 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3698 },
7570 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3699 },
7571 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3700 },
7572 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3701 },
7573 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3702 },
7574 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3703 },
7575 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 25, .child_index = 3704 },
7576 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3705 },
7577 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3706 },
7578 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3707 },
7579 .{ .char = 'c', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3471 },
7580 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3708 },
7581 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2698 },
7582 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3709 },
7583 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3710 },
7584 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3711 },
7585 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3712 },
7586 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3713 },
7587 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3714 },
7588 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3716 },
7589 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3717 },
7590 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3720 },
7591 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2816 },
7592 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3721 },
7593 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3722 },
7594 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3723 },
7595 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3725 },
7596 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3429 },
7597 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3726 },
7598 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3728 },
7599 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3729 },
7600 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3730 },
7601 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3731 },
7602 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3430 },
35847603 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 291 },
3585 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3702 },
7604 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3732 },
35867605 .{ .char = 'u', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
3587 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3705 },
7606 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3735 },
35887607 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 291 },
35897608 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 656 },
3590 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3698 },
3591 .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3707 },
3592 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3708 },
3593 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3709 },
3594 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3711 },
3595 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3713 },
3596 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3714 },
3597 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 10, .child_index = 3716 },
3598 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 7, .child_index = 3718 },
3599 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3720 },
3600 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3721 },
3601 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 3724 },
3602 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3727 },
3603 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3727 },
3604 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2780 },
3605 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3728 },
3606 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2780 },
7609 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3728 },
7610 .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3737 },
7611 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3738 },
7612 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3739 },
7613 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3741 },
7614 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3743 },
7615 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3744 },
7616 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 10, .child_index = 3746 },
7617 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 7, .child_index = 3748 },
7618 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3750 },
7619 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3751 },
7620 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 3754 },
7621 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3757 },
7622 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3757 },
7623 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2806 },
7624 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3758 },
7625 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2806 },
36077626 .{ .char = 'd', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
36087627 .{ .char = 'w', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
3609 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3427 },
3610 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3730 },
3611 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3731 },
3612 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3732 },
3613 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3733 },
3614 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3734 },
3615 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3735 },
3616 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3736 },
3617 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3737 },
3618 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3738 },
3619 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3739 },
7628 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3456 },
7629 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3760 },
7630 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3761 },
7631 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3762 },
7632 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3763 },
7633 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3764 },
7634 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3765 },
7635 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3766 },
7636 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3767 },
7637 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3768 },
7638 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3769 },
36207639 .{ .char = 'p', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
3621 .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3740 },
7640 .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3770 },
36227641 .{ .char = 'z', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
3623 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3741 },
3624 .{ .char = 'd', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 2829 },
3625 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3742 },
3626 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3743 },
3627 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3744 },
7642 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3771 },
7643 .{ .char = 'd', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 2855 },
7644 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3772 },
7645 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3773 },
7646 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3774 },
36287647 .{ .char = '0', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
36297648 .{ .char = '1', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
36307649 .{ .char = 'i', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
36317650 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 412 },
3632 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3745 },
3633 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3747 },
7651 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3775 },
7652 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3777 },
36347653 .{ .char = 'd', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
36357654 .{ .char = 'f', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
3636 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3748 },
3637 .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3749 },
3638 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3750 },
3639 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 3751 },
3640 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3752 },
3641 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3753 },
3642 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3754 },
3643 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3755 },
3644 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3756 },
3645 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3757 },
3646 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3579 },
3647 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3468 },
7655 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3778 },
7656 .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3779 },
7657 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3780 },
7658 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 3781 },
7659 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3782 },
7660 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3783 },
7661 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3784 },
7662 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3785 },
7663 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3786 },
7664 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3787 },
7665 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3609 },
7666 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3497 },
7667 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3788 },
36487668 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 572 },
3649 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3758 },
3650 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3759 },
3651 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3204 },
3652 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3760 },
3653 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3761 },
3654 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3762 },
3655 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3763 },
3656 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3765 },
3657 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3765 },
3658 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3765 },
3659 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3766 },
3660 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3767 },
3661 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3768 },
3662 .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3770 },
3663 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3771 },
3664 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3772 },
3665 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3773 },
3666 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 3774 },
3667 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3776 },
3668 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3777 },
3669 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3778 },
3670 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3779 },
3671 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3780 },
3672 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 206, .child_index = 3781 },
3673 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 18, .child_index = 3786 },
3674 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3787 },
3675 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 3788 },
3676 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3789 },
3677 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3790 },
3678 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3791 },
3679 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 3792 },
3680 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3793 },
3681 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3794 },
3682 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3795 },
3683 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3796 },
3684 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3796 },
3685 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 3798 },
3686 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3500 },
7669 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3789 },
7670 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3790 },
7671 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3233 },
7672 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3791 },
7673 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3792 },
7674 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3793 },
7675 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3794 },
7676 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3796 },
7677 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3796 },
7678 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3796 },
7679 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3797 },
7680 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3798 },
36877681 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3799 },
3688 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3800 },
3689 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 30, .child_index = 3801 },
3690 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3547 },
7682 .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3801 },
7683 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3802 },
36917684 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3803 },
3692 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3807 },
3693 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 30, .child_index = 3801 },
3694 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3808 },
3695 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 40, .child_index = 3809 },
3696 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 45, .child_index = 3813 },
3697 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3547 },
3698 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 3815 },
3699 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 3816 },
3700 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 3817 },
3701 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 30, .child_index = 3818 },
3702 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3820 },
3703 .{ .char = 'k', .end_of_word = false, .end_of_list = false, .number = 114, .child_index = 3821 },
3704 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 18, .child_index = 3825 },
3705 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 3826 },
3706 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 36, .child_index = 3827 },
3707 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 3829 },
3708 .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3831 },
3709 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 3832 },
3710 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3834 },
3711 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 16, .child_index = 3835 },
3712 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3837 },
3713 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3838 },
3714 .{ .char = '2', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3840 },
3715 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3841 },
3716 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 16, .child_index = 3842 },
3717 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3845 },
3718 .{ .char = 'u', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 3846 },
3719 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3807 },
3720 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 18, .child_index = 3849 },
3721 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 18, .child_index = 3849 },
3722 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3850 },
3723 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 34, .child_index = 3852 },
3724 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3854 },
3725 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3855 },
3726 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3856 },
3727 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3857 },
3728 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3858 },
3729 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3860 },
3730 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 3861 },
3731 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3862 },
3732 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3863 },
3733 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3553 },
3734 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3864 },
3735 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 3865 },
7685 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3804 },
7686 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 3805 },
7687 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3807 },
7688 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3808 },
7689 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3809 },
7690 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3810 },
7691 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3811 },
7692 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 206, .child_index = 3812 },
7693 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 18, .child_index = 3817 },
7694 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3818 },
7695 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 3819 },
7696 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3820 },
7697 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3821 },
7698 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3822 },
7699 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 3823 },
7700 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3824 },
7701 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3825 },
7702 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3826 },
7703 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3827 },
7704 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3827 },
7705 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 3829 },
7706 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3530 },
7707 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3830 },
7708 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3831 },
7709 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 30, .child_index = 3832 },
7710 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3577 },
7711 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3834 },
7712 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3838 },
7713 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 30, .child_index = 3832 },
7714 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3839 },
7715 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 40, .child_index = 3840 },
7716 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 45, .child_index = 3844 },
7717 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3577 },
7718 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 3846 },
7719 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 3847 },
7720 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 3848 },
7721 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 30, .child_index = 3849 },
7722 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3851 },
7723 .{ .char = 'k', .end_of_word = false, .end_of_list = false, .number = 114, .child_index = 3852 },
7724 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 18, .child_index = 3856 },
7725 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 3857 },
7726 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 36, .child_index = 3858 },
7727 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 3860 },
7728 .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3862 },
7729 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 3863 },
7730 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3865 },
7731 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 16, .child_index = 3866 },
37367732 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3868 },
3737 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3869 },
3738 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3865 },
3739 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3870 },
3740 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3871 },
3741 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3872 },
3742 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 18, .child_index = 3873 },
3743 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3875 },
3744 .{ .char = '2', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 3876 },
3745 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3877 },
3746 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 16, .child_index = 3878 },
3747 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3882 },
3748 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3883 },
3749 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 3878 },
3750 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 30, .child_index = 3801 },
3751 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3884 },
3752 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3886 },
3753 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3888 },
3754 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3889 },
3755 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3890 },
7733 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3869 },
7734 .{ .char = '2', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3871 },
7735 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3872 },
7736 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 16, .child_index = 3873 },
7737 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3876 },
7738 .{ .char = 'u', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 3877 },
7739 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3838 },
7740 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 18, .child_index = 3880 },
7741 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 18, .child_index = 3880 },
7742 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3881 },
7743 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 34, .child_index = 3883 },
7744 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3885 },
7745 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3886 },
7746 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3887 },
7747 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3888 },
7748 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3889 },
7749 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 3891 },
7750 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 3892 },
7751 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3893 },
7752 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3894 },
7753 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3583 },
7754 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3895 },
7755 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 3896 },
7756 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3899 },
7757 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3900 },
7758 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3896 },
7759 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3901 },
7760 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3902 },
7761 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3903 },
7762 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 18, .child_index = 3904 },
7763 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3906 },
7764 .{ .char = '2', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 3907 },
7765 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3908 },
7766 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 16, .child_index = 3909 },
7767 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3913 },
7768 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3914 },
7769 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 16, .child_index = 3909 },
7770 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 30, .child_index = 3832 },
7771 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3915 },
7772 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3917 },
7773 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3919 },
7774 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3920 },
7775 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3921 },
37567776 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 572 },
37577777 .{ .char = '1', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 648 },
3758 .{ .char = '3', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2311 },
7778 .{ .char = '3', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2333 },
37597779 .{ .char = '6', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 649 },
37607780 .{ .char = '8', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
3761 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3891 },
3762 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3894 },
3763 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3895 },
7781 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3922 },
7782 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3925 },
7783 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3926 },
37647784 .{ .char = 'i', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
37657785 .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 549 },
3766 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2343 },
3767 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3898 },
3768 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 33, .child_index = 3899 },
3769 .{ .char = 'd', .end_of_word = true, .end_of_list = true, .number = 6, .child_index = 1171 },
3770 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3591 },
3771 .{ .char = 'b', .end_of_word = true, .end_of_list = true, .number = 6, .child_index = 1171 },
3772 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3900 },
3773 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3901 },
7786 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2366 },
7787 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3929 },
7788 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 33, .child_index = 3930 },
7789 .{ .char = 'd', .end_of_word = true, .end_of_list = true, .number = 6, .child_index = 1173 },
7790 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3621 },
7791 .{ .char = 'b', .end_of_word = true, .end_of_list = true, .number = 6, .child_index = 1173 },
7792 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3931 },
7793 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3932 },
37747794 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 323 },
3775 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1699 },
3776 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 3902 },
3777 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3903 },
3778 .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3024 },
7795 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 1713 },
7796 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 3933 },
7797 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3934 },
7798 .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 3051 },
37797799 .{ .char = '1', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 648 },
37807800 .{ .char = '8', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
3781 .{ .char = 'A', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3904 },
3782 .{ .char = 'P', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3046 },
3783 .{ .char = 'S', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3905 },
3784 .{ .char = 'M', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3906 },
3785 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3907 },
7801 .{ .char = 'A', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3935 },
7802 .{ .char = 'P', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3074 },
7803 .{ .char = 'S', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3936 },
7804 .{ .char = 'M', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3937 },
7805 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3938 },
37867806 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 521 },
3787 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2507 },
3788 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3908 },
3789 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3909 },
3790 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3910 },
3791 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3911 },
3792 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3912 },
3793 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3913 },
3794 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3914 },
3795 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3918 },
3796 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3919 },
3797 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3920 },
3798 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3922 },
3799 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3923 },
3800 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3924 },
3801 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3925 },
3802 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3927 },
3803 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3928 },
3804 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3929 },
3805 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3930 },
3806 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3659 },
3807 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3931 },
3808 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3932 },
3809 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3933 },
3810 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3934 },
3811 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 3935 },
3812 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3936 },
3813 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2934 },
3814 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3937 },
3815 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3342 },
3816 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3938 },
7807 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2531 },
7808 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3939 },
7809 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3940 },
7810 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3941 },
7811 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3942 },
7812 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3943 },
7813 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3944 },
7814 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3945 },
7815 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3949 },
7816 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3950 },
7817 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3951 },
7818 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3953 },
7819 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3954 },
7820 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3955 },
7821 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 3956 },
7822 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3958 },
7823 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3959 },
7824 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3960 },
7825 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3961 },
7826 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3689 },
7827 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3962 },
7828 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3963 },
7829 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3964 },
7830 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3965 },
7831 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 3966 },
7832 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3967 },
7833 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2961 },
7834 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3968 },
7835 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3371 },
7836 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3969 },
38177837 .{ .char = 'f', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
3818 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3939 },
3819 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3940 },
3820 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3941 },
3821 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3942 },
3822 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3943 },
3823 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 3944 },
3824 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3947 },
7838 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3970 },
7839 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3971 },
7840 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3972 },
7841 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3973 },
7842 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3974 },
7843 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 3975 },
7844 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3978 },
38257845 .{ .char = 'f', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
3826 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3948 },
3827 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3949 },
3828 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3950 },
3829 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3951 },
3830 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3950 },
3831 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3952 },
3832 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3954 },
3833 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3955 },
3834 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3956 },
3835 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3958 },
3836 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3959 },
7846 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3979 },
7847 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3980 },
7848 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3981 },
7849 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3982 },
7850 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3981 },
7851 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3983 },
7852 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3985 },
7853 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3986 },
7854 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3987 },
7855 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3989 },
7856 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3990 },
38377857 .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 680 },
3838 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3960 },
3839 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3961 },
3840 .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 3962 },
3841 .{ .char = 'T', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 3964 },
3842 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3966 },
3843 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3967 },
3844 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3968 },
3845 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3969 },
3846 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3970 },
7858 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3991 },
7859 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3992 },
7860 .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 3993 },
7861 .{ .char = 'T', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 3995 },
7862 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3997 },
7863 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3998 },
7864 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3999 },
7865 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4000 },
7866 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4001 },
38477867 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 664 },
38487868 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 344 },
3849 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3971 },
3850 .{ .char = 'j', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3972 },
3851 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3973 },
3852 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 25, .child_index = 3974 },
3853 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3975 },
3854 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3679 },
3855 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3976 },
3856 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3977 },
7869 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4002 },
7870 .{ .char = 'j', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4003 },
7871 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4004 },
7872 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 25, .child_index = 4005 },
7873 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4006 },
7874 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3709 },
7875 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4007 },
7876 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4008 },
38577877 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 579 },
3858 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3978 },
3859 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2237 },
3860 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3979 },
3861 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3980 },
7878 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4009 },
7879 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2259 },
7880 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4010 },
7881 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4011 },
38627882 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 656 },
3863 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3981 },
3864 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3982 },
7883 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4012 },
7884 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4013 },
38657885 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 656 },
38667886 .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 412 },
3867 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3418 },
3868 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3985 },
3869 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2568 },
3870 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3698 },
3871 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3698 },
3872 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3698 },
3873 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3400 },
3874 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3987 },
3875 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3988 },
7887 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3447 },
7888 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4016 },
7889 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2593 },
7890 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3728 },
7891 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3728 },
7892 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3728 },
7893 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3429 },
7894 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4018 },
7895 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4019 },
38767896 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 578 },
3877 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3990 },
3878 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3992 },
3879 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3993 },
3880 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3994 },
3881 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3996 },
7897 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4021 },
7898 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4023 },
7899 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4024 },
7900 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4025 },
7901 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4027 },
38827902 .{ .char = 'w', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
3883 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3997 },
3884 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3998 },
3885 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3999 },
3886 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4000 },
3887 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4001 },
3888 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3981 },
3889 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3401 },
3890 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4002 },
3891 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3698 },
7903 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4028 },
7904 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4029 },
7905 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4030 },
7906 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4031 },
7907 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4032 },
7908 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4012 },
7909 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3430 },
7910 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4033 },
7911 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3728 },
38927912 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 656 },
38937913 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 412 },
3894 .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 4003 },
3895 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4005 },
3896 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4006 },
3897 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4008 },
3898 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4010 },
7914 .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 4034 },
7915 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4036 },
7916 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4037 },
7917 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4039 },
7918 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4041 },
38997919 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 656 },
39007920 .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 412 },
3901 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3981 },
7921 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4012 },
39027922 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 656 },
39037923 .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 412 },
3904 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3980 },
3905 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4011 },
3906 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2780 },
3907 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2780 },
3908 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4014 },
3909 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4015 },
3910 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4016 },
3911 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4017 },
3912 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4018 },
3913 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4019 },
3914 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2507 },
3915 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4020 },
3916 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4021 },
3917 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4022 },
7924 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4011 },
7925 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4042 },
7926 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2806 },
7927 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2806 },
7928 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4045 },
7929 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4046 },
7930 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4047 },
7931 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4048 },
7932 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4049 },
7933 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4050 },
7934 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2531 },
7935 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4051 },
7936 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4052 },
7937 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4053 },
39187938 .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
3919 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4023 },
3920 .{ .char = 'e', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 2829 },
3921 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4024 },
3922 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4025 },
7939 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4054 },
7940 .{ .char = 'e', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 2855 },
7941 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4055 },
7942 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4056 },
39237943 .{ .char = '4', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
39247944 .{ .char = '8', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
3925 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4026 },
3926 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4027 },
3927 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3748 },
3928 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4028 },
3929 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4029 },
3930 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4030 },
3931 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4031 },
3932 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4032 },
3933 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4033 },
3934 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4035 },
3935 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4036 },
3936 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4037 },
3937 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4038 },
3938 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4041 },
3939 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1197 },
3940 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4042 },
3941 .{ .char = 'M', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4043 },
3942 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4044 },
3943 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4045 },
3944 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4046 },
3945 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4047 },
3946 .{ .char = 'M', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4049 },
3947 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4050 },
3948 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4051 },
3949 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4052 },
3950 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4054 },
3951 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3791 },
3952 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4056 },
3953 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4057 },
3954 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4054 },
3955 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4060 },
3956 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3791 },
3957 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3773 },
3958 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4062 },
3959 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 15, .child_index = 4063 },
3960 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 4065 },
3961 .{ .char = 'k', .end_of_word = false, .end_of_list = false, .number = 170, .child_index = 4066 },
3962 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 4069 },
3963 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4070 },
3964 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 18, .child_index = 4071 },
3965 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4073 },
3966 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4057 },
3967 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4074 },
3968 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4074 },
3969 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4075 },
3970 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4076 },
3971 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4077 },
3972 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4078 },
3973 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4079 },
3974 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 4082 },
3975 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4082 },
3976 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4054 },
3977 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4083 },
3978 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4085 },
3979 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 18, .child_index = 4086 },
3980 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4088 },
3981 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4090 },
3982 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4090 },
3983 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4090 },
3984 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4090 },
3985 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4091 },
3986 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4092 },
3987 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 4093 },
3988 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 4096 },
3989 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4097 },
3990 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 24, .child_index = 4099 },
3991 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 27, .child_index = 4101 },
3992 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 18, .child_index = 4103 },
3993 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4105 },
3994 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4105 },
3995 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4105 },
3996 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 18, .child_index = 4107 },
3997 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4105 },
3998 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4105 },
3999 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 28, .child_index = 4109 },
4000 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 30, .child_index = 4113 },
4001 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 28, .child_index = 4109 },
4002 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 28, .child_index = 4109 },
4003 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 18, .child_index = 4107 },
4004 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4105 },
4005 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 18, .child_index = 4118 },
4006 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 18, .child_index = 3825 },
4007 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 4119 },
4008 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4120 },
4009 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4121 },
4010 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 4105 },
4011 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4122 },
4012 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4124 },
4013 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 4125 },
4014 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4125 },
4015 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4126 },
4016 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3834 },
4017 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3837 },
4018 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4127 },
4019 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4129 },
4020 .{ .char = '2', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 4130 },
4021 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4131 },
4022 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4131 },
4023 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4132 },
4024 .{ .char = '2', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3840 },
4025 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3841 },
4026 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3845 },
4027 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 18, .child_index = 4086 },
4028 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4133 },
4029 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4134 },
4030 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 22, .child_index = 4135 },
4031 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4088 },
4032 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4137 },
4033 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4138 },
4034 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3807 },
4035 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3862 },
4036 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4077 },
4037 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4077 },
4038 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4140 },
4039 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4140 },
4040 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4141 },
4041 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4142 },
4042 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3877 },
4043 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3864 },
4044 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3868 },
4045 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3869 },
4046 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4143 },
4047 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4145 },
4048 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4146 },
4049 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4147 },
4050 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4148 },
4051 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3875 },
4052 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4149 },
4053 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4151 },
4054 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4152 },
4055 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4155 },
4056 .{ .char = '2', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 3876 },
4057 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3877 },
4058 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3882 },
4059 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3883 },
4060 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4156 },
4061 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4158 },
4062 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3862 },
4063 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4159 },
4064 .{ .char = '3', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2311 },
7945 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4057 },
7946 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4058 },
7947 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3778 },
7948 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4059 },
7949 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4060 },
7950 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4061 },
7951 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4062 },
7952 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4063 },
7953 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4064 },
7954 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4066 },
7955 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4067 },
7956 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4068 },
7957 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4069 },
7958 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4070 },
7959 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4073 },
7960 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1199 },
7961 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4074 },
7962 .{ .char = 'M', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4075 },
7963 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4076 },
7964 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4077 },
7965 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4078 },
7966 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4079 },
7967 .{ .char = 'M', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4081 },
7968 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4082 },
7969 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4083 },
7970 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4084 },
7971 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4086 },
7972 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3822 },
7973 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4088 },
7974 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4089 },
7975 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4086 },
7976 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4092 },
7977 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3822 },
7978 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3804 },
7979 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4094 },
7980 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 15, .child_index = 4095 },
7981 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 4097 },
7982 .{ .char = 'k', .end_of_word = false, .end_of_list = false, .number = 170, .child_index = 4098 },
7983 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 4101 },
7984 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4102 },
7985 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 18, .child_index = 4103 },
7986 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4105 },
7987 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4089 },
7988 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4106 },
7989 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4106 },
7990 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4107 },
7991 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4108 },
7992 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4109 },
7993 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4110 },
7994 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4111 },
7995 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 4114 },
7996 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4114 },
7997 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4086 },
7998 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4115 },
7999 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4117 },
8000 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 18, .child_index = 4118 },
8001 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4120 },
8002 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4122 },
8003 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4122 },
8004 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4122 },
8005 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4122 },
8006 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4123 },
8007 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4124 },
8008 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 4125 },
8009 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 4128 },
8010 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4129 },
8011 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 24, .child_index = 4131 },
8012 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 27, .child_index = 4133 },
8013 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 18, .child_index = 4135 },
8014 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4137 },
8015 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4137 },
8016 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4137 },
8017 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 18, .child_index = 4139 },
8018 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4137 },
8019 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4137 },
8020 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 28, .child_index = 4141 },
8021 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 30, .child_index = 4145 },
8022 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 28, .child_index = 4141 },
8023 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 28, .child_index = 4141 },
8024 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 18, .child_index = 4139 },
8025 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4137 },
8026 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 18, .child_index = 4150 },
8027 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 18, .child_index = 3856 },
8028 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 4151 },
8029 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4152 },
8030 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4153 },
8031 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 4137 },
8032 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4154 },
8033 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4156 },
8034 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 4157 },
8035 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4157 },
8036 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4158 },
8037 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3865 },
8038 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3868 },
8039 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4159 },
8040 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4161 },
8041 .{ .char = '2', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 4162 },
8042 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4163 },
8043 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4163 },
8044 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4164 },
8045 .{ .char = '2', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3871 },
8046 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3872 },
8047 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3876 },
8048 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 18, .child_index = 4118 },
8049 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4165 },
8050 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4166 },
8051 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 22, .child_index = 4167 },
8052 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4120 },
8053 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4169 },
8054 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4170 },
8055 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3838 },
8056 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3893 },
8057 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4109 },
8058 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4109 },
8059 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4172 },
8060 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4172 },
8061 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4173 },
8062 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4174 },
8063 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3908 },
8064 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3895 },
8065 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3899 },
8066 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3900 },
8067 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4175 },
8068 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4177 },
8069 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4178 },
8070 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4179 },
8071 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4180 },
8072 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3906 },
8073 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4181 },
8074 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4183 },
8075 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4184 },
8076 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4187 },
8077 .{ .char = '2', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 3907 },
8078 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3908 },
8079 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3913 },
8080 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3914 },
8081 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4188 },
8082 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4190 },
8083 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3893 },
8084 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4191 },
8085 .{ .char = '3', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2333 },
40658086 .{ .char = '6', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 649 },
4066 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4161 },
4067 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4162 },
4068 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4164 },
8087 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4193 },
8088 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4194 },
8089 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4196 },
40698090 .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
40708091 .{ .char = 'i', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
40718092 .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 549 },
4072 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1389 },
8093 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1395 },
40738094 .{ .char = 'i', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
40748095 .{ .char = 'l', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 549 },
4075 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3586 },
4076 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3367 },
4077 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 33, .child_index = 4165 },
4078 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4173 },
4079 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4174 },
4080 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 4175 },
4081 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4176 },
4082 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1708 },
4083 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2622 },
4084 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4177 },
4085 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4178 },
4086 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4179 },
4087 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4180 },
4088 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4181 },
4089 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4182 },
4090 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4183 },
8096 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3616 },
8097 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3396 },
8098 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 33, .child_index = 4197 },
8099 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4205 },
8100 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4206 },
8101 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 4207 },
8102 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4208 },
8103 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 1722 },
8104 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 2647 },
8105 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4209 },
8106 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4210 },
8107 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4211 },
8108 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4212 },
8109 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4213 },
8110 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4214 },
8111 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4215 },
40918112 .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 680 },
40928113 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 458 },
40938114 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 568 },
40948115 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 569 },
40958116 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 569 },
4096 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4184 },
4097 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4185 },
4098 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4186 },
4099 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4188 },
4100 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2680 },
4101 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3927 },
4102 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4189 },
4103 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4190 },
4104 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4191 },
4105 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4193 },
4106 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4194 },
8117 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4216 },
8118 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4217 },
8119 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4218 },
8120 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4220 },
8121 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2706 },
8122 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3958 },
8123 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4221 },
8124 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4222 },
8125 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4223 },
8126 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4225 },
8127 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4226 },
41078128 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 654 },
41088129 .{ .char = '3', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 496 },
4109 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4195 },
4110 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4196 },
4111 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4197 },
4112 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4198 },
4113 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4199 },
4114 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4200 },
4115 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4201 },
4116 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4202 },
4117 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4203 },
4118 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4204 },
4119 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4205 },
4120 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4206 },
4121 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4207 },
4122 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4208 },
4123 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4209 },
4124 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4210 },
4125 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4211 },
4126 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4212 },
4127 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4213 },
4128 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4214 },
4129 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4215 },
4130 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4217 },
4131 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4218 },
4132 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4220 },
4133 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4221 },
4134 .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4222 },
4135 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3011 },
4136 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4223 },
8130 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4227 },
8131 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4228 },
8132 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4229 },
8133 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4230 },
8134 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4231 },
8135 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4232 },
8136 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4233 },
8137 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4234 },
8138 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4235 },
8139 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4236 },
8140 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4237 },
8141 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4238 },
8142 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4239 },
8143 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4240 },
8144 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4241 },
8145 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4242 },
8146 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4243 },
8147 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4244 },
8148 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4245 },
8149 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4246 },
8150 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4247 },
8151 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4249 },
8152 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4250 },
8153 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4252 },
8154 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4253 },
8155 .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4254 },
8156 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3038 },
8157 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4255 },
41378158 .{ .char = 'p', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 549 },
4138 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4224 },
4139 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4225 },
4140 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 4226 },
4141 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4227 },
4142 .{ .char = 'A', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 4228 },
8159 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4256 },
8160 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4257 },
8161 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 4258 },
8162 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4259 },
8163 .{ .char = 'A', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 4260 },
41438164 .{ .char = 'T', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
41448165 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 585 },
4145 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4229 },
4146 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4230 },
4147 .{ .char = 'e', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 4231 },
8166 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4261 },
8167 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4262 },
8168 .{ .char = 'e', .end_of_word = true, .end_of_list = true, .number = 4, .child_index = 4263 },
41488169 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 572 },
4149 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4233 },
4150 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1840 },
4151 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4234 },
4152 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 25, .child_index = 4235 },
4153 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4247 },
4154 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4248 },
4155 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4249 },
4156 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4250 },
8170 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4265 },
8171 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1856 },
8172 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4266 },
8173 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 25, .child_index = 4267 },
8174 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4279 },
8175 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4280 },
8176 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4281 },
8177 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4282 },
41578178 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 572 },
4158 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4251 },
4159 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4254 },
8179 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4283 },
8180 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4286 },
41608181 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 656 },
4161 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3981 },
8182 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4012 },
41628183 .{ .char = 'w', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
41638184 .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 412 },
4164 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4256 },
4165 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4256 },
4166 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4256 },
4167 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4256 },
4168 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3401 },
4169 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4257 },
4170 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4258 },
4171 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4260 },
4172 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2507 },
4173 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4261 },
8185 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4288 },
8186 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4288 },
8187 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4288 },
8188 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4288 },
8189 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3430 },
8190 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4289 },
8191 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4290 },
8192 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4292 },
8193 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2531 },
8194 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4293 },
41748195 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 656 },
4175 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4262 },
4176 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3997 },
4177 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3998 },
4178 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4263 },
4179 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3981 },
4180 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4264 },
4181 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3997 },
4182 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4005 },
4183 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4265 },
4184 .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4266 },
4185 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4267 },
4186 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4268 },
4187 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4271 },
4188 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4256 },
8196 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4294 },
8197 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4028 },
8198 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4029 },
8199 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4295 },
8200 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4012 },
8201 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4296 },
8202 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4028 },
8203 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4036 },
8204 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4297 },
8205 .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4298 },
8206 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4299 },
8207 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4300 },
8208 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4303 },
8209 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4288 },
41898210 .{ .char = 'd', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
41908211 .{ .char = 'h', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
41918212 .{ .char = 'w', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
4192 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2779 },
4193 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2779 },
4194 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4272 },
4195 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4273 },
4196 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4275 },
4197 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4276 },
4198 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4277 },
4199 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3196 },
4200 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4278 },
4201 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4279 },
4202 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4280 },
4203 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4281 },
4204 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3456 },
4205 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3308 },
4206 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4284 },
4207 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4285 },
4208 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4286 },
4209 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4287 },
4210 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4288 },
4211 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4289 },
4212 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4290 },
4213 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4291 },
4214 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3676 },
4215 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4041 },
4216 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4292 },
8213 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2805 },
8214 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 2805 },
8215 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4304 },
8216 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4305 },
8217 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4307 },
8218 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4308 },
8219 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4309 },
8220 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3225 },
8221 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4310 },
8222 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4311 },
8223 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4312 },
8224 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4313 },
8225 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3485 },
8226 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3337 },
8227 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4316 },
8228 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4317 },
8229 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4318 },
8230 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4319 },
8231 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4320 },
8232 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4321 },
8233 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4322 },
8234 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4323 },
8235 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3706 },
8236 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4324 },
8237 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4073 },
8238 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4325 },
42178239 .{ .char = 'i', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
4218 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4292 },
4219 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4293 },
4220 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1197 },
4221 .{ .char = 'M', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1197 },
4222 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1197 },
4223 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4294 },
4224 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4295 },
4225 .{ .char = 'M', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4296 },
8240 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4325 },
8241 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4326 },
8242 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1199 },
8243 .{ .char = 'M', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1199 },
8244 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1199 },
8245 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4327 },
8246 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4328 },
8247 .{ .char = 'M', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4329 },
42268248 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 654 },
4227 .{ .char = 'M', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4296 },
8249 .{ .char = 'M', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4329 },
42288250 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 654 },
4229 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4297 },
4230 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4298 },
4231 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4299 },
4232 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3791 },
4233 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3791 },
4234 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4300 },
4235 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4301 },
4236 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4302 },
4237 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4303 },
4238 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4304 },
4239 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4305 },
4240 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3791 },
4241 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 4306 },
4242 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3791 },
4243 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3791 },
4244 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4307 },
4245 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 84, .child_index = 4309 },
4246 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 84, .child_index = 4309 },
4247 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4306 },
4248 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3791 },
4249 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 4314 },
4250 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4069 },
4251 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3791 },
4252 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3791 },
4253 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4315 },
4254 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4057 },
4255 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4317 },
4256 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4318 },
4257 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4146 },
4258 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4319 },
4259 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4320 },
4260 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4321 },
8251 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4330 },
8252 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4331 },
8253 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4332 },
8254 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3822 },
8255 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3822 },
8256 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4333 },
8257 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4334 },
8258 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4335 },
8259 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4336 },
8260 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4337 },
8261 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4338 },
8262 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3822 },
8263 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 4339 },
8264 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3822 },
8265 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3822 },
8266 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4340 },
8267 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 84, .child_index = 4342 },
8268 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 84, .child_index = 4342 },
8269 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4339 },
8270 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3822 },
8271 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 4347 },
8272 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4101 },
8273 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3822 },
8274 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3822 },
8275 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4348 },
8276 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4089 },
8277 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4350 },
8278 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4351 },
8279 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4178 },
8280 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4352 },
8281 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4353 },
8282 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4354 },
42618283 .{ .char = 'M', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 344 },
42628284 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 344 },
4263 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3761 },
4264 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3547 },
4265 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4322 },
4266 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3547 },
4267 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3547 },
4268 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4324 },
4269 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4325 },
4270 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4326 },
4271 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4077 },
4272 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4077 },
4273 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4077 },
4274 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4327 },
4275 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4077 },
4276 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4077 },
4277 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 4329 },
4278 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4329 },
4279 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 4331 },
4280 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 18, .child_index = 4332 },
4281 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 4331 },
4282 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4331 },
4283 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3547 },
4284 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3547 },
4285 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 4334 },
4286 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4334 },
4287 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4335 },
4288 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 4336 },
4289 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 4336 },
4290 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4338 },
4291 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4341 },
4292 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4335 },
4293 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 4336 },
4294 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 4336 },
4295 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4338 },
4296 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 18, .child_index = 4107 },
4297 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4343 },
4298 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4343 },
4299 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3858 },
4300 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3862 },
4301 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3862 },
4302 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4345 },
4303 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3838 },
4304 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3834 },
4305 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3841 },
4306 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3845 },
4307 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4346 },
4308 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4347 },
4309 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4127 },
4310 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3841 },
4311 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4349 },
4312 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4351 },
4313 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 10, .child_index = 4352 },
4314 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4322 },
4315 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4325 },
4316 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4325 },
4317 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4325 },
4318 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4354 },
4319 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4356 },
4320 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4357 },
4321 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3864 },
4322 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3869 },
4323 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3864 },
4324 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4359 },
4325 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4361 },
4326 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4362 },
4327 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 4363 },
4328 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4363 },
4329 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4364 },
4330 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3877 },
4331 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3882 },
4332 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3883 },
4333 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4365 },
4334 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3877 },
4335 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3883 },
4336 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3877 },
4337 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4366 },
4338 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4366 },
4339 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4367 },
4340 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4369 },
4341 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4369 },
4342 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4370 },
4343 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 4371 },
4344 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4373 },
4345 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 4374 },
4346 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 10, .child_index = 4375 },
4347 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4379 },
4348 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4380 },
4349 .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4381 },
4350 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4382 },
4351 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4383 },
4352 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4384 },
4353 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 4385 },
4354 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4387 },
4355 .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4388 },
4356 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4389 },
4357 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4390 },
4358 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4391 },
4359 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4392 },
4360 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4394 },
4361 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4395 },
4362 .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4396 },
4363 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4399 },
4364 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4400 },
4365 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4401 },
4366 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4402 },
8285 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3792 },
8286 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3577 },
8287 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4355 },
8288 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3577 },
8289 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3577 },
8290 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4357 },
8291 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4358 },
8292 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4359 },
8293 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4109 },
8294 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4109 },
8295 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4109 },
8296 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4360 },
8297 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4109 },
8298 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4109 },
8299 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 12, .child_index = 4362 },
8300 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4362 },
8301 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 4364 },
8302 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 18, .child_index = 4365 },
8303 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 4364 },
8304 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4364 },
8305 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3577 },
8306 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3577 },
8307 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 4367 },
8308 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4367 },
8309 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4368 },
8310 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 4369 },
8311 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 4369 },
8312 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4371 },
8313 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4374 },
8314 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4368 },
8315 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 4369 },
8316 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 4369 },
8317 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4371 },
8318 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 18, .child_index = 4139 },
8319 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4376 },
8320 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4376 },
8321 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3889 },
8322 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3893 },
8323 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3893 },
8324 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4378 },
8325 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 3869 },
8326 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 3865 },
8327 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3872 },
8328 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3876 },
8329 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4379 },
8330 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4380 },
8331 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4159 },
8332 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3872 },
8333 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4382 },
8334 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4384 },
8335 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 10, .child_index = 4385 },
8336 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4355 },
8337 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4358 },
8338 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4358 },
8339 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4358 },
8340 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 12, .child_index = 4387 },
8341 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4389 },
8342 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4390 },
8343 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3895 },
8344 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3900 },
8345 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3895 },
8346 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4392 },
8347 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4394 },
8348 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4395 },
8349 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 4396 },
8350 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4396 },
8351 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4397 },
8352 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3908 },
8353 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 3913 },
8354 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3914 },
8355 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4398 },
8356 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3908 },
8357 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3914 },
8358 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3908 },
8359 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4399 },
8360 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4399 },
8361 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4400 },
8362 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4402 },
8363 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4402 },
8364 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4403 },
8365 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 4404 },
8366 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4406 },
8367 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 4407 },
8368 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 10, .child_index = 4408 },
8369 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4412 },
8370 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4413 },
8371 .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4414 },
8372 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4415 },
8373 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4416 },
8374 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4417 },
8375 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 10, .child_index = 4418 },
8376 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4420 },
8377 .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4421 },
8378 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4422 },
8379 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4423 },
8380 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4424 },
8381 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4425 },
8382 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4427 },
8383 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4428 },
8384 .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4429 },
8385 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4432 },
8386 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4433 },
8387 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4434 },
8388 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4435 },
43678389 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 405 },
4368 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4403 },
4369 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4404 },
8390 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4436 },
8391 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4437 },
43708392 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 459 },
4371 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4405 },
4372 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4406 },
4373 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4407 },
4374 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4409 },
4375 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4410 },
4376 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4411 },
4377 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4412 },
4378 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4413 },
4379 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4414 },
4380 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4415 },
4381 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4416 },
4382 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4418 },
4383 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2319 },
4384 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4420 },
4385 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4421 },
4386 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4422 },
4387 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4423 },
4388 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3979 },
4389 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4424 },
4390 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4425 },
4391 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4426 },
4392 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4427 },
8393 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4438 },
8394 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4439 },
8395 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4440 },
8396 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4442 },
8397 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4443 },
8398 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4444 },
8399 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4445 },
8400 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4446 },
8401 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4447 },
8402 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4448 },
8403 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4449 },
8404 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4451 },
8405 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2342 },
8406 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4453 },
8407 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4454 },
8408 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4455 },
8409 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4456 },
8410 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4010 },
8411 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4457 },
8412 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4458 },
8413 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4459 },
8414 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4460 },
43938415 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 569 },
4394 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4428 },
4395 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4429 },
4396 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4430 },
4397 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4428 },
8416 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4461 },
8417 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4462 },
8418 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4463 },
8419 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4461 },
43988420 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 291 },
4399 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4431 },
4400 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3941 },
4401 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4432 },
4402 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4434 },
4403 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3648 },
4404 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4435 },
4405 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4436 },
8421 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4464 },
8422 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3972 },
8423 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4465 },
8424 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4467 },
8425 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3678 },
8426 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4468 },
8427 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4469 },
44068428 .{ .char = 'T', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
4407 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4437 },
4408 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4438 },
4409 .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 3024 },
8429 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4470 },
8430 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4471 },
8431 .{ .char = 'f', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 3051 },
44108432 .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
4411 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4439 },
4412 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4440 },
4413 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4441 },
4414 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4443 },
4415 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4444 },
4416 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4447 },
4417 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4448 },
4418 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4450 },
4419 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2245 },
4420 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4451 },
4421 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3609 },
4422 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4452 },
4423 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4454 },
4424 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4457 },
4425 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4458 },
4426 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4459 },
4427 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4460 },
4428 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4461 },
8433 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4472 },
8434 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4473 },
8435 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4474 },
8436 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4476 },
8437 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4477 },
8438 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4480 },
8439 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4481 },
8440 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4483 },
8441 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 2267 },
8442 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4484 },
8443 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3639 },
8444 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4485 },
8445 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4487 },
8446 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4490 },
8447 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4491 },
8448 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4492 },
8449 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4493 },
8450 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4494 },
44298451 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 656 },
44308452 .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 412 },
44318453 .{ .char = 'w', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
44328454 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 656 },
44338455 .{ .char = 'w', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
4434 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4462 },
4435 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4463 },
4436 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3401 },
4437 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3405 },
4438 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4464 },
4439 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2507 },
4440 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4465 },
4441 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4466 },
4442 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3405 },
4443 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4467 },
4444 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3698 },
4445 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4468 },
4446 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4469 },
4447 .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4266 },
4448 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4470 },
4449 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4471 },
4450 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4472 },
4451 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1893 },
4452 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4473 },
4453 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4474 },
8456 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4495 },
8457 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4496 },
8458 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3430 },
8459 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3434 },
8460 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4497 },
8461 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2531 },
8462 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4498 },
8463 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4499 },
8464 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3434 },
8465 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4500 },
8466 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3728 },
8467 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4501 },
8468 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4502 },
8469 .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4298 },
8470 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4503 },
8471 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4504 },
8472 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4505 },
8473 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1912 },
8474 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4506 },
8475 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4507 },
44548476 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 460 },
4455 .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 4475 },
4456 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4476 },
4457 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4477 },
4458 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4478 },
4459 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2137 },
4460 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4479 },
4461 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1379 },
4462 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4480 },
4463 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4481 },
4464 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4482 },
4465 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4483 },
4466 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4484 },
4467 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4485 },
4468 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4486 },
4469 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4487 },
8477 .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 4508 },
8478 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4509 },
8479 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4510 },
8480 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4511 },
8481 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 2158 },
8482 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4512 },
8483 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1385 },
8484 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4513 },
8485 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4514 },
8486 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4515 },
8487 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4516 },
8488 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4517 },
8489 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4518 },
8490 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4519 },
8491 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4520 },
8492 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4521 },
44708493 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 344 },
4471 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4488 },
8494 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4522 },
44728495 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 344 },
44738496 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 655 },
44748497 .{ .char = 'M', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
4475 .{ .char = '3', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4489 },
4476 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4490 },
4477 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4491 },
4478 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4492 },
4479 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4493 },
4480 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3807 },
4481 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3807 },
4482 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4077 },
4483 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4494 },
4484 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4496 },
4485 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4497 },
4486 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4497 },
4487 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4498 },
4488 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 4499 },
4489 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 36, .child_index = 4501 },
4490 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 4504 },
4491 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 28, .child_index = 4507 },
4492 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4306 },
4493 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4493 },
4494 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4493 },
4495 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4146 },
4496 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4508 },
4497 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3870 },
4498 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3870 },
4499 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4510 },
4500 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 4511 },
4501 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4511 },
4502 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4512 },
4503 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4513 },
4504 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4516 },
4505 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4091 },
4506 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4517 },
4507 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 4518 },
4508 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4518 },
4509 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4519 },
4510 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 4520 },
4511 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4520 },
4512 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4521 },
4513 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4522 },
4514 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4522 },
4515 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4522 },
4516 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4524 },
4517 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4522 },
4518 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4525 },
4519 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4526 },
4520 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4526 },
4521 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4527 },
4522 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4527 },
4523 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4529 },
4524 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4359 },
4525 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4131 },
4526 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4131 },
4527 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4530 },
4528 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4530 },
4529 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4531 },
4530 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3855 },
4531 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4533 },
4532 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4527 },
4533 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4534 },
4534 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4536 },
4535 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4508 },
4536 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4508 },
8498 .{ .char = '3', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4523 },
8499 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4524 },
8500 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4525 },
8501 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4526 },
8502 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4527 },
8503 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3838 },
8504 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3838 },
8505 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4109 },
8506 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4528 },
8507 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4530 },
8508 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4531 },
8509 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4531 },
8510 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4532 },
8511 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 4533 },
8512 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 36, .child_index = 4535 },
8513 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 8, .child_index = 4538 },
8514 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 28, .child_index = 4541 },
8515 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4339 },
8516 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4527 },
8517 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4527 },
8518 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4178 },
8519 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4542 },
8520 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3901 },
8521 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3901 },
8522 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4544 },
8523 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 4545 },
8524 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4545 },
8525 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4546 },
8526 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4547 },
8527 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4550 },
8528 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4123 },
8529 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4551 },
8530 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 4552 },
8531 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4552 },
8532 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4553 },
8533 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 9, .child_index = 4554 },
8534 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4554 },
8535 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4555 },
8536 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4556 },
8537 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4556 },
8538 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4556 },
8539 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4558 },
8540 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4556 },
8541 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4559 },
8542 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4560 },
8543 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4560 },
8544 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4561 },
8545 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4561 },
8546 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4563 },
8547 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4392 },
8548 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4163 },
8549 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4163 },
8550 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4564 },
8551 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4564 },
8552 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4565 },
8553 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 6, .child_index = 3886 },
8554 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4567 },
8555 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4561 },
8556 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4568 },
8557 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4570 },
8558 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4542 },
8559 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4542 },
45378560 .{ .char = 'l', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
45388561 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 655 },
4539 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4538 },
4540 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4539 },
4541 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3875 },
4542 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4540 },
4543 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4536 },
4544 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3862 },
4545 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4542 },
4546 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2230 },
4547 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4543 },
4548 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4544 },
4549 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4545 },
4550 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4546 },
4551 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4547 },
4552 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4548 },
4553 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4549 },
4554 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4380 },
4555 .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4381 },
4556 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4382 },
4557 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4550 },
4558 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4554 },
4559 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4555 },
4560 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4556 },
4561 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4557 },
4562 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4558 },
4563 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 4559 },
4564 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4560 },
4565 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4561 },
4566 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4562 },
4567 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4563 },
4568 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4564 },
4569 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4565 },
8562 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4572 },
8563 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4573 },
8564 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3906 },
8565 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4574 },
8566 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4570 },
8567 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3893 },
8568 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4576 },
8569 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2252 },
8570 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4577 },
8571 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4578 },
8572 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4579 },
8573 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4580 },
8574 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4581 },
8575 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4582 },
8576 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4583 },
8577 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4413 },
8578 .{ .char = 't', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4414 },
8579 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4415 },
8580 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4584 },
8581 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4588 },
8582 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4589 },
8583 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4590 },
8584 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4591 },
8585 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4592 },
8586 .{ .char = 'r', .end_of_word = false, .end_of_list = false, .number = 5, .child_index = 4593 },
8587 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4594 },
8588 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4595 },
8589 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4596 },
8590 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4597 },
8591 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4598 },
8592 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4599 },
45708593 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 311 },
45718594 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 460 },
4572 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4566 },
4573 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4568 },
4574 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4569 },
4575 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4571 },
4576 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2214 },
4577 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4572 },
4578 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4573 },
4579 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3913 },
4580 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4574 },
8595 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4600 },
8596 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4602 },
8597 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4603 },
8598 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4605 },
8599 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2236 },
8600 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4606 },
8601 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4607 },
8602 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3944 },
8603 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4608 },
45818604 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 496 },
45828605 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 496 },
4583 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4575 },
4584 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4576 },
4585 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3637 },
4586 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4577 },
4587 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4578 },
4588 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4579 },
8606 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4609 },
8607 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4610 },
8608 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 3667 },
8609 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4611 },
8610 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4612 },
8611 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4613 },
45898612 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 311 },
4590 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4580 },
4591 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4582 },
4592 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4583 },
4593 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4584 },
4594 .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1389 },
8613 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4614 },
8614 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4616 },
8615 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4617 },
8616 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4618 },
8617 .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 1395 },
45958618 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 451 },
4596 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4420 },
4597 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4585 },
4598 .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4586 },
4599 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4587 },
4600 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4588 },
4601 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4589 },
4602 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3324 },
8619 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4453 },
8620 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4619 },
8621 .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4620 },
8622 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4621 },
8623 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4622 },
8624 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4623 },
8625 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3353 },
46038626 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 579 },
4604 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4590 },
4605 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4591 },
4606 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1940 },
4607 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4592 },
4608 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2819 },
8627 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4624 },
8628 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4625 },
8629 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1959 },
8630 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4626 },
8631 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2845 },
46098632 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 580 },
4610 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3648 },
4611 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4593 },
4612 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4594 },
4613 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4595 },
4614 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4596 },
4615 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4597 },
4616 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4598 },
8633 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3678 },
8634 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4627 },
8635 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4628 },
8636 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4629 },
8637 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4630 },
8638 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4631 },
8639 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4632 },
46178640 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 457 },
4618 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4599 },
8641 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4633 },
46198642 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 344 },
4620 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4600 },
4621 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4601 },
4622 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4602 },
8643 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4634 },
8644 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4635 },
8645 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4636 },
46238646 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 738 },
4624 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4603 },
4625 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2268 },
4626 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4605 },
8647 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4637 },
8648 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 2290 },
8649 .{ .char = 'l', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4639 },
46278650 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 568 },
4628 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4606 },
4629 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4607 },
8651 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4640 },
8652 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4641 },
46308653 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 580 },
4631 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4608 },
8654 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4642 },
46328655 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 457 },
46338656 .{ .char = 'q', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 286 },
4634 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4609 },
4635 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4610 },
4636 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4611 },
4637 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4612 },
4638 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4613 },
4639 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4614 },
8657 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4643 },
8658 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4644 },
8659 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4645 },
8660 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4646 },
8661 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4647 },
8662 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4648 },
46408663 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 412 },
4641 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4261 },
8664 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4293 },
46428665 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 561 },
4643 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4615 },
4644 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3701 },
4645 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4616 },
4646 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4617 },
4647 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4261 },
4648 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4618 },
4649 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4619 },
4650 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4620 },
4651 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2199 },
4652 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4621 },
4653 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4622 },
4654 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4623 },
4655 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4624 },
4656 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3301 },
4657 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1129 },
4658 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4627 },
4659 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4628 },
4660 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4632 },
4661 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4634 },
4662 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4635 },
4663 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4636 },
4664 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4637 },
4665 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4638 },
4666 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4639 },
4667 .{ .char = '2', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4640 },
8666 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4649 },
8667 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3731 },
8668 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4650 },
8669 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4651 },
8670 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4293 },
8671 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4652 },
8672 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4653 },
8673 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4654 },
8674 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2221 },
8675 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4655 },
8676 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4656 },
8677 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4657 },
8678 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4658 },
8679 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3330 },
8680 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1131 },
8681 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4661 },
8682 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4662 },
8683 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 8, .child_index = 4666 },
8684 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4668 },
8685 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4669 },
8686 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4670 },
8687 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4671 },
8688 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4672 },
8689 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4673 },
8690 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4674 },
8691 .{ .char = '2', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4675 },
46688692 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 655 },
4669 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4298 },
4670 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4642 },
4671 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4642 },
4672 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4301 },
4673 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4645 },
4674 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4646 },
4675 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4648 },
4676 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4649 },
4677 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4649 },
4678 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4649 },
4679 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4649 },
4680 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 28, .child_index = 4109 },
4681 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4649 },
4682 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4651 },
4683 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4649 },
4684 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4652 },
4685 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 28, .child_index = 4109 },
4686 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4317 },
4687 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4653 },
4688 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4654 },
4689 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3547 },
4690 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4513 },
8693 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4331 },
8694 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4677 },
8695 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4677 },
8696 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4334 },
8697 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4680 },
8698 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4681 },
8699 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4683 },
8700 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4684 },
8701 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4684 },
8702 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4684 },
8703 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4684 },
8704 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 28, .child_index = 4141 },
8705 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4684 },
8706 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4686 },
8707 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4684 },
8708 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4687 },
8709 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 28, .child_index = 4141 },
8710 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4350 },
8711 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4688 },
8712 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4689 },
8713 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 3577 },
8714 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4547 },
46918715 .{ .char = 'l', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
4692 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4516 },
8716 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4550 },
46938717 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 655 },
46948718 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 655 },
4695 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3807 },
4696 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4327 },
4697 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4656 },
4698 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4331 },
4699 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4658 },
4700 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4660 },
4701 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4661 },
4702 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4662 },
4703 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4662 },
4704 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4295 },
4705 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4663 },
4706 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4663 },
4707 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4664 },
4708 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4667 },
4709 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4668 },
4710 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4668 },
4711 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4669 },
4712 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4670 },
4713 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4670 },
8719 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 3838 },
8720 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4360 },
8721 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4691 },
8722 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4364 },
8723 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 9, .child_index = 4693 },
8724 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4695 },
8725 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4696 },
8726 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4697 },
8727 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4697 },
8728 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4328 },
8729 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4698 },
8730 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4698 },
8731 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4699 },
8732 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4702 },
8733 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4703 },
8734 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4703 },
8735 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4704 },
8736 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4705 },
8737 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4705 },
47148738 .{ .char = 'l', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
47158739 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 655 },
4716 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4512 },
4717 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4346 },
4718 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4513 },
4719 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4513 },
4720 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3609 },
4721 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4671 },
4722 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4673 },
4723 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4674 },
4724 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4381 },
4725 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4675 },
4726 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4676 },
4727 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4546 },
8740 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4546 },
8741 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4379 },
8742 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4547 },
8743 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4547 },
8744 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3639 },
8745 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4706 },
8746 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4708 },
8747 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4709 },
8748 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4414 },
8749 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4710 },
8750 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4711 },
8751 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4580 },
47288752 .{ .char = '0', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
47298753 .{ .char = '1', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
47308754 .{ .char = '2', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
47318755 .{ .char = '3', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
47328756 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 458 },
4733 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4677 },
4734 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4678 },
4735 .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 6, .child_index = 1171 },
4736 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4679 },
4737 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4680 },
4738 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4681 },
4739 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4682 },
4740 .{ .char = 'C', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4683 },
4741 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4684 },
4742 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4685 },
4743 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4686 },
4744 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4687 },
4745 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4688 },
4746 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4689 },
4747 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3026 },
4748 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4690 },
4749 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4692 },
4750 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4207 },
4751 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3342 },
4752 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4693 },
8757 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4712 },
8758 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4713 },
8759 .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 6, .child_index = 1173 },
8760 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4714 },
8761 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4715 },
8762 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4716 },
8763 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4717 },
8764 .{ .char = 'C', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4718 },
8765 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4719 },
8766 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4720 },
8767 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4721 },
8768 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4722 },
8769 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4723 },
8770 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4724 },
8771 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3053 },
8772 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4725 },
8773 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4727 },
8774 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4239 },
8775 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3371 },
8776 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4728 },
47538777 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 460 },
4754 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3470 },
4755 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4694 },
4756 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4695 },
4757 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4696 },
4758 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4697 },
4759 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4698 },
8778 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3500 },
8779 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4729 },
8780 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4730 },
8781 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4731 },
8782 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4732 },
8783 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4733 },
47608784 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 460 },
4761 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4700 },
4762 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4701 },
4763 .{ .char = '3', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4702 },
4764 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4703 },
8785 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4735 },
8786 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4736 },
8787 .{ .char = '3', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4737 },
8788 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4738 },
47658789 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 585 },
4766 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4704 },
4767 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4705 },
4768 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4706 },
4769 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4707 },
4770 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4708 },
4771 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4709 },
4772 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4710 },
4773 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4711 },
4774 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4712 },
4775 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4713 },
4776 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4714 },
4777 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4715 },
4778 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4716 },
4779 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4717 },
4780 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4718 },
4781 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4719 },
8790 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4739 },
8791 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4740 },
8792 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4741 },
8793 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4742 },
8794 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4743 },
8795 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4744 },
8796 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4745 },
8797 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4746 },
8798 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4747 },
8799 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4748 },
8800 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4749 },
8801 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4750 },
8802 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4751 },
8803 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4752 },
8804 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4753 },
8805 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4754 },
47828806 .{ .char = 's', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
47838807 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 664 },
4784 .{ .char = 'g', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 4720 },
4785 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4722 },
4786 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4723 },
4787 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4716 },
4788 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1663 },
4789 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4724 },
8808 .{ .char = 'g', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 4755 },
8809 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4757 },
8810 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4758 },
8811 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4751 },
8812 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1677 },
8813 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4759 },
47908814 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 585 },
4791 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4725 },
4792 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4726 },
8815 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4760 },
8816 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4761 },
47938817 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 561 },
4794 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4727 },
4795 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4728 },
4796 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4730 },
4797 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4731 },
4798 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4732 },
4799 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4733 },
4800 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4734 },
4801 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4735 },
4802 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4736 },
4803 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4738 },
4804 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4739 },
4805 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4740 },
4806 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4741 },
4807 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4742 },
4808 .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4743 },
4809 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4744 },
4810 .{ .char = '2', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4745 },
4811 .{ .char = '3', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4745 },
4812 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4746 },
4813 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4747 },
4814 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4748 },
4815 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4636 },
4816 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4751 },
4817 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4752 },
8818 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4762 },
8819 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4763 },
8820 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4765 },
8821 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4766 },
8822 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4767 },
8823 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4768 },
8824 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4769 },
8825 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4770 },
8826 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4771 },
8827 .{ .char = 'o', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4773 },
8828 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4774 },
8829 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4775 },
8830 .{ .char = 'c', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4776 },
8831 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4777 },
8832 .{ .char = 'h', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4778 },
8833 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4779 },
8834 .{ .char = '2', .end_of_word = false, .end_of_list = false, .number = 4, .child_index = 4780 },
8835 .{ .char = '3', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4780 },
8836 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4781 },
8837 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4782 },
8838 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4783 },
8839 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4670 },
8840 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4786 },
8841 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4787 },
8842 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4788 },
48188843 .{ .char = 'a', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
48198844 .{ .char = 'p', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
4820 .{ .char = 'M', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4516 },
8845 .{ .char = 'M', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4550 },
48218846 .{ .char = 'l', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
48228847 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 655 },
4823 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4753 },
4824 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4301 },
4825 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4315 },
8848 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4789 },
8849 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4334 },
8850 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4348 },
48268851 .{ .char = 'M', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 655 },
4827 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4754 },
4828 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4755 },
4829 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4756 },
4830 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4756 },
4831 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4757 },
4832 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4642 },
4833 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4642 },
4834 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4325 },
4835 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4540 },
4836 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4091 },
4837 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4138 },
4838 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4356 },
4839 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4524 },
4840 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4660 },
4841 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4758 },
8852 .{ .char = '_', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4790 },
8853 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4791 },
8854 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4792 },
8855 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4792 },
8856 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4793 },
8857 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4677 },
8858 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4677 },
8859 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4358 },
8860 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4574 },
8861 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4123 },
8862 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4170 },
8863 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4389 },
8864 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4558 },
8865 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4695 },
8866 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4794 },
48428867 .{ .char = 'l', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
4843 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4359 },
8868 .{ .char = 'm', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4392 },
48448869 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 655 },
4845 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4359 },
4846 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4759 },
4847 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4760 },
4848 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4762 },
4849 .{ .char = '3', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4763 },
4850 .{ .char = '6', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4764 },
4851 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4765 },
4852 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4766 },
4853 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4554 },
4854 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4767 },
4855 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4769 },
4856 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4554 },
8870 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4392 },
8871 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4795 },
8872 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4796 },
8873 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4798 },
8874 .{ .char = '3', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4799 },
8875 .{ .char = '6', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4800 },
8876 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4801 },
8877 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4802 },
8878 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4588 },
8879 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4803 },
8880 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4805 },
8881 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4588 },
48578882 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 873 },
4858 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4560 },
4859 .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 4773 },
4860 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4775 },
4861 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4776 },
4862 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4777 },
4863 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4778 },
4864 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4779 },
4865 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4780 },
4866 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4780 },
4867 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4781 },
8883 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4594 },
8884 .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 5, .child_index = 4809 },
8885 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4811 },
8886 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4812 },
8887 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4813 },
8888 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4814 },
8889 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4815 },
8890 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4816 },
8891 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4816 },
8892 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4817 },
48688893 .{ .char = '1', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 648 },
4869 .{ .char = '8', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4782 },
4870 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4783 },
8894 .{ .char = '8', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4818 },
8895 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4819 },
48718896 .{ .char = 'e', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 680 },
4872 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3659 },
4873 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4636 },
4874 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4784 },
4875 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2790 },
4876 .{ .char = '1', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 4785 },
4877 .{ .char = '2', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 4785 },
4878 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4786 },
8897 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3689 },
8898 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4670 },
8899 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4820 },
8900 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2816 },
8901 .{ .char = '1', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 4821 },
8902 .{ .char = '2', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 4821 },
8903 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4822 },
48798904 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 496 },
4880 .{ .char = '2', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3941 },
4881 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4787 },
4882 .{ .char = 'c', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 4788 },
4883 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4789 },
4884 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4790 },
4885 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4791 },
4886 .{ .char = 'g', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 4792 },
4887 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4793 },
4888 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3342 },
4889 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4794 },
4890 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4289 },
4891 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4795 },
4892 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4796 },
4893 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4797 },
4894 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4798 },
4895 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4799 },
4896 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4800 },
4897 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2236 },
4898 .{ .char = '1', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4801 },
8905 .{ .char = '2', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3972 },
8906 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4823 },
8907 .{ .char = 'c', .end_of_word = true, .end_of_list = true, .number = 3, .child_index = 4824 },
8908 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4825 },
8909 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4826 },
8910 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4827 },
8911 .{ .char = 'g', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 4828 },
8912 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4829 },
8913 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3371 },
8914 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4830 },
8915 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4321 },
8916 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4831 },
8917 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4832 },
8918 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4833 },
8919 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4834 },
8920 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4835 },
8921 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4836 },
8922 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2258 },
8923 .{ .char = '1', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4837 },
48998924 .{ .char = '2', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
4900 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4802 },
4901 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4803 },
4902 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4804 },
4903 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4805 },
4904 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4806 },
4905 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4807 },
4906 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4469 },
4907 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4618 },
4908 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4469 },
4909 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4266 },
4910 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4808 },
4911 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4809 },
4912 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4810 },
4913 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4811 },
4914 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4812 },
4915 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4812 },
4916 .{ .char = 'r', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 4813 },
4917 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4814 },
4918 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4815 },
4919 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4816 },
4920 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4817 },
4921 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4818 },
4922 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4819 },
4923 .{ .char = 'D', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4820 },
4924 .{ .char = '2', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4822 },
4925 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4207 },
8925 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4838 },
8926 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4839 },
8927 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4840 },
8928 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4841 },
8929 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4842 },
8930 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4843 },
8931 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4502 },
8932 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4652 },
8933 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4502 },
8934 .{ .char = 'q', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4298 },
8935 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4844 },
8936 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4845 },
8937 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4846 },
8938 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4847 },
8939 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4848 },
8940 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4848 },
8941 .{ .char = 'r', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 4849 },
8942 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4850 },
8943 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4851 },
8944 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4852 },
8945 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4853 },
8946 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4854 },
8947 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4855 },
8948 .{ .char = 'D', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4856 },
8949 .{ .char = '2', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4858 },
8950 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4239 },
49268951 .{ .char = 'x', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
49278952 .{ .char = 'y', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
49288953 .{ .char = 'z', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
4929 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4823 },
4930 .{ .char = '5', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4824 },
4931 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4301 },
4932 .{ .char = 'M', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4825 },
4933 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4651 },
4934 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4754 },
4935 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4077 },
4936 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4077 },
4937 .{ .char = 'M', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4359 },
4938 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4146 },
4939 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4146 },
4940 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4826 },
4941 .{ .char = '2', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3268 },
4942 .{ .char = '4', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3268 },
4943 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4828 },
4944 .{ .char = 'k', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 1938 },
8954 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4859 },
8955 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3065 },
8956 .{ .char = '5', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4860 },
8957 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4334 },
8958 .{ .char = 'M', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4861 },
8959 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4686 },
8960 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4790 },
8961 .{ .char = 'x', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4109 },
8962 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4109 },
8963 .{ .char = 'M', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4392 },
8964 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4178 },
8965 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4178 },
8966 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4862 },
8967 .{ .char = '2', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3297 },
8968 .{ .char = '4', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3297 },
8969 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4864 },
8970 .{ .char = 'k', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 1957 },
49458971 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 458 },
4946 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4829 },
8972 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4865 },
49478973 .{ .char = 'w', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
49488974 .{ .char = 'x', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
49498975 .{ .char = 'y', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
49508976 .{ .char = 'z', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
49518977 .{ .char = '6', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 649 },
4952 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4830 },
4953 .{ .char = 'e', .end_of_word = true, .end_of_list = true, .number = 6, .child_index = 4833 },
4954 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4837 },
4955 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4838 },
4956 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4839 },
4957 .{ .char = 'n', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 4840 },
4958 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3886 },
4959 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4841 },
4960 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4842 },
4961 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4843 },
4962 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4844 },
4963 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4845 },
4964 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4846 },
4965 .{ .char = '1', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4847 },
4966 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4416 },
4967 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4210 },
4968 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4848 },
4969 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4849 },
4970 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4850 },
4971 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4851 },
4972 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4852 },
4973 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4854 },
4974 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4855 },
4975 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4856 },
4976 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4857 },
4977 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4858 },
4978 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4859 },
8978 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4866 },
8979 .{ .char = 'e', .end_of_word = true, .end_of_list = true, .number = 6, .child_index = 4869 },
8980 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4873 },
8981 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4874 },
8982 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4875 },
8983 .{ .char = 'n', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 4876 },
8984 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 3917 },
8985 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4877 },
8986 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4878 },
8987 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4879 },
8988 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4880 },
8989 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4881 },
8990 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4882 },
8991 .{ .char = '1', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4883 },
8992 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4449 },
8993 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4242 },
8994 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4884 },
8995 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4885 },
8996 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4886 },
8997 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4887 },
8998 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 6, .child_index = 4888 },
8999 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4890 },
9000 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4891 },
9001 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4892 },
9002 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4893 },
9003 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4894 },
9004 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4895 },
49799005 .{ .char = '0', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
4980 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4860 },
4981 .{ .char = 'd', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 4861 },
4982 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4862 },
4983 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4863 },
4984 .{ .char = 'j', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4864 },
4985 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4865 },
4986 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4867 },
4987 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4868 },
4988 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4869 },
4989 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4739 },
4990 .{ .char = 'd', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 4813 },
9006 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4896 },
9007 .{ .char = 'd', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 4897 },
9008 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4898 },
9009 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4899 },
9010 .{ .char = 'j', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4900 },
9011 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4901 },
9012 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4903 },
9013 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4904 },
9014 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4905 },
9015 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4774 },
9016 .{ .char = 'd', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 4849 },
49919017 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 291 },
4992 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4870 },
4993 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4871 },
4994 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4872 },
4995 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4873 },
4996 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4874 },
4997 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4873 },
4998 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4875 },
4999 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4875 },
5000 .{ .char = 'D', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4877 },
5001 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4880 },
5002 .{ .char = '1', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4881 },
5003 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4882 },
5004 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4757 },
5005 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4757 },
5006 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4884 },
5007 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4885 },
5008 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4886 },
9018 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4906 },
9019 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4907 },
9020 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4908 },
9021 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4909 },
9022 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4910 },
9023 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4909 },
9024 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4911 },
9025 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4911 },
9026 .{ .char = 'D', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4913 },
9027 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4916 },
9028 .{ .char = '1', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4917 },
9029 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4918 },
9030 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4793 },
9031 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4793 },
9032 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4920 },
9033 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4921 },
9034 .{ .char = 'a', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4922 },
50099035 .{ .char = 'n', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 496 },
5010 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3366 },
9036 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3395 },
50119037 .{ .char = '1', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 648 },
50129038 .{ .char = '6', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 649 },
50139039 .{ .char = '8', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
5014 .{ .char = 'P', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4887 },
5015 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4888 },
5016 .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4889 },
5017 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3052 },
5018 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4890 },
5019 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4891 },
5020 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2568 },
5021 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4892 },
5022 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2808 },
5023 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3026 },
5024 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4894 },
5025 .{ .char = '6', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3941 },
5026 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2790 },
5027 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4895 },
5028 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4896 },
5029 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3961 },
5030 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4485 },
5031 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4409 },
5032 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4897 },
5033 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4898 },
5034 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4899 },
9040 .{ .char = 'P', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4923 },
9041 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4924 },
9042 .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4925 },
9043 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3080 },
9044 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4926 },
9045 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4927 },
9046 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2593 },
9047 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4928 },
9048 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2834 },
9049 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3053 },
9050 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4930 },
9051 .{ .char = '6', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3972 },
9052 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2816 },
9053 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4931 },
9054 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4932 },
9055 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3992 },
9056 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 3, .child_index = 4518 },
9057 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 3, .child_index = 4442 },
9058 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4933 },
9059 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4934 },
9060 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4935 },
50359061 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 311 },
5036 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4900 },
5037 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4901 },
9062 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4936 },
9063 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4937 },
50389064 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 471 },
5039 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4902 },
5040 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4903 },
5041 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4904 },
5042 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4905 },
5043 .{ .char = 'l', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 4906 },
5044 .{ .char = 'r', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 4906 },
5045 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4907 },
5046 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2877 },
5047 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4908 },
5048 .{ .char = 'p', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 4813 },
9065 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4938 },
9066 .{ .char = 'b', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4939 },
9067 .{ .char = 'z', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4940 },
9068 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4941 },
9069 .{ .char = 'l', .end_of_word = true, .end_of_list = false, .number = 2, .child_index = 4942 },
9070 .{ .char = 'r', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 4942 },
9071 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4943 },
9072 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2904 },
9073 .{ .char = 'f', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4944 },
9074 .{ .char = 'p', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 4849 },
50499075 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 183 },
5050 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4909 },
5051 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4910 },
5052 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4911 },
5053 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4912 },
5054 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4912 },
5055 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4912 },
5056 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4912 },
5057 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4913 },
5058 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4693 },
5059 .{ .char = '2', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4914 },
9076 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4945 },
9077 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4946 },
9078 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4947 },
9079 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4948 },
9080 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4948 },
9081 .{ .char = 'f', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4948 },
9082 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4948 },
9083 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4949 },
9084 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4728 },
9085 .{ .char = '2', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4950 },
50609086 .{ .char = 'M', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 655 },
50619087 .{ .char = 'l', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
5062 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4916 },
5063 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4917 },
5064 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4918 },
5065 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4919 },
5066 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4920 },
5067 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4921 },
5068 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2963 },
5069 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4925 },
5070 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3026 },
5071 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3026 },
5072 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4926 },
5073 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3366 },
9088 .{ .char = 'g', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4952 },
9089 .{ .char = 's', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4953 },
9090 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4954 },
9091 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4955 },
9092 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4956 },
9093 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 4, .child_index = 4957 },
9094 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2990 },
9095 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4961 },
9096 .{ .char = 'i', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 3053 },
9097 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3053 },
9098 .{ .char = 'm', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4962 },
9099 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3395 },
50749100 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 311 },
5075 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4927 },
5076 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4928 },
9101 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4963 },
9102 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4964 },
50779103 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 451 },
5078 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4929 },
5079 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4930 },
9104 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4965 },
9105 .{ .char = 'c', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4966 },
50809106 .{ .char = 'v', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 323 },
5081 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4931 },
5082 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4932 },
5083 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4017 },
9107 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4967 },
9108 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4968 },
9109 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4048 },
50849110 .{ .char = 'a', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
5085 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4933 },
5086 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4934 },
5087 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4935 },
5088 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4913 },
5089 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4936 },
9111 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4969 },
9112 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4970 },
9113 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4971 },
9114 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4949 },
9115 .{ .char = 'h', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4972 },
50909116 .{ .char = '_', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
5091 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4912 },
9117 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4948 },
50929118 .{ .char = 'l', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
50939119 .{ .char = 'u', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
5094 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4937 },
5095 .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4938 },
9120 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4973 },
9121 .{ .char = 'k', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4974 },
50969122 .{ .char = 'q', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
5097 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4939 },
5098 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4940 },
5099 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4941 },
5100 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4587 },
9123 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4975 },
9124 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4976 },
9125 .{ .char = 'b', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4977 },
9126 .{ .char = 'p', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4621 },
51019127 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 520 },
51029128 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 420 },
5103 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4942 },
5104 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4943 },
5105 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4944 },
5106 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4945 },
5107 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3301 },
5108 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4946 },
5109 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4947 },
5110 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3195 },
5111 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4948 },
5112 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2460 },
5113 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4949 },
5114 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4913 },
5115 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4950 },
5116 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4952 },
5117 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4955 },
5118 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4956 },
5119 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4957 },
9129 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4978 },
9130 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4979 },
9131 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4980 },
9132 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4981 },
9133 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3330 },
9134 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4982 },
9135 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4983 },
9136 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3224 },
9137 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4984 },
9138 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2483 },
9139 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4985 },
9140 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4949 },
9141 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4986 },
9142 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 5, .child_index = 4988 },
9143 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4991 },
9144 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4992 },
9145 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4993 },
51209146 .{ .char = '1', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
5121 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4958 },
5122 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3578 },
9147 .{ .char = 'n', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4994 },
9148 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 3608 },
51239149 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 457 },
5124 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2230 },
5125 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4959 },
9150 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 2252 },
9151 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4995 },
51269152 .{ .char = 'u', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 572 },
5127 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4960 },
5128 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4961 },
9153 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4996 },
9154 .{ .char = 's', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4997 },
51299155 .{ .char = 'w', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 821 },
5130 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4918 },
5131 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4962 },
5132 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4962 },
5133 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4964 },
5134 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4965 },
5135 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4966 },
5136 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4207 },
9156 .{ .char = 'e', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4954 },
9157 .{ .char = 'g', .end_of_word = false, .end_of_list = false, .number = 2, .child_index = 4998 },
9158 .{ .char = 'l', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4998 },
9159 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 5000 },
9160 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 5001 },
9161 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 5002 },
9162 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4239 },
51379163 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 450 },
5138 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4967 },
5139 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4969 },
9164 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 5003 },
9165 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 5005 },
51409166 .{ .char = 'e', .end_of_word = true, .end_of_list = false, .number = 1, .child_index = 0 },
51419167 .{ .char = 't', .end_of_word = true, .end_of_list = true, .number = 1, .child_index = 0 },
5142 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 4970 },
5143 .{ .char = 'S', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4971 },
5144 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4972 },
5145 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 4973 },
5146 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4974 },
5147 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1440 },
5148 .{ .char = 'r', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 4975 },
5149 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4976 },
9168 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 2, .child_index = 5006 },
9169 .{ .char = 'S', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 5007 },
9170 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 5008 },
9171 .{ .char = 'd', .end_of_word = false, .end_of_list = false, .number = 1, .child_index = 5009 },
9172 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 5010 },
9173 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1446 },
9174 .{ .char = 'r', .end_of_word = true, .end_of_list = true, .number = 2, .child_index = 5011 },
9175 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 5012 },
51509176 .{ .char = 'o', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 654 },
5151 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4977 },
5152 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4978 },
9177 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 5013 },
9178 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 5014 },
51539179 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 459 },
5154 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4979 },
5155 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4980 },
5156 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4981 },
5157 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1701 },
5158 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4982 },
5159 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4983 },
5160 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4984 },
5161 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4913 },
5162 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4985 },
5163 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4986 },
5164 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4987 },
5165 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4913 },
9180 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 5015 },
9181 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 5016 },
9182 .{ .char = 'd', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 5017 },
9183 .{ .char = 'i', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 1715 },
9184 .{ .char = 'a', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 5018 },
9185 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 5019 },
9186 .{ .char = '_', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 5020 },
9187 .{ .char = 'r', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4949 },
9188 .{ .char = 't', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 5021 },
9189 .{ .char = 'y', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 5022 },
9190 .{ .char = 'p', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 5023 },
9191 .{ .char = 'e', .end_of_word = false, .end_of_list = true, .number = 1, .child_index = 4949 },
51669192};
51679193pub const data = blk: {
5168 @setEvalBranchQuota(27902);
9194 @setEvalBranchQuota(27937);
51699195 break :blk [_]@This(){
5170 // _Block_object_assign
5171 .{ .tag = @enumFromInt(0), .properties = .{ .param_str = "vv*vC*iC", .header = .blocks, .attributes = .{ .lib_function_without_prefix = true } } },
5172 // _Block_object_dispose
5173 .{ .tag = @enumFromInt(1), .properties = .{ .param_str = "vvC*iC", .header = .blocks, .attributes = .{ .lib_function_without_prefix = true } } },
5174 // _Exit
5175 .{ .tag = @enumFromInt(2), .properties = .{ .param_str = "vi", .header = .stdlib, .attributes = .{ .noreturn = true, .lib_function_without_prefix = true } } },
5176 // _InterlockedAnd
5177 .{ .tag = @enumFromInt(3), .properties = .{ .param_str = "NiNiD*Ni", .language = .all_ms_languages } },
5178 // _InterlockedAnd16
5179 .{ .tag = @enumFromInt(4), .properties = .{ .param_str = "ssD*s", .language = .all_ms_languages } },
5180 // _InterlockedAnd8
5181 .{ .tag = @enumFromInt(5), .properties = .{ .param_str = "ccD*c", .language = .all_ms_languages } },
5182 // _InterlockedCompareExchange
5183 .{ .tag = @enumFromInt(6), .properties = .{ .param_str = "NiNiD*NiNi", .language = .all_ms_languages } },
5184 // _InterlockedCompareExchange16
5185 .{ .tag = @enumFromInt(7), .properties = .{ .param_str = "ssD*ss", .language = .all_ms_languages } },
5186 // _InterlockedCompareExchange64
5187 .{ .tag = @enumFromInt(8), .properties = .{ .param_str = "LLiLLiD*LLiLLi", .language = .all_ms_languages } },
5188 // _InterlockedCompareExchange8
5189 .{ .tag = @enumFromInt(9), .properties = .{ .param_str = "ccD*cc", .language = .all_ms_languages } },
5190 // _InterlockedCompareExchangePointer
5191 .{ .tag = @enumFromInt(10), .properties = .{ .param_str = "v*v*D*v*v*", .language = .all_ms_languages } },
5192 // _InterlockedCompareExchangePointer_nf
5193 .{ .tag = @enumFromInt(11), .properties = .{ .param_str = "v*v*D*v*v*", .language = .all_ms_languages } },
5194 // _InterlockedDecrement
5195 .{ .tag = @enumFromInt(12), .properties = .{ .param_str = "NiNiD*", .language = .all_ms_languages } },
5196 // _InterlockedDecrement16
5197 .{ .tag = @enumFromInt(13), .properties = .{ .param_str = "ssD*", .language = .all_ms_languages } },
5198 // _InterlockedExchange
5199 .{ .tag = @enumFromInt(14), .properties = .{ .param_str = "NiNiD*Ni", .language = .all_ms_languages } },
5200 // _InterlockedExchange16
5201 .{ .tag = @enumFromInt(15), .properties = .{ .param_str = "ssD*s", .language = .all_ms_languages } },
5202 // _InterlockedExchange8
5203 .{ .tag = @enumFromInt(16), .properties = .{ .param_str = "ccD*c", .language = .all_ms_languages } },
5204 // _InterlockedExchangeAdd
5205 .{ .tag = @enumFromInt(17), .properties = .{ .param_str = "NiNiD*Ni", .language = .all_ms_languages } },
5206 // _InterlockedExchangeAdd16
5207 .{ .tag = @enumFromInt(18), .properties = .{ .param_str = "ssD*s", .language = .all_ms_languages } },
5208 // _InterlockedExchangeAdd8
5209 .{ .tag = @enumFromInt(19), .properties = .{ .param_str = "ccD*c", .language = .all_ms_languages } },
5210 // _InterlockedExchangePointer
5211 .{ .tag = @enumFromInt(20), .properties = .{ .param_str = "v*v*D*v*", .language = .all_ms_languages } },
5212 // _InterlockedExchangeSub
5213 .{ .tag = @enumFromInt(21), .properties = .{ .param_str = "NiNiD*Ni", .language = .all_ms_languages } },
5214 // _InterlockedExchangeSub16
5215 .{ .tag = @enumFromInt(22), .properties = .{ .param_str = "ssD*s", .language = .all_ms_languages } },
5216 // _InterlockedExchangeSub8
5217 .{ .tag = @enumFromInt(23), .properties = .{ .param_str = "ccD*c", .language = .all_ms_languages } },
5218 // _InterlockedIncrement
5219 .{ .tag = @enumFromInt(24), .properties = .{ .param_str = "NiNiD*", .language = .all_ms_languages } },
5220 // _InterlockedIncrement16
5221 .{ .tag = @enumFromInt(25), .properties = .{ .param_str = "ssD*", .language = .all_ms_languages } },
5222 // _InterlockedOr
5223 .{ .tag = @enumFromInt(26), .properties = .{ .param_str = "NiNiD*Ni", .language = .all_ms_languages } },
5224 // _InterlockedOr16
5225 .{ .tag = @enumFromInt(27), .properties = .{ .param_str = "ssD*s", .language = .all_ms_languages } },
5226 // _InterlockedOr8
5227 .{ .tag = @enumFromInt(28), .properties = .{ .param_str = "ccD*c", .language = .all_ms_languages } },
5228 // _InterlockedXor
5229 .{ .tag = @enumFromInt(29), .properties = .{ .param_str = "NiNiD*Ni", .language = .all_ms_languages } },
5230 // _InterlockedXor16
5231 .{ .tag = @enumFromInt(30), .properties = .{ .param_str = "ssD*s", .language = .all_ms_languages } },
5232 // _InterlockedXor8
5233 .{ .tag = @enumFromInt(31), .properties = .{ .param_str = "ccD*c", .language = .all_ms_languages } },
5234 // _MoveFromCoprocessor
5235 .{ .tag = @enumFromInt(32), .properties = .{ .param_str = "UiIUiIUiIUiIUiIUi", .language = .all_ms_languages, .target_set = TargetSet.initOne(.arm) } },
5236 // _MoveFromCoprocessor2
5237 .{ .tag = @enumFromInt(33), .properties = .{ .param_str = "UiIUiIUiIUiIUiIUi", .language = .all_ms_languages, .target_set = TargetSet.initOne(.arm) } },
5238 // _MoveToCoprocessor
5239 .{ .tag = @enumFromInt(34), .properties = .{ .param_str = "vUiIUiIUiIUiIUiIUi", .language = .all_ms_languages, .target_set = TargetSet.initOne(.arm) } },
5240 // _MoveToCoprocessor2
5241 .{ .tag = @enumFromInt(35), .properties = .{ .param_str = "vUiIUiIUiIUiIUiIUi", .language = .all_ms_languages, .target_set = TargetSet.initOne(.arm) } },
5242 // _ReturnAddress
5243 .{ .tag = @enumFromInt(36), .properties = .{ .param_str = "v*", .language = .all_ms_languages } },
5244 // __GetExceptionInfo
5245 .{ .tag = @enumFromInt(37), .properties = .{ .param_str = "v*.", .language = .all_ms_languages, .attributes = .{ .custom_typecheck = true, .eval_args = false } } },
5246 // __abnormal_termination
5247 .{ .tag = @enumFromInt(38), .properties = .{ .param_str = "i", .language = .all_ms_languages } },
5248 // __annotation
5249 .{ .tag = @enumFromInt(39), .properties = .{ .param_str = "wC*.", .language = .all_ms_languages } },
5250 // __arithmetic_fence
5251 .{ .tag = @enumFromInt(40), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true, .const_evaluable = true } } },
5252 // __assume
5253 .{ .tag = @enumFromInt(41), .properties = .{ .param_str = "vb", .language = .all_ms_languages, .attributes = .{ .const_evaluable = true } } },
5254 // __atomic_add_fetch
5255 .{ .tag = @enumFromInt(42), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
5256 // __atomic_always_lock_free
5257 .{ .tag = @enumFromInt(43), .properties = .{ .param_str = "bzvCD*", .attributes = .{ .const_evaluable = true } } },
5258 // __atomic_and_fetch
5259 .{ .tag = @enumFromInt(44), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
5260 // __atomic_clear
5261 .{ .tag = @enumFromInt(45), .properties = .{ .param_str = "vvD*i" } },
5262 // __atomic_compare_exchange
5263 .{ .tag = @enumFromInt(46), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
5264 // __atomic_compare_exchange_n
5265 .{ .tag = @enumFromInt(47), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
5266 // __atomic_exchange
5267 .{ .tag = @enumFromInt(48), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
5268 // __atomic_exchange_n
5269 .{ .tag = @enumFromInt(49), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
5270 // __atomic_fetch_add
5271 .{ .tag = @enumFromInt(50), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
5272 // __atomic_fetch_and
5273 .{ .tag = @enumFromInt(51), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
5274 // __atomic_fetch_max
5275 .{ .tag = @enumFromInt(52), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
5276 // __atomic_fetch_min
5277 .{ .tag = @enumFromInt(53), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
5278 // __atomic_fetch_nand
5279 .{ .tag = @enumFromInt(54), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
5280 // __atomic_fetch_or
5281 .{ .tag = @enumFromInt(55), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
5282 // __atomic_fetch_sub
5283 .{ .tag = @enumFromInt(56), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
5284 // __atomic_fetch_xor
5285 .{ .tag = @enumFromInt(57), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
5286 // __atomic_is_lock_free
5287 .{ .tag = @enumFromInt(58), .properties = .{ .param_str = "bzvCD*", .attributes = .{ .const_evaluable = true } } },
5288 // __atomic_load
5289 .{ .tag = @enumFromInt(59), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
5290 // __atomic_load_n
5291 .{ .tag = @enumFromInt(60), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
5292 // __atomic_max_fetch
5293 .{ .tag = @enumFromInt(61), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
5294 // __atomic_min_fetch
5295 .{ .tag = @enumFromInt(62), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
5296 // __atomic_nand_fetch
5297 .{ .tag = @enumFromInt(63), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
5298 // __atomic_or_fetch
5299 .{ .tag = @enumFromInt(64), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
5300 // __atomic_signal_fence
5301 .{ .tag = @enumFromInt(65), .properties = .{ .param_str = "vi" } },
5302 // __atomic_store
5303 .{ .tag = @enumFromInt(66), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
5304 // __atomic_store_n
5305 .{ .tag = @enumFromInt(67), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
5306 // __atomic_sub_fetch
5307 .{ .tag = @enumFromInt(68), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
5308 // __atomic_test_and_set
5309 .{ .tag = @enumFromInt(69), .properties = .{ .param_str = "bvD*i" } },
5310 // __atomic_thread_fence
5311 .{ .tag = @enumFromInt(70), .properties = .{ .param_str = "vi" } },
5312 // __atomic_xor_fetch
5313 .{ .tag = @enumFromInt(71), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
5314 // __builtin___CFStringMakeConstantString
5315 .{ .tag = @enumFromInt(72), .properties = .{ .param_str = "FC*cC*", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
5316 // __builtin___NSStringMakeConstantString
5317 .{ .tag = @enumFromInt(73), .properties = .{ .param_str = "FC*cC*", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
5318 // __builtin___clear_cache
5319 .{ .tag = @enumFromInt(74), .properties = .{ .param_str = "vc*c*" } },
5320 // __builtin___fprintf_chk
5321 .{ .tag = @enumFromInt(75), .properties = .{ .param_str = "iP*RicC*R.", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .printf, .format_string_position = 2 } } },
5322 // __builtin___get_unsafe_stack_bottom
5323 .{ .tag = @enumFromInt(76), .properties = .{ .param_str = "v*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
5324 // __builtin___get_unsafe_stack_ptr
5325 .{ .tag = @enumFromInt(77), .properties = .{ .param_str = "v*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
5326 // __builtin___get_unsafe_stack_start
5327 .{ .tag = @enumFromInt(78), .properties = .{ .param_str = "v*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
5328 // __builtin___get_unsafe_stack_top
5329 .{ .tag = @enumFromInt(79), .properties = .{ .param_str = "v*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
5330 // __builtin___memccpy_chk
5331 .{ .tag = @enumFromInt(80), .properties = .{ .param_str = "v*v*vC*izz", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
5332 // __builtin___memcpy_chk
5333 .{ .tag = @enumFromInt(81), .properties = .{ .param_str = "v*v*vC*zz", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
5334 // __builtin___memmove_chk
5335 .{ .tag = @enumFromInt(82), .properties = .{ .param_str = "v*v*vC*zz", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
5336 // __builtin___mempcpy_chk
5337 .{ .tag = @enumFromInt(83), .properties = .{ .param_str = "v*v*vC*zz", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
5338 // __builtin___memset_chk
5339 .{ .tag = @enumFromInt(84), .properties = .{ .param_str = "v*v*izz", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
5340 // __builtin___printf_chk
5341 .{ .tag = @enumFromInt(85), .properties = .{ .param_str = "iicC*R.", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .printf, .format_string_position = 1 } } },
5342 // __builtin___snprintf_chk
5343 .{ .tag = @enumFromInt(86), .properties = .{ .param_str = "ic*RzizcC*R.", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .printf, .format_string_position = 4 } } },
5344 // __builtin___sprintf_chk
5345 .{ .tag = @enumFromInt(87), .properties = .{ .param_str = "ic*RizcC*R.", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .printf, .format_string_position = 3 } } },
5346 // __builtin___stpcpy_chk
5347 .{ .tag = @enumFromInt(88), .properties = .{ .param_str = "c*c*cC*z", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
5348 // __builtin___stpncpy_chk
5349 .{ .tag = @enumFromInt(89), .properties = .{ .param_str = "c*c*cC*zz", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
5350 // __builtin___strcat_chk
5351 .{ .tag = @enumFromInt(90), .properties = .{ .param_str = "c*c*cC*z", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
5352 // __builtin___strcpy_chk
5353 .{ .tag = @enumFromInt(91), .properties = .{ .param_str = "c*c*cC*z", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
5354 // __builtin___strlcat_chk
5355 .{ .tag = @enumFromInt(92), .properties = .{ .param_str = "zc*cC*zz", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
5356 // __builtin___strlcpy_chk
5357 .{ .tag = @enumFromInt(93), .properties = .{ .param_str = "zc*cC*zz", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
5358 // __builtin___strncat_chk
5359 .{ .tag = @enumFromInt(94), .properties = .{ .param_str = "c*c*cC*zz", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
5360 // __builtin___strncpy_chk
5361 .{ .tag = @enumFromInt(95), .properties = .{ .param_str = "c*c*cC*zz", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
5362 // __builtin___vfprintf_chk
5363 .{ .tag = @enumFromInt(96), .properties = .{ .param_str = "iP*RicC*Ra", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vprintf, .format_string_position = 2 } } },
5364 // __builtin___vprintf_chk
5365 .{ .tag = @enumFromInt(97), .properties = .{ .param_str = "iicC*Ra", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vprintf, .format_string_position = 1 } } },
5366 // __builtin___vsnprintf_chk
5367 .{ .tag = @enumFromInt(98), .properties = .{ .param_str = "ic*RzizcC*Ra", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vprintf, .format_string_position = 4 } } },
5368 // __builtin___vsprintf_chk
5369 .{ .tag = @enumFromInt(99), .properties = .{ .param_str = "ic*RizcC*Ra", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vprintf, .format_string_position = 3 } } },
5370 // __builtin_abort
5371 .{ .tag = @enumFromInt(100), .properties = .{ .param_str = "v", .attributes = .{ .noreturn = true, .lib_function_with_builtin_prefix = true } } },
5372 // __builtin_abs
5373 .{ .tag = @enumFromInt(101), .properties = .{ .param_str = "ii", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
5374 // __builtin_acos
5375 .{ .tag = @enumFromInt(102), .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
5376 // __builtin_acosf
5377 .{ .tag = @enumFromInt(103), .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
5378 // __builtin_acosf128
5379 .{ .tag = @enumFromInt(104), .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
5380 // __builtin_acosh
5381 .{ .tag = @enumFromInt(105), .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
5382 // __builtin_acoshf
5383 .{ .tag = @enumFromInt(106), .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
5384 // __builtin_acoshf128
5385 .{ .tag = @enumFromInt(107), .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
5386 // __builtin_acoshl
5387 .{ .tag = @enumFromInt(108), .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
5388 // __builtin_acosl
5389 .{ .tag = @enumFromInt(109), .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
5390 // __builtin_add_overflow
5391 .{ .tag = @enumFromInt(110), .properties = .{ .param_str = "b.", .attributes = .{ .custom_typecheck = true, .const_evaluable = true } } },
5392 // __builtin_addc
5393 .{ .tag = @enumFromInt(111), .properties = .{ .param_str = "UiUiCUiCUiCUi*" } },
5394 // __builtin_addcb
5395 .{ .tag = @enumFromInt(112), .properties = .{ .param_str = "UcUcCUcCUcCUc*" } },
5396 // __builtin_addcl
5397 .{ .tag = @enumFromInt(113), .properties = .{ .param_str = "ULiULiCULiCULiCULi*" } },
5398 // __builtin_addcll
5399 .{ .tag = @enumFromInt(114), .properties = .{ .param_str = "ULLiULLiCULLiCULLiCULLi*" } },
5400 // __builtin_addcs
5401 .{ .tag = @enumFromInt(115), .properties = .{ .param_str = "UsUsCUsCUsCUs*" } },
5402 // __builtin_align_down
5403 .{ .tag = @enumFromInt(116), .properties = .{ .param_str = "v*vC*z", .attributes = .{ .@"const" = true, .custom_typecheck = true, .const_evaluable = true } } },
5404 // __builtin_align_up
5405 .{ .tag = @enumFromInt(117), .properties = .{ .param_str = "v*vC*z", .attributes = .{ .@"const" = true, .custom_typecheck = true, .const_evaluable = true } } },
5406 // __builtin_alloca
5407 .{ .tag = @enumFromInt(118), .properties = .{ .param_str = "v*z", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
5408 // __builtin_alloca_uninitialized
5409 .{ .tag = @enumFromInt(119), .properties = .{ .param_str = "v*z", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
5410 // __builtin_alloca_with_align
5411 .{ .tag = @enumFromInt(120), .properties = .{ .param_str = "v*zIz", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
5412 // __builtin_alloca_with_align_uninitialized
5413 .{ .tag = @enumFromInt(121), .properties = .{ .param_str = "v*zIz", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
5414 // __builtin_amdgcn_alignbit
5415 .{ .tag = @enumFromInt(122), .properties = .{ .param_str = "UiUiUiUi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5416 // __builtin_amdgcn_alignbyte
5417 .{ .tag = @enumFromInt(123), .properties = .{ .param_str = "UiUiUiUi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5418 // __builtin_amdgcn_atomic_dec32
5419 .{ .tag = @enumFromInt(124), .properties = .{ .param_str = "UZiUZiD*UZiUicC*", .target_set = TargetSet.initOne(.amdgpu) } },
5420 // __builtin_amdgcn_atomic_dec64
5421 .{ .tag = @enumFromInt(125), .properties = .{ .param_str = "UWiUWiD*UWiUicC*", .target_set = TargetSet.initOne(.amdgpu) } },
5422 // __builtin_amdgcn_atomic_inc32
5423 .{ .tag = @enumFromInt(126), .properties = .{ .param_str = "UZiUZiD*UZiUicC*", .target_set = TargetSet.initOne(.amdgpu) } },
5424 // __builtin_amdgcn_atomic_inc64
5425 .{ .tag = @enumFromInt(127), .properties = .{ .param_str = "UWiUWiD*UWiUicC*", .target_set = TargetSet.initOne(.amdgpu) } },
5426 // __builtin_amdgcn_buffer_wbinvl1
5427 .{ .tag = @enumFromInt(128), .properties = .{ .param_str = "v", .target_set = TargetSet.initOne(.amdgpu) } },
5428 // __builtin_amdgcn_class
5429 .{ .tag = @enumFromInt(129), .properties = .{ .param_str = "bdi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5430 // __builtin_amdgcn_classf
5431 .{ .tag = @enumFromInt(130), .properties = .{ .param_str = "bfi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5432 // __builtin_amdgcn_cosf
5433 .{ .tag = @enumFromInt(131), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5434 // __builtin_amdgcn_cubeid
5435 .{ .tag = @enumFromInt(132), .properties = .{ .param_str = "ffff", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5436 // __builtin_amdgcn_cubema
5437 .{ .tag = @enumFromInt(133), .properties = .{ .param_str = "ffff", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5438 // __builtin_amdgcn_cubesc
5439 .{ .tag = @enumFromInt(134), .properties = .{ .param_str = "ffff", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5440 // __builtin_amdgcn_cubetc
5441 .{ .tag = @enumFromInt(135), .properties = .{ .param_str = "ffff", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5442 // __builtin_amdgcn_cvt_pk_i16
5443 .{ .tag = @enumFromInt(136), .properties = .{ .param_str = "E2sii", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5444 // __builtin_amdgcn_cvt_pk_u16
5445 .{ .tag = @enumFromInt(137), .properties = .{ .param_str = "E2UsUiUi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5446 // __builtin_amdgcn_cvt_pk_u8_f32
5447 .{ .tag = @enumFromInt(138), .properties = .{ .param_str = "UifUiUi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5448 // __builtin_amdgcn_cvt_pknorm_i16
5449 .{ .tag = @enumFromInt(139), .properties = .{ .param_str = "E2sff", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5450 // __builtin_amdgcn_cvt_pknorm_u16
5451 .{ .tag = @enumFromInt(140), .properties = .{ .param_str = "E2Usff", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5452 // __builtin_amdgcn_cvt_pkrtz
5453 .{ .tag = @enumFromInt(141), .properties = .{ .param_str = "E2hff", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5454 // __builtin_amdgcn_dispatch_ptr
5455 .{ .tag = @enumFromInt(142), .properties = .{ .param_str = "v*4", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5456 // __builtin_amdgcn_div_fixup
5457 .{ .tag = @enumFromInt(143), .properties = .{ .param_str = "dddd", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5458 // __builtin_amdgcn_div_fixupf
5459 .{ .tag = @enumFromInt(144), .properties = .{ .param_str = "ffff", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5460 // __builtin_amdgcn_div_fmas
5461 .{ .tag = @enumFromInt(145), .properties = .{ .param_str = "ddddb", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5462 // __builtin_amdgcn_div_fmasf
5463 .{ .tag = @enumFromInt(146), .properties = .{ .param_str = "ffffb", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5464 // __builtin_amdgcn_div_scale
5465 .{ .tag = @enumFromInt(147), .properties = .{ .param_str = "dddbb*", .target_set = TargetSet.initOne(.amdgpu) } },
5466 // __builtin_amdgcn_div_scalef
5467 .{ .tag = @enumFromInt(148), .properties = .{ .param_str = "fffbb*", .target_set = TargetSet.initOne(.amdgpu) } },
5468 // __builtin_amdgcn_ds_append
5469 .{ .tag = @enumFromInt(149), .properties = .{ .param_str = "ii*3", .target_set = TargetSet.initOne(.amdgpu) } },
5470 // __builtin_amdgcn_ds_bpermute
5471 .{ .tag = @enumFromInt(150), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5472 // __builtin_amdgcn_ds_consume
5473 .{ .tag = @enumFromInt(151), .properties = .{ .param_str = "ii*3", .target_set = TargetSet.initOne(.amdgpu) } },
5474 // __builtin_amdgcn_ds_faddf
5475 .{ .tag = @enumFromInt(152), .properties = .{ .param_str = "ff*3fIiIiIb", .target_set = TargetSet.initOne(.amdgpu) } },
5476 // __builtin_amdgcn_ds_fmaxf
5477 .{ .tag = @enumFromInt(153), .properties = .{ .param_str = "ff*3fIiIiIb", .target_set = TargetSet.initOne(.amdgpu) } },
5478 // __builtin_amdgcn_ds_fminf
5479 .{ .tag = @enumFromInt(154), .properties = .{ .param_str = "ff*3fIiIiIb", .target_set = TargetSet.initOne(.amdgpu) } },
5480 // __builtin_amdgcn_ds_permute
5481 .{ .tag = @enumFromInt(155), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5482 // __builtin_amdgcn_ds_swizzle
5483 .{ .tag = @enumFromInt(156), .properties = .{ .param_str = "iiIi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5484 // __builtin_amdgcn_endpgm
5485 .{ .tag = @enumFromInt(157), .properties = .{ .param_str = "v", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .noreturn = true } } },
5486 // __builtin_amdgcn_exp2f
5487 .{ .tag = @enumFromInt(158), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5488 // __builtin_amdgcn_fcmp
5489 .{ .tag = @enumFromInt(159), .properties = .{ .param_str = "WUiddIi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5490 // __builtin_amdgcn_fcmpf
5491 .{ .tag = @enumFromInt(160), .properties = .{ .param_str = "WUiffIi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5492 // __builtin_amdgcn_fence
5493 .{ .tag = @enumFromInt(161), .properties = .{ .param_str = "vUicC*", .target_set = TargetSet.initOne(.amdgpu) } },
5494 // __builtin_amdgcn_fmed3f
5495 .{ .tag = @enumFromInt(162), .properties = .{ .param_str = "ffff", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5496 // __builtin_amdgcn_fract
5497 .{ .tag = @enumFromInt(163), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5498 // __builtin_amdgcn_fractf
5499 .{ .tag = @enumFromInt(164), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5500 // __builtin_amdgcn_frexp_exp
5501 .{ .tag = @enumFromInt(165), .properties = .{ .param_str = "id", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5502 // __builtin_amdgcn_frexp_expf
5503 .{ .tag = @enumFromInt(166), .properties = .{ .param_str = "if", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5504 // __builtin_amdgcn_frexp_mant
5505 .{ .tag = @enumFromInt(167), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5506 // __builtin_amdgcn_frexp_mantf
5507 .{ .tag = @enumFromInt(168), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5508 // __builtin_amdgcn_grid_size_x
5509 .{ .tag = @enumFromInt(169), .properties = .{ .param_str = "Ui", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5510 // __builtin_amdgcn_grid_size_y
5511 .{ .tag = @enumFromInt(170), .properties = .{ .param_str = "Ui", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5512 // __builtin_amdgcn_grid_size_z
5513 .{ .tag = @enumFromInt(171), .properties = .{ .param_str = "Ui", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5514 // __builtin_amdgcn_groupstaticsize
5515 .{ .tag = @enumFromInt(172), .properties = .{ .param_str = "Ui", .target_set = TargetSet.initOne(.amdgpu) } },
5516 // __builtin_amdgcn_iglp_opt
5517 .{ .tag = @enumFromInt(173), .properties = .{ .param_str = "vIi", .target_set = TargetSet.initOne(.amdgpu) } },
5518 // __builtin_amdgcn_implicitarg_ptr
5519 .{ .tag = @enumFromInt(174), .properties = .{ .param_str = "v*4", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5520 // __builtin_amdgcn_interp_mov
5521 .{ .tag = @enumFromInt(175), .properties = .{ .param_str = "fUiUiUiUi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5522 // __builtin_amdgcn_interp_p1
5523 .{ .tag = @enumFromInt(176), .properties = .{ .param_str = "ffUiUiUi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5524 // __builtin_amdgcn_interp_p1_f16
5525 .{ .tag = @enumFromInt(177), .properties = .{ .param_str = "ffUiUibUi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5526 // __builtin_amdgcn_interp_p2
5527 .{ .tag = @enumFromInt(178), .properties = .{ .param_str = "fffUiUiUi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5528 // __builtin_amdgcn_interp_p2_f16
5529 .{ .tag = @enumFromInt(179), .properties = .{ .param_str = "hffUiUibUi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5530 // __builtin_amdgcn_is_private
5531 .{ .tag = @enumFromInt(180), .properties = .{ .param_str = "bvC*0", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5532 // __builtin_amdgcn_is_shared
5533 .{ .tag = @enumFromInt(181), .properties = .{ .param_str = "bvC*0", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5534 // __builtin_amdgcn_kernarg_segment_ptr
5535 .{ .tag = @enumFromInt(182), .properties = .{ .param_str = "v*4", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5536 // __builtin_amdgcn_ldexp
5537 .{ .tag = @enumFromInt(183), .properties = .{ .param_str = "ddi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5538 // __builtin_amdgcn_ldexpf
5539 .{ .tag = @enumFromInt(184), .properties = .{ .param_str = "ffi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5540 // __builtin_amdgcn_lerp
5541 .{ .tag = @enumFromInt(185), .properties = .{ .param_str = "UiUiUiUi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5542 // __builtin_amdgcn_log_clampf
5543 .{ .tag = @enumFromInt(186), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5544 // __builtin_amdgcn_logf
5545 .{ .tag = @enumFromInt(187), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5546 // __builtin_amdgcn_mbcnt_hi
5547 .{ .tag = @enumFromInt(188), .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5548 // __builtin_amdgcn_mbcnt_lo
5549 .{ .tag = @enumFromInt(189), .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5550 // __builtin_amdgcn_mqsad_pk_u16_u8
5551 .{ .tag = @enumFromInt(190), .properties = .{ .param_str = "WUiWUiUiWUi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5552 // __builtin_amdgcn_mqsad_u32_u8
5553 .{ .tag = @enumFromInt(191), .properties = .{ .param_str = "V4UiWUiUiV4Ui", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5554 // __builtin_amdgcn_msad_u8
5555 .{ .tag = @enumFromInt(192), .properties = .{ .param_str = "UiUiUiUi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5556 // __builtin_amdgcn_qsad_pk_u16_u8
5557 .{ .tag = @enumFromInt(193), .properties = .{ .param_str = "WUiWUiUiWUi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5558 // __builtin_amdgcn_queue_ptr
5559 .{ .tag = @enumFromInt(194), .properties = .{ .param_str = "v*4", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5560 // __builtin_amdgcn_rcp
5561 .{ .tag = @enumFromInt(195), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5562 // __builtin_amdgcn_rcpf
5563 .{ .tag = @enumFromInt(196), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5564 // __builtin_amdgcn_read_exec
5565 .{ .tag = @enumFromInt(197), .properties = .{ .param_str = "WUi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5566 // __builtin_amdgcn_read_exec_hi
5567 .{ .tag = @enumFromInt(198), .properties = .{ .param_str = "Ui", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5568 // __builtin_amdgcn_read_exec_lo
5569 .{ .tag = @enumFromInt(199), .properties = .{ .param_str = "Ui", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5570 // __builtin_amdgcn_readfirstlane
5571 .{ .tag = @enumFromInt(200), .properties = .{ .param_str = "ii", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5572 // __builtin_amdgcn_readlane
5573 .{ .tag = @enumFromInt(201), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5574 // __builtin_amdgcn_rsq
5575 .{ .tag = @enumFromInt(202), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5576 // __builtin_amdgcn_rsq_clamp
5577 .{ .tag = @enumFromInt(203), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5578 // __builtin_amdgcn_rsq_clampf
5579 .{ .tag = @enumFromInt(204), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5580 // __builtin_amdgcn_rsqf
5581 .{ .tag = @enumFromInt(205), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5582 // __builtin_amdgcn_s_barrier
5583 .{ .tag = @enumFromInt(206), .properties = .{ .param_str = "v", .target_set = TargetSet.initOne(.amdgpu) } },
5584 // __builtin_amdgcn_s_dcache_inv
5585 .{ .tag = @enumFromInt(207), .properties = .{ .param_str = "v", .target_set = TargetSet.initOne(.amdgpu) } },
5586 // __builtin_amdgcn_s_decperflevel
5587 .{ .tag = @enumFromInt(208), .properties = .{ .param_str = "vIi", .target_set = TargetSet.initOne(.amdgpu) } },
5588 // __builtin_amdgcn_s_getpc
5589 .{ .tag = @enumFromInt(209), .properties = .{ .param_str = "WUi", .target_set = TargetSet.initOne(.amdgpu) } },
5590 // __builtin_amdgcn_s_getreg
5591 .{ .tag = @enumFromInt(210), .properties = .{ .param_str = "UiIi", .target_set = TargetSet.initOne(.amdgpu) } },
5592 // __builtin_amdgcn_s_incperflevel
5593 .{ .tag = @enumFromInt(211), .properties = .{ .param_str = "vIi", .target_set = TargetSet.initOne(.amdgpu) } },
5594 // __builtin_amdgcn_s_sendmsg
5595 .{ .tag = @enumFromInt(212), .properties = .{ .param_str = "vIiUi", .target_set = TargetSet.initOne(.amdgpu) } },
5596 // __builtin_amdgcn_s_sendmsghalt
5597 .{ .tag = @enumFromInt(213), .properties = .{ .param_str = "vIiUi", .target_set = TargetSet.initOne(.amdgpu) } },
5598 // __builtin_amdgcn_s_setprio
5599 .{ .tag = @enumFromInt(214), .properties = .{ .param_str = "vIs", .target_set = TargetSet.initOne(.amdgpu) } },
5600 // __builtin_amdgcn_s_setreg
5601 .{ .tag = @enumFromInt(215), .properties = .{ .param_str = "vIiUi", .target_set = TargetSet.initOne(.amdgpu) } },
5602 // __builtin_amdgcn_s_sleep
5603 .{ .tag = @enumFromInt(216), .properties = .{ .param_str = "vIi", .target_set = TargetSet.initOne(.amdgpu) } },
5604 // __builtin_amdgcn_s_waitcnt
5605 .{ .tag = @enumFromInt(217), .properties = .{ .param_str = "vIi", .target_set = TargetSet.initOne(.amdgpu) } },
5606 // __builtin_amdgcn_sad_hi_u8
5607 .{ .tag = @enumFromInt(218), .properties = .{ .param_str = "UiUiUiUi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5608 // __builtin_amdgcn_sad_u16
5609 .{ .tag = @enumFromInt(219), .properties = .{ .param_str = "UiUiUiUi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5610 // __builtin_amdgcn_sad_u8
5611 .{ .tag = @enumFromInt(220), .properties = .{ .param_str = "UiUiUiUi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5612 // __builtin_amdgcn_sbfe
5613 .{ .tag = @enumFromInt(221), .properties = .{ .param_str = "UiUiUiUi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5614 // __builtin_amdgcn_sched_barrier
5615 .{ .tag = @enumFromInt(222), .properties = .{ .param_str = "vIi", .target_set = TargetSet.initOne(.amdgpu) } },
5616 // __builtin_amdgcn_sched_group_barrier
5617 .{ .tag = @enumFromInt(223), .properties = .{ .param_str = "vIiIiIi", .target_set = TargetSet.initOne(.amdgpu) } },
5618 // __builtin_amdgcn_sicmp
5619 .{ .tag = @enumFromInt(224), .properties = .{ .param_str = "WUiiiIi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5620 // __builtin_amdgcn_sicmpl
5621 .{ .tag = @enumFromInt(225), .properties = .{ .param_str = "WUiWiWiIi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5622 // __builtin_amdgcn_sinf
5623 .{ .tag = @enumFromInt(226), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5624 // __builtin_amdgcn_sqrt
5625 .{ .tag = @enumFromInt(227), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5626 // __builtin_amdgcn_sqrtf
5627 .{ .tag = @enumFromInt(228), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5628 // __builtin_amdgcn_trig_preop
5629 .{ .tag = @enumFromInt(229), .properties = .{ .param_str = "ddi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5630 // __builtin_amdgcn_trig_preopf
5631 .{ .tag = @enumFromInt(230), .properties = .{ .param_str = "ffi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5632 // __builtin_amdgcn_ubfe
5633 .{ .tag = @enumFromInt(231), .properties = .{ .param_str = "UiUiUiUi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5634 // __builtin_amdgcn_uicmp
5635 .{ .tag = @enumFromInt(232), .properties = .{ .param_str = "WUiUiUiIi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5636 // __builtin_amdgcn_uicmpl
5637 .{ .tag = @enumFromInt(233), .properties = .{ .param_str = "WUiWUiWUiIi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5638 // __builtin_amdgcn_wave_barrier
5639 .{ .tag = @enumFromInt(234), .properties = .{ .param_str = "v", .target_set = TargetSet.initOne(.amdgpu) } },
5640 // __builtin_amdgcn_workgroup_id_x
5641 .{ .tag = @enumFromInt(235), .properties = .{ .param_str = "Ui", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5642 // __builtin_amdgcn_workgroup_id_y
5643 .{ .tag = @enumFromInt(236), .properties = .{ .param_str = "Ui", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5644 // __builtin_amdgcn_workgroup_id_z
5645 .{ .tag = @enumFromInt(237), .properties = .{ .param_str = "Ui", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5646 // __builtin_amdgcn_workgroup_size_x
5647 .{ .tag = @enumFromInt(238), .properties = .{ .param_str = "Us", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5648 // __builtin_amdgcn_workgroup_size_y
5649 .{ .tag = @enumFromInt(239), .properties = .{ .param_str = "Us", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5650 // __builtin_amdgcn_workgroup_size_z
5651 .{ .tag = @enumFromInt(240), .properties = .{ .param_str = "Us", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5652 // __builtin_amdgcn_workitem_id_x
5653 .{ .tag = @enumFromInt(241), .properties = .{ .param_str = "Ui", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5654 // __builtin_amdgcn_workitem_id_y
5655 .{ .tag = @enumFromInt(242), .properties = .{ .param_str = "Ui", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5656 // __builtin_amdgcn_workitem_id_z
5657 .{ .tag = @enumFromInt(243), .properties = .{ .param_str = "Ui", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
5658 // __builtin_annotation
5659 .{ .tag = @enumFromInt(244), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
5660 // __builtin_arm_cdp
5661 .{ .tag = @enumFromInt(245), .properties = .{ .param_str = "vUIiUIiUIiUIiUIiUIi", .target_set = TargetSet.initOne(.arm) } },
5662 // __builtin_arm_cdp2
5663 .{ .tag = @enumFromInt(246), .properties = .{ .param_str = "vUIiUIiUIiUIiUIiUIi", .target_set = TargetSet.initOne(.arm) } },
5664 // __builtin_arm_clrex
5665 .{ .tag = @enumFromInt(247), .properties = .{ .param_str = "v", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) } },
5666 // __builtin_arm_cls
5667 .{ .tag = @enumFromInt(248), .properties = .{ .param_str = "UiZUi", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } },
5668 // __builtin_arm_cls64
5669 .{ .tag = @enumFromInt(249), .properties = .{ .param_str = "UiWUi", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } },
5670 // __builtin_arm_clz
5671 .{ .tag = @enumFromInt(250), .properties = .{ .param_str = "UiZUi", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } },
5672 // __builtin_arm_clz64
5673 .{ .tag = @enumFromInt(251), .properties = .{ .param_str = "UiWUi", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } },
5674 // __builtin_arm_cmse_TT
5675 .{ .tag = @enumFromInt(252), .properties = .{ .param_str = "Uiv*", .target_set = TargetSet.initOne(.arm) } },
5676 // __builtin_arm_cmse_TTA
5677 .{ .tag = @enumFromInt(253), .properties = .{ .param_str = "Uiv*", .target_set = TargetSet.initOne(.arm) } },
5678 // __builtin_arm_cmse_TTAT
5679 .{ .tag = @enumFromInt(254), .properties = .{ .param_str = "Uiv*", .target_set = TargetSet.initOne(.arm) } },
5680 // __builtin_arm_cmse_TTT
5681 .{ .tag = @enumFromInt(255), .properties = .{ .param_str = "Uiv*", .target_set = TargetSet.initOne(.arm) } },
5682 // __builtin_arm_dbg
5683 .{ .tag = @enumFromInt(256), .properties = .{ .param_str = "vUi", .target_set = TargetSet.initOne(.arm) } },
5684 // __builtin_arm_dmb
5685 .{ .tag = @enumFromInt(257), .properties = .{ .param_str = "vUi", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } },
5686 // __builtin_arm_dsb
5687 .{ .tag = @enumFromInt(258), .properties = .{ .param_str = "vUi", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } },
5688 // __builtin_arm_get_fpscr
5689 .{ .tag = @enumFromInt(259), .properties = .{ .param_str = "Ui", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5690 // __builtin_arm_isb
5691 .{ .tag = @enumFromInt(260), .properties = .{ .param_str = "vUi", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } },
5692 // __builtin_arm_ldaex
5693 .{ .tag = @enumFromInt(261), .properties = .{ .param_str = "v.", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .custom_typecheck = true } } },
5694 // __builtin_arm_ldc
5695 .{ .tag = @enumFromInt(262), .properties = .{ .param_str = "vUIiUIivC*", .target_set = TargetSet.initOne(.arm) } },
5696 // __builtin_arm_ldc2
5697 .{ .tag = @enumFromInt(263), .properties = .{ .param_str = "vUIiUIivC*", .target_set = TargetSet.initOne(.arm) } },
5698 // __builtin_arm_ldc2l
5699 .{ .tag = @enumFromInt(264), .properties = .{ .param_str = "vUIiUIivC*", .target_set = TargetSet.initOne(.arm) } },
5700 // __builtin_arm_ldcl
5701 .{ .tag = @enumFromInt(265), .properties = .{ .param_str = "vUIiUIivC*", .target_set = TargetSet.initOne(.arm) } },
5702 // __builtin_arm_ldrex
5703 .{ .tag = @enumFromInt(266), .properties = .{ .param_str = "v.", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .custom_typecheck = true } } },
5704 // __builtin_arm_ldrexd
5705 .{ .tag = @enumFromInt(267), .properties = .{ .param_str = "LLUiv*", .target_set = TargetSet.initOne(.arm) } },
5706 // __builtin_arm_mcr
5707 .{ .tag = @enumFromInt(268), .properties = .{ .param_str = "vUIiUIiUiUIiUIiUIi", .target_set = TargetSet.initOne(.arm) } },
5708 // __builtin_arm_mcr2
5709 .{ .tag = @enumFromInt(269), .properties = .{ .param_str = "vUIiUIiUiUIiUIiUIi", .target_set = TargetSet.initOne(.arm) } },
5710 // __builtin_arm_mcrr
5711 .{ .tag = @enumFromInt(270), .properties = .{ .param_str = "vUIiUIiLLUiUIi", .target_set = TargetSet.initOne(.arm) } },
5712 // __builtin_arm_mcrr2
5713 .{ .tag = @enumFromInt(271), .properties = .{ .param_str = "vUIiUIiLLUiUIi", .target_set = TargetSet.initOne(.arm) } },
5714 // __builtin_arm_mrc
5715 .{ .tag = @enumFromInt(272), .properties = .{ .param_str = "UiUIiUIiUIiUIiUIi", .target_set = TargetSet.initOne(.arm) } },
5716 // __builtin_arm_mrc2
5717 .{ .tag = @enumFromInt(273), .properties = .{ .param_str = "UiUIiUIiUIiUIiUIi", .target_set = TargetSet.initOne(.arm) } },
5718 // __builtin_arm_mrrc
5719 .{ .tag = @enumFromInt(274), .properties = .{ .param_str = "LLUiUIiUIiUIi", .target_set = TargetSet.initOne(.arm) } },
5720 // __builtin_arm_mrrc2
5721 .{ .tag = @enumFromInt(275), .properties = .{ .param_str = "LLUiUIiUIiUIi", .target_set = TargetSet.initOne(.arm) } },
5722 // __builtin_arm_nop
5723 .{ .tag = @enumFromInt(276), .properties = .{ .param_str = "v", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) } },
5724 // __builtin_arm_prefetch
5725 .{ .tag = @enumFromInt(277), .properties = .{ .param_str = "!", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } },
5726 // __builtin_arm_qadd
5727 .{ .tag = @enumFromInt(278), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5728 // __builtin_arm_qadd16
5729 .{ .tag = @enumFromInt(279), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5730 // __builtin_arm_qadd8
5731 .{ .tag = @enumFromInt(280), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5732 // __builtin_arm_qasx
5733 .{ .tag = @enumFromInt(281), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5734 // __builtin_arm_qdbl
5735 .{ .tag = @enumFromInt(282), .properties = .{ .param_str = "ii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5736 // __builtin_arm_qsax
5737 .{ .tag = @enumFromInt(283), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5738 // __builtin_arm_qsub
5739 .{ .tag = @enumFromInt(284), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5740 // __builtin_arm_qsub16
5741 .{ .tag = @enumFromInt(285), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5742 // __builtin_arm_qsub8
5743 .{ .tag = @enumFromInt(286), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5744 // __builtin_arm_rbit
5745 .{ .tag = @enumFromInt(287), .properties = .{ .param_str = "UiUi", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } },
5746 // __builtin_arm_rbit64
5747 .{ .tag = @enumFromInt(288), .properties = .{ .param_str = "WUiWUi", .target_set = TargetSet.initOne(.aarch64), .attributes = .{ .@"const" = true } } },
5748 // __builtin_arm_rsr
5749 .{ .tag = @enumFromInt(289), .properties = .{ .param_str = "UicC*", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } },
5750 // __builtin_arm_rsr64
5751 .{ .tag = @enumFromInt(290), .properties = .{ .param_str = "!", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } },
5752 // __builtin_arm_rsrp
5753 .{ .tag = @enumFromInt(291), .properties = .{ .param_str = "v*cC*", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } },
5754 // __builtin_arm_sadd16
5755 .{ .tag = @enumFromInt(292), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5756 // __builtin_arm_sadd8
5757 .{ .tag = @enumFromInt(293), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5758 // __builtin_arm_sasx
5759 .{ .tag = @enumFromInt(294), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5760 // __builtin_arm_sel
5761 .{ .tag = @enumFromInt(295), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5762 // __builtin_arm_set_fpscr
5763 .{ .tag = @enumFromInt(296), .properties = .{ .param_str = "vUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5764 // __builtin_arm_sev
5765 .{ .tag = @enumFromInt(297), .properties = .{ .param_str = "v", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) } },
5766 // __builtin_arm_sevl
5767 .{ .tag = @enumFromInt(298), .properties = .{ .param_str = "v", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) } },
5768 // __builtin_arm_shadd16
5769 .{ .tag = @enumFromInt(299), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5770 // __builtin_arm_shadd8
5771 .{ .tag = @enumFromInt(300), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5772 // __builtin_arm_shasx
5773 .{ .tag = @enumFromInt(301), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5774 // __builtin_arm_shsax
5775 .{ .tag = @enumFromInt(302), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5776 // __builtin_arm_shsub16
5777 .{ .tag = @enumFromInt(303), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5778 // __builtin_arm_shsub8
5779 .{ .tag = @enumFromInt(304), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5780 // __builtin_arm_smlabb
5781 .{ .tag = @enumFromInt(305), .properties = .{ .param_str = "iiii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5782 // __builtin_arm_smlabt
5783 .{ .tag = @enumFromInt(306), .properties = .{ .param_str = "iiii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5784 // __builtin_arm_smlad
5785 .{ .tag = @enumFromInt(307), .properties = .{ .param_str = "iiii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5786 // __builtin_arm_smladx
5787 .{ .tag = @enumFromInt(308), .properties = .{ .param_str = "iiii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5788 // __builtin_arm_smlald
5789 .{ .tag = @enumFromInt(309), .properties = .{ .param_str = "LLiiiLLi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5790 // __builtin_arm_smlaldx
5791 .{ .tag = @enumFromInt(310), .properties = .{ .param_str = "LLiiiLLi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5792 // __builtin_arm_smlatb
5793 .{ .tag = @enumFromInt(311), .properties = .{ .param_str = "iiii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5794 // __builtin_arm_smlatt
5795 .{ .tag = @enumFromInt(312), .properties = .{ .param_str = "iiii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5796 // __builtin_arm_smlawb
5797 .{ .tag = @enumFromInt(313), .properties = .{ .param_str = "iiii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5798 // __builtin_arm_smlawt
5799 .{ .tag = @enumFromInt(314), .properties = .{ .param_str = "iiii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5800 // __builtin_arm_smlsd
5801 .{ .tag = @enumFromInt(315), .properties = .{ .param_str = "iiii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5802 // __builtin_arm_smlsdx
5803 .{ .tag = @enumFromInt(316), .properties = .{ .param_str = "iiii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5804 // __builtin_arm_smlsld
5805 .{ .tag = @enumFromInt(317), .properties = .{ .param_str = "LLiiiLLi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5806 // __builtin_arm_smlsldx
5807 .{ .tag = @enumFromInt(318), .properties = .{ .param_str = "LLiiiLLi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5808 // __builtin_arm_smuad
5809 .{ .tag = @enumFromInt(319), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5810 // __builtin_arm_smuadx
5811 .{ .tag = @enumFromInt(320), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5812 // __builtin_arm_smulbb
5813 .{ .tag = @enumFromInt(321), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5814 // __builtin_arm_smulbt
5815 .{ .tag = @enumFromInt(322), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5816 // __builtin_arm_smultb
5817 .{ .tag = @enumFromInt(323), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5818 // __builtin_arm_smultt
5819 .{ .tag = @enumFromInt(324), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5820 // __builtin_arm_smulwb
5821 .{ .tag = @enumFromInt(325), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5822 // __builtin_arm_smulwt
5823 .{ .tag = @enumFromInt(326), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5824 // __builtin_arm_smusd
5825 .{ .tag = @enumFromInt(327), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5826 // __builtin_arm_smusdx
5827 .{ .tag = @enumFromInt(328), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5828 // __builtin_arm_ssat
5829 .{ .tag = @enumFromInt(329), .properties = .{ .param_str = "iiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5830 // __builtin_arm_ssat16
5831 .{ .tag = @enumFromInt(330), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5832 // __builtin_arm_ssax
5833 .{ .tag = @enumFromInt(331), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5834 // __builtin_arm_ssub16
5835 .{ .tag = @enumFromInt(332), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5836 // __builtin_arm_ssub8
5837 .{ .tag = @enumFromInt(333), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5838 // __builtin_arm_stc
5839 .{ .tag = @enumFromInt(334), .properties = .{ .param_str = "vUIiUIiv*", .target_set = TargetSet.initOne(.arm) } },
5840 // __builtin_arm_stc2
5841 .{ .tag = @enumFromInt(335), .properties = .{ .param_str = "vUIiUIiv*", .target_set = TargetSet.initOne(.arm) } },
5842 // __builtin_arm_stc2l
5843 .{ .tag = @enumFromInt(336), .properties = .{ .param_str = "vUIiUIiv*", .target_set = TargetSet.initOne(.arm) } },
5844 // __builtin_arm_stcl
5845 .{ .tag = @enumFromInt(337), .properties = .{ .param_str = "vUIiUIiv*", .target_set = TargetSet.initOne(.arm) } },
5846 // __builtin_arm_stlex
5847 .{ .tag = @enumFromInt(338), .properties = .{ .param_str = "i.", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .custom_typecheck = true } } },
5848 // __builtin_arm_strex
5849 .{ .tag = @enumFromInt(339), .properties = .{ .param_str = "i.", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .custom_typecheck = true } } },
5850 // __builtin_arm_strexd
5851 .{ .tag = @enumFromInt(340), .properties = .{ .param_str = "iLLUiv*", .target_set = TargetSet.initOne(.arm) } },
5852 // __builtin_arm_sxtab16
5853 .{ .tag = @enumFromInt(341), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5854 // __builtin_arm_sxtb16
5855 .{ .tag = @enumFromInt(342), .properties = .{ .param_str = "ii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5856 // __builtin_arm_tcancel
5857 .{ .tag = @enumFromInt(343), .properties = .{ .param_str = "vWUIi", .target_set = TargetSet.initOne(.aarch64) } },
5858 // __builtin_arm_tcommit
5859 .{ .tag = @enumFromInt(344), .properties = .{ .param_str = "v", .target_set = TargetSet.initOne(.aarch64) } },
5860 // __builtin_arm_tstart
5861 .{ .tag = @enumFromInt(345), .properties = .{ .param_str = "WUi", .target_set = TargetSet.initOne(.aarch64), .attributes = .{ .returns_twice = true } } },
5862 // __builtin_arm_ttest
5863 .{ .tag = @enumFromInt(346), .properties = .{ .param_str = "WUi", .target_set = TargetSet.initOne(.aarch64), .attributes = .{ .@"const" = true } } },
5864 // __builtin_arm_uadd16
5865 .{ .tag = @enumFromInt(347), .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5866 // __builtin_arm_uadd8
5867 .{ .tag = @enumFromInt(348), .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5868 // __builtin_arm_uasx
5869 .{ .tag = @enumFromInt(349), .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5870 // __builtin_arm_uhadd16
5871 .{ .tag = @enumFromInt(350), .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5872 // __builtin_arm_uhadd8
5873 .{ .tag = @enumFromInt(351), .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5874 // __builtin_arm_uhasx
5875 .{ .tag = @enumFromInt(352), .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5876 // __builtin_arm_uhsax
5877 .{ .tag = @enumFromInt(353), .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5878 // __builtin_arm_uhsub16
5879 .{ .tag = @enumFromInt(354), .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5880 // __builtin_arm_uhsub8
5881 .{ .tag = @enumFromInt(355), .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5882 // __builtin_arm_uqadd16
5883 .{ .tag = @enumFromInt(356), .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5884 // __builtin_arm_uqadd8
5885 .{ .tag = @enumFromInt(357), .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5886 // __builtin_arm_uqasx
5887 .{ .tag = @enumFromInt(358), .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5888 // __builtin_arm_uqsax
5889 .{ .tag = @enumFromInt(359), .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5890 // __builtin_arm_uqsub16
5891 .{ .tag = @enumFromInt(360), .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5892 // __builtin_arm_uqsub8
5893 .{ .tag = @enumFromInt(361), .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5894 // __builtin_arm_usad8
5895 .{ .tag = @enumFromInt(362), .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5896 // __builtin_arm_usada8
5897 .{ .tag = @enumFromInt(363), .properties = .{ .param_str = "UiUiUiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5898 // __builtin_arm_usat
5899 .{ .tag = @enumFromInt(364), .properties = .{ .param_str = "UiiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5900 // __builtin_arm_usat16
5901 .{ .tag = @enumFromInt(365), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5902 // __builtin_arm_usax
5903 .{ .tag = @enumFromInt(366), .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5904 // __builtin_arm_usub16
5905 .{ .tag = @enumFromInt(367), .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5906 // __builtin_arm_usub8
5907 .{ .tag = @enumFromInt(368), .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5908 // __builtin_arm_uxtab16
5909 .{ .tag = @enumFromInt(369), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5910 // __builtin_arm_uxtb16
5911 .{ .tag = @enumFromInt(370), .properties = .{ .param_str = "ii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5912 // __builtin_arm_vcvtr_d
5913 .{ .tag = @enumFromInt(371), .properties = .{ .param_str = "fdi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5914 // __builtin_arm_vcvtr_f
5915 .{ .tag = @enumFromInt(372), .properties = .{ .param_str = "ffi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
5916 // __builtin_arm_wfe
5917 .{ .tag = @enumFromInt(373), .properties = .{ .param_str = "v", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) } },
5918 // __builtin_arm_wfi
5919 .{ .tag = @enumFromInt(374), .properties = .{ .param_str = "v", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) } },
5920 // __builtin_arm_wsr
5921 .{ .tag = @enumFromInt(375), .properties = .{ .param_str = "vcC*Ui", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } },
5922 // __builtin_arm_wsr64
5923 .{ .tag = @enumFromInt(376), .properties = .{ .param_str = "!", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } },
5924 // __builtin_arm_wsrp
5925 .{ .tag = @enumFromInt(377), .properties = .{ .param_str = "vcC*vC*", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } },
5926 // __builtin_arm_yield
5927 .{ .tag = @enumFromInt(378), .properties = .{ .param_str = "v", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) } },
5928 // __builtin_asin
5929 .{ .tag = @enumFromInt(379), .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
5930 // __builtin_asinf
5931 .{ .tag = @enumFromInt(380), .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
5932 // __builtin_asinf128
5933 .{ .tag = @enumFromInt(381), .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
5934 // __builtin_asinh
5935 .{ .tag = @enumFromInt(382), .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
5936 // __builtin_asinhf
5937 .{ .tag = @enumFromInt(383), .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
5938 // __builtin_asinhf128
5939 .{ .tag = @enumFromInt(384), .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
5940 // __builtin_asinhl
5941 .{ .tag = @enumFromInt(385), .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
5942 // __builtin_asinl
5943 .{ .tag = @enumFromInt(386), .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
5944 // __builtin_assume
5945 .{ .tag = @enumFromInt(387), .properties = .{ .param_str = "vb", .attributes = .{ .const_evaluable = true } } },
5946 // __builtin_assume_aligned
5947 .{ .tag = @enumFromInt(388), .properties = .{ .param_str = "v*vC*z.", .attributes = .{ .@"const" = true, .custom_typecheck = true, .const_evaluable = true } } },
5948 // __builtin_assume_separate_storage
5949 .{ .tag = @enumFromInt(389), .properties = .{ .param_str = "vvCD*vCD*", .attributes = .{ .const_evaluable = true } } },
5950 // __builtin_atan
5951 .{ .tag = @enumFromInt(390), .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
5952 // __builtin_atan2
5953 .{ .tag = @enumFromInt(391), .properties = .{ .param_str = "ddd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
5954 // __builtin_atan2f
5955 .{ .tag = @enumFromInt(392), .properties = .{ .param_str = "fff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
5956 // __builtin_atan2f128
5957 .{ .tag = @enumFromInt(393), .properties = .{ .param_str = "LLdLLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
5958 // __builtin_atan2l
5959 .{ .tag = @enumFromInt(394), .properties = .{ .param_str = "LdLdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
5960 // __builtin_atanf
5961 .{ .tag = @enumFromInt(395), .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
5962 // __builtin_atanf128
5963 .{ .tag = @enumFromInt(396), .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
5964 // __builtin_atanh
5965 .{ .tag = @enumFromInt(397), .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
5966 // __builtin_atanhf
5967 .{ .tag = @enumFromInt(398), .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
5968 // __builtin_atanhf128
5969 .{ .tag = @enumFromInt(399), .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
5970 // __builtin_atanhl
5971 .{ .tag = @enumFromInt(400), .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
5972 // __builtin_atanl
5973 .{ .tag = @enumFromInt(401), .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
5974 // __builtin_bcmp
5975 .{ .tag = @enumFromInt(402), .properties = .{ .param_str = "ivC*vC*z", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
5976 // __builtin_bcopy
5977 .{ .tag = @enumFromInt(403), .properties = .{ .param_str = "vvC*v*z", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
5978 // __builtin_bitrev
5979 .{ .tag = @enumFromInt(404), .properties = .{ .param_str = "UiUi", .target_set = TargetSet.initOne(.xcore), .attributes = .{ .@"const" = true } } },
5980 // __builtin_bitreverse16
5981 .{ .tag = @enumFromInt(405), .properties = .{ .param_str = "UsUs", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
5982 // __builtin_bitreverse32
5983 .{ .tag = @enumFromInt(406), .properties = .{ .param_str = "UZiUZi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
5984 // __builtin_bitreverse64
5985 .{ .tag = @enumFromInt(407), .properties = .{ .param_str = "UWiUWi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
5986 // __builtin_bitreverse8
5987 .{ .tag = @enumFromInt(408), .properties = .{ .param_str = "UcUc", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
5988 // __builtin_bswap16
5989 .{ .tag = @enumFromInt(409), .properties = .{ .param_str = "UsUs", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
5990 // __builtin_bswap32
5991 .{ .tag = @enumFromInt(410), .properties = .{ .param_str = "UZiUZi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
5992 // __builtin_bswap64
5993 .{ .tag = @enumFromInt(411), .properties = .{ .param_str = "UWiUWi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
5994 // __builtin_bzero
5995 .{ .tag = @enumFromInt(412), .properties = .{ .param_str = "vv*z", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
5996 // __builtin_cabs
5997 .{ .tag = @enumFromInt(413), .properties = .{ .param_str = "dXd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
5998 // __builtin_cabsf
5999 .{ .tag = @enumFromInt(414), .properties = .{ .param_str = "fXf", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6000 // __builtin_cabsl
6001 .{ .tag = @enumFromInt(415), .properties = .{ .param_str = "LdXLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6002 // __builtin_cacos
6003 .{ .tag = @enumFromInt(416), .properties = .{ .param_str = "XdXd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6004 // __builtin_cacosf
6005 .{ .tag = @enumFromInt(417), .properties = .{ .param_str = "XfXf", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6006 // __builtin_cacosh
6007 .{ .tag = @enumFromInt(418), .properties = .{ .param_str = "XdXd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6008 // __builtin_cacoshf
6009 .{ .tag = @enumFromInt(419), .properties = .{ .param_str = "XfXf", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6010 // __builtin_cacoshl
6011 .{ .tag = @enumFromInt(420), .properties = .{ .param_str = "XLdXLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6012 // __builtin_cacosl
6013 .{ .tag = @enumFromInt(421), .properties = .{ .param_str = "XLdXLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6014 // __builtin_call_with_static_chain
6015 .{ .tag = @enumFromInt(422), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
6016 // __builtin_calloc
6017 .{ .tag = @enumFromInt(423), .properties = .{ .param_str = "v*zz", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
6018 // __builtin_canonicalize
6019 .{ .tag = @enumFromInt(424), .properties = .{ .param_str = "dd", .attributes = .{ .@"const" = true } } },
6020 // __builtin_canonicalizef
6021 .{ .tag = @enumFromInt(425), .properties = .{ .param_str = "ff", .attributes = .{ .@"const" = true } } },
6022 // __builtin_canonicalizef16
6023 .{ .tag = @enumFromInt(426), .properties = .{ .param_str = "hh", .attributes = .{ .@"const" = true } } },
6024 // __builtin_canonicalizel
6025 .{ .tag = @enumFromInt(427), .properties = .{ .param_str = "LdLd", .attributes = .{ .@"const" = true } } },
6026 // __builtin_carg
6027 .{ .tag = @enumFromInt(428), .properties = .{ .param_str = "dXd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6028 // __builtin_cargf
6029 .{ .tag = @enumFromInt(429), .properties = .{ .param_str = "fXf", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6030 // __builtin_cargl
6031 .{ .tag = @enumFromInt(430), .properties = .{ .param_str = "LdXLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6032 // __builtin_casin
6033 .{ .tag = @enumFromInt(431), .properties = .{ .param_str = "XdXd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6034 // __builtin_casinf
6035 .{ .tag = @enumFromInt(432), .properties = .{ .param_str = "XfXf", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6036 // __builtin_casinh
6037 .{ .tag = @enumFromInt(433), .properties = .{ .param_str = "XdXd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6038 // __builtin_casinhf
6039 .{ .tag = @enumFromInt(434), .properties = .{ .param_str = "XfXf", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6040 // __builtin_casinhl
6041 .{ .tag = @enumFromInt(435), .properties = .{ .param_str = "XLdXLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6042 // __builtin_casinl
6043 .{ .tag = @enumFromInt(436), .properties = .{ .param_str = "XLdXLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6044 // __builtin_catan
6045 .{ .tag = @enumFromInt(437), .properties = .{ .param_str = "XdXd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6046 // __builtin_catanf
6047 .{ .tag = @enumFromInt(438), .properties = .{ .param_str = "XfXf", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6048 // __builtin_catanh
6049 .{ .tag = @enumFromInt(439), .properties = .{ .param_str = "XdXd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6050 // __builtin_catanhf
6051 .{ .tag = @enumFromInt(440), .properties = .{ .param_str = "XfXf", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6052 // __builtin_catanhl
6053 .{ .tag = @enumFromInt(441), .properties = .{ .param_str = "XLdXLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6054 // __builtin_catanl
6055 .{ .tag = @enumFromInt(442), .properties = .{ .param_str = "XLdXLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6056 // __builtin_cbrt
6057 .{ .tag = @enumFromInt(443), .properties = .{ .param_str = "dd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
6058 // __builtin_cbrtf
6059 .{ .tag = @enumFromInt(444), .properties = .{ .param_str = "ff", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
6060 // __builtin_cbrtf128
6061 .{ .tag = @enumFromInt(445), .properties = .{ .param_str = "LLdLLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
6062 // __builtin_cbrtl
6063 .{ .tag = @enumFromInt(446), .properties = .{ .param_str = "LdLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
6064 // __builtin_ccos
6065 .{ .tag = @enumFromInt(447), .properties = .{ .param_str = "XdXd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6066 // __builtin_ccosf
6067 .{ .tag = @enumFromInt(448), .properties = .{ .param_str = "XfXf", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6068 // __builtin_ccosh
6069 .{ .tag = @enumFromInt(449), .properties = .{ .param_str = "XdXd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6070 // __builtin_ccoshf
6071 .{ .tag = @enumFromInt(450), .properties = .{ .param_str = "XfXf", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6072 // __builtin_ccoshl
6073 .{ .tag = @enumFromInt(451), .properties = .{ .param_str = "XLdXLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6074 // __builtin_ccosl
6075 .{ .tag = @enumFromInt(452), .properties = .{ .param_str = "XLdXLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6076 // __builtin_ceil
6077 .{ .tag = @enumFromInt(453), .properties = .{ .param_str = "dd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
6078 // __builtin_ceilf
6079 .{ .tag = @enumFromInt(454), .properties = .{ .param_str = "ff", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
6080 // __builtin_ceilf128
6081 .{ .tag = @enumFromInt(455), .properties = .{ .param_str = "LLdLLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
6082 // __builtin_ceilf16
6083 .{ .tag = @enumFromInt(456), .properties = .{ .param_str = "hh", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
6084 // __builtin_ceill
6085 .{ .tag = @enumFromInt(457), .properties = .{ .param_str = "LdLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
6086 // __builtin_cexp
6087 .{ .tag = @enumFromInt(458), .properties = .{ .param_str = "XdXd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6088 // __builtin_cexpf
6089 .{ .tag = @enumFromInt(459), .properties = .{ .param_str = "XfXf", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6090 // __builtin_cexpl
6091 .{ .tag = @enumFromInt(460), .properties = .{ .param_str = "XLdXLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6092 // __builtin_char_memchr
6093 .{ .tag = @enumFromInt(461), .properties = .{ .param_str = "c*cC*iz", .attributes = .{ .const_evaluable = true } } },
6094 // __builtin_cimag
6095 .{ .tag = @enumFromInt(462), .properties = .{ .param_str = "dXd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
6096 // __builtin_cimagf
6097 .{ .tag = @enumFromInt(463), .properties = .{ .param_str = "fXf", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
6098 // __builtin_cimagl
6099 .{ .tag = @enumFromInt(464), .properties = .{ .param_str = "LdXLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
6100 // __builtin_classify_type
6101 .{ .tag = @enumFromInt(465), .properties = .{ .param_str = "i.", .attributes = .{ .@"const" = true, .custom_typecheck = true, .eval_args = false, .const_evaluable = true } } },
6102 // __builtin_clog
6103 .{ .tag = @enumFromInt(466), .properties = .{ .param_str = "XdXd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6104 // __builtin_clogf
6105 .{ .tag = @enumFromInt(467), .properties = .{ .param_str = "XfXf", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6106 // __builtin_clogl
6107 .{ .tag = @enumFromInt(468), .properties = .{ .param_str = "XLdXLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6108 // __builtin_clrsb
6109 .{ .tag = @enumFromInt(469), .properties = .{ .param_str = "ii", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
6110 // __builtin_clrsbl
6111 .{ .tag = @enumFromInt(470), .properties = .{ .param_str = "iLi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
6112 // __builtin_clrsbll
6113 .{ .tag = @enumFromInt(471), .properties = .{ .param_str = "iLLi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
6114 // __builtin_clz
6115 .{ .tag = @enumFromInt(472), .properties = .{ .param_str = "iUi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
6116 // __builtin_clzl
6117 .{ .tag = @enumFromInt(473), .properties = .{ .param_str = "iULi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
6118 // __builtin_clzll
6119 .{ .tag = @enumFromInt(474), .properties = .{ .param_str = "iULLi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
6120 // __builtin_clzs
6121 .{ .tag = @enumFromInt(475), .properties = .{ .param_str = "iUs", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
6122 // __builtin_complex
6123 .{ .tag = @enumFromInt(476), .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true, .const_evaluable = true } } },
6124 // __builtin_conj
6125 .{ .tag = @enumFromInt(477), .properties = .{ .param_str = "XdXd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
6126 // __builtin_conjf
6127 .{ .tag = @enumFromInt(478), .properties = .{ .param_str = "XfXf", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
6128 // __builtin_conjl
6129 .{ .tag = @enumFromInt(479), .properties = .{ .param_str = "XLdXLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
6130 // __builtin_constant_p
6131 .{ .tag = @enumFromInt(480), .properties = .{ .param_str = "i.", .attributes = .{ .@"const" = true, .custom_typecheck = true, .eval_args = false, .const_evaluable = true } } },
6132 // __builtin_convertvector
6133 .{ .tag = @enumFromInt(481), .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
6134 // __builtin_copysign
6135 .{ .tag = @enumFromInt(482), .properties = .{ .param_str = "ddd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
6136 // __builtin_copysignf
6137 .{ .tag = @enumFromInt(483), .properties = .{ .param_str = "fff", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
6138 // __builtin_copysignf128
6139 .{ .tag = @enumFromInt(484), .properties = .{ .param_str = "LLdLLdLLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
6140 // __builtin_copysignf16
6141 .{ .tag = @enumFromInt(485), .properties = .{ .param_str = "hhh", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
6142 // __builtin_copysignl
6143 .{ .tag = @enumFromInt(486), .properties = .{ .param_str = "LdLdLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
6144 // __builtin_cos
6145 .{ .tag = @enumFromInt(487), .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6146 // __builtin_cosf
6147 .{ .tag = @enumFromInt(488), .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6148 // __builtin_cosf128
6149 .{ .tag = @enumFromInt(489), .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6150 // __builtin_cosf16
6151 .{ .tag = @enumFromInt(490), .properties = .{ .param_str = "hh", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6152 // __builtin_cosh
6153 .{ .tag = @enumFromInt(491), .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6154 // __builtin_coshf
6155 .{ .tag = @enumFromInt(492), .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6156 // __builtin_coshf128
6157 .{ .tag = @enumFromInt(493), .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6158 // __builtin_coshl
6159 .{ .tag = @enumFromInt(494), .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6160 // __builtin_cosl
6161 .{ .tag = @enumFromInt(495), .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6162 // __builtin_cpow
6163 .{ .tag = @enumFromInt(496), .properties = .{ .param_str = "XdXdXd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6164 // __builtin_cpowf
6165 .{ .tag = @enumFromInt(497), .properties = .{ .param_str = "XfXfXf", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6166 // __builtin_cpowl
6167 .{ .tag = @enumFromInt(498), .properties = .{ .param_str = "XLdXLdXLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6168 // __builtin_cproj
6169 .{ .tag = @enumFromInt(499), .properties = .{ .param_str = "XdXd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
6170 // __builtin_cprojf
6171 .{ .tag = @enumFromInt(500), .properties = .{ .param_str = "XfXf", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
6172 // __builtin_cprojl
6173 .{ .tag = @enumFromInt(501), .properties = .{ .param_str = "XLdXLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
6174 // __builtin_cpu_init
6175 .{ .tag = @enumFromInt(502), .properties = .{ .param_str = "v", .target_set = TargetSet.initOne(.x86) } },
6176 // __builtin_cpu_is
6177 .{ .tag = @enumFromInt(503), .properties = .{ .param_str = "bcC*", .target_set = TargetSet.initOne(.x86), .attributes = .{ .@"const" = true } } },
6178 // __builtin_cpu_supports
6179 .{ .tag = @enumFromInt(504), .properties = .{ .param_str = "bcC*", .target_set = TargetSet.initOne(.x86), .attributes = .{ .@"const" = true } } },
6180 // __builtin_creal
6181 .{ .tag = @enumFromInt(505), .properties = .{ .param_str = "dXd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
6182 // __builtin_crealf
6183 .{ .tag = @enumFromInt(506), .properties = .{ .param_str = "fXf", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
6184 // __builtin_creall
6185 .{ .tag = @enumFromInt(507), .properties = .{ .param_str = "LdXLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
6186 // __builtin_csin
6187 .{ .tag = @enumFromInt(508), .properties = .{ .param_str = "XdXd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6188 // __builtin_csinf
6189 .{ .tag = @enumFromInt(509), .properties = .{ .param_str = "XfXf", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6190 // __builtin_csinh
6191 .{ .tag = @enumFromInt(510), .properties = .{ .param_str = "XdXd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6192 // __builtin_csinhf
6193 .{ .tag = @enumFromInt(511), .properties = .{ .param_str = "XfXf", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6194 // __builtin_csinhl
6195 .{ .tag = @enumFromInt(512), .properties = .{ .param_str = "XLdXLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6196 // __builtin_csinl
6197 .{ .tag = @enumFromInt(513), .properties = .{ .param_str = "XLdXLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6198 // __builtin_csqrt
6199 .{ .tag = @enumFromInt(514), .properties = .{ .param_str = "XdXd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6200 // __builtin_csqrtf
6201 .{ .tag = @enumFromInt(515), .properties = .{ .param_str = "XfXf", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6202 // __builtin_csqrtl
6203 .{ .tag = @enumFromInt(516), .properties = .{ .param_str = "XLdXLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6204 // __builtin_ctan
6205 .{ .tag = @enumFromInt(517), .properties = .{ .param_str = "XdXd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6206 // __builtin_ctanf
6207 .{ .tag = @enumFromInt(518), .properties = .{ .param_str = "XfXf", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6208 // __builtin_ctanh
6209 .{ .tag = @enumFromInt(519), .properties = .{ .param_str = "XdXd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6210 // __builtin_ctanhf
6211 .{ .tag = @enumFromInt(520), .properties = .{ .param_str = "XfXf", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6212 // __builtin_ctanhl
6213 .{ .tag = @enumFromInt(521), .properties = .{ .param_str = "XLdXLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6214 // __builtin_ctanl
6215 .{ .tag = @enumFromInt(522), .properties = .{ .param_str = "XLdXLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6216 // __builtin_ctz
6217 .{ .tag = @enumFromInt(523), .properties = .{ .param_str = "iUi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
6218 // __builtin_ctzl
6219 .{ .tag = @enumFromInt(524), .properties = .{ .param_str = "iULi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
6220 // __builtin_ctzll
6221 .{ .tag = @enumFromInt(525), .properties = .{ .param_str = "iULLi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
6222 // __builtin_ctzs
6223 .{ .tag = @enumFromInt(526), .properties = .{ .param_str = "iUs", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
6224 // __builtin_dcbf
6225 .{ .tag = @enumFromInt(527), .properties = .{ .param_str = "vvC*", .target_set = TargetSet.initOne(.ppc) } },
6226 // __builtin_debugtrap
6227 .{ .tag = @enumFromInt(528), .properties = .{ .param_str = "v" } },
6228 // __builtin_dump_struct
6229 .{ .tag = @enumFromInt(529), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
6230 // __builtin_dwarf_cfa
6231 .{ .tag = @enumFromInt(530), .properties = .{ .param_str = "v*" } },
6232 // __builtin_dwarf_sp_column
6233 .{ .tag = @enumFromInt(531), .properties = .{ .param_str = "Ui" } },
6234 // __builtin_dynamic_object_size
6235 .{ .tag = @enumFromInt(532), .properties = .{ .param_str = "zvC*i", .attributes = .{ .eval_args = false, .const_evaluable = true } } },
6236 // __builtin_eh_return
6237 .{ .tag = @enumFromInt(533), .properties = .{ .param_str = "vzv*", .attributes = .{ .noreturn = true } } },
6238 // __builtin_eh_return_data_regno
6239 .{ .tag = @enumFromInt(534), .properties = .{ .param_str = "iIi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
6240 // __builtin_elementwise_abs
6241 .{ .tag = @enumFromInt(535), .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
6242 // __builtin_elementwise_add_sat
6243 .{ .tag = @enumFromInt(536), .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
6244 // __builtin_elementwise_bitreverse
6245 .{ .tag = @enumFromInt(537), .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
6246 // __builtin_elementwise_canonicalize
6247 .{ .tag = @enumFromInt(538), .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
6248 // __builtin_elementwise_ceil
6249 .{ .tag = @enumFromInt(539), .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
6250 // __builtin_elementwise_copysign
6251 .{ .tag = @enumFromInt(540), .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
6252 // __builtin_elementwise_cos
6253 .{ .tag = @enumFromInt(541), .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
6254 // __builtin_elementwise_exp
6255 .{ .tag = @enumFromInt(542), .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
6256 // __builtin_elementwise_exp2
6257 .{ .tag = @enumFromInt(543), .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
6258 // __builtin_elementwise_floor
6259 .{ .tag = @enumFromInt(544), .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
6260 // __builtin_elementwise_fma
6261 .{ .tag = @enumFromInt(545), .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
6262 // __builtin_elementwise_log
6263 .{ .tag = @enumFromInt(546), .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
6264 // __builtin_elementwise_log10
6265 .{ .tag = @enumFromInt(547), .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
6266 // __builtin_elementwise_log2
6267 .{ .tag = @enumFromInt(548), .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
6268 // __builtin_elementwise_max
6269 .{ .tag = @enumFromInt(549), .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
6270 // __builtin_elementwise_min
6271 .{ .tag = @enumFromInt(550), .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
6272 // __builtin_elementwise_nearbyint
6273 .{ .tag = @enumFromInt(551), .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
6274 // __builtin_elementwise_pow
6275 .{ .tag = @enumFromInt(552), .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
6276 // __builtin_elementwise_rint
6277 .{ .tag = @enumFromInt(553), .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
6278 // __builtin_elementwise_round
6279 .{ .tag = @enumFromInt(554), .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
6280 // __builtin_elementwise_roundeven
6281 .{ .tag = @enumFromInt(555), .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
6282 // __builtin_elementwise_sin
6283 .{ .tag = @enumFromInt(556), .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
6284 // __builtin_elementwise_sqrt
6285 .{ .tag = @enumFromInt(557), .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
6286 // __builtin_elementwise_sub_sat
6287 .{ .tag = @enumFromInt(558), .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
6288 // __builtin_elementwise_trunc
6289 .{ .tag = @enumFromInt(559), .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
6290 // __builtin_erf
6291 .{ .tag = @enumFromInt(560), .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6292 // __builtin_erfc
6293 .{ .tag = @enumFromInt(561), .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6294 // __builtin_erfcf
6295 .{ .tag = @enumFromInt(562), .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6296 // __builtin_erfcf128
6297 .{ .tag = @enumFromInt(563), .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6298 // __builtin_erfcl
6299 .{ .tag = @enumFromInt(564), .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6300 // __builtin_erff
6301 .{ .tag = @enumFromInt(565), .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6302 // __builtin_erff128
6303 .{ .tag = @enumFromInt(566), .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6304 // __builtin_erfl
6305 .{ .tag = @enumFromInt(567), .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6306 // __builtin_exp
6307 .{ .tag = @enumFromInt(568), .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6308 // __builtin_exp10
6309 .{ .tag = @enumFromInt(569), .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6310 // __builtin_exp10f
6311 .{ .tag = @enumFromInt(570), .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6312 // __builtin_exp10f128
6313 .{ .tag = @enumFromInt(571), .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6314 // __builtin_exp10f16
6315 .{ .tag = @enumFromInt(572), .properties = .{ .param_str = "hh", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6316 // __builtin_exp10l
6317 .{ .tag = @enumFromInt(573), .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6318 // __builtin_exp2
6319 .{ .tag = @enumFromInt(574), .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6320 // __builtin_exp2f
6321 .{ .tag = @enumFromInt(575), .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6322 // __builtin_exp2f128
6323 .{ .tag = @enumFromInt(576), .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6324 // __builtin_exp2f16
6325 .{ .tag = @enumFromInt(577), .properties = .{ .param_str = "hh", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6326 // __builtin_exp2l
6327 .{ .tag = @enumFromInt(578), .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6328 // __builtin_expect
6329 .{ .tag = @enumFromInt(579), .properties = .{ .param_str = "LiLiLi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
6330 // __builtin_expect_with_probability
6331 .{ .tag = @enumFromInt(580), .properties = .{ .param_str = "LiLiLid", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
6332 // __builtin_expf
6333 .{ .tag = @enumFromInt(581), .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6334 // __builtin_expf128
6335 .{ .tag = @enumFromInt(582), .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6336 // __builtin_expf16
6337 .{ .tag = @enumFromInt(583), .properties = .{ .param_str = "hh", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6338 // __builtin_expl
6339 .{ .tag = @enumFromInt(584), .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6340 // __builtin_expm1
6341 .{ .tag = @enumFromInt(585), .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6342 // __builtin_expm1f
6343 .{ .tag = @enumFromInt(586), .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6344 // __builtin_expm1f128
6345 .{ .tag = @enumFromInt(587), .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6346 // __builtin_expm1l
6347 .{ .tag = @enumFromInt(588), .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6348 // __builtin_extend_pointer
6349 .{ .tag = @enumFromInt(589), .properties = .{ .param_str = "ULLiv*" } },
6350 // __builtin_extract_return_addr
6351 .{ .tag = @enumFromInt(590), .properties = .{ .param_str = "v*v*" } },
6352 // __builtin_fabs
6353 .{ .tag = @enumFromInt(591), .properties = .{ .param_str = "dd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
6354 // __builtin_fabsf
6355 .{ .tag = @enumFromInt(592), .properties = .{ .param_str = "ff", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
6356 // __builtin_fabsf128
6357 .{ .tag = @enumFromInt(593), .properties = .{ .param_str = "LLdLLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
6358 // __builtin_fabsf16
6359 .{ .tag = @enumFromInt(594), .properties = .{ .param_str = "hh", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
6360 // __builtin_fabsl
6361 .{ .tag = @enumFromInt(595), .properties = .{ .param_str = "LdLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
6362 // __builtin_fdim
6363 .{ .tag = @enumFromInt(596), .properties = .{ .param_str = "ddd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6364 // __builtin_fdimf
6365 .{ .tag = @enumFromInt(597), .properties = .{ .param_str = "fff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6366 // __builtin_fdimf128
6367 .{ .tag = @enumFromInt(598), .properties = .{ .param_str = "LLdLLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6368 // __builtin_fdiml
6369 .{ .tag = @enumFromInt(599), .properties = .{ .param_str = "LdLdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6370 // __builtin_ffs
6371 .{ .tag = @enumFromInt(600), .properties = .{ .param_str = "ii", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
6372 // __builtin_ffsl
6373 .{ .tag = @enumFromInt(601), .properties = .{ .param_str = "iLi", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
6374 // __builtin_ffsll
6375 .{ .tag = @enumFromInt(602), .properties = .{ .param_str = "iLLi", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
6376 // __builtin_floor
6377 .{ .tag = @enumFromInt(603), .properties = .{ .param_str = "dd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
6378 // __builtin_floorf
6379 .{ .tag = @enumFromInt(604), .properties = .{ .param_str = "ff", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
6380 // __builtin_floorf128
6381 .{ .tag = @enumFromInt(605), .properties = .{ .param_str = "LLdLLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
6382 // __builtin_floorf16
6383 .{ .tag = @enumFromInt(606), .properties = .{ .param_str = "hh", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
6384 // __builtin_floorl
6385 .{ .tag = @enumFromInt(607), .properties = .{ .param_str = "LdLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
6386 // __builtin_flt_rounds
6387 .{ .tag = @enumFromInt(608), .properties = .{ .param_str = "i" } },
6388 // __builtin_fma
6389 .{ .tag = @enumFromInt(609), .properties = .{ .param_str = "dddd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6390 // __builtin_fmaf
6391 .{ .tag = @enumFromInt(610), .properties = .{ .param_str = "ffff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6392 // __builtin_fmaf128
6393 .{ .tag = @enumFromInt(611), .properties = .{ .param_str = "LLdLLdLLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6394 // __builtin_fmaf16
6395 .{ .tag = @enumFromInt(612), .properties = .{ .param_str = "hhhh", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6396 // __builtin_fmal
6397 .{ .tag = @enumFromInt(613), .properties = .{ .param_str = "LdLdLdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6398 // __builtin_fmax
6399 .{ .tag = @enumFromInt(614), .properties = .{ .param_str = "ddd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
6400 // __builtin_fmaxf
6401 .{ .tag = @enumFromInt(615), .properties = .{ .param_str = "fff", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
6402 // __builtin_fmaxf128
6403 .{ .tag = @enumFromInt(616), .properties = .{ .param_str = "LLdLLdLLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
6404 // __builtin_fmaxf16
6405 .{ .tag = @enumFromInt(617), .properties = .{ .param_str = "hhh", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
6406 // __builtin_fmaxl
6407 .{ .tag = @enumFromInt(618), .properties = .{ .param_str = "LdLdLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
6408 // __builtin_fmin
6409 .{ .tag = @enumFromInt(619), .properties = .{ .param_str = "ddd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
6410 // __builtin_fminf
6411 .{ .tag = @enumFromInt(620), .properties = .{ .param_str = "fff", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
6412 // __builtin_fminf128
6413 .{ .tag = @enumFromInt(621), .properties = .{ .param_str = "LLdLLdLLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
6414 // __builtin_fminf16
6415 .{ .tag = @enumFromInt(622), .properties = .{ .param_str = "hhh", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
6416 // __builtin_fminl
6417 .{ .tag = @enumFromInt(623), .properties = .{ .param_str = "LdLdLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
6418 // __builtin_fmod
6419 .{ .tag = @enumFromInt(624), .properties = .{ .param_str = "ddd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6420 // __builtin_fmodf
6421 .{ .tag = @enumFromInt(625), .properties = .{ .param_str = "fff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6422 // __builtin_fmodf128
6423 .{ .tag = @enumFromInt(626), .properties = .{ .param_str = "LLdLLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6424 // __builtin_fmodf16
6425 .{ .tag = @enumFromInt(627), .properties = .{ .param_str = "hhh", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6426 // __builtin_fmodl
6427 .{ .tag = @enumFromInt(628), .properties = .{ .param_str = "LdLdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6428 // __builtin_fpclassify
6429 .{ .tag = @enumFromInt(629), .properties = .{ .param_str = "iiiiii.", .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
6430 // __builtin_fprintf
6431 .{ .tag = @enumFromInt(630), .properties = .{ .param_str = "iP*RcC*R.", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .printf, .format_string_position = 1 } } },
6432 // __builtin_frame_address
6433 .{ .tag = @enumFromInt(631), .properties = .{ .param_str = "v*IUi" } },
6434 // __builtin_free
6435 .{ .tag = @enumFromInt(632), .properties = .{ .param_str = "vv*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
6436 // __builtin_frexp
6437 .{ .tag = @enumFromInt(633), .properties = .{ .param_str = "ddi*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
6438 // __builtin_frexpf
6439 .{ .tag = @enumFromInt(634), .properties = .{ .param_str = "ffi*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
6440 // __builtin_frexpf128
6441 .{ .tag = @enumFromInt(635), .properties = .{ .param_str = "LLdLLdi*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
6442 // __builtin_frexpf16
6443 .{ .tag = @enumFromInt(636), .properties = .{ .param_str = "hhi*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
6444 // __builtin_frexpl
6445 .{ .tag = @enumFromInt(637), .properties = .{ .param_str = "LdLdi*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
6446 // __builtin_frob_return_addr
6447 .{ .tag = @enumFromInt(638), .properties = .{ .param_str = "v*v*" } },
6448 // __builtin_fscanf
6449 .{ .tag = @enumFromInt(639), .properties = .{ .param_str = "iP*RcC*R.", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .scanf, .format_string_position = 1 } } },
6450 // __builtin_getid
6451 .{ .tag = @enumFromInt(640), .properties = .{ .param_str = "Si", .target_set = TargetSet.initOne(.xcore), .attributes = .{ .@"const" = true } } },
6452 // __builtin_getps
6453 .{ .tag = @enumFromInt(641), .properties = .{ .param_str = "UiUi", .target_set = TargetSet.initOne(.xcore) } },
6454 // __builtin_huge_val
6455 .{ .tag = @enumFromInt(642), .properties = .{ .param_str = "d", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
6456 // __builtin_huge_valf
6457 .{ .tag = @enumFromInt(643), .properties = .{ .param_str = "f", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
6458 // __builtin_huge_valf128
6459 .{ .tag = @enumFromInt(644), .properties = .{ .param_str = "LLd", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
6460 // __builtin_huge_valf16
6461 .{ .tag = @enumFromInt(645), .properties = .{ .param_str = "x", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
6462 // __builtin_huge_vall
6463 .{ .tag = @enumFromInt(646), .properties = .{ .param_str = "Ld", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
6464 // __builtin_hypot
6465 .{ .tag = @enumFromInt(647), .properties = .{ .param_str = "ddd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6466 // __builtin_hypotf
6467 .{ .tag = @enumFromInt(648), .properties = .{ .param_str = "fff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6468 // __builtin_hypotf128
6469 .{ .tag = @enumFromInt(649), .properties = .{ .param_str = "LLdLLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6470 // __builtin_hypotl
6471 .{ .tag = @enumFromInt(650), .properties = .{ .param_str = "LdLdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6472 // __builtin_ia32_rdpmc
6473 .{ .tag = @enumFromInt(651), .properties = .{ .param_str = "UOii", .target_set = TargetSet.initOne(.x86) } },
6474 // __builtin_ia32_rdtsc
6475 .{ .tag = @enumFromInt(652), .properties = .{ .param_str = "UOi", .target_set = TargetSet.initOne(.x86) } },
6476 // __builtin_ia32_rdtscp
6477 .{ .tag = @enumFromInt(653), .properties = .{ .param_str = "UOiUi*", .target_set = TargetSet.initOne(.x86) } },
6478 // __builtin_ilogb
6479 .{ .tag = @enumFromInt(654), .properties = .{ .param_str = "id", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6480 // __builtin_ilogbf
6481 .{ .tag = @enumFromInt(655), .properties = .{ .param_str = "if", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6482 // __builtin_ilogbf128
6483 .{ .tag = @enumFromInt(656), .properties = .{ .param_str = "iLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6484 // __builtin_ilogbl
6485 .{ .tag = @enumFromInt(657), .properties = .{ .param_str = "iLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6486 // __builtin_index
6487 .{ .tag = @enumFromInt(658), .properties = .{ .param_str = "c*cC*i", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
6488 // __builtin_inf
6489 .{ .tag = @enumFromInt(659), .properties = .{ .param_str = "d", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
6490 // __builtin_inff
6491 .{ .tag = @enumFromInt(660), .properties = .{ .param_str = "f", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
6492 // __builtin_inff128
6493 .{ .tag = @enumFromInt(661), .properties = .{ .param_str = "LLd", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
6494 // __builtin_inff16
6495 .{ .tag = @enumFromInt(662), .properties = .{ .param_str = "x", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
6496 // __builtin_infl
6497 .{ .tag = @enumFromInt(663), .properties = .{ .param_str = "Ld", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
6498 // __builtin_init_dwarf_reg_size_table
6499 .{ .tag = @enumFromInt(664), .properties = .{ .param_str = "vv*" } },
6500 // __builtin_is_aligned
6501 .{ .tag = @enumFromInt(665), .properties = .{ .param_str = "bvC*z", .attributes = .{ .@"const" = true, .custom_typecheck = true, .const_evaluable = true } } },
6502 // __builtin_isfinite
6503 .{ .tag = @enumFromInt(666), .properties = .{ .param_str = "i.", .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
6504 // __builtin_isfpclass
6505 .{ .tag = @enumFromInt(667), .properties = .{ .param_str = "i.", .attributes = .{ .@"const" = true, .custom_typecheck = true, .const_evaluable = true } } },
6506 // __builtin_isgreater
6507 .{ .tag = @enumFromInt(668), .properties = .{ .param_str = "i.", .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true } } },
6508 // __builtin_isgreaterequal
6509 .{ .tag = @enumFromInt(669), .properties = .{ .param_str = "i.", .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true } } },
6510 // __builtin_isinf
6511 .{ .tag = @enumFromInt(670), .properties = .{ .param_str = "i.", .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
6512 // __builtin_isinf_sign
6513 .{ .tag = @enumFromInt(671), .properties = .{ .param_str = "i.", .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
6514 // __builtin_isless
6515 .{ .tag = @enumFromInt(672), .properties = .{ .param_str = "i.", .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true } } },
6516 // __builtin_islessequal
6517 .{ .tag = @enumFromInt(673), .properties = .{ .param_str = "i.", .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true } } },
6518 // __builtin_islessgreater
6519 .{ .tag = @enumFromInt(674), .properties = .{ .param_str = "i.", .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true } } },
6520 // __builtin_isnan
6521 .{ .tag = @enumFromInt(675), .properties = .{ .param_str = "i.", .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
6522 // __builtin_isnormal
6523 .{ .tag = @enumFromInt(676), .properties = .{ .param_str = "i.", .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
6524 // __builtin_isunordered
6525 .{ .tag = @enumFromInt(677), .properties = .{ .param_str = "i.", .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true } } },
6526 // __builtin_labs
6527 .{ .tag = @enumFromInt(678), .properties = .{ .param_str = "LiLi", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
6528 // __builtin_launder
6529 .{ .tag = @enumFromInt(679), .properties = .{ .param_str = "v*v*", .attributes = .{ .custom_typecheck = true, .const_evaluable = true } } },
6530 // __builtin_ldexp
6531 .{ .tag = @enumFromInt(680), .properties = .{ .param_str = "ddi", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6532 // __builtin_ldexpf
6533 .{ .tag = @enumFromInt(681), .properties = .{ .param_str = "ffi", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6534 // __builtin_ldexpf128
6535 .{ .tag = @enumFromInt(682), .properties = .{ .param_str = "LLdLLdi", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6536 // __builtin_ldexpf16
6537 .{ .tag = @enumFromInt(683), .properties = .{ .param_str = "hhi", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6538 // __builtin_ldexpl
6539 .{ .tag = @enumFromInt(684), .properties = .{ .param_str = "LdLdi", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6540 // __builtin_lgamma
6541 .{ .tag = @enumFromInt(685), .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
6542 // __builtin_lgammaf
6543 .{ .tag = @enumFromInt(686), .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
6544 // __builtin_lgammaf128
6545 .{ .tag = @enumFromInt(687), .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
6546 // __builtin_lgammal
6547 .{ .tag = @enumFromInt(688), .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
6548 // __builtin_llabs
6549 .{ .tag = @enumFromInt(689), .properties = .{ .param_str = "LLiLLi", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
6550 // __builtin_llrint
6551 .{ .tag = @enumFromInt(690), .properties = .{ .param_str = "LLid", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6552 // __builtin_llrintf
6553 .{ .tag = @enumFromInt(691), .properties = .{ .param_str = "LLif", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6554 // __builtin_llrintf128
6555 .{ .tag = @enumFromInt(692), .properties = .{ .param_str = "LLiLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6556 // __builtin_llrintl
6557 .{ .tag = @enumFromInt(693), .properties = .{ .param_str = "LLiLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6558 // __builtin_llround
6559 .{ .tag = @enumFromInt(694), .properties = .{ .param_str = "LLid", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6560 // __builtin_llroundf
6561 .{ .tag = @enumFromInt(695), .properties = .{ .param_str = "LLif", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6562 // __builtin_llroundf128
6563 .{ .tag = @enumFromInt(696), .properties = .{ .param_str = "LLiLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6564 // __builtin_llroundl
6565 .{ .tag = @enumFromInt(697), .properties = .{ .param_str = "LLiLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6566 // __builtin_log
6567 .{ .tag = @enumFromInt(698), .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6568 // __builtin_log10
6569 .{ .tag = @enumFromInt(699), .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6570 // __builtin_log10f
6571 .{ .tag = @enumFromInt(700), .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6572 // __builtin_log10f128
6573 .{ .tag = @enumFromInt(701), .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6574 // __builtin_log10f16
6575 .{ .tag = @enumFromInt(702), .properties = .{ .param_str = "hh", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6576 // __builtin_log10l
6577 .{ .tag = @enumFromInt(703), .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6578 // __builtin_log1p
6579 .{ .tag = @enumFromInt(704), .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6580 // __builtin_log1pf
6581 .{ .tag = @enumFromInt(705), .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6582 // __builtin_log1pf128
6583 .{ .tag = @enumFromInt(706), .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6584 // __builtin_log1pl
6585 .{ .tag = @enumFromInt(707), .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6586 // __builtin_log2
6587 .{ .tag = @enumFromInt(708), .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6588 // __builtin_log2f
6589 .{ .tag = @enumFromInt(709), .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6590 // __builtin_log2f128
6591 .{ .tag = @enumFromInt(710), .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6592 // __builtin_log2f16
6593 .{ .tag = @enumFromInt(711), .properties = .{ .param_str = "hh", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6594 // __builtin_log2l
6595 .{ .tag = @enumFromInt(712), .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6596 // __builtin_logb
6597 .{ .tag = @enumFromInt(713), .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6598 // __builtin_logbf
6599 .{ .tag = @enumFromInt(714), .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6600 // __builtin_logbf128
6601 .{ .tag = @enumFromInt(715), .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6602 // __builtin_logbl
6603 .{ .tag = @enumFromInt(716), .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6604 // __builtin_logf
6605 .{ .tag = @enumFromInt(717), .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6606 // __builtin_logf128
6607 .{ .tag = @enumFromInt(718), .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6608 // __builtin_logf16
6609 .{ .tag = @enumFromInt(719), .properties = .{ .param_str = "hh", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6610 // __builtin_logl
6611 .{ .tag = @enumFromInt(720), .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6612 // __builtin_longjmp
6613 .{ .tag = @enumFromInt(721), .properties = .{ .param_str = "vv**i", .attributes = .{ .noreturn = true } } },
6614 // __builtin_lrint
6615 .{ .tag = @enumFromInt(722), .properties = .{ .param_str = "Lid", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6616 // __builtin_lrintf
6617 .{ .tag = @enumFromInt(723), .properties = .{ .param_str = "Lif", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6618 // __builtin_lrintf128
6619 .{ .tag = @enumFromInt(724), .properties = .{ .param_str = "LiLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6620 // __builtin_lrintl
6621 .{ .tag = @enumFromInt(725), .properties = .{ .param_str = "LiLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6622 // __builtin_lround
6623 .{ .tag = @enumFromInt(726), .properties = .{ .param_str = "Lid", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6624 // __builtin_lroundf
6625 .{ .tag = @enumFromInt(727), .properties = .{ .param_str = "Lif", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6626 // __builtin_lroundf128
6627 .{ .tag = @enumFromInt(728), .properties = .{ .param_str = "LiLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6628 // __builtin_lroundl
6629 .{ .tag = @enumFromInt(729), .properties = .{ .param_str = "LiLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
6630 // __builtin_malloc
6631 .{ .tag = @enumFromInt(730), .properties = .{ .param_str = "v*z", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
6632 // __builtin_matrix_column_major_load
6633 .{ .tag = @enumFromInt(731), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true, .lib_function_with_builtin_prefix = true } } },
6634 // __builtin_matrix_column_major_store
6635 .{ .tag = @enumFromInt(732), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true, .lib_function_with_builtin_prefix = true } } },
6636 // __builtin_matrix_transpose
6637 .{ .tag = @enumFromInt(733), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true, .lib_function_with_builtin_prefix = true } } },
6638 // __builtin_memchr
6639 .{ .tag = @enumFromInt(734), .properties = .{ .param_str = "v*vC*iz", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
6640 // __builtin_memcmp
6641 .{ .tag = @enumFromInt(735), .properties = .{ .param_str = "ivC*vC*z", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
6642 // __builtin_memcpy
6643 .{ .tag = @enumFromInt(736), .properties = .{ .param_str = "v*v*vC*z", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
6644 // __builtin_memcpy_inline
6645 .{ .tag = @enumFromInt(737), .properties = .{ .param_str = "vv*vC*Iz" } },
6646 // __builtin_memmove
6647 .{ .tag = @enumFromInt(738), .properties = .{ .param_str = "v*v*vC*z", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
6648 // __builtin_mempcpy
6649 .{ .tag = @enumFromInt(739), .properties = .{ .param_str = "v*v*vC*z", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
6650 // __builtin_memset
6651 .{ .tag = @enumFromInt(740), .properties = .{ .param_str = "v*v*iz", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
6652 // __builtin_memset_inline
6653 .{ .tag = @enumFromInt(741), .properties = .{ .param_str = "vv*iIz" } },
6654 // __builtin_mips_absq_s_ph
6655 .{ .tag = @enumFromInt(742), .properties = .{ .param_str = "V2sV2s", .target_set = TargetSet.initOne(.mips) } },
6656 // __builtin_mips_absq_s_qb
6657 .{ .tag = @enumFromInt(743), .properties = .{ .param_str = "V4ScV4Sc", .target_set = TargetSet.initOne(.mips) } },
6658 // __builtin_mips_absq_s_w
6659 .{ .tag = @enumFromInt(744), .properties = .{ .param_str = "ii", .target_set = TargetSet.initOne(.mips) } },
6660 // __builtin_mips_addq_ph
6661 .{ .tag = @enumFromInt(745), .properties = .{ .param_str = "V2sV2sV2s", .target_set = TargetSet.initOne(.mips) } },
6662 // __builtin_mips_addq_s_ph
6663 .{ .tag = @enumFromInt(746), .properties = .{ .param_str = "V2sV2sV2s", .target_set = TargetSet.initOne(.mips) } },
6664 // __builtin_mips_addq_s_w
6665 .{ .tag = @enumFromInt(747), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.mips) } },
6666 // __builtin_mips_addqh_ph
6667 .{ .tag = @enumFromInt(748), .properties = .{ .param_str = "V2sV2sV2s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6668 // __builtin_mips_addqh_r_ph
6669 .{ .tag = @enumFromInt(749), .properties = .{ .param_str = "V2sV2sV2s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6670 // __builtin_mips_addqh_r_w
6671 .{ .tag = @enumFromInt(750), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6672 // __builtin_mips_addqh_w
6673 .{ .tag = @enumFromInt(751), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6674 // __builtin_mips_addsc
6675 .{ .tag = @enumFromInt(752), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.mips) } },
6676 // __builtin_mips_addu_ph
6677 .{ .tag = @enumFromInt(753), .properties = .{ .param_str = "V2sV2sV2s", .target_set = TargetSet.initOne(.mips) } },
6678 // __builtin_mips_addu_qb
6679 .{ .tag = @enumFromInt(754), .properties = .{ .param_str = "V4ScV4ScV4Sc", .target_set = TargetSet.initOne(.mips) } },
6680 // __builtin_mips_addu_s_ph
6681 .{ .tag = @enumFromInt(755), .properties = .{ .param_str = "V2sV2sV2s", .target_set = TargetSet.initOne(.mips) } },
6682 // __builtin_mips_addu_s_qb
6683 .{ .tag = @enumFromInt(756), .properties = .{ .param_str = "V4ScV4ScV4Sc", .target_set = TargetSet.initOne(.mips) } },
6684 // __builtin_mips_adduh_qb
6685 .{ .tag = @enumFromInt(757), .properties = .{ .param_str = "V4ScV4ScV4Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6686 // __builtin_mips_adduh_r_qb
6687 .{ .tag = @enumFromInt(758), .properties = .{ .param_str = "V4ScV4ScV4Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6688 // __builtin_mips_addwc
6689 .{ .tag = @enumFromInt(759), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.mips) } },
6690 // __builtin_mips_append
6691 .{ .tag = @enumFromInt(760), .properties = .{ .param_str = "iiiIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6692 // __builtin_mips_balign
6693 .{ .tag = @enumFromInt(761), .properties = .{ .param_str = "iiiIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6694 // __builtin_mips_bitrev
6695 .{ .tag = @enumFromInt(762), .properties = .{ .param_str = "ii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6696 // __builtin_mips_bposge32
6697 .{ .tag = @enumFromInt(763), .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.mips) } },
6698 // __builtin_mips_cmp_eq_ph
6699 .{ .tag = @enumFromInt(764), .properties = .{ .param_str = "vV2sV2s", .target_set = TargetSet.initOne(.mips) } },
6700 // __builtin_mips_cmp_le_ph
6701 .{ .tag = @enumFromInt(765), .properties = .{ .param_str = "vV2sV2s", .target_set = TargetSet.initOne(.mips) } },
6702 // __builtin_mips_cmp_lt_ph
6703 .{ .tag = @enumFromInt(766), .properties = .{ .param_str = "vV2sV2s", .target_set = TargetSet.initOne(.mips) } },
6704 // __builtin_mips_cmpgdu_eq_qb
6705 .{ .tag = @enumFromInt(767), .properties = .{ .param_str = "iV4ScV4Sc", .target_set = TargetSet.initOne(.mips) } },
6706 // __builtin_mips_cmpgdu_le_qb
6707 .{ .tag = @enumFromInt(768), .properties = .{ .param_str = "iV4ScV4Sc", .target_set = TargetSet.initOne(.mips) } },
6708 // __builtin_mips_cmpgdu_lt_qb
6709 .{ .tag = @enumFromInt(769), .properties = .{ .param_str = "iV4ScV4Sc", .target_set = TargetSet.initOne(.mips) } },
6710 // __builtin_mips_cmpgu_eq_qb
6711 .{ .tag = @enumFromInt(770), .properties = .{ .param_str = "iV4ScV4Sc", .target_set = TargetSet.initOne(.mips) } },
6712 // __builtin_mips_cmpgu_le_qb
6713 .{ .tag = @enumFromInt(771), .properties = .{ .param_str = "iV4ScV4Sc", .target_set = TargetSet.initOne(.mips) } },
6714 // __builtin_mips_cmpgu_lt_qb
6715 .{ .tag = @enumFromInt(772), .properties = .{ .param_str = "iV4ScV4Sc", .target_set = TargetSet.initOne(.mips) } },
6716 // __builtin_mips_cmpu_eq_qb
6717 .{ .tag = @enumFromInt(773), .properties = .{ .param_str = "vV4ScV4Sc", .target_set = TargetSet.initOne(.mips) } },
6718 // __builtin_mips_cmpu_le_qb
6719 .{ .tag = @enumFromInt(774), .properties = .{ .param_str = "vV4ScV4Sc", .target_set = TargetSet.initOne(.mips) } },
6720 // __builtin_mips_cmpu_lt_qb
6721 .{ .tag = @enumFromInt(775), .properties = .{ .param_str = "vV4ScV4Sc", .target_set = TargetSet.initOne(.mips) } },
6722 // __builtin_mips_dpa_w_ph
6723 .{ .tag = @enumFromInt(776), .properties = .{ .param_str = "LLiLLiV2sV2s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6724 // __builtin_mips_dpaq_s_w_ph
6725 .{ .tag = @enumFromInt(777), .properties = .{ .param_str = "LLiLLiV2sV2s", .target_set = TargetSet.initOne(.mips) } },
6726 // __builtin_mips_dpaq_sa_l_w
6727 .{ .tag = @enumFromInt(778), .properties = .{ .param_str = "LLiLLiii", .target_set = TargetSet.initOne(.mips) } },
6728 // __builtin_mips_dpaqx_s_w_ph
6729 .{ .tag = @enumFromInt(779), .properties = .{ .param_str = "LLiLLiV2sV2s", .target_set = TargetSet.initOne(.mips) } },
6730 // __builtin_mips_dpaqx_sa_w_ph
6731 .{ .tag = @enumFromInt(780), .properties = .{ .param_str = "LLiLLiV2sV2s", .target_set = TargetSet.initOne(.mips) } },
6732 // __builtin_mips_dpau_h_qbl
6733 .{ .tag = @enumFromInt(781), .properties = .{ .param_str = "LLiLLiV4ScV4Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6734 // __builtin_mips_dpau_h_qbr
6735 .{ .tag = @enumFromInt(782), .properties = .{ .param_str = "LLiLLiV4ScV4Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6736 // __builtin_mips_dpax_w_ph
6737 .{ .tag = @enumFromInt(783), .properties = .{ .param_str = "LLiLLiV2sV2s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6738 // __builtin_mips_dps_w_ph
6739 .{ .tag = @enumFromInt(784), .properties = .{ .param_str = "LLiLLiV2sV2s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6740 // __builtin_mips_dpsq_s_w_ph
6741 .{ .tag = @enumFromInt(785), .properties = .{ .param_str = "LLiLLiV2sV2s", .target_set = TargetSet.initOne(.mips) } },
6742 // __builtin_mips_dpsq_sa_l_w
6743 .{ .tag = @enumFromInt(786), .properties = .{ .param_str = "LLiLLiii", .target_set = TargetSet.initOne(.mips) } },
6744 // __builtin_mips_dpsqx_s_w_ph
6745 .{ .tag = @enumFromInt(787), .properties = .{ .param_str = "LLiLLiV2sV2s", .target_set = TargetSet.initOne(.mips) } },
6746 // __builtin_mips_dpsqx_sa_w_ph
6747 .{ .tag = @enumFromInt(788), .properties = .{ .param_str = "LLiLLiV2sV2s", .target_set = TargetSet.initOne(.mips) } },
6748 // __builtin_mips_dpsu_h_qbl
6749 .{ .tag = @enumFromInt(789), .properties = .{ .param_str = "LLiLLiV4ScV4Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6750 // __builtin_mips_dpsu_h_qbr
6751 .{ .tag = @enumFromInt(790), .properties = .{ .param_str = "LLiLLiV4ScV4Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6752 // __builtin_mips_dpsx_w_ph
6753 .{ .tag = @enumFromInt(791), .properties = .{ .param_str = "LLiLLiV2sV2s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6754 // __builtin_mips_extp
6755 .{ .tag = @enumFromInt(792), .properties = .{ .param_str = "iLLii", .target_set = TargetSet.initOne(.mips) } },
6756 // __builtin_mips_extpdp
6757 .{ .tag = @enumFromInt(793), .properties = .{ .param_str = "iLLii", .target_set = TargetSet.initOne(.mips) } },
6758 // __builtin_mips_extr_r_w
6759 .{ .tag = @enumFromInt(794), .properties = .{ .param_str = "iLLii", .target_set = TargetSet.initOne(.mips) } },
6760 // __builtin_mips_extr_rs_w
6761 .{ .tag = @enumFromInt(795), .properties = .{ .param_str = "iLLii", .target_set = TargetSet.initOne(.mips) } },
6762 // __builtin_mips_extr_s_h
6763 .{ .tag = @enumFromInt(796), .properties = .{ .param_str = "iLLii", .target_set = TargetSet.initOne(.mips) } },
6764 // __builtin_mips_extr_w
6765 .{ .tag = @enumFromInt(797), .properties = .{ .param_str = "iLLii", .target_set = TargetSet.initOne(.mips) } },
6766 // __builtin_mips_insv
6767 .{ .tag = @enumFromInt(798), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.mips) } },
6768 // __builtin_mips_lbux
6769 .{ .tag = @enumFromInt(799), .properties = .{ .param_str = "iv*i", .target_set = TargetSet.initOne(.mips) } },
6770 // __builtin_mips_lhx
6771 .{ .tag = @enumFromInt(800), .properties = .{ .param_str = "iv*i", .target_set = TargetSet.initOne(.mips) } },
6772 // __builtin_mips_lwx
6773 .{ .tag = @enumFromInt(801), .properties = .{ .param_str = "iv*i", .target_set = TargetSet.initOne(.mips) } },
6774 // __builtin_mips_madd
6775 .{ .tag = @enumFromInt(802), .properties = .{ .param_str = "LLiLLiii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6776 // __builtin_mips_maddu
6777 .{ .tag = @enumFromInt(803), .properties = .{ .param_str = "LLiLLiUiUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6778 // __builtin_mips_maq_s_w_phl
6779 .{ .tag = @enumFromInt(804), .properties = .{ .param_str = "LLiLLiV2sV2s", .target_set = TargetSet.initOne(.mips) } },
6780 // __builtin_mips_maq_s_w_phr
6781 .{ .tag = @enumFromInt(805), .properties = .{ .param_str = "LLiLLiV2sV2s", .target_set = TargetSet.initOne(.mips) } },
6782 // __builtin_mips_maq_sa_w_phl
6783 .{ .tag = @enumFromInt(806), .properties = .{ .param_str = "LLiLLiV2sV2s", .target_set = TargetSet.initOne(.mips) } },
6784 // __builtin_mips_maq_sa_w_phr
6785 .{ .tag = @enumFromInt(807), .properties = .{ .param_str = "LLiLLiV2sV2s", .target_set = TargetSet.initOne(.mips) } },
6786 // __builtin_mips_modsub
6787 .{ .tag = @enumFromInt(808), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6788 // __builtin_mips_msub
6789 .{ .tag = @enumFromInt(809), .properties = .{ .param_str = "LLiLLiii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6790 // __builtin_mips_msubu
6791 .{ .tag = @enumFromInt(810), .properties = .{ .param_str = "LLiLLiUiUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6792 // __builtin_mips_mthlip
6793 .{ .tag = @enumFromInt(811), .properties = .{ .param_str = "LLiLLii", .target_set = TargetSet.initOne(.mips) } },
6794 // __builtin_mips_mul_ph
6795 .{ .tag = @enumFromInt(812), .properties = .{ .param_str = "V2sV2sV2s", .target_set = TargetSet.initOne(.mips) } },
6796 // __builtin_mips_mul_s_ph
6797 .{ .tag = @enumFromInt(813), .properties = .{ .param_str = "V2sV2sV2s", .target_set = TargetSet.initOne(.mips) } },
6798 // __builtin_mips_muleq_s_w_phl
6799 .{ .tag = @enumFromInt(814), .properties = .{ .param_str = "iV2sV2s", .target_set = TargetSet.initOne(.mips) } },
6800 // __builtin_mips_muleq_s_w_phr
6801 .{ .tag = @enumFromInt(815), .properties = .{ .param_str = "iV2sV2s", .target_set = TargetSet.initOne(.mips) } },
6802 // __builtin_mips_muleu_s_ph_qbl
6803 .{ .tag = @enumFromInt(816), .properties = .{ .param_str = "V2sV4ScV2s", .target_set = TargetSet.initOne(.mips) } },
6804 // __builtin_mips_muleu_s_ph_qbr
6805 .{ .tag = @enumFromInt(817), .properties = .{ .param_str = "V2sV4ScV2s", .target_set = TargetSet.initOne(.mips) } },
6806 // __builtin_mips_mulq_rs_ph
6807 .{ .tag = @enumFromInt(818), .properties = .{ .param_str = "V2sV2sV2s", .target_set = TargetSet.initOne(.mips) } },
6808 // __builtin_mips_mulq_rs_w
6809 .{ .tag = @enumFromInt(819), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.mips) } },
6810 // __builtin_mips_mulq_s_ph
6811 .{ .tag = @enumFromInt(820), .properties = .{ .param_str = "V2sV2sV2s", .target_set = TargetSet.initOne(.mips) } },
6812 // __builtin_mips_mulq_s_w
6813 .{ .tag = @enumFromInt(821), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.mips) } },
6814 // __builtin_mips_mulsa_w_ph
6815 .{ .tag = @enumFromInt(822), .properties = .{ .param_str = "LLiLLiV2sV2s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6816 // __builtin_mips_mulsaq_s_w_ph
6817 .{ .tag = @enumFromInt(823), .properties = .{ .param_str = "LLiLLiV2sV2s", .target_set = TargetSet.initOne(.mips) } },
6818 // __builtin_mips_mult
6819 .{ .tag = @enumFromInt(824), .properties = .{ .param_str = "LLiii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6820 // __builtin_mips_multu
6821 .{ .tag = @enumFromInt(825), .properties = .{ .param_str = "LLiUiUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6822 // __builtin_mips_packrl_ph
6823 .{ .tag = @enumFromInt(826), .properties = .{ .param_str = "V2sV2sV2s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6824 // __builtin_mips_pick_ph
6825 .{ .tag = @enumFromInt(827), .properties = .{ .param_str = "V2sV2sV2s", .target_set = TargetSet.initOne(.mips) } },
6826 // __builtin_mips_pick_qb
6827 .{ .tag = @enumFromInt(828), .properties = .{ .param_str = "V4ScV4ScV4Sc", .target_set = TargetSet.initOne(.mips) } },
6828 // __builtin_mips_preceq_w_phl
6829 .{ .tag = @enumFromInt(829), .properties = .{ .param_str = "iV2s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6830 // __builtin_mips_preceq_w_phr
6831 .{ .tag = @enumFromInt(830), .properties = .{ .param_str = "iV2s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6832 // __builtin_mips_precequ_ph_qbl
6833 .{ .tag = @enumFromInt(831), .properties = .{ .param_str = "V2sV4Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6834 // __builtin_mips_precequ_ph_qbla
6835 .{ .tag = @enumFromInt(832), .properties = .{ .param_str = "V2sV4Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6836 // __builtin_mips_precequ_ph_qbr
6837 .{ .tag = @enumFromInt(833), .properties = .{ .param_str = "V2sV4Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6838 // __builtin_mips_precequ_ph_qbra
6839 .{ .tag = @enumFromInt(834), .properties = .{ .param_str = "V2sV4Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6840 // __builtin_mips_preceu_ph_qbl
6841 .{ .tag = @enumFromInt(835), .properties = .{ .param_str = "V2sV4Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6842 // __builtin_mips_preceu_ph_qbla
6843 .{ .tag = @enumFromInt(836), .properties = .{ .param_str = "V2sV4Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6844 // __builtin_mips_preceu_ph_qbr
6845 .{ .tag = @enumFromInt(837), .properties = .{ .param_str = "V2sV4Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6846 // __builtin_mips_preceu_ph_qbra
6847 .{ .tag = @enumFromInt(838), .properties = .{ .param_str = "V2sV4Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6848 // __builtin_mips_precr_qb_ph
6849 .{ .tag = @enumFromInt(839), .properties = .{ .param_str = "V4ScV2sV2s", .target_set = TargetSet.initOne(.mips) } },
6850 // __builtin_mips_precr_sra_ph_w
6851 .{ .tag = @enumFromInt(840), .properties = .{ .param_str = "V2siiIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6852 // __builtin_mips_precr_sra_r_ph_w
6853 .{ .tag = @enumFromInt(841), .properties = .{ .param_str = "V2siiIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6854 // __builtin_mips_precrq_ph_w
6855 .{ .tag = @enumFromInt(842), .properties = .{ .param_str = "V2sii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6856 // __builtin_mips_precrq_qb_ph
6857 .{ .tag = @enumFromInt(843), .properties = .{ .param_str = "V4ScV2sV2s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6858 // __builtin_mips_precrq_rs_ph_w
6859 .{ .tag = @enumFromInt(844), .properties = .{ .param_str = "V2sii", .target_set = TargetSet.initOne(.mips) } },
6860 // __builtin_mips_precrqu_s_qb_ph
6861 .{ .tag = @enumFromInt(845), .properties = .{ .param_str = "V4ScV2sV2s", .target_set = TargetSet.initOne(.mips) } },
6862 // __builtin_mips_prepend
6863 .{ .tag = @enumFromInt(846), .properties = .{ .param_str = "iiiIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6864 // __builtin_mips_raddu_w_qb
6865 .{ .tag = @enumFromInt(847), .properties = .{ .param_str = "iV4Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6866 // __builtin_mips_rddsp
6867 .{ .tag = @enumFromInt(848), .properties = .{ .param_str = "iIi", .target_set = TargetSet.initOne(.mips) } },
6868 // __builtin_mips_repl_ph
6869 .{ .tag = @enumFromInt(849), .properties = .{ .param_str = "V2si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6870 // __builtin_mips_repl_qb
6871 .{ .tag = @enumFromInt(850), .properties = .{ .param_str = "V4Sci", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6872 // __builtin_mips_shilo
6873 .{ .tag = @enumFromInt(851), .properties = .{ .param_str = "LLiLLii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6874 // __builtin_mips_shll_ph
6875 .{ .tag = @enumFromInt(852), .properties = .{ .param_str = "V2sV2si", .target_set = TargetSet.initOne(.mips) } },
6876 // __builtin_mips_shll_qb
6877 .{ .tag = @enumFromInt(853), .properties = .{ .param_str = "V4ScV4Sci", .target_set = TargetSet.initOne(.mips) } },
6878 // __builtin_mips_shll_s_ph
6879 .{ .tag = @enumFromInt(854), .properties = .{ .param_str = "V2sV2si", .target_set = TargetSet.initOne(.mips) } },
6880 // __builtin_mips_shll_s_w
6881 .{ .tag = @enumFromInt(855), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.mips) } },
6882 // __builtin_mips_shra_ph
6883 .{ .tag = @enumFromInt(856), .properties = .{ .param_str = "V2sV2si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6884 // __builtin_mips_shra_qb
6885 .{ .tag = @enumFromInt(857), .properties = .{ .param_str = "V4ScV4Sci", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6886 // __builtin_mips_shra_r_ph
6887 .{ .tag = @enumFromInt(858), .properties = .{ .param_str = "V2sV2si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6888 // __builtin_mips_shra_r_qb
6889 .{ .tag = @enumFromInt(859), .properties = .{ .param_str = "V4ScV4Sci", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6890 // __builtin_mips_shra_r_w
6891 .{ .tag = @enumFromInt(860), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6892 // __builtin_mips_shrl_ph
6893 .{ .tag = @enumFromInt(861), .properties = .{ .param_str = "V2sV2si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6894 // __builtin_mips_shrl_qb
6895 .{ .tag = @enumFromInt(862), .properties = .{ .param_str = "V4ScV4Sci", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6896 // __builtin_mips_subq_ph
6897 .{ .tag = @enumFromInt(863), .properties = .{ .param_str = "V2sV2sV2s", .target_set = TargetSet.initOne(.mips) } },
6898 // __builtin_mips_subq_s_ph
6899 .{ .tag = @enumFromInt(864), .properties = .{ .param_str = "V2sV2sV2s", .target_set = TargetSet.initOne(.mips) } },
6900 // __builtin_mips_subq_s_w
6901 .{ .tag = @enumFromInt(865), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.mips) } },
6902 // __builtin_mips_subqh_ph
6903 .{ .tag = @enumFromInt(866), .properties = .{ .param_str = "V2sV2sV2s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6904 // __builtin_mips_subqh_r_ph
6905 .{ .tag = @enumFromInt(867), .properties = .{ .param_str = "V2sV2sV2s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6906 // __builtin_mips_subqh_r_w
6907 .{ .tag = @enumFromInt(868), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6908 // __builtin_mips_subqh_w
6909 .{ .tag = @enumFromInt(869), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6910 // __builtin_mips_subu_ph
6911 .{ .tag = @enumFromInt(870), .properties = .{ .param_str = "V2sV2sV2s", .target_set = TargetSet.initOne(.mips) } },
6912 // __builtin_mips_subu_qb
6913 .{ .tag = @enumFromInt(871), .properties = .{ .param_str = "V4ScV4ScV4Sc", .target_set = TargetSet.initOne(.mips) } },
6914 // __builtin_mips_subu_s_ph
6915 .{ .tag = @enumFromInt(872), .properties = .{ .param_str = "V2sV2sV2s", .target_set = TargetSet.initOne(.mips) } },
6916 // __builtin_mips_subu_s_qb
6917 .{ .tag = @enumFromInt(873), .properties = .{ .param_str = "V4ScV4ScV4Sc", .target_set = TargetSet.initOne(.mips) } },
6918 // __builtin_mips_subuh_qb
6919 .{ .tag = @enumFromInt(874), .properties = .{ .param_str = "V4ScV4ScV4Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6920 // __builtin_mips_subuh_r_qb
6921 .{ .tag = @enumFromInt(875), .properties = .{ .param_str = "V4ScV4ScV4Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6922 // __builtin_mips_wrdsp
6923 .{ .tag = @enumFromInt(876), .properties = .{ .param_str = "viIi", .target_set = TargetSet.initOne(.mips) } },
6924 // __builtin_modf
6925 .{ .tag = @enumFromInt(877), .properties = .{ .param_str = "ddd*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
6926 // __builtin_modff
6927 .{ .tag = @enumFromInt(878), .properties = .{ .param_str = "fff*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
6928 // __builtin_modff128
6929 .{ .tag = @enumFromInt(879), .properties = .{ .param_str = "LLdLLdLLd*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
6930 // __builtin_modfl
6931 .{ .tag = @enumFromInt(880), .properties = .{ .param_str = "LdLdLd*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
6932 // __builtin_msa_add_a_b
6933 .{ .tag = @enumFromInt(881), .properties = .{ .param_str = "V16ScV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6934 // __builtin_msa_add_a_d
6935 .{ .tag = @enumFromInt(882), .properties = .{ .param_str = "V2SLLiV2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6936 // __builtin_msa_add_a_h
6937 .{ .tag = @enumFromInt(883), .properties = .{ .param_str = "V8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6938 // __builtin_msa_add_a_w
6939 .{ .tag = @enumFromInt(884), .properties = .{ .param_str = "V4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6940 // __builtin_msa_adds_a_b
6941 .{ .tag = @enumFromInt(885), .properties = .{ .param_str = "V16ScV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6942 // __builtin_msa_adds_a_d
6943 .{ .tag = @enumFromInt(886), .properties = .{ .param_str = "V2SLLiV2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6944 // __builtin_msa_adds_a_h
6945 .{ .tag = @enumFromInt(887), .properties = .{ .param_str = "V8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6946 // __builtin_msa_adds_a_w
6947 .{ .tag = @enumFromInt(888), .properties = .{ .param_str = "V4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6948 // __builtin_msa_adds_s_b
6949 .{ .tag = @enumFromInt(889), .properties = .{ .param_str = "V16ScV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6950 // __builtin_msa_adds_s_d
6951 .{ .tag = @enumFromInt(890), .properties = .{ .param_str = "V2SLLiV2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6952 // __builtin_msa_adds_s_h
6953 .{ .tag = @enumFromInt(891), .properties = .{ .param_str = "V8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6954 // __builtin_msa_adds_s_w
6955 .{ .tag = @enumFromInt(892), .properties = .{ .param_str = "V4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6956 // __builtin_msa_adds_u_b
6957 .{ .tag = @enumFromInt(893), .properties = .{ .param_str = "V16UcV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6958 // __builtin_msa_adds_u_d
6959 .{ .tag = @enumFromInt(894), .properties = .{ .param_str = "V2ULLiV2ULLiV2ULLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6960 // __builtin_msa_adds_u_h
6961 .{ .tag = @enumFromInt(895), .properties = .{ .param_str = "V8UsV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6962 // __builtin_msa_adds_u_w
6963 .{ .tag = @enumFromInt(896), .properties = .{ .param_str = "V4UiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6964 // __builtin_msa_addv_b
6965 .{ .tag = @enumFromInt(897), .properties = .{ .param_str = "V16cV16cV16c", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6966 // __builtin_msa_addv_d
6967 .{ .tag = @enumFromInt(898), .properties = .{ .param_str = "V2LLiV2LLiV2LLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6968 // __builtin_msa_addv_h
6969 .{ .tag = @enumFromInt(899), .properties = .{ .param_str = "V8sV8sV8s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6970 // __builtin_msa_addv_w
6971 .{ .tag = @enumFromInt(900), .properties = .{ .param_str = "V4iV4iV4i", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6972 // __builtin_msa_addvi_b
6973 .{ .tag = @enumFromInt(901), .properties = .{ .param_str = "V16cV16cIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6974 // __builtin_msa_addvi_d
6975 .{ .tag = @enumFromInt(902), .properties = .{ .param_str = "V2LLiV2LLiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6976 // __builtin_msa_addvi_h
6977 .{ .tag = @enumFromInt(903), .properties = .{ .param_str = "V8sV8sIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6978 // __builtin_msa_addvi_w
6979 .{ .tag = @enumFromInt(904), .properties = .{ .param_str = "V4iV4iIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6980 // __builtin_msa_and_v
6981 .{ .tag = @enumFromInt(905), .properties = .{ .param_str = "V16UcV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6982 // __builtin_msa_andi_b
6983 .{ .tag = @enumFromInt(906), .properties = .{ .param_str = "V16UcV16UcIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6984 // __builtin_msa_asub_s_b
6985 .{ .tag = @enumFromInt(907), .properties = .{ .param_str = "V16ScV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6986 // __builtin_msa_asub_s_d
6987 .{ .tag = @enumFromInt(908), .properties = .{ .param_str = "V2SLLiV2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6988 // __builtin_msa_asub_s_h
6989 .{ .tag = @enumFromInt(909), .properties = .{ .param_str = "V8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6990 // __builtin_msa_asub_s_w
6991 .{ .tag = @enumFromInt(910), .properties = .{ .param_str = "V4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6992 // __builtin_msa_asub_u_b
6993 .{ .tag = @enumFromInt(911), .properties = .{ .param_str = "V16UcV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6994 // __builtin_msa_asub_u_d
6995 .{ .tag = @enumFromInt(912), .properties = .{ .param_str = "V2ULLiV2ULLiV2ULLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6996 // __builtin_msa_asub_u_h
6997 .{ .tag = @enumFromInt(913), .properties = .{ .param_str = "V8UsV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
6998 // __builtin_msa_asub_u_w
6999 .{ .tag = @enumFromInt(914), .properties = .{ .param_str = "V4UiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7000 // __builtin_msa_ave_s_b
7001 .{ .tag = @enumFromInt(915), .properties = .{ .param_str = "V16ScV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7002 // __builtin_msa_ave_s_d
7003 .{ .tag = @enumFromInt(916), .properties = .{ .param_str = "V2SLLiV2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7004 // __builtin_msa_ave_s_h
7005 .{ .tag = @enumFromInt(917), .properties = .{ .param_str = "V8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7006 // __builtin_msa_ave_s_w
7007 .{ .tag = @enumFromInt(918), .properties = .{ .param_str = "V4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7008 // __builtin_msa_ave_u_b
7009 .{ .tag = @enumFromInt(919), .properties = .{ .param_str = "V16UcV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7010 // __builtin_msa_ave_u_d
7011 .{ .tag = @enumFromInt(920), .properties = .{ .param_str = "V2ULLiV2ULLiV2ULLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7012 // __builtin_msa_ave_u_h
7013 .{ .tag = @enumFromInt(921), .properties = .{ .param_str = "V8UsV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7014 // __builtin_msa_ave_u_w
7015 .{ .tag = @enumFromInt(922), .properties = .{ .param_str = "V4UiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7016 // __builtin_msa_aver_s_b
7017 .{ .tag = @enumFromInt(923), .properties = .{ .param_str = "V16ScV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7018 // __builtin_msa_aver_s_d
7019 .{ .tag = @enumFromInt(924), .properties = .{ .param_str = "V2SLLiV2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7020 // __builtin_msa_aver_s_h
7021 .{ .tag = @enumFromInt(925), .properties = .{ .param_str = "V8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7022 // __builtin_msa_aver_s_w
7023 .{ .tag = @enumFromInt(926), .properties = .{ .param_str = "V4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7024 // __builtin_msa_aver_u_b
7025 .{ .tag = @enumFromInt(927), .properties = .{ .param_str = "V16UcV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7026 // __builtin_msa_aver_u_d
7027 .{ .tag = @enumFromInt(928), .properties = .{ .param_str = "V2ULLiV2ULLiV2ULLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7028 // __builtin_msa_aver_u_h
7029 .{ .tag = @enumFromInt(929), .properties = .{ .param_str = "V8UsV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7030 // __builtin_msa_aver_u_w
7031 .{ .tag = @enumFromInt(930), .properties = .{ .param_str = "V4UiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7032 // __builtin_msa_bclr_b
7033 .{ .tag = @enumFromInt(931), .properties = .{ .param_str = "V16UcV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7034 // __builtin_msa_bclr_d
7035 .{ .tag = @enumFromInt(932), .properties = .{ .param_str = "V2ULLiV2ULLiV2ULLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7036 // __builtin_msa_bclr_h
7037 .{ .tag = @enumFromInt(933), .properties = .{ .param_str = "V8UsV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7038 // __builtin_msa_bclr_w
7039 .{ .tag = @enumFromInt(934), .properties = .{ .param_str = "V4UiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7040 // __builtin_msa_bclri_b
7041 .{ .tag = @enumFromInt(935), .properties = .{ .param_str = "V16UcV16UcIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7042 // __builtin_msa_bclri_d
7043 .{ .tag = @enumFromInt(936), .properties = .{ .param_str = "V2ULLiV2ULLiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7044 // __builtin_msa_bclri_h
7045 .{ .tag = @enumFromInt(937), .properties = .{ .param_str = "V8UsV8UsIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7046 // __builtin_msa_bclri_w
7047 .{ .tag = @enumFromInt(938), .properties = .{ .param_str = "V4UiV4UiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7048 // __builtin_msa_binsl_b
7049 .{ .tag = @enumFromInt(939), .properties = .{ .param_str = "V16UcV16UcV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7050 // __builtin_msa_binsl_d
7051 .{ .tag = @enumFromInt(940), .properties = .{ .param_str = "V2ULLiV2ULLiV2ULLiV2ULLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7052 // __builtin_msa_binsl_h
7053 .{ .tag = @enumFromInt(941), .properties = .{ .param_str = "V8UsV8UsV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7054 // __builtin_msa_binsl_w
7055 .{ .tag = @enumFromInt(942), .properties = .{ .param_str = "V4UiV4UiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7056 // __builtin_msa_binsli_b
7057 .{ .tag = @enumFromInt(943), .properties = .{ .param_str = "V16UcV16UcV16UcIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7058 // __builtin_msa_binsli_d
7059 .{ .tag = @enumFromInt(944), .properties = .{ .param_str = "V2ULLiV2ULLiV2ULLiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7060 // __builtin_msa_binsli_h
7061 .{ .tag = @enumFromInt(945), .properties = .{ .param_str = "V8UsV8UsV8UsIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7062 // __builtin_msa_binsli_w
7063 .{ .tag = @enumFromInt(946), .properties = .{ .param_str = "V4UiV4UiV4UiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7064 // __builtin_msa_binsr_b
7065 .{ .tag = @enumFromInt(947), .properties = .{ .param_str = "V16UcV16UcV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7066 // __builtin_msa_binsr_d
7067 .{ .tag = @enumFromInt(948), .properties = .{ .param_str = "V2ULLiV2ULLiV2ULLiV2ULLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7068 // __builtin_msa_binsr_h
7069 .{ .tag = @enumFromInt(949), .properties = .{ .param_str = "V8UsV8UsV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7070 // __builtin_msa_binsr_w
7071 .{ .tag = @enumFromInt(950), .properties = .{ .param_str = "V4UiV4UiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7072 // __builtin_msa_binsri_b
7073 .{ .tag = @enumFromInt(951), .properties = .{ .param_str = "V16UcV16UcV16UcIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7074 // __builtin_msa_binsri_d
7075 .{ .tag = @enumFromInt(952), .properties = .{ .param_str = "V2ULLiV2ULLiV2ULLiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7076 // __builtin_msa_binsri_h
7077 .{ .tag = @enumFromInt(953), .properties = .{ .param_str = "V8UsV8UsV8UsIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7078 // __builtin_msa_binsri_w
7079 .{ .tag = @enumFromInt(954), .properties = .{ .param_str = "V4UiV4UiV4UiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7080 // __builtin_msa_bmnz_v
7081 .{ .tag = @enumFromInt(955), .properties = .{ .param_str = "V16UcV16UcV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7082 // __builtin_msa_bmnzi_b
7083 .{ .tag = @enumFromInt(956), .properties = .{ .param_str = "V16UcV16UcV16UcIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7084 // __builtin_msa_bmz_v
7085 .{ .tag = @enumFromInt(957), .properties = .{ .param_str = "V16UcV16UcV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7086 // __builtin_msa_bmzi_b
7087 .{ .tag = @enumFromInt(958), .properties = .{ .param_str = "V16UcV16UcV16UcIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7088 // __builtin_msa_bneg_b
7089 .{ .tag = @enumFromInt(959), .properties = .{ .param_str = "V16UcV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7090 // __builtin_msa_bneg_d
7091 .{ .tag = @enumFromInt(960), .properties = .{ .param_str = "V2ULLiV2ULLiV2ULLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7092 // __builtin_msa_bneg_h
7093 .{ .tag = @enumFromInt(961), .properties = .{ .param_str = "V8UsV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7094 // __builtin_msa_bneg_w
7095 .{ .tag = @enumFromInt(962), .properties = .{ .param_str = "V4UiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7096 // __builtin_msa_bnegi_b
7097 .{ .tag = @enumFromInt(963), .properties = .{ .param_str = "V16UcV16UcIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7098 // __builtin_msa_bnegi_d
7099 .{ .tag = @enumFromInt(964), .properties = .{ .param_str = "V2ULLiV2ULLiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7100 // __builtin_msa_bnegi_h
7101 .{ .tag = @enumFromInt(965), .properties = .{ .param_str = "V8UsV8UsIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7102 // __builtin_msa_bnegi_w
7103 .{ .tag = @enumFromInt(966), .properties = .{ .param_str = "V4UiV4UiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7104 // __builtin_msa_bnz_b
7105 .{ .tag = @enumFromInt(967), .properties = .{ .param_str = "iV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7106 // __builtin_msa_bnz_d
7107 .{ .tag = @enumFromInt(968), .properties = .{ .param_str = "iV2ULLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7108 // __builtin_msa_bnz_h
7109 .{ .tag = @enumFromInt(969), .properties = .{ .param_str = "iV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7110 // __builtin_msa_bnz_v
7111 .{ .tag = @enumFromInt(970), .properties = .{ .param_str = "iV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7112 // __builtin_msa_bnz_w
7113 .{ .tag = @enumFromInt(971), .properties = .{ .param_str = "iV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7114 // __builtin_msa_bsel_v
7115 .{ .tag = @enumFromInt(972), .properties = .{ .param_str = "V16UcV16UcV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7116 // __builtin_msa_bseli_b
7117 .{ .tag = @enumFromInt(973), .properties = .{ .param_str = "V16UcV16UcV16UcIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7118 // __builtin_msa_bset_b
7119 .{ .tag = @enumFromInt(974), .properties = .{ .param_str = "V16UcV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7120 // __builtin_msa_bset_d
7121 .{ .tag = @enumFromInt(975), .properties = .{ .param_str = "V2ULLiV2ULLiV2ULLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7122 // __builtin_msa_bset_h
7123 .{ .tag = @enumFromInt(976), .properties = .{ .param_str = "V8UsV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7124 // __builtin_msa_bset_w
7125 .{ .tag = @enumFromInt(977), .properties = .{ .param_str = "V4UiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7126 // __builtin_msa_bseti_b
7127 .{ .tag = @enumFromInt(978), .properties = .{ .param_str = "V16UcV16UcIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7128 // __builtin_msa_bseti_d
7129 .{ .tag = @enumFromInt(979), .properties = .{ .param_str = "V2ULLiV2ULLiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7130 // __builtin_msa_bseti_h
7131 .{ .tag = @enumFromInt(980), .properties = .{ .param_str = "V8UsV8UsIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7132 // __builtin_msa_bseti_w
7133 .{ .tag = @enumFromInt(981), .properties = .{ .param_str = "V4UiV4UiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7134 // __builtin_msa_bz_b
7135 .{ .tag = @enumFromInt(982), .properties = .{ .param_str = "iV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7136 // __builtin_msa_bz_d
7137 .{ .tag = @enumFromInt(983), .properties = .{ .param_str = "iV2ULLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7138 // __builtin_msa_bz_h
7139 .{ .tag = @enumFromInt(984), .properties = .{ .param_str = "iV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7140 // __builtin_msa_bz_v
7141 .{ .tag = @enumFromInt(985), .properties = .{ .param_str = "iV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7142 // __builtin_msa_bz_w
7143 .{ .tag = @enumFromInt(986), .properties = .{ .param_str = "iV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7144 // __builtin_msa_ceq_b
7145 .{ .tag = @enumFromInt(987), .properties = .{ .param_str = "V16ScV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7146 // __builtin_msa_ceq_d
7147 .{ .tag = @enumFromInt(988), .properties = .{ .param_str = "V2SLLiV2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7148 // __builtin_msa_ceq_h
7149 .{ .tag = @enumFromInt(989), .properties = .{ .param_str = "V8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7150 // __builtin_msa_ceq_w
7151 .{ .tag = @enumFromInt(990), .properties = .{ .param_str = "V4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7152 // __builtin_msa_ceqi_b
7153 .{ .tag = @enumFromInt(991), .properties = .{ .param_str = "V16ScV16ScISi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7154 // __builtin_msa_ceqi_d
7155 .{ .tag = @enumFromInt(992), .properties = .{ .param_str = "V2SLLiV2SLLiISi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7156 // __builtin_msa_ceqi_h
7157 .{ .tag = @enumFromInt(993), .properties = .{ .param_str = "V8SsV8SsISi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7158 // __builtin_msa_ceqi_w
7159 .{ .tag = @enumFromInt(994), .properties = .{ .param_str = "V4SiV4SiISi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7160 // __builtin_msa_cfcmsa
7161 .{ .tag = @enumFromInt(995), .properties = .{ .param_str = "iIi", .target_set = TargetSet.initOne(.mips) } },
7162 // __builtin_msa_cle_s_b
7163 .{ .tag = @enumFromInt(996), .properties = .{ .param_str = "V16ScV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7164 // __builtin_msa_cle_s_d
7165 .{ .tag = @enumFromInt(997), .properties = .{ .param_str = "V2SLLiV2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7166 // __builtin_msa_cle_s_h
7167 .{ .tag = @enumFromInt(998), .properties = .{ .param_str = "V8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7168 // __builtin_msa_cle_s_w
7169 .{ .tag = @enumFromInt(999), .properties = .{ .param_str = "V4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7170 // __builtin_msa_cle_u_b
7171 .{ .tag = @enumFromInt(1000), .properties = .{ .param_str = "V16ScV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7172 // __builtin_msa_cle_u_d
7173 .{ .tag = @enumFromInt(1001), .properties = .{ .param_str = "V2SLLiV2ULLiV2ULLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7174 // __builtin_msa_cle_u_h
7175 .{ .tag = @enumFromInt(1002), .properties = .{ .param_str = "V8SsV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7176 // __builtin_msa_cle_u_w
7177 .{ .tag = @enumFromInt(1003), .properties = .{ .param_str = "V4SiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7178 // __builtin_msa_clei_s_b
7179 .{ .tag = @enumFromInt(1004), .properties = .{ .param_str = "V16ScV16ScISi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7180 // __builtin_msa_clei_s_d
7181 .{ .tag = @enumFromInt(1005), .properties = .{ .param_str = "V2SLLiV2SLLiISi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7182 // __builtin_msa_clei_s_h
7183 .{ .tag = @enumFromInt(1006), .properties = .{ .param_str = "V8SsV8SsISi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7184 // __builtin_msa_clei_s_w
7185 .{ .tag = @enumFromInt(1007), .properties = .{ .param_str = "V4SiV4SiISi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7186 // __builtin_msa_clei_u_b
7187 .{ .tag = @enumFromInt(1008), .properties = .{ .param_str = "V16ScV16UcIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7188 // __builtin_msa_clei_u_d
7189 .{ .tag = @enumFromInt(1009), .properties = .{ .param_str = "V2SLLiV2ULLiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7190 // __builtin_msa_clei_u_h
7191 .{ .tag = @enumFromInt(1010), .properties = .{ .param_str = "V8SsV8UsIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7192 // __builtin_msa_clei_u_w
7193 .{ .tag = @enumFromInt(1011), .properties = .{ .param_str = "V4SiV4UiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7194 // __builtin_msa_clt_s_b
7195 .{ .tag = @enumFromInt(1012), .properties = .{ .param_str = "V16ScV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7196 // __builtin_msa_clt_s_d
7197 .{ .tag = @enumFromInt(1013), .properties = .{ .param_str = "V2SLLiV2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7198 // __builtin_msa_clt_s_h
7199 .{ .tag = @enumFromInt(1014), .properties = .{ .param_str = "V8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7200 // __builtin_msa_clt_s_w
7201 .{ .tag = @enumFromInt(1015), .properties = .{ .param_str = "V4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7202 // __builtin_msa_clt_u_b
7203 .{ .tag = @enumFromInt(1016), .properties = .{ .param_str = "V16ScV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7204 // __builtin_msa_clt_u_d
7205 .{ .tag = @enumFromInt(1017), .properties = .{ .param_str = "V2SLLiV2ULLiV2ULLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7206 // __builtin_msa_clt_u_h
7207 .{ .tag = @enumFromInt(1018), .properties = .{ .param_str = "V8SsV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7208 // __builtin_msa_clt_u_w
7209 .{ .tag = @enumFromInt(1019), .properties = .{ .param_str = "V4SiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7210 // __builtin_msa_clti_s_b
7211 .{ .tag = @enumFromInt(1020), .properties = .{ .param_str = "V16ScV16ScISi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7212 // __builtin_msa_clti_s_d
7213 .{ .tag = @enumFromInt(1021), .properties = .{ .param_str = "V2SLLiV2SLLiISi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7214 // __builtin_msa_clti_s_h
7215 .{ .tag = @enumFromInt(1022), .properties = .{ .param_str = "V8SsV8SsISi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7216 // __builtin_msa_clti_s_w
7217 .{ .tag = @enumFromInt(1023), .properties = .{ .param_str = "V4SiV4SiISi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7218 // __builtin_msa_clti_u_b
7219 .{ .tag = @enumFromInt(1024), .properties = .{ .param_str = "V16ScV16UcIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7220 // __builtin_msa_clti_u_d
7221 .{ .tag = @enumFromInt(1025), .properties = .{ .param_str = "V2SLLiV2ULLiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7222 // __builtin_msa_clti_u_h
7223 .{ .tag = @enumFromInt(1026), .properties = .{ .param_str = "V8SsV8UsIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7224 // __builtin_msa_clti_u_w
7225 .{ .tag = @enumFromInt(1027), .properties = .{ .param_str = "V4SiV4UiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7226 // __builtin_msa_copy_s_b
7227 .{ .tag = @enumFromInt(1028), .properties = .{ .param_str = "iV16ScIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7228 // __builtin_msa_copy_s_d
7229 .{ .tag = @enumFromInt(1029), .properties = .{ .param_str = "LLiV2SLLiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7230 // __builtin_msa_copy_s_h
7231 .{ .tag = @enumFromInt(1030), .properties = .{ .param_str = "iV8SsIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7232 // __builtin_msa_copy_s_w
7233 .{ .tag = @enumFromInt(1031), .properties = .{ .param_str = "iV4SiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7234 // __builtin_msa_copy_u_b
7235 .{ .tag = @enumFromInt(1032), .properties = .{ .param_str = "iV16UcIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7236 // __builtin_msa_copy_u_d
7237 .{ .tag = @enumFromInt(1033), .properties = .{ .param_str = "LLiV2ULLiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7238 // __builtin_msa_copy_u_h
7239 .{ .tag = @enumFromInt(1034), .properties = .{ .param_str = "iV8UsIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7240 // __builtin_msa_copy_u_w
7241 .{ .tag = @enumFromInt(1035), .properties = .{ .param_str = "iV4UiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7242 // __builtin_msa_ctcmsa
7243 .{ .tag = @enumFromInt(1036), .properties = .{ .param_str = "vIii", .target_set = TargetSet.initOne(.mips) } },
7244 // __builtin_msa_div_s_b
7245 .{ .tag = @enumFromInt(1037), .properties = .{ .param_str = "V16ScV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7246 // __builtin_msa_div_s_d
7247 .{ .tag = @enumFromInt(1038), .properties = .{ .param_str = "V2SLLiV2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7248 // __builtin_msa_div_s_h
7249 .{ .tag = @enumFromInt(1039), .properties = .{ .param_str = "V8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7250 // __builtin_msa_div_s_w
7251 .{ .tag = @enumFromInt(1040), .properties = .{ .param_str = "V4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7252 // __builtin_msa_div_u_b
7253 .{ .tag = @enumFromInt(1041), .properties = .{ .param_str = "V16UcV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7254 // __builtin_msa_div_u_d
7255 .{ .tag = @enumFromInt(1042), .properties = .{ .param_str = "V2ULLiV2ULLiV2ULLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7256 // __builtin_msa_div_u_h
7257 .{ .tag = @enumFromInt(1043), .properties = .{ .param_str = "V8UsV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7258 // __builtin_msa_div_u_w
7259 .{ .tag = @enumFromInt(1044), .properties = .{ .param_str = "V4UiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7260 // __builtin_msa_dotp_s_d
7261 .{ .tag = @enumFromInt(1045), .properties = .{ .param_str = "V2SLLiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7262 // __builtin_msa_dotp_s_h
7263 .{ .tag = @enumFromInt(1046), .properties = .{ .param_str = "V8SsV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7264 // __builtin_msa_dotp_s_w
7265 .{ .tag = @enumFromInt(1047), .properties = .{ .param_str = "V4SiV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7266 // __builtin_msa_dotp_u_d
7267 .{ .tag = @enumFromInt(1048), .properties = .{ .param_str = "V2ULLiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7268 // __builtin_msa_dotp_u_h
7269 .{ .tag = @enumFromInt(1049), .properties = .{ .param_str = "V8UsV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7270 // __builtin_msa_dotp_u_w
7271 .{ .tag = @enumFromInt(1050), .properties = .{ .param_str = "V4UiV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7272 // __builtin_msa_dpadd_s_d
7273 .{ .tag = @enumFromInt(1051), .properties = .{ .param_str = "V2SLLiV2SLLiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7274 // __builtin_msa_dpadd_s_h
7275 .{ .tag = @enumFromInt(1052), .properties = .{ .param_str = "V8SsV8SsV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7276 // __builtin_msa_dpadd_s_w
7277 .{ .tag = @enumFromInt(1053), .properties = .{ .param_str = "V4SiV4SiV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7278 // __builtin_msa_dpadd_u_d
7279 .{ .tag = @enumFromInt(1054), .properties = .{ .param_str = "V2ULLiV2ULLiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7280 // __builtin_msa_dpadd_u_h
7281 .{ .tag = @enumFromInt(1055), .properties = .{ .param_str = "V8UsV8UsV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7282 // __builtin_msa_dpadd_u_w
7283 .{ .tag = @enumFromInt(1056), .properties = .{ .param_str = "V4UiV4UiV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7284 // __builtin_msa_dpsub_s_d
7285 .{ .tag = @enumFromInt(1057), .properties = .{ .param_str = "V2SLLiV2SLLiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7286 // __builtin_msa_dpsub_s_h
7287 .{ .tag = @enumFromInt(1058), .properties = .{ .param_str = "V8SsV8SsV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7288 // __builtin_msa_dpsub_s_w
7289 .{ .tag = @enumFromInt(1059), .properties = .{ .param_str = "V4SiV4SiV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7290 // __builtin_msa_dpsub_u_d
7291 .{ .tag = @enumFromInt(1060), .properties = .{ .param_str = "V2ULLiV2ULLiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7292 // __builtin_msa_dpsub_u_h
7293 .{ .tag = @enumFromInt(1061), .properties = .{ .param_str = "V8UsV8UsV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7294 // __builtin_msa_dpsub_u_w
7295 .{ .tag = @enumFromInt(1062), .properties = .{ .param_str = "V4UiV4UiV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7296 // __builtin_msa_fadd_d
7297 .{ .tag = @enumFromInt(1063), .properties = .{ .param_str = "V2dV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7298 // __builtin_msa_fadd_w
7299 .{ .tag = @enumFromInt(1064), .properties = .{ .param_str = "V4fV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7300 // __builtin_msa_fcaf_d
7301 .{ .tag = @enumFromInt(1065), .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7302 // __builtin_msa_fcaf_w
7303 .{ .tag = @enumFromInt(1066), .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7304 // __builtin_msa_fceq_d
7305 .{ .tag = @enumFromInt(1067), .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7306 // __builtin_msa_fceq_w
7307 .{ .tag = @enumFromInt(1068), .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7308 // __builtin_msa_fclass_d
7309 .{ .tag = @enumFromInt(1069), .properties = .{ .param_str = "V2LLiV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7310 // __builtin_msa_fclass_w
7311 .{ .tag = @enumFromInt(1070), .properties = .{ .param_str = "V4iV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7312 // __builtin_msa_fcle_d
7313 .{ .tag = @enumFromInt(1071), .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7314 // __builtin_msa_fcle_w
7315 .{ .tag = @enumFromInt(1072), .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7316 // __builtin_msa_fclt_d
7317 .{ .tag = @enumFromInt(1073), .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7318 // __builtin_msa_fclt_w
7319 .{ .tag = @enumFromInt(1074), .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7320 // __builtin_msa_fcne_d
7321 .{ .tag = @enumFromInt(1075), .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7322 // __builtin_msa_fcne_w
7323 .{ .tag = @enumFromInt(1076), .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7324 // __builtin_msa_fcor_d
7325 .{ .tag = @enumFromInt(1077), .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7326 // __builtin_msa_fcor_w
7327 .{ .tag = @enumFromInt(1078), .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7328 // __builtin_msa_fcueq_d
7329 .{ .tag = @enumFromInt(1079), .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7330 // __builtin_msa_fcueq_w
7331 .{ .tag = @enumFromInt(1080), .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7332 // __builtin_msa_fcule_d
7333 .{ .tag = @enumFromInt(1081), .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7334 // __builtin_msa_fcule_w
7335 .{ .tag = @enumFromInt(1082), .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7336 // __builtin_msa_fcult_d
7337 .{ .tag = @enumFromInt(1083), .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7338 // __builtin_msa_fcult_w
7339 .{ .tag = @enumFromInt(1084), .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7340 // __builtin_msa_fcun_d
7341 .{ .tag = @enumFromInt(1085), .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7342 // __builtin_msa_fcun_w
7343 .{ .tag = @enumFromInt(1086), .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7344 // __builtin_msa_fcune_d
7345 .{ .tag = @enumFromInt(1087), .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7346 // __builtin_msa_fcune_w
7347 .{ .tag = @enumFromInt(1088), .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7348 // __builtin_msa_fdiv_d
7349 .{ .tag = @enumFromInt(1089), .properties = .{ .param_str = "V2dV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7350 // __builtin_msa_fdiv_w
7351 .{ .tag = @enumFromInt(1090), .properties = .{ .param_str = "V4fV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7352 // __builtin_msa_fexdo_h
7353 .{ .tag = @enumFromInt(1091), .properties = .{ .param_str = "V8hV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7354 // __builtin_msa_fexdo_w
7355 .{ .tag = @enumFromInt(1092), .properties = .{ .param_str = "V4fV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7356 // __builtin_msa_fexp2_d
7357 .{ .tag = @enumFromInt(1093), .properties = .{ .param_str = "V2dV2dV2LLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7358 // __builtin_msa_fexp2_w
7359 .{ .tag = @enumFromInt(1094), .properties = .{ .param_str = "V4fV4fV4i", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7360 // __builtin_msa_fexupl_d
7361 .{ .tag = @enumFromInt(1095), .properties = .{ .param_str = "V2dV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7362 // __builtin_msa_fexupl_w
7363 .{ .tag = @enumFromInt(1096), .properties = .{ .param_str = "V4fV8h", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7364 // __builtin_msa_fexupr_d
7365 .{ .tag = @enumFromInt(1097), .properties = .{ .param_str = "V2dV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7366 // __builtin_msa_fexupr_w
7367 .{ .tag = @enumFromInt(1098), .properties = .{ .param_str = "V4fV8h", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7368 // __builtin_msa_ffint_s_d
7369 .{ .tag = @enumFromInt(1099), .properties = .{ .param_str = "V2dV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7370 // __builtin_msa_ffint_s_w
7371 .{ .tag = @enumFromInt(1100), .properties = .{ .param_str = "V4fV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7372 // __builtin_msa_ffint_u_d
7373 .{ .tag = @enumFromInt(1101), .properties = .{ .param_str = "V2dV2ULLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7374 // __builtin_msa_ffint_u_w
7375 .{ .tag = @enumFromInt(1102), .properties = .{ .param_str = "V4fV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7376 // __builtin_msa_ffql_d
7377 .{ .tag = @enumFromInt(1103), .properties = .{ .param_str = "V2dV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7378 // __builtin_msa_ffql_w
7379 .{ .tag = @enumFromInt(1104), .properties = .{ .param_str = "V4fV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7380 // __builtin_msa_ffqr_d
7381 .{ .tag = @enumFromInt(1105), .properties = .{ .param_str = "V2dV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7382 // __builtin_msa_ffqr_w
7383 .{ .tag = @enumFromInt(1106), .properties = .{ .param_str = "V4fV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7384 // __builtin_msa_fill_b
7385 .{ .tag = @enumFromInt(1107), .properties = .{ .param_str = "V16Sci", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7386 // __builtin_msa_fill_d
7387 .{ .tag = @enumFromInt(1108), .properties = .{ .param_str = "V2SLLiLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7388 // __builtin_msa_fill_h
7389 .{ .tag = @enumFromInt(1109), .properties = .{ .param_str = "V8Ssi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7390 // __builtin_msa_fill_w
7391 .{ .tag = @enumFromInt(1110), .properties = .{ .param_str = "V4Sii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7392 // __builtin_msa_flog2_d
7393 .{ .tag = @enumFromInt(1111), .properties = .{ .param_str = "V2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7394 // __builtin_msa_flog2_w
7395 .{ .tag = @enumFromInt(1112), .properties = .{ .param_str = "V4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7396 // __builtin_msa_fmadd_d
7397 .{ .tag = @enumFromInt(1113), .properties = .{ .param_str = "V2dV2dV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7398 // __builtin_msa_fmadd_w
7399 .{ .tag = @enumFromInt(1114), .properties = .{ .param_str = "V4fV4fV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7400 // __builtin_msa_fmax_a_d
7401 .{ .tag = @enumFromInt(1115), .properties = .{ .param_str = "V2dV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7402 // __builtin_msa_fmax_a_w
7403 .{ .tag = @enumFromInt(1116), .properties = .{ .param_str = "V4fV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7404 // __builtin_msa_fmax_d
7405 .{ .tag = @enumFromInt(1117), .properties = .{ .param_str = "V2dV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7406 // __builtin_msa_fmax_w
7407 .{ .tag = @enumFromInt(1118), .properties = .{ .param_str = "V4fV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7408 // __builtin_msa_fmin_a_d
7409 .{ .tag = @enumFromInt(1119), .properties = .{ .param_str = "V2dV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7410 // __builtin_msa_fmin_a_w
7411 .{ .tag = @enumFromInt(1120), .properties = .{ .param_str = "V4fV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7412 // __builtin_msa_fmin_d
7413 .{ .tag = @enumFromInt(1121), .properties = .{ .param_str = "V2dV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7414 // __builtin_msa_fmin_w
7415 .{ .tag = @enumFromInt(1122), .properties = .{ .param_str = "V4fV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7416 // __builtin_msa_fmsub_d
7417 .{ .tag = @enumFromInt(1123), .properties = .{ .param_str = "V2dV2dV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7418 // __builtin_msa_fmsub_w
7419 .{ .tag = @enumFromInt(1124), .properties = .{ .param_str = "V4fV4fV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7420 // __builtin_msa_fmul_d
7421 .{ .tag = @enumFromInt(1125), .properties = .{ .param_str = "V2dV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7422 // __builtin_msa_fmul_w
7423 .{ .tag = @enumFromInt(1126), .properties = .{ .param_str = "V4fV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7424 // __builtin_msa_frcp_d
7425 .{ .tag = @enumFromInt(1127), .properties = .{ .param_str = "V2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7426 // __builtin_msa_frcp_w
7427 .{ .tag = @enumFromInt(1128), .properties = .{ .param_str = "V4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7428 // __builtin_msa_frint_d
7429 .{ .tag = @enumFromInt(1129), .properties = .{ .param_str = "V2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7430 // __builtin_msa_frint_w
7431 .{ .tag = @enumFromInt(1130), .properties = .{ .param_str = "V4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7432 // __builtin_msa_frsqrt_d
7433 .{ .tag = @enumFromInt(1131), .properties = .{ .param_str = "V2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7434 // __builtin_msa_frsqrt_w
7435 .{ .tag = @enumFromInt(1132), .properties = .{ .param_str = "V4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7436 // __builtin_msa_fsaf_d
7437 .{ .tag = @enumFromInt(1133), .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7438 // __builtin_msa_fsaf_w
7439 .{ .tag = @enumFromInt(1134), .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7440 // __builtin_msa_fseq_d
7441 .{ .tag = @enumFromInt(1135), .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7442 // __builtin_msa_fseq_w
7443 .{ .tag = @enumFromInt(1136), .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7444 // __builtin_msa_fsle_d
7445 .{ .tag = @enumFromInt(1137), .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7446 // __builtin_msa_fsle_w
7447 .{ .tag = @enumFromInt(1138), .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7448 // __builtin_msa_fslt_d
7449 .{ .tag = @enumFromInt(1139), .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7450 // __builtin_msa_fslt_w
7451 .{ .tag = @enumFromInt(1140), .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7452 // __builtin_msa_fsne_d
7453 .{ .tag = @enumFromInt(1141), .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7454 // __builtin_msa_fsne_w
7455 .{ .tag = @enumFromInt(1142), .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7456 // __builtin_msa_fsor_d
7457 .{ .tag = @enumFromInt(1143), .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7458 // __builtin_msa_fsor_w
7459 .{ .tag = @enumFromInt(1144), .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7460 // __builtin_msa_fsqrt_d
7461 .{ .tag = @enumFromInt(1145), .properties = .{ .param_str = "V2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7462 // __builtin_msa_fsqrt_w
7463 .{ .tag = @enumFromInt(1146), .properties = .{ .param_str = "V4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7464 // __builtin_msa_fsub_d
7465 .{ .tag = @enumFromInt(1147), .properties = .{ .param_str = "V2dV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7466 // __builtin_msa_fsub_w
7467 .{ .tag = @enumFromInt(1148), .properties = .{ .param_str = "V4fV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7468 // __builtin_msa_fsueq_d
7469 .{ .tag = @enumFromInt(1149), .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7470 // __builtin_msa_fsueq_w
7471 .{ .tag = @enumFromInt(1150), .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7472 // __builtin_msa_fsule_d
7473 .{ .tag = @enumFromInt(1151), .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7474 // __builtin_msa_fsule_w
7475 .{ .tag = @enumFromInt(1152), .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7476 // __builtin_msa_fsult_d
7477 .{ .tag = @enumFromInt(1153), .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7478 // __builtin_msa_fsult_w
7479 .{ .tag = @enumFromInt(1154), .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7480 // __builtin_msa_fsun_d
7481 .{ .tag = @enumFromInt(1155), .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7482 // __builtin_msa_fsun_w
7483 .{ .tag = @enumFromInt(1156), .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7484 // __builtin_msa_fsune_d
7485 .{ .tag = @enumFromInt(1157), .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7486 // __builtin_msa_fsune_w
7487 .{ .tag = @enumFromInt(1158), .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7488 // __builtin_msa_ftint_s_d
7489 .{ .tag = @enumFromInt(1159), .properties = .{ .param_str = "V2SLLiV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7490 // __builtin_msa_ftint_s_w
7491 .{ .tag = @enumFromInt(1160), .properties = .{ .param_str = "V4SiV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7492 // __builtin_msa_ftint_u_d
7493 .{ .tag = @enumFromInt(1161), .properties = .{ .param_str = "V2ULLiV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7494 // __builtin_msa_ftint_u_w
7495 .{ .tag = @enumFromInt(1162), .properties = .{ .param_str = "V4UiV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7496 // __builtin_msa_ftq_h
7497 .{ .tag = @enumFromInt(1163), .properties = .{ .param_str = "V4UiV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7498 // __builtin_msa_ftq_w
7499 .{ .tag = @enumFromInt(1164), .properties = .{ .param_str = "V2ULLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7500 // __builtin_msa_ftrunc_s_d
7501 .{ .tag = @enumFromInt(1165), .properties = .{ .param_str = "V2SLLiV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7502 // __builtin_msa_ftrunc_s_w
7503 .{ .tag = @enumFromInt(1166), .properties = .{ .param_str = "V4SiV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7504 // __builtin_msa_ftrunc_u_d
7505 .{ .tag = @enumFromInt(1167), .properties = .{ .param_str = "V2ULLiV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7506 // __builtin_msa_ftrunc_u_w
7507 .{ .tag = @enumFromInt(1168), .properties = .{ .param_str = "V4UiV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7508 // __builtin_msa_hadd_s_d
7509 .{ .tag = @enumFromInt(1169), .properties = .{ .param_str = "V2SLLiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7510 // __builtin_msa_hadd_s_h
7511 .{ .tag = @enumFromInt(1170), .properties = .{ .param_str = "V8SsV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7512 // __builtin_msa_hadd_s_w
7513 .{ .tag = @enumFromInt(1171), .properties = .{ .param_str = "V4SiV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7514 // __builtin_msa_hadd_u_d
7515 .{ .tag = @enumFromInt(1172), .properties = .{ .param_str = "V2ULLiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7516 // __builtin_msa_hadd_u_h
7517 .{ .tag = @enumFromInt(1173), .properties = .{ .param_str = "V8UsV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7518 // __builtin_msa_hadd_u_w
7519 .{ .tag = @enumFromInt(1174), .properties = .{ .param_str = "V4UiV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7520 // __builtin_msa_hsub_s_d
7521 .{ .tag = @enumFromInt(1175), .properties = .{ .param_str = "V2SLLiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7522 // __builtin_msa_hsub_s_h
7523 .{ .tag = @enumFromInt(1176), .properties = .{ .param_str = "V8SsV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7524 // __builtin_msa_hsub_s_w
7525 .{ .tag = @enumFromInt(1177), .properties = .{ .param_str = "V4SiV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7526 // __builtin_msa_hsub_u_d
7527 .{ .tag = @enumFromInt(1178), .properties = .{ .param_str = "V2ULLiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7528 // __builtin_msa_hsub_u_h
7529 .{ .tag = @enumFromInt(1179), .properties = .{ .param_str = "V8UsV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7530 // __builtin_msa_hsub_u_w
7531 .{ .tag = @enumFromInt(1180), .properties = .{ .param_str = "V4UiV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7532 // __builtin_msa_ilvev_b
7533 .{ .tag = @enumFromInt(1181), .properties = .{ .param_str = "V16cV16cV16c", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7534 // __builtin_msa_ilvev_d
7535 .{ .tag = @enumFromInt(1182), .properties = .{ .param_str = "V2LLiV2LLiV2LLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7536 // __builtin_msa_ilvev_h
7537 .{ .tag = @enumFromInt(1183), .properties = .{ .param_str = "V8sV8sV8s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7538 // __builtin_msa_ilvev_w
7539 .{ .tag = @enumFromInt(1184), .properties = .{ .param_str = "V4iV4iV4i", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7540 // __builtin_msa_ilvl_b
7541 .{ .tag = @enumFromInt(1185), .properties = .{ .param_str = "V16cV16cV16c", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7542 // __builtin_msa_ilvl_d
7543 .{ .tag = @enumFromInt(1186), .properties = .{ .param_str = "V2LLiV2LLiV2LLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7544 // __builtin_msa_ilvl_h
7545 .{ .tag = @enumFromInt(1187), .properties = .{ .param_str = "V8sV8sV8s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7546 // __builtin_msa_ilvl_w
7547 .{ .tag = @enumFromInt(1188), .properties = .{ .param_str = "V4iV4iV4i", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7548 // __builtin_msa_ilvod_b
7549 .{ .tag = @enumFromInt(1189), .properties = .{ .param_str = "V16cV16cV16c", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7550 // __builtin_msa_ilvod_d
7551 .{ .tag = @enumFromInt(1190), .properties = .{ .param_str = "V2LLiV2LLiV2LLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7552 // __builtin_msa_ilvod_h
7553 .{ .tag = @enumFromInt(1191), .properties = .{ .param_str = "V8sV8sV8s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7554 // __builtin_msa_ilvod_w
7555 .{ .tag = @enumFromInt(1192), .properties = .{ .param_str = "V4iV4iV4i", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7556 // __builtin_msa_ilvr_b
7557 .{ .tag = @enumFromInt(1193), .properties = .{ .param_str = "V16cV16cV16c", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7558 // __builtin_msa_ilvr_d
7559 .{ .tag = @enumFromInt(1194), .properties = .{ .param_str = "V2LLiV2LLiV2LLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7560 // __builtin_msa_ilvr_h
7561 .{ .tag = @enumFromInt(1195), .properties = .{ .param_str = "V8sV8sV8s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7562 // __builtin_msa_ilvr_w
7563 .{ .tag = @enumFromInt(1196), .properties = .{ .param_str = "V4iV4iV4i", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7564 // __builtin_msa_insert_b
7565 .{ .tag = @enumFromInt(1197), .properties = .{ .param_str = "V16ScV16ScIUii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7566 // __builtin_msa_insert_d
7567 .{ .tag = @enumFromInt(1198), .properties = .{ .param_str = "V2SLLiV2SLLiIUiLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7568 // __builtin_msa_insert_h
7569 .{ .tag = @enumFromInt(1199), .properties = .{ .param_str = "V8SsV8SsIUii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7570 // __builtin_msa_insert_w
7571 .{ .tag = @enumFromInt(1200), .properties = .{ .param_str = "V4SiV4SiIUii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7572 // __builtin_msa_insve_b
7573 .{ .tag = @enumFromInt(1201), .properties = .{ .param_str = "V16ScV16ScIUiV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7574 // __builtin_msa_insve_d
7575 .{ .tag = @enumFromInt(1202), .properties = .{ .param_str = "V2SLLiV2SLLiIUiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7576 // __builtin_msa_insve_h
7577 .{ .tag = @enumFromInt(1203), .properties = .{ .param_str = "V8SsV8SsIUiV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7578 // __builtin_msa_insve_w
7579 .{ .tag = @enumFromInt(1204), .properties = .{ .param_str = "V4SiV4SiIUiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7580 // __builtin_msa_ld_b
7581 .{ .tag = @enumFromInt(1205), .properties = .{ .param_str = "V16Scv*Ii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7582 // __builtin_msa_ld_d
7583 .{ .tag = @enumFromInt(1206), .properties = .{ .param_str = "V2SLLiv*Ii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7584 // __builtin_msa_ld_h
7585 .{ .tag = @enumFromInt(1207), .properties = .{ .param_str = "V8Ssv*Ii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7586 // __builtin_msa_ld_w
7587 .{ .tag = @enumFromInt(1208), .properties = .{ .param_str = "V4Siv*Ii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7588 // __builtin_msa_ldi_b
7589 .{ .tag = @enumFromInt(1209), .properties = .{ .param_str = "V16cIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7590 // __builtin_msa_ldi_d
7591 .{ .tag = @enumFromInt(1210), .properties = .{ .param_str = "V2LLiIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7592 // __builtin_msa_ldi_h
7593 .{ .tag = @enumFromInt(1211), .properties = .{ .param_str = "V8sIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7594 // __builtin_msa_ldi_w
7595 .{ .tag = @enumFromInt(1212), .properties = .{ .param_str = "V4iIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7596 // __builtin_msa_ldr_d
7597 .{ .tag = @enumFromInt(1213), .properties = .{ .param_str = "V2SLLiv*Ii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7598 // __builtin_msa_ldr_w
7599 .{ .tag = @enumFromInt(1214), .properties = .{ .param_str = "V4Siv*Ii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7600 // __builtin_msa_madd_q_h
7601 .{ .tag = @enumFromInt(1215), .properties = .{ .param_str = "V8SsV8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7602 // __builtin_msa_madd_q_w
7603 .{ .tag = @enumFromInt(1216), .properties = .{ .param_str = "V4SiV4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7604 // __builtin_msa_maddr_q_h
7605 .{ .tag = @enumFromInt(1217), .properties = .{ .param_str = "V8SsV8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7606 // __builtin_msa_maddr_q_w
7607 .{ .tag = @enumFromInt(1218), .properties = .{ .param_str = "V4SiV4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7608 // __builtin_msa_maddv_b
7609 .{ .tag = @enumFromInt(1219), .properties = .{ .param_str = "V16ScV16ScV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7610 // __builtin_msa_maddv_d
7611 .{ .tag = @enumFromInt(1220), .properties = .{ .param_str = "V2SLLiV2SLLiV2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7612 // __builtin_msa_maddv_h
7613 .{ .tag = @enumFromInt(1221), .properties = .{ .param_str = "V8SsV8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7614 // __builtin_msa_maddv_w
7615 .{ .tag = @enumFromInt(1222), .properties = .{ .param_str = "V4SiV4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7616 // __builtin_msa_max_a_b
7617 .{ .tag = @enumFromInt(1223), .properties = .{ .param_str = "V16ScV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7618 // __builtin_msa_max_a_d
7619 .{ .tag = @enumFromInt(1224), .properties = .{ .param_str = "V2SLLiV2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7620 // __builtin_msa_max_a_h
7621 .{ .tag = @enumFromInt(1225), .properties = .{ .param_str = "V8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7622 // __builtin_msa_max_a_w
7623 .{ .tag = @enumFromInt(1226), .properties = .{ .param_str = "V4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7624 // __builtin_msa_max_s_b
7625 .{ .tag = @enumFromInt(1227), .properties = .{ .param_str = "V16ScV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7626 // __builtin_msa_max_s_d
7627 .{ .tag = @enumFromInt(1228), .properties = .{ .param_str = "V2SLLiV2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7628 // __builtin_msa_max_s_h
7629 .{ .tag = @enumFromInt(1229), .properties = .{ .param_str = "V8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7630 // __builtin_msa_max_s_w
7631 .{ .tag = @enumFromInt(1230), .properties = .{ .param_str = "V4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7632 // __builtin_msa_max_u_b
7633 .{ .tag = @enumFromInt(1231), .properties = .{ .param_str = "V16UcV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7634 // __builtin_msa_max_u_d
7635 .{ .tag = @enumFromInt(1232), .properties = .{ .param_str = "V2ULLiV2ULLiV2ULLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7636 // __builtin_msa_max_u_h
7637 .{ .tag = @enumFromInt(1233), .properties = .{ .param_str = "V8UsV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7638 // __builtin_msa_max_u_w
7639 .{ .tag = @enumFromInt(1234), .properties = .{ .param_str = "V4UiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7640 // __builtin_msa_maxi_s_b
7641 .{ .tag = @enumFromInt(1235), .properties = .{ .param_str = "V16ScV16ScIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7642 // __builtin_msa_maxi_s_d
7643 .{ .tag = @enumFromInt(1236), .properties = .{ .param_str = "V2SLLiV2SLLiIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7644 // __builtin_msa_maxi_s_h
7645 .{ .tag = @enumFromInt(1237), .properties = .{ .param_str = "V8SsV8SsIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7646 // __builtin_msa_maxi_s_w
7647 .{ .tag = @enumFromInt(1238), .properties = .{ .param_str = "V4SiV4SiIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7648 // __builtin_msa_maxi_u_b
7649 .{ .tag = @enumFromInt(1239), .properties = .{ .param_str = "V16UcV16UcIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7650 // __builtin_msa_maxi_u_d
7651 .{ .tag = @enumFromInt(1240), .properties = .{ .param_str = "V2ULLiV2ULLiIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7652 // __builtin_msa_maxi_u_h
7653 .{ .tag = @enumFromInt(1241), .properties = .{ .param_str = "V8UsV8UsIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7654 // __builtin_msa_maxi_u_w
7655 .{ .tag = @enumFromInt(1242), .properties = .{ .param_str = "V4UiV4UiIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7656 // __builtin_msa_min_a_b
7657 .{ .tag = @enumFromInt(1243), .properties = .{ .param_str = "V16ScV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7658 // __builtin_msa_min_a_d
7659 .{ .tag = @enumFromInt(1244), .properties = .{ .param_str = "V2SLLiV2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7660 // __builtin_msa_min_a_h
7661 .{ .tag = @enumFromInt(1245), .properties = .{ .param_str = "V8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7662 // __builtin_msa_min_a_w
7663 .{ .tag = @enumFromInt(1246), .properties = .{ .param_str = "V4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7664 // __builtin_msa_min_s_b
7665 .{ .tag = @enumFromInt(1247), .properties = .{ .param_str = "V16ScV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7666 // __builtin_msa_min_s_d
7667 .{ .tag = @enumFromInt(1248), .properties = .{ .param_str = "V2SLLiV2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7668 // __builtin_msa_min_s_h
7669 .{ .tag = @enumFromInt(1249), .properties = .{ .param_str = "V8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7670 // __builtin_msa_min_s_w
7671 .{ .tag = @enumFromInt(1250), .properties = .{ .param_str = "V4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7672 // __builtin_msa_min_u_b
7673 .{ .tag = @enumFromInt(1251), .properties = .{ .param_str = "V16UcV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7674 // __builtin_msa_min_u_d
7675 .{ .tag = @enumFromInt(1252), .properties = .{ .param_str = "V2ULLiV2ULLiV2ULLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7676 // __builtin_msa_min_u_h
7677 .{ .tag = @enumFromInt(1253), .properties = .{ .param_str = "V8UsV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7678 // __builtin_msa_min_u_w
7679 .{ .tag = @enumFromInt(1254), .properties = .{ .param_str = "V4UiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7680 // __builtin_msa_mini_s_b
7681 .{ .tag = @enumFromInt(1255), .properties = .{ .param_str = "V16ScV16ScIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7682 // __builtin_msa_mini_s_d
7683 .{ .tag = @enumFromInt(1256), .properties = .{ .param_str = "V2SLLiV2SLLiIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7684 // __builtin_msa_mini_s_h
7685 .{ .tag = @enumFromInt(1257), .properties = .{ .param_str = "V8SsV8SsIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7686 // __builtin_msa_mini_s_w
7687 .{ .tag = @enumFromInt(1258), .properties = .{ .param_str = "V4SiV4SiIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7688 // __builtin_msa_mini_u_b
7689 .{ .tag = @enumFromInt(1259), .properties = .{ .param_str = "V16UcV16UcIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7690 // __builtin_msa_mini_u_d
7691 .{ .tag = @enumFromInt(1260), .properties = .{ .param_str = "V2ULLiV2ULLiIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7692 // __builtin_msa_mini_u_h
7693 .{ .tag = @enumFromInt(1261), .properties = .{ .param_str = "V8UsV8UsIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7694 // __builtin_msa_mini_u_w
7695 .{ .tag = @enumFromInt(1262), .properties = .{ .param_str = "V4UiV4UiIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7696 // __builtin_msa_mod_s_b
7697 .{ .tag = @enumFromInt(1263), .properties = .{ .param_str = "V16ScV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7698 // __builtin_msa_mod_s_d
7699 .{ .tag = @enumFromInt(1264), .properties = .{ .param_str = "V2SLLiV2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7700 // __builtin_msa_mod_s_h
7701 .{ .tag = @enumFromInt(1265), .properties = .{ .param_str = "V8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7702 // __builtin_msa_mod_s_w
7703 .{ .tag = @enumFromInt(1266), .properties = .{ .param_str = "V4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7704 // __builtin_msa_mod_u_b
7705 .{ .tag = @enumFromInt(1267), .properties = .{ .param_str = "V16UcV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7706 // __builtin_msa_mod_u_d
7707 .{ .tag = @enumFromInt(1268), .properties = .{ .param_str = "V2ULLiV2ULLiV2ULLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7708 // __builtin_msa_mod_u_h
7709 .{ .tag = @enumFromInt(1269), .properties = .{ .param_str = "V8UsV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7710 // __builtin_msa_mod_u_w
7711 .{ .tag = @enumFromInt(1270), .properties = .{ .param_str = "V4UiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7712 // __builtin_msa_move_v
7713 .{ .tag = @enumFromInt(1271), .properties = .{ .param_str = "V16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7714 // __builtin_msa_msub_q_h
7715 .{ .tag = @enumFromInt(1272), .properties = .{ .param_str = "V8SsV8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7716 // __builtin_msa_msub_q_w
7717 .{ .tag = @enumFromInt(1273), .properties = .{ .param_str = "V4SiV4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7718 // __builtin_msa_msubr_q_h
7719 .{ .tag = @enumFromInt(1274), .properties = .{ .param_str = "V8SsV8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7720 // __builtin_msa_msubr_q_w
7721 .{ .tag = @enumFromInt(1275), .properties = .{ .param_str = "V4SiV4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7722 // __builtin_msa_msubv_b
7723 .{ .tag = @enumFromInt(1276), .properties = .{ .param_str = "V16ScV16ScV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7724 // __builtin_msa_msubv_d
7725 .{ .tag = @enumFromInt(1277), .properties = .{ .param_str = "V2SLLiV2SLLiV2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7726 // __builtin_msa_msubv_h
7727 .{ .tag = @enumFromInt(1278), .properties = .{ .param_str = "V8SsV8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7728 // __builtin_msa_msubv_w
7729 .{ .tag = @enumFromInt(1279), .properties = .{ .param_str = "V4SiV4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7730 // __builtin_msa_mul_q_h
7731 .{ .tag = @enumFromInt(1280), .properties = .{ .param_str = "V8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7732 // __builtin_msa_mul_q_w
7733 .{ .tag = @enumFromInt(1281), .properties = .{ .param_str = "V4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7734 // __builtin_msa_mulr_q_h
7735 .{ .tag = @enumFromInt(1282), .properties = .{ .param_str = "V8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7736 // __builtin_msa_mulr_q_w
7737 .{ .tag = @enumFromInt(1283), .properties = .{ .param_str = "V4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7738 // __builtin_msa_mulv_b
7739 .{ .tag = @enumFromInt(1284), .properties = .{ .param_str = "V16ScV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7740 // __builtin_msa_mulv_d
7741 .{ .tag = @enumFromInt(1285), .properties = .{ .param_str = "V2SLLiV2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7742 // __builtin_msa_mulv_h
7743 .{ .tag = @enumFromInt(1286), .properties = .{ .param_str = "V8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7744 // __builtin_msa_mulv_w
7745 .{ .tag = @enumFromInt(1287), .properties = .{ .param_str = "V4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7746 // __builtin_msa_nloc_b
7747 .{ .tag = @enumFromInt(1288), .properties = .{ .param_str = "V16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7748 // __builtin_msa_nloc_d
7749 .{ .tag = @enumFromInt(1289), .properties = .{ .param_str = "V2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7750 // __builtin_msa_nloc_h
7751 .{ .tag = @enumFromInt(1290), .properties = .{ .param_str = "V8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7752 // __builtin_msa_nloc_w
7753 .{ .tag = @enumFromInt(1291), .properties = .{ .param_str = "V4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7754 // __builtin_msa_nlzc_b
7755 .{ .tag = @enumFromInt(1292), .properties = .{ .param_str = "V16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7756 // __builtin_msa_nlzc_d
7757 .{ .tag = @enumFromInt(1293), .properties = .{ .param_str = "V2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7758 // __builtin_msa_nlzc_h
7759 .{ .tag = @enumFromInt(1294), .properties = .{ .param_str = "V8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7760 // __builtin_msa_nlzc_w
7761 .{ .tag = @enumFromInt(1295), .properties = .{ .param_str = "V4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7762 // __builtin_msa_nor_v
7763 .{ .tag = @enumFromInt(1296), .properties = .{ .param_str = "V16UcV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7764 // __builtin_msa_nori_b
7765 .{ .tag = @enumFromInt(1297), .properties = .{ .param_str = "V16UcV16cIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7766 // __builtin_msa_or_v
7767 .{ .tag = @enumFromInt(1298), .properties = .{ .param_str = "V16UcV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7768 // __builtin_msa_ori_b
7769 .{ .tag = @enumFromInt(1299), .properties = .{ .param_str = "V16UcV16UcIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7770 // __builtin_msa_pckev_b
7771 .{ .tag = @enumFromInt(1300), .properties = .{ .param_str = "V16cV16cV16c", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7772 // __builtin_msa_pckev_d
7773 .{ .tag = @enumFromInt(1301), .properties = .{ .param_str = "V2LLiV2LLiV2LLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7774 // __builtin_msa_pckev_h
7775 .{ .tag = @enumFromInt(1302), .properties = .{ .param_str = "V8sV8sV8s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7776 // __builtin_msa_pckev_w
7777 .{ .tag = @enumFromInt(1303), .properties = .{ .param_str = "V4iV4iV4i", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7778 // __builtin_msa_pckod_b
7779 .{ .tag = @enumFromInt(1304), .properties = .{ .param_str = "V16cV16cV16c", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7780 // __builtin_msa_pckod_d
7781 .{ .tag = @enumFromInt(1305), .properties = .{ .param_str = "V2LLiV2LLiV2LLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7782 // __builtin_msa_pckod_h
7783 .{ .tag = @enumFromInt(1306), .properties = .{ .param_str = "V8sV8sV8s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7784 // __builtin_msa_pckod_w
7785 .{ .tag = @enumFromInt(1307), .properties = .{ .param_str = "V4iV4iV4i", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7786 // __builtin_msa_pcnt_b
7787 .{ .tag = @enumFromInt(1308), .properties = .{ .param_str = "V16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7788 // __builtin_msa_pcnt_d
7789 .{ .tag = @enumFromInt(1309), .properties = .{ .param_str = "V2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7790 // __builtin_msa_pcnt_h
7791 .{ .tag = @enumFromInt(1310), .properties = .{ .param_str = "V8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7792 // __builtin_msa_pcnt_w
7793 .{ .tag = @enumFromInt(1311), .properties = .{ .param_str = "V4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7794 // __builtin_msa_sat_s_b
7795 .{ .tag = @enumFromInt(1312), .properties = .{ .param_str = "V16ScV16ScIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7796 // __builtin_msa_sat_s_d
7797 .{ .tag = @enumFromInt(1313), .properties = .{ .param_str = "V2SLLiV2SLLiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7798 // __builtin_msa_sat_s_h
7799 .{ .tag = @enumFromInt(1314), .properties = .{ .param_str = "V8SsV8SsIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7800 // __builtin_msa_sat_s_w
7801 .{ .tag = @enumFromInt(1315), .properties = .{ .param_str = "V4SiV4SiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7802 // __builtin_msa_sat_u_b
7803 .{ .tag = @enumFromInt(1316), .properties = .{ .param_str = "V16UcV16UcIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7804 // __builtin_msa_sat_u_d
7805 .{ .tag = @enumFromInt(1317), .properties = .{ .param_str = "V2ULLiV2ULLiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7806 // __builtin_msa_sat_u_h
7807 .{ .tag = @enumFromInt(1318), .properties = .{ .param_str = "V8UsV8UsIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7808 // __builtin_msa_sat_u_w
7809 .{ .tag = @enumFromInt(1319), .properties = .{ .param_str = "V4UiV4UiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7810 // __builtin_msa_shf_b
7811 .{ .tag = @enumFromInt(1320), .properties = .{ .param_str = "V16cV16cIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7812 // __builtin_msa_shf_h
7813 .{ .tag = @enumFromInt(1321), .properties = .{ .param_str = "V8sV8sIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7814 // __builtin_msa_shf_w
7815 .{ .tag = @enumFromInt(1322), .properties = .{ .param_str = "V4iV4iIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7816 // __builtin_msa_sld_b
7817 .{ .tag = @enumFromInt(1323), .properties = .{ .param_str = "V16cV16cV16cUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7818 // __builtin_msa_sld_d
7819 .{ .tag = @enumFromInt(1324), .properties = .{ .param_str = "V2LLiV2LLiV2LLiUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7820 // __builtin_msa_sld_h
7821 .{ .tag = @enumFromInt(1325), .properties = .{ .param_str = "V8sV8sV8sUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7822 // __builtin_msa_sld_w
7823 .{ .tag = @enumFromInt(1326), .properties = .{ .param_str = "V4iV4iV4iUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7824 // __builtin_msa_sldi_b
7825 .{ .tag = @enumFromInt(1327), .properties = .{ .param_str = "V16cV16cV16cIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7826 // __builtin_msa_sldi_d
7827 .{ .tag = @enumFromInt(1328), .properties = .{ .param_str = "V2LLiV2LLiV2LLiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7828 // __builtin_msa_sldi_h
7829 .{ .tag = @enumFromInt(1329), .properties = .{ .param_str = "V8sV8sV8sIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7830 // __builtin_msa_sldi_w
7831 .{ .tag = @enumFromInt(1330), .properties = .{ .param_str = "V4iV4iV4iIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7832 // __builtin_msa_sll_b
7833 .{ .tag = @enumFromInt(1331), .properties = .{ .param_str = "V16cV16cV16c", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7834 // __builtin_msa_sll_d
7835 .{ .tag = @enumFromInt(1332), .properties = .{ .param_str = "V2LLiV2LLiV2LLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7836 // __builtin_msa_sll_h
7837 .{ .tag = @enumFromInt(1333), .properties = .{ .param_str = "V8sV8sV8s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7838 // __builtin_msa_sll_w
7839 .{ .tag = @enumFromInt(1334), .properties = .{ .param_str = "V4iV4iV4i", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7840 // __builtin_msa_slli_b
7841 .{ .tag = @enumFromInt(1335), .properties = .{ .param_str = "V16cV16cIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7842 // __builtin_msa_slli_d
7843 .{ .tag = @enumFromInt(1336), .properties = .{ .param_str = "V2LLiV2LLiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7844 // __builtin_msa_slli_h
7845 .{ .tag = @enumFromInt(1337), .properties = .{ .param_str = "V8sV8sIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7846 // __builtin_msa_slli_w
7847 .{ .tag = @enumFromInt(1338), .properties = .{ .param_str = "V4iV4iIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7848 // __builtin_msa_splat_b
7849 .{ .tag = @enumFromInt(1339), .properties = .{ .param_str = "V16cV16cUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7850 // __builtin_msa_splat_d
7851 .{ .tag = @enumFromInt(1340), .properties = .{ .param_str = "V2LLiV2LLiUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7852 // __builtin_msa_splat_h
7853 .{ .tag = @enumFromInt(1341), .properties = .{ .param_str = "V8sV8sUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7854 // __builtin_msa_splat_w
7855 .{ .tag = @enumFromInt(1342), .properties = .{ .param_str = "V4iV4iUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7856 // __builtin_msa_splati_b
7857 .{ .tag = @enumFromInt(1343), .properties = .{ .param_str = "V16cV16cIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7858 // __builtin_msa_splati_d
7859 .{ .tag = @enumFromInt(1344), .properties = .{ .param_str = "V2LLiV2LLiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7860 // __builtin_msa_splati_h
7861 .{ .tag = @enumFromInt(1345), .properties = .{ .param_str = "V8sV8sIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7862 // __builtin_msa_splati_w
7863 .{ .tag = @enumFromInt(1346), .properties = .{ .param_str = "V4iV4iIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7864 // __builtin_msa_sra_b
7865 .{ .tag = @enumFromInt(1347), .properties = .{ .param_str = "V16cV16cV16c", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7866 // __builtin_msa_sra_d
7867 .{ .tag = @enumFromInt(1348), .properties = .{ .param_str = "V2LLiV2LLiV2LLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7868 // __builtin_msa_sra_h
7869 .{ .tag = @enumFromInt(1349), .properties = .{ .param_str = "V8sV8sV8s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7870 // __builtin_msa_sra_w
7871 .{ .tag = @enumFromInt(1350), .properties = .{ .param_str = "V4iV4iV4i", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7872 // __builtin_msa_srai_b
7873 .{ .tag = @enumFromInt(1351), .properties = .{ .param_str = "V16cV16cIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7874 // __builtin_msa_srai_d
7875 .{ .tag = @enumFromInt(1352), .properties = .{ .param_str = "V2LLiV2LLiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7876 // __builtin_msa_srai_h
7877 .{ .tag = @enumFromInt(1353), .properties = .{ .param_str = "V8sV8sIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7878 // __builtin_msa_srai_w
7879 .{ .tag = @enumFromInt(1354), .properties = .{ .param_str = "V4iV4iIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7880 // __builtin_msa_srar_b
7881 .{ .tag = @enumFromInt(1355), .properties = .{ .param_str = "V16cV16cV16c", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7882 // __builtin_msa_srar_d
7883 .{ .tag = @enumFromInt(1356), .properties = .{ .param_str = "V2LLiV2LLiV2LLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7884 // __builtin_msa_srar_h
7885 .{ .tag = @enumFromInt(1357), .properties = .{ .param_str = "V8sV8sV8s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7886 // __builtin_msa_srar_w
7887 .{ .tag = @enumFromInt(1358), .properties = .{ .param_str = "V4iV4iV4i", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7888 // __builtin_msa_srari_b
7889 .{ .tag = @enumFromInt(1359), .properties = .{ .param_str = "V16cV16cIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7890 // __builtin_msa_srari_d
7891 .{ .tag = @enumFromInt(1360), .properties = .{ .param_str = "V2LLiV2LLiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7892 // __builtin_msa_srari_h
7893 .{ .tag = @enumFromInt(1361), .properties = .{ .param_str = "V8sV8sIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7894 // __builtin_msa_srari_w
7895 .{ .tag = @enumFromInt(1362), .properties = .{ .param_str = "V4iV4iIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7896 // __builtin_msa_srl_b
7897 .{ .tag = @enumFromInt(1363), .properties = .{ .param_str = "V16cV16cV16c", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7898 // __builtin_msa_srl_d
7899 .{ .tag = @enumFromInt(1364), .properties = .{ .param_str = "V2LLiV2LLiV2LLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7900 // __builtin_msa_srl_h
7901 .{ .tag = @enumFromInt(1365), .properties = .{ .param_str = "V8sV8sV8s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7902 // __builtin_msa_srl_w
7903 .{ .tag = @enumFromInt(1366), .properties = .{ .param_str = "V4iV4iV4i", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7904 // __builtin_msa_srli_b
7905 .{ .tag = @enumFromInt(1367), .properties = .{ .param_str = "V16cV16cIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7906 // __builtin_msa_srli_d
7907 .{ .tag = @enumFromInt(1368), .properties = .{ .param_str = "V2LLiV2LLiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7908 // __builtin_msa_srli_h
7909 .{ .tag = @enumFromInt(1369), .properties = .{ .param_str = "V8sV8sIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7910 // __builtin_msa_srli_w
7911 .{ .tag = @enumFromInt(1370), .properties = .{ .param_str = "V4iV4iIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7912 // __builtin_msa_srlr_b
7913 .{ .tag = @enumFromInt(1371), .properties = .{ .param_str = "V16cV16cV16c", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7914 // __builtin_msa_srlr_d
7915 .{ .tag = @enumFromInt(1372), .properties = .{ .param_str = "V2LLiV2LLiV2LLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7916 // __builtin_msa_srlr_h
7917 .{ .tag = @enumFromInt(1373), .properties = .{ .param_str = "V8sV8sV8s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7918 // __builtin_msa_srlr_w
7919 .{ .tag = @enumFromInt(1374), .properties = .{ .param_str = "V4iV4iV4i", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7920 // __builtin_msa_srlri_b
7921 .{ .tag = @enumFromInt(1375), .properties = .{ .param_str = "V16cV16cIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7922 // __builtin_msa_srlri_d
7923 .{ .tag = @enumFromInt(1376), .properties = .{ .param_str = "V2LLiV2LLiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7924 // __builtin_msa_srlri_h
7925 .{ .tag = @enumFromInt(1377), .properties = .{ .param_str = "V8sV8sIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7926 // __builtin_msa_srlri_w
7927 .{ .tag = @enumFromInt(1378), .properties = .{ .param_str = "V4iV4iIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7928 // __builtin_msa_st_b
7929 .{ .tag = @enumFromInt(1379), .properties = .{ .param_str = "vV16Scv*Ii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7930 // __builtin_msa_st_d
7931 .{ .tag = @enumFromInt(1380), .properties = .{ .param_str = "vV2SLLiv*Ii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7932 // __builtin_msa_st_h
7933 .{ .tag = @enumFromInt(1381), .properties = .{ .param_str = "vV8Ssv*Ii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7934 // __builtin_msa_st_w
7935 .{ .tag = @enumFromInt(1382), .properties = .{ .param_str = "vV4Siv*Ii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7936 // __builtin_msa_str_d
7937 .{ .tag = @enumFromInt(1383), .properties = .{ .param_str = "vV2SLLiv*Ii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7938 // __builtin_msa_str_w
7939 .{ .tag = @enumFromInt(1384), .properties = .{ .param_str = "vV4Siv*Ii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7940 // __builtin_msa_subs_s_b
7941 .{ .tag = @enumFromInt(1385), .properties = .{ .param_str = "V16ScV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7942 // __builtin_msa_subs_s_d
7943 .{ .tag = @enumFromInt(1386), .properties = .{ .param_str = "V2SLLiV2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7944 // __builtin_msa_subs_s_h
7945 .{ .tag = @enumFromInt(1387), .properties = .{ .param_str = "V8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7946 // __builtin_msa_subs_s_w
7947 .{ .tag = @enumFromInt(1388), .properties = .{ .param_str = "V4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7948 // __builtin_msa_subs_u_b
7949 .{ .tag = @enumFromInt(1389), .properties = .{ .param_str = "V16UcV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7950 // __builtin_msa_subs_u_d
7951 .{ .tag = @enumFromInt(1390), .properties = .{ .param_str = "V2ULLiV2ULLiV2ULLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7952 // __builtin_msa_subs_u_h
7953 .{ .tag = @enumFromInt(1391), .properties = .{ .param_str = "V8UsV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7954 // __builtin_msa_subs_u_w
7955 .{ .tag = @enumFromInt(1392), .properties = .{ .param_str = "V4UiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7956 // __builtin_msa_subsus_u_b
7957 .{ .tag = @enumFromInt(1393), .properties = .{ .param_str = "V16UcV16UcV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7958 // __builtin_msa_subsus_u_d
7959 .{ .tag = @enumFromInt(1394), .properties = .{ .param_str = "V2ULLiV2ULLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7960 // __builtin_msa_subsus_u_h
7961 .{ .tag = @enumFromInt(1395), .properties = .{ .param_str = "V8UsV8UsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7962 // __builtin_msa_subsus_u_w
7963 .{ .tag = @enumFromInt(1396), .properties = .{ .param_str = "V4UiV4UiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7964 // __builtin_msa_subsuu_s_b
7965 .{ .tag = @enumFromInt(1397), .properties = .{ .param_str = "V16ScV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7966 // __builtin_msa_subsuu_s_d
7967 .{ .tag = @enumFromInt(1398), .properties = .{ .param_str = "V2SLLiV2ULLiV2ULLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7968 // __builtin_msa_subsuu_s_h
7969 .{ .tag = @enumFromInt(1399), .properties = .{ .param_str = "V8SsV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7970 // __builtin_msa_subsuu_s_w
7971 .{ .tag = @enumFromInt(1400), .properties = .{ .param_str = "V4SiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7972 // __builtin_msa_subv_b
7973 .{ .tag = @enumFromInt(1401), .properties = .{ .param_str = "V16cV16cV16c", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7974 // __builtin_msa_subv_d
7975 .{ .tag = @enumFromInt(1402), .properties = .{ .param_str = "V2LLiV2LLiV2LLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7976 // __builtin_msa_subv_h
7977 .{ .tag = @enumFromInt(1403), .properties = .{ .param_str = "V8sV8sV8s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7978 // __builtin_msa_subv_w
7979 .{ .tag = @enumFromInt(1404), .properties = .{ .param_str = "V4iV4iV4i", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7980 // __builtin_msa_subvi_b
7981 .{ .tag = @enumFromInt(1405), .properties = .{ .param_str = "V16cV16cIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7982 // __builtin_msa_subvi_d
7983 .{ .tag = @enumFromInt(1406), .properties = .{ .param_str = "V2LLiV2LLiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7984 // __builtin_msa_subvi_h
7985 .{ .tag = @enumFromInt(1407), .properties = .{ .param_str = "V8sV8sIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7986 // __builtin_msa_subvi_w
7987 .{ .tag = @enumFromInt(1408), .properties = .{ .param_str = "V4iV4iIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7988 // __builtin_msa_vshf_b
7989 .{ .tag = @enumFromInt(1409), .properties = .{ .param_str = "V16cV16cV16cV16c", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7990 // __builtin_msa_vshf_d
7991 .{ .tag = @enumFromInt(1410), .properties = .{ .param_str = "V2LLiV2LLiV2LLiV2LLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7992 // __builtin_msa_vshf_h
7993 .{ .tag = @enumFromInt(1411), .properties = .{ .param_str = "V8sV8sV8sV8s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7994 // __builtin_msa_vshf_w
7995 .{ .tag = @enumFromInt(1412), .properties = .{ .param_str = "V4iV4iV4iV4i", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7996 // __builtin_msa_xor_v
7997 .{ .tag = @enumFromInt(1413), .properties = .{ .param_str = "V16cV16cV16c", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
7998 // __builtin_msa_xori_b
7999 .{ .tag = @enumFromInt(1414), .properties = .{ .param_str = "V16cV16cIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
8000 // __builtin_mul_overflow
8001 .{ .tag = @enumFromInt(1415), .properties = .{ .param_str = "b.", .attributes = .{ .custom_typecheck = true, .const_evaluable = true } } },
8002 // __builtin_nan
8003 .{ .tag = @enumFromInt(1416), .properties = .{ .param_str = "dcC*", .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
8004 // __builtin_nanf
8005 .{ .tag = @enumFromInt(1417), .properties = .{ .param_str = "fcC*", .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
8006 // __builtin_nanf128
8007 .{ .tag = @enumFromInt(1418), .properties = .{ .param_str = "LLdcC*", .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
8008 // __builtin_nanf16
8009 .{ .tag = @enumFromInt(1419), .properties = .{ .param_str = "xcC*", .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
8010 // __builtin_nanl
8011 .{ .tag = @enumFromInt(1420), .properties = .{ .param_str = "LdcC*", .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
8012 // __builtin_nans
8013 .{ .tag = @enumFromInt(1421), .properties = .{ .param_str = "dcC*", .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
8014 // __builtin_nansf
8015 .{ .tag = @enumFromInt(1422), .properties = .{ .param_str = "fcC*", .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
8016 // __builtin_nansf128
8017 .{ .tag = @enumFromInt(1423), .properties = .{ .param_str = "LLdcC*", .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
8018 // __builtin_nansf16
8019 .{ .tag = @enumFromInt(1424), .properties = .{ .param_str = "xcC*", .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
8020 // __builtin_nansl
8021 .{ .tag = @enumFromInt(1425), .properties = .{ .param_str = "LdcC*", .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
8022 // __builtin_nearbyint
8023 .{ .tag = @enumFromInt(1426), .properties = .{ .param_str = "dd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
8024 // __builtin_nearbyintf
8025 .{ .tag = @enumFromInt(1427), .properties = .{ .param_str = "ff", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
8026 // __builtin_nearbyintf128
8027 .{ .tag = @enumFromInt(1428), .properties = .{ .param_str = "LLdLLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
8028 // __builtin_nearbyintl
8029 .{ .tag = @enumFromInt(1429), .properties = .{ .param_str = "LdLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
8030 // __builtin_nextafter
8031 .{ .tag = @enumFromInt(1430), .properties = .{ .param_str = "ddd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8032 // __builtin_nextafterf
8033 .{ .tag = @enumFromInt(1431), .properties = .{ .param_str = "fff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8034 // __builtin_nextafterf128
8035 .{ .tag = @enumFromInt(1432), .properties = .{ .param_str = "LLdLLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8036 // __builtin_nextafterl
8037 .{ .tag = @enumFromInt(1433), .properties = .{ .param_str = "LdLdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8038 // __builtin_nexttoward
8039 .{ .tag = @enumFromInt(1434), .properties = .{ .param_str = "ddLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8040 // __builtin_nexttowardf
8041 .{ .tag = @enumFromInt(1435), .properties = .{ .param_str = "ffLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8042 // __builtin_nexttowardf128
8043 .{ .tag = @enumFromInt(1436), .properties = .{ .param_str = "LLdLLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8044 // __builtin_nexttowardl
8045 .{ .tag = @enumFromInt(1437), .properties = .{ .param_str = "LdLdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8046 // __builtin_nondeterministic_value
8047 .{ .tag = @enumFromInt(1438), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
8048 // __builtin_nontemporal_load
8049 .{ .tag = @enumFromInt(1439), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
8050 // __builtin_nontemporal_store
8051 .{ .tag = @enumFromInt(1440), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
8052 // __builtin_objc_memmove_collectable
8053 .{ .tag = @enumFromInt(1441), .properties = .{ .param_str = "v*v*vC*z", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
8054 // __builtin_object_size
8055 .{ .tag = @enumFromInt(1442), .properties = .{ .param_str = "zvC*i", .attributes = .{ .eval_args = false, .const_evaluable = true } } },
8056 // __builtin_operator_delete
8057 .{ .tag = @enumFromInt(1443), .properties = .{ .param_str = "vv*", .attributes = .{ .custom_typecheck = true, .const_evaluable = true } } },
8058 // __builtin_operator_new
8059 .{ .tag = @enumFromInt(1444), .properties = .{ .param_str = "v*z", .attributes = .{ .@"const" = true, .custom_typecheck = true, .const_evaluable = true } } },
8060 // __builtin_os_log_format
8061 .{ .tag = @enumFromInt(1445), .properties = .{ .param_str = "v*v*cC*.", .attributes = .{ .custom_typecheck = true, .format_kind = .printf } } },
8062 // __builtin_os_log_format_buffer_size
8063 .{ .tag = @enumFromInt(1446), .properties = .{ .param_str = "zcC*.", .attributes = .{ .custom_typecheck = true, .format_kind = .printf, .eval_args = false, .const_evaluable = true } } },
8064 // __builtin_pack_longdouble
8065 .{ .tag = @enumFromInt(1447), .properties = .{ .param_str = "Lddd", .target_set = TargetSet.initOne(.ppc) } },
8066 // __builtin_parity
8067 .{ .tag = @enumFromInt(1448), .properties = .{ .param_str = "iUi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
8068 // __builtin_parityl
8069 .{ .tag = @enumFromInt(1449), .properties = .{ .param_str = "iULi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
8070 // __builtin_parityll
8071 .{ .tag = @enumFromInt(1450), .properties = .{ .param_str = "iULLi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
8072 // __builtin_popcount
8073 .{ .tag = @enumFromInt(1451), .properties = .{ .param_str = "iUi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
8074 // __builtin_popcountl
8075 .{ .tag = @enumFromInt(1452), .properties = .{ .param_str = "iULi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
8076 // __builtin_popcountll
8077 .{ .tag = @enumFromInt(1453), .properties = .{ .param_str = "iULLi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
8078 // __builtin_pow
8079 .{ .tag = @enumFromInt(1454), .properties = .{ .param_str = "ddd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8080 // __builtin_powf
8081 .{ .tag = @enumFromInt(1455), .properties = .{ .param_str = "fff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8082 // __builtin_powf128
8083 .{ .tag = @enumFromInt(1456), .properties = .{ .param_str = "LLdLLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8084 // __builtin_powf16
8085 .{ .tag = @enumFromInt(1457), .properties = .{ .param_str = "hhh", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8086 // __builtin_powi
8087 .{ .tag = @enumFromInt(1458), .properties = .{ .param_str = "ddi", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
8088 // __builtin_powif
8089 .{ .tag = @enumFromInt(1459), .properties = .{ .param_str = "ffi", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
8090 // __builtin_powil
8091 .{ .tag = @enumFromInt(1460), .properties = .{ .param_str = "LdLdi", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
8092 // __builtin_powl
8093 .{ .tag = @enumFromInt(1461), .properties = .{ .param_str = "LdLdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8094 // __builtin_ppc_alignx
8095 .{ .tag = @enumFromInt(1462), .properties = .{ .param_str = "vIivC*", .target_set = TargetSet.initOne(.ppc), .attributes = .{ .@"const" = true } } },
8096 // __builtin_ppc_cmpb
8097 .{ .tag = @enumFromInt(1463), .properties = .{ .param_str = "LLiLLiLLi", .target_set = TargetSet.initOne(.ppc) } },
8098 // __builtin_ppc_compare_and_swap
8099 .{ .tag = @enumFromInt(1464), .properties = .{ .param_str = "iiD*i*i", .target_set = TargetSet.initOne(.ppc) } },
8100 // __builtin_ppc_compare_and_swaplp
8101 .{ .tag = @enumFromInt(1465), .properties = .{ .param_str = "iLiD*Li*Li", .target_set = TargetSet.initOne(.ppc) } },
8102 // __builtin_ppc_dcbfl
8103 .{ .tag = @enumFromInt(1466), .properties = .{ .param_str = "vvC*", .target_set = TargetSet.initOne(.ppc) } },
8104 // __builtin_ppc_dcbflp
8105 .{ .tag = @enumFromInt(1467), .properties = .{ .param_str = "vvC*", .target_set = TargetSet.initOne(.ppc) } },
8106 // __builtin_ppc_dcbst
8107 .{ .tag = @enumFromInt(1468), .properties = .{ .param_str = "vvC*", .target_set = TargetSet.initOne(.ppc) } },
8108 // __builtin_ppc_dcbt
8109 .{ .tag = @enumFromInt(1469), .properties = .{ .param_str = "vv*", .target_set = TargetSet.initOne(.ppc) } },
8110 // __builtin_ppc_dcbtst
8111 .{ .tag = @enumFromInt(1470), .properties = .{ .param_str = "vv*", .target_set = TargetSet.initOne(.ppc) } },
8112 // __builtin_ppc_dcbtstt
8113 .{ .tag = @enumFromInt(1471), .properties = .{ .param_str = "vv*", .target_set = TargetSet.initOne(.ppc) } },
8114 // __builtin_ppc_dcbtt
8115 .{ .tag = @enumFromInt(1472), .properties = .{ .param_str = "vv*", .target_set = TargetSet.initOne(.ppc) } },
8116 // __builtin_ppc_dcbz
8117 .{ .tag = @enumFromInt(1473), .properties = .{ .param_str = "vv*", .target_set = TargetSet.initOne(.ppc) } },
8118 // __builtin_ppc_eieio
8119 .{ .tag = @enumFromInt(1474), .properties = .{ .param_str = "v", .target_set = TargetSet.initOne(.ppc) } },
8120 // __builtin_ppc_fcfid
8121 .{ .tag = @enumFromInt(1475), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.ppc) } },
8122 // __builtin_ppc_fcfud
8123 .{ .tag = @enumFromInt(1476), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.ppc) } },
8124 // __builtin_ppc_fctid
8125 .{ .tag = @enumFromInt(1477), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.ppc) } },
8126 // __builtin_ppc_fctidz
8127 .{ .tag = @enumFromInt(1478), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.ppc) } },
8128 // __builtin_ppc_fctiw
8129 .{ .tag = @enumFromInt(1479), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.ppc) } },
8130 // __builtin_ppc_fctiwz
8131 .{ .tag = @enumFromInt(1480), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.ppc) } },
8132 // __builtin_ppc_fctudz
8133 .{ .tag = @enumFromInt(1481), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.ppc) } },
8134 // __builtin_ppc_fctuwz
8135 .{ .tag = @enumFromInt(1482), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.ppc) } },
8136 // __builtin_ppc_fetch_and_add
8137 .{ .tag = @enumFromInt(1483), .properties = .{ .param_str = "iiD*i", .target_set = TargetSet.initOne(.ppc) } },
8138 // __builtin_ppc_fetch_and_addlp
8139 .{ .tag = @enumFromInt(1484), .properties = .{ .param_str = "LiLiD*Li", .target_set = TargetSet.initOne(.ppc) } },
8140 // __builtin_ppc_fetch_and_and
8141 .{ .tag = @enumFromInt(1485), .properties = .{ .param_str = "UiUiD*Ui", .target_set = TargetSet.initOne(.ppc) } },
8142 // __builtin_ppc_fetch_and_andlp
8143 .{ .tag = @enumFromInt(1486), .properties = .{ .param_str = "ULiULiD*ULi", .target_set = TargetSet.initOne(.ppc) } },
8144 // __builtin_ppc_fetch_and_or
8145 .{ .tag = @enumFromInt(1487), .properties = .{ .param_str = "UiUiD*Ui", .target_set = TargetSet.initOne(.ppc) } },
8146 // __builtin_ppc_fetch_and_orlp
8147 .{ .tag = @enumFromInt(1488), .properties = .{ .param_str = "ULiULiD*ULi", .target_set = TargetSet.initOne(.ppc) } },
8148 // __builtin_ppc_fetch_and_swap
8149 .{ .tag = @enumFromInt(1489), .properties = .{ .param_str = "UiUiD*Ui", .target_set = TargetSet.initOne(.ppc) } },
8150 // __builtin_ppc_fetch_and_swaplp
8151 .{ .tag = @enumFromInt(1490), .properties = .{ .param_str = "ULiULiD*ULi", .target_set = TargetSet.initOne(.ppc) } },
8152 // __builtin_ppc_fmsub
8153 .{ .tag = @enumFromInt(1491), .properties = .{ .param_str = "dddd", .target_set = TargetSet.initOne(.ppc) } },
8154 // __builtin_ppc_fmsubs
8155 .{ .tag = @enumFromInt(1492), .properties = .{ .param_str = "ffff", .target_set = TargetSet.initOne(.ppc) } },
8156 // __builtin_ppc_fnabs
8157 .{ .tag = @enumFromInt(1493), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.ppc) } },
8158 // __builtin_ppc_fnabss
8159 .{ .tag = @enumFromInt(1494), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.ppc) } },
8160 // __builtin_ppc_fnmadd
8161 .{ .tag = @enumFromInt(1495), .properties = .{ .param_str = "dddd", .target_set = TargetSet.initOne(.ppc) } },
8162 // __builtin_ppc_fnmadds
8163 .{ .tag = @enumFromInt(1496), .properties = .{ .param_str = "ffff", .target_set = TargetSet.initOne(.ppc) } },
8164 // __builtin_ppc_fnmsub
8165 .{ .tag = @enumFromInt(1497), .properties = .{ .param_str = "dddd", .target_set = TargetSet.initOne(.ppc) } },
8166 // __builtin_ppc_fnmsubs
8167 .{ .tag = @enumFromInt(1498), .properties = .{ .param_str = "ffff", .target_set = TargetSet.initOne(.ppc) } },
8168 // __builtin_ppc_fre
8169 .{ .tag = @enumFromInt(1499), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.ppc) } },
8170 // __builtin_ppc_fres
8171 .{ .tag = @enumFromInt(1500), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.ppc) } },
8172 // __builtin_ppc_fric
8173 .{ .tag = @enumFromInt(1501), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.ppc) } },
8174 // __builtin_ppc_frim
8175 .{ .tag = @enumFromInt(1502), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.ppc) } },
8176 // __builtin_ppc_frims
8177 .{ .tag = @enumFromInt(1503), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.ppc) } },
8178 // __builtin_ppc_frin
8179 .{ .tag = @enumFromInt(1504), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.ppc) } },
8180 // __builtin_ppc_frins
8181 .{ .tag = @enumFromInt(1505), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.ppc) } },
8182 // __builtin_ppc_frip
8183 .{ .tag = @enumFromInt(1506), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.ppc) } },
8184 // __builtin_ppc_frips
8185 .{ .tag = @enumFromInt(1507), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.ppc) } },
8186 // __builtin_ppc_friz
8187 .{ .tag = @enumFromInt(1508), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.ppc) } },
8188 // __builtin_ppc_frizs
8189 .{ .tag = @enumFromInt(1509), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.ppc) } },
8190 // __builtin_ppc_frsqrte
8191 .{ .tag = @enumFromInt(1510), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.ppc) } },
8192 // __builtin_ppc_frsqrtes
8193 .{ .tag = @enumFromInt(1511), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.ppc) } },
8194 // __builtin_ppc_fsel
8195 .{ .tag = @enumFromInt(1512), .properties = .{ .param_str = "dddd", .target_set = TargetSet.initOne(.ppc) } },
8196 // __builtin_ppc_fsels
8197 .{ .tag = @enumFromInt(1513), .properties = .{ .param_str = "ffff", .target_set = TargetSet.initOne(.ppc) } },
8198 // __builtin_ppc_fsqrt
8199 .{ .tag = @enumFromInt(1514), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.ppc) } },
8200 // __builtin_ppc_fsqrts
8201 .{ .tag = @enumFromInt(1515), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.ppc) } },
8202 // __builtin_ppc_get_timebase
8203 .{ .tag = @enumFromInt(1516), .properties = .{ .param_str = "ULLi", .target_set = TargetSet.initOne(.ppc) } },
8204 // __builtin_ppc_iospace_eieio
8205 .{ .tag = @enumFromInt(1517), .properties = .{ .param_str = "v", .target_set = TargetSet.initOne(.ppc) } },
8206 // __builtin_ppc_iospace_lwsync
8207 .{ .tag = @enumFromInt(1518), .properties = .{ .param_str = "v", .target_set = TargetSet.initOne(.ppc) } },
8208 // __builtin_ppc_iospace_sync
8209 .{ .tag = @enumFromInt(1519), .properties = .{ .param_str = "v", .target_set = TargetSet.initOne(.ppc) } },
8210 // __builtin_ppc_isync
8211 .{ .tag = @enumFromInt(1520), .properties = .{ .param_str = "v", .target_set = TargetSet.initOne(.ppc) } },
8212 // __builtin_ppc_ldarx
8213 .{ .tag = @enumFromInt(1521), .properties = .{ .param_str = "LiLiD*", .target_set = TargetSet.initOne(.ppc) } },
8214 // __builtin_ppc_load2r
8215 .{ .tag = @enumFromInt(1522), .properties = .{ .param_str = "UsUs*", .target_set = TargetSet.initOne(.ppc) } },
8216 // __builtin_ppc_load4r
8217 .{ .tag = @enumFromInt(1523), .properties = .{ .param_str = "UiUi*", .target_set = TargetSet.initOne(.ppc) } },
8218 // __builtin_ppc_lwarx
8219 .{ .tag = @enumFromInt(1524), .properties = .{ .param_str = "iiD*", .target_set = TargetSet.initOne(.ppc) } },
8220 // __builtin_ppc_lwsync
8221 .{ .tag = @enumFromInt(1525), .properties = .{ .param_str = "v", .target_set = TargetSet.initOne(.ppc) } },
8222 // __builtin_ppc_maxfe
8223 .{ .tag = @enumFromInt(1526), .properties = .{ .param_str = "LdLdLdLd.", .target_set = TargetSet.initOne(.ppc), .attributes = .{ .custom_typecheck = true } } },
8224 // __builtin_ppc_maxfl
8225 .{ .tag = @enumFromInt(1527), .properties = .{ .param_str = "dddd.", .target_set = TargetSet.initOne(.ppc), .attributes = .{ .custom_typecheck = true } } },
8226 // __builtin_ppc_maxfs
8227 .{ .tag = @enumFromInt(1528), .properties = .{ .param_str = "ffff.", .target_set = TargetSet.initOne(.ppc), .attributes = .{ .custom_typecheck = true } } },
8228 // __builtin_ppc_mfmsr
8229 .{ .tag = @enumFromInt(1529), .properties = .{ .param_str = "Ui", .target_set = TargetSet.initOne(.ppc) } },
8230 // __builtin_ppc_mfspr
8231 .{ .tag = @enumFromInt(1530), .properties = .{ .param_str = "ULiIi", .target_set = TargetSet.initOne(.ppc) } },
8232 // __builtin_ppc_mftbu
8233 .{ .tag = @enumFromInt(1531), .properties = .{ .param_str = "Ui", .target_set = TargetSet.initOne(.ppc) } },
8234 // __builtin_ppc_minfe
8235 .{ .tag = @enumFromInt(1532), .properties = .{ .param_str = "LdLdLdLd.", .target_set = TargetSet.initOne(.ppc), .attributes = .{ .custom_typecheck = true } } },
8236 // __builtin_ppc_minfl
8237 .{ .tag = @enumFromInt(1533), .properties = .{ .param_str = "dddd.", .target_set = TargetSet.initOne(.ppc), .attributes = .{ .custom_typecheck = true } } },
8238 // __builtin_ppc_minfs
8239 .{ .tag = @enumFromInt(1534), .properties = .{ .param_str = "ffff.", .target_set = TargetSet.initOne(.ppc), .attributes = .{ .custom_typecheck = true } } },
8240 // __builtin_ppc_mtfsb0
8241 .{ .tag = @enumFromInt(1535), .properties = .{ .param_str = "vUIi", .target_set = TargetSet.initOne(.ppc) } },
8242 // __builtin_ppc_mtfsb1
8243 .{ .tag = @enumFromInt(1536), .properties = .{ .param_str = "vUIi", .target_set = TargetSet.initOne(.ppc) } },
8244 // __builtin_ppc_mtfsf
8245 .{ .tag = @enumFromInt(1537), .properties = .{ .param_str = "vUIiUi", .target_set = TargetSet.initOne(.ppc) } },
8246 // __builtin_ppc_mtfsfi
8247 .{ .tag = @enumFromInt(1538), .properties = .{ .param_str = "vUIiUIi", .target_set = TargetSet.initOne(.ppc) } },
8248 // __builtin_ppc_mtmsr
8249 .{ .tag = @enumFromInt(1539), .properties = .{ .param_str = "vUi", .target_set = TargetSet.initOne(.ppc) } },
8250 // __builtin_ppc_mtspr
8251 .{ .tag = @enumFromInt(1540), .properties = .{ .param_str = "vIiULi", .target_set = TargetSet.initOne(.ppc) } },
8252 // __builtin_ppc_mulhd
8253 .{ .tag = @enumFromInt(1541), .properties = .{ .param_str = "LLiLiLi", .target_set = TargetSet.initOne(.ppc) } },
8254 // __builtin_ppc_mulhdu
8255 .{ .tag = @enumFromInt(1542), .properties = .{ .param_str = "ULLiULiULi", .target_set = TargetSet.initOne(.ppc) } },
8256 // __builtin_ppc_mulhw
8257 .{ .tag = @enumFromInt(1543), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.ppc) } },
8258 // __builtin_ppc_mulhwu
8259 .{ .tag = @enumFromInt(1544), .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.ppc) } },
8260 // __builtin_ppc_popcntb
8261 .{ .tag = @enumFromInt(1545), .properties = .{ .param_str = "ULiULi", .target_set = TargetSet.initOne(.ppc) } },
8262 // __builtin_ppc_poppar4
8263 .{ .tag = @enumFromInt(1546), .properties = .{ .param_str = "iUi", .target_set = TargetSet.initOne(.ppc) } },
8264 // __builtin_ppc_poppar8
8265 .{ .tag = @enumFromInt(1547), .properties = .{ .param_str = "iULLi", .target_set = TargetSet.initOne(.ppc) } },
8266 // __builtin_ppc_rdlam
8267 .{ .tag = @enumFromInt(1548), .properties = .{ .param_str = "UWiUWiUWiUWIi", .target_set = TargetSet.initOne(.ppc), .attributes = .{ .@"const" = true } } },
8268 // __builtin_ppc_recipdivd
8269 .{ .tag = @enumFromInt(1549), .properties = .{ .param_str = "V2dV2dV2d", .target_set = TargetSet.initOne(.ppc) } },
8270 // __builtin_ppc_recipdivf
8271 .{ .tag = @enumFromInt(1550), .properties = .{ .param_str = "V4fV4fV4f", .target_set = TargetSet.initOne(.ppc) } },
8272 // __builtin_ppc_rldimi
8273 .{ .tag = @enumFromInt(1551), .properties = .{ .param_str = "ULLiULLiULLiIUiIULLi", .target_set = TargetSet.initOne(.ppc) } },
8274 // __builtin_ppc_rlwimi
8275 .{ .tag = @enumFromInt(1552), .properties = .{ .param_str = "UiUiUiIUiIUi", .target_set = TargetSet.initOne(.ppc) } },
8276 // __builtin_ppc_rlwnm
8277 .{ .tag = @enumFromInt(1553), .properties = .{ .param_str = "UiUiUiIUi", .target_set = TargetSet.initOne(.ppc) } },
8278 // __builtin_ppc_rsqrtd
8279 .{ .tag = @enumFromInt(1554), .properties = .{ .param_str = "V2dV2d", .target_set = TargetSet.initOne(.ppc) } },
8280 // __builtin_ppc_rsqrtf
8281 .{ .tag = @enumFromInt(1555), .properties = .{ .param_str = "V4fV4f", .target_set = TargetSet.initOne(.ppc) } },
8282 // __builtin_ppc_stdcx
8283 .{ .tag = @enumFromInt(1556), .properties = .{ .param_str = "iLiD*Li", .target_set = TargetSet.initOne(.ppc) } },
8284 // __builtin_ppc_stfiw
8285 .{ .tag = @enumFromInt(1557), .properties = .{ .param_str = "viC*d", .target_set = TargetSet.initOne(.ppc) } },
8286 // __builtin_ppc_store2r
8287 .{ .tag = @enumFromInt(1558), .properties = .{ .param_str = "vUiUs*", .target_set = TargetSet.initOne(.ppc) } },
8288 // __builtin_ppc_store4r
8289 .{ .tag = @enumFromInt(1559), .properties = .{ .param_str = "vUiUi*", .target_set = TargetSet.initOne(.ppc) } },
8290 // __builtin_ppc_stwcx
8291 .{ .tag = @enumFromInt(1560), .properties = .{ .param_str = "iiD*i", .target_set = TargetSet.initOne(.ppc) } },
8292 // __builtin_ppc_swdiv
8293 .{ .tag = @enumFromInt(1561), .properties = .{ .param_str = "ddd", .target_set = TargetSet.initOne(.ppc) } },
8294 // __builtin_ppc_swdiv_nochk
8295 .{ .tag = @enumFromInt(1562), .properties = .{ .param_str = "ddd", .target_set = TargetSet.initOne(.ppc) } },
8296 // __builtin_ppc_swdivs
8297 .{ .tag = @enumFromInt(1563), .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.ppc) } },
8298 // __builtin_ppc_swdivs_nochk
8299 .{ .tag = @enumFromInt(1564), .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.ppc) } },
8300 // __builtin_ppc_sync
8301 .{ .tag = @enumFromInt(1565), .properties = .{ .param_str = "v", .target_set = TargetSet.initOne(.ppc) } },
8302 // __builtin_ppc_tdw
8303 .{ .tag = @enumFromInt(1566), .properties = .{ .param_str = "vLLiLLiIUi", .target_set = TargetSet.initOne(.ppc) } },
8304 // __builtin_ppc_trap
8305 .{ .tag = @enumFromInt(1567), .properties = .{ .param_str = "vi", .target_set = TargetSet.initOne(.ppc) } },
8306 // __builtin_ppc_trapd
8307 .{ .tag = @enumFromInt(1568), .properties = .{ .param_str = "vLi", .target_set = TargetSet.initOne(.ppc) } },
8308 // __builtin_ppc_tw
8309 .{ .tag = @enumFromInt(1569), .properties = .{ .param_str = "viiIUi", .target_set = TargetSet.initOne(.ppc) } },
8310 // __builtin_prefetch
8311 .{ .tag = @enumFromInt(1570), .properties = .{ .param_str = "vvC*.", .attributes = .{ .@"const" = true } } },
8312 // __builtin_preserve_access_index
8313 .{ .tag = @enumFromInt(1571), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
8314 // __builtin_printf
8315 .{ .tag = @enumFromInt(1572), .properties = .{ .param_str = "icC*R.", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .printf } } },
8316 // __builtin_ptx_get_image_channel_data_typei_
8317 .{ .tag = @enumFromInt(1573), .properties = .{ .param_str = "ii", .target_set = TargetSet.initOne(.nvptx) } },
8318 // __builtin_ptx_get_image_channel_orderi_
8319 .{ .tag = @enumFromInt(1574), .properties = .{ .param_str = "ii", .target_set = TargetSet.initOne(.nvptx) } },
8320 // __builtin_ptx_get_image_depthi_
8321 .{ .tag = @enumFromInt(1575), .properties = .{ .param_str = "ii", .target_set = TargetSet.initOne(.nvptx) } },
8322 // __builtin_ptx_get_image_heighti_
8323 .{ .tag = @enumFromInt(1576), .properties = .{ .param_str = "ii", .target_set = TargetSet.initOne(.nvptx) } },
8324 // __builtin_ptx_get_image_widthi_
8325 .{ .tag = @enumFromInt(1577), .properties = .{ .param_str = "ii", .target_set = TargetSet.initOne(.nvptx) } },
8326 // __builtin_ptx_read_image2Dff_
8327 .{ .tag = @enumFromInt(1578), .properties = .{ .param_str = "V4fiiff", .target_set = TargetSet.initOne(.nvptx) } },
8328 // __builtin_ptx_read_image2Dfi_
8329 .{ .tag = @enumFromInt(1579), .properties = .{ .param_str = "V4fiiii", .target_set = TargetSet.initOne(.nvptx) } },
8330 // __builtin_ptx_read_image2Dif_
8331 .{ .tag = @enumFromInt(1580), .properties = .{ .param_str = "V4iiiff", .target_set = TargetSet.initOne(.nvptx) } },
8332 // __builtin_ptx_read_image2Dii_
8333 .{ .tag = @enumFromInt(1581), .properties = .{ .param_str = "V4iiiii", .target_set = TargetSet.initOne(.nvptx) } },
8334 // __builtin_ptx_read_image3Dff_
8335 .{ .tag = @enumFromInt(1582), .properties = .{ .param_str = "V4fiiffff", .target_set = TargetSet.initOne(.nvptx) } },
8336 // __builtin_ptx_read_image3Dfi_
8337 .{ .tag = @enumFromInt(1583), .properties = .{ .param_str = "V4fiiiiii", .target_set = TargetSet.initOne(.nvptx) } },
8338 // __builtin_ptx_read_image3Dif_
8339 .{ .tag = @enumFromInt(1584), .properties = .{ .param_str = "V4iiiffff", .target_set = TargetSet.initOne(.nvptx) } },
8340 // __builtin_ptx_read_image3Dii_
8341 .{ .tag = @enumFromInt(1585), .properties = .{ .param_str = "V4iiiiiii", .target_set = TargetSet.initOne(.nvptx) } },
8342 // __builtin_ptx_write_image2Df_
8343 .{ .tag = @enumFromInt(1586), .properties = .{ .param_str = "viiiffff", .target_set = TargetSet.initOne(.nvptx) } },
8344 // __builtin_ptx_write_image2Di_
8345 .{ .tag = @enumFromInt(1587), .properties = .{ .param_str = "viiiiiii", .target_set = TargetSet.initOne(.nvptx) } },
8346 // __builtin_ptx_write_image2Dui_
8347 .{ .tag = @enumFromInt(1588), .properties = .{ .param_str = "viiiUiUiUiUi", .target_set = TargetSet.initOne(.nvptx) } },
8348 // __builtin_r600_implicitarg_ptr
8349 .{ .tag = @enumFromInt(1589), .properties = .{ .param_str = "Uc*7", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
8350 // __builtin_r600_read_tgid_x
8351 .{ .tag = @enumFromInt(1590), .properties = .{ .param_str = "Ui", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
8352 // __builtin_r600_read_tgid_y
8353 .{ .tag = @enumFromInt(1591), .properties = .{ .param_str = "Ui", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
8354 // __builtin_r600_read_tgid_z
8355 .{ .tag = @enumFromInt(1592), .properties = .{ .param_str = "Ui", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
8356 // __builtin_r600_read_tidig_x
8357 .{ .tag = @enumFromInt(1593), .properties = .{ .param_str = "Ui", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
8358 // __builtin_r600_read_tidig_y
8359 .{ .tag = @enumFromInt(1594), .properties = .{ .param_str = "Ui", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
8360 // __builtin_r600_read_tidig_z
8361 .{ .tag = @enumFromInt(1595), .properties = .{ .param_str = "Ui", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
8362 // __builtin_r600_recipsqrt_ieee
8363 .{ .tag = @enumFromInt(1596), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
8364 // __builtin_r600_recipsqrt_ieeef
8365 .{ .tag = @enumFromInt(1597), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
8366 // __builtin_readcyclecounter
8367 .{ .tag = @enumFromInt(1598), .properties = .{ .param_str = "ULLi" } },
8368 // __builtin_readflm
8369 .{ .tag = @enumFromInt(1599), .properties = .{ .param_str = "d", .target_set = TargetSet.initOne(.ppc) } },
8370 // __builtin_realloc
8371 .{ .tag = @enumFromInt(1600), .properties = .{ .param_str = "v*v*z", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
8372 // __builtin_reduce_add
8373 .{ .tag = @enumFromInt(1601), .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
8374 // __builtin_reduce_and
8375 .{ .tag = @enumFromInt(1602), .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
8376 // __builtin_reduce_max
8377 .{ .tag = @enumFromInt(1603), .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
8378 // __builtin_reduce_min
8379 .{ .tag = @enumFromInt(1604), .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
8380 // __builtin_reduce_mul
8381 .{ .tag = @enumFromInt(1605), .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
8382 // __builtin_reduce_or
8383 .{ .tag = @enumFromInt(1606), .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
8384 // __builtin_reduce_xor
8385 .{ .tag = @enumFromInt(1607), .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
8386 // __builtin_remainder
8387 .{ .tag = @enumFromInt(1608), .properties = .{ .param_str = "ddd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8388 // __builtin_remainderf
8389 .{ .tag = @enumFromInt(1609), .properties = .{ .param_str = "fff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8390 // __builtin_remainderf128
8391 .{ .tag = @enumFromInt(1610), .properties = .{ .param_str = "LLdLLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8392 // __builtin_remainderl
8393 .{ .tag = @enumFromInt(1611), .properties = .{ .param_str = "LdLdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8394 // __builtin_remquo
8395 .{ .tag = @enumFromInt(1612), .properties = .{ .param_str = "dddi*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
8396 // __builtin_remquof
8397 .{ .tag = @enumFromInt(1613), .properties = .{ .param_str = "fffi*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
8398 // __builtin_remquof128
8399 .{ .tag = @enumFromInt(1614), .properties = .{ .param_str = "LLdLLdLLdi*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
8400 // __builtin_remquol
8401 .{ .tag = @enumFromInt(1615), .properties = .{ .param_str = "LdLdLdi*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
8402 // __builtin_return_address
8403 .{ .tag = @enumFromInt(1616), .properties = .{ .param_str = "v*IUi" } },
8404 // __builtin_rindex
8405 .{ .tag = @enumFromInt(1617), .properties = .{ .param_str = "c*cC*i", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
8406 // __builtin_rint
8407 .{ .tag = @enumFromInt(1618), .properties = .{ .param_str = "dd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
8408 // __builtin_rintf
8409 .{ .tag = @enumFromInt(1619), .properties = .{ .param_str = "ff", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
8410 // __builtin_rintf128
8411 .{ .tag = @enumFromInt(1620), .properties = .{ .param_str = "LLdLLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
8412 // __builtin_rintf16
8413 .{ .tag = @enumFromInt(1621), .properties = .{ .param_str = "hh", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
8414 // __builtin_rintl
8415 .{ .tag = @enumFromInt(1622), .properties = .{ .param_str = "LdLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
8416 // __builtin_rotateleft16
8417 .{ .tag = @enumFromInt(1623), .properties = .{ .param_str = "UsUsUs", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
8418 // __builtin_rotateleft32
8419 .{ .tag = @enumFromInt(1624), .properties = .{ .param_str = "UZiUZiUZi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
8420 // __builtin_rotateleft64
8421 .{ .tag = @enumFromInt(1625), .properties = .{ .param_str = "UWiUWiUWi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
8422 // __builtin_rotateleft8
8423 .{ .tag = @enumFromInt(1626), .properties = .{ .param_str = "UcUcUc", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
8424 // __builtin_rotateright16
8425 .{ .tag = @enumFromInt(1627), .properties = .{ .param_str = "UsUsUs", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
8426 // __builtin_rotateright32
8427 .{ .tag = @enumFromInt(1628), .properties = .{ .param_str = "UZiUZiUZi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
8428 // __builtin_rotateright64
8429 .{ .tag = @enumFromInt(1629), .properties = .{ .param_str = "UWiUWiUWi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
8430 // __builtin_rotateright8
8431 .{ .tag = @enumFromInt(1630), .properties = .{ .param_str = "UcUcUc", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
8432 // __builtin_round
8433 .{ .tag = @enumFromInt(1631), .properties = .{ .param_str = "dd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
8434 // __builtin_roundeven
8435 .{ .tag = @enumFromInt(1632), .properties = .{ .param_str = "dd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
8436 // __builtin_roundevenf
8437 .{ .tag = @enumFromInt(1633), .properties = .{ .param_str = "ff", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
8438 // __builtin_roundevenf128
8439 .{ .tag = @enumFromInt(1634), .properties = .{ .param_str = "LLdLLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
8440 // __builtin_roundevenf16
8441 .{ .tag = @enumFromInt(1635), .properties = .{ .param_str = "hh", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
8442 // __builtin_roundevenl
8443 .{ .tag = @enumFromInt(1636), .properties = .{ .param_str = "LdLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
8444 // __builtin_roundf
8445 .{ .tag = @enumFromInt(1637), .properties = .{ .param_str = "ff", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
8446 // __builtin_roundf128
8447 .{ .tag = @enumFromInt(1638), .properties = .{ .param_str = "LLdLLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
8448 // __builtin_roundf16
8449 .{ .tag = @enumFromInt(1639), .properties = .{ .param_str = "hh", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
8450 // __builtin_roundl
8451 .{ .tag = @enumFromInt(1640), .properties = .{ .param_str = "LdLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
8452 // __builtin_sadd_overflow
8453 .{ .tag = @enumFromInt(1641), .properties = .{ .param_str = "bSiCSiCSi*", .attributes = .{ .const_evaluable = true } } },
8454 // __builtin_saddl_overflow
8455 .{ .tag = @enumFromInt(1642), .properties = .{ .param_str = "bSLiCSLiCSLi*", .attributes = .{ .const_evaluable = true } } },
8456 // __builtin_saddll_overflow
8457 .{ .tag = @enumFromInt(1643), .properties = .{ .param_str = "bSLLiCSLLiCSLLi*", .attributes = .{ .const_evaluable = true } } },
8458 // __builtin_scalbln
8459 .{ .tag = @enumFromInt(1644), .properties = .{ .param_str = "ddLi", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8460 // __builtin_scalblnf
8461 .{ .tag = @enumFromInt(1645), .properties = .{ .param_str = "ffLi", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8462 // __builtin_scalblnf128
8463 .{ .tag = @enumFromInt(1646), .properties = .{ .param_str = "LLdLLdLi", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8464 // __builtin_scalblnl
8465 .{ .tag = @enumFromInt(1647), .properties = .{ .param_str = "LdLdLi", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8466 // __builtin_scalbn
8467 .{ .tag = @enumFromInt(1648), .properties = .{ .param_str = "ddi", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8468 // __builtin_scalbnf
8469 .{ .tag = @enumFromInt(1649), .properties = .{ .param_str = "ffi", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8470 // __builtin_scalbnf128
8471 .{ .tag = @enumFromInt(1650), .properties = .{ .param_str = "LLdLLdi", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8472 // __builtin_scalbnl
8473 .{ .tag = @enumFromInt(1651), .properties = .{ .param_str = "LdLdi", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8474 // __builtin_scanf
8475 .{ .tag = @enumFromInt(1652), .properties = .{ .param_str = "icC*R.", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .scanf } } },
8476 // __builtin_set_flt_rounds
8477 .{ .tag = @enumFromInt(1653), .properties = .{ .param_str = "vi" } },
8478 // __builtin_setflm
8479 .{ .tag = @enumFromInt(1654), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.ppc) } },
8480 // __builtin_setjmp
8481 .{ .tag = @enumFromInt(1655), .properties = .{ .param_str = "iv**", .attributes = .{ .returns_twice = true } } },
8482 // __builtin_setps
8483 .{ .tag = @enumFromInt(1656), .properties = .{ .param_str = "vUiUi", .target_set = TargetSet.initOne(.xcore) } },
8484 // __builtin_setrnd
8485 .{ .tag = @enumFromInt(1657), .properties = .{ .param_str = "di", .target_set = TargetSet.initOne(.ppc) } },
8486 // __builtin_shufflevector
8487 .{ .tag = @enumFromInt(1658), .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
8488 // __builtin_signbit
8489 .{ .tag = @enumFromInt(1659), .properties = .{ .param_str = "i.", .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true } } },
8490 // __builtin_signbitf
8491 .{ .tag = @enumFromInt(1660), .properties = .{ .param_str = "if", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
8492 // __builtin_signbitl
8493 .{ .tag = @enumFromInt(1661), .properties = .{ .param_str = "iLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
8494 // __builtin_sin
8495 .{ .tag = @enumFromInt(1662), .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8496 // __builtin_sinf
8497 .{ .tag = @enumFromInt(1663), .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8498 // __builtin_sinf128
8499 .{ .tag = @enumFromInt(1664), .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8500 // __builtin_sinf16
8501 .{ .tag = @enumFromInt(1665), .properties = .{ .param_str = "hh", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8502 // __builtin_sinh
8503 .{ .tag = @enumFromInt(1666), .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8504 // __builtin_sinhf
8505 .{ .tag = @enumFromInt(1667), .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8506 // __builtin_sinhf128
8507 .{ .tag = @enumFromInt(1668), .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8508 // __builtin_sinhl
8509 .{ .tag = @enumFromInt(1669), .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8510 // __builtin_sinl
8511 .{ .tag = @enumFromInt(1670), .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8512 // __builtin_smul_overflow
8513 .{ .tag = @enumFromInt(1671), .properties = .{ .param_str = "bSiCSiCSi*", .attributes = .{ .const_evaluable = true } } },
8514 // __builtin_smull_overflow
8515 .{ .tag = @enumFromInt(1672), .properties = .{ .param_str = "bSLiCSLiCSLi*", .attributes = .{ .const_evaluable = true } } },
8516 // __builtin_smulll_overflow
8517 .{ .tag = @enumFromInt(1673), .properties = .{ .param_str = "bSLLiCSLLiCSLLi*", .attributes = .{ .const_evaluable = true } } },
8518 // __builtin_snprintf
8519 .{ .tag = @enumFromInt(1674), .properties = .{ .param_str = "ic*RzcC*R.", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .printf, .format_string_position = 2 } } },
8520 // __builtin_sponentry
8521 .{ .tag = @enumFromInt(1675), .properties = .{ .param_str = "v*", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } },
8522 // __builtin_sprintf
8523 .{ .tag = @enumFromInt(1676), .properties = .{ .param_str = "ic*RcC*R.", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .printf, .format_string_position = 1 } } },
8524 // __builtin_sqrt
8525 .{ .tag = @enumFromInt(1677), .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8526 // __builtin_sqrtf
8527 .{ .tag = @enumFromInt(1678), .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8528 // __builtin_sqrtf128
8529 .{ .tag = @enumFromInt(1679), .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8530 // __builtin_sqrtf16
8531 .{ .tag = @enumFromInt(1680), .properties = .{ .param_str = "hh", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8532 // __builtin_sqrtl
8533 .{ .tag = @enumFromInt(1681), .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8534 // __builtin_sscanf
8535 .{ .tag = @enumFromInt(1682), .properties = .{ .param_str = "icC*RcC*R.", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .scanf, .format_string_position = 1 } } },
8536 // __builtin_ssub_overflow
8537 .{ .tag = @enumFromInt(1683), .properties = .{ .param_str = "bSiCSiCSi*", .attributes = .{ .const_evaluable = true } } },
8538 // __builtin_ssubl_overflow
8539 .{ .tag = @enumFromInt(1684), .properties = .{ .param_str = "bSLiCSLiCSLi*", .attributes = .{ .const_evaluable = true } } },
8540 // __builtin_ssubll_overflow
8541 .{ .tag = @enumFromInt(1685), .properties = .{ .param_str = "bSLLiCSLLiCSLLi*", .attributes = .{ .const_evaluable = true } } },
8542 // __builtin_stdarg_start
8543 .{ .tag = @enumFromInt(1686), .properties = .{ .param_str = "vA.", .attributes = .{ .custom_typecheck = true } } },
8544 // __builtin_stpcpy
8545 .{ .tag = @enumFromInt(1687), .properties = .{ .param_str = "c*c*cC*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
8546 // __builtin_stpncpy
8547 .{ .tag = @enumFromInt(1688), .properties = .{ .param_str = "c*c*cC*z", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
8548 // __builtin_strcasecmp
8549 .{ .tag = @enumFromInt(1689), .properties = .{ .param_str = "icC*cC*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
8550 // __builtin_strcat
8551 .{ .tag = @enumFromInt(1690), .properties = .{ .param_str = "c*c*cC*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
8552 // __builtin_strchr
8553 .{ .tag = @enumFromInt(1691), .properties = .{ .param_str = "c*cC*i", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
8554 // __builtin_strcmp
8555 .{ .tag = @enumFromInt(1692), .properties = .{ .param_str = "icC*cC*", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
8556 // __builtin_strcpy
8557 .{ .tag = @enumFromInt(1693), .properties = .{ .param_str = "c*c*cC*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
8558 // __builtin_strcspn
8559 .{ .tag = @enumFromInt(1694), .properties = .{ .param_str = "zcC*cC*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
8560 // __builtin_strdup
8561 .{ .tag = @enumFromInt(1695), .properties = .{ .param_str = "c*cC*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
8562 // __builtin_strlen
8563 .{ .tag = @enumFromInt(1696), .properties = .{ .param_str = "zcC*", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
8564 // __builtin_strncasecmp
8565 .{ .tag = @enumFromInt(1697), .properties = .{ .param_str = "icC*cC*z", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
8566 // __builtin_strncat
8567 .{ .tag = @enumFromInt(1698), .properties = .{ .param_str = "c*c*cC*z", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
8568 // __builtin_strncmp
8569 .{ .tag = @enumFromInt(1699), .properties = .{ .param_str = "icC*cC*z", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
8570 // __builtin_strncpy
8571 .{ .tag = @enumFromInt(1700), .properties = .{ .param_str = "c*c*cC*z", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
8572 // __builtin_strndup
8573 .{ .tag = @enumFromInt(1701), .properties = .{ .param_str = "c*cC*z", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
8574 // __builtin_strpbrk
8575 .{ .tag = @enumFromInt(1702), .properties = .{ .param_str = "c*cC*cC*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
8576 // __builtin_strrchr
8577 .{ .tag = @enumFromInt(1703), .properties = .{ .param_str = "c*cC*i", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
8578 // __builtin_strspn
8579 .{ .tag = @enumFromInt(1704), .properties = .{ .param_str = "zcC*cC*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
8580 // __builtin_strstr
8581 .{ .tag = @enumFromInt(1705), .properties = .{ .param_str = "c*cC*cC*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
8582 // __builtin_sub_overflow
8583 .{ .tag = @enumFromInt(1706), .properties = .{ .param_str = "b.", .attributes = .{ .custom_typecheck = true, .const_evaluable = true } } },
8584 // __builtin_subc
8585 .{ .tag = @enumFromInt(1707), .properties = .{ .param_str = "UiUiCUiCUiCUi*" } },
8586 // __builtin_subcb
8587 .{ .tag = @enumFromInt(1708), .properties = .{ .param_str = "UcUcCUcCUcCUc*" } },
8588 // __builtin_subcl
8589 .{ .tag = @enumFromInt(1709), .properties = .{ .param_str = "ULiULiCULiCULiCULi*" } },
8590 // __builtin_subcll
8591 .{ .tag = @enumFromInt(1710), .properties = .{ .param_str = "ULLiULLiCULLiCULLiCULLi*" } },
8592 // __builtin_subcs
8593 .{ .tag = @enumFromInt(1711), .properties = .{ .param_str = "UsUsCUsCUsCUs*" } },
8594 // __builtin_tan
8595 .{ .tag = @enumFromInt(1712), .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8596 // __builtin_tanf
8597 .{ .tag = @enumFromInt(1713), .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8598 // __builtin_tanf128
8599 .{ .tag = @enumFromInt(1714), .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8600 // __builtin_tanh
8601 .{ .tag = @enumFromInt(1715), .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8602 // __builtin_tanhf
8603 .{ .tag = @enumFromInt(1716), .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8604 // __builtin_tanhf128
8605 .{ .tag = @enumFromInt(1717), .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8606 // __builtin_tanhl
8607 .{ .tag = @enumFromInt(1718), .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8608 // __builtin_tanl
8609 .{ .tag = @enumFromInt(1719), .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8610 // __builtin_tgamma
8611 .{ .tag = @enumFromInt(1720), .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8612 // __builtin_tgammaf
8613 .{ .tag = @enumFromInt(1721), .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8614 // __builtin_tgammaf128
8615 .{ .tag = @enumFromInt(1722), .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8616 // __builtin_tgammal
8617 .{ .tag = @enumFromInt(1723), .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
8618 // __builtin_thread_pointer
8619 .{ .tag = @enumFromInt(1724), .properties = .{ .param_str = "v*", .attributes = .{ .@"const" = true } } },
8620 // __builtin_trap
8621 .{ .tag = @enumFromInt(1725), .properties = .{ .param_str = "v", .attributes = .{ .noreturn = true } } },
8622 // __builtin_trunc
8623 .{ .tag = @enumFromInt(1726), .properties = .{ .param_str = "dd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
8624 // __builtin_truncf
8625 .{ .tag = @enumFromInt(1727), .properties = .{ .param_str = "ff", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
8626 // __builtin_truncf128
8627 .{ .tag = @enumFromInt(1728), .properties = .{ .param_str = "LLdLLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
8628 // __builtin_truncf16
8629 .{ .tag = @enumFromInt(1729), .properties = .{ .param_str = "hh", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
8630 // __builtin_truncl
8631 .{ .tag = @enumFromInt(1730), .properties = .{ .param_str = "LdLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
8632 // __builtin_uadd_overflow
8633 .{ .tag = @enumFromInt(1731), .properties = .{ .param_str = "bUiCUiCUi*", .attributes = .{ .const_evaluable = true } } },
8634 // __builtin_uaddl_overflow
8635 .{ .tag = @enumFromInt(1732), .properties = .{ .param_str = "bULiCULiCULi*", .attributes = .{ .const_evaluable = true } } },
8636 // __builtin_uaddll_overflow
8637 .{ .tag = @enumFromInt(1733), .properties = .{ .param_str = "bULLiCULLiCULLi*", .attributes = .{ .const_evaluable = true } } },
8638 // __builtin_umul_overflow
8639 .{ .tag = @enumFromInt(1734), .properties = .{ .param_str = "bUiCUiCUi*", .attributes = .{ .const_evaluable = true } } },
8640 // __builtin_umull_overflow
8641 .{ .tag = @enumFromInt(1735), .properties = .{ .param_str = "bULiCULiCULi*", .attributes = .{ .const_evaluable = true } } },
8642 // __builtin_umulll_overflow
8643 .{ .tag = @enumFromInt(1736), .properties = .{ .param_str = "bULLiCULLiCULLi*", .attributes = .{ .const_evaluable = true } } },
8644 // __builtin_unpack_longdouble
8645 .{ .tag = @enumFromInt(1737), .properties = .{ .param_str = "dLdIi", .target_set = TargetSet.initOne(.ppc) } },
8646 // __builtin_unpredictable
8647 .{ .tag = @enumFromInt(1738), .properties = .{ .param_str = "LiLi", .attributes = .{ .@"const" = true } } },
8648 // __builtin_unreachable
8649 .{ .tag = @enumFromInt(1739), .properties = .{ .param_str = "v", .attributes = .{ .noreturn = true } } },
8650 // __builtin_unwind_init
8651 .{ .tag = @enumFromInt(1740), .properties = .{ .param_str = "v" } },
8652 // __builtin_usub_overflow
8653 .{ .tag = @enumFromInt(1741), .properties = .{ .param_str = "bUiCUiCUi*", .attributes = .{ .const_evaluable = true } } },
8654 // __builtin_usubl_overflow
8655 .{ .tag = @enumFromInt(1742), .properties = .{ .param_str = "bULiCULiCULi*", .attributes = .{ .const_evaluable = true } } },
8656 // __builtin_usubll_overflow
8657 .{ .tag = @enumFromInt(1743), .properties = .{ .param_str = "bULLiCULLiCULLi*", .attributes = .{ .const_evaluable = true } } },
8658 // __builtin_va_copy
8659 .{ .tag = @enumFromInt(1744), .properties = .{ .param_str = "vAA" } },
8660 // __builtin_va_end
8661 .{ .tag = @enumFromInt(1745), .properties = .{ .param_str = "vA" } },
8662 // __builtin_va_start
8663 .{ .tag = @enumFromInt(1746), .properties = .{ .param_str = "vA.", .attributes = .{ .custom_typecheck = true } } },
8664 // __builtin_ve_vl_andm_MMM
8665 .{ .tag = @enumFromInt(1747), .properties = .{ .param_str = "V512bV512bV512b", .target_set = TargetSet.initOne(.vevl_gen) } },
8666 // __builtin_ve_vl_andm_mmm
8667 .{ .tag = @enumFromInt(1748), .properties = .{ .param_str = "V256bV256bV256b", .target_set = TargetSet.initOne(.vevl_gen) } },
8668 // __builtin_ve_vl_eqvm_MMM
8669 .{ .tag = @enumFromInt(1749), .properties = .{ .param_str = "V512bV512bV512b", .target_set = TargetSet.initOne(.vevl_gen) } },
8670 // __builtin_ve_vl_eqvm_mmm
8671 .{ .tag = @enumFromInt(1750), .properties = .{ .param_str = "V256bV256bV256b", .target_set = TargetSet.initOne(.vevl_gen) } },
8672 // __builtin_ve_vl_extract_vm512l
8673 .{ .tag = @enumFromInt(1751), .properties = .{ .param_str = "V256bV512b", .target_set = TargetSet.initOne(.ve) } },
8674 // __builtin_ve_vl_extract_vm512u
8675 .{ .tag = @enumFromInt(1752), .properties = .{ .param_str = "V256bV512b", .target_set = TargetSet.initOne(.ve) } },
8676 // __builtin_ve_vl_fencec_s
8677 .{ .tag = @enumFromInt(1753), .properties = .{ .param_str = "vUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8678 // __builtin_ve_vl_fencei
8679 .{ .tag = @enumFromInt(1754), .properties = .{ .param_str = "v", .target_set = TargetSet.initOne(.vevl_gen) } },
8680 // __builtin_ve_vl_fencem_s
8681 .{ .tag = @enumFromInt(1755), .properties = .{ .param_str = "vUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8682 // __builtin_ve_vl_fidcr_sss
8683 .{ .tag = @enumFromInt(1756), .properties = .{ .param_str = "LUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8684 // __builtin_ve_vl_insert_vm512l
8685 .{ .tag = @enumFromInt(1757), .properties = .{ .param_str = "V512bV512bV256b", .target_set = TargetSet.initOne(.ve) } },
8686 // __builtin_ve_vl_insert_vm512u
8687 .{ .tag = @enumFromInt(1758), .properties = .{ .param_str = "V512bV512bV256b", .target_set = TargetSet.initOne(.ve) } },
8688 // __builtin_ve_vl_lcr_sss
8689 .{ .tag = @enumFromInt(1759), .properties = .{ .param_str = "LUiLUiLUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8690 // __builtin_ve_vl_lsv_vvss
8691 .{ .tag = @enumFromInt(1760), .properties = .{ .param_str = "V256dV256dUiLUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8692 // __builtin_ve_vl_lvm_MMss
8693 .{ .tag = @enumFromInt(1761), .properties = .{ .param_str = "V512bV512bLUiLUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8694 // __builtin_ve_vl_lvm_mmss
8695 .{ .tag = @enumFromInt(1762), .properties = .{ .param_str = "V256bV256bLUiLUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8696 // __builtin_ve_vl_lvsd_svs
8697 .{ .tag = @enumFromInt(1763), .properties = .{ .param_str = "dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8698 // __builtin_ve_vl_lvsl_svs
8699 .{ .tag = @enumFromInt(1764), .properties = .{ .param_str = "LUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8700 // __builtin_ve_vl_lvss_svs
8701 .{ .tag = @enumFromInt(1765), .properties = .{ .param_str = "fV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8702 // __builtin_ve_vl_lzvm_sml
8703 .{ .tag = @enumFromInt(1766), .properties = .{ .param_str = "LUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8704 // __builtin_ve_vl_negm_MM
8705 .{ .tag = @enumFromInt(1767), .properties = .{ .param_str = "V512bV512b", .target_set = TargetSet.initOne(.vevl_gen) } },
8706 // __builtin_ve_vl_negm_mm
8707 .{ .tag = @enumFromInt(1768), .properties = .{ .param_str = "V256bV256b", .target_set = TargetSet.initOne(.vevl_gen) } },
8708 // __builtin_ve_vl_nndm_MMM
8709 .{ .tag = @enumFromInt(1769), .properties = .{ .param_str = "V512bV512bV512b", .target_set = TargetSet.initOne(.vevl_gen) } },
8710 // __builtin_ve_vl_nndm_mmm
8711 .{ .tag = @enumFromInt(1770), .properties = .{ .param_str = "V256bV256bV256b", .target_set = TargetSet.initOne(.vevl_gen) } },
8712 // __builtin_ve_vl_orm_MMM
8713 .{ .tag = @enumFromInt(1771), .properties = .{ .param_str = "V512bV512bV512b", .target_set = TargetSet.initOne(.vevl_gen) } },
8714 // __builtin_ve_vl_orm_mmm
8715 .{ .tag = @enumFromInt(1772), .properties = .{ .param_str = "V256bV256bV256b", .target_set = TargetSet.initOne(.vevl_gen) } },
8716 // __builtin_ve_vl_pack_f32a
8717 .{ .tag = @enumFromInt(1773), .properties = .{ .param_str = "ULifC*", .target_set = TargetSet.initOne(.ve) } },
8718 // __builtin_ve_vl_pack_f32p
8719 .{ .tag = @enumFromInt(1774), .properties = .{ .param_str = "ULifC*fC*", .target_set = TargetSet.initOne(.ve) } },
8720 // __builtin_ve_vl_pcvm_sml
8721 .{ .tag = @enumFromInt(1775), .properties = .{ .param_str = "LUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8722 // __builtin_ve_vl_pfchv_ssl
8723 .{ .tag = @enumFromInt(1776), .properties = .{ .param_str = "vLivC*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
8724 // __builtin_ve_vl_pfchvnc_ssl
8725 .{ .tag = @enumFromInt(1777), .properties = .{ .param_str = "vLivC*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
8726 // __builtin_ve_vl_pvadds_vsvMvl
8727 .{ .tag = @enumFromInt(1778), .properties = .{ .param_str = "V256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8728 // __builtin_ve_vl_pvadds_vsvl
8729 .{ .tag = @enumFromInt(1779), .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8730 // __builtin_ve_vl_pvadds_vsvvl
8731 .{ .tag = @enumFromInt(1780), .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8732 // __builtin_ve_vl_pvadds_vvvMvl
8733 .{ .tag = @enumFromInt(1781), .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8734 // __builtin_ve_vl_pvadds_vvvl
8735 .{ .tag = @enumFromInt(1782), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8736 // __builtin_ve_vl_pvadds_vvvvl
8737 .{ .tag = @enumFromInt(1783), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8738 // __builtin_ve_vl_pvaddu_vsvMvl
8739 .{ .tag = @enumFromInt(1784), .properties = .{ .param_str = "V256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8740 // __builtin_ve_vl_pvaddu_vsvl
8741 .{ .tag = @enumFromInt(1785), .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8742 // __builtin_ve_vl_pvaddu_vsvvl
8743 .{ .tag = @enumFromInt(1786), .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8744 // __builtin_ve_vl_pvaddu_vvvMvl
8745 .{ .tag = @enumFromInt(1787), .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8746 // __builtin_ve_vl_pvaddu_vvvl
8747 .{ .tag = @enumFromInt(1788), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8748 // __builtin_ve_vl_pvaddu_vvvvl
8749 .{ .tag = @enumFromInt(1789), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8750 // __builtin_ve_vl_pvand_vsvMvl
8751 .{ .tag = @enumFromInt(1790), .properties = .{ .param_str = "V256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8752 // __builtin_ve_vl_pvand_vsvl
8753 .{ .tag = @enumFromInt(1791), .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8754 // __builtin_ve_vl_pvand_vsvvl
8755 .{ .tag = @enumFromInt(1792), .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8756 // __builtin_ve_vl_pvand_vvvMvl
8757 .{ .tag = @enumFromInt(1793), .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8758 // __builtin_ve_vl_pvand_vvvl
8759 .{ .tag = @enumFromInt(1794), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8760 // __builtin_ve_vl_pvand_vvvvl
8761 .{ .tag = @enumFromInt(1795), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8762 // __builtin_ve_vl_pvbrd_vsMvl
8763 .{ .tag = @enumFromInt(1796), .properties = .{ .param_str = "V256dLUiV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8764 // __builtin_ve_vl_pvbrd_vsl
8765 .{ .tag = @enumFromInt(1797), .properties = .{ .param_str = "V256dLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8766 // __builtin_ve_vl_pvbrd_vsvl
8767 .{ .tag = @enumFromInt(1798), .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8768 // __builtin_ve_vl_pvbrv_vvMvl
8769 .{ .tag = @enumFromInt(1799), .properties = .{ .param_str = "V256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8770 // __builtin_ve_vl_pvbrv_vvl
8771 .{ .tag = @enumFromInt(1800), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8772 // __builtin_ve_vl_pvbrv_vvvl
8773 .{ .tag = @enumFromInt(1801), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8774 // __builtin_ve_vl_pvbrvlo_vvl
8775 .{ .tag = @enumFromInt(1802), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8776 // __builtin_ve_vl_pvbrvlo_vvmvl
8777 .{ .tag = @enumFromInt(1803), .properties = .{ .param_str = "V256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8778 // __builtin_ve_vl_pvbrvlo_vvvl
8779 .{ .tag = @enumFromInt(1804), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8780 // __builtin_ve_vl_pvbrvup_vvl
8781 .{ .tag = @enumFromInt(1805), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8782 // __builtin_ve_vl_pvbrvup_vvmvl
8783 .{ .tag = @enumFromInt(1806), .properties = .{ .param_str = "V256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8784 // __builtin_ve_vl_pvbrvup_vvvl
8785 .{ .tag = @enumFromInt(1807), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8786 // __builtin_ve_vl_pvcmps_vsvMvl
8787 .{ .tag = @enumFromInt(1808), .properties = .{ .param_str = "V256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8788 // __builtin_ve_vl_pvcmps_vsvl
8789 .{ .tag = @enumFromInt(1809), .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8790 // __builtin_ve_vl_pvcmps_vsvvl
8791 .{ .tag = @enumFromInt(1810), .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8792 // __builtin_ve_vl_pvcmps_vvvMvl
8793 .{ .tag = @enumFromInt(1811), .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8794 // __builtin_ve_vl_pvcmps_vvvl
8795 .{ .tag = @enumFromInt(1812), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8796 // __builtin_ve_vl_pvcmps_vvvvl
8797 .{ .tag = @enumFromInt(1813), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8798 // __builtin_ve_vl_pvcmpu_vsvMvl
8799 .{ .tag = @enumFromInt(1814), .properties = .{ .param_str = "V256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8800 // __builtin_ve_vl_pvcmpu_vsvl
8801 .{ .tag = @enumFromInt(1815), .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8802 // __builtin_ve_vl_pvcmpu_vsvvl
8803 .{ .tag = @enumFromInt(1816), .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8804 // __builtin_ve_vl_pvcmpu_vvvMvl
8805 .{ .tag = @enumFromInt(1817), .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8806 // __builtin_ve_vl_pvcmpu_vvvl
8807 .{ .tag = @enumFromInt(1818), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8808 // __builtin_ve_vl_pvcmpu_vvvvl
8809 .{ .tag = @enumFromInt(1819), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8810 // __builtin_ve_vl_pvcvtsw_vvl
8811 .{ .tag = @enumFromInt(1820), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8812 // __builtin_ve_vl_pvcvtsw_vvvl
8813 .{ .tag = @enumFromInt(1821), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8814 // __builtin_ve_vl_pvcvtws_vvMvl
8815 .{ .tag = @enumFromInt(1822), .properties = .{ .param_str = "V256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8816 // __builtin_ve_vl_pvcvtws_vvl
8817 .{ .tag = @enumFromInt(1823), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8818 // __builtin_ve_vl_pvcvtws_vvvl
8819 .{ .tag = @enumFromInt(1824), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8820 // __builtin_ve_vl_pvcvtwsrz_vvMvl
8821 .{ .tag = @enumFromInt(1825), .properties = .{ .param_str = "V256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8822 // __builtin_ve_vl_pvcvtwsrz_vvl
8823 .{ .tag = @enumFromInt(1826), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8824 // __builtin_ve_vl_pvcvtwsrz_vvvl
8825 .{ .tag = @enumFromInt(1827), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8826 // __builtin_ve_vl_pveqv_vsvMvl
8827 .{ .tag = @enumFromInt(1828), .properties = .{ .param_str = "V256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8828 // __builtin_ve_vl_pveqv_vsvl
8829 .{ .tag = @enumFromInt(1829), .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8830 // __builtin_ve_vl_pveqv_vsvvl
8831 .{ .tag = @enumFromInt(1830), .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8832 // __builtin_ve_vl_pveqv_vvvMvl
8833 .{ .tag = @enumFromInt(1831), .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8834 // __builtin_ve_vl_pveqv_vvvl
8835 .{ .tag = @enumFromInt(1832), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8836 // __builtin_ve_vl_pveqv_vvvvl
8837 .{ .tag = @enumFromInt(1833), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8838 // __builtin_ve_vl_pvfadd_vsvMvl
8839 .{ .tag = @enumFromInt(1834), .properties = .{ .param_str = "V256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8840 // __builtin_ve_vl_pvfadd_vsvl
8841 .{ .tag = @enumFromInt(1835), .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8842 // __builtin_ve_vl_pvfadd_vsvvl
8843 .{ .tag = @enumFromInt(1836), .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8844 // __builtin_ve_vl_pvfadd_vvvMvl
8845 .{ .tag = @enumFromInt(1837), .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8846 // __builtin_ve_vl_pvfadd_vvvl
8847 .{ .tag = @enumFromInt(1838), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8848 // __builtin_ve_vl_pvfadd_vvvvl
8849 .{ .tag = @enumFromInt(1839), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8850 // __builtin_ve_vl_pvfcmp_vsvMvl
8851 .{ .tag = @enumFromInt(1840), .properties = .{ .param_str = "V256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8852 // __builtin_ve_vl_pvfcmp_vsvl
8853 .{ .tag = @enumFromInt(1841), .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8854 // __builtin_ve_vl_pvfcmp_vsvvl
8855 .{ .tag = @enumFromInt(1842), .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8856 // __builtin_ve_vl_pvfcmp_vvvMvl
8857 .{ .tag = @enumFromInt(1843), .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8858 // __builtin_ve_vl_pvfcmp_vvvl
8859 .{ .tag = @enumFromInt(1844), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8860 // __builtin_ve_vl_pvfcmp_vvvvl
8861 .{ .tag = @enumFromInt(1845), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8862 // __builtin_ve_vl_pvfmad_vsvvMvl
8863 .{ .tag = @enumFromInt(1846), .properties = .{ .param_str = "V256dLUiV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8864 // __builtin_ve_vl_pvfmad_vsvvl
8865 .{ .tag = @enumFromInt(1847), .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8866 // __builtin_ve_vl_pvfmad_vsvvvl
8867 .{ .tag = @enumFromInt(1848), .properties = .{ .param_str = "V256dLUiV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8868 // __builtin_ve_vl_pvfmad_vvsvMvl
8869 .{ .tag = @enumFromInt(1849), .properties = .{ .param_str = "V256dV256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8870 // __builtin_ve_vl_pvfmad_vvsvl
8871 .{ .tag = @enumFromInt(1850), .properties = .{ .param_str = "V256dV256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8872 // __builtin_ve_vl_pvfmad_vvsvvl
8873 .{ .tag = @enumFromInt(1851), .properties = .{ .param_str = "V256dV256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8874 // __builtin_ve_vl_pvfmad_vvvvMvl
8875 .{ .tag = @enumFromInt(1852), .properties = .{ .param_str = "V256dV256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8876 // __builtin_ve_vl_pvfmad_vvvvl
8877 .{ .tag = @enumFromInt(1853), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8878 // __builtin_ve_vl_pvfmad_vvvvvl
8879 .{ .tag = @enumFromInt(1854), .properties = .{ .param_str = "V256dV256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8880 // __builtin_ve_vl_pvfmax_vsvMvl
8881 .{ .tag = @enumFromInt(1855), .properties = .{ .param_str = "V256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8882 // __builtin_ve_vl_pvfmax_vsvl
8883 .{ .tag = @enumFromInt(1856), .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8884 // __builtin_ve_vl_pvfmax_vsvvl
8885 .{ .tag = @enumFromInt(1857), .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8886 // __builtin_ve_vl_pvfmax_vvvMvl
8887 .{ .tag = @enumFromInt(1858), .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8888 // __builtin_ve_vl_pvfmax_vvvl
8889 .{ .tag = @enumFromInt(1859), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8890 // __builtin_ve_vl_pvfmax_vvvvl
8891 .{ .tag = @enumFromInt(1860), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8892 // __builtin_ve_vl_pvfmin_vsvMvl
8893 .{ .tag = @enumFromInt(1861), .properties = .{ .param_str = "V256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8894 // __builtin_ve_vl_pvfmin_vsvl
8895 .{ .tag = @enumFromInt(1862), .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8896 // __builtin_ve_vl_pvfmin_vsvvl
8897 .{ .tag = @enumFromInt(1863), .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8898 // __builtin_ve_vl_pvfmin_vvvMvl
8899 .{ .tag = @enumFromInt(1864), .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8900 // __builtin_ve_vl_pvfmin_vvvl
8901 .{ .tag = @enumFromInt(1865), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8902 // __builtin_ve_vl_pvfmin_vvvvl
8903 .{ .tag = @enumFromInt(1866), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8904 // __builtin_ve_vl_pvfmkaf_Ml
8905 .{ .tag = @enumFromInt(1867), .properties = .{ .param_str = "V512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8906 // __builtin_ve_vl_pvfmkat_Ml
8907 .{ .tag = @enumFromInt(1868), .properties = .{ .param_str = "V512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8908 // __builtin_ve_vl_pvfmkseq_MvMl
8909 .{ .tag = @enumFromInt(1869), .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8910 // __builtin_ve_vl_pvfmkseq_Mvl
8911 .{ .tag = @enumFromInt(1870), .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8912 // __builtin_ve_vl_pvfmkseqnan_MvMl
8913 .{ .tag = @enumFromInt(1871), .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8914 // __builtin_ve_vl_pvfmkseqnan_Mvl
8915 .{ .tag = @enumFromInt(1872), .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8916 // __builtin_ve_vl_pvfmksge_MvMl
8917 .{ .tag = @enumFromInt(1873), .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8918 // __builtin_ve_vl_pvfmksge_Mvl
8919 .{ .tag = @enumFromInt(1874), .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8920 // __builtin_ve_vl_pvfmksgenan_MvMl
8921 .{ .tag = @enumFromInt(1875), .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8922 // __builtin_ve_vl_pvfmksgenan_Mvl
8923 .{ .tag = @enumFromInt(1876), .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8924 // __builtin_ve_vl_pvfmksgt_MvMl
8925 .{ .tag = @enumFromInt(1877), .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8926 // __builtin_ve_vl_pvfmksgt_Mvl
8927 .{ .tag = @enumFromInt(1878), .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8928 // __builtin_ve_vl_pvfmksgtnan_MvMl
8929 .{ .tag = @enumFromInt(1879), .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8930 // __builtin_ve_vl_pvfmksgtnan_Mvl
8931 .{ .tag = @enumFromInt(1880), .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8932 // __builtin_ve_vl_pvfmksle_MvMl
8933 .{ .tag = @enumFromInt(1881), .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8934 // __builtin_ve_vl_pvfmksle_Mvl
8935 .{ .tag = @enumFromInt(1882), .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8936 // __builtin_ve_vl_pvfmkslenan_MvMl
8937 .{ .tag = @enumFromInt(1883), .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8938 // __builtin_ve_vl_pvfmkslenan_Mvl
8939 .{ .tag = @enumFromInt(1884), .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8940 // __builtin_ve_vl_pvfmksloeq_mvl
8941 .{ .tag = @enumFromInt(1885), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8942 // __builtin_ve_vl_pvfmksloeq_mvml
8943 .{ .tag = @enumFromInt(1886), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8944 // __builtin_ve_vl_pvfmksloeqnan_mvl
8945 .{ .tag = @enumFromInt(1887), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8946 // __builtin_ve_vl_pvfmksloeqnan_mvml
8947 .{ .tag = @enumFromInt(1888), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8948 // __builtin_ve_vl_pvfmksloge_mvl
8949 .{ .tag = @enumFromInt(1889), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8950 // __builtin_ve_vl_pvfmksloge_mvml
8951 .{ .tag = @enumFromInt(1890), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8952 // __builtin_ve_vl_pvfmkslogenan_mvl
8953 .{ .tag = @enumFromInt(1891), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8954 // __builtin_ve_vl_pvfmkslogenan_mvml
8955 .{ .tag = @enumFromInt(1892), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8956 // __builtin_ve_vl_pvfmkslogt_mvl
8957 .{ .tag = @enumFromInt(1893), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8958 // __builtin_ve_vl_pvfmkslogt_mvml
8959 .{ .tag = @enumFromInt(1894), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8960 // __builtin_ve_vl_pvfmkslogtnan_mvl
8961 .{ .tag = @enumFromInt(1895), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8962 // __builtin_ve_vl_pvfmkslogtnan_mvml
8963 .{ .tag = @enumFromInt(1896), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8964 // __builtin_ve_vl_pvfmkslole_mvl
8965 .{ .tag = @enumFromInt(1897), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8966 // __builtin_ve_vl_pvfmkslole_mvml
8967 .{ .tag = @enumFromInt(1898), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8968 // __builtin_ve_vl_pvfmkslolenan_mvl
8969 .{ .tag = @enumFromInt(1899), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8970 // __builtin_ve_vl_pvfmkslolenan_mvml
8971 .{ .tag = @enumFromInt(1900), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8972 // __builtin_ve_vl_pvfmkslolt_mvl
8973 .{ .tag = @enumFromInt(1901), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8974 // __builtin_ve_vl_pvfmkslolt_mvml
8975 .{ .tag = @enumFromInt(1902), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8976 // __builtin_ve_vl_pvfmksloltnan_mvl
8977 .{ .tag = @enumFromInt(1903), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8978 // __builtin_ve_vl_pvfmksloltnan_mvml
8979 .{ .tag = @enumFromInt(1904), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8980 // __builtin_ve_vl_pvfmkslonan_mvl
8981 .{ .tag = @enumFromInt(1905), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8982 // __builtin_ve_vl_pvfmkslonan_mvml
8983 .{ .tag = @enumFromInt(1906), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8984 // __builtin_ve_vl_pvfmkslone_mvl
8985 .{ .tag = @enumFromInt(1907), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8986 // __builtin_ve_vl_pvfmkslone_mvml
8987 .{ .tag = @enumFromInt(1908), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8988 // __builtin_ve_vl_pvfmkslonenan_mvl
8989 .{ .tag = @enumFromInt(1909), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8990 // __builtin_ve_vl_pvfmkslonenan_mvml
8991 .{ .tag = @enumFromInt(1910), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8992 // __builtin_ve_vl_pvfmkslonum_mvl
8993 .{ .tag = @enumFromInt(1911), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8994 // __builtin_ve_vl_pvfmkslonum_mvml
8995 .{ .tag = @enumFromInt(1912), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8996 // __builtin_ve_vl_pvfmkslt_MvMl
8997 .{ .tag = @enumFromInt(1913), .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
8998 // __builtin_ve_vl_pvfmkslt_Mvl
8999 .{ .tag = @enumFromInt(1914), .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9000 // __builtin_ve_vl_pvfmksltnan_MvMl
9001 .{ .tag = @enumFromInt(1915), .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9002 // __builtin_ve_vl_pvfmksltnan_Mvl
9003 .{ .tag = @enumFromInt(1916), .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9004 // __builtin_ve_vl_pvfmksnan_MvMl
9005 .{ .tag = @enumFromInt(1917), .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9006 // __builtin_ve_vl_pvfmksnan_Mvl
9007 .{ .tag = @enumFromInt(1918), .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9008 // __builtin_ve_vl_pvfmksne_MvMl
9009 .{ .tag = @enumFromInt(1919), .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9010 // __builtin_ve_vl_pvfmksne_Mvl
9011 .{ .tag = @enumFromInt(1920), .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9012 // __builtin_ve_vl_pvfmksnenan_MvMl
9013 .{ .tag = @enumFromInt(1921), .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9014 // __builtin_ve_vl_pvfmksnenan_Mvl
9015 .{ .tag = @enumFromInt(1922), .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9016 // __builtin_ve_vl_pvfmksnum_MvMl
9017 .{ .tag = @enumFromInt(1923), .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9018 // __builtin_ve_vl_pvfmksnum_Mvl
9019 .{ .tag = @enumFromInt(1924), .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9020 // __builtin_ve_vl_pvfmksupeq_mvl
9021 .{ .tag = @enumFromInt(1925), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9022 // __builtin_ve_vl_pvfmksupeq_mvml
9023 .{ .tag = @enumFromInt(1926), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9024 // __builtin_ve_vl_pvfmksupeqnan_mvl
9025 .{ .tag = @enumFromInt(1927), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9026 // __builtin_ve_vl_pvfmksupeqnan_mvml
9027 .{ .tag = @enumFromInt(1928), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9028 // __builtin_ve_vl_pvfmksupge_mvl
9029 .{ .tag = @enumFromInt(1929), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9030 // __builtin_ve_vl_pvfmksupge_mvml
9031 .{ .tag = @enumFromInt(1930), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9032 // __builtin_ve_vl_pvfmksupgenan_mvl
9033 .{ .tag = @enumFromInt(1931), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9034 // __builtin_ve_vl_pvfmksupgenan_mvml
9035 .{ .tag = @enumFromInt(1932), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9036 // __builtin_ve_vl_pvfmksupgt_mvl
9037 .{ .tag = @enumFromInt(1933), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9038 // __builtin_ve_vl_pvfmksupgt_mvml
9039 .{ .tag = @enumFromInt(1934), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9040 // __builtin_ve_vl_pvfmksupgtnan_mvl
9041 .{ .tag = @enumFromInt(1935), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9042 // __builtin_ve_vl_pvfmksupgtnan_mvml
9043 .{ .tag = @enumFromInt(1936), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9044 // __builtin_ve_vl_pvfmksuple_mvl
9045 .{ .tag = @enumFromInt(1937), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9046 // __builtin_ve_vl_pvfmksuple_mvml
9047 .{ .tag = @enumFromInt(1938), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9048 // __builtin_ve_vl_pvfmksuplenan_mvl
9049 .{ .tag = @enumFromInt(1939), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9050 // __builtin_ve_vl_pvfmksuplenan_mvml
9051 .{ .tag = @enumFromInt(1940), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9052 // __builtin_ve_vl_pvfmksuplt_mvl
9053 .{ .tag = @enumFromInt(1941), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9054 // __builtin_ve_vl_pvfmksuplt_mvml
9055 .{ .tag = @enumFromInt(1942), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9056 // __builtin_ve_vl_pvfmksupltnan_mvl
9057 .{ .tag = @enumFromInt(1943), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9058 // __builtin_ve_vl_pvfmksupltnan_mvml
9059 .{ .tag = @enumFromInt(1944), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9060 // __builtin_ve_vl_pvfmksupnan_mvl
9061 .{ .tag = @enumFromInt(1945), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9062 // __builtin_ve_vl_pvfmksupnan_mvml
9063 .{ .tag = @enumFromInt(1946), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9064 // __builtin_ve_vl_pvfmksupne_mvl
9065 .{ .tag = @enumFromInt(1947), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9066 // __builtin_ve_vl_pvfmksupne_mvml
9067 .{ .tag = @enumFromInt(1948), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9068 // __builtin_ve_vl_pvfmksupnenan_mvl
9069 .{ .tag = @enumFromInt(1949), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9070 // __builtin_ve_vl_pvfmksupnenan_mvml
9071 .{ .tag = @enumFromInt(1950), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9072 // __builtin_ve_vl_pvfmksupnum_mvl
9073 .{ .tag = @enumFromInt(1951), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9074 // __builtin_ve_vl_pvfmksupnum_mvml
9075 .{ .tag = @enumFromInt(1952), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9076 // __builtin_ve_vl_pvfmkweq_MvMl
9077 .{ .tag = @enumFromInt(1953), .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9078 // __builtin_ve_vl_pvfmkweq_Mvl
9079 .{ .tag = @enumFromInt(1954), .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9080 // __builtin_ve_vl_pvfmkweqnan_MvMl
9081 .{ .tag = @enumFromInt(1955), .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9082 // __builtin_ve_vl_pvfmkweqnan_Mvl
9083 .{ .tag = @enumFromInt(1956), .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9084 // __builtin_ve_vl_pvfmkwge_MvMl
9085 .{ .tag = @enumFromInt(1957), .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9086 // __builtin_ve_vl_pvfmkwge_Mvl
9087 .{ .tag = @enumFromInt(1958), .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9088 // __builtin_ve_vl_pvfmkwgenan_MvMl
9089 .{ .tag = @enumFromInt(1959), .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9090 // __builtin_ve_vl_pvfmkwgenan_Mvl
9091 .{ .tag = @enumFromInt(1960), .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9092 // __builtin_ve_vl_pvfmkwgt_MvMl
9093 .{ .tag = @enumFromInt(1961), .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9094 // __builtin_ve_vl_pvfmkwgt_Mvl
9095 .{ .tag = @enumFromInt(1962), .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9096 // __builtin_ve_vl_pvfmkwgtnan_MvMl
9097 .{ .tag = @enumFromInt(1963), .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9098 // __builtin_ve_vl_pvfmkwgtnan_Mvl
9099 .{ .tag = @enumFromInt(1964), .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9100 // __builtin_ve_vl_pvfmkwle_MvMl
9101 .{ .tag = @enumFromInt(1965), .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9102 // __builtin_ve_vl_pvfmkwle_Mvl
9103 .{ .tag = @enumFromInt(1966), .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9104 // __builtin_ve_vl_pvfmkwlenan_MvMl
9105 .{ .tag = @enumFromInt(1967), .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9106 // __builtin_ve_vl_pvfmkwlenan_Mvl
9107 .{ .tag = @enumFromInt(1968), .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9108 // __builtin_ve_vl_pvfmkwloeq_mvl
9109 .{ .tag = @enumFromInt(1969), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9110 // __builtin_ve_vl_pvfmkwloeq_mvml
9111 .{ .tag = @enumFromInt(1970), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9112 // __builtin_ve_vl_pvfmkwloeqnan_mvl
9113 .{ .tag = @enumFromInt(1971), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9114 // __builtin_ve_vl_pvfmkwloeqnan_mvml
9115 .{ .tag = @enumFromInt(1972), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9116 // __builtin_ve_vl_pvfmkwloge_mvl
9117 .{ .tag = @enumFromInt(1973), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9118 // __builtin_ve_vl_pvfmkwloge_mvml
9119 .{ .tag = @enumFromInt(1974), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9120 // __builtin_ve_vl_pvfmkwlogenan_mvl
9121 .{ .tag = @enumFromInt(1975), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9122 // __builtin_ve_vl_pvfmkwlogenan_mvml
9123 .{ .tag = @enumFromInt(1976), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9124 // __builtin_ve_vl_pvfmkwlogt_mvl
9125 .{ .tag = @enumFromInt(1977), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9126 // __builtin_ve_vl_pvfmkwlogt_mvml
9127 .{ .tag = @enumFromInt(1978), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9128 // __builtin_ve_vl_pvfmkwlogtnan_mvl
9129 .{ .tag = @enumFromInt(1979), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9130 // __builtin_ve_vl_pvfmkwlogtnan_mvml
9131 .{ .tag = @enumFromInt(1980), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9132 // __builtin_ve_vl_pvfmkwlole_mvl
9133 .{ .tag = @enumFromInt(1981), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9134 // __builtin_ve_vl_pvfmkwlole_mvml
9135 .{ .tag = @enumFromInt(1982), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9136 // __builtin_ve_vl_pvfmkwlolenan_mvl
9137 .{ .tag = @enumFromInt(1983), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9138 // __builtin_ve_vl_pvfmkwlolenan_mvml
9139 .{ .tag = @enumFromInt(1984), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9140 // __builtin_ve_vl_pvfmkwlolt_mvl
9141 .{ .tag = @enumFromInt(1985), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9142 // __builtin_ve_vl_pvfmkwlolt_mvml
9143 .{ .tag = @enumFromInt(1986), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9144 // __builtin_ve_vl_pvfmkwloltnan_mvl
9145 .{ .tag = @enumFromInt(1987), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9146 // __builtin_ve_vl_pvfmkwloltnan_mvml
9147 .{ .tag = @enumFromInt(1988), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9148 // __builtin_ve_vl_pvfmkwlonan_mvl
9149 .{ .tag = @enumFromInt(1989), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9150 // __builtin_ve_vl_pvfmkwlonan_mvml
9151 .{ .tag = @enumFromInt(1990), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9152 // __builtin_ve_vl_pvfmkwlone_mvl
9153 .{ .tag = @enumFromInt(1991), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9154 // __builtin_ve_vl_pvfmkwlone_mvml
9155 .{ .tag = @enumFromInt(1992), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9156 // __builtin_ve_vl_pvfmkwlonenan_mvl
9157 .{ .tag = @enumFromInt(1993), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9158 // __builtin_ve_vl_pvfmkwlonenan_mvml
9159 .{ .tag = @enumFromInt(1994), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9160 // __builtin_ve_vl_pvfmkwlonum_mvl
9161 .{ .tag = @enumFromInt(1995), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9162 // __builtin_ve_vl_pvfmkwlonum_mvml
9163 .{ .tag = @enumFromInt(1996), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9164 // __builtin_ve_vl_pvfmkwlt_MvMl
9165 .{ .tag = @enumFromInt(1997), .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9166 // __builtin_ve_vl_pvfmkwlt_Mvl
9167 .{ .tag = @enumFromInt(1998), .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9168 // __builtin_ve_vl_pvfmkwltnan_MvMl
9169 .{ .tag = @enumFromInt(1999), .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9170 // __builtin_ve_vl_pvfmkwltnan_Mvl
9171 .{ .tag = @enumFromInt(2000), .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9172 // __builtin_ve_vl_pvfmkwnan_MvMl
9173 .{ .tag = @enumFromInt(2001), .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9174 // __builtin_ve_vl_pvfmkwnan_Mvl
9175 .{ .tag = @enumFromInt(2002), .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9176 // __builtin_ve_vl_pvfmkwne_MvMl
9177 .{ .tag = @enumFromInt(2003), .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9178 // __builtin_ve_vl_pvfmkwne_Mvl
9179 .{ .tag = @enumFromInt(2004), .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9180 // __builtin_ve_vl_pvfmkwnenan_MvMl
9181 .{ .tag = @enumFromInt(2005), .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9182 // __builtin_ve_vl_pvfmkwnenan_Mvl
9183 .{ .tag = @enumFromInt(2006), .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9184 // __builtin_ve_vl_pvfmkwnum_MvMl
9185 .{ .tag = @enumFromInt(2007), .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9186 // __builtin_ve_vl_pvfmkwnum_Mvl
9187 .{ .tag = @enumFromInt(2008), .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9188 // __builtin_ve_vl_pvfmkwupeq_mvl
9189 .{ .tag = @enumFromInt(2009), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9190 // __builtin_ve_vl_pvfmkwupeq_mvml
9191 .{ .tag = @enumFromInt(2010), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9192 // __builtin_ve_vl_pvfmkwupeqnan_mvl
9193 .{ .tag = @enumFromInt(2011), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9194 // __builtin_ve_vl_pvfmkwupeqnan_mvml
9195 .{ .tag = @enumFromInt(2012), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9196 // __builtin_ve_vl_pvfmkwupge_mvl
9197 .{ .tag = @enumFromInt(2013), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9198 // __builtin_ve_vl_pvfmkwupge_mvml
9199 .{ .tag = @enumFromInt(2014), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9200 // __builtin_ve_vl_pvfmkwupgenan_mvl
9201 .{ .tag = @enumFromInt(2015), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9202 // __builtin_ve_vl_pvfmkwupgenan_mvml
9203 .{ .tag = @enumFromInt(2016), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9204 // __builtin_ve_vl_pvfmkwupgt_mvl
9205 .{ .tag = @enumFromInt(2017), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9206 // __builtin_ve_vl_pvfmkwupgt_mvml
9207 .{ .tag = @enumFromInt(2018), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9208 // __builtin_ve_vl_pvfmkwupgtnan_mvl
9209 .{ .tag = @enumFromInt(2019), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9210 // __builtin_ve_vl_pvfmkwupgtnan_mvml
9211 .{ .tag = @enumFromInt(2020), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9212 // __builtin_ve_vl_pvfmkwuple_mvl
9213 .{ .tag = @enumFromInt(2021), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9214 // __builtin_ve_vl_pvfmkwuple_mvml
9215 .{ .tag = @enumFromInt(2022), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9216 // __builtin_ve_vl_pvfmkwuplenan_mvl
9217 .{ .tag = @enumFromInt(2023), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9218 // __builtin_ve_vl_pvfmkwuplenan_mvml
9219 .{ .tag = @enumFromInt(2024), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9220 // __builtin_ve_vl_pvfmkwuplt_mvl
9221 .{ .tag = @enumFromInt(2025), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9222 // __builtin_ve_vl_pvfmkwuplt_mvml
9223 .{ .tag = @enumFromInt(2026), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9224 // __builtin_ve_vl_pvfmkwupltnan_mvl
9225 .{ .tag = @enumFromInt(2027), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9226 // __builtin_ve_vl_pvfmkwupltnan_mvml
9227 .{ .tag = @enumFromInt(2028), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9228 // __builtin_ve_vl_pvfmkwupnan_mvl
9229 .{ .tag = @enumFromInt(2029), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9230 // __builtin_ve_vl_pvfmkwupnan_mvml
9231 .{ .tag = @enumFromInt(2030), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9232 // __builtin_ve_vl_pvfmkwupne_mvl
9233 .{ .tag = @enumFromInt(2031), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9234 // __builtin_ve_vl_pvfmkwupne_mvml
9235 .{ .tag = @enumFromInt(2032), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9236 // __builtin_ve_vl_pvfmkwupnenan_mvl
9237 .{ .tag = @enumFromInt(2033), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9238 // __builtin_ve_vl_pvfmkwupnenan_mvml
9239 .{ .tag = @enumFromInt(2034), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9240 // __builtin_ve_vl_pvfmkwupnum_mvl
9241 .{ .tag = @enumFromInt(2035), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9242 // __builtin_ve_vl_pvfmkwupnum_mvml
9243 .{ .tag = @enumFromInt(2036), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9244 // __builtin_ve_vl_pvfmsb_vsvvMvl
9245 .{ .tag = @enumFromInt(2037), .properties = .{ .param_str = "V256dLUiV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9246 // __builtin_ve_vl_pvfmsb_vsvvl
9247 .{ .tag = @enumFromInt(2038), .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9248 // __builtin_ve_vl_pvfmsb_vsvvvl
9249 .{ .tag = @enumFromInt(2039), .properties = .{ .param_str = "V256dLUiV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9250 // __builtin_ve_vl_pvfmsb_vvsvMvl
9251 .{ .tag = @enumFromInt(2040), .properties = .{ .param_str = "V256dV256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9252 // __builtin_ve_vl_pvfmsb_vvsvl
9253 .{ .tag = @enumFromInt(2041), .properties = .{ .param_str = "V256dV256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9254 // __builtin_ve_vl_pvfmsb_vvsvvl
9255 .{ .tag = @enumFromInt(2042), .properties = .{ .param_str = "V256dV256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9256 // __builtin_ve_vl_pvfmsb_vvvvMvl
9257 .{ .tag = @enumFromInt(2043), .properties = .{ .param_str = "V256dV256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9258 // __builtin_ve_vl_pvfmsb_vvvvl
9259 .{ .tag = @enumFromInt(2044), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9260 // __builtin_ve_vl_pvfmsb_vvvvvl
9261 .{ .tag = @enumFromInt(2045), .properties = .{ .param_str = "V256dV256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9262 // __builtin_ve_vl_pvfmul_vsvMvl
9263 .{ .tag = @enumFromInt(2046), .properties = .{ .param_str = "V256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9264 // __builtin_ve_vl_pvfmul_vsvl
9265 .{ .tag = @enumFromInt(2047), .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9266 // __builtin_ve_vl_pvfmul_vsvvl
9267 .{ .tag = @enumFromInt(2048), .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9268 // __builtin_ve_vl_pvfmul_vvvMvl
9269 .{ .tag = @enumFromInt(2049), .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9270 // __builtin_ve_vl_pvfmul_vvvl
9271 .{ .tag = @enumFromInt(2050), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9272 // __builtin_ve_vl_pvfmul_vvvvl
9273 .{ .tag = @enumFromInt(2051), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9274 // __builtin_ve_vl_pvfnmad_vsvvMvl
9275 .{ .tag = @enumFromInt(2052), .properties = .{ .param_str = "V256dLUiV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9276 // __builtin_ve_vl_pvfnmad_vsvvl
9277 .{ .tag = @enumFromInt(2053), .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9278 // __builtin_ve_vl_pvfnmad_vsvvvl
9279 .{ .tag = @enumFromInt(2054), .properties = .{ .param_str = "V256dLUiV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9280 // __builtin_ve_vl_pvfnmad_vvsvMvl
9281 .{ .tag = @enumFromInt(2055), .properties = .{ .param_str = "V256dV256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9282 // __builtin_ve_vl_pvfnmad_vvsvl
9283 .{ .tag = @enumFromInt(2056), .properties = .{ .param_str = "V256dV256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9284 // __builtin_ve_vl_pvfnmad_vvsvvl
9285 .{ .tag = @enumFromInt(2057), .properties = .{ .param_str = "V256dV256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9286 // __builtin_ve_vl_pvfnmad_vvvvMvl
9287 .{ .tag = @enumFromInt(2058), .properties = .{ .param_str = "V256dV256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9288 // __builtin_ve_vl_pvfnmad_vvvvl
9289 .{ .tag = @enumFromInt(2059), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9290 // __builtin_ve_vl_pvfnmad_vvvvvl
9291 .{ .tag = @enumFromInt(2060), .properties = .{ .param_str = "V256dV256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9292 // __builtin_ve_vl_pvfnmsb_vsvvMvl
9293 .{ .tag = @enumFromInt(2061), .properties = .{ .param_str = "V256dLUiV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9294 // __builtin_ve_vl_pvfnmsb_vsvvl
9295 .{ .tag = @enumFromInt(2062), .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9296 // __builtin_ve_vl_pvfnmsb_vsvvvl
9297 .{ .tag = @enumFromInt(2063), .properties = .{ .param_str = "V256dLUiV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9298 // __builtin_ve_vl_pvfnmsb_vvsvMvl
9299 .{ .tag = @enumFromInt(2064), .properties = .{ .param_str = "V256dV256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9300 // __builtin_ve_vl_pvfnmsb_vvsvl
9301 .{ .tag = @enumFromInt(2065), .properties = .{ .param_str = "V256dV256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9302 // __builtin_ve_vl_pvfnmsb_vvsvvl
9303 .{ .tag = @enumFromInt(2066), .properties = .{ .param_str = "V256dV256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9304 // __builtin_ve_vl_pvfnmsb_vvvvMvl
9305 .{ .tag = @enumFromInt(2067), .properties = .{ .param_str = "V256dV256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9306 // __builtin_ve_vl_pvfnmsb_vvvvl
9307 .{ .tag = @enumFromInt(2068), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9308 // __builtin_ve_vl_pvfnmsb_vvvvvl
9309 .{ .tag = @enumFromInt(2069), .properties = .{ .param_str = "V256dV256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9310 // __builtin_ve_vl_pvfsub_vsvMvl
9311 .{ .tag = @enumFromInt(2070), .properties = .{ .param_str = "V256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9312 // __builtin_ve_vl_pvfsub_vsvl
9313 .{ .tag = @enumFromInt(2071), .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9314 // __builtin_ve_vl_pvfsub_vsvvl
9315 .{ .tag = @enumFromInt(2072), .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9316 // __builtin_ve_vl_pvfsub_vvvMvl
9317 .{ .tag = @enumFromInt(2073), .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9318 // __builtin_ve_vl_pvfsub_vvvl
9319 .{ .tag = @enumFromInt(2074), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9320 // __builtin_ve_vl_pvfsub_vvvvl
9321 .{ .tag = @enumFromInt(2075), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9322 // __builtin_ve_vl_pvldz_vvMvl
9323 .{ .tag = @enumFromInt(2076), .properties = .{ .param_str = "V256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9324 // __builtin_ve_vl_pvldz_vvl
9325 .{ .tag = @enumFromInt(2077), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9326 // __builtin_ve_vl_pvldz_vvvl
9327 .{ .tag = @enumFromInt(2078), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9328 // __builtin_ve_vl_pvldzlo_vvl
9329 .{ .tag = @enumFromInt(2079), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9330 // __builtin_ve_vl_pvldzlo_vvmvl
9331 .{ .tag = @enumFromInt(2080), .properties = .{ .param_str = "V256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9332 // __builtin_ve_vl_pvldzlo_vvvl
9333 .{ .tag = @enumFromInt(2081), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9334 // __builtin_ve_vl_pvldzup_vvl
9335 .{ .tag = @enumFromInt(2082), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9336 // __builtin_ve_vl_pvldzup_vvmvl
9337 .{ .tag = @enumFromInt(2083), .properties = .{ .param_str = "V256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9338 // __builtin_ve_vl_pvldzup_vvvl
9339 .{ .tag = @enumFromInt(2084), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9340 // __builtin_ve_vl_pvmaxs_vsvMvl
9341 .{ .tag = @enumFromInt(2085), .properties = .{ .param_str = "V256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9342 // __builtin_ve_vl_pvmaxs_vsvl
9343 .{ .tag = @enumFromInt(2086), .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9344 // __builtin_ve_vl_pvmaxs_vsvvl
9345 .{ .tag = @enumFromInt(2087), .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9346 // __builtin_ve_vl_pvmaxs_vvvMvl
9347 .{ .tag = @enumFromInt(2088), .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9348 // __builtin_ve_vl_pvmaxs_vvvl
9349 .{ .tag = @enumFromInt(2089), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9350 // __builtin_ve_vl_pvmaxs_vvvvl
9351 .{ .tag = @enumFromInt(2090), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9352 // __builtin_ve_vl_pvmins_vsvMvl
9353 .{ .tag = @enumFromInt(2091), .properties = .{ .param_str = "V256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9354 // __builtin_ve_vl_pvmins_vsvl
9355 .{ .tag = @enumFromInt(2092), .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9356 // __builtin_ve_vl_pvmins_vsvvl
9357 .{ .tag = @enumFromInt(2093), .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9358 // __builtin_ve_vl_pvmins_vvvMvl
9359 .{ .tag = @enumFromInt(2094), .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9360 // __builtin_ve_vl_pvmins_vvvl
9361 .{ .tag = @enumFromInt(2095), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9362 // __builtin_ve_vl_pvmins_vvvvl
9363 .{ .tag = @enumFromInt(2096), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9364 // __builtin_ve_vl_pvor_vsvMvl
9365 .{ .tag = @enumFromInt(2097), .properties = .{ .param_str = "V256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9366 // __builtin_ve_vl_pvor_vsvl
9367 .{ .tag = @enumFromInt(2098), .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9368 // __builtin_ve_vl_pvor_vsvvl
9369 .{ .tag = @enumFromInt(2099), .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9370 // __builtin_ve_vl_pvor_vvvMvl
9371 .{ .tag = @enumFromInt(2100), .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9372 // __builtin_ve_vl_pvor_vvvl
9373 .{ .tag = @enumFromInt(2101), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9374 // __builtin_ve_vl_pvor_vvvvl
9375 .{ .tag = @enumFromInt(2102), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9376 // __builtin_ve_vl_pvpcnt_vvMvl
9377 .{ .tag = @enumFromInt(2103), .properties = .{ .param_str = "V256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9378 // __builtin_ve_vl_pvpcnt_vvl
9379 .{ .tag = @enumFromInt(2104), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9380 // __builtin_ve_vl_pvpcnt_vvvl
9381 .{ .tag = @enumFromInt(2105), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9382 // __builtin_ve_vl_pvpcntlo_vvl
9383 .{ .tag = @enumFromInt(2106), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9384 // __builtin_ve_vl_pvpcntlo_vvmvl
9385 .{ .tag = @enumFromInt(2107), .properties = .{ .param_str = "V256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9386 // __builtin_ve_vl_pvpcntlo_vvvl
9387 .{ .tag = @enumFromInt(2108), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9388 // __builtin_ve_vl_pvpcntup_vvl
9389 .{ .tag = @enumFromInt(2109), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9390 // __builtin_ve_vl_pvpcntup_vvmvl
9391 .{ .tag = @enumFromInt(2110), .properties = .{ .param_str = "V256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9392 // __builtin_ve_vl_pvpcntup_vvvl
9393 .{ .tag = @enumFromInt(2111), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9394 // __builtin_ve_vl_pvrcp_vvl
9395 .{ .tag = @enumFromInt(2112), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9396 // __builtin_ve_vl_pvrcp_vvvl
9397 .{ .tag = @enumFromInt(2113), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9398 // __builtin_ve_vl_pvrsqrt_vvl
9399 .{ .tag = @enumFromInt(2114), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9400 // __builtin_ve_vl_pvrsqrt_vvvl
9401 .{ .tag = @enumFromInt(2115), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9402 // __builtin_ve_vl_pvrsqrtnex_vvl
9403 .{ .tag = @enumFromInt(2116), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9404 // __builtin_ve_vl_pvrsqrtnex_vvvl
9405 .{ .tag = @enumFromInt(2117), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9406 // __builtin_ve_vl_pvseq_vl
9407 .{ .tag = @enumFromInt(2118), .properties = .{ .param_str = "V256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9408 // __builtin_ve_vl_pvseq_vvl
9409 .{ .tag = @enumFromInt(2119), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9410 // __builtin_ve_vl_pvseqlo_vl
9411 .{ .tag = @enumFromInt(2120), .properties = .{ .param_str = "V256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9412 // __builtin_ve_vl_pvseqlo_vvl
9413 .{ .tag = @enumFromInt(2121), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9414 // __builtin_ve_vl_pvsequp_vl
9415 .{ .tag = @enumFromInt(2122), .properties = .{ .param_str = "V256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9416 // __builtin_ve_vl_pvsequp_vvl
9417 .{ .tag = @enumFromInt(2123), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9418 // __builtin_ve_vl_pvsla_vvsMvl
9419 .{ .tag = @enumFromInt(2124), .properties = .{ .param_str = "V256dV256dLUiV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9420 // __builtin_ve_vl_pvsla_vvsl
9421 .{ .tag = @enumFromInt(2125), .properties = .{ .param_str = "V256dV256dLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9422 // __builtin_ve_vl_pvsla_vvsvl
9423 .{ .tag = @enumFromInt(2126), .properties = .{ .param_str = "V256dV256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9424 // __builtin_ve_vl_pvsla_vvvMvl
9425 .{ .tag = @enumFromInt(2127), .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9426 // __builtin_ve_vl_pvsla_vvvl
9427 .{ .tag = @enumFromInt(2128), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9428 // __builtin_ve_vl_pvsla_vvvvl
9429 .{ .tag = @enumFromInt(2129), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9430 // __builtin_ve_vl_pvsll_vvsMvl
9431 .{ .tag = @enumFromInt(2130), .properties = .{ .param_str = "V256dV256dLUiV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9432 // __builtin_ve_vl_pvsll_vvsl
9433 .{ .tag = @enumFromInt(2131), .properties = .{ .param_str = "V256dV256dLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9434 // __builtin_ve_vl_pvsll_vvsvl
9435 .{ .tag = @enumFromInt(2132), .properties = .{ .param_str = "V256dV256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9436 // __builtin_ve_vl_pvsll_vvvMvl
9437 .{ .tag = @enumFromInt(2133), .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9438 // __builtin_ve_vl_pvsll_vvvl
9439 .{ .tag = @enumFromInt(2134), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9440 // __builtin_ve_vl_pvsll_vvvvl
9441 .{ .tag = @enumFromInt(2135), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9442 // __builtin_ve_vl_pvsra_vvsMvl
9443 .{ .tag = @enumFromInt(2136), .properties = .{ .param_str = "V256dV256dLUiV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9444 // __builtin_ve_vl_pvsra_vvsl
9445 .{ .tag = @enumFromInt(2137), .properties = .{ .param_str = "V256dV256dLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9446 // __builtin_ve_vl_pvsra_vvsvl
9447 .{ .tag = @enumFromInt(2138), .properties = .{ .param_str = "V256dV256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9448 // __builtin_ve_vl_pvsra_vvvMvl
9449 .{ .tag = @enumFromInt(2139), .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9450 // __builtin_ve_vl_pvsra_vvvl
9451 .{ .tag = @enumFromInt(2140), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9452 // __builtin_ve_vl_pvsra_vvvvl
9453 .{ .tag = @enumFromInt(2141), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9454 // __builtin_ve_vl_pvsrl_vvsMvl
9455 .{ .tag = @enumFromInt(2142), .properties = .{ .param_str = "V256dV256dLUiV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9456 // __builtin_ve_vl_pvsrl_vvsl
9457 .{ .tag = @enumFromInt(2143), .properties = .{ .param_str = "V256dV256dLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9458 // __builtin_ve_vl_pvsrl_vvsvl
9459 .{ .tag = @enumFromInt(2144), .properties = .{ .param_str = "V256dV256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9460 // __builtin_ve_vl_pvsrl_vvvMvl
9461 .{ .tag = @enumFromInt(2145), .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9462 // __builtin_ve_vl_pvsrl_vvvl
9463 .{ .tag = @enumFromInt(2146), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9464 // __builtin_ve_vl_pvsrl_vvvvl
9465 .{ .tag = @enumFromInt(2147), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9466 // __builtin_ve_vl_pvsubs_vsvMvl
9467 .{ .tag = @enumFromInt(2148), .properties = .{ .param_str = "V256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9468 // __builtin_ve_vl_pvsubs_vsvl
9469 .{ .tag = @enumFromInt(2149), .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9470 // __builtin_ve_vl_pvsubs_vsvvl
9471 .{ .tag = @enumFromInt(2150), .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9472 // __builtin_ve_vl_pvsubs_vvvMvl
9473 .{ .tag = @enumFromInt(2151), .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9474 // __builtin_ve_vl_pvsubs_vvvl
9475 .{ .tag = @enumFromInt(2152), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9476 // __builtin_ve_vl_pvsubs_vvvvl
9477 .{ .tag = @enumFromInt(2153), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9478 // __builtin_ve_vl_pvsubu_vsvMvl
9479 .{ .tag = @enumFromInt(2154), .properties = .{ .param_str = "V256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9480 // __builtin_ve_vl_pvsubu_vsvl
9481 .{ .tag = @enumFromInt(2155), .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9482 // __builtin_ve_vl_pvsubu_vsvvl
9483 .{ .tag = @enumFromInt(2156), .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9484 // __builtin_ve_vl_pvsubu_vvvMvl
9485 .{ .tag = @enumFromInt(2157), .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9486 // __builtin_ve_vl_pvsubu_vvvl
9487 .{ .tag = @enumFromInt(2158), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9488 // __builtin_ve_vl_pvsubu_vvvvl
9489 .{ .tag = @enumFromInt(2159), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9490 // __builtin_ve_vl_pvxor_vsvMvl
9491 .{ .tag = @enumFromInt(2160), .properties = .{ .param_str = "V256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9492 // __builtin_ve_vl_pvxor_vsvl
9493 .{ .tag = @enumFromInt(2161), .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9494 // __builtin_ve_vl_pvxor_vsvvl
9495 .{ .tag = @enumFromInt(2162), .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9496 // __builtin_ve_vl_pvxor_vvvMvl
9497 .{ .tag = @enumFromInt(2163), .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9498 // __builtin_ve_vl_pvxor_vvvl
9499 .{ .tag = @enumFromInt(2164), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9500 // __builtin_ve_vl_pvxor_vvvvl
9501 .{ .tag = @enumFromInt(2165), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9502 // __builtin_ve_vl_scr_sss
9503 .{ .tag = @enumFromInt(2166), .properties = .{ .param_str = "vLUiLUiLUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9504 // __builtin_ve_vl_svm_sMs
9505 .{ .tag = @enumFromInt(2167), .properties = .{ .param_str = "LUiV512bLUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9506 // __builtin_ve_vl_svm_sms
9507 .{ .tag = @enumFromInt(2168), .properties = .{ .param_str = "LUiV256bLUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9508 // __builtin_ve_vl_svob
9509 .{ .tag = @enumFromInt(2169), .properties = .{ .param_str = "v", .target_set = TargetSet.initOne(.vevl_gen) } },
9510 // __builtin_ve_vl_tovm_sml
9511 .{ .tag = @enumFromInt(2170), .properties = .{ .param_str = "LUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9512 // __builtin_ve_vl_tscr_ssss
9513 .{ .tag = @enumFromInt(2171), .properties = .{ .param_str = "LUiLUiLUiLUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9514 // __builtin_ve_vl_vaddsl_vsvl
9515 .{ .tag = @enumFromInt(2172), .properties = .{ .param_str = "V256dLiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9516 // __builtin_ve_vl_vaddsl_vsvmvl
9517 .{ .tag = @enumFromInt(2173), .properties = .{ .param_str = "V256dLiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9518 // __builtin_ve_vl_vaddsl_vsvvl
9519 .{ .tag = @enumFromInt(2174), .properties = .{ .param_str = "V256dLiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9520 // __builtin_ve_vl_vaddsl_vvvl
9521 .{ .tag = @enumFromInt(2175), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9522 // __builtin_ve_vl_vaddsl_vvvmvl
9523 .{ .tag = @enumFromInt(2176), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9524 // __builtin_ve_vl_vaddsl_vvvvl
9525 .{ .tag = @enumFromInt(2177), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9526 // __builtin_ve_vl_vaddswsx_vsvl
9527 .{ .tag = @enumFromInt(2178), .properties = .{ .param_str = "V256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9528 // __builtin_ve_vl_vaddswsx_vsvmvl
9529 .{ .tag = @enumFromInt(2179), .properties = .{ .param_str = "V256diV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9530 // __builtin_ve_vl_vaddswsx_vsvvl
9531 .{ .tag = @enumFromInt(2180), .properties = .{ .param_str = "V256diV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9532 // __builtin_ve_vl_vaddswsx_vvvl
9533 .{ .tag = @enumFromInt(2181), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9534 // __builtin_ve_vl_vaddswsx_vvvmvl
9535 .{ .tag = @enumFromInt(2182), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9536 // __builtin_ve_vl_vaddswsx_vvvvl
9537 .{ .tag = @enumFromInt(2183), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9538 // __builtin_ve_vl_vaddswzx_vsvl
9539 .{ .tag = @enumFromInt(2184), .properties = .{ .param_str = "V256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9540 // __builtin_ve_vl_vaddswzx_vsvmvl
9541 .{ .tag = @enumFromInt(2185), .properties = .{ .param_str = "V256diV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9542 // __builtin_ve_vl_vaddswzx_vsvvl
9543 .{ .tag = @enumFromInt(2186), .properties = .{ .param_str = "V256diV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9544 // __builtin_ve_vl_vaddswzx_vvvl
9545 .{ .tag = @enumFromInt(2187), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9546 // __builtin_ve_vl_vaddswzx_vvvmvl
9547 .{ .tag = @enumFromInt(2188), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9548 // __builtin_ve_vl_vaddswzx_vvvvl
9549 .{ .tag = @enumFromInt(2189), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9550 // __builtin_ve_vl_vaddul_vsvl
9551 .{ .tag = @enumFromInt(2190), .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9552 // __builtin_ve_vl_vaddul_vsvmvl
9553 .{ .tag = @enumFromInt(2191), .properties = .{ .param_str = "V256dLUiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9554 // __builtin_ve_vl_vaddul_vsvvl
9555 .{ .tag = @enumFromInt(2192), .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9556 // __builtin_ve_vl_vaddul_vvvl
9557 .{ .tag = @enumFromInt(2193), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9558 // __builtin_ve_vl_vaddul_vvvmvl
9559 .{ .tag = @enumFromInt(2194), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9560 // __builtin_ve_vl_vaddul_vvvvl
9561 .{ .tag = @enumFromInt(2195), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9562 // __builtin_ve_vl_vadduw_vsvl
9563 .{ .tag = @enumFromInt(2196), .properties = .{ .param_str = "V256dUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9564 // __builtin_ve_vl_vadduw_vsvmvl
9565 .{ .tag = @enumFromInt(2197), .properties = .{ .param_str = "V256dUiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9566 // __builtin_ve_vl_vadduw_vsvvl
9567 .{ .tag = @enumFromInt(2198), .properties = .{ .param_str = "V256dUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9568 // __builtin_ve_vl_vadduw_vvvl
9569 .{ .tag = @enumFromInt(2199), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9570 // __builtin_ve_vl_vadduw_vvvmvl
9571 .{ .tag = @enumFromInt(2200), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9572 // __builtin_ve_vl_vadduw_vvvvl
9573 .{ .tag = @enumFromInt(2201), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9574 // __builtin_ve_vl_vand_vsvl
9575 .{ .tag = @enumFromInt(2202), .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9576 // __builtin_ve_vl_vand_vsvmvl
9577 .{ .tag = @enumFromInt(2203), .properties = .{ .param_str = "V256dLUiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9578 // __builtin_ve_vl_vand_vsvvl
9579 .{ .tag = @enumFromInt(2204), .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9580 // __builtin_ve_vl_vand_vvvl
9581 .{ .tag = @enumFromInt(2205), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9582 // __builtin_ve_vl_vand_vvvmvl
9583 .{ .tag = @enumFromInt(2206), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9584 // __builtin_ve_vl_vand_vvvvl
9585 .{ .tag = @enumFromInt(2207), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9586 // __builtin_ve_vl_vbrdd_vsl
9587 .{ .tag = @enumFromInt(2208), .properties = .{ .param_str = "V256ddUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9588 // __builtin_ve_vl_vbrdd_vsmvl
9589 .{ .tag = @enumFromInt(2209), .properties = .{ .param_str = "V256ddV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9590 // __builtin_ve_vl_vbrdd_vsvl
9591 .{ .tag = @enumFromInt(2210), .properties = .{ .param_str = "V256ddV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9592 // __builtin_ve_vl_vbrdl_vsl
9593 .{ .tag = @enumFromInt(2211), .properties = .{ .param_str = "V256dLiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9594 // __builtin_ve_vl_vbrdl_vsmvl
9595 .{ .tag = @enumFromInt(2212), .properties = .{ .param_str = "V256dLiV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9596 // __builtin_ve_vl_vbrdl_vsvl
9597 .{ .tag = @enumFromInt(2213), .properties = .{ .param_str = "V256dLiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9598 // __builtin_ve_vl_vbrds_vsl
9599 .{ .tag = @enumFromInt(2214), .properties = .{ .param_str = "V256dfUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9600 // __builtin_ve_vl_vbrds_vsmvl
9601 .{ .tag = @enumFromInt(2215), .properties = .{ .param_str = "V256dfV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9602 // __builtin_ve_vl_vbrds_vsvl
9603 .{ .tag = @enumFromInt(2216), .properties = .{ .param_str = "V256dfV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9604 // __builtin_ve_vl_vbrdw_vsl
9605 .{ .tag = @enumFromInt(2217), .properties = .{ .param_str = "V256diUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9606 // __builtin_ve_vl_vbrdw_vsmvl
9607 .{ .tag = @enumFromInt(2218), .properties = .{ .param_str = "V256diV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9608 // __builtin_ve_vl_vbrdw_vsvl
9609 .{ .tag = @enumFromInt(2219), .properties = .{ .param_str = "V256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9610 // __builtin_ve_vl_vbrv_vvl
9611 .{ .tag = @enumFromInt(2220), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9612 // __builtin_ve_vl_vbrv_vvmvl
9613 .{ .tag = @enumFromInt(2221), .properties = .{ .param_str = "V256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9614 // __builtin_ve_vl_vbrv_vvvl
9615 .{ .tag = @enumFromInt(2222), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9616 // __builtin_ve_vl_vcmpsl_vsvl
9617 .{ .tag = @enumFromInt(2223), .properties = .{ .param_str = "V256dLiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9618 // __builtin_ve_vl_vcmpsl_vsvmvl
9619 .{ .tag = @enumFromInt(2224), .properties = .{ .param_str = "V256dLiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9620 // __builtin_ve_vl_vcmpsl_vsvvl
9621 .{ .tag = @enumFromInt(2225), .properties = .{ .param_str = "V256dLiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9622 // __builtin_ve_vl_vcmpsl_vvvl
9623 .{ .tag = @enumFromInt(2226), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9624 // __builtin_ve_vl_vcmpsl_vvvmvl
9625 .{ .tag = @enumFromInt(2227), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9626 // __builtin_ve_vl_vcmpsl_vvvvl
9627 .{ .tag = @enumFromInt(2228), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9628 // __builtin_ve_vl_vcmpswsx_vsvl
9629 .{ .tag = @enumFromInt(2229), .properties = .{ .param_str = "V256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9630 // __builtin_ve_vl_vcmpswsx_vsvmvl
9631 .{ .tag = @enumFromInt(2230), .properties = .{ .param_str = "V256diV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9632 // __builtin_ve_vl_vcmpswsx_vsvvl
9633 .{ .tag = @enumFromInt(2231), .properties = .{ .param_str = "V256diV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9634 // __builtin_ve_vl_vcmpswsx_vvvl
9635 .{ .tag = @enumFromInt(2232), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9636 // __builtin_ve_vl_vcmpswsx_vvvmvl
9637 .{ .tag = @enumFromInt(2233), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9638 // __builtin_ve_vl_vcmpswsx_vvvvl
9639 .{ .tag = @enumFromInt(2234), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9640 // __builtin_ve_vl_vcmpswzx_vsvl
9641 .{ .tag = @enumFromInt(2235), .properties = .{ .param_str = "V256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9642 // __builtin_ve_vl_vcmpswzx_vsvmvl
9643 .{ .tag = @enumFromInt(2236), .properties = .{ .param_str = "V256diV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9644 // __builtin_ve_vl_vcmpswzx_vsvvl
9645 .{ .tag = @enumFromInt(2237), .properties = .{ .param_str = "V256diV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9646 // __builtin_ve_vl_vcmpswzx_vvvl
9647 .{ .tag = @enumFromInt(2238), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9648 // __builtin_ve_vl_vcmpswzx_vvvmvl
9649 .{ .tag = @enumFromInt(2239), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9650 // __builtin_ve_vl_vcmpswzx_vvvvl
9651 .{ .tag = @enumFromInt(2240), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9652 // __builtin_ve_vl_vcmpul_vsvl
9653 .{ .tag = @enumFromInt(2241), .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9654 // __builtin_ve_vl_vcmpul_vsvmvl
9655 .{ .tag = @enumFromInt(2242), .properties = .{ .param_str = "V256dLUiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9656 // __builtin_ve_vl_vcmpul_vsvvl
9657 .{ .tag = @enumFromInt(2243), .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9658 // __builtin_ve_vl_vcmpul_vvvl
9659 .{ .tag = @enumFromInt(2244), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9660 // __builtin_ve_vl_vcmpul_vvvmvl
9661 .{ .tag = @enumFromInt(2245), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9662 // __builtin_ve_vl_vcmpul_vvvvl
9663 .{ .tag = @enumFromInt(2246), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9664 // __builtin_ve_vl_vcmpuw_vsvl
9665 .{ .tag = @enumFromInt(2247), .properties = .{ .param_str = "V256dUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9666 // __builtin_ve_vl_vcmpuw_vsvmvl
9667 .{ .tag = @enumFromInt(2248), .properties = .{ .param_str = "V256dUiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9668 // __builtin_ve_vl_vcmpuw_vsvvl
9669 .{ .tag = @enumFromInt(2249), .properties = .{ .param_str = "V256dUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9670 // __builtin_ve_vl_vcmpuw_vvvl
9671 .{ .tag = @enumFromInt(2250), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9672 // __builtin_ve_vl_vcmpuw_vvvmvl
9673 .{ .tag = @enumFromInt(2251), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9674 // __builtin_ve_vl_vcmpuw_vvvvl
9675 .{ .tag = @enumFromInt(2252), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9676 // __builtin_ve_vl_vcp_vvmvl
9677 .{ .tag = @enumFromInt(2253), .properties = .{ .param_str = "V256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9678 // __builtin_ve_vl_vcvtdl_vvl
9679 .{ .tag = @enumFromInt(2254), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9680 // __builtin_ve_vl_vcvtdl_vvvl
9681 .{ .tag = @enumFromInt(2255), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9682 // __builtin_ve_vl_vcvtds_vvl
9683 .{ .tag = @enumFromInt(2256), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9684 // __builtin_ve_vl_vcvtds_vvvl
9685 .{ .tag = @enumFromInt(2257), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9686 // __builtin_ve_vl_vcvtdw_vvl
9687 .{ .tag = @enumFromInt(2258), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9688 // __builtin_ve_vl_vcvtdw_vvvl
9689 .{ .tag = @enumFromInt(2259), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9690 // __builtin_ve_vl_vcvtld_vvl
9691 .{ .tag = @enumFromInt(2260), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9692 // __builtin_ve_vl_vcvtld_vvmvl
9693 .{ .tag = @enumFromInt(2261), .properties = .{ .param_str = "V256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9694 // __builtin_ve_vl_vcvtld_vvvl
9695 .{ .tag = @enumFromInt(2262), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9696 // __builtin_ve_vl_vcvtldrz_vvl
9697 .{ .tag = @enumFromInt(2263), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9698 // __builtin_ve_vl_vcvtldrz_vvmvl
9699 .{ .tag = @enumFromInt(2264), .properties = .{ .param_str = "V256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9700 // __builtin_ve_vl_vcvtldrz_vvvl
9701 .{ .tag = @enumFromInt(2265), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9702 // __builtin_ve_vl_vcvtsd_vvl
9703 .{ .tag = @enumFromInt(2266), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9704 // __builtin_ve_vl_vcvtsd_vvvl
9705 .{ .tag = @enumFromInt(2267), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9706 // __builtin_ve_vl_vcvtsw_vvl
9707 .{ .tag = @enumFromInt(2268), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9708 // __builtin_ve_vl_vcvtsw_vvvl
9709 .{ .tag = @enumFromInt(2269), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9710 // __builtin_ve_vl_vcvtwdsx_vvl
9711 .{ .tag = @enumFromInt(2270), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9712 // __builtin_ve_vl_vcvtwdsx_vvmvl
9713 .{ .tag = @enumFromInt(2271), .properties = .{ .param_str = "V256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9714 // __builtin_ve_vl_vcvtwdsx_vvvl
9715 .{ .tag = @enumFromInt(2272), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9716 // __builtin_ve_vl_vcvtwdsxrz_vvl
9717 .{ .tag = @enumFromInt(2273), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9718 // __builtin_ve_vl_vcvtwdsxrz_vvmvl
9719 .{ .tag = @enumFromInt(2274), .properties = .{ .param_str = "V256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9720 // __builtin_ve_vl_vcvtwdsxrz_vvvl
9721 .{ .tag = @enumFromInt(2275), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9722 // __builtin_ve_vl_vcvtwdzx_vvl
9723 .{ .tag = @enumFromInt(2276), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9724 // __builtin_ve_vl_vcvtwdzx_vvmvl
9725 .{ .tag = @enumFromInt(2277), .properties = .{ .param_str = "V256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9726 // __builtin_ve_vl_vcvtwdzx_vvvl
9727 .{ .tag = @enumFromInt(2278), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9728 // __builtin_ve_vl_vcvtwdzxrz_vvl
9729 .{ .tag = @enumFromInt(2279), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9730 // __builtin_ve_vl_vcvtwdzxrz_vvmvl
9731 .{ .tag = @enumFromInt(2280), .properties = .{ .param_str = "V256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9732 // __builtin_ve_vl_vcvtwdzxrz_vvvl
9733 .{ .tag = @enumFromInt(2281), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9734 // __builtin_ve_vl_vcvtwssx_vvl
9735 .{ .tag = @enumFromInt(2282), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9736 // __builtin_ve_vl_vcvtwssx_vvmvl
9737 .{ .tag = @enumFromInt(2283), .properties = .{ .param_str = "V256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9738 // __builtin_ve_vl_vcvtwssx_vvvl
9739 .{ .tag = @enumFromInt(2284), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9740 // __builtin_ve_vl_vcvtwssxrz_vvl
9741 .{ .tag = @enumFromInt(2285), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9742 // __builtin_ve_vl_vcvtwssxrz_vvmvl
9743 .{ .tag = @enumFromInt(2286), .properties = .{ .param_str = "V256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9744 // __builtin_ve_vl_vcvtwssxrz_vvvl
9745 .{ .tag = @enumFromInt(2287), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9746 // __builtin_ve_vl_vcvtwszx_vvl
9747 .{ .tag = @enumFromInt(2288), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9748 // __builtin_ve_vl_vcvtwszx_vvmvl
9749 .{ .tag = @enumFromInt(2289), .properties = .{ .param_str = "V256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9750 // __builtin_ve_vl_vcvtwszx_vvvl
9751 .{ .tag = @enumFromInt(2290), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9752 // __builtin_ve_vl_vcvtwszxrz_vvl
9753 .{ .tag = @enumFromInt(2291), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9754 // __builtin_ve_vl_vcvtwszxrz_vvmvl
9755 .{ .tag = @enumFromInt(2292), .properties = .{ .param_str = "V256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9756 // __builtin_ve_vl_vcvtwszxrz_vvvl
9757 .{ .tag = @enumFromInt(2293), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9758 // __builtin_ve_vl_vdivsl_vsvl
9759 .{ .tag = @enumFromInt(2294), .properties = .{ .param_str = "V256dLiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9760 // __builtin_ve_vl_vdivsl_vsvmvl
9761 .{ .tag = @enumFromInt(2295), .properties = .{ .param_str = "V256dLiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9762 // __builtin_ve_vl_vdivsl_vsvvl
9763 .{ .tag = @enumFromInt(2296), .properties = .{ .param_str = "V256dLiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9764 // __builtin_ve_vl_vdivsl_vvsl
9765 .{ .tag = @enumFromInt(2297), .properties = .{ .param_str = "V256dV256dLiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9766 // __builtin_ve_vl_vdivsl_vvsmvl
9767 .{ .tag = @enumFromInt(2298), .properties = .{ .param_str = "V256dV256dLiV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9768 // __builtin_ve_vl_vdivsl_vvsvl
9769 .{ .tag = @enumFromInt(2299), .properties = .{ .param_str = "V256dV256dLiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9770 // __builtin_ve_vl_vdivsl_vvvl
9771 .{ .tag = @enumFromInt(2300), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9772 // __builtin_ve_vl_vdivsl_vvvmvl
9773 .{ .tag = @enumFromInt(2301), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9774 // __builtin_ve_vl_vdivsl_vvvvl
9775 .{ .tag = @enumFromInt(2302), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9776 // __builtin_ve_vl_vdivswsx_vsvl
9777 .{ .tag = @enumFromInt(2303), .properties = .{ .param_str = "V256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9778 // __builtin_ve_vl_vdivswsx_vsvmvl
9779 .{ .tag = @enumFromInt(2304), .properties = .{ .param_str = "V256diV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9780 // __builtin_ve_vl_vdivswsx_vsvvl
9781 .{ .tag = @enumFromInt(2305), .properties = .{ .param_str = "V256diV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9782 // __builtin_ve_vl_vdivswsx_vvsl
9783 .{ .tag = @enumFromInt(2306), .properties = .{ .param_str = "V256dV256diUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9784 // __builtin_ve_vl_vdivswsx_vvsmvl
9785 .{ .tag = @enumFromInt(2307), .properties = .{ .param_str = "V256dV256diV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9786 // __builtin_ve_vl_vdivswsx_vvsvl
9787 .{ .tag = @enumFromInt(2308), .properties = .{ .param_str = "V256dV256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9788 // __builtin_ve_vl_vdivswsx_vvvl
9789 .{ .tag = @enumFromInt(2309), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9790 // __builtin_ve_vl_vdivswsx_vvvmvl
9791 .{ .tag = @enumFromInt(2310), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9792 // __builtin_ve_vl_vdivswsx_vvvvl
9793 .{ .tag = @enumFromInt(2311), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9794 // __builtin_ve_vl_vdivswzx_vsvl
9795 .{ .tag = @enumFromInt(2312), .properties = .{ .param_str = "V256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9796 // __builtin_ve_vl_vdivswzx_vsvmvl
9797 .{ .tag = @enumFromInt(2313), .properties = .{ .param_str = "V256diV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9798 // __builtin_ve_vl_vdivswzx_vsvvl
9799 .{ .tag = @enumFromInt(2314), .properties = .{ .param_str = "V256diV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9800 // __builtin_ve_vl_vdivswzx_vvsl
9801 .{ .tag = @enumFromInt(2315), .properties = .{ .param_str = "V256dV256diUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9802 // __builtin_ve_vl_vdivswzx_vvsmvl
9803 .{ .tag = @enumFromInt(2316), .properties = .{ .param_str = "V256dV256diV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9804 // __builtin_ve_vl_vdivswzx_vvsvl
9805 .{ .tag = @enumFromInt(2317), .properties = .{ .param_str = "V256dV256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9806 // __builtin_ve_vl_vdivswzx_vvvl
9807 .{ .tag = @enumFromInt(2318), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9808 // __builtin_ve_vl_vdivswzx_vvvmvl
9809 .{ .tag = @enumFromInt(2319), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9810 // __builtin_ve_vl_vdivswzx_vvvvl
9811 .{ .tag = @enumFromInt(2320), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9812 // __builtin_ve_vl_vdivul_vsvl
9813 .{ .tag = @enumFromInt(2321), .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9814 // __builtin_ve_vl_vdivul_vsvmvl
9815 .{ .tag = @enumFromInt(2322), .properties = .{ .param_str = "V256dLUiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9816 // __builtin_ve_vl_vdivul_vsvvl
9817 .{ .tag = @enumFromInt(2323), .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9818 // __builtin_ve_vl_vdivul_vvsl
9819 .{ .tag = @enumFromInt(2324), .properties = .{ .param_str = "V256dV256dLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9820 // __builtin_ve_vl_vdivul_vvsmvl
9821 .{ .tag = @enumFromInt(2325), .properties = .{ .param_str = "V256dV256dLUiV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9822 // __builtin_ve_vl_vdivul_vvsvl
9823 .{ .tag = @enumFromInt(2326), .properties = .{ .param_str = "V256dV256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9824 // __builtin_ve_vl_vdivul_vvvl
9825 .{ .tag = @enumFromInt(2327), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9826 // __builtin_ve_vl_vdivul_vvvmvl
9827 .{ .tag = @enumFromInt(2328), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9828 // __builtin_ve_vl_vdivul_vvvvl
9829 .{ .tag = @enumFromInt(2329), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9830 // __builtin_ve_vl_vdivuw_vsvl
9831 .{ .tag = @enumFromInt(2330), .properties = .{ .param_str = "V256dUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9832 // __builtin_ve_vl_vdivuw_vsvmvl
9833 .{ .tag = @enumFromInt(2331), .properties = .{ .param_str = "V256dUiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9834 // __builtin_ve_vl_vdivuw_vsvvl
9835 .{ .tag = @enumFromInt(2332), .properties = .{ .param_str = "V256dUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9836 // __builtin_ve_vl_vdivuw_vvsl
9837 .{ .tag = @enumFromInt(2333), .properties = .{ .param_str = "V256dV256dUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9838 // __builtin_ve_vl_vdivuw_vvsmvl
9839 .{ .tag = @enumFromInt(2334), .properties = .{ .param_str = "V256dV256dUiV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9840 // __builtin_ve_vl_vdivuw_vvsvl
9841 .{ .tag = @enumFromInt(2335), .properties = .{ .param_str = "V256dV256dUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9842 // __builtin_ve_vl_vdivuw_vvvl
9843 .{ .tag = @enumFromInt(2336), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9844 // __builtin_ve_vl_vdivuw_vvvmvl
9845 .{ .tag = @enumFromInt(2337), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9846 // __builtin_ve_vl_vdivuw_vvvvl
9847 .{ .tag = @enumFromInt(2338), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9848 // __builtin_ve_vl_veqv_vsvl
9849 .{ .tag = @enumFromInt(2339), .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9850 // __builtin_ve_vl_veqv_vsvmvl
9851 .{ .tag = @enumFromInt(2340), .properties = .{ .param_str = "V256dLUiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9852 // __builtin_ve_vl_veqv_vsvvl
9853 .{ .tag = @enumFromInt(2341), .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9854 // __builtin_ve_vl_veqv_vvvl
9855 .{ .tag = @enumFromInt(2342), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9856 // __builtin_ve_vl_veqv_vvvmvl
9857 .{ .tag = @enumFromInt(2343), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9858 // __builtin_ve_vl_veqv_vvvvl
9859 .{ .tag = @enumFromInt(2344), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9860 // __builtin_ve_vl_vex_vvmvl
9861 .{ .tag = @enumFromInt(2345), .properties = .{ .param_str = "V256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9862 // __builtin_ve_vl_vfaddd_vsvl
9863 .{ .tag = @enumFromInt(2346), .properties = .{ .param_str = "V256ddV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9864 // __builtin_ve_vl_vfaddd_vsvmvl
9865 .{ .tag = @enumFromInt(2347), .properties = .{ .param_str = "V256ddV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9866 // __builtin_ve_vl_vfaddd_vsvvl
9867 .{ .tag = @enumFromInt(2348), .properties = .{ .param_str = "V256ddV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9868 // __builtin_ve_vl_vfaddd_vvvl
9869 .{ .tag = @enumFromInt(2349), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9870 // __builtin_ve_vl_vfaddd_vvvmvl
9871 .{ .tag = @enumFromInt(2350), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9872 // __builtin_ve_vl_vfaddd_vvvvl
9873 .{ .tag = @enumFromInt(2351), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9874 // __builtin_ve_vl_vfadds_vsvl
9875 .{ .tag = @enumFromInt(2352), .properties = .{ .param_str = "V256dfV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9876 // __builtin_ve_vl_vfadds_vsvmvl
9877 .{ .tag = @enumFromInt(2353), .properties = .{ .param_str = "V256dfV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9878 // __builtin_ve_vl_vfadds_vsvvl
9879 .{ .tag = @enumFromInt(2354), .properties = .{ .param_str = "V256dfV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9880 // __builtin_ve_vl_vfadds_vvvl
9881 .{ .tag = @enumFromInt(2355), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9882 // __builtin_ve_vl_vfadds_vvvmvl
9883 .{ .tag = @enumFromInt(2356), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9884 // __builtin_ve_vl_vfadds_vvvvl
9885 .{ .tag = @enumFromInt(2357), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9886 // __builtin_ve_vl_vfcmpd_vsvl
9887 .{ .tag = @enumFromInt(2358), .properties = .{ .param_str = "V256ddV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9888 // __builtin_ve_vl_vfcmpd_vsvmvl
9889 .{ .tag = @enumFromInt(2359), .properties = .{ .param_str = "V256ddV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9890 // __builtin_ve_vl_vfcmpd_vsvvl
9891 .{ .tag = @enumFromInt(2360), .properties = .{ .param_str = "V256ddV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9892 // __builtin_ve_vl_vfcmpd_vvvl
9893 .{ .tag = @enumFromInt(2361), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9894 // __builtin_ve_vl_vfcmpd_vvvmvl
9895 .{ .tag = @enumFromInt(2362), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9896 // __builtin_ve_vl_vfcmpd_vvvvl
9897 .{ .tag = @enumFromInt(2363), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9898 // __builtin_ve_vl_vfcmps_vsvl
9899 .{ .tag = @enumFromInt(2364), .properties = .{ .param_str = "V256dfV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9900 // __builtin_ve_vl_vfcmps_vsvmvl
9901 .{ .tag = @enumFromInt(2365), .properties = .{ .param_str = "V256dfV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9902 // __builtin_ve_vl_vfcmps_vsvvl
9903 .{ .tag = @enumFromInt(2366), .properties = .{ .param_str = "V256dfV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9904 // __builtin_ve_vl_vfcmps_vvvl
9905 .{ .tag = @enumFromInt(2367), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9906 // __builtin_ve_vl_vfcmps_vvvmvl
9907 .{ .tag = @enumFromInt(2368), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9908 // __builtin_ve_vl_vfcmps_vvvvl
9909 .{ .tag = @enumFromInt(2369), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9910 // __builtin_ve_vl_vfdivd_vsvl
9911 .{ .tag = @enumFromInt(2370), .properties = .{ .param_str = "V256ddV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9912 // __builtin_ve_vl_vfdivd_vsvmvl
9913 .{ .tag = @enumFromInt(2371), .properties = .{ .param_str = "V256ddV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9914 // __builtin_ve_vl_vfdivd_vsvvl
9915 .{ .tag = @enumFromInt(2372), .properties = .{ .param_str = "V256ddV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9916 // __builtin_ve_vl_vfdivd_vvvl
9917 .{ .tag = @enumFromInt(2373), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9918 // __builtin_ve_vl_vfdivd_vvvmvl
9919 .{ .tag = @enumFromInt(2374), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9920 // __builtin_ve_vl_vfdivd_vvvvl
9921 .{ .tag = @enumFromInt(2375), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9922 // __builtin_ve_vl_vfdivs_vsvl
9923 .{ .tag = @enumFromInt(2376), .properties = .{ .param_str = "V256dfV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9924 // __builtin_ve_vl_vfdivs_vsvmvl
9925 .{ .tag = @enumFromInt(2377), .properties = .{ .param_str = "V256dfV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9926 // __builtin_ve_vl_vfdivs_vsvvl
9927 .{ .tag = @enumFromInt(2378), .properties = .{ .param_str = "V256dfV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9928 // __builtin_ve_vl_vfdivs_vvvl
9929 .{ .tag = @enumFromInt(2379), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9930 // __builtin_ve_vl_vfdivs_vvvmvl
9931 .{ .tag = @enumFromInt(2380), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9932 // __builtin_ve_vl_vfdivs_vvvvl
9933 .{ .tag = @enumFromInt(2381), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9934 // __builtin_ve_vl_vfmadd_vsvvl
9935 .{ .tag = @enumFromInt(2382), .properties = .{ .param_str = "V256ddV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9936 // __builtin_ve_vl_vfmadd_vsvvmvl
9937 .{ .tag = @enumFromInt(2383), .properties = .{ .param_str = "V256ddV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9938 // __builtin_ve_vl_vfmadd_vsvvvl
9939 .{ .tag = @enumFromInt(2384), .properties = .{ .param_str = "V256ddV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9940 // __builtin_ve_vl_vfmadd_vvsvl
9941 .{ .tag = @enumFromInt(2385), .properties = .{ .param_str = "V256dV256ddV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9942 // __builtin_ve_vl_vfmadd_vvsvmvl
9943 .{ .tag = @enumFromInt(2386), .properties = .{ .param_str = "V256dV256ddV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9944 // __builtin_ve_vl_vfmadd_vvsvvl
9945 .{ .tag = @enumFromInt(2387), .properties = .{ .param_str = "V256dV256ddV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9946 // __builtin_ve_vl_vfmadd_vvvvl
9947 .{ .tag = @enumFromInt(2388), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9948 // __builtin_ve_vl_vfmadd_vvvvmvl
9949 .{ .tag = @enumFromInt(2389), .properties = .{ .param_str = "V256dV256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9950 // __builtin_ve_vl_vfmadd_vvvvvl
9951 .{ .tag = @enumFromInt(2390), .properties = .{ .param_str = "V256dV256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9952 // __builtin_ve_vl_vfmads_vsvvl
9953 .{ .tag = @enumFromInt(2391), .properties = .{ .param_str = "V256dfV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9954 // __builtin_ve_vl_vfmads_vsvvmvl
9955 .{ .tag = @enumFromInt(2392), .properties = .{ .param_str = "V256dfV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9956 // __builtin_ve_vl_vfmads_vsvvvl
9957 .{ .tag = @enumFromInt(2393), .properties = .{ .param_str = "V256dfV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9958 // __builtin_ve_vl_vfmads_vvsvl
9959 .{ .tag = @enumFromInt(2394), .properties = .{ .param_str = "V256dV256dfV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9960 // __builtin_ve_vl_vfmads_vvsvmvl
9961 .{ .tag = @enumFromInt(2395), .properties = .{ .param_str = "V256dV256dfV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9962 // __builtin_ve_vl_vfmads_vvsvvl
9963 .{ .tag = @enumFromInt(2396), .properties = .{ .param_str = "V256dV256dfV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9964 // __builtin_ve_vl_vfmads_vvvvl
9965 .{ .tag = @enumFromInt(2397), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9966 // __builtin_ve_vl_vfmads_vvvvmvl
9967 .{ .tag = @enumFromInt(2398), .properties = .{ .param_str = "V256dV256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9968 // __builtin_ve_vl_vfmads_vvvvvl
9969 .{ .tag = @enumFromInt(2399), .properties = .{ .param_str = "V256dV256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9970 // __builtin_ve_vl_vfmaxd_vsvl
9971 .{ .tag = @enumFromInt(2400), .properties = .{ .param_str = "V256ddV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9972 // __builtin_ve_vl_vfmaxd_vsvmvl
9973 .{ .tag = @enumFromInt(2401), .properties = .{ .param_str = "V256ddV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9974 // __builtin_ve_vl_vfmaxd_vsvvl
9975 .{ .tag = @enumFromInt(2402), .properties = .{ .param_str = "V256ddV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9976 // __builtin_ve_vl_vfmaxd_vvvl
9977 .{ .tag = @enumFromInt(2403), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9978 // __builtin_ve_vl_vfmaxd_vvvmvl
9979 .{ .tag = @enumFromInt(2404), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9980 // __builtin_ve_vl_vfmaxd_vvvvl
9981 .{ .tag = @enumFromInt(2405), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9982 // __builtin_ve_vl_vfmaxs_vsvl
9983 .{ .tag = @enumFromInt(2406), .properties = .{ .param_str = "V256dfV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9984 // __builtin_ve_vl_vfmaxs_vsvmvl
9985 .{ .tag = @enumFromInt(2407), .properties = .{ .param_str = "V256dfV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9986 // __builtin_ve_vl_vfmaxs_vsvvl
9987 .{ .tag = @enumFromInt(2408), .properties = .{ .param_str = "V256dfV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9988 // __builtin_ve_vl_vfmaxs_vvvl
9989 .{ .tag = @enumFromInt(2409), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9990 // __builtin_ve_vl_vfmaxs_vvvmvl
9991 .{ .tag = @enumFromInt(2410), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9992 // __builtin_ve_vl_vfmaxs_vvvvl
9993 .{ .tag = @enumFromInt(2411), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9994 // __builtin_ve_vl_vfmind_vsvl
9995 .{ .tag = @enumFromInt(2412), .properties = .{ .param_str = "V256ddV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9996 // __builtin_ve_vl_vfmind_vsvmvl
9997 .{ .tag = @enumFromInt(2413), .properties = .{ .param_str = "V256ddV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
9998 // __builtin_ve_vl_vfmind_vsvvl
9999 .{ .tag = @enumFromInt(2414), .properties = .{ .param_str = "V256ddV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10000 // __builtin_ve_vl_vfmind_vvvl
10001 .{ .tag = @enumFromInt(2415), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10002 // __builtin_ve_vl_vfmind_vvvmvl
10003 .{ .tag = @enumFromInt(2416), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10004 // __builtin_ve_vl_vfmind_vvvvl
10005 .{ .tag = @enumFromInt(2417), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10006 // __builtin_ve_vl_vfmins_vsvl
10007 .{ .tag = @enumFromInt(2418), .properties = .{ .param_str = "V256dfV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10008 // __builtin_ve_vl_vfmins_vsvmvl
10009 .{ .tag = @enumFromInt(2419), .properties = .{ .param_str = "V256dfV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10010 // __builtin_ve_vl_vfmins_vsvvl
10011 .{ .tag = @enumFromInt(2420), .properties = .{ .param_str = "V256dfV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10012 // __builtin_ve_vl_vfmins_vvvl
10013 .{ .tag = @enumFromInt(2421), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10014 // __builtin_ve_vl_vfmins_vvvmvl
10015 .{ .tag = @enumFromInt(2422), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10016 // __builtin_ve_vl_vfmins_vvvvl
10017 .{ .tag = @enumFromInt(2423), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10018 // __builtin_ve_vl_vfmkdeq_mvl
10019 .{ .tag = @enumFromInt(2424), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10020 // __builtin_ve_vl_vfmkdeq_mvml
10021 .{ .tag = @enumFromInt(2425), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10022 // __builtin_ve_vl_vfmkdeqnan_mvl
10023 .{ .tag = @enumFromInt(2426), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10024 // __builtin_ve_vl_vfmkdeqnan_mvml
10025 .{ .tag = @enumFromInt(2427), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10026 // __builtin_ve_vl_vfmkdge_mvl
10027 .{ .tag = @enumFromInt(2428), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10028 // __builtin_ve_vl_vfmkdge_mvml
10029 .{ .tag = @enumFromInt(2429), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10030 // __builtin_ve_vl_vfmkdgenan_mvl
10031 .{ .tag = @enumFromInt(2430), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10032 // __builtin_ve_vl_vfmkdgenan_mvml
10033 .{ .tag = @enumFromInt(2431), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10034 // __builtin_ve_vl_vfmkdgt_mvl
10035 .{ .tag = @enumFromInt(2432), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10036 // __builtin_ve_vl_vfmkdgt_mvml
10037 .{ .tag = @enumFromInt(2433), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10038 // __builtin_ve_vl_vfmkdgtnan_mvl
10039 .{ .tag = @enumFromInt(2434), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10040 // __builtin_ve_vl_vfmkdgtnan_mvml
10041 .{ .tag = @enumFromInt(2435), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10042 // __builtin_ve_vl_vfmkdle_mvl
10043 .{ .tag = @enumFromInt(2436), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10044 // __builtin_ve_vl_vfmkdle_mvml
10045 .{ .tag = @enumFromInt(2437), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10046 // __builtin_ve_vl_vfmkdlenan_mvl
10047 .{ .tag = @enumFromInt(2438), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10048 // __builtin_ve_vl_vfmkdlenan_mvml
10049 .{ .tag = @enumFromInt(2439), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10050 // __builtin_ve_vl_vfmkdlt_mvl
10051 .{ .tag = @enumFromInt(2440), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10052 // __builtin_ve_vl_vfmkdlt_mvml
10053 .{ .tag = @enumFromInt(2441), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10054 // __builtin_ve_vl_vfmkdltnan_mvl
10055 .{ .tag = @enumFromInt(2442), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10056 // __builtin_ve_vl_vfmkdltnan_mvml
10057 .{ .tag = @enumFromInt(2443), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10058 // __builtin_ve_vl_vfmkdnan_mvl
10059 .{ .tag = @enumFromInt(2444), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10060 // __builtin_ve_vl_vfmkdnan_mvml
10061 .{ .tag = @enumFromInt(2445), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10062 // __builtin_ve_vl_vfmkdne_mvl
10063 .{ .tag = @enumFromInt(2446), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10064 // __builtin_ve_vl_vfmkdne_mvml
10065 .{ .tag = @enumFromInt(2447), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10066 // __builtin_ve_vl_vfmkdnenan_mvl
10067 .{ .tag = @enumFromInt(2448), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10068 // __builtin_ve_vl_vfmkdnenan_mvml
10069 .{ .tag = @enumFromInt(2449), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10070 // __builtin_ve_vl_vfmkdnum_mvl
10071 .{ .tag = @enumFromInt(2450), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10072 // __builtin_ve_vl_vfmkdnum_mvml
10073 .{ .tag = @enumFromInt(2451), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10074 // __builtin_ve_vl_vfmklaf_ml
10075 .{ .tag = @enumFromInt(2452), .properties = .{ .param_str = "V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10076 // __builtin_ve_vl_vfmklat_ml
10077 .{ .tag = @enumFromInt(2453), .properties = .{ .param_str = "V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10078 // __builtin_ve_vl_vfmkleq_mvl
10079 .{ .tag = @enumFromInt(2454), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10080 // __builtin_ve_vl_vfmkleq_mvml
10081 .{ .tag = @enumFromInt(2455), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10082 // __builtin_ve_vl_vfmkleqnan_mvl
10083 .{ .tag = @enumFromInt(2456), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10084 // __builtin_ve_vl_vfmkleqnan_mvml
10085 .{ .tag = @enumFromInt(2457), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10086 // __builtin_ve_vl_vfmklge_mvl
10087 .{ .tag = @enumFromInt(2458), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10088 // __builtin_ve_vl_vfmklge_mvml
10089 .{ .tag = @enumFromInt(2459), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10090 // __builtin_ve_vl_vfmklgenan_mvl
10091 .{ .tag = @enumFromInt(2460), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10092 // __builtin_ve_vl_vfmklgenan_mvml
10093 .{ .tag = @enumFromInt(2461), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10094 // __builtin_ve_vl_vfmklgt_mvl
10095 .{ .tag = @enumFromInt(2462), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10096 // __builtin_ve_vl_vfmklgt_mvml
10097 .{ .tag = @enumFromInt(2463), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10098 // __builtin_ve_vl_vfmklgtnan_mvl
10099 .{ .tag = @enumFromInt(2464), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10100 // __builtin_ve_vl_vfmklgtnan_mvml
10101 .{ .tag = @enumFromInt(2465), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10102 // __builtin_ve_vl_vfmklle_mvl
10103 .{ .tag = @enumFromInt(2466), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10104 // __builtin_ve_vl_vfmklle_mvml
10105 .{ .tag = @enumFromInt(2467), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10106 // __builtin_ve_vl_vfmkllenan_mvl
10107 .{ .tag = @enumFromInt(2468), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10108 // __builtin_ve_vl_vfmkllenan_mvml
10109 .{ .tag = @enumFromInt(2469), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10110 // __builtin_ve_vl_vfmkllt_mvl
10111 .{ .tag = @enumFromInt(2470), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10112 // __builtin_ve_vl_vfmkllt_mvml
10113 .{ .tag = @enumFromInt(2471), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10114 // __builtin_ve_vl_vfmklltnan_mvl
10115 .{ .tag = @enumFromInt(2472), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10116 // __builtin_ve_vl_vfmklltnan_mvml
10117 .{ .tag = @enumFromInt(2473), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10118 // __builtin_ve_vl_vfmklnan_mvl
10119 .{ .tag = @enumFromInt(2474), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10120 // __builtin_ve_vl_vfmklnan_mvml
10121 .{ .tag = @enumFromInt(2475), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10122 // __builtin_ve_vl_vfmklne_mvl
10123 .{ .tag = @enumFromInt(2476), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10124 // __builtin_ve_vl_vfmklne_mvml
10125 .{ .tag = @enumFromInt(2477), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10126 // __builtin_ve_vl_vfmklnenan_mvl
10127 .{ .tag = @enumFromInt(2478), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10128 // __builtin_ve_vl_vfmklnenan_mvml
10129 .{ .tag = @enumFromInt(2479), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10130 // __builtin_ve_vl_vfmklnum_mvl
10131 .{ .tag = @enumFromInt(2480), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10132 // __builtin_ve_vl_vfmklnum_mvml
10133 .{ .tag = @enumFromInt(2481), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10134 // __builtin_ve_vl_vfmkseq_mvl
10135 .{ .tag = @enumFromInt(2482), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10136 // __builtin_ve_vl_vfmkseq_mvml
10137 .{ .tag = @enumFromInt(2483), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10138 // __builtin_ve_vl_vfmkseqnan_mvl
10139 .{ .tag = @enumFromInt(2484), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10140 // __builtin_ve_vl_vfmkseqnan_mvml
10141 .{ .tag = @enumFromInt(2485), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10142 // __builtin_ve_vl_vfmksge_mvl
10143 .{ .tag = @enumFromInt(2486), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10144 // __builtin_ve_vl_vfmksge_mvml
10145 .{ .tag = @enumFromInt(2487), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10146 // __builtin_ve_vl_vfmksgenan_mvl
10147 .{ .tag = @enumFromInt(2488), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10148 // __builtin_ve_vl_vfmksgenan_mvml
10149 .{ .tag = @enumFromInt(2489), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10150 // __builtin_ve_vl_vfmksgt_mvl
10151 .{ .tag = @enumFromInt(2490), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10152 // __builtin_ve_vl_vfmksgt_mvml
10153 .{ .tag = @enumFromInt(2491), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10154 // __builtin_ve_vl_vfmksgtnan_mvl
10155 .{ .tag = @enumFromInt(2492), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10156 // __builtin_ve_vl_vfmksgtnan_mvml
10157 .{ .tag = @enumFromInt(2493), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10158 // __builtin_ve_vl_vfmksle_mvl
10159 .{ .tag = @enumFromInt(2494), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10160 // __builtin_ve_vl_vfmksle_mvml
10161 .{ .tag = @enumFromInt(2495), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10162 // __builtin_ve_vl_vfmkslenan_mvl
10163 .{ .tag = @enumFromInt(2496), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10164 // __builtin_ve_vl_vfmkslenan_mvml
10165 .{ .tag = @enumFromInt(2497), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10166 // __builtin_ve_vl_vfmkslt_mvl
10167 .{ .tag = @enumFromInt(2498), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10168 // __builtin_ve_vl_vfmkslt_mvml
10169 .{ .tag = @enumFromInt(2499), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10170 // __builtin_ve_vl_vfmksltnan_mvl
10171 .{ .tag = @enumFromInt(2500), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10172 // __builtin_ve_vl_vfmksltnan_mvml
10173 .{ .tag = @enumFromInt(2501), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10174 // __builtin_ve_vl_vfmksnan_mvl
10175 .{ .tag = @enumFromInt(2502), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10176 // __builtin_ve_vl_vfmksnan_mvml
10177 .{ .tag = @enumFromInt(2503), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10178 // __builtin_ve_vl_vfmksne_mvl
10179 .{ .tag = @enumFromInt(2504), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10180 // __builtin_ve_vl_vfmksne_mvml
10181 .{ .tag = @enumFromInt(2505), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10182 // __builtin_ve_vl_vfmksnenan_mvl
10183 .{ .tag = @enumFromInt(2506), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10184 // __builtin_ve_vl_vfmksnenan_mvml
10185 .{ .tag = @enumFromInt(2507), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10186 // __builtin_ve_vl_vfmksnum_mvl
10187 .{ .tag = @enumFromInt(2508), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10188 // __builtin_ve_vl_vfmksnum_mvml
10189 .{ .tag = @enumFromInt(2509), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10190 // __builtin_ve_vl_vfmkweq_mvl
10191 .{ .tag = @enumFromInt(2510), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10192 // __builtin_ve_vl_vfmkweq_mvml
10193 .{ .tag = @enumFromInt(2511), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10194 // __builtin_ve_vl_vfmkweqnan_mvl
10195 .{ .tag = @enumFromInt(2512), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10196 // __builtin_ve_vl_vfmkweqnan_mvml
10197 .{ .tag = @enumFromInt(2513), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10198 // __builtin_ve_vl_vfmkwge_mvl
10199 .{ .tag = @enumFromInt(2514), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10200 // __builtin_ve_vl_vfmkwge_mvml
10201 .{ .tag = @enumFromInt(2515), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10202 // __builtin_ve_vl_vfmkwgenan_mvl
10203 .{ .tag = @enumFromInt(2516), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10204 // __builtin_ve_vl_vfmkwgenan_mvml
10205 .{ .tag = @enumFromInt(2517), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10206 // __builtin_ve_vl_vfmkwgt_mvl
10207 .{ .tag = @enumFromInt(2518), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10208 // __builtin_ve_vl_vfmkwgt_mvml
10209 .{ .tag = @enumFromInt(2519), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10210 // __builtin_ve_vl_vfmkwgtnan_mvl
10211 .{ .tag = @enumFromInt(2520), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10212 // __builtin_ve_vl_vfmkwgtnan_mvml
10213 .{ .tag = @enumFromInt(2521), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10214 // __builtin_ve_vl_vfmkwle_mvl
10215 .{ .tag = @enumFromInt(2522), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10216 // __builtin_ve_vl_vfmkwle_mvml
10217 .{ .tag = @enumFromInt(2523), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10218 // __builtin_ve_vl_vfmkwlenan_mvl
10219 .{ .tag = @enumFromInt(2524), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10220 // __builtin_ve_vl_vfmkwlenan_mvml
10221 .{ .tag = @enumFromInt(2525), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10222 // __builtin_ve_vl_vfmkwlt_mvl
10223 .{ .tag = @enumFromInt(2526), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10224 // __builtin_ve_vl_vfmkwlt_mvml
10225 .{ .tag = @enumFromInt(2527), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10226 // __builtin_ve_vl_vfmkwltnan_mvl
10227 .{ .tag = @enumFromInt(2528), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10228 // __builtin_ve_vl_vfmkwltnan_mvml
10229 .{ .tag = @enumFromInt(2529), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10230 // __builtin_ve_vl_vfmkwnan_mvl
10231 .{ .tag = @enumFromInt(2530), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10232 // __builtin_ve_vl_vfmkwnan_mvml
10233 .{ .tag = @enumFromInt(2531), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10234 // __builtin_ve_vl_vfmkwne_mvl
10235 .{ .tag = @enumFromInt(2532), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10236 // __builtin_ve_vl_vfmkwne_mvml
10237 .{ .tag = @enumFromInt(2533), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10238 // __builtin_ve_vl_vfmkwnenan_mvl
10239 .{ .tag = @enumFromInt(2534), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10240 // __builtin_ve_vl_vfmkwnenan_mvml
10241 .{ .tag = @enumFromInt(2535), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10242 // __builtin_ve_vl_vfmkwnum_mvl
10243 .{ .tag = @enumFromInt(2536), .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10244 // __builtin_ve_vl_vfmkwnum_mvml
10245 .{ .tag = @enumFromInt(2537), .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10246 // __builtin_ve_vl_vfmsbd_vsvvl
10247 .{ .tag = @enumFromInt(2538), .properties = .{ .param_str = "V256ddV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10248 // __builtin_ve_vl_vfmsbd_vsvvmvl
10249 .{ .tag = @enumFromInt(2539), .properties = .{ .param_str = "V256ddV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10250 // __builtin_ve_vl_vfmsbd_vsvvvl
10251 .{ .tag = @enumFromInt(2540), .properties = .{ .param_str = "V256ddV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10252 // __builtin_ve_vl_vfmsbd_vvsvl
10253 .{ .tag = @enumFromInt(2541), .properties = .{ .param_str = "V256dV256ddV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10254 // __builtin_ve_vl_vfmsbd_vvsvmvl
10255 .{ .tag = @enumFromInt(2542), .properties = .{ .param_str = "V256dV256ddV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10256 // __builtin_ve_vl_vfmsbd_vvsvvl
10257 .{ .tag = @enumFromInt(2543), .properties = .{ .param_str = "V256dV256ddV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10258 // __builtin_ve_vl_vfmsbd_vvvvl
10259 .{ .tag = @enumFromInt(2544), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10260 // __builtin_ve_vl_vfmsbd_vvvvmvl
10261 .{ .tag = @enumFromInt(2545), .properties = .{ .param_str = "V256dV256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10262 // __builtin_ve_vl_vfmsbd_vvvvvl
10263 .{ .tag = @enumFromInt(2546), .properties = .{ .param_str = "V256dV256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10264 // __builtin_ve_vl_vfmsbs_vsvvl
10265 .{ .tag = @enumFromInt(2547), .properties = .{ .param_str = "V256dfV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10266 // __builtin_ve_vl_vfmsbs_vsvvmvl
10267 .{ .tag = @enumFromInt(2548), .properties = .{ .param_str = "V256dfV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10268 // __builtin_ve_vl_vfmsbs_vsvvvl
10269 .{ .tag = @enumFromInt(2549), .properties = .{ .param_str = "V256dfV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10270 // __builtin_ve_vl_vfmsbs_vvsvl
10271 .{ .tag = @enumFromInt(2550), .properties = .{ .param_str = "V256dV256dfV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10272 // __builtin_ve_vl_vfmsbs_vvsvmvl
10273 .{ .tag = @enumFromInt(2551), .properties = .{ .param_str = "V256dV256dfV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10274 // __builtin_ve_vl_vfmsbs_vvsvvl
10275 .{ .tag = @enumFromInt(2552), .properties = .{ .param_str = "V256dV256dfV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10276 // __builtin_ve_vl_vfmsbs_vvvvl
10277 .{ .tag = @enumFromInt(2553), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10278 // __builtin_ve_vl_vfmsbs_vvvvmvl
10279 .{ .tag = @enumFromInt(2554), .properties = .{ .param_str = "V256dV256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10280 // __builtin_ve_vl_vfmsbs_vvvvvl
10281 .{ .tag = @enumFromInt(2555), .properties = .{ .param_str = "V256dV256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10282 // __builtin_ve_vl_vfmuld_vsvl
10283 .{ .tag = @enumFromInt(2556), .properties = .{ .param_str = "V256ddV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10284 // __builtin_ve_vl_vfmuld_vsvmvl
10285 .{ .tag = @enumFromInt(2557), .properties = .{ .param_str = "V256ddV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10286 // __builtin_ve_vl_vfmuld_vsvvl
10287 .{ .tag = @enumFromInt(2558), .properties = .{ .param_str = "V256ddV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10288 // __builtin_ve_vl_vfmuld_vvvl
10289 .{ .tag = @enumFromInt(2559), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10290 // __builtin_ve_vl_vfmuld_vvvmvl
10291 .{ .tag = @enumFromInt(2560), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10292 // __builtin_ve_vl_vfmuld_vvvvl
10293 .{ .tag = @enumFromInt(2561), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10294 // __builtin_ve_vl_vfmuls_vsvl
10295 .{ .tag = @enumFromInt(2562), .properties = .{ .param_str = "V256dfV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10296 // __builtin_ve_vl_vfmuls_vsvmvl
10297 .{ .tag = @enumFromInt(2563), .properties = .{ .param_str = "V256dfV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10298 // __builtin_ve_vl_vfmuls_vsvvl
10299 .{ .tag = @enumFromInt(2564), .properties = .{ .param_str = "V256dfV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10300 // __builtin_ve_vl_vfmuls_vvvl
10301 .{ .tag = @enumFromInt(2565), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10302 // __builtin_ve_vl_vfmuls_vvvmvl
10303 .{ .tag = @enumFromInt(2566), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10304 // __builtin_ve_vl_vfmuls_vvvvl
10305 .{ .tag = @enumFromInt(2567), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10306 // __builtin_ve_vl_vfnmadd_vsvvl
10307 .{ .tag = @enumFromInt(2568), .properties = .{ .param_str = "V256ddV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10308 // __builtin_ve_vl_vfnmadd_vsvvmvl
10309 .{ .tag = @enumFromInt(2569), .properties = .{ .param_str = "V256ddV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10310 // __builtin_ve_vl_vfnmadd_vsvvvl
10311 .{ .tag = @enumFromInt(2570), .properties = .{ .param_str = "V256ddV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10312 // __builtin_ve_vl_vfnmadd_vvsvl
10313 .{ .tag = @enumFromInt(2571), .properties = .{ .param_str = "V256dV256ddV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10314 // __builtin_ve_vl_vfnmadd_vvsvmvl
10315 .{ .tag = @enumFromInt(2572), .properties = .{ .param_str = "V256dV256ddV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10316 // __builtin_ve_vl_vfnmadd_vvsvvl
10317 .{ .tag = @enumFromInt(2573), .properties = .{ .param_str = "V256dV256ddV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10318 // __builtin_ve_vl_vfnmadd_vvvvl
10319 .{ .tag = @enumFromInt(2574), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10320 // __builtin_ve_vl_vfnmadd_vvvvmvl
10321 .{ .tag = @enumFromInt(2575), .properties = .{ .param_str = "V256dV256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10322 // __builtin_ve_vl_vfnmadd_vvvvvl
10323 .{ .tag = @enumFromInt(2576), .properties = .{ .param_str = "V256dV256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10324 // __builtin_ve_vl_vfnmads_vsvvl
10325 .{ .tag = @enumFromInt(2577), .properties = .{ .param_str = "V256dfV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10326 // __builtin_ve_vl_vfnmads_vsvvmvl
10327 .{ .tag = @enumFromInt(2578), .properties = .{ .param_str = "V256dfV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10328 // __builtin_ve_vl_vfnmads_vsvvvl
10329 .{ .tag = @enumFromInt(2579), .properties = .{ .param_str = "V256dfV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10330 // __builtin_ve_vl_vfnmads_vvsvl
10331 .{ .tag = @enumFromInt(2580), .properties = .{ .param_str = "V256dV256dfV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10332 // __builtin_ve_vl_vfnmads_vvsvmvl
10333 .{ .tag = @enumFromInt(2581), .properties = .{ .param_str = "V256dV256dfV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10334 // __builtin_ve_vl_vfnmads_vvsvvl
10335 .{ .tag = @enumFromInt(2582), .properties = .{ .param_str = "V256dV256dfV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10336 // __builtin_ve_vl_vfnmads_vvvvl
10337 .{ .tag = @enumFromInt(2583), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10338 // __builtin_ve_vl_vfnmads_vvvvmvl
10339 .{ .tag = @enumFromInt(2584), .properties = .{ .param_str = "V256dV256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10340 // __builtin_ve_vl_vfnmads_vvvvvl
10341 .{ .tag = @enumFromInt(2585), .properties = .{ .param_str = "V256dV256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10342 // __builtin_ve_vl_vfnmsbd_vsvvl
10343 .{ .tag = @enumFromInt(2586), .properties = .{ .param_str = "V256ddV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10344 // __builtin_ve_vl_vfnmsbd_vsvvmvl
10345 .{ .tag = @enumFromInt(2587), .properties = .{ .param_str = "V256ddV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10346 // __builtin_ve_vl_vfnmsbd_vsvvvl
10347 .{ .tag = @enumFromInt(2588), .properties = .{ .param_str = "V256ddV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10348 // __builtin_ve_vl_vfnmsbd_vvsvl
10349 .{ .tag = @enumFromInt(2589), .properties = .{ .param_str = "V256dV256ddV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10350 // __builtin_ve_vl_vfnmsbd_vvsvmvl
10351 .{ .tag = @enumFromInt(2590), .properties = .{ .param_str = "V256dV256ddV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10352 // __builtin_ve_vl_vfnmsbd_vvsvvl
10353 .{ .tag = @enumFromInt(2591), .properties = .{ .param_str = "V256dV256ddV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10354 // __builtin_ve_vl_vfnmsbd_vvvvl
10355 .{ .tag = @enumFromInt(2592), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10356 // __builtin_ve_vl_vfnmsbd_vvvvmvl
10357 .{ .tag = @enumFromInt(2593), .properties = .{ .param_str = "V256dV256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10358 // __builtin_ve_vl_vfnmsbd_vvvvvl
10359 .{ .tag = @enumFromInt(2594), .properties = .{ .param_str = "V256dV256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10360 // __builtin_ve_vl_vfnmsbs_vsvvl
10361 .{ .tag = @enumFromInt(2595), .properties = .{ .param_str = "V256dfV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10362 // __builtin_ve_vl_vfnmsbs_vsvvmvl
10363 .{ .tag = @enumFromInt(2596), .properties = .{ .param_str = "V256dfV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10364 // __builtin_ve_vl_vfnmsbs_vsvvvl
10365 .{ .tag = @enumFromInt(2597), .properties = .{ .param_str = "V256dfV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10366 // __builtin_ve_vl_vfnmsbs_vvsvl
10367 .{ .tag = @enumFromInt(2598), .properties = .{ .param_str = "V256dV256dfV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10368 // __builtin_ve_vl_vfnmsbs_vvsvmvl
10369 .{ .tag = @enumFromInt(2599), .properties = .{ .param_str = "V256dV256dfV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10370 // __builtin_ve_vl_vfnmsbs_vvsvvl
10371 .{ .tag = @enumFromInt(2600), .properties = .{ .param_str = "V256dV256dfV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10372 // __builtin_ve_vl_vfnmsbs_vvvvl
10373 .{ .tag = @enumFromInt(2601), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10374 // __builtin_ve_vl_vfnmsbs_vvvvmvl
10375 .{ .tag = @enumFromInt(2602), .properties = .{ .param_str = "V256dV256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10376 // __builtin_ve_vl_vfnmsbs_vvvvvl
10377 .{ .tag = @enumFromInt(2603), .properties = .{ .param_str = "V256dV256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10378 // __builtin_ve_vl_vfrmaxdfst_vvl
10379 .{ .tag = @enumFromInt(2604), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10380 // __builtin_ve_vl_vfrmaxdfst_vvvl
10381 .{ .tag = @enumFromInt(2605), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10382 // __builtin_ve_vl_vfrmaxdlst_vvl
10383 .{ .tag = @enumFromInt(2606), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10384 // __builtin_ve_vl_vfrmaxdlst_vvvl
10385 .{ .tag = @enumFromInt(2607), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10386 // __builtin_ve_vl_vfrmaxsfst_vvl
10387 .{ .tag = @enumFromInt(2608), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10388 // __builtin_ve_vl_vfrmaxsfst_vvvl
10389 .{ .tag = @enumFromInt(2609), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10390 // __builtin_ve_vl_vfrmaxslst_vvl
10391 .{ .tag = @enumFromInt(2610), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10392 // __builtin_ve_vl_vfrmaxslst_vvvl
10393 .{ .tag = @enumFromInt(2611), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10394 // __builtin_ve_vl_vfrmindfst_vvl
10395 .{ .tag = @enumFromInt(2612), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10396 // __builtin_ve_vl_vfrmindfst_vvvl
10397 .{ .tag = @enumFromInt(2613), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10398 // __builtin_ve_vl_vfrmindlst_vvl
10399 .{ .tag = @enumFromInt(2614), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10400 // __builtin_ve_vl_vfrmindlst_vvvl
10401 .{ .tag = @enumFromInt(2615), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10402 // __builtin_ve_vl_vfrminsfst_vvl
10403 .{ .tag = @enumFromInt(2616), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10404 // __builtin_ve_vl_vfrminsfst_vvvl
10405 .{ .tag = @enumFromInt(2617), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10406 // __builtin_ve_vl_vfrminslst_vvl
10407 .{ .tag = @enumFromInt(2618), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10408 // __builtin_ve_vl_vfrminslst_vvvl
10409 .{ .tag = @enumFromInt(2619), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10410 // __builtin_ve_vl_vfsqrtd_vvl
10411 .{ .tag = @enumFromInt(2620), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10412 // __builtin_ve_vl_vfsqrtd_vvvl
10413 .{ .tag = @enumFromInt(2621), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10414 // __builtin_ve_vl_vfsqrts_vvl
10415 .{ .tag = @enumFromInt(2622), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10416 // __builtin_ve_vl_vfsqrts_vvvl
10417 .{ .tag = @enumFromInt(2623), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10418 // __builtin_ve_vl_vfsubd_vsvl
10419 .{ .tag = @enumFromInt(2624), .properties = .{ .param_str = "V256ddV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10420 // __builtin_ve_vl_vfsubd_vsvmvl
10421 .{ .tag = @enumFromInt(2625), .properties = .{ .param_str = "V256ddV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10422 // __builtin_ve_vl_vfsubd_vsvvl
10423 .{ .tag = @enumFromInt(2626), .properties = .{ .param_str = "V256ddV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10424 // __builtin_ve_vl_vfsubd_vvvl
10425 .{ .tag = @enumFromInt(2627), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10426 // __builtin_ve_vl_vfsubd_vvvmvl
10427 .{ .tag = @enumFromInt(2628), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10428 // __builtin_ve_vl_vfsubd_vvvvl
10429 .{ .tag = @enumFromInt(2629), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10430 // __builtin_ve_vl_vfsubs_vsvl
10431 .{ .tag = @enumFromInt(2630), .properties = .{ .param_str = "V256dfV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10432 // __builtin_ve_vl_vfsubs_vsvmvl
10433 .{ .tag = @enumFromInt(2631), .properties = .{ .param_str = "V256dfV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10434 // __builtin_ve_vl_vfsubs_vsvvl
10435 .{ .tag = @enumFromInt(2632), .properties = .{ .param_str = "V256dfV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10436 // __builtin_ve_vl_vfsubs_vvvl
10437 .{ .tag = @enumFromInt(2633), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10438 // __builtin_ve_vl_vfsubs_vvvmvl
10439 .{ .tag = @enumFromInt(2634), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10440 // __builtin_ve_vl_vfsubs_vvvvl
10441 .{ .tag = @enumFromInt(2635), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10442 // __builtin_ve_vl_vfsumd_vvl
10443 .{ .tag = @enumFromInt(2636), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10444 // __builtin_ve_vl_vfsumd_vvml
10445 .{ .tag = @enumFromInt(2637), .properties = .{ .param_str = "V256dV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10446 // __builtin_ve_vl_vfsums_vvl
10447 .{ .tag = @enumFromInt(2638), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10448 // __builtin_ve_vl_vfsums_vvml
10449 .{ .tag = @enumFromInt(2639), .properties = .{ .param_str = "V256dV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10450 // __builtin_ve_vl_vgt_vvssl
10451 .{ .tag = @enumFromInt(2640), .properties = .{ .param_str = "V256dV256dLUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10452 // __builtin_ve_vl_vgt_vvssml
10453 .{ .tag = @enumFromInt(2641), .properties = .{ .param_str = "V256dV256dLUiLUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10454 // __builtin_ve_vl_vgt_vvssmvl
10455 .{ .tag = @enumFromInt(2642), .properties = .{ .param_str = "V256dV256dLUiLUiV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10456 // __builtin_ve_vl_vgt_vvssvl
10457 .{ .tag = @enumFromInt(2643), .properties = .{ .param_str = "V256dV256dLUiLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10458 // __builtin_ve_vl_vgtlsx_vvssl
10459 .{ .tag = @enumFromInt(2644), .properties = .{ .param_str = "V256dV256dLUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10460 // __builtin_ve_vl_vgtlsx_vvssml
10461 .{ .tag = @enumFromInt(2645), .properties = .{ .param_str = "V256dV256dLUiLUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10462 // __builtin_ve_vl_vgtlsx_vvssmvl
10463 .{ .tag = @enumFromInt(2646), .properties = .{ .param_str = "V256dV256dLUiLUiV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10464 // __builtin_ve_vl_vgtlsx_vvssvl
10465 .{ .tag = @enumFromInt(2647), .properties = .{ .param_str = "V256dV256dLUiLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10466 // __builtin_ve_vl_vgtlsxnc_vvssl
10467 .{ .tag = @enumFromInt(2648), .properties = .{ .param_str = "V256dV256dLUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10468 // __builtin_ve_vl_vgtlsxnc_vvssml
10469 .{ .tag = @enumFromInt(2649), .properties = .{ .param_str = "V256dV256dLUiLUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10470 // __builtin_ve_vl_vgtlsxnc_vvssmvl
10471 .{ .tag = @enumFromInt(2650), .properties = .{ .param_str = "V256dV256dLUiLUiV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10472 // __builtin_ve_vl_vgtlsxnc_vvssvl
10473 .{ .tag = @enumFromInt(2651), .properties = .{ .param_str = "V256dV256dLUiLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10474 // __builtin_ve_vl_vgtlzx_vvssl
10475 .{ .tag = @enumFromInt(2652), .properties = .{ .param_str = "V256dV256dLUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10476 // __builtin_ve_vl_vgtlzx_vvssml
10477 .{ .tag = @enumFromInt(2653), .properties = .{ .param_str = "V256dV256dLUiLUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10478 // __builtin_ve_vl_vgtlzx_vvssmvl
10479 .{ .tag = @enumFromInt(2654), .properties = .{ .param_str = "V256dV256dLUiLUiV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10480 // __builtin_ve_vl_vgtlzx_vvssvl
10481 .{ .tag = @enumFromInt(2655), .properties = .{ .param_str = "V256dV256dLUiLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10482 // __builtin_ve_vl_vgtlzxnc_vvssl
10483 .{ .tag = @enumFromInt(2656), .properties = .{ .param_str = "V256dV256dLUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10484 // __builtin_ve_vl_vgtlzxnc_vvssml
10485 .{ .tag = @enumFromInt(2657), .properties = .{ .param_str = "V256dV256dLUiLUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10486 // __builtin_ve_vl_vgtlzxnc_vvssmvl
10487 .{ .tag = @enumFromInt(2658), .properties = .{ .param_str = "V256dV256dLUiLUiV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10488 // __builtin_ve_vl_vgtlzxnc_vvssvl
10489 .{ .tag = @enumFromInt(2659), .properties = .{ .param_str = "V256dV256dLUiLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10490 // __builtin_ve_vl_vgtnc_vvssl
10491 .{ .tag = @enumFromInt(2660), .properties = .{ .param_str = "V256dV256dLUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10492 // __builtin_ve_vl_vgtnc_vvssml
10493 .{ .tag = @enumFromInt(2661), .properties = .{ .param_str = "V256dV256dLUiLUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10494 // __builtin_ve_vl_vgtnc_vvssmvl
10495 .{ .tag = @enumFromInt(2662), .properties = .{ .param_str = "V256dV256dLUiLUiV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10496 // __builtin_ve_vl_vgtnc_vvssvl
10497 .{ .tag = @enumFromInt(2663), .properties = .{ .param_str = "V256dV256dLUiLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10498 // __builtin_ve_vl_vgtu_vvssl
10499 .{ .tag = @enumFromInt(2664), .properties = .{ .param_str = "V256dV256dLUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10500 // __builtin_ve_vl_vgtu_vvssml
10501 .{ .tag = @enumFromInt(2665), .properties = .{ .param_str = "V256dV256dLUiLUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10502 // __builtin_ve_vl_vgtu_vvssmvl
10503 .{ .tag = @enumFromInt(2666), .properties = .{ .param_str = "V256dV256dLUiLUiV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10504 // __builtin_ve_vl_vgtu_vvssvl
10505 .{ .tag = @enumFromInt(2667), .properties = .{ .param_str = "V256dV256dLUiLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10506 // __builtin_ve_vl_vgtunc_vvssl
10507 .{ .tag = @enumFromInt(2668), .properties = .{ .param_str = "V256dV256dLUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10508 // __builtin_ve_vl_vgtunc_vvssml
10509 .{ .tag = @enumFromInt(2669), .properties = .{ .param_str = "V256dV256dLUiLUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10510 // __builtin_ve_vl_vgtunc_vvssmvl
10511 .{ .tag = @enumFromInt(2670), .properties = .{ .param_str = "V256dV256dLUiLUiV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10512 // __builtin_ve_vl_vgtunc_vvssvl
10513 .{ .tag = @enumFromInt(2671), .properties = .{ .param_str = "V256dV256dLUiLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10514 // __builtin_ve_vl_vld2d_vssl
10515 .{ .tag = @enumFromInt(2672), .properties = .{ .param_str = "V256dLUivC*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
10516 // __builtin_ve_vl_vld2d_vssvl
10517 .{ .tag = @enumFromInt(2673), .properties = .{ .param_str = "V256dLUivC*V256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10518 // __builtin_ve_vl_vld2dnc_vssl
10519 .{ .tag = @enumFromInt(2674), .properties = .{ .param_str = "V256dLUivC*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
10520 // __builtin_ve_vl_vld2dnc_vssvl
10521 .{ .tag = @enumFromInt(2675), .properties = .{ .param_str = "V256dLUivC*V256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10522 // __builtin_ve_vl_vld_vssl
10523 .{ .tag = @enumFromInt(2676), .properties = .{ .param_str = "V256dLUivC*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
10524 // __builtin_ve_vl_vld_vssvl
10525 .{ .tag = @enumFromInt(2677), .properties = .{ .param_str = "V256dLUivC*V256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10526 // __builtin_ve_vl_vldl2dsx_vssl
10527 .{ .tag = @enumFromInt(2678), .properties = .{ .param_str = "V256dLUivC*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
10528 // __builtin_ve_vl_vldl2dsx_vssvl
10529 .{ .tag = @enumFromInt(2679), .properties = .{ .param_str = "V256dLUivC*V256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10530 // __builtin_ve_vl_vldl2dsxnc_vssl
10531 .{ .tag = @enumFromInt(2680), .properties = .{ .param_str = "V256dLUivC*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
10532 // __builtin_ve_vl_vldl2dsxnc_vssvl
10533 .{ .tag = @enumFromInt(2681), .properties = .{ .param_str = "V256dLUivC*V256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10534 // __builtin_ve_vl_vldl2dzx_vssl
10535 .{ .tag = @enumFromInt(2682), .properties = .{ .param_str = "V256dLUivC*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
10536 // __builtin_ve_vl_vldl2dzx_vssvl
10537 .{ .tag = @enumFromInt(2683), .properties = .{ .param_str = "V256dLUivC*V256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10538 // __builtin_ve_vl_vldl2dzxnc_vssl
10539 .{ .tag = @enumFromInt(2684), .properties = .{ .param_str = "V256dLUivC*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
10540 // __builtin_ve_vl_vldl2dzxnc_vssvl
10541 .{ .tag = @enumFromInt(2685), .properties = .{ .param_str = "V256dLUivC*V256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10542 // __builtin_ve_vl_vldlsx_vssl
10543 .{ .tag = @enumFromInt(2686), .properties = .{ .param_str = "V256dLUivC*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
10544 // __builtin_ve_vl_vldlsx_vssvl
10545 .{ .tag = @enumFromInt(2687), .properties = .{ .param_str = "V256dLUivC*V256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10546 // __builtin_ve_vl_vldlsxnc_vssl
10547 .{ .tag = @enumFromInt(2688), .properties = .{ .param_str = "V256dLUivC*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
10548 // __builtin_ve_vl_vldlsxnc_vssvl
10549 .{ .tag = @enumFromInt(2689), .properties = .{ .param_str = "V256dLUivC*V256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10550 // __builtin_ve_vl_vldlzx_vssl
10551 .{ .tag = @enumFromInt(2690), .properties = .{ .param_str = "V256dLUivC*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
10552 // __builtin_ve_vl_vldlzx_vssvl
10553 .{ .tag = @enumFromInt(2691), .properties = .{ .param_str = "V256dLUivC*V256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10554 // __builtin_ve_vl_vldlzxnc_vssl
10555 .{ .tag = @enumFromInt(2692), .properties = .{ .param_str = "V256dLUivC*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
10556 // __builtin_ve_vl_vldlzxnc_vssvl
10557 .{ .tag = @enumFromInt(2693), .properties = .{ .param_str = "V256dLUivC*V256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10558 // __builtin_ve_vl_vldnc_vssl
10559 .{ .tag = @enumFromInt(2694), .properties = .{ .param_str = "V256dLUivC*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
10560 // __builtin_ve_vl_vldnc_vssvl
10561 .{ .tag = @enumFromInt(2695), .properties = .{ .param_str = "V256dLUivC*V256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10562 // __builtin_ve_vl_vldu2d_vssl
10563 .{ .tag = @enumFromInt(2696), .properties = .{ .param_str = "V256dLUivC*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
10564 // __builtin_ve_vl_vldu2d_vssvl
10565 .{ .tag = @enumFromInt(2697), .properties = .{ .param_str = "V256dLUivC*V256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10566 // __builtin_ve_vl_vldu2dnc_vssl
10567 .{ .tag = @enumFromInt(2698), .properties = .{ .param_str = "V256dLUivC*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
10568 // __builtin_ve_vl_vldu2dnc_vssvl
10569 .{ .tag = @enumFromInt(2699), .properties = .{ .param_str = "V256dLUivC*V256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10570 // __builtin_ve_vl_vldu_vssl
10571 .{ .tag = @enumFromInt(2700), .properties = .{ .param_str = "V256dLUivC*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
10572 // __builtin_ve_vl_vldu_vssvl
10573 .{ .tag = @enumFromInt(2701), .properties = .{ .param_str = "V256dLUivC*V256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10574 // __builtin_ve_vl_vldunc_vssl
10575 .{ .tag = @enumFromInt(2702), .properties = .{ .param_str = "V256dLUivC*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
10576 // __builtin_ve_vl_vldunc_vssvl
10577 .{ .tag = @enumFromInt(2703), .properties = .{ .param_str = "V256dLUivC*V256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10578 // __builtin_ve_vl_vldz_vvl
10579 .{ .tag = @enumFromInt(2704), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10580 // __builtin_ve_vl_vldz_vvmvl
10581 .{ .tag = @enumFromInt(2705), .properties = .{ .param_str = "V256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10582 // __builtin_ve_vl_vldz_vvvl
10583 .{ .tag = @enumFromInt(2706), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10584 // __builtin_ve_vl_vmaxsl_vsvl
10585 .{ .tag = @enumFromInt(2707), .properties = .{ .param_str = "V256dLiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10586 // __builtin_ve_vl_vmaxsl_vsvmvl
10587 .{ .tag = @enumFromInt(2708), .properties = .{ .param_str = "V256dLiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10588 // __builtin_ve_vl_vmaxsl_vsvvl
10589 .{ .tag = @enumFromInt(2709), .properties = .{ .param_str = "V256dLiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10590 // __builtin_ve_vl_vmaxsl_vvvl
10591 .{ .tag = @enumFromInt(2710), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10592 // __builtin_ve_vl_vmaxsl_vvvmvl
10593 .{ .tag = @enumFromInt(2711), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10594 // __builtin_ve_vl_vmaxsl_vvvvl
10595 .{ .tag = @enumFromInt(2712), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10596 // __builtin_ve_vl_vmaxswsx_vsvl
10597 .{ .tag = @enumFromInt(2713), .properties = .{ .param_str = "V256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10598 // __builtin_ve_vl_vmaxswsx_vsvmvl
10599 .{ .tag = @enumFromInt(2714), .properties = .{ .param_str = "V256diV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10600 // __builtin_ve_vl_vmaxswsx_vsvvl
10601 .{ .tag = @enumFromInt(2715), .properties = .{ .param_str = "V256diV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10602 // __builtin_ve_vl_vmaxswsx_vvvl
10603 .{ .tag = @enumFromInt(2716), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10604 // __builtin_ve_vl_vmaxswsx_vvvmvl
10605 .{ .tag = @enumFromInt(2717), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10606 // __builtin_ve_vl_vmaxswsx_vvvvl
10607 .{ .tag = @enumFromInt(2718), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10608 // __builtin_ve_vl_vmaxswzx_vsvl
10609 .{ .tag = @enumFromInt(2719), .properties = .{ .param_str = "V256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10610 // __builtin_ve_vl_vmaxswzx_vsvmvl
10611 .{ .tag = @enumFromInt(2720), .properties = .{ .param_str = "V256diV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10612 // __builtin_ve_vl_vmaxswzx_vsvvl
10613 .{ .tag = @enumFromInt(2721), .properties = .{ .param_str = "V256diV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10614 // __builtin_ve_vl_vmaxswzx_vvvl
10615 .{ .tag = @enumFromInt(2722), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10616 // __builtin_ve_vl_vmaxswzx_vvvmvl
10617 .{ .tag = @enumFromInt(2723), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10618 // __builtin_ve_vl_vmaxswzx_vvvvl
10619 .{ .tag = @enumFromInt(2724), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10620 // __builtin_ve_vl_vminsl_vsvl
10621 .{ .tag = @enumFromInt(2725), .properties = .{ .param_str = "V256dLiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10622 // __builtin_ve_vl_vminsl_vsvmvl
10623 .{ .tag = @enumFromInt(2726), .properties = .{ .param_str = "V256dLiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10624 // __builtin_ve_vl_vminsl_vsvvl
10625 .{ .tag = @enumFromInt(2727), .properties = .{ .param_str = "V256dLiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10626 // __builtin_ve_vl_vminsl_vvvl
10627 .{ .tag = @enumFromInt(2728), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10628 // __builtin_ve_vl_vminsl_vvvmvl
10629 .{ .tag = @enumFromInt(2729), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10630 // __builtin_ve_vl_vminsl_vvvvl
10631 .{ .tag = @enumFromInt(2730), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10632 // __builtin_ve_vl_vminswsx_vsvl
10633 .{ .tag = @enumFromInt(2731), .properties = .{ .param_str = "V256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10634 // __builtin_ve_vl_vminswsx_vsvmvl
10635 .{ .tag = @enumFromInt(2732), .properties = .{ .param_str = "V256diV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10636 // __builtin_ve_vl_vminswsx_vsvvl
10637 .{ .tag = @enumFromInt(2733), .properties = .{ .param_str = "V256diV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10638 // __builtin_ve_vl_vminswsx_vvvl
10639 .{ .tag = @enumFromInt(2734), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10640 // __builtin_ve_vl_vminswsx_vvvmvl
10641 .{ .tag = @enumFromInt(2735), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10642 // __builtin_ve_vl_vminswsx_vvvvl
10643 .{ .tag = @enumFromInt(2736), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10644 // __builtin_ve_vl_vminswzx_vsvl
10645 .{ .tag = @enumFromInt(2737), .properties = .{ .param_str = "V256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10646 // __builtin_ve_vl_vminswzx_vsvmvl
10647 .{ .tag = @enumFromInt(2738), .properties = .{ .param_str = "V256diV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10648 // __builtin_ve_vl_vminswzx_vsvvl
10649 .{ .tag = @enumFromInt(2739), .properties = .{ .param_str = "V256diV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10650 // __builtin_ve_vl_vminswzx_vvvl
10651 .{ .tag = @enumFromInt(2740), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10652 // __builtin_ve_vl_vminswzx_vvvmvl
10653 .{ .tag = @enumFromInt(2741), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10654 // __builtin_ve_vl_vminswzx_vvvvl
10655 .{ .tag = @enumFromInt(2742), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10656 // __builtin_ve_vl_vmrg_vsvml
10657 .{ .tag = @enumFromInt(2743), .properties = .{ .param_str = "V256dLUiV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10658 // __builtin_ve_vl_vmrg_vsvmvl
10659 .{ .tag = @enumFromInt(2744), .properties = .{ .param_str = "V256dLUiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10660 // __builtin_ve_vl_vmrg_vvvml
10661 .{ .tag = @enumFromInt(2745), .properties = .{ .param_str = "V256dV256dV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10662 // __builtin_ve_vl_vmrg_vvvmvl
10663 .{ .tag = @enumFromInt(2746), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10664 // __builtin_ve_vl_vmrgw_vsvMl
10665 .{ .tag = @enumFromInt(2747), .properties = .{ .param_str = "V256dUiV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10666 // __builtin_ve_vl_vmrgw_vsvMvl
10667 .{ .tag = @enumFromInt(2748), .properties = .{ .param_str = "V256dUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10668 // __builtin_ve_vl_vmrgw_vvvMl
10669 .{ .tag = @enumFromInt(2749), .properties = .{ .param_str = "V256dV256dV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10670 // __builtin_ve_vl_vmrgw_vvvMvl
10671 .{ .tag = @enumFromInt(2750), .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10672 // __builtin_ve_vl_vmulsl_vsvl
10673 .{ .tag = @enumFromInt(2751), .properties = .{ .param_str = "V256dLiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10674 // __builtin_ve_vl_vmulsl_vsvmvl
10675 .{ .tag = @enumFromInt(2752), .properties = .{ .param_str = "V256dLiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10676 // __builtin_ve_vl_vmulsl_vsvvl
10677 .{ .tag = @enumFromInt(2753), .properties = .{ .param_str = "V256dLiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10678 // __builtin_ve_vl_vmulsl_vvvl
10679 .{ .tag = @enumFromInt(2754), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10680 // __builtin_ve_vl_vmulsl_vvvmvl
10681 .{ .tag = @enumFromInt(2755), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10682 // __builtin_ve_vl_vmulsl_vvvvl
10683 .{ .tag = @enumFromInt(2756), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10684 // __builtin_ve_vl_vmulslw_vsvl
10685 .{ .tag = @enumFromInt(2757), .properties = .{ .param_str = "V256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10686 // __builtin_ve_vl_vmulslw_vsvvl
10687 .{ .tag = @enumFromInt(2758), .properties = .{ .param_str = "V256diV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10688 // __builtin_ve_vl_vmulslw_vvvl
10689 .{ .tag = @enumFromInt(2759), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10690 // __builtin_ve_vl_vmulslw_vvvvl
10691 .{ .tag = @enumFromInt(2760), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10692 // __builtin_ve_vl_vmulswsx_vsvl
10693 .{ .tag = @enumFromInt(2761), .properties = .{ .param_str = "V256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10694 // __builtin_ve_vl_vmulswsx_vsvmvl
10695 .{ .tag = @enumFromInt(2762), .properties = .{ .param_str = "V256diV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10696 // __builtin_ve_vl_vmulswsx_vsvvl
10697 .{ .tag = @enumFromInt(2763), .properties = .{ .param_str = "V256diV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10698 // __builtin_ve_vl_vmulswsx_vvvl
10699 .{ .tag = @enumFromInt(2764), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10700 // __builtin_ve_vl_vmulswsx_vvvmvl
10701 .{ .tag = @enumFromInt(2765), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10702 // __builtin_ve_vl_vmulswsx_vvvvl
10703 .{ .tag = @enumFromInt(2766), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10704 // __builtin_ve_vl_vmulswzx_vsvl
10705 .{ .tag = @enumFromInt(2767), .properties = .{ .param_str = "V256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10706 // __builtin_ve_vl_vmulswzx_vsvmvl
10707 .{ .tag = @enumFromInt(2768), .properties = .{ .param_str = "V256diV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10708 // __builtin_ve_vl_vmulswzx_vsvvl
10709 .{ .tag = @enumFromInt(2769), .properties = .{ .param_str = "V256diV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10710 // __builtin_ve_vl_vmulswzx_vvvl
10711 .{ .tag = @enumFromInt(2770), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10712 // __builtin_ve_vl_vmulswzx_vvvmvl
10713 .{ .tag = @enumFromInt(2771), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10714 // __builtin_ve_vl_vmulswzx_vvvvl
10715 .{ .tag = @enumFromInt(2772), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10716 // __builtin_ve_vl_vmulul_vsvl
10717 .{ .tag = @enumFromInt(2773), .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10718 // __builtin_ve_vl_vmulul_vsvmvl
10719 .{ .tag = @enumFromInt(2774), .properties = .{ .param_str = "V256dLUiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10720 // __builtin_ve_vl_vmulul_vsvvl
10721 .{ .tag = @enumFromInt(2775), .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10722 // __builtin_ve_vl_vmulul_vvvl
10723 .{ .tag = @enumFromInt(2776), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10724 // __builtin_ve_vl_vmulul_vvvmvl
10725 .{ .tag = @enumFromInt(2777), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10726 // __builtin_ve_vl_vmulul_vvvvl
10727 .{ .tag = @enumFromInt(2778), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10728 // __builtin_ve_vl_vmuluw_vsvl
10729 .{ .tag = @enumFromInt(2779), .properties = .{ .param_str = "V256dUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10730 // __builtin_ve_vl_vmuluw_vsvmvl
10731 .{ .tag = @enumFromInt(2780), .properties = .{ .param_str = "V256dUiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10732 // __builtin_ve_vl_vmuluw_vsvvl
10733 .{ .tag = @enumFromInt(2781), .properties = .{ .param_str = "V256dUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10734 // __builtin_ve_vl_vmuluw_vvvl
10735 .{ .tag = @enumFromInt(2782), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10736 // __builtin_ve_vl_vmuluw_vvvmvl
10737 .{ .tag = @enumFromInt(2783), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10738 // __builtin_ve_vl_vmuluw_vvvvl
10739 .{ .tag = @enumFromInt(2784), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10740 // __builtin_ve_vl_vmv_vsvl
10741 .{ .tag = @enumFromInt(2785), .properties = .{ .param_str = "V256dUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10742 // __builtin_ve_vl_vmv_vsvmvl
10743 .{ .tag = @enumFromInt(2786), .properties = .{ .param_str = "V256dUiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10744 // __builtin_ve_vl_vmv_vsvvl
10745 .{ .tag = @enumFromInt(2787), .properties = .{ .param_str = "V256dUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10746 // __builtin_ve_vl_vor_vsvl
10747 .{ .tag = @enumFromInt(2788), .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10748 // __builtin_ve_vl_vor_vsvmvl
10749 .{ .tag = @enumFromInt(2789), .properties = .{ .param_str = "V256dLUiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10750 // __builtin_ve_vl_vor_vsvvl
10751 .{ .tag = @enumFromInt(2790), .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10752 // __builtin_ve_vl_vor_vvvl
10753 .{ .tag = @enumFromInt(2791), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10754 // __builtin_ve_vl_vor_vvvmvl
10755 .{ .tag = @enumFromInt(2792), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10756 // __builtin_ve_vl_vor_vvvvl
10757 .{ .tag = @enumFromInt(2793), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10758 // __builtin_ve_vl_vpcnt_vvl
10759 .{ .tag = @enumFromInt(2794), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10760 // __builtin_ve_vl_vpcnt_vvmvl
10761 .{ .tag = @enumFromInt(2795), .properties = .{ .param_str = "V256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10762 // __builtin_ve_vl_vpcnt_vvvl
10763 .{ .tag = @enumFromInt(2796), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10764 // __builtin_ve_vl_vrand_vvl
10765 .{ .tag = @enumFromInt(2797), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10766 // __builtin_ve_vl_vrand_vvml
10767 .{ .tag = @enumFromInt(2798), .properties = .{ .param_str = "V256dV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10768 // __builtin_ve_vl_vrcpd_vvl
10769 .{ .tag = @enumFromInt(2799), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10770 // __builtin_ve_vl_vrcpd_vvvl
10771 .{ .tag = @enumFromInt(2800), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10772 // __builtin_ve_vl_vrcps_vvl
10773 .{ .tag = @enumFromInt(2801), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10774 // __builtin_ve_vl_vrcps_vvvl
10775 .{ .tag = @enumFromInt(2802), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10776 // __builtin_ve_vl_vrmaxslfst_vvl
10777 .{ .tag = @enumFromInt(2803), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10778 // __builtin_ve_vl_vrmaxslfst_vvvl
10779 .{ .tag = @enumFromInt(2804), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10780 // __builtin_ve_vl_vrmaxsllst_vvl
10781 .{ .tag = @enumFromInt(2805), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10782 // __builtin_ve_vl_vrmaxsllst_vvvl
10783 .{ .tag = @enumFromInt(2806), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10784 // __builtin_ve_vl_vrmaxswfstsx_vvl
10785 .{ .tag = @enumFromInt(2807), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10786 // __builtin_ve_vl_vrmaxswfstsx_vvvl
10787 .{ .tag = @enumFromInt(2808), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10788 // __builtin_ve_vl_vrmaxswfstzx_vvl
10789 .{ .tag = @enumFromInt(2809), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10790 // __builtin_ve_vl_vrmaxswfstzx_vvvl
10791 .{ .tag = @enumFromInt(2810), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10792 // __builtin_ve_vl_vrmaxswlstsx_vvl
10793 .{ .tag = @enumFromInt(2811), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10794 // __builtin_ve_vl_vrmaxswlstsx_vvvl
10795 .{ .tag = @enumFromInt(2812), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10796 // __builtin_ve_vl_vrmaxswlstzx_vvl
10797 .{ .tag = @enumFromInt(2813), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10798 // __builtin_ve_vl_vrmaxswlstzx_vvvl
10799 .{ .tag = @enumFromInt(2814), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10800 // __builtin_ve_vl_vrminslfst_vvl
10801 .{ .tag = @enumFromInt(2815), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10802 // __builtin_ve_vl_vrminslfst_vvvl
10803 .{ .tag = @enumFromInt(2816), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10804 // __builtin_ve_vl_vrminsllst_vvl
10805 .{ .tag = @enumFromInt(2817), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10806 // __builtin_ve_vl_vrminsllst_vvvl
10807 .{ .tag = @enumFromInt(2818), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10808 // __builtin_ve_vl_vrminswfstsx_vvl
10809 .{ .tag = @enumFromInt(2819), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10810 // __builtin_ve_vl_vrminswfstsx_vvvl
10811 .{ .tag = @enumFromInt(2820), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10812 // __builtin_ve_vl_vrminswfstzx_vvl
10813 .{ .tag = @enumFromInt(2821), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10814 // __builtin_ve_vl_vrminswfstzx_vvvl
10815 .{ .tag = @enumFromInt(2822), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10816 // __builtin_ve_vl_vrminswlstsx_vvl
10817 .{ .tag = @enumFromInt(2823), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10818 // __builtin_ve_vl_vrminswlstsx_vvvl
10819 .{ .tag = @enumFromInt(2824), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10820 // __builtin_ve_vl_vrminswlstzx_vvl
10821 .{ .tag = @enumFromInt(2825), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10822 // __builtin_ve_vl_vrminswlstzx_vvvl
10823 .{ .tag = @enumFromInt(2826), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10824 // __builtin_ve_vl_vror_vvl
10825 .{ .tag = @enumFromInt(2827), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10826 // __builtin_ve_vl_vror_vvml
10827 .{ .tag = @enumFromInt(2828), .properties = .{ .param_str = "V256dV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10828 // __builtin_ve_vl_vrsqrtd_vvl
10829 .{ .tag = @enumFromInt(2829), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10830 // __builtin_ve_vl_vrsqrtd_vvvl
10831 .{ .tag = @enumFromInt(2830), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10832 // __builtin_ve_vl_vrsqrtdnex_vvl
10833 .{ .tag = @enumFromInt(2831), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10834 // __builtin_ve_vl_vrsqrtdnex_vvvl
10835 .{ .tag = @enumFromInt(2832), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10836 // __builtin_ve_vl_vrsqrts_vvl
10837 .{ .tag = @enumFromInt(2833), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10838 // __builtin_ve_vl_vrsqrts_vvvl
10839 .{ .tag = @enumFromInt(2834), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10840 // __builtin_ve_vl_vrsqrtsnex_vvl
10841 .{ .tag = @enumFromInt(2835), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10842 // __builtin_ve_vl_vrsqrtsnex_vvvl
10843 .{ .tag = @enumFromInt(2836), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10844 // __builtin_ve_vl_vrxor_vvl
10845 .{ .tag = @enumFromInt(2837), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10846 // __builtin_ve_vl_vrxor_vvml
10847 .{ .tag = @enumFromInt(2838), .properties = .{ .param_str = "V256dV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10848 // __builtin_ve_vl_vsc_vvssl
10849 .{ .tag = @enumFromInt(2839), .properties = .{ .param_str = "vV256dV256dLUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10850 // __builtin_ve_vl_vsc_vvssml
10851 .{ .tag = @enumFromInt(2840), .properties = .{ .param_str = "vV256dV256dLUiLUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10852 // __builtin_ve_vl_vscl_vvssl
10853 .{ .tag = @enumFromInt(2841), .properties = .{ .param_str = "vV256dV256dLUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10854 // __builtin_ve_vl_vscl_vvssml
10855 .{ .tag = @enumFromInt(2842), .properties = .{ .param_str = "vV256dV256dLUiLUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10856 // __builtin_ve_vl_vsclnc_vvssl
10857 .{ .tag = @enumFromInt(2843), .properties = .{ .param_str = "vV256dV256dLUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10858 // __builtin_ve_vl_vsclnc_vvssml
10859 .{ .tag = @enumFromInt(2844), .properties = .{ .param_str = "vV256dV256dLUiLUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10860 // __builtin_ve_vl_vsclncot_vvssl
10861 .{ .tag = @enumFromInt(2845), .properties = .{ .param_str = "vV256dV256dLUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10862 // __builtin_ve_vl_vsclncot_vvssml
10863 .{ .tag = @enumFromInt(2846), .properties = .{ .param_str = "vV256dV256dLUiLUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10864 // __builtin_ve_vl_vsclot_vvssl
10865 .{ .tag = @enumFromInt(2847), .properties = .{ .param_str = "vV256dV256dLUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10866 // __builtin_ve_vl_vsclot_vvssml
10867 .{ .tag = @enumFromInt(2848), .properties = .{ .param_str = "vV256dV256dLUiLUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10868 // __builtin_ve_vl_vscnc_vvssl
10869 .{ .tag = @enumFromInt(2849), .properties = .{ .param_str = "vV256dV256dLUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10870 // __builtin_ve_vl_vscnc_vvssml
10871 .{ .tag = @enumFromInt(2850), .properties = .{ .param_str = "vV256dV256dLUiLUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10872 // __builtin_ve_vl_vscncot_vvssl
10873 .{ .tag = @enumFromInt(2851), .properties = .{ .param_str = "vV256dV256dLUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10874 // __builtin_ve_vl_vscncot_vvssml
10875 .{ .tag = @enumFromInt(2852), .properties = .{ .param_str = "vV256dV256dLUiLUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10876 // __builtin_ve_vl_vscot_vvssl
10877 .{ .tag = @enumFromInt(2853), .properties = .{ .param_str = "vV256dV256dLUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10878 // __builtin_ve_vl_vscot_vvssml
10879 .{ .tag = @enumFromInt(2854), .properties = .{ .param_str = "vV256dV256dLUiLUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10880 // __builtin_ve_vl_vscu_vvssl
10881 .{ .tag = @enumFromInt(2855), .properties = .{ .param_str = "vV256dV256dLUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10882 // __builtin_ve_vl_vscu_vvssml
10883 .{ .tag = @enumFromInt(2856), .properties = .{ .param_str = "vV256dV256dLUiLUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10884 // __builtin_ve_vl_vscunc_vvssl
10885 .{ .tag = @enumFromInt(2857), .properties = .{ .param_str = "vV256dV256dLUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10886 // __builtin_ve_vl_vscunc_vvssml
10887 .{ .tag = @enumFromInt(2858), .properties = .{ .param_str = "vV256dV256dLUiLUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10888 // __builtin_ve_vl_vscuncot_vvssl
10889 .{ .tag = @enumFromInt(2859), .properties = .{ .param_str = "vV256dV256dLUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10890 // __builtin_ve_vl_vscuncot_vvssml
10891 .{ .tag = @enumFromInt(2860), .properties = .{ .param_str = "vV256dV256dLUiLUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10892 // __builtin_ve_vl_vscuot_vvssl
10893 .{ .tag = @enumFromInt(2861), .properties = .{ .param_str = "vV256dV256dLUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10894 // __builtin_ve_vl_vscuot_vvssml
10895 .{ .tag = @enumFromInt(2862), .properties = .{ .param_str = "vV256dV256dLUiLUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10896 // __builtin_ve_vl_vseq_vl
10897 .{ .tag = @enumFromInt(2863), .properties = .{ .param_str = "V256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10898 // __builtin_ve_vl_vseq_vvl
10899 .{ .tag = @enumFromInt(2864), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10900 // __builtin_ve_vl_vsfa_vvssl
10901 .{ .tag = @enumFromInt(2865), .properties = .{ .param_str = "V256dV256dLUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10902 // __builtin_ve_vl_vsfa_vvssmvl
10903 .{ .tag = @enumFromInt(2866), .properties = .{ .param_str = "V256dV256dLUiLUiV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10904 // __builtin_ve_vl_vsfa_vvssvl
10905 .{ .tag = @enumFromInt(2867), .properties = .{ .param_str = "V256dV256dLUiLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10906 // __builtin_ve_vl_vshf_vvvsl
10907 .{ .tag = @enumFromInt(2868), .properties = .{ .param_str = "V256dV256dV256dLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10908 // __builtin_ve_vl_vshf_vvvsvl
10909 .{ .tag = @enumFromInt(2869), .properties = .{ .param_str = "V256dV256dV256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10910 // __builtin_ve_vl_vslal_vvsl
10911 .{ .tag = @enumFromInt(2870), .properties = .{ .param_str = "V256dV256dLiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10912 // __builtin_ve_vl_vslal_vvsmvl
10913 .{ .tag = @enumFromInt(2871), .properties = .{ .param_str = "V256dV256dLiV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10914 // __builtin_ve_vl_vslal_vvsvl
10915 .{ .tag = @enumFromInt(2872), .properties = .{ .param_str = "V256dV256dLiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10916 // __builtin_ve_vl_vslal_vvvl
10917 .{ .tag = @enumFromInt(2873), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10918 // __builtin_ve_vl_vslal_vvvmvl
10919 .{ .tag = @enumFromInt(2874), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10920 // __builtin_ve_vl_vslal_vvvvl
10921 .{ .tag = @enumFromInt(2875), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10922 // __builtin_ve_vl_vslawsx_vvsl
10923 .{ .tag = @enumFromInt(2876), .properties = .{ .param_str = "V256dV256diUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10924 // __builtin_ve_vl_vslawsx_vvsmvl
10925 .{ .tag = @enumFromInt(2877), .properties = .{ .param_str = "V256dV256diV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10926 // __builtin_ve_vl_vslawsx_vvsvl
10927 .{ .tag = @enumFromInt(2878), .properties = .{ .param_str = "V256dV256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10928 // __builtin_ve_vl_vslawsx_vvvl
10929 .{ .tag = @enumFromInt(2879), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10930 // __builtin_ve_vl_vslawsx_vvvmvl
10931 .{ .tag = @enumFromInt(2880), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10932 // __builtin_ve_vl_vslawsx_vvvvl
10933 .{ .tag = @enumFromInt(2881), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10934 // __builtin_ve_vl_vslawzx_vvsl
10935 .{ .tag = @enumFromInt(2882), .properties = .{ .param_str = "V256dV256diUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10936 // __builtin_ve_vl_vslawzx_vvsmvl
10937 .{ .tag = @enumFromInt(2883), .properties = .{ .param_str = "V256dV256diV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10938 // __builtin_ve_vl_vslawzx_vvsvl
10939 .{ .tag = @enumFromInt(2884), .properties = .{ .param_str = "V256dV256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10940 // __builtin_ve_vl_vslawzx_vvvl
10941 .{ .tag = @enumFromInt(2885), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10942 // __builtin_ve_vl_vslawzx_vvvmvl
10943 .{ .tag = @enumFromInt(2886), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10944 // __builtin_ve_vl_vslawzx_vvvvl
10945 .{ .tag = @enumFromInt(2887), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10946 // __builtin_ve_vl_vsll_vvsl
10947 .{ .tag = @enumFromInt(2888), .properties = .{ .param_str = "V256dV256dLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10948 // __builtin_ve_vl_vsll_vvsmvl
10949 .{ .tag = @enumFromInt(2889), .properties = .{ .param_str = "V256dV256dLUiV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10950 // __builtin_ve_vl_vsll_vvsvl
10951 .{ .tag = @enumFromInt(2890), .properties = .{ .param_str = "V256dV256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10952 // __builtin_ve_vl_vsll_vvvl
10953 .{ .tag = @enumFromInt(2891), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10954 // __builtin_ve_vl_vsll_vvvmvl
10955 .{ .tag = @enumFromInt(2892), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10956 // __builtin_ve_vl_vsll_vvvvl
10957 .{ .tag = @enumFromInt(2893), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10958 // __builtin_ve_vl_vsral_vvsl
10959 .{ .tag = @enumFromInt(2894), .properties = .{ .param_str = "V256dV256dLiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10960 // __builtin_ve_vl_vsral_vvsmvl
10961 .{ .tag = @enumFromInt(2895), .properties = .{ .param_str = "V256dV256dLiV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10962 // __builtin_ve_vl_vsral_vvsvl
10963 .{ .tag = @enumFromInt(2896), .properties = .{ .param_str = "V256dV256dLiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10964 // __builtin_ve_vl_vsral_vvvl
10965 .{ .tag = @enumFromInt(2897), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10966 // __builtin_ve_vl_vsral_vvvmvl
10967 .{ .tag = @enumFromInt(2898), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10968 // __builtin_ve_vl_vsral_vvvvl
10969 .{ .tag = @enumFromInt(2899), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10970 // __builtin_ve_vl_vsrawsx_vvsl
10971 .{ .tag = @enumFromInt(2900), .properties = .{ .param_str = "V256dV256diUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10972 // __builtin_ve_vl_vsrawsx_vvsmvl
10973 .{ .tag = @enumFromInt(2901), .properties = .{ .param_str = "V256dV256diV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10974 // __builtin_ve_vl_vsrawsx_vvsvl
10975 .{ .tag = @enumFromInt(2902), .properties = .{ .param_str = "V256dV256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10976 // __builtin_ve_vl_vsrawsx_vvvl
10977 .{ .tag = @enumFromInt(2903), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10978 // __builtin_ve_vl_vsrawsx_vvvmvl
10979 .{ .tag = @enumFromInt(2904), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10980 // __builtin_ve_vl_vsrawsx_vvvvl
10981 .{ .tag = @enumFromInt(2905), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10982 // __builtin_ve_vl_vsrawzx_vvsl
10983 .{ .tag = @enumFromInt(2906), .properties = .{ .param_str = "V256dV256diUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10984 // __builtin_ve_vl_vsrawzx_vvsmvl
10985 .{ .tag = @enumFromInt(2907), .properties = .{ .param_str = "V256dV256diV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10986 // __builtin_ve_vl_vsrawzx_vvsvl
10987 .{ .tag = @enumFromInt(2908), .properties = .{ .param_str = "V256dV256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10988 // __builtin_ve_vl_vsrawzx_vvvl
10989 .{ .tag = @enumFromInt(2909), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10990 // __builtin_ve_vl_vsrawzx_vvvmvl
10991 .{ .tag = @enumFromInt(2910), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10992 // __builtin_ve_vl_vsrawzx_vvvvl
10993 .{ .tag = @enumFromInt(2911), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10994 // __builtin_ve_vl_vsrl_vvsl
10995 .{ .tag = @enumFromInt(2912), .properties = .{ .param_str = "V256dV256dLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10996 // __builtin_ve_vl_vsrl_vvsmvl
10997 .{ .tag = @enumFromInt(2913), .properties = .{ .param_str = "V256dV256dLUiV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10998 // __builtin_ve_vl_vsrl_vvsvl
10999 .{ .tag = @enumFromInt(2914), .properties = .{ .param_str = "V256dV256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11000 // __builtin_ve_vl_vsrl_vvvl
11001 .{ .tag = @enumFromInt(2915), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11002 // __builtin_ve_vl_vsrl_vvvmvl
11003 .{ .tag = @enumFromInt(2916), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11004 // __builtin_ve_vl_vsrl_vvvvl
11005 .{ .tag = @enumFromInt(2917), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11006 // __builtin_ve_vl_vst2d_vssl
11007 .{ .tag = @enumFromInt(2918), .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
11008 // __builtin_ve_vl_vst2d_vssml
11009 .{ .tag = @enumFromInt(2919), .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11010 // __builtin_ve_vl_vst2dnc_vssl
11011 .{ .tag = @enumFromInt(2920), .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
11012 // __builtin_ve_vl_vst2dnc_vssml
11013 .{ .tag = @enumFromInt(2921), .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11014 // __builtin_ve_vl_vst2dncot_vssl
11015 .{ .tag = @enumFromInt(2922), .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
11016 // __builtin_ve_vl_vst2dncot_vssml
11017 .{ .tag = @enumFromInt(2923), .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11018 // __builtin_ve_vl_vst2dot_vssl
11019 .{ .tag = @enumFromInt(2924), .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
11020 // __builtin_ve_vl_vst2dot_vssml
11021 .{ .tag = @enumFromInt(2925), .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11022 // __builtin_ve_vl_vst_vssl
11023 .{ .tag = @enumFromInt(2926), .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
11024 // __builtin_ve_vl_vst_vssml
11025 .{ .tag = @enumFromInt(2927), .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11026 // __builtin_ve_vl_vstl2d_vssl
11027 .{ .tag = @enumFromInt(2928), .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
11028 // __builtin_ve_vl_vstl2d_vssml
11029 .{ .tag = @enumFromInt(2929), .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11030 // __builtin_ve_vl_vstl2dnc_vssl
11031 .{ .tag = @enumFromInt(2930), .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
11032 // __builtin_ve_vl_vstl2dnc_vssml
11033 .{ .tag = @enumFromInt(2931), .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11034 // __builtin_ve_vl_vstl2dncot_vssl
11035 .{ .tag = @enumFromInt(2932), .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
11036 // __builtin_ve_vl_vstl2dncot_vssml
11037 .{ .tag = @enumFromInt(2933), .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11038 // __builtin_ve_vl_vstl2dot_vssl
11039 .{ .tag = @enumFromInt(2934), .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
11040 // __builtin_ve_vl_vstl2dot_vssml
11041 .{ .tag = @enumFromInt(2935), .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11042 // __builtin_ve_vl_vstl_vssl
11043 .{ .tag = @enumFromInt(2936), .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
11044 // __builtin_ve_vl_vstl_vssml
11045 .{ .tag = @enumFromInt(2937), .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11046 // __builtin_ve_vl_vstlnc_vssl
11047 .{ .tag = @enumFromInt(2938), .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
11048 // __builtin_ve_vl_vstlnc_vssml
11049 .{ .tag = @enumFromInt(2939), .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11050 // __builtin_ve_vl_vstlncot_vssl
11051 .{ .tag = @enumFromInt(2940), .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
11052 // __builtin_ve_vl_vstlncot_vssml
11053 .{ .tag = @enumFromInt(2941), .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11054 // __builtin_ve_vl_vstlot_vssl
11055 .{ .tag = @enumFromInt(2942), .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
11056 // __builtin_ve_vl_vstlot_vssml
11057 .{ .tag = @enumFromInt(2943), .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11058 // __builtin_ve_vl_vstnc_vssl
11059 .{ .tag = @enumFromInt(2944), .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
11060 // __builtin_ve_vl_vstnc_vssml
11061 .{ .tag = @enumFromInt(2945), .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11062 // __builtin_ve_vl_vstncot_vssl
11063 .{ .tag = @enumFromInt(2946), .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
11064 // __builtin_ve_vl_vstncot_vssml
11065 .{ .tag = @enumFromInt(2947), .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11066 // __builtin_ve_vl_vstot_vssl
11067 .{ .tag = @enumFromInt(2948), .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
11068 // __builtin_ve_vl_vstot_vssml
11069 .{ .tag = @enumFromInt(2949), .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11070 // __builtin_ve_vl_vstu2d_vssl
11071 .{ .tag = @enumFromInt(2950), .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
11072 // __builtin_ve_vl_vstu2d_vssml
11073 .{ .tag = @enumFromInt(2951), .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11074 // __builtin_ve_vl_vstu2dnc_vssl
11075 .{ .tag = @enumFromInt(2952), .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
11076 // __builtin_ve_vl_vstu2dnc_vssml
11077 .{ .tag = @enumFromInt(2953), .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11078 // __builtin_ve_vl_vstu2dncot_vssl
11079 .{ .tag = @enumFromInt(2954), .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
11080 // __builtin_ve_vl_vstu2dncot_vssml
11081 .{ .tag = @enumFromInt(2955), .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11082 // __builtin_ve_vl_vstu2dot_vssl
11083 .{ .tag = @enumFromInt(2956), .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
11084 // __builtin_ve_vl_vstu2dot_vssml
11085 .{ .tag = @enumFromInt(2957), .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11086 // __builtin_ve_vl_vstu_vssl
11087 .{ .tag = @enumFromInt(2958), .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
11088 // __builtin_ve_vl_vstu_vssml
11089 .{ .tag = @enumFromInt(2959), .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11090 // __builtin_ve_vl_vstunc_vssl
11091 .{ .tag = @enumFromInt(2960), .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
11092 // __builtin_ve_vl_vstunc_vssml
11093 .{ .tag = @enumFromInt(2961), .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11094 // __builtin_ve_vl_vstuncot_vssl
11095 .{ .tag = @enumFromInt(2962), .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
11096 // __builtin_ve_vl_vstuncot_vssml
11097 .{ .tag = @enumFromInt(2963), .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11098 // __builtin_ve_vl_vstuot_vssl
11099 .{ .tag = @enumFromInt(2964), .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
11100 // __builtin_ve_vl_vstuot_vssml
11101 .{ .tag = @enumFromInt(2965), .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11102 // __builtin_ve_vl_vsubsl_vsvl
11103 .{ .tag = @enumFromInt(2966), .properties = .{ .param_str = "V256dLiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11104 // __builtin_ve_vl_vsubsl_vsvmvl
11105 .{ .tag = @enumFromInt(2967), .properties = .{ .param_str = "V256dLiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11106 // __builtin_ve_vl_vsubsl_vsvvl
11107 .{ .tag = @enumFromInt(2968), .properties = .{ .param_str = "V256dLiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11108 // __builtin_ve_vl_vsubsl_vvvl
11109 .{ .tag = @enumFromInt(2969), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11110 // __builtin_ve_vl_vsubsl_vvvmvl
11111 .{ .tag = @enumFromInt(2970), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11112 // __builtin_ve_vl_vsubsl_vvvvl
11113 .{ .tag = @enumFromInt(2971), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11114 // __builtin_ve_vl_vsubswsx_vsvl
11115 .{ .tag = @enumFromInt(2972), .properties = .{ .param_str = "V256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11116 // __builtin_ve_vl_vsubswsx_vsvmvl
11117 .{ .tag = @enumFromInt(2973), .properties = .{ .param_str = "V256diV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11118 // __builtin_ve_vl_vsubswsx_vsvvl
11119 .{ .tag = @enumFromInt(2974), .properties = .{ .param_str = "V256diV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11120 // __builtin_ve_vl_vsubswsx_vvvl
11121 .{ .tag = @enumFromInt(2975), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11122 // __builtin_ve_vl_vsubswsx_vvvmvl
11123 .{ .tag = @enumFromInt(2976), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11124 // __builtin_ve_vl_vsubswsx_vvvvl
11125 .{ .tag = @enumFromInt(2977), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11126 // __builtin_ve_vl_vsubswzx_vsvl
11127 .{ .tag = @enumFromInt(2978), .properties = .{ .param_str = "V256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11128 // __builtin_ve_vl_vsubswzx_vsvmvl
11129 .{ .tag = @enumFromInt(2979), .properties = .{ .param_str = "V256diV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11130 // __builtin_ve_vl_vsubswzx_vsvvl
11131 .{ .tag = @enumFromInt(2980), .properties = .{ .param_str = "V256diV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11132 // __builtin_ve_vl_vsubswzx_vvvl
11133 .{ .tag = @enumFromInt(2981), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11134 // __builtin_ve_vl_vsubswzx_vvvmvl
11135 .{ .tag = @enumFromInt(2982), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11136 // __builtin_ve_vl_vsubswzx_vvvvl
11137 .{ .tag = @enumFromInt(2983), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11138 // __builtin_ve_vl_vsubul_vsvl
11139 .{ .tag = @enumFromInt(2984), .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11140 // __builtin_ve_vl_vsubul_vsvmvl
11141 .{ .tag = @enumFromInt(2985), .properties = .{ .param_str = "V256dLUiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11142 // __builtin_ve_vl_vsubul_vsvvl
11143 .{ .tag = @enumFromInt(2986), .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11144 // __builtin_ve_vl_vsubul_vvvl
11145 .{ .tag = @enumFromInt(2987), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11146 // __builtin_ve_vl_vsubul_vvvmvl
11147 .{ .tag = @enumFromInt(2988), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11148 // __builtin_ve_vl_vsubul_vvvvl
11149 .{ .tag = @enumFromInt(2989), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11150 // __builtin_ve_vl_vsubuw_vsvl
11151 .{ .tag = @enumFromInt(2990), .properties = .{ .param_str = "V256dUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11152 // __builtin_ve_vl_vsubuw_vsvmvl
11153 .{ .tag = @enumFromInt(2991), .properties = .{ .param_str = "V256dUiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11154 // __builtin_ve_vl_vsubuw_vsvvl
11155 .{ .tag = @enumFromInt(2992), .properties = .{ .param_str = "V256dUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11156 // __builtin_ve_vl_vsubuw_vvvl
11157 .{ .tag = @enumFromInt(2993), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11158 // __builtin_ve_vl_vsubuw_vvvmvl
11159 .{ .tag = @enumFromInt(2994), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11160 // __builtin_ve_vl_vsubuw_vvvvl
11161 .{ .tag = @enumFromInt(2995), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11162 // __builtin_ve_vl_vsuml_vvl
11163 .{ .tag = @enumFromInt(2996), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11164 // __builtin_ve_vl_vsuml_vvml
11165 .{ .tag = @enumFromInt(2997), .properties = .{ .param_str = "V256dV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11166 // __builtin_ve_vl_vsumwsx_vvl
11167 .{ .tag = @enumFromInt(2998), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11168 // __builtin_ve_vl_vsumwsx_vvml
11169 .{ .tag = @enumFromInt(2999), .properties = .{ .param_str = "V256dV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11170 // __builtin_ve_vl_vsumwzx_vvl
11171 .{ .tag = @enumFromInt(3000), .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11172 // __builtin_ve_vl_vsumwzx_vvml
11173 .{ .tag = @enumFromInt(3001), .properties = .{ .param_str = "V256dV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11174 // __builtin_ve_vl_vxor_vsvl
11175 .{ .tag = @enumFromInt(3002), .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11176 // __builtin_ve_vl_vxor_vsvmvl
11177 .{ .tag = @enumFromInt(3003), .properties = .{ .param_str = "V256dLUiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11178 // __builtin_ve_vl_vxor_vsvvl
11179 .{ .tag = @enumFromInt(3004), .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11180 // __builtin_ve_vl_vxor_vvvl
11181 .{ .tag = @enumFromInt(3005), .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11182 // __builtin_ve_vl_vxor_vvvmvl
11183 .{ .tag = @enumFromInt(3006), .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11184 // __builtin_ve_vl_vxor_vvvvl
11185 .{ .tag = @enumFromInt(3007), .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11186 // __builtin_ve_vl_xorm_MMM
11187 .{ .tag = @enumFromInt(3008), .properties = .{ .param_str = "V512bV512bV512b", .target_set = TargetSet.initOne(.vevl_gen) } },
11188 // __builtin_ve_vl_xorm_mmm
11189 .{ .tag = @enumFromInt(3009), .properties = .{ .param_str = "V256bV256bV256b", .target_set = TargetSet.initOne(.vevl_gen) } },
11190 // __builtin_vfprintf
11191 .{ .tag = @enumFromInt(3010), .properties = .{ .param_str = "iP*RcC*Ra", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vprintf, .format_string_position = 1 } } },
11192 // __builtin_vfscanf
11193 .{ .tag = @enumFromInt(3011), .properties = .{ .param_str = "iP*RcC*Ra", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vscanf, .format_string_position = 1 } } },
11194 // __builtin_vprintf
11195 .{ .tag = @enumFromInt(3012), .properties = .{ .param_str = "icC*Ra", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vprintf } } },
11196 // __builtin_vscanf
11197 .{ .tag = @enumFromInt(3013), .properties = .{ .param_str = "icC*Ra", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vscanf } } },
11198 // __builtin_vsnprintf
11199 .{ .tag = @enumFromInt(3014), .properties = .{ .param_str = "ic*RzcC*Ra", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vprintf, .format_string_position = 2 } } },
11200 // __builtin_vsprintf
11201 .{ .tag = @enumFromInt(3015), .properties = .{ .param_str = "ic*RcC*Ra", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vprintf, .format_string_position = 1 } } },
11202 // __builtin_vsscanf
11203 .{ .tag = @enumFromInt(3016), .properties = .{ .param_str = "icC*RcC*Ra", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vscanf, .format_string_position = 1 } } },
11204 // __builtin_wasm_max_f32
11205 .{ .tag = @enumFromInt(3017), .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.webassembly), .attributes = .{ .@"const" = true } } },
11206 // __builtin_wasm_max_f64
11207 .{ .tag = @enumFromInt(3018), .properties = .{ .param_str = "ddd", .target_set = TargetSet.initOne(.webassembly), .attributes = .{ .@"const" = true } } },
11208 // __builtin_wasm_memory_grow
11209 .{ .tag = @enumFromInt(3019), .properties = .{ .param_str = "zIiz", .target_set = TargetSet.initOne(.webassembly) } },
11210 // __builtin_wasm_memory_size
11211 .{ .tag = @enumFromInt(3020), .properties = .{ .param_str = "zIi", .target_set = TargetSet.initOne(.webassembly) } },
11212 // __builtin_wasm_min_f32
11213 .{ .tag = @enumFromInt(3021), .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.webassembly), .attributes = .{ .@"const" = true } } },
11214 // __builtin_wasm_min_f64
11215 .{ .tag = @enumFromInt(3022), .properties = .{ .param_str = "ddd", .target_set = TargetSet.initOne(.webassembly), .attributes = .{ .@"const" = true } } },
11216 // __builtin_wasm_trunc_s_i32_f32
11217 .{ .tag = @enumFromInt(3023), .properties = .{ .param_str = "if", .target_set = TargetSet.initOne(.webassembly), .attributes = .{ .@"const" = true } } },
11218 // __builtin_wasm_trunc_s_i32_f64
11219 .{ .tag = @enumFromInt(3024), .properties = .{ .param_str = "id", .target_set = TargetSet.initOne(.webassembly), .attributes = .{ .@"const" = true } } },
11220 // __builtin_wasm_trunc_s_i64_f32
11221 .{ .tag = @enumFromInt(3025), .properties = .{ .param_str = "LLif", .target_set = TargetSet.initOne(.webassembly), .attributes = .{ .@"const" = true } } },
11222 // __builtin_wasm_trunc_s_i64_f64
11223 .{ .tag = @enumFromInt(3026), .properties = .{ .param_str = "LLid", .target_set = TargetSet.initOne(.webassembly), .attributes = .{ .@"const" = true } } },
11224 // __builtin_wasm_trunc_u_i32_f32
11225 .{ .tag = @enumFromInt(3027), .properties = .{ .param_str = "if", .target_set = TargetSet.initOne(.webassembly), .attributes = .{ .@"const" = true } } },
11226 // __builtin_wasm_trunc_u_i32_f64
11227 .{ .tag = @enumFromInt(3028), .properties = .{ .param_str = "id", .target_set = TargetSet.initOne(.webassembly), .attributes = .{ .@"const" = true } } },
11228 // __builtin_wasm_trunc_u_i64_f32
11229 .{ .tag = @enumFromInt(3029), .properties = .{ .param_str = "LLif", .target_set = TargetSet.initOne(.webassembly), .attributes = .{ .@"const" = true } } },
11230 // __builtin_wasm_trunc_u_i64_f64
11231 .{ .tag = @enumFromInt(3030), .properties = .{ .param_str = "LLid", .target_set = TargetSet.initOne(.webassembly), .attributes = .{ .@"const" = true } } },
11232 // __builtin_wcschr
11233 .{ .tag = @enumFromInt(3031), .properties = .{ .param_str = "w*wC*w", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
11234 // __builtin_wcscmp
11235 .{ .tag = @enumFromInt(3032), .properties = .{ .param_str = "iwC*wC*", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
11236 // __builtin_wcslen
11237 .{ .tag = @enumFromInt(3033), .properties = .{ .param_str = "zwC*", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
11238 // __builtin_wcsncmp
11239 .{ .tag = @enumFromInt(3034), .properties = .{ .param_str = "iwC*wC*z", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
11240 // __builtin_wmemchr
11241 .{ .tag = @enumFromInt(3035), .properties = .{ .param_str = "w*wC*wz", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
11242 // __builtin_wmemcmp
11243 .{ .tag = @enumFromInt(3036), .properties = .{ .param_str = "iwC*wC*z", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
11244 // __builtin_wmemcpy
11245 .{ .tag = @enumFromInt(3037), .properties = .{ .param_str = "w*w*wC*z", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
11246 // __builtin_wmemmove
11247 .{ .tag = @enumFromInt(3038), .properties = .{ .param_str = "w*w*wC*z", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
11248 // __c11_atomic_compare_exchange_strong
11249 .{ .tag = @enumFromInt(3039), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
11250 // __c11_atomic_compare_exchange_weak
11251 .{ .tag = @enumFromInt(3040), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
11252 // __c11_atomic_exchange
11253 .{ .tag = @enumFromInt(3041), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
11254 // __c11_atomic_fetch_add
11255 .{ .tag = @enumFromInt(3042), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
11256 // __c11_atomic_fetch_and
11257 .{ .tag = @enumFromInt(3043), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
11258 // __c11_atomic_fetch_max
11259 .{ .tag = @enumFromInt(3044), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
11260 // __c11_atomic_fetch_min
11261 .{ .tag = @enumFromInt(3045), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
11262 // __c11_atomic_fetch_nand
11263 .{ .tag = @enumFromInt(3046), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
11264 // __c11_atomic_fetch_or
11265 .{ .tag = @enumFromInt(3047), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
11266 // __c11_atomic_fetch_sub
11267 .{ .tag = @enumFromInt(3048), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
11268 // __c11_atomic_fetch_xor
11269 .{ .tag = @enumFromInt(3049), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
11270 // __c11_atomic_init
11271 .{ .tag = @enumFromInt(3050), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
11272 // __c11_atomic_is_lock_free
11273 .{ .tag = @enumFromInt(3051), .properties = .{ .param_str = "bz", .attributes = .{ .const_evaluable = true } } },
11274 // __c11_atomic_load
11275 .{ .tag = @enumFromInt(3052), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
11276 // __c11_atomic_signal_fence
11277 .{ .tag = @enumFromInt(3053), .properties = .{ .param_str = "vi" } },
11278 // __c11_atomic_store
11279 .{ .tag = @enumFromInt(3054), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
11280 // __c11_atomic_thread_fence
11281 .{ .tag = @enumFromInt(3055), .properties = .{ .param_str = "vi" } },
11282 // __clear_cache
11283 .{ .tag = @enumFromInt(3056), .properties = .{ .param_str = "vv*v*", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) } },
11284 // __cospi
11285 .{ .tag = @enumFromInt(3057), .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
11286 // __cospif
11287 .{ .tag = @enumFromInt(3058), .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
11288 // __debugbreak
11289 .{ .tag = @enumFromInt(3059), .properties = .{ .param_str = "v", .language = .all_ms_languages } },
11290 // __dmb
11291 .{ .tag = @enumFromInt(3060), .properties = .{ .param_str = "vUi", .language = .all_ms_languages, .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } },
11292 // __dsb
11293 .{ .tag = @enumFromInt(3061), .properties = .{ .param_str = "vUi", .language = .all_ms_languages, .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } },
11294 // __emit
11295 .{ .tag = @enumFromInt(3062), .properties = .{ .param_str = "vIUiC", .language = .all_ms_languages, .target_set = TargetSet.initOne(.arm) } },
11296 // __exception_code
11297 .{ .tag = @enumFromInt(3063), .properties = .{ .param_str = "UNi", .language = .all_ms_languages } },
11298 // __exception_info
11299 .{ .tag = @enumFromInt(3064), .properties = .{ .param_str = "v*", .language = .all_ms_languages } },
11300 // __exp10
11301 .{ .tag = @enumFromInt(3065), .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
11302 // __exp10f
11303 .{ .tag = @enumFromInt(3066), .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
11304 // __fastfail
11305 .{ .tag = @enumFromInt(3067), .properties = .{ .param_str = "vUi", .language = .all_ms_languages, .attributes = .{ .noreturn = true } } },
11306 // __finite
11307 .{ .tag = @enumFromInt(3068), .properties = .{ .param_str = "id", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
11308 // __finitef
11309 .{ .tag = @enumFromInt(3069), .properties = .{ .param_str = "if", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
11310 // __finitel
11311 .{ .tag = @enumFromInt(3070), .properties = .{ .param_str = "iLd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
11312 // __isb
11313 .{ .tag = @enumFromInt(3071), .properties = .{ .param_str = "vUi", .language = .all_ms_languages, .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } },
11314 // __iso_volatile_load16
11315 .{ .tag = @enumFromInt(3072), .properties = .{ .param_str = "ssCD*", .language = .all_ms_languages } },
11316 // __iso_volatile_load32
11317 .{ .tag = @enumFromInt(3073), .properties = .{ .param_str = "iiCD*", .language = .all_ms_languages } },
11318 // __iso_volatile_load64
11319 .{ .tag = @enumFromInt(3074), .properties = .{ .param_str = "LLiLLiCD*", .language = .all_ms_languages } },
11320 // __iso_volatile_load8
11321 .{ .tag = @enumFromInt(3075), .properties = .{ .param_str = "ccCD*", .language = .all_ms_languages } },
11322 // __iso_volatile_store16
11323 .{ .tag = @enumFromInt(3076), .properties = .{ .param_str = "vsD*s", .language = .all_ms_languages } },
11324 // __iso_volatile_store32
11325 .{ .tag = @enumFromInt(3077), .properties = .{ .param_str = "viD*i", .language = .all_ms_languages } },
11326 // __iso_volatile_store64
11327 .{ .tag = @enumFromInt(3078), .properties = .{ .param_str = "vLLiD*LLi", .language = .all_ms_languages } },
11328 // __iso_volatile_store8
11329 .{ .tag = @enumFromInt(3079), .properties = .{ .param_str = "vcD*c", .language = .all_ms_languages } },
11330 // __ldrexd
11331 .{ .tag = @enumFromInt(3080), .properties = .{ .param_str = "WiWiCD*", .language = .all_ms_languages, .target_set = TargetSet.initOne(.arm) } },
11332 // __lzcnt
11333 .{ .tag = @enumFromInt(3081), .properties = .{ .param_str = "UiUi", .language = .all_ms_languages, .attributes = .{ .@"const" = true, .const_evaluable = true } } },
11334 // __lzcnt16
11335 .{ .tag = @enumFromInt(3082), .properties = .{ .param_str = "UsUs", .language = .all_ms_languages, .attributes = .{ .@"const" = true, .const_evaluable = true } } },
11336 // __lzcnt64
11337 .{ .tag = @enumFromInt(3083), .properties = .{ .param_str = "UWiUWi", .language = .all_ms_languages, .attributes = .{ .@"const" = true, .const_evaluable = true } } },
11338 // __noop
11339 .{ .tag = @enumFromInt(3084), .properties = .{ .param_str = "i.", .language = .all_ms_languages } },
11340 // __nvvm_add_rm_d
11341 .{ .tag = @enumFromInt(3085), .properties = .{ .param_str = "ddd", .target_set = TargetSet.initOne(.nvptx) } },
11342 // __nvvm_add_rm_f
11343 .{ .tag = @enumFromInt(3086), .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
11344 // __nvvm_add_rm_ftz_f
11345 .{ .tag = @enumFromInt(3087), .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
11346 // __nvvm_add_rn_d
11347 .{ .tag = @enumFromInt(3088), .properties = .{ .param_str = "ddd", .target_set = TargetSet.initOne(.nvptx) } },
11348 // __nvvm_add_rn_f
11349 .{ .tag = @enumFromInt(3089), .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
11350 // __nvvm_add_rn_ftz_f
11351 .{ .tag = @enumFromInt(3090), .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
11352 // __nvvm_add_rp_d
11353 .{ .tag = @enumFromInt(3091), .properties = .{ .param_str = "ddd", .target_set = TargetSet.initOne(.nvptx) } },
11354 // __nvvm_add_rp_f
11355 .{ .tag = @enumFromInt(3092), .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
11356 // __nvvm_add_rp_ftz_f
11357 .{ .tag = @enumFromInt(3093), .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
11358 // __nvvm_add_rz_d
11359 .{ .tag = @enumFromInt(3094), .properties = .{ .param_str = "ddd", .target_set = TargetSet.initOne(.nvptx) } },
11360 // __nvvm_add_rz_f
11361 .{ .tag = @enumFromInt(3095), .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
11362 // __nvvm_add_rz_ftz_f
11363 .{ .tag = @enumFromInt(3096), .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
11364 // __nvvm_atom_add_gen_f
11365 .{ .tag = @enumFromInt(3097), .properties = .{ .param_str = "ffD*f", .target_set = TargetSet.initOne(.nvptx) } },
11366 // __nvvm_atom_add_gen_i
11367 .{ .tag = @enumFromInt(3098), .properties = .{ .param_str = "iiD*i", .target_set = TargetSet.initOne(.nvptx) } },
11368 // __nvvm_atom_add_gen_l
11369 .{ .tag = @enumFromInt(3099), .properties = .{ .param_str = "LiLiD*Li", .target_set = TargetSet.initOne(.nvptx) } },
11370 // __nvvm_atom_add_gen_ll
11371 .{ .tag = @enumFromInt(3100), .properties = .{ .param_str = "LLiLLiD*LLi", .target_set = TargetSet.initOne(.nvptx) } },
11372 // __nvvm_atom_and_gen_i
11373 .{ .tag = @enumFromInt(3101), .properties = .{ .param_str = "iiD*i", .target_set = TargetSet.initOne(.nvptx) } },
11374 // __nvvm_atom_and_gen_l
11375 .{ .tag = @enumFromInt(3102), .properties = .{ .param_str = "LiLiD*Li", .target_set = TargetSet.initOne(.nvptx) } },
11376 // __nvvm_atom_and_gen_ll
11377 .{ .tag = @enumFromInt(3103), .properties = .{ .param_str = "LLiLLiD*LLi", .target_set = TargetSet.initOne(.nvptx) } },
11378 // __nvvm_atom_cas_gen_i
11379 .{ .tag = @enumFromInt(3104), .properties = .{ .param_str = "iiD*ii", .target_set = TargetSet.initOne(.nvptx) } },
11380 // __nvvm_atom_cas_gen_l
11381 .{ .tag = @enumFromInt(3105), .properties = .{ .param_str = "LiLiD*LiLi", .target_set = TargetSet.initOne(.nvptx) } },
11382 // __nvvm_atom_cas_gen_ll
11383 .{ .tag = @enumFromInt(3106), .properties = .{ .param_str = "LLiLLiD*LLiLLi", .target_set = TargetSet.initOne(.nvptx) } },
11384 // __nvvm_atom_dec_gen_ui
11385 .{ .tag = @enumFromInt(3107), .properties = .{ .param_str = "UiUiD*Ui", .target_set = TargetSet.initOne(.nvptx) } },
11386 // __nvvm_atom_inc_gen_ui
11387 .{ .tag = @enumFromInt(3108), .properties = .{ .param_str = "UiUiD*Ui", .target_set = TargetSet.initOne(.nvptx) } },
11388 // __nvvm_atom_max_gen_i
11389 .{ .tag = @enumFromInt(3109), .properties = .{ .param_str = "iiD*i", .target_set = TargetSet.initOne(.nvptx) } },
11390 // __nvvm_atom_max_gen_l
11391 .{ .tag = @enumFromInt(3110), .properties = .{ .param_str = "LiLiD*Li", .target_set = TargetSet.initOne(.nvptx) } },
11392 // __nvvm_atom_max_gen_ll
11393 .{ .tag = @enumFromInt(3111), .properties = .{ .param_str = "LLiLLiD*LLi", .target_set = TargetSet.initOne(.nvptx) } },
11394 // __nvvm_atom_max_gen_ui
11395 .{ .tag = @enumFromInt(3112), .properties = .{ .param_str = "UiUiD*Ui", .target_set = TargetSet.initOne(.nvptx) } },
11396 // __nvvm_atom_max_gen_ul
11397 .{ .tag = @enumFromInt(3113), .properties = .{ .param_str = "ULiULiD*ULi", .target_set = TargetSet.initOne(.nvptx) } },
11398 // __nvvm_atom_max_gen_ull
11399 .{ .tag = @enumFromInt(3114), .properties = .{ .param_str = "ULLiULLiD*ULLi", .target_set = TargetSet.initOne(.nvptx) } },
11400 // __nvvm_atom_min_gen_i
11401 .{ .tag = @enumFromInt(3115), .properties = .{ .param_str = "iiD*i", .target_set = TargetSet.initOne(.nvptx) } },
11402 // __nvvm_atom_min_gen_l
11403 .{ .tag = @enumFromInt(3116), .properties = .{ .param_str = "LiLiD*Li", .target_set = TargetSet.initOne(.nvptx) } },
11404 // __nvvm_atom_min_gen_ll
11405 .{ .tag = @enumFromInt(3117), .properties = .{ .param_str = "LLiLLiD*LLi", .target_set = TargetSet.initOne(.nvptx) } },
11406 // __nvvm_atom_min_gen_ui
11407 .{ .tag = @enumFromInt(3118), .properties = .{ .param_str = "UiUiD*Ui", .target_set = TargetSet.initOne(.nvptx) } },
11408 // __nvvm_atom_min_gen_ul
11409 .{ .tag = @enumFromInt(3119), .properties = .{ .param_str = "ULiULiD*ULi", .target_set = TargetSet.initOne(.nvptx) } },
11410 // __nvvm_atom_min_gen_ull
11411 .{ .tag = @enumFromInt(3120), .properties = .{ .param_str = "ULLiULLiD*ULLi", .target_set = TargetSet.initOne(.nvptx) } },
11412 // __nvvm_atom_or_gen_i
11413 .{ .tag = @enumFromInt(3121), .properties = .{ .param_str = "iiD*i", .target_set = TargetSet.initOne(.nvptx) } },
11414 // __nvvm_atom_or_gen_l
11415 .{ .tag = @enumFromInt(3122), .properties = .{ .param_str = "LiLiD*Li", .target_set = TargetSet.initOne(.nvptx) } },
11416 // __nvvm_atom_or_gen_ll
11417 .{ .tag = @enumFromInt(3123), .properties = .{ .param_str = "LLiLLiD*LLi", .target_set = TargetSet.initOne(.nvptx) } },
11418 // __nvvm_atom_sub_gen_i
11419 .{ .tag = @enumFromInt(3124), .properties = .{ .param_str = "iiD*i", .target_set = TargetSet.initOne(.nvptx) } },
11420 // __nvvm_atom_sub_gen_l
11421 .{ .tag = @enumFromInt(3125), .properties = .{ .param_str = "LiLiD*Li", .target_set = TargetSet.initOne(.nvptx) } },
11422 // __nvvm_atom_sub_gen_ll
11423 .{ .tag = @enumFromInt(3126), .properties = .{ .param_str = "LLiLLiD*LLi", .target_set = TargetSet.initOne(.nvptx) } },
11424 // __nvvm_atom_xchg_gen_i
11425 .{ .tag = @enumFromInt(3127), .properties = .{ .param_str = "iiD*i", .target_set = TargetSet.initOne(.nvptx) } },
11426 // __nvvm_atom_xchg_gen_l
11427 .{ .tag = @enumFromInt(3128), .properties = .{ .param_str = "LiLiD*Li", .target_set = TargetSet.initOne(.nvptx) } },
11428 // __nvvm_atom_xchg_gen_ll
11429 .{ .tag = @enumFromInt(3129), .properties = .{ .param_str = "LLiLLiD*LLi", .target_set = TargetSet.initOne(.nvptx) } },
11430 // __nvvm_atom_xor_gen_i
11431 .{ .tag = @enumFromInt(3130), .properties = .{ .param_str = "iiD*i", .target_set = TargetSet.initOne(.nvptx) } },
11432 // __nvvm_atom_xor_gen_l
11433 .{ .tag = @enumFromInt(3131), .properties = .{ .param_str = "LiLiD*Li", .target_set = TargetSet.initOne(.nvptx) } },
11434 // __nvvm_atom_xor_gen_ll
11435 .{ .tag = @enumFromInt(3132), .properties = .{ .param_str = "LLiLLiD*LLi", .target_set = TargetSet.initOne(.nvptx) } },
11436 // __nvvm_bar0_and
11437 .{ .tag = @enumFromInt(3133), .properties = .{ .param_str = "ii", .target_set = TargetSet.initOne(.nvptx) } },
11438 // __nvvm_bar0_or
11439 .{ .tag = @enumFromInt(3134), .properties = .{ .param_str = "ii", .target_set = TargetSet.initOne(.nvptx) } },
11440 // __nvvm_bar0_popc
11441 .{ .tag = @enumFromInt(3135), .properties = .{ .param_str = "ii", .target_set = TargetSet.initOne(.nvptx) } },
11442 // __nvvm_bar_sync
11443 .{ .tag = @enumFromInt(3136), .properties = .{ .param_str = "vi", .target_set = TargetSet.initOne(.nvptx) } },
11444 // __nvvm_bitcast_d2ll
11445 .{ .tag = @enumFromInt(3137), .properties = .{ .param_str = "LLid", .target_set = TargetSet.initOne(.nvptx) } },
11446 // __nvvm_bitcast_f2i
11447 .{ .tag = @enumFromInt(3138), .properties = .{ .param_str = "if", .target_set = TargetSet.initOne(.nvptx) } },
11448 // __nvvm_bitcast_i2f
11449 .{ .tag = @enumFromInt(3139), .properties = .{ .param_str = "fi", .target_set = TargetSet.initOne(.nvptx) } },
11450 // __nvvm_bitcast_ll2d
11451 .{ .tag = @enumFromInt(3140), .properties = .{ .param_str = "dLLi", .target_set = TargetSet.initOne(.nvptx) } },
11452 // __nvvm_ceil_d
11453 .{ .tag = @enumFromInt(3141), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.nvptx) } },
11454 // __nvvm_ceil_f
11455 .{ .tag = @enumFromInt(3142), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
11456 // __nvvm_ceil_ftz_f
11457 .{ .tag = @enumFromInt(3143), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
11458 // __nvvm_compiler_error
11459 .{ .tag = @enumFromInt(3144), .properties = .{ .param_str = "vcC*4", .target_set = TargetSet.initOne(.nvptx) } },
11460 // __nvvm_compiler_warn
11461 .{ .tag = @enumFromInt(3145), .properties = .{ .param_str = "vcC*4", .target_set = TargetSet.initOne(.nvptx) } },
11462 // __nvvm_cos_approx_f
11463 .{ .tag = @enumFromInt(3146), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
11464 // __nvvm_cos_approx_ftz_f
11465 .{ .tag = @enumFromInt(3147), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
11466 // __nvvm_d2f_rm
11467 .{ .tag = @enumFromInt(3148), .properties = .{ .param_str = "fd", .target_set = TargetSet.initOne(.nvptx) } },
11468 // __nvvm_d2f_rm_ftz
11469 .{ .tag = @enumFromInt(3149), .properties = .{ .param_str = "fd", .target_set = TargetSet.initOne(.nvptx) } },
11470 // __nvvm_d2f_rn
11471 .{ .tag = @enumFromInt(3150), .properties = .{ .param_str = "fd", .target_set = TargetSet.initOne(.nvptx) } },
11472 // __nvvm_d2f_rn_ftz
11473 .{ .tag = @enumFromInt(3151), .properties = .{ .param_str = "fd", .target_set = TargetSet.initOne(.nvptx) } },
11474 // __nvvm_d2f_rp
11475 .{ .tag = @enumFromInt(3152), .properties = .{ .param_str = "fd", .target_set = TargetSet.initOne(.nvptx) } },
11476 // __nvvm_d2f_rp_ftz
11477 .{ .tag = @enumFromInt(3153), .properties = .{ .param_str = "fd", .target_set = TargetSet.initOne(.nvptx) } },
11478 // __nvvm_d2f_rz
11479 .{ .tag = @enumFromInt(3154), .properties = .{ .param_str = "fd", .target_set = TargetSet.initOne(.nvptx) } },
11480 // __nvvm_d2f_rz_ftz
11481 .{ .tag = @enumFromInt(3155), .properties = .{ .param_str = "fd", .target_set = TargetSet.initOne(.nvptx) } },
11482 // __nvvm_d2i_hi
11483 .{ .tag = @enumFromInt(3156), .properties = .{ .param_str = "id", .target_set = TargetSet.initOne(.nvptx) } },
11484 // __nvvm_d2i_lo
11485 .{ .tag = @enumFromInt(3157), .properties = .{ .param_str = "id", .target_set = TargetSet.initOne(.nvptx) } },
11486 // __nvvm_d2i_rm
11487 .{ .tag = @enumFromInt(3158), .properties = .{ .param_str = "id", .target_set = TargetSet.initOne(.nvptx) } },
11488 // __nvvm_d2i_rn
11489 .{ .tag = @enumFromInt(3159), .properties = .{ .param_str = "id", .target_set = TargetSet.initOne(.nvptx) } },
11490 // __nvvm_d2i_rp
11491 .{ .tag = @enumFromInt(3160), .properties = .{ .param_str = "id", .target_set = TargetSet.initOne(.nvptx) } },
11492 // __nvvm_d2i_rz
11493 .{ .tag = @enumFromInt(3161), .properties = .{ .param_str = "id", .target_set = TargetSet.initOne(.nvptx) } },
11494 // __nvvm_d2ll_rm
11495 .{ .tag = @enumFromInt(3162), .properties = .{ .param_str = "LLid", .target_set = TargetSet.initOne(.nvptx) } },
11496 // __nvvm_d2ll_rn
11497 .{ .tag = @enumFromInt(3163), .properties = .{ .param_str = "LLid", .target_set = TargetSet.initOne(.nvptx) } },
11498 // __nvvm_d2ll_rp
11499 .{ .tag = @enumFromInt(3164), .properties = .{ .param_str = "LLid", .target_set = TargetSet.initOne(.nvptx) } },
11500 // __nvvm_d2ll_rz
11501 .{ .tag = @enumFromInt(3165), .properties = .{ .param_str = "LLid", .target_set = TargetSet.initOne(.nvptx) } },
11502 // __nvvm_d2ui_rm
11503 .{ .tag = @enumFromInt(3166), .properties = .{ .param_str = "Uid", .target_set = TargetSet.initOne(.nvptx) } },
11504 // __nvvm_d2ui_rn
11505 .{ .tag = @enumFromInt(3167), .properties = .{ .param_str = "Uid", .target_set = TargetSet.initOne(.nvptx) } },
11506 // __nvvm_d2ui_rp
11507 .{ .tag = @enumFromInt(3168), .properties = .{ .param_str = "Uid", .target_set = TargetSet.initOne(.nvptx) } },
11508 // __nvvm_d2ui_rz
11509 .{ .tag = @enumFromInt(3169), .properties = .{ .param_str = "Uid", .target_set = TargetSet.initOne(.nvptx) } },
11510 // __nvvm_d2ull_rm
11511 .{ .tag = @enumFromInt(3170), .properties = .{ .param_str = "ULLid", .target_set = TargetSet.initOne(.nvptx) } },
11512 // __nvvm_d2ull_rn
11513 .{ .tag = @enumFromInt(3171), .properties = .{ .param_str = "ULLid", .target_set = TargetSet.initOne(.nvptx) } },
11514 // __nvvm_d2ull_rp
11515 .{ .tag = @enumFromInt(3172), .properties = .{ .param_str = "ULLid", .target_set = TargetSet.initOne(.nvptx) } },
11516 // __nvvm_d2ull_rz
11517 .{ .tag = @enumFromInt(3173), .properties = .{ .param_str = "ULLid", .target_set = TargetSet.initOne(.nvptx) } },
11518 // __nvvm_div_approx_f
11519 .{ .tag = @enumFromInt(3174), .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
11520 // __nvvm_div_approx_ftz_f
11521 .{ .tag = @enumFromInt(3175), .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
11522 // __nvvm_div_rm_d
11523 .{ .tag = @enumFromInt(3176), .properties = .{ .param_str = "ddd", .target_set = TargetSet.initOne(.nvptx) } },
11524 // __nvvm_div_rm_f
11525 .{ .tag = @enumFromInt(3177), .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
11526 // __nvvm_div_rm_ftz_f
11527 .{ .tag = @enumFromInt(3178), .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
11528 // __nvvm_div_rn_d
11529 .{ .tag = @enumFromInt(3179), .properties = .{ .param_str = "ddd", .target_set = TargetSet.initOne(.nvptx) } },
11530 // __nvvm_div_rn_f
11531 .{ .tag = @enumFromInt(3180), .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
11532 // __nvvm_div_rn_ftz_f
11533 .{ .tag = @enumFromInt(3181), .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
11534 // __nvvm_div_rp_d
11535 .{ .tag = @enumFromInt(3182), .properties = .{ .param_str = "ddd", .target_set = TargetSet.initOne(.nvptx) } },
11536 // __nvvm_div_rp_f
11537 .{ .tag = @enumFromInt(3183), .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
11538 // __nvvm_div_rp_ftz_f
11539 .{ .tag = @enumFromInt(3184), .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
11540 // __nvvm_div_rz_d
11541 .{ .tag = @enumFromInt(3185), .properties = .{ .param_str = "ddd", .target_set = TargetSet.initOne(.nvptx) } },
11542 // __nvvm_div_rz_f
11543 .{ .tag = @enumFromInt(3186), .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
11544 // __nvvm_div_rz_ftz_f
11545 .{ .tag = @enumFromInt(3187), .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
11546 // __nvvm_ex2_approx_d
11547 .{ .tag = @enumFromInt(3188), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.nvptx) } },
11548 // __nvvm_ex2_approx_f
11549 .{ .tag = @enumFromInt(3189), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
11550 // __nvvm_ex2_approx_ftz_f
11551 .{ .tag = @enumFromInt(3190), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
11552 // __nvvm_f2h_rn
11553 .{ .tag = @enumFromInt(3191), .properties = .{ .param_str = "Usf", .target_set = TargetSet.initOne(.nvptx) } },
11554 // __nvvm_f2h_rn_ftz
11555 .{ .tag = @enumFromInt(3192), .properties = .{ .param_str = "Usf", .target_set = TargetSet.initOne(.nvptx) } },
11556 // __nvvm_f2i_rm
11557 .{ .tag = @enumFromInt(3193), .properties = .{ .param_str = "if", .target_set = TargetSet.initOne(.nvptx) } },
11558 // __nvvm_f2i_rm_ftz
11559 .{ .tag = @enumFromInt(3194), .properties = .{ .param_str = "if", .target_set = TargetSet.initOne(.nvptx) } },
11560 // __nvvm_f2i_rn
11561 .{ .tag = @enumFromInt(3195), .properties = .{ .param_str = "if", .target_set = TargetSet.initOne(.nvptx) } },
11562 // __nvvm_f2i_rn_ftz
11563 .{ .tag = @enumFromInt(3196), .properties = .{ .param_str = "if", .target_set = TargetSet.initOne(.nvptx) } },
11564 // __nvvm_f2i_rp
11565 .{ .tag = @enumFromInt(3197), .properties = .{ .param_str = "if", .target_set = TargetSet.initOne(.nvptx) } },
11566 // __nvvm_f2i_rp_ftz
11567 .{ .tag = @enumFromInt(3198), .properties = .{ .param_str = "if", .target_set = TargetSet.initOne(.nvptx) } },
11568 // __nvvm_f2i_rz
11569 .{ .tag = @enumFromInt(3199), .properties = .{ .param_str = "if", .target_set = TargetSet.initOne(.nvptx) } },
11570 // __nvvm_f2i_rz_ftz
11571 .{ .tag = @enumFromInt(3200), .properties = .{ .param_str = "if", .target_set = TargetSet.initOne(.nvptx) } },
11572 // __nvvm_f2ll_rm
11573 .{ .tag = @enumFromInt(3201), .properties = .{ .param_str = "LLif", .target_set = TargetSet.initOne(.nvptx) } },
11574 // __nvvm_f2ll_rm_ftz
11575 .{ .tag = @enumFromInt(3202), .properties = .{ .param_str = "LLif", .target_set = TargetSet.initOne(.nvptx) } },
11576 // __nvvm_f2ll_rn
11577 .{ .tag = @enumFromInt(3203), .properties = .{ .param_str = "LLif", .target_set = TargetSet.initOne(.nvptx) } },
11578 // __nvvm_f2ll_rn_ftz
11579 .{ .tag = @enumFromInt(3204), .properties = .{ .param_str = "LLif", .target_set = TargetSet.initOne(.nvptx) } },
11580 // __nvvm_f2ll_rp
11581 .{ .tag = @enumFromInt(3205), .properties = .{ .param_str = "LLif", .target_set = TargetSet.initOne(.nvptx) } },
11582 // __nvvm_f2ll_rp_ftz
11583 .{ .tag = @enumFromInt(3206), .properties = .{ .param_str = "LLif", .target_set = TargetSet.initOne(.nvptx) } },
11584 // __nvvm_f2ll_rz
11585 .{ .tag = @enumFromInt(3207), .properties = .{ .param_str = "LLif", .target_set = TargetSet.initOne(.nvptx) } },
11586 // __nvvm_f2ll_rz_ftz
11587 .{ .tag = @enumFromInt(3208), .properties = .{ .param_str = "LLif", .target_set = TargetSet.initOne(.nvptx) } },
11588 // __nvvm_f2ui_rm
11589 .{ .tag = @enumFromInt(3209), .properties = .{ .param_str = "Uif", .target_set = TargetSet.initOne(.nvptx) } },
11590 // __nvvm_f2ui_rm_ftz
11591 .{ .tag = @enumFromInt(3210), .properties = .{ .param_str = "Uif", .target_set = TargetSet.initOne(.nvptx) } },
11592 // __nvvm_f2ui_rn
11593 .{ .tag = @enumFromInt(3211), .properties = .{ .param_str = "Uif", .target_set = TargetSet.initOne(.nvptx) } },
11594 // __nvvm_f2ui_rn_ftz
11595 .{ .tag = @enumFromInt(3212), .properties = .{ .param_str = "Uif", .target_set = TargetSet.initOne(.nvptx) } },
11596 // __nvvm_f2ui_rp
11597 .{ .tag = @enumFromInt(3213), .properties = .{ .param_str = "Uif", .target_set = TargetSet.initOne(.nvptx) } },
11598 // __nvvm_f2ui_rp_ftz
11599 .{ .tag = @enumFromInt(3214), .properties = .{ .param_str = "Uif", .target_set = TargetSet.initOne(.nvptx) } },
11600 // __nvvm_f2ui_rz
11601 .{ .tag = @enumFromInt(3215), .properties = .{ .param_str = "Uif", .target_set = TargetSet.initOne(.nvptx) } },
11602 // __nvvm_f2ui_rz_ftz
11603 .{ .tag = @enumFromInt(3216), .properties = .{ .param_str = "Uif", .target_set = TargetSet.initOne(.nvptx) } },
11604 // __nvvm_f2ull_rm
11605 .{ .tag = @enumFromInt(3217), .properties = .{ .param_str = "ULLif", .target_set = TargetSet.initOne(.nvptx) } },
11606 // __nvvm_f2ull_rm_ftz
11607 .{ .tag = @enumFromInt(3218), .properties = .{ .param_str = "ULLif", .target_set = TargetSet.initOne(.nvptx) } },
11608 // __nvvm_f2ull_rn
11609 .{ .tag = @enumFromInt(3219), .properties = .{ .param_str = "ULLif", .target_set = TargetSet.initOne(.nvptx) } },
11610 // __nvvm_f2ull_rn_ftz
11611 .{ .tag = @enumFromInt(3220), .properties = .{ .param_str = "ULLif", .target_set = TargetSet.initOne(.nvptx) } },
11612 // __nvvm_f2ull_rp
11613 .{ .tag = @enumFromInt(3221), .properties = .{ .param_str = "ULLif", .target_set = TargetSet.initOne(.nvptx) } },
11614 // __nvvm_f2ull_rp_ftz
11615 .{ .tag = @enumFromInt(3222), .properties = .{ .param_str = "ULLif", .target_set = TargetSet.initOne(.nvptx) } },
11616 // __nvvm_f2ull_rz
11617 .{ .tag = @enumFromInt(3223), .properties = .{ .param_str = "ULLif", .target_set = TargetSet.initOne(.nvptx) } },
11618 // __nvvm_f2ull_rz_ftz
11619 .{ .tag = @enumFromInt(3224), .properties = .{ .param_str = "ULLif", .target_set = TargetSet.initOne(.nvptx) } },
11620 // __nvvm_fabs_d
11621 .{ .tag = @enumFromInt(3225), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.nvptx) } },
11622 // __nvvm_fabs_f
11623 .{ .tag = @enumFromInt(3226), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
11624 // __nvvm_fabs_ftz_f
11625 .{ .tag = @enumFromInt(3227), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
11626 // __nvvm_floor_d
11627 .{ .tag = @enumFromInt(3228), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.nvptx) } },
11628 // __nvvm_floor_f
11629 .{ .tag = @enumFromInt(3229), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
11630 // __nvvm_floor_ftz_f
11631 .{ .tag = @enumFromInt(3230), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
11632 // __nvvm_fma_rm_d
11633 .{ .tag = @enumFromInt(3231), .properties = .{ .param_str = "dddd", .target_set = TargetSet.initOne(.nvptx) } },
11634 // __nvvm_fma_rm_f
11635 .{ .tag = @enumFromInt(3232), .properties = .{ .param_str = "ffff", .target_set = TargetSet.initOne(.nvptx) } },
11636 // __nvvm_fma_rm_ftz_f
11637 .{ .tag = @enumFromInt(3233), .properties = .{ .param_str = "ffff", .target_set = TargetSet.initOne(.nvptx) } },
11638 // __nvvm_fma_rn_d
11639 .{ .tag = @enumFromInt(3234), .properties = .{ .param_str = "dddd", .target_set = TargetSet.initOne(.nvptx) } },
11640 // __nvvm_fma_rn_f
11641 .{ .tag = @enumFromInt(3235), .properties = .{ .param_str = "ffff", .target_set = TargetSet.initOne(.nvptx) } },
11642 // __nvvm_fma_rn_ftz_f
11643 .{ .tag = @enumFromInt(3236), .properties = .{ .param_str = "ffff", .target_set = TargetSet.initOne(.nvptx) } },
11644 // __nvvm_fma_rp_d
11645 .{ .tag = @enumFromInt(3237), .properties = .{ .param_str = "dddd", .target_set = TargetSet.initOne(.nvptx) } },
11646 // __nvvm_fma_rp_f
11647 .{ .tag = @enumFromInt(3238), .properties = .{ .param_str = "ffff", .target_set = TargetSet.initOne(.nvptx) } },
11648 // __nvvm_fma_rp_ftz_f
11649 .{ .tag = @enumFromInt(3239), .properties = .{ .param_str = "ffff", .target_set = TargetSet.initOne(.nvptx) } },
11650 // __nvvm_fma_rz_d
11651 .{ .tag = @enumFromInt(3240), .properties = .{ .param_str = "dddd", .target_set = TargetSet.initOne(.nvptx) } },
11652 // __nvvm_fma_rz_f
11653 .{ .tag = @enumFromInt(3241), .properties = .{ .param_str = "ffff", .target_set = TargetSet.initOne(.nvptx) } },
11654 // __nvvm_fma_rz_ftz_f
11655 .{ .tag = @enumFromInt(3242), .properties = .{ .param_str = "ffff", .target_set = TargetSet.initOne(.nvptx) } },
11656 // __nvvm_fmax_d
11657 .{ .tag = @enumFromInt(3243), .properties = .{ .param_str = "ddd", .target_set = TargetSet.initOne(.nvptx) } },
11658 // __nvvm_fmax_f
11659 .{ .tag = @enumFromInt(3244), .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
11660 // __nvvm_fmax_ftz_f
11661 .{ .tag = @enumFromInt(3245), .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
11662 // __nvvm_fmin_d
11663 .{ .tag = @enumFromInt(3246), .properties = .{ .param_str = "ddd", .target_set = TargetSet.initOne(.nvptx) } },
11664 // __nvvm_fmin_f
11665 .{ .tag = @enumFromInt(3247), .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
11666 // __nvvm_fmin_ftz_f
11667 .{ .tag = @enumFromInt(3248), .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
11668 // __nvvm_i2d_rm
11669 .{ .tag = @enumFromInt(3249), .properties = .{ .param_str = "di", .target_set = TargetSet.initOne(.nvptx) } },
11670 // __nvvm_i2d_rn
11671 .{ .tag = @enumFromInt(3250), .properties = .{ .param_str = "di", .target_set = TargetSet.initOne(.nvptx) } },
11672 // __nvvm_i2d_rp
11673 .{ .tag = @enumFromInt(3251), .properties = .{ .param_str = "di", .target_set = TargetSet.initOne(.nvptx) } },
11674 // __nvvm_i2d_rz
11675 .{ .tag = @enumFromInt(3252), .properties = .{ .param_str = "di", .target_set = TargetSet.initOne(.nvptx) } },
11676 // __nvvm_i2f_rm
11677 .{ .tag = @enumFromInt(3253), .properties = .{ .param_str = "fi", .target_set = TargetSet.initOne(.nvptx) } },
11678 // __nvvm_i2f_rn
11679 .{ .tag = @enumFromInt(3254), .properties = .{ .param_str = "fi", .target_set = TargetSet.initOne(.nvptx) } },
11680 // __nvvm_i2f_rp
11681 .{ .tag = @enumFromInt(3255), .properties = .{ .param_str = "fi", .target_set = TargetSet.initOne(.nvptx) } },
11682 // __nvvm_i2f_rz
11683 .{ .tag = @enumFromInt(3256), .properties = .{ .param_str = "fi", .target_set = TargetSet.initOne(.nvptx) } },
11684 // __nvvm_isspacep_const
11685 .{ .tag = @enumFromInt(3257), .properties = .{ .param_str = "bvC*", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
11686 // __nvvm_isspacep_global
11687 .{ .tag = @enumFromInt(3258), .properties = .{ .param_str = "bvC*", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
11688 // __nvvm_isspacep_local
11689 .{ .tag = @enumFromInt(3259), .properties = .{ .param_str = "bvC*", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
11690 // __nvvm_isspacep_shared
11691 .{ .tag = @enumFromInt(3260), .properties = .{ .param_str = "bvC*", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
11692 // __nvvm_ldg_c
11693 .{ .tag = @enumFromInt(3261), .properties = .{ .param_str = "ccC*", .target_set = TargetSet.initOne(.nvptx) } },
11694 // __nvvm_ldg_c2
11695 .{ .tag = @enumFromInt(3262), .properties = .{ .param_str = "E2cE2cC*", .target_set = TargetSet.initOne(.nvptx) } },
11696 // __nvvm_ldg_c4
11697 .{ .tag = @enumFromInt(3263), .properties = .{ .param_str = "E4cE4cC*", .target_set = TargetSet.initOne(.nvptx) } },
11698 // __nvvm_ldg_d
11699 .{ .tag = @enumFromInt(3264), .properties = .{ .param_str = "ddC*", .target_set = TargetSet.initOne(.nvptx) } },
11700 // __nvvm_ldg_d2
11701 .{ .tag = @enumFromInt(3265), .properties = .{ .param_str = "E2dE2dC*", .target_set = TargetSet.initOne(.nvptx) } },
11702 // __nvvm_ldg_f
11703 .{ .tag = @enumFromInt(3266), .properties = .{ .param_str = "ffC*", .target_set = TargetSet.initOne(.nvptx) } },
11704 // __nvvm_ldg_f2
11705 .{ .tag = @enumFromInt(3267), .properties = .{ .param_str = "E2fE2fC*", .target_set = TargetSet.initOne(.nvptx) } },
11706 // __nvvm_ldg_f4
11707 .{ .tag = @enumFromInt(3268), .properties = .{ .param_str = "E4fE4fC*", .target_set = TargetSet.initOne(.nvptx) } },
11708 // __nvvm_ldg_h
11709 .{ .tag = @enumFromInt(3269), .properties = .{ .param_str = "hhC*", .target_set = TargetSet.initOne(.nvptx) } },
11710 // __nvvm_ldg_h2
11711 .{ .tag = @enumFromInt(3270), .properties = .{ .param_str = "E2hE2hC*", .target_set = TargetSet.initOne(.nvptx) } },
11712 // __nvvm_ldg_i
11713 .{ .tag = @enumFromInt(3271), .properties = .{ .param_str = "iiC*", .target_set = TargetSet.initOne(.nvptx) } },
11714 // __nvvm_ldg_i2
11715 .{ .tag = @enumFromInt(3272), .properties = .{ .param_str = "E2iE2iC*", .target_set = TargetSet.initOne(.nvptx) } },
11716 // __nvvm_ldg_i4
11717 .{ .tag = @enumFromInt(3273), .properties = .{ .param_str = "E4iE4iC*", .target_set = TargetSet.initOne(.nvptx) } },
11718 // __nvvm_ldg_l
11719 .{ .tag = @enumFromInt(3274), .properties = .{ .param_str = "LiLiC*", .target_set = TargetSet.initOne(.nvptx) } },
11720 // __nvvm_ldg_l2
11721 .{ .tag = @enumFromInt(3275), .properties = .{ .param_str = "E2LiE2LiC*", .target_set = TargetSet.initOne(.nvptx) } },
11722 // __nvvm_ldg_ll
11723 .{ .tag = @enumFromInt(3276), .properties = .{ .param_str = "LLiLLiC*", .target_set = TargetSet.initOne(.nvptx) } },
11724 // __nvvm_ldg_ll2
11725 .{ .tag = @enumFromInt(3277), .properties = .{ .param_str = "E2LLiE2LLiC*", .target_set = TargetSet.initOne(.nvptx) } },
11726 // __nvvm_ldg_s
11727 .{ .tag = @enumFromInt(3278), .properties = .{ .param_str = "ssC*", .target_set = TargetSet.initOne(.nvptx) } },
11728 // __nvvm_ldg_s2
11729 .{ .tag = @enumFromInt(3279), .properties = .{ .param_str = "E2sE2sC*", .target_set = TargetSet.initOne(.nvptx) } },
11730 // __nvvm_ldg_s4
11731 .{ .tag = @enumFromInt(3280), .properties = .{ .param_str = "E4sE4sC*", .target_set = TargetSet.initOne(.nvptx) } },
11732 // __nvvm_ldg_sc
11733 .{ .tag = @enumFromInt(3281), .properties = .{ .param_str = "ScScC*", .target_set = TargetSet.initOne(.nvptx) } },
11734 // __nvvm_ldg_sc2
11735 .{ .tag = @enumFromInt(3282), .properties = .{ .param_str = "E2ScE2ScC*", .target_set = TargetSet.initOne(.nvptx) } },
11736 // __nvvm_ldg_sc4
11737 .{ .tag = @enumFromInt(3283), .properties = .{ .param_str = "E4ScE4ScC*", .target_set = TargetSet.initOne(.nvptx) } },
11738 // __nvvm_ldg_uc
11739 .{ .tag = @enumFromInt(3284), .properties = .{ .param_str = "UcUcC*", .target_set = TargetSet.initOne(.nvptx) } },
11740 // __nvvm_ldg_uc2
11741 .{ .tag = @enumFromInt(3285), .properties = .{ .param_str = "E2UcE2UcC*", .target_set = TargetSet.initOne(.nvptx) } },
11742 // __nvvm_ldg_uc4
11743 .{ .tag = @enumFromInt(3286), .properties = .{ .param_str = "E4UcE4UcC*", .target_set = TargetSet.initOne(.nvptx) } },
11744 // __nvvm_ldg_ui
11745 .{ .tag = @enumFromInt(3287), .properties = .{ .param_str = "UiUiC*", .target_set = TargetSet.initOne(.nvptx) } },
11746 // __nvvm_ldg_ui2
11747 .{ .tag = @enumFromInt(3288), .properties = .{ .param_str = "E2UiE2UiC*", .target_set = TargetSet.initOne(.nvptx) } },
11748 // __nvvm_ldg_ui4
11749 .{ .tag = @enumFromInt(3289), .properties = .{ .param_str = "E4UiE4UiC*", .target_set = TargetSet.initOne(.nvptx) } },
11750 // __nvvm_ldg_ul
11751 .{ .tag = @enumFromInt(3290), .properties = .{ .param_str = "ULiULiC*", .target_set = TargetSet.initOne(.nvptx) } },
11752 // __nvvm_ldg_ul2
11753 .{ .tag = @enumFromInt(3291), .properties = .{ .param_str = "E2ULiE2ULiC*", .target_set = TargetSet.initOne(.nvptx) } },
11754 // __nvvm_ldg_ull
11755 .{ .tag = @enumFromInt(3292), .properties = .{ .param_str = "ULLiULLiC*", .target_set = TargetSet.initOne(.nvptx) } },
11756 // __nvvm_ldg_ull2
11757 .{ .tag = @enumFromInt(3293), .properties = .{ .param_str = "E2ULLiE2ULLiC*", .target_set = TargetSet.initOne(.nvptx) } },
11758 // __nvvm_ldg_us
11759 .{ .tag = @enumFromInt(3294), .properties = .{ .param_str = "UsUsC*", .target_set = TargetSet.initOne(.nvptx) } },
11760 // __nvvm_ldg_us2
11761 .{ .tag = @enumFromInt(3295), .properties = .{ .param_str = "E2UsE2UsC*", .target_set = TargetSet.initOne(.nvptx) } },
11762 // __nvvm_ldg_us4
11763 .{ .tag = @enumFromInt(3296), .properties = .{ .param_str = "E4UsE4UsC*", .target_set = TargetSet.initOne(.nvptx) } },
11764 // __nvvm_ldu_c
11765 .{ .tag = @enumFromInt(3297), .properties = .{ .param_str = "ccC*", .target_set = TargetSet.initOne(.nvptx) } },
11766 // __nvvm_ldu_c2
11767 .{ .tag = @enumFromInt(3298), .properties = .{ .param_str = "E2cE2cC*", .target_set = TargetSet.initOne(.nvptx) } },
11768 // __nvvm_ldu_c4
11769 .{ .tag = @enumFromInt(3299), .properties = .{ .param_str = "E4cE4cC*", .target_set = TargetSet.initOne(.nvptx) } },
11770 // __nvvm_ldu_d
11771 .{ .tag = @enumFromInt(3300), .properties = .{ .param_str = "ddC*", .target_set = TargetSet.initOne(.nvptx) } },
11772 // __nvvm_ldu_d2
11773 .{ .tag = @enumFromInt(3301), .properties = .{ .param_str = "E2dE2dC*", .target_set = TargetSet.initOne(.nvptx) } },
11774 // __nvvm_ldu_f
11775 .{ .tag = @enumFromInt(3302), .properties = .{ .param_str = "ffC*", .target_set = TargetSet.initOne(.nvptx) } },
11776 // __nvvm_ldu_f2
11777 .{ .tag = @enumFromInt(3303), .properties = .{ .param_str = "E2fE2fC*", .target_set = TargetSet.initOne(.nvptx) } },
11778 // __nvvm_ldu_f4
11779 .{ .tag = @enumFromInt(3304), .properties = .{ .param_str = "E4fE4fC*", .target_set = TargetSet.initOne(.nvptx) } },
11780 // __nvvm_ldu_h
11781 .{ .tag = @enumFromInt(3305), .properties = .{ .param_str = "hhC*", .target_set = TargetSet.initOne(.nvptx) } },
11782 // __nvvm_ldu_h2
11783 .{ .tag = @enumFromInt(3306), .properties = .{ .param_str = "E2hE2hC*", .target_set = TargetSet.initOne(.nvptx) } },
11784 // __nvvm_ldu_i
11785 .{ .tag = @enumFromInt(3307), .properties = .{ .param_str = "iiC*", .target_set = TargetSet.initOne(.nvptx) } },
11786 // __nvvm_ldu_i2
11787 .{ .tag = @enumFromInt(3308), .properties = .{ .param_str = "E2iE2iC*", .target_set = TargetSet.initOne(.nvptx) } },
11788 // __nvvm_ldu_i4
11789 .{ .tag = @enumFromInt(3309), .properties = .{ .param_str = "E4iE4iC*", .target_set = TargetSet.initOne(.nvptx) } },
11790 // __nvvm_ldu_l
11791 .{ .tag = @enumFromInt(3310), .properties = .{ .param_str = "LiLiC*", .target_set = TargetSet.initOne(.nvptx) } },
11792 // __nvvm_ldu_l2
11793 .{ .tag = @enumFromInt(3311), .properties = .{ .param_str = "E2LiE2LiC*", .target_set = TargetSet.initOne(.nvptx) } },
11794 // __nvvm_ldu_ll
11795 .{ .tag = @enumFromInt(3312), .properties = .{ .param_str = "LLiLLiC*", .target_set = TargetSet.initOne(.nvptx) } },
11796 // __nvvm_ldu_ll2
11797 .{ .tag = @enumFromInt(3313), .properties = .{ .param_str = "E2LLiE2LLiC*", .target_set = TargetSet.initOne(.nvptx) } },
11798 // __nvvm_ldu_s
11799 .{ .tag = @enumFromInt(3314), .properties = .{ .param_str = "ssC*", .target_set = TargetSet.initOne(.nvptx) } },
11800 // __nvvm_ldu_s2
11801 .{ .tag = @enumFromInt(3315), .properties = .{ .param_str = "E2sE2sC*", .target_set = TargetSet.initOne(.nvptx) } },
11802 // __nvvm_ldu_s4
11803 .{ .tag = @enumFromInt(3316), .properties = .{ .param_str = "E4sE4sC*", .target_set = TargetSet.initOne(.nvptx) } },
11804 // __nvvm_ldu_sc
11805 .{ .tag = @enumFromInt(3317), .properties = .{ .param_str = "ScScC*", .target_set = TargetSet.initOne(.nvptx) } },
11806 // __nvvm_ldu_sc2
11807 .{ .tag = @enumFromInt(3318), .properties = .{ .param_str = "E2ScE2ScC*", .target_set = TargetSet.initOne(.nvptx) } },
11808 // __nvvm_ldu_sc4
11809 .{ .tag = @enumFromInt(3319), .properties = .{ .param_str = "E4ScE4ScC*", .target_set = TargetSet.initOne(.nvptx) } },
11810 // __nvvm_ldu_uc
11811 .{ .tag = @enumFromInt(3320), .properties = .{ .param_str = "UcUcC*", .target_set = TargetSet.initOne(.nvptx) } },
11812 // __nvvm_ldu_uc2
11813 .{ .tag = @enumFromInt(3321), .properties = .{ .param_str = "E2UcE2UcC*", .target_set = TargetSet.initOne(.nvptx) } },
11814 // __nvvm_ldu_uc4
11815 .{ .tag = @enumFromInt(3322), .properties = .{ .param_str = "E4UcE4UcC*", .target_set = TargetSet.initOne(.nvptx) } },
11816 // __nvvm_ldu_ui
11817 .{ .tag = @enumFromInt(3323), .properties = .{ .param_str = "UiUiC*", .target_set = TargetSet.initOne(.nvptx) } },
11818 // __nvvm_ldu_ui2
11819 .{ .tag = @enumFromInt(3324), .properties = .{ .param_str = "E2UiE2UiC*", .target_set = TargetSet.initOne(.nvptx) } },
11820 // __nvvm_ldu_ui4
11821 .{ .tag = @enumFromInt(3325), .properties = .{ .param_str = "E4UiE4UiC*", .target_set = TargetSet.initOne(.nvptx) } },
11822 // __nvvm_ldu_ul
11823 .{ .tag = @enumFromInt(3326), .properties = .{ .param_str = "ULiULiC*", .target_set = TargetSet.initOne(.nvptx) } },
11824 // __nvvm_ldu_ul2
11825 .{ .tag = @enumFromInt(3327), .properties = .{ .param_str = "E2ULiE2ULiC*", .target_set = TargetSet.initOne(.nvptx) } },
11826 // __nvvm_ldu_ull
11827 .{ .tag = @enumFromInt(3328), .properties = .{ .param_str = "ULLiULLiC*", .target_set = TargetSet.initOne(.nvptx) } },
11828 // __nvvm_ldu_ull2
11829 .{ .tag = @enumFromInt(3329), .properties = .{ .param_str = "E2ULLiE2ULLiC*", .target_set = TargetSet.initOne(.nvptx) } },
11830 // __nvvm_ldu_us
11831 .{ .tag = @enumFromInt(3330), .properties = .{ .param_str = "UsUsC*", .target_set = TargetSet.initOne(.nvptx) } },
11832 // __nvvm_ldu_us2
11833 .{ .tag = @enumFromInt(3331), .properties = .{ .param_str = "E2UsE2UsC*", .target_set = TargetSet.initOne(.nvptx) } },
11834 // __nvvm_ldu_us4
11835 .{ .tag = @enumFromInt(3332), .properties = .{ .param_str = "E4UsE4UsC*", .target_set = TargetSet.initOne(.nvptx) } },
11836 // __nvvm_lg2_approx_d
11837 .{ .tag = @enumFromInt(3333), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.nvptx) } },
11838 // __nvvm_lg2_approx_f
11839 .{ .tag = @enumFromInt(3334), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
11840 // __nvvm_lg2_approx_ftz_f
11841 .{ .tag = @enumFromInt(3335), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
11842 // __nvvm_ll2d_rm
11843 .{ .tag = @enumFromInt(3336), .properties = .{ .param_str = "dLLi", .target_set = TargetSet.initOne(.nvptx) } },
11844 // __nvvm_ll2d_rn
11845 .{ .tag = @enumFromInt(3337), .properties = .{ .param_str = "dLLi", .target_set = TargetSet.initOne(.nvptx) } },
11846 // __nvvm_ll2d_rp
11847 .{ .tag = @enumFromInt(3338), .properties = .{ .param_str = "dLLi", .target_set = TargetSet.initOne(.nvptx) } },
11848 // __nvvm_ll2d_rz
11849 .{ .tag = @enumFromInt(3339), .properties = .{ .param_str = "dLLi", .target_set = TargetSet.initOne(.nvptx) } },
11850 // __nvvm_ll2f_rm
11851 .{ .tag = @enumFromInt(3340), .properties = .{ .param_str = "fLLi", .target_set = TargetSet.initOne(.nvptx) } },
11852 // __nvvm_ll2f_rn
11853 .{ .tag = @enumFromInt(3341), .properties = .{ .param_str = "fLLi", .target_set = TargetSet.initOne(.nvptx) } },
11854 // __nvvm_ll2f_rp
11855 .{ .tag = @enumFromInt(3342), .properties = .{ .param_str = "fLLi", .target_set = TargetSet.initOne(.nvptx) } },
11856 // __nvvm_ll2f_rz
11857 .{ .tag = @enumFromInt(3343), .properties = .{ .param_str = "fLLi", .target_set = TargetSet.initOne(.nvptx) } },
11858 // __nvvm_lohi_i2d
11859 .{ .tag = @enumFromInt(3344), .properties = .{ .param_str = "dii", .target_set = TargetSet.initOne(.nvptx) } },
11860 // __nvvm_membar_cta
11861 .{ .tag = @enumFromInt(3345), .properties = .{ .param_str = "v", .target_set = TargetSet.initOne(.nvptx) } },
11862 // __nvvm_membar_gl
11863 .{ .tag = @enumFromInt(3346), .properties = .{ .param_str = "v", .target_set = TargetSet.initOne(.nvptx) } },
11864 // __nvvm_membar_sys
11865 .{ .tag = @enumFromInt(3347), .properties = .{ .param_str = "v", .target_set = TargetSet.initOne(.nvptx) } },
11866 // __nvvm_memcpy
11867 .{ .tag = @enumFromInt(3348), .properties = .{ .param_str = "vUc*Uc*zi", .target_set = TargetSet.initOne(.nvptx) } },
11868 // __nvvm_memset
11869 .{ .tag = @enumFromInt(3349), .properties = .{ .param_str = "vUc*Uczi", .target_set = TargetSet.initOne(.nvptx) } },
11870 // __nvvm_mul24_i
11871 .{ .tag = @enumFromInt(3350), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.nvptx) } },
11872 // __nvvm_mul24_ui
11873 .{ .tag = @enumFromInt(3351), .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.nvptx) } },
11874 // __nvvm_mul_rm_d
11875 .{ .tag = @enumFromInt(3352), .properties = .{ .param_str = "ddd", .target_set = TargetSet.initOne(.nvptx) } },
11876 // __nvvm_mul_rm_f
11877 .{ .tag = @enumFromInt(3353), .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
11878 // __nvvm_mul_rm_ftz_f
11879 .{ .tag = @enumFromInt(3354), .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
11880 // __nvvm_mul_rn_d
11881 .{ .tag = @enumFromInt(3355), .properties = .{ .param_str = "ddd", .target_set = TargetSet.initOne(.nvptx) } },
11882 // __nvvm_mul_rn_f
11883 .{ .tag = @enumFromInt(3356), .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
11884 // __nvvm_mul_rn_ftz_f
11885 .{ .tag = @enumFromInt(3357), .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
11886 // __nvvm_mul_rp_d
11887 .{ .tag = @enumFromInt(3358), .properties = .{ .param_str = "ddd", .target_set = TargetSet.initOne(.nvptx) } },
11888 // __nvvm_mul_rp_f
11889 .{ .tag = @enumFromInt(3359), .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
11890 // __nvvm_mul_rp_ftz_f
11891 .{ .tag = @enumFromInt(3360), .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
11892 // __nvvm_mul_rz_d
11893 .{ .tag = @enumFromInt(3361), .properties = .{ .param_str = "ddd", .target_set = TargetSet.initOne(.nvptx) } },
11894 // __nvvm_mul_rz_f
11895 .{ .tag = @enumFromInt(3362), .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
11896 // __nvvm_mul_rz_ftz_f
11897 .{ .tag = @enumFromInt(3363), .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
11898 // __nvvm_mulhi_i
11899 .{ .tag = @enumFromInt(3364), .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.nvptx) } },
11900 // __nvvm_mulhi_ll
11901 .{ .tag = @enumFromInt(3365), .properties = .{ .param_str = "LLiLLiLLi", .target_set = TargetSet.initOne(.nvptx) } },
11902 // __nvvm_mulhi_ui
11903 .{ .tag = @enumFromInt(3366), .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.nvptx) } },
11904 // __nvvm_mulhi_ull
11905 .{ .tag = @enumFromInt(3367), .properties = .{ .param_str = "ULLiULLiULLi", .target_set = TargetSet.initOne(.nvptx) } },
11906 // __nvvm_prmt
11907 .{ .tag = @enumFromInt(3368), .properties = .{ .param_str = "UiUiUiUi", .target_set = TargetSet.initOne(.nvptx) } },
11908 // __nvvm_rcp_approx_ftz_d
11909 .{ .tag = @enumFromInt(3369), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.nvptx) } },
11910 // __nvvm_rcp_approx_ftz_f
11911 .{ .tag = @enumFromInt(3370), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
11912 // __nvvm_rcp_rm_d
11913 .{ .tag = @enumFromInt(3371), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.nvptx) } },
11914 // __nvvm_rcp_rm_f
11915 .{ .tag = @enumFromInt(3372), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
11916 // __nvvm_rcp_rm_ftz_f
11917 .{ .tag = @enumFromInt(3373), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
11918 // __nvvm_rcp_rn_d
11919 .{ .tag = @enumFromInt(3374), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.nvptx) } },
11920 // __nvvm_rcp_rn_f
11921 .{ .tag = @enumFromInt(3375), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
11922 // __nvvm_rcp_rn_ftz_f
11923 .{ .tag = @enumFromInt(3376), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
11924 // __nvvm_rcp_rp_d
11925 .{ .tag = @enumFromInt(3377), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.nvptx) } },
11926 // __nvvm_rcp_rp_f
11927 .{ .tag = @enumFromInt(3378), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
11928 // __nvvm_rcp_rp_ftz_f
11929 .{ .tag = @enumFromInt(3379), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
11930 // __nvvm_rcp_rz_d
11931 .{ .tag = @enumFromInt(3380), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.nvptx) } },
11932 // __nvvm_rcp_rz_f
11933 .{ .tag = @enumFromInt(3381), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
11934 // __nvvm_rcp_rz_ftz_f
11935 .{ .tag = @enumFromInt(3382), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
11936 // __nvvm_read_ptx_sreg_clock
11937 .{ .tag = @enumFromInt(3383), .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx) } },
11938 // __nvvm_read_ptx_sreg_clock64
11939 .{ .tag = @enumFromInt(3384), .properties = .{ .param_str = "LLi", .target_set = TargetSet.initOne(.nvptx) } },
11940 // __nvvm_read_ptx_sreg_ctaid_w
11941 .{ .tag = @enumFromInt(3385), .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
11942 // __nvvm_read_ptx_sreg_ctaid_x
11943 .{ .tag = @enumFromInt(3386), .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
11944 // __nvvm_read_ptx_sreg_ctaid_y
11945 .{ .tag = @enumFromInt(3387), .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
11946 // __nvvm_read_ptx_sreg_ctaid_z
11947 .{ .tag = @enumFromInt(3388), .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
11948 // __nvvm_read_ptx_sreg_gridid
11949 .{ .tag = @enumFromInt(3389), .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
11950 // __nvvm_read_ptx_sreg_laneid
11951 .{ .tag = @enumFromInt(3390), .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
11952 // __nvvm_read_ptx_sreg_lanemask_eq
11953 .{ .tag = @enumFromInt(3391), .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
11954 // __nvvm_read_ptx_sreg_lanemask_ge
11955 .{ .tag = @enumFromInt(3392), .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
11956 // __nvvm_read_ptx_sreg_lanemask_gt
11957 .{ .tag = @enumFromInt(3393), .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
11958 // __nvvm_read_ptx_sreg_lanemask_le
11959 .{ .tag = @enumFromInt(3394), .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
11960 // __nvvm_read_ptx_sreg_lanemask_lt
11961 .{ .tag = @enumFromInt(3395), .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
11962 // __nvvm_read_ptx_sreg_nctaid_w
11963 .{ .tag = @enumFromInt(3396), .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
11964 // __nvvm_read_ptx_sreg_nctaid_x
11965 .{ .tag = @enumFromInt(3397), .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
11966 // __nvvm_read_ptx_sreg_nctaid_y
11967 .{ .tag = @enumFromInt(3398), .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
11968 // __nvvm_read_ptx_sreg_nctaid_z
11969 .{ .tag = @enumFromInt(3399), .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
11970 // __nvvm_read_ptx_sreg_nsmid
11971 .{ .tag = @enumFromInt(3400), .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
11972 // __nvvm_read_ptx_sreg_ntid_w
11973 .{ .tag = @enumFromInt(3401), .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
11974 // __nvvm_read_ptx_sreg_ntid_x
11975 .{ .tag = @enumFromInt(3402), .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
11976 // __nvvm_read_ptx_sreg_ntid_y
11977 .{ .tag = @enumFromInt(3403), .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
11978 // __nvvm_read_ptx_sreg_ntid_z
11979 .{ .tag = @enumFromInt(3404), .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
11980 // __nvvm_read_ptx_sreg_nwarpid
11981 .{ .tag = @enumFromInt(3405), .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
11982 // __nvvm_read_ptx_sreg_pm0
11983 .{ .tag = @enumFromInt(3406), .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx) } },
11984 // __nvvm_read_ptx_sreg_pm1
11985 .{ .tag = @enumFromInt(3407), .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx) } },
11986 // __nvvm_read_ptx_sreg_pm2
11987 .{ .tag = @enumFromInt(3408), .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx) } },
11988 // __nvvm_read_ptx_sreg_pm3
11989 .{ .tag = @enumFromInt(3409), .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx) } },
11990 // __nvvm_read_ptx_sreg_smid
11991 .{ .tag = @enumFromInt(3410), .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
11992 // __nvvm_read_ptx_sreg_tid_w
11993 .{ .tag = @enumFromInt(3411), .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
11994 // __nvvm_read_ptx_sreg_tid_x
11995 .{ .tag = @enumFromInt(3412), .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
11996 // __nvvm_read_ptx_sreg_tid_y
11997 .{ .tag = @enumFromInt(3413), .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
11998 // __nvvm_read_ptx_sreg_tid_z
11999 .{ .tag = @enumFromInt(3414), .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
12000 // __nvvm_read_ptx_sreg_warpid
12001 .{ .tag = @enumFromInt(3415), .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
12002 // __nvvm_round_d
12003 .{ .tag = @enumFromInt(3416), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.nvptx) } },
12004 // __nvvm_round_f
12005 .{ .tag = @enumFromInt(3417), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12006 // __nvvm_round_ftz_f
12007 .{ .tag = @enumFromInt(3418), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12008 // __nvvm_rsqrt_approx_d
12009 .{ .tag = @enumFromInt(3419), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.nvptx) } },
12010 // __nvvm_rsqrt_approx_f
12011 .{ .tag = @enumFromInt(3420), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12012 // __nvvm_rsqrt_approx_ftz_f
12013 .{ .tag = @enumFromInt(3421), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12014 // __nvvm_sad_i
12015 .{ .tag = @enumFromInt(3422), .properties = .{ .param_str = "iiii", .target_set = TargetSet.initOne(.nvptx) } },
12016 // __nvvm_sad_ui
12017 .{ .tag = @enumFromInt(3423), .properties = .{ .param_str = "UiUiUiUi", .target_set = TargetSet.initOne(.nvptx) } },
12018 // __nvvm_saturate_d
12019 .{ .tag = @enumFromInt(3424), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.nvptx) } },
12020 // __nvvm_saturate_f
12021 .{ .tag = @enumFromInt(3425), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12022 // __nvvm_saturate_ftz_f
12023 .{ .tag = @enumFromInt(3426), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12024 // __nvvm_shfl_bfly_f32
12025 .{ .tag = @enumFromInt(3427), .properties = .{ .param_str = "ffii", .target_set = TargetSet.initOne(.nvptx) } },
12026 // __nvvm_shfl_bfly_i32
12027 .{ .tag = @enumFromInt(3428), .properties = .{ .param_str = "iiii", .target_set = TargetSet.initOne(.nvptx) } },
12028 // __nvvm_shfl_down_f32
12029 .{ .tag = @enumFromInt(3429), .properties = .{ .param_str = "ffii", .target_set = TargetSet.initOne(.nvptx) } },
12030 // __nvvm_shfl_down_i32
12031 .{ .tag = @enumFromInt(3430), .properties = .{ .param_str = "iiii", .target_set = TargetSet.initOne(.nvptx) } },
12032 // __nvvm_shfl_idx_f32
12033 .{ .tag = @enumFromInt(3431), .properties = .{ .param_str = "ffii", .target_set = TargetSet.initOne(.nvptx) } },
12034 // __nvvm_shfl_idx_i32
12035 .{ .tag = @enumFromInt(3432), .properties = .{ .param_str = "iiii", .target_set = TargetSet.initOne(.nvptx) } },
12036 // __nvvm_shfl_up_f32
12037 .{ .tag = @enumFromInt(3433), .properties = .{ .param_str = "ffii", .target_set = TargetSet.initOne(.nvptx) } },
12038 // __nvvm_shfl_up_i32
12039 .{ .tag = @enumFromInt(3434), .properties = .{ .param_str = "iiii", .target_set = TargetSet.initOne(.nvptx) } },
12040 // __nvvm_sin_approx_f
12041 .{ .tag = @enumFromInt(3435), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12042 // __nvvm_sin_approx_ftz_f
12043 .{ .tag = @enumFromInt(3436), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12044 // __nvvm_sqrt_approx_f
12045 .{ .tag = @enumFromInt(3437), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12046 // __nvvm_sqrt_approx_ftz_f
12047 .{ .tag = @enumFromInt(3438), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12048 // __nvvm_sqrt_rm_d
12049 .{ .tag = @enumFromInt(3439), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.nvptx) } },
12050 // __nvvm_sqrt_rm_f
12051 .{ .tag = @enumFromInt(3440), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12052 // __nvvm_sqrt_rm_ftz_f
12053 .{ .tag = @enumFromInt(3441), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12054 // __nvvm_sqrt_rn_d
12055 .{ .tag = @enumFromInt(3442), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.nvptx) } },
12056 // __nvvm_sqrt_rn_f
12057 .{ .tag = @enumFromInt(3443), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12058 // __nvvm_sqrt_rn_ftz_f
12059 .{ .tag = @enumFromInt(3444), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12060 // __nvvm_sqrt_rp_d
12061 .{ .tag = @enumFromInt(3445), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.nvptx) } },
12062 // __nvvm_sqrt_rp_f
12063 .{ .tag = @enumFromInt(3446), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12064 // __nvvm_sqrt_rp_ftz_f
12065 .{ .tag = @enumFromInt(3447), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12066 // __nvvm_sqrt_rz_d
12067 .{ .tag = @enumFromInt(3448), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.nvptx) } },
12068 // __nvvm_sqrt_rz_f
12069 .{ .tag = @enumFromInt(3449), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12070 // __nvvm_sqrt_rz_ftz_f
12071 .{ .tag = @enumFromInt(3450), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12072 // __nvvm_trunc_d
12073 .{ .tag = @enumFromInt(3451), .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.nvptx) } },
12074 // __nvvm_trunc_f
12075 .{ .tag = @enumFromInt(3452), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12076 // __nvvm_trunc_ftz_f
12077 .{ .tag = @enumFromInt(3453), .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12078 // __nvvm_ui2d_rm
12079 .{ .tag = @enumFromInt(3454), .properties = .{ .param_str = "dUi", .target_set = TargetSet.initOne(.nvptx) } },
12080 // __nvvm_ui2d_rn
12081 .{ .tag = @enumFromInt(3455), .properties = .{ .param_str = "dUi", .target_set = TargetSet.initOne(.nvptx) } },
12082 // __nvvm_ui2d_rp
12083 .{ .tag = @enumFromInt(3456), .properties = .{ .param_str = "dUi", .target_set = TargetSet.initOne(.nvptx) } },
12084 // __nvvm_ui2d_rz
12085 .{ .tag = @enumFromInt(3457), .properties = .{ .param_str = "dUi", .target_set = TargetSet.initOne(.nvptx) } },
12086 // __nvvm_ui2f_rm
12087 .{ .tag = @enumFromInt(3458), .properties = .{ .param_str = "fUi", .target_set = TargetSet.initOne(.nvptx) } },
12088 // __nvvm_ui2f_rn
12089 .{ .tag = @enumFromInt(3459), .properties = .{ .param_str = "fUi", .target_set = TargetSet.initOne(.nvptx) } },
12090 // __nvvm_ui2f_rp
12091 .{ .tag = @enumFromInt(3460), .properties = .{ .param_str = "fUi", .target_set = TargetSet.initOne(.nvptx) } },
12092 // __nvvm_ui2f_rz
12093 .{ .tag = @enumFromInt(3461), .properties = .{ .param_str = "fUi", .target_set = TargetSet.initOne(.nvptx) } },
12094 // __nvvm_ull2d_rm
12095 .{ .tag = @enumFromInt(3462), .properties = .{ .param_str = "dULLi", .target_set = TargetSet.initOne(.nvptx) } },
12096 // __nvvm_ull2d_rn
12097 .{ .tag = @enumFromInt(3463), .properties = .{ .param_str = "dULLi", .target_set = TargetSet.initOne(.nvptx) } },
12098 // __nvvm_ull2d_rp
12099 .{ .tag = @enumFromInt(3464), .properties = .{ .param_str = "dULLi", .target_set = TargetSet.initOne(.nvptx) } },
12100 // __nvvm_ull2d_rz
12101 .{ .tag = @enumFromInt(3465), .properties = .{ .param_str = "dULLi", .target_set = TargetSet.initOne(.nvptx) } },
12102 // __nvvm_ull2f_rm
12103 .{ .tag = @enumFromInt(3466), .properties = .{ .param_str = "fULLi", .target_set = TargetSet.initOne(.nvptx) } },
12104 // __nvvm_ull2f_rn
12105 .{ .tag = @enumFromInt(3467), .properties = .{ .param_str = "fULLi", .target_set = TargetSet.initOne(.nvptx) } },
12106 // __nvvm_ull2f_rp
12107 .{ .tag = @enumFromInt(3468), .properties = .{ .param_str = "fULLi", .target_set = TargetSet.initOne(.nvptx) } },
12108 // __nvvm_ull2f_rz
12109 .{ .tag = @enumFromInt(3469), .properties = .{ .param_str = "fULLi", .target_set = TargetSet.initOne(.nvptx) } },
12110 // __nvvm_vote_all
12111 .{ .tag = @enumFromInt(3470), .properties = .{ .param_str = "bb", .target_set = TargetSet.initOne(.nvptx) } },
12112 // __nvvm_vote_any
12113 .{ .tag = @enumFromInt(3471), .properties = .{ .param_str = "bb", .target_set = TargetSet.initOne(.nvptx) } },
12114 // __nvvm_vote_ballot
12115 .{ .tag = @enumFromInt(3472), .properties = .{ .param_str = "Uib", .target_set = TargetSet.initOne(.nvptx) } },
12116 // __nvvm_vote_uni
12117 .{ .tag = @enumFromInt(3473), .properties = .{ .param_str = "bb", .target_set = TargetSet.initOne(.nvptx) } },
12118 // __popcnt
12119 .{ .tag = @enumFromInt(3474), .properties = .{ .param_str = "UiUi", .language = .all_ms_languages, .attributes = .{ .@"const" = true, .const_evaluable = true } } },
12120 // __popcnt16
12121 .{ .tag = @enumFromInt(3475), .properties = .{ .param_str = "UsUs", .language = .all_ms_languages, .attributes = .{ .@"const" = true, .const_evaluable = true } } },
12122 // __popcnt64
12123 .{ .tag = @enumFromInt(3476), .properties = .{ .param_str = "UWiUWi", .language = .all_ms_languages, .attributes = .{ .@"const" = true, .const_evaluable = true } } },
12124 // __rdtsc
12125 .{ .tag = @enumFromInt(3477), .properties = .{ .param_str = "UOi", .target_set = TargetSet.initOne(.x86) } },
12126 // __sev
12127 .{ .tag = @enumFromInt(3478), .properties = .{ .param_str = "v", .language = .all_ms_languages, .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) } },
12128 // __sevl
12129 .{ .tag = @enumFromInt(3479), .properties = .{ .param_str = "v", .language = .all_ms_languages, .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) } },
12130 // __sigsetjmp
12131 .{ .tag = @enumFromInt(3480), .properties = .{ .param_str = "iSJi", .header = .setjmp, .attributes = .{ .allow_type_mismatch = true, .lib_function_without_prefix = true, .returns_twice = true } } },
12132 // __sinpi
12133 .{ .tag = @enumFromInt(3481), .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12134 // __sinpif
12135 .{ .tag = @enumFromInt(3482), .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12136 // __sync_add_and_fetch
12137 .{ .tag = @enumFromInt(3483), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12138 // __sync_add_and_fetch_1
12139 .{ .tag = @enumFromInt(3484), .properties = .{ .param_str = "ccD*c.", .attributes = .{ .custom_typecheck = true } } },
12140 // __sync_add_and_fetch_16
12141 .{ .tag = @enumFromInt(3485), .properties = .{ .param_str = "LLLiLLLiD*LLLi.", .attributes = .{ .custom_typecheck = true } } },
12142 // __sync_add_and_fetch_2
12143 .{ .tag = @enumFromInt(3486), .properties = .{ .param_str = "ssD*s.", .attributes = .{ .custom_typecheck = true } } },
12144 // __sync_add_and_fetch_4
12145 .{ .tag = @enumFromInt(3487), .properties = .{ .param_str = "iiD*i.", .attributes = .{ .custom_typecheck = true } } },
12146 // __sync_add_and_fetch_8
12147 .{ .tag = @enumFromInt(3488), .properties = .{ .param_str = "LLiLLiD*LLi.", .attributes = .{ .custom_typecheck = true } } },
12148 // __sync_and_and_fetch
12149 .{ .tag = @enumFromInt(3489), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12150 // __sync_and_and_fetch_1
12151 .{ .tag = @enumFromInt(3490), .properties = .{ .param_str = "ccD*c.", .attributes = .{ .custom_typecheck = true } } },
12152 // __sync_and_and_fetch_16
12153 .{ .tag = @enumFromInt(3491), .properties = .{ .param_str = "LLLiLLLiD*LLLi.", .attributes = .{ .custom_typecheck = true } } },
12154 // __sync_and_and_fetch_2
12155 .{ .tag = @enumFromInt(3492), .properties = .{ .param_str = "ssD*s.", .attributes = .{ .custom_typecheck = true } } },
12156 // __sync_and_and_fetch_4
12157 .{ .tag = @enumFromInt(3493), .properties = .{ .param_str = "iiD*i.", .attributes = .{ .custom_typecheck = true } } },
12158 // __sync_and_and_fetch_8
12159 .{ .tag = @enumFromInt(3494), .properties = .{ .param_str = "LLiLLiD*LLi.", .attributes = .{ .custom_typecheck = true } } },
12160 // __sync_bool_compare_and_swap
12161 .{ .tag = @enumFromInt(3495), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12162 // __sync_bool_compare_and_swap_1
12163 .{ .tag = @enumFromInt(3496), .properties = .{ .param_str = "bcD*cc.", .attributes = .{ .custom_typecheck = true } } },
12164 // __sync_bool_compare_and_swap_16
12165 .{ .tag = @enumFromInt(3497), .properties = .{ .param_str = "bLLLiD*LLLiLLLi.", .attributes = .{ .custom_typecheck = true } } },
12166 // __sync_bool_compare_and_swap_2
12167 .{ .tag = @enumFromInt(3498), .properties = .{ .param_str = "bsD*ss.", .attributes = .{ .custom_typecheck = true } } },
12168 // __sync_bool_compare_and_swap_4
12169 .{ .tag = @enumFromInt(3499), .properties = .{ .param_str = "biD*ii.", .attributes = .{ .custom_typecheck = true } } },
12170 // __sync_bool_compare_and_swap_8
12171 .{ .tag = @enumFromInt(3500), .properties = .{ .param_str = "bLLiD*LLiLLi.", .attributes = .{ .custom_typecheck = true } } },
12172 // __sync_fetch_and_add
12173 .{ .tag = @enumFromInt(3501), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12174 // __sync_fetch_and_add_1
12175 .{ .tag = @enumFromInt(3502), .properties = .{ .param_str = "ccD*c.", .attributes = .{ .custom_typecheck = true } } },
12176 // __sync_fetch_and_add_16
12177 .{ .tag = @enumFromInt(3503), .properties = .{ .param_str = "LLLiLLLiD*LLLi.", .attributes = .{ .custom_typecheck = true } } },
12178 // __sync_fetch_and_add_2
12179 .{ .tag = @enumFromInt(3504), .properties = .{ .param_str = "ssD*s.", .attributes = .{ .custom_typecheck = true } } },
12180 // __sync_fetch_and_add_4
12181 .{ .tag = @enumFromInt(3505), .properties = .{ .param_str = "iiD*i.", .attributes = .{ .custom_typecheck = true } } },
12182 // __sync_fetch_and_add_8
12183 .{ .tag = @enumFromInt(3506), .properties = .{ .param_str = "LLiLLiD*LLi.", .attributes = .{ .custom_typecheck = true } } },
12184 // __sync_fetch_and_and
12185 .{ .tag = @enumFromInt(3507), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12186 // __sync_fetch_and_and_1
12187 .{ .tag = @enumFromInt(3508), .properties = .{ .param_str = "ccD*c.", .attributes = .{ .custom_typecheck = true } } },
12188 // __sync_fetch_and_and_16
12189 .{ .tag = @enumFromInt(3509), .properties = .{ .param_str = "LLLiLLLiD*LLLi.", .attributes = .{ .custom_typecheck = true } } },
12190 // __sync_fetch_and_and_2
12191 .{ .tag = @enumFromInt(3510), .properties = .{ .param_str = "ssD*s.", .attributes = .{ .custom_typecheck = true } } },
12192 // __sync_fetch_and_and_4
12193 .{ .tag = @enumFromInt(3511), .properties = .{ .param_str = "iiD*i.", .attributes = .{ .custom_typecheck = true } } },
12194 // __sync_fetch_and_and_8
12195 .{ .tag = @enumFromInt(3512), .properties = .{ .param_str = "LLiLLiD*LLi.", .attributes = .{ .custom_typecheck = true } } },
12196 // __sync_fetch_and_max
12197 .{ .tag = @enumFromInt(3513), .properties = .{ .param_str = "iiD*i" } },
12198 // __sync_fetch_and_min
12199 .{ .tag = @enumFromInt(3514), .properties = .{ .param_str = "iiD*i" } },
12200 // __sync_fetch_and_nand
12201 .{ .tag = @enumFromInt(3515), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12202 // __sync_fetch_and_nand_1
12203 .{ .tag = @enumFromInt(3516), .properties = .{ .param_str = "ccD*c.", .attributes = .{ .custom_typecheck = true } } },
12204 // __sync_fetch_and_nand_16
12205 .{ .tag = @enumFromInt(3517), .properties = .{ .param_str = "LLLiLLLiD*LLLi.", .attributes = .{ .custom_typecheck = true } } },
12206 // __sync_fetch_and_nand_2
12207 .{ .tag = @enumFromInt(3518), .properties = .{ .param_str = "ssD*s.", .attributes = .{ .custom_typecheck = true } } },
12208 // __sync_fetch_and_nand_4
12209 .{ .tag = @enumFromInt(3519), .properties = .{ .param_str = "iiD*i.", .attributes = .{ .custom_typecheck = true } } },
12210 // __sync_fetch_and_nand_8
12211 .{ .tag = @enumFromInt(3520), .properties = .{ .param_str = "LLiLLiD*LLi.", .attributes = .{ .custom_typecheck = true } } },
12212 // __sync_fetch_and_or
12213 .{ .tag = @enumFromInt(3521), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12214 // __sync_fetch_and_or_1
12215 .{ .tag = @enumFromInt(3522), .properties = .{ .param_str = "ccD*c.", .attributes = .{ .custom_typecheck = true } } },
12216 // __sync_fetch_and_or_16
12217 .{ .tag = @enumFromInt(3523), .properties = .{ .param_str = "LLLiLLLiD*LLLi.", .attributes = .{ .custom_typecheck = true } } },
12218 // __sync_fetch_and_or_2
12219 .{ .tag = @enumFromInt(3524), .properties = .{ .param_str = "ssD*s.", .attributes = .{ .custom_typecheck = true } } },
12220 // __sync_fetch_and_or_4
12221 .{ .tag = @enumFromInt(3525), .properties = .{ .param_str = "iiD*i.", .attributes = .{ .custom_typecheck = true } } },
12222 // __sync_fetch_and_or_8
12223 .{ .tag = @enumFromInt(3526), .properties = .{ .param_str = "LLiLLiD*LLi.", .attributes = .{ .custom_typecheck = true } } },
12224 // __sync_fetch_and_sub
12225 .{ .tag = @enumFromInt(3527), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12226 // __sync_fetch_and_sub_1
12227 .{ .tag = @enumFromInt(3528), .properties = .{ .param_str = "ccD*c.", .attributes = .{ .custom_typecheck = true } } },
12228 // __sync_fetch_and_sub_16
12229 .{ .tag = @enumFromInt(3529), .properties = .{ .param_str = "LLLiLLLiD*LLLi.", .attributes = .{ .custom_typecheck = true } } },
12230 // __sync_fetch_and_sub_2
12231 .{ .tag = @enumFromInt(3530), .properties = .{ .param_str = "ssD*s.", .attributes = .{ .custom_typecheck = true } } },
12232 // __sync_fetch_and_sub_4
12233 .{ .tag = @enumFromInt(3531), .properties = .{ .param_str = "iiD*i.", .attributes = .{ .custom_typecheck = true } } },
12234 // __sync_fetch_and_sub_8
12235 .{ .tag = @enumFromInt(3532), .properties = .{ .param_str = "LLiLLiD*LLi.", .attributes = .{ .custom_typecheck = true } } },
12236 // __sync_fetch_and_umax
12237 .{ .tag = @enumFromInt(3533), .properties = .{ .param_str = "UiUiD*Ui" } },
12238 // __sync_fetch_and_umin
12239 .{ .tag = @enumFromInt(3534), .properties = .{ .param_str = "UiUiD*Ui" } },
12240 // __sync_fetch_and_xor
12241 .{ .tag = @enumFromInt(3535), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12242 // __sync_fetch_and_xor_1
12243 .{ .tag = @enumFromInt(3536), .properties = .{ .param_str = "ccD*c.", .attributes = .{ .custom_typecheck = true } } },
12244 // __sync_fetch_and_xor_16
12245 .{ .tag = @enumFromInt(3537), .properties = .{ .param_str = "LLLiLLLiD*LLLi.", .attributes = .{ .custom_typecheck = true } } },
12246 // __sync_fetch_and_xor_2
12247 .{ .tag = @enumFromInt(3538), .properties = .{ .param_str = "ssD*s.", .attributes = .{ .custom_typecheck = true } } },
12248 // __sync_fetch_and_xor_4
12249 .{ .tag = @enumFromInt(3539), .properties = .{ .param_str = "iiD*i.", .attributes = .{ .custom_typecheck = true } } },
12250 // __sync_fetch_and_xor_8
12251 .{ .tag = @enumFromInt(3540), .properties = .{ .param_str = "LLiLLiD*LLi.", .attributes = .{ .custom_typecheck = true } } },
12252 // __sync_lock_release
12253 .{ .tag = @enumFromInt(3541), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12254 // __sync_lock_release_1
12255 .{ .tag = @enumFromInt(3542), .properties = .{ .param_str = "vcD*.", .attributes = .{ .custom_typecheck = true } } },
12256 // __sync_lock_release_16
12257 .{ .tag = @enumFromInt(3543), .properties = .{ .param_str = "vLLLiD*.", .attributes = .{ .custom_typecheck = true } } },
12258 // __sync_lock_release_2
12259 .{ .tag = @enumFromInt(3544), .properties = .{ .param_str = "vsD*.", .attributes = .{ .custom_typecheck = true } } },
12260 // __sync_lock_release_4
12261 .{ .tag = @enumFromInt(3545), .properties = .{ .param_str = "viD*.", .attributes = .{ .custom_typecheck = true } } },
12262 // __sync_lock_release_8
12263 .{ .tag = @enumFromInt(3546), .properties = .{ .param_str = "vLLiD*.", .attributes = .{ .custom_typecheck = true } } },
12264 // __sync_lock_test_and_set
12265 .{ .tag = @enumFromInt(3547), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12266 // __sync_lock_test_and_set_1
12267 .{ .tag = @enumFromInt(3548), .properties = .{ .param_str = "ccD*c.", .attributes = .{ .custom_typecheck = true } } },
12268 // __sync_lock_test_and_set_16
12269 .{ .tag = @enumFromInt(3549), .properties = .{ .param_str = "LLLiLLLiD*LLLi.", .attributes = .{ .custom_typecheck = true } } },
12270 // __sync_lock_test_and_set_2
12271 .{ .tag = @enumFromInt(3550), .properties = .{ .param_str = "ssD*s.", .attributes = .{ .custom_typecheck = true } } },
12272 // __sync_lock_test_and_set_4
12273 .{ .tag = @enumFromInt(3551), .properties = .{ .param_str = "iiD*i.", .attributes = .{ .custom_typecheck = true } } },
12274 // __sync_lock_test_and_set_8
12275 .{ .tag = @enumFromInt(3552), .properties = .{ .param_str = "LLiLLiD*LLi.", .attributes = .{ .custom_typecheck = true } } },
12276 // __sync_nand_and_fetch
12277 .{ .tag = @enumFromInt(3553), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12278 // __sync_nand_and_fetch_1
12279 .{ .tag = @enumFromInt(3554), .properties = .{ .param_str = "ccD*c.", .attributes = .{ .custom_typecheck = true } } },
12280 // __sync_nand_and_fetch_16
12281 .{ .tag = @enumFromInt(3555), .properties = .{ .param_str = "LLLiLLLiD*LLLi.", .attributes = .{ .custom_typecheck = true } } },
12282 // __sync_nand_and_fetch_2
12283 .{ .tag = @enumFromInt(3556), .properties = .{ .param_str = "ssD*s.", .attributes = .{ .custom_typecheck = true } } },
12284 // __sync_nand_and_fetch_4
12285 .{ .tag = @enumFromInt(3557), .properties = .{ .param_str = "iiD*i.", .attributes = .{ .custom_typecheck = true } } },
12286 // __sync_nand_and_fetch_8
12287 .{ .tag = @enumFromInt(3558), .properties = .{ .param_str = "LLiLLiD*LLi.", .attributes = .{ .custom_typecheck = true } } },
12288 // __sync_or_and_fetch
12289 .{ .tag = @enumFromInt(3559), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12290 // __sync_or_and_fetch_1
12291 .{ .tag = @enumFromInt(3560), .properties = .{ .param_str = "ccD*c.", .attributes = .{ .custom_typecheck = true } } },
12292 // __sync_or_and_fetch_16
12293 .{ .tag = @enumFromInt(3561), .properties = .{ .param_str = "LLLiLLLiD*LLLi.", .attributes = .{ .custom_typecheck = true } } },
12294 // __sync_or_and_fetch_2
12295 .{ .tag = @enumFromInt(3562), .properties = .{ .param_str = "ssD*s.", .attributes = .{ .custom_typecheck = true } } },
12296 // __sync_or_and_fetch_4
12297 .{ .tag = @enumFromInt(3563), .properties = .{ .param_str = "iiD*i.", .attributes = .{ .custom_typecheck = true } } },
12298 // __sync_or_and_fetch_8
12299 .{ .tag = @enumFromInt(3564), .properties = .{ .param_str = "LLiLLiD*LLi.", .attributes = .{ .custom_typecheck = true } } },
12300 // __sync_sub_and_fetch
12301 .{ .tag = @enumFromInt(3565), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12302 // __sync_sub_and_fetch_1
12303 .{ .tag = @enumFromInt(3566), .properties = .{ .param_str = "ccD*c.", .attributes = .{ .custom_typecheck = true } } },
12304 // __sync_sub_and_fetch_16
12305 .{ .tag = @enumFromInt(3567), .properties = .{ .param_str = "LLLiLLLiD*LLLi.", .attributes = .{ .custom_typecheck = true } } },
12306 // __sync_sub_and_fetch_2
12307 .{ .tag = @enumFromInt(3568), .properties = .{ .param_str = "ssD*s.", .attributes = .{ .custom_typecheck = true } } },
12308 // __sync_sub_and_fetch_4
12309 .{ .tag = @enumFromInt(3569), .properties = .{ .param_str = "iiD*i.", .attributes = .{ .custom_typecheck = true } } },
12310 // __sync_sub_and_fetch_8
12311 .{ .tag = @enumFromInt(3570), .properties = .{ .param_str = "LLiLLiD*LLi.", .attributes = .{ .custom_typecheck = true } } },
12312 // __sync_swap
12313 .{ .tag = @enumFromInt(3571), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12314 // __sync_swap_1
12315 .{ .tag = @enumFromInt(3572), .properties = .{ .param_str = "ccD*c.", .attributes = .{ .custom_typecheck = true } } },
12316 // __sync_swap_16
12317 .{ .tag = @enumFromInt(3573), .properties = .{ .param_str = "LLLiLLLiD*LLLi.", .attributes = .{ .custom_typecheck = true } } },
12318 // __sync_swap_2
12319 .{ .tag = @enumFromInt(3574), .properties = .{ .param_str = "ssD*s.", .attributes = .{ .custom_typecheck = true } } },
12320 // __sync_swap_4
12321 .{ .tag = @enumFromInt(3575), .properties = .{ .param_str = "iiD*i.", .attributes = .{ .custom_typecheck = true } } },
12322 // __sync_swap_8
12323 .{ .tag = @enumFromInt(3576), .properties = .{ .param_str = "LLiLLiD*LLi.", .attributes = .{ .custom_typecheck = true } } },
12324 // __sync_synchronize
12325 .{ .tag = @enumFromInt(3577), .properties = .{ .param_str = "v" } },
12326 // __sync_val_compare_and_swap
12327 .{ .tag = @enumFromInt(3578), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12328 // __sync_val_compare_and_swap_1
12329 .{ .tag = @enumFromInt(3579), .properties = .{ .param_str = "ccD*cc.", .attributes = .{ .custom_typecheck = true } } },
12330 // __sync_val_compare_and_swap_16
12331 .{ .tag = @enumFromInt(3580), .properties = .{ .param_str = "LLLiLLLiD*LLLiLLLi.", .attributes = .{ .custom_typecheck = true } } },
12332 // __sync_val_compare_and_swap_2
12333 .{ .tag = @enumFromInt(3581), .properties = .{ .param_str = "ssD*ss.", .attributes = .{ .custom_typecheck = true } } },
12334 // __sync_val_compare_and_swap_4
12335 .{ .tag = @enumFromInt(3582), .properties = .{ .param_str = "iiD*ii.", .attributes = .{ .custom_typecheck = true } } },
12336 // __sync_val_compare_and_swap_8
12337 .{ .tag = @enumFromInt(3583), .properties = .{ .param_str = "LLiLLiD*LLiLLi.", .attributes = .{ .custom_typecheck = true } } },
12338 // __sync_xor_and_fetch
12339 .{ .tag = @enumFromInt(3584), .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12340 // __sync_xor_and_fetch_1
12341 .{ .tag = @enumFromInt(3585), .properties = .{ .param_str = "ccD*c.", .attributes = .{ .custom_typecheck = true } } },
12342 // __sync_xor_and_fetch_16
12343 .{ .tag = @enumFromInt(3586), .properties = .{ .param_str = "LLLiLLLiD*LLLi.", .attributes = .{ .custom_typecheck = true } } },
12344 // __sync_xor_and_fetch_2
12345 .{ .tag = @enumFromInt(3587), .properties = .{ .param_str = "ssD*s.", .attributes = .{ .custom_typecheck = true } } },
12346 // __sync_xor_and_fetch_4
12347 .{ .tag = @enumFromInt(3588), .properties = .{ .param_str = "iiD*i.", .attributes = .{ .custom_typecheck = true } } },
12348 // __sync_xor_and_fetch_8
12349 .{ .tag = @enumFromInt(3589), .properties = .{ .param_str = "LLiLLiD*LLi.", .attributes = .{ .custom_typecheck = true } } },
12350 // __syncthreads
12351 .{ .tag = @enumFromInt(3590), .properties = .{ .param_str = "v", .target_set = TargetSet.initOne(.nvptx) } },
12352 // __tanpi
12353 .{ .tag = @enumFromInt(3591), .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12354 // __tanpif
12355 .{ .tag = @enumFromInt(3592), .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12356 // __va_start
12357 .{ .tag = @enumFromInt(3593), .properties = .{ .param_str = "vc**.", .language = .all_ms_languages, .attributes = .{ .custom_typecheck = true } } },
12358 // __warn_memset_zero_len
12359 .{ .tag = @enumFromInt(3594), .properties = .{ .param_str = "v", .attributes = .{ .pure = true } } },
12360 // __wfe
12361 .{ .tag = @enumFromInt(3595), .properties = .{ .param_str = "v", .language = .all_ms_languages, .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) } },
12362 // __wfi
12363 .{ .tag = @enumFromInt(3596), .properties = .{ .param_str = "v", .language = .all_ms_languages, .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) } },
12364 // __xray_customevent
12365 .{ .tag = @enumFromInt(3597), .properties = .{ .param_str = "vcC*z" } },
12366 // __xray_typedevent
12367 .{ .tag = @enumFromInt(3598), .properties = .{ .param_str = "vzcC*z" } },
12368 // __yield
12369 .{ .tag = @enumFromInt(3599), .properties = .{ .param_str = "v", .language = .all_ms_languages, .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) } },
12370 // _abnormal_termination
12371 .{ .tag = @enumFromInt(3600), .properties = .{ .param_str = "i", .language = .all_ms_languages } },
12372 // _alloca
12373 .{ .tag = @enumFromInt(3601), .properties = .{ .param_str = "v*z", .language = .all_ms_languages } },
12374 // _bittest
12375 .{ .tag = @enumFromInt(3602), .properties = .{ .param_str = "UcNiC*Ni", .language = .all_ms_languages } },
12376 // _bittest64
12377 .{ .tag = @enumFromInt(3603), .properties = .{ .param_str = "UcWiC*Wi", .language = .all_ms_languages } },
12378 // _bittestandcomplement
12379 .{ .tag = @enumFromInt(3604), .properties = .{ .param_str = "UcNi*Ni", .language = .all_ms_languages } },
12380 // _bittestandcomplement64
12381 .{ .tag = @enumFromInt(3605), .properties = .{ .param_str = "UcWi*Wi", .language = .all_ms_languages } },
12382 // _bittestandreset
12383 .{ .tag = @enumFromInt(3606), .properties = .{ .param_str = "UcNi*Ni", .language = .all_ms_languages } },
12384 // _bittestandreset64
12385 .{ .tag = @enumFromInt(3607), .properties = .{ .param_str = "UcWi*Wi", .language = .all_ms_languages } },
12386 // _bittestandset
12387 .{ .tag = @enumFromInt(3608), .properties = .{ .param_str = "UcNi*Ni", .language = .all_ms_languages } },
12388 // _bittestandset64
12389 .{ .tag = @enumFromInt(3609), .properties = .{ .param_str = "UcWi*Wi", .language = .all_ms_languages } },
12390 // _byteswap_uint64
12391 .{ .tag = @enumFromInt(3610), .properties = .{ .param_str = "ULLiULLi", .header = .stdlib, .language = .all_ms_languages, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12392 // _byteswap_ulong
12393 .{ .tag = @enumFromInt(3611), .properties = .{ .param_str = "UNiUNi", .header = .stdlib, .language = .all_ms_languages, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12394 // _byteswap_ushort
12395 .{ .tag = @enumFromInt(3612), .properties = .{ .param_str = "UsUs", .header = .stdlib, .language = .all_ms_languages, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12396 // _exception_code
12397 .{ .tag = @enumFromInt(3613), .properties = .{ .param_str = "UNi", .language = .all_ms_languages } },
12398 // _exception_info
12399 .{ .tag = @enumFromInt(3614), .properties = .{ .param_str = "v*", .language = .all_ms_languages } },
12400 // _exit
12401 .{ .tag = @enumFromInt(3615), .properties = .{ .param_str = "vi", .header = .unistd, .language = .all_gnu_languages, .attributes = .{ .noreturn = true, .lib_function_without_prefix = true } } },
12402 // _interlockedbittestandreset
12403 .{ .tag = @enumFromInt(3616), .properties = .{ .param_str = "UcNiD*Ni", .language = .all_ms_languages } },
12404 // _interlockedbittestandreset64
12405 .{ .tag = @enumFromInt(3617), .properties = .{ .param_str = "UcWiD*Wi", .language = .all_ms_languages } },
12406 // _interlockedbittestandreset_acq
12407 .{ .tag = @enumFromInt(3618), .properties = .{ .param_str = "UcNiD*Ni", .language = .all_ms_languages } },
12408 // _interlockedbittestandreset_nf
12409 .{ .tag = @enumFromInt(3619), .properties = .{ .param_str = "UcNiD*Ni", .language = .all_ms_languages } },
12410 // _interlockedbittestandreset_rel
12411 .{ .tag = @enumFromInt(3620), .properties = .{ .param_str = "UcNiD*Ni", .language = .all_ms_languages } },
12412 // _interlockedbittestandset
12413 .{ .tag = @enumFromInt(3621), .properties = .{ .param_str = "UcNiD*Ni", .language = .all_ms_languages } },
12414 // _interlockedbittestandset64
12415 .{ .tag = @enumFromInt(3622), .properties = .{ .param_str = "UcWiD*Wi", .language = .all_ms_languages } },
12416 // _interlockedbittestandset_acq
12417 .{ .tag = @enumFromInt(3623), .properties = .{ .param_str = "UcNiD*Ni", .language = .all_ms_languages } },
12418 // _interlockedbittestandset_nf
12419 .{ .tag = @enumFromInt(3624), .properties = .{ .param_str = "UcNiD*Ni", .language = .all_ms_languages } },
12420 // _interlockedbittestandset_rel
12421 .{ .tag = @enumFromInt(3625), .properties = .{ .param_str = "UcNiD*Ni", .language = .all_ms_languages } },
12422 // _longjmp
12423 .{ .tag = @enumFromInt(3626), .properties = .{ .param_str = "vJi", .header = .setjmp, .language = .all_gnu_languages, .attributes = .{ .noreturn = true, .allow_type_mismatch = true, .lib_function_without_prefix = true } } },
12424 // _lrotl
12425 .{ .tag = @enumFromInt(3627), .properties = .{ .param_str = "ULiULii", .language = .all_ms_languages, .attributes = .{ .const_evaluable = true } } },
12426 // _lrotr
12427 .{ .tag = @enumFromInt(3628), .properties = .{ .param_str = "ULiULii", .language = .all_ms_languages, .attributes = .{ .const_evaluable = true } } },
12428 // _rotl
12429 .{ .tag = @enumFromInt(3629), .properties = .{ .param_str = "UiUii", .language = .all_ms_languages, .attributes = .{ .const_evaluable = true } } },
12430 // _rotl16
12431 .{ .tag = @enumFromInt(3630), .properties = .{ .param_str = "UsUsUc", .language = .all_ms_languages, .attributes = .{ .const_evaluable = true } } },
12432 // _rotl64
12433 .{ .tag = @enumFromInt(3631), .properties = .{ .param_str = "UWiUWii", .language = .all_ms_languages, .attributes = .{ .const_evaluable = true } } },
12434 // _rotl8
12435 .{ .tag = @enumFromInt(3632), .properties = .{ .param_str = "UcUcUc", .language = .all_ms_languages, .attributes = .{ .const_evaluable = true } } },
12436 // _rotr
12437 .{ .tag = @enumFromInt(3633), .properties = .{ .param_str = "UiUii", .language = .all_ms_languages, .attributes = .{ .const_evaluable = true } } },
12438 // _rotr16
12439 .{ .tag = @enumFromInt(3634), .properties = .{ .param_str = "UsUsUc", .language = .all_ms_languages, .attributes = .{ .const_evaluable = true } } },
12440 // _rotr64
12441 .{ .tag = @enumFromInt(3635), .properties = .{ .param_str = "UWiUWii", .language = .all_ms_languages, .attributes = .{ .const_evaluable = true } } },
12442 // _rotr8
12443 .{ .tag = @enumFromInt(3636), .properties = .{ .param_str = "UcUcUc", .language = .all_ms_languages, .attributes = .{ .const_evaluable = true } } },
12444 // _setjmp
12445 .{ .tag = @enumFromInt(3637), .properties = .{ .param_str = "iJ", .header = .setjmp, .attributes = .{ .allow_type_mismatch = true, .lib_function_without_prefix = true, .returns_twice = true } } },
12446 // _setjmpex
12447 .{ .tag = @enumFromInt(3638), .properties = .{ .param_str = "iJ", .header = .setjmpex, .language = .all_ms_languages, .attributes = .{ .allow_type_mismatch = true, .lib_function_without_prefix = true, .returns_twice = true } } },
12448 // abort
12449 .{ .tag = @enumFromInt(3639), .properties = .{ .param_str = "v", .header = .stdlib, .attributes = .{ .noreturn = true, .lib_function_without_prefix = true } } },
12450 // abs
12451 .{ .tag = @enumFromInt(3640), .properties = .{ .param_str = "ii", .header = .stdlib, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12452 // acos
12453 .{ .tag = @enumFromInt(3641), .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12454 // acosf
12455 .{ .tag = @enumFromInt(3642), .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12456 // acosh
12457 .{ .tag = @enumFromInt(3643), .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12458 // acoshf
12459 .{ .tag = @enumFromInt(3644), .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12460 // acoshl
12461 .{ .tag = @enumFromInt(3645), .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12462 // acosl
12463 .{ .tag = @enumFromInt(3646), .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12464 // aligned_alloc
12465 .{ .tag = @enumFromInt(3647), .properties = .{ .param_str = "v*zz", .header = .stdlib, .attributes = .{ .lib_function_without_prefix = true } } },
12466 // alloca
12467 .{ .tag = @enumFromInt(3648), .properties = .{ .param_str = "v*z", .header = .stdlib, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } },
12468 // asin
12469 .{ .tag = @enumFromInt(3649), .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12470 // asinf
12471 .{ .tag = @enumFromInt(3650), .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12472 // asinh
12473 .{ .tag = @enumFromInt(3651), .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12474 // asinhf
12475 .{ .tag = @enumFromInt(3652), .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12476 // asinhl
12477 .{ .tag = @enumFromInt(3653), .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12478 // asinl
12479 .{ .tag = @enumFromInt(3654), .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12480 // atan
12481 .{ .tag = @enumFromInt(3655), .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12482 // atan2
12483 .{ .tag = @enumFromInt(3656), .properties = .{ .param_str = "ddd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12484 // atan2f
12485 .{ .tag = @enumFromInt(3657), .properties = .{ .param_str = "fff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12486 // atan2l
12487 .{ .tag = @enumFromInt(3658), .properties = .{ .param_str = "LdLdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12488 // atanf
12489 .{ .tag = @enumFromInt(3659), .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12490 // atanh
12491 .{ .tag = @enumFromInt(3660), .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12492 // atanhf
12493 .{ .tag = @enumFromInt(3661), .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12494 // atanhl
12495 .{ .tag = @enumFromInt(3662), .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12496 // atanl
12497 .{ .tag = @enumFromInt(3663), .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12498 // bcmp
12499 .{ .tag = @enumFromInt(3664), .properties = .{ .param_str = "ivC*vC*z", .header = .strings, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } },
12500 // bcopy
12501 .{ .tag = @enumFromInt(3665), .properties = .{ .param_str = "vvC*v*z", .header = .strings, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } },
12502 // bzero
12503 .{ .tag = @enumFromInt(3666), .properties = .{ .param_str = "vv*z", .header = .strings, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } },
12504 // cabs
12505 .{ .tag = @enumFromInt(3667), .properties = .{ .param_str = "dXd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12506 // cabsf
12507 .{ .tag = @enumFromInt(3668), .properties = .{ .param_str = "fXf", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12508 // cabsl
12509 .{ .tag = @enumFromInt(3669), .properties = .{ .param_str = "LdXLd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12510 // cacos
12511 .{ .tag = @enumFromInt(3670), .properties = .{ .param_str = "XdXd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12512 // cacosf
12513 .{ .tag = @enumFromInt(3671), .properties = .{ .param_str = "XfXf", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12514 // cacosh
12515 .{ .tag = @enumFromInt(3672), .properties = .{ .param_str = "XdXd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12516 // cacoshf
12517 .{ .tag = @enumFromInt(3673), .properties = .{ .param_str = "XfXf", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12518 // cacoshl
12519 .{ .tag = @enumFromInt(3674), .properties = .{ .param_str = "XLdXLd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12520 // cacosl
12521 .{ .tag = @enumFromInt(3675), .properties = .{ .param_str = "XLdXLd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12522 // calloc
12523 .{ .tag = @enumFromInt(3676), .properties = .{ .param_str = "v*zz", .header = .stdlib, .attributes = .{ .lib_function_without_prefix = true } } },
12524 // carg
12525 .{ .tag = @enumFromInt(3677), .properties = .{ .param_str = "dXd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12526 // cargf
12527 .{ .tag = @enumFromInt(3678), .properties = .{ .param_str = "fXf", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12528 // cargl
12529 .{ .tag = @enumFromInt(3679), .properties = .{ .param_str = "LdXLd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12530 // casin
12531 .{ .tag = @enumFromInt(3680), .properties = .{ .param_str = "XdXd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12532 // casinf
12533 .{ .tag = @enumFromInt(3681), .properties = .{ .param_str = "XfXf", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12534 // casinh
12535 .{ .tag = @enumFromInt(3682), .properties = .{ .param_str = "XdXd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12536 // casinhf
12537 .{ .tag = @enumFromInt(3683), .properties = .{ .param_str = "XfXf", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12538 // casinhl
12539 .{ .tag = @enumFromInt(3684), .properties = .{ .param_str = "XLdXLd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12540 // casinl
12541 .{ .tag = @enumFromInt(3685), .properties = .{ .param_str = "XLdXLd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12542 // catan
12543 .{ .tag = @enumFromInt(3686), .properties = .{ .param_str = "XdXd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12544 // catanf
12545 .{ .tag = @enumFromInt(3687), .properties = .{ .param_str = "XfXf", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12546 // catanh
12547 .{ .tag = @enumFromInt(3688), .properties = .{ .param_str = "XdXd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12548 // catanhf
12549 .{ .tag = @enumFromInt(3689), .properties = .{ .param_str = "XfXf", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12550 // catanhl
12551 .{ .tag = @enumFromInt(3690), .properties = .{ .param_str = "XLdXLd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12552 // catanl
12553 .{ .tag = @enumFromInt(3691), .properties = .{ .param_str = "XLdXLd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12554 // cbrt
12555 .{ .tag = @enumFromInt(3692), .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12556 // cbrtf
12557 .{ .tag = @enumFromInt(3693), .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12558 // cbrtl
12559 .{ .tag = @enumFromInt(3694), .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12560 // ccos
12561 .{ .tag = @enumFromInt(3695), .properties = .{ .param_str = "XdXd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12562 // ccosf
12563 .{ .tag = @enumFromInt(3696), .properties = .{ .param_str = "XfXf", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12564 // ccosh
12565 .{ .tag = @enumFromInt(3697), .properties = .{ .param_str = "XdXd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12566 // ccoshf
12567 .{ .tag = @enumFromInt(3698), .properties = .{ .param_str = "XfXf", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12568 // ccoshl
12569 .{ .tag = @enumFromInt(3699), .properties = .{ .param_str = "XLdXLd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12570 // ccosl
12571 .{ .tag = @enumFromInt(3700), .properties = .{ .param_str = "XLdXLd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12572 // ceil
12573 .{ .tag = @enumFromInt(3701), .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12574 // ceilf
12575 .{ .tag = @enumFromInt(3702), .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12576 // ceill
12577 .{ .tag = @enumFromInt(3703), .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12578 // cexp
12579 .{ .tag = @enumFromInt(3704), .properties = .{ .param_str = "XdXd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12580 // cexpf
12581 .{ .tag = @enumFromInt(3705), .properties = .{ .param_str = "XfXf", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12582 // cexpl
12583 .{ .tag = @enumFromInt(3706), .properties = .{ .param_str = "XLdXLd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12584 // cimag
12585 .{ .tag = @enumFromInt(3707), .properties = .{ .param_str = "dXd", .header = .complex, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12586 // cimagf
12587 .{ .tag = @enumFromInt(3708), .properties = .{ .param_str = "fXf", .header = .complex, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12588 // cimagl
12589 .{ .tag = @enumFromInt(3709), .properties = .{ .param_str = "LdXLd", .header = .complex, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12590 // clog
12591 .{ .tag = @enumFromInt(3710), .properties = .{ .param_str = "XdXd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12592 // clogf
12593 .{ .tag = @enumFromInt(3711), .properties = .{ .param_str = "XfXf", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12594 // clogl
12595 .{ .tag = @enumFromInt(3712), .properties = .{ .param_str = "XLdXLd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12596 // conj
12597 .{ .tag = @enumFromInt(3713), .properties = .{ .param_str = "XdXd", .header = .complex, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12598 // conjf
12599 .{ .tag = @enumFromInt(3714), .properties = .{ .param_str = "XfXf", .header = .complex, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12600 // conjl
12601 .{ .tag = @enumFromInt(3715), .properties = .{ .param_str = "XLdXLd", .header = .complex, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12602 // copysign
12603 .{ .tag = @enumFromInt(3716), .properties = .{ .param_str = "ddd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12604 // copysignf
12605 .{ .tag = @enumFromInt(3717), .properties = .{ .param_str = "fff", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12606 // copysignl
12607 .{ .tag = @enumFromInt(3718), .properties = .{ .param_str = "LdLdLd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12608 // cos
12609 .{ .tag = @enumFromInt(3719), .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12610 // cosf
12611 .{ .tag = @enumFromInt(3720), .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12612 // cosh
12613 .{ .tag = @enumFromInt(3721), .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12614 // coshf
12615 .{ .tag = @enumFromInt(3722), .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12616 // coshl
12617 .{ .tag = @enumFromInt(3723), .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12618 // cosl
12619 .{ .tag = @enumFromInt(3724), .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12620 // cpow
12621 .{ .tag = @enumFromInt(3725), .properties = .{ .param_str = "XdXdXd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12622 // cpowf
12623 .{ .tag = @enumFromInt(3726), .properties = .{ .param_str = "XfXfXf", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12624 // cpowl
12625 .{ .tag = @enumFromInt(3727), .properties = .{ .param_str = "XLdXLdXLd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12626 // cproj
12627 .{ .tag = @enumFromInt(3728), .properties = .{ .param_str = "XdXd", .header = .complex, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12628 // cprojf
12629 .{ .tag = @enumFromInt(3729), .properties = .{ .param_str = "XfXf", .header = .complex, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12630 // cprojl
12631 .{ .tag = @enumFromInt(3730), .properties = .{ .param_str = "XLdXLd", .header = .complex, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12632 // creal
12633 .{ .tag = @enumFromInt(3731), .properties = .{ .param_str = "dXd", .header = .complex, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12634 // crealf
12635 .{ .tag = @enumFromInt(3732), .properties = .{ .param_str = "fXf", .header = .complex, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12636 // creall
12637 .{ .tag = @enumFromInt(3733), .properties = .{ .param_str = "LdXLd", .header = .complex, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12638 // csin
12639 .{ .tag = @enumFromInt(3734), .properties = .{ .param_str = "XdXd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12640 // csinf
12641 .{ .tag = @enumFromInt(3735), .properties = .{ .param_str = "XfXf", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12642 // csinh
12643 .{ .tag = @enumFromInt(3736), .properties = .{ .param_str = "XdXd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12644 // csinhf
12645 .{ .tag = @enumFromInt(3737), .properties = .{ .param_str = "XfXf", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12646 // csinhl
12647 .{ .tag = @enumFromInt(3738), .properties = .{ .param_str = "XLdXLd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12648 // csinl
12649 .{ .tag = @enumFromInt(3739), .properties = .{ .param_str = "XLdXLd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12650 // csqrt
12651 .{ .tag = @enumFromInt(3740), .properties = .{ .param_str = "XdXd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12652 // csqrtf
12653 .{ .tag = @enumFromInt(3741), .properties = .{ .param_str = "XfXf", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12654 // csqrtl
12655 .{ .tag = @enumFromInt(3742), .properties = .{ .param_str = "XLdXLd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12656 // ctan
12657 .{ .tag = @enumFromInt(3743), .properties = .{ .param_str = "XdXd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12658 // ctanf
12659 .{ .tag = @enumFromInt(3744), .properties = .{ .param_str = "XfXf", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12660 // ctanh
12661 .{ .tag = @enumFromInt(3745), .properties = .{ .param_str = "XdXd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12662 // ctanhf
12663 .{ .tag = @enumFromInt(3746), .properties = .{ .param_str = "XfXf", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12664 // ctanhl
12665 .{ .tag = @enumFromInt(3747), .properties = .{ .param_str = "XLdXLd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12666 // ctanl
12667 .{ .tag = @enumFromInt(3748), .properties = .{ .param_str = "XLdXLd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12668 // erf
12669 .{ .tag = @enumFromInt(3749), .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12670 // erfc
12671 .{ .tag = @enumFromInt(3750), .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12672 // erfcf
12673 .{ .tag = @enumFromInt(3751), .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12674 // erfcl
12675 .{ .tag = @enumFromInt(3752), .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12676 // erff
12677 .{ .tag = @enumFromInt(3753), .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12678 // erfl
12679 .{ .tag = @enumFromInt(3754), .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12680 // exit
12681 .{ .tag = @enumFromInt(3755), .properties = .{ .param_str = "vi", .header = .stdlib, .attributes = .{ .noreturn = true, .lib_function_without_prefix = true } } },
12682 // exp
12683 .{ .tag = @enumFromInt(3756), .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12684 // exp2
12685 .{ .tag = @enumFromInt(3757), .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12686 // exp2f
12687 .{ .tag = @enumFromInt(3758), .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12688 // exp2l
12689 .{ .tag = @enumFromInt(3759), .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12690 // expf
12691 .{ .tag = @enumFromInt(3760), .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12692 // expl
12693 .{ .tag = @enumFromInt(3761), .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12694 // expm1
12695 .{ .tag = @enumFromInt(3762), .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12696 // expm1f
12697 .{ .tag = @enumFromInt(3763), .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12698 // expm1l
12699 .{ .tag = @enumFromInt(3764), .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12700 // fabs
12701 .{ .tag = @enumFromInt(3765), .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12702 // fabsf
12703 .{ .tag = @enumFromInt(3766), .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12704 // fabsl
12705 .{ .tag = @enumFromInt(3767), .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12706 // fdim
12707 .{ .tag = @enumFromInt(3768), .properties = .{ .param_str = "ddd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12708 // fdimf
12709 .{ .tag = @enumFromInt(3769), .properties = .{ .param_str = "fff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12710 // fdiml
12711 .{ .tag = @enumFromInt(3770), .properties = .{ .param_str = "LdLdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12712 // finite
12713 .{ .tag = @enumFromInt(3771), .properties = .{ .param_str = "id", .header = .math, .language = .gnu_lang, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12714 // finitef
12715 .{ .tag = @enumFromInt(3772), .properties = .{ .param_str = "if", .header = .math, .language = .gnu_lang, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12716 // finitel
12717 .{ .tag = @enumFromInt(3773), .properties = .{ .param_str = "iLd", .header = .math, .language = .gnu_lang, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12718 // floor
12719 .{ .tag = @enumFromInt(3774), .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12720 // floorf
12721 .{ .tag = @enumFromInt(3775), .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12722 // floorl
12723 .{ .tag = @enumFromInt(3776), .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12724 // fma
12725 .{ .tag = @enumFromInt(3777), .properties = .{ .param_str = "dddd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12726 // fmaf
12727 .{ .tag = @enumFromInt(3778), .properties = .{ .param_str = "ffff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12728 // fmal
12729 .{ .tag = @enumFromInt(3779), .properties = .{ .param_str = "LdLdLdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12730 // fmax
12731 .{ .tag = @enumFromInt(3780), .properties = .{ .param_str = "ddd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12732 // fmaxf
12733 .{ .tag = @enumFromInt(3781), .properties = .{ .param_str = "fff", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12734 // fmaxl
12735 .{ .tag = @enumFromInt(3782), .properties = .{ .param_str = "LdLdLd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12736 // fmin
12737 .{ .tag = @enumFromInt(3783), .properties = .{ .param_str = "ddd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12738 // fminf
12739 .{ .tag = @enumFromInt(3784), .properties = .{ .param_str = "fff", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12740 // fminl
12741 .{ .tag = @enumFromInt(3785), .properties = .{ .param_str = "LdLdLd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12742 // fmod
12743 .{ .tag = @enumFromInt(3786), .properties = .{ .param_str = "ddd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12744 // fmodf
12745 .{ .tag = @enumFromInt(3787), .properties = .{ .param_str = "fff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12746 // fmodl
12747 .{ .tag = @enumFromInt(3788), .properties = .{ .param_str = "LdLdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12748 // fopen
12749 .{ .tag = @enumFromInt(3789), .properties = .{ .param_str = "P*cC*cC*", .header = .stdio, .attributes = .{ .lib_function_without_prefix = true } } },
12750 // fprintf
12751 .{ .tag = @enumFromInt(3790), .properties = .{ .param_str = "iP*cC*.", .header = .stdio, .attributes = .{ .lib_function_without_prefix = true, .format_kind = .printf, .format_string_position = 1 } } },
12752 // fread
12753 .{ .tag = @enumFromInt(3791), .properties = .{ .param_str = "zv*zzP*", .header = .stdio, .attributes = .{ .lib_function_without_prefix = true } } },
12754 // free
12755 .{ .tag = @enumFromInt(3792), .properties = .{ .param_str = "vv*", .header = .stdlib, .attributes = .{ .lib_function_without_prefix = true } } },
12756 // frexp
12757 .{ .tag = @enumFromInt(3793), .properties = .{ .param_str = "ddi*", .header = .math, .attributes = .{ .lib_function_without_prefix = true } } },
12758 // frexpf
12759 .{ .tag = @enumFromInt(3794), .properties = .{ .param_str = "ffi*", .header = .math, .attributes = .{ .lib_function_without_prefix = true } } },
12760 // frexpl
12761 .{ .tag = @enumFromInt(3795), .properties = .{ .param_str = "LdLdi*", .header = .math, .attributes = .{ .lib_function_without_prefix = true } } },
12762 // fscanf
12763 .{ .tag = @enumFromInt(3796), .properties = .{ .param_str = "iP*RcC*R.", .header = .stdio, .attributes = .{ .lib_function_without_prefix = true, .format_kind = .scanf, .format_string_position = 1 } } },
12764 // fwrite
12765 .{ .tag = @enumFromInt(3797), .properties = .{ .param_str = "zvC*zzP*", .header = .stdio, .attributes = .{ .lib_function_without_prefix = true } } },
12766 // getcontext
12767 .{ .tag = @enumFromInt(3798), .properties = .{ .param_str = "iK*", .header = .setjmp, .attributes = .{ .allow_type_mismatch = true, .lib_function_without_prefix = true, .returns_twice = true } } },
12768 // hypot
12769 .{ .tag = @enumFromInt(3799), .properties = .{ .param_str = "ddd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12770 // hypotf
12771 .{ .tag = @enumFromInt(3800), .properties = .{ .param_str = "fff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12772 // hypotl
12773 .{ .tag = @enumFromInt(3801), .properties = .{ .param_str = "LdLdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12774 // ilogb
12775 .{ .tag = @enumFromInt(3802), .properties = .{ .param_str = "id", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12776 // ilogbf
12777 .{ .tag = @enumFromInt(3803), .properties = .{ .param_str = "if", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12778 // ilogbl
12779 .{ .tag = @enumFromInt(3804), .properties = .{ .param_str = "iLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12780 // index
12781 .{ .tag = @enumFromInt(3805), .properties = .{ .param_str = "c*cC*i", .header = .strings, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } },
12782 // isalnum
12783 .{ .tag = @enumFromInt(3806), .properties = .{ .param_str = "ii", .header = .ctype, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } },
12784 // isalpha
12785 .{ .tag = @enumFromInt(3807), .properties = .{ .param_str = "ii", .header = .ctype, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } },
12786 // isblank
12787 .{ .tag = @enumFromInt(3808), .properties = .{ .param_str = "ii", .header = .ctype, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } },
12788 // iscntrl
12789 .{ .tag = @enumFromInt(3809), .properties = .{ .param_str = "ii", .header = .ctype, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } },
12790 // isdigit
12791 .{ .tag = @enumFromInt(3810), .properties = .{ .param_str = "ii", .header = .ctype, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } },
12792 // isgraph
12793 .{ .tag = @enumFromInt(3811), .properties = .{ .param_str = "ii", .header = .ctype, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } },
12794 // islower
12795 .{ .tag = @enumFromInt(3812), .properties = .{ .param_str = "ii", .header = .ctype, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } },
12796 // isprint
12797 .{ .tag = @enumFromInt(3813), .properties = .{ .param_str = "ii", .header = .ctype, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } },
12798 // ispunct
12799 .{ .tag = @enumFromInt(3814), .properties = .{ .param_str = "ii", .header = .ctype, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } },
12800 // isspace
12801 .{ .tag = @enumFromInt(3815), .properties = .{ .param_str = "ii", .header = .ctype, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } },
12802 // isupper
12803 .{ .tag = @enumFromInt(3816), .properties = .{ .param_str = "ii", .header = .ctype, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } },
12804 // isxdigit
12805 .{ .tag = @enumFromInt(3817), .properties = .{ .param_str = "ii", .header = .ctype, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } },
12806 // labs
12807 .{ .tag = @enumFromInt(3818), .properties = .{ .param_str = "LiLi", .header = .stdlib, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12808 // ldexp
12809 .{ .tag = @enumFromInt(3819), .properties = .{ .param_str = "ddi", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12810 // ldexpf
12811 .{ .tag = @enumFromInt(3820), .properties = .{ .param_str = "ffi", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12812 // ldexpl
12813 .{ .tag = @enumFromInt(3821), .properties = .{ .param_str = "LdLdi", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12814 // lgamma
12815 .{ .tag = @enumFromInt(3822), .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true } } },
12816 // lgammaf
12817 .{ .tag = @enumFromInt(3823), .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true } } },
12818 // lgammal
12819 .{ .tag = @enumFromInt(3824), .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true } } },
12820 // llabs
12821 .{ .tag = @enumFromInt(3825), .properties = .{ .param_str = "LLiLLi", .header = .stdlib, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12822 // llrint
12823 .{ .tag = @enumFromInt(3826), .properties = .{ .param_str = "LLid", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12824 // llrintf
12825 .{ .tag = @enumFromInt(3827), .properties = .{ .param_str = "LLif", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12826 // llrintl
12827 .{ .tag = @enumFromInt(3828), .properties = .{ .param_str = "LLiLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12828 // llround
12829 .{ .tag = @enumFromInt(3829), .properties = .{ .param_str = "LLid", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12830 // llroundf
12831 .{ .tag = @enumFromInt(3830), .properties = .{ .param_str = "LLif", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12832 // llroundl
12833 .{ .tag = @enumFromInt(3831), .properties = .{ .param_str = "LLiLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12834 // log
12835 .{ .tag = @enumFromInt(3832), .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12836 // log10
12837 .{ .tag = @enumFromInt(3833), .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12838 // log10f
12839 .{ .tag = @enumFromInt(3834), .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12840 // log10l
12841 .{ .tag = @enumFromInt(3835), .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12842 // log1p
12843 .{ .tag = @enumFromInt(3836), .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12844 // log1pf
12845 .{ .tag = @enumFromInt(3837), .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12846 // log1pl
12847 .{ .tag = @enumFromInt(3838), .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12848 // log2
12849 .{ .tag = @enumFromInt(3839), .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12850 // log2f
12851 .{ .tag = @enumFromInt(3840), .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12852 // log2l
12853 .{ .tag = @enumFromInt(3841), .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12854 // logb
12855 .{ .tag = @enumFromInt(3842), .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12856 // logbf
12857 .{ .tag = @enumFromInt(3843), .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12858 // logbl
12859 .{ .tag = @enumFromInt(3844), .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12860 // logf
12861 .{ .tag = @enumFromInt(3845), .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12862 // logl
12863 .{ .tag = @enumFromInt(3846), .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12864 // longjmp
12865 .{ .tag = @enumFromInt(3847), .properties = .{ .param_str = "vJi", .header = .setjmp, .attributes = .{ .noreturn = true, .allow_type_mismatch = true, .lib_function_without_prefix = true } } },
12866 // lrint
12867 .{ .tag = @enumFromInt(3848), .properties = .{ .param_str = "Lid", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12868 // lrintf
12869 .{ .tag = @enumFromInt(3849), .properties = .{ .param_str = "Lif", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12870 // lrintl
12871 .{ .tag = @enumFromInt(3850), .properties = .{ .param_str = "LiLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12872 // lround
12873 .{ .tag = @enumFromInt(3851), .properties = .{ .param_str = "Lid", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12874 // lroundf
12875 .{ .tag = @enumFromInt(3852), .properties = .{ .param_str = "Lif", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12876 // lroundl
12877 .{ .tag = @enumFromInt(3853), .properties = .{ .param_str = "LiLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12878 // malloc
12879 .{ .tag = @enumFromInt(3854), .properties = .{ .param_str = "v*z", .header = .stdlib, .attributes = .{ .lib_function_without_prefix = true } } },
12880 // memalign
12881 .{ .tag = @enumFromInt(3855), .properties = .{ .param_str = "v*zz", .header = .malloc, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } },
12882 // memccpy
12883 .{ .tag = @enumFromInt(3856), .properties = .{ .param_str = "v*v*vC*iz", .header = .string, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } },
12884 // memchr
12885 .{ .tag = @enumFromInt(3857), .properties = .{ .param_str = "v*vC*iz", .header = .string, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } },
12886 // memcmp
12887 .{ .tag = @enumFromInt(3858), .properties = .{ .param_str = "ivC*vC*z", .header = .string, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } },
12888 // memcpy
12889 .{ .tag = @enumFromInt(3859), .properties = .{ .param_str = "v*v*vC*z", .header = .string, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } },
12890 // memmove
12891 .{ .tag = @enumFromInt(3860), .properties = .{ .param_str = "v*v*vC*z", .header = .string, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } },
12892 // mempcpy
12893 .{ .tag = @enumFromInt(3861), .properties = .{ .param_str = "v*v*vC*z", .header = .string, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } },
12894 // memset
12895 .{ .tag = @enumFromInt(3862), .properties = .{ .param_str = "v*v*iz", .header = .string, .attributes = .{ .lib_function_without_prefix = true } } },
12896 // modf
12897 .{ .tag = @enumFromInt(3863), .properties = .{ .param_str = "ddd*", .header = .math, .attributes = .{ .lib_function_without_prefix = true } } },
12898 // modff
12899 .{ .tag = @enumFromInt(3864), .properties = .{ .param_str = "fff*", .header = .math, .attributes = .{ .lib_function_without_prefix = true } } },
12900 // modfl
12901 .{ .tag = @enumFromInt(3865), .properties = .{ .param_str = "LdLdLd*", .header = .math, .attributes = .{ .lib_function_without_prefix = true } } },
12902 // nan
12903 .{ .tag = @enumFromInt(3866), .properties = .{ .param_str = "dcC*", .header = .math, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } },
12904 // nanf
12905 .{ .tag = @enumFromInt(3867), .properties = .{ .param_str = "fcC*", .header = .math, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } },
12906 // nanl
12907 .{ .tag = @enumFromInt(3868), .properties = .{ .param_str = "LdcC*", .header = .math, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } },
12908 // nearbyint
12909 .{ .tag = @enumFromInt(3869), .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12910 // nearbyintf
12911 .{ .tag = @enumFromInt(3870), .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12912 // nearbyintl
12913 .{ .tag = @enumFromInt(3871), .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12914 // nextafter
12915 .{ .tag = @enumFromInt(3872), .properties = .{ .param_str = "ddd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12916 // nextafterf
12917 .{ .tag = @enumFromInt(3873), .properties = .{ .param_str = "fff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12918 // nextafterl
12919 .{ .tag = @enumFromInt(3874), .properties = .{ .param_str = "LdLdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12920 // nexttoward
12921 .{ .tag = @enumFromInt(3875), .properties = .{ .param_str = "ddLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12922 // nexttowardf
12923 .{ .tag = @enumFromInt(3876), .properties = .{ .param_str = "ffLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12924 // nexttowardl
12925 .{ .tag = @enumFromInt(3877), .properties = .{ .param_str = "LdLdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12926 // pow
12927 .{ .tag = @enumFromInt(3878), .properties = .{ .param_str = "ddd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12928 // powf
12929 .{ .tag = @enumFromInt(3879), .properties = .{ .param_str = "fff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12930 // powl
12931 .{ .tag = @enumFromInt(3880), .properties = .{ .param_str = "LdLdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12932 // printf
12933 .{ .tag = @enumFromInt(3881), .properties = .{ .param_str = "icC*.", .header = .stdio, .attributes = .{ .lib_function_without_prefix = true, .format_kind = .printf } } },
12934 // realloc
12935 .{ .tag = @enumFromInt(3882), .properties = .{ .param_str = "v*v*z", .header = .stdlib, .attributes = .{ .lib_function_without_prefix = true } } },
12936 // remainder
12937 .{ .tag = @enumFromInt(3883), .properties = .{ .param_str = "ddd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12938 // remainderf
12939 .{ .tag = @enumFromInt(3884), .properties = .{ .param_str = "fff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12940 // remainderl
12941 .{ .tag = @enumFromInt(3885), .properties = .{ .param_str = "LdLdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12942 // remquo
12943 .{ .tag = @enumFromInt(3886), .properties = .{ .param_str = "dddi*", .header = .math, .attributes = .{ .lib_function_without_prefix = true } } },
12944 // remquof
12945 .{ .tag = @enumFromInt(3887), .properties = .{ .param_str = "fffi*", .header = .math, .attributes = .{ .lib_function_without_prefix = true } } },
12946 // remquol
12947 .{ .tag = @enumFromInt(3888), .properties = .{ .param_str = "LdLdLdi*", .header = .math, .attributes = .{ .lib_function_without_prefix = true } } },
12948 // rindex
12949 .{ .tag = @enumFromInt(3889), .properties = .{ .param_str = "c*cC*i", .header = .strings, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } },
12950 // rint
12951 .{ .tag = @enumFromInt(3890), .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_fp_exceptions = true } } },
12952 // rintf
12953 .{ .tag = @enumFromInt(3891), .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_fp_exceptions = true } } },
12954 // rintl
12955 .{ .tag = @enumFromInt(3892), .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_fp_exceptions = true } } },
12956 // round
12957 .{ .tag = @enumFromInt(3893), .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12958 // roundeven
12959 .{ .tag = @enumFromInt(3894), .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12960 // roundevenf
12961 .{ .tag = @enumFromInt(3895), .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12962 // roundevenl
12963 .{ .tag = @enumFromInt(3896), .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12964 // roundf
12965 .{ .tag = @enumFromInt(3897), .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12966 // roundl
12967 .{ .tag = @enumFromInt(3898), .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12968 // savectx
12969 .{ .tag = @enumFromInt(3899), .properties = .{ .param_str = "iJ", .header = .setjmp, .attributes = .{ .allow_type_mismatch = true, .lib_function_without_prefix = true, .returns_twice = true } } },
12970 // scalbln
12971 .{ .tag = @enumFromInt(3900), .properties = .{ .param_str = "ddLi", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12972 // scalblnf
12973 .{ .tag = @enumFromInt(3901), .properties = .{ .param_str = "ffLi", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12974 // scalblnl
12975 .{ .tag = @enumFromInt(3902), .properties = .{ .param_str = "LdLdLi", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12976 // scalbn
12977 .{ .tag = @enumFromInt(3903), .properties = .{ .param_str = "ddi", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12978 // scalbnf
12979 .{ .tag = @enumFromInt(3904), .properties = .{ .param_str = "ffi", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12980 // scalbnl
12981 .{ .tag = @enumFromInt(3905), .properties = .{ .param_str = "LdLdi", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12982 // scanf
12983 .{ .tag = @enumFromInt(3906), .properties = .{ .param_str = "icC*R.", .header = .stdio, .attributes = .{ .lib_function_without_prefix = true, .format_kind = .scanf } } },
12984 // setjmp
12985 .{ .tag = @enumFromInt(3907), .properties = .{ .param_str = "iJ", .header = .setjmp, .attributes = .{ .allow_type_mismatch = true, .lib_function_without_prefix = true, .returns_twice = true } } },
12986 // siglongjmp
12987 .{ .tag = @enumFromInt(3908), .properties = .{ .param_str = "vSJi", .header = .setjmp, .language = .all_gnu_languages, .attributes = .{ .noreturn = true, .allow_type_mismatch = true, .lib_function_without_prefix = true } } },
12988 // sigsetjmp
12989 .{ .tag = @enumFromInt(3909), .properties = .{ .param_str = "iSJi", .header = .setjmp, .attributes = .{ .allow_type_mismatch = true, .lib_function_without_prefix = true, .returns_twice = true } } },
12990 // sin
12991 .{ .tag = @enumFromInt(3910), .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12992 // sinf
12993 .{ .tag = @enumFromInt(3911), .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12994 // sinh
12995 .{ .tag = @enumFromInt(3912), .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12996 // sinhf
12997 .{ .tag = @enumFromInt(3913), .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12998 // sinhl
12999 .{ .tag = @enumFromInt(3914), .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13000 // sinl
13001 .{ .tag = @enumFromInt(3915), .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13002 // snprintf
13003 .{ .tag = @enumFromInt(3916), .properties = .{ .param_str = "ic*zcC*.", .header = .stdio, .attributes = .{ .lib_function_without_prefix = true, .format_kind = .printf, .format_string_position = 2 } } },
13004 // sprintf
13005 .{ .tag = @enumFromInt(3917), .properties = .{ .param_str = "ic*cC*.", .header = .stdio, .attributes = .{ .lib_function_without_prefix = true, .format_kind = .printf, .format_string_position = 1 } } },
13006 // sqrt
13007 .{ .tag = @enumFromInt(3918), .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13008 // sqrtf
13009 .{ .tag = @enumFromInt(3919), .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13010 // sqrtl
13011 .{ .tag = @enumFromInt(3920), .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13012 // sscanf
13013 .{ .tag = @enumFromInt(3921), .properties = .{ .param_str = "icC*RcC*R.", .header = .stdio, .attributes = .{ .lib_function_without_prefix = true, .format_kind = .scanf, .format_string_position = 1 } } },
13014 // stpcpy
13015 .{ .tag = @enumFromInt(3922), .properties = .{ .param_str = "c*c*cC*", .header = .string, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } },
13016 // stpncpy
13017 .{ .tag = @enumFromInt(3923), .properties = .{ .param_str = "c*c*cC*z", .header = .string, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } },
13018 // strcasecmp
13019 .{ .tag = @enumFromInt(3924), .properties = .{ .param_str = "icC*cC*", .header = .strings, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } },
13020 // strcat
13021 .{ .tag = @enumFromInt(3925), .properties = .{ .param_str = "c*c*cC*", .header = .string, .attributes = .{ .lib_function_without_prefix = true } } },
13022 // strchr
13023 .{ .tag = @enumFromInt(3926), .properties = .{ .param_str = "c*cC*i", .header = .string, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } },
13024 // strcmp
13025 .{ .tag = @enumFromInt(3927), .properties = .{ .param_str = "icC*cC*", .header = .string, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } },
13026 // strcpy
13027 .{ .tag = @enumFromInt(3928), .properties = .{ .param_str = "c*c*cC*", .header = .string, .attributes = .{ .lib_function_without_prefix = true } } },
13028 // strcspn
13029 .{ .tag = @enumFromInt(3929), .properties = .{ .param_str = "zcC*cC*", .header = .string, .attributes = .{ .lib_function_without_prefix = true } } },
13030 // strdup
13031 .{ .tag = @enumFromInt(3930), .properties = .{ .param_str = "c*cC*", .header = .string, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } },
13032 // strerror
13033 .{ .tag = @enumFromInt(3931), .properties = .{ .param_str = "c*i", .header = .string, .attributes = .{ .lib_function_without_prefix = true } } },
13034 // strlcat
13035 .{ .tag = @enumFromInt(3932), .properties = .{ .param_str = "zc*cC*z", .header = .string, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } },
13036 // strlcpy
13037 .{ .tag = @enumFromInt(3933), .properties = .{ .param_str = "zc*cC*z", .header = .string, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } },
13038 // strlen
13039 .{ .tag = @enumFromInt(3934), .properties = .{ .param_str = "zcC*", .header = .string, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } },
13040 // strncasecmp
13041 .{ .tag = @enumFromInt(3935), .properties = .{ .param_str = "icC*cC*z", .header = .strings, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } },
13042 // strncat
13043 .{ .tag = @enumFromInt(3936), .properties = .{ .param_str = "c*c*cC*z", .header = .string, .attributes = .{ .lib_function_without_prefix = true } } },
13044 // strncmp
13045 .{ .tag = @enumFromInt(3937), .properties = .{ .param_str = "icC*cC*z", .header = .string, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } },
13046 // strncpy
13047 .{ .tag = @enumFromInt(3938), .properties = .{ .param_str = "c*c*cC*z", .header = .string, .attributes = .{ .lib_function_without_prefix = true } } },
13048 // strndup
13049 .{ .tag = @enumFromInt(3939), .properties = .{ .param_str = "c*cC*z", .header = .string, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } },
13050 // strpbrk
13051 .{ .tag = @enumFromInt(3940), .properties = .{ .param_str = "c*cC*cC*", .header = .string, .attributes = .{ .lib_function_without_prefix = true } } },
13052 // strrchr
13053 .{ .tag = @enumFromInt(3941), .properties = .{ .param_str = "c*cC*i", .header = .string, .attributes = .{ .lib_function_without_prefix = true } } },
13054 // strspn
13055 .{ .tag = @enumFromInt(3942), .properties = .{ .param_str = "zcC*cC*", .header = .string, .attributes = .{ .lib_function_without_prefix = true } } },
13056 // strstr
13057 .{ .tag = @enumFromInt(3943), .properties = .{ .param_str = "c*cC*cC*", .header = .string, .attributes = .{ .lib_function_without_prefix = true } } },
13058 // strtod
13059 .{ .tag = @enumFromInt(3944), .properties = .{ .param_str = "dcC*c**", .header = .stdlib, .attributes = .{ .lib_function_without_prefix = true } } },
13060 // strtof
13061 .{ .tag = @enumFromInt(3945), .properties = .{ .param_str = "fcC*c**", .header = .stdlib, .attributes = .{ .lib_function_without_prefix = true } } },
13062 // strtok
13063 .{ .tag = @enumFromInt(3946), .properties = .{ .param_str = "c*c*cC*", .header = .string, .attributes = .{ .lib_function_without_prefix = true } } },
13064 // strtol
13065 .{ .tag = @enumFromInt(3947), .properties = .{ .param_str = "LicC*c**i", .header = .stdlib, .attributes = .{ .lib_function_without_prefix = true } } },
13066 // strtold
13067 .{ .tag = @enumFromInt(3948), .properties = .{ .param_str = "LdcC*c**", .header = .stdlib, .attributes = .{ .lib_function_without_prefix = true } } },
13068 // strtoll
13069 .{ .tag = @enumFromInt(3949), .properties = .{ .param_str = "LLicC*c**i", .header = .stdlib, .attributes = .{ .lib_function_without_prefix = true } } },
13070 // strtoul
13071 .{ .tag = @enumFromInt(3950), .properties = .{ .param_str = "ULicC*c**i", .header = .stdlib, .attributes = .{ .lib_function_without_prefix = true } } },
13072 // strtoull
13073 .{ .tag = @enumFromInt(3951), .properties = .{ .param_str = "ULLicC*c**i", .header = .stdlib, .attributes = .{ .lib_function_without_prefix = true } } },
13074 // strxfrm
13075 .{ .tag = @enumFromInt(3952), .properties = .{ .param_str = "zc*cC*z", .header = .string, .attributes = .{ .lib_function_without_prefix = true } } },
13076 // tan
13077 .{ .tag = @enumFromInt(3953), .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13078 // tanf
13079 .{ .tag = @enumFromInt(3954), .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13080 // tanh
13081 .{ .tag = @enumFromInt(3955), .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13082 // tanhf
13083 .{ .tag = @enumFromInt(3956), .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13084 // tanhl
13085 .{ .tag = @enumFromInt(3957), .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13086 // tanl
13087 .{ .tag = @enumFromInt(3958), .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13088 // tgamma
13089 .{ .tag = @enumFromInt(3959), .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13090 // tgammaf
13091 .{ .tag = @enumFromInt(3960), .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13092 // tgammal
13093 .{ .tag = @enumFromInt(3961), .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13094 // tolower
13095 .{ .tag = @enumFromInt(3962), .properties = .{ .param_str = "ii", .header = .ctype, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } },
13096 // toupper
13097 .{ .tag = @enumFromInt(3963), .properties = .{ .param_str = "ii", .header = .ctype, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } },
13098 // trunc
13099 .{ .tag = @enumFromInt(3964), .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
13100 // truncf
13101 .{ .tag = @enumFromInt(3965), .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
13102 // truncl
13103 .{ .tag = @enumFromInt(3966), .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
13104 // va_copy
13105 .{ .tag = @enumFromInt(3967), .properties = .{ .param_str = "vAA", .header = .stdarg, .attributes = .{ .lib_function_without_prefix = true } } },
13106 // va_end
13107 .{ .tag = @enumFromInt(3968), .properties = .{ .param_str = "vA", .header = .stdarg, .attributes = .{ .lib_function_without_prefix = true } } },
13108 // va_start
13109 .{ .tag = @enumFromInt(3969), .properties = .{ .param_str = "vA.", .header = .stdarg, .attributes = .{ .lib_function_without_prefix = true } } },
13110 // vfork
13111 .{ .tag = @enumFromInt(3970), .properties = .{ .param_str = "p", .header = .unistd, .attributes = .{ .allow_type_mismatch = true, .lib_function_without_prefix = true, .returns_twice = true } } },
13112 // vfprintf
13113 .{ .tag = @enumFromInt(3971), .properties = .{ .param_str = "iP*cC*a", .header = .stdio, .attributes = .{ .lib_function_without_prefix = true, .format_kind = .vprintf, .format_string_position = 1 } } },
13114 // vfscanf
13115 .{ .tag = @enumFromInt(3972), .properties = .{ .param_str = "iP*RcC*Ra", .header = .stdio, .attributes = .{ .lib_function_without_prefix = true, .format_kind = .vscanf, .format_string_position = 1 } } },
13116 // vprintf
13117 .{ .tag = @enumFromInt(3973), .properties = .{ .param_str = "icC*a", .header = .stdio, .attributes = .{ .lib_function_without_prefix = true, .format_kind = .vprintf } } },
13118 // vscanf
13119 .{ .tag = @enumFromInt(3974), .properties = .{ .param_str = "icC*Ra", .header = .stdio, .attributes = .{ .lib_function_without_prefix = true, .format_kind = .vscanf } } },
13120 // vsnprintf
13121 .{ .tag = @enumFromInt(3975), .properties = .{ .param_str = "ic*zcC*a", .header = .stdio, .attributes = .{ .lib_function_without_prefix = true, .format_kind = .vprintf, .format_string_position = 2 } } },
13122 // vsprintf
13123 .{ .tag = @enumFromInt(3976), .properties = .{ .param_str = "ic*cC*a", .header = .stdio, .attributes = .{ .lib_function_without_prefix = true, .format_kind = .vprintf, .format_string_position = 1 } } },
13124 // vsscanf
13125 .{ .tag = @enumFromInt(3977), .properties = .{ .param_str = "icC*RcC*Ra", .header = .stdio, .attributes = .{ .lib_function_without_prefix = true, .format_kind = .vscanf, .format_string_position = 1 } } },
13126 // wcschr
13127 .{ .tag = @enumFromInt(3978), .properties = .{ .param_str = "w*wC*w", .header = .wchar, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } },
13128 // wcscmp
13129 .{ .tag = @enumFromInt(3979), .properties = .{ .param_str = "iwC*wC*", .header = .wchar, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } },
13130 // wcslen
13131 .{ .tag = @enumFromInt(3980), .properties = .{ .param_str = "zwC*", .header = .wchar, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } },
13132 // wcsncmp
13133 .{ .tag = @enumFromInt(3981), .properties = .{ .param_str = "iwC*wC*z", .header = .wchar, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } },
13134 // wmemchr
13135 .{ .tag = @enumFromInt(3982), .properties = .{ .param_str = "w*wC*wz", .header = .wchar, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } },
13136 // wmemcmp
13137 .{ .tag = @enumFromInt(3983), .properties = .{ .param_str = "iwC*wC*z", .header = .wchar, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } },
13138 // wmemcpy
13139 .{ .tag = @enumFromInt(3984), .properties = .{ .param_str = "w*w*wC*z", .header = .wchar, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } },
13140 // wmemmove
13141 .{ .tag = @enumFromInt(3985), .properties = .{ .param_str = "w*w*wC*z", .header = .wchar, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } },
9196 .{ .tag = ._Block_object_assign, .properties = .{ .param_str = "vv*vC*iC", .header = .blocks, .attributes = .{ .lib_function_without_prefix = true } } },
9197 .{ .tag = ._Block_object_dispose, .properties = .{ .param_str = "vvC*iC", .header = .blocks, .attributes = .{ .lib_function_without_prefix = true } } },
9198 .{ .tag = ._Exit, .properties = .{ .param_str = "vi", .header = .stdlib, .attributes = .{ .noreturn = true, .lib_function_without_prefix = true } } },
9199 .{ .tag = ._InterlockedAnd, .properties = .{ .param_str = "NiNiD*Ni", .language = .all_ms_languages } },
9200 .{ .tag = ._InterlockedAnd16, .properties = .{ .param_str = "ssD*s", .language = .all_ms_languages } },
9201 .{ .tag = ._InterlockedAnd8, .properties = .{ .param_str = "ccD*c", .language = .all_ms_languages } },
9202 .{ .tag = ._InterlockedCompareExchange, .properties = .{ .param_str = "NiNiD*NiNi", .language = .all_ms_languages } },
9203 .{ .tag = ._InterlockedCompareExchange16, .properties = .{ .param_str = "ssD*ss", .language = .all_ms_languages } },
9204 .{ .tag = ._InterlockedCompareExchange64, .properties = .{ .param_str = "LLiLLiD*LLiLLi", .language = .all_ms_languages } },
9205 .{ .tag = ._InterlockedCompareExchange8, .properties = .{ .param_str = "ccD*cc", .language = .all_ms_languages } },
9206 .{ .tag = ._InterlockedCompareExchangePointer, .properties = .{ .param_str = "v*v*D*v*v*", .language = .all_ms_languages } },
9207 .{ .tag = ._InterlockedCompareExchangePointer_nf, .properties = .{ .param_str = "v*v*D*v*v*", .language = .all_ms_languages } },
9208 .{ .tag = ._InterlockedDecrement, .properties = .{ .param_str = "NiNiD*", .language = .all_ms_languages } },
9209 .{ .tag = ._InterlockedDecrement16, .properties = .{ .param_str = "ssD*", .language = .all_ms_languages } },
9210 .{ .tag = ._InterlockedExchange, .properties = .{ .param_str = "NiNiD*Ni", .language = .all_ms_languages } },
9211 .{ .tag = ._InterlockedExchange16, .properties = .{ .param_str = "ssD*s", .language = .all_ms_languages } },
9212 .{ .tag = ._InterlockedExchange8, .properties = .{ .param_str = "ccD*c", .language = .all_ms_languages } },
9213 .{ .tag = ._InterlockedExchangeAdd, .properties = .{ .param_str = "NiNiD*Ni", .language = .all_ms_languages } },
9214 .{ .tag = ._InterlockedExchangeAdd16, .properties = .{ .param_str = "ssD*s", .language = .all_ms_languages } },
9215 .{ .tag = ._InterlockedExchangeAdd8, .properties = .{ .param_str = "ccD*c", .language = .all_ms_languages } },
9216 .{ .tag = ._InterlockedExchangePointer, .properties = .{ .param_str = "v*v*D*v*", .language = .all_ms_languages } },
9217 .{ .tag = ._InterlockedExchangeSub, .properties = .{ .param_str = "NiNiD*Ni", .language = .all_ms_languages } },
9218 .{ .tag = ._InterlockedExchangeSub16, .properties = .{ .param_str = "ssD*s", .language = .all_ms_languages } },
9219 .{ .tag = ._InterlockedExchangeSub8, .properties = .{ .param_str = "ccD*c", .language = .all_ms_languages } },
9220 .{ .tag = ._InterlockedIncrement, .properties = .{ .param_str = "NiNiD*", .language = .all_ms_languages } },
9221 .{ .tag = ._InterlockedIncrement16, .properties = .{ .param_str = "ssD*", .language = .all_ms_languages } },
9222 .{ .tag = ._InterlockedOr, .properties = .{ .param_str = "NiNiD*Ni", .language = .all_ms_languages } },
9223 .{ .tag = ._InterlockedOr16, .properties = .{ .param_str = "ssD*s", .language = .all_ms_languages } },
9224 .{ .tag = ._InterlockedOr8, .properties = .{ .param_str = "ccD*c", .language = .all_ms_languages } },
9225 .{ .tag = ._InterlockedXor, .properties = .{ .param_str = "NiNiD*Ni", .language = .all_ms_languages } },
9226 .{ .tag = ._InterlockedXor16, .properties = .{ .param_str = "ssD*s", .language = .all_ms_languages } },
9227 .{ .tag = ._InterlockedXor8, .properties = .{ .param_str = "ccD*c", .language = .all_ms_languages } },
9228 .{ .tag = ._MoveFromCoprocessor, .properties = .{ .param_str = "UiIUiIUiIUiIUiIUi", .language = .all_ms_languages, .target_set = TargetSet.initOne(.arm) } },
9229 .{ .tag = ._MoveFromCoprocessor2, .properties = .{ .param_str = "UiIUiIUiIUiIUiIUi", .language = .all_ms_languages, .target_set = TargetSet.initOne(.arm) } },
9230 .{ .tag = ._MoveToCoprocessor, .properties = .{ .param_str = "vUiIUiIUiIUiIUiIUi", .language = .all_ms_languages, .target_set = TargetSet.initOne(.arm) } },
9231 .{ .tag = ._MoveToCoprocessor2, .properties = .{ .param_str = "vUiIUiIUiIUiIUiIUi", .language = .all_ms_languages, .target_set = TargetSet.initOne(.arm) } },
9232 .{ .tag = ._ReturnAddress, .properties = .{ .param_str = "v*", .language = .all_ms_languages } },
9233 .{ .tag = .__GetExceptionInfo, .properties = .{ .param_str = "v*.", .language = .all_ms_languages, .attributes = .{ .custom_typecheck = true, .eval_args = false } } },
9234 .{ .tag = .__abnormal_termination, .properties = .{ .param_str = "i", .language = .all_ms_languages } },
9235 .{ .tag = .__annotation, .properties = .{ .param_str = "wC*.", .language = .all_ms_languages } },
9236 .{ .tag = .__arithmetic_fence, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true, .const_evaluable = true } } },
9237 .{ .tag = .__assume, .properties = .{ .param_str = "vb", .language = .all_ms_languages, .attributes = .{ .const_evaluable = true } } },
9238 .{ .tag = .__atomic_add_fetch, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
9239 .{ .tag = .__atomic_always_lock_free, .properties = .{ .param_str = "bzvCD*", .attributes = .{ .const_evaluable = true } } },
9240 .{ .tag = .__atomic_and_fetch, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
9241 .{ .tag = .__atomic_clear, .properties = .{ .param_str = "vvD*i" } },
9242 .{ .tag = .__atomic_compare_exchange, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
9243 .{ .tag = .__atomic_compare_exchange_n, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
9244 .{ .tag = .__atomic_exchange, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
9245 .{ .tag = .__atomic_exchange_n, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
9246 .{ .tag = .__atomic_fetch_add, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
9247 .{ .tag = .__atomic_fetch_and, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
9248 .{ .tag = .__atomic_fetch_max, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
9249 .{ .tag = .__atomic_fetch_min, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
9250 .{ .tag = .__atomic_fetch_nand, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
9251 .{ .tag = .__atomic_fetch_or, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
9252 .{ .tag = .__atomic_fetch_sub, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
9253 .{ .tag = .__atomic_fetch_xor, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
9254 .{ .tag = .__atomic_is_lock_free, .properties = .{ .param_str = "bzvCD*", .attributes = .{ .const_evaluable = true } } },
9255 .{ .tag = .__atomic_load, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
9256 .{ .tag = .__atomic_load_n, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
9257 .{ .tag = .__atomic_max_fetch, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
9258 .{ .tag = .__atomic_min_fetch, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
9259 .{ .tag = .__atomic_nand_fetch, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
9260 .{ .tag = .__atomic_or_fetch, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
9261 .{ .tag = .__atomic_signal_fence, .properties = .{ .param_str = "vi" } },
9262 .{ .tag = .__atomic_store, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
9263 .{ .tag = .__atomic_store_n, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
9264 .{ .tag = .__atomic_sub_fetch, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
9265 .{ .tag = .__atomic_test_and_set, .properties = .{ .param_str = "bvD*i" } },
9266 .{ .tag = .__atomic_thread_fence, .properties = .{ .param_str = "vi" } },
9267 .{ .tag = .__atomic_xor_fetch, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
9268 .{ .tag = .__builtin___CFStringMakeConstantString, .properties = .{ .param_str = "FC*cC*", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
9269 .{ .tag = .__builtin___NSStringMakeConstantString, .properties = .{ .param_str = "FC*cC*", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
9270 .{ .tag = .__builtin___clear_cache, .properties = .{ .param_str = "vc*c*" } },
9271 .{ .tag = .__builtin___fprintf_chk, .properties = .{ .param_str = "iP*RicC*R.", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .printf, .format_string_position = 2 } } },
9272 .{ .tag = .__builtin___get_unsafe_stack_bottom, .properties = .{ .param_str = "v*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
9273 .{ .tag = .__builtin___get_unsafe_stack_ptr, .properties = .{ .param_str = "v*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
9274 .{ .tag = .__builtin___get_unsafe_stack_start, .properties = .{ .param_str = "v*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
9275 .{ .tag = .__builtin___get_unsafe_stack_top, .properties = .{ .param_str = "v*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
9276 .{ .tag = .__builtin___memccpy_chk, .properties = .{ .param_str = "v*v*vC*izz", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
9277 .{ .tag = .__builtin___memcpy_chk, .properties = .{ .param_str = "v*v*vC*zz", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
9278 .{ .tag = .__builtin___memmove_chk, .properties = .{ .param_str = "v*v*vC*zz", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
9279 .{ .tag = .__builtin___mempcpy_chk, .properties = .{ .param_str = "v*v*vC*zz", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
9280 .{ .tag = .__builtin___memset_chk, .properties = .{ .param_str = "v*v*izz", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
9281 .{ .tag = .__builtin___printf_chk, .properties = .{ .param_str = "iicC*R.", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .printf, .format_string_position = 1 } } },
9282 .{ .tag = .__builtin___snprintf_chk, .properties = .{ .param_str = "ic*RzizcC*R.", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .printf, .format_string_position = 4 } } },
9283 .{ .tag = .__builtin___sprintf_chk, .properties = .{ .param_str = "ic*RizcC*R.", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .printf, .format_string_position = 3 } } },
9284 .{ .tag = .__builtin___stpcpy_chk, .properties = .{ .param_str = "c*c*cC*z", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
9285 .{ .tag = .__builtin___stpncpy_chk, .properties = .{ .param_str = "c*c*cC*zz", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
9286 .{ .tag = .__builtin___strcat_chk, .properties = .{ .param_str = "c*c*cC*z", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
9287 .{ .tag = .__builtin___strcpy_chk, .properties = .{ .param_str = "c*c*cC*z", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
9288 .{ .tag = .__builtin___strlcat_chk, .properties = .{ .param_str = "zc*cC*zz", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
9289 .{ .tag = .__builtin___strlcpy_chk, .properties = .{ .param_str = "zc*cC*zz", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
9290 .{ .tag = .__builtin___strncat_chk, .properties = .{ .param_str = "c*c*cC*zz", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
9291 .{ .tag = .__builtin___strncpy_chk, .properties = .{ .param_str = "c*c*cC*zz", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
9292 .{ .tag = .__builtin___vfprintf_chk, .properties = .{ .param_str = "iP*RicC*Ra", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vprintf, .format_string_position = 2 } } },
9293 .{ .tag = .__builtin___vprintf_chk, .properties = .{ .param_str = "iicC*Ra", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vprintf, .format_string_position = 1 } } },
9294 .{ .tag = .__builtin___vsnprintf_chk, .properties = .{ .param_str = "ic*RzizcC*Ra", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vprintf, .format_string_position = 4 } } },
9295 .{ .tag = .__builtin___vsprintf_chk, .properties = .{ .param_str = "ic*RizcC*Ra", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vprintf, .format_string_position = 3 } } },
9296 .{ .tag = .__builtin_abort, .properties = .{ .param_str = "v", .attributes = .{ .noreturn = true, .lib_function_with_builtin_prefix = true } } },
9297 .{ .tag = .__builtin_abs, .properties = .{ .param_str = "ii", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
9298 .{ .tag = .__builtin_acos, .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9299 .{ .tag = .__builtin_acosf, .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9300 .{ .tag = .__builtin_acosf128, .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9301 .{ .tag = .__builtin_acosh, .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9302 .{ .tag = .__builtin_acoshf, .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9303 .{ .tag = .__builtin_acoshf128, .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9304 .{ .tag = .__builtin_acoshl, .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9305 .{ .tag = .__builtin_acosl, .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9306 .{ .tag = .__builtin_add_overflow, .properties = .{ .param_str = "b.", .attributes = .{ .custom_typecheck = true, .const_evaluable = true } } },
9307 .{ .tag = .__builtin_addc, .properties = .{ .param_str = "UiUiCUiCUiCUi*" } },
9308 .{ .tag = .__builtin_addcb, .properties = .{ .param_str = "UcUcCUcCUcCUc*" } },
9309 .{ .tag = .__builtin_addcl, .properties = .{ .param_str = "ULiULiCULiCULiCULi*" } },
9310 .{ .tag = .__builtin_addcll, .properties = .{ .param_str = "ULLiULLiCULLiCULLiCULLi*" } },
9311 .{ .tag = .__builtin_addcs, .properties = .{ .param_str = "UsUsCUsCUsCUs*" } },
9312 .{ .tag = .__builtin_align_down, .properties = .{ .param_str = "v*vC*z", .attributes = .{ .@"const" = true, .custom_typecheck = true, .const_evaluable = true } } },
9313 .{ .tag = .__builtin_align_up, .properties = .{ .param_str = "v*vC*z", .attributes = .{ .@"const" = true, .custom_typecheck = true, .const_evaluable = true } } },
9314 .{ .tag = .__builtin_alloca, .properties = .{ .param_str = "v*z", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
9315 .{ .tag = .__builtin_alloca_uninitialized, .properties = .{ .param_str = "v*z", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
9316 .{ .tag = .__builtin_alloca_with_align, .properties = .{ .param_str = "v*zIz", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
9317 .{ .tag = .__builtin_alloca_with_align_uninitialized, .properties = .{ .param_str = "v*zIz", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
9318 .{ .tag = .__builtin_amdgcn_alignbit, .properties = .{ .param_str = "UiUiUiUi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9319 .{ .tag = .__builtin_amdgcn_alignbyte, .properties = .{ .param_str = "UiUiUiUi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9320 .{ .tag = .__builtin_amdgcn_atomic_dec32, .properties = .{ .param_str = "UZiUZiD*UZiUicC*", .target_set = TargetSet.initOne(.amdgpu) } },
9321 .{ .tag = .__builtin_amdgcn_atomic_dec64, .properties = .{ .param_str = "UWiUWiD*UWiUicC*", .target_set = TargetSet.initOne(.amdgpu) } },
9322 .{ .tag = .__builtin_amdgcn_atomic_inc32, .properties = .{ .param_str = "UZiUZiD*UZiUicC*", .target_set = TargetSet.initOne(.amdgpu) } },
9323 .{ .tag = .__builtin_amdgcn_atomic_inc64, .properties = .{ .param_str = "UWiUWiD*UWiUicC*", .target_set = TargetSet.initOne(.amdgpu) } },
9324 .{ .tag = .__builtin_amdgcn_buffer_wbinvl1, .properties = .{ .param_str = "v", .target_set = TargetSet.initOne(.amdgpu) } },
9325 .{ .tag = .__builtin_amdgcn_class, .properties = .{ .param_str = "bdi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9326 .{ .tag = .__builtin_amdgcn_classf, .properties = .{ .param_str = "bfi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9327 .{ .tag = .__builtin_amdgcn_cosf, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9328 .{ .tag = .__builtin_amdgcn_cubeid, .properties = .{ .param_str = "ffff", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9329 .{ .tag = .__builtin_amdgcn_cubema, .properties = .{ .param_str = "ffff", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9330 .{ .tag = .__builtin_amdgcn_cubesc, .properties = .{ .param_str = "ffff", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9331 .{ .tag = .__builtin_amdgcn_cubetc, .properties = .{ .param_str = "ffff", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9332 .{ .tag = .__builtin_amdgcn_cvt_pk_i16, .properties = .{ .param_str = "E2sii", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9333 .{ .tag = .__builtin_amdgcn_cvt_pk_u16, .properties = .{ .param_str = "E2UsUiUi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9334 .{ .tag = .__builtin_amdgcn_cvt_pk_u8_f32, .properties = .{ .param_str = "UifUiUi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9335 .{ .tag = .__builtin_amdgcn_cvt_pknorm_i16, .properties = .{ .param_str = "E2sff", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9336 .{ .tag = .__builtin_amdgcn_cvt_pknorm_u16, .properties = .{ .param_str = "E2Usff", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9337 .{ .tag = .__builtin_amdgcn_cvt_pkrtz, .properties = .{ .param_str = "E2hff", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9338 .{ .tag = .__builtin_amdgcn_dispatch_ptr, .properties = .{ .param_str = "v*4", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9339 .{ .tag = .__builtin_amdgcn_div_fixup, .properties = .{ .param_str = "dddd", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9340 .{ .tag = .__builtin_amdgcn_div_fixupf, .properties = .{ .param_str = "ffff", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9341 .{ .tag = .__builtin_amdgcn_div_fmas, .properties = .{ .param_str = "ddddb", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9342 .{ .tag = .__builtin_amdgcn_div_fmasf, .properties = .{ .param_str = "ffffb", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9343 .{ .tag = .__builtin_amdgcn_div_scale, .properties = .{ .param_str = "dddbb*", .target_set = TargetSet.initOne(.amdgpu) } },
9344 .{ .tag = .__builtin_amdgcn_div_scalef, .properties = .{ .param_str = "fffbb*", .target_set = TargetSet.initOne(.amdgpu) } },
9345 .{ .tag = .__builtin_amdgcn_ds_append, .properties = .{ .param_str = "ii*3", .target_set = TargetSet.initOne(.amdgpu) } },
9346 .{ .tag = .__builtin_amdgcn_ds_bpermute, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9347 .{ .tag = .__builtin_amdgcn_ds_consume, .properties = .{ .param_str = "ii*3", .target_set = TargetSet.initOne(.amdgpu) } },
9348 .{ .tag = .__builtin_amdgcn_ds_faddf, .properties = .{ .param_str = "ff*3fIiIiIb", .target_set = TargetSet.initOne(.amdgpu) } },
9349 .{ .tag = .__builtin_amdgcn_ds_fmaxf, .properties = .{ .param_str = "ff*3fIiIiIb", .target_set = TargetSet.initOne(.amdgpu) } },
9350 .{ .tag = .__builtin_amdgcn_ds_fminf, .properties = .{ .param_str = "ff*3fIiIiIb", .target_set = TargetSet.initOne(.amdgpu) } },
9351 .{ .tag = .__builtin_amdgcn_ds_permute, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9352 .{ .tag = .__builtin_amdgcn_ds_swizzle, .properties = .{ .param_str = "iiIi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9353 .{ .tag = .__builtin_amdgcn_endpgm, .properties = .{ .param_str = "v", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .noreturn = true } } },
9354 .{ .tag = .__builtin_amdgcn_exp2f, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9355 .{ .tag = .__builtin_amdgcn_fcmp, .properties = .{ .param_str = "WUiddIi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9356 .{ .tag = .__builtin_amdgcn_fcmpf, .properties = .{ .param_str = "WUiffIi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9357 .{ .tag = .__builtin_amdgcn_fence, .properties = .{ .param_str = "vUicC*", .target_set = TargetSet.initOne(.amdgpu) } },
9358 .{ .tag = .__builtin_amdgcn_fmed3f, .properties = .{ .param_str = "ffff", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9359 .{ .tag = .__builtin_amdgcn_fract, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9360 .{ .tag = .__builtin_amdgcn_fractf, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9361 .{ .tag = .__builtin_amdgcn_frexp_exp, .properties = .{ .param_str = "id", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9362 .{ .tag = .__builtin_amdgcn_frexp_expf, .properties = .{ .param_str = "if", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9363 .{ .tag = .__builtin_amdgcn_frexp_mant, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9364 .{ .tag = .__builtin_amdgcn_frexp_mantf, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9365 .{ .tag = .__builtin_amdgcn_grid_size_x, .properties = .{ .param_str = "Ui", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9366 .{ .tag = .__builtin_amdgcn_grid_size_y, .properties = .{ .param_str = "Ui", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9367 .{ .tag = .__builtin_amdgcn_grid_size_z, .properties = .{ .param_str = "Ui", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9368 .{ .tag = .__builtin_amdgcn_groupstaticsize, .properties = .{ .param_str = "Ui", .target_set = TargetSet.initOne(.amdgpu) } },
9369 .{ .tag = .__builtin_amdgcn_iglp_opt, .properties = .{ .param_str = "vIi", .target_set = TargetSet.initOne(.amdgpu) } },
9370 .{ .tag = .__builtin_amdgcn_implicitarg_ptr, .properties = .{ .param_str = "v*4", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9371 .{ .tag = .__builtin_amdgcn_interp_mov, .properties = .{ .param_str = "fUiUiUiUi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9372 .{ .tag = .__builtin_amdgcn_interp_p1, .properties = .{ .param_str = "ffUiUiUi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9373 .{ .tag = .__builtin_amdgcn_interp_p1_f16, .properties = .{ .param_str = "ffUiUibUi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9374 .{ .tag = .__builtin_amdgcn_interp_p2, .properties = .{ .param_str = "fffUiUiUi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9375 .{ .tag = .__builtin_amdgcn_interp_p2_f16, .properties = .{ .param_str = "hffUiUibUi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9376 .{ .tag = .__builtin_amdgcn_is_private, .properties = .{ .param_str = "bvC*0", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9377 .{ .tag = .__builtin_amdgcn_is_shared, .properties = .{ .param_str = "bvC*0", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9378 .{ .tag = .__builtin_amdgcn_kernarg_segment_ptr, .properties = .{ .param_str = "v*4", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9379 .{ .tag = .__builtin_amdgcn_ldexp, .properties = .{ .param_str = "ddi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9380 .{ .tag = .__builtin_amdgcn_ldexpf, .properties = .{ .param_str = "ffi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9381 .{ .tag = .__builtin_amdgcn_lerp, .properties = .{ .param_str = "UiUiUiUi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9382 .{ .tag = .__builtin_amdgcn_log_clampf, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9383 .{ .tag = .__builtin_amdgcn_logf, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9384 .{ .tag = .__builtin_amdgcn_mbcnt_hi, .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9385 .{ .tag = .__builtin_amdgcn_mbcnt_lo, .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9386 .{ .tag = .__builtin_amdgcn_mqsad_pk_u16_u8, .properties = .{ .param_str = "WUiWUiUiWUi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9387 .{ .tag = .__builtin_amdgcn_mqsad_u32_u8, .properties = .{ .param_str = "V4UiWUiUiV4Ui", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9388 .{ .tag = .__builtin_amdgcn_msad_u8, .properties = .{ .param_str = "UiUiUiUi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9389 .{ .tag = .__builtin_amdgcn_qsad_pk_u16_u8, .properties = .{ .param_str = "WUiWUiUiWUi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9390 .{ .tag = .__builtin_amdgcn_queue_ptr, .properties = .{ .param_str = "v*4", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9391 .{ .tag = .__builtin_amdgcn_rcp, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9392 .{ .tag = .__builtin_amdgcn_rcpf, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9393 .{ .tag = .__builtin_amdgcn_read_exec, .properties = .{ .param_str = "WUi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9394 .{ .tag = .__builtin_amdgcn_read_exec_hi, .properties = .{ .param_str = "Ui", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9395 .{ .tag = .__builtin_amdgcn_read_exec_lo, .properties = .{ .param_str = "Ui", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9396 .{ .tag = .__builtin_amdgcn_readfirstlane, .properties = .{ .param_str = "ii", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9397 .{ .tag = .__builtin_amdgcn_readlane, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9398 .{ .tag = .__builtin_amdgcn_rsq, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9399 .{ .tag = .__builtin_amdgcn_rsq_clamp, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9400 .{ .tag = .__builtin_amdgcn_rsq_clampf, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9401 .{ .tag = .__builtin_amdgcn_rsqf, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9402 .{ .tag = .__builtin_amdgcn_s_barrier, .properties = .{ .param_str = "v", .target_set = TargetSet.initOne(.amdgpu) } },
9403 .{ .tag = .__builtin_amdgcn_s_dcache_inv, .properties = .{ .param_str = "v", .target_set = TargetSet.initOne(.amdgpu) } },
9404 .{ .tag = .__builtin_amdgcn_s_decperflevel, .properties = .{ .param_str = "vIi", .target_set = TargetSet.initOne(.amdgpu) } },
9405 .{ .tag = .__builtin_amdgcn_s_getpc, .properties = .{ .param_str = "WUi", .target_set = TargetSet.initOne(.amdgpu) } },
9406 .{ .tag = .__builtin_amdgcn_s_getreg, .properties = .{ .param_str = "UiIi", .target_set = TargetSet.initOne(.amdgpu) } },
9407 .{ .tag = .__builtin_amdgcn_s_incperflevel, .properties = .{ .param_str = "vIi", .target_set = TargetSet.initOne(.amdgpu) } },
9408 .{ .tag = .__builtin_amdgcn_s_sendmsg, .properties = .{ .param_str = "vIiUi", .target_set = TargetSet.initOne(.amdgpu) } },
9409 .{ .tag = .__builtin_amdgcn_s_sendmsghalt, .properties = .{ .param_str = "vIiUi", .target_set = TargetSet.initOne(.amdgpu) } },
9410 .{ .tag = .__builtin_amdgcn_s_setprio, .properties = .{ .param_str = "vIs", .target_set = TargetSet.initOne(.amdgpu) } },
9411 .{ .tag = .__builtin_amdgcn_s_setreg, .properties = .{ .param_str = "vIiUi", .target_set = TargetSet.initOne(.amdgpu) } },
9412 .{ .tag = .__builtin_amdgcn_s_sleep, .properties = .{ .param_str = "vIi", .target_set = TargetSet.initOne(.amdgpu) } },
9413 .{ .tag = .__builtin_amdgcn_s_waitcnt, .properties = .{ .param_str = "vIi", .target_set = TargetSet.initOne(.amdgpu) } },
9414 .{ .tag = .__builtin_amdgcn_sad_hi_u8, .properties = .{ .param_str = "UiUiUiUi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9415 .{ .tag = .__builtin_amdgcn_sad_u16, .properties = .{ .param_str = "UiUiUiUi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9416 .{ .tag = .__builtin_amdgcn_sad_u8, .properties = .{ .param_str = "UiUiUiUi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9417 .{ .tag = .__builtin_amdgcn_sbfe, .properties = .{ .param_str = "UiUiUiUi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9418 .{ .tag = .__builtin_amdgcn_sched_barrier, .properties = .{ .param_str = "vIi", .target_set = TargetSet.initOne(.amdgpu) } },
9419 .{ .tag = .__builtin_amdgcn_sched_group_barrier, .properties = .{ .param_str = "vIiIiIi", .target_set = TargetSet.initOne(.amdgpu) } },
9420 .{ .tag = .__builtin_amdgcn_sicmp, .properties = .{ .param_str = "WUiiiIi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9421 .{ .tag = .__builtin_amdgcn_sicmpl, .properties = .{ .param_str = "WUiWiWiIi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9422 .{ .tag = .__builtin_amdgcn_sinf, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9423 .{ .tag = .__builtin_amdgcn_sqrt, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9424 .{ .tag = .__builtin_amdgcn_sqrtf, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9425 .{ .tag = .__builtin_amdgcn_trig_preop, .properties = .{ .param_str = "ddi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9426 .{ .tag = .__builtin_amdgcn_trig_preopf, .properties = .{ .param_str = "ffi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9427 .{ .tag = .__builtin_amdgcn_ubfe, .properties = .{ .param_str = "UiUiUiUi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9428 .{ .tag = .__builtin_amdgcn_uicmp, .properties = .{ .param_str = "WUiUiUiIi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9429 .{ .tag = .__builtin_amdgcn_uicmpl, .properties = .{ .param_str = "WUiWUiWUiIi", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9430 .{ .tag = .__builtin_amdgcn_wave_barrier, .properties = .{ .param_str = "v", .target_set = TargetSet.initOne(.amdgpu) } },
9431 .{ .tag = .__builtin_amdgcn_workgroup_id_x, .properties = .{ .param_str = "Ui", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9432 .{ .tag = .__builtin_amdgcn_workgroup_id_y, .properties = .{ .param_str = "Ui", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9433 .{ .tag = .__builtin_amdgcn_workgroup_id_z, .properties = .{ .param_str = "Ui", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9434 .{ .tag = .__builtin_amdgcn_workgroup_size_x, .properties = .{ .param_str = "Us", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9435 .{ .tag = .__builtin_amdgcn_workgroup_size_y, .properties = .{ .param_str = "Us", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9436 .{ .tag = .__builtin_amdgcn_workgroup_size_z, .properties = .{ .param_str = "Us", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9437 .{ .tag = .__builtin_amdgcn_workitem_id_x, .properties = .{ .param_str = "Ui", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9438 .{ .tag = .__builtin_amdgcn_workitem_id_y, .properties = .{ .param_str = "Ui", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9439 .{ .tag = .__builtin_amdgcn_workitem_id_z, .properties = .{ .param_str = "Ui", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
9440 .{ .tag = .__builtin_annotation, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
9441 .{ .tag = .__builtin_arm_cdp, .properties = .{ .param_str = "vUIiUIiUIiUIiUIiUIi", .target_set = TargetSet.initOne(.arm) } },
9442 .{ .tag = .__builtin_arm_cdp2, .properties = .{ .param_str = "vUIiUIiUIiUIiUIiUIi", .target_set = TargetSet.initOne(.arm) } },
9443 .{ .tag = .__builtin_arm_clrex, .properties = .{ .param_str = "v", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) } },
9444 .{ .tag = .__builtin_arm_cls, .properties = .{ .param_str = "UiZUi", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } },
9445 .{ .tag = .__builtin_arm_cls64, .properties = .{ .param_str = "UiWUi", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } },
9446 .{ .tag = .__builtin_arm_clz, .properties = .{ .param_str = "UiZUi", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } },
9447 .{ .tag = .__builtin_arm_clz64, .properties = .{ .param_str = "UiWUi", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } },
9448 .{ .tag = .__builtin_arm_cmse_TT, .properties = .{ .param_str = "Uiv*", .target_set = TargetSet.initOne(.arm) } },
9449 .{ .tag = .__builtin_arm_cmse_TTA, .properties = .{ .param_str = "Uiv*", .target_set = TargetSet.initOne(.arm) } },
9450 .{ .tag = .__builtin_arm_cmse_TTAT, .properties = .{ .param_str = "Uiv*", .target_set = TargetSet.initOne(.arm) } },
9451 .{ .tag = .__builtin_arm_cmse_TTT, .properties = .{ .param_str = "Uiv*", .target_set = TargetSet.initOne(.arm) } },
9452 .{ .tag = .__builtin_arm_dbg, .properties = .{ .param_str = "vUi", .target_set = TargetSet.initOne(.arm) } },
9453 .{ .tag = .__builtin_arm_dmb, .properties = .{ .param_str = "vUi", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } },
9454 .{ .tag = .__builtin_arm_dsb, .properties = .{ .param_str = "vUi", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } },
9455 .{ .tag = .__builtin_arm_get_fpscr, .properties = .{ .param_str = "Ui", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9456 .{ .tag = .__builtin_arm_isb, .properties = .{ .param_str = "vUi", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } },
9457 .{ .tag = .__builtin_arm_ldaex, .properties = .{ .param_str = "v.", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .custom_typecheck = true } } },
9458 .{ .tag = .__builtin_arm_ldc, .properties = .{ .param_str = "vUIiUIivC*", .target_set = TargetSet.initOne(.arm) } },
9459 .{ .tag = .__builtin_arm_ldc2, .properties = .{ .param_str = "vUIiUIivC*", .target_set = TargetSet.initOne(.arm) } },
9460 .{ .tag = .__builtin_arm_ldc2l, .properties = .{ .param_str = "vUIiUIivC*", .target_set = TargetSet.initOne(.arm) } },
9461 .{ .tag = .__builtin_arm_ldcl, .properties = .{ .param_str = "vUIiUIivC*", .target_set = TargetSet.initOne(.arm) } },
9462 .{ .tag = .__builtin_arm_ldrex, .properties = .{ .param_str = "v.", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .custom_typecheck = true } } },
9463 .{ .tag = .__builtin_arm_ldrexd, .properties = .{ .param_str = "LLUiv*", .target_set = TargetSet.initOne(.arm) } },
9464 .{ .tag = .__builtin_arm_mcr, .properties = .{ .param_str = "vUIiUIiUiUIiUIiUIi", .target_set = TargetSet.initOne(.arm) } },
9465 .{ .tag = .__builtin_arm_mcr2, .properties = .{ .param_str = "vUIiUIiUiUIiUIiUIi", .target_set = TargetSet.initOne(.arm) } },
9466 .{ .tag = .__builtin_arm_mcrr, .properties = .{ .param_str = "vUIiUIiLLUiUIi", .target_set = TargetSet.initOne(.arm) } },
9467 .{ .tag = .__builtin_arm_mcrr2, .properties = .{ .param_str = "vUIiUIiLLUiUIi", .target_set = TargetSet.initOne(.arm) } },
9468 .{ .tag = .__builtin_arm_mrc, .properties = .{ .param_str = "UiUIiUIiUIiUIiUIi", .target_set = TargetSet.initOne(.arm) } },
9469 .{ .tag = .__builtin_arm_mrc2, .properties = .{ .param_str = "UiUIiUIiUIiUIiUIi", .target_set = TargetSet.initOne(.arm) } },
9470 .{ .tag = .__builtin_arm_mrrc, .properties = .{ .param_str = "LLUiUIiUIiUIi", .target_set = TargetSet.initOne(.arm) } },
9471 .{ .tag = .__builtin_arm_mrrc2, .properties = .{ .param_str = "LLUiUIiUIiUIi", .target_set = TargetSet.initOne(.arm) } },
9472 .{ .tag = .__builtin_arm_nop, .properties = .{ .param_str = "v", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) } },
9473 .{ .tag = .__builtin_arm_prefetch, .properties = .{ .param_str = "!", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } },
9474 .{ .tag = .__builtin_arm_qadd, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9475 .{ .tag = .__builtin_arm_qadd16, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9476 .{ .tag = .__builtin_arm_qadd8, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9477 .{ .tag = .__builtin_arm_qasx, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9478 .{ .tag = .__builtin_arm_qdbl, .properties = .{ .param_str = "ii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9479 .{ .tag = .__builtin_arm_qsax, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9480 .{ .tag = .__builtin_arm_qsub, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9481 .{ .tag = .__builtin_arm_qsub16, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9482 .{ .tag = .__builtin_arm_qsub8, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9483 .{ .tag = .__builtin_arm_rbit, .properties = .{ .param_str = "UiUi", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } },
9484 .{ .tag = .__builtin_arm_rbit64, .properties = .{ .param_str = "WUiWUi", .target_set = TargetSet.initOne(.aarch64), .attributes = .{ .@"const" = true } } },
9485 .{ .tag = .__builtin_arm_rsr, .properties = .{ .param_str = "UicC*", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } },
9486 .{ .tag = .__builtin_arm_rsr64, .properties = .{ .param_str = "!", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } },
9487 .{ .tag = .__builtin_arm_rsrp, .properties = .{ .param_str = "v*cC*", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } },
9488 .{ .tag = .__builtin_arm_sadd16, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9489 .{ .tag = .__builtin_arm_sadd8, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9490 .{ .tag = .__builtin_arm_sasx, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9491 .{ .tag = .__builtin_arm_sel, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9492 .{ .tag = .__builtin_arm_set_fpscr, .properties = .{ .param_str = "vUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9493 .{ .tag = .__builtin_arm_sev, .properties = .{ .param_str = "v", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) } },
9494 .{ .tag = .__builtin_arm_sevl, .properties = .{ .param_str = "v", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) } },
9495 .{ .tag = .__builtin_arm_shadd16, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9496 .{ .tag = .__builtin_arm_shadd8, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9497 .{ .tag = .__builtin_arm_shasx, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9498 .{ .tag = .__builtin_arm_shsax, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9499 .{ .tag = .__builtin_arm_shsub16, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9500 .{ .tag = .__builtin_arm_shsub8, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9501 .{ .tag = .__builtin_arm_smlabb, .properties = .{ .param_str = "iiii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9502 .{ .tag = .__builtin_arm_smlabt, .properties = .{ .param_str = "iiii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9503 .{ .tag = .__builtin_arm_smlad, .properties = .{ .param_str = "iiii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9504 .{ .tag = .__builtin_arm_smladx, .properties = .{ .param_str = "iiii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9505 .{ .tag = .__builtin_arm_smlald, .properties = .{ .param_str = "LLiiiLLi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9506 .{ .tag = .__builtin_arm_smlaldx, .properties = .{ .param_str = "LLiiiLLi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9507 .{ .tag = .__builtin_arm_smlatb, .properties = .{ .param_str = "iiii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9508 .{ .tag = .__builtin_arm_smlatt, .properties = .{ .param_str = "iiii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9509 .{ .tag = .__builtin_arm_smlawb, .properties = .{ .param_str = "iiii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9510 .{ .tag = .__builtin_arm_smlawt, .properties = .{ .param_str = "iiii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9511 .{ .tag = .__builtin_arm_smlsd, .properties = .{ .param_str = "iiii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9512 .{ .tag = .__builtin_arm_smlsdx, .properties = .{ .param_str = "iiii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9513 .{ .tag = .__builtin_arm_smlsld, .properties = .{ .param_str = "LLiiiLLi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9514 .{ .tag = .__builtin_arm_smlsldx, .properties = .{ .param_str = "LLiiiLLi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9515 .{ .tag = .__builtin_arm_smuad, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9516 .{ .tag = .__builtin_arm_smuadx, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9517 .{ .tag = .__builtin_arm_smulbb, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9518 .{ .tag = .__builtin_arm_smulbt, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9519 .{ .tag = .__builtin_arm_smultb, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9520 .{ .tag = .__builtin_arm_smultt, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9521 .{ .tag = .__builtin_arm_smulwb, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9522 .{ .tag = .__builtin_arm_smulwt, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9523 .{ .tag = .__builtin_arm_smusd, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9524 .{ .tag = .__builtin_arm_smusdx, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9525 .{ .tag = .__builtin_arm_ssat, .properties = .{ .param_str = "iiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9526 .{ .tag = .__builtin_arm_ssat16, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9527 .{ .tag = .__builtin_arm_ssax, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9528 .{ .tag = .__builtin_arm_ssub16, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9529 .{ .tag = .__builtin_arm_ssub8, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9530 .{ .tag = .__builtin_arm_stc, .properties = .{ .param_str = "vUIiUIiv*", .target_set = TargetSet.initOne(.arm) } },
9531 .{ .tag = .__builtin_arm_stc2, .properties = .{ .param_str = "vUIiUIiv*", .target_set = TargetSet.initOne(.arm) } },
9532 .{ .tag = .__builtin_arm_stc2l, .properties = .{ .param_str = "vUIiUIiv*", .target_set = TargetSet.initOne(.arm) } },
9533 .{ .tag = .__builtin_arm_stcl, .properties = .{ .param_str = "vUIiUIiv*", .target_set = TargetSet.initOne(.arm) } },
9534 .{ .tag = .__builtin_arm_stlex, .properties = .{ .param_str = "i.", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .custom_typecheck = true } } },
9535 .{ .tag = .__builtin_arm_strex, .properties = .{ .param_str = "i.", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .custom_typecheck = true } } },
9536 .{ .tag = .__builtin_arm_strexd, .properties = .{ .param_str = "iLLUiv*", .target_set = TargetSet.initOne(.arm) } },
9537 .{ .tag = .__builtin_arm_sxtab16, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9538 .{ .tag = .__builtin_arm_sxtb16, .properties = .{ .param_str = "ii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9539 .{ .tag = .__builtin_arm_tcancel, .properties = .{ .param_str = "vWUIi", .target_set = TargetSet.initOne(.aarch64) } },
9540 .{ .tag = .__builtin_arm_tcommit, .properties = .{ .param_str = "v", .target_set = TargetSet.initOne(.aarch64) } },
9541 .{ .tag = .__builtin_arm_tstart, .properties = .{ .param_str = "WUi", .target_set = TargetSet.initOne(.aarch64), .attributes = .{ .returns_twice = true } } },
9542 .{ .tag = .__builtin_arm_ttest, .properties = .{ .param_str = "WUi", .target_set = TargetSet.initOne(.aarch64), .attributes = .{ .@"const" = true } } },
9543 .{ .tag = .__builtin_arm_uadd16, .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9544 .{ .tag = .__builtin_arm_uadd8, .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9545 .{ .tag = .__builtin_arm_uasx, .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9546 .{ .tag = .__builtin_arm_uhadd16, .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9547 .{ .tag = .__builtin_arm_uhadd8, .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9548 .{ .tag = .__builtin_arm_uhasx, .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9549 .{ .tag = .__builtin_arm_uhsax, .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9550 .{ .tag = .__builtin_arm_uhsub16, .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9551 .{ .tag = .__builtin_arm_uhsub8, .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9552 .{ .tag = .__builtin_arm_uqadd16, .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9553 .{ .tag = .__builtin_arm_uqadd8, .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9554 .{ .tag = .__builtin_arm_uqasx, .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9555 .{ .tag = .__builtin_arm_uqsax, .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9556 .{ .tag = .__builtin_arm_uqsub16, .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9557 .{ .tag = .__builtin_arm_uqsub8, .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9558 .{ .tag = .__builtin_arm_usad8, .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9559 .{ .tag = .__builtin_arm_usada8, .properties = .{ .param_str = "UiUiUiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9560 .{ .tag = .__builtin_arm_usat, .properties = .{ .param_str = "UiiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9561 .{ .tag = .__builtin_arm_usat16, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9562 .{ .tag = .__builtin_arm_usax, .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9563 .{ .tag = .__builtin_arm_usub16, .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9564 .{ .tag = .__builtin_arm_usub8, .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9565 .{ .tag = .__builtin_arm_uxtab16, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9566 .{ .tag = .__builtin_arm_uxtb16, .properties = .{ .param_str = "ii", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9567 .{ .tag = .__builtin_arm_vcvtr_d, .properties = .{ .param_str = "fdi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9568 .{ .tag = .__builtin_arm_vcvtr_f, .properties = .{ .param_str = "ffi", .target_set = TargetSet.initOne(.arm), .attributes = .{ .@"const" = true } } },
9569 .{ .tag = .__builtin_arm_wfe, .properties = .{ .param_str = "v", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) } },
9570 .{ .tag = .__builtin_arm_wfi, .properties = .{ .param_str = "v", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) } },
9571 .{ .tag = .__builtin_arm_wsr, .properties = .{ .param_str = "vcC*Ui", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } },
9572 .{ .tag = .__builtin_arm_wsr64, .properties = .{ .param_str = "!", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } },
9573 .{ .tag = .__builtin_arm_wsrp, .properties = .{ .param_str = "vcC*vC*", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } },
9574 .{ .tag = .__builtin_arm_yield, .properties = .{ .param_str = "v", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) } },
9575 .{ .tag = .__builtin_asin, .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9576 .{ .tag = .__builtin_asinf, .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9577 .{ .tag = .__builtin_asinf128, .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9578 .{ .tag = .__builtin_asinh, .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9579 .{ .tag = .__builtin_asinhf, .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9580 .{ .tag = .__builtin_asinhf128, .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9581 .{ .tag = .__builtin_asinhl, .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9582 .{ .tag = .__builtin_asinl, .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9583 .{ .tag = .__builtin_assume, .properties = .{ .param_str = "vb", .attributes = .{ .const_evaluable = true } } },
9584 .{ .tag = .__builtin_assume_aligned, .properties = .{ .param_str = "v*vC*z.", .attributes = .{ .@"const" = true, .custom_typecheck = true, .const_evaluable = true } } },
9585 .{ .tag = .__builtin_assume_separate_storage, .properties = .{ .param_str = "vvCD*vCD*", .attributes = .{ .const_evaluable = true } } },
9586 .{ .tag = .__builtin_atan, .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9587 .{ .tag = .__builtin_atan2, .properties = .{ .param_str = "ddd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9588 .{ .tag = .__builtin_atan2f, .properties = .{ .param_str = "fff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9589 .{ .tag = .__builtin_atan2f128, .properties = .{ .param_str = "LLdLLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9590 .{ .tag = .__builtin_atan2l, .properties = .{ .param_str = "LdLdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9591 .{ .tag = .__builtin_atanf, .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9592 .{ .tag = .__builtin_atanf128, .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9593 .{ .tag = .__builtin_atanh, .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9594 .{ .tag = .__builtin_atanhf, .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9595 .{ .tag = .__builtin_atanhf128, .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9596 .{ .tag = .__builtin_atanhl, .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9597 .{ .tag = .__builtin_atanl, .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9598 .{ .tag = .__builtin_bcmp, .properties = .{ .param_str = "ivC*vC*z", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
9599 .{ .tag = .__builtin_bcopy, .properties = .{ .param_str = "vvC*v*z", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
9600 .{ .tag = .__builtin_bitoffsetof, .properties = .{ .param_str = "z.", .attributes = .{ .custom_typecheck = true } } },
9601 .{ .tag = .__builtin_bitrev, .properties = .{ .param_str = "UiUi", .target_set = TargetSet.initOne(.xcore), .attributes = .{ .@"const" = true } } },
9602 .{ .tag = .__builtin_bitreverse16, .properties = .{ .param_str = "UsUs", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
9603 .{ .tag = .__builtin_bitreverse32, .properties = .{ .param_str = "UZiUZi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
9604 .{ .tag = .__builtin_bitreverse64, .properties = .{ .param_str = "UWiUWi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
9605 .{ .tag = .__builtin_bitreverse8, .properties = .{ .param_str = "UcUc", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
9606 .{ .tag = .__builtin_bswap16, .properties = .{ .param_str = "UsUs", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
9607 .{ .tag = .__builtin_bswap32, .properties = .{ .param_str = "UZiUZi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
9608 .{ .tag = .__builtin_bswap64, .properties = .{ .param_str = "UWiUWi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
9609 .{ .tag = .__builtin_bzero, .properties = .{ .param_str = "vv*z", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
9610 .{ .tag = .__builtin_cabs, .properties = .{ .param_str = "dXd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9611 .{ .tag = .__builtin_cabsf, .properties = .{ .param_str = "fXf", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9612 .{ .tag = .__builtin_cabsl, .properties = .{ .param_str = "LdXLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9613 .{ .tag = .__builtin_cacos, .properties = .{ .param_str = "XdXd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9614 .{ .tag = .__builtin_cacosf, .properties = .{ .param_str = "XfXf", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9615 .{ .tag = .__builtin_cacosh, .properties = .{ .param_str = "XdXd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9616 .{ .tag = .__builtin_cacoshf, .properties = .{ .param_str = "XfXf", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9617 .{ .tag = .__builtin_cacoshl, .properties = .{ .param_str = "XLdXLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9618 .{ .tag = .__builtin_cacosl, .properties = .{ .param_str = "XLdXLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9619 .{ .tag = .__builtin_call_with_static_chain, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
9620 .{ .tag = .__builtin_calloc, .properties = .{ .param_str = "v*zz", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
9621 .{ .tag = .__builtin_canonicalize, .properties = .{ .param_str = "dd", .attributes = .{ .@"const" = true } } },
9622 .{ .tag = .__builtin_canonicalizef, .properties = .{ .param_str = "ff", .attributes = .{ .@"const" = true } } },
9623 .{ .tag = .__builtin_canonicalizef16, .properties = .{ .param_str = "hh", .attributes = .{ .@"const" = true } } },
9624 .{ .tag = .__builtin_canonicalizel, .properties = .{ .param_str = "LdLd", .attributes = .{ .@"const" = true } } },
9625 .{ .tag = .__builtin_carg, .properties = .{ .param_str = "dXd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9626 .{ .tag = .__builtin_cargf, .properties = .{ .param_str = "fXf", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9627 .{ .tag = .__builtin_cargl, .properties = .{ .param_str = "LdXLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9628 .{ .tag = .__builtin_casin, .properties = .{ .param_str = "XdXd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9629 .{ .tag = .__builtin_casinf, .properties = .{ .param_str = "XfXf", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9630 .{ .tag = .__builtin_casinh, .properties = .{ .param_str = "XdXd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9631 .{ .tag = .__builtin_casinhf, .properties = .{ .param_str = "XfXf", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9632 .{ .tag = .__builtin_casinhl, .properties = .{ .param_str = "XLdXLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9633 .{ .tag = .__builtin_casinl, .properties = .{ .param_str = "XLdXLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9634 .{ .tag = .__builtin_catan, .properties = .{ .param_str = "XdXd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9635 .{ .tag = .__builtin_catanf, .properties = .{ .param_str = "XfXf", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9636 .{ .tag = .__builtin_catanh, .properties = .{ .param_str = "XdXd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9637 .{ .tag = .__builtin_catanhf, .properties = .{ .param_str = "XfXf", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9638 .{ .tag = .__builtin_catanhl, .properties = .{ .param_str = "XLdXLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9639 .{ .tag = .__builtin_catanl, .properties = .{ .param_str = "XLdXLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9640 .{ .tag = .__builtin_cbrt, .properties = .{ .param_str = "dd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
9641 .{ .tag = .__builtin_cbrtf, .properties = .{ .param_str = "ff", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
9642 .{ .tag = .__builtin_cbrtf128, .properties = .{ .param_str = "LLdLLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
9643 .{ .tag = .__builtin_cbrtl, .properties = .{ .param_str = "LdLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
9644 .{ .tag = .__builtin_ccos, .properties = .{ .param_str = "XdXd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9645 .{ .tag = .__builtin_ccosf, .properties = .{ .param_str = "XfXf", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9646 .{ .tag = .__builtin_ccosh, .properties = .{ .param_str = "XdXd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9647 .{ .tag = .__builtin_ccoshf, .properties = .{ .param_str = "XfXf", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9648 .{ .tag = .__builtin_ccoshl, .properties = .{ .param_str = "XLdXLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9649 .{ .tag = .__builtin_ccosl, .properties = .{ .param_str = "XLdXLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9650 .{ .tag = .__builtin_ceil, .properties = .{ .param_str = "dd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
9651 .{ .tag = .__builtin_ceilf, .properties = .{ .param_str = "ff", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
9652 .{ .tag = .__builtin_ceilf128, .properties = .{ .param_str = "LLdLLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
9653 .{ .tag = .__builtin_ceilf16, .properties = .{ .param_str = "hh", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
9654 .{ .tag = .__builtin_ceill, .properties = .{ .param_str = "LdLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
9655 .{ .tag = .__builtin_cexp, .properties = .{ .param_str = "XdXd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9656 .{ .tag = .__builtin_cexpf, .properties = .{ .param_str = "XfXf", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9657 .{ .tag = .__builtin_cexpl, .properties = .{ .param_str = "XLdXLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9658 .{ .tag = .__builtin_char_memchr, .properties = .{ .param_str = "c*cC*iz", .attributes = .{ .const_evaluable = true } } },
9659 .{ .tag = .__builtin_choose_expr, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
9660 .{ .tag = .__builtin_cimag, .properties = .{ .param_str = "dXd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
9661 .{ .tag = .__builtin_cimagf, .properties = .{ .param_str = "fXf", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
9662 .{ .tag = .__builtin_cimagl, .properties = .{ .param_str = "LdXLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
9663 .{ .tag = .__builtin_classify_type, .properties = .{ .param_str = "i.", .attributes = .{ .@"const" = true, .custom_typecheck = true, .eval_args = false, .const_evaluable = true } } },
9664 .{ .tag = .__builtin_clog, .properties = .{ .param_str = "XdXd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9665 .{ .tag = .__builtin_clogf, .properties = .{ .param_str = "XfXf", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9666 .{ .tag = .__builtin_clogl, .properties = .{ .param_str = "XLdXLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9667 .{ .tag = .__builtin_clrsb, .properties = .{ .param_str = "ii", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
9668 .{ .tag = .__builtin_clrsbl, .properties = .{ .param_str = "iLi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
9669 .{ .tag = .__builtin_clrsbll, .properties = .{ .param_str = "iLLi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
9670 .{ .tag = .__builtin_clz, .properties = .{ .param_str = "iUi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
9671 .{ .tag = .__builtin_clzl, .properties = .{ .param_str = "iULi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
9672 .{ .tag = .__builtin_clzll, .properties = .{ .param_str = "iULLi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
9673 .{ .tag = .__builtin_clzs, .properties = .{ .param_str = "iUs", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
9674 .{ .tag = .__builtin_complex, .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true, .const_evaluable = true } } },
9675 .{ .tag = .__builtin_conj, .properties = .{ .param_str = "XdXd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
9676 .{ .tag = .__builtin_conjf, .properties = .{ .param_str = "XfXf", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
9677 .{ .tag = .__builtin_conjl, .properties = .{ .param_str = "XLdXLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
9678 .{ .tag = .__builtin_constant_p, .properties = .{ .param_str = "i.", .attributes = .{ .@"const" = true, .custom_typecheck = true, .eval_args = false, .const_evaluable = true } } },
9679 .{ .tag = .__builtin_convertvector, .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
9680 .{ .tag = .__builtin_copysign, .properties = .{ .param_str = "ddd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
9681 .{ .tag = .__builtin_copysignf, .properties = .{ .param_str = "fff", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
9682 .{ .tag = .__builtin_copysignf128, .properties = .{ .param_str = "LLdLLdLLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
9683 .{ .tag = .__builtin_copysignf16, .properties = .{ .param_str = "hhh", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
9684 .{ .tag = .__builtin_copysignl, .properties = .{ .param_str = "LdLdLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
9685 .{ .tag = .__builtin_cos, .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9686 .{ .tag = .__builtin_cosf, .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9687 .{ .tag = .__builtin_cosf128, .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9688 .{ .tag = .__builtin_cosf16, .properties = .{ .param_str = "hh", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9689 .{ .tag = .__builtin_cosh, .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9690 .{ .tag = .__builtin_coshf, .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9691 .{ .tag = .__builtin_coshf128, .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9692 .{ .tag = .__builtin_coshl, .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9693 .{ .tag = .__builtin_cosl, .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9694 .{ .tag = .__builtin_cpow, .properties = .{ .param_str = "XdXdXd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9695 .{ .tag = .__builtin_cpowf, .properties = .{ .param_str = "XfXfXf", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9696 .{ .tag = .__builtin_cpowl, .properties = .{ .param_str = "XLdXLdXLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9697 .{ .tag = .__builtin_cproj, .properties = .{ .param_str = "XdXd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
9698 .{ .tag = .__builtin_cprojf, .properties = .{ .param_str = "XfXf", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
9699 .{ .tag = .__builtin_cprojl, .properties = .{ .param_str = "XLdXLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
9700 .{ .tag = .__builtin_cpu_init, .properties = .{ .param_str = "v", .target_set = TargetSet.initOne(.x86) } },
9701 .{ .tag = .__builtin_cpu_is, .properties = .{ .param_str = "bcC*", .target_set = TargetSet.initOne(.x86), .attributes = .{ .@"const" = true } } },
9702 .{ .tag = .__builtin_cpu_supports, .properties = .{ .param_str = "bcC*", .target_set = TargetSet.initOne(.x86), .attributes = .{ .@"const" = true } } },
9703 .{ .tag = .__builtin_creal, .properties = .{ .param_str = "dXd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
9704 .{ .tag = .__builtin_crealf, .properties = .{ .param_str = "fXf", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
9705 .{ .tag = .__builtin_creall, .properties = .{ .param_str = "LdXLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
9706 .{ .tag = .__builtin_csin, .properties = .{ .param_str = "XdXd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9707 .{ .tag = .__builtin_csinf, .properties = .{ .param_str = "XfXf", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9708 .{ .tag = .__builtin_csinh, .properties = .{ .param_str = "XdXd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9709 .{ .tag = .__builtin_csinhf, .properties = .{ .param_str = "XfXf", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9710 .{ .tag = .__builtin_csinhl, .properties = .{ .param_str = "XLdXLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9711 .{ .tag = .__builtin_csinl, .properties = .{ .param_str = "XLdXLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9712 .{ .tag = .__builtin_csqrt, .properties = .{ .param_str = "XdXd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9713 .{ .tag = .__builtin_csqrtf, .properties = .{ .param_str = "XfXf", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9714 .{ .tag = .__builtin_csqrtl, .properties = .{ .param_str = "XLdXLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9715 .{ .tag = .__builtin_ctan, .properties = .{ .param_str = "XdXd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9716 .{ .tag = .__builtin_ctanf, .properties = .{ .param_str = "XfXf", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9717 .{ .tag = .__builtin_ctanh, .properties = .{ .param_str = "XdXd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9718 .{ .tag = .__builtin_ctanhf, .properties = .{ .param_str = "XfXf", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9719 .{ .tag = .__builtin_ctanhl, .properties = .{ .param_str = "XLdXLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9720 .{ .tag = .__builtin_ctanl, .properties = .{ .param_str = "XLdXLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9721 .{ .tag = .__builtin_ctz, .properties = .{ .param_str = "iUi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
9722 .{ .tag = .__builtin_ctzl, .properties = .{ .param_str = "iULi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
9723 .{ .tag = .__builtin_ctzll, .properties = .{ .param_str = "iULLi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
9724 .{ .tag = .__builtin_ctzs, .properties = .{ .param_str = "iUs", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
9725 .{ .tag = .__builtin_dcbf, .properties = .{ .param_str = "vvC*", .target_set = TargetSet.initOne(.ppc) } },
9726 .{ .tag = .__builtin_debugtrap, .properties = .{ .param_str = "v" } },
9727 .{ .tag = .__builtin_dump_struct, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
9728 .{ .tag = .__builtin_dwarf_cfa, .properties = .{ .param_str = "v*" } },
9729 .{ .tag = .__builtin_dwarf_sp_column, .properties = .{ .param_str = "Ui" } },
9730 .{ .tag = .__builtin_dynamic_object_size, .properties = .{ .param_str = "zvC*i", .attributes = .{ .eval_args = false, .const_evaluable = true } } },
9731 .{ .tag = .__builtin_eh_return, .properties = .{ .param_str = "vzv*", .attributes = .{ .noreturn = true } } },
9732 .{ .tag = .__builtin_eh_return_data_regno, .properties = .{ .param_str = "iIi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
9733 .{ .tag = .__builtin_elementwise_abs, .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
9734 .{ .tag = .__builtin_elementwise_add_sat, .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
9735 .{ .tag = .__builtin_elementwise_bitreverse, .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
9736 .{ .tag = .__builtin_elementwise_canonicalize, .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
9737 .{ .tag = .__builtin_elementwise_ceil, .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
9738 .{ .tag = .__builtin_elementwise_copysign, .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
9739 .{ .tag = .__builtin_elementwise_cos, .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
9740 .{ .tag = .__builtin_elementwise_exp, .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
9741 .{ .tag = .__builtin_elementwise_exp2, .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
9742 .{ .tag = .__builtin_elementwise_floor, .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
9743 .{ .tag = .__builtin_elementwise_fma, .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
9744 .{ .tag = .__builtin_elementwise_log, .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
9745 .{ .tag = .__builtin_elementwise_log10, .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
9746 .{ .tag = .__builtin_elementwise_log2, .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
9747 .{ .tag = .__builtin_elementwise_max, .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
9748 .{ .tag = .__builtin_elementwise_min, .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
9749 .{ .tag = .__builtin_elementwise_nearbyint, .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
9750 .{ .tag = .__builtin_elementwise_pow, .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
9751 .{ .tag = .__builtin_elementwise_rint, .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
9752 .{ .tag = .__builtin_elementwise_round, .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
9753 .{ .tag = .__builtin_elementwise_roundeven, .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
9754 .{ .tag = .__builtin_elementwise_sin, .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
9755 .{ .tag = .__builtin_elementwise_sqrt, .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
9756 .{ .tag = .__builtin_elementwise_sub_sat, .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
9757 .{ .tag = .__builtin_elementwise_trunc, .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
9758 .{ .tag = .__builtin_erf, .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9759 .{ .tag = .__builtin_erfc, .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9760 .{ .tag = .__builtin_erfcf, .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9761 .{ .tag = .__builtin_erfcf128, .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9762 .{ .tag = .__builtin_erfcl, .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9763 .{ .tag = .__builtin_erff, .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9764 .{ .tag = .__builtin_erff128, .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9765 .{ .tag = .__builtin_erfl, .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9766 .{ .tag = .__builtin_exp, .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9767 .{ .tag = .__builtin_exp10, .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9768 .{ .tag = .__builtin_exp10f, .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9769 .{ .tag = .__builtin_exp10f128, .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9770 .{ .tag = .__builtin_exp10f16, .properties = .{ .param_str = "hh", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9771 .{ .tag = .__builtin_exp10l, .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9772 .{ .tag = .__builtin_exp2, .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9773 .{ .tag = .__builtin_exp2f, .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9774 .{ .tag = .__builtin_exp2f128, .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9775 .{ .tag = .__builtin_exp2f16, .properties = .{ .param_str = "hh", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9776 .{ .tag = .__builtin_exp2l, .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9777 .{ .tag = .__builtin_expect, .properties = .{ .param_str = "LiLiLi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
9778 .{ .tag = .__builtin_expect_with_probability, .properties = .{ .param_str = "LiLiLid", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
9779 .{ .tag = .__builtin_expf, .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9780 .{ .tag = .__builtin_expf128, .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9781 .{ .tag = .__builtin_expf16, .properties = .{ .param_str = "hh", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9782 .{ .tag = .__builtin_expl, .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9783 .{ .tag = .__builtin_expm1, .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9784 .{ .tag = .__builtin_expm1f, .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9785 .{ .tag = .__builtin_expm1f128, .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9786 .{ .tag = .__builtin_expm1l, .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9787 .{ .tag = .__builtin_extend_pointer, .properties = .{ .param_str = "ULLiv*" } },
9788 .{ .tag = .__builtin_extract_return_addr, .properties = .{ .param_str = "v*v*" } },
9789 .{ .tag = .__builtin_fabs, .properties = .{ .param_str = "dd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
9790 .{ .tag = .__builtin_fabsf, .properties = .{ .param_str = "ff", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
9791 .{ .tag = .__builtin_fabsf128, .properties = .{ .param_str = "LLdLLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
9792 .{ .tag = .__builtin_fabsf16, .properties = .{ .param_str = "hh", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
9793 .{ .tag = .__builtin_fabsl, .properties = .{ .param_str = "LdLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
9794 .{ .tag = .__builtin_fdim, .properties = .{ .param_str = "ddd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9795 .{ .tag = .__builtin_fdimf, .properties = .{ .param_str = "fff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9796 .{ .tag = .__builtin_fdimf128, .properties = .{ .param_str = "LLdLLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9797 .{ .tag = .__builtin_fdiml, .properties = .{ .param_str = "LdLdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9798 .{ .tag = .__builtin_ffs, .properties = .{ .param_str = "ii", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
9799 .{ .tag = .__builtin_ffsl, .properties = .{ .param_str = "iLi", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
9800 .{ .tag = .__builtin_ffsll, .properties = .{ .param_str = "iLLi", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
9801 .{ .tag = .__builtin_floor, .properties = .{ .param_str = "dd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
9802 .{ .tag = .__builtin_floorf, .properties = .{ .param_str = "ff", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
9803 .{ .tag = .__builtin_floorf128, .properties = .{ .param_str = "LLdLLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
9804 .{ .tag = .__builtin_floorf16, .properties = .{ .param_str = "hh", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
9805 .{ .tag = .__builtin_floorl, .properties = .{ .param_str = "LdLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
9806 .{ .tag = .__builtin_flt_rounds, .properties = .{ .param_str = "i" } },
9807 .{ .tag = .__builtin_fma, .properties = .{ .param_str = "dddd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9808 .{ .tag = .__builtin_fmaf, .properties = .{ .param_str = "ffff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9809 .{ .tag = .__builtin_fmaf128, .properties = .{ .param_str = "LLdLLdLLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9810 .{ .tag = .__builtin_fmaf16, .properties = .{ .param_str = "hhhh", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9811 .{ .tag = .__builtin_fmal, .properties = .{ .param_str = "LdLdLdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9812 .{ .tag = .__builtin_fmax, .properties = .{ .param_str = "ddd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
9813 .{ .tag = .__builtin_fmaxf, .properties = .{ .param_str = "fff", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
9814 .{ .tag = .__builtin_fmaxf128, .properties = .{ .param_str = "LLdLLdLLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
9815 .{ .tag = .__builtin_fmaxf16, .properties = .{ .param_str = "hhh", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
9816 .{ .tag = .__builtin_fmaxl, .properties = .{ .param_str = "LdLdLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
9817 .{ .tag = .__builtin_fmin, .properties = .{ .param_str = "ddd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
9818 .{ .tag = .__builtin_fminf, .properties = .{ .param_str = "fff", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
9819 .{ .tag = .__builtin_fminf128, .properties = .{ .param_str = "LLdLLdLLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
9820 .{ .tag = .__builtin_fminf16, .properties = .{ .param_str = "hhh", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
9821 .{ .tag = .__builtin_fminl, .properties = .{ .param_str = "LdLdLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
9822 .{ .tag = .__builtin_fmod, .properties = .{ .param_str = "ddd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9823 .{ .tag = .__builtin_fmodf, .properties = .{ .param_str = "fff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9824 .{ .tag = .__builtin_fmodf128, .properties = .{ .param_str = "LLdLLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9825 .{ .tag = .__builtin_fmodf16, .properties = .{ .param_str = "hhh", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9826 .{ .tag = .__builtin_fmodl, .properties = .{ .param_str = "LdLdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9827 .{ .tag = .__builtin_fpclassify, .properties = .{ .param_str = "iiiiii.", .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
9828 .{ .tag = .__builtin_fprintf, .properties = .{ .param_str = "iP*RcC*R.", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .printf, .format_string_position = 1 } } },
9829 .{ .tag = .__builtin_frame_address, .properties = .{ .param_str = "v*IUi" } },
9830 .{ .tag = .__builtin_free, .properties = .{ .param_str = "vv*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
9831 .{ .tag = .__builtin_frexp, .properties = .{ .param_str = "ddi*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
9832 .{ .tag = .__builtin_frexpf, .properties = .{ .param_str = "ffi*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
9833 .{ .tag = .__builtin_frexpf128, .properties = .{ .param_str = "LLdLLdi*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
9834 .{ .tag = .__builtin_frexpf16, .properties = .{ .param_str = "hhi*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
9835 .{ .tag = .__builtin_frexpl, .properties = .{ .param_str = "LdLdi*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
9836 .{ .tag = .__builtin_frob_return_addr, .properties = .{ .param_str = "v*v*" } },
9837 .{ .tag = .__builtin_fscanf, .properties = .{ .param_str = "iP*RcC*R.", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .scanf, .format_string_position = 1 } } },
9838 .{ .tag = .__builtin_getid, .properties = .{ .param_str = "Si", .target_set = TargetSet.initOne(.xcore), .attributes = .{ .@"const" = true } } },
9839 .{ .tag = .__builtin_getps, .properties = .{ .param_str = "UiUi", .target_set = TargetSet.initOne(.xcore) } },
9840 .{ .tag = .__builtin_huge_val, .properties = .{ .param_str = "d", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
9841 .{ .tag = .__builtin_huge_valf, .properties = .{ .param_str = "f", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
9842 .{ .tag = .__builtin_huge_valf128, .properties = .{ .param_str = "LLd", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
9843 .{ .tag = .__builtin_huge_valf16, .properties = .{ .param_str = "x", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
9844 .{ .tag = .__builtin_huge_vall, .properties = .{ .param_str = "Ld", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
9845 .{ .tag = .__builtin_hypot, .properties = .{ .param_str = "ddd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9846 .{ .tag = .__builtin_hypotf, .properties = .{ .param_str = "fff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9847 .{ .tag = .__builtin_hypotf128, .properties = .{ .param_str = "LLdLLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9848 .{ .tag = .__builtin_hypotl, .properties = .{ .param_str = "LdLdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9849 .{ .tag = .__builtin_ia32_rdpmc, .properties = .{ .param_str = "UOii", .target_set = TargetSet.initOne(.x86) } },
9850 .{ .tag = .__builtin_ia32_rdtsc, .properties = .{ .param_str = "UOi", .target_set = TargetSet.initOne(.x86) } },
9851 .{ .tag = .__builtin_ia32_rdtscp, .properties = .{ .param_str = "UOiUi*", .target_set = TargetSet.initOne(.x86) } },
9852 .{ .tag = .__builtin_ilogb, .properties = .{ .param_str = "id", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9853 .{ .tag = .__builtin_ilogbf, .properties = .{ .param_str = "if", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9854 .{ .tag = .__builtin_ilogbf128, .properties = .{ .param_str = "iLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9855 .{ .tag = .__builtin_ilogbl, .properties = .{ .param_str = "iLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9856 .{ .tag = .__builtin_index, .properties = .{ .param_str = "c*cC*i", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
9857 .{ .tag = .__builtin_inf, .properties = .{ .param_str = "d", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
9858 .{ .tag = .__builtin_inff, .properties = .{ .param_str = "f", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
9859 .{ .tag = .__builtin_inff128, .properties = .{ .param_str = "LLd", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
9860 .{ .tag = .__builtin_inff16, .properties = .{ .param_str = "x", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
9861 .{ .tag = .__builtin_infl, .properties = .{ .param_str = "Ld", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
9862 .{ .tag = .__builtin_init_dwarf_reg_size_table, .properties = .{ .param_str = "vv*" } },
9863 .{ .tag = .__builtin_is_aligned, .properties = .{ .param_str = "bvC*z", .attributes = .{ .@"const" = true, .custom_typecheck = true, .const_evaluable = true } } },
9864 .{ .tag = .__builtin_isfinite, .properties = .{ .param_str = "i.", .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
9865 .{ .tag = .__builtin_isfpclass, .properties = .{ .param_str = "i.", .attributes = .{ .@"const" = true, .custom_typecheck = true, .const_evaluable = true } } },
9866 .{ .tag = .__builtin_isgreater, .properties = .{ .param_str = "i.", .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true } } },
9867 .{ .tag = .__builtin_isgreaterequal, .properties = .{ .param_str = "i.", .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true } } },
9868 .{ .tag = .__builtin_isinf, .properties = .{ .param_str = "i.", .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
9869 .{ .tag = .__builtin_isinf_sign, .properties = .{ .param_str = "i.", .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
9870 .{ .tag = .__builtin_isless, .properties = .{ .param_str = "i.", .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true } } },
9871 .{ .tag = .__builtin_islessequal, .properties = .{ .param_str = "i.", .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true } } },
9872 .{ .tag = .__builtin_islessgreater, .properties = .{ .param_str = "i.", .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true } } },
9873 .{ .tag = .__builtin_isnan, .properties = .{ .param_str = "i.", .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
9874 .{ .tag = .__builtin_isnormal, .properties = .{ .param_str = "i.", .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
9875 .{ .tag = .__builtin_isunordered, .properties = .{ .param_str = "i.", .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true } } },
9876 .{ .tag = .__builtin_labs, .properties = .{ .param_str = "LiLi", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
9877 .{ .tag = .__builtin_launder, .properties = .{ .param_str = "v*v*", .attributes = .{ .custom_typecheck = true, .const_evaluable = true } } },
9878 .{ .tag = .__builtin_ldexp, .properties = .{ .param_str = "ddi", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9879 .{ .tag = .__builtin_ldexpf, .properties = .{ .param_str = "ffi", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9880 .{ .tag = .__builtin_ldexpf128, .properties = .{ .param_str = "LLdLLdi", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9881 .{ .tag = .__builtin_ldexpf16, .properties = .{ .param_str = "hhi", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9882 .{ .tag = .__builtin_ldexpl, .properties = .{ .param_str = "LdLdi", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9883 .{ .tag = .__builtin_lgamma, .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
9884 .{ .tag = .__builtin_lgammaf, .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
9885 .{ .tag = .__builtin_lgammaf128, .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
9886 .{ .tag = .__builtin_lgammal, .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
9887 .{ .tag = .__builtin_llabs, .properties = .{ .param_str = "LLiLLi", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
9888 .{ .tag = .__builtin_llrint, .properties = .{ .param_str = "LLid", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9889 .{ .tag = .__builtin_llrintf, .properties = .{ .param_str = "LLif", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9890 .{ .tag = .__builtin_llrintf128, .properties = .{ .param_str = "LLiLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9891 .{ .tag = .__builtin_llrintl, .properties = .{ .param_str = "LLiLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9892 .{ .tag = .__builtin_llround, .properties = .{ .param_str = "LLid", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9893 .{ .tag = .__builtin_llroundf, .properties = .{ .param_str = "LLif", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9894 .{ .tag = .__builtin_llroundf128, .properties = .{ .param_str = "LLiLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9895 .{ .tag = .__builtin_llroundl, .properties = .{ .param_str = "LLiLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9896 .{ .tag = .__builtin_log, .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9897 .{ .tag = .__builtin_log10, .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9898 .{ .tag = .__builtin_log10f, .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9899 .{ .tag = .__builtin_log10f128, .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9900 .{ .tag = .__builtin_log10f16, .properties = .{ .param_str = "hh", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9901 .{ .tag = .__builtin_log10l, .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9902 .{ .tag = .__builtin_log1p, .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9903 .{ .tag = .__builtin_log1pf, .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9904 .{ .tag = .__builtin_log1pf128, .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9905 .{ .tag = .__builtin_log1pl, .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9906 .{ .tag = .__builtin_log2, .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9907 .{ .tag = .__builtin_log2f, .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9908 .{ .tag = .__builtin_log2f128, .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9909 .{ .tag = .__builtin_log2f16, .properties = .{ .param_str = "hh", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9910 .{ .tag = .__builtin_log2l, .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9911 .{ .tag = .__builtin_logb, .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9912 .{ .tag = .__builtin_logbf, .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9913 .{ .tag = .__builtin_logbf128, .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9914 .{ .tag = .__builtin_logbl, .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9915 .{ .tag = .__builtin_logf, .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9916 .{ .tag = .__builtin_logf128, .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9917 .{ .tag = .__builtin_logf16, .properties = .{ .param_str = "hh", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9918 .{ .tag = .__builtin_logl, .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9919 .{ .tag = .__builtin_longjmp, .properties = .{ .param_str = "vv**i", .attributes = .{ .noreturn = true } } },
9920 .{ .tag = .__builtin_lrint, .properties = .{ .param_str = "Lid", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9921 .{ .tag = .__builtin_lrintf, .properties = .{ .param_str = "Lif", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9922 .{ .tag = .__builtin_lrintf128, .properties = .{ .param_str = "LiLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9923 .{ .tag = .__builtin_lrintl, .properties = .{ .param_str = "LiLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9924 .{ .tag = .__builtin_lround, .properties = .{ .param_str = "Lid", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9925 .{ .tag = .__builtin_lroundf, .properties = .{ .param_str = "Lif", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9926 .{ .tag = .__builtin_lroundf128, .properties = .{ .param_str = "LiLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9927 .{ .tag = .__builtin_lroundl, .properties = .{ .param_str = "LiLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
9928 .{ .tag = .__builtin_malloc, .properties = .{ .param_str = "v*z", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
9929 .{ .tag = .__builtin_matrix_column_major_load, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true, .lib_function_with_builtin_prefix = true } } },
9930 .{ .tag = .__builtin_matrix_column_major_store, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true, .lib_function_with_builtin_prefix = true } } },
9931 .{ .tag = .__builtin_matrix_transpose, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true, .lib_function_with_builtin_prefix = true } } },
9932 .{ .tag = .__builtin_memchr, .properties = .{ .param_str = "v*vC*iz", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
9933 .{ .tag = .__builtin_memcmp, .properties = .{ .param_str = "ivC*vC*z", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
9934 .{ .tag = .__builtin_memcpy, .properties = .{ .param_str = "v*v*vC*z", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
9935 .{ .tag = .__builtin_memcpy_inline, .properties = .{ .param_str = "vv*vC*Iz" } },
9936 .{ .tag = .__builtin_memmove, .properties = .{ .param_str = "v*v*vC*z", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
9937 .{ .tag = .__builtin_mempcpy, .properties = .{ .param_str = "v*v*vC*z", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
9938 .{ .tag = .__builtin_memset, .properties = .{ .param_str = "v*v*iz", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
9939 .{ .tag = .__builtin_memset_inline, .properties = .{ .param_str = "vv*iIz" } },
9940 .{ .tag = .__builtin_mips_absq_s_ph, .properties = .{ .param_str = "V2sV2s", .target_set = TargetSet.initOne(.mips) } },
9941 .{ .tag = .__builtin_mips_absq_s_qb, .properties = .{ .param_str = "V4ScV4Sc", .target_set = TargetSet.initOne(.mips) } },
9942 .{ .tag = .__builtin_mips_absq_s_w, .properties = .{ .param_str = "ii", .target_set = TargetSet.initOne(.mips) } },
9943 .{ .tag = .__builtin_mips_addq_ph, .properties = .{ .param_str = "V2sV2sV2s", .target_set = TargetSet.initOne(.mips) } },
9944 .{ .tag = .__builtin_mips_addq_s_ph, .properties = .{ .param_str = "V2sV2sV2s", .target_set = TargetSet.initOne(.mips) } },
9945 .{ .tag = .__builtin_mips_addq_s_w, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.mips) } },
9946 .{ .tag = .__builtin_mips_addqh_ph, .properties = .{ .param_str = "V2sV2sV2s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
9947 .{ .tag = .__builtin_mips_addqh_r_ph, .properties = .{ .param_str = "V2sV2sV2s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
9948 .{ .tag = .__builtin_mips_addqh_r_w, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
9949 .{ .tag = .__builtin_mips_addqh_w, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
9950 .{ .tag = .__builtin_mips_addsc, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.mips) } },
9951 .{ .tag = .__builtin_mips_addu_ph, .properties = .{ .param_str = "V2sV2sV2s", .target_set = TargetSet.initOne(.mips) } },
9952 .{ .tag = .__builtin_mips_addu_qb, .properties = .{ .param_str = "V4ScV4ScV4Sc", .target_set = TargetSet.initOne(.mips) } },
9953 .{ .tag = .__builtin_mips_addu_s_ph, .properties = .{ .param_str = "V2sV2sV2s", .target_set = TargetSet.initOne(.mips) } },
9954 .{ .tag = .__builtin_mips_addu_s_qb, .properties = .{ .param_str = "V4ScV4ScV4Sc", .target_set = TargetSet.initOne(.mips) } },
9955 .{ .tag = .__builtin_mips_adduh_qb, .properties = .{ .param_str = "V4ScV4ScV4Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
9956 .{ .tag = .__builtin_mips_adduh_r_qb, .properties = .{ .param_str = "V4ScV4ScV4Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
9957 .{ .tag = .__builtin_mips_addwc, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.mips) } },
9958 .{ .tag = .__builtin_mips_append, .properties = .{ .param_str = "iiiIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
9959 .{ .tag = .__builtin_mips_balign, .properties = .{ .param_str = "iiiIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
9960 .{ .tag = .__builtin_mips_bitrev, .properties = .{ .param_str = "ii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
9961 .{ .tag = .__builtin_mips_bposge32, .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.mips) } },
9962 .{ .tag = .__builtin_mips_cmp_eq_ph, .properties = .{ .param_str = "vV2sV2s", .target_set = TargetSet.initOne(.mips) } },
9963 .{ .tag = .__builtin_mips_cmp_le_ph, .properties = .{ .param_str = "vV2sV2s", .target_set = TargetSet.initOne(.mips) } },
9964 .{ .tag = .__builtin_mips_cmp_lt_ph, .properties = .{ .param_str = "vV2sV2s", .target_set = TargetSet.initOne(.mips) } },
9965 .{ .tag = .__builtin_mips_cmpgdu_eq_qb, .properties = .{ .param_str = "iV4ScV4Sc", .target_set = TargetSet.initOne(.mips) } },
9966 .{ .tag = .__builtin_mips_cmpgdu_le_qb, .properties = .{ .param_str = "iV4ScV4Sc", .target_set = TargetSet.initOne(.mips) } },
9967 .{ .tag = .__builtin_mips_cmpgdu_lt_qb, .properties = .{ .param_str = "iV4ScV4Sc", .target_set = TargetSet.initOne(.mips) } },
9968 .{ .tag = .__builtin_mips_cmpgu_eq_qb, .properties = .{ .param_str = "iV4ScV4Sc", .target_set = TargetSet.initOne(.mips) } },
9969 .{ .tag = .__builtin_mips_cmpgu_le_qb, .properties = .{ .param_str = "iV4ScV4Sc", .target_set = TargetSet.initOne(.mips) } },
9970 .{ .tag = .__builtin_mips_cmpgu_lt_qb, .properties = .{ .param_str = "iV4ScV4Sc", .target_set = TargetSet.initOne(.mips) } },
9971 .{ .tag = .__builtin_mips_cmpu_eq_qb, .properties = .{ .param_str = "vV4ScV4Sc", .target_set = TargetSet.initOne(.mips) } },
9972 .{ .tag = .__builtin_mips_cmpu_le_qb, .properties = .{ .param_str = "vV4ScV4Sc", .target_set = TargetSet.initOne(.mips) } },
9973 .{ .tag = .__builtin_mips_cmpu_lt_qb, .properties = .{ .param_str = "vV4ScV4Sc", .target_set = TargetSet.initOne(.mips) } },
9974 .{ .tag = .__builtin_mips_dpa_w_ph, .properties = .{ .param_str = "LLiLLiV2sV2s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
9975 .{ .tag = .__builtin_mips_dpaq_s_w_ph, .properties = .{ .param_str = "LLiLLiV2sV2s", .target_set = TargetSet.initOne(.mips) } },
9976 .{ .tag = .__builtin_mips_dpaq_sa_l_w, .properties = .{ .param_str = "LLiLLiii", .target_set = TargetSet.initOne(.mips) } },
9977 .{ .tag = .__builtin_mips_dpaqx_s_w_ph, .properties = .{ .param_str = "LLiLLiV2sV2s", .target_set = TargetSet.initOne(.mips) } },
9978 .{ .tag = .__builtin_mips_dpaqx_sa_w_ph, .properties = .{ .param_str = "LLiLLiV2sV2s", .target_set = TargetSet.initOne(.mips) } },
9979 .{ .tag = .__builtin_mips_dpau_h_qbl, .properties = .{ .param_str = "LLiLLiV4ScV4Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
9980 .{ .tag = .__builtin_mips_dpau_h_qbr, .properties = .{ .param_str = "LLiLLiV4ScV4Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
9981 .{ .tag = .__builtin_mips_dpax_w_ph, .properties = .{ .param_str = "LLiLLiV2sV2s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
9982 .{ .tag = .__builtin_mips_dps_w_ph, .properties = .{ .param_str = "LLiLLiV2sV2s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
9983 .{ .tag = .__builtin_mips_dpsq_s_w_ph, .properties = .{ .param_str = "LLiLLiV2sV2s", .target_set = TargetSet.initOne(.mips) } },
9984 .{ .tag = .__builtin_mips_dpsq_sa_l_w, .properties = .{ .param_str = "LLiLLiii", .target_set = TargetSet.initOne(.mips) } },
9985 .{ .tag = .__builtin_mips_dpsqx_s_w_ph, .properties = .{ .param_str = "LLiLLiV2sV2s", .target_set = TargetSet.initOne(.mips) } },
9986 .{ .tag = .__builtin_mips_dpsqx_sa_w_ph, .properties = .{ .param_str = "LLiLLiV2sV2s", .target_set = TargetSet.initOne(.mips) } },
9987 .{ .tag = .__builtin_mips_dpsu_h_qbl, .properties = .{ .param_str = "LLiLLiV4ScV4Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
9988 .{ .tag = .__builtin_mips_dpsu_h_qbr, .properties = .{ .param_str = "LLiLLiV4ScV4Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
9989 .{ .tag = .__builtin_mips_dpsx_w_ph, .properties = .{ .param_str = "LLiLLiV2sV2s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
9990 .{ .tag = .__builtin_mips_extp, .properties = .{ .param_str = "iLLii", .target_set = TargetSet.initOne(.mips) } },
9991 .{ .tag = .__builtin_mips_extpdp, .properties = .{ .param_str = "iLLii", .target_set = TargetSet.initOne(.mips) } },
9992 .{ .tag = .__builtin_mips_extr_r_w, .properties = .{ .param_str = "iLLii", .target_set = TargetSet.initOne(.mips) } },
9993 .{ .tag = .__builtin_mips_extr_rs_w, .properties = .{ .param_str = "iLLii", .target_set = TargetSet.initOne(.mips) } },
9994 .{ .tag = .__builtin_mips_extr_s_h, .properties = .{ .param_str = "iLLii", .target_set = TargetSet.initOne(.mips) } },
9995 .{ .tag = .__builtin_mips_extr_w, .properties = .{ .param_str = "iLLii", .target_set = TargetSet.initOne(.mips) } },
9996 .{ .tag = .__builtin_mips_insv, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.mips) } },
9997 .{ .tag = .__builtin_mips_lbux, .properties = .{ .param_str = "iv*i", .target_set = TargetSet.initOne(.mips) } },
9998 .{ .tag = .__builtin_mips_lhx, .properties = .{ .param_str = "iv*i", .target_set = TargetSet.initOne(.mips) } },
9999 .{ .tag = .__builtin_mips_lwx, .properties = .{ .param_str = "iv*i", .target_set = TargetSet.initOne(.mips) } },
10000 .{ .tag = .__builtin_mips_madd, .properties = .{ .param_str = "LLiLLiii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10001 .{ .tag = .__builtin_mips_maddu, .properties = .{ .param_str = "LLiLLiUiUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10002 .{ .tag = .__builtin_mips_maq_s_w_phl, .properties = .{ .param_str = "LLiLLiV2sV2s", .target_set = TargetSet.initOne(.mips) } },
10003 .{ .tag = .__builtin_mips_maq_s_w_phr, .properties = .{ .param_str = "LLiLLiV2sV2s", .target_set = TargetSet.initOne(.mips) } },
10004 .{ .tag = .__builtin_mips_maq_sa_w_phl, .properties = .{ .param_str = "LLiLLiV2sV2s", .target_set = TargetSet.initOne(.mips) } },
10005 .{ .tag = .__builtin_mips_maq_sa_w_phr, .properties = .{ .param_str = "LLiLLiV2sV2s", .target_set = TargetSet.initOne(.mips) } },
10006 .{ .tag = .__builtin_mips_modsub, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10007 .{ .tag = .__builtin_mips_msub, .properties = .{ .param_str = "LLiLLiii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10008 .{ .tag = .__builtin_mips_msubu, .properties = .{ .param_str = "LLiLLiUiUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10009 .{ .tag = .__builtin_mips_mthlip, .properties = .{ .param_str = "LLiLLii", .target_set = TargetSet.initOne(.mips) } },
10010 .{ .tag = .__builtin_mips_mul_ph, .properties = .{ .param_str = "V2sV2sV2s", .target_set = TargetSet.initOne(.mips) } },
10011 .{ .tag = .__builtin_mips_mul_s_ph, .properties = .{ .param_str = "V2sV2sV2s", .target_set = TargetSet.initOne(.mips) } },
10012 .{ .tag = .__builtin_mips_muleq_s_w_phl, .properties = .{ .param_str = "iV2sV2s", .target_set = TargetSet.initOne(.mips) } },
10013 .{ .tag = .__builtin_mips_muleq_s_w_phr, .properties = .{ .param_str = "iV2sV2s", .target_set = TargetSet.initOne(.mips) } },
10014 .{ .tag = .__builtin_mips_muleu_s_ph_qbl, .properties = .{ .param_str = "V2sV4ScV2s", .target_set = TargetSet.initOne(.mips) } },
10015 .{ .tag = .__builtin_mips_muleu_s_ph_qbr, .properties = .{ .param_str = "V2sV4ScV2s", .target_set = TargetSet.initOne(.mips) } },
10016 .{ .tag = .__builtin_mips_mulq_rs_ph, .properties = .{ .param_str = "V2sV2sV2s", .target_set = TargetSet.initOne(.mips) } },
10017 .{ .tag = .__builtin_mips_mulq_rs_w, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.mips) } },
10018 .{ .tag = .__builtin_mips_mulq_s_ph, .properties = .{ .param_str = "V2sV2sV2s", .target_set = TargetSet.initOne(.mips) } },
10019 .{ .tag = .__builtin_mips_mulq_s_w, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.mips) } },
10020 .{ .tag = .__builtin_mips_mulsa_w_ph, .properties = .{ .param_str = "LLiLLiV2sV2s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10021 .{ .tag = .__builtin_mips_mulsaq_s_w_ph, .properties = .{ .param_str = "LLiLLiV2sV2s", .target_set = TargetSet.initOne(.mips) } },
10022 .{ .tag = .__builtin_mips_mult, .properties = .{ .param_str = "LLiii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10023 .{ .tag = .__builtin_mips_multu, .properties = .{ .param_str = "LLiUiUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10024 .{ .tag = .__builtin_mips_packrl_ph, .properties = .{ .param_str = "V2sV2sV2s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10025 .{ .tag = .__builtin_mips_pick_ph, .properties = .{ .param_str = "V2sV2sV2s", .target_set = TargetSet.initOne(.mips) } },
10026 .{ .tag = .__builtin_mips_pick_qb, .properties = .{ .param_str = "V4ScV4ScV4Sc", .target_set = TargetSet.initOne(.mips) } },
10027 .{ .tag = .__builtin_mips_preceq_w_phl, .properties = .{ .param_str = "iV2s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10028 .{ .tag = .__builtin_mips_preceq_w_phr, .properties = .{ .param_str = "iV2s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10029 .{ .tag = .__builtin_mips_precequ_ph_qbl, .properties = .{ .param_str = "V2sV4Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10030 .{ .tag = .__builtin_mips_precequ_ph_qbla, .properties = .{ .param_str = "V2sV4Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10031 .{ .tag = .__builtin_mips_precequ_ph_qbr, .properties = .{ .param_str = "V2sV4Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10032 .{ .tag = .__builtin_mips_precequ_ph_qbra, .properties = .{ .param_str = "V2sV4Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10033 .{ .tag = .__builtin_mips_preceu_ph_qbl, .properties = .{ .param_str = "V2sV4Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10034 .{ .tag = .__builtin_mips_preceu_ph_qbla, .properties = .{ .param_str = "V2sV4Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10035 .{ .tag = .__builtin_mips_preceu_ph_qbr, .properties = .{ .param_str = "V2sV4Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10036 .{ .tag = .__builtin_mips_preceu_ph_qbra, .properties = .{ .param_str = "V2sV4Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10037 .{ .tag = .__builtin_mips_precr_qb_ph, .properties = .{ .param_str = "V4ScV2sV2s", .target_set = TargetSet.initOne(.mips) } },
10038 .{ .tag = .__builtin_mips_precr_sra_ph_w, .properties = .{ .param_str = "V2siiIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10039 .{ .tag = .__builtin_mips_precr_sra_r_ph_w, .properties = .{ .param_str = "V2siiIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10040 .{ .tag = .__builtin_mips_precrq_ph_w, .properties = .{ .param_str = "V2sii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10041 .{ .tag = .__builtin_mips_precrq_qb_ph, .properties = .{ .param_str = "V4ScV2sV2s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10042 .{ .tag = .__builtin_mips_precrq_rs_ph_w, .properties = .{ .param_str = "V2sii", .target_set = TargetSet.initOne(.mips) } },
10043 .{ .tag = .__builtin_mips_precrqu_s_qb_ph, .properties = .{ .param_str = "V4ScV2sV2s", .target_set = TargetSet.initOne(.mips) } },
10044 .{ .tag = .__builtin_mips_prepend, .properties = .{ .param_str = "iiiIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10045 .{ .tag = .__builtin_mips_raddu_w_qb, .properties = .{ .param_str = "iV4Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10046 .{ .tag = .__builtin_mips_rddsp, .properties = .{ .param_str = "iIi", .target_set = TargetSet.initOne(.mips) } },
10047 .{ .tag = .__builtin_mips_repl_ph, .properties = .{ .param_str = "V2si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10048 .{ .tag = .__builtin_mips_repl_qb, .properties = .{ .param_str = "V4Sci", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10049 .{ .tag = .__builtin_mips_shilo, .properties = .{ .param_str = "LLiLLii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10050 .{ .tag = .__builtin_mips_shll_ph, .properties = .{ .param_str = "V2sV2si", .target_set = TargetSet.initOne(.mips) } },
10051 .{ .tag = .__builtin_mips_shll_qb, .properties = .{ .param_str = "V4ScV4Sci", .target_set = TargetSet.initOne(.mips) } },
10052 .{ .tag = .__builtin_mips_shll_s_ph, .properties = .{ .param_str = "V2sV2si", .target_set = TargetSet.initOne(.mips) } },
10053 .{ .tag = .__builtin_mips_shll_s_w, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.mips) } },
10054 .{ .tag = .__builtin_mips_shra_ph, .properties = .{ .param_str = "V2sV2si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10055 .{ .tag = .__builtin_mips_shra_qb, .properties = .{ .param_str = "V4ScV4Sci", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10056 .{ .tag = .__builtin_mips_shra_r_ph, .properties = .{ .param_str = "V2sV2si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10057 .{ .tag = .__builtin_mips_shra_r_qb, .properties = .{ .param_str = "V4ScV4Sci", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10058 .{ .tag = .__builtin_mips_shra_r_w, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10059 .{ .tag = .__builtin_mips_shrl_ph, .properties = .{ .param_str = "V2sV2si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10060 .{ .tag = .__builtin_mips_shrl_qb, .properties = .{ .param_str = "V4ScV4Sci", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10061 .{ .tag = .__builtin_mips_subq_ph, .properties = .{ .param_str = "V2sV2sV2s", .target_set = TargetSet.initOne(.mips) } },
10062 .{ .tag = .__builtin_mips_subq_s_ph, .properties = .{ .param_str = "V2sV2sV2s", .target_set = TargetSet.initOne(.mips) } },
10063 .{ .tag = .__builtin_mips_subq_s_w, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.mips) } },
10064 .{ .tag = .__builtin_mips_subqh_ph, .properties = .{ .param_str = "V2sV2sV2s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10065 .{ .tag = .__builtin_mips_subqh_r_ph, .properties = .{ .param_str = "V2sV2sV2s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10066 .{ .tag = .__builtin_mips_subqh_r_w, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10067 .{ .tag = .__builtin_mips_subqh_w, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10068 .{ .tag = .__builtin_mips_subu_ph, .properties = .{ .param_str = "V2sV2sV2s", .target_set = TargetSet.initOne(.mips) } },
10069 .{ .tag = .__builtin_mips_subu_qb, .properties = .{ .param_str = "V4ScV4ScV4Sc", .target_set = TargetSet.initOne(.mips) } },
10070 .{ .tag = .__builtin_mips_subu_s_ph, .properties = .{ .param_str = "V2sV2sV2s", .target_set = TargetSet.initOne(.mips) } },
10071 .{ .tag = .__builtin_mips_subu_s_qb, .properties = .{ .param_str = "V4ScV4ScV4Sc", .target_set = TargetSet.initOne(.mips) } },
10072 .{ .tag = .__builtin_mips_subuh_qb, .properties = .{ .param_str = "V4ScV4ScV4Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10073 .{ .tag = .__builtin_mips_subuh_r_qb, .properties = .{ .param_str = "V4ScV4ScV4Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10074 .{ .tag = .__builtin_mips_wrdsp, .properties = .{ .param_str = "viIi", .target_set = TargetSet.initOne(.mips) } },
10075 .{ .tag = .__builtin_modf, .properties = .{ .param_str = "ddd*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
10076 .{ .tag = .__builtin_modff, .properties = .{ .param_str = "fff*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
10077 .{ .tag = .__builtin_modff128, .properties = .{ .param_str = "LLdLLdLLd*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
10078 .{ .tag = .__builtin_modfl, .properties = .{ .param_str = "LdLdLd*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
10079 .{ .tag = .__builtin_msa_add_a_b, .properties = .{ .param_str = "V16ScV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10080 .{ .tag = .__builtin_msa_add_a_d, .properties = .{ .param_str = "V2SLLiV2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10081 .{ .tag = .__builtin_msa_add_a_h, .properties = .{ .param_str = "V8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10082 .{ .tag = .__builtin_msa_add_a_w, .properties = .{ .param_str = "V4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10083 .{ .tag = .__builtin_msa_adds_a_b, .properties = .{ .param_str = "V16ScV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10084 .{ .tag = .__builtin_msa_adds_a_d, .properties = .{ .param_str = "V2SLLiV2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10085 .{ .tag = .__builtin_msa_adds_a_h, .properties = .{ .param_str = "V8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10086 .{ .tag = .__builtin_msa_adds_a_w, .properties = .{ .param_str = "V4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10087 .{ .tag = .__builtin_msa_adds_s_b, .properties = .{ .param_str = "V16ScV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10088 .{ .tag = .__builtin_msa_adds_s_d, .properties = .{ .param_str = "V2SLLiV2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10089 .{ .tag = .__builtin_msa_adds_s_h, .properties = .{ .param_str = "V8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10090 .{ .tag = .__builtin_msa_adds_s_w, .properties = .{ .param_str = "V4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10091 .{ .tag = .__builtin_msa_adds_u_b, .properties = .{ .param_str = "V16UcV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10092 .{ .tag = .__builtin_msa_adds_u_d, .properties = .{ .param_str = "V2ULLiV2ULLiV2ULLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10093 .{ .tag = .__builtin_msa_adds_u_h, .properties = .{ .param_str = "V8UsV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10094 .{ .tag = .__builtin_msa_adds_u_w, .properties = .{ .param_str = "V4UiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10095 .{ .tag = .__builtin_msa_addv_b, .properties = .{ .param_str = "V16cV16cV16c", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10096 .{ .tag = .__builtin_msa_addv_d, .properties = .{ .param_str = "V2LLiV2LLiV2LLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10097 .{ .tag = .__builtin_msa_addv_h, .properties = .{ .param_str = "V8sV8sV8s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10098 .{ .tag = .__builtin_msa_addv_w, .properties = .{ .param_str = "V4iV4iV4i", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10099 .{ .tag = .__builtin_msa_addvi_b, .properties = .{ .param_str = "V16cV16cIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10100 .{ .tag = .__builtin_msa_addvi_d, .properties = .{ .param_str = "V2LLiV2LLiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10101 .{ .tag = .__builtin_msa_addvi_h, .properties = .{ .param_str = "V8sV8sIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10102 .{ .tag = .__builtin_msa_addvi_w, .properties = .{ .param_str = "V4iV4iIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10103 .{ .tag = .__builtin_msa_and_v, .properties = .{ .param_str = "V16UcV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10104 .{ .tag = .__builtin_msa_andi_b, .properties = .{ .param_str = "V16UcV16UcIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10105 .{ .tag = .__builtin_msa_asub_s_b, .properties = .{ .param_str = "V16ScV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10106 .{ .tag = .__builtin_msa_asub_s_d, .properties = .{ .param_str = "V2SLLiV2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10107 .{ .tag = .__builtin_msa_asub_s_h, .properties = .{ .param_str = "V8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10108 .{ .tag = .__builtin_msa_asub_s_w, .properties = .{ .param_str = "V4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10109 .{ .tag = .__builtin_msa_asub_u_b, .properties = .{ .param_str = "V16UcV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10110 .{ .tag = .__builtin_msa_asub_u_d, .properties = .{ .param_str = "V2ULLiV2ULLiV2ULLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10111 .{ .tag = .__builtin_msa_asub_u_h, .properties = .{ .param_str = "V8UsV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10112 .{ .tag = .__builtin_msa_asub_u_w, .properties = .{ .param_str = "V4UiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10113 .{ .tag = .__builtin_msa_ave_s_b, .properties = .{ .param_str = "V16ScV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10114 .{ .tag = .__builtin_msa_ave_s_d, .properties = .{ .param_str = "V2SLLiV2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10115 .{ .tag = .__builtin_msa_ave_s_h, .properties = .{ .param_str = "V8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10116 .{ .tag = .__builtin_msa_ave_s_w, .properties = .{ .param_str = "V4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10117 .{ .tag = .__builtin_msa_ave_u_b, .properties = .{ .param_str = "V16UcV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10118 .{ .tag = .__builtin_msa_ave_u_d, .properties = .{ .param_str = "V2ULLiV2ULLiV2ULLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10119 .{ .tag = .__builtin_msa_ave_u_h, .properties = .{ .param_str = "V8UsV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10120 .{ .tag = .__builtin_msa_ave_u_w, .properties = .{ .param_str = "V4UiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10121 .{ .tag = .__builtin_msa_aver_s_b, .properties = .{ .param_str = "V16ScV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10122 .{ .tag = .__builtin_msa_aver_s_d, .properties = .{ .param_str = "V2SLLiV2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10123 .{ .tag = .__builtin_msa_aver_s_h, .properties = .{ .param_str = "V8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10124 .{ .tag = .__builtin_msa_aver_s_w, .properties = .{ .param_str = "V4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10125 .{ .tag = .__builtin_msa_aver_u_b, .properties = .{ .param_str = "V16UcV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10126 .{ .tag = .__builtin_msa_aver_u_d, .properties = .{ .param_str = "V2ULLiV2ULLiV2ULLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10127 .{ .tag = .__builtin_msa_aver_u_h, .properties = .{ .param_str = "V8UsV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10128 .{ .tag = .__builtin_msa_aver_u_w, .properties = .{ .param_str = "V4UiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10129 .{ .tag = .__builtin_msa_bclr_b, .properties = .{ .param_str = "V16UcV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10130 .{ .tag = .__builtin_msa_bclr_d, .properties = .{ .param_str = "V2ULLiV2ULLiV2ULLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10131 .{ .tag = .__builtin_msa_bclr_h, .properties = .{ .param_str = "V8UsV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10132 .{ .tag = .__builtin_msa_bclr_w, .properties = .{ .param_str = "V4UiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10133 .{ .tag = .__builtin_msa_bclri_b, .properties = .{ .param_str = "V16UcV16UcIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10134 .{ .tag = .__builtin_msa_bclri_d, .properties = .{ .param_str = "V2ULLiV2ULLiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10135 .{ .tag = .__builtin_msa_bclri_h, .properties = .{ .param_str = "V8UsV8UsIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10136 .{ .tag = .__builtin_msa_bclri_w, .properties = .{ .param_str = "V4UiV4UiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10137 .{ .tag = .__builtin_msa_binsl_b, .properties = .{ .param_str = "V16UcV16UcV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10138 .{ .tag = .__builtin_msa_binsl_d, .properties = .{ .param_str = "V2ULLiV2ULLiV2ULLiV2ULLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10139 .{ .tag = .__builtin_msa_binsl_h, .properties = .{ .param_str = "V8UsV8UsV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10140 .{ .tag = .__builtin_msa_binsl_w, .properties = .{ .param_str = "V4UiV4UiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10141 .{ .tag = .__builtin_msa_binsli_b, .properties = .{ .param_str = "V16UcV16UcV16UcIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10142 .{ .tag = .__builtin_msa_binsli_d, .properties = .{ .param_str = "V2ULLiV2ULLiV2ULLiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10143 .{ .tag = .__builtin_msa_binsli_h, .properties = .{ .param_str = "V8UsV8UsV8UsIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10144 .{ .tag = .__builtin_msa_binsli_w, .properties = .{ .param_str = "V4UiV4UiV4UiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10145 .{ .tag = .__builtin_msa_binsr_b, .properties = .{ .param_str = "V16UcV16UcV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10146 .{ .tag = .__builtin_msa_binsr_d, .properties = .{ .param_str = "V2ULLiV2ULLiV2ULLiV2ULLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10147 .{ .tag = .__builtin_msa_binsr_h, .properties = .{ .param_str = "V8UsV8UsV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10148 .{ .tag = .__builtin_msa_binsr_w, .properties = .{ .param_str = "V4UiV4UiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10149 .{ .tag = .__builtin_msa_binsri_b, .properties = .{ .param_str = "V16UcV16UcV16UcIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10150 .{ .tag = .__builtin_msa_binsri_d, .properties = .{ .param_str = "V2ULLiV2ULLiV2ULLiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10151 .{ .tag = .__builtin_msa_binsri_h, .properties = .{ .param_str = "V8UsV8UsV8UsIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10152 .{ .tag = .__builtin_msa_binsri_w, .properties = .{ .param_str = "V4UiV4UiV4UiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10153 .{ .tag = .__builtin_msa_bmnz_v, .properties = .{ .param_str = "V16UcV16UcV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10154 .{ .tag = .__builtin_msa_bmnzi_b, .properties = .{ .param_str = "V16UcV16UcV16UcIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10155 .{ .tag = .__builtin_msa_bmz_v, .properties = .{ .param_str = "V16UcV16UcV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10156 .{ .tag = .__builtin_msa_bmzi_b, .properties = .{ .param_str = "V16UcV16UcV16UcIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10157 .{ .tag = .__builtin_msa_bneg_b, .properties = .{ .param_str = "V16UcV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10158 .{ .tag = .__builtin_msa_bneg_d, .properties = .{ .param_str = "V2ULLiV2ULLiV2ULLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10159 .{ .tag = .__builtin_msa_bneg_h, .properties = .{ .param_str = "V8UsV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10160 .{ .tag = .__builtin_msa_bneg_w, .properties = .{ .param_str = "V4UiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10161 .{ .tag = .__builtin_msa_bnegi_b, .properties = .{ .param_str = "V16UcV16UcIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10162 .{ .tag = .__builtin_msa_bnegi_d, .properties = .{ .param_str = "V2ULLiV2ULLiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10163 .{ .tag = .__builtin_msa_bnegi_h, .properties = .{ .param_str = "V8UsV8UsIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10164 .{ .tag = .__builtin_msa_bnegi_w, .properties = .{ .param_str = "V4UiV4UiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10165 .{ .tag = .__builtin_msa_bnz_b, .properties = .{ .param_str = "iV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10166 .{ .tag = .__builtin_msa_bnz_d, .properties = .{ .param_str = "iV2ULLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10167 .{ .tag = .__builtin_msa_bnz_h, .properties = .{ .param_str = "iV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10168 .{ .tag = .__builtin_msa_bnz_v, .properties = .{ .param_str = "iV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10169 .{ .tag = .__builtin_msa_bnz_w, .properties = .{ .param_str = "iV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10170 .{ .tag = .__builtin_msa_bsel_v, .properties = .{ .param_str = "V16UcV16UcV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10171 .{ .tag = .__builtin_msa_bseli_b, .properties = .{ .param_str = "V16UcV16UcV16UcIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10172 .{ .tag = .__builtin_msa_bset_b, .properties = .{ .param_str = "V16UcV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10173 .{ .tag = .__builtin_msa_bset_d, .properties = .{ .param_str = "V2ULLiV2ULLiV2ULLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10174 .{ .tag = .__builtin_msa_bset_h, .properties = .{ .param_str = "V8UsV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10175 .{ .tag = .__builtin_msa_bset_w, .properties = .{ .param_str = "V4UiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10176 .{ .tag = .__builtin_msa_bseti_b, .properties = .{ .param_str = "V16UcV16UcIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10177 .{ .tag = .__builtin_msa_bseti_d, .properties = .{ .param_str = "V2ULLiV2ULLiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10178 .{ .tag = .__builtin_msa_bseti_h, .properties = .{ .param_str = "V8UsV8UsIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10179 .{ .tag = .__builtin_msa_bseti_w, .properties = .{ .param_str = "V4UiV4UiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10180 .{ .tag = .__builtin_msa_bz_b, .properties = .{ .param_str = "iV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10181 .{ .tag = .__builtin_msa_bz_d, .properties = .{ .param_str = "iV2ULLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10182 .{ .tag = .__builtin_msa_bz_h, .properties = .{ .param_str = "iV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10183 .{ .tag = .__builtin_msa_bz_v, .properties = .{ .param_str = "iV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10184 .{ .tag = .__builtin_msa_bz_w, .properties = .{ .param_str = "iV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10185 .{ .tag = .__builtin_msa_ceq_b, .properties = .{ .param_str = "V16ScV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10186 .{ .tag = .__builtin_msa_ceq_d, .properties = .{ .param_str = "V2SLLiV2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10187 .{ .tag = .__builtin_msa_ceq_h, .properties = .{ .param_str = "V8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10188 .{ .tag = .__builtin_msa_ceq_w, .properties = .{ .param_str = "V4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10189 .{ .tag = .__builtin_msa_ceqi_b, .properties = .{ .param_str = "V16ScV16ScISi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10190 .{ .tag = .__builtin_msa_ceqi_d, .properties = .{ .param_str = "V2SLLiV2SLLiISi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10191 .{ .tag = .__builtin_msa_ceqi_h, .properties = .{ .param_str = "V8SsV8SsISi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10192 .{ .tag = .__builtin_msa_ceqi_w, .properties = .{ .param_str = "V4SiV4SiISi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10193 .{ .tag = .__builtin_msa_cfcmsa, .properties = .{ .param_str = "iIi", .target_set = TargetSet.initOne(.mips) } },
10194 .{ .tag = .__builtin_msa_cle_s_b, .properties = .{ .param_str = "V16ScV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10195 .{ .tag = .__builtin_msa_cle_s_d, .properties = .{ .param_str = "V2SLLiV2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10196 .{ .tag = .__builtin_msa_cle_s_h, .properties = .{ .param_str = "V8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10197 .{ .tag = .__builtin_msa_cle_s_w, .properties = .{ .param_str = "V4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10198 .{ .tag = .__builtin_msa_cle_u_b, .properties = .{ .param_str = "V16ScV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10199 .{ .tag = .__builtin_msa_cle_u_d, .properties = .{ .param_str = "V2SLLiV2ULLiV2ULLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10200 .{ .tag = .__builtin_msa_cle_u_h, .properties = .{ .param_str = "V8SsV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10201 .{ .tag = .__builtin_msa_cle_u_w, .properties = .{ .param_str = "V4SiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10202 .{ .tag = .__builtin_msa_clei_s_b, .properties = .{ .param_str = "V16ScV16ScISi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10203 .{ .tag = .__builtin_msa_clei_s_d, .properties = .{ .param_str = "V2SLLiV2SLLiISi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10204 .{ .tag = .__builtin_msa_clei_s_h, .properties = .{ .param_str = "V8SsV8SsISi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10205 .{ .tag = .__builtin_msa_clei_s_w, .properties = .{ .param_str = "V4SiV4SiISi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10206 .{ .tag = .__builtin_msa_clei_u_b, .properties = .{ .param_str = "V16ScV16UcIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10207 .{ .tag = .__builtin_msa_clei_u_d, .properties = .{ .param_str = "V2SLLiV2ULLiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10208 .{ .tag = .__builtin_msa_clei_u_h, .properties = .{ .param_str = "V8SsV8UsIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10209 .{ .tag = .__builtin_msa_clei_u_w, .properties = .{ .param_str = "V4SiV4UiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10210 .{ .tag = .__builtin_msa_clt_s_b, .properties = .{ .param_str = "V16ScV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10211 .{ .tag = .__builtin_msa_clt_s_d, .properties = .{ .param_str = "V2SLLiV2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10212 .{ .tag = .__builtin_msa_clt_s_h, .properties = .{ .param_str = "V8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10213 .{ .tag = .__builtin_msa_clt_s_w, .properties = .{ .param_str = "V4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10214 .{ .tag = .__builtin_msa_clt_u_b, .properties = .{ .param_str = "V16ScV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10215 .{ .tag = .__builtin_msa_clt_u_d, .properties = .{ .param_str = "V2SLLiV2ULLiV2ULLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10216 .{ .tag = .__builtin_msa_clt_u_h, .properties = .{ .param_str = "V8SsV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10217 .{ .tag = .__builtin_msa_clt_u_w, .properties = .{ .param_str = "V4SiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10218 .{ .tag = .__builtin_msa_clti_s_b, .properties = .{ .param_str = "V16ScV16ScISi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10219 .{ .tag = .__builtin_msa_clti_s_d, .properties = .{ .param_str = "V2SLLiV2SLLiISi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10220 .{ .tag = .__builtin_msa_clti_s_h, .properties = .{ .param_str = "V8SsV8SsISi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10221 .{ .tag = .__builtin_msa_clti_s_w, .properties = .{ .param_str = "V4SiV4SiISi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10222 .{ .tag = .__builtin_msa_clti_u_b, .properties = .{ .param_str = "V16ScV16UcIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10223 .{ .tag = .__builtin_msa_clti_u_d, .properties = .{ .param_str = "V2SLLiV2ULLiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10224 .{ .tag = .__builtin_msa_clti_u_h, .properties = .{ .param_str = "V8SsV8UsIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10225 .{ .tag = .__builtin_msa_clti_u_w, .properties = .{ .param_str = "V4SiV4UiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10226 .{ .tag = .__builtin_msa_copy_s_b, .properties = .{ .param_str = "iV16ScIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10227 .{ .tag = .__builtin_msa_copy_s_d, .properties = .{ .param_str = "LLiV2SLLiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10228 .{ .tag = .__builtin_msa_copy_s_h, .properties = .{ .param_str = "iV8SsIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10229 .{ .tag = .__builtin_msa_copy_s_w, .properties = .{ .param_str = "iV4SiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10230 .{ .tag = .__builtin_msa_copy_u_b, .properties = .{ .param_str = "iV16UcIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10231 .{ .tag = .__builtin_msa_copy_u_d, .properties = .{ .param_str = "LLiV2ULLiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10232 .{ .tag = .__builtin_msa_copy_u_h, .properties = .{ .param_str = "iV8UsIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10233 .{ .tag = .__builtin_msa_copy_u_w, .properties = .{ .param_str = "iV4UiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10234 .{ .tag = .__builtin_msa_ctcmsa, .properties = .{ .param_str = "vIii", .target_set = TargetSet.initOne(.mips) } },
10235 .{ .tag = .__builtin_msa_div_s_b, .properties = .{ .param_str = "V16ScV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10236 .{ .tag = .__builtin_msa_div_s_d, .properties = .{ .param_str = "V2SLLiV2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10237 .{ .tag = .__builtin_msa_div_s_h, .properties = .{ .param_str = "V8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10238 .{ .tag = .__builtin_msa_div_s_w, .properties = .{ .param_str = "V4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10239 .{ .tag = .__builtin_msa_div_u_b, .properties = .{ .param_str = "V16UcV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10240 .{ .tag = .__builtin_msa_div_u_d, .properties = .{ .param_str = "V2ULLiV2ULLiV2ULLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10241 .{ .tag = .__builtin_msa_div_u_h, .properties = .{ .param_str = "V8UsV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10242 .{ .tag = .__builtin_msa_div_u_w, .properties = .{ .param_str = "V4UiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10243 .{ .tag = .__builtin_msa_dotp_s_d, .properties = .{ .param_str = "V2SLLiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10244 .{ .tag = .__builtin_msa_dotp_s_h, .properties = .{ .param_str = "V8SsV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10245 .{ .tag = .__builtin_msa_dotp_s_w, .properties = .{ .param_str = "V4SiV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10246 .{ .tag = .__builtin_msa_dotp_u_d, .properties = .{ .param_str = "V2ULLiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10247 .{ .tag = .__builtin_msa_dotp_u_h, .properties = .{ .param_str = "V8UsV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10248 .{ .tag = .__builtin_msa_dotp_u_w, .properties = .{ .param_str = "V4UiV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10249 .{ .tag = .__builtin_msa_dpadd_s_d, .properties = .{ .param_str = "V2SLLiV2SLLiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10250 .{ .tag = .__builtin_msa_dpadd_s_h, .properties = .{ .param_str = "V8SsV8SsV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10251 .{ .tag = .__builtin_msa_dpadd_s_w, .properties = .{ .param_str = "V4SiV4SiV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10252 .{ .tag = .__builtin_msa_dpadd_u_d, .properties = .{ .param_str = "V2ULLiV2ULLiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10253 .{ .tag = .__builtin_msa_dpadd_u_h, .properties = .{ .param_str = "V8UsV8UsV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10254 .{ .tag = .__builtin_msa_dpadd_u_w, .properties = .{ .param_str = "V4UiV4UiV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10255 .{ .tag = .__builtin_msa_dpsub_s_d, .properties = .{ .param_str = "V2SLLiV2SLLiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10256 .{ .tag = .__builtin_msa_dpsub_s_h, .properties = .{ .param_str = "V8SsV8SsV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10257 .{ .tag = .__builtin_msa_dpsub_s_w, .properties = .{ .param_str = "V4SiV4SiV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10258 .{ .tag = .__builtin_msa_dpsub_u_d, .properties = .{ .param_str = "V2ULLiV2ULLiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10259 .{ .tag = .__builtin_msa_dpsub_u_h, .properties = .{ .param_str = "V8UsV8UsV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10260 .{ .tag = .__builtin_msa_dpsub_u_w, .properties = .{ .param_str = "V4UiV4UiV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10261 .{ .tag = .__builtin_msa_fadd_d, .properties = .{ .param_str = "V2dV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10262 .{ .tag = .__builtin_msa_fadd_w, .properties = .{ .param_str = "V4fV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10263 .{ .tag = .__builtin_msa_fcaf_d, .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10264 .{ .tag = .__builtin_msa_fcaf_w, .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10265 .{ .tag = .__builtin_msa_fceq_d, .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10266 .{ .tag = .__builtin_msa_fceq_w, .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10267 .{ .tag = .__builtin_msa_fclass_d, .properties = .{ .param_str = "V2LLiV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10268 .{ .tag = .__builtin_msa_fclass_w, .properties = .{ .param_str = "V4iV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10269 .{ .tag = .__builtin_msa_fcle_d, .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10270 .{ .tag = .__builtin_msa_fcle_w, .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10271 .{ .tag = .__builtin_msa_fclt_d, .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10272 .{ .tag = .__builtin_msa_fclt_w, .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10273 .{ .tag = .__builtin_msa_fcne_d, .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10274 .{ .tag = .__builtin_msa_fcne_w, .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10275 .{ .tag = .__builtin_msa_fcor_d, .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10276 .{ .tag = .__builtin_msa_fcor_w, .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10277 .{ .tag = .__builtin_msa_fcueq_d, .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10278 .{ .tag = .__builtin_msa_fcueq_w, .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10279 .{ .tag = .__builtin_msa_fcule_d, .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10280 .{ .tag = .__builtin_msa_fcule_w, .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10281 .{ .tag = .__builtin_msa_fcult_d, .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10282 .{ .tag = .__builtin_msa_fcult_w, .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10283 .{ .tag = .__builtin_msa_fcun_d, .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10284 .{ .tag = .__builtin_msa_fcun_w, .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10285 .{ .tag = .__builtin_msa_fcune_d, .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10286 .{ .tag = .__builtin_msa_fcune_w, .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10287 .{ .tag = .__builtin_msa_fdiv_d, .properties = .{ .param_str = "V2dV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10288 .{ .tag = .__builtin_msa_fdiv_w, .properties = .{ .param_str = "V4fV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10289 .{ .tag = .__builtin_msa_fexdo_h, .properties = .{ .param_str = "V8hV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10290 .{ .tag = .__builtin_msa_fexdo_w, .properties = .{ .param_str = "V4fV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10291 .{ .tag = .__builtin_msa_fexp2_d, .properties = .{ .param_str = "V2dV2dV2LLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10292 .{ .tag = .__builtin_msa_fexp2_w, .properties = .{ .param_str = "V4fV4fV4i", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10293 .{ .tag = .__builtin_msa_fexupl_d, .properties = .{ .param_str = "V2dV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10294 .{ .tag = .__builtin_msa_fexupl_w, .properties = .{ .param_str = "V4fV8h", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10295 .{ .tag = .__builtin_msa_fexupr_d, .properties = .{ .param_str = "V2dV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10296 .{ .tag = .__builtin_msa_fexupr_w, .properties = .{ .param_str = "V4fV8h", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10297 .{ .tag = .__builtin_msa_ffint_s_d, .properties = .{ .param_str = "V2dV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10298 .{ .tag = .__builtin_msa_ffint_s_w, .properties = .{ .param_str = "V4fV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10299 .{ .tag = .__builtin_msa_ffint_u_d, .properties = .{ .param_str = "V2dV2ULLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10300 .{ .tag = .__builtin_msa_ffint_u_w, .properties = .{ .param_str = "V4fV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10301 .{ .tag = .__builtin_msa_ffql_d, .properties = .{ .param_str = "V2dV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10302 .{ .tag = .__builtin_msa_ffql_w, .properties = .{ .param_str = "V4fV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10303 .{ .tag = .__builtin_msa_ffqr_d, .properties = .{ .param_str = "V2dV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10304 .{ .tag = .__builtin_msa_ffqr_w, .properties = .{ .param_str = "V4fV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10305 .{ .tag = .__builtin_msa_fill_b, .properties = .{ .param_str = "V16Sci", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10306 .{ .tag = .__builtin_msa_fill_d, .properties = .{ .param_str = "V2SLLiLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10307 .{ .tag = .__builtin_msa_fill_h, .properties = .{ .param_str = "V8Ssi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10308 .{ .tag = .__builtin_msa_fill_w, .properties = .{ .param_str = "V4Sii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10309 .{ .tag = .__builtin_msa_flog2_d, .properties = .{ .param_str = "V2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10310 .{ .tag = .__builtin_msa_flog2_w, .properties = .{ .param_str = "V4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10311 .{ .tag = .__builtin_msa_fmadd_d, .properties = .{ .param_str = "V2dV2dV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10312 .{ .tag = .__builtin_msa_fmadd_w, .properties = .{ .param_str = "V4fV4fV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10313 .{ .tag = .__builtin_msa_fmax_a_d, .properties = .{ .param_str = "V2dV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10314 .{ .tag = .__builtin_msa_fmax_a_w, .properties = .{ .param_str = "V4fV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10315 .{ .tag = .__builtin_msa_fmax_d, .properties = .{ .param_str = "V2dV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10316 .{ .tag = .__builtin_msa_fmax_w, .properties = .{ .param_str = "V4fV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10317 .{ .tag = .__builtin_msa_fmin_a_d, .properties = .{ .param_str = "V2dV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10318 .{ .tag = .__builtin_msa_fmin_a_w, .properties = .{ .param_str = "V4fV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10319 .{ .tag = .__builtin_msa_fmin_d, .properties = .{ .param_str = "V2dV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10320 .{ .tag = .__builtin_msa_fmin_w, .properties = .{ .param_str = "V4fV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10321 .{ .tag = .__builtin_msa_fmsub_d, .properties = .{ .param_str = "V2dV2dV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10322 .{ .tag = .__builtin_msa_fmsub_w, .properties = .{ .param_str = "V4fV4fV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10323 .{ .tag = .__builtin_msa_fmul_d, .properties = .{ .param_str = "V2dV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10324 .{ .tag = .__builtin_msa_fmul_w, .properties = .{ .param_str = "V4fV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10325 .{ .tag = .__builtin_msa_frcp_d, .properties = .{ .param_str = "V2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10326 .{ .tag = .__builtin_msa_frcp_w, .properties = .{ .param_str = "V4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10327 .{ .tag = .__builtin_msa_frint_d, .properties = .{ .param_str = "V2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10328 .{ .tag = .__builtin_msa_frint_w, .properties = .{ .param_str = "V4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10329 .{ .tag = .__builtin_msa_frsqrt_d, .properties = .{ .param_str = "V2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10330 .{ .tag = .__builtin_msa_frsqrt_w, .properties = .{ .param_str = "V4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10331 .{ .tag = .__builtin_msa_fsaf_d, .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10332 .{ .tag = .__builtin_msa_fsaf_w, .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10333 .{ .tag = .__builtin_msa_fseq_d, .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10334 .{ .tag = .__builtin_msa_fseq_w, .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10335 .{ .tag = .__builtin_msa_fsle_d, .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10336 .{ .tag = .__builtin_msa_fsle_w, .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10337 .{ .tag = .__builtin_msa_fslt_d, .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10338 .{ .tag = .__builtin_msa_fslt_w, .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10339 .{ .tag = .__builtin_msa_fsne_d, .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10340 .{ .tag = .__builtin_msa_fsne_w, .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10341 .{ .tag = .__builtin_msa_fsor_d, .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10342 .{ .tag = .__builtin_msa_fsor_w, .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10343 .{ .tag = .__builtin_msa_fsqrt_d, .properties = .{ .param_str = "V2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10344 .{ .tag = .__builtin_msa_fsqrt_w, .properties = .{ .param_str = "V4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10345 .{ .tag = .__builtin_msa_fsub_d, .properties = .{ .param_str = "V2dV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10346 .{ .tag = .__builtin_msa_fsub_w, .properties = .{ .param_str = "V4fV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10347 .{ .tag = .__builtin_msa_fsueq_d, .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10348 .{ .tag = .__builtin_msa_fsueq_w, .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10349 .{ .tag = .__builtin_msa_fsule_d, .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10350 .{ .tag = .__builtin_msa_fsule_w, .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10351 .{ .tag = .__builtin_msa_fsult_d, .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10352 .{ .tag = .__builtin_msa_fsult_w, .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10353 .{ .tag = .__builtin_msa_fsun_d, .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10354 .{ .tag = .__builtin_msa_fsun_w, .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10355 .{ .tag = .__builtin_msa_fsune_d, .properties = .{ .param_str = "V2LLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10356 .{ .tag = .__builtin_msa_fsune_w, .properties = .{ .param_str = "V4iV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10357 .{ .tag = .__builtin_msa_ftint_s_d, .properties = .{ .param_str = "V2SLLiV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10358 .{ .tag = .__builtin_msa_ftint_s_w, .properties = .{ .param_str = "V4SiV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10359 .{ .tag = .__builtin_msa_ftint_u_d, .properties = .{ .param_str = "V2ULLiV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10360 .{ .tag = .__builtin_msa_ftint_u_w, .properties = .{ .param_str = "V4UiV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10361 .{ .tag = .__builtin_msa_ftq_h, .properties = .{ .param_str = "V4UiV4fV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10362 .{ .tag = .__builtin_msa_ftq_w, .properties = .{ .param_str = "V2ULLiV2dV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10363 .{ .tag = .__builtin_msa_ftrunc_s_d, .properties = .{ .param_str = "V2SLLiV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10364 .{ .tag = .__builtin_msa_ftrunc_s_w, .properties = .{ .param_str = "V4SiV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10365 .{ .tag = .__builtin_msa_ftrunc_u_d, .properties = .{ .param_str = "V2ULLiV2d", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10366 .{ .tag = .__builtin_msa_ftrunc_u_w, .properties = .{ .param_str = "V4UiV4f", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10367 .{ .tag = .__builtin_msa_hadd_s_d, .properties = .{ .param_str = "V2SLLiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10368 .{ .tag = .__builtin_msa_hadd_s_h, .properties = .{ .param_str = "V8SsV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10369 .{ .tag = .__builtin_msa_hadd_s_w, .properties = .{ .param_str = "V4SiV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10370 .{ .tag = .__builtin_msa_hadd_u_d, .properties = .{ .param_str = "V2ULLiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10371 .{ .tag = .__builtin_msa_hadd_u_h, .properties = .{ .param_str = "V8UsV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10372 .{ .tag = .__builtin_msa_hadd_u_w, .properties = .{ .param_str = "V4UiV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10373 .{ .tag = .__builtin_msa_hsub_s_d, .properties = .{ .param_str = "V2SLLiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10374 .{ .tag = .__builtin_msa_hsub_s_h, .properties = .{ .param_str = "V8SsV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10375 .{ .tag = .__builtin_msa_hsub_s_w, .properties = .{ .param_str = "V4SiV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10376 .{ .tag = .__builtin_msa_hsub_u_d, .properties = .{ .param_str = "V2ULLiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10377 .{ .tag = .__builtin_msa_hsub_u_h, .properties = .{ .param_str = "V8UsV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10378 .{ .tag = .__builtin_msa_hsub_u_w, .properties = .{ .param_str = "V4UiV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10379 .{ .tag = .__builtin_msa_ilvev_b, .properties = .{ .param_str = "V16cV16cV16c", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10380 .{ .tag = .__builtin_msa_ilvev_d, .properties = .{ .param_str = "V2LLiV2LLiV2LLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10381 .{ .tag = .__builtin_msa_ilvev_h, .properties = .{ .param_str = "V8sV8sV8s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10382 .{ .tag = .__builtin_msa_ilvev_w, .properties = .{ .param_str = "V4iV4iV4i", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10383 .{ .tag = .__builtin_msa_ilvl_b, .properties = .{ .param_str = "V16cV16cV16c", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10384 .{ .tag = .__builtin_msa_ilvl_d, .properties = .{ .param_str = "V2LLiV2LLiV2LLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10385 .{ .tag = .__builtin_msa_ilvl_h, .properties = .{ .param_str = "V8sV8sV8s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10386 .{ .tag = .__builtin_msa_ilvl_w, .properties = .{ .param_str = "V4iV4iV4i", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10387 .{ .tag = .__builtin_msa_ilvod_b, .properties = .{ .param_str = "V16cV16cV16c", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10388 .{ .tag = .__builtin_msa_ilvod_d, .properties = .{ .param_str = "V2LLiV2LLiV2LLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10389 .{ .tag = .__builtin_msa_ilvod_h, .properties = .{ .param_str = "V8sV8sV8s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10390 .{ .tag = .__builtin_msa_ilvod_w, .properties = .{ .param_str = "V4iV4iV4i", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10391 .{ .tag = .__builtin_msa_ilvr_b, .properties = .{ .param_str = "V16cV16cV16c", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10392 .{ .tag = .__builtin_msa_ilvr_d, .properties = .{ .param_str = "V2LLiV2LLiV2LLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10393 .{ .tag = .__builtin_msa_ilvr_h, .properties = .{ .param_str = "V8sV8sV8s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10394 .{ .tag = .__builtin_msa_ilvr_w, .properties = .{ .param_str = "V4iV4iV4i", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10395 .{ .tag = .__builtin_msa_insert_b, .properties = .{ .param_str = "V16ScV16ScIUii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10396 .{ .tag = .__builtin_msa_insert_d, .properties = .{ .param_str = "V2SLLiV2SLLiIUiLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10397 .{ .tag = .__builtin_msa_insert_h, .properties = .{ .param_str = "V8SsV8SsIUii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10398 .{ .tag = .__builtin_msa_insert_w, .properties = .{ .param_str = "V4SiV4SiIUii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10399 .{ .tag = .__builtin_msa_insve_b, .properties = .{ .param_str = "V16ScV16ScIUiV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10400 .{ .tag = .__builtin_msa_insve_d, .properties = .{ .param_str = "V2SLLiV2SLLiIUiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10401 .{ .tag = .__builtin_msa_insve_h, .properties = .{ .param_str = "V8SsV8SsIUiV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10402 .{ .tag = .__builtin_msa_insve_w, .properties = .{ .param_str = "V4SiV4SiIUiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10403 .{ .tag = .__builtin_msa_ld_b, .properties = .{ .param_str = "V16Scv*Ii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10404 .{ .tag = .__builtin_msa_ld_d, .properties = .{ .param_str = "V2SLLiv*Ii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10405 .{ .tag = .__builtin_msa_ld_h, .properties = .{ .param_str = "V8Ssv*Ii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10406 .{ .tag = .__builtin_msa_ld_w, .properties = .{ .param_str = "V4Siv*Ii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10407 .{ .tag = .__builtin_msa_ldi_b, .properties = .{ .param_str = "V16cIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10408 .{ .tag = .__builtin_msa_ldi_d, .properties = .{ .param_str = "V2LLiIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10409 .{ .tag = .__builtin_msa_ldi_h, .properties = .{ .param_str = "V8sIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10410 .{ .tag = .__builtin_msa_ldi_w, .properties = .{ .param_str = "V4iIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10411 .{ .tag = .__builtin_msa_ldr_d, .properties = .{ .param_str = "V2SLLiv*Ii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10412 .{ .tag = .__builtin_msa_ldr_w, .properties = .{ .param_str = "V4Siv*Ii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10413 .{ .tag = .__builtin_msa_madd_q_h, .properties = .{ .param_str = "V8SsV8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10414 .{ .tag = .__builtin_msa_madd_q_w, .properties = .{ .param_str = "V4SiV4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10415 .{ .tag = .__builtin_msa_maddr_q_h, .properties = .{ .param_str = "V8SsV8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10416 .{ .tag = .__builtin_msa_maddr_q_w, .properties = .{ .param_str = "V4SiV4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10417 .{ .tag = .__builtin_msa_maddv_b, .properties = .{ .param_str = "V16ScV16ScV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10418 .{ .tag = .__builtin_msa_maddv_d, .properties = .{ .param_str = "V2SLLiV2SLLiV2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10419 .{ .tag = .__builtin_msa_maddv_h, .properties = .{ .param_str = "V8SsV8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10420 .{ .tag = .__builtin_msa_maddv_w, .properties = .{ .param_str = "V4SiV4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10421 .{ .tag = .__builtin_msa_max_a_b, .properties = .{ .param_str = "V16ScV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10422 .{ .tag = .__builtin_msa_max_a_d, .properties = .{ .param_str = "V2SLLiV2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10423 .{ .tag = .__builtin_msa_max_a_h, .properties = .{ .param_str = "V8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10424 .{ .tag = .__builtin_msa_max_a_w, .properties = .{ .param_str = "V4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10425 .{ .tag = .__builtin_msa_max_s_b, .properties = .{ .param_str = "V16ScV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10426 .{ .tag = .__builtin_msa_max_s_d, .properties = .{ .param_str = "V2SLLiV2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10427 .{ .tag = .__builtin_msa_max_s_h, .properties = .{ .param_str = "V8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10428 .{ .tag = .__builtin_msa_max_s_w, .properties = .{ .param_str = "V4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10429 .{ .tag = .__builtin_msa_max_u_b, .properties = .{ .param_str = "V16UcV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10430 .{ .tag = .__builtin_msa_max_u_d, .properties = .{ .param_str = "V2ULLiV2ULLiV2ULLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10431 .{ .tag = .__builtin_msa_max_u_h, .properties = .{ .param_str = "V8UsV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10432 .{ .tag = .__builtin_msa_max_u_w, .properties = .{ .param_str = "V4UiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10433 .{ .tag = .__builtin_msa_maxi_s_b, .properties = .{ .param_str = "V16ScV16ScIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10434 .{ .tag = .__builtin_msa_maxi_s_d, .properties = .{ .param_str = "V2SLLiV2SLLiIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10435 .{ .tag = .__builtin_msa_maxi_s_h, .properties = .{ .param_str = "V8SsV8SsIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10436 .{ .tag = .__builtin_msa_maxi_s_w, .properties = .{ .param_str = "V4SiV4SiIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10437 .{ .tag = .__builtin_msa_maxi_u_b, .properties = .{ .param_str = "V16UcV16UcIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10438 .{ .tag = .__builtin_msa_maxi_u_d, .properties = .{ .param_str = "V2ULLiV2ULLiIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10439 .{ .tag = .__builtin_msa_maxi_u_h, .properties = .{ .param_str = "V8UsV8UsIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10440 .{ .tag = .__builtin_msa_maxi_u_w, .properties = .{ .param_str = "V4UiV4UiIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10441 .{ .tag = .__builtin_msa_min_a_b, .properties = .{ .param_str = "V16ScV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10442 .{ .tag = .__builtin_msa_min_a_d, .properties = .{ .param_str = "V2SLLiV2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10443 .{ .tag = .__builtin_msa_min_a_h, .properties = .{ .param_str = "V8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10444 .{ .tag = .__builtin_msa_min_a_w, .properties = .{ .param_str = "V4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10445 .{ .tag = .__builtin_msa_min_s_b, .properties = .{ .param_str = "V16ScV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10446 .{ .tag = .__builtin_msa_min_s_d, .properties = .{ .param_str = "V2SLLiV2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10447 .{ .tag = .__builtin_msa_min_s_h, .properties = .{ .param_str = "V8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10448 .{ .tag = .__builtin_msa_min_s_w, .properties = .{ .param_str = "V4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10449 .{ .tag = .__builtin_msa_min_u_b, .properties = .{ .param_str = "V16UcV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10450 .{ .tag = .__builtin_msa_min_u_d, .properties = .{ .param_str = "V2ULLiV2ULLiV2ULLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10451 .{ .tag = .__builtin_msa_min_u_h, .properties = .{ .param_str = "V8UsV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10452 .{ .tag = .__builtin_msa_min_u_w, .properties = .{ .param_str = "V4UiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10453 .{ .tag = .__builtin_msa_mini_s_b, .properties = .{ .param_str = "V16ScV16ScIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10454 .{ .tag = .__builtin_msa_mini_s_d, .properties = .{ .param_str = "V2SLLiV2SLLiIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10455 .{ .tag = .__builtin_msa_mini_s_h, .properties = .{ .param_str = "V8SsV8SsIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10456 .{ .tag = .__builtin_msa_mini_s_w, .properties = .{ .param_str = "V4SiV4SiIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10457 .{ .tag = .__builtin_msa_mini_u_b, .properties = .{ .param_str = "V16UcV16UcIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10458 .{ .tag = .__builtin_msa_mini_u_d, .properties = .{ .param_str = "V2ULLiV2ULLiIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10459 .{ .tag = .__builtin_msa_mini_u_h, .properties = .{ .param_str = "V8UsV8UsIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10460 .{ .tag = .__builtin_msa_mini_u_w, .properties = .{ .param_str = "V4UiV4UiIi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10461 .{ .tag = .__builtin_msa_mod_s_b, .properties = .{ .param_str = "V16ScV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10462 .{ .tag = .__builtin_msa_mod_s_d, .properties = .{ .param_str = "V2SLLiV2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10463 .{ .tag = .__builtin_msa_mod_s_h, .properties = .{ .param_str = "V8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10464 .{ .tag = .__builtin_msa_mod_s_w, .properties = .{ .param_str = "V4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10465 .{ .tag = .__builtin_msa_mod_u_b, .properties = .{ .param_str = "V16UcV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10466 .{ .tag = .__builtin_msa_mod_u_d, .properties = .{ .param_str = "V2ULLiV2ULLiV2ULLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10467 .{ .tag = .__builtin_msa_mod_u_h, .properties = .{ .param_str = "V8UsV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10468 .{ .tag = .__builtin_msa_mod_u_w, .properties = .{ .param_str = "V4UiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10469 .{ .tag = .__builtin_msa_move_v, .properties = .{ .param_str = "V16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10470 .{ .tag = .__builtin_msa_msub_q_h, .properties = .{ .param_str = "V8SsV8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10471 .{ .tag = .__builtin_msa_msub_q_w, .properties = .{ .param_str = "V4SiV4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10472 .{ .tag = .__builtin_msa_msubr_q_h, .properties = .{ .param_str = "V8SsV8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10473 .{ .tag = .__builtin_msa_msubr_q_w, .properties = .{ .param_str = "V4SiV4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10474 .{ .tag = .__builtin_msa_msubv_b, .properties = .{ .param_str = "V16ScV16ScV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10475 .{ .tag = .__builtin_msa_msubv_d, .properties = .{ .param_str = "V2SLLiV2SLLiV2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10476 .{ .tag = .__builtin_msa_msubv_h, .properties = .{ .param_str = "V8SsV8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10477 .{ .tag = .__builtin_msa_msubv_w, .properties = .{ .param_str = "V4SiV4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10478 .{ .tag = .__builtin_msa_mul_q_h, .properties = .{ .param_str = "V8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10479 .{ .tag = .__builtin_msa_mul_q_w, .properties = .{ .param_str = "V4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10480 .{ .tag = .__builtin_msa_mulr_q_h, .properties = .{ .param_str = "V8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10481 .{ .tag = .__builtin_msa_mulr_q_w, .properties = .{ .param_str = "V4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10482 .{ .tag = .__builtin_msa_mulv_b, .properties = .{ .param_str = "V16ScV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10483 .{ .tag = .__builtin_msa_mulv_d, .properties = .{ .param_str = "V2SLLiV2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10484 .{ .tag = .__builtin_msa_mulv_h, .properties = .{ .param_str = "V8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10485 .{ .tag = .__builtin_msa_mulv_w, .properties = .{ .param_str = "V4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10486 .{ .tag = .__builtin_msa_nloc_b, .properties = .{ .param_str = "V16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10487 .{ .tag = .__builtin_msa_nloc_d, .properties = .{ .param_str = "V2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10488 .{ .tag = .__builtin_msa_nloc_h, .properties = .{ .param_str = "V8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10489 .{ .tag = .__builtin_msa_nloc_w, .properties = .{ .param_str = "V4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10490 .{ .tag = .__builtin_msa_nlzc_b, .properties = .{ .param_str = "V16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10491 .{ .tag = .__builtin_msa_nlzc_d, .properties = .{ .param_str = "V2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10492 .{ .tag = .__builtin_msa_nlzc_h, .properties = .{ .param_str = "V8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10493 .{ .tag = .__builtin_msa_nlzc_w, .properties = .{ .param_str = "V4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10494 .{ .tag = .__builtin_msa_nor_v, .properties = .{ .param_str = "V16UcV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10495 .{ .tag = .__builtin_msa_nori_b, .properties = .{ .param_str = "V16UcV16cIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10496 .{ .tag = .__builtin_msa_or_v, .properties = .{ .param_str = "V16UcV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10497 .{ .tag = .__builtin_msa_ori_b, .properties = .{ .param_str = "V16UcV16UcIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10498 .{ .tag = .__builtin_msa_pckev_b, .properties = .{ .param_str = "V16cV16cV16c", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10499 .{ .tag = .__builtin_msa_pckev_d, .properties = .{ .param_str = "V2LLiV2LLiV2LLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10500 .{ .tag = .__builtin_msa_pckev_h, .properties = .{ .param_str = "V8sV8sV8s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10501 .{ .tag = .__builtin_msa_pckev_w, .properties = .{ .param_str = "V4iV4iV4i", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10502 .{ .tag = .__builtin_msa_pckod_b, .properties = .{ .param_str = "V16cV16cV16c", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10503 .{ .tag = .__builtin_msa_pckod_d, .properties = .{ .param_str = "V2LLiV2LLiV2LLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10504 .{ .tag = .__builtin_msa_pckod_h, .properties = .{ .param_str = "V8sV8sV8s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10505 .{ .tag = .__builtin_msa_pckod_w, .properties = .{ .param_str = "V4iV4iV4i", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10506 .{ .tag = .__builtin_msa_pcnt_b, .properties = .{ .param_str = "V16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10507 .{ .tag = .__builtin_msa_pcnt_d, .properties = .{ .param_str = "V2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10508 .{ .tag = .__builtin_msa_pcnt_h, .properties = .{ .param_str = "V8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10509 .{ .tag = .__builtin_msa_pcnt_w, .properties = .{ .param_str = "V4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10510 .{ .tag = .__builtin_msa_sat_s_b, .properties = .{ .param_str = "V16ScV16ScIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10511 .{ .tag = .__builtin_msa_sat_s_d, .properties = .{ .param_str = "V2SLLiV2SLLiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10512 .{ .tag = .__builtin_msa_sat_s_h, .properties = .{ .param_str = "V8SsV8SsIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10513 .{ .tag = .__builtin_msa_sat_s_w, .properties = .{ .param_str = "V4SiV4SiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10514 .{ .tag = .__builtin_msa_sat_u_b, .properties = .{ .param_str = "V16UcV16UcIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10515 .{ .tag = .__builtin_msa_sat_u_d, .properties = .{ .param_str = "V2ULLiV2ULLiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10516 .{ .tag = .__builtin_msa_sat_u_h, .properties = .{ .param_str = "V8UsV8UsIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10517 .{ .tag = .__builtin_msa_sat_u_w, .properties = .{ .param_str = "V4UiV4UiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10518 .{ .tag = .__builtin_msa_shf_b, .properties = .{ .param_str = "V16cV16cIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10519 .{ .tag = .__builtin_msa_shf_h, .properties = .{ .param_str = "V8sV8sIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10520 .{ .tag = .__builtin_msa_shf_w, .properties = .{ .param_str = "V4iV4iIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10521 .{ .tag = .__builtin_msa_sld_b, .properties = .{ .param_str = "V16cV16cV16cUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10522 .{ .tag = .__builtin_msa_sld_d, .properties = .{ .param_str = "V2LLiV2LLiV2LLiUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10523 .{ .tag = .__builtin_msa_sld_h, .properties = .{ .param_str = "V8sV8sV8sUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10524 .{ .tag = .__builtin_msa_sld_w, .properties = .{ .param_str = "V4iV4iV4iUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10525 .{ .tag = .__builtin_msa_sldi_b, .properties = .{ .param_str = "V16cV16cV16cIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10526 .{ .tag = .__builtin_msa_sldi_d, .properties = .{ .param_str = "V2LLiV2LLiV2LLiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10527 .{ .tag = .__builtin_msa_sldi_h, .properties = .{ .param_str = "V8sV8sV8sIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10528 .{ .tag = .__builtin_msa_sldi_w, .properties = .{ .param_str = "V4iV4iV4iIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10529 .{ .tag = .__builtin_msa_sll_b, .properties = .{ .param_str = "V16cV16cV16c", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10530 .{ .tag = .__builtin_msa_sll_d, .properties = .{ .param_str = "V2LLiV2LLiV2LLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10531 .{ .tag = .__builtin_msa_sll_h, .properties = .{ .param_str = "V8sV8sV8s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10532 .{ .tag = .__builtin_msa_sll_w, .properties = .{ .param_str = "V4iV4iV4i", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10533 .{ .tag = .__builtin_msa_slli_b, .properties = .{ .param_str = "V16cV16cIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10534 .{ .tag = .__builtin_msa_slli_d, .properties = .{ .param_str = "V2LLiV2LLiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10535 .{ .tag = .__builtin_msa_slli_h, .properties = .{ .param_str = "V8sV8sIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10536 .{ .tag = .__builtin_msa_slli_w, .properties = .{ .param_str = "V4iV4iIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10537 .{ .tag = .__builtin_msa_splat_b, .properties = .{ .param_str = "V16cV16cUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10538 .{ .tag = .__builtin_msa_splat_d, .properties = .{ .param_str = "V2LLiV2LLiUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10539 .{ .tag = .__builtin_msa_splat_h, .properties = .{ .param_str = "V8sV8sUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10540 .{ .tag = .__builtin_msa_splat_w, .properties = .{ .param_str = "V4iV4iUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10541 .{ .tag = .__builtin_msa_splati_b, .properties = .{ .param_str = "V16cV16cIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10542 .{ .tag = .__builtin_msa_splati_d, .properties = .{ .param_str = "V2LLiV2LLiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10543 .{ .tag = .__builtin_msa_splati_h, .properties = .{ .param_str = "V8sV8sIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10544 .{ .tag = .__builtin_msa_splati_w, .properties = .{ .param_str = "V4iV4iIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10545 .{ .tag = .__builtin_msa_sra_b, .properties = .{ .param_str = "V16cV16cV16c", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10546 .{ .tag = .__builtin_msa_sra_d, .properties = .{ .param_str = "V2LLiV2LLiV2LLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10547 .{ .tag = .__builtin_msa_sra_h, .properties = .{ .param_str = "V8sV8sV8s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10548 .{ .tag = .__builtin_msa_sra_w, .properties = .{ .param_str = "V4iV4iV4i", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10549 .{ .tag = .__builtin_msa_srai_b, .properties = .{ .param_str = "V16cV16cIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10550 .{ .tag = .__builtin_msa_srai_d, .properties = .{ .param_str = "V2LLiV2LLiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10551 .{ .tag = .__builtin_msa_srai_h, .properties = .{ .param_str = "V8sV8sIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10552 .{ .tag = .__builtin_msa_srai_w, .properties = .{ .param_str = "V4iV4iIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10553 .{ .tag = .__builtin_msa_srar_b, .properties = .{ .param_str = "V16cV16cV16c", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10554 .{ .tag = .__builtin_msa_srar_d, .properties = .{ .param_str = "V2LLiV2LLiV2LLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10555 .{ .tag = .__builtin_msa_srar_h, .properties = .{ .param_str = "V8sV8sV8s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10556 .{ .tag = .__builtin_msa_srar_w, .properties = .{ .param_str = "V4iV4iV4i", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10557 .{ .tag = .__builtin_msa_srari_b, .properties = .{ .param_str = "V16cV16cIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10558 .{ .tag = .__builtin_msa_srari_d, .properties = .{ .param_str = "V2LLiV2LLiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10559 .{ .tag = .__builtin_msa_srari_h, .properties = .{ .param_str = "V8sV8sIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10560 .{ .tag = .__builtin_msa_srari_w, .properties = .{ .param_str = "V4iV4iIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10561 .{ .tag = .__builtin_msa_srl_b, .properties = .{ .param_str = "V16cV16cV16c", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10562 .{ .tag = .__builtin_msa_srl_d, .properties = .{ .param_str = "V2LLiV2LLiV2LLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10563 .{ .tag = .__builtin_msa_srl_h, .properties = .{ .param_str = "V8sV8sV8s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10564 .{ .tag = .__builtin_msa_srl_w, .properties = .{ .param_str = "V4iV4iV4i", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10565 .{ .tag = .__builtin_msa_srli_b, .properties = .{ .param_str = "V16cV16cIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10566 .{ .tag = .__builtin_msa_srli_d, .properties = .{ .param_str = "V2LLiV2LLiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10567 .{ .tag = .__builtin_msa_srli_h, .properties = .{ .param_str = "V8sV8sIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10568 .{ .tag = .__builtin_msa_srli_w, .properties = .{ .param_str = "V4iV4iIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10569 .{ .tag = .__builtin_msa_srlr_b, .properties = .{ .param_str = "V16cV16cV16c", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10570 .{ .tag = .__builtin_msa_srlr_d, .properties = .{ .param_str = "V2LLiV2LLiV2LLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10571 .{ .tag = .__builtin_msa_srlr_h, .properties = .{ .param_str = "V8sV8sV8s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10572 .{ .tag = .__builtin_msa_srlr_w, .properties = .{ .param_str = "V4iV4iV4i", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10573 .{ .tag = .__builtin_msa_srlri_b, .properties = .{ .param_str = "V16cV16cIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10574 .{ .tag = .__builtin_msa_srlri_d, .properties = .{ .param_str = "V2LLiV2LLiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10575 .{ .tag = .__builtin_msa_srlri_h, .properties = .{ .param_str = "V8sV8sIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10576 .{ .tag = .__builtin_msa_srlri_w, .properties = .{ .param_str = "V4iV4iIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10577 .{ .tag = .__builtin_msa_st_b, .properties = .{ .param_str = "vV16Scv*Ii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10578 .{ .tag = .__builtin_msa_st_d, .properties = .{ .param_str = "vV2SLLiv*Ii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10579 .{ .tag = .__builtin_msa_st_h, .properties = .{ .param_str = "vV8Ssv*Ii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10580 .{ .tag = .__builtin_msa_st_w, .properties = .{ .param_str = "vV4Siv*Ii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10581 .{ .tag = .__builtin_msa_str_d, .properties = .{ .param_str = "vV2SLLiv*Ii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10582 .{ .tag = .__builtin_msa_str_w, .properties = .{ .param_str = "vV4Siv*Ii", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10583 .{ .tag = .__builtin_msa_subs_s_b, .properties = .{ .param_str = "V16ScV16ScV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10584 .{ .tag = .__builtin_msa_subs_s_d, .properties = .{ .param_str = "V2SLLiV2SLLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10585 .{ .tag = .__builtin_msa_subs_s_h, .properties = .{ .param_str = "V8SsV8SsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10586 .{ .tag = .__builtin_msa_subs_s_w, .properties = .{ .param_str = "V4SiV4SiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10587 .{ .tag = .__builtin_msa_subs_u_b, .properties = .{ .param_str = "V16UcV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10588 .{ .tag = .__builtin_msa_subs_u_d, .properties = .{ .param_str = "V2ULLiV2ULLiV2ULLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10589 .{ .tag = .__builtin_msa_subs_u_h, .properties = .{ .param_str = "V8UsV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10590 .{ .tag = .__builtin_msa_subs_u_w, .properties = .{ .param_str = "V4UiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10591 .{ .tag = .__builtin_msa_subsus_u_b, .properties = .{ .param_str = "V16UcV16UcV16Sc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10592 .{ .tag = .__builtin_msa_subsus_u_d, .properties = .{ .param_str = "V2ULLiV2ULLiV2SLLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10593 .{ .tag = .__builtin_msa_subsus_u_h, .properties = .{ .param_str = "V8UsV8UsV8Ss", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10594 .{ .tag = .__builtin_msa_subsus_u_w, .properties = .{ .param_str = "V4UiV4UiV4Si", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10595 .{ .tag = .__builtin_msa_subsuu_s_b, .properties = .{ .param_str = "V16ScV16UcV16Uc", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10596 .{ .tag = .__builtin_msa_subsuu_s_d, .properties = .{ .param_str = "V2SLLiV2ULLiV2ULLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10597 .{ .tag = .__builtin_msa_subsuu_s_h, .properties = .{ .param_str = "V8SsV8UsV8Us", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10598 .{ .tag = .__builtin_msa_subsuu_s_w, .properties = .{ .param_str = "V4SiV4UiV4Ui", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10599 .{ .tag = .__builtin_msa_subv_b, .properties = .{ .param_str = "V16cV16cV16c", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10600 .{ .tag = .__builtin_msa_subv_d, .properties = .{ .param_str = "V2LLiV2LLiV2LLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10601 .{ .tag = .__builtin_msa_subv_h, .properties = .{ .param_str = "V8sV8sV8s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10602 .{ .tag = .__builtin_msa_subv_w, .properties = .{ .param_str = "V4iV4iV4i", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10603 .{ .tag = .__builtin_msa_subvi_b, .properties = .{ .param_str = "V16cV16cIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10604 .{ .tag = .__builtin_msa_subvi_d, .properties = .{ .param_str = "V2LLiV2LLiIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10605 .{ .tag = .__builtin_msa_subvi_h, .properties = .{ .param_str = "V8sV8sIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10606 .{ .tag = .__builtin_msa_subvi_w, .properties = .{ .param_str = "V4iV4iIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10607 .{ .tag = .__builtin_msa_vshf_b, .properties = .{ .param_str = "V16cV16cV16cV16c", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10608 .{ .tag = .__builtin_msa_vshf_d, .properties = .{ .param_str = "V2LLiV2LLiV2LLiV2LLi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10609 .{ .tag = .__builtin_msa_vshf_h, .properties = .{ .param_str = "V8sV8sV8sV8s", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10610 .{ .tag = .__builtin_msa_vshf_w, .properties = .{ .param_str = "V4iV4iV4iV4i", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10611 .{ .tag = .__builtin_msa_xor_v, .properties = .{ .param_str = "V16cV16cV16c", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10612 .{ .tag = .__builtin_msa_xori_b, .properties = .{ .param_str = "V16cV16cIUi", .target_set = TargetSet.initOne(.mips), .attributes = .{ .@"const" = true } } },
10613 .{ .tag = .__builtin_mul_overflow, .properties = .{ .param_str = "b.", .attributes = .{ .custom_typecheck = true, .const_evaluable = true } } },
10614 .{ .tag = .__builtin_nan, .properties = .{ .param_str = "dcC*", .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
10615 .{ .tag = .__builtin_nanf, .properties = .{ .param_str = "fcC*", .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
10616 .{ .tag = .__builtin_nanf128, .properties = .{ .param_str = "LLdcC*", .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
10617 .{ .tag = .__builtin_nanf16, .properties = .{ .param_str = "xcC*", .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
10618 .{ .tag = .__builtin_nanl, .properties = .{ .param_str = "LdcC*", .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
10619 .{ .tag = .__builtin_nans, .properties = .{ .param_str = "dcC*", .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
10620 .{ .tag = .__builtin_nansf, .properties = .{ .param_str = "fcC*", .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
10621 .{ .tag = .__builtin_nansf128, .properties = .{ .param_str = "LLdcC*", .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
10622 .{ .tag = .__builtin_nansf16, .properties = .{ .param_str = "xcC*", .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
10623 .{ .tag = .__builtin_nansl, .properties = .{ .param_str = "LdcC*", .attributes = .{ .pure = true, .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
10624 .{ .tag = .__builtin_nearbyint, .properties = .{ .param_str = "dd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
10625 .{ .tag = .__builtin_nearbyintf, .properties = .{ .param_str = "ff", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
10626 .{ .tag = .__builtin_nearbyintf128, .properties = .{ .param_str = "LLdLLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
10627 .{ .tag = .__builtin_nearbyintl, .properties = .{ .param_str = "LdLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
10628 .{ .tag = .__builtin_nextafter, .properties = .{ .param_str = "ddd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10629 .{ .tag = .__builtin_nextafterf, .properties = .{ .param_str = "fff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10630 .{ .tag = .__builtin_nextafterf128, .properties = .{ .param_str = "LLdLLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10631 .{ .tag = .__builtin_nextafterl, .properties = .{ .param_str = "LdLdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10632 .{ .tag = .__builtin_nexttoward, .properties = .{ .param_str = "ddLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10633 .{ .tag = .__builtin_nexttowardf, .properties = .{ .param_str = "ffLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10634 .{ .tag = .__builtin_nexttowardf128, .properties = .{ .param_str = "LLdLLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10635 .{ .tag = .__builtin_nexttowardl, .properties = .{ .param_str = "LdLdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10636 .{ .tag = .__builtin_nondeterministic_value, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
10637 .{ .tag = .__builtin_nontemporal_load, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
10638 .{ .tag = .__builtin_nontemporal_store, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
10639 .{ .tag = .__builtin_objc_memmove_collectable, .properties = .{ .param_str = "v*v*vC*z", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
10640 .{ .tag = .__builtin_object_size, .properties = .{ .param_str = "zvC*i", .attributes = .{ .eval_args = false, .const_evaluable = true } } },
10641 .{ .tag = .__builtin_offsetof, .properties = .{ .param_str = "z.", .attributes = .{ .custom_typecheck = true } } },
10642 .{ .tag = .__builtin_operator_delete, .properties = .{ .param_str = "vv*", .attributes = .{ .custom_typecheck = true, .const_evaluable = true } } },
10643 .{ .tag = .__builtin_operator_new, .properties = .{ .param_str = "v*z", .attributes = .{ .@"const" = true, .custom_typecheck = true, .const_evaluable = true } } },
10644 .{ .tag = .__builtin_os_log_format, .properties = .{ .param_str = "v*v*cC*.", .attributes = .{ .custom_typecheck = true, .format_kind = .printf } } },
10645 .{ .tag = .__builtin_os_log_format_buffer_size, .properties = .{ .param_str = "zcC*.", .attributes = .{ .custom_typecheck = true, .format_kind = .printf, .eval_args = false, .const_evaluable = true } } },
10646 .{ .tag = .__builtin_pack_longdouble, .properties = .{ .param_str = "Lddd", .target_set = TargetSet.initOne(.ppc) } },
10647 .{ .tag = .__builtin_parity, .properties = .{ .param_str = "iUi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
10648 .{ .tag = .__builtin_parityl, .properties = .{ .param_str = "iULi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
10649 .{ .tag = .__builtin_parityll, .properties = .{ .param_str = "iULLi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
10650 .{ .tag = .__builtin_popcount, .properties = .{ .param_str = "iUi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
10651 .{ .tag = .__builtin_popcountl, .properties = .{ .param_str = "iULi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
10652 .{ .tag = .__builtin_popcountll, .properties = .{ .param_str = "iULLi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
10653 .{ .tag = .__builtin_pow, .properties = .{ .param_str = "ddd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10654 .{ .tag = .__builtin_powf, .properties = .{ .param_str = "fff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10655 .{ .tag = .__builtin_powf128, .properties = .{ .param_str = "LLdLLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10656 .{ .tag = .__builtin_powf16, .properties = .{ .param_str = "hhh", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10657 .{ .tag = .__builtin_powi, .properties = .{ .param_str = "ddi", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
10658 .{ .tag = .__builtin_powif, .properties = .{ .param_str = "ffi", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
10659 .{ .tag = .__builtin_powil, .properties = .{ .param_str = "LdLdi", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
10660 .{ .tag = .__builtin_powl, .properties = .{ .param_str = "LdLdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10661 .{ .tag = .__builtin_ppc_alignx, .properties = .{ .param_str = "vIivC*", .target_set = TargetSet.initOne(.ppc), .attributes = .{ .@"const" = true } } },
10662 .{ .tag = .__builtin_ppc_cmpb, .properties = .{ .param_str = "LLiLLiLLi", .target_set = TargetSet.initOne(.ppc) } },
10663 .{ .tag = .__builtin_ppc_compare_and_swap, .properties = .{ .param_str = "iiD*i*i", .target_set = TargetSet.initOne(.ppc) } },
10664 .{ .tag = .__builtin_ppc_compare_and_swaplp, .properties = .{ .param_str = "iLiD*Li*Li", .target_set = TargetSet.initOne(.ppc) } },
10665 .{ .tag = .__builtin_ppc_dcbfl, .properties = .{ .param_str = "vvC*", .target_set = TargetSet.initOne(.ppc) } },
10666 .{ .tag = .__builtin_ppc_dcbflp, .properties = .{ .param_str = "vvC*", .target_set = TargetSet.initOne(.ppc) } },
10667 .{ .tag = .__builtin_ppc_dcbst, .properties = .{ .param_str = "vvC*", .target_set = TargetSet.initOne(.ppc) } },
10668 .{ .tag = .__builtin_ppc_dcbt, .properties = .{ .param_str = "vv*", .target_set = TargetSet.initOne(.ppc) } },
10669 .{ .tag = .__builtin_ppc_dcbtst, .properties = .{ .param_str = "vv*", .target_set = TargetSet.initOne(.ppc) } },
10670 .{ .tag = .__builtin_ppc_dcbtstt, .properties = .{ .param_str = "vv*", .target_set = TargetSet.initOne(.ppc) } },
10671 .{ .tag = .__builtin_ppc_dcbtt, .properties = .{ .param_str = "vv*", .target_set = TargetSet.initOne(.ppc) } },
10672 .{ .tag = .__builtin_ppc_dcbz, .properties = .{ .param_str = "vv*", .target_set = TargetSet.initOne(.ppc) } },
10673 .{ .tag = .__builtin_ppc_eieio, .properties = .{ .param_str = "v", .target_set = TargetSet.initOne(.ppc) } },
10674 .{ .tag = .__builtin_ppc_fcfid, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.ppc) } },
10675 .{ .tag = .__builtin_ppc_fcfud, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.ppc) } },
10676 .{ .tag = .__builtin_ppc_fctid, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.ppc) } },
10677 .{ .tag = .__builtin_ppc_fctidz, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.ppc) } },
10678 .{ .tag = .__builtin_ppc_fctiw, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.ppc) } },
10679 .{ .tag = .__builtin_ppc_fctiwz, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.ppc) } },
10680 .{ .tag = .__builtin_ppc_fctudz, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.ppc) } },
10681 .{ .tag = .__builtin_ppc_fctuwz, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.ppc) } },
10682 .{ .tag = .__builtin_ppc_fetch_and_add, .properties = .{ .param_str = "iiD*i", .target_set = TargetSet.initOne(.ppc) } },
10683 .{ .tag = .__builtin_ppc_fetch_and_addlp, .properties = .{ .param_str = "LiLiD*Li", .target_set = TargetSet.initOne(.ppc) } },
10684 .{ .tag = .__builtin_ppc_fetch_and_and, .properties = .{ .param_str = "UiUiD*Ui", .target_set = TargetSet.initOne(.ppc) } },
10685 .{ .tag = .__builtin_ppc_fetch_and_andlp, .properties = .{ .param_str = "ULiULiD*ULi", .target_set = TargetSet.initOne(.ppc) } },
10686 .{ .tag = .__builtin_ppc_fetch_and_or, .properties = .{ .param_str = "UiUiD*Ui", .target_set = TargetSet.initOne(.ppc) } },
10687 .{ .tag = .__builtin_ppc_fetch_and_orlp, .properties = .{ .param_str = "ULiULiD*ULi", .target_set = TargetSet.initOne(.ppc) } },
10688 .{ .tag = .__builtin_ppc_fetch_and_swap, .properties = .{ .param_str = "UiUiD*Ui", .target_set = TargetSet.initOne(.ppc) } },
10689 .{ .tag = .__builtin_ppc_fetch_and_swaplp, .properties = .{ .param_str = "ULiULiD*ULi", .target_set = TargetSet.initOne(.ppc) } },
10690 .{ .tag = .__builtin_ppc_fmsub, .properties = .{ .param_str = "dddd", .target_set = TargetSet.initOne(.ppc) } },
10691 .{ .tag = .__builtin_ppc_fmsubs, .properties = .{ .param_str = "ffff", .target_set = TargetSet.initOne(.ppc) } },
10692 .{ .tag = .__builtin_ppc_fnabs, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.ppc) } },
10693 .{ .tag = .__builtin_ppc_fnabss, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.ppc) } },
10694 .{ .tag = .__builtin_ppc_fnmadd, .properties = .{ .param_str = "dddd", .target_set = TargetSet.initOne(.ppc) } },
10695 .{ .tag = .__builtin_ppc_fnmadds, .properties = .{ .param_str = "ffff", .target_set = TargetSet.initOne(.ppc) } },
10696 .{ .tag = .__builtin_ppc_fnmsub, .properties = .{ .param_str = "dddd", .target_set = TargetSet.initOne(.ppc) } },
10697 .{ .tag = .__builtin_ppc_fnmsubs, .properties = .{ .param_str = "ffff", .target_set = TargetSet.initOne(.ppc) } },
10698 .{ .tag = .__builtin_ppc_fre, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.ppc) } },
10699 .{ .tag = .__builtin_ppc_fres, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.ppc) } },
10700 .{ .tag = .__builtin_ppc_fric, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.ppc) } },
10701 .{ .tag = .__builtin_ppc_frim, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.ppc) } },
10702 .{ .tag = .__builtin_ppc_frims, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.ppc) } },
10703 .{ .tag = .__builtin_ppc_frin, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.ppc) } },
10704 .{ .tag = .__builtin_ppc_frins, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.ppc) } },
10705 .{ .tag = .__builtin_ppc_frip, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.ppc) } },
10706 .{ .tag = .__builtin_ppc_frips, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.ppc) } },
10707 .{ .tag = .__builtin_ppc_friz, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.ppc) } },
10708 .{ .tag = .__builtin_ppc_frizs, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.ppc) } },
10709 .{ .tag = .__builtin_ppc_frsqrte, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.ppc) } },
10710 .{ .tag = .__builtin_ppc_frsqrtes, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.ppc) } },
10711 .{ .tag = .__builtin_ppc_fsel, .properties = .{ .param_str = "dddd", .target_set = TargetSet.initOne(.ppc) } },
10712 .{ .tag = .__builtin_ppc_fsels, .properties = .{ .param_str = "ffff", .target_set = TargetSet.initOne(.ppc) } },
10713 .{ .tag = .__builtin_ppc_fsqrt, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.ppc) } },
10714 .{ .tag = .__builtin_ppc_fsqrts, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.ppc) } },
10715 .{ .tag = .__builtin_ppc_get_timebase, .properties = .{ .param_str = "ULLi", .target_set = TargetSet.initOne(.ppc) } },
10716 .{ .tag = .__builtin_ppc_iospace_eieio, .properties = .{ .param_str = "v", .target_set = TargetSet.initOne(.ppc) } },
10717 .{ .tag = .__builtin_ppc_iospace_lwsync, .properties = .{ .param_str = "v", .target_set = TargetSet.initOne(.ppc) } },
10718 .{ .tag = .__builtin_ppc_iospace_sync, .properties = .{ .param_str = "v", .target_set = TargetSet.initOne(.ppc) } },
10719 .{ .tag = .__builtin_ppc_isync, .properties = .{ .param_str = "v", .target_set = TargetSet.initOne(.ppc) } },
10720 .{ .tag = .__builtin_ppc_ldarx, .properties = .{ .param_str = "LiLiD*", .target_set = TargetSet.initOne(.ppc) } },
10721 .{ .tag = .__builtin_ppc_load2r, .properties = .{ .param_str = "UsUs*", .target_set = TargetSet.initOne(.ppc) } },
10722 .{ .tag = .__builtin_ppc_load4r, .properties = .{ .param_str = "UiUi*", .target_set = TargetSet.initOne(.ppc) } },
10723 .{ .tag = .__builtin_ppc_lwarx, .properties = .{ .param_str = "iiD*", .target_set = TargetSet.initOne(.ppc) } },
10724 .{ .tag = .__builtin_ppc_lwsync, .properties = .{ .param_str = "v", .target_set = TargetSet.initOne(.ppc) } },
10725 .{ .tag = .__builtin_ppc_maxfe, .properties = .{ .param_str = "LdLdLdLd.", .target_set = TargetSet.initOne(.ppc), .attributes = .{ .custom_typecheck = true } } },
10726 .{ .tag = .__builtin_ppc_maxfl, .properties = .{ .param_str = "dddd.", .target_set = TargetSet.initOne(.ppc), .attributes = .{ .custom_typecheck = true } } },
10727 .{ .tag = .__builtin_ppc_maxfs, .properties = .{ .param_str = "ffff.", .target_set = TargetSet.initOne(.ppc), .attributes = .{ .custom_typecheck = true } } },
10728 .{ .tag = .__builtin_ppc_mfmsr, .properties = .{ .param_str = "Ui", .target_set = TargetSet.initOne(.ppc) } },
10729 .{ .tag = .__builtin_ppc_mfspr, .properties = .{ .param_str = "ULiIi", .target_set = TargetSet.initOne(.ppc) } },
10730 .{ .tag = .__builtin_ppc_mftbu, .properties = .{ .param_str = "Ui", .target_set = TargetSet.initOne(.ppc) } },
10731 .{ .tag = .__builtin_ppc_minfe, .properties = .{ .param_str = "LdLdLdLd.", .target_set = TargetSet.initOne(.ppc), .attributes = .{ .custom_typecheck = true } } },
10732 .{ .tag = .__builtin_ppc_minfl, .properties = .{ .param_str = "dddd.", .target_set = TargetSet.initOne(.ppc), .attributes = .{ .custom_typecheck = true } } },
10733 .{ .tag = .__builtin_ppc_minfs, .properties = .{ .param_str = "ffff.", .target_set = TargetSet.initOne(.ppc), .attributes = .{ .custom_typecheck = true } } },
10734 .{ .tag = .__builtin_ppc_mtfsb0, .properties = .{ .param_str = "vUIi", .target_set = TargetSet.initOne(.ppc) } },
10735 .{ .tag = .__builtin_ppc_mtfsb1, .properties = .{ .param_str = "vUIi", .target_set = TargetSet.initOne(.ppc) } },
10736 .{ .tag = .__builtin_ppc_mtfsf, .properties = .{ .param_str = "vUIiUi", .target_set = TargetSet.initOne(.ppc) } },
10737 .{ .tag = .__builtin_ppc_mtfsfi, .properties = .{ .param_str = "vUIiUIi", .target_set = TargetSet.initOne(.ppc) } },
10738 .{ .tag = .__builtin_ppc_mtmsr, .properties = .{ .param_str = "vUi", .target_set = TargetSet.initOne(.ppc) } },
10739 .{ .tag = .__builtin_ppc_mtspr, .properties = .{ .param_str = "vIiULi", .target_set = TargetSet.initOne(.ppc) } },
10740 .{ .tag = .__builtin_ppc_mulhd, .properties = .{ .param_str = "LLiLiLi", .target_set = TargetSet.initOne(.ppc) } },
10741 .{ .tag = .__builtin_ppc_mulhdu, .properties = .{ .param_str = "ULLiULiULi", .target_set = TargetSet.initOne(.ppc) } },
10742 .{ .tag = .__builtin_ppc_mulhw, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.ppc) } },
10743 .{ .tag = .__builtin_ppc_mulhwu, .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.ppc) } },
10744 .{ .tag = .__builtin_ppc_popcntb, .properties = .{ .param_str = "ULiULi", .target_set = TargetSet.initOne(.ppc) } },
10745 .{ .tag = .__builtin_ppc_poppar4, .properties = .{ .param_str = "iUi", .target_set = TargetSet.initOne(.ppc) } },
10746 .{ .tag = .__builtin_ppc_poppar8, .properties = .{ .param_str = "iULLi", .target_set = TargetSet.initOne(.ppc) } },
10747 .{ .tag = .__builtin_ppc_rdlam, .properties = .{ .param_str = "UWiUWiUWiUWIi", .target_set = TargetSet.initOne(.ppc), .attributes = .{ .@"const" = true } } },
10748 .{ .tag = .__builtin_ppc_recipdivd, .properties = .{ .param_str = "V2dV2dV2d", .target_set = TargetSet.initOne(.ppc) } },
10749 .{ .tag = .__builtin_ppc_recipdivf, .properties = .{ .param_str = "V4fV4fV4f", .target_set = TargetSet.initOne(.ppc) } },
10750 .{ .tag = .__builtin_ppc_rldimi, .properties = .{ .param_str = "ULLiULLiULLiIUiIULLi", .target_set = TargetSet.initOne(.ppc) } },
10751 .{ .tag = .__builtin_ppc_rlwimi, .properties = .{ .param_str = "UiUiUiIUiIUi", .target_set = TargetSet.initOne(.ppc) } },
10752 .{ .tag = .__builtin_ppc_rlwnm, .properties = .{ .param_str = "UiUiUiIUi", .target_set = TargetSet.initOne(.ppc) } },
10753 .{ .tag = .__builtin_ppc_rsqrtd, .properties = .{ .param_str = "V2dV2d", .target_set = TargetSet.initOne(.ppc) } },
10754 .{ .tag = .__builtin_ppc_rsqrtf, .properties = .{ .param_str = "V4fV4f", .target_set = TargetSet.initOne(.ppc) } },
10755 .{ .tag = .__builtin_ppc_stdcx, .properties = .{ .param_str = "iLiD*Li", .target_set = TargetSet.initOne(.ppc) } },
10756 .{ .tag = .__builtin_ppc_stfiw, .properties = .{ .param_str = "viC*d", .target_set = TargetSet.initOne(.ppc) } },
10757 .{ .tag = .__builtin_ppc_store2r, .properties = .{ .param_str = "vUiUs*", .target_set = TargetSet.initOne(.ppc) } },
10758 .{ .tag = .__builtin_ppc_store4r, .properties = .{ .param_str = "vUiUi*", .target_set = TargetSet.initOne(.ppc) } },
10759 .{ .tag = .__builtin_ppc_stwcx, .properties = .{ .param_str = "iiD*i", .target_set = TargetSet.initOne(.ppc) } },
10760 .{ .tag = .__builtin_ppc_swdiv, .properties = .{ .param_str = "ddd", .target_set = TargetSet.initOne(.ppc) } },
10761 .{ .tag = .__builtin_ppc_swdiv_nochk, .properties = .{ .param_str = "ddd", .target_set = TargetSet.initOne(.ppc) } },
10762 .{ .tag = .__builtin_ppc_swdivs, .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.ppc) } },
10763 .{ .tag = .__builtin_ppc_swdivs_nochk, .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.ppc) } },
10764 .{ .tag = .__builtin_ppc_sync, .properties = .{ .param_str = "v", .target_set = TargetSet.initOne(.ppc) } },
10765 .{ .tag = .__builtin_ppc_tdw, .properties = .{ .param_str = "vLLiLLiIUi", .target_set = TargetSet.initOne(.ppc) } },
10766 .{ .tag = .__builtin_ppc_trap, .properties = .{ .param_str = "vi", .target_set = TargetSet.initOne(.ppc) } },
10767 .{ .tag = .__builtin_ppc_trapd, .properties = .{ .param_str = "vLi", .target_set = TargetSet.initOne(.ppc) } },
10768 .{ .tag = .__builtin_ppc_tw, .properties = .{ .param_str = "viiIUi", .target_set = TargetSet.initOne(.ppc) } },
10769 .{ .tag = .__builtin_prefetch, .properties = .{ .param_str = "vvC*.", .attributes = .{ .@"const" = true } } },
10770 .{ .tag = .__builtin_preserve_access_index, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
10771 .{ .tag = .__builtin_printf, .properties = .{ .param_str = "icC*R.", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .printf } } },
10772 .{ .tag = .__builtin_ptx_get_image_channel_data_typei_, .properties = .{ .param_str = "ii", .target_set = TargetSet.initOne(.nvptx) } },
10773 .{ .tag = .__builtin_ptx_get_image_channel_orderi_, .properties = .{ .param_str = "ii", .target_set = TargetSet.initOne(.nvptx) } },
10774 .{ .tag = .__builtin_ptx_get_image_depthi_, .properties = .{ .param_str = "ii", .target_set = TargetSet.initOne(.nvptx) } },
10775 .{ .tag = .__builtin_ptx_get_image_heighti_, .properties = .{ .param_str = "ii", .target_set = TargetSet.initOne(.nvptx) } },
10776 .{ .tag = .__builtin_ptx_get_image_widthi_, .properties = .{ .param_str = "ii", .target_set = TargetSet.initOne(.nvptx) } },
10777 .{ .tag = .__builtin_ptx_read_image2Dff_, .properties = .{ .param_str = "V4fiiff", .target_set = TargetSet.initOne(.nvptx) } },
10778 .{ .tag = .__builtin_ptx_read_image2Dfi_, .properties = .{ .param_str = "V4fiiii", .target_set = TargetSet.initOne(.nvptx) } },
10779 .{ .tag = .__builtin_ptx_read_image2Dif_, .properties = .{ .param_str = "V4iiiff", .target_set = TargetSet.initOne(.nvptx) } },
10780 .{ .tag = .__builtin_ptx_read_image2Dii_, .properties = .{ .param_str = "V4iiiii", .target_set = TargetSet.initOne(.nvptx) } },
10781 .{ .tag = .__builtin_ptx_read_image3Dff_, .properties = .{ .param_str = "V4fiiffff", .target_set = TargetSet.initOne(.nvptx) } },
10782 .{ .tag = .__builtin_ptx_read_image3Dfi_, .properties = .{ .param_str = "V4fiiiiii", .target_set = TargetSet.initOne(.nvptx) } },
10783 .{ .tag = .__builtin_ptx_read_image3Dif_, .properties = .{ .param_str = "V4iiiffff", .target_set = TargetSet.initOne(.nvptx) } },
10784 .{ .tag = .__builtin_ptx_read_image3Dii_, .properties = .{ .param_str = "V4iiiiiii", .target_set = TargetSet.initOne(.nvptx) } },
10785 .{ .tag = .__builtin_ptx_write_image2Df_, .properties = .{ .param_str = "viiiffff", .target_set = TargetSet.initOne(.nvptx) } },
10786 .{ .tag = .__builtin_ptx_write_image2Di_, .properties = .{ .param_str = "viiiiiii", .target_set = TargetSet.initOne(.nvptx) } },
10787 .{ .tag = .__builtin_ptx_write_image2Dui_, .properties = .{ .param_str = "viiiUiUiUiUi", .target_set = TargetSet.initOne(.nvptx) } },
10788 .{ .tag = .__builtin_r600_implicitarg_ptr, .properties = .{ .param_str = "Uc*7", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
10789 .{ .tag = .__builtin_r600_read_tgid_x, .properties = .{ .param_str = "Ui", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
10790 .{ .tag = .__builtin_r600_read_tgid_y, .properties = .{ .param_str = "Ui", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
10791 .{ .tag = .__builtin_r600_read_tgid_z, .properties = .{ .param_str = "Ui", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
10792 .{ .tag = .__builtin_r600_read_tidig_x, .properties = .{ .param_str = "Ui", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
10793 .{ .tag = .__builtin_r600_read_tidig_y, .properties = .{ .param_str = "Ui", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
10794 .{ .tag = .__builtin_r600_read_tidig_z, .properties = .{ .param_str = "Ui", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
10795 .{ .tag = .__builtin_r600_recipsqrt_ieee, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
10796 .{ .tag = .__builtin_r600_recipsqrt_ieeef, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.amdgpu), .attributes = .{ .@"const" = true } } },
10797 .{ .tag = .__builtin_readcyclecounter, .properties = .{ .param_str = "ULLi" } },
10798 .{ .tag = .__builtin_readflm, .properties = .{ .param_str = "d", .target_set = TargetSet.initOne(.ppc) } },
10799 .{ .tag = .__builtin_realloc, .properties = .{ .param_str = "v*v*z", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
10800 .{ .tag = .__builtin_reduce_add, .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
10801 .{ .tag = .__builtin_reduce_and, .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
10802 .{ .tag = .__builtin_reduce_max, .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
10803 .{ .tag = .__builtin_reduce_min, .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
10804 .{ .tag = .__builtin_reduce_mul, .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
10805 .{ .tag = .__builtin_reduce_or, .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
10806 .{ .tag = .__builtin_reduce_xor, .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
10807 .{ .tag = .__builtin_remainder, .properties = .{ .param_str = "ddd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10808 .{ .tag = .__builtin_remainderf, .properties = .{ .param_str = "fff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10809 .{ .tag = .__builtin_remainderf128, .properties = .{ .param_str = "LLdLLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10810 .{ .tag = .__builtin_remainderl, .properties = .{ .param_str = "LdLdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10811 .{ .tag = .__builtin_remquo, .properties = .{ .param_str = "dddi*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
10812 .{ .tag = .__builtin_remquof, .properties = .{ .param_str = "fffi*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
10813 .{ .tag = .__builtin_remquof128, .properties = .{ .param_str = "LLdLLdLLdi*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
10814 .{ .tag = .__builtin_remquol, .properties = .{ .param_str = "LdLdLdi*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
10815 .{ .tag = .__builtin_return_address, .properties = .{ .param_str = "v*IUi" } },
10816 .{ .tag = .__builtin_rindex, .properties = .{ .param_str = "c*cC*i", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
10817 .{ .tag = .__builtin_rint, .properties = .{ .param_str = "dd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
10818 .{ .tag = .__builtin_rintf, .properties = .{ .param_str = "ff", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
10819 .{ .tag = .__builtin_rintf128, .properties = .{ .param_str = "LLdLLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
10820 .{ .tag = .__builtin_rintf16, .properties = .{ .param_str = "hh", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
10821 .{ .tag = .__builtin_rintl, .properties = .{ .param_str = "LdLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
10822 .{ .tag = .__builtin_rotateleft16, .properties = .{ .param_str = "UsUsUs", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
10823 .{ .tag = .__builtin_rotateleft32, .properties = .{ .param_str = "UZiUZiUZi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
10824 .{ .tag = .__builtin_rotateleft64, .properties = .{ .param_str = "UWiUWiUWi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
10825 .{ .tag = .__builtin_rotateleft8, .properties = .{ .param_str = "UcUcUc", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
10826 .{ .tag = .__builtin_rotateright16, .properties = .{ .param_str = "UsUsUs", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
10827 .{ .tag = .__builtin_rotateright32, .properties = .{ .param_str = "UZiUZiUZi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
10828 .{ .tag = .__builtin_rotateright64, .properties = .{ .param_str = "UWiUWiUWi", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
10829 .{ .tag = .__builtin_rotateright8, .properties = .{ .param_str = "UcUcUc", .attributes = .{ .@"const" = true, .const_evaluable = true } } },
10830 .{ .tag = .__builtin_round, .properties = .{ .param_str = "dd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
10831 .{ .tag = .__builtin_roundeven, .properties = .{ .param_str = "dd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
10832 .{ .tag = .__builtin_roundevenf, .properties = .{ .param_str = "ff", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
10833 .{ .tag = .__builtin_roundevenf128, .properties = .{ .param_str = "LLdLLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
10834 .{ .tag = .__builtin_roundevenf16, .properties = .{ .param_str = "hh", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
10835 .{ .tag = .__builtin_roundevenl, .properties = .{ .param_str = "LdLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
10836 .{ .tag = .__builtin_roundf, .properties = .{ .param_str = "ff", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
10837 .{ .tag = .__builtin_roundf128, .properties = .{ .param_str = "LLdLLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
10838 .{ .tag = .__builtin_roundf16, .properties = .{ .param_str = "hh", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
10839 .{ .tag = .__builtin_roundl, .properties = .{ .param_str = "LdLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
10840 .{ .tag = .__builtin_sadd_overflow, .properties = .{ .param_str = "bSiCSiCSi*", .attributes = .{ .const_evaluable = true } } },
10841 .{ .tag = .__builtin_saddl_overflow, .properties = .{ .param_str = "bSLiCSLiCSLi*", .attributes = .{ .const_evaluable = true } } },
10842 .{ .tag = .__builtin_saddll_overflow, .properties = .{ .param_str = "bSLLiCSLLiCSLLi*", .attributes = .{ .const_evaluable = true } } },
10843 .{ .tag = .__builtin_scalbln, .properties = .{ .param_str = "ddLi", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10844 .{ .tag = .__builtin_scalblnf, .properties = .{ .param_str = "ffLi", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10845 .{ .tag = .__builtin_scalblnf128, .properties = .{ .param_str = "LLdLLdLi", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10846 .{ .tag = .__builtin_scalblnl, .properties = .{ .param_str = "LdLdLi", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10847 .{ .tag = .__builtin_scalbn, .properties = .{ .param_str = "ddi", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10848 .{ .tag = .__builtin_scalbnf, .properties = .{ .param_str = "ffi", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10849 .{ .tag = .__builtin_scalbnf128, .properties = .{ .param_str = "LLdLLdi", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10850 .{ .tag = .__builtin_scalbnl, .properties = .{ .param_str = "LdLdi", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10851 .{ .tag = .__builtin_scanf, .properties = .{ .param_str = "icC*R.", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .scanf } } },
10852 .{ .tag = .__builtin_set_flt_rounds, .properties = .{ .param_str = "vi" } },
10853 .{ .tag = .__builtin_setflm, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.ppc) } },
10854 .{ .tag = .__builtin_setjmp, .properties = .{ .param_str = "iv**", .attributes = .{ .returns_twice = true } } },
10855 .{ .tag = .__builtin_setps, .properties = .{ .param_str = "vUiUi", .target_set = TargetSet.initOne(.xcore) } },
10856 .{ .tag = .__builtin_setrnd, .properties = .{ .param_str = "di", .target_set = TargetSet.initOne(.ppc) } },
10857 .{ .tag = .__builtin_shufflevector, .properties = .{ .param_str = "v.", .attributes = .{ .@"const" = true, .custom_typecheck = true } } },
10858 .{ .tag = .__builtin_signbit, .properties = .{ .param_str = "i.", .attributes = .{ .@"const" = true, .custom_typecheck = true, .lib_function_with_builtin_prefix = true } } },
10859 .{ .tag = .__builtin_signbitf, .properties = .{ .param_str = "if", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
10860 .{ .tag = .__builtin_signbitl, .properties = .{ .param_str = "iLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
10861 .{ .tag = .__builtin_sin, .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10862 .{ .tag = .__builtin_sinf, .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10863 .{ .tag = .__builtin_sinf128, .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10864 .{ .tag = .__builtin_sinf16, .properties = .{ .param_str = "hh", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10865 .{ .tag = .__builtin_sinh, .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10866 .{ .tag = .__builtin_sinhf, .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10867 .{ .tag = .__builtin_sinhf128, .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10868 .{ .tag = .__builtin_sinhl, .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10869 .{ .tag = .__builtin_sinl, .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10870 .{ .tag = .__builtin_smul_overflow, .properties = .{ .param_str = "bSiCSiCSi*", .attributes = .{ .const_evaluable = true } } },
10871 .{ .tag = .__builtin_smull_overflow, .properties = .{ .param_str = "bSLiCSLiCSLi*", .attributes = .{ .const_evaluable = true } } },
10872 .{ .tag = .__builtin_smulll_overflow, .properties = .{ .param_str = "bSLLiCSLLiCSLLi*", .attributes = .{ .const_evaluable = true } } },
10873 .{ .tag = .__builtin_snprintf, .properties = .{ .param_str = "ic*RzcC*R.", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .printf, .format_string_position = 2 } } },
10874 .{ .tag = .__builtin_sponentry, .properties = .{ .param_str = "v*", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } },
10875 .{ .tag = .__builtin_sprintf, .properties = .{ .param_str = "ic*RcC*R.", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .printf, .format_string_position = 1 } } },
10876 .{ .tag = .__builtin_sqrt, .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10877 .{ .tag = .__builtin_sqrtf, .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10878 .{ .tag = .__builtin_sqrtf128, .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10879 .{ .tag = .__builtin_sqrtf16, .properties = .{ .param_str = "hh", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10880 .{ .tag = .__builtin_sqrtl, .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10881 .{ .tag = .__builtin_sscanf, .properties = .{ .param_str = "icC*RcC*R.", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .scanf, .format_string_position = 1 } } },
10882 .{ .tag = .__builtin_ssub_overflow, .properties = .{ .param_str = "bSiCSiCSi*", .attributes = .{ .const_evaluable = true } } },
10883 .{ .tag = .__builtin_ssubl_overflow, .properties = .{ .param_str = "bSLiCSLiCSLi*", .attributes = .{ .const_evaluable = true } } },
10884 .{ .tag = .__builtin_ssubll_overflow, .properties = .{ .param_str = "bSLLiCSLLiCSLLi*", .attributes = .{ .const_evaluable = true } } },
10885 .{ .tag = .__builtin_stdarg_start, .properties = .{ .param_str = "vA.", .attributes = .{ .custom_typecheck = true } } },
10886 .{ .tag = .__builtin_stpcpy, .properties = .{ .param_str = "c*c*cC*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
10887 .{ .tag = .__builtin_stpncpy, .properties = .{ .param_str = "c*c*cC*z", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
10888 .{ .tag = .__builtin_strcasecmp, .properties = .{ .param_str = "icC*cC*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
10889 .{ .tag = .__builtin_strcat, .properties = .{ .param_str = "c*c*cC*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
10890 .{ .tag = .__builtin_strchr, .properties = .{ .param_str = "c*cC*i", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
10891 .{ .tag = .__builtin_strcmp, .properties = .{ .param_str = "icC*cC*", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
10892 .{ .tag = .__builtin_strcpy, .properties = .{ .param_str = "c*c*cC*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
10893 .{ .tag = .__builtin_strcspn, .properties = .{ .param_str = "zcC*cC*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
10894 .{ .tag = .__builtin_strdup, .properties = .{ .param_str = "c*cC*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
10895 .{ .tag = .__builtin_strlen, .properties = .{ .param_str = "zcC*", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
10896 .{ .tag = .__builtin_strncasecmp, .properties = .{ .param_str = "icC*cC*z", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
10897 .{ .tag = .__builtin_strncat, .properties = .{ .param_str = "c*c*cC*z", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
10898 .{ .tag = .__builtin_strncmp, .properties = .{ .param_str = "icC*cC*z", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
10899 .{ .tag = .__builtin_strncpy, .properties = .{ .param_str = "c*c*cC*z", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
10900 .{ .tag = .__builtin_strndup, .properties = .{ .param_str = "c*cC*z", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
10901 .{ .tag = .__builtin_strpbrk, .properties = .{ .param_str = "c*cC*cC*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
10902 .{ .tag = .__builtin_strrchr, .properties = .{ .param_str = "c*cC*i", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
10903 .{ .tag = .__builtin_strspn, .properties = .{ .param_str = "zcC*cC*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
10904 .{ .tag = .__builtin_strstr, .properties = .{ .param_str = "c*cC*cC*", .attributes = .{ .lib_function_with_builtin_prefix = true } } },
10905 .{ .tag = .__builtin_sub_overflow, .properties = .{ .param_str = "b.", .attributes = .{ .custom_typecheck = true, .const_evaluable = true } } },
10906 .{ .tag = .__builtin_subc, .properties = .{ .param_str = "UiUiCUiCUiCUi*" } },
10907 .{ .tag = .__builtin_subcb, .properties = .{ .param_str = "UcUcCUcCUcCUc*" } },
10908 .{ .tag = .__builtin_subcl, .properties = .{ .param_str = "ULiULiCULiCULiCULi*" } },
10909 .{ .tag = .__builtin_subcll, .properties = .{ .param_str = "ULLiULLiCULLiCULLiCULLi*" } },
10910 .{ .tag = .__builtin_subcs, .properties = .{ .param_str = "UsUsCUsCUsCUs*" } },
10911 .{ .tag = .__builtin_tan, .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10912 .{ .tag = .__builtin_tanf, .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10913 .{ .tag = .__builtin_tanf128, .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10914 .{ .tag = .__builtin_tanh, .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10915 .{ .tag = .__builtin_tanhf, .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10916 .{ .tag = .__builtin_tanhf128, .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10917 .{ .tag = .__builtin_tanhl, .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10918 .{ .tag = .__builtin_tanl, .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10919 .{ .tag = .__builtin_tgamma, .properties = .{ .param_str = "dd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10920 .{ .tag = .__builtin_tgammaf, .properties = .{ .param_str = "ff", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10921 .{ .tag = .__builtin_tgammaf128, .properties = .{ .param_str = "LLdLLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10922 .{ .tag = .__builtin_tgammal, .properties = .{ .param_str = "LdLd", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
10923 .{ .tag = .__builtin_thread_pointer, .properties = .{ .param_str = "v*", .attributes = .{ .@"const" = true } } },
10924 .{ .tag = .__builtin_trap, .properties = .{ .param_str = "v", .attributes = .{ .noreturn = true } } },
10925 .{ .tag = .__builtin_trunc, .properties = .{ .param_str = "dd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
10926 .{ .tag = .__builtin_truncf, .properties = .{ .param_str = "ff", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
10927 .{ .tag = .__builtin_truncf128, .properties = .{ .param_str = "LLdLLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
10928 .{ .tag = .__builtin_truncf16, .properties = .{ .param_str = "hh", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
10929 .{ .tag = .__builtin_truncl, .properties = .{ .param_str = "LdLd", .attributes = .{ .@"const" = true, .lib_function_with_builtin_prefix = true } } },
10930 .{ .tag = .__builtin_types_compatible_p, .properties = .{ .param_str = "i.", .attributes = .{ .custom_typecheck = true } } },
10931 .{ .tag = .__builtin_uadd_overflow, .properties = .{ .param_str = "bUiCUiCUi*", .attributes = .{ .const_evaluable = true } } },
10932 .{ .tag = .__builtin_uaddl_overflow, .properties = .{ .param_str = "bULiCULiCULi*", .attributes = .{ .const_evaluable = true } } },
10933 .{ .tag = .__builtin_uaddll_overflow, .properties = .{ .param_str = "bULLiCULLiCULLi*", .attributes = .{ .const_evaluable = true } } },
10934 .{ .tag = .__builtin_umul_overflow, .properties = .{ .param_str = "bUiCUiCUi*", .attributes = .{ .const_evaluable = true } } },
10935 .{ .tag = .__builtin_umull_overflow, .properties = .{ .param_str = "bULiCULiCULi*", .attributes = .{ .const_evaluable = true } } },
10936 .{ .tag = .__builtin_umulll_overflow, .properties = .{ .param_str = "bULLiCULLiCULLi*", .attributes = .{ .const_evaluable = true } } },
10937 .{ .tag = .__builtin_unpack_longdouble, .properties = .{ .param_str = "dLdIi", .target_set = TargetSet.initOne(.ppc) } },
10938 .{ .tag = .__builtin_unpredictable, .properties = .{ .param_str = "LiLi", .attributes = .{ .@"const" = true } } },
10939 .{ .tag = .__builtin_unreachable, .properties = .{ .param_str = "v", .attributes = .{ .noreturn = true } } },
10940 .{ .tag = .__builtin_unwind_init, .properties = .{ .param_str = "v" } },
10941 .{ .tag = .__builtin_usub_overflow, .properties = .{ .param_str = "bUiCUiCUi*", .attributes = .{ .const_evaluable = true } } },
10942 .{ .tag = .__builtin_usubl_overflow, .properties = .{ .param_str = "bULiCULiCULi*", .attributes = .{ .const_evaluable = true } } },
10943 .{ .tag = .__builtin_usubll_overflow, .properties = .{ .param_str = "bULLiCULLiCULLi*", .attributes = .{ .const_evaluable = true } } },
10944 .{ .tag = .__builtin_va_arg, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
10945 .{ .tag = .__builtin_va_copy, .properties = .{ .param_str = "vAA" } },
10946 .{ .tag = .__builtin_va_end, .properties = .{ .param_str = "vA" } },
10947 .{ .tag = .__builtin_va_start, .properties = .{ .param_str = "vA.", .attributes = .{ .custom_typecheck = true } } },
10948 .{ .tag = .__builtin_ve_vl_andm_MMM, .properties = .{ .param_str = "V512bV512bV512b", .target_set = TargetSet.initOne(.vevl_gen) } },
10949 .{ .tag = .__builtin_ve_vl_andm_mmm, .properties = .{ .param_str = "V256bV256bV256b", .target_set = TargetSet.initOne(.vevl_gen) } },
10950 .{ .tag = .__builtin_ve_vl_eqvm_MMM, .properties = .{ .param_str = "V512bV512bV512b", .target_set = TargetSet.initOne(.vevl_gen) } },
10951 .{ .tag = .__builtin_ve_vl_eqvm_mmm, .properties = .{ .param_str = "V256bV256bV256b", .target_set = TargetSet.initOne(.vevl_gen) } },
10952 .{ .tag = .__builtin_ve_vl_extract_vm512l, .properties = .{ .param_str = "V256bV512b", .target_set = TargetSet.initOne(.ve) } },
10953 .{ .tag = .__builtin_ve_vl_extract_vm512u, .properties = .{ .param_str = "V256bV512b", .target_set = TargetSet.initOne(.ve) } },
10954 .{ .tag = .__builtin_ve_vl_fencec_s, .properties = .{ .param_str = "vUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10955 .{ .tag = .__builtin_ve_vl_fencei, .properties = .{ .param_str = "v", .target_set = TargetSet.initOne(.vevl_gen) } },
10956 .{ .tag = .__builtin_ve_vl_fencem_s, .properties = .{ .param_str = "vUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10957 .{ .tag = .__builtin_ve_vl_fidcr_sss, .properties = .{ .param_str = "LUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10958 .{ .tag = .__builtin_ve_vl_insert_vm512l, .properties = .{ .param_str = "V512bV512bV256b", .target_set = TargetSet.initOne(.ve) } },
10959 .{ .tag = .__builtin_ve_vl_insert_vm512u, .properties = .{ .param_str = "V512bV512bV256b", .target_set = TargetSet.initOne(.ve) } },
10960 .{ .tag = .__builtin_ve_vl_lcr_sss, .properties = .{ .param_str = "LUiLUiLUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10961 .{ .tag = .__builtin_ve_vl_lsv_vvss, .properties = .{ .param_str = "V256dV256dUiLUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10962 .{ .tag = .__builtin_ve_vl_lvm_MMss, .properties = .{ .param_str = "V512bV512bLUiLUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10963 .{ .tag = .__builtin_ve_vl_lvm_mmss, .properties = .{ .param_str = "V256bV256bLUiLUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10964 .{ .tag = .__builtin_ve_vl_lvsd_svs, .properties = .{ .param_str = "dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10965 .{ .tag = .__builtin_ve_vl_lvsl_svs, .properties = .{ .param_str = "LUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10966 .{ .tag = .__builtin_ve_vl_lvss_svs, .properties = .{ .param_str = "fV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10967 .{ .tag = .__builtin_ve_vl_lzvm_sml, .properties = .{ .param_str = "LUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10968 .{ .tag = .__builtin_ve_vl_negm_MM, .properties = .{ .param_str = "V512bV512b", .target_set = TargetSet.initOne(.vevl_gen) } },
10969 .{ .tag = .__builtin_ve_vl_negm_mm, .properties = .{ .param_str = "V256bV256b", .target_set = TargetSet.initOne(.vevl_gen) } },
10970 .{ .tag = .__builtin_ve_vl_nndm_MMM, .properties = .{ .param_str = "V512bV512bV512b", .target_set = TargetSet.initOne(.vevl_gen) } },
10971 .{ .tag = .__builtin_ve_vl_nndm_mmm, .properties = .{ .param_str = "V256bV256bV256b", .target_set = TargetSet.initOne(.vevl_gen) } },
10972 .{ .tag = .__builtin_ve_vl_orm_MMM, .properties = .{ .param_str = "V512bV512bV512b", .target_set = TargetSet.initOne(.vevl_gen) } },
10973 .{ .tag = .__builtin_ve_vl_orm_mmm, .properties = .{ .param_str = "V256bV256bV256b", .target_set = TargetSet.initOne(.vevl_gen) } },
10974 .{ .tag = .__builtin_ve_vl_pack_f32a, .properties = .{ .param_str = "ULifC*", .target_set = TargetSet.initOne(.ve) } },
10975 .{ .tag = .__builtin_ve_vl_pack_f32p, .properties = .{ .param_str = "ULifC*fC*", .target_set = TargetSet.initOne(.ve) } },
10976 .{ .tag = .__builtin_ve_vl_pcvm_sml, .properties = .{ .param_str = "LUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10977 .{ .tag = .__builtin_ve_vl_pfchv_ssl, .properties = .{ .param_str = "vLivC*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
10978 .{ .tag = .__builtin_ve_vl_pfchvnc_ssl, .properties = .{ .param_str = "vLivC*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
10979 .{ .tag = .__builtin_ve_vl_pvadds_vsvMvl, .properties = .{ .param_str = "V256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10980 .{ .tag = .__builtin_ve_vl_pvadds_vsvl, .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10981 .{ .tag = .__builtin_ve_vl_pvadds_vsvvl, .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10982 .{ .tag = .__builtin_ve_vl_pvadds_vvvMvl, .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10983 .{ .tag = .__builtin_ve_vl_pvadds_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10984 .{ .tag = .__builtin_ve_vl_pvadds_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10985 .{ .tag = .__builtin_ve_vl_pvaddu_vsvMvl, .properties = .{ .param_str = "V256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10986 .{ .tag = .__builtin_ve_vl_pvaddu_vsvl, .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10987 .{ .tag = .__builtin_ve_vl_pvaddu_vsvvl, .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10988 .{ .tag = .__builtin_ve_vl_pvaddu_vvvMvl, .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10989 .{ .tag = .__builtin_ve_vl_pvaddu_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10990 .{ .tag = .__builtin_ve_vl_pvaddu_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10991 .{ .tag = .__builtin_ve_vl_pvand_vsvMvl, .properties = .{ .param_str = "V256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10992 .{ .tag = .__builtin_ve_vl_pvand_vsvl, .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10993 .{ .tag = .__builtin_ve_vl_pvand_vsvvl, .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10994 .{ .tag = .__builtin_ve_vl_pvand_vvvMvl, .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10995 .{ .tag = .__builtin_ve_vl_pvand_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10996 .{ .tag = .__builtin_ve_vl_pvand_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10997 .{ .tag = .__builtin_ve_vl_pvbrd_vsMvl, .properties = .{ .param_str = "V256dLUiV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10998 .{ .tag = .__builtin_ve_vl_pvbrd_vsl, .properties = .{ .param_str = "V256dLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
10999 .{ .tag = .__builtin_ve_vl_pvbrd_vsvl, .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11000 .{ .tag = .__builtin_ve_vl_pvbrv_vvMvl, .properties = .{ .param_str = "V256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11001 .{ .tag = .__builtin_ve_vl_pvbrv_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11002 .{ .tag = .__builtin_ve_vl_pvbrv_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11003 .{ .tag = .__builtin_ve_vl_pvbrvlo_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11004 .{ .tag = .__builtin_ve_vl_pvbrvlo_vvmvl, .properties = .{ .param_str = "V256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11005 .{ .tag = .__builtin_ve_vl_pvbrvlo_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11006 .{ .tag = .__builtin_ve_vl_pvbrvup_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11007 .{ .tag = .__builtin_ve_vl_pvbrvup_vvmvl, .properties = .{ .param_str = "V256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11008 .{ .tag = .__builtin_ve_vl_pvbrvup_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11009 .{ .tag = .__builtin_ve_vl_pvcmps_vsvMvl, .properties = .{ .param_str = "V256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11010 .{ .tag = .__builtin_ve_vl_pvcmps_vsvl, .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11011 .{ .tag = .__builtin_ve_vl_pvcmps_vsvvl, .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11012 .{ .tag = .__builtin_ve_vl_pvcmps_vvvMvl, .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11013 .{ .tag = .__builtin_ve_vl_pvcmps_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11014 .{ .tag = .__builtin_ve_vl_pvcmps_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11015 .{ .tag = .__builtin_ve_vl_pvcmpu_vsvMvl, .properties = .{ .param_str = "V256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11016 .{ .tag = .__builtin_ve_vl_pvcmpu_vsvl, .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11017 .{ .tag = .__builtin_ve_vl_pvcmpu_vsvvl, .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11018 .{ .tag = .__builtin_ve_vl_pvcmpu_vvvMvl, .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11019 .{ .tag = .__builtin_ve_vl_pvcmpu_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11020 .{ .tag = .__builtin_ve_vl_pvcmpu_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11021 .{ .tag = .__builtin_ve_vl_pvcvtsw_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11022 .{ .tag = .__builtin_ve_vl_pvcvtsw_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11023 .{ .tag = .__builtin_ve_vl_pvcvtws_vvMvl, .properties = .{ .param_str = "V256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11024 .{ .tag = .__builtin_ve_vl_pvcvtws_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11025 .{ .tag = .__builtin_ve_vl_pvcvtws_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11026 .{ .tag = .__builtin_ve_vl_pvcvtwsrz_vvMvl, .properties = .{ .param_str = "V256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11027 .{ .tag = .__builtin_ve_vl_pvcvtwsrz_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11028 .{ .tag = .__builtin_ve_vl_pvcvtwsrz_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11029 .{ .tag = .__builtin_ve_vl_pveqv_vsvMvl, .properties = .{ .param_str = "V256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11030 .{ .tag = .__builtin_ve_vl_pveqv_vsvl, .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11031 .{ .tag = .__builtin_ve_vl_pveqv_vsvvl, .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11032 .{ .tag = .__builtin_ve_vl_pveqv_vvvMvl, .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11033 .{ .tag = .__builtin_ve_vl_pveqv_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11034 .{ .tag = .__builtin_ve_vl_pveqv_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11035 .{ .tag = .__builtin_ve_vl_pvfadd_vsvMvl, .properties = .{ .param_str = "V256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11036 .{ .tag = .__builtin_ve_vl_pvfadd_vsvl, .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11037 .{ .tag = .__builtin_ve_vl_pvfadd_vsvvl, .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11038 .{ .tag = .__builtin_ve_vl_pvfadd_vvvMvl, .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11039 .{ .tag = .__builtin_ve_vl_pvfadd_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11040 .{ .tag = .__builtin_ve_vl_pvfadd_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11041 .{ .tag = .__builtin_ve_vl_pvfcmp_vsvMvl, .properties = .{ .param_str = "V256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11042 .{ .tag = .__builtin_ve_vl_pvfcmp_vsvl, .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11043 .{ .tag = .__builtin_ve_vl_pvfcmp_vsvvl, .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11044 .{ .tag = .__builtin_ve_vl_pvfcmp_vvvMvl, .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11045 .{ .tag = .__builtin_ve_vl_pvfcmp_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11046 .{ .tag = .__builtin_ve_vl_pvfcmp_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11047 .{ .tag = .__builtin_ve_vl_pvfmad_vsvvMvl, .properties = .{ .param_str = "V256dLUiV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11048 .{ .tag = .__builtin_ve_vl_pvfmad_vsvvl, .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11049 .{ .tag = .__builtin_ve_vl_pvfmad_vsvvvl, .properties = .{ .param_str = "V256dLUiV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11050 .{ .tag = .__builtin_ve_vl_pvfmad_vvsvMvl, .properties = .{ .param_str = "V256dV256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11051 .{ .tag = .__builtin_ve_vl_pvfmad_vvsvl, .properties = .{ .param_str = "V256dV256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11052 .{ .tag = .__builtin_ve_vl_pvfmad_vvsvvl, .properties = .{ .param_str = "V256dV256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11053 .{ .tag = .__builtin_ve_vl_pvfmad_vvvvMvl, .properties = .{ .param_str = "V256dV256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11054 .{ .tag = .__builtin_ve_vl_pvfmad_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11055 .{ .tag = .__builtin_ve_vl_pvfmad_vvvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11056 .{ .tag = .__builtin_ve_vl_pvfmax_vsvMvl, .properties = .{ .param_str = "V256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11057 .{ .tag = .__builtin_ve_vl_pvfmax_vsvl, .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11058 .{ .tag = .__builtin_ve_vl_pvfmax_vsvvl, .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11059 .{ .tag = .__builtin_ve_vl_pvfmax_vvvMvl, .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11060 .{ .tag = .__builtin_ve_vl_pvfmax_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11061 .{ .tag = .__builtin_ve_vl_pvfmax_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11062 .{ .tag = .__builtin_ve_vl_pvfmin_vsvMvl, .properties = .{ .param_str = "V256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11063 .{ .tag = .__builtin_ve_vl_pvfmin_vsvl, .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11064 .{ .tag = .__builtin_ve_vl_pvfmin_vsvvl, .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11065 .{ .tag = .__builtin_ve_vl_pvfmin_vvvMvl, .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11066 .{ .tag = .__builtin_ve_vl_pvfmin_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11067 .{ .tag = .__builtin_ve_vl_pvfmin_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11068 .{ .tag = .__builtin_ve_vl_pvfmkaf_Ml, .properties = .{ .param_str = "V512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11069 .{ .tag = .__builtin_ve_vl_pvfmkat_Ml, .properties = .{ .param_str = "V512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11070 .{ .tag = .__builtin_ve_vl_pvfmkseq_MvMl, .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11071 .{ .tag = .__builtin_ve_vl_pvfmkseq_Mvl, .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11072 .{ .tag = .__builtin_ve_vl_pvfmkseqnan_MvMl, .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11073 .{ .tag = .__builtin_ve_vl_pvfmkseqnan_Mvl, .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11074 .{ .tag = .__builtin_ve_vl_pvfmksge_MvMl, .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11075 .{ .tag = .__builtin_ve_vl_pvfmksge_Mvl, .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11076 .{ .tag = .__builtin_ve_vl_pvfmksgenan_MvMl, .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11077 .{ .tag = .__builtin_ve_vl_pvfmksgenan_Mvl, .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11078 .{ .tag = .__builtin_ve_vl_pvfmksgt_MvMl, .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11079 .{ .tag = .__builtin_ve_vl_pvfmksgt_Mvl, .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11080 .{ .tag = .__builtin_ve_vl_pvfmksgtnan_MvMl, .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11081 .{ .tag = .__builtin_ve_vl_pvfmksgtnan_Mvl, .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11082 .{ .tag = .__builtin_ve_vl_pvfmksle_MvMl, .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11083 .{ .tag = .__builtin_ve_vl_pvfmksle_Mvl, .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11084 .{ .tag = .__builtin_ve_vl_pvfmkslenan_MvMl, .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11085 .{ .tag = .__builtin_ve_vl_pvfmkslenan_Mvl, .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11086 .{ .tag = .__builtin_ve_vl_pvfmksloeq_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11087 .{ .tag = .__builtin_ve_vl_pvfmksloeq_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11088 .{ .tag = .__builtin_ve_vl_pvfmksloeqnan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11089 .{ .tag = .__builtin_ve_vl_pvfmksloeqnan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11090 .{ .tag = .__builtin_ve_vl_pvfmksloge_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11091 .{ .tag = .__builtin_ve_vl_pvfmksloge_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11092 .{ .tag = .__builtin_ve_vl_pvfmkslogenan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11093 .{ .tag = .__builtin_ve_vl_pvfmkslogenan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11094 .{ .tag = .__builtin_ve_vl_pvfmkslogt_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11095 .{ .tag = .__builtin_ve_vl_pvfmkslogt_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11096 .{ .tag = .__builtin_ve_vl_pvfmkslogtnan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11097 .{ .tag = .__builtin_ve_vl_pvfmkslogtnan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11098 .{ .tag = .__builtin_ve_vl_pvfmkslole_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11099 .{ .tag = .__builtin_ve_vl_pvfmkslole_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11100 .{ .tag = .__builtin_ve_vl_pvfmkslolenan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11101 .{ .tag = .__builtin_ve_vl_pvfmkslolenan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11102 .{ .tag = .__builtin_ve_vl_pvfmkslolt_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11103 .{ .tag = .__builtin_ve_vl_pvfmkslolt_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11104 .{ .tag = .__builtin_ve_vl_pvfmksloltnan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11105 .{ .tag = .__builtin_ve_vl_pvfmksloltnan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11106 .{ .tag = .__builtin_ve_vl_pvfmkslonan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11107 .{ .tag = .__builtin_ve_vl_pvfmkslonan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11108 .{ .tag = .__builtin_ve_vl_pvfmkslone_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11109 .{ .tag = .__builtin_ve_vl_pvfmkslone_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11110 .{ .tag = .__builtin_ve_vl_pvfmkslonenan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11111 .{ .tag = .__builtin_ve_vl_pvfmkslonenan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11112 .{ .tag = .__builtin_ve_vl_pvfmkslonum_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11113 .{ .tag = .__builtin_ve_vl_pvfmkslonum_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11114 .{ .tag = .__builtin_ve_vl_pvfmkslt_MvMl, .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11115 .{ .tag = .__builtin_ve_vl_pvfmkslt_Mvl, .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11116 .{ .tag = .__builtin_ve_vl_pvfmksltnan_MvMl, .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11117 .{ .tag = .__builtin_ve_vl_pvfmksltnan_Mvl, .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11118 .{ .tag = .__builtin_ve_vl_pvfmksnan_MvMl, .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11119 .{ .tag = .__builtin_ve_vl_pvfmksnan_Mvl, .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11120 .{ .tag = .__builtin_ve_vl_pvfmksne_MvMl, .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11121 .{ .tag = .__builtin_ve_vl_pvfmksne_Mvl, .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11122 .{ .tag = .__builtin_ve_vl_pvfmksnenan_MvMl, .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11123 .{ .tag = .__builtin_ve_vl_pvfmksnenan_Mvl, .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11124 .{ .tag = .__builtin_ve_vl_pvfmksnum_MvMl, .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11125 .{ .tag = .__builtin_ve_vl_pvfmksnum_Mvl, .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11126 .{ .tag = .__builtin_ve_vl_pvfmksupeq_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11127 .{ .tag = .__builtin_ve_vl_pvfmksupeq_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11128 .{ .tag = .__builtin_ve_vl_pvfmksupeqnan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11129 .{ .tag = .__builtin_ve_vl_pvfmksupeqnan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11130 .{ .tag = .__builtin_ve_vl_pvfmksupge_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11131 .{ .tag = .__builtin_ve_vl_pvfmksupge_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11132 .{ .tag = .__builtin_ve_vl_pvfmksupgenan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11133 .{ .tag = .__builtin_ve_vl_pvfmksupgenan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11134 .{ .tag = .__builtin_ve_vl_pvfmksupgt_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11135 .{ .tag = .__builtin_ve_vl_pvfmksupgt_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11136 .{ .tag = .__builtin_ve_vl_pvfmksupgtnan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11137 .{ .tag = .__builtin_ve_vl_pvfmksupgtnan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11138 .{ .tag = .__builtin_ve_vl_pvfmksuple_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11139 .{ .tag = .__builtin_ve_vl_pvfmksuple_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11140 .{ .tag = .__builtin_ve_vl_pvfmksuplenan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11141 .{ .tag = .__builtin_ve_vl_pvfmksuplenan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11142 .{ .tag = .__builtin_ve_vl_pvfmksuplt_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11143 .{ .tag = .__builtin_ve_vl_pvfmksuplt_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11144 .{ .tag = .__builtin_ve_vl_pvfmksupltnan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11145 .{ .tag = .__builtin_ve_vl_pvfmksupltnan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11146 .{ .tag = .__builtin_ve_vl_pvfmksupnan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11147 .{ .tag = .__builtin_ve_vl_pvfmksupnan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11148 .{ .tag = .__builtin_ve_vl_pvfmksupne_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11149 .{ .tag = .__builtin_ve_vl_pvfmksupne_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11150 .{ .tag = .__builtin_ve_vl_pvfmksupnenan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11151 .{ .tag = .__builtin_ve_vl_pvfmksupnenan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11152 .{ .tag = .__builtin_ve_vl_pvfmksupnum_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11153 .{ .tag = .__builtin_ve_vl_pvfmksupnum_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11154 .{ .tag = .__builtin_ve_vl_pvfmkweq_MvMl, .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11155 .{ .tag = .__builtin_ve_vl_pvfmkweq_Mvl, .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11156 .{ .tag = .__builtin_ve_vl_pvfmkweqnan_MvMl, .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11157 .{ .tag = .__builtin_ve_vl_pvfmkweqnan_Mvl, .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11158 .{ .tag = .__builtin_ve_vl_pvfmkwge_MvMl, .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11159 .{ .tag = .__builtin_ve_vl_pvfmkwge_Mvl, .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11160 .{ .tag = .__builtin_ve_vl_pvfmkwgenan_MvMl, .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11161 .{ .tag = .__builtin_ve_vl_pvfmkwgenan_Mvl, .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11162 .{ .tag = .__builtin_ve_vl_pvfmkwgt_MvMl, .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11163 .{ .tag = .__builtin_ve_vl_pvfmkwgt_Mvl, .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11164 .{ .tag = .__builtin_ve_vl_pvfmkwgtnan_MvMl, .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11165 .{ .tag = .__builtin_ve_vl_pvfmkwgtnan_Mvl, .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11166 .{ .tag = .__builtin_ve_vl_pvfmkwle_MvMl, .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11167 .{ .tag = .__builtin_ve_vl_pvfmkwle_Mvl, .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11168 .{ .tag = .__builtin_ve_vl_pvfmkwlenan_MvMl, .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11169 .{ .tag = .__builtin_ve_vl_pvfmkwlenan_Mvl, .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11170 .{ .tag = .__builtin_ve_vl_pvfmkwloeq_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11171 .{ .tag = .__builtin_ve_vl_pvfmkwloeq_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11172 .{ .tag = .__builtin_ve_vl_pvfmkwloeqnan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11173 .{ .tag = .__builtin_ve_vl_pvfmkwloeqnan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11174 .{ .tag = .__builtin_ve_vl_pvfmkwloge_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11175 .{ .tag = .__builtin_ve_vl_pvfmkwloge_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11176 .{ .tag = .__builtin_ve_vl_pvfmkwlogenan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11177 .{ .tag = .__builtin_ve_vl_pvfmkwlogenan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11178 .{ .tag = .__builtin_ve_vl_pvfmkwlogt_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11179 .{ .tag = .__builtin_ve_vl_pvfmkwlogt_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11180 .{ .tag = .__builtin_ve_vl_pvfmkwlogtnan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11181 .{ .tag = .__builtin_ve_vl_pvfmkwlogtnan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11182 .{ .tag = .__builtin_ve_vl_pvfmkwlole_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11183 .{ .tag = .__builtin_ve_vl_pvfmkwlole_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11184 .{ .tag = .__builtin_ve_vl_pvfmkwlolenan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11185 .{ .tag = .__builtin_ve_vl_pvfmkwlolenan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11186 .{ .tag = .__builtin_ve_vl_pvfmkwlolt_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11187 .{ .tag = .__builtin_ve_vl_pvfmkwlolt_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11188 .{ .tag = .__builtin_ve_vl_pvfmkwloltnan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11189 .{ .tag = .__builtin_ve_vl_pvfmkwloltnan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11190 .{ .tag = .__builtin_ve_vl_pvfmkwlonan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11191 .{ .tag = .__builtin_ve_vl_pvfmkwlonan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11192 .{ .tag = .__builtin_ve_vl_pvfmkwlone_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11193 .{ .tag = .__builtin_ve_vl_pvfmkwlone_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11194 .{ .tag = .__builtin_ve_vl_pvfmkwlonenan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11195 .{ .tag = .__builtin_ve_vl_pvfmkwlonenan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11196 .{ .tag = .__builtin_ve_vl_pvfmkwlonum_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11197 .{ .tag = .__builtin_ve_vl_pvfmkwlonum_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11198 .{ .tag = .__builtin_ve_vl_pvfmkwlt_MvMl, .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11199 .{ .tag = .__builtin_ve_vl_pvfmkwlt_Mvl, .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11200 .{ .tag = .__builtin_ve_vl_pvfmkwltnan_MvMl, .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11201 .{ .tag = .__builtin_ve_vl_pvfmkwltnan_Mvl, .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11202 .{ .tag = .__builtin_ve_vl_pvfmkwnan_MvMl, .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11203 .{ .tag = .__builtin_ve_vl_pvfmkwnan_Mvl, .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11204 .{ .tag = .__builtin_ve_vl_pvfmkwne_MvMl, .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11205 .{ .tag = .__builtin_ve_vl_pvfmkwne_Mvl, .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11206 .{ .tag = .__builtin_ve_vl_pvfmkwnenan_MvMl, .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11207 .{ .tag = .__builtin_ve_vl_pvfmkwnenan_Mvl, .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11208 .{ .tag = .__builtin_ve_vl_pvfmkwnum_MvMl, .properties = .{ .param_str = "V512bV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11209 .{ .tag = .__builtin_ve_vl_pvfmkwnum_Mvl, .properties = .{ .param_str = "V512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11210 .{ .tag = .__builtin_ve_vl_pvfmkwupeq_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11211 .{ .tag = .__builtin_ve_vl_pvfmkwupeq_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11212 .{ .tag = .__builtin_ve_vl_pvfmkwupeqnan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11213 .{ .tag = .__builtin_ve_vl_pvfmkwupeqnan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11214 .{ .tag = .__builtin_ve_vl_pvfmkwupge_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11215 .{ .tag = .__builtin_ve_vl_pvfmkwupge_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11216 .{ .tag = .__builtin_ve_vl_pvfmkwupgenan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11217 .{ .tag = .__builtin_ve_vl_pvfmkwupgenan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11218 .{ .tag = .__builtin_ve_vl_pvfmkwupgt_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11219 .{ .tag = .__builtin_ve_vl_pvfmkwupgt_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11220 .{ .tag = .__builtin_ve_vl_pvfmkwupgtnan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11221 .{ .tag = .__builtin_ve_vl_pvfmkwupgtnan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11222 .{ .tag = .__builtin_ve_vl_pvfmkwuple_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11223 .{ .tag = .__builtin_ve_vl_pvfmkwuple_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11224 .{ .tag = .__builtin_ve_vl_pvfmkwuplenan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11225 .{ .tag = .__builtin_ve_vl_pvfmkwuplenan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11226 .{ .tag = .__builtin_ve_vl_pvfmkwuplt_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11227 .{ .tag = .__builtin_ve_vl_pvfmkwuplt_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11228 .{ .tag = .__builtin_ve_vl_pvfmkwupltnan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11229 .{ .tag = .__builtin_ve_vl_pvfmkwupltnan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11230 .{ .tag = .__builtin_ve_vl_pvfmkwupnan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11231 .{ .tag = .__builtin_ve_vl_pvfmkwupnan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11232 .{ .tag = .__builtin_ve_vl_pvfmkwupne_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11233 .{ .tag = .__builtin_ve_vl_pvfmkwupne_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11234 .{ .tag = .__builtin_ve_vl_pvfmkwupnenan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11235 .{ .tag = .__builtin_ve_vl_pvfmkwupnenan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11236 .{ .tag = .__builtin_ve_vl_pvfmkwupnum_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11237 .{ .tag = .__builtin_ve_vl_pvfmkwupnum_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11238 .{ .tag = .__builtin_ve_vl_pvfmsb_vsvvMvl, .properties = .{ .param_str = "V256dLUiV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11239 .{ .tag = .__builtin_ve_vl_pvfmsb_vsvvl, .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11240 .{ .tag = .__builtin_ve_vl_pvfmsb_vsvvvl, .properties = .{ .param_str = "V256dLUiV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11241 .{ .tag = .__builtin_ve_vl_pvfmsb_vvsvMvl, .properties = .{ .param_str = "V256dV256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11242 .{ .tag = .__builtin_ve_vl_pvfmsb_vvsvl, .properties = .{ .param_str = "V256dV256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11243 .{ .tag = .__builtin_ve_vl_pvfmsb_vvsvvl, .properties = .{ .param_str = "V256dV256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11244 .{ .tag = .__builtin_ve_vl_pvfmsb_vvvvMvl, .properties = .{ .param_str = "V256dV256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11245 .{ .tag = .__builtin_ve_vl_pvfmsb_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11246 .{ .tag = .__builtin_ve_vl_pvfmsb_vvvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11247 .{ .tag = .__builtin_ve_vl_pvfmul_vsvMvl, .properties = .{ .param_str = "V256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11248 .{ .tag = .__builtin_ve_vl_pvfmul_vsvl, .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11249 .{ .tag = .__builtin_ve_vl_pvfmul_vsvvl, .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11250 .{ .tag = .__builtin_ve_vl_pvfmul_vvvMvl, .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11251 .{ .tag = .__builtin_ve_vl_pvfmul_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11252 .{ .tag = .__builtin_ve_vl_pvfmul_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11253 .{ .tag = .__builtin_ve_vl_pvfnmad_vsvvMvl, .properties = .{ .param_str = "V256dLUiV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11254 .{ .tag = .__builtin_ve_vl_pvfnmad_vsvvl, .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11255 .{ .tag = .__builtin_ve_vl_pvfnmad_vsvvvl, .properties = .{ .param_str = "V256dLUiV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11256 .{ .tag = .__builtin_ve_vl_pvfnmad_vvsvMvl, .properties = .{ .param_str = "V256dV256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11257 .{ .tag = .__builtin_ve_vl_pvfnmad_vvsvl, .properties = .{ .param_str = "V256dV256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11258 .{ .tag = .__builtin_ve_vl_pvfnmad_vvsvvl, .properties = .{ .param_str = "V256dV256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11259 .{ .tag = .__builtin_ve_vl_pvfnmad_vvvvMvl, .properties = .{ .param_str = "V256dV256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11260 .{ .tag = .__builtin_ve_vl_pvfnmad_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11261 .{ .tag = .__builtin_ve_vl_pvfnmad_vvvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11262 .{ .tag = .__builtin_ve_vl_pvfnmsb_vsvvMvl, .properties = .{ .param_str = "V256dLUiV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11263 .{ .tag = .__builtin_ve_vl_pvfnmsb_vsvvl, .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11264 .{ .tag = .__builtin_ve_vl_pvfnmsb_vsvvvl, .properties = .{ .param_str = "V256dLUiV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11265 .{ .tag = .__builtin_ve_vl_pvfnmsb_vvsvMvl, .properties = .{ .param_str = "V256dV256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11266 .{ .tag = .__builtin_ve_vl_pvfnmsb_vvsvl, .properties = .{ .param_str = "V256dV256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11267 .{ .tag = .__builtin_ve_vl_pvfnmsb_vvsvvl, .properties = .{ .param_str = "V256dV256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11268 .{ .tag = .__builtin_ve_vl_pvfnmsb_vvvvMvl, .properties = .{ .param_str = "V256dV256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11269 .{ .tag = .__builtin_ve_vl_pvfnmsb_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11270 .{ .tag = .__builtin_ve_vl_pvfnmsb_vvvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11271 .{ .tag = .__builtin_ve_vl_pvfsub_vsvMvl, .properties = .{ .param_str = "V256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11272 .{ .tag = .__builtin_ve_vl_pvfsub_vsvl, .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11273 .{ .tag = .__builtin_ve_vl_pvfsub_vsvvl, .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11274 .{ .tag = .__builtin_ve_vl_pvfsub_vvvMvl, .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11275 .{ .tag = .__builtin_ve_vl_pvfsub_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11276 .{ .tag = .__builtin_ve_vl_pvfsub_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11277 .{ .tag = .__builtin_ve_vl_pvldz_vvMvl, .properties = .{ .param_str = "V256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11278 .{ .tag = .__builtin_ve_vl_pvldz_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11279 .{ .tag = .__builtin_ve_vl_pvldz_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11280 .{ .tag = .__builtin_ve_vl_pvldzlo_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11281 .{ .tag = .__builtin_ve_vl_pvldzlo_vvmvl, .properties = .{ .param_str = "V256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11282 .{ .tag = .__builtin_ve_vl_pvldzlo_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11283 .{ .tag = .__builtin_ve_vl_pvldzup_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11284 .{ .tag = .__builtin_ve_vl_pvldzup_vvmvl, .properties = .{ .param_str = "V256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11285 .{ .tag = .__builtin_ve_vl_pvldzup_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11286 .{ .tag = .__builtin_ve_vl_pvmaxs_vsvMvl, .properties = .{ .param_str = "V256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11287 .{ .tag = .__builtin_ve_vl_pvmaxs_vsvl, .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11288 .{ .tag = .__builtin_ve_vl_pvmaxs_vsvvl, .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11289 .{ .tag = .__builtin_ve_vl_pvmaxs_vvvMvl, .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11290 .{ .tag = .__builtin_ve_vl_pvmaxs_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11291 .{ .tag = .__builtin_ve_vl_pvmaxs_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11292 .{ .tag = .__builtin_ve_vl_pvmins_vsvMvl, .properties = .{ .param_str = "V256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11293 .{ .tag = .__builtin_ve_vl_pvmins_vsvl, .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11294 .{ .tag = .__builtin_ve_vl_pvmins_vsvvl, .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11295 .{ .tag = .__builtin_ve_vl_pvmins_vvvMvl, .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11296 .{ .tag = .__builtin_ve_vl_pvmins_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11297 .{ .tag = .__builtin_ve_vl_pvmins_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11298 .{ .tag = .__builtin_ve_vl_pvor_vsvMvl, .properties = .{ .param_str = "V256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11299 .{ .tag = .__builtin_ve_vl_pvor_vsvl, .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11300 .{ .tag = .__builtin_ve_vl_pvor_vsvvl, .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11301 .{ .tag = .__builtin_ve_vl_pvor_vvvMvl, .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11302 .{ .tag = .__builtin_ve_vl_pvor_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11303 .{ .tag = .__builtin_ve_vl_pvor_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11304 .{ .tag = .__builtin_ve_vl_pvpcnt_vvMvl, .properties = .{ .param_str = "V256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11305 .{ .tag = .__builtin_ve_vl_pvpcnt_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11306 .{ .tag = .__builtin_ve_vl_pvpcnt_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11307 .{ .tag = .__builtin_ve_vl_pvpcntlo_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11308 .{ .tag = .__builtin_ve_vl_pvpcntlo_vvmvl, .properties = .{ .param_str = "V256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11309 .{ .tag = .__builtin_ve_vl_pvpcntlo_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11310 .{ .tag = .__builtin_ve_vl_pvpcntup_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11311 .{ .tag = .__builtin_ve_vl_pvpcntup_vvmvl, .properties = .{ .param_str = "V256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11312 .{ .tag = .__builtin_ve_vl_pvpcntup_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11313 .{ .tag = .__builtin_ve_vl_pvrcp_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11314 .{ .tag = .__builtin_ve_vl_pvrcp_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11315 .{ .tag = .__builtin_ve_vl_pvrsqrt_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11316 .{ .tag = .__builtin_ve_vl_pvrsqrt_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11317 .{ .tag = .__builtin_ve_vl_pvrsqrtnex_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11318 .{ .tag = .__builtin_ve_vl_pvrsqrtnex_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11319 .{ .tag = .__builtin_ve_vl_pvseq_vl, .properties = .{ .param_str = "V256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11320 .{ .tag = .__builtin_ve_vl_pvseq_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11321 .{ .tag = .__builtin_ve_vl_pvseqlo_vl, .properties = .{ .param_str = "V256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11322 .{ .tag = .__builtin_ve_vl_pvseqlo_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11323 .{ .tag = .__builtin_ve_vl_pvsequp_vl, .properties = .{ .param_str = "V256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11324 .{ .tag = .__builtin_ve_vl_pvsequp_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11325 .{ .tag = .__builtin_ve_vl_pvsla_vvsMvl, .properties = .{ .param_str = "V256dV256dLUiV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11326 .{ .tag = .__builtin_ve_vl_pvsla_vvsl, .properties = .{ .param_str = "V256dV256dLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11327 .{ .tag = .__builtin_ve_vl_pvsla_vvsvl, .properties = .{ .param_str = "V256dV256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11328 .{ .tag = .__builtin_ve_vl_pvsla_vvvMvl, .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11329 .{ .tag = .__builtin_ve_vl_pvsla_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11330 .{ .tag = .__builtin_ve_vl_pvsla_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11331 .{ .tag = .__builtin_ve_vl_pvsll_vvsMvl, .properties = .{ .param_str = "V256dV256dLUiV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11332 .{ .tag = .__builtin_ve_vl_pvsll_vvsl, .properties = .{ .param_str = "V256dV256dLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11333 .{ .tag = .__builtin_ve_vl_pvsll_vvsvl, .properties = .{ .param_str = "V256dV256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11334 .{ .tag = .__builtin_ve_vl_pvsll_vvvMvl, .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11335 .{ .tag = .__builtin_ve_vl_pvsll_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11336 .{ .tag = .__builtin_ve_vl_pvsll_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11337 .{ .tag = .__builtin_ve_vl_pvsra_vvsMvl, .properties = .{ .param_str = "V256dV256dLUiV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11338 .{ .tag = .__builtin_ve_vl_pvsra_vvsl, .properties = .{ .param_str = "V256dV256dLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11339 .{ .tag = .__builtin_ve_vl_pvsra_vvsvl, .properties = .{ .param_str = "V256dV256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11340 .{ .tag = .__builtin_ve_vl_pvsra_vvvMvl, .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11341 .{ .tag = .__builtin_ve_vl_pvsra_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11342 .{ .tag = .__builtin_ve_vl_pvsra_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11343 .{ .tag = .__builtin_ve_vl_pvsrl_vvsMvl, .properties = .{ .param_str = "V256dV256dLUiV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11344 .{ .tag = .__builtin_ve_vl_pvsrl_vvsl, .properties = .{ .param_str = "V256dV256dLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11345 .{ .tag = .__builtin_ve_vl_pvsrl_vvsvl, .properties = .{ .param_str = "V256dV256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11346 .{ .tag = .__builtin_ve_vl_pvsrl_vvvMvl, .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11347 .{ .tag = .__builtin_ve_vl_pvsrl_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11348 .{ .tag = .__builtin_ve_vl_pvsrl_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11349 .{ .tag = .__builtin_ve_vl_pvsubs_vsvMvl, .properties = .{ .param_str = "V256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11350 .{ .tag = .__builtin_ve_vl_pvsubs_vsvl, .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11351 .{ .tag = .__builtin_ve_vl_pvsubs_vsvvl, .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11352 .{ .tag = .__builtin_ve_vl_pvsubs_vvvMvl, .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11353 .{ .tag = .__builtin_ve_vl_pvsubs_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11354 .{ .tag = .__builtin_ve_vl_pvsubs_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11355 .{ .tag = .__builtin_ve_vl_pvsubu_vsvMvl, .properties = .{ .param_str = "V256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11356 .{ .tag = .__builtin_ve_vl_pvsubu_vsvl, .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11357 .{ .tag = .__builtin_ve_vl_pvsubu_vsvvl, .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11358 .{ .tag = .__builtin_ve_vl_pvsubu_vvvMvl, .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11359 .{ .tag = .__builtin_ve_vl_pvsubu_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11360 .{ .tag = .__builtin_ve_vl_pvsubu_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11361 .{ .tag = .__builtin_ve_vl_pvxor_vsvMvl, .properties = .{ .param_str = "V256dLUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11362 .{ .tag = .__builtin_ve_vl_pvxor_vsvl, .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11363 .{ .tag = .__builtin_ve_vl_pvxor_vsvvl, .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11364 .{ .tag = .__builtin_ve_vl_pvxor_vvvMvl, .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11365 .{ .tag = .__builtin_ve_vl_pvxor_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11366 .{ .tag = .__builtin_ve_vl_pvxor_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11367 .{ .tag = .__builtin_ve_vl_scr_sss, .properties = .{ .param_str = "vLUiLUiLUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11368 .{ .tag = .__builtin_ve_vl_svm_sMs, .properties = .{ .param_str = "LUiV512bLUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11369 .{ .tag = .__builtin_ve_vl_svm_sms, .properties = .{ .param_str = "LUiV256bLUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11370 .{ .tag = .__builtin_ve_vl_svob, .properties = .{ .param_str = "v", .target_set = TargetSet.initOne(.vevl_gen) } },
11371 .{ .tag = .__builtin_ve_vl_tovm_sml, .properties = .{ .param_str = "LUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11372 .{ .tag = .__builtin_ve_vl_tscr_ssss, .properties = .{ .param_str = "LUiLUiLUiLUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11373 .{ .tag = .__builtin_ve_vl_vaddsl_vsvl, .properties = .{ .param_str = "V256dLiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11374 .{ .tag = .__builtin_ve_vl_vaddsl_vsvmvl, .properties = .{ .param_str = "V256dLiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11375 .{ .tag = .__builtin_ve_vl_vaddsl_vsvvl, .properties = .{ .param_str = "V256dLiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11376 .{ .tag = .__builtin_ve_vl_vaddsl_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11377 .{ .tag = .__builtin_ve_vl_vaddsl_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11378 .{ .tag = .__builtin_ve_vl_vaddsl_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11379 .{ .tag = .__builtin_ve_vl_vaddswsx_vsvl, .properties = .{ .param_str = "V256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11380 .{ .tag = .__builtin_ve_vl_vaddswsx_vsvmvl, .properties = .{ .param_str = "V256diV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11381 .{ .tag = .__builtin_ve_vl_vaddswsx_vsvvl, .properties = .{ .param_str = "V256diV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11382 .{ .tag = .__builtin_ve_vl_vaddswsx_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11383 .{ .tag = .__builtin_ve_vl_vaddswsx_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11384 .{ .tag = .__builtin_ve_vl_vaddswsx_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11385 .{ .tag = .__builtin_ve_vl_vaddswzx_vsvl, .properties = .{ .param_str = "V256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11386 .{ .tag = .__builtin_ve_vl_vaddswzx_vsvmvl, .properties = .{ .param_str = "V256diV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11387 .{ .tag = .__builtin_ve_vl_vaddswzx_vsvvl, .properties = .{ .param_str = "V256diV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11388 .{ .tag = .__builtin_ve_vl_vaddswzx_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11389 .{ .tag = .__builtin_ve_vl_vaddswzx_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11390 .{ .tag = .__builtin_ve_vl_vaddswzx_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11391 .{ .tag = .__builtin_ve_vl_vaddul_vsvl, .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11392 .{ .tag = .__builtin_ve_vl_vaddul_vsvmvl, .properties = .{ .param_str = "V256dLUiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11393 .{ .tag = .__builtin_ve_vl_vaddul_vsvvl, .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11394 .{ .tag = .__builtin_ve_vl_vaddul_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11395 .{ .tag = .__builtin_ve_vl_vaddul_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11396 .{ .tag = .__builtin_ve_vl_vaddul_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11397 .{ .tag = .__builtin_ve_vl_vadduw_vsvl, .properties = .{ .param_str = "V256dUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11398 .{ .tag = .__builtin_ve_vl_vadduw_vsvmvl, .properties = .{ .param_str = "V256dUiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11399 .{ .tag = .__builtin_ve_vl_vadduw_vsvvl, .properties = .{ .param_str = "V256dUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11400 .{ .tag = .__builtin_ve_vl_vadduw_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11401 .{ .tag = .__builtin_ve_vl_vadduw_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11402 .{ .tag = .__builtin_ve_vl_vadduw_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11403 .{ .tag = .__builtin_ve_vl_vand_vsvl, .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11404 .{ .tag = .__builtin_ve_vl_vand_vsvmvl, .properties = .{ .param_str = "V256dLUiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11405 .{ .tag = .__builtin_ve_vl_vand_vsvvl, .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11406 .{ .tag = .__builtin_ve_vl_vand_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11407 .{ .tag = .__builtin_ve_vl_vand_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11408 .{ .tag = .__builtin_ve_vl_vand_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11409 .{ .tag = .__builtin_ve_vl_vbrdd_vsl, .properties = .{ .param_str = "V256ddUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11410 .{ .tag = .__builtin_ve_vl_vbrdd_vsmvl, .properties = .{ .param_str = "V256ddV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11411 .{ .tag = .__builtin_ve_vl_vbrdd_vsvl, .properties = .{ .param_str = "V256ddV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11412 .{ .tag = .__builtin_ve_vl_vbrdl_vsl, .properties = .{ .param_str = "V256dLiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11413 .{ .tag = .__builtin_ve_vl_vbrdl_vsmvl, .properties = .{ .param_str = "V256dLiV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11414 .{ .tag = .__builtin_ve_vl_vbrdl_vsvl, .properties = .{ .param_str = "V256dLiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11415 .{ .tag = .__builtin_ve_vl_vbrds_vsl, .properties = .{ .param_str = "V256dfUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11416 .{ .tag = .__builtin_ve_vl_vbrds_vsmvl, .properties = .{ .param_str = "V256dfV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11417 .{ .tag = .__builtin_ve_vl_vbrds_vsvl, .properties = .{ .param_str = "V256dfV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11418 .{ .tag = .__builtin_ve_vl_vbrdw_vsl, .properties = .{ .param_str = "V256diUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11419 .{ .tag = .__builtin_ve_vl_vbrdw_vsmvl, .properties = .{ .param_str = "V256diV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11420 .{ .tag = .__builtin_ve_vl_vbrdw_vsvl, .properties = .{ .param_str = "V256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11421 .{ .tag = .__builtin_ve_vl_vbrv_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11422 .{ .tag = .__builtin_ve_vl_vbrv_vvmvl, .properties = .{ .param_str = "V256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11423 .{ .tag = .__builtin_ve_vl_vbrv_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11424 .{ .tag = .__builtin_ve_vl_vcmpsl_vsvl, .properties = .{ .param_str = "V256dLiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11425 .{ .tag = .__builtin_ve_vl_vcmpsl_vsvmvl, .properties = .{ .param_str = "V256dLiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11426 .{ .tag = .__builtin_ve_vl_vcmpsl_vsvvl, .properties = .{ .param_str = "V256dLiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11427 .{ .tag = .__builtin_ve_vl_vcmpsl_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11428 .{ .tag = .__builtin_ve_vl_vcmpsl_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11429 .{ .tag = .__builtin_ve_vl_vcmpsl_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11430 .{ .tag = .__builtin_ve_vl_vcmpswsx_vsvl, .properties = .{ .param_str = "V256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11431 .{ .tag = .__builtin_ve_vl_vcmpswsx_vsvmvl, .properties = .{ .param_str = "V256diV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11432 .{ .tag = .__builtin_ve_vl_vcmpswsx_vsvvl, .properties = .{ .param_str = "V256diV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11433 .{ .tag = .__builtin_ve_vl_vcmpswsx_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11434 .{ .tag = .__builtin_ve_vl_vcmpswsx_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11435 .{ .tag = .__builtin_ve_vl_vcmpswsx_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11436 .{ .tag = .__builtin_ve_vl_vcmpswzx_vsvl, .properties = .{ .param_str = "V256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11437 .{ .tag = .__builtin_ve_vl_vcmpswzx_vsvmvl, .properties = .{ .param_str = "V256diV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11438 .{ .tag = .__builtin_ve_vl_vcmpswzx_vsvvl, .properties = .{ .param_str = "V256diV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11439 .{ .tag = .__builtin_ve_vl_vcmpswzx_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11440 .{ .tag = .__builtin_ve_vl_vcmpswzx_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11441 .{ .tag = .__builtin_ve_vl_vcmpswzx_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11442 .{ .tag = .__builtin_ve_vl_vcmpul_vsvl, .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11443 .{ .tag = .__builtin_ve_vl_vcmpul_vsvmvl, .properties = .{ .param_str = "V256dLUiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11444 .{ .tag = .__builtin_ve_vl_vcmpul_vsvvl, .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11445 .{ .tag = .__builtin_ve_vl_vcmpul_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11446 .{ .tag = .__builtin_ve_vl_vcmpul_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11447 .{ .tag = .__builtin_ve_vl_vcmpul_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11448 .{ .tag = .__builtin_ve_vl_vcmpuw_vsvl, .properties = .{ .param_str = "V256dUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11449 .{ .tag = .__builtin_ve_vl_vcmpuw_vsvmvl, .properties = .{ .param_str = "V256dUiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11450 .{ .tag = .__builtin_ve_vl_vcmpuw_vsvvl, .properties = .{ .param_str = "V256dUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11451 .{ .tag = .__builtin_ve_vl_vcmpuw_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11452 .{ .tag = .__builtin_ve_vl_vcmpuw_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11453 .{ .tag = .__builtin_ve_vl_vcmpuw_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11454 .{ .tag = .__builtin_ve_vl_vcp_vvmvl, .properties = .{ .param_str = "V256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11455 .{ .tag = .__builtin_ve_vl_vcvtdl_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11456 .{ .tag = .__builtin_ve_vl_vcvtdl_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11457 .{ .tag = .__builtin_ve_vl_vcvtds_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11458 .{ .tag = .__builtin_ve_vl_vcvtds_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11459 .{ .tag = .__builtin_ve_vl_vcvtdw_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11460 .{ .tag = .__builtin_ve_vl_vcvtdw_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11461 .{ .tag = .__builtin_ve_vl_vcvtld_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11462 .{ .tag = .__builtin_ve_vl_vcvtld_vvmvl, .properties = .{ .param_str = "V256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11463 .{ .tag = .__builtin_ve_vl_vcvtld_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11464 .{ .tag = .__builtin_ve_vl_vcvtldrz_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11465 .{ .tag = .__builtin_ve_vl_vcvtldrz_vvmvl, .properties = .{ .param_str = "V256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11466 .{ .tag = .__builtin_ve_vl_vcvtldrz_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11467 .{ .tag = .__builtin_ve_vl_vcvtsd_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11468 .{ .tag = .__builtin_ve_vl_vcvtsd_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11469 .{ .tag = .__builtin_ve_vl_vcvtsw_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11470 .{ .tag = .__builtin_ve_vl_vcvtsw_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11471 .{ .tag = .__builtin_ve_vl_vcvtwdsx_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11472 .{ .tag = .__builtin_ve_vl_vcvtwdsx_vvmvl, .properties = .{ .param_str = "V256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11473 .{ .tag = .__builtin_ve_vl_vcvtwdsx_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11474 .{ .tag = .__builtin_ve_vl_vcvtwdsxrz_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11475 .{ .tag = .__builtin_ve_vl_vcvtwdsxrz_vvmvl, .properties = .{ .param_str = "V256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11476 .{ .tag = .__builtin_ve_vl_vcvtwdsxrz_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11477 .{ .tag = .__builtin_ve_vl_vcvtwdzx_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11478 .{ .tag = .__builtin_ve_vl_vcvtwdzx_vvmvl, .properties = .{ .param_str = "V256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11479 .{ .tag = .__builtin_ve_vl_vcvtwdzx_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11480 .{ .tag = .__builtin_ve_vl_vcvtwdzxrz_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11481 .{ .tag = .__builtin_ve_vl_vcvtwdzxrz_vvmvl, .properties = .{ .param_str = "V256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11482 .{ .tag = .__builtin_ve_vl_vcvtwdzxrz_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11483 .{ .tag = .__builtin_ve_vl_vcvtwssx_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11484 .{ .tag = .__builtin_ve_vl_vcvtwssx_vvmvl, .properties = .{ .param_str = "V256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11485 .{ .tag = .__builtin_ve_vl_vcvtwssx_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11486 .{ .tag = .__builtin_ve_vl_vcvtwssxrz_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11487 .{ .tag = .__builtin_ve_vl_vcvtwssxrz_vvmvl, .properties = .{ .param_str = "V256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11488 .{ .tag = .__builtin_ve_vl_vcvtwssxrz_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11489 .{ .tag = .__builtin_ve_vl_vcvtwszx_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11490 .{ .tag = .__builtin_ve_vl_vcvtwszx_vvmvl, .properties = .{ .param_str = "V256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11491 .{ .tag = .__builtin_ve_vl_vcvtwszx_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11492 .{ .tag = .__builtin_ve_vl_vcvtwszxrz_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11493 .{ .tag = .__builtin_ve_vl_vcvtwszxrz_vvmvl, .properties = .{ .param_str = "V256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11494 .{ .tag = .__builtin_ve_vl_vcvtwszxrz_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11495 .{ .tag = .__builtin_ve_vl_vdivsl_vsvl, .properties = .{ .param_str = "V256dLiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11496 .{ .tag = .__builtin_ve_vl_vdivsl_vsvmvl, .properties = .{ .param_str = "V256dLiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11497 .{ .tag = .__builtin_ve_vl_vdivsl_vsvvl, .properties = .{ .param_str = "V256dLiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11498 .{ .tag = .__builtin_ve_vl_vdivsl_vvsl, .properties = .{ .param_str = "V256dV256dLiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11499 .{ .tag = .__builtin_ve_vl_vdivsl_vvsmvl, .properties = .{ .param_str = "V256dV256dLiV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11500 .{ .tag = .__builtin_ve_vl_vdivsl_vvsvl, .properties = .{ .param_str = "V256dV256dLiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11501 .{ .tag = .__builtin_ve_vl_vdivsl_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11502 .{ .tag = .__builtin_ve_vl_vdivsl_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11503 .{ .tag = .__builtin_ve_vl_vdivsl_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11504 .{ .tag = .__builtin_ve_vl_vdivswsx_vsvl, .properties = .{ .param_str = "V256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11505 .{ .tag = .__builtin_ve_vl_vdivswsx_vsvmvl, .properties = .{ .param_str = "V256diV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11506 .{ .tag = .__builtin_ve_vl_vdivswsx_vsvvl, .properties = .{ .param_str = "V256diV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11507 .{ .tag = .__builtin_ve_vl_vdivswsx_vvsl, .properties = .{ .param_str = "V256dV256diUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11508 .{ .tag = .__builtin_ve_vl_vdivswsx_vvsmvl, .properties = .{ .param_str = "V256dV256diV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11509 .{ .tag = .__builtin_ve_vl_vdivswsx_vvsvl, .properties = .{ .param_str = "V256dV256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11510 .{ .tag = .__builtin_ve_vl_vdivswsx_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11511 .{ .tag = .__builtin_ve_vl_vdivswsx_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11512 .{ .tag = .__builtin_ve_vl_vdivswsx_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11513 .{ .tag = .__builtin_ve_vl_vdivswzx_vsvl, .properties = .{ .param_str = "V256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11514 .{ .tag = .__builtin_ve_vl_vdivswzx_vsvmvl, .properties = .{ .param_str = "V256diV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11515 .{ .tag = .__builtin_ve_vl_vdivswzx_vsvvl, .properties = .{ .param_str = "V256diV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11516 .{ .tag = .__builtin_ve_vl_vdivswzx_vvsl, .properties = .{ .param_str = "V256dV256diUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11517 .{ .tag = .__builtin_ve_vl_vdivswzx_vvsmvl, .properties = .{ .param_str = "V256dV256diV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11518 .{ .tag = .__builtin_ve_vl_vdivswzx_vvsvl, .properties = .{ .param_str = "V256dV256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11519 .{ .tag = .__builtin_ve_vl_vdivswzx_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11520 .{ .tag = .__builtin_ve_vl_vdivswzx_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11521 .{ .tag = .__builtin_ve_vl_vdivswzx_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11522 .{ .tag = .__builtin_ve_vl_vdivul_vsvl, .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11523 .{ .tag = .__builtin_ve_vl_vdivul_vsvmvl, .properties = .{ .param_str = "V256dLUiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11524 .{ .tag = .__builtin_ve_vl_vdivul_vsvvl, .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11525 .{ .tag = .__builtin_ve_vl_vdivul_vvsl, .properties = .{ .param_str = "V256dV256dLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11526 .{ .tag = .__builtin_ve_vl_vdivul_vvsmvl, .properties = .{ .param_str = "V256dV256dLUiV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11527 .{ .tag = .__builtin_ve_vl_vdivul_vvsvl, .properties = .{ .param_str = "V256dV256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11528 .{ .tag = .__builtin_ve_vl_vdivul_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11529 .{ .tag = .__builtin_ve_vl_vdivul_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11530 .{ .tag = .__builtin_ve_vl_vdivul_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11531 .{ .tag = .__builtin_ve_vl_vdivuw_vsvl, .properties = .{ .param_str = "V256dUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11532 .{ .tag = .__builtin_ve_vl_vdivuw_vsvmvl, .properties = .{ .param_str = "V256dUiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11533 .{ .tag = .__builtin_ve_vl_vdivuw_vsvvl, .properties = .{ .param_str = "V256dUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11534 .{ .tag = .__builtin_ve_vl_vdivuw_vvsl, .properties = .{ .param_str = "V256dV256dUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11535 .{ .tag = .__builtin_ve_vl_vdivuw_vvsmvl, .properties = .{ .param_str = "V256dV256dUiV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11536 .{ .tag = .__builtin_ve_vl_vdivuw_vvsvl, .properties = .{ .param_str = "V256dV256dUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11537 .{ .tag = .__builtin_ve_vl_vdivuw_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11538 .{ .tag = .__builtin_ve_vl_vdivuw_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11539 .{ .tag = .__builtin_ve_vl_vdivuw_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11540 .{ .tag = .__builtin_ve_vl_veqv_vsvl, .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11541 .{ .tag = .__builtin_ve_vl_veqv_vsvmvl, .properties = .{ .param_str = "V256dLUiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11542 .{ .tag = .__builtin_ve_vl_veqv_vsvvl, .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11543 .{ .tag = .__builtin_ve_vl_veqv_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11544 .{ .tag = .__builtin_ve_vl_veqv_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11545 .{ .tag = .__builtin_ve_vl_veqv_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11546 .{ .tag = .__builtin_ve_vl_vex_vvmvl, .properties = .{ .param_str = "V256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11547 .{ .tag = .__builtin_ve_vl_vfaddd_vsvl, .properties = .{ .param_str = "V256ddV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11548 .{ .tag = .__builtin_ve_vl_vfaddd_vsvmvl, .properties = .{ .param_str = "V256ddV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11549 .{ .tag = .__builtin_ve_vl_vfaddd_vsvvl, .properties = .{ .param_str = "V256ddV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11550 .{ .tag = .__builtin_ve_vl_vfaddd_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11551 .{ .tag = .__builtin_ve_vl_vfaddd_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11552 .{ .tag = .__builtin_ve_vl_vfaddd_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11553 .{ .tag = .__builtin_ve_vl_vfadds_vsvl, .properties = .{ .param_str = "V256dfV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11554 .{ .tag = .__builtin_ve_vl_vfadds_vsvmvl, .properties = .{ .param_str = "V256dfV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11555 .{ .tag = .__builtin_ve_vl_vfadds_vsvvl, .properties = .{ .param_str = "V256dfV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11556 .{ .tag = .__builtin_ve_vl_vfadds_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11557 .{ .tag = .__builtin_ve_vl_vfadds_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11558 .{ .tag = .__builtin_ve_vl_vfadds_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11559 .{ .tag = .__builtin_ve_vl_vfcmpd_vsvl, .properties = .{ .param_str = "V256ddV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11560 .{ .tag = .__builtin_ve_vl_vfcmpd_vsvmvl, .properties = .{ .param_str = "V256ddV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11561 .{ .tag = .__builtin_ve_vl_vfcmpd_vsvvl, .properties = .{ .param_str = "V256ddV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11562 .{ .tag = .__builtin_ve_vl_vfcmpd_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11563 .{ .tag = .__builtin_ve_vl_vfcmpd_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11564 .{ .tag = .__builtin_ve_vl_vfcmpd_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11565 .{ .tag = .__builtin_ve_vl_vfcmps_vsvl, .properties = .{ .param_str = "V256dfV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11566 .{ .tag = .__builtin_ve_vl_vfcmps_vsvmvl, .properties = .{ .param_str = "V256dfV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11567 .{ .tag = .__builtin_ve_vl_vfcmps_vsvvl, .properties = .{ .param_str = "V256dfV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11568 .{ .tag = .__builtin_ve_vl_vfcmps_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11569 .{ .tag = .__builtin_ve_vl_vfcmps_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11570 .{ .tag = .__builtin_ve_vl_vfcmps_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11571 .{ .tag = .__builtin_ve_vl_vfdivd_vsvl, .properties = .{ .param_str = "V256ddV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11572 .{ .tag = .__builtin_ve_vl_vfdivd_vsvmvl, .properties = .{ .param_str = "V256ddV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11573 .{ .tag = .__builtin_ve_vl_vfdivd_vsvvl, .properties = .{ .param_str = "V256ddV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11574 .{ .tag = .__builtin_ve_vl_vfdivd_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11575 .{ .tag = .__builtin_ve_vl_vfdivd_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11576 .{ .tag = .__builtin_ve_vl_vfdivd_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11577 .{ .tag = .__builtin_ve_vl_vfdivs_vsvl, .properties = .{ .param_str = "V256dfV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11578 .{ .tag = .__builtin_ve_vl_vfdivs_vsvmvl, .properties = .{ .param_str = "V256dfV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11579 .{ .tag = .__builtin_ve_vl_vfdivs_vsvvl, .properties = .{ .param_str = "V256dfV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11580 .{ .tag = .__builtin_ve_vl_vfdivs_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11581 .{ .tag = .__builtin_ve_vl_vfdivs_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11582 .{ .tag = .__builtin_ve_vl_vfdivs_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11583 .{ .tag = .__builtin_ve_vl_vfmadd_vsvvl, .properties = .{ .param_str = "V256ddV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11584 .{ .tag = .__builtin_ve_vl_vfmadd_vsvvmvl, .properties = .{ .param_str = "V256ddV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11585 .{ .tag = .__builtin_ve_vl_vfmadd_vsvvvl, .properties = .{ .param_str = "V256ddV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11586 .{ .tag = .__builtin_ve_vl_vfmadd_vvsvl, .properties = .{ .param_str = "V256dV256ddV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11587 .{ .tag = .__builtin_ve_vl_vfmadd_vvsvmvl, .properties = .{ .param_str = "V256dV256ddV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11588 .{ .tag = .__builtin_ve_vl_vfmadd_vvsvvl, .properties = .{ .param_str = "V256dV256ddV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11589 .{ .tag = .__builtin_ve_vl_vfmadd_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11590 .{ .tag = .__builtin_ve_vl_vfmadd_vvvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11591 .{ .tag = .__builtin_ve_vl_vfmadd_vvvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11592 .{ .tag = .__builtin_ve_vl_vfmads_vsvvl, .properties = .{ .param_str = "V256dfV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11593 .{ .tag = .__builtin_ve_vl_vfmads_vsvvmvl, .properties = .{ .param_str = "V256dfV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11594 .{ .tag = .__builtin_ve_vl_vfmads_vsvvvl, .properties = .{ .param_str = "V256dfV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11595 .{ .tag = .__builtin_ve_vl_vfmads_vvsvl, .properties = .{ .param_str = "V256dV256dfV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11596 .{ .tag = .__builtin_ve_vl_vfmads_vvsvmvl, .properties = .{ .param_str = "V256dV256dfV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11597 .{ .tag = .__builtin_ve_vl_vfmads_vvsvvl, .properties = .{ .param_str = "V256dV256dfV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11598 .{ .tag = .__builtin_ve_vl_vfmads_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11599 .{ .tag = .__builtin_ve_vl_vfmads_vvvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11600 .{ .tag = .__builtin_ve_vl_vfmads_vvvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11601 .{ .tag = .__builtin_ve_vl_vfmaxd_vsvl, .properties = .{ .param_str = "V256ddV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11602 .{ .tag = .__builtin_ve_vl_vfmaxd_vsvmvl, .properties = .{ .param_str = "V256ddV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11603 .{ .tag = .__builtin_ve_vl_vfmaxd_vsvvl, .properties = .{ .param_str = "V256ddV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11604 .{ .tag = .__builtin_ve_vl_vfmaxd_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11605 .{ .tag = .__builtin_ve_vl_vfmaxd_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11606 .{ .tag = .__builtin_ve_vl_vfmaxd_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11607 .{ .tag = .__builtin_ve_vl_vfmaxs_vsvl, .properties = .{ .param_str = "V256dfV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11608 .{ .tag = .__builtin_ve_vl_vfmaxs_vsvmvl, .properties = .{ .param_str = "V256dfV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11609 .{ .tag = .__builtin_ve_vl_vfmaxs_vsvvl, .properties = .{ .param_str = "V256dfV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11610 .{ .tag = .__builtin_ve_vl_vfmaxs_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11611 .{ .tag = .__builtin_ve_vl_vfmaxs_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11612 .{ .tag = .__builtin_ve_vl_vfmaxs_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11613 .{ .tag = .__builtin_ve_vl_vfmind_vsvl, .properties = .{ .param_str = "V256ddV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11614 .{ .tag = .__builtin_ve_vl_vfmind_vsvmvl, .properties = .{ .param_str = "V256ddV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11615 .{ .tag = .__builtin_ve_vl_vfmind_vsvvl, .properties = .{ .param_str = "V256ddV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11616 .{ .tag = .__builtin_ve_vl_vfmind_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11617 .{ .tag = .__builtin_ve_vl_vfmind_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11618 .{ .tag = .__builtin_ve_vl_vfmind_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11619 .{ .tag = .__builtin_ve_vl_vfmins_vsvl, .properties = .{ .param_str = "V256dfV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11620 .{ .tag = .__builtin_ve_vl_vfmins_vsvmvl, .properties = .{ .param_str = "V256dfV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11621 .{ .tag = .__builtin_ve_vl_vfmins_vsvvl, .properties = .{ .param_str = "V256dfV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11622 .{ .tag = .__builtin_ve_vl_vfmins_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11623 .{ .tag = .__builtin_ve_vl_vfmins_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11624 .{ .tag = .__builtin_ve_vl_vfmins_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11625 .{ .tag = .__builtin_ve_vl_vfmkdeq_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11626 .{ .tag = .__builtin_ve_vl_vfmkdeq_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11627 .{ .tag = .__builtin_ve_vl_vfmkdeqnan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11628 .{ .tag = .__builtin_ve_vl_vfmkdeqnan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11629 .{ .tag = .__builtin_ve_vl_vfmkdge_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11630 .{ .tag = .__builtin_ve_vl_vfmkdge_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11631 .{ .tag = .__builtin_ve_vl_vfmkdgenan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11632 .{ .tag = .__builtin_ve_vl_vfmkdgenan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11633 .{ .tag = .__builtin_ve_vl_vfmkdgt_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11634 .{ .tag = .__builtin_ve_vl_vfmkdgt_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11635 .{ .tag = .__builtin_ve_vl_vfmkdgtnan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11636 .{ .tag = .__builtin_ve_vl_vfmkdgtnan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11637 .{ .tag = .__builtin_ve_vl_vfmkdle_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11638 .{ .tag = .__builtin_ve_vl_vfmkdle_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11639 .{ .tag = .__builtin_ve_vl_vfmkdlenan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11640 .{ .tag = .__builtin_ve_vl_vfmkdlenan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11641 .{ .tag = .__builtin_ve_vl_vfmkdlt_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11642 .{ .tag = .__builtin_ve_vl_vfmkdlt_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11643 .{ .tag = .__builtin_ve_vl_vfmkdltnan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11644 .{ .tag = .__builtin_ve_vl_vfmkdltnan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11645 .{ .tag = .__builtin_ve_vl_vfmkdnan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11646 .{ .tag = .__builtin_ve_vl_vfmkdnan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11647 .{ .tag = .__builtin_ve_vl_vfmkdne_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11648 .{ .tag = .__builtin_ve_vl_vfmkdne_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11649 .{ .tag = .__builtin_ve_vl_vfmkdnenan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11650 .{ .tag = .__builtin_ve_vl_vfmkdnenan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11651 .{ .tag = .__builtin_ve_vl_vfmkdnum_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11652 .{ .tag = .__builtin_ve_vl_vfmkdnum_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11653 .{ .tag = .__builtin_ve_vl_vfmklaf_ml, .properties = .{ .param_str = "V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11654 .{ .tag = .__builtin_ve_vl_vfmklat_ml, .properties = .{ .param_str = "V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11655 .{ .tag = .__builtin_ve_vl_vfmkleq_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11656 .{ .tag = .__builtin_ve_vl_vfmkleq_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11657 .{ .tag = .__builtin_ve_vl_vfmkleqnan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11658 .{ .tag = .__builtin_ve_vl_vfmkleqnan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11659 .{ .tag = .__builtin_ve_vl_vfmklge_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11660 .{ .tag = .__builtin_ve_vl_vfmklge_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11661 .{ .tag = .__builtin_ve_vl_vfmklgenan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11662 .{ .tag = .__builtin_ve_vl_vfmklgenan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11663 .{ .tag = .__builtin_ve_vl_vfmklgt_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11664 .{ .tag = .__builtin_ve_vl_vfmklgt_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11665 .{ .tag = .__builtin_ve_vl_vfmklgtnan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11666 .{ .tag = .__builtin_ve_vl_vfmklgtnan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11667 .{ .tag = .__builtin_ve_vl_vfmklle_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11668 .{ .tag = .__builtin_ve_vl_vfmklle_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11669 .{ .tag = .__builtin_ve_vl_vfmkllenan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11670 .{ .tag = .__builtin_ve_vl_vfmkllenan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11671 .{ .tag = .__builtin_ve_vl_vfmkllt_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11672 .{ .tag = .__builtin_ve_vl_vfmkllt_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11673 .{ .tag = .__builtin_ve_vl_vfmklltnan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11674 .{ .tag = .__builtin_ve_vl_vfmklltnan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11675 .{ .tag = .__builtin_ve_vl_vfmklnan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11676 .{ .tag = .__builtin_ve_vl_vfmklnan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11677 .{ .tag = .__builtin_ve_vl_vfmklne_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11678 .{ .tag = .__builtin_ve_vl_vfmklne_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11679 .{ .tag = .__builtin_ve_vl_vfmklnenan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11680 .{ .tag = .__builtin_ve_vl_vfmklnenan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11681 .{ .tag = .__builtin_ve_vl_vfmklnum_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11682 .{ .tag = .__builtin_ve_vl_vfmklnum_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11683 .{ .tag = .__builtin_ve_vl_vfmkseq_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11684 .{ .tag = .__builtin_ve_vl_vfmkseq_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11685 .{ .tag = .__builtin_ve_vl_vfmkseqnan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11686 .{ .tag = .__builtin_ve_vl_vfmkseqnan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11687 .{ .tag = .__builtin_ve_vl_vfmksge_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11688 .{ .tag = .__builtin_ve_vl_vfmksge_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11689 .{ .tag = .__builtin_ve_vl_vfmksgenan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11690 .{ .tag = .__builtin_ve_vl_vfmksgenan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11691 .{ .tag = .__builtin_ve_vl_vfmksgt_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11692 .{ .tag = .__builtin_ve_vl_vfmksgt_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11693 .{ .tag = .__builtin_ve_vl_vfmksgtnan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11694 .{ .tag = .__builtin_ve_vl_vfmksgtnan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11695 .{ .tag = .__builtin_ve_vl_vfmksle_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11696 .{ .tag = .__builtin_ve_vl_vfmksle_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11697 .{ .tag = .__builtin_ve_vl_vfmkslenan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11698 .{ .tag = .__builtin_ve_vl_vfmkslenan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11699 .{ .tag = .__builtin_ve_vl_vfmkslt_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11700 .{ .tag = .__builtin_ve_vl_vfmkslt_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11701 .{ .tag = .__builtin_ve_vl_vfmksltnan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11702 .{ .tag = .__builtin_ve_vl_vfmksltnan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11703 .{ .tag = .__builtin_ve_vl_vfmksnan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11704 .{ .tag = .__builtin_ve_vl_vfmksnan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11705 .{ .tag = .__builtin_ve_vl_vfmksne_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11706 .{ .tag = .__builtin_ve_vl_vfmksne_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11707 .{ .tag = .__builtin_ve_vl_vfmksnenan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11708 .{ .tag = .__builtin_ve_vl_vfmksnenan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11709 .{ .tag = .__builtin_ve_vl_vfmksnum_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11710 .{ .tag = .__builtin_ve_vl_vfmksnum_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11711 .{ .tag = .__builtin_ve_vl_vfmkweq_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11712 .{ .tag = .__builtin_ve_vl_vfmkweq_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11713 .{ .tag = .__builtin_ve_vl_vfmkweqnan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11714 .{ .tag = .__builtin_ve_vl_vfmkweqnan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11715 .{ .tag = .__builtin_ve_vl_vfmkwge_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11716 .{ .tag = .__builtin_ve_vl_vfmkwge_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11717 .{ .tag = .__builtin_ve_vl_vfmkwgenan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11718 .{ .tag = .__builtin_ve_vl_vfmkwgenan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11719 .{ .tag = .__builtin_ve_vl_vfmkwgt_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11720 .{ .tag = .__builtin_ve_vl_vfmkwgt_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11721 .{ .tag = .__builtin_ve_vl_vfmkwgtnan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11722 .{ .tag = .__builtin_ve_vl_vfmkwgtnan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11723 .{ .tag = .__builtin_ve_vl_vfmkwle_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11724 .{ .tag = .__builtin_ve_vl_vfmkwle_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11725 .{ .tag = .__builtin_ve_vl_vfmkwlenan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11726 .{ .tag = .__builtin_ve_vl_vfmkwlenan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11727 .{ .tag = .__builtin_ve_vl_vfmkwlt_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11728 .{ .tag = .__builtin_ve_vl_vfmkwlt_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11729 .{ .tag = .__builtin_ve_vl_vfmkwltnan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11730 .{ .tag = .__builtin_ve_vl_vfmkwltnan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11731 .{ .tag = .__builtin_ve_vl_vfmkwnan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11732 .{ .tag = .__builtin_ve_vl_vfmkwnan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11733 .{ .tag = .__builtin_ve_vl_vfmkwne_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11734 .{ .tag = .__builtin_ve_vl_vfmkwne_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11735 .{ .tag = .__builtin_ve_vl_vfmkwnenan_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11736 .{ .tag = .__builtin_ve_vl_vfmkwnenan_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11737 .{ .tag = .__builtin_ve_vl_vfmkwnum_mvl, .properties = .{ .param_str = "V256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11738 .{ .tag = .__builtin_ve_vl_vfmkwnum_mvml, .properties = .{ .param_str = "V256bV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11739 .{ .tag = .__builtin_ve_vl_vfmsbd_vsvvl, .properties = .{ .param_str = "V256ddV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11740 .{ .tag = .__builtin_ve_vl_vfmsbd_vsvvmvl, .properties = .{ .param_str = "V256ddV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11741 .{ .tag = .__builtin_ve_vl_vfmsbd_vsvvvl, .properties = .{ .param_str = "V256ddV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11742 .{ .tag = .__builtin_ve_vl_vfmsbd_vvsvl, .properties = .{ .param_str = "V256dV256ddV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11743 .{ .tag = .__builtin_ve_vl_vfmsbd_vvsvmvl, .properties = .{ .param_str = "V256dV256ddV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11744 .{ .tag = .__builtin_ve_vl_vfmsbd_vvsvvl, .properties = .{ .param_str = "V256dV256ddV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11745 .{ .tag = .__builtin_ve_vl_vfmsbd_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11746 .{ .tag = .__builtin_ve_vl_vfmsbd_vvvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11747 .{ .tag = .__builtin_ve_vl_vfmsbd_vvvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11748 .{ .tag = .__builtin_ve_vl_vfmsbs_vsvvl, .properties = .{ .param_str = "V256dfV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11749 .{ .tag = .__builtin_ve_vl_vfmsbs_vsvvmvl, .properties = .{ .param_str = "V256dfV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11750 .{ .tag = .__builtin_ve_vl_vfmsbs_vsvvvl, .properties = .{ .param_str = "V256dfV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11751 .{ .tag = .__builtin_ve_vl_vfmsbs_vvsvl, .properties = .{ .param_str = "V256dV256dfV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11752 .{ .tag = .__builtin_ve_vl_vfmsbs_vvsvmvl, .properties = .{ .param_str = "V256dV256dfV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11753 .{ .tag = .__builtin_ve_vl_vfmsbs_vvsvvl, .properties = .{ .param_str = "V256dV256dfV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11754 .{ .tag = .__builtin_ve_vl_vfmsbs_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11755 .{ .tag = .__builtin_ve_vl_vfmsbs_vvvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11756 .{ .tag = .__builtin_ve_vl_vfmsbs_vvvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11757 .{ .tag = .__builtin_ve_vl_vfmuld_vsvl, .properties = .{ .param_str = "V256ddV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11758 .{ .tag = .__builtin_ve_vl_vfmuld_vsvmvl, .properties = .{ .param_str = "V256ddV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11759 .{ .tag = .__builtin_ve_vl_vfmuld_vsvvl, .properties = .{ .param_str = "V256ddV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11760 .{ .tag = .__builtin_ve_vl_vfmuld_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11761 .{ .tag = .__builtin_ve_vl_vfmuld_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11762 .{ .tag = .__builtin_ve_vl_vfmuld_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11763 .{ .tag = .__builtin_ve_vl_vfmuls_vsvl, .properties = .{ .param_str = "V256dfV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11764 .{ .tag = .__builtin_ve_vl_vfmuls_vsvmvl, .properties = .{ .param_str = "V256dfV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11765 .{ .tag = .__builtin_ve_vl_vfmuls_vsvvl, .properties = .{ .param_str = "V256dfV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11766 .{ .tag = .__builtin_ve_vl_vfmuls_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11767 .{ .tag = .__builtin_ve_vl_vfmuls_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11768 .{ .tag = .__builtin_ve_vl_vfmuls_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11769 .{ .tag = .__builtin_ve_vl_vfnmadd_vsvvl, .properties = .{ .param_str = "V256ddV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11770 .{ .tag = .__builtin_ve_vl_vfnmadd_vsvvmvl, .properties = .{ .param_str = "V256ddV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11771 .{ .tag = .__builtin_ve_vl_vfnmadd_vsvvvl, .properties = .{ .param_str = "V256ddV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11772 .{ .tag = .__builtin_ve_vl_vfnmadd_vvsvl, .properties = .{ .param_str = "V256dV256ddV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11773 .{ .tag = .__builtin_ve_vl_vfnmadd_vvsvmvl, .properties = .{ .param_str = "V256dV256ddV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11774 .{ .tag = .__builtin_ve_vl_vfnmadd_vvsvvl, .properties = .{ .param_str = "V256dV256ddV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11775 .{ .tag = .__builtin_ve_vl_vfnmadd_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11776 .{ .tag = .__builtin_ve_vl_vfnmadd_vvvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11777 .{ .tag = .__builtin_ve_vl_vfnmadd_vvvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11778 .{ .tag = .__builtin_ve_vl_vfnmads_vsvvl, .properties = .{ .param_str = "V256dfV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11779 .{ .tag = .__builtin_ve_vl_vfnmads_vsvvmvl, .properties = .{ .param_str = "V256dfV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11780 .{ .tag = .__builtin_ve_vl_vfnmads_vsvvvl, .properties = .{ .param_str = "V256dfV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11781 .{ .tag = .__builtin_ve_vl_vfnmads_vvsvl, .properties = .{ .param_str = "V256dV256dfV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11782 .{ .tag = .__builtin_ve_vl_vfnmads_vvsvmvl, .properties = .{ .param_str = "V256dV256dfV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11783 .{ .tag = .__builtin_ve_vl_vfnmads_vvsvvl, .properties = .{ .param_str = "V256dV256dfV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11784 .{ .tag = .__builtin_ve_vl_vfnmads_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11785 .{ .tag = .__builtin_ve_vl_vfnmads_vvvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11786 .{ .tag = .__builtin_ve_vl_vfnmads_vvvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11787 .{ .tag = .__builtin_ve_vl_vfnmsbd_vsvvl, .properties = .{ .param_str = "V256ddV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11788 .{ .tag = .__builtin_ve_vl_vfnmsbd_vsvvmvl, .properties = .{ .param_str = "V256ddV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11789 .{ .tag = .__builtin_ve_vl_vfnmsbd_vsvvvl, .properties = .{ .param_str = "V256ddV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11790 .{ .tag = .__builtin_ve_vl_vfnmsbd_vvsvl, .properties = .{ .param_str = "V256dV256ddV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11791 .{ .tag = .__builtin_ve_vl_vfnmsbd_vvsvmvl, .properties = .{ .param_str = "V256dV256ddV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11792 .{ .tag = .__builtin_ve_vl_vfnmsbd_vvsvvl, .properties = .{ .param_str = "V256dV256ddV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11793 .{ .tag = .__builtin_ve_vl_vfnmsbd_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11794 .{ .tag = .__builtin_ve_vl_vfnmsbd_vvvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11795 .{ .tag = .__builtin_ve_vl_vfnmsbd_vvvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11796 .{ .tag = .__builtin_ve_vl_vfnmsbs_vsvvl, .properties = .{ .param_str = "V256dfV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11797 .{ .tag = .__builtin_ve_vl_vfnmsbs_vsvvmvl, .properties = .{ .param_str = "V256dfV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11798 .{ .tag = .__builtin_ve_vl_vfnmsbs_vsvvvl, .properties = .{ .param_str = "V256dfV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11799 .{ .tag = .__builtin_ve_vl_vfnmsbs_vvsvl, .properties = .{ .param_str = "V256dV256dfV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11800 .{ .tag = .__builtin_ve_vl_vfnmsbs_vvsvmvl, .properties = .{ .param_str = "V256dV256dfV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11801 .{ .tag = .__builtin_ve_vl_vfnmsbs_vvsvvl, .properties = .{ .param_str = "V256dV256dfV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11802 .{ .tag = .__builtin_ve_vl_vfnmsbs_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11803 .{ .tag = .__builtin_ve_vl_vfnmsbs_vvvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11804 .{ .tag = .__builtin_ve_vl_vfnmsbs_vvvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11805 .{ .tag = .__builtin_ve_vl_vfrmaxdfst_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11806 .{ .tag = .__builtin_ve_vl_vfrmaxdfst_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11807 .{ .tag = .__builtin_ve_vl_vfrmaxdlst_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11808 .{ .tag = .__builtin_ve_vl_vfrmaxdlst_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11809 .{ .tag = .__builtin_ve_vl_vfrmaxsfst_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11810 .{ .tag = .__builtin_ve_vl_vfrmaxsfst_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11811 .{ .tag = .__builtin_ve_vl_vfrmaxslst_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11812 .{ .tag = .__builtin_ve_vl_vfrmaxslst_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11813 .{ .tag = .__builtin_ve_vl_vfrmindfst_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11814 .{ .tag = .__builtin_ve_vl_vfrmindfst_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11815 .{ .tag = .__builtin_ve_vl_vfrmindlst_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11816 .{ .tag = .__builtin_ve_vl_vfrmindlst_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11817 .{ .tag = .__builtin_ve_vl_vfrminsfst_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11818 .{ .tag = .__builtin_ve_vl_vfrminsfst_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11819 .{ .tag = .__builtin_ve_vl_vfrminslst_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11820 .{ .tag = .__builtin_ve_vl_vfrminslst_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11821 .{ .tag = .__builtin_ve_vl_vfsqrtd_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11822 .{ .tag = .__builtin_ve_vl_vfsqrtd_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11823 .{ .tag = .__builtin_ve_vl_vfsqrts_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11824 .{ .tag = .__builtin_ve_vl_vfsqrts_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11825 .{ .tag = .__builtin_ve_vl_vfsubd_vsvl, .properties = .{ .param_str = "V256ddV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11826 .{ .tag = .__builtin_ve_vl_vfsubd_vsvmvl, .properties = .{ .param_str = "V256ddV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11827 .{ .tag = .__builtin_ve_vl_vfsubd_vsvvl, .properties = .{ .param_str = "V256ddV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11828 .{ .tag = .__builtin_ve_vl_vfsubd_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11829 .{ .tag = .__builtin_ve_vl_vfsubd_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11830 .{ .tag = .__builtin_ve_vl_vfsubd_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11831 .{ .tag = .__builtin_ve_vl_vfsubs_vsvl, .properties = .{ .param_str = "V256dfV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11832 .{ .tag = .__builtin_ve_vl_vfsubs_vsvmvl, .properties = .{ .param_str = "V256dfV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11833 .{ .tag = .__builtin_ve_vl_vfsubs_vsvvl, .properties = .{ .param_str = "V256dfV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11834 .{ .tag = .__builtin_ve_vl_vfsubs_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11835 .{ .tag = .__builtin_ve_vl_vfsubs_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11836 .{ .tag = .__builtin_ve_vl_vfsubs_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11837 .{ .tag = .__builtin_ve_vl_vfsumd_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11838 .{ .tag = .__builtin_ve_vl_vfsumd_vvml, .properties = .{ .param_str = "V256dV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11839 .{ .tag = .__builtin_ve_vl_vfsums_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11840 .{ .tag = .__builtin_ve_vl_vfsums_vvml, .properties = .{ .param_str = "V256dV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11841 .{ .tag = .__builtin_ve_vl_vgt_vvssl, .properties = .{ .param_str = "V256dV256dLUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11842 .{ .tag = .__builtin_ve_vl_vgt_vvssml, .properties = .{ .param_str = "V256dV256dLUiLUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11843 .{ .tag = .__builtin_ve_vl_vgt_vvssmvl, .properties = .{ .param_str = "V256dV256dLUiLUiV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11844 .{ .tag = .__builtin_ve_vl_vgt_vvssvl, .properties = .{ .param_str = "V256dV256dLUiLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11845 .{ .tag = .__builtin_ve_vl_vgtlsx_vvssl, .properties = .{ .param_str = "V256dV256dLUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11846 .{ .tag = .__builtin_ve_vl_vgtlsx_vvssml, .properties = .{ .param_str = "V256dV256dLUiLUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11847 .{ .tag = .__builtin_ve_vl_vgtlsx_vvssmvl, .properties = .{ .param_str = "V256dV256dLUiLUiV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11848 .{ .tag = .__builtin_ve_vl_vgtlsx_vvssvl, .properties = .{ .param_str = "V256dV256dLUiLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11849 .{ .tag = .__builtin_ve_vl_vgtlsxnc_vvssl, .properties = .{ .param_str = "V256dV256dLUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11850 .{ .tag = .__builtin_ve_vl_vgtlsxnc_vvssml, .properties = .{ .param_str = "V256dV256dLUiLUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11851 .{ .tag = .__builtin_ve_vl_vgtlsxnc_vvssmvl, .properties = .{ .param_str = "V256dV256dLUiLUiV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11852 .{ .tag = .__builtin_ve_vl_vgtlsxnc_vvssvl, .properties = .{ .param_str = "V256dV256dLUiLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11853 .{ .tag = .__builtin_ve_vl_vgtlzx_vvssl, .properties = .{ .param_str = "V256dV256dLUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11854 .{ .tag = .__builtin_ve_vl_vgtlzx_vvssml, .properties = .{ .param_str = "V256dV256dLUiLUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11855 .{ .tag = .__builtin_ve_vl_vgtlzx_vvssmvl, .properties = .{ .param_str = "V256dV256dLUiLUiV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11856 .{ .tag = .__builtin_ve_vl_vgtlzx_vvssvl, .properties = .{ .param_str = "V256dV256dLUiLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11857 .{ .tag = .__builtin_ve_vl_vgtlzxnc_vvssl, .properties = .{ .param_str = "V256dV256dLUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11858 .{ .tag = .__builtin_ve_vl_vgtlzxnc_vvssml, .properties = .{ .param_str = "V256dV256dLUiLUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11859 .{ .tag = .__builtin_ve_vl_vgtlzxnc_vvssmvl, .properties = .{ .param_str = "V256dV256dLUiLUiV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11860 .{ .tag = .__builtin_ve_vl_vgtlzxnc_vvssvl, .properties = .{ .param_str = "V256dV256dLUiLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11861 .{ .tag = .__builtin_ve_vl_vgtnc_vvssl, .properties = .{ .param_str = "V256dV256dLUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11862 .{ .tag = .__builtin_ve_vl_vgtnc_vvssml, .properties = .{ .param_str = "V256dV256dLUiLUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11863 .{ .tag = .__builtin_ve_vl_vgtnc_vvssmvl, .properties = .{ .param_str = "V256dV256dLUiLUiV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11864 .{ .tag = .__builtin_ve_vl_vgtnc_vvssvl, .properties = .{ .param_str = "V256dV256dLUiLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11865 .{ .tag = .__builtin_ve_vl_vgtu_vvssl, .properties = .{ .param_str = "V256dV256dLUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11866 .{ .tag = .__builtin_ve_vl_vgtu_vvssml, .properties = .{ .param_str = "V256dV256dLUiLUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11867 .{ .tag = .__builtin_ve_vl_vgtu_vvssmvl, .properties = .{ .param_str = "V256dV256dLUiLUiV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11868 .{ .tag = .__builtin_ve_vl_vgtu_vvssvl, .properties = .{ .param_str = "V256dV256dLUiLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11869 .{ .tag = .__builtin_ve_vl_vgtunc_vvssl, .properties = .{ .param_str = "V256dV256dLUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11870 .{ .tag = .__builtin_ve_vl_vgtunc_vvssml, .properties = .{ .param_str = "V256dV256dLUiLUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11871 .{ .tag = .__builtin_ve_vl_vgtunc_vvssmvl, .properties = .{ .param_str = "V256dV256dLUiLUiV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11872 .{ .tag = .__builtin_ve_vl_vgtunc_vvssvl, .properties = .{ .param_str = "V256dV256dLUiLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11873 .{ .tag = .__builtin_ve_vl_vld2d_vssl, .properties = .{ .param_str = "V256dLUivC*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
11874 .{ .tag = .__builtin_ve_vl_vld2d_vssvl, .properties = .{ .param_str = "V256dLUivC*V256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11875 .{ .tag = .__builtin_ve_vl_vld2dnc_vssl, .properties = .{ .param_str = "V256dLUivC*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
11876 .{ .tag = .__builtin_ve_vl_vld2dnc_vssvl, .properties = .{ .param_str = "V256dLUivC*V256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11877 .{ .tag = .__builtin_ve_vl_vld_vssl, .properties = .{ .param_str = "V256dLUivC*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
11878 .{ .tag = .__builtin_ve_vl_vld_vssvl, .properties = .{ .param_str = "V256dLUivC*V256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11879 .{ .tag = .__builtin_ve_vl_vldl2dsx_vssl, .properties = .{ .param_str = "V256dLUivC*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
11880 .{ .tag = .__builtin_ve_vl_vldl2dsx_vssvl, .properties = .{ .param_str = "V256dLUivC*V256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11881 .{ .tag = .__builtin_ve_vl_vldl2dsxnc_vssl, .properties = .{ .param_str = "V256dLUivC*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
11882 .{ .tag = .__builtin_ve_vl_vldl2dsxnc_vssvl, .properties = .{ .param_str = "V256dLUivC*V256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11883 .{ .tag = .__builtin_ve_vl_vldl2dzx_vssl, .properties = .{ .param_str = "V256dLUivC*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
11884 .{ .tag = .__builtin_ve_vl_vldl2dzx_vssvl, .properties = .{ .param_str = "V256dLUivC*V256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11885 .{ .tag = .__builtin_ve_vl_vldl2dzxnc_vssl, .properties = .{ .param_str = "V256dLUivC*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
11886 .{ .tag = .__builtin_ve_vl_vldl2dzxnc_vssvl, .properties = .{ .param_str = "V256dLUivC*V256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11887 .{ .tag = .__builtin_ve_vl_vldlsx_vssl, .properties = .{ .param_str = "V256dLUivC*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
11888 .{ .tag = .__builtin_ve_vl_vldlsx_vssvl, .properties = .{ .param_str = "V256dLUivC*V256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11889 .{ .tag = .__builtin_ve_vl_vldlsxnc_vssl, .properties = .{ .param_str = "V256dLUivC*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
11890 .{ .tag = .__builtin_ve_vl_vldlsxnc_vssvl, .properties = .{ .param_str = "V256dLUivC*V256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11891 .{ .tag = .__builtin_ve_vl_vldlzx_vssl, .properties = .{ .param_str = "V256dLUivC*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
11892 .{ .tag = .__builtin_ve_vl_vldlzx_vssvl, .properties = .{ .param_str = "V256dLUivC*V256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11893 .{ .tag = .__builtin_ve_vl_vldlzxnc_vssl, .properties = .{ .param_str = "V256dLUivC*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
11894 .{ .tag = .__builtin_ve_vl_vldlzxnc_vssvl, .properties = .{ .param_str = "V256dLUivC*V256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11895 .{ .tag = .__builtin_ve_vl_vldnc_vssl, .properties = .{ .param_str = "V256dLUivC*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
11896 .{ .tag = .__builtin_ve_vl_vldnc_vssvl, .properties = .{ .param_str = "V256dLUivC*V256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11897 .{ .tag = .__builtin_ve_vl_vldu2d_vssl, .properties = .{ .param_str = "V256dLUivC*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
11898 .{ .tag = .__builtin_ve_vl_vldu2d_vssvl, .properties = .{ .param_str = "V256dLUivC*V256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11899 .{ .tag = .__builtin_ve_vl_vldu2dnc_vssl, .properties = .{ .param_str = "V256dLUivC*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
11900 .{ .tag = .__builtin_ve_vl_vldu2dnc_vssvl, .properties = .{ .param_str = "V256dLUivC*V256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11901 .{ .tag = .__builtin_ve_vl_vldu_vssl, .properties = .{ .param_str = "V256dLUivC*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
11902 .{ .tag = .__builtin_ve_vl_vldu_vssvl, .properties = .{ .param_str = "V256dLUivC*V256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11903 .{ .tag = .__builtin_ve_vl_vldunc_vssl, .properties = .{ .param_str = "V256dLUivC*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
11904 .{ .tag = .__builtin_ve_vl_vldunc_vssvl, .properties = .{ .param_str = "V256dLUivC*V256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11905 .{ .tag = .__builtin_ve_vl_vldz_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11906 .{ .tag = .__builtin_ve_vl_vldz_vvmvl, .properties = .{ .param_str = "V256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11907 .{ .tag = .__builtin_ve_vl_vldz_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11908 .{ .tag = .__builtin_ve_vl_vmaxsl_vsvl, .properties = .{ .param_str = "V256dLiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11909 .{ .tag = .__builtin_ve_vl_vmaxsl_vsvmvl, .properties = .{ .param_str = "V256dLiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11910 .{ .tag = .__builtin_ve_vl_vmaxsl_vsvvl, .properties = .{ .param_str = "V256dLiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11911 .{ .tag = .__builtin_ve_vl_vmaxsl_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11912 .{ .tag = .__builtin_ve_vl_vmaxsl_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11913 .{ .tag = .__builtin_ve_vl_vmaxsl_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11914 .{ .tag = .__builtin_ve_vl_vmaxswsx_vsvl, .properties = .{ .param_str = "V256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11915 .{ .tag = .__builtin_ve_vl_vmaxswsx_vsvmvl, .properties = .{ .param_str = "V256diV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11916 .{ .tag = .__builtin_ve_vl_vmaxswsx_vsvvl, .properties = .{ .param_str = "V256diV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11917 .{ .tag = .__builtin_ve_vl_vmaxswsx_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11918 .{ .tag = .__builtin_ve_vl_vmaxswsx_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11919 .{ .tag = .__builtin_ve_vl_vmaxswsx_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11920 .{ .tag = .__builtin_ve_vl_vmaxswzx_vsvl, .properties = .{ .param_str = "V256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11921 .{ .tag = .__builtin_ve_vl_vmaxswzx_vsvmvl, .properties = .{ .param_str = "V256diV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11922 .{ .tag = .__builtin_ve_vl_vmaxswzx_vsvvl, .properties = .{ .param_str = "V256diV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11923 .{ .tag = .__builtin_ve_vl_vmaxswzx_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11924 .{ .tag = .__builtin_ve_vl_vmaxswzx_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11925 .{ .tag = .__builtin_ve_vl_vmaxswzx_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11926 .{ .tag = .__builtin_ve_vl_vminsl_vsvl, .properties = .{ .param_str = "V256dLiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11927 .{ .tag = .__builtin_ve_vl_vminsl_vsvmvl, .properties = .{ .param_str = "V256dLiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11928 .{ .tag = .__builtin_ve_vl_vminsl_vsvvl, .properties = .{ .param_str = "V256dLiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11929 .{ .tag = .__builtin_ve_vl_vminsl_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11930 .{ .tag = .__builtin_ve_vl_vminsl_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11931 .{ .tag = .__builtin_ve_vl_vminsl_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11932 .{ .tag = .__builtin_ve_vl_vminswsx_vsvl, .properties = .{ .param_str = "V256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11933 .{ .tag = .__builtin_ve_vl_vminswsx_vsvmvl, .properties = .{ .param_str = "V256diV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11934 .{ .tag = .__builtin_ve_vl_vminswsx_vsvvl, .properties = .{ .param_str = "V256diV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11935 .{ .tag = .__builtin_ve_vl_vminswsx_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11936 .{ .tag = .__builtin_ve_vl_vminswsx_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11937 .{ .tag = .__builtin_ve_vl_vminswsx_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11938 .{ .tag = .__builtin_ve_vl_vminswzx_vsvl, .properties = .{ .param_str = "V256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11939 .{ .tag = .__builtin_ve_vl_vminswzx_vsvmvl, .properties = .{ .param_str = "V256diV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11940 .{ .tag = .__builtin_ve_vl_vminswzx_vsvvl, .properties = .{ .param_str = "V256diV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11941 .{ .tag = .__builtin_ve_vl_vminswzx_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11942 .{ .tag = .__builtin_ve_vl_vminswzx_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11943 .{ .tag = .__builtin_ve_vl_vminswzx_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11944 .{ .tag = .__builtin_ve_vl_vmrg_vsvml, .properties = .{ .param_str = "V256dLUiV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11945 .{ .tag = .__builtin_ve_vl_vmrg_vsvmvl, .properties = .{ .param_str = "V256dLUiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11946 .{ .tag = .__builtin_ve_vl_vmrg_vvvml, .properties = .{ .param_str = "V256dV256dV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11947 .{ .tag = .__builtin_ve_vl_vmrg_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11948 .{ .tag = .__builtin_ve_vl_vmrgw_vsvMl, .properties = .{ .param_str = "V256dUiV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11949 .{ .tag = .__builtin_ve_vl_vmrgw_vsvMvl, .properties = .{ .param_str = "V256dUiV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11950 .{ .tag = .__builtin_ve_vl_vmrgw_vvvMl, .properties = .{ .param_str = "V256dV256dV256dV512bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11951 .{ .tag = .__builtin_ve_vl_vmrgw_vvvMvl, .properties = .{ .param_str = "V256dV256dV256dV512bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11952 .{ .tag = .__builtin_ve_vl_vmulsl_vsvl, .properties = .{ .param_str = "V256dLiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11953 .{ .tag = .__builtin_ve_vl_vmulsl_vsvmvl, .properties = .{ .param_str = "V256dLiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11954 .{ .tag = .__builtin_ve_vl_vmulsl_vsvvl, .properties = .{ .param_str = "V256dLiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11955 .{ .tag = .__builtin_ve_vl_vmulsl_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11956 .{ .tag = .__builtin_ve_vl_vmulsl_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11957 .{ .tag = .__builtin_ve_vl_vmulsl_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11958 .{ .tag = .__builtin_ve_vl_vmulslw_vsvl, .properties = .{ .param_str = "V256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11959 .{ .tag = .__builtin_ve_vl_vmulslw_vsvvl, .properties = .{ .param_str = "V256diV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11960 .{ .tag = .__builtin_ve_vl_vmulslw_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11961 .{ .tag = .__builtin_ve_vl_vmulslw_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11962 .{ .tag = .__builtin_ve_vl_vmulswsx_vsvl, .properties = .{ .param_str = "V256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11963 .{ .tag = .__builtin_ve_vl_vmulswsx_vsvmvl, .properties = .{ .param_str = "V256diV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11964 .{ .tag = .__builtin_ve_vl_vmulswsx_vsvvl, .properties = .{ .param_str = "V256diV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11965 .{ .tag = .__builtin_ve_vl_vmulswsx_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11966 .{ .tag = .__builtin_ve_vl_vmulswsx_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11967 .{ .tag = .__builtin_ve_vl_vmulswsx_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11968 .{ .tag = .__builtin_ve_vl_vmulswzx_vsvl, .properties = .{ .param_str = "V256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11969 .{ .tag = .__builtin_ve_vl_vmulswzx_vsvmvl, .properties = .{ .param_str = "V256diV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11970 .{ .tag = .__builtin_ve_vl_vmulswzx_vsvvl, .properties = .{ .param_str = "V256diV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11971 .{ .tag = .__builtin_ve_vl_vmulswzx_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11972 .{ .tag = .__builtin_ve_vl_vmulswzx_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11973 .{ .tag = .__builtin_ve_vl_vmulswzx_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11974 .{ .tag = .__builtin_ve_vl_vmulul_vsvl, .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11975 .{ .tag = .__builtin_ve_vl_vmulul_vsvmvl, .properties = .{ .param_str = "V256dLUiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11976 .{ .tag = .__builtin_ve_vl_vmulul_vsvvl, .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11977 .{ .tag = .__builtin_ve_vl_vmulul_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11978 .{ .tag = .__builtin_ve_vl_vmulul_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11979 .{ .tag = .__builtin_ve_vl_vmulul_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11980 .{ .tag = .__builtin_ve_vl_vmuluw_vsvl, .properties = .{ .param_str = "V256dUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11981 .{ .tag = .__builtin_ve_vl_vmuluw_vsvmvl, .properties = .{ .param_str = "V256dUiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11982 .{ .tag = .__builtin_ve_vl_vmuluw_vsvvl, .properties = .{ .param_str = "V256dUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11983 .{ .tag = .__builtin_ve_vl_vmuluw_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11984 .{ .tag = .__builtin_ve_vl_vmuluw_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11985 .{ .tag = .__builtin_ve_vl_vmuluw_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11986 .{ .tag = .__builtin_ve_vl_vmv_vsvl, .properties = .{ .param_str = "V256dUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11987 .{ .tag = .__builtin_ve_vl_vmv_vsvmvl, .properties = .{ .param_str = "V256dUiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11988 .{ .tag = .__builtin_ve_vl_vmv_vsvvl, .properties = .{ .param_str = "V256dUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11989 .{ .tag = .__builtin_ve_vl_vor_vsvl, .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11990 .{ .tag = .__builtin_ve_vl_vor_vsvmvl, .properties = .{ .param_str = "V256dLUiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11991 .{ .tag = .__builtin_ve_vl_vor_vsvvl, .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11992 .{ .tag = .__builtin_ve_vl_vor_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11993 .{ .tag = .__builtin_ve_vl_vor_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11994 .{ .tag = .__builtin_ve_vl_vor_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11995 .{ .tag = .__builtin_ve_vl_vpcnt_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11996 .{ .tag = .__builtin_ve_vl_vpcnt_vvmvl, .properties = .{ .param_str = "V256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11997 .{ .tag = .__builtin_ve_vl_vpcnt_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11998 .{ .tag = .__builtin_ve_vl_vrand_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
11999 .{ .tag = .__builtin_ve_vl_vrand_vvml, .properties = .{ .param_str = "V256dV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12000 .{ .tag = .__builtin_ve_vl_vrcpd_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12001 .{ .tag = .__builtin_ve_vl_vrcpd_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12002 .{ .tag = .__builtin_ve_vl_vrcps_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12003 .{ .tag = .__builtin_ve_vl_vrcps_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12004 .{ .tag = .__builtin_ve_vl_vrmaxslfst_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12005 .{ .tag = .__builtin_ve_vl_vrmaxslfst_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12006 .{ .tag = .__builtin_ve_vl_vrmaxsllst_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12007 .{ .tag = .__builtin_ve_vl_vrmaxsllst_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12008 .{ .tag = .__builtin_ve_vl_vrmaxswfstsx_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12009 .{ .tag = .__builtin_ve_vl_vrmaxswfstsx_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12010 .{ .tag = .__builtin_ve_vl_vrmaxswfstzx_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12011 .{ .tag = .__builtin_ve_vl_vrmaxswfstzx_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12012 .{ .tag = .__builtin_ve_vl_vrmaxswlstsx_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12013 .{ .tag = .__builtin_ve_vl_vrmaxswlstsx_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12014 .{ .tag = .__builtin_ve_vl_vrmaxswlstzx_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12015 .{ .tag = .__builtin_ve_vl_vrmaxswlstzx_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12016 .{ .tag = .__builtin_ve_vl_vrminslfst_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12017 .{ .tag = .__builtin_ve_vl_vrminslfst_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12018 .{ .tag = .__builtin_ve_vl_vrminsllst_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12019 .{ .tag = .__builtin_ve_vl_vrminsllst_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12020 .{ .tag = .__builtin_ve_vl_vrminswfstsx_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12021 .{ .tag = .__builtin_ve_vl_vrminswfstsx_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12022 .{ .tag = .__builtin_ve_vl_vrminswfstzx_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12023 .{ .tag = .__builtin_ve_vl_vrminswfstzx_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12024 .{ .tag = .__builtin_ve_vl_vrminswlstsx_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12025 .{ .tag = .__builtin_ve_vl_vrminswlstsx_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12026 .{ .tag = .__builtin_ve_vl_vrminswlstzx_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12027 .{ .tag = .__builtin_ve_vl_vrminswlstzx_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12028 .{ .tag = .__builtin_ve_vl_vror_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12029 .{ .tag = .__builtin_ve_vl_vror_vvml, .properties = .{ .param_str = "V256dV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12030 .{ .tag = .__builtin_ve_vl_vrsqrtd_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12031 .{ .tag = .__builtin_ve_vl_vrsqrtd_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12032 .{ .tag = .__builtin_ve_vl_vrsqrtdnex_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12033 .{ .tag = .__builtin_ve_vl_vrsqrtdnex_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12034 .{ .tag = .__builtin_ve_vl_vrsqrts_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12035 .{ .tag = .__builtin_ve_vl_vrsqrts_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12036 .{ .tag = .__builtin_ve_vl_vrsqrtsnex_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12037 .{ .tag = .__builtin_ve_vl_vrsqrtsnex_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12038 .{ .tag = .__builtin_ve_vl_vrxor_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12039 .{ .tag = .__builtin_ve_vl_vrxor_vvml, .properties = .{ .param_str = "V256dV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12040 .{ .tag = .__builtin_ve_vl_vsc_vvssl, .properties = .{ .param_str = "vV256dV256dLUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12041 .{ .tag = .__builtin_ve_vl_vsc_vvssml, .properties = .{ .param_str = "vV256dV256dLUiLUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12042 .{ .tag = .__builtin_ve_vl_vscl_vvssl, .properties = .{ .param_str = "vV256dV256dLUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12043 .{ .tag = .__builtin_ve_vl_vscl_vvssml, .properties = .{ .param_str = "vV256dV256dLUiLUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12044 .{ .tag = .__builtin_ve_vl_vsclnc_vvssl, .properties = .{ .param_str = "vV256dV256dLUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12045 .{ .tag = .__builtin_ve_vl_vsclnc_vvssml, .properties = .{ .param_str = "vV256dV256dLUiLUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12046 .{ .tag = .__builtin_ve_vl_vsclncot_vvssl, .properties = .{ .param_str = "vV256dV256dLUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12047 .{ .tag = .__builtin_ve_vl_vsclncot_vvssml, .properties = .{ .param_str = "vV256dV256dLUiLUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12048 .{ .tag = .__builtin_ve_vl_vsclot_vvssl, .properties = .{ .param_str = "vV256dV256dLUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12049 .{ .tag = .__builtin_ve_vl_vsclot_vvssml, .properties = .{ .param_str = "vV256dV256dLUiLUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12050 .{ .tag = .__builtin_ve_vl_vscnc_vvssl, .properties = .{ .param_str = "vV256dV256dLUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12051 .{ .tag = .__builtin_ve_vl_vscnc_vvssml, .properties = .{ .param_str = "vV256dV256dLUiLUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12052 .{ .tag = .__builtin_ve_vl_vscncot_vvssl, .properties = .{ .param_str = "vV256dV256dLUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12053 .{ .tag = .__builtin_ve_vl_vscncot_vvssml, .properties = .{ .param_str = "vV256dV256dLUiLUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12054 .{ .tag = .__builtin_ve_vl_vscot_vvssl, .properties = .{ .param_str = "vV256dV256dLUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12055 .{ .tag = .__builtin_ve_vl_vscot_vvssml, .properties = .{ .param_str = "vV256dV256dLUiLUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12056 .{ .tag = .__builtin_ve_vl_vscu_vvssl, .properties = .{ .param_str = "vV256dV256dLUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12057 .{ .tag = .__builtin_ve_vl_vscu_vvssml, .properties = .{ .param_str = "vV256dV256dLUiLUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12058 .{ .tag = .__builtin_ve_vl_vscunc_vvssl, .properties = .{ .param_str = "vV256dV256dLUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12059 .{ .tag = .__builtin_ve_vl_vscunc_vvssml, .properties = .{ .param_str = "vV256dV256dLUiLUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12060 .{ .tag = .__builtin_ve_vl_vscuncot_vvssl, .properties = .{ .param_str = "vV256dV256dLUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12061 .{ .tag = .__builtin_ve_vl_vscuncot_vvssml, .properties = .{ .param_str = "vV256dV256dLUiLUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12062 .{ .tag = .__builtin_ve_vl_vscuot_vvssl, .properties = .{ .param_str = "vV256dV256dLUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12063 .{ .tag = .__builtin_ve_vl_vscuot_vvssml, .properties = .{ .param_str = "vV256dV256dLUiLUiV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12064 .{ .tag = .__builtin_ve_vl_vseq_vl, .properties = .{ .param_str = "V256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12065 .{ .tag = .__builtin_ve_vl_vseq_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12066 .{ .tag = .__builtin_ve_vl_vsfa_vvssl, .properties = .{ .param_str = "V256dV256dLUiLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12067 .{ .tag = .__builtin_ve_vl_vsfa_vvssmvl, .properties = .{ .param_str = "V256dV256dLUiLUiV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12068 .{ .tag = .__builtin_ve_vl_vsfa_vvssvl, .properties = .{ .param_str = "V256dV256dLUiLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12069 .{ .tag = .__builtin_ve_vl_vshf_vvvsl, .properties = .{ .param_str = "V256dV256dV256dLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12070 .{ .tag = .__builtin_ve_vl_vshf_vvvsvl, .properties = .{ .param_str = "V256dV256dV256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12071 .{ .tag = .__builtin_ve_vl_vslal_vvsl, .properties = .{ .param_str = "V256dV256dLiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12072 .{ .tag = .__builtin_ve_vl_vslal_vvsmvl, .properties = .{ .param_str = "V256dV256dLiV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12073 .{ .tag = .__builtin_ve_vl_vslal_vvsvl, .properties = .{ .param_str = "V256dV256dLiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12074 .{ .tag = .__builtin_ve_vl_vslal_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12075 .{ .tag = .__builtin_ve_vl_vslal_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12076 .{ .tag = .__builtin_ve_vl_vslal_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12077 .{ .tag = .__builtin_ve_vl_vslawsx_vvsl, .properties = .{ .param_str = "V256dV256diUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12078 .{ .tag = .__builtin_ve_vl_vslawsx_vvsmvl, .properties = .{ .param_str = "V256dV256diV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12079 .{ .tag = .__builtin_ve_vl_vslawsx_vvsvl, .properties = .{ .param_str = "V256dV256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12080 .{ .tag = .__builtin_ve_vl_vslawsx_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12081 .{ .tag = .__builtin_ve_vl_vslawsx_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12082 .{ .tag = .__builtin_ve_vl_vslawsx_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12083 .{ .tag = .__builtin_ve_vl_vslawzx_vvsl, .properties = .{ .param_str = "V256dV256diUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12084 .{ .tag = .__builtin_ve_vl_vslawzx_vvsmvl, .properties = .{ .param_str = "V256dV256diV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12085 .{ .tag = .__builtin_ve_vl_vslawzx_vvsvl, .properties = .{ .param_str = "V256dV256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12086 .{ .tag = .__builtin_ve_vl_vslawzx_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12087 .{ .tag = .__builtin_ve_vl_vslawzx_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12088 .{ .tag = .__builtin_ve_vl_vslawzx_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12089 .{ .tag = .__builtin_ve_vl_vsll_vvsl, .properties = .{ .param_str = "V256dV256dLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12090 .{ .tag = .__builtin_ve_vl_vsll_vvsmvl, .properties = .{ .param_str = "V256dV256dLUiV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12091 .{ .tag = .__builtin_ve_vl_vsll_vvsvl, .properties = .{ .param_str = "V256dV256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12092 .{ .tag = .__builtin_ve_vl_vsll_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12093 .{ .tag = .__builtin_ve_vl_vsll_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12094 .{ .tag = .__builtin_ve_vl_vsll_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12095 .{ .tag = .__builtin_ve_vl_vsral_vvsl, .properties = .{ .param_str = "V256dV256dLiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12096 .{ .tag = .__builtin_ve_vl_vsral_vvsmvl, .properties = .{ .param_str = "V256dV256dLiV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12097 .{ .tag = .__builtin_ve_vl_vsral_vvsvl, .properties = .{ .param_str = "V256dV256dLiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12098 .{ .tag = .__builtin_ve_vl_vsral_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12099 .{ .tag = .__builtin_ve_vl_vsral_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12100 .{ .tag = .__builtin_ve_vl_vsral_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12101 .{ .tag = .__builtin_ve_vl_vsrawsx_vvsl, .properties = .{ .param_str = "V256dV256diUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12102 .{ .tag = .__builtin_ve_vl_vsrawsx_vvsmvl, .properties = .{ .param_str = "V256dV256diV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12103 .{ .tag = .__builtin_ve_vl_vsrawsx_vvsvl, .properties = .{ .param_str = "V256dV256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12104 .{ .tag = .__builtin_ve_vl_vsrawsx_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12105 .{ .tag = .__builtin_ve_vl_vsrawsx_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12106 .{ .tag = .__builtin_ve_vl_vsrawsx_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12107 .{ .tag = .__builtin_ve_vl_vsrawzx_vvsl, .properties = .{ .param_str = "V256dV256diUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12108 .{ .tag = .__builtin_ve_vl_vsrawzx_vvsmvl, .properties = .{ .param_str = "V256dV256diV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12109 .{ .tag = .__builtin_ve_vl_vsrawzx_vvsvl, .properties = .{ .param_str = "V256dV256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12110 .{ .tag = .__builtin_ve_vl_vsrawzx_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12111 .{ .tag = .__builtin_ve_vl_vsrawzx_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12112 .{ .tag = .__builtin_ve_vl_vsrawzx_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12113 .{ .tag = .__builtin_ve_vl_vsrl_vvsl, .properties = .{ .param_str = "V256dV256dLUiUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12114 .{ .tag = .__builtin_ve_vl_vsrl_vvsmvl, .properties = .{ .param_str = "V256dV256dLUiV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12115 .{ .tag = .__builtin_ve_vl_vsrl_vvsvl, .properties = .{ .param_str = "V256dV256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12116 .{ .tag = .__builtin_ve_vl_vsrl_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12117 .{ .tag = .__builtin_ve_vl_vsrl_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12118 .{ .tag = .__builtin_ve_vl_vsrl_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12119 .{ .tag = .__builtin_ve_vl_vst2d_vssl, .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
12120 .{ .tag = .__builtin_ve_vl_vst2d_vssml, .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12121 .{ .tag = .__builtin_ve_vl_vst2dnc_vssl, .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
12122 .{ .tag = .__builtin_ve_vl_vst2dnc_vssml, .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12123 .{ .tag = .__builtin_ve_vl_vst2dncot_vssl, .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
12124 .{ .tag = .__builtin_ve_vl_vst2dncot_vssml, .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12125 .{ .tag = .__builtin_ve_vl_vst2dot_vssl, .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
12126 .{ .tag = .__builtin_ve_vl_vst2dot_vssml, .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12127 .{ .tag = .__builtin_ve_vl_vst_vssl, .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
12128 .{ .tag = .__builtin_ve_vl_vst_vssml, .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12129 .{ .tag = .__builtin_ve_vl_vstl2d_vssl, .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
12130 .{ .tag = .__builtin_ve_vl_vstl2d_vssml, .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12131 .{ .tag = .__builtin_ve_vl_vstl2dnc_vssl, .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
12132 .{ .tag = .__builtin_ve_vl_vstl2dnc_vssml, .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12133 .{ .tag = .__builtin_ve_vl_vstl2dncot_vssl, .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
12134 .{ .tag = .__builtin_ve_vl_vstl2dncot_vssml, .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12135 .{ .tag = .__builtin_ve_vl_vstl2dot_vssl, .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
12136 .{ .tag = .__builtin_ve_vl_vstl2dot_vssml, .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12137 .{ .tag = .__builtin_ve_vl_vstl_vssl, .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
12138 .{ .tag = .__builtin_ve_vl_vstl_vssml, .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12139 .{ .tag = .__builtin_ve_vl_vstlnc_vssl, .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
12140 .{ .tag = .__builtin_ve_vl_vstlnc_vssml, .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12141 .{ .tag = .__builtin_ve_vl_vstlncot_vssl, .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
12142 .{ .tag = .__builtin_ve_vl_vstlncot_vssml, .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12143 .{ .tag = .__builtin_ve_vl_vstlot_vssl, .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
12144 .{ .tag = .__builtin_ve_vl_vstlot_vssml, .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12145 .{ .tag = .__builtin_ve_vl_vstnc_vssl, .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
12146 .{ .tag = .__builtin_ve_vl_vstnc_vssml, .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12147 .{ .tag = .__builtin_ve_vl_vstncot_vssl, .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
12148 .{ .tag = .__builtin_ve_vl_vstncot_vssml, .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12149 .{ .tag = .__builtin_ve_vl_vstot_vssl, .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
12150 .{ .tag = .__builtin_ve_vl_vstot_vssml, .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12151 .{ .tag = .__builtin_ve_vl_vstu2d_vssl, .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
12152 .{ .tag = .__builtin_ve_vl_vstu2d_vssml, .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12153 .{ .tag = .__builtin_ve_vl_vstu2dnc_vssl, .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
12154 .{ .tag = .__builtin_ve_vl_vstu2dnc_vssml, .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12155 .{ .tag = .__builtin_ve_vl_vstu2dncot_vssl, .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
12156 .{ .tag = .__builtin_ve_vl_vstu2dncot_vssml, .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12157 .{ .tag = .__builtin_ve_vl_vstu2dot_vssl, .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
12158 .{ .tag = .__builtin_ve_vl_vstu2dot_vssml, .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12159 .{ .tag = .__builtin_ve_vl_vstu_vssl, .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
12160 .{ .tag = .__builtin_ve_vl_vstu_vssml, .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12161 .{ .tag = .__builtin_ve_vl_vstunc_vssl, .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
12162 .{ .tag = .__builtin_ve_vl_vstunc_vssml, .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12163 .{ .tag = .__builtin_ve_vl_vstuncot_vssl, .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
12164 .{ .tag = .__builtin_ve_vl_vstuncot_vssml, .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12165 .{ .tag = .__builtin_ve_vl_vstuot_vssl, .properties = .{ .param_str = "vV256dLUiv*Ui", .target_set = TargetSet.initOne(.vevl_gen) } },
12166 .{ .tag = .__builtin_ve_vl_vstuot_vssml, .properties = .{ .param_str = "vV256dLUiv*V256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12167 .{ .tag = .__builtin_ve_vl_vsubsl_vsvl, .properties = .{ .param_str = "V256dLiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12168 .{ .tag = .__builtin_ve_vl_vsubsl_vsvmvl, .properties = .{ .param_str = "V256dLiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12169 .{ .tag = .__builtin_ve_vl_vsubsl_vsvvl, .properties = .{ .param_str = "V256dLiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12170 .{ .tag = .__builtin_ve_vl_vsubsl_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12171 .{ .tag = .__builtin_ve_vl_vsubsl_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12172 .{ .tag = .__builtin_ve_vl_vsubsl_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12173 .{ .tag = .__builtin_ve_vl_vsubswsx_vsvl, .properties = .{ .param_str = "V256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12174 .{ .tag = .__builtin_ve_vl_vsubswsx_vsvmvl, .properties = .{ .param_str = "V256diV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12175 .{ .tag = .__builtin_ve_vl_vsubswsx_vsvvl, .properties = .{ .param_str = "V256diV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12176 .{ .tag = .__builtin_ve_vl_vsubswsx_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12177 .{ .tag = .__builtin_ve_vl_vsubswsx_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12178 .{ .tag = .__builtin_ve_vl_vsubswsx_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12179 .{ .tag = .__builtin_ve_vl_vsubswzx_vsvl, .properties = .{ .param_str = "V256diV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12180 .{ .tag = .__builtin_ve_vl_vsubswzx_vsvmvl, .properties = .{ .param_str = "V256diV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12181 .{ .tag = .__builtin_ve_vl_vsubswzx_vsvvl, .properties = .{ .param_str = "V256diV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12182 .{ .tag = .__builtin_ve_vl_vsubswzx_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12183 .{ .tag = .__builtin_ve_vl_vsubswzx_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12184 .{ .tag = .__builtin_ve_vl_vsubswzx_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12185 .{ .tag = .__builtin_ve_vl_vsubul_vsvl, .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12186 .{ .tag = .__builtin_ve_vl_vsubul_vsvmvl, .properties = .{ .param_str = "V256dLUiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12187 .{ .tag = .__builtin_ve_vl_vsubul_vsvvl, .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12188 .{ .tag = .__builtin_ve_vl_vsubul_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12189 .{ .tag = .__builtin_ve_vl_vsubul_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12190 .{ .tag = .__builtin_ve_vl_vsubul_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12191 .{ .tag = .__builtin_ve_vl_vsubuw_vsvl, .properties = .{ .param_str = "V256dUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12192 .{ .tag = .__builtin_ve_vl_vsubuw_vsvmvl, .properties = .{ .param_str = "V256dUiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12193 .{ .tag = .__builtin_ve_vl_vsubuw_vsvvl, .properties = .{ .param_str = "V256dUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12194 .{ .tag = .__builtin_ve_vl_vsubuw_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12195 .{ .tag = .__builtin_ve_vl_vsubuw_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12196 .{ .tag = .__builtin_ve_vl_vsubuw_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12197 .{ .tag = .__builtin_ve_vl_vsuml_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12198 .{ .tag = .__builtin_ve_vl_vsuml_vvml, .properties = .{ .param_str = "V256dV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12199 .{ .tag = .__builtin_ve_vl_vsumwsx_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12200 .{ .tag = .__builtin_ve_vl_vsumwsx_vvml, .properties = .{ .param_str = "V256dV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12201 .{ .tag = .__builtin_ve_vl_vsumwzx_vvl, .properties = .{ .param_str = "V256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12202 .{ .tag = .__builtin_ve_vl_vsumwzx_vvml, .properties = .{ .param_str = "V256dV256dV256bUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12203 .{ .tag = .__builtin_ve_vl_vxor_vsvl, .properties = .{ .param_str = "V256dLUiV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12204 .{ .tag = .__builtin_ve_vl_vxor_vsvmvl, .properties = .{ .param_str = "V256dLUiV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12205 .{ .tag = .__builtin_ve_vl_vxor_vsvvl, .properties = .{ .param_str = "V256dLUiV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12206 .{ .tag = .__builtin_ve_vl_vxor_vvvl, .properties = .{ .param_str = "V256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12207 .{ .tag = .__builtin_ve_vl_vxor_vvvmvl, .properties = .{ .param_str = "V256dV256dV256dV256bV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12208 .{ .tag = .__builtin_ve_vl_vxor_vvvvl, .properties = .{ .param_str = "V256dV256dV256dV256dUi", .target_set = TargetSet.initOne(.vevl_gen) } },
12209 .{ .tag = .__builtin_ve_vl_xorm_MMM, .properties = .{ .param_str = "V512bV512bV512b", .target_set = TargetSet.initOne(.vevl_gen) } },
12210 .{ .tag = .__builtin_ve_vl_xorm_mmm, .properties = .{ .param_str = "V256bV256bV256b", .target_set = TargetSet.initOne(.vevl_gen) } },
12211 .{ .tag = .__builtin_vfprintf, .properties = .{ .param_str = "iP*RcC*Ra", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vprintf, .format_string_position = 1 } } },
12212 .{ .tag = .__builtin_vfscanf, .properties = .{ .param_str = "iP*RcC*Ra", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vscanf, .format_string_position = 1 } } },
12213 .{ .tag = .__builtin_vprintf, .properties = .{ .param_str = "icC*Ra", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vprintf } } },
12214 .{ .tag = .__builtin_vscanf, .properties = .{ .param_str = "icC*Ra", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vscanf } } },
12215 .{ .tag = .__builtin_vsnprintf, .properties = .{ .param_str = "ic*RzcC*Ra", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vprintf, .format_string_position = 2 } } },
12216 .{ .tag = .__builtin_vsprintf, .properties = .{ .param_str = "ic*RcC*Ra", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vprintf, .format_string_position = 1 } } },
12217 .{ .tag = .__builtin_vsscanf, .properties = .{ .param_str = "icC*RcC*Ra", .attributes = .{ .lib_function_with_builtin_prefix = true, .format_kind = .vscanf, .format_string_position = 1 } } },
12218 .{ .tag = .__builtin_wasm_max_f32, .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.webassembly), .attributes = .{ .@"const" = true } } },
12219 .{ .tag = .__builtin_wasm_max_f64, .properties = .{ .param_str = "ddd", .target_set = TargetSet.initOne(.webassembly), .attributes = .{ .@"const" = true } } },
12220 .{ .tag = .__builtin_wasm_memory_grow, .properties = .{ .param_str = "zIiz", .target_set = TargetSet.initOne(.webassembly) } },
12221 .{ .tag = .__builtin_wasm_memory_size, .properties = .{ .param_str = "zIi", .target_set = TargetSet.initOne(.webassembly) } },
12222 .{ .tag = .__builtin_wasm_min_f32, .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.webassembly), .attributes = .{ .@"const" = true } } },
12223 .{ .tag = .__builtin_wasm_min_f64, .properties = .{ .param_str = "ddd", .target_set = TargetSet.initOne(.webassembly), .attributes = .{ .@"const" = true } } },
12224 .{ .tag = .__builtin_wasm_trunc_s_i32_f32, .properties = .{ .param_str = "if", .target_set = TargetSet.initOne(.webassembly), .attributes = .{ .@"const" = true } } },
12225 .{ .tag = .__builtin_wasm_trunc_s_i32_f64, .properties = .{ .param_str = "id", .target_set = TargetSet.initOne(.webassembly), .attributes = .{ .@"const" = true } } },
12226 .{ .tag = .__builtin_wasm_trunc_s_i64_f32, .properties = .{ .param_str = "LLif", .target_set = TargetSet.initOne(.webassembly), .attributes = .{ .@"const" = true } } },
12227 .{ .tag = .__builtin_wasm_trunc_s_i64_f64, .properties = .{ .param_str = "LLid", .target_set = TargetSet.initOne(.webassembly), .attributes = .{ .@"const" = true } } },
12228 .{ .tag = .__builtin_wasm_trunc_u_i32_f32, .properties = .{ .param_str = "if", .target_set = TargetSet.initOne(.webassembly), .attributes = .{ .@"const" = true } } },
12229 .{ .tag = .__builtin_wasm_trunc_u_i32_f64, .properties = .{ .param_str = "id", .target_set = TargetSet.initOne(.webassembly), .attributes = .{ .@"const" = true } } },
12230 .{ .tag = .__builtin_wasm_trunc_u_i64_f32, .properties = .{ .param_str = "LLif", .target_set = TargetSet.initOne(.webassembly), .attributes = .{ .@"const" = true } } },
12231 .{ .tag = .__builtin_wasm_trunc_u_i64_f64, .properties = .{ .param_str = "LLid", .target_set = TargetSet.initOne(.webassembly), .attributes = .{ .@"const" = true } } },
12232 .{ .tag = .__builtin_wcschr, .properties = .{ .param_str = "w*wC*w", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
12233 .{ .tag = .__builtin_wcscmp, .properties = .{ .param_str = "iwC*wC*", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
12234 .{ .tag = .__builtin_wcslen, .properties = .{ .param_str = "zwC*", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
12235 .{ .tag = .__builtin_wcsncmp, .properties = .{ .param_str = "iwC*wC*z", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
12236 .{ .tag = .__builtin_wmemchr, .properties = .{ .param_str = "w*wC*wz", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
12237 .{ .tag = .__builtin_wmemcmp, .properties = .{ .param_str = "iwC*wC*z", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
12238 .{ .tag = .__builtin_wmemcpy, .properties = .{ .param_str = "w*w*wC*z", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
12239 .{ .tag = .__builtin_wmemmove, .properties = .{ .param_str = "w*w*wC*z", .attributes = .{ .lib_function_with_builtin_prefix = true, .const_evaluable = true } } },
12240 .{ .tag = .__c11_atomic_compare_exchange_strong, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12241 .{ .tag = .__c11_atomic_compare_exchange_weak, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12242 .{ .tag = .__c11_atomic_exchange, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12243 .{ .tag = .__c11_atomic_fetch_add, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12244 .{ .tag = .__c11_atomic_fetch_and, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12245 .{ .tag = .__c11_atomic_fetch_max, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12246 .{ .tag = .__c11_atomic_fetch_min, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12247 .{ .tag = .__c11_atomic_fetch_nand, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12248 .{ .tag = .__c11_atomic_fetch_or, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12249 .{ .tag = .__c11_atomic_fetch_sub, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12250 .{ .tag = .__c11_atomic_fetch_xor, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12251 .{ .tag = .__c11_atomic_init, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12252 .{ .tag = .__c11_atomic_is_lock_free, .properties = .{ .param_str = "bz", .attributes = .{ .const_evaluable = true } } },
12253 .{ .tag = .__c11_atomic_load, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12254 .{ .tag = .__c11_atomic_signal_fence, .properties = .{ .param_str = "vi" } },
12255 .{ .tag = .__c11_atomic_store, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12256 .{ .tag = .__c11_atomic_thread_fence, .properties = .{ .param_str = "vi" } },
12257 .{ .tag = .__clear_cache, .properties = .{ .param_str = "vv*v*", .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) } },
12258 .{ .tag = .__cospi, .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12259 .{ .tag = .__cospif, .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12260 .{ .tag = .__debugbreak, .properties = .{ .param_str = "v", .language = .all_ms_languages } },
12261 .{ .tag = .__dmb, .properties = .{ .param_str = "vUi", .language = .all_ms_languages, .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } },
12262 .{ .tag = .__dsb, .properties = .{ .param_str = "vUi", .language = .all_ms_languages, .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } },
12263 .{ .tag = .__emit, .properties = .{ .param_str = "vIUiC", .language = .all_ms_languages, .target_set = TargetSet.initOne(.arm) } },
12264 .{ .tag = .__exception_code, .properties = .{ .param_str = "UNi", .language = .all_ms_languages } },
12265 .{ .tag = .__exception_info, .properties = .{ .param_str = "v*", .language = .all_ms_languages } },
12266 .{ .tag = .__exp10, .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12267 .{ .tag = .__exp10f, .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12268 .{ .tag = .__fastfail, .properties = .{ .param_str = "vUi", .language = .all_ms_languages, .attributes = .{ .noreturn = true } } },
12269 .{ .tag = .__finite, .properties = .{ .param_str = "id", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12270 .{ .tag = .__finitef, .properties = .{ .param_str = "if", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12271 .{ .tag = .__finitel, .properties = .{ .param_str = "iLd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12272 .{ .tag = .__isb, .properties = .{ .param_str = "vUi", .language = .all_ms_languages, .target_set = TargetSet.initMany(&.{ .aarch64, .arm }), .attributes = .{ .@"const" = true } } },
12273 .{ .tag = .__iso_volatile_load16, .properties = .{ .param_str = "ssCD*", .language = .all_ms_languages } },
12274 .{ .tag = .__iso_volatile_load32, .properties = .{ .param_str = "iiCD*", .language = .all_ms_languages } },
12275 .{ .tag = .__iso_volatile_load64, .properties = .{ .param_str = "LLiLLiCD*", .language = .all_ms_languages } },
12276 .{ .tag = .__iso_volatile_load8, .properties = .{ .param_str = "ccCD*", .language = .all_ms_languages } },
12277 .{ .tag = .__iso_volatile_store16, .properties = .{ .param_str = "vsD*s", .language = .all_ms_languages } },
12278 .{ .tag = .__iso_volatile_store32, .properties = .{ .param_str = "viD*i", .language = .all_ms_languages } },
12279 .{ .tag = .__iso_volatile_store64, .properties = .{ .param_str = "vLLiD*LLi", .language = .all_ms_languages } },
12280 .{ .tag = .__iso_volatile_store8, .properties = .{ .param_str = "vcD*c", .language = .all_ms_languages } },
12281 .{ .tag = .__ldrexd, .properties = .{ .param_str = "WiWiCD*", .language = .all_ms_languages, .target_set = TargetSet.initOne(.arm) } },
12282 .{ .tag = .__lzcnt, .properties = .{ .param_str = "UiUi", .language = .all_ms_languages, .attributes = .{ .@"const" = true, .const_evaluable = true } } },
12283 .{ .tag = .__lzcnt16, .properties = .{ .param_str = "UsUs", .language = .all_ms_languages, .attributes = .{ .@"const" = true, .const_evaluable = true } } },
12284 .{ .tag = .__lzcnt64, .properties = .{ .param_str = "UWiUWi", .language = .all_ms_languages, .attributes = .{ .@"const" = true, .const_evaluable = true } } },
12285 .{ .tag = .__noop, .properties = .{ .param_str = "i.", .language = .all_ms_languages } },
12286 .{ .tag = .__nvvm_add_rm_d, .properties = .{ .param_str = "ddd", .target_set = TargetSet.initOne(.nvptx) } },
12287 .{ .tag = .__nvvm_add_rm_f, .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
12288 .{ .tag = .__nvvm_add_rm_ftz_f, .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
12289 .{ .tag = .__nvvm_add_rn_d, .properties = .{ .param_str = "ddd", .target_set = TargetSet.initOne(.nvptx) } },
12290 .{ .tag = .__nvvm_add_rn_f, .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
12291 .{ .tag = .__nvvm_add_rn_ftz_f, .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
12292 .{ .tag = .__nvvm_add_rp_d, .properties = .{ .param_str = "ddd", .target_set = TargetSet.initOne(.nvptx) } },
12293 .{ .tag = .__nvvm_add_rp_f, .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
12294 .{ .tag = .__nvvm_add_rp_ftz_f, .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
12295 .{ .tag = .__nvvm_add_rz_d, .properties = .{ .param_str = "ddd", .target_set = TargetSet.initOne(.nvptx) } },
12296 .{ .tag = .__nvvm_add_rz_f, .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
12297 .{ .tag = .__nvvm_add_rz_ftz_f, .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
12298 .{ .tag = .__nvvm_atom_add_gen_f, .properties = .{ .param_str = "ffD*f", .target_set = TargetSet.initOne(.nvptx) } },
12299 .{ .tag = .__nvvm_atom_add_gen_i, .properties = .{ .param_str = "iiD*i", .target_set = TargetSet.initOne(.nvptx) } },
12300 .{ .tag = .__nvvm_atom_add_gen_l, .properties = .{ .param_str = "LiLiD*Li", .target_set = TargetSet.initOne(.nvptx) } },
12301 .{ .tag = .__nvvm_atom_add_gen_ll, .properties = .{ .param_str = "LLiLLiD*LLi", .target_set = TargetSet.initOne(.nvptx) } },
12302 .{ .tag = .__nvvm_atom_and_gen_i, .properties = .{ .param_str = "iiD*i", .target_set = TargetSet.initOne(.nvptx) } },
12303 .{ .tag = .__nvvm_atom_and_gen_l, .properties = .{ .param_str = "LiLiD*Li", .target_set = TargetSet.initOne(.nvptx) } },
12304 .{ .tag = .__nvvm_atom_and_gen_ll, .properties = .{ .param_str = "LLiLLiD*LLi", .target_set = TargetSet.initOne(.nvptx) } },
12305 .{ .tag = .__nvvm_atom_cas_gen_i, .properties = .{ .param_str = "iiD*ii", .target_set = TargetSet.initOne(.nvptx) } },
12306 .{ .tag = .__nvvm_atom_cas_gen_l, .properties = .{ .param_str = "LiLiD*LiLi", .target_set = TargetSet.initOne(.nvptx) } },
12307 .{ .tag = .__nvvm_atom_cas_gen_ll, .properties = .{ .param_str = "LLiLLiD*LLiLLi", .target_set = TargetSet.initOne(.nvptx) } },
12308 .{ .tag = .__nvvm_atom_dec_gen_ui, .properties = .{ .param_str = "UiUiD*Ui", .target_set = TargetSet.initOne(.nvptx) } },
12309 .{ .tag = .__nvvm_atom_inc_gen_ui, .properties = .{ .param_str = "UiUiD*Ui", .target_set = TargetSet.initOne(.nvptx) } },
12310 .{ .tag = .__nvvm_atom_max_gen_i, .properties = .{ .param_str = "iiD*i", .target_set = TargetSet.initOne(.nvptx) } },
12311 .{ .tag = .__nvvm_atom_max_gen_l, .properties = .{ .param_str = "LiLiD*Li", .target_set = TargetSet.initOne(.nvptx) } },
12312 .{ .tag = .__nvvm_atom_max_gen_ll, .properties = .{ .param_str = "LLiLLiD*LLi", .target_set = TargetSet.initOne(.nvptx) } },
12313 .{ .tag = .__nvvm_atom_max_gen_ui, .properties = .{ .param_str = "UiUiD*Ui", .target_set = TargetSet.initOne(.nvptx) } },
12314 .{ .tag = .__nvvm_atom_max_gen_ul, .properties = .{ .param_str = "ULiULiD*ULi", .target_set = TargetSet.initOne(.nvptx) } },
12315 .{ .tag = .__nvvm_atom_max_gen_ull, .properties = .{ .param_str = "ULLiULLiD*ULLi", .target_set = TargetSet.initOne(.nvptx) } },
12316 .{ .tag = .__nvvm_atom_min_gen_i, .properties = .{ .param_str = "iiD*i", .target_set = TargetSet.initOne(.nvptx) } },
12317 .{ .tag = .__nvvm_atom_min_gen_l, .properties = .{ .param_str = "LiLiD*Li", .target_set = TargetSet.initOne(.nvptx) } },
12318 .{ .tag = .__nvvm_atom_min_gen_ll, .properties = .{ .param_str = "LLiLLiD*LLi", .target_set = TargetSet.initOne(.nvptx) } },
12319 .{ .tag = .__nvvm_atom_min_gen_ui, .properties = .{ .param_str = "UiUiD*Ui", .target_set = TargetSet.initOne(.nvptx) } },
12320 .{ .tag = .__nvvm_atom_min_gen_ul, .properties = .{ .param_str = "ULiULiD*ULi", .target_set = TargetSet.initOne(.nvptx) } },
12321 .{ .tag = .__nvvm_atom_min_gen_ull, .properties = .{ .param_str = "ULLiULLiD*ULLi", .target_set = TargetSet.initOne(.nvptx) } },
12322 .{ .tag = .__nvvm_atom_or_gen_i, .properties = .{ .param_str = "iiD*i", .target_set = TargetSet.initOne(.nvptx) } },
12323 .{ .tag = .__nvvm_atom_or_gen_l, .properties = .{ .param_str = "LiLiD*Li", .target_set = TargetSet.initOne(.nvptx) } },
12324 .{ .tag = .__nvvm_atom_or_gen_ll, .properties = .{ .param_str = "LLiLLiD*LLi", .target_set = TargetSet.initOne(.nvptx) } },
12325 .{ .tag = .__nvvm_atom_sub_gen_i, .properties = .{ .param_str = "iiD*i", .target_set = TargetSet.initOne(.nvptx) } },
12326 .{ .tag = .__nvvm_atom_sub_gen_l, .properties = .{ .param_str = "LiLiD*Li", .target_set = TargetSet.initOne(.nvptx) } },
12327 .{ .tag = .__nvvm_atom_sub_gen_ll, .properties = .{ .param_str = "LLiLLiD*LLi", .target_set = TargetSet.initOne(.nvptx) } },
12328 .{ .tag = .__nvvm_atom_xchg_gen_i, .properties = .{ .param_str = "iiD*i", .target_set = TargetSet.initOne(.nvptx) } },
12329 .{ .tag = .__nvvm_atom_xchg_gen_l, .properties = .{ .param_str = "LiLiD*Li", .target_set = TargetSet.initOne(.nvptx) } },
12330 .{ .tag = .__nvvm_atom_xchg_gen_ll, .properties = .{ .param_str = "LLiLLiD*LLi", .target_set = TargetSet.initOne(.nvptx) } },
12331 .{ .tag = .__nvvm_atom_xor_gen_i, .properties = .{ .param_str = "iiD*i", .target_set = TargetSet.initOne(.nvptx) } },
12332 .{ .tag = .__nvvm_atom_xor_gen_l, .properties = .{ .param_str = "LiLiD*Li", .target_set = TargetSet.initOne(.nvptx) } },
12333 .{ .tag = .__nvvm_atom_xor_gen_ll, .properties = .{ .param_str = "LLiLLiD*LLi", .target_set = TargetSet.initOne(.nvptx) } },
12334 .{ .tag = .__nvvm_bar0_and, .properties = .{ .param_str = "ii", .target_set = TargetSet.initOne(.nvptx) } },
12335 .{ .tag = .__nvvm_bar0_or, .properties = .{ .param_str = "ii", .target_set = TargetSet.initOne(.nvptx) } },
12336 .{ .tag = .__nvvm_bar0_popc, .properties = .{ .param_str = "ii", .target_set = TargetSet.initOne(.nvptx) } },
12337 .{ .tag = .__nvvm_bar_sync, .properties = .{ .param_str = "vi", .target_set = TargetSet.initOne(.nvptx) } },
12338 .{ .tag = .__nvvm_bitcast_d2ll, .properties = .{ .param_str = "LLid", .target_set = TargetSet.initOne(.nvptx) } },
12339 .{ .tag = .__nvvm_bitcast_f2i, .properties = .{ .param_str = "if", .target_set = TargetSet.initOne(.nvptx) } },
12340 .{ .tag = .__nvvm_bitcast_i2f, .properties = .{ .param_str = "fi", .target_set = TargetSet.initOne(.nvptx) } },
12341 .{ .tag = .__nvvm_bitcast_ll2d, .properties = .{ .param_str = "dLLi", .target_set = TargetSet.initOne(.nvptx) } },
12342 .{ .tag = .__nvvm_ceil_d, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.nvptx) } },
12343 .{ .tag = .__nvvm_ceil_f, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12344 .{ .tag = .__nvvm_ceil_ftz_f, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12345 .{ .tag = .__nvvm_compiler_error, .properties = .{ .param_str = "vcC*4", .target_set = TargetSet.initOne(.nvptx) } },
12346 .{ .tag = .__nvvm_compiler_warn, .properties = .{ .param_str = "vcC*4", .target_set = TargetSet.initOne(.nvptx) } },
12347 .{ .tag = .__nvvm_cos_approx_f, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12348 .{ .tag = .__nvvm_cos_approx_ftz_f, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12349 .{ .tag = .__nvvm_d2f_rm, .properties = .{ .param_str = "fd", .target_set = TargetSet.initOne(.nvptx) } },
12350 .{ .tag = .__nvvm_d2f_rm_ftz, .properties = .{ .param_str = "fd", .target_set = TargetSet.initOne(.nvptx) } },
12351 .{ .tag = .__nvvm_d2f_rn, .properties = .{ .param_str = "fd", .target_set = TargetSet.initOne(.nvptx) } },
12352 .{ .tag = .__nvvm_d2f_rn_ftz, .properties = .{ .param_str = "fd", .target_set = TargetSet.initOne(.nvptx) } },
12353 .{ .tag = .__nvvm_d2f_rp, .properties = .{ .param_str = "fd", .target_set = TargetSet.initOne(.nvptx) } },
12354 .{ .tag = .__nvvm_d2f_rp_ftz, .properties = .{ .param_str = "fd", .target_set = TargetSet.initOne(.nvptx) } },
12355 .{ .tag = .__nvvm_d2f_rz, .properties = .{ .param_str = "fd", .target_set = TargetSet.initOne(.nvptx) } },
12356 .{ .tag = .__nvvm_d2f_rz_ftz, .properties = .{ .param_str = "fd", .target_set = TargetSet.initOne(.nvptx) } },
12357 .{ .tag = .__nvvm_d2i_hi, .properties = .{ .param_str = "id", .target_set = TargetSet.initOne(.nvptx) } },
12358 .{ .tag = .__nvvm_d2i_lo, .properties = .{ .param_str = "id", .target_set = TargetSet.initOne(.nvptx) } },
12359 .{ .tag = .__nvvm_d2i_rm, .properties = .{ .param_str = "id", .target_set = TargetSet.initOne(.nvptx) } },
12360 .{ .tag = .__nvvm_d2i_rn, .properties = .{ .param_str = "id", .target_set = TargetSet.initOne(.nvptx) } },
12361 .{ .tag = .__nvvm_d2i_rp, .properties = .{ .param_str = "id", .target_set = TargetSet.initOne(.nvptx) } },
12362 .{ .tag = .__nvvm_d2i_rz, .properties = .{ .param_str = "id", .target_set = TargetSet.initOne(.nvptx) } },
12363 .{ .tag = .__nvvm_d2ll_rm, .properties = .{ .param_str = "LLid", .target_set = TargetSet.initOne(.nvptx) } },
12364 .{ .tag = .__nvvm_d2ll_rn, .properties = .{ .param_str = "LLid", .target_set = TargetSet.initOne(.nvptx) } },
12365 .{ .tag = .__nvvm_d2ll_rp, .properties = .{ .param_str = "LLid", .target_set = TargetSet.initOne(.nvptx) } },
12366 .{ .tag = .__nvvm_d2ll_rz, .properties = .{ .param_str = "LLid", .target_set = TargetSet.initOne(.nvptx) } },
12367 .{ .tag = .__nvvm_d2ui_rm, .properties = .{ .param_str = "Uid", .target_set = TargetSet.initOne(.nvptx) } },
12368 .{ .tag = .__nvvm_d2ui_rn, .properties = .{ .param_str = "Uid", .target_set = TargetSet.initOne(.nvptx) } },
12369 .{ .tag = .__nvvm_d2ui_rp, .properties = .{ .param_str = "Uid", .target_set = TargetSet.initOne(.nvptx) } },
12370 .{ .tag = .__nvvm_d2ui_rz, .properties = .{ .param_str = "Uid", .target_set = TargetSet.initOne(.nvptx) } },
12371 .{ .tag = .__nvvm_d2ull_rm, .properties = .{ .param_str = "ULLid", .target_set = TargetSet.initOne(.nvptx) } },
12372 .{ .tag = .__nvvm_d2ull_rn, .properties = .{ .param_str = "ULLid", .target_set = TargetSet.initOne(.nvptx) } },
12373 .{ .tag = .__nvvm_d2ull_rp, .properties = .{ .param_str = "ULLid", .target_set = TargetSet.initOne(.nvptx) } },
12374 .{ .tag = .__nvvm_d2ull_rz, .properties = .{ .param_str = "ULLid", .target_set = TargetSet.initOne(.nvptx) } },
12375 .{ .tag = .__nvvm_div_approx_f, .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
12376 .{ .tag = .__nvvm_div_approx_ftz_f, .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
12377 .{ .tag = .__nvvm_div_rm_d, .properties = .{ .param_str = "ddd", .target_set = TargetSet.initOne(.nvptx) } },
12378 .{ .tag = .__nvvm_div_rm_f, .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
12379 .{ .tag = .__nvvm_div_rm_ftz_f, .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
12380 .{ .tag = .__nvvm_div_rn_d, .properties = .{ .param_str = "ddd", .target_set = TargetSet.initOne(.nvptx) } },
12381 .{ .tag = .__nvvm_div_rn_f, .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
12382 .{ .tag = .__nvvm_div_rn_ftz_f, .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
12383 .{ .tag = .__nvvm_div_rp_d, .properties = .{ .param_str = "ddd", .target_set = TargetSet.initOne(.nvptx) } },
12384 .{ .tag = .__nvvm_div_rp_f, .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
12385 .{ .tag = .__nvvm_div_rp_ftz_f, .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
12386 .{ .tag = .__nvvm_div_rz_d, .properties = .{ .param_str = "ddd", .target_set = TargetSet.initOne(.nvptx) } },
12387 .{ .tag = .__nvvm_div_rz_f, .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
12388 .{ .tag = .__nvvm_div_rz_ftz_f, .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
12389 .{ .tag = .__nvvm_ex2_approx_d, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.nvptx) } },
12390 .{ .tag = .__nvvm_ex2_approx_f, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12391 .{ .tag = .__nvvm_ex2_approx_ftz_f, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12392 .{ .tag = .__nvvm_f2h_rn, .properties = .{ .param_str = "Usf", .target_set = TargetSet.initOne(.nvptx) } },
12393 .{ .tag = .__nvvm_f2h_rn_ftz, .properties = .{ .param_str = "Usf", .target_set = TargetSet.initOne(.nvptx) } },
12394 .{ .tag = .__nvvm_f2i_rm, .properties = .{ .param_str = "if", .target_set = TargetSet.initOne(.nvptx) } },
12395 .{ .tag = .__nvvm_f2i_rm_ftz, .properties = .{ .param_str = "if", .target_set = TargetSet.initOne(.nvptx) } },
12396 .{ .tag = .__nvvm_f2i_rn, .properties = .{ .param_str = "if", .target_set = TargetSet.initOne(.nvptx) } },
12397 .{ .tag = .__nvvm_f2i_rn_ftz, .properties = .{ .param_str = "if", .target_set = TargetSet.initOne(.nvptx) } },
12398 .{ .tag = .__nvvm_f2i_rp, .properties = .{ .param_str = "if", .target_set = TargetSet.initOne(.nvptx) } },
12399 .{ .tag = .__nvvm_f2i_rp_ftz, .properties = .{ .param_str = "if", .target_set = TargetSet.initOne(.nvptx) } },
12400 .{ .tag = .__nvvm_f2i_rz, .properties = .{ .param_str = "if", .target_set = TargetSet.initOne(.nvptx) } },
12401 .{ .tag = .__nvvm_f2i_rz_ftz, .properties = .{ .param_str = "if", .target_set = TargetSet.initOne(.nvptx) } },
12402 .{ .tag = .__nvvm_f2ll_rm, .properties = .{ .param_str = "LLif", .target_set = TargetSet.initOne(.nvptx) } },
12403 .{ .tag = .__nvvm_f2ll_rm_ftz, .properties = .{ .param_str = "LLif", .target_set = TargetSet.initOne(.nvptx) } },
12404 .{ .tag = .__nvvm_f2ll_rn, .properties = .{ .param_str = "LLif", .target_set = TargetSet.initOne(.nvptx) } },
12405 .{ .tag = .__nvvm_f2ll_rn_ftz, .properties = .{ .param_str = "LLif", .target_set = TargetSet.initOne(.nvptx) } },
12406 .{ .tag = .__nvvm_f2ll_rp, .properties = .{ .param_str = "LLif", .target_set = TargetSet.initOne(.nvptx) } },
12407 .{ .tag = .__nvvm_f2ll_rp_ftz, .properties = .{ .param_str = "LLif", .target_set = TargetSet.initOne(.nvptx) } },
12408 .{ .tag = .__nvvm_f2ll_rz, .properties = .{ .param_str = "LLif", .target_set = TargetSet.initOne(.nvptx) } },
12409 .{ .tag = .__nvvm_f2ll_rz_ftz, .properties = .{ .param_str = "LLif", .target_set = TargetSet.initOne(.nvptx) } },
12410 .{ .tag = .__nvvm_f2ui_rm, .properties = .{ .param_str = "Uif", .target_set = TargetSet.initOne(.nvptx) } },
12411 .{ .tag = .__nvvm_f2ui_rm_ftz, .properties = .{ .param_str = "Uif", .target_set = TargetSet.initOne(.nvptx) } },
12412 .{ .tag = .__nvvm_f2ui_rn, .properties = .{ .param_str = "Uif", .target_set = TargetSet.initOne(.nvptx) } },
12413 .{ .tag = .__nvvm_f2ui_rn_ftz, .properties = .{ .param_str = "Uif", .target_set = TargetSet.initOne(.nvptx) } },
12414 .{ .tag = .__nvvm_f2ui_rp, .properties = .{ .param_str = "Uif", .target_set = TargetSet.initOne(.nvptx) } },
12415 .{ .tag = .__nvvm_f2ui_rp_ftz, .properties = .{ .param_str = "Uif", .target_set = TargetSet.initOne(.nvptx) } },
12416 .{ .tag = .__nvvm_f2ui_rz, .properties = .{ .param_str = "Uif", .target_set = TargetSet.initOne(.nvptx) } },
12417 .{ .tag = .__nvvm_f2ui_rz_ftz, .properties = .{ .param_str = "Uif", .target_set = TargetSet.initOne(.nvptx) } },
12418 .{ .tag = .__nvvm_f2ull_rm, .properties = .{ .param_str = "ULLif", .target_set = TargetSet.initOne(.nvptx) } },
12419 .{ .tag = .__nvvm_f2ull_rm_ftz, .properties = .{ .param_str = "ULLif", .target_set = TargetSet.initOne(.nvptx) } },
12420 .{ .tag = .__nvvm_f2ull_rn, .properties = .{ .param_str = "ULLif", .target_set = TargetSet.initOne(.nvptx) } },
12421 .{ .tag = .__nvvm_f2ull_rn_ftz, .properties = .{ .param_str = "ULLif", .target_set = TargetSet.initOne(.nvptx) } },
12422 .{ .tag = .__nvvm_f2ull_rp, .properties = .{ .param_str = "ULLif", .target_set = TargetSet.initOne(.nvptx) } },
12423 .{ .tag = .__nvvm_f2ull_rp_ftz, .properties = .{ .param_str = "ULLif", .target_set = TargetSet.initOne(.nvptx) } },
12424 .{ .tag = .__nvvm_f2ull_rz, .properties = .{ .param_str = "ULLif", .target_set = TargetSet.initOne(.nvptx) } },
12425 .{ .tag = .__nvvm_f2ull_rz_ftz, .properties = .{ .param_str = "ULLif", .target_set = TargetSet.initOne(.nvptx) } },
12426 .{ .tag = .__nvvm_fabs_d, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.nvptx) } },
12427 .{ .tag = .__nvvm_fabs_f, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12428 .{ .tag = .__nvvm_fabs_ftz_f, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12429 .{ .tag = .__nvvm_floor_d, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.nvptx) } },
12430 .{ .tag = .__nvvm_floor_f, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12431 .{ .tag = .__nvvm_floor_ftz_f, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12432 .{ .tag = .__nvvm_fma_rm_d, .properties = .{ .param_str = "dddd", .target_set = TargetSet.initOne(.nvptx) } },
12433 .{ .tag = .__nvvm_fma_rm_f, .properties = .{ .param_str = "ffff", .target_set = TargetSet.initOne(.nvptx) } },
12434 .{ .tag = .__nvvm_fma_rm_ftz_f, .properties = .{ .param_str = "ffff", .target_set = TargetSet.initOne(.nvptx) } },
12435 .{ .tag = .__nvvm_fma_rn_d, .properties = .{ .param_str = "dddd", .target_set = TargetSet.initOne(.nvptx) } },
12436 .{ .tag = .__nvvm_fma_rn_f, .properties = .{ .param_str = "ffff", .target_set = TargetSet.initOne(.nvptx) } },
12437 .{ .tag = .__nvvm_fma_rn_ftz_f, .properties = .{ .param_str = "ffff", .target_set = TargetSet.initOne(.nvptx) } },
12438 .{ .tag = .__nvvm_fma_rp_d, .properties = .{ .param_str = "dddd", .target_set = TargetSet.initOne(.nvptx) } },
12439 .{ .tag = .__nvvm_fma_rp_f, .properties = .{ .param_str = "ffff", .target_set = TargetSet.initOne(.nvptx) } },
12440 .{ .tag = .__nvvm_fma_rp_ftz_f, .properties = .{ .param_str = "ffff", .target_set = TargetSet.initOne(.nvptx) } },
12441 .{ .tag = .__nvvm_fma_rz_d, .properties = .{ .param_str = "dddd", .target_set = TargetSet.initOne(.nvptx) } },
12442 .{ .tag = .__nvvm_fma_rz_f, .properties = .{ .param_str = "ffff", .target_set = TargetSet.initOne(.nvptx) } },
12443 .{ .tag = .__nvvm_fma_rz_ftz_f, .properties = .{ .param_str = "ffff", .target_set = TargetSet.initOne(.nvptx) } },
12444 .{ .tag = .__nvvm_fmax_d, .properties = .{ .param_str = "ddd", .target_set = TargetSet.initOne(.nvptx) } },
12445 .{ .tag = .__nvvm_fmax_f, .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
12446 .{ .tag = .__nvvm_fmax_ftz_f, .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
12447 .{ .tag = .__nvvm_fmin_d, .properties = .{ .param_str = "ddd", .target_set = TargetSet.initOne(.nvptx) } },
12448 .{ .tag = .__nvvm_fmin_f, .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
12449 .{ .tag = .__nvvm_fmin_ftz_f, .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
12450 .{ .tag = .__nvvm_i2d_rm, .properties = .{ .param_str = "di", .target_set = TargetSet.initOne(.nvptx) } },
12451 .{ .tag = .__nvvm_i2d_rn, .properties = .{ .param_str = "di", .target_set = TargetSet.initOne(.nvptx) } },
12452 .{ .tag = .__nvvm_i2d_rp, .properties = .{ .param_str = "di", .target_set = TargetSet.initOne(.nvptx) } },
12453 .{ .tag = .__nvvm_i2d_rz, .properties = .{ .param_str = "di", .target_set = TargetSet.initOne(.nvptx) } },
12454 .{ .tag = .__nvvm_i2f_rm, .properties = .{ .param_str = "fi", .target_set = TargetSet.initOne(.nvptx) } },
12455 .{ .tag = .__nvvm_i2f_rn, .properties = .{ .param_str = "fi", .target_set = TargetSet.initOne(.nvptx) } },
12456 .{ .tag = .__nvvm_i2f_rp, .properties = .{ .param_str = "fi", .target_set = TargetSet.initOne(.nvptx) } },
12457 .{ .tag = .__nvvm_i2f_rz, .properties = .{ .param_str = "fi", .target_set = TargetSet.initOne(.nvptx) } },
12458 .{ .tag = .__nvvm_isspacep_const, .properties = .{ .param_str = "bvC*", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
12459 .{ .tag = .__nvvm_isspacep_global, .properties = .{ .param_str = "bvC*", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
12460 .{ .tag = .__nvvm_isspacep_local, .properties = .{ .param_str = "bvC*", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
12461 .{ .tag = .__nvvm_isspacep_shared, .properties = .{ .param_str = "bvC*", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
12462 .{ .tag = .__nvvm_ldg_c, .properties = .{ .param_str = "ccC*", .target_set = TargetSet.initOne(.nvptx) } },
12463 .{ .tag = .__nvvm_ldg_c2, .properties = .{ .param_str = "E2cE2cC*", .target_set = TargetSet.initOne(.nvptx) } },
12464 .{ .tag = .__nvvm_ldg_c4, .properties = .{ .param_str = "E4cE4cC*", .target_set = TargetSet.initOne(.nvptx) } },
12465 .{ .tag = .__nvvm_ldg_d, .properties = .{ .param_str = "ddC*", .target_set = TargetSet.initOne(.nvptx) } },
12466 .{ .tag = .__nvvm_ldg_d2, .properties = .{ .param_str = "E2dE2dC*", .target_set = TargetSet.initOne(.nvptx) } },
12467 .{ .tag = .__nvvm_ldg_f, .properties = .{ .param_str = "ffC*", .target_set = TargetSet.initOne(.nvptx) } },
12468 .{ .tag = .__nvvm_ldg_f2, .properties = .{ .param_str = "E2fE2fC*", .target_set = TargetSet.initOne(.nvptx) } },
12469 .{ .tag = .__nvvm_ldg_f4, .properties = .{ .param_str = "E4fE4fC*", .target_set = TargetSet.initOne(.nvptx) } },
12470 .{ .tag = .__nvvm_ldg_h, .properties = .{ .param_str = "hhC*", .target_set = TargetSet.initOne(.nvptx) } },
12471 .{ .tag = .__nvvm_ldg_h2, .properties = .{ .param_str = "E2hE2hC*", .target_set = TargetSet.initOne(.nvptx) } },
12472 .{ .tag = .__nvvm_ldg_i, .properties = .{ .param_str = "iiC*", .target_set = TargetSet.initOne(.nvptx) } },
12473 .{ .tag = .__nvvm_ldg_i2, .properties = .{ .param_str = "E2iE2iC*", .target_set = TargetSet.initOne(.nvptx) } },
12474 .{ .tag = .__nvvm_ldg_i4, .properties = .{ .param_str = "E4iE4iC*", .target_set = TargetSet.initOne(.nvptx) } },
12475 .{ .tag = .__nvvm_ldg_l, .properties = .{ .param_str = "LiLiC*", .target_set = TargetSet.initOne(.nvptx) } },
12476 .{ .tag = .__nvvm_ldg_l2, .properties = .{ .param_str = "E2LiE2LiC*", .target_set = TargetSet.initOne(.nvptx) } },
12477 .{ .tag = .__nvvm_ldg_ll, .properties = .{ .param_str = "LLiLLiC*", .target_set = TargetSet.initOne(.nvptx) } },
12478 .{ .tag = .__nvvm_ldg_ll2, .properties = .{ .param_str = "E2LLiE2LLiC*", .target_set = TargetSet.initOne(.nvptx) } },
12479 .{ .tag = .__nvvm_ldg_s, .properties = .{ .param_str = "ssC*", .target_set = TargetSet.initOne(.nvptx) } },
12480 .{ .tag = .__nvvm_ldg_s2, .properties = .{ .param_str = "E2sE2sC*", .target_set = TargetSet.initOne(.nvptx) } },
12481 .{ .tag = .__nvvm_ldg_s4, .properties = .{ .param_str = "E4sE4sC*", .target_set = TargetSet.initOne(.nvptx) } },
12482 .{ .tag = .__nvvm_ldg_sc, .properties = .{ .param_str = "ScScC*", .target_set = TargetSet.initOne(.nvptx) } },
12483 .{ .tag = .__nvvm_ldg_sc2, .properties = .{ .param_str = "E2ScE2ScC*", .target_set = TargetSet.initOne(.nvptx) } },
12484 .{ .tag = .__nvvm_ldg_sc4, .properties = .{ .param_str = "E4ScE4ScC*", .target_set = TargetSet.initOne(.nvptx) } },
12485 .{ .tag = .__nvvm_ldg_uc, .properties = .{ .param_str = "UcUcC*", .target_set = TargetSet.initOne(.nvptx) } },
12486 .{ .tag = .__nvvm_ldg_uc2, .properties = .{ .param_str = "E2UcE2UcC*", .target_set = TargetSet.initOne(.nvptx) } },
12487 .{ .tag = .__nvvm_ldg_uc4, .properties = .{ .param_str = "E4UcE4UcC*", .target_set = TargetSet.initOne(.nvptx) } },
12488 .{ .tag = .__nvvm_ldg_ui, .properties = .{ .param_str = "UiUiC*", .target_set = TargetSet.initOne(.nvptx) } },
12489 .{ .tag = .__nvvm_ldg_ui2, .properties = .{ .param_str = "E2UiE2UiC*", .target_set = TargetSet.initOne(.nvptx) } },
12490 .{ .tag = .__nvvm_ldg_ui4, .properties = .{ .param_str = "E4UiE4UiC*", .target_set = TargetSet.initOne(.nvptx) } },
12491 .{ .tag = .__nvvm_ldg_ul, .properties = .{ .param_str = "ULiULiC*", .target_set = TargetSet.initOne(.nvptx) } },
12492 .{ .tag = .__nvvm_ldg_ul2, .properties = .{ .param_str = "E2ULiE2ULiC*", .target_set = TargetSet.initOne(.nvptx) } },
12493 .{ .tag = .__nvvm_ldg_ull, .properties = .{ .param_str = "ULLiULLiC*", .target_set = TargetSet.initOne(.nvptx) } },
12494 .{ .tag = .__nvvm_ldg_ull2, .properties = .{ .param_str = "E2ULLiE2ULLiC*", .target_set = TargetSet.initOne(.nvptx) } },
12495 .{ .tag = .__nvvm_ldg_us, .properties = .{ .param_str = "UsUsC*", .target_set = TargetSet.initOne(.nvptx) } },
12496 .{ .tag = .__nvvm_ldg_us2, .properties = .{ .param_str = "E2UsE2UsC*", .target_set = TargetSet.initOne(.nvptx) } },
12497 .{ .tag = .__nvvm_ldg_us4, .properties = .{ .param_str = "E4UsE4UsC*", .target_set = TargetSet.initOne(.nvptx) } },
12498 .{ .tag = .__nvvm_ldu_c, .properties = .{ .param_str = "ccC*", .target_set = TargetSet.initOne(.nvptx) } },
12499 .{ .tag = .__nvvm_ldu_c2, .properties = .{ .param_str = "E2cE2cC*", .target_set = TargetSet.initOne(.nvptx) } },
12500 .{ .tag = .__nvvm_ldu_c4, .properties = .{ .param_str = "E4cE4cC*", .target_set = TargetSet.initOne(.nvptx) } },
12501 .{ .tag = .__nvvm_ldu_d, .properties = .{ .param_str = "ddC*", .target_set = TargetSet.initOne(.nvptx) } },
12502 .{ .tag = .__nvvm_ldu_d2, .properties = .{ .param_str = "E2dE2dC*", .target_set = TargetSet.initOne(.nvptx) } },
12503 .{ .tag = .__nvvm_ldu_f, .properties = .{ .param_str = "ffC*", .target_set = TargetSet.initOne(.nvptx) } },
12504 .{ .tag = .__nvvm_ldu_f2, .properties = .{ .param_str = "E2fE2fC*", .target_set = TargetSet.initOne(.nvptx) } },
12505 .{ .tag = .__nvvm_ldu_f4, .properties = .{ .param_str = "E4fE4fC*", .target_set = TargetSet.initOne(.nvptx) } },
12506 .{ .tag = .__nvvm_ldu_h, .properties = .{ .param_str = "hhC*", .target_set = TargetSet.initOne(.nvptx) } },
12507 .{ .tag = .__nvvm_ldu_h2, .properties = .{ .param_str = "E2hE2hC*", .target_set = TargetSet.initOne(.nvptx) } },
12508 .{ .tag = .__nvvm_ldu_i, .properties = .{ .param_str = "iiC*", .target_set = TargetSet.initOne(.nvptx) } },
12509 .{ .tag = .__nvvm_ldu_i2, .properties = .{ .param_str = "E2iE2iC*", .target_set = TargetSet.initOne(.nvptx) } },
12510 .{ .tag = .__nvvm_ldu_i4, .properties = .{ .param_str = "E4iE4iC*", .target_set = TargetSet.initOne(.nvptx) } },
12511 .{ .tag = .__nvvm_ldu_l, .properties = .{ .param_str = "LiLiC*", .target_set = TargetSet.initOne(.nvptx) } },
12512 .{ .tag = .__nvvm_ldu_l2, .properties = .{ .param_str = "E2LiE2LiC*", .target_set = TargetSet.initOne(.nvptx) } },
12513 .{ .tag = .__nvvm_ldu_ll, .properties = .{ .param_str = "LLiLLiC*", .target_set = TargetSet.initOne(.nvptx) } },
12514 .{ .tag = .__nvvm_ldu_ll2, .properties = .{ .param_str = "E2LLiE2LLiC*", .target_set = TargetSet.initOne(.nvptx) } },
12515 .{ .tag = .__nvvm_ldu_s, .properties = .{ .param_str = "ssC*", .target_set = TargetSet.initOne(.nvptx) } },
12516 .{ .tag = .__nvvm_ldu_s2, .properties = .{ .param_str = "E2sE2sC*", .target_set = TargetSet.initOne(.nvptx) } },
12517 .{ .tag = .__nvvm_ldu_s4, .properties = .{ .param_str = "E4sE4sC*", .target_set = TargetSet.initOne(.nvptx) } },
12518 .{ .tag = .__nvvm_ldu_sc, .properties = .{ .param_str = "ScScC*", .target_set = TargetSet.initOne(.nvptx) } },
12519 .{ .tag = .__nvvm_ldu_sc2, .properties = .{ .param_str = "E2ScE2ScC*", .target_set = TargetSet.initOne(.nvptx) } },
12520 .{ .tag = .__nvvm_ldu_sc4, .properties = .{ .param_str = "E4ScE4ScC*", .target_set = TargetSet.initOne(.nvptx) } },
12521 .{ .tag = .__nvvm_ldu_uc, .properties = .{ .param_str = "UcUcC*", .target_set = TargetSet.initOne(.nvptx) } },
12522 .{ .tag = .__nvvm_ldu_uc2, .properties = .{ .param_str = "E2UcE2UcC*", .target_set = TargetSet.initOne(.nvptx) } },
12523 .{ .tag = .__nvvm_ldu_uc4, .properties = .{ .param_str = "E4UcE4UcC*", .target_set = TargetSet.initOne(.nvptx) } },
12524 .{ .tag = .__nvvm_ldu_ui, .properties = .{ .param_str = "UiUiC*", .target_set = TargetSet.initOne(.nvptx) } },
12525 .{ .tag = .__nvvm_ldu_ui2, .properties = .{ .param_str = "E2UiE2UiC*", .target_set = TargetSet.initOne(.nvptx) } },
12526 .{ .tag = .__nvvm_ldu_ui4, .properties = .{ .param_str = "E4UiE4UiC*", .target_set = TargetSet.initOne(.nvptx) } },
12527 .{ .tag = .__nvvm_ldu_ul, .properties = .{ .param_str = "ULiULiC*", .target_set = TargetSet.initOne(.nvptx) } },
12528 .{ .tag = .__nvvm_ldu_ul2, .properties = .{ .param_str = "E2ULiE2ULiC*", .target_set = TargetSet.initOne(.nvptx) } },
12529 .{ .tag = .__nvvm_ldu_ull, .properties = .{ .param_str = "ULLiULLiC*", .target_set = TargetSet.initOne(.nvptx) } },
12530 .{ .tag = .__nvvm_ldu_ull2, .properties = .{ .param_str = "E2ULLiE2ULLiC*", .target_set = TargetSet.initOne(.nvptx) } },
12531 .{ .tag = .__nvvm_ldu_us, .properties = .{ .param_str = "UsUsC*", .target_set = TargetSet.initOne(.nvptx) } },
12532 .{ .tag = .__nvvm_ldu_us2, .properties = .{ .param_str = "E2UsE2UsC*", .target_set = TargetSet.initOne(.nvptx) } },
12533 .{ .tag = .__nvvm_ldu_us4, .properties = .{ .param_str = "E4UsE4UsC*", .target_set = TargetSet.initOne(.nvptx) } },
12534 .{ .tag = .__nvvm_lg2_approx_d, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.nvptx) } },
12535 .{ .tag = .__nvvm_lg2_approx_f, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12536 .{ .tag = .__nvvm_lg2_approx_ftz_f, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12537 .{ .tag = .__nvvm_ll2d_rm, .properties = .{ .param_str = "dLLi", .target_set = TargetSet.initOne(.nvptx) } },
12538 .{ .tag = .__nvvm_ll2d_rn, .properties = .{ .param_str = "dLLi", .target_set = TargetSet.initOne(.nvptx) } },
12539 .{ .tag = .__nvvm_ll2d_rp, .properties = .{ .param_str = "dLLi", .target_set = TargetSet.initOne(.nvptx) } },
12540 .{ .tag = .__nvvm_ll2d_rz, .properties = .{ .param_str = "dLLi", .target_set = TargetSet.initOne(.nvptx) } },
12541 .{ .tag = .__nvvm_ll2f_rm, .properties = .{ .param_str = "fLLi", .target_set = TargetSet.initOne(.nvptx) } },
12542 .{ .tag = .__nvvm_ll2f_rn, .properties = .{ .param_str = "fLLi", .target_set = TargetSet.initOne(.nvptx) } },
12543 .{ .tag = .__nvvm_ll2f_rp, .properties = .{ .param_str = "fLLi", .target_set = TargetSet.initOne(.nvptx) } },
12544 .{ .tag = .__nvvm_ll2f_rz, .properties = .{ .param_str = "fLLi", .target_set = TargetSet.initOne(.nvptx) } },
12545 .{ .tag = .__nvvm_lohi_i2d, .properties = .{ .param_str = "dii", .target_set = TargetSet.initOne(.nvptx) } },
12546 .{ .tag = .__nvvm_membar_cta, .properties = .{ .param_str = "v", .target_set = TargetSet.initOne(.nvptx) } },
12547 .{ .tag = .__nvvm_membar_gl, .properties = .{ .param_str = "v", .target_set = TargetSet.initOne(.nvptx) } },
12548 .{ .tag = .__nvvm_membar_sys, .properties = .{ .param_str = "v", .target_set = TargetSet.initOne(.nvptx) } },
12549 .{ .tag = .__nvvm_memcpy, .properties = .{ .param_str = "vUc*Uc*zi", .target_set = TargetSet.initOne(.nvptx) } },
12550 .{ .tag = .__nvvm_memset, .properties = .{ .param_str = "vUc*Uczi", .target_set = TargetSet.initOne(.nvptx) } },
12551 .{ .tag = .__nvvm_mul24_i, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.nvptx) } },
12552 .{ .tag = .__nvvm_mul24_ui, .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.nvptx) } },
12553 .{ .tag = .__nvvm_mul_rm_d, .properties = .{ .param_str = "ddd", .target_set = TargetSet.initOne(.nvptx) } },
12554 .{ .tag = .__nvvm_mul_rm_f, .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
12555 .{ .tag = .__nvvm_mul_rm_ftz_f, .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
12556 .{ .tag = .__nvvm_mul_rn_d, .properties = .{ .param_str = "ddd", .target_set = TargetSet.initOne(.nvptx) } },
12557 .{ .tag = .__nvvm_mul_rn_f, .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
12558 .{ .tag = .__nvvm_mul_rn_ftz_f, .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
12559 .{ .tag = .__nvvm_mul_rp_d, .properties = .{ .param_str = "ddd", .target_set = TargetSet.initOne(.nvptx) } },
12560 .{ .tag = .__nvvm_mul_rp_f, .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
12561 .{ .tag = .__nvvm_mul_rp_ftz_f, .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
12562 .{ .tag = .__nvvm_mul_rz_d, .properties = .{ .param_str = "ddd", .target_set = TargetSet.initOne(.nvptx) } },
12563 .{ .tag = .__nvvm_mul_rz_f, .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
12564 .{ .tag = .__nvvm_mul_rz_ftz_f, .properties = .{ .param_str = "fff", .target_set = TargetSet.initOne(.nvptx) } },
12565 .{ .tag = .__nvvm_mulhi_i, .properties = .{ .param_str = "iii", .target_set = TargetSet.initOne(.nvptx) } },
12566 .{ .tag = .__nvvm_mulhi_ll, .properties = .{ .param_str = "LLiLLiLLi", .target_set = TargetSet.initOne(.nvptx) } },
12567 .{ .tag = .__nvvm_mulhi_ui, .properties = .{ .param_str = "UiUiUi", .target_set = TargetSet.initOne(.nvptx) } },
12568 .{ .tag = .__nvvm_mulhi_ull, .properties = .{ .param_str = "ULLiULLiULLi", .target_set = TargetSet.initOne(.nvptx) } },
12569 .{ .tag = .__nvvm_prmt, .properties = .{ .param_str = "UiUiUiUi", .target_set = TargetSet.initOne(.nvptx) } },
12570 .{ .tag = .__nvvm_rcp_approx_ftz_d, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.nvptx) } },
12571 .{ .tag = .__nvvm_rcp_approx_ftz_f, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12572 .{ .tag = .__nvvm_rcp_rm_d, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.nvptx) } },
12573 .{ .tag = .__nvvm_rcp_rm_f, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12574 .{ .tag = .__nvvm_rcp_rm_ftz_f, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12575 .{ .tag = .__nvvm_rcp_rn_d, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.nvptx) } },
12576 .{ .tag = .__nvvm_rcp_rn_f, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12577 .{ .tag = .__nvvm_rcp_rn_ftz_f, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12578 .{ .tag = .__nvvm_rcp_rp_d, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.nvptx) } },
12579 .{ .tag = .__nvvm_rcp_rp_f, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12580 .{ .tag = .__nvvm_rcp_rp_ftz_f, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12581 .{ .tag = .__nvvm_rcp_rz_d, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.nvptx) } },
12582 .{ .tag = .__nvvm_rcp_rz_f, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12583 .{ .tag = .__nvvm_rcp_rz_ftz_f, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12584 .{ .tag = .__nvvm_read_ptx_sreg_clock, .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx) } },
12585 .{ .tag = .__nvvm_read_ptx_sreg_clock64, .properties = .{ .param_str = "LLi", .target_set = TargetSet.initOne(.nvptx) } },
12586 .{ .tag = .__nvvm_read_ptx_sreg_ctaid_w, .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
12587 .{ .tag = .__nvvm_read_ptx_sreg_ctaid_x, .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
12588 .{ .tag = .__nvvm_read_ptx_sreg_ctaid_y, .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
12589 .{ .tag = .__nvvm_read_ptx_sreg_ctaid_z, .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
12590 .{ .tag = .__nvvm_read_ptx_sreg_gridid, .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
12591 .{ .tag = .__nvvm_read_ptx_sreg_laneid, .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
12592 .{ .tag = .__nvvm_read_ptx_sreg_lanemask_eq, .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
12593 .{ .tag = .__nvvm_read_ptx_sreg_lanemask_ge, .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
12594 .{ .tag = .__nvvm_read_ptx_sreg_lanemask_gt, .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
12595 .{ .tag = .__nvvm_read_ptx_sreg_lanemask_le, .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
12596 .{ .tag = .__nvvm_read_ptx_sreg_lanemask_lt, .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
12597 .{ .tag = .__nvvm_read_ptx_sreg_nctaid_w, .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
12598 .{ .tag = .__nvvm_read_ptx_sreg_nctaid_x, .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
12599 .{ .tag = .__nvvm_read_ptx_sreg_nctaid_y, .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
12600 .{ .tag = .__nvvm_read_ptx_sreg_nctaid_z, .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
12601 .{ .tag = .__nvvm_read_ptx_sreg_nsmid, .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
12602 .{ .tag = .__nvvm_read_ptx_sreg_ntid_w, .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
12603 .{ .tag = .__nvvm_read_ptx_sreg_ntid_x, .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
12604 .{ .tag = .__nvvm_read_ptx_sreg_ntid_y, .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
12605 .{ .tag = .__nvvm_read_ptx_sreg_ntid_z, .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
12606 .{ .tag = .__nvvm_read_ptx_sreg_nwarpid, .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
12607 .{ .tag = .__nvvm_read_ptx_sreg_pm0, .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx) } },
12608 .{ .tag = .__nvvm_read_ptx_sreg_pm1, .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx) } },
12609 .{ .tag = .__nvvm_read_ptx_sreg_pm2, .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx) } },
12610 .{ .tag = .__nvvm_read_ptx_sreg_pm3, .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx) } },
12611 .{ .tag = .__nvvm_read_ptx_sreg_smid, .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
12612 .{ .tag = .__nvvm_read_ptx_sreg_tid_w, .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
12613 .{ .tag = .__nvvm_read_ptx_sreg_tid_x, .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
12614 .{ .tag = .__nvvm_read_ptx_sreg_tid_y, .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
12615 .{ .tag = .__nvvm_read_ptx_sreg_tid_z, .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
12616 .{ .tag = .__nvvm_read_ptx_sreg_warpid, .properties = .{ .param_str = "i", .target_set = TargetSet.initOne(.nvptx), .attributes = .{ .@"const" = true } } },
12617 .{ .tag = .__nvvm_round_d, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.nvptx) } },
12618 .{ .tag = .__nvvm_round_f, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12619 .{ .tag = .__nvvm_round_ftz_f, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12620 .{ .tag = .__nvvm_rsqrt_approx_d, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.nvptx) } },
12621 .{ .tag = .__nvvm_rsqrt_approx_f, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12622 .{ .tag = .__nvvm_rsqrt_approx_ftz_f, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12623 .{ .tag = .__nvvm_sad_i, .properties = .{ .param_str = "iiii", .target_set = TargetSet.initOne(.nvptx) } },
12624 .{ .tag = .__nvvm_sad_ui, .properties = .{ .param_str = "UiUiUiUi", .target_set = TargetSet.initOne(.nvptx) } },
12625 .{ .tag = .__nvvm_saturate_d, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.nvptx) } },
12626 .{ .tag = .__nvvm_saturate_f, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12627 .{ .tag = .__nvvm_saturate_ftz_f, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12628 .{ .tag = .__nvvm_shfl_bfly_f32, .properties = .{ .param_str = "ffii", .target_set = TargetSet.initOne(.nvptx) } },
12629 .{ .tag = .__nvvm_shfl_bfly_i32, .properties = .{ .param_str = "iiii", .target_set = TargetSet.initOne(.nvptx) } },
12630 .{ .tag = .__nvvm_shfl_down_f32, .properties = .{ .param_str = "ffii", .target_set = TargetSet.initOne(.nvptx) } },
12631 .{ .tag = .__nvvm_shfl_down_i32, .properties = .{ .param_str = "iiii", .target_set = TargetSet.initOne(.nvptx) } },
12632 .{ .tag = .__nvvm_shfl_idx_f32, .properties = .{ .param_str = "ffii", .target_set = TargetSet.initOne(.nvptx) } },
12633 .{ .tag = .__nvvm_shfl_idx_i32, .properties = .{ .param_str = "iiii", .target_set = TargetSet.initOne(.nvptx) } },
12634 .{ .tag = .__nvvm_shfl_up_f32, .properties = .{ .param_str = "ffii", .target_set = TargetSet.initOne(.nvptx) } },
12635 .{ .tag = .__nvvm_shfl_up_i32, .properties = .{ .param_str = "iiii", .target_set = TargetSet.initOne(.nvptx) } },
12636 .{ .tag = .__nvvm_sin_approx_f, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12637 .{ .tag = .__nvvm_sin_approx_ftz_f, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12638 .{ .tag = .__nvvm_sqrt_approx_f, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12639 .{ .tag = .__nvvm_sqrt_approx_ftz_f, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12640 .{ .tag = .__nvvm_sqrt_rm_d, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.nvptx) } },
12641 .{ .tag = .__nvvm_sqrt_rm_f, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12642 .{ .tag = .__nvvm_sqrt_rm_ftz_f, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12643 .{ .tag = .__nvvm_sqrt_rn_d, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.nvptx) } },
12644 .{ .tag = .__nvvm_sqrt_rn_f, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12645 .{ .tag = .__nvvm_sqrt_rn_ftz_f, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12646 .{ .tag = .__nvvm_sqrt_rp_d, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.nvptx) } },
12647 .{ .tag = .__nvvm_sqrt_rp_f, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12648 .{ .tag = .__nvvm_sqrt_rp_ftz_f, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12649 .{ .tag = .__nvvm_sqrt_rz_d, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.nvptx) } },
12650 .{ .tag = .__nvvm_sqrt_rz_f, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12651 .{ .tag = .__nvvm_sqrt_rz_ftz_f, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12652 .{ .tag = .__nvvm_trunc_d, .properties = .{ .param_str = "dd", .target_set = TargetSet.initOne(.nvptx) } },
12653 .{ .tag = .__nvvm_trunc_f, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12654 .{ .tag = .__nvvm_trunc_ftz_f, .properties = .{ .param_str = "ff", .target_set = TargetSet.initOne(.nvptx) } },
12655 .{ .tag = .__nvvm_ui2d_rm, .properties = .{ .param_str = "dUi", .target_set = TargetSet.initOne(.nvptx) } },
12656 .{ .tag = .__nvvm_ui2d_rn, .properties = .{ .param_str = "dUi", .target_set = TargetSet.initOne(.nvptx) } },
12657 .{ .tag = .__nvvm_ui2d_rp, .properties = .{ .param_str = "dUi", .target_set = TargetSet.initOne(.nvptx) } },
12658 .{ .tag = .__nvvm_ui2d_rz, .properties = .{ .param_str = "dUi", .target_set = TargetSet.initOne(.nvptx) } },
12659 .{ .tag = .__nvvm_ui2f_rm, .properties = .{ .param_str = "fUi", .target_set = TargetSet.initOne(.nvptx) } },
12660 .{ .tag = .__nvvm_ui2f_rn, .properties = .{ .param_str = "fUi", .target_set = TargetSet.initOne(.nvptx) } },
12661 .{ .tag = .__nvvm_ui2f_rp, .properties = .{ .param_str = "fUi", .target_set = TargetSet.initOne(.nvptx) } },
12662 .{ .tag = .__nvvm_ui2f_rz, .properties = .{ .param_str = "fUi", .target_set = TargetSet.initOne(.nvptx) } },
12663 .{ .tag = .__nvvm_ull2d_rm, .properties = .{ .param_str = "dULLi", .target_set = TargetSet.initOne(.nvptx) } },
12664 .{ .tag = .__nvvm_ull2d_rn, .properties = .{ .param_str = "dULLi", .target_set = TargetSet.initOne(.nvptx) } },
12665 .{ .tag = .__nvvm_ull2d_rp, .properties = .{ .param_str = "dULLi", .target_set = TargetSet.initOne(.nvptx) } },
12666 .{ .tag = .__nvvm_ull2d_rz, .properties = .{ .param_str = "dULLi", .target_set = TargetSet.initOne(.nvptx) } },
12667 .{ .tag = .__nvvm_ull2f_rm, .properties = .{ .param_str = "fULLi", .target_set = TargetSet.initOne(.nvptx) } },
12668 .{ .tag = .__nvvm_ull2f_rn, .properties = .{ .param_str = "fULLi", .target_set = TargetSet.initOne(.nvptx) } },
12669 .{ .tag = .__nvvm_ull2f_rp, .properties = .{ .param_str = "fULLi", .target_set = TargetSet.initOne(.nvptx) } },
12670 .{ .tag = .__nvvm_ull2f_rz, .properties = .{ .param_str = "fULLi", .target_set = TargetSet.initOne(.nvptx) } },
12671 .{ .tag = .__nvvm_vote_all, .properties = .{ .param_str = "bb", .target_set = TargetSet.initOne(.nvptx) } },
12672 .{ .tag = .__nvvm_vote_any, .properties = .{ .param_str = "bb", .target_set = TargetSet.initOne(.nvptx) } },
12673 .{ .tag = .__nvvm_vote_ballot, .properties = .{ .param_str = "Uib", .target_set = TargetSet.initOne(.nvptx) } },
12674 .{ .tag = .__nvvm_vote_uni, .properties = .{ .param_str = "bb", .target_set = TargetSet.initOne(.nvptx) } },
12675 .{ .tag = .__popcnt, .properties = .{ .param_str = "UiUi", .language = .all_ms_languages, .attributes = .{ .@"const" = true, .const_evaluable = true } } },
12676 .{ .tag = .__popcnt16, .properties = .{ .param_str = "UsUs", .language = .all_ms_languages, .attributes = .{ .@"const" = true, .const_evaluable = true } } },
12677 .{ .tag = .__popcnt64, .properties = .{ .param_str = "UWiUWi", .language = .all_ms_languages, .attributes = .{ .@"const" = true, .const_evaluable = true } } },
12678 .{ .tag = .__rdtsc, .properties = .{ .param_str = "UOi", .target_set = TargetSet.initOne(.x86) } },
12679 .{ .tag = .__sev, .properties = .{ .param_str = "v", .language = .all_ms_languages, .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) } },
12680 .{ .tag = .__sevl, .properties = .{ .param_str = "v", .language = .all_ms_languages, .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) } },
12681 .{ .tag = .__sigsetjmp, .properties = .{ .param_str = "iSJi", .header = .setjmp, .attributes = .{ .allow_type_mismatch = true, .lib_function_without_prefix = true, .returns_twice = true } } },
12682 .{ .tag = .__sinpi, .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12683 .{ .tag = .__sinpif, .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12684 .{ .tag = .__sync_add_and_fetch, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12685 .{ .tag = .__sync_add_and_fetch_1, .properties = .{ .param_str = "ccD*c.", .attributes = .{ .custom_typecheck = true } } },
12686 .{ .tag = .__sync_add_and_fetch_16, .properties = .{ .param_str = "LLLiLLLiD*LLLi.", .attributes = .{ .custom_typecheck = true } } },
12687 .{ .tag = .__sync_add_and_fetch_2, .properties = .{ .param_str = "ssD*s.", .attributes = .{ .custom_typecheck = true } } },
12688 .{ .tag = .__sync_add_and_fetch_4, .properties = .{ .param_str = "iiD*i.", .attributes = .{ .custom_typecheck = true } } },
12689 .{ .tag = .__sync_add_and_fetch_8, .properties = .{ .param_str = "LLiLLiD*LLi.", .attributes = .{ .custom_typecheck = true } } },
12690 .{ .tag = .__sync_and_and_fetch, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12691 .{ .tag = .__sync_and_and_fetch_1, .properties = .{ .param_str = "ccD*c.", .attributes = .{ .custom_typecheck = true } } },
12692 .{ .tag = .__sync_and_and_fetch_16, .properties = .{ .param_str = "LLLiLLLiD*LLLi.", .attributes = .{ .custom_typecheck = true } } },
12693 .{ .tag = .__sync_and_and_fetch_2, .properties = .{ .param_str = "ssD*s.", .attributes = .{ .custom_typecheck = true } } },
12694 .{ .tag = .__sync_and_and_fetch_4, .properties = .{ .param_str = "iiD*i.", .attributes = .{ .custom_typecheck = true } } },
12695 .{ .tag = .__sync_and_and_fetch_8, .properties = .{ .param_str = "LLiLLiD*LLi.", .attributes = .{ .custom_typecheck = true } } },
12696 .{ .tag = .__sync_bool_compare_and_swap, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12697 .{ .tag = .__sync_bool_compare_and_swap_1, .properties = .{ .param_str = "bcD*cc.", .attributes = .{ .custom_typecheck = true } } },
12698 .{ .tag = .__sync_bool_compare_and_swap_16, .properties = .{ .param_str = "bLLLiD*LLLiLLLi.", .attributes = .{ .custom_typecheck = true } } },
12699 .{ .tag = .__sync_bool_compare_and_swap_2, .properties = .{ .param_str = "bsD*ss.", .attributes = .{ .custom_typecheck = true } } },
12700 .{ .tag = .__sync_bool_compare_and_swap_4, .properties = .{ .param_str = "biD*ii.", .attributes = .{ .custom_typecheck = true } } },
12701 .{ .tag = .__sync_bool_compare_and_swap_8, .properties = .{ .param_str = "bLLiD*LLiLLi.", .attributes = .{ .custom_typecheck = true } } },
12702 .{ .tag = .__sync_fetch_and_add, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12703 .{ .tag = .__sync_fetch_and_add_1, .properties = .{ .param_str = "ccD*c.", .attributes = .{ .custom_typecheck = true } } },
12704 .{ .tag = .__sync_fetch_and_add_16, .properties = .{ .param_str = "LLLiLLLiD*LLLi.", .attributes = .{ .custom_typecheck = true } } },
12705 .{ .tag = .__sync_fetch_and_add_2, .properties = .{ .param_str = "ssD*s.", .attributes = .{ .custom_typecheck = true } } },
12706 .{ .tag = .__sync_fetch_and_add_4, .properties = .{ .param_str = "iiD*i.", .attributes = .{ .custom_typecheck = true } } },
12707 .{ .tag = .__sync_fetch_and_add_8, .properties = .{ .param_str = "LLiLLiD*LLi.", .attributes = .{ .custom_typecheck = true } } },
12708 .{ .tag = .__sync_fetch_and_and, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12709 .{ .tag = .__sync_fetch_and_and_1, .properties = .{ .param_str = "ccD*c.", .attributes = .{ .custom_typecheck = true } } },
12710 .{ .tag = .__sync_fetch_and_and_16, .properties = .{ .param_str = "LLLiLLLiD*LLLi.", .attributes = .{ .custom_typecheck = true } } },
12711 .{ .tag = .__sync_fetch_and_and_2, .properties = .{ .param_str = "ssD*s.", .attributes = .{ .custom_typecheck = true } } },
12712 .{ .tag = .__sync_fetch_and_and_4, .properties = .{ .param_str = "iiD*i.", .attributes = .{ .custom_typecheck = true } } },
12713 .{ .tag = .__sync_fetch_and_and_8, .properties = .{ .param_str = "LLiLLiD*LLi.", .attributes = .{ .custom_typecheck = true } } },
12714 .{ .tag = .__sync_fetch_and_max, .properties = .{ .param_str = "iiD*i" } },
12715 .{ .tag = .__sync_fetch_and_min, .properties = .{ .param_str = "iiD*i" } },
12716 .{ .tag = .__sync_fetch_and_nand, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12717 .{ .tag = .__sync_fetch_and_nand_1, .properties = .{ .param_str = "ccD*c.", .attributes = .{ .custom_typecheck = true } } },
12718 .{ .tag = .__sync_fetch_and_nand_16, .properties = .{ .param_str = "LLLiLLLiD*LLLi.", .attributes = .{ .custom_typecheck = true } } },
12719 .{ .tag = .__sync_fetch_and_nand_2, .properties = .{ .param_str = "ssD*s.", .attributes = .{ .custom_typecheck = true } } },
12720 .{ .tag = .__sync_fetch_and_nand_4, .properties = .{ .param_str = "iiD*i.", .attributes = .{ .custom_typecheck = true } } },
12721 .{ .tag = .__sync_fetch_and_nand_8, .properties = .{ .param_str = "LLiLLiD*LLi.", .attributes = .{ .custom_typecheck = true } } },
12722 .{ .tag = .__sync_fetch_and_or, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12723 .{ .tag = .__sync_fetch_and_or_1, .properties = .{ .param_str = "ccD*c.", .attributes = .{ .custom_typecheck = true } } },
12724 .{ .tag = .__sync_fetch_and_or_16, .properties = .{ .param_str = "LLLiLLLiD*LLLi.", .attributes = .{ .custom_typecheck = true } } },
12725 .{ .tag = .__sync_fetch_and_or_2, .properties = .{ .param_str = "ssD*s.", .attributes = .{ .custom_typecheck = true } } },
12726 .{ .tag = .__sync_fetch_and_or_4, .properties = .{ .param_str = "iiD*i.", .attributes = .{ .custom_typecheck = true } } },
12727 .{ .tag = .__sync_fetch_and_or_8, .properties = .{ .param_str = "LLiLLiD*LLi.", .attributes = .{ .custom_typecheck = true } } },
12728 .{ .tag = .__sync_fetch_and_sub, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12729 .{ .tag = .__sync_fetch_and_sub_1, .properties = .{ .param_str = "ccD*c.", .attributes = .{ .custom_typecheck = true } } },
12730 .{ .tag = .__sync_fetch_and_sub_16, .properties = .{ .param_str = "LLLiLLLiD*LLLi.", .attributes = .{ .custom_typecheck = true } } },
12731 .{ .tag = .__sync_fetch_and_sub_2, .properties = .{ .param_str = "ssD*s.", .attributes = .{ .custom_typecheck = true } } },
12732 .{ .tag = .__sync_fetch_and_sub_4, .properties = .{ .param_str = "iiD*i.", .attributes = .{ .custom_typecheck = true } } },
12733 .{ .tag = .__sync_fetch_and_sub_8, .properties = .{ .param_str = "LLiLLiD*LLi.", .attributes = .{ .custom_typecheck = true } } },
12734 .{ .tag = .__sync_fetch_and_umax, .properties = .{ .param_str = "UiUiD*Ui" } },
12735 .{ .tag = .__sync_fetch_and_umin, .properties = .{ .param_str = "UiUiD*Ui" } },
12736 .{ .tag = .__sync_fetch_and_xor, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12737 .{ .tag = .__sync_fetch_and_xor_1, .properties = .{ .param_str = "ccD*c.", .attributes = .{ .custom_typecheck = true } } },
12738 .{ .tag = .__sync_fetch_and_xor_16, .properties = .{ .param_str = "LLLiLLLiD*LLLi.", .attributes = .{ .custom_typecheck = true } } },
12739 .{ .tag = .__sync_fetch_and_xor_2, .properties = .{ .param_str = "ssD*s.", .attributes = .{ .custom_typecheck = true } } },
12740 .{ .tag = .__sync_fetch_and_xor_4, .properties = .{ .param_str = "iiD*i.", .attributes = .{ .custom_typecheck = true } } },
12741 .{ .tag = .__sync_fetch_and_xor_8, .properties = .{ .param_str = "LLiLLiD*LLi.", .attributes = .{ .custom_typecheck = true } } },
12742 .{ .tag = .__sync_lock_release, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12743 .{ .tag = .__sync_lock_release_1, .properties = .{ .param_str = "vcD*.", .attributes = .{ .custom_typecheck = true } } },
12744 .{ .tag = .__sync_lock_release_16, .properties = .{ .param_str = "vLLLiD*.", .attributes = .{ .custom_typecheck = true } } },
12745 .{ .tag = .__sync_lock_release_2, .properties = .{ .param_str = "vsD*.", .attributes = .{ .custom_typecheck = true } } },
12746 .{ .tag = .__sync_lock_release_4, .properties = .{ .param_str = "viD*.", .attributes = .{ .custom_typecheck = true } } },
12747 .{ .tag = .__sync_lock_release_8, .properties = .{ .param_str = "vLLiD*.", .attributes = .{ .custom_typecheck = true } } },
12748 .{ .tag = .__sync_lock_test_and_set, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12749 .{ .tag = .__sync_lock_test_and_set_1, .properties = .{ .param_str = "ccD*c.", .attributes = .{ .custom_typecheck = true } } },
12750 .{ .tag = .__sync_lock_test_and_set_16, .properties = .{ .param_str = "LLLiLLLiD*LLLi.", .attributes = .{ .custom_typecheck = true } } },
12751 .{ .tag = .__sync_lock_test_and_set_2, .properties = .{ .param_str = "ssD*s.", .attributes = .{ .custom_typecheck = true } } },
12752 .{ .tag = .__sync_lock_test_and_set_4, .properties = .{ .param_str = "iiD*i.", .attributes = .{ .custom_typecheck = true } } },
12753 .{ .tag = .__sync_lock_test_and_set_8, .properties = .{ .param_str = "LLiLLiD*LLi.", .attributes = .{ .custom_typecheck = true } } },
12754 .{ .tag = .__sync_nand_and_fetch, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12755 .{ .tag = .__sync_nand_and_fetch_1, .properties = .{ .param_str = "ccD*c.", .attributes = .{ .custom_typecheck = true } } },
12756 .{ .tag = .__sync_nand_and_fetch_16, .properties = .{ .param_str = "LLLiLLLiD*LLLi.", .attributes = .{ .custom_typecheck = true } } },
12757 .{ .tag = .__sync_nand_and_fetch_2, .properties = .{ .param_str = "ssD*s.", .attributes = .{ .custom_typecheck = true } } },
12758 .{ .tag = .__sync_nand_and_fetch_4, .properties = .{ .param_str = "iiD*i.", .attributes = .{ .custom_typecheck = true } } },
12759 .{ .tag = .__sync_nand_and_fetch_8, .properties = .{ .param_str = "LLiLLiD*LLi.", .attributes = .{ .custom_typecheck = true } } },
12760 .{ .tag = .__sync_or_and_fetch, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12761 .{ .tag = .__sync_or_and_fetch_1, .properties = .{ .param_str = "ccD*c.", .attributes = .{ .custom_typecheck = true } } },
12762 .{ .tag = .__sync_or_and_fetch_16, .properties = .{ .param_str = "LLLiLLLiD*LLLi.", .attributes = .{ .custom_typecheck = true } } },
12763 .{ .tag = .__sync_or_and_fetch_2, .properties = .{ .param_str = "ssD*s.", .attributes = .{ .custom_typecheck = true } } },
12764 .{ .tag = .__sync_or_and_fetch_4, .properties = .{ .param_str = "iiD*i.", .attributes = .{ .custom_typecheck = true } } },
12765 .{ .tag = .__sync_or_and_fetch_8, .properties = .{ .param_str = "LLiLLiD*LLi.", .attributes = .{ .custom_typecheck = true } } },
12766 .{ .tag = .__sync_sub_and_fetch, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12767 .{ .tag = .__sync_sub_and_fetch_1, .properties = .{ .param_str = "ccD*c.", .attributes = .{ .custom_typecheck = true } } },
12768 .{ .tag = .__sync_sub_and_fetch_16, .properties = .{ .param_str = "LLLiLLLiD*LLLi.", .attributes = .{ .custom_typecheck = true } } },
12769 .{ .tag = .__sync_sub_and_fetch_2, .properties = .{ .param_str = "ssD*s.", .attributes = .{ .custom_typecheck = true } } },
12770 .{ .tag = .__sync_sub_and_fetch_4, .properties = .{ .param_str = "iiD*i.", .attributes = .{ .custom_typecheck = true } } },
12771 .{ .tag = .__sync_sub_and_fetch_8, .properties = .{ .param_str = "LLiLLiD*LLi.", .attributes = .{ .custom_typecheck = true } } },
12772 .{ .tag = .__sync_swap, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12773 .{ .tag = .__sync_swap_1, .properties = .{ .param_str = "ccD*c.", .attributes = .{ .custom_typecheck = true } } },
12774 .{ .tag = .__sync_swap_16, .properties = .{ .param_str = "LLLiLLLiD*LLLi.", .attributes = .{ .custom_typecheck = true } } },
12775 .{ .tag = .__sync_swap_2, .properties = .{ .param_str = "ssD*s.", .attributes = .{ .custom_typecheck = true } } },
12776 .{ .tag = .__sync_swap_4, .properties = .{ .param_str = "iiD*i.", .attributes = .{ .custom_typecheck = true } } },
12777 .{ .tag = .__sync_swap_8, .properties = .{ .param_str = "LLiLLiD*LLi.", .attributes = .{ .custom_typecheck = true } } },
12778 .{ .tag = .__sync_synchronize, .properties = .{ .param_str = "v" } },
12779 .{ .tag = .__sync_val_compare_and_swap, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12780 .{ .tag = .__sync_val_compare_and_swap_1, .properties = .{ .param_str = "ccD*cc.", .attributes = .{ .custom_typecheck = true } } },
12781 .{ .tag = .__sync_val_compare_and_swap_16, .properties = .{ .param_str = "LLLiLLLiD*LLLiLLLi.", .attributes = .{ .custom_typecheck = true } } },
12782 .{ .tag = .__sync_val_compare_and_swap_2, .properties = .{ .param_str = "ssD*ss.", .attributes = .{ .custom_typecheck = true } } },
12783 .{ .tag = .__sync_val_compare_and_swap_4, .properties = .{ .param_str = "iiD*ii.", .attributes = .{ .custom_typecheck = true } } },
12784 .{ .tag = .__sync_val_compare_and_swap_8, .properties = .{ .param_str = "LLiLLiD*LLiLLi.", .attributes = .{ .custom_typecheck = true } } },
12785 .{ .tag = .__sync_xor_and_fetch, .properties = .{ .param_str = "v.", .attributes = .{ .custom_typecheck = true } } },
12786 .{ .tag = .__sync_xor_and_fetch_1, .properties = .{ .param_str = "ccD*c.", .attributes = .{ .custom_typecheck = true } } },
12787 .{ .tag = .__sync_xor_and_fetch_16, .properties = .{ .param_str = "LLLiLLLiD*LLLi.", .attributes = .{ .custom_typecheck = true } } },
12788 .{ .tag = .__sync_xor_and_fetch_2, .properties = .{ .param_str = "ssD*s.", .attributes = .{ .custom_typecheck = true } } },
12789 .{ .tag = .__sync_xor_and_fetch_4, .properties = .{ .param_str = "iiD*i.", .attributes = .{ .custom_typecheck = true } } },
12790 .{ .tag = .__sync_xor_and_fetch_8, .properties = .{ .param_str = "LLiLLiD*LLi.", .attributes = .{ .custom_typecheck = true } } },
12791 .{ .tag = .__syncthreads, .properties = .{ .param_str = "v", .target_set = TargetSet.initOne(.nvptx) } },
12792 .{ .tag = .__tanpi, .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12793 .{ .tag = .__tanpif, .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12794 .{ .tag = .__va_start, .properties = .{ .param_str = "vc**.", .language = .all_ms_languages, .attributes = .{ .custom_typecheck = true } } },
12795 .{ .tag = .__warn_memset_zero_len, .properties = .{ .param_str = "v", .attributes = .{ .pure = true } } },
12796 .{ .tag = .__wfe, .properties = .{ .param_str = "v", .language = .all_ms_languages, .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) } },
12797 .{ .tag = .__wfi, .properties = .{ .param_str = "v", .language = .all_ms_languages, .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) } },
12798 .{ .tag = .__xray_customevent, .properties = .{ .param_str = "vcC*z" } },
12799 .{ .tag = .__xray_typedevent, .properties = .{ .param_str = "vzcC*z" } },
12800 .{ .tag = .__yield, .properties = .{ .param_str = "v", .language = .all_ms_languages, .target_set = TargetSet.initMany(&.{ .aarch64, .arm }) } },
12801 .{ .tag = ._abnormal_termination, .properties = .{ .param_str = "i", .language = .all_ms_languages } },
12802 .{ .tag = ._alloca, .properties = .{ .param_str = "v*z", .language = .all_ms_languages } },
12803 .{ .tag = ._bittest, .properties = .{ .param_str = "UcNiC*Ni", .language = .all_ms_languages } },
12804 .{ .tag = ._bittest64, .properties = .{ .param_str = "UcWiC*Wi", .language = .all_ms_languages } },
12805 .{ .tag = ._bittestandcomplement, .properties = .{ .param_str = "UcNi*Ni", .language = .all_ms_languages } },
12806 .{ .tag = ._bittestandcomplement64, .properties = .{ .param_str = "UcWi*Wi", .language = .all_ms_languages } },
12807 .{ .tag = ._bittestandreset, .properties = .{ .param_str = "UcNi*Ni", .language = .all_ms_languages } },
12808 .{ .tag = ._bittestandreset64, .properties = .{ .param_str = "UcWi*Wi", .language = .all_ms_languages } },
12809 .{ .tag = ._bittestandset, .properties = .{ .param_str = "UcNi*Ni", .language = .all_ms_languages } },
12810 .{ .tag = ._bittestandset64, .properties = .{ .param_str = "UcWi*Wi", .language = .all_ms_languages } },
12811 .{ .tag = ._byteswap_uint64, .properties = .{ .param_str = "ULLiULLi", .header = .stdlib, .language = .all_ms_languages, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12812 .{ .tag = ._byteswap_ulong, .properties = .{ .param_str = "UNiUNi", .header = .stdlib, .language = .all_ms_languages, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12813 .{ .tag = ._byteswap_ushort, .properties = .{ .param_str = "UsUs", .header = .stdlib, .language = .all_ms_languages, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12814 .{ .tag = ._exception_code, .properties = .{ .param_str = "UNi", .language = .all_ms_languages } },
12815 .{ .tag = ._exception_info, .properties = .{ .param_str = "v*", .language = .all_ms_languages } },
12816 .{ .tag = ._exit, .properties = .{ .param_str = "vi", .header = .unistd, .language = .all_gnu_languages, .attributes = .{ .noreturn = true, .lib_function_without_prefix = true } } },
12817 .{ .tag = ._interlockedbittestandreset, .properties = .{ .param_str = "UcNiD*Ni", .language = .all_ms_languages } },
12818 .{ .tag = ._interlockedbittestandreset64, .properties = .{ .param_str = "UcWiD*Wi", .language = .all_ms_languages } },
12819 .{ .tag = ._interlockedbittestandreset_acq, .properties = .{ .param_str = "UcNiD*Ni", .language = .all_ms_languages } },
12820 .{ .tag = ._interlockedbittestandreset_nf, .properties = .{ .param_str = "UcNiD*Ni", .language = .all_ms_languages } },
12821 .{ .tag = ._interlockedbittestandreset_rel, .properties = .{ .param_str = "UcNiD*Ni", .language = .all_ms_languages } },
12822 .{ .tag = ._interlockedbittestandset, .properties = .{ .param_str = "UcNiD*Ni", .language = .all_ms_languages } },
12823 .{ .tag = ._interlockedbittestandset64, .properties = .{ .param_str = "UcWiD*Wi", .language = .all_ms_languages } },
12824 .{ .tag = ._interlockedbittestandset_acq, .properties = .{ .param_str = "UcNiD*Ni", .language = .all_ms_languages } },
12825 .{ .tag = ._interlockedbittestandset_nf, .properties = .{ .param_str = "UcNiD*Ni", .language = .all_ms_languages } },
12826 .{ .tag = ._interlockedbittestandset_rel, .properties = .{ .param_str = "UcNiD*Ni", .language = .all_ms_languages } },
12827 .{ .tag = ._longjmp, .properties = .{ .param_str = "vJi", .header = .setjmp, .language = .all_gnu_languages, .attributes = .{ .noreturn = true, .allow_type_mismatch = true, .lib_function_without_prefix = true } } },
12828 .{ .tag = ._lrotl, .properties = .{ .param_str = "ULiULii", .language = .all_ms_languages, .attributes = .{ .const_evaluable = true } } },
12829 .{ .tag = ._lrotr, .properties = .{ .param_str = "ULiULii", .language = .all_ms_languages, .attributes = .{ .const_evaluable = true } } },
12830 .{ .tag = ._rotl, .properties = .{ .param_str = "UiUii", .language = .all_ms_languages, .attributes = .{ .const_evaluable = true } } },
12831 .{ .tag = ._rotl16, .properties = .{ .param_str = "UsUsUc", .language = .all_ms_languages, .attributes = .{ .const_evaluable = true } } },
12832 .{ .tag = ._rotl64, .properties = .{ .param_str = "UWiUWii", .language = .all_ms_languages, .attributes = .{ .const_evaluable = true } } },
12833 .{ .tag = ._rotl8, .properties = .{ .param_str = "UcUcUc", .language = .all_ms_languages, .attributes = .{ .const_evaluable = true } } },
12834 .{ .tag = ._rotr, .properties = .{ .param_str = "UiUii", .language = .all_ms_languages, .attributes = .{ .const_evaluable = true } } },
12835 .{ .tag = ._rotr16, .properties = .{ .param_str = "UsUsUc", .language = .all_ms_languages, .attributes = .{ .const_evaluable = true } } },
12836 .{ .tag = ._rotr64, .properties = .{ .param_str = "UWiUWii", .language = .all_ms_languages, .attributes = .{ .const_evaluable = true } } },
12837 .{ .tag = ._rotr8, .properties = .{ .param_str = "UcUcUc", .language = .all_ms_languages, .attributes = .{ .const_evaluable = true } } },
12838 .{ .tag = ._setjmp, .properties = .{ .param_str = "iJ", .header = .setjmp, .attributes = .{ .allow_type_mismatch = true, .lib_function_without_prefix = true, .returns_twice = true } } },
12839 .{ .tag = ._setjmpex, .properties = .{ .param_str = "iJ", .header = .setjmpex, .language = .all_ms_languages, .attributes = .{ .allow_type_mismatch = true, .lib_function_without_prefix = true, .returns_twice = true } } },
12840 .{ .tag = .abort, .properties = .{ .param_str = "v", .header = .stdlib, .attributes = .{ .noreturn = true, .lib_function_without_prefix = true } } },
12841 .{ .tag = .abs, .properties = .{ .param_str = "ii", .header = .stdlib, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12842 .{ .tag = .acos, .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12843 .{ .tag = .acosf, .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12844 .{ .tag = .acosh, .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12845 .{ .tag = .acoshf, .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12846 .{ .tag = .acoshl, .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12847 .{ .tag = .acosl, .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12848 .{ .tag = .aligned_alloc, .properties = .{ .param_str = "v*zz", .header = .stdlib, .attributes = .{ .lib_function_without_prefix = true } } },
12849 .{ .tag = .alloca, .properties = .{ .param_str = "v*z", .header = .stdlib, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } },
12850 .{ .tag = .asin, .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12851 .{ .tag = .asinf, .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12852 .{ .tag = .asinh, .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12853 .{ .tag = .asinhf, .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12854 .{ .tag = .asinhl, .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12855 .{ .tag = .asinl, .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12856 .{ .tag = .atan, .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12857 .{ .tag = .atan2, .properties = .{ .param_str = "ddd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12858 .{ .tag = .atan2f, .properties = .{ .param_str = "fff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12859 .{ .tag = .atan2l, .properties = .{ .param_str = "LdLdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12860 .{ .tag = .atanf, .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12861 .{ .tag = .atanh, .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12862 .{ .tag = .atanhf, .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12863 .{ .tag = .atanhl, .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12864 .{ .tag = .atanl, .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12865 .{ .tag = .bcmp, .properties = .{ .param_str = "ivC*vC*z", .header = .strings, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } },
12866 .{ .tag = .bcopy, .properties = .{ .param_str = "vvC*v*z", .header = .strings, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } },
12867 .{ .tag = .bzero, .properties = .{ .param_str = "vv*z", .header = .strings, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } },
12868 .{ .tag = .cabs, .properties = .{ .param_str = "dXd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12869 .{ .tag = .cabsf, .properties = .{ .param_str = "fXf", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12870 .{ .tag = .cabsl, .properties = .{ .param_str = "LdXLd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12871 .{ .tag = .cacos, .properties = .{ .param_str = "XdXd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12872 .{ .tag = .cacosf, .properties = .{ .param_str = "XfXf", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12873 .{ .tag = .cacosh, .properties = .{ .param_str = "XdXd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12874 .{ .tag = .cacoshf, .properties = .{ .param_str = "XfXf", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12875 .{ .tag = .cacoshl, .properties = .{ .param_str = "XLdXLd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12876 .{ .tag = .cacosl, .properties = .{ .param_str = "XLdXLd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12877 .{ .tag = .calloc, .properties = .{ .param_str = "v*zz", .header = .stdlib, .attributes = .{ .lib_function_without_prefix = true } } },
12878 .{ .tag = .carg, .properties = .{ .param_str = "dXd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12879 .{ .tag = .cargf, .properties = .{ .param_str = "fXf", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12880 .{ .tag = .cargl, .properties = .{ .param_str = "LdXLd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12881 .{ .tag = .casin, .properties = .{ .param_str = "XdXd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12882 .{ .tag = .casinf, .properties = .{ .param_str = "XfXf", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12883 .{ .tag = .casinh, .properties = .{ .param_str = "XdXd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12884 .{ .tag = .casinhf, .properties = .{ .param_str = "XfXf", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12885 .{ .tag = .casinhl, .properties = .{ .param_str = "XLdXLd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12886 .{ .tag = .casinl, .properties = .{ .param_str = "XLdXLd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12887 .{ .tag = .catan, .properties = .{ .param_str = "XdXd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12888 .{ .tag = .catanf, .properties = .{ .param_str = "XfXf", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12889 .{ .tag = .catanh, .properties = .{ .param_str = "XdXd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12890 .{ .tag = .catanhf, .properties = .{ .param_str = "XfXf", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12891 .{ .tag = .catanhl, .properties = .{ .param_str = "XLdXLd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12892 .{ .tag = .catanl, .properties = .{ .param_str = "XLdXLd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12893 .{ .tag = .cbrt, .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12894 .{ .tag = .cbrtf, .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12895 .{ .tag = .cbrtl, .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12896 .{ .tag = .ccos, .properties = .{ .param_str = "XdXd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12897 .{ .tag = .ccosf, .properties = .{ .param_str = "XfXf", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12898 .{ .tag = .ccosh, .properties = .{ .param_str = "XdXd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12899 .{ .tag = .ccoshf, .properties = .{ .param_str = "XfXf", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12900 .{ .tag = .ccoshl, .properties = .{ .param_str = "XLdXLd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12901 .{ .tag = .ccosl, .properties = .{ .param_str = "XLdXLd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12902 .{ .tag = .ceil, .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12903 .{ .tag = .ceilf, .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12904 .{ .tag = .ceill, .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12905 .{ .tag = .cexp, .properties = .{ .param_str = "XdXd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12906 .{ .tag = .cexpf, .properties = .{ .param_str = "XfXf", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12907 .{ .tag = .cexpl, .properties = .{ .param_str = "XLdXLd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12908 .{ .tag = .cimag, .properties = .{ .param_str = "dXd", .header = .complex, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12909 .{ .tag = .cimagf, .properties = .{ .param_str = "fXf", .header = .complex, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12910 .{ .tag = .cimagl, .properties = .{ .param_str = "LdXLd", .header = .complex, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12911 .{ .tag = .clog, .properties = .{ .param_str = "XdXd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12912 .{ .tag = .clogf, .properties = .{ .param_str = "XfXf", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12913 .{ .tag = .clogl, .properties = .{ .param_str = "XLdXLd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12914 .{ .tag = .conj, .properties = .{ .param_str = "XdXd", .header = .complex, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12915 .{ .tag = .conjf, .properties = .{ .param_str = "XfXf", .header = .complex, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12916 .{ .tag = .conjl, .properties = .{ .param_str = "XLdXLd", .header = .complex, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12917 .{ .tag = .copysign, .properties = .{ .param_str = "ddd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12918 .{ .tag = .copysignf, .properties = .{ .param_str = "fff", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12919 .{ .tag = .copysignl, .properties = .{ .param_str = "LdLdLd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12920 .{ .tag = .cos, .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12921 .{ .tag = .cosf, .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12922 .{ .tag = .cosh, .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12923 .{ .tag = .coshf, .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12924 .{ .tag = .coshl, .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12925 .{ .tag = .cosl, .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12926 .{ .tag = .cpow, .properties = .{ .param_str = "XdXdXd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12927 .{ .tag = .cpowf, .properties = .{ .param_str = "XfXfXf", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12928 .{ .tag = .cpowl, .properties = .{ .param_str = "XLdXLdXLd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12929 .{ .tag = .cproj, .properties = .{ .param_str = "XdXd", .header = .complex, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12930 .{ .tag = .cprojf, .properties = .{ .param_str = "XfXf", .header = .complex, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12931 .{ .tag = .cprojl, .properties = .{ .param_str = "XLdXLd", .header = .complex, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12932 .{ .tag = .creal, .properties = .{ .param_str = "dXd", .header = .complex, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12933 .{ .tag = .crealf, .properties = .{ .param_str = "fXf", .header = .complex, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12934 .{ .tag = .creall, .properties = .{ .param_str = "LdXLd", .header = .complex, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12935 .{ .tag = .csin, .properties = .{ .param_str = "XdXd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12936 .{ .tag = .csinf, .properties = .{ .param_str = "XfXf", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12937 .{ .tag = .csinh, .properties = .{ .param_str = "XdXd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12938 .{ .tag = .csinhf, .properties = .{ .param_str = "XfXf", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12939 .{ .tag = .csinhl, .properties = .{ .param_str = "XLdXLd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12940 .{ .tag = .csinl, .properties = .{ .param_str = "XLdXLd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12941 .{ .tag = .csqrt, .properties = .{ .param_str = "XdXd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12942 .{ .tag = .csqrtf, .properties = .{ .param_str = "XfXf", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12943 .{ .tag = .csqrtl, .properties = .{ .param_str = "XLdXLd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12944 .{ .tag = .ctan, .properties = .{ .param_str = "XdXd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12945 .{ .tag = .ctanf, .properties = .{ .param_str = "XfXf", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12946 .{ .tag = .ctanh, .properties = .{ .param_str = "XdXd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12947 .{ .tag = .ctanhf, .properties = .{ .param_str = "XfXf", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12948 .{ .tag = .ctanhl, .properties = .{ .param_str = "XLdXLd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12949 .{ .tag = .ctanl, .properties = .{ .param_str = "XLdXLd", .header = .complex, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12950 .{ .tag = .erf, .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12951 .{ .tag = .erfc, .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12952 .{ .tag = .erfcf, .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12953 .{ .tag = .erfcl, .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12954 .{ .tag = .erff, .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12955 .{ .tag = .erfl, .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12956 .{ .tag = .exit, .properties = .{ .param_str = "vi", .header = .stdlib, .attributes = .{ .noreturn = true, .lib_function_without_prefix = true } } },
12957 .{ .tag = .exp, .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12958 .{ .tag = .exp2, .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12959 .{ .tag = .exp2f, .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12960 .{ .tag = .exp2l, .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12961 .{ .tag = .expf, .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12962 .{ .tag = .expl, .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12963 .{ .tag = .expm1, .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12964 .{ .tag = .expm1f, .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12965 .{ .tag = .expm1l, .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12966 .{ .tag = .fabs, .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12967 .{ .tag = .fabsf, .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12968 .{ .tag = .fabsl, .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12969 .{ .tag = .fdim, .properties = .{ .param_str = "ddd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12970 .{ .tag = .fdimf, .properties = .{ .param_str = "fff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12971 .{ .tag = .fdiml, .properties = .{ .param_str = "LdLdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12972 .{ .tag = .finite, .properties = .{ .param_str = "id", .header = .math, .language = .gnu_lang, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12973 .{ .tag = .finitef, .properties = .{ .param_str = "if", .header = .math, .language = .gnu_lang, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12974 .{ .tag = .finitel, .properties = .{ .param_str = "iLd", .header = .math, .language = .gnu_lang, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12975 .{ .tag = .floor, .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12976 .{ .tag = .floorf, .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12977 .{ .tag = .floorl, .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12978 .{ .tag = .fma, .properties = .{ .param_str = "dddd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12979 .{ .tag = .fmaf, .properties = .{ .param_str = "ffff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12980 .{ .tag = .fmal, .properties = .{ .param_str = "LdLdLdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12981 .{ .tag = .fmax, .properties = .{ .param_str = "ddd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12982 .{ .tag = .fmaxf, .properties = .{ .param_str = "fff", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12983 .{ .tag = .fmaxl, .properties = .{ .param_str = "LdLdLd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12984 .{ .tag = .fmin, .properties = .{ .param_str = "ddd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12985 .{ .tag = .fminf, .properties = .{ .param_str = "fff", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12986 .{ .tag = .fminl, .properties = .{ .param_str = "LdLdLd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
12987 .{ .tag = .fmod, .properties = .{ .param_str = "ddd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12988 .{ .tag = .fmodf, .properties = .{ .param_str = "fff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12989 .{ .tag = .fmodl, .properties = .{ .param_str = "LdLdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
12990 .{ .tag = .fopen, .properties = .{ .param_str = "P*cC*cC*", .header = .stdio, .attributes = .{ .lib_function_without_prefix = true } } },
12991 .{ .tag = .fprintf, .properties = .{ .param_str = "iP*cC*.", .header = .stdio, .attributes = .{ .lib_function_without_prefix = true, .format_kind = .printf, .format_string_position = 1 } } },
12992 .{ .tag = .fread, .properties = .{ .param_str = "zv*zzP*", .header = .stdio, .attributes = .{ .lib_function_without_prefix = true } } },
12993 .{ .tag = .free, .properties = .{ .param_str = "vv*", .header = .stdlib, .attributes = .{ .lib_function_without_prefix = true } } },
12994 .{ .tag = .frexp, .properties = .{ .param_str = "ddi*", .header = .math, .attributes = .{ .lib_function_without_prefix = true } } },
12995 .{ .tag = .frexpf, .properties = .{ .param_str = "ffi*", .header = .math, .attributes = .{ .lib_function_without_prefix = true } } },
12996 .{ .tag = .frexpl, .properties = .{ .param_str = "LdLdi*", .header = .math, .attributes = .{ .lib_function_without_prefix = true } } },
12997 .{ .tag = .fscanf, .properties = .{ .param_str = "iP*RcC*R.", .header = .stdio, .attributes = .{ .lib_function_without_prefix = true, .format_kind = .scanf, .format_string_position = 1 } } },
12998 .{ .tag = .fwrite, .properties = .{ .param_str = "zvC*zzP*", .header = .stdio, .attributes = .{ .lib_function_without_prefix = true } } },
12999 .{ .tag = .getcontext, .properties = .{ .param_str = "iK*", .header = .setjmp, .attributes = .{ .allow_type_mismatch = true, .lib_function_without_prefix = true, .returns_twice = true } } },
13000 .{ .tag = .hypot, .properties = .{ .param_str = "ddd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13001 .{ .tag = .hypotf, .properties = .{ .param_str = "fff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13002 .{ .tag = .hypotl, .properties = .{ .param_str = "LdLdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13003 .{ .tag = .ilogb, .properties = .{ .param_str = "id", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13004 .{ .tag = .ilogbf, .properties = .{ .param_str = "if", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13005 .{ .tag = .ilogbl, .properties = .{ .param_str = "iLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13006 .{ .tag = .index, .properties = .{ .param_str = "c*cC*i", .header = .strings, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } },
13007 .{ .tag = .isalnum, .properties = .{ .param_str = "ii", .header = .ctype, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } },
13008 .{ .tag = .isalpha, .properties = .{ .param_str = "ii", .header = .ctype, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } },
13009 .{ .tag = .isblank, .properties = .{ .param_str = "ii", .header = .ctype, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } },
13010 .{ .tag = .iscntrl, .properties = .{ .param_str = "ii", .header = .ctype, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } },
13011 .{ .tag = .isdigit, .properties = .{ .param_str = "ii", .header = .ctype, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } },
13012 .{ .tag = .isgraph, .properties = .{ .param_str = "ii", .header = .ctype, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } },
13013 .{ .tag = .islower, .properties = .{ .param_str = "ii", .header = .ctype, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } },
13014 .{ .tag = .isprint, .properties = .{ .param_str = "ii", .header = .ctype, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } },
13015 .{ .tag = .ispunct, .properties = .{ .param_str = "ii", .header = .ctype, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } },
13016 .{ .tag = .isspace, .properties = .{ .param_str = "ii", .header = .ctype, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } },
13017 .{ .tag = .isupper, .properties = .{ .param_str = "ii", .header = .ctype, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } },
13018 .{ .tag = .isxdigit, .properties = .{ .param_str = "ii", .header = .ctype, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } },
13019 .{ .tag = .labs, .properties = .{ .param_str = "LiLi", .header = .stdlib, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
13020 .{ .tag = .ldexp, .properties = .{ .param_str = "ddi", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13021 .{ .tag = .ldexpf, .properties = .{ .param_str = "ffi", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13022 .{ .tag = .ldexpl, .properties = .{ .param_str = "LdLdi", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13023 .{ .tag = .lgamma, .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true } } },
13024 .{ .tag = .lgammaf, .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true } } },
13025 .{ .tag = .lgammal, .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true } } },
13026 .{ .tag = .llabs, .properties = .{ .param_str = "LLiLLi", .header = .stdlib, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
13027 .{ .tag = .llrint, .properties = .{ .param_str = "LLid", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13028 .{ .tag = .llrintf, .properties = .{ .param_str = "LLif", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13029 .{ .tag = .llrintl, .properties = .{ .param_str = "LLiLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13030 .{ .tag = .llround, .properties = .{ .param_str = "LLid", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13031 .{ .tag = .llroundf, .properties = .{ .param_str = "LLif", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13032 .{ .tag = .llroundl, .properties = .{ .param_str = "LLiLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13033 .{ .tag = .log, .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13034 .{ .tag = .log10, .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13035 .{ .tag = .log10f, .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13036 .{ .tag = .log10l, .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13037 .{ .tag = .log1p, .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13038 .{ .tag = .log1pf, .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13039 .{ .tag = .log1pl, .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13040 .{ .tag = .log2, .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13041 .{ .tag = .log2f, .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13042 .{ .tag = .log2l, .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13043 .{ .tag = .logb, .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13044 .{ .tag = .logbf, .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13045 .{ .tag = .logbl, .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13046 .{ .tag = .logf, .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13047 .{ .tag = .logl, .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13048 .{ .tag = .longjmp, .properties = .{ .param_str = "vJi", .header = .setjmp, .attributes = .{ .noreturn = true, .allow_type_mismatch = true, .lib_function_without_prefix = true } } },
13049 .{ .tag = .lrint, .properties = .{ .param_str = "Lid", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13050 .{ .tag = .lrintf, .properties = .{ .param_str = "Lif", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13051 .{ .tag = .lrintl, .properties = .{ .param_str = "LiLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13052 .{ .tag = .lround, .properties = .{ .param_str = "Lid", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13053 .{ .tag = .lroundf, .properties = .{ .param_str = "Lif", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13054 .{ .tag = .lroundl, .properties = .{ .param_str = "LiLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13055 .{ .tag = .malloc, .properties = .{ .param_str = "v*z", .header = .stdlib, .attributes = .{ .lib_function_without_prefix = true } } },
13056 .{ .tag = .memalign, .properties = .{ .param_str = "v*zz", .header = .malloc, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } },
13057 .{ .tag = .memccpy, .properties = .{ .param_str = "v*v*vC*iz", .header = .string, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } },
13058 .{ .tag = .memchr, .properties = .{ .param_str = "v*vC*iz", .header = .string, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } },
13059 .{ .tag = .memcmp, .properties = .{ .param_str = "ivC*vC*z", .header = .string, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } },
13060 .{ .tag = .memcpy, .properties = .{ .param_str = "v*v*vC*z", .header = .string, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } },
13061 .{ .tag = .memmove, .properties = .{ .param_str = "v*v*vC*z", .header = .string, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } },
13062 .{ .tag = .mempcpy, .properties = .{ .param_str = "v*v*vC*z", .header = .string, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } },
13063 .{ .tag = .memset, .properties = .{ .param_str = "v*v*iz", .header = .string, .attributes = .{ .lib_function_without_prefix = true } } },
13064 .{ .tag = .modf, .properties = .{ .param_str = "ddd*", .header = .math, .attributes = .{ .lib_function_without_prefix = true } } },
13065 .{ .tag = .modff, .properties = .{ .param_str = "fff*", .header = .math, .attributes = .{ .lib_function_without_prefix = true } } },
13066 .{ .tag = .modfl, .properties = .{ .param_str = "LdLdLd*", .header = .math, .attributes = .{ .lib_function_without_prefix = true } } },
13067 .{ .tag = .nan, .properties = .{ .param_str = "dcC*", .header = .math, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } },
13068 .{ .tag = .nanf, .properties = .{ .param_str = "fcC*", .header = .math, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } },
13069 .{ .tag = .nanl, .properties = .{ .param_str = "LdcC*", .header = .math, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } },
13070 .{ .tag = .nearbyint, .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
13071 .{ .tag = .nearbyintf, .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
13072 .{ .tag = .nearbyintl, .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
13073 .{ .tag = .nextafter, .properties = .{ .param_str = "ddd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13074 .{ .tag = .nextafterf, .properties = .{ .param_str = "fff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13075 .{ .tag = .nextafterl, .properties = .{ .param_str = "LdLdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13076 .{ .tag = .nexttoward, .properties = .{ .param_str = "ddLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13077 .{ .tag = .nexttowardf, .properties = .{ .param_str = "ffLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13078 .{ .tag = .nexttowardl, .properties = .{ .param_str = "LdLdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13079 .{ .tag = .pow, .properties = .{ .param_str = "ddd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13080 .{ .tag = .powf, .properties = .{ .param_str = "fff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13081 .{ .tag = .powl, .properties = .{ .param_str = "LdLdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13082 .{ .tag = .printf, .properties = .{ .param_str = "icC*.", .header = .stdio, .attributes = .{ .lib_function_without_prefix = true, .format_kind = .printf } } },
13083 .{ .tag = .realloc, .properties = .{ .param_str = "v*v*z", .header = .stdlib, .attributes = .{ .lib_function_without_prefix = true } } },
13084 .{ .tag = .remainder, .properties = .{ .param_str = "ddd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13085 .{ .tag = .remainderf, .properties = .{ .param_str = "fff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13086 .{ .tag = .remainderl, .properties = .{ .param_str = "LdLdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13087 .{ .tag = .remquo, .properties = .{ .param_str = "dddi*", .header = .math, .attributes = .{ .lib_function_without_prefix = true } } },
13088 .{ .tag = .remquof, .properties = .{ .param_str = "fffi*", .header = .math, .attributes = .{ .lib_function_without_prefix = true } } },
13089 .{ .tag = .remquol, .properties = .{ .param_str = "LdLdLdi*", .header = .math, .attributes = .{ .lib_function_without_prefix = true } } },
13090 .{ .tag = .rindex, .properties = .{ .param_str = "c*cC*i", .header = .strings, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } },
13091 .{ .tag = .rint, .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_fp_exceptions = true } } },
13092 .{ .tag = .rintf, .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_fp_exceptions = true } } },
13093 .{ .tag = .rintl, .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_fp_exceptions = true } } },
13094 .{ .tag = .round, .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
13095 .{ .tag = .roundeven, .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
13096 .{ .tag = .roundevenf, .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
13097 .{ .tag = .roundevenl, .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
13098 .{ .tag = .roundf, .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
13099 .{ .tag = .roundl, .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
13100 .{ .tag = .savectx, .properties = .{ .param_str = "iJ", .header = .setjmp, .attributes = .{ .allow_type_mismatch = true, .lib_function_without_prefix = true, .returns_twice = true } } },
13101 .{ .tag = .scalbln, .properties = .{ .param_str = "ddLi", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13102 .{ .tag = .scalblnf, .properties = .{ .param_str = "ffLi", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13103 .{ .tag = .scalblnl, .properties = .{ .param_str = "LdLdLi", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13104 .{ .tag = .scalbn, .properties = .{ .param_str = "ddi", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13105 .{ .tag = .scalbnf, .properties = .{ .param_str = "ffi", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13106 .{ .tag = .scalbnl, .properties = .{ .param_str = "LdLdi", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13107 .{ .tag = .scanf, .properties = .{ .param_str = "icC*R.", .header = .stdio, .attributes = .{ .lib_function_without_prefix = true, .format_kind = .scanf } } },
13108 .{ .tag = .setjmp, .properties = .{ .param_str = "iJ", .header = .setjmp, .attributes = .{ .allow_type_mismatch = true, .lib_function_without_prefix = true, .returns_twice = true } } },
13109 .{ .tag = .siglongjmp, .properties = .{ .param_str = "vSJi", .header = .setjmp, .language = .all_gnu_languages, .attributes = .{ .noreturn = true, .allow_type_mismatch = true, .lib_function_without_prefix = true } } },
13110 .{ .tag = .sigsetjmp, .properties = .{ .param_str = "iSJi", .header = .setjmp, .attributes = .{ .allow_type_mismatch = true, .lib_function_without_prefix = true, .returns_twice = true } } },
13111 .{ .tag = .sin, .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13112 .{ .tag = .sinf, .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13113 .{ .tag = .sinh, .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13114 .{ .tag = .sinhf, .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13115 .{ .tag = .sinhl, .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13116 .{ .tag = .sinl, .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13117 .{ .tag = .snprintf, .properties = .{ .param_str = "ic*zcC*.", .header = .stdio, .attributes = .{ .lib_function_without_prefix = true, .format_kind = .printf, .format_string_position = 2 } } },
13118 .{ .tag = .sprintf, .properties = .{ .param_str = "ic*cC*.", .header = .stdio, .attributes = .{ .lib_function_without_prefix = true, .format_kind = .printf, .format_string_position = 1 } } },
13119 .{ .tag = .sqrt, .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13120 .{ .tag = .sqrtf, .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13121 .{ .tag = .sqrtl, .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13122 .{ .tag = .sscanf, .properties = .{ .param_str = "icC*RcC*R.", .header = .stdio, .attributes = .{ .lib_function_without_prefix = true, .format_kind = .scanf, .format_string_position = 1 } } },
13123 .{ .tag = .stpcpy, .properties = .{ .param_str = "c*c*cC*", .header = .string, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } },
13124 .{ .tag = .stpncpy, .properties = .{ .param_str = "c*c*cC*z", .header = .string, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } },
13125 .{ .tag = .strcasecmp, .properties = .{ .param_str = "icC*cC*", .header = .strings, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } },
13126 .{ .tag = .strcat, .properties = .{ .param_str = "c*c*cC*", .header = .string, .attributes = .{ .lib_function_without_prefix = true } } },
13127 .{ .tag = .strchr, .properties = .{ .param_str = "c*cC*i", .header = .string, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } },
13128 .{ .tag = .strcmp, .properties = .{ .param_str = "icC*cC*", .header = .string, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } },
13129 .{ .tag = .strcpy, .properties = .{ .param_str = "c*c*cC*", .header = .string, .attributes = .{ .lib_function_without_prefix = true } } },
13130 .{ .tag = .strcspn, .properties = .{ .param_str = "zcC*cC*", .header = .string, .attributes = .{ .lib_function_without_prefix = true } } },
13131 .{ .tag = .strdup, .properties = .{ .param_str = "c*cC*", .header = .string, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } },
13132 .{ .tag = .strerror, .properties = .{ .param_str = "c*i", .header = .string, .attributes = .{ .lib_function_without_prefix = true } } },
13133 .{ .tag = .strlcat, .properties = .{ .param_str = "zc*cC*z", .header = .string, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } },
13134 .{ .tag = .strlcpy, .properties = .{ .param_str = "zc*cC*z", .header = .string, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } },
13135 .{ .tag = .strlen, .properties = .{ .param_str = "zcC*", .header = .string, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } },
13136 .{ .tag = .strncasecmp, .properties = .{ .param_str = "icC*cC*z", .header = .strings, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } },
13137 .{ .tag = .strncat, .properties = .{ .param_str = "c*c*cC*z", .header = .string, .attributes = .{ .lib_function_without_prefix = true } } },
13138 .{ .tag = .strncmp, .properties = .{ .param_str = "icC*cC*z", .header = .string, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } },
13139 .{ .tag = .strncpy, .properties = .{ .param_str = "c*c*cC*z", .header = .string, .attributes = .{ .lib_function_without_prefix = true } } },
13140 .{ .tag = .strndup, .properties = .{ .param_str = "c*cC*z", .header = .string, .language = .all_gnu_languages, .attributes = .{ .lib_function_without_prefix = true } } },
13141 .{ .tag = .strpbrk, .properties = .{ .param_str = "c*cC*cC*", .header = .string, .attributes = .{ .lib_function_without_prefix = true } } },
13142 .{ .tag = .strrchr, .properties = .{ .param_str = "c*cC*i", .header = .string, .attributes = .{ .lib_function_without_prefix = true } } },
13143 .{ .tag = .strspn, .properties = .{ .param_str = "zcC*cC*", .header = .string, .attributes = .{ .lib_function_without_prefix = true } } },
13144 .{ .tag = .strstr, .properties = .{ .param_str = "c*cC*cC*", .header = .string, .attributes = .{ .lib_function_without_prefix = true } } },
13145 .{ .tag = .strtod, .properties = .{ .param_str = "dcC*c**", .header = .stdlib, .attributes = .{ .lib_function_without_prefix = true } } },
13146 .{ .tag = .strtof, .properties = .{ .param_str = "fcC*c**", .header = .stdlib, .attributes = .{ .lib_function_without_prefix = true } } },
13147 .{ .tag = .strtok, .properties = .{ .param_str = "c*c*cC*", .header = .string, .attributes = .{ .lib_function_without_prefix = true } } },
13148 .{ .tag = .strtol, .properties = .{ .param_str = "LicC*c**i", .header = .stdlib, .attributes = .{ .lib_function_without_prefix = true } } },
13149 .{ .tag = .strtold, .properties = .{ .param_str = "LdcC*c**", .header = .stdlib, .attributes = .{ .lib_function_without_prefix = true } } },
13150 .{ .tag = .strtoll, .properties = .{ .param_str = "LLicC*c**i", .header = .stdlib, .attributes = .{ .lib_function_without_prefix = true } } },
13151 .{ .tag = .strtoul, .properties = .{ .param_str = "ULicC*c**i", .header = .stdlib, .attributes = .{ .lib_function_without_prefix = true } } },
13152 .{ .tag = .strtoull, .properties = .{ .param_str = "ULLicC*c**i", .header = .stdlib, .attributes = .{ .lib_function_without_prefix = true } } },
13153 .{ .tag = .strxfrm, .properties = .{ .param_str = "zc*cC*z", .header = .string, .attributes = .{ .lib_function_without_prefix = true } } },
13154 .{ .tag = .tan, .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13155 .{ .tag = .tanf, .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13156 .{ .tag = .tanh, .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13157 .{ .tag = .tanhf, .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13158 .{ .tag = .tanhl, .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13159 .{ .tag = .tanl, .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13160 .{ .tag = .tgamma, .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13161 .{ .tag = .tgammaf, .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13162 .{ .tag = .tgammal, .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .lib_function_without_prefix = true, .const_without_errno_and_fp_exceptions = true } } },
13163 .{ .tag = .tolower, .properties = .{ .param_str = "ii", .header = .ctype, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } },
13164 .{ .tag = .toupper, .properties = .{ .param_str = "ii", .header = .ctype, .attributes = .{ .pure = true, .lib_function_without_prefix = true } } },
13165 .{ .tag = .trunc, .properties = .{ .param_str = "dd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
13166 .{ .tag = .truncf, .properties = .{ .param_str = "ff", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
13167 .{ .tag = .truncl, .properties = .{ .param_str = "LdLd", .header = .math, .attributes = .{ .@"const" = true, .lib_function_without_prefix = true } } },
13168 .{ .tag = .va_copy, .properties = .{ .param_str = "vAA", .header = .stdarg, .attributes = .{ .lib_function_without_prefix = true } } },
13169 .{ .tag = .va_end, .properties = .{ .param_str = "vA", .header = .stdarg, .attributes = .{ .lib_function_without_prefix = true } } },
13170 .{ .tag = .va_start, .properties = .{ .param_str = "vA.", .header = .stdarg, .attributes = .{ .lib_function_without_prefix = true } } },
13171 .{ .tag = .vfork, .properties = .{ .param_str = "p", .header = .unistd, .attributes = .{ .allow_type_mismatch = true, .lib_function_without_prefix = true, .returns_twice = true } } },
13172 .{ .tag = .vfprintf, .properties = .{ .param_str = "iP*cC*a", .header = .stdio, .attributes = .{ .lib_function_without_prefix = true, .format_kind = .vprintf, .format_string_position = 1 } } },
13173 .{ .tag = .vfscanf, .properties = .{ .param_str = "iP*RcC*Ra", .header = .stdio, .attributes = .{ .lib_function_without_prefix = true, .format_kind = .vscanf, .format_string_position = 1 } } },
13174 .{ .tag = .vprintf, .properties = .{ .param_str = "icC*a", .header = .stdio, .attributes = .{ .lib_function_without_prefix = true, .format_kind = .vprintf } } },
13175 .{ .tag = .vscanf, .properties = .{ .param_str = "icC*Ra", .header = .stdio, .attributes = .{ .lib_function_without_prefix = true, .format_kind = .vscanf } } },
13176 .{ .tag = .vsnprintf, .properties = .{ .param_str = "ic*zcC*a", .header = .stdio, .attributes = .{ .lib_function_without_prefix = true, .format_kind = .vprintf, .format_string_position = 2 } } },
13177 .{ .tag = .vsprintf, .properties = .{ .param_str = "ic*cC*a", .header = .stdio, .attributes = .{ .lib_function_without_prefix = true, .format_kind = .vprintf, .format_string_position = 1 } } },
13178 .{ .tag = .vsscanf, .properties = .{ .param_str = "icC*RcC*Ra", .header = .stdio, .attributes = .{ .lib_function_without_prefix = true, .format_kind = .vscanf, .format_string_position = 1 } } },
13179 .{ .tag = .wcschr, .properties = .{ .param_str = "w*wC*w", .header = .wchar, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } },
13180 .{ .tag = .wcscmp, .properties = .{ .param_str = "iwC*wC*", .header = .wchar, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } },
13181 .{ .tag = .wcslen, .properties = .{ .param_str = "zwC*", .header = .wchar, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } },
13182 .{ .tag = .wcsncmp, .properties = .{ .param_str = "iwC*wC*z", .header = .wchar, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } },
13183 .{ .tag = .wmemchr, .properties = .{ .param_str = "w*wC*wz", .header = .wchar, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } },
13184 .{ .tag = .wmemcmp, .properties = .{ .param_str = "iwC*wC*z", .header = .wchar, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } },
13185 .{ .tag = .wmemcpy, .properties = .{ .param_str = "w*w*wC*z", .header = .wchar, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } },
13186 .{ .tag = .wmemmove, .properties = .{ .param_str = "w*w*wC*z", .header = .wchar, .attributes = .{ .lib_function_without_prefix = true, .const_evaluable = true } } },
1314213187 };
1314313188};
1314413189};
lib/compiler/aro/aro/Builtins/eval.zig+20-19
......@@ -5,8 +5,9 @@ const Builtins = @import("../Builtins.zig");
55const Builtin = Builtins.Builtin;
66const Parser = @import("../Parser.zig");
77const Tree = @import("../Tree.zig");
8const NodeIndex = Tree.NodeIndex;
9const Type = @import("../Type.zig");
8const TypeStore = @import("../TypeStore.zig");
9const Type = TypeStore.Type;
10const QualType = TypeStore.QualType;
1011const Value = @import("../Value.zig");
1112
1213fn makeNan(comptime T: type, str: []const u8) T {
......@@ -22,22 +23,22 @@ fn makeNan(comptime T: type, str: []const u8) T {
2223 return @bitCast(@as(UnsignedSameSize, bits) | @as(UnsignedSameSize, @bitCast(std.math.nan(T))));
2324}
2425
25pub fn eval(tag: Builtin.Tag, p: *Parser, args: []const NodeIndex) !Value {
26pub fn eval(tag: Builtin.Tag, p: *Parser, args: []const Tree.Node.Index) !Value {
2627 const builtin = Builtin.fromTag(tag);
2728 if (!builtin.properties.attributes.const_evaluable) return .{};
2829
2930 switch (tag) {
30 Builtin.tagFromName("__builtin_inff").?,
31 Builtin.tagFromName("__builtin_inf").?,
32 Builtin.tagFromName("__builtin_infl").?,
31 .__builtin_inff,
32 .__builtin_inf,
33 .__builtin_infl,
3334 => {
34 const ty: Type = switch (tag) {
35 Builtin.tagFromName("__builtin_inff").? => .{ .specifier = .float },
36 Builtin.tagFromName("__builtin_inf").? => .{ .specifier = .double },
37 Builtin.tagFromName("__builtin_infl").? => .{ .specifier = .long_double },
35 const qt: QualType = switch (tag) {
36 .__builtin_inff => .float,
37 .__builtin_inf => .double,
38 .__builtin_infl => .long_double,
3839 else => unreachable,
3940 };
40 const f: Interner.Key.Float = switch (ty.bitSizeof(p.comp).?) {
41 const f: Interner.Key.Float = switch (qt.bitSizeof(p.comp)) {
4142 32 => .{ .f32 = std.math.inf(f32) },
4243 64 => .{ .f64 = std.math.inf(f64) },
4344 80 => .{ .f80 = std.math.inf(f80) },
......@@ -46,14 +47,14 @@ pub fn eval(tag: Builtin.Tag, p: *Parser, args: []const NodeIndex) !Value {
4647 };
4748 return Value.intern(p.comp, .{ .float = f });
4849 },
49 Builtin.tagFromName("__builtin_isinf").? => blk: {
50 .__builtin_isinf => blk: {
5051 if (args.len == 0) break :blk;
51 const val = p.value_map.get(args[0]) orelse break :blk;
52 const val = p.tree.value_map.get(args[0]) orelse break :blk;
5253 return Value.fromBool(val.isInf(p.comp));
5354 },
54 Builtin.tagFromName("__builtin_isinf_sign").? => blk: {
55 .__builtin_isinf_sign => blk: {
5556 if (args.len == 0) break :blk;
56 const val = p.value_map.get(args[0]) orelse break :blk;
57 const val = p.tree.value_map.get(args[0]) orelse break :blk;
5758 switch (val.isInfSign(p.comp)) {
5859 .unknown => {},
5960 .finite => return Value.zero,
......@@ -61,17 +62,17 @@ pub fn eval(tag: Builtin.Tag, p: *Parser, args: []const NodeIndex) !Value {
6162 .negative => return Value.int(@as(i64, -1), p.comp),
6263 }
6364 },
64 Builtin.tagFromName("__builtin_isnan").? => blk: {
65 .__builtin_isnan => blk: {
6566 if (args.len == 0) break :blk;
66 const val = p.value_map.get(args[0]) orelse break :blk;
67 const val = p.tree.value_map.get(args[0]) orelse break :blk;
6768 return Value.fromBool(val.isNan(p.comp));
6869 },
69 Builtin.tagFromName("__builtin_nan").? => blk: {
70 .__builtin_nan => blk: {
7071 if (args.len == 0) break :blk;
7172 const val = p.getDecayedStringLiteral(args[0]) orelse break :blk;
7273 const bytes = p.comp.interner.get(val.ref()).bytes;
7374
74 const f: Interner.Key.Float = switch ((Type{ .specifier = .double }).bitSizeof(p.comp).?) {
75 const f: Interner.Key.Float = switch (Type.Float.double.bits(p.comp)) {
7576 32 => .{ .f32 = makeNan(f32, bytes) },
7677 64 => .{ .f64 = makeNan(f64, bytes) },
7778 80 => .{ .f80 = makeNan(f80, bytes) },
lib/compiler/aro/aro/CodeGen.zig+490-586
......@@ -1,18 +1,19 @@
11const std = @import("std");
22const Allocator = std.mem.Allocator;
33const assert = std.debug.assert;
4
45const backend = @import("../backend.zig");
56const Interner = backend.Interner;
67const Ir = backend.Ir;
8const Builder = Ir.Builder;
9
710const Builtins = @import("Builtins.zig");
811const Builtin = Builtins.Builtin;
912const Compilation = @import("Compilation.zig");
10const Builder = Ir.Builder;
11const StrInt = @import("StringInterner.zig");
12const StringId = StrInt.StringId;
13const StringId = @import("StringInterner.zig").StringId;
1314const Tree = @import("Tree.zig");
14const NodeIndex = Tree.NodeIndex;
15const Type = @import("Type.zig");
15const Node = Tree.Node;
16const QualType = @import("TypeStore.zig").QualType;
1617const Value = @import("Value.zig");
1718
1819const WipSwitch = struct {
......@@ -35,18 +36,15 @@ const Error = Compilation.Error;
3536
3637const CodeGen = @This();
3738
38tree: Tree,
39tree: *const Tree,
3940comp: *Compilation,
4041builder: Builder,
41node_tag: []const Tree.Tag,
42node_data: []const Tree.Node.Data,
43node_ty: []const Type,
4442wip_switch: *WipSwitch = undefined,
45symbols: std.ArrayListUnmanaged(Symbol) = .empty,
46ret_nodes: std.ArrayListUnmanaged(Ir.Inst.Phi.Input) = .empty,
47phi_nodes: std.ArrayListUnmanaged(Ir.Inst.Phi.Input) = .empty,
48record_elem_buf: std.ArrayListUnmanaged(Interner.Ref) = .empty,
49record_cache: std.AutoHashMapUnmanaged(*Type.Record, Interner.Ref) = .empty,
43symbols: std.ArrayListUnmanaged(Symbol) = .{},
44ret_nodes: std.ArrayListUnmanaged(Ir.Inst.Phi.Input) = .{},
45phi_nodes: std.ArrayListUnmanaged(Ir.Inst.Phi.Input) = .{},
46record_elem_buf: std.ArrayListUnmanaged(Interner.Ref) = .{},
47record_cache: std.AutoHashMapUnmanaged(QualType, Interner.Ref) = .{},
5048cond_dummy_ty: ?Interner.Ref = null,
5149bool_invert: bool = false,
5250bool_end_label: Ir.Ref = .none,
......@@ -54,19 +52,21 @@ cond_dummy_ref: Ir.Ref = undefined,
5452continue_label: Ir.Ref = undefined,
5553break_label: Ir.Ref = undefined,
5654return_label: Ir.Ref = undefined,
55compound_assign_dummy: ?Ir.Ref = null,
5756
5857fn fail(c: *CodeGen, comptime fmt: []const u8, args: anytype) error{ FatalError, OutOfMemory } {
59 try c.comp.diagnostics.list.append(c.comp.gpa, .{
60 .tag = .cli_error,
61 .kind = .@"fatal error",
62 .extra = .{ .str = try std.fmt.allocPrint(c.comp.diagnostics.arena.allocator(), fmt, args) },
63 });
58 var sf = std.heap.stackFallback(1024, c.comp.gpa);
59 var buf = std.ArrayList(u8).init(sf.get());
60 defer buf.deinit();
61
62 try buf.print(fmt, args);
63 try c.comp.diagnostics.add(.{ .text = buf.items, .kind = .@"fatal error", .location = null });
6464 return error.FatalError;
6565}
6666
67pub fn genIr(tree: Tree) Compilation.Error!Ir {
67pub fn genIr(tree: *const Tree) Compilation.Error!Ir {
6868 const gpa = tree.comp.gpa;
69 var c = CodeGen{
69 var c: CodeGen = .{
7070 .builder = .{
7171 .gpa = tree.comp.gpa,
7272 .interner = &tree.comp.interner,
......@@ -74,9 +74,6 @@ pub fn genIr(tree: Tree) Compilation.Error!Ir {
7474 },
7575 .tree = tree,
7676 .comp = tree.comp,
77 .node_tag = tree.nodes.items(.tag),
78 .node_data = tree.nodes.items(.data),
79 .node_ty = tree.nodes.items(.ty),
8077 };
8178 defer c.symbols.deinit(gpa);
8279 defer c.ret_nodes.deinit(gpa);
......@@ -85,44 +82,31 @@ pub fn genIr(tree: Tree) Compilation.Error!Ir {
8582 defer c.record_cache.deinit(gpa);
8683 defer c.builder.deinit();
8784
88 const node_tags = tree.nodes.items(.tag);
89 for (tree.root_decls) |decl| {
85 for (tree.root_decls.items) |decl| {
9086 c.builder.arena.deinit();
9187 c.builder.arena = std.heap.ArenaAllocator.init(gpa);
9288
93 switch (node_tags[@intFromEnum(decl)]) {
89 switch (decl.get(c.tree)) {
90 .empty_decl,
9491 .static_assert,
9592 .typedef,
96 .struct_decl_two,
97 .union_decl_two,
98 .enum_decl_two,
9993 .struct_decl,
10094 .union_decl,
10195 .enum_decl,
96 .struct_forward_decl,
97 .union_forward_decl,
98 .enum_forward_decl,
10299 => {},
103100
104 .fn_proto,
105 .static_fn_proto,
106 .inline_fn_proto,
107 .inline_static_fn_proto,
108 .extern_var,
109 .threadlocal_extern_var,
110 => {},
111
112 .fn_def,
113 .static_fn_def,
114 .inline_fn_def,
115 .inline_static_fn_def,
116 => c.genFn(decl) catch |err| switch (err) {
117 error.FatalError => return error.FatalError,
118 error.OutOfMemory => return error.OutOfMemory,
101 .function => |function| {
102 if (function.body == null) continue;
103 c.genFn(function) catch |err| switch (err) {
104 error.FatalError => return error.FatalError,
105 error.OutOfMemory => return error.OutOfMemory,
106 };
119107 },
120108
121 .@"var",
122 .static_var,
123 .threadlocal_var,
124 .threadlocal_static_var,
125 => c.genVar(decl) catch |err| switch (err) {
109 .variable => |variable| c.genVar(variable) catch |err| switch (err) {
126110 error.FatalError => return error.FatalError,
127111 error.OutOfMemory => return error.OutOfMemory,
128112 },
......@@ -132,70 +116,78 @@ pub fn genIr(tree: Tree) Compilation.Error!Ir {
132116 return c.builder.finish();
133117}
134118
135fn genType(c: *CodeGen, base_ty: Type) !Interner.Ref {
136 var key: Interner.Key = undefined;
137 const ty = base_ty.canonicalize(.standard);
138 switch (ty.specifier) {
119fn genType(c: *CodeGen, qt: QualType) !Interner.Ref {
120 const base = qt.base(c.comp);
121 const key: Interner.Key = switch (base.type) {
139122 .void => return .void,
140123 .bool => return .i1,
141 .@"struct" => {
142 if (c.record_cache.get(ty.data.record)) |some| return some;
124 .@"struct" => |record| {
125 if (c.record_cache.get(base.qt.unqualified())) |some| return some;
143126
144127 const elem_buf_top = c.record_elem_buf.items.len;
145128 defer c.record_elem_buf.items.len = elem_buf_top;
146129
147 for (ty.data.record.fields) |field| {
148 if (!field.isRegularField()) {
130 for (record.fields) |field| {
131 if (field.bit_width != .null) {
149132 return c.fail("TODO lower struct bitfields", .{});
150133 }
151134 // TODO handle padding bits
152 const field_ref = try c.genType(field.ty);
135 const field_ref = try c.genType(field.qt);
153136 try c.record_elem_buf.append(c.builder.gpa, field_ref);
154137 }
155138
156 return c.builder.interner.put(c.builder.gpa, .{
139 const recrd_ty = try c.builder.interner.put(c.builder.gpa, .{
157140 .record_ty = c.record_elem_buf.items[elem_buf_top..],
158141 });
142 try c.record_cache.put(c.comp.gpa, base.qt.unqualified(), recrd_ty);
143 return recrd_ty;
159144 },
160145 .@"union" => {
161146 return c.fail("TODO lower union types", .{});
162147 },
163 else => {},
164 }
165 if (ty.isPtr()) return .ptr;
166 if (ty.isFunc()) return .func;
167 if (!ty.isReal()) return c.fail("TODO lower complex types", .{});
168 if (ty.isInt()) {
169 const bits = ty.bitSizeof(c.comp).?;
170 key = .{ .int_ty = @intCast(bits) };
171 } else if (ty.isFloat()) {
172 const bits = ty.bitSizeof(c.comp).?;
173 key = .{ .float_ty = @intCast(bits) };
174 } else if (ty.isArray()) {
175 const elem = try c.genType(ty.elemType());
176 key = .{ .array_ty = .{ .child = elem, .len = ty.arrayLen().? } };
177 } else if (ty.specifier == .vector) {
178 const elem = try c.genType(ty.elemType());
179 key = .{ .vector_ty = .{ .child = elem, .len = @intCast(ty.data.array.len) } };
180 } else if (ty.is(.nullptr_t)) {
181 return c.fail("TODO lower nullptr_t", .{});
182 }
148 .pointer => return .ptr,
149 .func => return .func,
150 .complex => return c.fail("TODO lower complex types", .{}),
151 .atomic => return c.fail("TODO lower atomic types", .{}),
152 .@"enum" => |@"enum"| return c.genType(@"enum".tag.?),
153 .int => |int| .{ .int_ty = int.bits(c.comp) },
154 .bit_int => |bit_int| .{ .int_ty = bit_int.bits },
155 .float => |float| .{ .float_ty = float.bits(c.comp) },
156 .array => |array| blk: {
157 switch (array.len) {
158 .fixed, .static => |len| {
159 const elem = try c.genType(array.elem);
160 break :blk .{ .array_ty = .{ .child = elem, .len = len } };
161 },
162 .variable, .unspecified_variable => return c.fail("TODO VLAs", .{}),
163 .incomplete => unreachable,
164 }
165 },
166 .vector => |vector| blk: {
167 const elem = try c.genType(vector.elem);
168 break :blk .{ .vector_ty = .{ .child = elem, .len = vector.len } };
169 },
170 .nullptr_t => {
171 return c.fail("TODO lower nullptr_t", .{});
172 },
173 .attributed, .typeof, .typedef => unreachable,
174 };
183175 return c.builder.interner.put(c.builder.gpa, key);
184176}
185177
186fn genFn(c: *CodeGen, decl: NodeIndex) Error!void {
187 const name = c.tree.tokSlice(c.node_data[@intFromEnum(decl)].decl.name);
188 const func_ty = c.node_ty[@intFromEnum(decl)].canonicalize(.standard);
178fn genFn(c: *CodeGen, function: Node.Function) Error!void {
179 const name = c.tree.tokSlice(function.name_tok);
180 const func_ty = function.qt.base(c.comp).type.func;
189181 c.ret_nodes.items.len = 0;
190182
191183 try c.builder.startFn();
192184
193 for (func_ty.data.func.params) |param| {
185 for (func_ty.params) |param| {
194186 // TODO handle calling convention here
195 const arg = try c.builder.addArg(try c.genType(param.ty));
187 const arg = try c.builder.addArg(try c.genType(param.qt));
196188
197 const size: u32 = @intCast(param.ty.sizeof(c.comp).?); // TODO add error in parser
198 const @"align" = param.ty.alignof(c.comp);
189 const size: u32 = @intCast(param.qt.sizeof(c.comp)); // TODO add error in parser
190 const @"align" = param.qt.alignof(c.comp);
199191 const alloc = try c.builder.addAlloc(size, @"align");
200192 try c.builder.addStore(alloc, arg);
201193 try c.symbols.append(c.comp.gpa, .{ .name = param.name, .val = alloc });
......@@ -203,7 +195,7 @@ fn genFn(c: *CodeGen, decl: NodeIndex) Error!void {
203195
204196 // Generate body
205197 c.return_label = try c.builder.makeLabel("return");
206 try c.genStmt(c.node_data[@intFromEnum(decl)].decl.node);
198 try c.genStmt(function.body.?);
207199
208200 // Relocate returns
209201 if (c.ret_nodes.items.len == 0) {
......@@ -213,19 +205,19 @@ fn genFn(c: *CodeGen, decl: NodeIndex) Error!void {
213205 _ = try c.builder.addInst(.ret, .{ .un = c.ret_nodes.items[0].value }, .noreturn);
214206 } else {
215207 try c.builder.startBlock(c.return_label);
216 const phi = try c.builder.addPhi(c.ret_nodes.items, try c.genType(func_ty.returnType()));
208 const phi = try c.builder.addPhi(c.ret_nodes.items, try c.genType(func_ty.return_type));
217209 _ = try c.builder.addInst(.ret, .{ .un = phi }, .noreturn);
218210 }
219211
220212 try c.builder.finishFn(name);
221213}
222214
223fn addUn(c: *CodeGen, tag: Ir.Inst.Tag, operand: Ir.Ref, ty: Type) !Ir.Ref {
224 return c.builder.addInst(tag, .{ .un = operand }, try c.genType(ty));
215fn addUn(c: *CodeGen, tag: Ir.Inst.Tag, operand: Ir.Ref, qt: QualType) !Ir.Ref {
216 return c.builder.addInst(tag, .{ .un = operand }, try c.genType(qt));
225217}
226218
227fn addBin(c: *CodeGen, tag: Ir.Inst.Tag, lhs: Ir.Ref, rhs: Ir.Ref, ty: Type) !Ir.Ref {
228 return c.builder.addInst(tag, .{ .bin = .{ .lhs = lhs, .rhs = rhs } }, try c.genType(ty));
219fn addBin(c: *CodeGen, tag: Ir.Inst.Tag, lhs: Ir.Ref, rhs: Ir.Ref, qt: QualType) !Ir.Ref {
220 return c.builder.addInst(tag, .{ .bin = .{ .lhs = lhs, .rhs = rhs } }, try c.genType(qt));
229221}
230222
231223fn addBranch(c: *CodeGen, cond: Ir.Ref, true_label: Ir.Ref, false_label: Ir.Ref) !void {
......@@ -247,18 +239,16 @@ fn addBoolPhi(c: *CodeGen, value: bool) !void {
247239 try c.phi_nodes.append(c.comp.gpa, .{ .label = c.builder.current_label, .value = val });
248240}
249241
250fn genStmt(c: *CodeGen, node: NodeIndex) Error!void {
242fn genStmt(c: *CodeGen, node: Node.Index) Error!void {
251243 _ = try c.genExpr(node);
252244}
253245
254fn genExpr(c: *CodeGen, node: NodeIndex) Error!Ir.Ref {
255 std.debug.assert(node != .none);
256 const ty = c.node_ty[@intFromEnum(node)];
257 if (c.tree.value_map.get(node)) |val| {
258 return c.builder.addConstant(val.ref(), try c.genType(ty));
246fn genExpr(c: *CodeGen, node_index: Node.Index) Error!Ir.Ref {
247 if (c.tree.value_map.get(node_index)) |val| {
248 return c.builder.addConstant(val.ref(), try c.genType(node_index.qt(c.tree)));
259249 }
260 const data = c.node_data[@intFromEnum(node)];
261 switch (c.node_tag[@intFromEnum(node)]) {
250 const node = node_index.get(c.tree);
251 switch (node) {
262252 .enumeration_ref,
263253 .bool_literal,
264254 .int_literal,
......@@ -268,96 +258,74 @@ fn genExpr(c: *CodeGen, node: NodeIndex) Error!Ir.Ref {
268258 .string_literal_expr,
269259 .alignof_expr,
270260 => unreachable, // These should have an entry in value_map.
271 .fn_def,
272 .static_fn_def,
273 .inline_fn_def,
274 .inline_static_fn_def,
275 .invalid,
276 .threadlocal_var,
277 => unreachable,
278261 .static_assert,
279 .fn_proto,
280 .static_fn_proto,
281 .inline_fn_proto,
282 .inline_static_fn_proto,
283 .extern_var,
284 .threadlocal_extern_var,
262 .function,
285263 .typedef,
286 .struct_decl_two,
287 .union_decl_two,
288 .enum_decl_two,
289264 .struct_decl,
290265 .union_decl,
291266 .enum_decl,
292 .enum_field_decl,
293 .record_field_decl,
294 .indirect_record_field_decl,
267 .enum_field,
268 .record_field,
295269 .struct_forward_decl,
296270 .union_forward_decl,
297271 .enum_forward_decl,
298272 .null_stmt,
299273 => {},
300 .static_var,
301 .implicit_static_var,
302 .threadlocal_static_var,
303 => try c.genVar(node), // TODO
304 .@"var" => {
305 const size: u32 = @intCast(ty.sizeof(c.comp).?); // TODO add error in parser
306 const @"align" = ty.alignof(c.comp);
274 .variable => |variable| {
275 if (variable.storage_class == .@"extern" or variable.storage_class == .static) {
276 try c.genVar(variable);
277 return .none;
278 }
279 const size: u32 = @intCast(variable.qt.sizeof(c.comp)); // TODO add error in parser
280 const @"align" = variable.qt.alignof(c.comp);
307281 const alloc = try c.builder.addAlloc(size, @"align");
308 const name = try StrInt.intern(c.comp, c.tree.tokSlice(data.decl.name));
282 const name = try c.comp.internString(c.tree.tokSlice(variable.name_tok));
309283 try c.symbols.append(c.comp.gpa, .{ .name = name, .val = alloc });
310 if (data.decl.node != .none) {
311 try c.genInitializer(alloc, ty, data.decl.node);
284 if (variable.initializer) |init| {
285 try c.genInitializer(alloc, variable.qt, init);
312286 }
313287 },
314 .labeled_stmt => {
288 .labeled_stmt => |labeled| {
315289 const label = try c.builder.makeLabel("label");
316290 try c.builder.startBlock(label);
317 try c.genStmt(data.decl.node);
291 try c.genStmt(labeled.body);
318292 },
319 .compound_stmt_two => {
293 .compound_stmt => |compound| {
320294 const old_sym_len = c.symbols.items.len;
321295 c.symbols.items.len = old_sym_len;
322296
323 if (data.bin.lhs != .none) try c.genStmt(data.bin.lhs);
324 if (data.bin.rhs != .none) try c.genStmt(data.bin.rhs);
297 for (compound.body) |stmt| try c.genStmt(stmt);
325298 },
326 .compound_stmt => {
327 const old_sym_len = c.symbols.items.len;
328 c.symbols.items.len = old_sym_len;
329
330 for (c.tree.data[data.range.start..data.range.end]) |stmt| try c.genStmt(stmt);
331 },
332 .if_then_else_stmt => {
299 .if_stmt => |@"if"| {
333300 const then_label = try c.builder.makeLabel("if.then");
301
302 const else_body = @"if".else_body orelse {
303 const end_label = try c.builder.makeLabel("if.end");
304 try c.genBoolExpr(@"if".cond, then_label, end_label);
305
306 try c.builder.startBlock(then_label);
307 try c.genStmt(@"if".then_body);
308 try c.builder.startBlock(end_label);
309 return .none;
310 };
311
334312 const else_label = try c.builder.makeLabel("if.else");
335313 const end_label = try c.builder.makeLabel("if.end");
336314
337 try c.genBoolExpr(data.if3.cond, then_label, else_label);
315 try c.genBoolExpr(@"if".cond, then_label, else_label);
338316
339317 try c.builder.startBlock(then_label);
340 try c.genStmt(c.tree.data[data.if3.body]); // then
318 try c.genStmt(@"if".then_body);
341319 try c.builder.addJump(end_label);
342320
343321 try c.builder.startBlock(else_label);
344 try c.genStmt(c.tree.data[data.if3.body + 1]); // else
322 try c.genStmt(else_body);
345323
346324 try c.builder.startBlock(end_label);
347325 },
348 .if_then_stmt => {
349 const then_label = try c.builder.makeLabel("if.then");
350 const end_label = try c.builder.makeLabel("if.end");
351
352 try c.genBoolExpr(data.bin.lhs, then_label, end_label);
353
354 try c.builder.startBlock(then_label);
355 try c.genStmt(data.bin.rhs); // then
356 try c.builder.startBlock(end_label);
357 },
358 .switch_stmt => {
326 .switch_stmt => |@"switch"| {
359327 var wip_switch = WipSwitch{
360 .size = c.node_ty[@intFromEnum(data.bin.lhs)].sizeof(c.comp).?,
328 .size = @"switch".cond.qt(c.tree).sizeof(c.comp),
361329 };
362330 defer wip_switch.cases.deinit(c.builder.gpa);
363331
......@@ -370,11 +338,11 @@ fn genExpr(c: *CodeGen, node: NodeIndex) Error!Ir.Ref {
370338 const end_ref = try c.builder.makeLabel("switch.end");
371339 c.break_label = end_ref;
372340
373 const cond = try c.genExpr(data.bin.lhs);
341 const cond = try c.genExpr(@"switch".cond);
374342 const switch_index = c.builder.instructions.len;
375343 _ = try c.builder.addInst(.@"switch", undefined, .noreturn);
376344
377 try c.genStmt(data.bin.rhs); // body
345 try c.genStmt(@"switch".body);
378346
379347 const default_ref = wip_switch.default orelse end_ref;
380348 try c.builder.startBlock(end_ref);
......@@ -390,23 +358,24 @@ fn genExpr(c: *CodeGen, node: NodeIndex) Error!Ir.Ref {
390358 };
391359 c.builder.instructions.items(.data)[switch_index] = .{ .@"switch" = switch_data };
392360 },
393 .case_stmt => {
394 const val = c.tree.value_map.get(data.bin.lhs).?;
361 .case_stmt => |case| {
362 if (case.end != null) return c.fail("TODO CodeGen.genStmt case range\n", .{});
363 const val = c.tree.value_map.get(case.start).?;
395364 const label = try c.builder.makeLabel("case");
396365 try c.builder.startBlock(label);
397366 try c.wip_switch.cases.append(c.builder.gpa, .{
398367 .val = val.ref(),
399368 .label = label,
400369 });
401 try c.genStmt(data.bin.rhs);
370 try c.genStmt(case.body);
402371 },
403 .default_stmt => {
404 const default = try c.builder.makeLabel("default");
405 try c.builder.startBlock(default);
406 c.wip_switch.default = default;
407 try c.genStmt(data.un);
372 .default_stmt => |default| {
373 const default_label = try c.builder.makeLabel("default");
374 try c.builder.startBlock(default_label);
375 c.wip_switch.default = default_label;
376 try c.genStmt(default.body);
408377 },
409 .while_stmt => {
378 .while_stmt => |@"while"| {
410379 const old_break_label = c.break_label;
411380 defer c.break_label = old_break_label;
412381
......@@ -421,14 +390,14 @@ fn genExpr(c: *CodeGen, node: NodeIndex) Error!Ir.Ref {
421390 c.break_label = end_label;
422391
423392 try c.builder.startBlock(cond_label);
424 try c.genBoolExpr(data.bin.lhs, then_label, end_label);
393 try c.genBoolExpr(@"while".cond, then_label, end_label);
425394
426395 try c.builder.startBlock(then_label);
427 try c.genStmt(data.bin.rhs);
396 try c.genStmt(@"while".body);
428397 try c.builder.addJump(cond_label);
429398 try c.builder.startBlock(end_label);
430399 },
431 .do_while_stmt => {
400 .do_while_stmt => |do_while| {
432401 const old_break_label = c.break_label;
433402 defer c.break_label = old_break_label;
434403
......@@ -443,70 +412,45 @@ fn genExpr(c: *CodeGen, node: NodeIndex) Error!Ir.Ref {
443412 c.break_label = end_label;
444413
445414 try c.builder.startBlock(then_label);
446 try c.genStmt(data.bin.rhs);
415 try c.genStmt(do_while.body);
447416
448417 try c.builder.startBlock(cond_label);
449 try c.genBoolExpr(data.bin.lhs, then_label, end_label);
418 try c.genBoolExpr(do_while.cond, then_label, end_label);
450419
451420 try c.builder.startBlock(end_label);
452421 },
453 .for_decl_stmt => {
422 .for_stmt => |@"for"| {
454423 const old_break_label = c.break_label;
455424 defer c.break_label = old_break_label;
456425
457426 const old_continue_label = c.continue_label;
458427 defer c.continue_label = old_continue_label;
459428
460 const for_decl = data.forDecl(&c.tree);
461 for (for_decl.decls) |decl| try c.genStmt(decl);
462
463 const then_label = try c.builder.makeLabel("for.then");
464 var cond_label = then_label;
465 const cont_label = try c.builder.makeLabel("for.cont");
466 const end_label = try c.builder.makeLabel("for.end");
467
468 c.continue_label = cont_label;
469 c.break_label = end_label;
470
471 if (for_decl.cond != .none) {
472 cond_label = try c.builder.makeLabel("for.cond");
473 try c.builder.startBlock(cond_label);
474 try c.genBoolExpr(for_decl.cond, then_label, end_label);
475 }
476 try c.builder.startBlock(then_label);
477 try c.genStmt(for_decl.body);
478 if (for_decl.incr != .none) {
479 _ = try c.genExpr(for_decl.incr);
429 switch (@"for".init) {
430 .decls => |decls| {
431 for (decls) |decl| try c.genStmt(decl);
432 },
433 .expr => |maybe_init| {
434 if (maybe_init) |init| _ = try c.genExpr(init);
435 },
480436 }
481 try c.builder.addJump(cond_label);
482 try c.builder.startBlock(end_label);
483 },
484 .forever_stmt => {
485 const old_break_label = c.break_label;
486 defer c.break_label = old_break_label;
487
488 const old_continue_label = c.continue_label;
489 defer c.continue_label = old_continue_label;
490
491 const then_label = try c.builder.makeLabel("for.then");
492 const end_label = try c.builder.makeLabel("for.end");
493437
494 c.continue_label = then_label;
495 c.break_label = end_label;
438 const cond = @"for".cond orelse {
439 const then_label = try c.builder.makeLabel("for.then");
440 const end_label = try c.builder.makeLabel("for.end");
496441
497 try c.builder.startBlock(then_label);
498 try c.genStmt(data.un);
499 try c.builder.startBlock(end_label);
500 },
501 .for_stmt => {
502 const old_break_label = c.break_label;
503 defer c.break_label = old_break_label;
442 c.continue_label = then_label;
443 c.break_label = end_label;
504444
505 const old_continue_label = c.continue_label;
506 defer c.continue_label = old_continue_label;
507
508 const for_stmt = data.forStmt(&c.tree);
509 if (for_stmt.init != .none) _ = try c.genExpr(for_stmt.init);
445 try c.builder.startBlock(then_label);
446 try c.genStmt(@"for".body);
447 if (@"for".incr) |incr| {
448 _ = try c.genExpr(incr);
449 }
450 try c.builder.addJump(then_label);
451 try c.builder.startBlock(end_label);
452 return .none;
453 };
510454
511455 const then_label = try c.builder.makeLabel("for.then");
512456 var cond_label = then_label;
......@@ -516,212 +460,213 @@ fn genExpr(c: *CodeGen, node: NodeIndex) Error!Ir.Ref {
516460 c.continue_label = cont_label;
517461 c.break_label = end_label;
518462
519 if (for_stmt.cond != .none) {
520 cond_label = try c.builder.makeLabel("for.cond");
521 try c.builder.startBlock(cond_label);
522 try c.genBoolExpr(for_stmt.cond, then_label, end_label);
523 }
463 cond_label = try c.builder.makeLabel("for.cond");
464
465 try c.builder.startBlock(cond_label);
466 try c.genBoolExpr(cond, then_label, end_label);
467
524468 try c.builder.startBlock(then_label);
525 try c.genStmt(for_stmt.body);
526 if (for_stmt.incr != .none) {
527 _ = try c.genExpr(for_stmt.incr);
469 try c.genStmt(@"for".body);
470 if (@"for".incr) |incr| {
471 _ = try c.genExpr(incr);
528472 }
529473 try c.builder.addJump(cond_label);
530474 try c.builder.startBlock(end_label);
531475 },
532476 .continue_stmt => try c.builder.addJump(c.continue_label),
533477 .break_stmt => try c.builder.addJump(c.break_label),
534 .return_stmt => {
535 if (data.un != .none) {
536 const operand = try c.genExpr(data.un);
537 try c.ret_nodes.append(c.comp.gpa, .{ .value = operand, .label = c.builder.current_label });
478 .return_stmt => |@"return"| {
479 switch (@"return".operand) {
480 .expr => |expr| {
481 const operand = try c.genExpr(expr);
482 try c.ret_nodes.append(c.comp.gpa, .{ .value = operand, .label = c.builder.current_label });
483 },
484 .none => {},
485 .implicit => |zeroes| {
486 if (zeroes) {
487 const operand = try c.builder.addConstant(.zero, try c.genType(@"return".return_qt));
488 try c.ret_nodes.append(c.comp.gpa, .{ .value = operand, .label = c.builder.current_label });
489 }
490 // No need to emit a jump since an implicit return_stmt is always the last statement.
491 return .none;
492 },
538493 }
539494 try c.builder.addJump(c.return_label);
540495 },
541 .implicit_return => {
542 if (data.return_zero) {
543 const operand = try c.builder.addConstant(.zero, try c.genType(ty));
544 try c.ret_nodes.append(c.comp.gpa, .{ .value = operand, .label = c.builder.current_label });
545 }
546 // No need to emit a jump since implicit_return is always the last instruction.
547 },
548 .case_range_stmt,
549496 .goto_stmt,
550497 .computed_goto_stmt,
551498 .nullptr_literal,
552 => return c.fail("TODO CodeGen.genStmt {}\n", .{c.node_tag[@intFromEnum(node)]}),
553 .comma_expr => {
554 _ = try c.genExpr(data.bin.lhs);
555 return c.genExpr(data.bin.rhs);
556 },
557 .assign_expr => {
558 const rhs = try c.genExpr(data.bin.rhs);
559 const lhs = try c.genLval(data.bin.lhs);
499 => return c.fail("TODO CodeGen.genStmt {s}\n", .{@tagName(node)}),
500 .comma_expr => |bin| {
501 _ = try c.genExpr(bin.lhs);
502 return c.genExpr(bin.rhs);
503 },
504 .assign_expr => |bin| {
505 const rhs = try c.genExpr(bin.rhs);
506 const lhs = try c.genLval(bin.lhs);
560507 try c.builder.addStore(lhs, rhs);
561508 return rhs;
562509 },
563 .mul_assign_expr => return c.genCompoundAssign(node, .mul),
564 .div_assign_expr => return c.genCompoundAssign(node, .div),
565 .mod_assign_expr => return c.genCompoundAssign(node, .mod),
566 .add_assign_expr => return c.genCompoundAssign(node, .add),
567 .sub_assign_expr => return c.genCompoundAssign(node, .sub),
568 .shl_assign_expr => return c.genCompoundAssign(node, .bit_shl),
569 .shr_assign_expr => return c.genCompoundAssign(node, .bit_shr),
570 .bit_and_assign_expr => return c.genCompoundAssign(node, .bit_and),
571 .bit_xor_assign_expr => return c.genCompoundAssign(node, .bit_xor),
572 .bit_or_assign_expr => return c.genCompoundAssign(node, .bit_or),
573 .bit_or_expr => return c.genBinOp(node, .bit_or),
574 .bit_xor_expr => return c.genBinOp(node, .bit_xor),
575 .bit_and_expr => return c.genBinOp(node, .bit_and),
576 .equal_expr => {
577 const cmp = try c.genComparison(node, .cmp_eq);
578 return c.addUn(.zext, cmp, ty);
579 },
580 .not_equal_expr => {
581 const cmp = try c.genComparison(node, .cmp_ne);
582 return c.addUn(.zext, cmp, ty);
583 },
584 .less_than_expr => {
585 const cmp = try c.genComparison(node, .cmp_lt);
586 return c.addUn(.zext, cmp, ty);
587 },
588 .less_than_equal_expr => {
589 const cmp = try c.genComparison(node, .cmp_lte);
590 return c.addUn(.zext, cmp, ty);
591 },
592 .greater_than_expr => {
593 const cmp = try c.genComparison(node, .cmp_gt);
594 return c.addUn(.zext, cmp, ty);
595 },
596 .greater_than_equal_expr => {
597 const cmp = try c.genComparison(node, .cmp_gte);
598 return c.addUn(.zext, cmp, ty);
599 },
600 .shl_expr => return c.genBinOp(node, .bit_shl),
601 .shr_expr => return c.genBinOp(node, .bit_shr),
602 .add_expr => {
603 if (ty.isPtr()) {
604 const lhs_ty = c.node_ty[@intFromEnum(data.bin.lhs)];
605 if (lhs_ty.isPtr()) {
606 const ptr = try c.genExpr(data.bin.lhs);
607 const offset = try c.genExpr(data.bin.rhs);
608 const offset_ty = c.node_ty[@intFromEnum(data.bin.rhs)];
609 return c.genPtrArithmetic(ptr, offset, offset_ty, ty);
510 .mul_assign_expr => |bin| return c.genCompoundAssign(bin),
511 .div_assign_expr => |bin| return c.genCompoundAssign(bin),
512 .mod_assign_expr => |bin| return c.genCompoundAssign(bin),
513 .add_assign_expr => |bin| return c.genCompoundAssign(bin),
514 .sub_assign_expr => |bin| return c.genCompoundAssign(bin),
515 .shl_assign_expr => |bin| return c.genCompoundAssign(bin),
516 .shr_assign_expr => |bin| return c.genCompoundAssign(bin),
517 .bit_and_assign_expr => |bin| return c.genCompoundAssign(bin),
518 .bit_xor_assign_expr => |bin| return c.genCompoundAssign(bin),
519 .bit_or_assign_expr => |bin| return c.genCompoundAssign(bin),
520 .bit_or_expr => |bin| return c.genBinOp(bin, .bit_or),
521 .bit_xor_expr => |bin| return c.genBinOp(bin, .bit_xor),
522 .bit_and_expr => |bin| return c.genBinOp(bin, .bit_and),
523 .equal_expr => |bin| {
524 const cmp = try c.genComparison(bin, .cmp_eq);
525 return c.addUn(.zext, cmp, bin.qt);
526 },
527 .not_equal_expr => |bin| {
528 const cmp = try c.genComparison(bin, .cmp_ne);
529 return c.addUn(.zext, cmp, bin.qt);
530 },
531 .less_than_expr => |bin| {
532 const cmp = try c.genComparison(bin, .cmp_lt);
533 return c.addUn(.zext, cmp, bin.qt);
534 },
535 .less_than_equal_expr => |bin| {
536 const cmp = try c.genComparison(bin, .cmp_lte);
537 return c.addUn(.zext, cmp, bin.qt);
538 },
539 .greater_than_expr => |bin| {
540 const cmp = try c.genComparison(bin, .cmp_gt);
541 return c.addUn(.zext, cmp, bin.qt);
542 },
543 .greater_than_equal_expr => |bin| {
544 const cmp = try c.genComparison(bin, .cmp_gte);
545 return c.addUn(.zext, cmp, bin.qt);
546 },
547 .shl_expr => |bin| return c.genBinOp(bin, .bit_shl),
548 .shr_expr => |bin| return c.genBinOp(bin, .bit_shr),
549 .add_expr => |bin| {
550 if (bin.qt.is(c.comp, .pointer)) {
551 const lhs_qt = bin.lhs.qt(c.tree);
552 if (lhs_qt.is(c.comp, .pointer)) {
553 const ptr = try c.genExpr(bin.lhs);
554 const offset = try c.genExpr(bin.rhs);
555 return c.genPtrArithmetic(ptr, offset, bin.rhs.qt(c.tree), bin.qt);
610556 } else {
611 const offset = try c.genExpr(data.bin.lhs);
612 const ptr = try c.genExpr(data.bin.rhs);
613 const offset_ty = lhs_ty;
614 return c.genPtrArithmetic(ptr, offset, offset_ty, ty);
557 const offset = try c.genExpr(bin.lhs);
558 const ptr = try c.genExpr(bin.rhs);
559 const offset_ty = lhs_qt;
560 return c.genPtrArithmetic(ptr, offset, offset_ty, bin.qt);
615561 }
616562 }
617 return c.genBinOp(node, .add);
563 return c.genBinOp(bin, .add);
618564 },
619 .sub_expr => {
620 if (ty.isPtr()) {
621 const ptr = try c.genExpr(data.bin.lhs);
622 const offset = try c.genExpr(data.bin.rhs);
623 const offset_ty = c.node_ty[@intFromEnum(data.bin.rhs)];
624 return c.genPtrArithmetic(ptr, offset, offset_ty, ty);
565 .sub_expr => |bin| {
566 if (bin.qt.is(c.comp, .pointer)) {
567 const ptr = try c.genExpr(bin.lhs);
568 const offset = try c.genExpr(bin.rhs);
569 return c.genPtrArithmetic(ptr, offset, bin.rhs.qt(c.tree), bin.qt);
625570 }
626 return c.genBinOp(node, .sub);
627 },
628 .mul_expr => return c.genBinOp(node, .mul),
629 .div_expr => return c.genBinOp(node, .div),
630 .mod_expr => return c.genBinOp(node, .mod),
631 .addr_of_expr => return try c.genLval(data.un),
632 .deref_expr => {
633 const un_data = c.node_data[@intFromEnum(data.un)];
634 if (c.node_tag[@intFromEnum(data.un)] == .implicit_cast and un_data.cast.kind == .function_to_pointer) {
635 return c.genExpr(data.un);
571 return c.genBinOp(bin, .sub);
572 },
573 .mul_expr => |bin| return c.genBinOp(bin, .mul),
574 .div_expr => |bin| return c.genBinOp(bin, .div),
575 .mod_expr => |bin| return c.genBinOp(bin, .mod),
576 .addr_of_expr => |un| return try c.genLval(un.operand),
577 .deref_expr => |un| {
578 const operand_node = un.operand.get(c.tree);
579 if (operand_node == .cast and operand_node.cast.kind == .function_to_pointer) {
580 return c.genExpr(un.operand);
636581 }
637 const operand = try c.genLval(data.un);
638 return c.addUn(.load, operand, ty);
639 },
640 .plus_expr => return c.genExpr(data.un),
641 .negate_expr => {
642 const zero = try c.builder.addConstant(.zero, try c.genType(ty));
643 const operand = try c.genExpr(data.un);
644 return c.addBin(.sub, zero, operand, ty);
645 },
646 .bit_not_expr => {
647 const operand = try c.genExpr(data.un);
648 return c.addUn(.bit_not, operand, ty);
649 },
650 .bool_not_expr => {
651 const zero = try c.builder.addConstant(.zero, try c.genType(ty));
652 const operand = try c.genExpr(data.un);
653 return c.addBin(.cmp_ne, zero, operand, ty);
654 },
655 .pre_inc_expr => {
656 const operand = try c.genLval(data.un);
657 const val = try c.addUn(.load, operand, ty);
658 const one = try c.builder.addConstant(.one, try c.genType(ty));
659 const plus_one = try c.addBin(.add, val, one, ty);
582 const operand = try c.genLval(un.operand);
583 return c.addUn(.load, operand, un.qt);
584 },
585 .plus_expr => |un| return c.genExpr(un.operand),
586 .negate_expr => |un| {
587 const zero = try c.builder.addConstant(.zero, try c.genType(un.qt));
588 const operand = try c.genExpr(un.operand);
589 return c.addBin(.sub, zero, operand, un.qt);
590 },
591 .bit_not_expr => |un| {
592 const operand = try c.genExpr(un.operand);
593 return c.addUn(.bit_not, operand, un.qt);
594 },
595 .bool_not_expr => |un| {
596 const zero = try c.builder.addConstant(.zero, try c.genType(un.qt));
597 const operand = try c.genExpr(un.operand);
598 return c.addBin(.cmp_ne, zero, operand, un.qt);
599 },
600 .pre_inc_expr => |un| {
601 const operand = try c.genLval(un.operand);
602 const val = try c.addUn(.load, operand, un.qt);
603 const one = try c.builder.addConstant(.one, try c.genType(un.qt));
604 const plus_one = try c.addBin(.add, val, one, un.qt);
660605 try c.builder.addStore(operand, plus_one);
661606 return plus_one;
662607 },
663 .pre_dec_expr => {
664 const operand = try c.genLval(data.un);
665 const val = try c.addUn(.load, operand, ty);
666 const one = try c.builder.addConstant(.one, try c.genType(ty));
667 const plus_one = try c.addBin(.sub, val, one, ty);
608 .pre_dec_expr => |un| {
609 const operand = try c.genLval(un.operand);
610 const val = try c.addUn(.load, operand, un.qt);
611 const one = try c.builder.addConstant(.one, try c.genType(un.qt));
612 const plus_one = try c.addBin(.sub, val, one, un.qt);
668613 try c.builder.addStore(operand, plus_one);
669614 return plus_one;
670615 },
671 .post_inc_expr => {
672 const operand = try c.genLval(data.un);
673 const val = try c.addUn(.load, operand, ty);
674 const one = try c.builder.addConstant(.one, try c.genType(ty));
675 const plus_one = try c.addBin(.add, val, one, ty);
616 .post_inc_expr => |un| {
617 const operand = try c.genLval(un.operand);
618 const val = try c.addUn(.load, operand, un.qt);
619 const one = try c.builder.addConstant(.one, try c.genType(un.qt));
620 const plus_one = try c.addBin(.add, val, one, un.qt);
676621 try c.builder.addStore(operand, plus_one);
677622 return val;
678623 },
679 .post_dec_expr => {
680 const operand = try c.genLval(data.un);
681 const val = try c.addUn(.load, operand, ty);
682 const one = try c.builder.addConstant(.one, try c.genType(ty));
683 const plus_one = try c.addBin(.sub, val, one, ty);
624 .post_dec_expr => |un| {
625 const operand = try c.genLval(un.operand);
626 const val = try c.addUn(.load, operand, un.qt);
627 const one = try c.builder.addConstant(.one, try c.genType(un.qt));
628 const plus_one = try c.addBin(.sub, val, one, un.qt);
684629 try c.builder.addStore(operand, plus_one);
685630 return val;
686631 },
687 .paren_expr => return c.genExpr(data.un),
632 .paren_expr => |un| return c.genExpr(un.operand),
688633 .decl_ref_expr => unreachable, // Lval expression.
689 .explicit_cast, .implicit_cast => switch (data.cast.kind) {
690 .no_op => return c.genExpr(data.cast.operand),
634 .cast => |cast| switch (cast.kind) {
635 .no_op => return c.genExpr(cast.operand),
691636 .to_void => {
692 _ = try c.genExpr(data.cast.operand);
637 _ = try c.genExpr(cast.operand);
693638 return .none;
694639 },
695640 .lval_to_rval => {
696 const operand = try c.genLval(data.cast.operand);
697 return c.addUn(.load, operand, ty);
641 const operand = try c.genLval(cast.operand);
642 return c.addUn(.load, operand, cast.qt);
698643 },
699644 .function_to_pointer, .array_to_pointer => {
700 return c.genLval(data.cast.operand);
645 return c.genLval(cast.operand);
701646 },
702647 .int_cast => {
703 const operand = try c.genExpr(data.cast.operand);
704 const src_ty = c.node_ty[@intFromEnum(data.cast.operand)];
705 const src_bits = src_ty.bitSizeof(c.comp).?;
706 const dest_bits = ty.bitSizeof(c.comp).?;
648 const operand = try c.genExpr(cast.operand);
649 const src_qt = cast.operand.qt(c.tree);
650 const src_bits = src_qt.bitSizeof(c.comp);
651 const dest_bits = cast.qt.bitSizeof(c.comp);
707652 if (src_bits == dest_bits) {
708653 return operand;
709654 } else if (src_bits < dest_bits) {
710 if (src_ty.isUnsignedInt(c.comp))
711 return c.addUn(.zext, operand, ty)
655 if (src_qt.signedness(c.comp) == .unsigned)
656 return c.addUn(.zext, operand, cast.qt)
712657 else
713 return c.addUn(.sext, operand, ty);
658 return c.addUn(.sext, operand, cast.qt);
714659 } else {
715 return c.addUn(.trunc, operand, ty);
660 return c.addUn(.trunc, operand, cast.qt);
716661 }
717662 },
718663 .bool_to_int => {
719 const operand = try c.genExpr(data.cast.operand);
720 return c.addUn(.zext, operand, ty);
664 const operand = try c.genExpr(cast.operand);
665 return c.addUn(.zext, operand, cast.qt);
721666 },
722667 .pointer_to_bool, .int_to_bool, .float_to_bool => {
723 const lhs = try c.genExpr(data.cast.operand);
724 const rhs = try c.builder.addConstant(.zero, try c.genType(c.node_ty[@intFromEnum(node)]));
668 const lhs = try c.genExpr(cast.operand);
669 const rhs = try c.builder.addConstant(.zero, try c.genType(cast.qt));
725670 return c.builder.addInst(.cmp_ne, .{ .bin = .{ .lhs = lhs, .rhs = rhs } }, .i1);
726671 },
727672 .bitcast,
......@@ -743,40 +688,42 @@ fn genExpr(c: *CodeGen, node: NodeIndex) Error!Ir.Ref {
743688 .null_to_pointer,
744689 .union_cast,
745690 .vector_splat,
746 => return c.fail("TODO CodeGen gen CastKind {}\n", .{data.cast.kind}),
691 .atomic_to_non_atomic,
692 .non_atomic_to_atomic,
693 => return c.fail("TODO CodeGen gen CastKind {}\n", .{cast.kind}),
747694 },
748 .binary_cond_expr => {
749 if (c.tree.value_map.get(data.if3.cond)) |cond| {
695 .binary_cond_expr => |conditional| {
696 if (c.tree.value_map.get(conditional.cond)) |cond| {
750697 if (cond.toBool(c.comp)) {
751 c.cond_dummy_ref = try c.genExpr(data.if3.cond);
752 return c.genExpr(c.tree.data[data.if3.body]); // then
698 c.cond_dummy_ref = try c.genExpr(conditional.cond);
699 return c.genExpr(conditional.then_expr);
753700 } else {
754 return c.genExpr(c.tree.data[data.if3.body + 1]); // else
701 return c.genExpr(conditional.else_expr);
755702 }
756703 }
757704
758705 const then_label = try c.builder.makeLabel("ternary.then");
759706 const else_label = try c.builder.makeLabel("ternary.else");
760707 const end_label = try c.builder.makeLabel("ternary.end");
761 const cond_ty = c.node_ty[@intFromEnum(data.if3.cond)];
708 const cond_qt = conditional.cond.qt(c.tree);
762709 {
763710 const old_cond_dummy_ty = c.cond_dummy_ty;
764711 defer c.cond_dummy_ty = old_cond_dummy_ty;
765 c.cond_dummy_ty = try c.genType(cond_ty);
712 c.cond_dummy_ty = try c.genType(cond_qt);
766713
767 try c.genBoolExpr(data.if3.cond, then_label, else_label);
714 try c.genBoolExpr(conditional.cond, then_label, else_label);
768715 }
769716
770717 try c.builder.startBlock(then_label);
771718 if (c.builder.instructions.items(.ty)[@intFromEnum(c.cond_dummy_ref)] == .i1) {
772 c.cond_dummy_ref = try c.addUn(.zext, c.cond_dummy_ref, cond_ty);
719 c.cond_dummy_ref = try c.addUn(.zext, c.cond_dummy_ref, cond_qt);
773720 }
774 const then_val = try c.genExpr(c.tree.data[data.if3.body]); // then
721 const then_val = try c.genExpr(conditional.then_expr);
775722 try c.builder.addJump(end_label);
776723 const then_exit = c.builder.current_label;
777724
778725 try c.builder.startBlock(else_label);
779 const else_val = try c.genExpr(c.tree.data[data.if3.body + 1]); // else
726 const else_val = try c.genExpr(conditional.else_expr);
780727 const else_exit = c.builder.current_label;
781728
782729 try c.builder.startBlock(end_label);
......@@ -785,15 +732,15 @@ fn genExpr(c: *CodeGen, node: NodeIndex) Error!Ir.Ref {
785732 .{ .value = then_val, .label = then_exit },
786733 .{ .value = else_val, .label = else_exit },
787734 };
788 return c.builder.addPhi(&phi_buf, try c.genType(ty));
735 return c.builder.addPhi(&phi_buf, try c.genType(conditional.qt));
789736 },
790737 .cond_dummy_expr => return c.cond_dummy_ref,
791 .cond_expr => {
792 if (c.tree.value_map.get(data.if3.cond)) |cond| {
738 .cond_expr => |conditional| {
739 if (c.tree.value_map.get(conditional.cond)) |cond| {
793740 if (cond.toBool(c.comp)) {
794 return c.genExpr(c.tree.data[data.if3.body]); // then
741 return c.genExpr(conditional.then_expr);
795742 } else {
796 return c.genExpr(c.tree.data[data.if3.body + 1]); // else
743 return c.genExpr(conditional.else_expr);
797744 }
798745 }
799746
......@@ -801,15 +748,15 @@ fn genExpr(c: *CodeGen, node: NodeIndex) Error!Ir.Ref {
801748 const else_label = try c.builder.makeLabel("ternary.else");
802749 const end_label = try c.builder.makeLabel("ternary.end");
803750
804 try c.genBoolExpr(data.if3.cond, then_label, else_label);
751 try c.genBoolExpr(conditional.cond, then_label, else_label);
805752
806753 try c.builder.startBlock(then_label);
807 const then_val = try c.genExpr(c.tree.data[data.if3.body]); // then
754 const then_val = try c.genExpr(conditional.then_expr);
808755 try c.builder.addJump(end_label);
809756 const then_exit = c.builder.current_label;
810757
811758 try c.builder.startBlock(else_label);
812 const else_val = try c.genExpr(c.tree.data[data.if3.body + 1]); // else
759 const else_val = try c.genExpr(conditional.else_expr);
813760 const else_exit = c.builder.current_label;
814761
815762 try c.builder.startBlock(end_label);
......@@ -818,22 +765,15 @@ fn genExpr(c: *CodeGen, node: NodeIndex) Error!Ir.Ref {
818765 .{ .value = then_val, .label = then_exit },
819766 .{ .value = else_val, .label = else_exit },
820767 };
821 return c.builder.addPhi(&phi_buf, try c.genType(ty));
822 },
823 .call_expr_one => if (data.bin.rhs == .none) {
824 return c.genCall(data.bin.lhs, &.{}, ty);
825 } else {
826 return c.genCall(data.bin.lhs, &.{data.bin.rhs}, ty);
827 },
828 .call_expr => {
829 return c.genCall(c.tree.data[data.range.start], c.tree.data[data.range.start + 1 .. data.range.end], ty);
768 return c.builder.addPhi(&phi_buf, try c.genType(conditional.qt));
830769 },
831 .bool_or_expr => {
832 if (c.tree.value_map.get(data.bin.lhs)) |lhs| {
770 .call_expr => |call| return c.genCall(call),
771 .bool_or_expr => |bin| {
772 if (c.tree.value_map.get(bin.lhs)) |lhs| {
833773 if (!lhs.toBool(c.comp)) {
834 return c.builder.addConstant(.one, try c.genType(ty));
774 return c.builder.addConstant(.one, try c.genType(bin.qt));
835775 }
836 return c.genExpr(data.bin.rhs);
776 return c.genExpr(bin.rhs);
837777 }
838778
839779 const false_label = try c.builder.makeLabel("bool_false");
......@@ -846,22 +786,22 @@ fn genExpr(c: *CodeGen, node: NodeIndex) Error!Ir.Ref {
846786 const phi_nodes_top = c.phi_nodes.items.len;
847787 defer c.phi_nodes.items.len = phi_nodes_top;
848788
849 try c.genBoolExpr(data.bin.lhs, exit_label, false_label);
789 try c.genBoolExpr(bin.lhs, exit_label, false_label);
850790
851791 try c.builder.startBlock(false_label);
852 try c.genBoolExpr(data.bin.rhs, exit_label, exit_label);
792 try c.genBoolExpr(bin.rhs, exit_label, exit_label);
853793
854794 try c.builder.startBlock(exit_label);
855795
856796 const phi = try c.builder.addPhi(c.phi_nodes.items[phi_nodes_top..], .i1);
857 return c.addUn(.zext, phi, ty);
797 return c.addUn(.zext, phi, bin.qt);
858798 },
859 .bool_and_expr => {
860 if (c.tree.value_map.get(data.bin.lhs)) |lhs| {
799 .bool_and_expr => |bin| {
800 if (c.tree.value_map.get(bin.lhs)) |lhs| {
861801 if (!lhs.toBool(c.comp)) {
862 return c.builder.addConstant(.zero, try c.genType(ty));
802 return c.builder.addConstant(.zero, try c.genType(bin.qt));
863803 }
864 return c.genExpr(data.bin.rhs);
804 return c.genExpr(bin.rhs);
865805 }
866806
867807 const true_label = try c.builder.makeLabel("bool_true");
......@@ -874,102 +814,73 @@ fn genExpr(c: *CodeGen, node: NodeIndex) Error!Ir.Ref {
874814 const phi_nodes_top = c.phi_nodes.items.len;
875815 defer c.phi_nodes.items.len = phi_nodes_top;
876816
877 try c.genBoolExpr(data.bin.lhs, true_label, exit_label);
817 try c.genBoolExpr(bin.lhs, true_label, exit_label);
878818
879819 try c.builder.startBlock(true_label);
880 try c.genBoolExpr(data.bin.rhs, exit_label, exit_label);
820 try c.genBoolExpr(bin.rhs, exit_label, exit_label);
881821
882822 try c.builder.startBlock(exit_label);
883823
884824 const phi = try c.builder.addPhi(c.phi_nodes.items[phi_nodes_top..], .i1);
885 return c.addUn(.zext, phi, ty);
825 return c.addUn(.zext, phi, bin.qt);
886826 },
887 .builtin_choose_expr => {
888 const cond = c.tree.value_map.get(data.if3.cond).?;
827 .builtin_choose_expr => |conditional| {
828 const cond = c.tree.value_map.get(conditional.cond).?;
889829 if (cond.toBool(c.comp)) {
890 return c.genExpr(c.tree.data[data.if3.body]);
830 return c.genExpr(conditional.then_expr);
891831 } else {
892 return c.genExpr(c.tree.data[data.if3.body + 1]);
832 return c.genExpr(conditional.else_expr);
893833 }
894834 },
895 .generic_expr_one => {
896 const index = @intFromEnum(data.bin.rhs);
897 switch (c.node_tag[index]) {
898 .generic_association_expr, .generic_default_expr => {
899 return c.genExpr(c.node_data[index].un);
835 .generic_expr => |generic| {
836 const chosen = generic.chosen.get(c.tree);
837 switch (chosen) {
838 .generic_association_expr => |assoc| {
839 return c.genExpr(assoc.expr);
900840 },
901 else => unreachable,
902 }
903 },
904 .generic_expr => {
905 const index = @intFromEnum(c.tree.data[data.range.start + 1]);
906 switch (c.node_tag[index]) {
907 .generic_association_expr, .generic_default_expr => {
908 return c.genExpr(c.node_data[index].un);
841 .generic_default_expr => |default| {
842 return c.genExpr(default.expr);
909843 },
910844 else => unreachable,
911845 }
912846 },
913847 .generic_association_expr, .generic_default_expr => unreachable,
914 .stmt_expr => switch (c.node_tag[@intFromEnum(data.un)]) {
915 .compound_stmt_two => {
916 const old_sym_len = c.symbols.items.len;
917 c.symbols.items.len = old_sym_len;
918
919 const stmt_data = c.node_data[@intFromEnum(data.un)];
920 if (stmt_data.bin.rhs == .none) return c.genExpr(stmt_data.bin.lhs);
921 try c.genStmt(stmt_data.bin.lhs);
922 return c.genExpr(stmt_data.bin.rhs);
923 },
924 .compound_stmt => {
925 const old_sym_len = c.symbols.items.len;
926 c.symbols.items.len = old_sym_len;
848 .stmt_expr => |un| {
849 const compound_stmt = un.operand.get(c.tree).compound_stmt;
927850
928 const stmt_data = c.node_data[@intFromEnum(data.un)];
929 for (c.tree.data[stmt_data.range.start .. stmt_data.range.end - 1]) |stmt| try c.genStmt(stmt);
930 return c.genExpr(c.tree.data[stmt_data.range.end]);
931 },
932 else => unreachable,
933 },
934 .builtin_call_expr_one => {
935 const name = c.tree.tokSlice(data.decl.name);
936 const builtin = c.comp.builtins.lookup(name).builtin;
937 if (data.decl.node == .none) {
938 return c.genBuiltinCall(builtin, &.{}, ty);
939 } else {
940 return c.genBuiltinCall(builtin, &.{data.decl.node}, ty);
941 }
851 const old_sym_len = c.symbols.items.len;
852 c.symbols.items.len = old_sym_len;
853
854 for (compound_stmt.body[0..compound_stmt.body.len -| 1]) |stmt| try c.genStmt(stmt);
855 return c.genExpr(compound_stmt.body[compound_stmt.body.len - 1]);
942856 },
943 .builtin_call_expr => {
944 const name_node_idx = c.tree.data[data.range.start];
945 const name = c.tree.tokSlice(@intFromEnum(name_node_idx));
857 .builtin_call_expr => |call| {
858 const name = c.tree.tokSlice(call.builtin_tok);
946859 const builtin = c.comp.builtins.lookup(name).builtin;
947 return c.genBuiltinCall(builtin, c.tree.data[data.range.start + 1 .. data.range.end], ty);
860 return c.genBuiltinCall(builtin, call.args, call.qt);
948861 },
949862 .addr_of_label,
950863 .imag_expr,
951864 .real_expr,
952865 .sizeof_expr,
953 .special_builtin_call_one,
954 => return c.fail("TODO CodeGen.genExpr {}\n", .{c.node_tag[@intFromEnum(node)]}),
866 => return c.fail("TODO CodeGen.genExpr {s}\n", .{@tagName(node)}),
955867 else => unreachable, // Not an expression.
956868 }
957869 return .none;
958870}
959871
960fn genLval(c: *CodeGen, node: NodeIndex) Error!Ir.Ref {
961 std.debug.assert(node != .none);
962 assert(c.tree.isLval(node));
963 const data = c.node_data[@intFromEnum(node)];
964 switch (c.node_tag[@intFromEnum(node)]) {
872fn genLval(c: *CodeGen, node_index: Node.Index) Error!Ir.Ref {
873 assert(c.tree.isLval(node_index));
874 const node = node_index.get(c.tree);
875 switch (node) {
965876 .string_literal_expr => {
966 const val = c.tree.value_map.get(node).?;
877 const val = c.tree.value_map.get(node_index).?;
967878 return c.builder.addConstant(val.ref(), .ptr);
968879 },
969 .paren_expr => return c.genLval(data.un),
970 .decl_ref_expr => {
971 const slice = c.tree.tokSlice(data.decl_ref);
972 const name = try StrInt.intern(c.comp, slice);
880 .paren_expr => |un| return c.genLval(un.operand),
881 .decl_ref_expr => |decl_ref| {
882 const slice = c.tree.tokSlice(decl_ref.name_tok);
883 const name = try c.comp.internString(slice);
973884 var i = c.symbols.items.len;
974885 while (i > 0) {
975886 i -= 1;
......@@ -983,160 +894,159 @@ fn genLval(c: *CodeGen, node: NodeIndex) Error!Ir.Ref {
983894 try c.builder.instructions.append(c.builder.gpa, .{ .tag = .symbol, .data = .{ .label = duped_name }, .ty = .ptr });
984895 return ref;
985896 },
986 .deref_expr => return c.genExpr(data.un),
987 .compound_literal_expr => {
988 const ty = c.node_ty[@intFromEnum(node)];
989 const size: u32 = @intCast(ty.sizeof(c.comp).?); // TODO add error in parser
990 const @"align" = ty.alignof(c.comp);
897 .deref_expr => |un| return c.genExpr(un.operand),
898 .compound_literal_expr => |literal| {
899 if (literal.storage_class == .static or literal.thread_local) {
900 return c.fail("TODO CodeGen.compound_literal_expr static or thread_local\n", .{});
901 }
902 const size: u32 = @intCast(literal.qt.sizeof(c.comp)); // TODO add error in parser
903 const @"align" = literal.qt.alignof(c.comp);
991904 const alloc = try c.builder.addAlloc(size, @"align");
992 try c.genInitializer(alloc, ty, data.un);
905 try c.genInitializer(alloc, literal.qt, literal.initializer);
993906 return alloc;
994907 },
995 .builtin_choose_expr => {
996 const cond = c.tree.value_map.get(data.if3.cond).?;
908 .builtin_choose_expr => |conditional| {
909 const cond = c.tree.value_map.get(conditional.cond).?;
997910 if (cond.toBool(c.comp)) {
998 return c.genLval(c.tree.data[data.if3.body]);
911 return c.genLval(conditional.then_expr);
999912 } else {
1000 return c.genLval(c.tree.data[data.if3.body + 1]);
913 return c.genLval(conditional.else_expr);
1001914 }
1002915 },
916 .compound_assign_dummy_expr => {
917 return c.compound_assign_dummy.?;
918 },
1003919 .member_access_expr,
1004920 .member_access_ptr_expr,
1005921 .array_access_expr,
1006 .static_compound_literal_expr,
1007 .thread_local_compound_literal_expr,
1008 .static_thread_local_compound_literal_expr,
1009 => return c.fail("TODO CodeGen.genLval {}\n", .{c.node_tag[@intFromEnum(node)]}),
922 => return c.fail("TODO CodeGen.genLval {s}\n", .{@tagName(node)}),
1010923 else => unreachable, // Not an lval expression.
1011924 }
1012925}
1013926
1014fn genBoolExpr(c: *CodeGen, base: NodeIndex, true_label: Ir.Ref, false_label: Ir.Ref) Error!void {
927fn genBoolExpr(c: *CodeGen, base: Node.Index, true_label: Ir.Ref, false_label: Ir.Ref) Error!void {
1015928 var node = base;
1016 while (true) switch (c.node_tag[@intFromEnum(node)]) {
1017 .paren_expr => {
1018 node = c.node_data[@intFromEnum(node)].un;
1019 },
929 while (true) switch (node.get(c.tree)) {
930 .paren_expr => |un| node = un.operand,
1020931 else => break,
1021932 };
1022933
1023 const data = c.node_data[@intFromEnum(node)];
1024 switch (c.node_tag[@intFromEnum(node)]) {
1025 .bool_or_expr => {
1026 if (c.tree.value_map.get(data.bin.lhs)) |lhs| {
934 switch (node.get(c.tree)) {
935 .bool_or_expr => |bin| {
936 if (c.tree.value_map.get(bin.lhs)) |lhs| {
1027937 if (lhs.toBool(c.comp)) {
1028938 if (true_label == c.bool_end_label) {
1029939 return c.addBoolPhi(!c.bool_invert);
1030940 }
1031941 return c.builder.addJump(true_label);
1032942 }
1033 return c.genBoolExpr(data.bin.rhs, true_label, false_label);
943 return c.genBoolExpr(bin.rhs, true_label, false_label);
1034944 }
1035945
1036946 const new_false_label = try c.builder.makeLabel("bool_false");
1037 try c.genBoolExpr(data.bin.lhs, true_label, new_false_label);
947 try c.genBoolExpr(bin.lhs, true_label, new_false_label);
1038948 try c.builder.startBlock(new_false_label);
1039949
1040950 if (c.cond_dummy_ty) |ty| c.cond_dummy_ref = try c.builder.addConstant(.one, ty);
1041 return c.genBoolExpr(data.bin.rhs, true_label, false_label);
951 return c.genBoolExpr(bin.rhs, true_label, false_label);
1042952 },
1043 .bool_and_expr => {
1044 if (c.tree.value_map.get(data.bin.lhs)) |lhs| {
953 .bool_and_expr => |bin| {
954 if (c.tree.value_map.get(bin.lhs)) |lhs| {
1045955 if (!lhs.toBool(c.comp)) {
1046956 if (false_label == c.bool_end_label) {
1047957 return c.addBoolPhi(c.bool_invert);
1048958 }
1049959 return c.builder.addJump(false_label);
1050960 }
1051 return c.genBoolExpr(data.bin.rhs, true_label, false_label);
961 return c.genBoolExpr(bin.rhs, true_label, false_label);
1052962 }
1053963
1054964 const new_true_label = try c.builder.makeLabel("bool_true");
1055 try c.genBoolExpr(data.bin.lhs, new_true_label, false_label);
965 try c.genBoolExpr(bin.lhs, new_true_label, false_label);
1056966 try c.builder.startBlock(new_true_label);
1057967
1058968 if (c.cond_dummy_ty) |ty| c.cond_dummy_ref = try c.builder.addConstant(.one, ty);
1059 return c.genBoolExpr(data.bin.rhs, true_label, false_label);
969 return c.genBoolExpr(bin.rhs, true_label, false_label);
1060970 },
1061 .bool_not_expr => {
971 .bool_not_expr => |un| {
1062972 c.bool_invert = !c.bool_invert;
1063973 defer c.bool_invert = !c.bool_invert;
1064974
1065975 if (c.cond_dummy_ty) |ty| c.cond_dummy_ref = try c.builder.addConstant(.zero, ty);
1066 return c.genBoolExpr(data.un, false_label, true_label);
976 return c.genBoolExpr(un.operand, false_label, true_label);
1067977 },
1068 .equal_expr => {
1069 const cmp = try c.genComparison(node, .cmp_eq);
978 .equal_expr => |bin| {
979 const cmp = try c.genComparison(bin, .cmp_eq);
1070980 if (c.cond_dummy_ty != null) c.cond_dummy_ref = cmp;
1071981 return c.addBranch(cmp, true_label, false_label);
1072982 },
1073 .not_equal_expr => {
1074 const cmp = try c.genComparison(node, .cmp_ne);
983 .not_equal_expr => |bin| {
984 const cmp = try c.genComparison(bin, .cmp_ne);
1075985 if (c.cond_dummy_ty != null) c.cond_dummy_ref = cmp;
1076986 return c.addBranch(cmp, true_label, false_label);
1077987 },
1078 .less_than_expr => {
1079 const cmp = try c.genComparison(node, .cmp_lt);
988 .less_than_expr => |bin| {
989 const cmp = try c.genComparison(bin, .cmp_lt);
1080990 if (c.cond_dummy_ty != null) c.cond_dummy_ref = cmp;
1081991 return c.addBranch(cmp, true_label, false_label);
1082992 },
1083 .less_than_equal_expr => {
1084 const cmp = try c.genComparison(node, .cmp_lte);
993 .less_than_equal_expr => |bin| {
994 const cmp = try c.genComparison(bin, .cmp_lte);
1085995 if (c.cond_dummy_ty != null) c.cond_dummy_ref = cmp;
1086996 return c.addBranch(cmp, true_label, false_label);
1087997 },
1088 .greater_than_expr => {
1089 const cmp = try c.genComparison(node, .cmp_gt);
998 .greater_than_expr => |bin| {
999 const cmp = try c.genComparison(bin, .cmp_gt);
10901000 if (c.cond_dummy_ty != null) c.cond_dummy_ref = cmp;
10911001 return c.addBranch(cmp, true_label, false_label);
10921002 },
1093 .greater_than_equal_expr => {
1094 const cmp = try c.genComparison(node, .cmp_gte);
1003 .greater_than_equal_expr => |bin| {
1004 const cmp = try c.genComparison(bin, .cmp_gte);
10951005 if (c.cond_dummy_ty != null) c.cond_dummy_ref = cmp;
10961006 return c.addBranch(cmp, true_label, false_label);
10971007 },
1098 .explicit_cast, .implicit_cast => switch (data.cast.kind) {
1008 .cast => |cast| switch (cast.kind) {
10991009 .bool_to_int => {
1100 const operand = try c.genExpr(data.cast.operand);
1010 const operand = try c.genExpr(cast.operand);
11011011 if (c.cond_dummy_ty != null) c.cond_dummy_ref = operand;
11021012 return c.addBranch(operand, true_label, false_label);
11031013 },
11041014 else => {},
11051015 },
1106 .binary_cond_expr => {
1107 if (c.tree.value_map.get(data.if3.cond)) |cond| {
1016 .binary_cond_expr => |conditional| {
1017 if (c.tree.value_map.get(conditional.cond)) |cond| {
11081018 if (cond.toBool(c.comp)) {
1109 return c.genBoolExpr(c.tree.data[data.if3.body], true_label, false_label); // then
1019 return c.genBoolExpr(conditional.then_expr, true_label, false_label);
11101020 } else {
1111 return c.genBoolExpr(c.tree.data[data.if3.body + 1], true_label, false_label); // else
1021 return c.genBoolExpr(conditional.else_expr, true_label, false_label);
11121022 }
11131023 }
11141024
11151025 const new_false_label = try c.builder.makeLabel("ternary.else");
1116 try c.genBoolExpr(data.if3.cond, true_label, new_false_label);
1026 try c.genBoolExpr(conditional.cond, true_label, new_false_label);
11171027
11181028 try c.builder.startBlock(new_false_label);
11191029 if (c.cond_dummy_ty) |ty| c.cond_dummy_ref = try c.builder.addConstant(.one, ty);
1120 return c.genBoolExpr(c.tree.data[data.if3.body + 1], true_label, false_label); // else
1030 return c.genBoolExpr(conditional.else_expr, true_label, false_label);
11211031 },
1122 .cond_expr => {
1123 if (c.tree.value_map.get(data.if3.cond)) |cond| {
1032 .cond_expr => |conditional| {
1033 if (c.tree.value_map.get(conditional.cond)) |cond| {
11241034 if (cond.toBool(c.comp)) {
1125 return c.genBoolExpr(c.tree.data[data.if3.body], true_label, false_label); // then
1035 return c.genBoolExpr(conditional.then_expr, true_label, false_label);
11261036 } else {
1127 return c.genBoolExpr(c.tree.data[data.if3.body + 1], true_label, false_label); // else
1037 return c.genBoolExpr(conditional.else_expr, true_label, false_label);
11281038 }
11291039 }
11301040
11311041 const new_true_label = try c.builder.makeLabel("ternary.then");
11321042 const new_false_label = try c.builder.makeLabel("ternary.else");
1133 try c.genBoolExpr(data.if3.cond, new_true_label, new_false_label);
1043 try c.genBoolExpr(conditional.cond, new_true_label, new_false_label);
11341044
11351045 try c.builder.startBlock(new_true_label);
1136 try c.genBoolExpr(c.tree.data[data.if3.body], true_label, false_label); // then
1046 try c.genBoolExpr(conditional.then_expr, true_label, false_label);
11371047 try c.builder.startBlock(new_false_label);
11381048 if (c.cond_dummy_ty) |ty| c.cond_dummy_ref = try c.builder.addConstant(.one, ty);
1139 return c.genBoolExpr(c.tree.data[data.if3.body + 1], true_label, false_label); // else
1049 return c.genBoolExpr(conditional.else_expr, true_label, false_label);
11401050 },
11411051 else => {},
11421052 }
......@@ -1157,46 +1067,43 @@ fn genBoolExpr(c: *CodeGen, base: NodeIndex, true_label: Ir.Ref, false_label: Ir
11571067
11581068 // Assume int operand.
11591069 const lhs = try c.genExpr(node);
1160 const rhs = try c.builder.addConstant(.zero, try c.genType(c.node_ty[@intFromEnum(node)]));
1070 const rhs = try c.builder.addConstant(.zero, try c.genType(node.qt(c.tree)));
11611071 const cmp = try c.builder.addInst(.cmp_ne, .{ .bin = .{ .lhs = lhs, .rhs = rhs } }, .i1);
11621072 if (c.cond_dummy_ty != null) c.cond_dummy_ref = cmp;
11631073 try c.addBranch(cmp, true_label, false_label);
11641074}
11651075
1166fn genBuiltinCall(c: *CodeGen, builtin: Builtin, arg_nodes: []const NodeIndex, ty: Type) Error!Ir.Ref {
1076fn genBuiltinCall(c: *CodeGen, builtin: Builtin, arg_nodes: []const Node.Index, qt: QualType) Error!Ir.Ref {
11671077 _ = arg_nodes;
1168 _ = ty;
1078 _ = qt;
11691079 return c.fail("TODO CodeGen.genBuiltinCall {s}\n", .{Builtin.nameFromTag(builtin.tag).span()});
11701080}
11711081
1172fn genCall(c: *CodeGen, fn_node: NodeIndex, arg_nodes: []const NodeIndex, ty: Type) Error!Ir.Ref {
1082fn genCall(c: *CodeGen, call: Node.Call) Error!Ir.Ref {
11731083 // Detect direct calls.
11741084 const fn_ref = blk: {
1175 const data = c.node_data[@intFromEnum(fn_node)];
1176 if (c.node_tag[@intFromEnum(fn_node)] != .implicit_cast or data.cast.kind != .function_to_pointer) {
1177 break :blk try c.genExpr(fn_node);
1085 const callee = call.callee.get(c.tree);
1086 if (callee != .cast or callee.cast.kind != .function_to_pointer) {
1087 break :blk try c.genExpr(call.callee);
11781088 }
11791089
1180 var cur = @intFromEnum(data.cast.operand);
1181 while (true) switch (c.node_tag[cur]) {
1182 .paren_expr, .addr_of_expr, .deref_expr => {
1183 cur = @intFromEnum(c.node_data[cur].un);
1184 },
1185 .implicit_cast => {
1186 const cast = c.node_data[cur].cast;
1090 var cur = callee.cast.operand;
1091 while (true) switch (cur.get(c.tree)) {
1092 .paren_expr, .addr_of_expr, .deref_expr => |un| cur = un.operand,
1093 .cast => |cast| {
11871094 if (cast.kind != .function_to_pointer) {
1188 break :blk try c.genExpr(fn_node);
1095 break :blk try c.genExpr(call.callee);
11891096 }
1190 cur = @intFromEnum(cast.operand);
1097 cur = cast.operand;
11911098 },
1192 .decl_ref_expr => {
1193 const slice = c.tree.tokSlice(c.node_data[cur].decl_ref);
1194 const name = try StrInt.intern(c.comp, slice);
1099 .decl_ref_expr => |decl_ref| {
1100 const slice = c.tree.tokSlice(decl_ref.name_tok);
1101 const name = try c.comp.internString(slice);
11951102 var i = c.symbols.items.len;
11961103 while (i > 0) {
11971104 i -= 1;
11981105 if (c.symbols.items[i].name == name) {
1199 break :blk try c.genExpr(fn_node);
1106 break :blk try c.genExpr(call.callee);
12001107 }
12011108 }
12021109
......@@ -1205,56 +1112,55 @@ fn genCall(c: *CodeGen, fn_node: NodeIndex, arg_nodes: []const NodeIndex, ty: Ty
12051112 try c.builder.instructions.append(c.builder.gpa, .{ .tag = .symbol, .data = .{ .label = duped_name }, .ty = .ptr });
12061113 break :blk ref;
12071114 },
1208 else => break :blk try c.genExpr(fn_node),
1115 else => break :blk try c.genExpr(call.callee),
12091116 };
12101117 };
12111118
1212 const args = try c.builder.arena.allocator().alloc(Ir.Ref, arg_nodes.len);
1213 for (arg_nodes, args) |node, *arg| {
1119 const args = try c.builder.arena.allocator().alloc(Ir.Ref, call.args.len);
1120 for (call.args, args) |node, *arg| {
12141121 // TODO handle calling convention here
12151122 arg.* = try c.genExpr(node);
12161123 }
12171124 // TODO handle variadic call
1218 const call = try c.builder.arena.allocator().create(Ir.Inst.Call);
1219 call.* = .{
1125 const call_inst = try c.builder.arena.allocator().create(Ir.Inst.Call);
1126 call_inst.* = .{
12201127 .func = fn_ref,
12211128 .args_len = @intCast(args.len),
12221129 .args_ptr = args.ptr,
12231130 };
1224 return c.builder.addInst(.call, .{ .call = call }, try c.genType(ty));
1131 return c.builder.addInst(.call, .{ .call = call_inst }, try c.genType(call.qt));
12251132}
12261133
1227fn genCompoundAssign(c: *CodeGen, node: NodeIndex, tag: Ir.Inst.Tag) Error!Ir.Ref {
1228 const bin = c.node_data[@intFromEnum(node)].bin;
1229 const ty = c.node_ty[@intFromEnum(node)];
1230 const rhs = try c.genExpr(bin.rhs);
1134fn genCompoundAssign(c: *CodeGen, bin: Node.Binary) Error!Ir.Ref {
12311135 const lhs = try c.genLval(bin.lhs);
1232 const res = try c.addBin(tag, lhs, rhs, ty);
1233 try c.builder.addStore(lhs, res);
1234 return res;
1136
1137 const old_dummy = c.compound_assign_dummy;
1138 defer c.compound_assign_dummy = old_dummy;
1139 c.compound_assign_dummy = lhs;
1140
1141 const rhs = try c.genExpr(bin.rhs);
1142 try c.builder.addStore(lhs, rhs);
1143 return rhs;
12351144}
12361145
1237fn genBinOp(c: *CodeGen, node: NodeIndex, tag: Ir.Inst.Tag) Error!Ir.Ref {
1238 const bin = c.node_data[@intFromEnum(node)].bin;
1239 const ty = c.node_ty[@intFromEnum(node)];
1146fn genBinOp(c: *CodeGen, bin: Node.Binary, tag: Ir.Inst.Tag) Error!Ir.Ref {
12401147 const lhs = try c.genExpr(bin.lhs);
12411148 const rhs = try c.genExpr(bin.rhs);
1242 return c.addBin(tag, lhs, rhs, ty);
1149 return c.addBin(tag, lhs, rhs, bin.qt);
12431150}
12441151
1245fn genComparison(c: *CodeGen, node: NodeIndex, tag: Ir.Inst.Tag) Error!Ir.Ref {
1246 const bin = c.node_data[@intFromEnum(node)].bin;
1152fn genComparison(c: *CodeGen, bin: Node.Binary, tag: Ir.Inst.Tag) Error!Ir.Ref {
12471153 const lhs = try c.genExpr(bin.lhs);
12481154 const rhs = try c.genExpr(bin.rhs);
12491155
12501156 return c.builder.addInst(tag, .{ .bin = .{ .lhs = lhs, .rhs = rhs } }, .i1);
12511157}
12521158
1253fn genPtrArithmetic(c: *CodeGen, ptr: Ir.Ref, offset: Ir.Ref, offset_ty: Type, ty: Type) Error!Ir.Ref {
1159fn genPtrArithmetic(c: *CodeGen, ptr: Ir.Ref, offset: Ir.Ref, offset_ty: QualType, qt: QualType) Error!Ir.Ref {
12541160 // TODO consider adding a getelemptr instruction
1255 const size = ty.elemType().sizeof(c.comp).?;
1161 const size = qt.childType(c.comp).sizeof(c.comp);
12561162 if (size == 1) {
1257 return c.builder.addInst(.add, .{ .bin = .{ .lhs = ptr, .rhs = offset } }, try c.genType(ty));
1163 return c.builder.addInst(.add, .{ .bin = .{ .lhs = ptr, .rhs = offset } }, try c.genType(qt));
12581164 }
12591165
12601166 const size_inst = try c.builder.addConstant((try Value.int(size, c.comp)).ref(), try c.genType(offset_ty));
......@@ -1262,21 +1168,19 @@ fn genPtrArithmetic(c: *CodeGen, ptr: Ir.Ref, offset: Ir.Ref, offset_ty: Type, t
12621168 return c.addBin(.add, ptr, offset_inst, offset_ty);
12631169}
12641170
1265fn genInitializer(c: *CodeGen, ptr: Ir.Ref, dest_ty: Type, initializer: NodeIndex) Error!void {
1266 std.debug.assert(initializer != .none);
1267 switch (c.node_tag[@intFromEnum(initializer)]) {
1268 .array_init_expr_two,
1171fn genInitializer(c: *CodeGen, ptr: Ir.Ref, dest_ty: QualType, initializer: Node.Index) Error!void {
1172 const node = initializer.get(c.tree);
1173 switch (node) {
12691174 .array_init_expr,
1270 .struct_init_expr_two,
12711175 .struct_init_expr,
12721176 .union_init_expr,
12731177 .array_filler_expr,
12741178 .default_init_expr,
1275 => return c.fail("TODO CodeGen.genInitializer {}\n", .{c.node_tag[@intFromEnum(initializer)]}),
1179 => return c.fail("TODO CodeGen.genInitializer {s}\n", .{@tagName(node)}),
12761180 .string_literal_expr => {
12771181 const val = c.tree.value_map.get(initializer).?;
12781182 const str_ptr = try c.builder.addConstant(val.ref(), .ptr);
1279 if (dest_ty.isArray()) {
1183 if (dest_ty.is(c.comp, .array)) {
12801184 return c.fail("TODO memcpy\n", .{});
12811185 } else {
12821186 try c.builder.addStore(ptr, str_ptr);
......@@ -1289,7 +1193,7 @@ fn genInitializer(c: *CodeGen, ptr: Ir.Ref, dest_ty: Type, initializer: NodeInde
12891193 }
12901194}
12911195
1292fn genVar(c: *CodeGen, decl: NodeIndex) Error!void {
1196fn genVar(c: *CodeGen, decl: Node.Variable) Error!void {
12931197 _ = decl;
12941198 return c.fail("TODO CodeGen.genVar\n", .{});
12951199}
lib/compiler/aro/aro/Compilation.zig+884-795
......@@ -1,27 +1,32 @@
11const std = @import("std");
2const Allocator = mem.Allocator;
32const assert = std.debug.assert;
43const EpochSeconds = std.time.epoch.EpochSeconds;
54const mem = std.mem;
5const Allocator = mem.Allocator;
6
67const Interner = @import("../backend.zig").Interner;
8const CodeGenOptions = @import("../backend.zig").CodeGenOptions;
9
710const Builtins = @import("Builtins.zig");
811const Builtin = Builtins.Builtin;
912const Diagnostics = @import("Diagnostics.zig");
1013const LangOpts = @import("LangOpts.zig");
11const Source = @import("Source.zig");
12const Tokenizer = @import("Tokenizer.zig");
13const Token = Tokenizer.Token;
14const Type = @import("Type.zig");
1514const Pragma = @import("Pragma.zig");
16const StrInt = @import("StringInterner.zig");
1715const record_layout = @import("record_layout.zig");
16const Source = @import("Source.zig");
17const StringInterner = @import("StringInterner.zig");
1818const target_util = @import("target.zig");
19const Writer = std.Io.Writer;
19const Tokenizer = @import("Tokenizer.zig");
20const Token = Tokenizer.Token;
21const TypeStore = @import("TypeStore.zig");
22const Type = TypeStore.Type;
23const QualType = TypeStore.QualType;
2024
2125pub const Error = error{
2226 /// A fatal error has ocurred and compilation has stopped.
2327 FatalError,
2428} || Allocator.Error;
29pub const AddSourceError = Error || error{FileTooBig};
2530
2631pub const bit_int_max_bits = std.math.maxInt(u16);
2732const path_buf_stack_limit = 1024;
......@@ -53,9 +58,20 @@ pub const Environment = struct {
5358 /// TODO: not implemented yet
5459 c_include_path: ?[]const u8 = null,
5560
56 /// UNIX timestamp to be used instead of the current date and time in the __DATE__ and __TIME__ macros
61 /// UNIX timestamp to be used instead of the current date and time in the __DATE__ and __TIME__ macros, and instead of the
62 /// file modification time in the __TIMESTAMP__ macro
5763 source_date_epoch: ?[]const u8 = null,
5864
65 pub const SourceEpoch = union(enum) {
66 /// Represents system time when aro is invoked; used for __DATE__ and __TIME__ macros
67 system: u64,
68 /// Represents a user-provided time (typically via the SOURCE_DATE_EPOCH environment variable)
69 /// used for __DATE__, __TIME__, and __TIMESTAMP__
70 provided: u64,
71
72 pub const default: @This() = .{ .provided = 0 };
73 };
74
5975 /// Load all of the environment variables using the std.process API. Do not use if using Aro as a shared library on Linux without libc
6076 /// See https://github.com/ziglang/zig/issues/4524
6177 pub fn loadAll(allocator: std.mem.Allocator) !Environment {
......@@ -86,68 +102,73 @@ pub const Environment = struct {
86102 }
87103 self.* = undefined;
88104 }
105
106 pub fn sourceEpoch(self: *const Environment) !SourceEpoch {
107 const max_timestamp = 253402300799; // Dec 31 9999 23:59:59
108
109 if (self.source_date_epoch) |epoch| {
110 const parsed = std.fmt.parseInt(u64, epoch, 10) catch return error.InvalidEpoch;
111 if (parsed > max_timestamp) return error.InvalidEpoch;
112 return .{ .provided = parsed };
113 } else {
114 const timestamp = std.math.cast(u64, std.time.timestamp()) orelse return error.InvalidEpoch;
115 return .{ .system = std.math.clamp(timestamp, 0, max_timestamp) };
116 }
117 }
89118};
90119
91120const Compilation = @This();
92121
93122gpa: Allocator,
94diagnostics: Diagnostics,
123/// Allocations in this arena live all the way until `Compilation.deinit`.
124arena: Allocator,
125diagnostics: *Diagnostics,
95126
127code_gen_options: CodeGenOptions = .default,
96128environment: Environment = .{},
97sources: std.StringArrayHashMapUnmanaged(Source) = .empty,
129sources: std.StringArrayHashMapUnmanaged(Source) = .{},
130/// Allocated into `gpa`, but keys are externally managed.
98131include_dirs: std.ArrayListUnmanaged([]const u8) = .empty,
132/// Allocated into `gpa`, but keys are externally managed.
99133system_include_dirs: std.ArrayListUnmanaged([]const u8) = .empty,
134/// Allocated into `gpa`, but keys are externally managed.
135after_include_dirs: std.ArrayListUnmanaged([]const u8) = .empty,
136/// Allocated into `gpa`, but keys are externally managed.
137framework_dirs: std.ArrayListUnmanaged([]const u8) = .empty,
138/// Allocated into `gpa`, but keys are externally managed.
139system_framework_dirs: std.ArrayListUnmanaged([]const u8) = .empty,
140/// Allocated into `gpa`, but keys are externally managed.
141embed_dirs: std.ArrayListUnmanaged([]const u8) = .empty,
100142target: std.Target = @import("builtin").target,
101pragma_handlers: std.StringArrayHashMapUnmanaged(*Pragma) = .empty,
143pragma_handlers: std.StringArrayHashMapUnmanaged(*Pragma) = .{},
102144langopts: LangOpts = .{},
103generated_buf: std.ArrayListUnmanaged(u8) = .empty,
145generated_buf: std.ArrayListUnmanaged(u8) = .{},
104146builtins: Builtins = .{},
105types: struct {
106 wchar: Type = undefined,
107 uint_least16_t: Type = undefined,
108 uint_least32_t: Type = undefined,
109 ptrdiff: Type = undefined,
110 size: Type = undefined,
111 va_list: Type = undefined,
112 pid_t: Type = undefined,
113 ns_constant_string: struct {
114 ty: Type = undefined,
115 record: Type.Record = undefined,
116 fields: [4]Type.Record.Field = undefined,
117 int_ty: Type = .{ .specifier = .int, .qual = .{ .@"const" = true } },
118 char_ty: Type = .{ .specifier = .char, .qual = .{ .@"const" = true } },
119 } = .{},
120 file: Type = .{ .specifier = .invalid },
121 jmp_buf: Type = .{ .specifier = .invalid },
122 sigjmp_buf: Type = .{ .specifier = .invalid },
123 ucontext_t: Type = .{ .specifier = .invalid },
124 intmax: Type = .{ .specifier = .invalid },
125 intptr: Type = .{ .specifier = .invalid },
126 int16: Type = .{ .specifier = .invalid },
127 int64: Type = .{ .specifier = .invalid },
128} = .{},
129string_interner: StrInt = .{},
147string_interner: StringInterner = .{},
130148interner: Interner = .{},
149type_store: TypeStore = .{},
131150/// If this is not null, the directory containing the specified Source will be searched for includes
132151/// Used by MS extensions which allow searching for includes relative to the directory of the main source file.
133152ms_cwd_source_id: ?Source.Id = null,
134153cwd: std.fs.Dir,
135154
136pub fn init(gpa: Allocator, cwd: std.fs.Dir) Compilation {
155pub fn init(gpa: Allocator, arena: Allocator, diagnostics: *Diagnostics, cwd: std.fs.Dir) Compilation {
137156 return .{
138157 .gpa = gpa,
139 .diagnostics = Diagnostics.init(gpa),
158 .arena = arena,
159 .diagnostics = diagnostics,
140160 .cwd = cwd,
141161 };
142162}
143163
144164/// Initialize Compilation with default environment,
145165/// pragma handlers and emulation mode set to target.
146pub fn initDefault(gpa: Allocator, cwd: std.fs.Dir) !Compilation {
166pub fn initDefault(gpa: Allocator, arena: Allocator, diagnostics: *Diagnostics, cwd: std.fs.Dir) !Compilation {
147167 var comp: Compilation = .{
148168 .gpa = gpa,
169 .arena = arena,
170 .diagnostics = diagnostics,
149171 .environment = try Environment.loadAll(gpa),
150 .diagnostics = Diagnostics.init(gpa),
151172 .cwd = cwd,
152173 };
153174 errdefer comp.deinit();
......@@ -157,82 +178,34 @@ pub fn initDefault(gpa: Allocator, cwd: std.fs.Dir) !Compilation {
157178}
158179
159180pub fn deinit(comp: *Compilation) void {
181 const gpa = comp.gpa;
160182 for (comp.pragma_handlers.values()) |pragma| {
161183 pragma.deinit(pragma, comp);
162184 }
163185 for (comp.sources.values()) |source| {
164 comp.gpa.free(source.path);
165 comp.gpa.free(source.buf);
166 comp.gpa.free(source.splice_locs);
186 gpa.free(source.path);
187 gpa.free(source.buf);
188 gpa.free(source.splice_locs);
167189 }
168 comp.sources.deinit(comp.gpa);
169 comp.diagnostics.deinit();
170 comp.include_dirs.deinit(comp.gpa);
171 for (comp.system_include_dirs.items) |path| comp.gpa.free(path);
172 comp.system_include_dirs.deinit(comp.gpa);
173 comp.pragma_handlers.deinit(comp.gpa);
174 comp.generated_buf.deinit(comp.gpa);
175 comp.builtins.deinit(comp.gpa);
176 comp.string_interner.deinit(comp.gpa);
177 comp.interner.deinit(comp.gpa);
178 comp.environment.deinit(comp.gpa);
179}
180
181pub fn getSourceEpoch(self: *const Compilation, max: i64) !?i64 {
182 const provided = self.environment.source_date_epoch orelse return null;
183 const parsed = std.fmt.parseInt(i64, provided, 10) catch return error.InvalidEpoch;
184 if (parsed < 0 or parsed > max) return error.InvalidEpoch;
185 return parsed;
186}
187
188/// Dec 31 9999 23:59:59
189const max_timestamp = 253402300799;
190
191fn getTimestamp(comp: *Compilation) !u47 {
192 const provided: ?i64 = comp.getSourceEpoch(max_timestamp) catch blk: {
193 try comp.addDiagnostic(.{
194 .tag = .invalid_source_epoch,
195 .loc = .{ .id = .unused, .byte_offset = 0, .line = 0 },
196 }, &.{});
197 break :blk null;
198 };
199 const timestamp = provided orelse std.time.timestamp();
200 return @intCast(std.math.clamp(timestamp, 0, max_timestamp));
190 comp.sources.deinit(gpa);
191 comp.include_dirs.deinit(gpa);
192 comp.system_include_dirs.deinit(gpa);
193 comp.after_include_dirs.deinit(gpa);
194 comp.framework_dirs.deinit(gpa);
195 comp.system_framework_dirs.deinit(gpa);
196 comp.embed_dirs.deinit(gpa);
197 comp.pragma_handlers.deinit(gpa);
198 comp.generated_buf.deinit(gpa);
199 comp.builtins.deinit(gpa);
200 comp.string_interner.deinit(gpa);
201 comp.interner.deinit(gpa);
202 comp.environment.deinit(gpa);
203 comp.type_store.deinit(gpa);
204 comp.* = undefined;
201205}
202206
203fn generateDateAndTime(w: *Writer, timestamp: u47) !void {
204 const epoch_seconds = EpochSeconds{ .secs = timestamp };
205 const epoch_day = epoch_seconds.getEpochDay();
206 const day_seconds = epoch_seconds.getDaySeconds();
207 const year_day = epoch_day.calculateYearDay();
208 const month_day = year_day.calculateMonthDay();
209
210 const month_names = [_][]const u8{ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
211 std.debug.assert(std.time.epoch.Month.jan.numeric() == 1);
212
213 const month_name = month_names[month_day.month.numeric() - 1];
214 try w.print("#define __DATE__ \"{s} {d: >2} {d}\"\n", .{
215 month_name,
216 month_day.day_index + 1,
217 year_day.year,
218 });
219 try w.print("#define __TIME__ \"{d:0>2}:{d:0>2}:{d:0>2}\"\n", .{
220 day_seconds.getHoursIntoDay(),
221 day_seconds.getMinutesIntoHour(),
222 day_seconds.getSecondsIntoMinute(),
223 });
224
225 const day_names = [_][]const u8{ "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun" };
226 const day_name = day_names[@intCast((epoch_day.day + 3) % 7)];
227 try w.print("#define __TIMESTAMP__ \"{s} {s} {d: >2} {d:0>2}:{d:0>2}:{d:0>2} {d}\"\n", .{
228 day_name,
229 month_name,
230 month_day.day_index + 1,
231 day_seconds.getHoursIntoDay(),
232 day_seconds.getMinutesIntoHour(),
233 day_seconds.getSecondsIntoMinute(),
234 year_day.year,
235 });
207pub fn internString(comp: *Compilation, str: []const u8) !StringInterner.StringId {
208 return comp.string_interner.intern(comp.gpa, str);
236209}
237210
238211/// Which set of system defines to generate via generateBuiltinMacros
......@@ -243,8 +216,26 @@ pub const SystemDefinesMode = enum {
243216 include_system_defines,
244217};
245218
246fn generateSystemDefines(comp: *Compilation, w: *Writer) !void {
219fn generateSystemDefines(comp: *Compilation, w: *std.Io.Writer) !void {
220 const define = struct {
221 fn define(_w: *std.Io.Writer, name: []const u8) !void {
222 try _w.print("#define {s} 1\n", .{name});
223 }
224 }.define;
225 const defineStd = struct {
226 fn defineStd(_w: *std.Io.Writer, name: []const u8, is_gnu: bool) !void {
227 if (is_gnu) {
228 try _w.print("#define {s} 1\n", .{name});
229 }
230 try _w.print(
231 \\#define __{s} 1
232 \\#define __{s}__ 1
233 \\
234 , .{ name, name });
235 }
236 }.defineStd;
247237 const ptr_width = comp.target.ptrBitWidth();
238 const is_gnu = comp.langopts.standard.isGNU();
248239
249240 if (comp.langopts.gnuc_version > 0) {
250241 try w.print("#define __GNUC__ {d}\n", .{comp.langopts.gnuc_version / 10_000});
......@@ -254,43 +245,81 @@ fn generateSystemDefines(comp: *Compilation, w: *Writer) !void {
254245
255246 // os macros
256247 switch (comp.target.os.tag) {
257 .linux => try w.writeAll(
258 \\#define linux 1
259 \\#define __linux 1
260 \\#define __linux__ 1
261 \\
262 ),
263 .windows => if (ptr_width == 32) try w.writeAll(
264 \\#define WIN32 1
265 \\#define _WIN32 1
266 \\#define __WIN32 1
267 \\#define __WIN32__ 1
268 \\
269 ) else try w.writeAll(
270 \\#define WIN32 1
271 \\#define WIN64 1
272 \\#define _WIN32 1
273 \\#define _WIN64 1
274 \\#define __WIN32 1
275 \\#define __WIN64 1
276 \\#define __WIN32__ 1
277 \\#define __WIN64__ 1
278 \\
279 ),
280 .freebsd => try w.print("#define __FreeBSD__ {d}\n", .{comp.target.os.version_range.semver.min.major}),
281 .netbsd => try w.writeAll("#define __NetBSD__ 1\n"),
282 .openbsd => try w.writeAll("#define __OpenBSD__ 1\n"),
283 .dragonfly => try w.writeAll("#define __DragonFly__ 1\n"),
284 .solaris => try w.writeAll(
285 \\#define sun 1
286 \\#define __sun 1
287 \\
288 ),
289 .macos => try w.writeAll(
290 \\#define __APPLE__ 1
291 \\#define __MACH__ 1
292 \\
293 ),
248 .linux => try defineStd(w, "linux", is_gnu),
249 .windows => {
250 try define(w, "_WIN32");
251 if (ptr_width == 64) {
252 try define(w, "_WIN64");
253 }
254
255 if (comp.target.abi.isGnu()) {
256 try defineStd(w, "WIN32", is_gnu);
257 try defineStd(w, "WINNT", is_gnu);
258 if (ptr_width == 64) {
259 try defineStd(w, "WIN64", is_gnu);
260 try define(w, "__MINGW64__");
261 }
262 try define(w, "__MSVCRT__");
263 try define(w, "__MINGW32__");
264 } else if (comp.target.abi == .cygnus) {
265 try define(w, "__CYGWIN__");
266 if (ptr_width == 64) {
267 try define(w, "__CYGWIN64__");
268 } else {
269 try define(w, "__CYGWIN32__");
270 }
271 }
272
273 if (comp.target.abi.isGnu() or comp.target.abi == .cygnus) {
274 // MinGW and Cygwin define __declspec(a) to __attribute((a)).
275 // Like Clang we make the define no op if -fdeclspec is enabled.
276 if (comp.langopts.declspec_attrs) {
277 try w.writeAll("#define __declspec __declspec\n");
278 } else {
279 try w.writeAll("#define __declspec(a) __attribute__((a))\n");
280 }
281 if (!comp.langopts.ms_extensions) {
282 // Provide aliases for the calling convention keywords.
283 for ([_][]const u8{ "cdecl", "stdcall", "fastcall", "thiscall" }) |keyword| {
284 try w.print(
285 \\#define _{[0]s} __attribute__((__{[0]s}__))
286 \\#define __{[0]s} __attribute__((__{[0]s}__))
287 \\
288 , .{keyword});
289 }
290 }
291 }
292 },
293 .uefi => try define(w, "__UEFI__"),
294 .freebsd => {
295 const release = comp.target.os.version_range.semver.min.major;
296 const cc_version = release * 10_000 + 1;
297 try w.print(
298 \\#define __FreeBSD__ {d}
299 \\#define __FreeBSD_cc_version {d}
300 \\
301 , .{ release, cc_version });
302 },
303 .ps4, .ps5 => {
304 try w.writeAll(
305 \\#define __FreeBSD__ 9
306 \\#define __FreeBSD_cc_version 900001
307 \\
308 );
309 },
310 .netbsd => try define(w, "__NetBSD__"),
311 .openbsd => try define(w, "__OpenBSD__"),
312 .dragonfly => try define(w, "__DragonFly__"),
313 .solaris => try defineStd(w, "sun", is_gnu),
314 .macos,
315 .tvos,
316 .ios,
317 .driverkit,
318 .visionos,
319 .watchos,
320 => try define(w, "__APPLE__"),
321 .wasi => try define(w, "__wasi__"),
322 .emscripten => try define(w, "__EMSCRIPTEN__"),
294323 else => {},
295324 }
296325
......@@ -301,107 +330,142 @@ fn generateSystemDefines(comp: *Compilation, w: *Writer) !void {
301330 .openbsd,
302331 .dragonfly,
303332 .linux,
304 => try w.writeAll(
305 \\#define unix 1
306 \\#define __unix 1
307 \\#define __unix__ 1
308 \\
309 ),
333 .haiku,
334 .hurd,
335 .solaris,
336 .aix,
337 .emscripten,
338 .ps4,
339 .ps5,
340 => try defineStd(w, "unix", is_gnu),
341 .windows => if (comp.target.abi.isGnu() or comp.target.abi == .cygnus) {
342 try defineStd(w, "unix", is_gnu);
343 },
310344 else => {},
311345 }
312346 if (comp.target.abi.isAndroid()) {
313 try w.writeAll("#define __ANDROID__ 1\n");
347 try define(w, "__ANDROID__");
314348 }
315349
316350 // architecture macros
317351 switch (comp.target.cpu.arch) {
318 .x86_64 => try w.writeAll(
319 \\#define __amd64__ 1
320 \\#define __amd64 1
321 \\#define __x86_64 1
322 \\#define __x86_64__ 1
323 \\
324 ),
325 .x86 => try w.writeAll(
326 \\#define i386 1
327 \\#define __i386 1
328 \\#define __i386__ 1
329 \\
330 ),
352 .x86_64 => {
353 try define(w, "__amd64__");
354 try define(w, "__amd64");
355 try define(w, "__x86_64__");
356 try define(w, "__x86_64");
357
358 if (comp.target.os.tag == .windows and comp.target.abi == .msvc) {
359 try w.writeAll(
360 \\#define _M_X64 100
361 \\#define _M_AMD64 100
362 \\
363 );
364 }
365 },
366 .x86 => {
367 try defineStd(w, "i386", is_gnu);
368
369 if (comp.target.os.tag == .windows and comp.target.abi == .msvc) {
370 try w.print("#define _M_IX86 {d}\n", .{blk: {
371 if (comp.target.cpu.model == &std.Target.x86.cpu.i386) break :blk 300;
372 if (comp.target.cpu.model == &std.Target.x86.cpu.i486) break :blk 400;
373 if (comp.target.cpu.model == &std.Target.x86.cpu.i586) break :blk 500;
374 break :blk @as(u32, 600);
375 }});
376 }
377 },
331378 .mips,
332379 .mipsel,
333380 .mips64,
334381 .mips64el,
335 => try w.writeAll(
336 \\#define __mips__ 1
337 \\#define mips 1
338 \\
339 ),
382 => {
383 try define(w, "__mips__");
384 try define(w, "_mips");
385 },
340386 .powerpc,
341387 .powerpcle,
342 => try w.writeAll(
343 \\#define __powerpc__ 1
344 \\#define __POWERPC__ 1
345 \\#define __ppc__ 1
346 \\#define __PPC__ 1
347 \\#define _ARCH_PPC 1
348 \\
349 ),
388 => {
389 try define(w, "__powerpc__");
390 try define(w, "__POWERPC__");
391 try define(w, "__ppc__");
392 try define(w, "__PPC__");
393 try define(w, "_ARCH_PPC");
394 },
350395 .powerpc64,
351396 .powerpc64le,
352 => try w.writeAll(
353 \\#define __powerpc 1
354 \\#define __powerpc__ 1
355 \\#define __powerpc64__ 1
356 \\#define __POWERPC__ 1
357 \\#define __ppc__ 1
358 \\#define __ppc64__ 1
359 \\#define __PPC__ 1
360 \\#define __PPC64__ 1
361 \\#define _ARCH_PPC 1
362 \\#define _ARCH_PPC64 1
363 \\
364 ),
365 .sparc64 => try w.writeAll(
366 \\#define __sparc__ 1
367 \\#define __sparc 1
368 \\#define __sparc_v9__ 1
369 \\
370 ),
371 .sparc => try w.writeAll(
372 \\#define __sparc__ 1
373 \\#define __sparc 1
374 \\
375 ),
376 .arm, .armeb => try w.writeAll(
377 \\#define __arm__ 1
378 \\#define __arm 1
379 \\
380 ),
381 .thumb, .thumbeb => try w.writeAll(
382 \\#define __arm__ 1
383 \\#define __arm 1
384 \\#define __thumb__ 1
385 \\
386 ),
387 .aarch64, .aarch64_be => try w.writeAll("#define __aarch64__ 1\n"),
388 .msp430 => try w.writeAll(
389 \\#define MSP430 1
390 \\#define __MSP430__ 1
391 \\
392 ),
397 => {
398 try define(w, "__powerpc");
399 try define(w, "__powerpc__");
400 try define(w, "__powerpc64__");
401 try define(w, "__POWERPC__");
402 try define(w, "__ppc__");
403 try define(w, "__ppc64__");
404 try define(w, "__PPC__");
405 try define(w, "__PPC64__");
406 try define(w, "_ARCH_PPC");
407 try define(w, "_ARCH_PPC64");
408 },
409 .sparc64 => {
410 try defineStd(w, "sparc", is_gnu);
411 try define(w, "__sparc_v9__");
412 try define(w, "__arch64__");
413 if (comp.target.os.tag != .solaris) {
414 try define(w, "__sparc64__");
415 try define(w, "__sparc_v9__");
416 try define(w, "__sparcv9__");
417 }
418 },
419 .sparc => {
420 try defineStd(w, "sparc", is_gnu);
421 if (comp.target.os.tag == .solaris) {
422 try define(w, "__sparcv8");
423 }
424 },
425 .arm, .armeb, .thumb, .thumbeb => {
426 try define(w, "__arm__");
427 try define(w, "__arm");
428 if (comp.target.cpu.arch.isThumb()) {
429 try define(w, "__thumb__");
430 }
431 },
432 .aarch64, .aarch64_be => {
433 try define(w, "__aarch64__");
434 if (comp.target.os.tag == .macos) {
435 try define(w, "__AARCH64_SIMD__");
436 if (ptr_width == 32) {
437 try define(w, "__ARM64_ARCH_8_32__");
438 } else {
439 try define(w, "__ARM64_ARCH_8__");
440 }
441 try define(w, "__ARM_NEON__");
442 try define(w, "__arm64");
443 try define(w, "__arm64__");
444 }
445 if (comp.target.os.tag == .windows and comp.target.abi == .msvc) {
446 try w.writeAll("#define _M_ARM64 100\n");
447 }
448 },
449 .msp430 => {
450 try define(w, "MSP430");
451 try define(w, "__MSP430__");
452 },
393453 else => {},
394454 }
395455
396 if (comp.target.os.tag != .windows) switch (ptr_width) {
397 64 => try w.writeAll(
398 \\#define _LP64 1
399 \\#define __LP64__ 1
400 \\
401 ),
402 32 => try w.writeAll("#define _ILP32 1\n"),
403 else => {},
404 };
456 if (ptr_width == 64 and comp.target.cTypeBitSize(.long) == 32) {
457 try define(w, "_LP64");
458 try define(w, "__LP64__");
459 } else if (ptr_width == 32 and comp.target.cTypeBitSize(.long) == 32 and
460 comp.target.cTypeBitSize(.int) == 32)
461 {
462 try define(w, "_ILP32");
463 try define(w, "__ILP32__");
464 }
465
466 if (comp.hasFloat128()) {
467 try define(w, "__FLOAT128__");
468 }
405469
406470 try w.writeAll(
407471 \\#define __ORDER_LITTLE_ENDIAN__ 1234
......@@ -419,6 +483,21 @@ fn generateSystemDefines(comp: *Compilation, w: *Writer) !void {
419483 \\
420484 );
421485
486 switch (comp.target.ofmt) {
487 .elf => try define(w, "__ELF__"),
488 .macho => try define(w, "__MACH__"),
489 else => {},
490 }
491
492 if (comp.target.os.tag.isDarwin()) {
493 try w.writeAll(
494 \\#define __nonnull _Nonnull
495 \\#define __null_unspecified _Null_unspecified
496 \\#define __nullable _Nullable
497 \\
498 );
499 }
500
422501 // atomics
423502 try w.writeAll(
424503 \\#define __ATOMIC_RELAXED 0
......@@ -454,62 +533,61 @@ fn generateSystemDefines(comp: *Compilation, w: *Writer) !void {
454533 try w.writeAll("#define __CHAR_BIT__ 8\n");
455534
456535 // int maxs
457 try comp.generateIntWidth(w, "BOOL", .{ .specifier = .bool });
458 try comp.generateIntMaxAndWidth(w, "SCHAR", .{ .specifier = .schar });
459 try comp.generateIntMaxAndWidth(w, "SHRT", .{ .specifier = .short });
460 try comp.generateIntMaxAndWidth(w, "INT", .{ .specifier = .int });
461 try comp.generateIntMaxAndWidth(w, "LONG", .{ .specifier = .long });
462 try comp.generateIntMaxAndWidth(w, "LONG_LONG", .{ .specifier = .long_long });
463 try comp.generateIntMaxAndWidth(w, "WCHAR", comp.types.wchar);
464 // try comp.generateIntMax(w, "WINT", comp.types.wchar);
465 try comp.generateIntMaxAndWidth(w, "INTMAX", comp.types.intmax);
466 try comp.generateIntMaxAndWidth(w, "SIZE", comp.types.size);
467 try comp.generateIntMaxAndWidth(w, "UINTMAX", comp.types.intmax.makeIntegerUnsigned());
468 try comp.generateIntMaxAndWidth(w, "PTRDIFF", comp.types.ptrdiff);
469 try comp.generateIntMaxAndWidth(w, "INTPTR", comp.types.intptr);
470 try comp.generateIntMaxAndWidth(w, "UINTPTR", comp.types.intptr.makeIntegerUnsigned());
536 try comp.generateIntWidth(w, "BOOL", .bool);
537 try comp.generateIntMaxAndWidth(w, "SCHAR", .schar);
538 try comp.generateIntMaxAndWidth(w, "SHRT", .short);
539 try comp.generateIntMaxAndWidth(w, "INT", .int);
540 try comp.generateIntMaxAndWidth(w, "LONG", .long);
541 try comp.generateIntMaxAndWidth(w, "LONG_LONG", .long_long);
542 try comp.generateIntMaxAndWidth(w, "WCHAR", comp.type_store.wchar);
543 // try comp.generateIntMax(w, "WINT", comp.type_store.wchar);
544 try comp.generateIntMaxAndWidth(w, "INTMAX", comp.type_store.intmax);
545 try comp.generateIntMaxAndWidth(w, "SIZE", comp.type_store.size);
546 try comp.generateIntMaxAndWidth(w, "UINTMAX", try comp.type_store.intmax.makeIntUnsigned(comp));
547 try comp.generateIntMaxAndWidth(w, "PTRDIFF", comp.type_store.ptrdiff);
548 try comp.generateIntMaxAndWidth(w, "INTPTR", comp.type_store.intptr);
549 try comp.generateIntMaxAndWidth(w, "UINTPTR", try comp.type_store.intptr.makeIntUnsigned(comp));
471550 try comp.generateIntMaxAndWidth(w, "SIG_ATOMIC", target_util.sigAtomicType(comp.target));
472551
473552 // int widths
474553 try w.print("#define __BITINT_MAXWIDTH__ {d}\n", .{bit_int_max_bits});
475554
476555 // sizeof types
477 try comp.generateSizeofType(w, "__SIZEOF_FLOAT__", .{ .specifier = .float });
478 try comp.generateSizeofType(w, "__SIZEOF_DOUBLE__", .{ .specifier = .double });
479 try comp.generateSizeofType(w, "__SIZEOF_LONG_DOUBLE__", .{ .specifier = .long_double });
480 try comp.generateSizeofType(w, "__SIZEOF_SHORT__", .{ .specifier = .short });
481 try comp.generateSizeofType(w, "__SIZEOF_INT__", .{ .specifier = .int });
482 try comp.generateSizeofType(w, "__SIZEOF_LONG__", .{ .specifier = .long });
483 try comp.generateSizeofType(w, "__SIZEOF_LONG_LONG__", .{ .specifier = .long_long });
484 try comp.generateSizeofType(w, "__SIZEOF_POINTER__", .{ .specifier = .pointer });
485 try comp.generateSizeofType(w, "__SIZEOF_PTRDIFF_T__", comp.types.ptrdiff);
486 try comp.generateSizeofType(w, "__SIZEOF_SIZE_T__", comp.types.size);
487 try comp.generateSizeofType(w, "__SIZEOF_WCHAR_T__", comp.types.wchar);
488 // try comp.generateSizeofType(w, "__SIZEOF_WINT_T__", .{ .specifier = .pointer });
556 try comp.generateSizeofType(w, "__SIZEOF_FLOAT__", .float);
557 try comp.generateSizeofType(w, "__SIZEOF_DOUBLE__", .double);
558 try comp.generateSizeofType(w, "__SIZEOF_LONG_DOUBLE__", .long_double);
559 try comp.generateSizeofType(w, "__SIZEOF_SHORT__", .short);
560 try comp.generateSizeofType(w, "__SIZEOF_INT__", .int);
561 try comp.generateSizeofType(w, "__SIZEOF_LONG__", .long);
562 try comp.generateSizeofType(w, "__SIZEOF_LONG_LONG__", .long_long);
563 try comp.generateSizeofType(w, "__SIZEOF_POINTER__", .void_pointer);
564 try comp.generateSizeofType(w, "__SIZEOF_PTRDIFF_T__", comp.type_store.ptrdiff);
565 try comp.generateSizeofType(w, "__SIZEOF_SIZE_T__", comp.type_store.size);
566 try comp.generateSizeofType(w, "__SIZEOF_WCHAR_T__", comp.type_store.wchar);
567 // try comp.generateSizeofType(w, "__SIZEOF_WINT_T__", .void_pointer);
489568
490569 if (target_util.hasInt128(comp.target)) {
491 try comp.generateSizeofType(w, "__SIZEOF_INT128__", .{ .specifier = .int128 });
570 try comp.generateSizeofType(w, "__SIZEOF_INT128__", .int128);
492571 }
493572
494573 // various int types
495 const mapper = comp.string_interner.getSlowTypeMapper();
496 try generateTypeMacro(w, mapper, "__INTPTR_TYPE__", comp.types.intptr, comp.langopts);
497 try generateTypeMacro(w, mapper, "__UINTPTR_TYPE__", comp.types.intptr.makeIntegerUnsigned(), comp.langopts);
574 try comp.generateTypeMacro(w, "__INTPTR_TYPE__", comp.type_store.intptr);
575 try comp.generateTypeMacro(w, "__UINTPTR_TYPE__", try comp.type_store.intptr.makeIntUnsigned(comp));
498576
499 try generateTypeMacro(w, mapper, "__INTMAX_TYPE__", comp.types.intmax, comp.langopts);
500 try comp.generateSuffixMacro("__INTMAX", w, comp.types.intptr);
577 try comp.generateTypeMacro(w, "__INTMAX_TYPE__", comp.type_store.intmax);
578 try comp.generateSuffixMacro("__INTMAX", w, comp.type_store.intptr);
501579
502 try generateTypeMacro(w, mapper, "__UINTMAX_TYPE__", comp.types.intmax.makeIntegerUnsigned(), comp.langopts);
503 try comp.generateSuffixMacro("__UINTMAX", w, comp.types.intptr.makeIntegerUnsigned());
580 try comp.generateTypeMacro(w, "__UINTMAX_TYPE__", try comp.type_store.intmax.makeIntUnsigned(comp));
581 try comp.generateSuffixMacro("__UINTMAX", w, try comp.type_store.intptr.makeIntUnsigned(comp));
504582
505 try generateTypeMacro(w, mapper, "__PTRDIFF_TYPE__", comp.types.ptrdiff, comp.langopts);
506 try generateTypeMacro(w, mapper, "__SIZE_TYPE__", comp.types.size, comp.langopts);
507 try generateTypeMacro(w, mapper, "__WCHAR_TYPE__", comp.types.wchar, comp.langopts);
508 try generateTypeMacro(w, mapper, "__CHAR16_TYPE__", comp.types.uint_least16_t, comp.langopts);
509 try generateTypeMacro(w, mapper, "__CHAR32_TYPE__", comp.types.uint_least32_t, comp.langopts);
583 try comp.generateTypeMacro(w, "__PTRDIFF_TYPE__", comp.type_store.ptrdiff);
584 try comp.generateTypeMacro(w, "__SIZE_TYPE__", comp.type_store.size);
585 try comp.generateTypeMacro(w, "__WCHAR_TYPE__", comp.type_store.wchar);
586 try comp.generateTypeMacro(w, "__CHAR16_TYPE__", comp.type_store.uint_least16_t);
587 try comp.generateTypeMacro(w, "__CHAR32_TYPE__", comp.type_store.uint_least32_t);
510588
511 try comp.generateExactWidthTypes(w, mapper);
512 try comp.generateFastAndLeastWidthTypes(w, mapper);
589 try comp.generateExactWidthTypes(w);
590 try comp.generateFastAndLeastWidthTypes(w);
513591
514592 if (target_util.FPSemantics.halfPrecisionType(comp.target)) |half| {
515593 try generateFloatMacros(w, "FLT16", half, "F16");
......@@ -528,26 +606,47 @@ fn generateSystemDefines(comp: *Compilation, w: *Writer) !void {
528606 \\#define __DECIMAL_DIG__ __LDBL_DECIMAL_DIG__
529607 \\
530608 );
609
610 switch (comp.code_gen_options.pic_level) {
611 .none => {},
612 .one, .two => {
613 try w.print(
614 \\#define __pic__ {0d}
615 \\#define __PIC__ {0d}
616 \\
617 , .{@intFromEnum(comp.code_gen_options.pic_level)});
618 if (comp.code_gen_options.is_pie) {
619 try w.print(
620 \\#define __pie__ {0d}
621 \\#define __PIE__ {0d}
622 \\
623 , .{@intFromEnum(comp.code_gen_options.pic_level)});
624 }
625 },
626 }
531627}
532628
533629/// Generate builtin macros that will be available to each source file.
534pub fn generateBuiltinMacros(comp: *Compilation, system_defines_mode: SystemDefinesMode) !Source {
535 try comp.generateBuiltinTypes();
630pub fn generateBuiltinMacros(comp: *Compilation, system_defines_mode: SystemDefinesMode) AddSourceError!Source {
631 try comp.type_store.initNamedTypes(comp);
536632
537 var allocating: std.Io.Writer.Allocating = .init(comp.gpa);
633 var allocating: std.io.Writer.Allocating = try .initCapacity(comp.gpa, 2 << 13);
538634 defer allocating.deinit();
539635
540 generateBuiltinMacrosWriter(comp, system_defines_mode, &allocating.writer) catch |err| switch (err) {
541 error.WriteFailed => return error.OutOfMemory,
542 else => |e| return e,
636 comp.writeBuiltinMacros(system_defines_mode, &allocating.writer) catch |err| switch (err) {
637 error.WriteFailed, error.OutOfMemory => return error.OutOfMemory,
543638 };
544639
545 return comp.addSourceFromBuffer("<builtin>", allocating.written());
640 if (allocating.getWritten().len > std.math.maxInt(u32)) return error.FileTooBig;
641
642 const contents = try allocating.toOwnedSlice();
643 errdefer comp.gpa.free(contents);
644 return comp.addSourceFromOwnedBuffer("<builtin>", contents, .user);
546645}
547646
548pub fn generateBuiltinMacrosWriter(comp: *Compilation, system_defines_mode: SystemDefinesMode, buf: *Writer) !void {
647fn writeBuiltinMacros(comp: *Compilation, system_defines_mode: SystemDefinesMode, w: *std.Io.Writer) !void {
549648 if (system_defines_mode == .include_system_defines) {
550 try buf.writeAll(
649 try w.writeAll(
551650 \\#define __VERSION__ "Aro
552651 ++ " " ++ @import("../backend.zig").version_str ++ "\"\n" ++
553652 \\#define __Aro__
......@@ -555,14 +654,13 @@ pub fn generateBuiltinMacrosWriter(comp: *Compilation, system_defines_mode: Syst
555654 );
556655 }
557656
558 try buf.writeAll("#define __STDC__ 1\n");
559 try buf.print("#define __STDC_HOSTED__ {d}\n", .{@intFromBool(comp.target.os.tag != .freestanding)});
657 if (comp.langopts.emulate != .msvc) {
658 try w.writeAll("#define __STDC__ 1\n");
659 }
660 try w.print("#define __STDC_HOSTED__ {d}\n", .{@intFromBool(comp.target.os.tag != .freestanding)});
560661
561662 // standard macros
562 try buf.writeAll(
563 \\#define __STDC_NO_COMPLEX__ 1
564 \\#define __STDC_NO_THREADS__ 1
565 \\#define __STDC_NO_VLA__ 1
663 try w.writeAll(
566664 \\#define __STDC_UTF_16__ 1
567665 \\#define __STDC_UTF_32__ 1
568666 \\#define __STDC_EMBED_NOT_FOUND__ 0
......@@ -570,22 +668,38 @@ pub fn generateBuiltinMacrosWriter(comp: *Compilation, system_defines_mode: Syst
570668 \\#define __STDC_EMBED_EMPTY__ 2
571669 \\
572670 );
671 if (comp.langopts.standard.atLeast(.c11)) switch (comp.target.os.tag) {
672 .openbsd, .driverkit, .ios, .macos, .tvos, .visionos, .watchos => {
673 try w.writeAll("#define __STDC_NO_THREADS__ 1\n");
674 },
675 .ps4, .ps5 => {
676 try w.writeAll(
677 \\#define __STDC_NO_THREADS__ 1
678 \\#define __STDC_NO_COMPLEX__ 1
679 \\
680 );
681 },
682 .aix => {
683 try w.writeAll(
684 \\#define __STDC_NO_THREADS__ 1
685 \\#define __STDC_NO_ATOMICS__ 1
686 \\
687 );
688 },
689 else => {},
690 };
573691 if (comp.langopts.standard.StdCVersionMacro()) |stdc_version| {
574 try buf.writeAll("#define __STDC_VERSION__ ");
575 try buf.writeAll(stdc_version);
576 try buf.writeByte('\n');
692 try w.writeAll("#define __STDC_VERSION__ ");
693 try w.writeAll(stdc_version);
694 try w.writeByte('\n');
577695 }
578696
579 // timestamps
580 const timestamp = try comp.getTimestamp();
581 try generateDateAndTime(buf, timestamp);
582
583697 if (system_defines_mode == .include_system_defines) {
584 try comp.generateSystemDefines(buf);
698 try comp.generateSystemDefines(w);
585699 }
586700}
587701
588fn generateFloatMacros(w: *Writer, prefix: []const u8, semantics: target_util.FPSemantics, ext: []const u8) !void {
702fn generateFloatMacros(w: *std.Io.Writer, prefix: []const u8, semantics: target_util.FPSemantics, ext: []const u8) !void {
589703 const denormMin = semantics.chooseValue(
590704 []const u8,
591705 .{
......@@ -641,137 +755,61 @@ fn generateFloatMacros(w: *Writer, prefix: []const u8, semantics: target_util.FP
641755 },
642756 );
643757
644 var def_prefix_buf: [32]u8 = undefined;
645 const prefix_slice = std.fmt.bufPrint(&def_prefix_buf, "__{s}_", .{prefix}) catch
646 return error.OutOfMemory;
758 try w.print("#define __{s}_DENORM_MIN__ {s}{s}\n", .{ prefix, denormMin, ext });
759 try w.print("#define __{s}_HAS_DENORM__\n", .{prefix});
760 try w.print("#define __{s}_DIG__ {d}\n", .{ prefix, digits });
761 try w.print("#define __{s}_DECIMAL_DIG__ {d}\n", .{ prefix, decimalDigits });
647762
648 try w.print("#define {s}DENORM_MIN__ {s}{s}\n", .{ prefix_slice, denormMin, ext });
649 try w.print("#define {s}HAS_DENORM__\n", .{prefix_slice});
650 try w.print("#define {s}DIG__ {d}\n", .{ prefix_slice, digits });
651 try w.print("#define {s}DECIMAL_DIG__ {d}\n", .{ prefix_slice, decimalDigits });
763 try w.print("#define __{s}_EPSILON__ {s}{s}\n", .{ prefix, epsilon, ext });
764 try w.print("#define __{s}_HAS_INFINITY__\n", .{prefix});
765 try w.print("#define __{s}_HAS_QUIET_NAN__\n", .{prefix});
766 try w.print("#define __{s}_MANT_DIG__ {d}\n", .{ prefix, mantissaDigits });
652767
653 try w.print("#define {s}EPSILON__ {s}{s}\n", .{ prefix_slice, epsilon, ext });
654 try w.print("#define {s}HAS_INFINITY__\n", .{prefix_slice});
655 try w.print("#define {s}HAS_QUIET_NAN__\n", .{prefix_slice});
656 try w.print("#define {s}MANT_DIG__ {d}\n", .{ prefix_slice, mantissaDigits });
768 try w.print("#define __{s}_MAX_10_EXP__ {d}\n", .{ prefix, max10Exp });
769 try w.print("#define __{s}_MAX_EXP__ {d}\n", .{ prefix, maxExp });
770 try w.print("#define __{s}_MAX__ {s}{s}\n", .{ prefix, max, ext });
657771
658 try w.print("#define {s}MAX_10_EXP__ {d}\n", .{ prefix_slice, max10Exp });
659 try w.print("#define {s}MAX_EXP__ {d}\n", .{ prefix_slice, maxExp });
660 try w.print("#define {s}MAX__ {s}{s}\n", .{ prefix_slice, max, ext });
661
662 try w.print("#define {s}MIN_10_EXP__ ({d})\n", .{ prefix_slice, min10Exp });
663 try w.print("#define {s}MIN_EXP__ ({d})\n", .{ prefix_slice, minExp });
664 try w.print("#define {s}MIN__ {s}{s}\n", .{ prefix_slice, min, ext });
772 try w.print("#define __{s}_MIN_10_EXP__ ({d})\n", .{ prefix, min10Exp });
773 try w.print("#define __{s}_MIN_EXP__ ({d})\n", .{ prefix, minExp });
774 try w.print("#define __{s}_MIN__ {s}{s}\n", .{ prefix, min, ext });
665775}
666776
667fn generateTypeMacro(w: *Writer, mapper: StrInt.TypeMapper, name: []const u8, ty: Type, langopts: LangOpts) !void {
777fn generateTypeMacro(comp: *const Compilation, w: *std.Io.Writer, name: []const u8, qt: QualType) !void {
668778 try w.print("#define {s} ", .{name});
669 try ty.print(mapper, langopts, w);
779 try qt.print(comp, w);
670780 try w.writeByte('\n');
671781}
672782
673fn generateBuiltinTypes(comp: *Compilation) !void {
674 const os = comp.target.os.tag;
675 const wchar: Type = switch (comp.target.cpu.arch) {
676 .xcore => .{ .specifier = .uchar },
677 .ve, .msp430 => .{ .specifier = .uint },
678 .arm, .armeb, .thumb, .thumbeb => .{
679 .specifier = if (os != .windows and os != .netbsd and os != .openbsd) .uint else .int,
680 },
681 .aarch64, .aarch64_be => .{
682 .specifier = if (!os.isDarwin() and os != .netbsd) .uint else .int,
683 },
684 .x86_64, .x86 => .{ .specifier = if (os == .windows) .ushort else .int },
685 else => .{ .specifier = .int },
686 };
687
688 const ptr_width = comp.target.ptrBitWidth();
689 const ptrdiff = if (os == .windows and ptr_width == 64)
690 Type{ .specifier = .long_long }
691 else switch (ptr_width) {
692 16 => Type{ .specifier = .int },
693 32 => Type{ .specifier = .int },
694 64 => Type{ .specifier = .long },
695 else => unreachable,
696 };
697
698 const size = if (os == .windows and ptr_width == 64)
699 Type{ .specifier = .ulong_long }
700 else switch (ptr_width) {
701 16 => Type{ .specifier = .uint },
702 32 => Type{ .specifier = .uint },
703 64 => Type{ .specifier = .ulong },
704 else => unreachable,
705 };
706
707 const va_list = try comp.generateVaListType();
708
709 const pid_t: Type = switch (os) {
710 .haiku => .{ .specifier = .long },
711 // Todo: pid_t is required to "a signed integer type"; are there any systems
712 // on which it is `short int`?
713 else => .{ .specifier = .int },
714 };
715
716 const intmax = target_util.intMaxType(comp.target);
717 const intptr = target_util.intPtrType(comp.target);
718 const int16 = target_util.int16Type(comp.target);
719 const int64 = target_util.int64Type(comp.target);
720
721 comp.types = .{
722 .wchar = wchar,
723 .ptrdiff = ptrdiff,
724 .size = size,
725 .va_list = va_list,
726 .pid_t = pid_t,
727 .intmax = intmax,
728 .intptr = intptr,
729 .int16 = int16,
730 .int64 = int64,
731 .uint_least16_t = comp.intLeastN(16, .unsigned),
732 .uint_least32_t = comp.intLeastN(32, .unsigned),
733 };
734
735 try comp.generateNsConstantStringType();
736}
737
738pub fn float80Type(comp: *const Compilation) ?Type {
783pub fn float80Type(comp: *const Compilation) ?QualType {
739784 if (comp.langopts.emulate != .gcc) return null;
740785 return target_util.float80Type(comp.target);
741786}
742787
743788/// Smallest integer type with at least N bits
744pub fn intLeastN(comp: *const Compilation, bits: usize, signedness: std.builtin.Signedness) Type {
789pub fn intLeastN(comp: *const Compilation, bits: usize, signedness: std.builtin.Signedness) QualType {
745790 if (bits == 64 and (comp.target.os.tag.isDarwin() or comp.target.cpu.arch.isWasm())) {
746791 // WebAssembly and Darwin use `long long` for `int_least64_t` and `int_fast64_t`.
747 return .{ .specifier = if (signedness == .signed) .long_long else .ulong_long };
792 return if (signedness == .signed) .long_long else .ulong_long;
748793 }
749794 if (bits == 16 and comp.target.cpu.arch == .avr) {
750795 // AVR uses int for int_least16_t and int_fast16_t.
751 return .{ .specifier = if (signedness == .signed) .int else .uint };
796 return if (signedness == .signed) .int else .uint;
752797 }
753 const candidates = switch (signedness) {
754 .signed => &[_]Type.Specifier{ .schar, .short, .int, .long, .long_long },
755 .unsigned => &[_]Type.Specifier{ .uchar, .ushort, .uint, .ulong, .ulong_long },
798 const candidates: [5]QualType = switch (signedness) {
799 .signed => .{ .schar, .short, .int, .long, .long_long },
800 .unsigned => .{ .uchar, .ushort, .uint, .ulong, .ulong_long },
756801 };
757 for (candidates) |specifier| {
758 const ty: Type = .{ .specifier = specifier };
759 if (ty.sizeof(comp).? * 8 >= bits) return ty;
802 for (candidates) |qt| {
803 if (qt.bitSizeof(comp) >= bits) return qt;
760804 } else unreachable;
761805}
762806
763fn intSize(comp: *const Compilation, specifier: Type.Specifier) u64 {
764 const ty = Type{ .specifier = specifier };
765 return ty.sizeof(comp).?;
766}
767
768807fn generateFastOrLeastType(
769808 comp: *Compilation,
770809 bits: usize,
771810 kind: enum { least, fast },
772811 signedness: std.builtin.Signedness,
773 w: *Writer,
774 mapper: StrInt.TypeMapper,
812 w: *std.Io.Writer,
775813) !void {
776814 const ty = comp.intLeastN(bits, signedness); // defining the fast types as the least types is permitted
777815
......@@ -788,9 +826,9 @@ fn generateFastOrLeastType(
788826
789827 const full = std.fmt.bufPrint(&buf, "{s}{s}{d}{s}", .{
790828 base_name, kind_str, bits, suffix,
791 }) catch return error.OutOfMemory;
829 }) catch unreachable;
792830
793 try generateTypeMacro(w, mapper, full, ty, comp.langopts);
831 try comp.generateTypeMacro(w, full, ty);
794832
795833 const prefix = full[2 .. full.len - suffix.len]; // remove "__" and "_TYPE__"
796834
......@@ -801,104 +839,104 @@ fn generateFastOrLeastType(
801839 try comp.generateFmt(prefix, w, ty);
802840}
803841
804fn generateFastAndLeastWidthTypes(comp: *Compilation, w: *Writer, mapper: StrInt.TypeMapper) !void {
842fn generateFastAndLeastWidthTypes(comp: *Compilation, w: *std.Io.Writer) !void {
805843 const sizes = [_]usize{ 8, 16, 32, 64 };
806844 for (sizes) |size| {
807 try comp.generateFastOrLeastType(size, .least, .signed, w, mapper);
808 try comp.generateFastOrLeastType(size, .least, .unsigned, w, mapper);
809 try comp.generateFastOrLeastType(size, .fast, .signed, w, mapper);
810 try comp.generateFastOrLeastType(size, .fast, .unsigned, w, mapper);
845 try comp.generateFastOrLeastType(size, .least, .signed, w);
846 try comp.generateFastOrLeastType(size, .least, .unsigned, w);
847 try comp.generateFastOrLeastType(size, .fast, .signed, w);
848 try comp.generateFastOrLeastType(size, .fast, .unsigned, w);
811849 }
812850}
813851
814fn generateExactWidthTypes(comp: *const Compilation, w: *Writer, mapper: StrInt.TypeMapper) !void {
815 try comp.generateExactWidthType(w, mapper, .schar);
852fn generateExactWidthTypes(comp: *Compilation, w: *std.Io.Writer) !void {
853 try comp.generateExactWidthType(w, .schar);
816854
817 if (comp.intSize(.short) > comp.intSize(.char)) {
818 try comp.generateExactWidthType(w, mapper, .short);
855 if (QualType.short.sizeof(comp) > QualType.char.sizeof(comp)) {
856 try comp.generateExactWidthType(w, .short);
819857 }
820858
821 if (comp.intSize(.int) > comp.intSize(.short)) {
822 try comp.generateExactWidthType(w, mapper, .int);
859 if (QualType.int.sizeof(comp) > QualType.short.sizeof(comp)) {
860 try comp.generateExactWidthType(w, .int);
823861 }
824862
825 if (comp.intSize(.long) > comp.intSize(.int)) {
826 try comp.generateExactWidthType(w, mapper, .long);
863 if (QualType.long.sizeof(comp) > QualType.int.sizeof(comp)) {
864 try comp.generateExactWidthType(w, .long);
827865 }
828866
829 if (comp.intSize(.long_long) > comp.intSize(.long)) {
830 try comp.generateExactWidthType(w, mapper, .long_long);
867 if (QualType.long_long.sizeof(comp) > QualType.long.sizeof(comp)) {
868 try comp.generateExactWidthType(w, .long_long);
831869 }
832870
833 try comp.generateExactWidthType(w, mapper, .uchar);
871 try comp.generateExactWidthType(w, .uchar);
834872 try comp.generateExactWidthIntMax(w, .uchar);
835873 try comp.generateExactWidthIntMax(w, .schar);
836874
837 if (comp.intSize(.short) > comp.intSize(.char)) {
838 try comp.generateExactWidthType(w, mapper, .ushort);
875 if (QualType.short.sizeof(comp) > QualType.char.sizeof(comp)) {
876 try comp.generateExactWidthType(w, .ushort);
839877 try comp.generateExactWidthIntMax(w, .ushort);
840878 try comp.generateExactWidthIntMax(w, .short);
841879 }
842880
843 if (comp.intSize(.int) > comp.intSize(.short)) {
844 try comp.generateExactWidthType(w, mapper, .uint);
881 if (QualType.int.sizeof(comp) > QualType.short.sizeof(comp)) {
882 try comp.generateExactWidthType(w, .uint);
845883 try comp.generateExactWidthIntMax(w, .uint);
846884 try comp.generateExactWidthIntMax(w, .int);
847885 }
848886
849 if (comp.intSize(.long) > comp.intSize(.int)) {
850 try comp.generateExactWidthType(w, mapper, .ulong);
887 if (QualType.long.sizeof(comp) > QualType.int.sizeof(comp)) {
888 try comp.generateExactWidthType(w, .ulong);
851889 try comp.generateExactWidthIntMax(w, .ulong);
852890 try comp.generateExactWidthIntMax(w, .long);
853891 }
854892
855 if (comp.intSize(.long_long) > comp.intSize(.long)) {
856 try comp.generateExactWidthType(w, mapper, .ulong_long);
893 if (QualType.long_long.sizeof(comp) > QualType.long.sizeof(comp)) {
894 try comp.generateExactWidthType(w, .ulong_long);
857895 try comp.generateExactWidthIntMax(w, .ulong_long);
858896 try comp.generateExactWidthIntMax(w, .long_long);
859897 }
860898}
861899
862fn generateFmt(comp: *const Compilation, prefix: []const u8, w: *Writer, ty: Type) !void {
863 const unsigned = ty.isUnsignedInt(comp);
864 const modifier = ty.formatModifier();
900fn generateFmt(comp: *const Compilation, prefix: []const u8, w: *std.Io.Writer, qt: QualType) !void {
901 const unsigned = qt.signedness(comp) == .unsigned;
902 const modifier = qt.formatModifier(comp);
865903 const formats = if (unsigned) "ouxX" else "di";
866904 for (formats) |c| {
867905 try w.print("#define {s}_FMT{c}__ \"{s}{c}\"\n", .{ prefix, c, modifier, c });
868906 }
869907}
870908
871fn generateSuffixMacro(comp: *const Compilation, prefix: []const u8, w: *Writer, ty: Type) !void {
872 return w.print("#define {s}_C_SUFFIX__ {s}\n", .{ prefix, ty.intValueSuffix(comp) });
909fn generateSuffixMacro(comp: *const Compilation, prefix: []const u8, w: *std.Io.Writer, qt: QualType) !void {
910 return w.print("#define {s}_C_SUFFIX__ {s}\n", .{ prefix, qt.intValueSuffix(comp) });
873911}
874912
875/// Generate the following for ty:
913/// Generate the following for a type:
876914/// Name macro (e.g. #define __UINT32_TYPE__ unsigned int)
877915/// Format strings (e.g. #define __UINT32_FMTu__ "u")
878916/// Suffix macro (e.g. #define __UINT32_C_SUFFIX__ U)
879fn generateExactWidthType(comp: *const Compilation, w: *Writer, mapper: StrInt.TypeMapper, specifier: Type.Specifier) !void {
880 var ty = Type{ .specifier = specifier };
881 const width = 8 * ty.sizeof(comp).?;
882 const unsigned = ty.isUnsignedInt(comp);
917fn generateExactWidthType(comp: *Compilation, w: *std.Io.Writer, original_qt: QualType) !void {
918 var qt = original_qt;
919 const width = qt.sizeof(comp) * 8;
920 const unsigned = qt.signedness(comp) == .unsigned;
883921
884922 if (width == 16) {
885 ty = if (unsigned) comp.types.int16.makeIntegerUnsigned() else comp.types.int16;
923 qt = if (unsigned) try comp.type_store.int16.makeIntUnsigned(comp) else comp.type_store.int16;
886924 } else if (width == 64) {
887 ty = if (unsigned) comp.types.int64.makeIntegerUnsigned() else comp.types.int64;
925 qt = if (unsigned) try comp.type_store.int64.makeIntUnsigned(comp) else comp.type_store.int64;
888926 }
889927
890928 var buffer: [16]u8 = undefined;
891929 const suffix = "_TYPE__";
892930 const full = std.fmt.bufPrint(&buffer, "{s}{d}{s}", .{
893931 if (unsigned) "__UINT" else "__INT", width, suffix,
894 }) catch return error.OutOfMemory;
932 }) catch unreachable;
895933
896 try generateTypeMacro(w, mapper, full, ty, comp.langopts);
934 try comp.generateTypeMacro(w, full, qt);
897935
898936 const prefix = full[0 .. full.len - suffix.len]; // remove "_TYPE__"
899937
900 try comp.generateFmt(prefix, w, ty);
901 try comp.generateSuffixMacro(prefix, w, ty);
938 try comp.generateFmt(prefix, w, qt);
939 try comp.generateSuffixMacro(prefix, w, qt);
902940}
903941
904942pub fn hasFloat128(comp: *const Compilation) bool {
......@@ -909,107 +947,9 @@ pub fn hasHalfPrecisionFloatABI(comp: *const Compilation) bool {
909947 return comp.langopts.allow_half_args_and_returns or target_util.hasHalfPrecisionFloatABI(comp.target);
910948}
911949
912fn generateNsConstantStringType(comp: *Compilation) !void {
913 comp.types.ns_constant_string.record = .{
914 .name = try StrInt.intern(comp, "__NSConstantString_tag"),
915 .fields = &comp.types.ns_constant_string.fields,
916 .field_attributes = null,
917 .type_layout = undefined,
918 };
919 const const_int_ptr = Type{ .specifier = .pointer, .data = .{ .sub_type = &comp.types.ns_constant_string.int_ty } };
920 const const_char_ptr = Type{ .specifier = .pointer, .data = .{ .sub_type = &comp.types.ns_constant_string.char_ty } };
921
922 comp.types.ns_constant_string.fields[0] = .{ .name = try StrInt.intern(comp, "isa"), .ty = const_int_ptr };
923 comp.types.ns_constant_string.fields[1] = .{ .name = try StrInt.intern(comp, "flags"), .ty = .{ .specifier = .int } };
924 comp.types.ns_constant_string.fields[2] = .{ .name = try StrInt.intern(comp, "str"), .ty = const_char_ptr };
925 comp.types.ns_constant_string.fields[3] = .{ .name = try StrInt.intern(comp, "length"), .ty = .{ .specifier = .long } };
926 comp.types.ns_constant_string.ty = .{ .specifier = .@"struct", .data = .{ .record = &comp.types.ns_constant_string.record } };
927 record_layout.compute(&comp.types.ns_constant_string.record, comp.types.ns_constant_string.ty, comp, null) catch unreachable;
928}
929
930fn generateVaListType(comp: *Compilation) !Type {
931 const Kind = enum { char_ptr, void_ptr, aarch64_va_list, x86_64_va_list };
932 const kind: Kind = switch (comp.target.cpu.arch) {
933 .aarch64 => switch (comp.target.os.tag) {
934 .windows => @as(Kind, .char_ptr),
935 .ios, .macos, .tvos, .watchos => .char_ptr,
936 else => .aarch64_va_list,
937 },
938 .sparc, .wasm32, .wasm64, .bpfel, .bpfeb, .riscv32, .riscv32be, .riscv64, .riscv64be, .avr, .spirv32, .spirv64 => .void_ptr,
939 .powerpc => switch (comp.target.os.tag) {
940 .ios, .macos, .tvos, .watchos, .aix => @as(Kind, .char_ptr),
941 else => return Type{ .specifier = .void }, // unknown
942 },
943 .x86, .msp430 => .char_ptr,
944 .x86_64 => switch (comp.target.os.tag) {
945 .windows => @as(Kind, .char_ptr),
946 else => .x86_64_va_list,
947 },
948 else => return Type{ .specifier = .void }, // unknown
949 };
950
951 // TODO this might be bad?
952 const arena = comp.diagnostics.arena.allocator();
953
954 var ty: Type = undefined;
955 switch (kind) {
956 .char_ptr => ty = .{ .specifier = .char },
957 .void_ptr => ty = .{ .specifier = .void },
958 .aarch64_va_list => {
959 const record_ty = try arena.create(Type.Record);
960 record_ty.* = .{
961 .name = try StrInt.intern(comp, "__va_list_tag"),
962 .fields = try arena.alloc(Type.Record.Field, 5),
963 .field_attributes = null,
964 .type_layout = undefined, // computed below
965 };
966 const void_ty = try arena.create(Type);
967 void_ty.* = .{ .specifier = .void };
968 const void_ptr = Type{ .specifier = .pointer, .data = .{ .sub_type = void_ty } };
969 record_ty.fields[0] = .{ .name = try StrInt.intern(comp, "__stack"), .ty = void_ptr };
970 record_ty.fields[1] = .{ .name = try StrInt.intern(comp, "__gr_top"), .ty = void_ptr };
971 record_ty.fields[2] = .{ .name = try StrInt.intern(comp, "__vr_top"), .ty = void_ptr };
972 record_ty.fields[3] = .{ .name = try StrInt.intern(comp, "__gr_offs"), .ty = .{ .specifier = .int } };
973 record_ty.fields[4] = .{ .name = try StrInt.intern(comp, "__vr_offs"), .ty = .{ .specifier = .int } };
974 ty = .{ .specifier = .@"struct", .data = .{ .record = record_ty } };
975 record_layout.compute(record_ty, ty, comp, null) catch unreachable;
976 },
977 .x86_64_va_list => {
978 const record_ty = try arena.create(Type.Record);
979 record_ty.* = .{
980 .name = try StrInt.intern(comp, "__va_list_tag"),
981 .fields = try arena.alloc(Type.Record.Field, 4),
982 .field_attributes = null,
983 .type_layout = undefined, // computed below
984 };
985 const void_ty = try arena.create(Type);
986 void_ty.* = .{ .specifier = .void };
987 const void_ptr = Type{ .specifier = .pointer, .data = .{ .sub_type = void_ty } };
988 record_ty.fields[0] = .{ .name = try StrInt.intern(comp, "gp_offset"), .ty = .{ .specifier = .uint } };
989 record_ty.fields[1] = .{ .name = try StrInt.intern(comp, "fp_offset"), .ty = .{ .specifier = .uint } };
990 record_ty.fields[2] = .{ .name = try StrInt.intern(comp, "overflow_arg_area"), .ty = void_ptr };
991 record_ty.fields[3] = .{ .name = try StrInt.intern(comp, "reg_save_area"), .ty = void_ptr };
992 ty = .{ .specifier = .@"struct", .data = .{ .record = record_ty } };
993 record_layout.compute(record_ty, ty, comp, null) catch unreachable;
994 },
995 }
996 if (kind == .char_ptr or kind == .void_ptr) {
997 const elem_ty = try arena.create(Type);
998 elem_ty.* = ty;
999 ty = Type{ .specifier = .pointer, .data = .{ .sub_type = elem_ty } };
1000 } else {
1001 const arr_ty = try arena.create(Type.Array);
1002 arr_ty.* = .{ .len = 1, .elem = ty };
1003 ty = Type{ .specifier = .array, .data = .{ .array = arr_ty } };
1004 }
1005
1006 return ty;
1007}
1008
1009fn generateIntMax(comp: *const Compilation, w: *Writer, name: []const u8, ty: Type) !void {
1010 const bit_count: u8 = @intCast(ty.sizeof(comp).? * 8);
1011 const unsigned = ty.isUnsignedInt(comp);
1012 const max: u128 = switch (bit_count) {
950fn generateIntMax(comp: *const Compilation, w: *std.Io.Writer, name: []const u8, qt: QualType) !void {
951 const unsigned = qt.signedness(comp) == .unsigned;
952 const max: u128 = switch (qt.bitSizeof(comp)) {
1013953 8 => if (unsigned) std.math.maxInt(u8) else std.math.maxInt(i8),
1014954 16 => if (unsigned) std.math.maxInt(u16) else std.math.maxInt(i16),
1015955 32 => if (unsigned) std.math.maxInt(u32) else std.math.maxInt(i32),
......@@ -1017,13 +957,13 @@ fn generateIntMax(comp: *const Compilation, w: *Writer, name: []const u8, ty: Ty
1017957 128 => if (unsigned) std.math.maxInt(u128) else std.math.maxInt(i128),
1018958 else => unreachable,
1019959 };
1020 try w.print("#define __{s}_MAX__ {d}{s}\n", .{ name, max, ty.intValueSuffix(comp) });
960 try w.print("#define __{s}_MAX__ {d}{s}\n", .{ name, max, qt.intValueSuffix(comp) });
1021961}
1022962
1023963/// Largest value that can be stored in wchar_t
1024964pub fn wcharMax(comp: *const Compilation) u32 {
1025 const unsigned = comp.types.wchar.isUnsignedInt(comp);
1026 return switch (comp.types.wchar.bitSizeof(comp).?) {
965 const unsigned = comp.type_store.wchar.signedness(comp) == .unsigned;
966 return switch (comp.type_store.wchar.bitSizeof(comp)) {
1027967 8 => if (unsigned) std.math.maxInt(u8) else std.math.maxInt(i8),
1028968 16 => if (unsigned) std.math.maxInt(u16) else std.math.maxInt(i16),
1029969 32 => if (unsigned) std.math.maxInt(u32) else std.math.maxInt(i32),
......@@ -1031,46 +971,41 @@ pub fn wcharMax(comp: *const Compilation) u32 {
1031971 };
1032972}
1033973
1034fn generateExactWidthIntMax(comp: *const Compilation, w: *Writer, specifier: Type.Specifier) !void {
1035 var ty = Type{ .specifier = specifier };
1036 const bit_count: u8 = @intCast(ty.sizeof(comp).? * 8);
1037 const unsigned = ty.isUnsignedInt(comp);
974fn generateExactWidthIntMax(comp: *Compilation, w: *std.Io.Writer, original_qt: QualType) !void {
975 var qt = original_qt;
976 const bit_count: u8 = @intCast(qt.sizeof(comp) * 8);
977 const unsigned = qt.signedness(comp) == .unsigned;
1038978
1039979 if (bit_count == 64) {
1040 ty = if (unsigned) comp.types.int64.makeIntegerUnsigned() else comp.types.int64;
980 qt = if (unsigned) try comp.type_store.int64.makeIntUnsigned(comp) else comp.type_store.int64;
1041981 }
1042982
1043983 var name_buffer: [6]u8 = undefined;
1044984 const name = std.fmt.bufPrint(&name_buffer, "{s}{d}", .{
1045985 if (unsigned) "UINT" else "INT", bit_count,
1046 }) catch return error.OutOfMemory;
986 }) catch unreachable;
1047987
1048 return comp.generateIntMax(w, name, ty);
988 return comp.generateIntMax(w, name, qt);
1049989}
1050990
1051fn generateIntWidth(comp: *Compilation, w: *Writer, name: []const u8, ty: Type) !void {
1052 try w.print("#define __{s}_WIDTH__ {d}\n", .{ name, 8 * ty.sizeof(comp).? });
991fn generateIntWidth(comp: *Compilation, w: *std.Io.Writer, name: []const u8, qt: QualType) !void {
992 try w.print("#define __{s}_WIDTH__ {d}\n", .{ name, qt.sizeof(comp) * 8 });
1053993}
1054994
1055fn generateIntMaxAndWidth(comp: *Compilation, w: *Writer, name: []const u8, ty: Type) !void {
1056 try comp.generateIntMax(w, name, ty);
1057 try comp.generateIntWidth(w, name, ty);
995fn generateSizeofType(comp: *Compilation, w: *std.Io.Writer, name: []const u8, qt: QualType) !void {
996 try w.print("#define {s} {d}\n", .{ name, qt.sizeof(comp) });
1058997}
1059998
1060fn generateSizeofType(comp: *Compilation, w: *Writer, name: []const u8, ty: Type) !void {
1061 try w.print("#define {s} {d}\n", .{ name, ty.sizeof(comp).? });
1062}
1063
1064pub fn nextLargestIntSameSign(comp: *const Compilation, ty: Type) ?Type {
1065 assert(ty.isInt());
1066 const specifiers = if (ty.isUnsignedInt(comp))
1067 [_]Type.Specifier{ .short, .int, .long, .long_long }
999pub fn nextLargestIntSameSign(comp: *const Compilation, qt: QualType) ?QualType {
1000 assert(qt.isInt(comp));
1001 const candidates: [4]QualType = if (qt.signedness(comp) == .signed)
1002 .{ .short, .int, .long, .long_long }
10681003 else
1069 [_]Type.Specifier{ .ushort, .uint, .ulong, .ulong_long };
1070 const size = ty.sizeof(comp).?;
1071 for (specifiers) |specifier| {
1072 const candidate = Type{ .specifier = specifier };
1073 if (candidate.sizeof(comp).? > size) return candidate;
1004 .{ .ushort, .uint, .ulong, .ulong_long };
1005
1006 const size = qt.sizeof(comp);
1007 for (candidates) |candidate| {
1008 if (candidate.sizeof(comp) > size) return candidate;
10741009 }
10751010 return null;
10761011}
......@@ -1085,7 +1020,7 @@ pub fn maxArrayBytes(comp: *const Compilation) u64 {
10851020/// __attribute__((packed)) or the range of values of the corresponding enumerator constants,
10861021/// specify it here.
10871022/// TODO: likely incomplete
1088pub fn fixedEnumTagSpecifier(comp: *const Compilation) ?Type.Specifier {
1023pub fn fixedEnumTagType(comp: *const Compilation) ?QualType {
10891024 switch (comp.langopts.emulate) {
10901025 .msvc => return .int,
10911026 .clang => if (comp.target.os.tag == .windows) return .int,
......@@ -1099,24 +1034,27 @@ pub fn getCharSignedness(comp: *const Compilation) std.builtin.Signedness {
10991034}
11001035
11011036/// Add built-in aro headers directory to system include paths
1102pub fn addBuiltinIncludeDir(comp: *Compilation, aro_dir: []const u8) !void {
1037pub fn addBuiltinIncludeDir(comp: *Compilation, aro_dir: []const u8, override_resource_dir: ?[]const u8) !void {
1038 const gpa = comp.gpa;
1039 const arena = comp.arena;
1040 try comp.system_include_dirs.ensureUnusedCapacity(gpa, 1);
1041 if (override_resource_dir) |resource_dir| {
1042 comp.system_include_dirs.appendAssumeCapacity(try std.fs.path.join(arena, &.{ resource_dir, "include" }));
1043 return;
1044 }
11031045 var search_path = aro_dir;
11041046 while (std.fs.path.dirname(search_path)) |dirname| : (search_path = dirname) {
11051047 var base_dir = comp.cwd.openDir(dirname, .{}) catch continue;
11061048 defer base_dir.close();
11071049
11081050 base_dir.access("include/stddef.h", .{}) catch continue;
1109 const path = try std.fs.path.join(comp.gpa, &.{ dirname, "include" });
1110 errdefer comp.gpa.free(path);
1111 try comp.system_include_dirs.append(comp.gpa, path);
1051 comp.system_include_dirs.appendAssumeCapacity(try std.fs.path.join(arena, &.{ dirname, "include" }));
11121052 break;
11131053 } else return error.AroIncludeNotFound;
11141054}
11151055
11161056pub fn addSystemIncludeDir(comp: *Compilation, path: []const u8) !void {
1117 const duped = try comp.gpa.dupe(u8, path);
1118 errdefer comp.gpa.free(duped);
1119 try comp.system_include_dirs.append(comp.gpa, duped);
1057 try comp.system_include_dirs.append(comp.gpa, try comp.arena.dupe(u8, path));
11201058}
11211059
11221060pub fn getSource(comp: *const Compilation, id: Source.Id) Source {
......@@ -1130,21 +1068,14 @@ pub fn getSource(comp: *const Compilation, id: Source.Id) Source {
11301068 return comp.sources.values()[@intFromEnum(id) - 2];
11311069}
11321070
1133/// Creates a Source from the contents of `reader` and adds it to the Compilation
1134pub fn addSourceFromReader(comp: *Compilation, reader: anytype, path: []const u8, kind: Source.Kind) !Source {
1135 const contents = try reader.readAllAlloc(comp.gpa, std.math.maxInt(u32));
1136 errdefer comp.gpa.free(contents);
1137 return comp.addSourceFromOwnedBuffer(contents, path, kind);
1138}
1139
11401071/// Creates a Source from `buf` and adds it to the Compilation
11411072/// Performs newline splicing and line-ending normalization to '\n'
11421073/// `buf` will be modified and the allocation will be resized if newline splicing
11431074/// or line-ending changes happen.
11441075/// caller retains ownership of `path`
1145/// To add the contents of an arbitrary reader as a Source, see addSourceFromReader
11461076/// To add a file's contents given its path, see addSourceFromPath
1147pub fn addSourceFromOwnedBuffer(comp: *Compilation, buf: []u8, path: []const u8, kind: Source.Kind) !Source {
1077pub fn addSourceFromOwnedBuffer(comp: *Compilation, path: []const u8, buf: []u8, kind: Source.Kind) !Source {
1078 assert(buf.len <= std.math.maxInt(u32));
11481079 try comp.sources.ensureUnusedCapacity(comp.gpa, 1);
11491080
11501081 var contents = buf;
......@@ -1187,10 +1118,7 @@ pub fn addSourceFromOwnedBuffer(comp: *Compilation, buf: []u8, path: []const u8,
11871118 i = backslash_loc;
11881119 try splice_list.append(i);
11891120 if (state == .trailing_ws) {
1190 try comp.addDiagnostic(.{
1191 .tag = .backslash_newline_escape,
1192 .loc = .{ .id = source_id, .byte_offset = i, .line = line },
1193 }, &.{});
1121 try comp.addNewlineEscapeError(path, buf, splice_list.items, i, line);
11941122 }
11951123 state = if (state == .back_slash_cr) .cr else .back_slash_cr;
11961124 },
......@@ -1211,10 +1139,7 @@ pub fn addSourceFromOwnedBuffer(comp: *Compilation, buf: []u8, path: []const u8,
12111139 try splice_list.append(i);
12121140 }
12131141 if (state == .trailing_ws) {
1214 try comp.addDiagnostic(.{
1215 .tag = .backslash_newline_escape,
1216 .loc = .{ .id = source_id, .byte_offset = i, .line = line },
1217 }, &.{});
1142 try comp.addNewlineEscapeError(path, buf, splice_list.items, i, line);
12181143 }
12191144 },
12201145 .bom1, .bom2 => break,
......@@ -1267,10 +1192,16 @@ pub fn addSourceFromOwnedBuffer(comp: *Compilation, buf: []u8, path: []const u8,
12671192 const splice_locs = try splice_list.toOwnedSlice();
12681193 errdefer comp.gpa.free(splice_locs);
12691194
1270 if (i != contents.len) contents = try comp.gpa.realloc(contents, i);
1195 if (i != contents.len) {
1196 var list: std.ArrayListUnmanaged(u8) = .{
1197 .items = contents[0..i],
1198 .capacity = contents.len,
1199 };
1200 contents = try list.toOwnedSlice(comp.gpa);
1201 }
12711202 errdefer @compileError("errdefers in callers would possibly free the realloced slice using the original len");
12721203
1273 const source = Source{
1204 const source: Source = .{
12741205 .id = source_id,
12751206 .path = duped_path,
12761207 .buf = contents,
......@@ -1282,17 +1213,41 @@ pub fn addSourceFromOwnedBuffer(comp: *Compilation, buf: []u8, path: []const u8,
12821213 return source;
12831214}
12841215
1216fn addNewlineEscapeError(comp: *Compilation, path: []const u8, buf: []const u8, splice_locs: []const u32, byte_offset: u32, line: u32) !void {
1217 // Temporary source for getting the location for errors.
1218 var tmp_source: Source = .{
1219 .path = path,
1220 .buf = buf,
1221 .id = undefined,
1222 .kind = undefined,
1223 .splice_locs = splice_locs,
1224 };
1225
1226 const diagnostic: Diagnostic = .backslash_newline_escape;
1227 var loc = tmp_source.lineCol(.{ .id = undefined, .byte_offset = byte_offset, .line = line });
1228 loc.line = loc.line[0 .. loc.line.len - 1];
1229 loc.width += 1;
1230 loc.col += 1;
1231
1232 try comp.diagnostics.add(.{
1233 .text = diagnostic.fmt,
1234 .kind = diagnostic.kind,
1235 .opt = diagnostic.opt,
1236 .location = loc,
1237 });
1238}
1239
12851240/// Caller retains ownership of `path` and `buf`.
12861241/// Dupes the source buffer; if it is acceptable to modify the source buffer and possibly resize
12871242/// the allocation, please use `addSourceFromOwnedBuffer`
1288pub fn addSourceFromBuffer(comp: *Compilation, path: []const u8, buf: []const u8) !Source {
1243pub fn addSourceFromBuffer(comp: *Compilation, path: []const u8, buf: []const u8) AddSourceError!Source {
12891244 if (comp.sources.get(path)) |some| return some;
1290 if (@as(u64, buf.len) > std.math.maxInt(u32)) return error.StreamTooLong;
1245 if (buf.len > std.math.maxInt(u32)) return error.FileTooBig;
12911246
12921247 const contents = try comp.gpa.dupe(u8, buf);
12931248 errdefer comp.gpa.free(contents);
12941249
1295 return comp.addSourceFromOwnedBuffer(contents, path, .user);
1250 return comp.addSourceFromOwnedBuffer(path, contents, .user);
12961251}
12971252
12981253/// Caller retains ownership of `path`.
......@@ -1308,109 +1263,196 @@ fn addSourceFromPathExtra(comp: *Compilation, path: []const u8, kind: Source.Kin
13081263 return error.FileNotFound;
13091264 }
13101265
1311 const contents = try comp.cwd.readFileAlloc(path, comp.gpa, .limited(std.math.maxInt(u32)));
1312 errdefer comp.gpa.free(contents);
1313
1314 return comp.addSourceFromOwnedBuffer(contents, path, kind);
1266 const file = try comp.cwd.openFile(path, .{});
1267 defer file.close();
1268 return comp.addSourceFromFile(file, path, kind);
13151269}
13161270
1317pub const IncludeDirIterator = struct {
1318 comp: *const Compilation,
1319 cwd_source_id: ?Source.Id,
1320 include_dirs_idx: usize = 0,
1321 sys_include_dirs_idx: usize = 0,
1322 tried_ms_cwd: bool = false,
1271pub fn addSourceFromFile(comp: *Compilation, file: std.fs.File, path: []const u8, kind: Source.Kind) !Source {
1272 var file_buf: [4096]u8 = undefined;
1273 var file_reader = file.reader(&file_buf);
1274 if (try file_reader.getSize() > std.math.maxInt(u32)) return error.FileTooBig;
13231275
1324 const FoundSource = struct {
1325 path: []const u8,
1326 kind: Source.Kind,
1276 var allocating: std.Io.Writer.Allocating = .init(comp.gpa);
1277 _ = allocating.writer.sendFileAll(&file_reader, .limited(std.math.maxInt(u32))) catch |e| switch (e) {
1278 error.WriteFailed => return error.OutOfMemory,
1279 error.ReadFailed => return file_reader.err.?,
13271280 };
13281281
1329 fn next(self: *IncludeDirIterator) ?FoundSource {
1330 if (self.cwd_source_id) |source_id| {
1331 self.cwd_source_id = null;
1332 const path = self.comp.getSource(source_id).path;
1333 return .{ .path = std.fs.path.dirname(path) orelse ".", .kind = .user };
1334 }
1335 if (self.include_dirs_idx < self.comp.include_dirs.items.len) {
1336 defer self.include_dirs_idx += 1;
1337 return .{ .path = self.comp.include_dirs.items[self.include_dirs_idx], .kind = .user };
1338 }
1339 if (self.sys_include_dirs_idx < self.comp.system_include_dirs.items.len) {
1340 defer self.sys_include_dirs_idx += 1;
1341 return .{ .path = self.comp.system_include_dirs.items[self.sys_include_dirs_idx], .kind = .system };
1342 }
1343 if (self.comp.ms_cwd_source_id) |source_id| {
1344 if (self.tried_ms_cwd) return null;
1345 self.tried_ms_cwd = true;
1346 const path = self.comp.getSource(source_id).path;
1347 return .{ .path = std.fs.path.dirname(path) orelse ".", .kind = .user };
1348 }
1349 return null;
1350 }
1351
1352 /// Returned value's path field must be freed by allocator
1353 fn nextWithFile(self: *IncludeDirIterator, filename: []const u8, allocator: Allocator) !?FoundSource {
1354 while (self.next()) |found| {
1355 const path = try std.fs.path.join(allocator, &.{ found.path, filename });
1356 if (self.comp.langopts.ms_extensions) {
1357 std.mem.replaceScalar(u8, path, '\\', '/');
1358 }
1359 return .{ .path = path, .kind = found.kind };
1360 }
1361 return null;
1362 }
1363
1364 /// Advance the iterator until it finds an include directory that matches
1365 /// the directory which contains `source`.
1366 fn skipUntilDirMatch(self: *IncludeDirIterator, source: Source.Id) void {
1367 const path = self.comp.getSource(source).path;
1368 const includer_path = std.fs.path.dirname(path) orelse ".";
1369 while (self.next()) |found| {
1370 if (mem.eql(u8, includer_path, found.path)) break;
1371 }
1372 }
1373};
1282 const contents = try allocating.toOwnedSlice();
1283 errdefer comp.gpa.free(contents);
1284 return comp.addSourceFromOwnedBuffer(path, contents, kind);
1285}
13741286
13751287pub fn hasInclude(
1376 comp: *const Compilation,
1288 comp: *Compilation,
13771289 filename: []const u8,
13781290 includer_token_source: Source.Id,
13791291 /// angle bracket vs quotes
13801292 include_type: IncludeType,
13811293 /// __has_include vs __has_include_next
13821294 which: WhichInclude,
1383) !bool {
1384 if (mem.indexOfScalar(u8, filename, 0) != null) {
1295) Compilation.Error!bool {
1296 if (try FindInclude.run(comp, filename, switch (which) {
1297 .next => .{ .only_search_after_dir = comp.getSource(includer_token_source).path },
1298 .first => switch (include_type) {
1299 .quotes => .{ .allow_same_dir = comp.getSource(includer_token_source).path },
1300 .angle_brackets => .only_search,
1301 },
1302 })) |_| {
1303 return true;
1304 } else {
13851305 return false;
13861306 }
1307}
13871308
1388 if (std.fs.path.isAbsolute(filename)) {
1389 if (which == .next) return false;
1390 return !std.meta.isError(comp.cwd.access(filename, .{}));
1391 }
1309const FindInclude = struct {
1310 comp: *Compilation,
1311 include_path: []const u8,
1312 /// We won't actually consider any include directories until after this directory.
1313 wait_for: ?[]const u8,
13921314
1393 const cwd_source_id = switch (include_type) {
1394 .quotes => switch (which) {
1395 .first => includer_token_source,
1396 .next => null,
1397 },
1398 .angle_brackets => null,
1315 const Result = struct {
1316 source: Source.Id,
1317 kind: Source.Kind,
1318 used_ms_search_rule: bool,
13991319 };
1400 var it = IncludeDirIterator{ .comp = comp, .cwd_source_id = cwd_source_id };
1401 if (which == .next) {
1402 it.skipUntilDirMatch(includer_token_source);
1320
1321 fn run(
1322 comp: *Compilation,
1323 include_path: []const u8,
1324 search_strat: union(enum) {
1325 allow_same_dir: []const u8,
1326 only_search,
1327 only_search_after_dir: []const u8,
1328 },
1329 ) Allocator.Error!?Result {
1330 var find: FindInclude = .{
1331 .comp = comp,
1332 .include_path = include_path,
1333 .wait_for = null,
1334 };
1335
1336 if (std.fs.path.isAbsolute(include_path)) {
1337 switch (search_strat) {
1338 .allow_same_dir, .only_search => {},
1339 .only_search_after_dir => return null,
1340 }
1341 return find.check("{s}", .{include_path}, .user, false);
1342 }
1343
1344 switch (search_strat) {
1345 .allow_same_dir => |other_file| {
1346 const dir = std.fs.path.dirname(other_file) orelse ".";
1347 if (try find.checkIncludeDir(dir, .user)) |res| return res;
1348 },
1349 .only_search => {},
1350 .only_search_after_dir => |other_file| {
1351 // TODO: this is not the correct interpretation of `#include_next` and friends,
1352 // because a file might not be directly inside of an include directory. To implement
1353 // this correctly, we will need to track which include directory a file has been
1354 // included from.
1355 find.wait_for = std.fs.path.dirname(other_file);
1356 },
1357 }
1358
1359 for (comp.include_dirs.items) |dir| {
1360 if (try find.checkIncludeDir(dir, .user)) |res| return res;
1361 }
1362 for (comp.framework_dirs.items) |dir| {
1363 if (try find.checkFrameworkDir(dir, .user)) |res| return res;
1364 }
1365 for (comp.system_include_dirs.items) |dir| {
1366 if (try find.checkIncludeDir(dir, .system)) |res| return res;
1367 }
1368 for (comp.system_framework_dirs.items) |dir| {
1369 if (try find.checkFrameworkDir(dir, .system)) |res| return res;
1370 }
1371 for (comp.after_include_dirs.items) |dir| {
1372 if (try find.checkIncludeDir(dir, .user)) |res| return res;
1373 }
1374 if (comp.ms_cwd_source_id) |source_id| {
1375 if (try find.checkMsCwdIncludeDir(source_id)) |res| return res;
1376 }
1377 return null;
14031378 }
1379 fn checkIncludeDir(find: *FindInclude, include_dir: []const u8, kind: Source.Kind) Allocator.Error!?Result {
1380 if (find.wait_for) |wait_for| {
1381 if (std.mem.eql(u8, include_dir, wait_for)) find.wait_for = null;
1382 return null;
1383 }
1384 return find.check("{s}{c}{s}", .{
1385 include_dir,
1386 std.fs.path.sep,
1387 find.include_path,
1388 }, kind, false);
1389 }
1390 fn checkMsCwdIncludeDir(find: *FindInclude, source_id: Source.Id) Allocator.Error!?Result {
1391 const path = find.comp.getSource(source_id).path;
1392 const dir = std.fs.path.dirname(path) orelse ".";
1393 if (find.wait_for) |wait_for| {
1394 if (std.mem.eql(u8, dir, wait_for)) find.wait_for = null;
1395 return null;
1396 }
1397 return find.check("{s}{c}{s}", .{
1398 dir,
1399 std.fs.path.sep,
1400 find.include_path,
1401 }, .user, true);
1402 }
1403 fn checkFrameworkDir(find: *FindInclude, framework_dir: []const u8, kind: Source.Kind) Allocator.Error!?Result {
1404 if (find.wait_for) |wait_for| {
1405 match: {
1406 // If this is a match, then `wait_for` looks like '.../Foo.framework/Headers'.
1407 const wait_framework = std.fs.path.dirname(wait_for) orelse break :match;
1408 const wait_framework_dir = std.fs.path.dirname(wait_framework) orelse break :match;
1409 if (!std.mem.eql(u8, framework_dir, wait_framework_dir)) break :match;
1410 find.wait_for = null;
1411 }
1412 return null;
1413 }
1414 // For an include like 'Foo/Bar.h', search in '<framework_dir>/Foo.framework/Headers/Bar.h'.
1415 const framework_name: []const u8, const header_sub_path: []const u8 = f: {
1416 const i = std.mem.indexOfScalar(u8, find.include_path, '/') orelse return null;
1417 break :f .{ find.include_path[0..i], find.include_path[i + 1 ..] };
1418 };
1419 return find.check("{s}{c}{s}.framework{c}Headers{c}{s}", .{
1420 framework_dir,
1421 std.fs.path.sep,
1422 framework_name,
1423 std.fs.path.sep,
1424 std.fs.path.sep,
1425 header_sub_path,
1426 }, kind, false);
1427 }
1428 fn check(
1429 find: *FindInclude,
1430 comptime format: []const u8,
1431 args: anytype,
1432 kind: Source.Kind,
1433 used_ms_search_rule: bool,
1434 ) Allocator.Error!?Result {
1435 const comp = find.comp;
14041436
1405 var stack_fallback = std.heap.stackFallback(path_buf_stack_limit, comp.gpa);
1406 const sf_allocator = stack_fallback.get();
1437 var stack_fallback = std.heap.stackFallback(path_buf_stack_limit, comp.gpa);
1438 const sfa = stack_fallback.get();
1439 const header_path = try std.fmt.allocPrint(sfa, format, args);
1440 defer sfa.free(header_path);
14071441
1408 while (try it.nextWithFile(filename, sf_allocator)) |found| {
1409 defer sf_allocator.free(found.path);
1410 if (!std.meta.isError(comp.cwd.access(found.path, .{}))) return true;
1442 if (find.comp.langopts.ms_extensions) {
1443 std.mem.replaceScalar(u8, header_path, '\\', '/');
1444 }
1445 const source = comp.addSourceFromPathExtra(header_path, kind) catch |err| switch (err) {
1446 error.OutOfMemory => |e| return e,
1447 else => return null,
1448 };
1449 return .{
1450 .source = source.id,
1451 .kind = kind,
1452 .used_ms_search_rule = used_ms_search_rule,
1453 };
14111454 }
1412 return false;
1413}
1455};
14141456
14151457pub const WhichInclude = enum {
14161458 first,
......@@ -1422,12 +1464,27 @@ pub const IncludeType = enum {
14221464 angle_brackets,
14231465};
14241466
1425fn getFileContents(comp: *Compilation, path: []const u8, limit: ?u32) ![]const u8 {
1467fn getFileContents(comp: *Compilation, path: []const u8, limit: std.Io.Limit) ![]const u8 {
14261468 if (mem.indexOfScalar(u8, path, 0) != null) {
14271469 return error.FileNotFound;
14281470 }
14291471
1430 return comp.cwd.readFileAlloc(path, comp.gpa, .limited(limit orelse std.math.maxInt(u32)));
1472 const file = try comp.cwd.openFile(path, .{});
1473 defer file.close();
1474
1475 var allocating: std.Io.Writer.Allocating = .init(comp.gpa);
1476 defer allocating.deinit();
1477
1478 var file_buf: [4096]u8 = undefined;
1479 var file_reader = file.reader(&file_buf);
1480 if (limit.minInt(try file_reader.getSize()) > std.math.maxInt(u32)) return error.FileTooBig;
1481
1482 _ = allocating.writer.sendFileAll(&file_reader, limit) catch |err| switch (err) {
1483 error.WriteFailed => return error.OutOfMemory,
1484 error.ReadFailed => return file_reader.err.?,
1485 };
1486
1487 return allocating.toOwnedSlice();
14311488}
14321489
14331490pub fn findEmbed(
......@@ -1436,7 +1493,7 @@ pub fn findEmbed(
14361493 includer_token_source: Source.Id,
14371494 /// angle bracket vs quotes
14381495 include_type: IncludeType,
1439 limit: ?u32,
1496 limit: std.Io.Limit,
14401497) !?[]const u8 {
14411498 if (std.fs.path.isAbsolute(filename)) {
14421499 return if (comp.getFileContents(filename, limit)) |some|
......@@ -1447,19 +1504,35 @@ pub fn findEmbed(
14471504 };
14481505 }
14491506
1450 const cwd_source_id = switch (include_type) {
1451 .quotes => includer_token_source,
1452 .angle_brackets => null,
1453 };
1454 var it = IncludeDirIterator{ .comp = comp, .cwd_source_id = cwd_source_id };
14551507 var stack_fallback = std.heap.stackFallback(path_buf_stack_limit, comp.gpa);
14561508 const sf_allocator = stack_fallback.get();
14571509
1458 while (try it.nextWithFile(filename, sf_allocator)) |found| {
1459 defer sf_allocator.free(found.path);
1460 if (comp.getFileContents(found.path, limit)) |some|
1461 return some
1462 else |err| switch (err) {
1510 switch (include_type) {
1511 .quotes => {
1512 const dir = std.fs.path.dirname(comp.getSource(includer_token_source).path) orelse ".";
1513 const path = try std.fs.path.join(sf_allocator, &.{ dir, filename });
1514 defer sf_allocator.free(path);
1515 if (comp.langopts.ms_extensions) {
1516 std.mem.replaceScalar(u8, path, '\\', '/');
1517 }
1518 if (comp.getFileContents(path, limit)) |some| {
1519 return some;
1520 } else |err| switch (err) {
1521 error.OutOfMemory => return error.OutOfMemory,
1522 else => {},
1523 }
1524 },
1525 .angle_brackets => {},
1526 }
1527 for (comp.embed_dirs.items) |embed_dir| {
1528 const path = try std.fs.path.join(sf_allocator, &.{ embed_dir, filename });
1529 defer sf_allocator.free(path);
1530 if (comp.langopts.ms_extensions) {
1531 std.mem.replaceScalar(u8, path, '\\', '/');
1532 }
1533 if (comp.getFileContents(path, limit)) |some| {
1534 return some;
1535 } else |err| switch (err) {
14631536 error.OutOfMemory => return error.OutOfMemory,
14641537 else => {},
14651538 }
......@@ -1475,54 +1548,29 @@ pub fn findInclude(
14751548 include_type: IncludeType,
14761549 /// include vs include_next
14771550 which: WhichInclude,
1478) !?Source {
1479 if (std.fs.path.isAbsolute(filename)) {
1480 if (which == .next) return null;
1481 // TODO: classify absolute file as belonging to system includes or not?
1482 return if (comp.addSourceFromPath(filename)) |some|
1483 some
1484 else |err| switch (err) {
1485 error.OutOfMemory => |e| return e,
1486 else => null,
1487 };
1488 }
1489 const cwd_source_id = switch (include_type) {
1490 .quotes => switch (which) {
1491 .first => includer_token.source,
1492 .next => null,
1551) Compilation.Error!?Source {
1552 const found = try FindInclude.run(comp, filename, switch (which) {
1553 .next => .{ .only_search_after_dir = comp.getSource(includer_token.source).path },
1554 .first => switch (include_type) {
1555 .quotes => .{ .allow_same_dir = comp.getSource(includer_token.source).path },
1556 .angle_brackets => .only_search,
14931557 },
1494 .angle_brackets => null,
1495 };
1496 var it = IncludeDirIterator{ .comp = comp, .cwd_source_id = cwd_source_id };
1497
1498 if (which == .next) {
1499 it.skipUntilDirMatch(includer_token.source);
1558 }) orelse return null;
1559 if (found.used_ms_search_rule) {
1560 const diagnostic: Diagnostic = .ms_search_rule;
1561 try comp.diagnostics.add(.{
1562 .text = diagnostic.fmt,
1563 .kind = diagnostic.kind,
1564 .opt = diagnostic.opt,
1565 .extension = diagnostic.extension,
1566 .location = (Source.Location{
1567 .id = includer_token.source,
1568 .byte_offset = includer_token.start,
1569 .line = includer_token.line,
1570 }).expand(comp),
1571 });
15001572 }
1501
1502 var stack_fallback = std.heap.stackFallback(path_buf_stack_limit, comp.gpa);
1503 const sf_allocator = stack_fallback.get();
1504
1505 while (try it.nextWithFile(filename, sf_allocator)) |found| {
1506 defer sf_allocator.free(found.path);
1507 if (comp.addSourceFromPathExtra(found.path, found.kind)) |some| {
1508 if (it.tried_ms_cwd) {
1509 try comp.addDiagnostic(.{
1510 .tag = .ms_search_rule,
1511 .extra = .{ .str = some.path },
1512 .loc = .{
1513 .id = includer_token.source,
1514 .byte_offset = includer_token.start,
1515 .line = includer_token.line,
1516 },
1517 }, &.{});
1518 }
1519 return some;
1520 } else |err| switch (err) {
1521 error.OutOfMemory => return error.OutOfMemory,
1522 else => {},
1523 }
1524 }
1525 return null;
1573 return comp.getSource(found.source);
15261574}
15271575
15281576pub fn addPragmaHandler(comp: *Compilation, name: []const u8, handler: *Pragma) Allocator.Error!void {
......@@ -1574,12 +1622,6 @@ pub fn pragmaEvent(comp: *Compilation, event: PragmaEvent) void {
15741622}
15751623
15761624pub fn hasBuiltin(comp: *const Compilation, name: []const u8) bool {
1577 if (std.mem.eql(u8, name, "__builtin_va_arg") or
1578 std.mem.eql(u8, name, "__builtin_choose_expr") or
1579 std.mem.eql(u8, name, "__builtin_bitoffsetof") or
1580 std.mem.eql(u8, name, "__builtin_offsetof") or
1581 std.mem.eql(u8, name, "__builtin_types_compatible_p")) return true;
1582
15831625 const builtin = Builtin.fromName(name) orelse return false;
15841626 return comp.hasBuiltinFunction(builtin);
15851627}
......@@ -1605,6 +1647,16 @@ pub fn locSlice(comp: *const Compilation, loc: Source.Location) []const u8 {
16051647 return tmp_tokenizer.buf[tok.start..tok.end];
16061648}
16071649
1650pub fn getSourceMTimeUncached(comp: *const Compilation, source_id: Source.Id) ?u64 {
1651 const source = comp.getSource(source_id);
1652 if (comp.cwd.statFile(source.path)) |stat| {
1653 const mtime = @divTrunc(stat.mtime, std.time.ns_per_s);
1654 return std.math.cast(u64, mtime);
1655 } else |_| {
1656 return null;
1657 }
1658}
1659
16081660pub const CharUnitSize = enum(u32) {
16091661 @"1" = 1,
16101662 @"2" = 2,
......@@ -1619,66 +1671,100 @@ pub const CharUnitSize = enum(u32) {
16191671 }
16201672};
16211673
1622pub const addDiagnostic = Diagnostics.add;
1674pub const Diagnostic = struct {
1675 fmt: []const u8,
1676 kind: Diagnostics.Message.Kind,
1677 opt: ?Diagnostics.Option = null,
1678 extension: bool = false,
16231679
1624test "addSourceFromReader" {
1680 pub const backslash_newline_escape: Diagnostic = .{
1681 .fmt = "backslash and newline separated by space",
1682 .kind = .warning,
1683 .opt = .@"backslash-newline-escape",
1684 };
1685
1686 pub const ms_search_rule: Diagnostic = .{
1687 .fmt = "#include resolved using non-portable Microsoft search rules as: {s}",
1688 .kind = .warning,
1689 .opt = .@"microsoft-include",
1690 .extension = true,
1691 };
1692
1693 pub const ctrl_z_eof: Diagnostic = .{
1694 .fmt = "treating Ctrl-Z as end-of-file is a Microsoft extension",
1695 .kind = .off,
1696 .opt = .@"microsoft-end-of-file",
1697 .extension = true,
1698 };
1699};
1700
1701test "addSourceFromBuffer" {
16251702 const Test = struct {
1626 fn addSourceFromReader(str: []const u8, expected: []const u8, warning_count: u32, splices: []const u32) !void {
1627 var comp = Compilation.init(std.testing.allocator, std.fs.cwd());
1703 fn addSourceFromBuffer(str: []const u8, expected: []const u8, warning_count: u32, splices: []const u32) !void {
1704 var arena: std.heap.ArenaAllocator = .init(std.testing.allocator);
1705 defer arena.deinit();
1706 var diagnostics: Diagnostics = .{ .output = .ignore };
1707 var comp = Compilation.init(std.testing.allocator, arena.allocator(), &diagnostics, std.fs.cwd());
16281708 defer comp.deinit();
16291709
1630 var buf_reader: std.Io.Reader = .fixed(str);
1631 const source = try comp.addSourceFromReader(&buf_reader, "path", .user);
1710 const source = try comp.addSourceFromBuffer("path", str);
16321711
16331712 try std.testing.expectEqualStrings(expected, source.buf);
1634 try std.testing.expectEqual(warning_count, @as(u32, @intCast(comp.diagnostics.list.items.len)));
1713 try std.testing.expectEqual(warning_count, @as(u32, @intCast(diagnostics.warnings)));
16351714 try std.testing.expectEqualSlices(u32, splices, source.splice_locs);
16361715 }
16371716
16381717 fn withAllocationFailures(allocator: std.mem.Allocator) !void {
1639 var comp = Compilation.init(allocator, std.fs.cwd());
1718 var arena: std.heap.ArenaAllocator = .init(allocator);
1719 defer arena.deinit();
1720 var diagnostics: Diagnostics = .{ .output = .ignore };
1721 var comp = Compilation.init(allocator, arena.allocator(), &diagnostics, std.fs.cwd());
16401722 defer comp.deinit();
16411723
16421724 _ = try comp.addSourceFromBuffer("path", "spliced\\\nbuffer\n");
16431725 _ = try comp.addSourceFromBuffer("path", "non-spliced buffer\n");
16441726 }
16451727 };
1646 try Test.addSourceFromReader("ab\\\nc", "abc", 0, &.{2});
1647 try Test.addSourceFromReader("ab\\\rc", "abc", 0, &.{2});
1648 try Test.addSourceFromReader("ab\\\r\nc", "abc", 0, &.{2});
1649 try Test.addSourceFromReader("ab\\ \nc", "abc", 1, &.{2});
1650 try Test.addSourceFromReader("ab\\\t\nc", "abc", 1, &.{2});
1651 try Test.addSourceFromReader("ab\\ \t\nc", "abc", 1, &.{2});
1652 try Test.addSourceFromReader("ab\\\r \nc", "ab \nc", 0, &.{2});
1653 try Test.addSourceFromReader("ab\\\\\nc", "ab\\c", 0, &.{3});
1654 try Test.addSourceFromReader("ab\\ \r\nc", "abc", 1, &.{2});
1655 try Test.addSourceFromReader("ab\\ \\\nc", "ab\\ c", 0, &.{4});
1656 try Test.addSourceFromReader("ab\\\r\\\nc", "abc", 0, &.{ 2, 2 });
1657 try Test.addSourceFromReader("ab\\ \rc", "abc", 1, &.{2});
1658 try Test.addSourceFromReader("ab\\", "ab\\", 0, &.{});
1659 try Test.addSourceFromReader("ab\\\\", "ab\\\\", 0, &.{});
1660 try Test.addSourceFromReader("ab\\ ", "ab\\ ", 0, &.{});
1661 try Test.addSourceFromReader("ab\\\n", "ab", 0, &.{2});
1662 try Test.addSourceFromReader("ab\\\r\n", "ab", 0, &.{2});
1663 try Test.addSourceFromReader("ab\\\r", "ab", 0, &.{2});
1728 try Test.addSourceFromBuffer("ab\\\nc", "abc", 0, &.{2});
1729 try Test.addSourceFromBuffer("ab\\\rc", "abc", 0, &.{2});
1730 try Test.addSourceFromBuffer("ab\\\r\nc", "abc", 0, &.{2});
1731 try Test.addSourceFromBuffer("ab\\ \nc", "abc", 1, &.{2});
1732 try Test.addSourceFromBuffer("ab\\\t\nc", "abc", 1, &.{2});
1733 try Test.addSourceFromBuffer("ab\\ \t\nc", "abc", 1, &.{2});
1734 try Test.addSourceFromBuffer("ab\\\r \nc", "ab \nc", 0, &.{2});
1735 try Test.addSourceFromBuffer("ab\\\\\nc", "ab\\c", 0, &.{3});
1736 try Test.addSourceFromBuffer("ab\\ \r\nc", "abc", 1, &.{2});
1737 try Test.addSourceFromBuffer("ab\\ \\\nc", "ab\\ c", 0, &.{4});
1738 try Test.addSourceFromBuffer("ab\\\r\\\nc", "abc", 0, &.{ 2, 2 });
1739 try Test.addSourceFromBuffer("ab\\ \rc", "abc", 1, &.{2});
1740 try Test.addSourceFromBuffer("ab\\", "ab\\", 0, &.{});
1741 try Test.addSourceFromBuffer("ab\\\\", "ab\\\\", 0, &.{});
1742 try Test.addSourceFromBuffer("ab\\ ", "ab\\ ", 0, &.{});
1743 try Test.addSourceFromBuffer("ab\\\n", "ab", 0, &.{2});
1744 try Test.addSourceFromBuffer("ab\\\r\n", "ab", 0, &.{2});
1745 try Test.addSourceFromBuffer("ab\\\r", "ab", 0, &.{2});
16641746
16651747 // carriage return normalization
1666 try Test.addSourceFromReader("ab\r", "ab\n", 0, &.{});
1667 try Test.addSourceFromReader("ab\r\r", "ab\n\n", 0, &.{});
1668 try Test.addSourceFromReader("ab\r\r\n", "ab\n\n", 0, &.{});
1669 try Test.addSourceFromReader("ab\r\r\n\r", "ab\n\n\n", 0, &.{});
1670 try Test.addSourceFromReader("\r\\", "\n\\", 0, &.{});
1671 try Test.addSourceFromReader("\\\r\\", "\\", 0, &.{0});
1748 try Test.addSourceFromBuffer("ab\r", "ab\n", 0, &.{});
1749 try Test.addSourceFromBuffer("ab\r\r", "ab\n\n", 0, &.{});
1750 try Test.addSourceFromBuffer("ab\r\r\n", "ab\n\n", 0, &.{});
1751 try Test.addSourceFromBuffer("ab\r\r\n\r", "ab\n\n\n", 0, &.{});
1752 try Test.addSourceFromBuffer("\r\\", "\n\\", 0, &.{});
1753 try Test.addSourceFromBuffer("\\\r\\", "\\", 0, &.{0});
16721754
16731755 try std.testing.checkAllAllocationFailures(std.testing.allocator, Test.withAllocationFailures, .{});
16741756}
16751757
1676test "addSourceFromReader - exhaustive check for carriage return elimination" {
1758test "addSourceFromBuffer - exhaustive check for carriage return elimination" {
1759 var arena: std.heap.ArenaAllocator = .init(std.testing.allocator);
1760 defer arena.deinit();
1761
16771762 const alphabet = [_]u8{ '\r', '\n', ' ', '\\', 'a' };
16781763 const alen = alphabet.len;
16791764 var buf: [alphabet.len]u8 = [1]u8{alphabet[0]} ** alen;
16801765
1681 var comp = Compilation.init(std.testing.allocator, std.fs.cwd());
1766 var diagnostics: Diagnostics = .{ .output = .ignore };
1767 var comp = Compilation.init(std.testing.allocator, arena.allocator(), &diagnostics, std.fs.cwd());
16821768 defer comp.deinit();
16831769
16841770 var source_count: u32 = 0;
......@@ -1703,28 +1789,31 @@ test "addSourceFromReader - exhaustive check for carriage return elimination" {
17031789
17041790test "ignore BOM at beginning of file" {
17051791 const BOM = "\xEF\xBB\xBF";
1706
17071792 const Test = struct {
1708 fn run(buf: []const u8) !void {
1709 var comp = Compilation.init(std.testing.allocator, std.fs.cwd());
1793 fn run(arena: Allocator, buf: []const u8) !void {
1794 var diagnostics: Diagnostics = .{ .output = .ignore };
1795 var comp = Compilation.init(std.testing.allocator, arena, &diagnostics, std.fs.cwd());
17101796 defer comp.deinit();
17111797
1712 var buf_reader: std.Io.Reader = .fixed(buf);
1713 const source = try comp.addSourceFromReader(&buf_reader, "file.c", .user);
1798 const source = try comp.addSourceFromBuffer("file.c", buf);
17141799 const expected_output = if (mem.startsWith(u8, buf, BOM)) buf[BOM.len..] else buf;
17151800 try std.testing.expectEqualStrings(expected_output, source.buf);
17161801 }
17171802 };
17181803
1719 try Test.run(BOM);
1720 try Test.run(BOM ++ "x");
1721 try Test.run("x" ++ BOM);
1722 try Test.run(BOM ++ " ");
1723 try Test.run(BOM ++ "\n");
1724 try Test.run(BOM ++ "\\");
1725
1726 try Test.run(BOM[0..1] ++ "x");
1727 try Test.run(BOM[0..2] ++ "x");
1728 try Test.run(BOM[1..] ++ "x");
1729 try Test.run(BOM[2..] ++ "x");
1804 var arena_state: std.heap.ArenaAllocator = .init(std.testing.allocator);
1805 defer arena_state.deinit();
1806 const arena = arena_state.allocator();
1807
1808 try Test.run(arena, BOM);
1809 try Test.run(arena, BOM ++ "x");
1810 try Test.run(arena, "x" ++ BOM);
1811 try Test.run(arena, BOM ++ " ");
1812 try Test.run(arena, BOM ++ "\n");
1813 try Test.run(arena, BOM ++ "\\");
1814
1815 try Test.run(arena, BOM[0..1] ++ "x");
1816 try Test.run(arena, BOM[0..2] ++ "x");
1817 try Test.run(arena, BOM[1..] ++ "x");
1818 try Test.run(arena, BOM[2..] ++ "x");
17301819}
lib/compiler/aro/aro/Diagnostics.zig+450-510
......@@ -1,592 +1,532 @@
11const std = @import("std");
2const assert = std.debug.assert;
3const Allocator = mem.Allocator;
42const mem = std.mem;
5const Source = @import("Source.zig");
3const Allocator = mem.Allocator;
4
65const Compilation = @import("Compilation.zig");
7const Attribute = @import("Attribute.zig");
8const Builtins = @import("Builtins.zig");
9const Builtin = Builtins.Builtin;
10const Header = @import("Builtins/Properties.zig").Header;
11const Tree = @import("Tree.zig");
12const is_windows = @import("builtin").os.tag == .windows;
136const LangOpts = @import("LangOpts.zig");
7const Source = @import("Source.zig");
148
159pub const Message = struct {
16 tag: Tag,
17 kind: Kind = undefined,
18 loc: Source.Location = .{},
19 extra: Extra = .{ .none = {} },
20
21 pub const Extra = union {
22 str: []const u8,
23 tok_id: struct {
24 expected: Tree.Token.Id,
25 actual: Tree.Token.Id,
26 },
27 tok_id_expected: Tree.Token.Id,
28 arguments: struct {
29 expected: u32,
30 actual: u32,
31 },
32 codepoints: struct {
33 actual: u21,
34 resembles: u21,
35 },
36 attr_arg_count: struct {
37 attribute: Attribute.Tag,
38 expected: u32,
39 },
40 attr_arg_type: struct {
41 expected: Attribute.ArgumentType,
42 actual: Attribute.ArgumentType,
43 },
44 attr_enum: struct {
45 tag: Attribute.Tag,
46 },
47 ignored_record_attr: struct {
48 tag: Attribute.Tag,
49 specifier: enum { @"struct", @"union", @"enum" },
50 },
51 attribute_todo: struct {
52 tag: Attribute.Tag,
53 kind: enum { variables, fields, types, functions },
54 },
55 builtin_with_header: struct {
56 builtin: Builtin.Tag,
57 header: Header,
58 },
59 invalid_escape: struct {
60 offset: u32,
61 char: u8,
62 },
63 actual_codepoint: u21,
64 ascii: u7,
65 unsigned: u64,
66 offset: u64,
67 pow_2_as_string: u8,
68 signed: i64,
69 normalized: []const u8,
70 none: void,
10 kind: Kind,
11 text: []const u8,
12
13 opt: ?Option = null,
14 extension: bool = false,
15 location: ?Source.ExpandedLocation,
16
17 effective_kind: Kind = .off,
18
19 pub const Kind = enum {
20 off,
21 note,
22 warning,
23 @"error",
24 @"fatal error",
7125 };
7226};
7327
74const Properties = struct {
75 msg: []const u8,
76 kind: Kind,
77 extra: std.meta.FieldEnum(Message.Extra) = .none,
78 opt: ?u8 = null,
79 all: bool = false,
80 w_extra: bool = false,
81 pedantic: bool = false,
82 suppress_version: ?LangOpts.Standard = null,
83 suppress_unless_version: ?LangOpts.Standard = null,
84 suppress_gnu: bool = false,
85 suppress_gcc: bool = false,
86 suppress_clang: bool = false,
87 suppress_msvc: bool = false,
88
89 pub fn makeOpt(comptime str: []const u8) u16 {
90 return @offsetOf(Options, str);
91 }
92 pub fn getKind(prop: Properties, options: *Options) Kind {
93 const opt = @as([*]Kind, @ptrCast(options))[prop.opt orelse return prop.kind];
94 if (opt == .default) return prop.kind;
95 return opt;
96 }
97 pub const max_bits = Compilation.bit_int_max_bits;
28pub const Option = enum {
29 @"unsupported-pragma",
30 @"c99-extensions",
31 @"implicit-int",
32 @"duplicate-decl-specifier",
33 @"missing-declaration",
34 @"extern-initializer",
35 @"implicit-function-declaration",
36 @"unused-value",
37 @"unreachable-code",
38 @"unknown-warning-option",
39 @"gnu-empty-struct",
40 @"gnu-alignof-expression",
41 @"macro-redefined",
42 @"generic-qual-type",
43 multichar,
44 @"pointer-integer-compare",
45 @"compare-distinct-pointer-types",
46 @"literal-conversion",
47 @"cast-qualifiers",
48 @"array-bounds",
49 @"int-conversion",
50 @"pointer-type-mismatch",
51 @"c23-extensions",
52 @"incompatible-pointer-types",
53 @"excess-initializers",
54 @"division-by-zero",
55 @"initializer-overrides",
56 @"incompatible-pointer-types-discards-qualifiers",
57 @"unknown-attributes",
58 @"ignored-attributes",
59 @"builtin-macro-redefined",
60 @"gnu-label-as-value",
61 @"malformed-warning-check",
62 @"#pragma-messages",
63 @"newline-eof",
64 @"empty-translation-unit",
65 @"implicitly-unsigned-literal",
66 @"c99-compat",
67 @"unicode-zero-width",
68 @"unicode-homoglyph",
69 unicode,
70 @"return-type",
71 @"dollar-in-identifier-extension",
72 @"unknown-pragmas",
73 @"predefined-identifier-outside-function",
74 @"many-braces-around-scalar-init",
75 uninitialized,
76 @"gnu-statement-expression",
77 @"gnu-imaginary-constant",
78 @"gnu-complex-integer",
79 @"ignored-qualifiers",
80 @"integer-overflow",
81 @"extra-semi",
82 @"gnu-binary-literal",
83 @"variadic-macros",
84 varargs,
85 @"#warnings",
86 @"deprecated-declarations",
87 @"backslash-newline-escape",
88 @"pointer-to-int-cast",
89 @"gnu-case-range",
90 @"c++-compat",
91 vla,
92 @"float-overflow-conversion",
93 @"float-zero-conversion",
94 @"float-conversion",
95 @"gnu-folding-constant",
96 undef,
97 @"ignored-pragmas",
98 @"gnu-include-next",
99 @"include-next-outside-header",
100 @"include-next-absolute-path",
101 @"enum-too-large",
102 @"fixed-enum-extension",
103 @"designated-init",
104 @"attribute-warning",
105 @"invalid-noreturn",
106 @"zero-length-array",
107 @"old-style-flexible-struct",
108 @"gnu-zero-variadic-macro-arguments",
109 @"main-return-type",
110 @"expansion-to-defined",
111 @"bit-int-extension",
112 @"keyword-macro",
113 @"pointer-arith",
114 @"sizeof-array-argument",
115 @"pre-c23-compat",
116 @"pointer-bool-conversion",
117 @"string-conversion",
118 @"gnu-auto-type",
119 @"gnu-pointer-arith",
120 @"gnu-union-cast",
121 @"pointer-sign",
122 @"fuse-ld-path",
123 @"language-extension-token",
124 @"complex-component-init",
125 @"microsoft-include",
126 @"microsoft-end-of-file",
127 @"invalid-source-encoding",
128 @"four-char-constants",
129 @"unknown-escape-sequence",
130 @"invalid-pp-token",
131 @"deprecated-non-prototype",
132 @"duplicate-embed-param",
133 @"unsupported-embed-param",
134 @"unused-result",
135 normalized,
136 @"shift-count-negative",
137 @"shift-count-overflow",
138 @"constant-conversion",
139 @"sign-conversion",
140 @"address-of-packed-member",
141 nonnull,
142 @"atomic-access",
143 @"gnu-designator",
144 @"empty-body",
145 @"nullability-extension",
146 nullability,
147 @"microsoft-flexible-array",
148 @"microsoft-anon-tag",
149 @"out-of-scope-function",
150
151 /// GNU extensions
152 pub const gnu = [_]Option{
153 .@"gnu-empty-struct",
154 .@"gnu-alignof-expression",
155 .@"gnu-label-as-value",
156 .@"gnu-statement-expression",
157 .@"gnu-imaginary-constant",
158 .@"gnu-complex-integer",
159 .@"gnu-binary-literal",
160 .@"gnu-case-range",
161 .@"gnu-folding-constant",
162 .@"gnu-include-next",
163 .@"gnu-zero-variadic-macro-arguments",
164 .@"gnu-auto-type",
165 .@"gnu-pointer-arith",
166 .@"gnu-union-cast",
167 .@"gnu-designator",
168 .@"zero-length-array",
169 };
170
171 /// Clang extensions
172 pub const clang = [_]Option{
173 .@"fixed-enum-extension",
174 .@"bit-int-extension",
175 .@"nullability-extension",
176 };
177
178 /// Microsoft extensions
179 pub const microsoft = [_]Option{
180 .@"microsoft-end-of-file",
181 .@"microsoft-include",
182 .@"microsoft-flexible-array",
183 .@"microsoft-anon-tag",
184 };
185
186 pub const extra = [_]Option{
187 .@"initializer-overrides",
188 .@"ignored-qualifiers",
189 .@"initializer-overrides",
190 .@"expansion-to-defined",
191 .@"fuse-ld-path",
192 };
193
194 pub const implicit = [_]Option{
195 .@"implicit-int",
196 .@"implicit-function-declaration",
197 };
198
199 pub const unused = [_]Option{
200 .@"unused-value",
201 .@"unused-result",
202 };
203
204 pub const most = implicit ++ unused ++ [_]Option{
205 .@"initializer-overrides",
206 .@"ignored-qualifiers",
207 .@"initializer-overrides",
208 .multichar,
209 .@"return-type",
210 .@"sizeof-array-argument",
211 .uninitialized,
212 .@"unknown-pragmas",
213 };
214
215 pub const all = most ++ [_]Option{
216 .nonnull,
217 .@"unreachable-code",
218 .@"malformed-warning-check",
219 };
98220};
99221
100pub const Tag = @import("Diagnostics/messages.zig").with(Properties).Tag;
101
102pub const Kind = enum { @"fatal error", @"error", note, warning, off, default };
103
104pub const Options = struct {
105 // do not directly use these, instead add `const NAME = true;`
106 all: Kind = .default,
107 extra: Kind = .default,
108 pedantic: Kind = .default,
109
110 @"unsupported-pragma": Kind = .default,
111 @"c99-extensions": Kind = .default,
112 @"implicit-int": Kind = .default,
113 @"duplicate-decl-specifier": Kind = .default,
114 @"missing-declaration": Kind = .default,
115 @"extern-initializer": Kind = .default,
116 @"implicit-function-declaration": Kind = .default,
117 @"unused-value": Kind = .default,
118 @"unreachable-code": Kind = .default,
119 @"unknown-warning-option": Kind = .default,
120 @"gnu-empty-struct": Kind = .default,
121 @"gnu-alignof-expression": Kind = .default,
122 @"macro-redefined": Kind = .default,
123 @"generic-qual-type": Kind = .default,
124 multichar: Kind = .default,
125 @"pointer-integer-compare": Kind = .default,
126 @"compare-distinct-pointer-types": Kind = .default,
127 @"literal-conversion": Kind = .default,
128 @"cast-qualifiers": Kind = .default,
129 @"array-bounds": Kind = .default,
130 @"int-conversion": Kind = .default,
131 @"pointer-type-mismatch": Kind = .default,
132 @"c23-extensions": Kind = .default,
133 @"incompatible-pointer-types": Kind = .default,
134 @"excess-initializers": Kind = .default,
135 @"division-by-zero": Kind = .default,
136 @"initializer-overrides": Kind = .default,
137 @"incompatible-pointer-types-discards-qualifiers": Kind = .default,
138 @"unknown-attributes": Kind = .default,
139 @"ignored-attributes": Kind = .default,
140 @"builtin-macro-redefined": Kind = .default,
141 @"gnu-label-as-value": Kind = .default,
142 @"malformed-warning-check": Kind = .default,
143 @"#pragma-messages": Kind = .default,
144 @"newline-eof": Kind = .default,
145 @"empty-translation-unit": Kind = .default,
146 @"implicitly-unsigned-literal": Kind = .default,
147 @"c99-compat": Kind = .default,
148 @"unicode-zero-width": Kind = .default,
149 @"unicode-homoglyph": Kind = .default,
150 unicode: Kind = .default,
151 @"return-type": Kind = .default,
152 @"dollar-in-identifier-extension": Kind = .default,
153 @"unknown-pragmas": Kind = .default,
154 @"predefined-identifier-outside-function": Kind = .default,
155 @"many-braces-around-scalar-init": Kind = .default,
156 uninitialized: Kind = .default,
157 @"gnu-statement-expression": Kind = .default,
158 @"gnu-imaginary-constant": Kind = .default,
159 @"gnu-complex-integer": Kind = .default,
160 @"ignored-qualifiers": Kind = .default,
161 @"integer-overflow": Kind = .default,
162 @"extra-semi": Kind = .default,
163 @"gnu-binary-literal": Kind = .default,
164 @"variadic-macros": Kind = .default,
165 varargs: Kind = .default,
166 @"#warnings": Kind = .default,
167 @"deprecated-declarations": Kind = .default,
168 @"backslash-newline-escape": Kind = .default,
169 @"pointer-to-int-cast": Kind = .default,
170 @"gnu-case-range": Kind = .default,
171 @"c++-compat": Kind = .default,
172 vla: Kind = .default,
173 @"float-overflow-conversion": Kind = .default,
174 @"float-zero-conversion": Kind = .default,
175 @"float-conversion": Kind = .default,
176 @"gnu-folding-constant": Kind = .default,
177 undef: Kind = .default,
178 @"ignored-pragmas": Kind = .default,
179 @"gnu-include-next": Kind = .default,
180 @"include-next-outside-header": Kind = .default,
181 @"include-next-absolute-path": Kind = .default,
182 @"enum-too-large": Kind = .default,
183 @"fixed-enum-extension": Kind = .default,
184 @"designated-init": Kind = .default,
185 @"attribute-warning": Kind = .default,
186 @"invalid-noreturn": Kind = .default,
187 @"zero-length-array": Kind = .default,
188 @"old-style-flexible-struct": Kind = .default,
189 @"gnu-zero-variadic-macro-arguments": Kind = .default,
190 @"main-return-type": Kind = .default,
191 @"expansion-to-defined": Kind = .default,
192 @"bit-int-extension": Kind = .default,
193 @"keyword-macro": Kind = .default,
194 @"pointer-arith": Kind = .default,
195 @"sizeof-array-argument": Kind = .default,
196 @"pre-c23-compat": Kind = .default,
197 @"pointer-bool-conversion": Kind = .default,
198 @"string-conversion": Kind = .default,
199 @"gnu-auto-type": Kind = .default,
200 @"gnu-union-cast": Kind = .default,
201 @"pointer-sign": Kind = .default,
202 @"fuse-ld-path": Kind = .default,
203 @"language-extension-token": Kind = .default,
204 @"complex-component-init": Kind = .default,
205 @"microsoft-include": Kind = .default,
206 @"microsoft-end-of-file": Kind = .default,
207 @"invalid-source-encoding": Kind = .default,
208 @"four-char-constants": Kind = .default,
209 @"unknown-escape-sequence": Kind = .default,
210 @"invalid-pp-token": Kind = .default,
211 @"deprecated-non-prototype": Kind = .default,
212 @"duplicate-embed-param": Kind = .default,
213 @"unsupported-embed-param": Kind = .default,
214 @"unused-result": Kind = .default,
215 normalized: Kind = .default,
216 @"shift-count-negative": Kind = .default,
217 @"shift-count-overflow": Kind = .default,
218 @"constant-conversion": Kind = .default,
219 @"sign-conversion": Kind = .default,
220 nonnull: Kind = .default,
222pub const State = struct {
223 // Treat all errors as fatal, set by -Wfatal-errors
224 fatal_errors: bool = false,
225 // Treat all warnings as errors, set by -Werror
226 error_warnings: bool = false,
227 /// Enable all warnings, set by -Weverything
228 enable_all_warnings: bool = false,
229 /// Ignore all warnings, set by -w
230 ignore_warnings: bool = false,
231 /// How to treat extension diagnostics, set by -Wpedantic
232 extensions: Message.Kind = .off,
233 /// How to treat individual options, set by -W<name>
234 options: std.EnumMap(Option, Message.Kind) = .{},
221235};
222236
223237const Diagnostics = @This();
224238
225list: std.ArrayListUnmanaged(Message) = .empty,
226arena: std.heap.ArenaAllocator,
227fatal_errors: bool = false,
228options: Options = .{},
239output: union(enum) {
240 to_writer: struct {
241 writer: *std.Io.Writer,
242 color: std.Io.tty.Config,
243 },
244 to_list: struct {
245 messages: std.ArrayListUnmanaged(Message) = .empty,
246 arena: std.heap.ArenaAllocator,
247 },
248 ignore,
249},
250state: State = .{},
251/// Amount of error or fatal error messages that have been sent to `output`.
229252errors: u32 = 0,
253/// Amount of warnings that have been sent to `output`.
254warnings: u32 = 0,
255// Total amount of diagnostics messages sent to `output`.
256total: u32 = 0,
230257macro_backtrace_limit: u32 = 6,
258/// If `effectiveKind` causes us to skip a diagnostic, this is temporarily set to
259/// `true` to signal that associated notes should also be skipped.
260hide_notes: bool = false,
261
262pub fn deinit(d: *Diagnostics) void {
263 switch (d.output) {
264 .ignore => {},
265 .to_writer => {},
266 .to_list => |*list| {
267 list.messages.deinit(list.arena.child_allocator);
268 list.arena.deinit();
269 },
270 }
271}
231272
273/// Used by the __has_warning builtin macro.
232274pub fn warningExists(name: []const u8) bool {
233 inline for (@typeInfo(Options).@"struct".fields) |f| {
234 if (mem.eql(u8, f.name, name)) return true;
275 if (std.mem.eql(u8, name, "pedantic")) return true;
276 inline for (comptime std.meta.declarations(Option)) |group| {
277 if (std.mem.eql(u8, name, group.name)) return true;
235278 }
236 return false;
279 return std.meta.stringToEnum(Option, name) != null;
237280}
238281
239pub fn set(d: *Diagnostics, name: []const u8, to: Kind) !void {
240 inline for (@typeInfo(Options).@"struct".fields) |f| {
241 if (mem.eql(u8, f.name, name)) {
242 @field(d.options, f.name) = to;
282pub fn set(d: *Diagnostics, name: []const u8, to: Message.Kind) Compilation.Error!void {
283 if (std.mem.eql(u8, name, "pedantic")) {
284 d.state.extensions = to;
285 return;
286 }
287 if (std.meta.stringToEnum(Option, name)) |option| {
288 d.state.options.put(option, to);
289 return;
290 }
291
292 inline for (comptime std.meta.declarations(Option)) |group| {
293 if (std.mem.eql(u8, name, group.name)) {
294 for (@field(Option, group.name)) |option| {
295 d.state.options.put(option, to);
296 }
243297 return;
244298 }
245299 }
246 try d.addExtra(.{}, .{
247 .tag = .unknown_warning,
248 .extra = .{ .str = name },
249 }, &.{}, true);
250}
251300
252pub fn init(gpa: Allocator) Diagnostics {
253 return .{
254 .arena = std.heap.ArenaAllocator.init(gpa),
255 };
301 var buf: [256]u8 = undefined;
302 const slice = std.fmt.bufPrint(&buf, "unknown warning '{s}'", .{name}) catch &buf;
303
304 try d.add(.{
305 .text = slice,
306 .kind = .warning,
307 .opt = .@"unknown-warning-option",
308 .location = null,
309 });
256310}
257311
258pub fn deinit(d: *Diagnostics) void {
259 d.list.deinit(d.arena.child_allocator);
260 d.arena.deinit();
312/// This mutates the `Diagnostics`, so may only be called when `message` is being added.
313/// If `.off` is returned, `message` will not be included, so the caller should give up.
314pub fn effectiveKind(d: *Diagnostics, message: anytype) Message.Kind {
315 if (d.hide_notes and message.kind == .note) {
316 return .off;
317 }
318
319 // -w disregards explicit kind set with -W<name>
320 if (d.state.ignore_warnings and message.kind == .warning) {
321 d.hide_notes = true;
322 return .off;
323 }
324
325 var kind = message.kind;
326
327 // Get explicit kind set by -W<name>=
328 var set_explicit = false;
329 if (message.opt) |option| {
330 if (d.state.options.get(option)) |explicit| {
331 kind = explicit;
332 set_explicit = true;
333 }
334 }
335
336 // Use extension diagnostic behavior if not set explicitly.
337 if (message.extension and !set_explicit) {
338 kind = @enumFromInt(@max(@intFromEnum(kind), @intFromEnum(d.state.extensions)));
339 }
340
341 // Make diagnostic a warning if -Weverything is set.
342 if (kind == .off and d.state.enable_all_warnings) kind = .warning;
343
344 // Upgrade warnigns to errors if -Werror is set
345 if (kind == .warning and d.state.error_warnings) kind = .@"error";
346
347 // Upgrade errors to fatal errors if -Wfatal-errors is set
348 if (kind == .@"error" and d.state.fatal_errors) kind = .@"fatal error";
349
350 if (kind == .off) d.hide_notes = true;
351 return kind;
261352}
262353
263pub fn add(comp: *Compilation, msg: Message, expansion_locs: []const Source.Location) Compilation.Error!void {
264 return comp.diagnostics.addExtra(comp.langopts, msg, expansion_locs, true);
354pub fn add(d: *Diagnostics, msg: Message) Compilation.Error!void {
355 var copy = msg;
356 copy.effective_kind = d.effectiveKind(msg);
357 if (copy.effective_kind == .off) return;
358 try d.addMessage(copy);
359 if (copy.effective_kind == .@"fatal error") return error.FatalError;
265360}
266361
267pub fn addExtra(
362pub fn addWithLocation(
268363 d: *Diagnostics,
269 langopts: LangOpts,
364 comp: *const Compilation,
270365 msg: Message,
271366 expansion_locs: []const Source.Location,
272367 note_msg_loc: bool,
273368) Compilation.Error!void {
274 const kind = d.tagKind(msg.tag, langopts);
275 if (kind == .off) return;
276369 var copy = msg;
277 copy.kind = kind;
370 copy.effective_kind = d.effectiveKind(msg);
371 if (copy.effective_kind == .off) return;
372 if (expansion_locs.len != 0) copy.location = expansion_locs[expansion_locs.len - 1].expand(comp);
373 try d.addMessage(copy);
278374
279 if (expansion_locs.len != 0) copy.loc = expansion_locs[expansion_locs.len - 1];
280 try d.list.append(d.arena.child_allocator, copy);
281375 if (expansion_locs.len != 0) {
282376 // Add macro backtrace notes in reverse order omitting from the middle if needed.
283377 var i = expansion_locs.len - 1;
284378 const half = d.macro_backtrace_limit / 2;
285379 const limit = if (i < d.macro_backtrace_limit) 0 else i - half;
286 try d.list.ensureUnusedCapacity(
287 d.arena.child_allocator,
288 if (limit == 0) expansion_locs.len else d.macro_backtrace_limit + 1,
289 );
290380 while (i > limit) {
291381 i -= 1;
292 d.list.appendAssumeCapacity(.{
293 .tag = .expanded_from_here,
382 try d.addMessage(.{
294383 .kind = .note,
295 .loc = expansion_locs[i],
384 .effective_kind = .note,
385 .text = "expanded from here",
386 .location = expansion_locs[i].expand(comp),
296387 });
297388 }
298389 if (limit != 0) {
299 d.list.appendAssumeCapacity(.{
300 .tag = .skipping_macro_backtrace,
390 var buf: [256]u8 = undefined;
391 try d.addMessage(.{
301392 .kind = .note,
302 .extra = .{ .unsigned = expansion_locs.len - d.macro_backtrace_limit },
393 .effective_kind = .note,
394 .text = std.fmt.bufPrint(
395 &buf,
396 "(skipping {d} expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)",
397 .{expansion_locs.len - d.macro_backtrace_limit},
398 ) catch unreachable,
399 .location = null,
303400 });
304401 i = half -| 1;
305402 while (i > 0) {
306403 i -= 1;
307 d.list.appendAssumeCapacity(.{
308 .tag = .expanded_from_here,
404 try d.addMessage(.{
309405 .kind = .note,
310 .loc = expansion_locs[i],
406 .effective_kind = .note,
407 .text = "expanded from here",
408 .location = expansion_locs[i].expand(comp),
311409 });
312410 }
313411 }
314412
315 if (note_msg_loc) d.list.appendAssumeCapacity(.{
316 .tag = .expanded_from_here,
317 .kind = .note,
318 .loc = msg.loc,
319 });
320 }
321 if (kind == .@"fatal error" or (kind == .@"error" and d.fatal_errors))
322 return error.FatalError;
323}
324
325pub fn render(comp: *Compilation, config: std.Io.tty.Config) void {
326 if (comp.diagnostics.list.items.len == 0) return;
327 var buffer: [1000]u8 = undefined;
328 var m = defaultMsgWriter(config, &buffer);
329 defer m.deinit();
330 renderMessages(comp, &m);
331}
332pub fn defaultMsgWriter(config: std.Io.tty.Config, buffer: []u8) MsgWriter {
333 return MsgWriter.init(config, buffer);
334}
335
336pub fn renderMessages(comp: *Compilation, m: anytype) void {
337 var errors: u32 = 0;
338 var warnings: u32 = 0;
339 for (comp.diagnostics.list.items) |msg| {
340 switch (msg.kind) {
341 .@"fatal error", .@"error" => errors += 1,
342 .warning => warnings += 1,
343 .note => {},
344 .off => continue, // happens if an error is added before it is disabled
345 .default => unreachable,
346 }
347 renderMessage(comp, m, msg);
348 }
349 const w_s: []const u8 = if (warnings == 1) "" else "s";
350 const e_s: []const u8 = if (errors == 1) "" else "s";
351 if (errors != 0 and warnings != 0) {
352 m.print("{d} warning{s} and {d} error{s} generated.\n", .{ warnings, w_s, errors, e_s });
353 } else if (warnings != 0) {
354 m.print("{d} warning{s} generated.\n", .{ warnings, w_s });
355 } else if (errors != 0) {
356 m.print("{d} error{s} generated.\n", .{ errors, e_s });
357 }
358
359 comp.diagnostics.list.items.len = 0;
360 comp.diagnostics.errors += errors;
361}
362
363pub fn renderMessage(comp: *Compilation, m: anytype, msg: Message) void {
364 var line: ?[]const u8 = null;
365 var end_with_splice = false;
366 const width = if (msg.loc.id != .unused) blk: {
367 var loc = msg.loc;
368 switch (msg.tag) {
369 .escape_sequence_overflow,
370 .invalid_universal_character,
371 => loc.byte_offset += @truncate(msg.extra.offset),
372 .non_standard_escape_char,
373 .unknown_escape_sequence,
374 => loc.byte_offset += msg.extra.invalid_escape.offset,
375 else => {},
376 }
377 const source = comp.getSource(loc.id);
378 var line_col = source.lineCol(loc);
379 line = line_col.line;
380 end_with_splice = line_col.end_with_splice;
381 if (msg.tag == .backslash_newline_escape) {
382 line = line_col.line[0 .. line_col.col - 1];
383 line_col.col += 1;
384 line_col.width += 1;
385 }
386 m.location(source.path, line_col.line_no, line_col.col);
387 break :blk line_col.width;
388 } else 0;
389
390 m.start(msg.kind);
391 const prop = msg.tag.property();
392 switch (prop.extra) {
393 .str => printRt(m, prop.msg, .{"{s}"}, .{msg.extra.str}),
394 .tok_id => printRt(m, prop.msg, .{ "{s}", "{s}" }, .{
395 msg.extra.tok_id.expected.symbol(),
396 msg.extra.tok_id.actual.symbol(),
397 }),
398 .tok_id_expected => printRt(m, prop.msg, .{"{s}"}, .{msg.extra.tok_id_expected.symbol()}),
399 .arguments => printRt(m, prop.msg, .{ "{d}", "{d}" }, .{
400 msg.extra.arguments.expected,
401 msg.extra.arguments.actual,
402 }),
403 .codepoints => printRt(m, prop.msg, .{ "{X:0>4}", "{u}" }, .{
404 msg.extra.codepoints.actual,
405 msg.extra.codepoints.resembles,
406 }),
407 .attr_arg_count => printRt(m, prop.msg, .{ "{s}", "{d}" }, .{
408 @tagName(msg.extra.attr_arg_count.attribute),
409 msg.extra.attr_arg_count.expected,
410 }),
411 .attr_arg_type => printRt(m, prop.msg, .{ "{s}", "{s}" }, .{
412 msg.extra.attr_arg_type.expected.toString(),
413 msg.extra.attr_arg_type.actual.toString(),
414 }),
415 .actual_codepoint => printRt(m, prop.msg, .{"{X:0>4}"}, .{msg.extra.actual_codepoint}),
416 .ascii => printRt(m, prop.msg, .{"{c}"}, .{msg.extra.ascii}),
417 .unsigned => printRt(m, prop.msg, .{"{d}"}, .{msg.extra.unsigned}),
418 .pow_2_as_string => printRt(m, prop.msg, .{"{s}"}, .{switch (msg.extra.pow_2_as_string) {
419 63 => "9223372036854775808",
420 64 => "18446744073709551616",
421 127 => "170141183460469231731687303715884105728",
422 128 => "340282366920938463463374607431768211456",
423 else => unreachable,
424 }}),
425 .signed => printRt(m, prop.msg, .{"{d}"}, .{msg.extra.signed}),
426 .attr_enum => printRt(m, prop.msg, .{ "{s}", "{s}" }, .{
427 @tagName(msg.extra.attr_enum.tag),
428 Attribute.Formatting.choices(msg.extra.attr_enum.tag),
429 }),
430 .ignored_record_attr => printRt(m, prop.msg, .{ "{s}", "{s}" }, .{
431 @tagName(msg.extra.ignored_record_attr.tag),
432 @tagName(msg.extra.ignored_record_attr.specifier),
433 }),
434 .attribute_todo => printRt(m, prop.msg, .{ "{s}", "{s}" }, .{
435 @tagName(msg.extra.attribute_todo.tag),
436 @tagName(msg.extra.attribute_todo.kind),
437 }),
438 .builtin_with_header => printRt(m, prop.msg, .{ "{s}", "{s}" }, .{
439 @tagName(msg.extra.builtin_with_header.header),
440 Builtin.nameFromTag(msg.extra.builtin_with_header.builtin).span(),
441 }),
442 .invalid_escape => {
443 if (std.ascii.isPrint(msg.extra.invalid_escape.char)) {
444 const str: [1]u8 = .{msg.extra.invalid_escape.char};
445 printRt(m, prop.msg, .{"{s}"}, .{&str});
446 } else {
447 var buf: [3]u8 = undefined;
448 const str = std.fmt.bufPrint(&buf, "x{x}", .{msg.extra.invalid_escape.char}) catch unreachable;
449 printRt(m, prop.msg, .{"{s}"}, .{str});
450 }
451 },
452 .normalized => {
453 const f = struct {
454 pub fn f(bytes: []const u8, writer: *std.Io.Writer) std.Io.Writer.Error!void {
455 var it: std.unicode.Utf8Iterator = .{
456 .bytes = bytes,
457 .i = 0,
458 };
459 while (it.nextCodepoint()) |codepoint| {
460 if (codepoint < 0x7F) {
461 try writer.writeByte(@intCast(codepoint));
462 } else if (codepoint < 0xFFFF) {
463 try writer.writeAll("\\u");
464 try writer.printInt(codepoint, 16, .upper, .{ .fill = '0', .width = 4 });
465 } else {
466 try writer.writeAll("\\U");
467 try writer.printInt(codepoint, 16, .upper, .{ .fill = '0', .width = 8 });
468 }
469 }
470 }
471 }.f;
472 printRt(m, prop.msg, .{"{f}"}, .{
473 std.fmt.Alt([]const u8, f){ .data = msg.extra.normalized },
413 if (note_msg_loc) {
414 try d.addMessage(.{
415 .kind = .note,
416 .effective_kind = .note,
417 .text = "expanded from here",
418 .location = msg.location.?,
474419 });
475 },
476 .none, .offset => m.write(prop.msg),
477 }
478
479 if (prop.opt) |some| {
480 if (msg.kind == .@"error" and prop.kind != .@"error") {
481 m.print(" [-Werror,-W{s}]", .{optName(some)});
482 } else if (msg.kind != .note) {
483 m.print(" [-W{s}]", .{optName(some)});
484420 }
485421 }
486
487 m.end(line, width, end_with_splice);
422 if (copy.kind == .@"fatal error") return error.FatalError;
488423}
489424
490fn printRt(m: anytype, str: []const u8, comptime fmts: anytype, args: anytype) void {
425pub fn formatArgs(w: *std.Io.Writer, fmt: []const u8, args: anytype) std.Io.Writer.Error!void {
491426 var i: usize = 0;
492 inline for (fmts, args) |fmt, arg| {
493 const new = std.mem.indexOfPos(u8, str, i, fmt).?;
494 m.write(str[i..new]);
495 i = new + fmt.len;
496 m.print(fmt, .{arg});
427 inline for (std.meta.fields(@TypeOf(args))) |arg_info| {
428 const arg = @field(args, arg_info.name);
429 i += switch (@TypeOf(arg)) {
430 []const u8 => try formatString(w, fmt[i..], arg),
431 else => switch (@typeInfo(@TypeOf(arg))) {
432 .int, .comptime_int => try Diagnostics.formatInt(w, fmt[i..], arg),
433 .pointer => try Diagnostics.formatString(w, fmt[i..], arg),
434 else => unreachable,
435 },
436 };
497437 }
498 m.write(str[i..]);
438 try w.writeAll(fmt[i..]);
499439}
500440
501fn optName(offset: u16) []const u8 {
502 return std.meta.fieldNames(Options)[offset / @sizeOf(Kind)];
441pub fn formatString(w: *std.Io.Writer, fmt: []const u8, str: []const u8) std.Io.Writer.Error!usize {
442 const template = "{s}";
443 const i = std.mem.indexOf(u8, fmt, template).?;
444 try w.writeAll(fmt[0..i]);
445 try w.writeAll(str);
446 return i + template.len;
503447}
504448
505fn tagKind(d: *Diagnostics, tag: Tag, langopts: LangOpts) Kind {
506 const prop = tag.property();
507 var kind = prop.getKind(&d.options);
508
509 if (prop.all) {
510 if (d.options.all != .default) kind = d.options.all;
511 }
512 if (prop.w_extra) {
513 if (d.options.extra != .default) kind = d.options.extra;
514 }
515 if (prop.pedantic) {
516 if (d.options.pedantic != .default) kind = d.options.pedantic;
517 }
518 if (prop.suppress_version) |some| if (langopts.standard.atLeast(some)) return .off;
519 if (prop.suppress_unless_version) |some| if (!langopts.standard.atLeast(some)) return .off;
520 if (prop.suppress_gnu and langopts.standard.isExplicitGNU()) return .off;
521 if (prop.suppress_gcc and langopts.emulate == .gcc) return .off;
522 if (prop.suppress_clang and langopts.emulate == .clang) return .off;
523 if (prop.suppress_msvc and langopts.emulate == .msvc) return .off;
524 if (kind == .@"error" and d.fatal_errors) kind = .@"fatal error";
525 return kind;
449pub fn formatInt(w: *std.Io.Writer, fmt: []const u8, int: anytype) std.Io.Writer.Error!usize {
450 const template = "{d}";
451 const i = std.mem.indexOf(u8, fmt, template).?;
452 try w.writeAll(fmt[0..i]);
453 try w.printInt(int, 10, .lower, .{});
454 return i + template.len;
526455}
527456
528const MsgWriter = struct {
529 writer: *std.Io.Writer,
530 config: std.Io.tty.Config,
531
532 fn init(config: std.Io.tty.Config, buffer: []u8) MsgWriter {
533 return .{
534 .writer = std.debug.lockStderrWriter(buffer),
535 .config = config,
536 };
457fn addMessage(d: *Diagnostics, msg: Message) Compilation.Error!void {
458 std.debug.assert(msg.effective_kind != .off);
459 switch (msg.effective_kind) {
460 .off => unreachable,
461 .@"error", .@"fatal error" => d.errors += 1,
462 .warning => d.warnings += 1,
463 .note => {},
537464 }
538
539 pub fn deinit(m: *MsgWriter) void {
540 std.debug.unlockStderrWriter();
541 m.* = undefined;
542 }
543
544 pub fn print(m: *MsgWriter, comptime fmt: []const u8, args: anytype) void {
545 m.writer.print(fmt, args) catch {};
546 }
547
548 fn write(m: *MsgWriter, msg: []const u8) void {
549 m.writer.writeAll(msg) catch {};
465 d.total += 1;
466 d.hide_notes = false;
467
468 switch (d.output) {
469 .ignore => {},
470 .to_writer => |writer| {
471 writeToWriter(msg, writer.writer, writer.color) catch {
472 return error.FatalError;
473 };
474 },
475 .to_list => |*list| {
476 const arena = list.arena.allocator();
477 try list.messages.append(list.arena.child_allocator, .{
478 .kind = msg.kind,
479 .effective_kind = msg.effective_kind,
480 .text = try arena.dupe(u8, msg.text),
481 .opt = msg.opt,
482 .extension = msg.extension,
483 .location = msg.location,
484 });
485 },
550486 }
487}
551488
552 fn setColor(m: *MsgWriter, color: std.Io.tty.Color) void {
553 m.config.setColor(m.writer, color) catch {};
489pub fn writeToWriter(msg: Message, w: *std.Io.Writer, config: std.Io.tty.Config) !void {
490 try config.setColor(w, .bold);
491 if (msg.location) |loc| {
492 try w.print("{s}:{d}:{d}: ", .{ loc.path, loc.line_no, loc.col });
554493 }
555
556 fn location(m: *MsgWriter, path: []const u8, line: u32, col: u32) void {
557 m.setColor(.bold);
558 m.print("{s}:{d}:{d}: ", .{ path, line, col });
494 switch (msg.effective_kind) {
495 .@"fatal error", .@"error" => try config.setColor(w, .bright_red),
496 .note => try config.setColor(w, .bright_cyan),
497 .warning => try config.setColor(w, .bright_magenta),
498 .off => unreachable,
559499 }
560
561 fn start(m: *MsgWriter, kind: Kind) void {
562 switch (kind) {
563 .@"fatal error", .@"error" => m.setColor(.bright_red),
564 .note => m.setColor(.bright_cyan),
565 .warning => m.setColor(.bright_magenta),
566 .off, .default => unreachable,
500 try w.print("{s}: ", .{@tagName(msg.effective_kind)});
501
502 try config.setColor(w, .white);
503 try w.writeAll(msg.text);
504 if (msg.opt) |some| {
505 if (msg.effective_kind == .@"error" and msg.kind != .@"error") {
506 try w.print(" [-Werror,-W{s}]", .{@tagName(some)});
507 } else if (msg.effective_kind != .note) {
508 try w.print(" [-W{s}]", .{@tagName(some)});
509 }
510 } else if (msg.extension) {
511 if (msg.effective_kind == .@"error") {
512 try w.writeAll(" [-Werror,-Wpedantic]");
513 } else if (msg.effective_kind != msg.kind) {
514 try w.writeAll(" [-Wpedantic]");
567515 }
568 m.write(switch (kind) {
569 .@"fatal error" => "fatal error: ",
570 .@"error" => "error: ",
571 .note => "note: ",
572 .warning => "warning: ",
573 .off, .default => unreachable,
574 });
575 m.setColor(.white);
576516 }
577517
578 fn end(m: *MsgWriter, maybe_line: ?[]const u8, col: u32, end_with_splice: bool) void {
579 const line = maybe_line orelse {
580 m.write("\n");
581 m.setColor(.reset);
582 return;
583 };
584 const trailer = if (end_with_splice) "\\ " else "";
585 m.setColor(.reset);
586 m.print("\n{s}{s}\n{s: >[3]}", .{ line, trailer, "", col });
587 m.setColor(.bold);
588 m.setColor(.bright_green);
589 m.write("^\n");
590 m.setColor(.reset);
518 if (msg.location) |loc| {
519 const trailer = if (loc.end_with_splice) "\\ " else "";
520 try config.setColor(w, .reset);
521 try w.print("\n{s}{s}\n", .{ loc.line, trailer });
522 try w.splatByteAll(' ', loc.width);
523 try config.setColor(w, .bold);
524 try config.setColor(w, .bright_green);
525 try w.writeAll("^\n");
526 try config.setColor(w, .reset);
527 } else {
528 try w.writeAll("\n");
529 try config.setColor(w, .reset);
591530 }
592};
531 try w.flush();
532}
lib/compiler/aro/aro/Diagnostics/messages.zig deleted-1041
......@@ -1,1041 +0,0 @@
1//! Autogenerated by GenerateDef from src/aro/Diagnostics/messages.def, do not edit
2// zig fmt: off
3
4const std = @import("std");
5
6pub fn with(comptime Properties: type) type {
7return struct {
8const W = Properties.makeOpt;
9const pointer_sign_message = " converts between pointers to integer types with different sign";
10const expected_arguments = "expected {d} argument(s) got {d}";
11pub const Tag = enum {
12 todo,
13 error_directive,
14 warning_directive,
15 elif_without_if,
16 elif_after_else,
17 elifdef_without_if,
18 elifdef_after_else,
19 elifndef_without_if,
20 elifndef_after_else,
21 else_without_if,
22 else_after_else,
23 endif_without_if,
24 unknown_pragma,
25 line_simple_digit,
26 line_invalid_filename,
27 unterminated_conditional_directive,
28 invalid_preprocessing_directive,
29 macro_name_missing,
30 extra_tokens_directive_end,
31 expected_value_in_expr,
32 closing_paren,
33 to_match_paren,
34 to_match_brace,
35 to_match_bracket,
36 header_str_closing,
37 header_str_match,
38 string_literal_in_pp_expr,
39 float_literal_in_pp_expr,
40 defined_as_macro_name,
41 macro_name_must_be_identifier,
42 whitespace_after_macro_name,
43 hash_hash_at_start,
44 hash_hash_at_end,
45 pasting_formed_invalid,
46 missing_paren_param_list,
47 unterminated_macro_param_list,
48 invalid_token_param_list,
49 expected_comma_param_list,
50 hash_not_followed_param,
51 expected_filename,
52 empty_filename,
53 expected_invalid,
54 expected_eof,
55 expected_token,
56 expected_expr,
57 expected_integer_constant_expr,
58 missing_type_specifier,
59 missing_type_specifier_c23,
60 multiple_storage_class,
61 static_assert_failure,
62 static_assert_failure_message,
63 expected_type,
64 cannot_combine_spec,
65 duplicate_decl_spec,
66 restrict_non_pointer,
67 expected_external_decl,
68 expected_ident_or_l_paren,
69 missing_declaration,
70 func_not_in_root,
71 illegal_initializer,
72 extern_initializer,
73 spec_from_typedef,
74 param_before_var_args,
75 void_only_param,
76 void_param_qualified,
77 void_must_be_first_param,
78 invalid_storage_on_param,
79 threadlocal_non_var,
80 func_spec_non_func,
81 illegal_storage_on_func,
82 illegal_storage_on_global,
83 expected_stmt,
84 func_cannot_return_func,
85 func_cannot_return_array,
86 undeclared_identifier,
87 not_callable,
88 unsupported_str_cat,
89 static_func_not_global,
90 implicit_func_decl,
91 unknown_builtin,
92 implicit_builtin,
93 implicit_builtin_header_note,
94 expected_param_decl,
95 invalid_old_style_params,
96 expected_fn_body,
97 invalid_void_param,
98 unused_value,
99 continue_not_in_loop,
100 break_not_in_loop_or_switch,
101 unreachable_code,
102 duplicate_label,
103 previous_label,
104 undeclared_label,
105 case_not_in_switch,
106 duplicate_switch_case,
107 multiple_default,
108 previous_case,
109 expected_arguments,
110 callee_with_static_array,
111 array_argument_too_small,
112 non_null_argument,
113 expected_arguments_old,
114 expected_at_least_arguments,
115 invalid_static_star,
116 static_non_param,
117 array_qualifiers,
118 star_non_param,
119 variable_len_array_file_scope,
120 useless_static,
121 negative_array_size,
122 array_incomplete_elem,
123 array_func_elem,
124 static_non_outermost_array,
125 qualifier_non_outermost_array,
126 unterminated_macro_arg_list,
127 unknown_warning,
128 overflow,
129 int_literal_too_big,
130 indirection_ptr,
131 addr_of_rvalue,
132 addr_of_bitfield,
133 not_assignable,
134 ident_or_l_brace,
135 empty_enum,
136 redefinition,
137 previous_definition,
138 expected_identifier,
139 expected_str_literal,
140 expected_str_literal_in,
141 parameter_missing,
142 empty_record,
143 empty_record_size,
144 wrong_tag,
145 expected_parens_around_typename,
146 alignof_expr,
147 invalid_alignof,
148 invalid_sizeof,
149 macro_redefined,
150 generic_qual_type,
151 generic_array_type,
152 generic_func_type,
153 generic_duplicate,
154 generic_duplicate_here,
155 generic_duplicate_default,
156 generic_no_match,
157 escape_sequence_overflow,
158 invalid_universal_character,
159 incomplete_universal_character,
160 multichar_literal_warning,
161 invalid_multichar_literal,
162 wide_multichar_literal,
163 char_lit_too_wide,
164 char_too_large,
165 must_use_struct,
166 must_use_union,
167 must_use_enum,
168 redefinition_different_sym,
169 redefinition_incompatible,
170 redefinition_of_parameter,
171 invalid_bin_types,
172 comparison_ptr_int,
173 comparison_distinct_ptr,
174 incompatible_pointers,
175 invalid_argument_un,
176 incompatible_assign,
177 implicit_ptr_to_int,
178 invalid_cast_to_float,
179 invalid_cast_to_pointer,
180 invalid_cast_type,
181 qual_cast,
182 invalid_index,
183 invalid_subscript,
184 array_after,
185 array_before,
186 statement_int,
187 statement_scalar,
188 func_should_return,
189 incompatible_return,
190 incompatible_return_sign,
191 implicit_int_to_ptr,
192 func_does_not_return,
193 void_func_returns_value,
194 incompatible_arg,
195 incompatible_ptr_arg,
196 incompatible_ptr_arg_sign,
197 parameter_here,
198 atomic_array,
199 atomic_func,
200 atomic_incomplete,
201 addr_of_register,
202 variable_incomplete_ty,
203 parameter_incomplete_ty,
204 tentative_array,
205 deref_incomplete_ty_ptr,
206 alignas_on_func,
207 alignas_on_param,
208 minimum_alignment,
209 maximum_alignment,
210 negative_alignment,
211 align_ignored,
212 zero_align_ignored,
213 non_pow2_align,
214 pointer_mismatch,
215 static_assert_not_constant,
216 static_assert_missing_message,
217 pre_c23_compat,
218 unbound_vla,
219 array_too_large,
220 record_too_large,
221 incompatible_ptr_init,
222 incompatible_ptr_init_sign,
223 incompatible_ptr_assign,
224 incompatible_ptr_assign_sign,
225 vla_init,
226 func_init,
227 incompatible_init,
228 empty_scalar_init,
229 excess_scalar_init,
230 excess_str_init,
231 excess_struct_init,
232 excess_array_init,
233 str_init_too_long,
234 arr_init_too_long,
235 invalid_typeof,
236 division_by_zero,
237 division_by_zero_macro,
238 builtin_choose_cond,
239 alignas_unavailable,
240 case_val_unavailable,
241 enum_val_unavailable,
242 incompatible_array_init,
243 array_init_str,
244 initializer_overrides,
245 previous_initializer,
246 invalid_array_designator,
247 negative_array_designator,
248 oob_array_designator,
249 invalid_field_designator,
250 no_such_field_designator,
251 empty_aggregate_init_braces,
252 ptr_init_discards_quals,
253 ptr_assign_discards_quals,
254 ptr_ret_discards_quals,
255 ptr_arg_discards_quals,
256 unknown_attribute,
257 ignored_attribute,
258 invalid_fallthrough,
259 cannot_apply_attribute_to_statement,
260 builtin_macro_redefined,
261 feature_check_requires_identifier,
262 missing_tok_builtin,
263 gnu_label_as_value,
264 expected_record_ty,
265 member_expr_not_ptr,
266 member_expr_ptr,
267 no_such_member,
268 malformed_warning_check,
269 invalid_computed_goto,
270 pragma_warning_message,
271 pragma_error_message,
272 pragma_message,
273 pragma_requires_string_literal,
274 poisoned_identifier,
275 pragma_poison_identifier,
276 pragma_poison_macro,
277 newline_eof,
278 empty_translation_unit,
279 omitting_parameter_name,
280 non_int_bitfield,
281 negative_bitwidth,
282 zero_width_named_field,
283 bitfield_too_big,
284 invalid_utf8,
285 implicitly_unsigned_literal,
286 invalid_preproc_operator,
287 invalid_preproc_expr_start,
288 c99_compat,
289 unexpected_character,
290 invalid_identifier_start_char,
291 unicode_zero_width,
292 unicode_homoglyph,
293 meaningless_asm_qual,
294 duplicate_asm_qual,
295 invalid_asm_str,
296 dollar_in_identifier_extension,
297 dollars_in_identifiers,
298 expanded_from_here,
299 skipping_macro_backtrace,
300 pragma_operator_string_literal,
301 unknown_gcc_pragma,
302 unknown_gcc_pragma_directive,
303 predefined_top_level,
304 incompatible_va_arg,
305 too_many_scalar_init_braces,
306 uninitialized_in_own_init,
307 gnu_statement_expression,
308 stmt_expr_not_allowed_file_scope,
309 gnu_imaginary_constant,
310 plain_complex,
311 complex_int,
312 qual_on_ret_type,
313 cli_invalid_standard,
314 cli_invalid_target,
315 cli_invalid_emulate,
316 cli_unknown_arg,
317 cli_error,
318 cli_unused_link_object,
319 cli_unknown_linker,
320 extra_semi,
321 func_field,
322 vla_field,
323 field_incomplete_ty,
324 flexible_in_union,
325 flexible_non_final,
326 flexible_in_empty,
327 duplicate_member,
328 binary_integer_literal,
329 gnu_va_macro,
330 builtin_must_be_called,
331 va_start_not_in_func,
332 va_start_fixed_args,
333 va_start_not_last_param,
334 attribute_not_enough_args,
335 attribute_too_many_args,
336 attribute_arg_invalid,
337 unknown_attr_enum,
338 attribute_requires_identifier,
339 declspec_not_enabled,
340 declspec_attr_not_supported,
341 deprecated_declarations,
342 deprecated_note,
343 unavailable,
344 unavailable_note,
345 warning_attribute,
346 error_attribute,
347 ignored_record_attr,
348 backslash_newline_escape,
349 array_size_non_int,
350 cast_to_smaller_int,
351 gnu_switch_range,
352 empty_case_range,
353 non_standard_escape_char,
354 invalid_pp_stringify_escape,
355 vla,
356 int_value_changed,
357 sign_conversion,
358 float_overflow_conversion,
359 float_out_of_range,
360 float_zero_conversion,
361 float_value_changed,
362 float_to_int,
363 const_decl_folded,
364 const_decl_folded_vla,
365 redefinition_of_typedef,
366 undefined_macro,
367 fn_macro_undefined,
368 preprocessing_directive_only,
369 missing_lparen_after_builtin,
370 offsetof_ty,
371 offsetof_incomplete,
372 offsetof_array,
373 pragma_pack_lparen,
374 pragma_pack_rparen,
375 pragma_pack_unknown_action,
376 pragma_pack_show,
377 pragma_pack_int,
378 pragma_pack_int_ident,
379 pragma_pack_undefined_pop,
380 pragma_pack_empty_stack,
381 cond_expr_type,
382 too_many_includes,
383 enumerator_too_small,
384 enumerator_too_large,
385 include_next,
386 include_next_outside_header,
387 enumerator_overflow,
388 enum_not_representable,
389 enum_too_large,
390 enum_fixed,
391 enum_prev_nonfixed,
392 enum_prev_fixed,
393 enum_different_explicit_ty,
394 enum_not_representable_fixed,
395 transparent_union_wrong_type,
396 transparent_union_one_field,
397 transparent_union_size,
398 transparent_union_size_note,
399 designated_init_invalid,
400 designated_init_needed,
401 ignore_common,
402 ignore_nocommon,
403 non_string_ignored,
404 local_variable_attribute,
405 ignore_cold,
406 ignore_hot,
407 ignore_noinline,
408 ignore_always_inline,
409 invalid_noreturn,
410 nodiscard_unused,
411 warn_unused_result,
412 invalid_vec_elem_ty,
413 vec_size_not_multiple,
414 invalid_imag,
415 invalid_real,
416 zero_length_array,
417 old_style_flexible_struct,
418 comma_deletion_va_args,
419 main_return_type,
420 expansion_to_defined,
421 invalid_int_suffix,
422 invalid_float_suffix,
423 invalid_octal_digit,
424 invalid_binary_digit,
425 exponent_has_no_digits,
426 hex_floating_constant_requires_exponent,
427 sizeof_returns_zero,
428 declspec_not_allowed_after_declarator,
429 declarator_name_tok,
430 type_not_supported_on_target,
431 bit_int,
432 unsigned_bit_int_too_small,
433 signed_bit_int_too_small,
434 unsigned_bit_int_too_big,
435 signed_bit_int_too_big,
436 keyword_macro,
437 ptr_arithmetic_incomplete,
438 callconv_not_supported,
439 pointer_arith_void,
440 sizeof_array_arg,
441 array_address_to_bool,
442 string_literal_to_bool,
443 constant_expression_conversion_not_allowed,
444 invalid_object_cast,
445 cli_invalid_fp_eval_method,
446 suggest_pointer_for_invalid_fp16,
447 bitint_suffix,
448 auto_type_extension,
449 auto_type_not_allowed,
450 auto_type_requires_initializer,
451 auto_type_requires_single_declarator,
452 auto_type_requires_plain_declarator,
453 invalid_cast_to_auto_type,
454 auto_type_from_bitfield,
455 array_of_auto_type,
456 auto_type_with_init_list,
457 missing_semicolon,
458 tentative_definition_incomplete,
459 forward_declaration_here,
460 gnu_union_cast,
461 invalid_union_cast,
462 cast_to_incomplete_type,
463 invalid_source_epoch,
464 fuse_ld_path,
465 invalid_rtlib,
466 unsupported_rtlib_gcc,
467 invalid_unwindlib,
468 incompatible_unwindlib,
469 gnu_asm_disabled,
470 extension_token_used,
471 complex_component_init,
472 complex_prefix_postfix_op,
473 not_floating_type,
474 argument_types_differ,
475 ms_search_rule,
476 ctrl_z_eof,
477 illegal_char_encoding_warning,
478 illegal_char_encoding_error,
479 ucn_basic_char_error,
480 ucn_basic_char_warning,
481 ucn_control_char_error,
482 ucn_control_char_warning,
483 c89_ucn_in_literal,
484 four_char_char_literal,
485 multi_char_char_literal,
486 missing_hex_escape,
487 unknown_escape_sequence,
488 attribute_requires_string,
489 unterminated_string_literal_warning,
490 unterminated_string_literal_error,
491 empty_char_literal_warning,
492 empty_char_literal_error,
493 unterminated_char_literal_warning,
494 unterminated_char_literal_error,
495 unterminated_comment,
496 def_no_proto_deprecated,
497 passing_args_to_kr,
498 unknown_type_name,
499 label_compound_end,
500 u8_char_lit,
501 malformed_embed_param,
502 malformed_embed_limit,
503 duplicate_embed_param,
504 unsupported_embed_param,
505 invalid_compound_literal_storage_class,
506 va_opt_lparen,
507 va_opt_rparen,
508 attribute_int_out_of_range,
509 identifier_not_normalized,
510 c23_auto_plain_declarator,
511 c23_auto_single_declarator,
512 c32_auto_requires_initializer,
513 c23_auto_scalar_init,
514 negative_shift_count,
515 too_big_shift_count,
516 complex_conj,
517 overflow_builtin_requires_int,
518 overflow_result_requires_ptr,
519 attribute_todo,
520 invalid_type_underlying_enum,
521 auto_type_self_initialized,
522
523 pub fn property(tag: Tag) Properties {
524 return named_data[@intFromEnum(tag)];
525 }
526
527 const named_data = [_]Properties{
528 .{ .msg = "TODO: {s}", .extra = .str, .kind = .@"error" },
529 .{ .msg = "{s}", .extra = .str, .kind = .@"error" },
530 .{ .msg = "{s}", .opt = W("#warnings"), .extra = .str, .kind = .warning },
531 .{ .msg = "#elif without #if", .kind = .@"error" },
532 .{ .msg = "#elif after #else", .kind = .@"error" },
533 .{ .msg = "#elifdef without #if", .kind = .@"error" },
534 .{ .msg = "#elifdef after #else", .kind = .@"error" },
535 .{ .msg = "#elifndef without #if", .kind = .@"error" },
536 .{ .msg = "#elifndef after #else", .kind = .@"error" },
537 .{ .msg = "#else without #if", .kind = .@"error" },
538 .{ .msg = "#else after #else", .kind = .@"error" },
539 .{ .msg = "#endif without #if", .kind = .@"error" },
540 .{ .msg = "unknown pragma ignored", .opt = W("unknown-pragmas"), .kind = .off, .all = true },
541 .{ .msg = "#line directive requires a simple digit sequence", .kind = .@"error" },
542 .{ .msg = "invalid filename for #line directive", .kind = .@"error" },
543 .{ .msg = "unterminated conditional directive", .kind = .@"error" },
544 .{ .msg = "invalid preprocessing directive", .kind = .@"error" },
545 .{ .msg = "macro name missing", .kind = .@"error" },
546 .{ .msg = "extra tokens at end of macro directive", .kind = .@"error" },
547 .{ .msg = "expected value in expression", .kind = .@"error" },
548 .{ .msg = "expected closing ')'", .kind = .@"error" },
549 .{ .msg = "to match this '('", .kind = .note },
550 .{ .msg = "to match this '{'", .kind = .note },
551 .{ .msg = "to match this '['", .kind = .note },
552 .{ .msg = "expected closing '>'", .kind = .@"error" },
553 .{ .msg = "to match this '<'", .kind = .note },
554 .{ .msg = "string literal in preprocessor expression", .kind = .@"error" },
555 .{ .msg = "floating point literal in preprocessor expression", .kind = .@"error" },
556 .{ .msg = "'defined' cannot be used as a macro name", .kind = .@"error" },
557 .{ .msg = "macro name must be an identifier", .kind = .@"error" },
558 .{ .msg = "ISO C99 requires whitespace after the macro name", .opt = W("c99-extensions"), .kind = .warning },
559 .{ .msg = "'##' cannot appear at the start of a macro expansion", .kind = .@"error" },
560 .{ .msg = "'##' cannot appear at the end of a macro expansion", .kind = .@"error" },
561 .{ .msg = "pasting formed '{s}', an invalid preprocessing token", .extra = .str, .kind = .@"error" },
562 .{ .msg = "missing ')' in macro parameter list", .kind = .@"error" },
563 .{ .msg = "unterminated macro param list", .kind = .@"error" },
564 .{ .msg = "invalid token in macro parameter list", .kind = .@"error" },
565 .{ .msg = "expected comma in macro parameter list", .kind = .@"error" },
566 .{ .msg = "'#' is not followed by a macro parameter", .kind = .@"error" },
567 .{ .msg = "expected \"FILENAME\" or <FILENAME>", .kind = .@"error" },
568 .{ .msg = "empty filename", .kind = .@"error" },
569 .{ .msg = "expected '{s}', found invalid bytes", .extra = .tok_id_expected, .kind = .@"error" },
570 .{ .msg = "expected '{s}' before end of file", .extra = .tok_id_expected, .kind = .@"error" },
571 .{ .msg = "expected '{s}', found '{s}'", .extra = .tok_id, .kind = .@"error" },
572 .{ .msg = "expected expression", .kind = .@"error" },
573 .{ .msg = "expression is not an integer constant expression", .kind = .@"error" },
574 .{ .msg = "type specifier missing, defaults to 'int'", .opt = W("implicit-int"), .kind = .warning, .all = true },
575 .{ .msg = "a type specifier is required for all declarations", .kind = .@"error" },
576 .{ .msg = "cannot combine with previous '{s}' declaration specifier", .extra = .str, .kind = .@"error" },
577 .{ .msg = "static assertion failed", .kind = .@"error" },
578 .{ .msg = "static assertion failed {s}", .extra = .str, .kind = .@"error" },
579 .{ .msg = "expected a type", .kind = .@"error" },
580 .{ .msg = "cannot combine with previous '{s}' specifier", .extra = .str, .kind = .@"error" },
581 .{ .msg = "duplicate '{s}' declaration specifier", .extra = .str, .opt = W("duplicate-decl-specifier"), .kind = .warning, .all = true },
582 .{ .msg = "restrict requires a pointer or reference ('{s}' is invalid)", .extra = .str, .kind = .@"error" },
583 .{ .msg = "expected external declaration", .kind = .@"error" },
584 .{ .msg = "expected identifier or '('", .kind = .@"error" },
585 .{ .msg = "declaration does not declare anything", .opt = W("missing-declaration"), .kind = .warning },
586 .{ .msg = "function definition is not allowed here", .kind = .@"error" },
587 .{ .msg = "illegal initializer (only variables can be initialized)", .kind = .@"error" },
588 .{ .msg = "extern variable has initializer", .opt = W("extern-initializer"), .kind = .warning },
589 .{ .msg = "'{s}' came from typedef", .extra = .str, .kind = .note },
590 .{ .msg = "ISO C requires a named parameter before '...'", .kind = .@"error", .suppress_version = .c23 },
591 .{ .msg = "'void' must be the only parameter if specified", .kind = .@"error" },
592 .{ .msg = "'void' parameter cannot be qualified", .kind = .@"error" },
593 .{ .msg = "'void' must be the first parameter if specified", .kind = .@"error" },
594 .{ .msg = "invalid storage class on function parameter", .kind = .@"error" },
595 .{ .msg = "_Thread_local only allowed on variables", .kind = .@"error" },
596 .{ .msg = "'{s}' can only appear on functions", .extra = .str, .kind = .@"error" },
597 .{ .msg = "illegal storage class on function", .kind = .@"error" },
598 .{ .msg = "illegal storage class on global variable", .kind = .@"error" },
599 .{ .msg = "expected statement", .kind = .@"error" },
600 .{ .msg = "function cannot return a function", .kind = .@"error" },
601 .{ .msg = "function cannot return an array", .kind = .@"error" },
602 .{ .msg = "use of undeclared identifier '{s}'", .extra = .str, .kind = .@"error" },
603 .{ .msg = "cannot call non function type '{s}'", .extra = .str, .kind = .@"error" },
604 .{ .msg = "unsupported string literal concatenation", .kind = .@"error" },
605 .{ .msg = "static functions must be global", .kind = .@"error" },
606 .{ .msg = "call to undeclared function '{s}'; ISO C99 and later do not support implicit function declarations", .extra = .str, .opt = W("implicit-function-declaration"), .kind = .@"error", .all = true },
607 .{ .msg = "use of unknown builtin '{s}'", .extra = .str, .opt = W("implicit-function-declaration"), .kind = .@"error", .all = true },
608 .{ .msg = "implicitly declaring library function '{s}'", .extra = .str, .opt = W("implicit-function-declaration"), .kind = .@"error", .all = true },
609 .{ .msg = "include the header <{s}.h> or explicitly provide a declaration for '{s}'", .extra = .builtin_with_header, .opt = W("implicit-function-declaration"), .kind = .note, .all = true },
610 .{ .msg = "expected parameter declaration", .kind = .@"error" },
611 .{ .msg = "identifier parameter lists are only allowed in function definitions", .kind = .@"error" },
612 .{ .msg = "expected function body after function declaration", .kind = .@"error" },
613 .{ .msg = "parameter cannot have void type", .kind = .@"error" },
614 .{ .msg = "expression result unused", .opt = W("unused-value"), .kind = .warning, .all = true },
615 .{ .msg = "'continue' statement not in a loop", .kind = .@"error" },
616 .{ .msg = "'break' statement not in a loop or a switch", .kind = .@"error" },
617 .{ .msg = "unreachable code", .opt = W("unreachable-code"), .kind = .warning, .all = true },
618 .{ .msg = "duplicate label '{s}'", .extra = .str, .kind = .@"error" },
619 .{ .msg = "previous definition of label '{s}' was here", .extra = .str, .kind = .note },
620 .{ .msg = "use of undeclared label '{s}'", .extra = .str, .kind = .@"error" },
621 .{ .msg = "'{s}' statement not in a switch statement", .extra = .str, .kind = .@"error" },
622 .{ .msg = "duplicate case value '{s}'", .extra = .str, .kind = .@"error" },
623 .{ .msg = "multiple default cases in the same switch", .kind = .@"error" },
624 .{ .msg = "previous case defined here", .kind = .note },
625 .{ .msg = expected_arguments, .extra = .arguments, .kind = .@"error" },
626 .{ .msg = "callee declares array parameter as static here", .kind = .note },
627 .{ .msg = "array argument is too small; contains {d} elements, callee requires at least {d}", .extra = .arguments, .kind = .warning, .opt = W("array-bounds") },
628 .{ .msg = "null passed to a callee that requires a non-null argument", .kind = .warning, .opt = W("nonnull") },
629 .{ .msg = expected_arguments, .extra = .arguments, .kind = .warning },
630 .{ .msg = "expected at least {d} argument(s) got {d}", .extra = .arguments, .kind = .warning },
631 .{ .msg = "'static' may not be used with an unspecified variable length array size", .kind = .@"error" },
632 .{ .msg = "'static' used outside of function parameters", .kind = .@"error" },
633 .{ .msg = "type qualifier in non parameter array type", .kind = .@"error" },
634 .{ .msg = "star modifier used outside of function parameters", .kind = .@"error" },
635 .{ .msg = "variable length arrays not allowed at file scope", .kind = .@"error" },
636 .{ .msg = "'static' useless without a constant size", .kind = .warning, .w_extra = true },
637 .{ .msg = "array size must be 0 or greater", .kind = .@"error" },
638 .{ .msg = "array has incomplete element type '{s}'", .extra = .str, .kind = .@"error" },
639 .{ .msg = "arrays cannot have functions as their element type", .kind = .@"error" },
640 .{ .msg = "'static' used in non-outermost array type", .kind = .@"error" },
641 .{ .msg = "type qualifier used in non-outermost array type", .kind = .@"error" },
642 .{ .msg = "unterminated function macro argument list", .kind = .@"error" },
643 .{ .msg = "unknown warning '{s}'", .extra = .str, .opt = W("unknown-warning-option"), .kind = .warning },
644 .{ .msg = "overflow in expression; result is '{s}'", .extra = .str, .opt = W("integer-overflow"), .kind = .warning },
645 .{ .msg = "integer literal is too large to be represented in any integer type", .kind = .@"error" },
646 .{ .msg = "indirection requires pointer operand", .kind = .@"error" },
647 .{ .msg = "cannot take the address of an rvalue", .kind = .@"error" },
648 .{ .msg = "address of bit-field requested", .kind = .@"error" },
649 .{ .msg = "expression is not assignable", .kind = .@"error" },
650 .{ .msg = "expected identifier or '{'", .kind = .@"error" },
651 .{ .msg = "empty enum is invalid", .kind = .@"error" },
652 .{ .msg = "redefinition of '{s}'", .extra = .str, .kind = .@"error" },
653 .{ .msg = "previous definition is here", .kind = .note },
654 .{ .msg = "expected identifier", .kind = .@"error" },
655 .{ .msg = "expected string literal for diagnostic message in static_assert", .kind = .@"error" },
656 .{ .msg = "expected string literal in '{s}'", .extra = .str, .kind = .@"error" },
657 .{ .msg = "parameter named '{s}' is missing", .extra = .str, .kind = .@"error" },
658 .{ .msg = "empty {s} is a GNU extension", .extra = .str, .opt = W("gnu-empty-struct"), .kind = .off, .pedantic = true },
659 .{ .msg = "empty {s} has size 0 in C, size 1 in C++", .extra = .str, .opt = W("c++-compat"), .kind = .off },
660 .{ .msg = "use of '{s}' with tag type that does not match previous definition", .extra = .str, .kind = .@"error" },
661 .{ .msg = "expected parentheses around type name", .kind = .@"error" },
662 .{ .msg = "'_Alignof' applied to an expression is a GNU extension", .opt = W("gnu-alignof-expression"), .kind = .warning, .suppress_gnu = true },
663 .{ .msg = "invalid application of 'alignof' to an incomplete type '{s}'", .extra = .str, .kind = .@"error" },
664 .{ .msg = "invalid application of 'sizeof' to an incomplete type '{s}'", .extra = .str, .kind = .@"error" },
665 .{ .msg = "'{s}' macro redefined", .extra = .str, .opt = W("macro-redefined"), .kind = .warning },
666 .{ .msg = "generic association with qualifiers cannot be matched with", .opt = W("generic-qual-type"), .kind = .warning },
667 .{ .msg = "generic association array type cannot be matched with", .opt = W("generic-qual-type"), .kind = .warning },
668 .{ .msg = "generic association function type cannot be matched with", .opt = W("generic-qual-type"), .kind = .warning },
669 .{ .msg = "type '{s}' in generic association compatible with previously specified type", .extra = .str, .kind = .@"error" },
670 .{ .msg = "compatible type '{s}' specified here", .extra = .str, .kind = .note },
671 .{ .msg = "duplicate default generic association", .kind = .@"error" },
672 .{ .msg = "controlling expression type '{s}' not compatible with any generic association type", .extra = .str, .kind = .@"error" },
673 .{ .msg = "escape sequence out of range", .kind = .@"error" },
674 .{ .msg = "invalid universal character", .kind = .@"error" },
675 .{ .msg = "incomplete universal character name", .kind = .@"error" },
676 .{ .msg = "multi-character character constant", .opt = W("multichar"), .kind = .warning, .all = true },
677 .{ .msg = "{s} character literals may not contain multiple characters", .kind = .@"error", .extra = .str },
678 .{ .msg = "extraneous characters in character constant ignored", .kind = .warning },
679 .{ .msg = "character constant too long for its type", .kind = .warning, .all = true },
680 .{ .msg = "character too large for enclosing character literal type", .kind = .@"error" },
681 .{ .msg = "must use 'struct' tag to refer to type '{s}'", .extra = .str, .kind = .@"error" },
682 .{ .msg = "must use 'union' tag to refer to type '{s}'", .extra = .str, .kind = .@"error" },
683 .{ .msg = "must use 'enum' tag to refer to type '{s}'", .extra = .str, .kind = .@"error" },
684 .{ .msg = "redefinition of '{s}' as different kind of symbol", .extra = .str, .kind = .@"error" },
685 .{ .msg = "redefinition of '{s}' with a different type", .extra = .str, .kind = .@"error" },
686 .{ .msg = "redefinition of parameter '{s}'", .extra = .str, .kind = .@"error" },
687 .{ .msg = "invalid operands to binary expression ({s})", .extra = .str, .kind = .@"error" },
688 .{ .msg = "comparison between pointer and integer ({s})", .extra = .str, .opt = W("pointer-integer-compare"), .kind = .warning },
689 .{ .msg = "comparison of distinct pointer types ({s})", .extra = .str, .opt = W("compare-distinct-pointer-types"), .kind = .warning },
690 .{ .msg = "incompatible pointer types ({s})", .extra = .str, .kind = .@"error" },
691 .{ .msg = "invalid argument type '{s}' to unary expression", .extra = .str, .kind = .@"error" },
692 .{ .msg = "assignment to {s}", .extra = .str, .kind = .@"error" },
693 .{ .msg = "implicit pointer to integer conversion from {s}", .extra = .str, .opt = W("int-conversion"), .kind = .warning },
694 .{ .msg = "pointer cannot be cast to type '{s}'", .extra = .str, .kind = .@"error" },
695 .{ .msg = "operand of type '{s}' cannot be cast to a pointer type", .extra = .str, .kind = .@"error" },
696 .{ .msg = "cannot cast to non arithmetic or pointer type '{s}'", .extra = .str, .kind = .@"error" },
697 .{ .msg = "cast to type '{s}' will not preserve qualifiers", .extra = .str, .opt = W("cast-qualifiers"), .kind = .warning },
698 .{ .msg = "array subscript is not an integer", .kind = .@"error" },
699 .{ .msg = "subscripted value is not an array or pointer", .kind = .@"error" },
700 .{ .msg = "array index {s} is past the end of the array", .extra = .str, .opt = W("array-bounds"), .kind = .warning },
701 .{ .msg = "array index {s} is before the beginning of the array", .extra = .str, .opt = W("array-bounds"), .kind = .warning },
702 .{ .msg = "statement requires expression with integer type ('{s}' invalid)", .extra = .str, .kind = .@"error" },
703 .{ .msg = "statement requires expression with scalar type ('{s}' invalid)", .extra = .str, .kind = .@"error" },
704 .{ .msg = "non-void function '{s}' should return a value", .extra = .str, .opt = W("return-type"), .kind = .@"error", .all = true },
705 .{ .msg = "returning {s}", .extra = .str, .kind = .@"error" },
706 .{ .msg = "returning {s}" ++ pointer_sign_message, .extra = .str, .kind = .warning, .opt = W("pointer-sign") },
707 .{ .msg = "implicit integer to pointer conversion from {s}", .extra = .str, .opt = W("int-conversion"), .kind = .warning },
708 .{ .msg = "non-void function '{s}' does not return a value", .extra = .str, .opt = W("return-type"), .kind = .warning, .all = true },
709 .{ .msg = "void function '{s}' should not return a value", .extra = .str, .opt = W("return-type"), .kind = .@"error", .all = true },
710 .{ .msg = "passing {s}", .extra = .str, .kind = .@"error" },
711 .{ .msg = "passing {s}", .extra = .str, .kind = .warning, .opt = W("incompatible-pointer-types") },
712 .{ .msg = "passing {s}" ++ pointer_sign_message, .extra = .str, .kind = .warning, .opt = W("pointer-sign") },
713 .{ .msg = "passing argument to parameter here", .kind = .note },
714 .{ .msg = "atomic cannot be applied to array type '{s}'", .extra = .str, .kind = .@"error" },
715 .{ .msg = "atomic cannot be applied to function type '{s}'", .extra = .str, .kind = .@"error" },
716 .{ .msg = "atomic cannot be applied to incomplete type '{s}'", .extra = .str, .kind = .@"error" },
717 .{ .msg = "address of register variable requested", .kind = .@"error" },
718 .{ .msg = "variable has incomplete type '{s}'", .extra = .str, .kind = .@"error" },
719 .{ .msg = "parameter has incomplete type '{s}'", .extra = .str, .kind = .@"error" },
720 .{ .msg = "tentative array definition assumed to have one element", .kind = .warning },
721 .{ .msg = "dereferencing pointer to incomplete type '{s}'", .extra = .str, .kind = .@"error" },
722 .{ .msg = "'_Alignas' attribute only applies to variables and fields", .kind = .@"error" },
723 .{ .msg = "'_Alignas' attribute cannot be applied to a function parameter", .kind = .@"error" },
724 .{ .msg = "requested alignment is less than minimum alignment of {d}", .extra = .unsigned, .kind = .@"error" },
725 .{ .msg = "requested alignment of {s} is too large", .extra = .str, .kind = .@"error" },
726 .{ .msg = "requested negative alignment of {s} is invalid", .extra = .str, .kind = .@"error" },
727 .{ .msg = "'_Alignas' attribute is ignored here", .kind = .warning },
728 .{ .msg = "requested alignment of zero is ignored", .kind = .warning },
729 .{ .msg = "requested alignment is not a power of 2", .kind = .@"error" },
730 .{ .msg = "pointer type mismatch ({s})", .extra = .str, .opt = W("pointer-type-mismatch"), .kind = .warning },
731 .{ .msg = "static_assert expression is not an integral constant expression", .kind = .@"error" },
732 .{ .msg = "static_assert with no message is a C23 extension", .opt = W("c23-extensions"), .kind = .warning, .suppress_version = .c23 },
733 .{ .msg = "{s} is incompatible with C standards before C23", .extra = .str, .kind = .off, .suppress_unless_version = .c23, .opt = W("pre-c23-compat") },
734 .{ .msg = "variable length array must be bound in function definition", .kind = .@"error" },
735 .{ .msg = "array is too large", .kind = .@"error" },
736 .{ .msg = "type '{s}' is too large", .kind = .@"error", .extra = .str },
737 .{ .msg = "incompatible pointer types initializing {s}", .extra = .str, .opt = W("incompatible-pointer-types"), .kind = .warning },
738 .{ .msg = "incompatible pointer types initializing {s}" ++ pointer_sign_message, .extra = .str, .opt = W("pointer-sign"), .kind = .warning },
739 .{ .msg = "incompatible pointer types assigning to {s}", .extra = .str, .opt = W("incompatible-pointer-types"), .kind = .warning },
740 .{ .msg = "incompatible pointer types assigning to {s} " ++ pointer_sign_message, .extra = .str, .opt = W("pointer-sign"), .kind = .warning },
741 .{ .msg = "variable-sized object may not be initialized", .kind = .@"error" },
742 .{ .msg = "illegal initializer type", .kind = .@"error" },
743 .{ .msg = "initializing {s}", .extra = .str, .kind = .@"error" },
744 .{ .msg = "scalar initializer cannot be empty", .kind = .@"error" },
745 .{ .msg = "excess elements in scalar initializer", .opt = W("excess-initializers"), .kind = .warning },
746 .{ .msg = "excess elements in string initializer", .opt = W("excess-initializers"), .kind = .warning },
747 .{ .msg = "excess elements in struct initializer", .opt = W("excess-initializers"), .kind = .warning },
748 .{ .msg = "excess elements in array initializer", .opt = W("excess-initializers"), .kind = .warning },
749 .{ .msg = "initializer-string for char array is too long", .opt = W("excess-initializers"), .kind = .warning },
750 .{ .msg = "cannot initialize type ({s})", .extra = .str, .kind = .@"error" },
751 .{ .msg = "'{s} typeof' is invalid", .extra = .str, .kind = .@"error" },
752 .{ .msg = "{s} by zero is undefined", .extra = .str, .opt = W("division-by-zero"), .kind = .warning },
753 .{ .msg = "{s} by zero in preprocessor expression", .extra = .str, .kind = .@"error" },
754 .{ .msg = "'__builtin_choose_expr' requires a constant expression", .kind = .@"error" },
755 .{ .msg = "'_Alignas' attribute requires integer constant expression", .kind = .@"error" },
756 .{ .msg = "case value must be an integer constant expression", .kind = .@"error" },
757 .{ .msg = "enum value must be an integer constant expression", .kind = .@"error" },
758 .{ .msg = "cannot initialize array of type {s}", .extra = .str, .kind = .@"error" },
759 .{ .msg = "array initializer must be an initializer list or wide string literal", .kind = .@"error" },
760 .{ .msg = "initializer overrides previous initialization", .opt = W("initializer-overrides"), .kind = .warning, .w_extra = true },
761 .{ .msg = "previous initialization", .kind = .note },
762 .{ .msg = "array designator used for non-array type '{s}'", .extra = .str, .kind = .@"error" },
763 .{ .msg = "array designator value {s} is negative", .extra = .str, .kind = .@"error" },
764 .{ .msg = "array designator index {s} exceeds array bounds", .extra = .str, .kind = .@"error" },
765 .{ .msg = "field designator used for non-record type '{s}'", .extra = .str, .kind = .@"error" },
766 .{ .msg = "record type has no field named '{s}'", .extra = .str, .kind = .@"error" },
767 .{ .msg = "initializer for aggregate with no elements requires explicit braces", .kind = .@"error" },
768 .{ .msg = "initializing {s} discards qualifiers", .extra = .str, .opt = W("incompatible-pointer-types-discards-qualifiers"), .kind = .warning },
769 .{ .msg = "assigning to {s} discards qualifiers", .extra = .str, .opt = W("incompatible-pointer-types-discards-qualifiers"), .kind = .warning },
770 .{ .msg = "returning {s} discards qualifiers", .extra = .str, .opt = W("incompatible-pointer-types-discards-qualifiers"), .kind = .warning },
771 .{ .msg = "passing {s} discards qualifiers", .extra = .str, .opt = W("incompatible-pointer-types-discards-qualifiers"), .kind = .warning },
772 .{ .msg = "unknown attribute '{s}' ignored", .extra = .str, .opt = W("unknown-attributes"), .kind = .warning },
773 .{ .msg = "{s}", .extra = .str, .opt = W("ignored-attributes"), .kind = .warning },
774 .{ .msg = "fallthrough annotation does not directly precede switch label", .kind = .@"error" },
775 .{ .msg = "'{s}' attribute cannot be applied to a statement", .extra = .str, .kind = .@"error" },
776 .{ .msg = "redefining builtin macro", .opt = W("builtin-macro-redefined"), .kind = .warning },
777 .{ .msg = "builtin feature check macro requires a parenthesized identifier", .kind = .@"error" },
778 .{ .msg = "missing '{s}', after builtin feature-check macro", .extra = .tok_id_expected, .kind = .@"error" },
779 .{ .msg = "use of GNU address-of-label extension", .opt = W("gnu-label-as-value"), .kind = .off, .pedantic = true },
780 .{ .msg = "member reference base type '{s}' is not a structure or union", .extra = .str, .kind = .@"error" },
781 .{ .msg = "member reference type '{s}' is not a pointer; did you mean to use '.'?", .extra = .str, .kind = .@"error" },
782 .{ .msg = "member reference type '{s}' is a pointer; did you mean to use '->'?", .extra = .str, .kind = .@"error" },
783 .{ .msg = "no member named {s}", .extra = .str, .kind = .@"error" },
784 .{ .msg = "{s} expected option name (e.g. \"-Wundef\")", .extra = .str, .opt = W("malformed-warning-check"), .kind = .warning, .all = true },
785 .{ .msg = "computed goto in function with no address-of-label expressions", .kind = .@"error" },
786 .{ .msg = "{s}", .extra = .str, .opt = W("#pragma-messages"), .kind = .warning },
787 .{ .msg = "{s}", .extra = .str, .kind = .@"error" },
788 .{ .msg = "#pragma message: {s}", .extra = .str, .kind = .note },
789 .{ .msg = "pragma {s} requires string literal", .extra = .str, .kind = .@"error" },
790 .{ .msg = "attempt to use a poisoned identifier", .kind = .@"error" },
791 .{ .msg = "can only poison identifier tokens", .kind = .@"error" },
792 .{ .msg = "poisoning existing macro", .kind = .warning },
793 .{ .msg = "no newline at end of file", .opt = W("newline-eof"), .kind = .off, .pedantic = true },
794 .{ .msg = "ISO C requires a translation unit to contain at least one declaration", .opt = W("empty-translation-unit"), .kind = .off, .pedantic = true },
795 .{ .msg = "omitting the parameter name in a function definition is a C23 extension", .opt = W("c23-extensions"), .kind = .warning, .suppress_version = .c23 },
796 .{ .msg = "bit-field has non-integer type '{s}'", .extra = .str, .kind = .@"error" },
797 .{ .msg = "bit-field has negative width ({s})", .extra = .str, .kind = .@"error" },
798 .{ .msg = "named bit-field has zero width", .kind = .@"error" },
799 .{ .msg = "width of bit-field exceeds width of its type", .kind = .@"error" },
800 .{ .msg = "source file is not valid UTF-8", .kind = .@"error" },
801 .{ .msg = "integer literal is too large to be represented in a signed integer type, interpreting as unsigned", .opt = W("implicitly-unsigned-literal"), .kind = .warning },
802 .{ .msg = "token is not a valid binary operator in a preprocessor subexpression", .kind = .@"error" },
803 .{ .msg = "invalid token at start of a preprocessor expression", .kind = .@"error" },
804 .{ .msg = "using this character in an identifier is incompatible with C99", .opt = W("c99-compat"), .kind = .off },
805 .{ .msg = "unexpected character <U+{X:0>4}>", .extra = .actual_codepoint, .kind = .@"error" },
806 .{ .msg = "character <U+{X:0>4}> not allowed at the start of an identifier", .extra = .actual_codepoint, .kind = .@"error" },
807 .{ .msg = "identifier contains Unicode character <U+{X:0>4}> that is invisible in some environments", .opt = W("unicode-homoglyph"), .extra = .actual_codepoint, .kind = .warning },
808 .{ .msg = "treating Unicode character <U+{X:0>4}> as identifier character rather than as '{u}' symbol", .extra = .codepoints, .opt = W("unicode-homoglyph"), .kind = .warning },
809 .{ .msg = "meaningless '{s}' on assembly outside function", .extra = .str, .kind = .@"error" },
810 .{ .msg = "duplicate asm qualifier '{s}'", .extra = .str, .kind = .@"error" },
811 .{ .msg = "cannot use {s} string literal in assembly", .extra = .str, .kind = .@"error" },
812 .{ .msg = "'$' in identifier", .opt = W("dollar-in-identifier-extension"), .kind = .off, .pedantic = true },
813 .{ .msg = "illegal character '$' in identifier", .kind = .@"error" },
814 .{ .msg = "expanded from here", .kind = .note },
815 .{ .msg = "(skipping {d} expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)", .extra = .unsigned, .kind = .note },
816 .{ .msg = "_Pragma requires exactly one string literal token", .kind = .@"error" },
817 .{ .msg = "pragma GCC expected 'error', 'warning', 'diagnostic', 'poison'", .opt = W("unknown-pragmas"), .kind = .off, .all = true },
818 .{ .msg = "pragma GCC diagnostic expected 'error', 'warning', 'ignored', 'fatal', 'push', or 'pop'", .opt = W("unknown-pragmas"), .kind = .warning, .all = true },
819 .{ .msg = "predefined identifier is only valid inside function", .opt = W("predefined-identifier-outside-function"), .kind = .warning },
820 .{ .msg = "first argument to va_arg, is of type '{s}' and not 'va_list'", .extra = .str, .kind = .@"error" },
821 .{ .msg = "too many braces around scalar initializer", .opt = W("many-braces-around-scalar-init"), .kind = .warning },
822 .{ .msg = "variable '{s}' is uninitialized when used within its own initialization", .extra = .str, .opt = W("uninitialized"), .kind = .off, .all = true },
823 .{ .msg = "use of GNU statement expression extension", .opt = W("gnu-statement-expression"), .kind = .off, .suppress_gnu = true, .pedantic = true },
824 .{ .msg = "statement expression not allowed at file scope", .kind = .@"error" },
825 .{ .msg = "imaginary constants are a GNU extension", .opt = W("gnu-imaginary-constant"), .kind = .off, .suppress_gnu = true, .pedantic = true },
826 .{ .msg = "plain '_Complex' requires a type specifier; assuming '_Complex double'", .kind = .warning },
827 .{ .msg = "complex integer types are a GNU extension", .opt = W("gnu-complex-integer"), .suppress_gnu = true, .kind = .off },
828 .{ .msg = "'{s}' type qualifier on return type has no effect", .opt = W("ignored-qualifiers"), .extra = .str, .kind = .off, .all = true },
829 .{ .msg = "invalid standard '{s}'", .extra = .str, .kind = .@"error" },
830 .{ .msg = "invalid target '{s}'", .extra = .str, .kind = .@"error" },
831 .{ .msg = "invalid compiler '{s}'", .extra = .str, .kind = .@"error" },
832 .{ .msg = "unknown argument '{s}'", .extra = .str, .kind = .@"error" },
833 .{ .msg = "{s}", .extra = .str, .kind = .@"error" },
834 .{ .msg = "{s}: linker input file unused because linking not done", .extra = .str, .kind = .warning },
835 .{ .msg = "unrecognized linker '{s}'", .extra = .str, .kind = .@"error" },
836 .{ .msg = "extra ';' outside of a function", .opt = W("extra-semi"), .kind = .off, .pedantic = true },
837 .{ .msg = "field declared as a function", .kind = .@"error" },
838 .{ .msg = "variable length array fields extension is not supported", .kind = .@"error" },
839 .{ .msg = "field has incomplete type '{s}'", .extra = .str, .kind = .@"error" },
840 .{ .msg = "flexible array member in union is not allowed", .kind = .@"error", .suppress_msvc = true },
841 .{ .msg = "flexible array member is not at the end of struct", .kind = .@"error" },
842 .{ .msg = "flexible array member in otherwise empty struct", .kind = .@"error", .suppress_msvc = true },
843 .{ .msg = "duplicate member '{s}'", .extra = .str, .kind = .@"error" },
844 .{ .msg = "binary integer literals are a GNU extension", .kind = .off, .opt = W("gnu-binary-literal"), .pedantic = true },
845 .{ .msg = "named variadic macros are a GNU extension", .opt = W("variadic-macros"), .kind = .off, .pedantic = true },
846 .{ .msg = "builtin function must be directly called", .kind = .@"error" },
847 .{ .msg = "'va_start' cannot be used outside a function", .kind = .@"error" },
848 .{ .msg = "'va_start' used in a function with fixed args", .kind = .@"error" },
849 .{ .msg = "second argument to 'va_start' is not the last named parameter", .opt = W("varargs"), .kind = .warning },
850 .{ .msg = "'{s}' attribute takes at least {d} argument(s)", .kind = .@"error", .extra = .attr_arg_count },
851 .{ .msg = "'{s}' attribute takes at most {d} argument(s)", .kind = .@"error", .extra = .attr_arg_count },
852 .{ .msg = "Attribute argument is invalid, expected {s} but got {s}", .kind = .@"error", .extra = .attr_arg_type },
853 .{ .msg = "Unknown `{s}` argument. Possible values are: {s}", .kind = .@"error", .extra = .attr_enum },
854 .{ .msg = "'{s}' attribute requires an identifier", .kind = .@"error", .extra = .str },
855 .{ .msg = "'__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes", .kind = .@"error" },
856 .{ .msg = "__declspec attribute '{s}' is not supported", .extra = .str, .opt = W("ignored-attributes"), .kind = .warning },
857 .{ .msg = "{s}", .extra = .str, .opt = W("deprecated-declarations"), .kind = .warning },
858 .{ .msg = "'{s}' has been explicitly marked deprecated here", .extra = .str, .opt = W("deprecated-declarations"), .kind = .note },
859 .{ .msg = "{s}", .extra = .str, .kind = .@"error" },
860 .{ .msg = "'{s}' has been explicitly marked unavailable here", .extra = .str, .kind = .note },
861 .{ .msg = "{s}", .extra = .str, .kind = .warning, .opt = W("attribute-warning") },
862 .{ .msg = "{s}", .extra = .str, .kind = .@"error" },
863 .{ .msg = "attribute '{s}' is ignored, place it after \"{s}\" to apply attribute to type declaration", .extra = .ignored_record_attr, .kind = .warning, .opt = W("ignored-attributes") },
864 .{ .msg = "backslash and newline separated by space", .kind = .warning, .opt = W("backslash-newline-escape") },
865 .{ .msg = "size of array has non-integer type '{s}'", .extra = .str, .kind = .@"error" },
866 .{ .msg = "cast to smaller integer type {s}", .extra = .str, .kind = .warning, .opt = W("pointer-to-int-cast") },
867 .{ .msg = "use of GNU case range extension", .opt = W("gnu-case-range"), .kind = .off, .pedantic = true },
868 .{ .msg = "empty case range specified", .kind = .warning },
869 .{ .msg = "use of non-standard escape character '\\{s}'", .kind = .off, .opt = W("pedantic"), .extra = .invalid_escape },
870 .{ .msg = "invalid string literal, ignoring final '\\'", .kind = .warning },
871 .{ .msg = "variable length array used", .kind = .off, .opt = W("vla") },
872 .{ .msg = "implicit conversion from {s}", .extra = .str, .kind = .warning, .opt = W("constant-conversion") },
873 .{ .msg = "implicit conversion changes signedness: {s}", .extra = .str, .kind = .off, .opt = W("sign-conversion") },
874 .{ .msg = "implicit conversion of non-finite value from {s} is undefined", .extra = .str, .kind = .off, .opt = W("float-overflow-conversion") },
875 .{ .msg = "implicit conversion of out of range value from {s} is undefined", .extra = .str, .kind = .warning, .opt = W("literal-conversion") },
876 .{ .msg = "implicit conversion from {s}", .extra = .str, .kind = .off, .opt = W("float-zero-conversion") },
877 .{ .msg = "implicit conversion from {s}", .extra = .str, .kind = .warning, .opt = W("float-conversion") },
878 .{ .msg = "implicit conversion turns floating-point number into integer: {s}", .extra = .str, .kind = .off, .opt = W("literal-conversion") },
879 .{ .msg = "expression is not an integer constant expression; folding it to a constant is a GNU extension", .kind = .off, .opt = W("gnu-folding-constant"), .pedantic = true },
880 .{ .msg = "variable length array folded to constant array as an extension", .kind = .off, .opt = W("gnu-folding-constant"), .pedantic = true },
881 .{ .msg = "typedef redefinition with different types ({s})", .extra = .str, .kind = .@"error" },
882 .{ .msg = "'{s}' is not defined, evaluates to 0", .extra = .str, .kind = .off, .opt = W("undef") },
883 .{ .msg = "function-like macro '{s}' is not defined", .extra = .str, .kind = .@"error" },
884 .{ .msg = "'{s}' must be used within a preprocessing directive", .extra = .tok_id_expected, .kind = .@"error" },
885 .{ .msg = "Missing '(' after built-in macro '{s}'", .extra = .str, .kind = .@"error" },
886 .{ .msg = "offsetof requires struct or union type, '{s}' invalid", .extra = .str, .kind = .@"error" },
887 .{ .msg = "offsetof of incomplete type '{s}'", .extra = .str, .kind = .@"error" },
888 .{ .msg = "offsetof requires array type, '{s}' invalid", .extra = .str, .kind = .@"error" },
889 .{ .msg = "missing '(' after '#pragma pack' - ignoring", .kind = .warning, .opt = W("ignored-pragmas") },
890 .{ .msg = "missing ')' after '#pragma pack' - ignoring", .kind = .warning, .opt = W("ignored-pragmas") },
891 .{ .msg = "unknown action for '#pragma pack' - ignoring", .opt = W("ignored-pragmas"), .kind = .warning },
892 .{ .msg = "value of #pragma pack(show) == {d}", .extra = .unsigned, .kind = .warning },
893 .{ .msg = "expected #pragma pack parameter to be '1', '2', '4', '8', or '16'", .opt = W("ignored-pragmas"), .kind = .warning },
894 .{ .msg = "expected integer or identifier in '#pragma pack' - ignored", .opt = W("ignored-pragmas"), .kind = .warning },
895 .{ .msg = "specifying both a name and alignment to 'pop' is undefined", .kind = .warning },
896 .{ .msg = "#pragma pack(pop, ...) failed: stack empty", .opt = W("ignored-pragmas"), .kind = .warning },
897 .{ .msg = "used type '{s}' where arithmetic or pointer type is required", .extra = .str, .kind = .@"error" },
898 .{ .msg = "#include nested too deeply", .kind = .@"error" },
899 .{ .msg = "ISO C restricts enumerator values to range of 'int' ({s} is too small)", .extra = .str, .kind = .off, .opt = W("pedantic") },
900 .{ .msg = "ISO C restricts enumerator values to range of 'int' ({s} is too large)", .extra = .str, .kind = .off, .opt = W("pedantic") },
901 .{ .msg = "#include_next is a language extension", .kind = .off, .pedantic = true, .opt = W("gnu-include-next") },
902 .{ .msg = "#include_next in primary source file; will search from start of include path", .kind = .warning, .opt = W("include-next-outside-header") },
903 .{ .msg = "overflow in enumeration value", .kind = .warning },
904 .{ .msg = "incremented enumerator value {s} is not representable in the largest integer type", .kind = .warning, .opt = W("enum-too-large"), .extra = .pow_2_as_string },
905 .{ .msg = "enumeration values exceed range of largest integer", .kind = .warning, .opt = W("enum-too-large") },
906 .{ .msg = "enumeration types with a fixed underlying type are a Clang extension", .kind = .off, .pedantic = true, .opt = W("fixed-enum-extension") },
907 .{ .msg = "enumeration previously declared with nonfixed underlying type", .kind = .@"error" },
908 .{ .msg = "enumeration previously declared with fixed underlying type", .kind = .@"error" },
909 .{ .msg = "enumeration redeclared with different underlying type {s})", .extra = .str, .kind = .@"error" },
910 .{ .msg = "enumerator value is not representable in the underlying type '{s}'", .extra = .str, .kind = .@"error" },
911 .{ .msg = "'transparent_union' attribute only applies to unions", .opt = W("ignored-attributes"), .kind = .warning },
912 .{ .msg = "transparent union definition must contain at least one field; transparent_union attribute ignored", .opt = W("ignored-attributes"), .kind = .warning },
913 .{ .msg = "size of field {s} bits) does not match the size of the first field in transparent union; transparent_union attribute ignored", .extra = .str, .opt = W("ignored-attributes"), .kind = .warning },
914 .{ .msg = "size of first field is {d}", .extra = .unsigned, .kind = .note },
915 .{ .msg = "'designated_init' attribute is only valid on 'struct' type'", .kind = .@"error" },
916 .{ .msg = "positional initialization of field in 'struct' declared with 'designated_init' attribute", .opt = W("designated-init"), .kind = .warning },
917 .{ .msg = "ignoring attribute 'common' because it conflicts with attribute 'nocommon'", .opt = W("ignored-attributes"), .kind = .warning },
918 .{ .msg = "ignoring attribute 'nocommon' because it conflicts with attribute 'common'", .opt = W("ignored-attributes"), .kind = .warning },
919 .{ .msg = "'nonstring' attribute ignored on objects of type '{s}'", .opt = W("ignored-attributes"), .kind = .warning },
920 .{ .msg = "'{s}' attribute only applies to local variables", .extra = .str, .opt = W("ignored-attributes"), .kind = .warning },
921 .{ .msg = "ignoring attribute 'cold' because it conflicts with attribute 'hot'", .opt = W("ignored-attributes"), .kind = .warning },
922 .{ .msg = "ignoring attribute 'hot' because it conflicts with attribute 'cold'", .opt = W("ignored-attributes"), .kind = .warning },
923 .{ .msg = "ignoring attribute 'noinline' because it conflicts with attribute 'always_inline'", .opt = W("ignored-attributes"), .kind = .warning },
924 .{ .msg = "ignoring attribute 'always_inline' because it conflicts with attribute 'noinline'", .opt = W("ignored-attributes"), .kind = .warning },
925 .{ .msg = "function '{s}' declared 'noreturn' should not return", .extra = .str, .kind = .warning, .opt = W("invalid-noreturn") },
926 .{ .msg = "ignoring return value of '{s}', declared with 'nodiscard' attribute", .extra = .str, .kind = .warning, .opt = W("unused-result") },
927 .{ .msg = "ignoring return value of '{s}', declared with 'warn_unused_result' attribute", .extra = .str, .kind = .warning, .opt = W("unused-result") },
928 .{ .msg = "invalid vector element type '{s}'", .extra = .str, .kind = .@"error" },
929 .{ .msg = "vector size not an integral multiple of component size", .kind = .@"error" },
930 .{ .msg = "invalid type '{s}' to __imag operator", .extra = .str, .kind = .@"error" },
931 .{ .msg = "invalid type '{s}' to __real operator", .extra = .str, .kind = .@"error" },
932 .{ .msg = "zero size arrays are an extension", .kind = .off, .pedantic = true, .opt = W("zero-length-array") },
933 .{ .msg = "array index {s} is past the end of the array", .extra = .str, .kind = .off, .pedantic = true, .opt = W("old-style-flexible-struct") },
934 .{ .msg = "token pasting of ',' and __VA_ARGS__ is a GNU extension", .kind = .off, .pedantic = true, .opt = W("gnu-zero-variadic-macro-arguments"), .suppress_gcc = true },
935 .{ .msg = "return type of 'main' is not 'int'", .kind = .warning, .opt = W("main-return-type") },
936 .{ .msg = "macro expansion producing 'defined' has undefined behavior", .kind = .off, .pedantic = true, .opt = W("expansion-to-defined") },
937 .{ .msg = "invalid suffix '{s}' on integer constant", .extra = .str, .kind = .@"error" },
938 .{ .msg = "invalid suffix '{s}' on floating constant", .extra = .str, .kind = .@"error" },
939 .{ .msg = "invalid digit '{c}' in octal constant", .extra = .ascii, .kind = .@"error" },
940 .{ .msg = "invalid digit '{c}' in binary constant", .extra = .ascii, .kind = .@"error" },
941 .{ .msg = "exponent has no digits", .kind = .@"error" },
942 .{ .msg = "hexadecimal floating constant requires an exponent", .kind = .@"error" },
943 .{ .msg = "sizeof returns 0", .kind = .warning, .suppress_gcc = true, .suppress_clang = true },
944 .{ .msg = "'declspec' attribute not allowed after declarator", .kind = .@"error" },
945 .{ .msg = "this declarator", .kind = .note },
946 .{ .msg = "{s} is not supported on this target", .extra = .str, .kind = .@"error" },
947 .{ .msg = "'_BitInt' in C17 and earlier is a Clang extension'", .kind = .off, .pedantic = true, .opt = W("bit-int-extension"), .suppress_version = .c23 },
948 .{ .msg = "{s}unsigned _BitInt must have a bit size of at least 1", .extra = .str, .kind = .@"error" },
949 .{ .msg = "{s}signed _BitInt must have a bit size of at least 2", .extra = .str, .kind = .@"error" },
950 .{ .msg = "{s}unsigned _BitInt of bit sizes greater than " ++ std.fmt.comptimePrint("{d}", .{Properties.max_bits}) ++ " not supported", .extra = .str, .kind = .@"error" },
951 .{ .msg = "{s}signed _BitInt of bit sizes greater than " ++ std.fmt.comptimePrint("{d}", .{Properties.max_bits}) ++ " not supported", .extra = .str, .kind = .@"error" },
952 .{ .msg = "keyword is hidden by macro definition", .kind = .off, .pedantic = true, .opt = W("keyword-macro") },
953 .{ .msg = "arithmetic on a pointer to an incomplete type '{s}'", .extra = .str, .kind = .@"error" },
954 .{ .msg = "'{s}' calling convention is not supported for this target", .extra = .str, .opt = W("ignored-attributes"), .kind = .warning },
955 .{ .msg = "invalid application of '{s}' to a void type", .extra = .str, .kind = .off, .pedantic = true, .opt = W("pointer-arith") },
956 .{ .msg = "sizeof on array function parameter will return size of {s}", .extra = .str, .kind = .warning, .opt = W("sizeof-array-argument") },
957 .{ .msg = "address of array '{s}' will always evaluate to 'true'", .extra = .str, .kind = .warning, .opt = W("pointer-bool-conversion") },
958 .{ .msg = "implicit conversion turns string literal into bool: {s}", .extra = .str, .kind = .off, .opt = W("string-conversion") },
959 .{ .msg = "this conversion is not allowed in a constant expression", .kind = .note },
960 .{ .msg = "cannot cast an object of type {s}", .extra = .str, .kind = .@"error" },
961 .{ .msg = "unsupported argument '{s}' to option '-ffp-eval-method='; expected 'source', 'double', or 'extended'", .extra = .str, .kind = .@"error" },
962 .{ .msg = "{s} cannot have __fp16 type; did you forget * ?", .extra = .str, .kind = .@"error" },
963 .{ .msg = "'_BitInt' suffix for literals is a C23 extension", .opt = W("c23-extensions"), .kind = .warning, .suppress_version = .c23 },
964 .{ .msg = "'__auto_type' is a GNU extension", .opt = W("gnu-auto-type"), .kind = .off, .pedantic = true },
965 .{ .msg = "'__auto_type' not allowed in {s}", .kind = .@"error", .extra = .str },
966 .{ .msg = "declaration of variable '{s}' with deduced type requires an initializer", .kind = .@"error", .extra = .str },
967 .{ .msg = "'__auto_type' may only be used with a single declarator", .kind = .@"error" },
968 .{ .msg = "'__auto_type' requires a plain identifier as declarator", .kind = .@"error" },
969 .{ .msg = "invalid cast to '__auto_type'", .kind = .@"error" },
970 .{ .msg = "cannot use bit-field as '__auto_type' initializer", .kind = .@"error" },
971 .{ .msg = "'{s}' declared as array of '__auto_type'", .kind = .@"error", .extra = .str },
972 .{ .msg = "cannot use '__auto_type' with initializer list", .kind = .@"error" },
973 .{ .msg = "expected ';' at end of declaration list", .kind = .warning },
974 .{ .msg = "tentative definition has type '{s}' that is never completed", .kind = .@"error", .extra = .str },
975 .{ .msg = "forward declaration of '{s}'", .kind = .note, .extra = .str },
976 .{ .msg = "cast to union type is a GNU extension", .opt = W("gnu-union-cast"), .kind = .off, .pedantic = true },
977 .{ .msg = "cast to union type from type '{s}' not present in union", .kind = .@"error", .extra = .str },
978 .{ .msg = "cast to incomplete type '{s}'", .kind = .@"error", .extra = .str },
979 .{ .msg = "environment variable SOURCE_DATE_EPOCH must expand to a non-negative integer less than or equal to 253402300799", .kind = .@"error" },
980 .{ .msg = "'-fuse-ld=' taking a path is deprecated; use '--ld-path=' instead", .kind = .off, .opt = W("fuse-ld-path") },
981 .{ .msg = "invalid runtime library name '{s}'", .kind = .@"error", .extra = .str },
982 .{ .msg = "unsupported runtime library 'libgcc' for platform '{s}'", .kind = .@"error", .extra = .str },
983 .{ .msg = "invalid unwind library name '{s}'", .kind = .@"error", .extra = .str },
984 .{ .msg = "--rtlib=libgcc requires --unwindlib=libgcc", .kind = .@"error" },
985 .{ .msg = "GNU-style inline assembly is disabled", .kind = .@"error" },
986 .{ .msg = "extension used", .kind = .off, .pedantic = true, .opt = W("language-extension-token") },
987 .{ .msg = "complex initialization specifying real and imaginary components is an extension", .opt = W("complex-component-init"), .kind = .off, .pedantic = true },
988 .{ .msg = "ISO C does not support '++'/'--' on complex type '{s}'", .opt = W("pedantic"), .extra = .str, .kind = .off },
989 .{ .msg = "argument type '{s}' is not a real floating point type", .extra = .str, .kind = .@"error" },
990 .{ .msg = "arguments are of different types ({s})", .extra = .str, .kind = .@"error" },
991 .{ .msg = "#include resolved using non-portable Microsoft search rules as: {s}", .extra = .str, .opt = W("microsoft-include"), .kind = .warning },
992 .{ .msg = "treating Ctrl-Z as end-of-file is a Microsoft extension", .opt = W("microsoft-end-of-file"), .kind = .off, .pedantic = true },
993 .{ .msg = "illegal character encoding in character literal", .opt = W("invalid-source-encoding"), .kind = .warning },
994 .{ .msg = "illegal character encoding in character literal", .kind = .@"error" },
995 .{ .msg = "character '{c}' cannot be specified by a universal character name", .kind = .@"error", .extra = .ascii },
996 .{ .msg = "specifying character '{c}' with a universal character name is incompatible with C standards before C23", .kind = .off, .extra = .ascii, .suppress_unless_version = .c23, .opt = W("pre-c23-compat") },
997 .{ .msg = "universal character name refers to a control character", .kind = .@"error" },
998 .{ .msg = "universal character name referring to a control character is incompatible with C standards before C23", .kind = .off, .suppress_unless_version = .c23, .opt = W("pre-c23-compat") },
999 .{ .msg = "universal character names are only valid in C99 or later", .suppress_version = .c99, .kind = .warning, .opt = W("unicode") },
1000 .{ .msg = "multi-character character constant", .opt = W("four-char-constants"), .kind = .off },
1001 .{ .msg = "multi-character character constant", .kind = .off },
1002 .{ .msg = "\\{c} used with no following hex digits", .kind = .@"error", .extra = .ascii },
1003 .{ .msg = "unknown escape sequence '\\{s}'", .kind = .warning, .opt = W("unknown-escape-sequence"), .extra = .invalid_escape },
1004 .{ .msg = "attribute '{s}' requires an ordinary string", .kind = .@"error", .extra = .str },
1005 .{ .msg = "missing terminating '\"' character", .kind = .warning, .opt = W("invalid-pp-token") },
1006 .{ .msg = "missing terminating '\"' character", .kind = .@"error" },
1007 .{ .msg = "empty character constant", .kind = .warning, .opt = W("invalid-pp-token") },
1008 .{ .msg = "empty character constant", .kind = .@"error" },
1009 .{ .msg = "missing terminating ' character", .kind = .warning, .opt = W("invalid-pp-token") },
1010 .{ .msg = "missing terminating ' character", .kind = .@"error" },
1011 .{ .msg = "unterminated comment", .kind = .@"error" },
1012 .{ .msg = "a function definition without a prototype is deprecated in all versions of C and is not supported in C23", .kind = .warning, .opt = W("deprecated-non-prototype") },
1013 .{ .msg = "passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C23", .kind = .warning, .opt = W("deprecated-non-prototype") },
1014 .{ .msg = "unknown type name '{s}'", .kind = .@"error", .extra = .str },
1015 .{ .msg = "label at end of compound statement is a C23 extension", .opt = W("c23-extensions"), .kind = .warning, .suppress_version = .c23 },
1016 .{ .msg = "UTF-8 character literal is a C23 extension", .opt = W("c23-extensions"), .kind = .warning, .suppress_version = .c23 },
1017 .{ .msg = "unexpected token in embed parameter", .kind = .@"error" },
1018 .{ .msg = "the limit parameter expects one non-negative integer as a parameter", .kind = .@"error" },
1019 .{ .msg = "duplicate embed parameter '{s}'", .kind = .warning, .extra = .str, .opt = W("duplicate-embed-param") },
1020 .{ .msg = "unsupported embed parameter '{s}' embed parameter", .kind = .warning, .extra = .str, .opt = W("unsupported-embed-param") },
1021 .{ .msg = "compound literal cannot have {s} storage class", .kind = .@"error", .extra = .str },
1022 .{ .msg = "missing '(' following __VA_OPT__", .kind = .@"error" },
1023 .{ .msg = "unterminated __VA_OPT__ argument list", .kind = .@"error" },
1024 .{ .msg = "attribute value '{s}' out of range", .kind = .@"error", .extra = .str },
1025 .{ .msg = "'{s}' is not in NFC", .kind = .warning, .extra = .normalized, .opt = W("normalized") },
1026 .{ .msg = "'auto' requires a plain identifier declarator", .kind = .@"error" },
1027 .{ .msg = "'auto' can only be used with a single declarator", .kind = .@"error" },
1028 .{ .msg = "'auto' requires an initializer", .kind = .@"error" },
1029 .{ .msg = "'auto' requires a scalar initializer", .kind = .@"error" },
1030 .{ .msg = "shift count is negative", .opt = W("shift-count-negative"), .kind = .warning, .all = true },
1031 .{ .msg = "shift count >= width of type", .opt = W("shift-count-overflow"), .kind = .warning, .all = true },
1032 .{ .msg = "ISO C does not support '~' for complex conjugation of '{s}'", .opt = W("pedantic"), .extra = .str, .kind = .off },
1033 .{ .msg = "operand argument to overflow builtin must be an integer ('{s}' invalid)", .extra = .str, .kind = .@"error" },
1034 .{ .msg = "result argument to overflow builtin must be a pointer to a non-const integer ('{s}' invalid)", .extra = .str, .kind = .@"error" },
1035 .{ .msg = "TODO: implement '{s}' attribute for {s}", .extra = .attribute_todo, .kind = .@"error" },
1036 .{ .msg = "non-integral type '{s}' is an invalid underlying type", .extra = .str, .kind = .@"error" },
1037 .{ .msg = "variable '{s}' declared with deduced type '__auto_type' cannot appear in its own initializer", .extra = .str, .kind = .@"error" },
1038 };
1039};
1040};
1041}
lib/compiler/aro/aro/Driver.zig+628-175
......@@ -2,17 +2,23 @@ const std = @import("std");
22const mem = std.mem;
33const Allocator = mem.Allocator;
44const process = std.process;
5
56const backend = @import("../backend.zig");
7const Assembly = backend.Assembly;
68const Ir = backend.Ir;
79const Object = backend.Object;
10
811const Compilation = @import("Compilation.zig");
912const Diagnostics = @import("Diagnostics.zig");
13const GCCVersion = @import("Driver/GCCVersion.zig");
1014const LangOpts = @import("LangOpts.zig");
1115const Preprocessor = @import("Preprocessor.zig");
1216const Source = @import("Source.zig");
13const Toolchain = @import("Toolchain.zig");
1417const target_util = @import("target.zig");
15const GCCVersion = @import("Driver/GCCVersion.zig");
18const Toolchain = @import("Toolchain.zig");
19const Tree = @import("Tree.zig");
20
21const AsmCodeGenFn = fn (target: std.Target, tree: *const Tree) Compilation.Error!Assembly;
1622
1723pub const Linker = enum {
1824 ld,
......@@ -22,13 +28,27 @@ pub const Linker = enum {
2228 mold,
2329};
2430
31const pic_related_options = std.StaticStringMap(void).initComptime(.{
32 .{"-fpic"},
33 .{"-fno-pic"},
34 .{"-fPIC"},
35 .{"-fno-PIC"},
36 .{"-fpie"},
37 .{"-fno-pie"},
38 .{"-fPIE"},
39 .{"-fno-PIE"},
40});
41
2542const Driver = @This();
2643
2744comp: *Compilation,
28inputs: std.ArrayListUnmanaged(Source) = .empty,
29link_objects: std.ArrayListUnmanaged([]const u8) = .empty,
45diagnostics: *Diagnostics,
46
47inputs: std.ArrayListUnmanaged(Source) = .{},
48link_objects: std.ArrayListUnmanaged([]const u8) = .{},
3049output_name: ?[]const u8 = null,
3150sysroot: ?[]const u8 = null,
51resource_dir: ?[]const u8 = null,
3252system_defines: Compilation.SystemDefinesMode = .include_system_defines,
3353temp_file_count: u32 = 0,
3454/// If false, do not emit line directives in -E mode
......@@ -47,6 +67,13 @@ color: ?bool = null,
4767nobuiltininc: bool = false,
4868nostdinc: bool = false,
4969nostdlibinc: bool = false,
70apple_kext: bool = false,
71mkernel: bool = false,
72mabicalls: ?bool = null,
73dynamic_nopic: ?bool = null,
74ropi: bool = false,
75rwpi: bool = false,
76cmodel: std.builtin.CodeModel = .default,
5077debug_dump_letters: packed struct(u3) {
5178 d: bool = false,
5279 m: bool = false,
......@@ -68,6 +95,9 @@ aro_name: []const u8 = "",
6895/// Value of --triple= passed via CLI
6996raw_target_triple: ?[]const u8 = null,
7097
98/// Non-optimizing assembly backend is currently selected by passing `-O0`
99use_assembly_backend: bool = false,
100
71101// linker options
72102use_linker: ?[]const u8 = null,
73103linker_path: ?[]const u8 = null,
......@@ -101,8 +131,8 @@ pub const usage =
101131 \\Usage {s}: [options] file..
102132 \\
103133 \\General options:
104 \\ -h, --help Print this message.
105 \\ -v, --version Print aro version.
134 \\ --help Print this message
135 \\ --version Print aro version
106136 \\
107137 \\Compile options:
108138 \\ -c, --compile Only run preprocess, compile, and assemble steps
......@@ -111,10 +141,13 @@ pub const usage =
111141 \\ -dN Like -dD, but emit only the macro names, not their expansions.
112142 \\ -D <macro>=<value> Define <macro> to <value> (defaults to 1)
113143 \\ -E Only run the preprocessor
144 \\ -fapple-kext Use Apple's kernel extensions ABI
114145 \\ -fchar8_t Enable char8_t (enabled by default in C23 and later)
115146 \\ -fno-char8_t Disable char8_t (disabled by default for pre-C23)
116147 \\ -fcolor-diagnostics Enable colors in diagnostics
117148 \\ -fno-color-diagnostics Disable colors in diagnostics
149 \\ -fcommon Place uninitialized global variables in a common block
150 \\ -fno-common Place uninitialized global variables in the BSS section of the object file
118151 \\ -fdeclspec Enable support for __declspec attributes
119152 \\ -fgnuc-version=<value> Controls value of __GNUC__ and related macros. Set to 0 or empty to disable them.
120153 \\ -fno-declspec Disable support for __declspec attributes
......@@ -126,15 +159,24 @@ pub const usage =
126159 \\ -fhosted Compilation in a hosted environment
127160 \\ -fms-extensions Enable support for Microsoft extensions
128161 \\ -fno-ms-extensions Disable support for Microsoft extensions
129 \\ -fdollars-in-identifiers
162 \\ -fdollars-in-identifiers
130163 \\ Allow '$' in identifiers
131 \\ -fno-dollars-in-identifiers
164 \\ -fno-dollars-in-identifiers
132165 \\ Disallow '$' in identifiers
166 \\ -g Generate debug information
133167 \\ -fmacro-backtrace-limit=<limit>
134168 \\ Set limit on how many macro expansion traces are shown in errors (default 6)
135169 \\ -fnative-half-type Use the native half type for __fp16 instead of promoting to float
136170 \\ -fnative-half-arguments-and-returns
137171 \\ Allow half-precision function arguments and return values
172 \\ -fpic Generate position-independent code (PIC) suitable for use in a shared library, if supported for the target machine
173 \\ -fPIC Similar to -fpic but avoid any limit on the size of the global offset table
174 \\ -fpie Similar to -fpic, but the generated position-independent code can only be linked into executables
175 \\ -fPIE Similar to -fPIC, but the generated position-independent code can only be linked into executables
176 \\ -frwpi Generate read-write position independent code (ARM only)
177 \\ -fno-rwpi Disable generate read-write position independent code (ARM only).
178 \\ -fropi Generate read-only position independent code (ARM only)
179 \\ -fno-ropi Disable generate read-only position independent code (ARM only).
138180 \\ -fshort-enums Use the narrowest possible integer type for enums
139181 \\ -fno-short-enums Use "int" as the tag type for enums
140182 \\ -fsigned-char "char" is signed
......@@ -146,16 +188,26 @@ pub const usage =
146188 \\ -fno-use-line-directives
147189 \\ Use `# <num>` linemarkers in preprocessed output
148190 \\ -I <dir> Add directory to include search path
149 \\ -isystem Add directory to SYSTEM include search path
191 \\ -idirafter <dir> Add directory to AFTER include search path
192 \\ -isystem <dir> Add directory to SYSTEM include search path
193 \\ -F <dir> Add directory to macOS framework search path
194 \\ -iframework <dir> Add directory to SYSTEM macOS framework search path
195 \\ --embed-dir=<dir> Add directory to `#embed` search path
150196 \\ --emulate=[clang|gcc|msvc]
151197 \\ Select which C compiler to emulate (default clang)
198 \\ -mabicalls Enable SVR4-style position-independent code (Mips only)
199 \\ -mno-abicalls Disable SVR4-style position-independent code (Mips only)
200 \\ -mcmodel=<code-model> Generate code for the given code model
201 \\ -mkernel Enable kernel development mode
152202 \\ -nobuiltininc Do not search the compiler's builtin directory for include files
203 \\ -resource-dir <dir> Override the path to the compiler's builtin resource directory
153204 \\ -nostdinc, --no-standard-includes
154205 \\ Do not search the standard system directories or compiler builtin directories for include files.
155206 \\ -nostdlibinc Do not search the standard system directories for include files, but do search compiler builtin include directories
156207 \\ -o <file> Write output to <file>
157208 \\ -P, --no-line-commands Disable linemarker output in -E mode
158209 \\ -pedantic Warn on language extensions
210 \\ -pedantic-errors Error on language extensions
159211 \\ --rtlib=<arg> Compiler runtime library to use (libgcc or compiler-rt)
160212 \\ -std=<standard> Specify language standard
161213 \\ -S, --assemble Only run preprocess and compilation steps
......@@ -163,6 +215,7 @@ pub const usage =
163215 \\ --target=<value> Generate code for the given target
164216 \\ -U <macro> Undefine <macro>
165217 \\ -undef Do not predefine any system-specific macros. Standard predefined macros remain defined.
218 \\ -w Ignore all warnings
166219 \\ -Werror Treat all warnings as errors
167220 \\ -Werror=<warning> Treat warning as error
168221 \\ -W<warning> Enable the specified warning
......@@ -199,33 +252,34 @@ pub const usage =
199252/// Process command line arguments, returns true if something was written to std_out.
200253pub fn parseArgs(
201254 d: *Driver,
202 std_out: anytype,
203 macro_buf: anytype,
255 stdout: *std.Io.Writer,
256 macro_buf: *std.ArrayListUnmanaged(u8),
204257 args: []const []const u8,
205) !bool {
258) (Compilation.Error || std.Io.Writer.Error)!bool {
206259 var i: usize = 1;
207260 var comment_arg: []const u8 = "";
208261 var hosted: ?bool = null;
209262 var gnuc_version: []const u8 = "4.2.1"; // default value set by clang
263 var pic_arg: []const u8 = "";
264 var declspec_attrs: ?bool = null;
265 var ms_extensions: ?bool = null;
210266 while (i < args.len) : (i += 1) {
211267 const arg = args[i];
212268 if (mem.startsWith(u8, arg, "-") and arg.len > 1) {
213 if (mem.eql(u8, arg, "-h") or mem.eql(u8, arg, "--help")) {
214 std_out.print(usage, .{args[0]}) catch |er| {
215 return d.fatal("unable to print usage: {s}", .{errorDescription(er)});
216 };
269 if (mem.eql(u8, arg, "--help")) {
270 try stdout.print(usage, .{args[0]});
271 try stdout.flush();
217272 return true;
218 } else if (mem.eql(u8, arg, "-v") or mem.eql(u8, arg, "--version")) {
219 std_out.writeAll(@import("../backend.zig").version_str ++ "\n") catch |er| {
220 return d.fatal("unable to print version: {s}", .{errorDescription(er)});
221 };
273 } else if (mem.eql(u8, arg, "--version")) {
274 try stdout.writeAll(@import("../backend.zig").version_str ++ "\n");
275 try stdout.flush();
222276 return true;
223277 } else if (mem.startsWith(u8, arg, "-D")) {
224278 var macro = arg["-D".len..];
225279 if (macro.len == 0) {
226280 i += 1;
227281 if (i >= args.len) {
228 try d.err("expected argument after -I");
282 try d.err("expected argument after -D", .{});
229283 continue;
230284 }
231285 macro = args[i];
......@@ -235,18 +289,26 @@ pub fn parseArgs(
235289 value = macro[some + 1 ..];
236290 macro = macro[0..some];
237291 }
238 try macro_buf.print("#define {s} {s}\n", .{ macro, value });
292 try macro_buf.print(d.comp.gpa, "#define {s} {s}\n", .{ macro, value });
239293 } else if (mem.startsWith(u8, arg, "-U")) {
240294 var macro = arg["-U".len..];
241295 if (macro.len == 0) {
242296 i += 1;
243297 if (i >= args.len) {
244 try d.err("expected argument after -I");
298 try d.err("expected argument after -U", .{});
245299 continue;
246300 }
247301 macro = args[i];
248302 }
249 try macro_buf.print("#undef {s}\n", .{macro});
303 try macro_buf.print(d.comp.gpa, "#undef {s}\n", .{macro});
304 } else if (mem.eql(u8, arg, "-O")) {
305 d.comp.code_gen_options.optimization_level = .@"0";
306 } else if (mem.startsWith(u8, arg, "-O")) {
307 d.comp.code_gen_options.optimization_level = backend.CodeGenOptions.OptimizationLevel.fromString(arg["-O".len..]) orelse {
308 try d.err("invalid optimization level '{s}'", .{arg});
309 continue;
310 };
311 d.use_assembly_backend = d.comp.code_gen_options.optimization_level == .@"0";
250312 } else if (mem.eql(u8, arg, "-undef")) {
251313 d.system_defines = .no_system_defines;
252314 } else if (mem.eql(u8, arg, "-c") or mem.eql(u8, arg, "--compile")) {
......@@ -265,6 +327,19 @@ pub fn parseArgs(
265327 d.use_line_directives = true;
266328 } else if (mem.eql(u8, arg, "-fno-use-line-directives")) {
267329 d.use_line_directives = false;
330 } else if (mem.eql(u8, arg, "-fapple-kext")) {
331 d.apple_kext = true;
332 } else if (option(arg, "-mcmodel=")) |cmodel| {
333 d.cmodel = std.meta.stringToEnum(std.builtin.CodeModel, cmodel) orelse
334 return d.fatal("unsupported machine code model: '{s}'", .{arg});
335 } else if (mem.eql(u8, arg, "-mkernel")) {
336 d.mkernel = true;
337 } else if (mem.eql(u8, arg, "-mdynamic-no-pic")) {
338 d.dynamic_nopic = true;
339 } else if (mem.eql(u8, arg, "-mabicalls")) {
340 d.mabicalls = true;
341 } else if (mem.eql(u8, arg, "-mno-abicalls")) {
342 d.mabicalls = false;
268343 } else if (mem.eql(u8, arg, "-fchar8_t")) {
269344 d.comp.langopts.has_char8_t_override = true;
270345 } else if (mem.eql(u8, arg, "-fno-char8_t")) {
......@@ -273,30 +348,48 @@ pub fn parseArgs(
273348 d.color = true;
274349 } else if (mem.eql(u8, arg, "-fno-color-diagnostics")) {
275350 d.color = false;
351 } else if (mem.eql(u8, arg, "-fcommon")) {
352 d.comp.code_gen_options.common = true;
353 } else if (mem.eql(u8, arg, "-fno-common")) {
354 d.comp.code_gen_options.common = false;
276355 } else if (mem.eql(u8, arg, "-fdollars-in-identifiers")) {
277356 d.comp.langopts.dollars_in_identifiers = true;
278357 } else if (mem.eql(u8, arg, "-fno-dollars-in-identifiers")) {
279358 d.comp.langopts.dollars_in_identifiers = false;
359 } else if (mem.eql(u8, arg, "-g")) {
360 d.comp.code_gen_options.debug = true;
361 } else if (mem.eql(u8, arg, "-g0")) {
362 d.comp.code_gen_options.debug = false;
280363 } else if (mem.eql(u8, arg, "-fdigraphs")) {
281364 d.comp.langopts.digraphs = true;
365 } else if (mem.eql(u8, arg, "-fno-digraphs")) {
366 d.comp.langopts.digraphs = false;
282367 } else if (mem.eql(u8, arg, "-fgnu-inline-asm")) {
283368 d.comp.langopts.gnu_asm = true;
284369 } else if (mem.eql(u8, arg, "-fno-gnu-inline-asm")) {
285370 d.comp.langopts.gnu_asm = false;
286 } else if (mem.eql(u8, arg, "-fno-digraphs")) {
287 d.comp.langopts.digraphs = false;
288371 } else if (option(arg, "-fmacro-backtrace-limit=")) |limit_str| {
289372 var limit = std.fmt.parseInt(u32, limit_str, 10) catch {
290 try d.err("-fmacro-backtrace-limit takes a number argument");
373 try d.err("-fmacro-backtrace-limit takes a number argument", .{});
291374 continue;
292375 };
293376
294377 if (limit == 0) limit = std.math.maxInt(u32);
295 d.comp.diagnostics.macro_backtrace_limit = limit;
378 d.diagnostics.macro_backtrace_limit = limit;
296379 } else if (mem.eql(u8, arg, "-fnative-half-type")) {
297380 d.comp.langopts.use_native_half_type = true;
298381 } else if (mem.eql(u8, arg, "-fnative-half-arguments-and-returns")) {
299382 d.comp.langopts.allow_half_args_and_returns = true;
383 } else if (pic_related_options.has(arg)) {
384 pic_arg = arg;
385 } else if (mem.eql(u8, arg, "-fropi")) {
386 d.ropi = true;
387 } else if (mem.eql(u8, arg, "-fno-ropi")) {
388 d.ropi = false;
389 } else if (mem.eql(u8, arg, "-frwpi")) {
390 d.rwpi = true;
391 } else if (mem.eql(u8, arg, "-fno-rwpi")) {
392 d.rwpi = false;
300393 } else if (mem.eql(u8, arg, "-fshort-enums")) {
301394 d.comp.langopts.short_enums = true;
302395 } else if (mem.eql(u8, arg, "-fno-short-enums")) {
......@@ -310,59 +403,97 @@ pub fn parseArgs(
310403 } else if (mem.eql(u8, arg, "-fno-unsigned-char")) {
311404 d.comp.langopts.setCharSignedness(.signed);
312405 } else if (mem.eql(u8, arg, "-fdeclspec")) {
313 d.comp.langopts.declspec_attrs = true;
406 declspec_attrs = true;
314407 } else if (mem.eql(u8, arg, "-fno-declspec")) {
315 d.comp.langopts.declspec_attrs = false;
408 declspec_attrs = false;
316409 } else if (mem.eql(u8, arg, "-ffreestanding")) {
317410 hosted = false;
318411 } else if (mem.eql(u8, arg, "-fhosted")) {
319412 hosted = true;
320413 } else if (mem.eql(u8, arg, "-fms-extensions")) {
321 d.comp.langopts.enableMSExtensions();
414 ms_extensions = true;
322415 } else if (mem.eql(u8, arg, "-fno-ms-extensions")) {
323 d.comp.langopts.disableMSExtensions();
416 ms_extensions = false;
417 } else if (mem.startsWith(u8, arg, "-fsyntax-only")) {
418 d.only_syntax = true;
419 } else if (mem.startsWith(u8, arg, "-fno-syntax-only")) {
420 d.only_syntax = false;
421 } else if (mem.eql(u8, arg, "-fgnuc-version=")) {
422 gnuc_version = "0";
423 } else if (option(arg, "-fgnuc-version=")) |version| {
424 gnuc_version = version;
324425 } else if (mem.startsWith(u8, arg, "-I")) {
325426 var path = arg["-I".len..];
326427 if (path.len == 0) {
327428 i += 1;
328429 if (i >= args.len) {
329 try d.err("expected argument after -I");
430 try d.err("expected argument after -I", .{});
330431 continue;
331432 }
332433 path = args[i];
333434 }
334435 try d.comp.include_dirs.append(d.comp.gpa, path);
335 } else if (mem.startsWith(u8, arg, "-fsyntax-only")) {
336 d.only_syntax = true;
337 } else if (mem.startsWith(u8, arg, "-fno-syntax-only")) {
338 d.only_syntax = false;
339 } else if (mem.eql(u8, arg, "-fgnuc-version=")) {
340 gnuc_version = "0";
341 } else if (option(arg, "-fgnuc-version=")) |version| {
342 gnuc_version = version;
436 } else if (mem.startsWith(u8, arg, "-idirafter")) {
437 var path = arg["-idirafter".len..];
438 if (path.len == 0) {
439 i += 1;
440 if (i >= args.len) {
441 try d.err("expected argument after -idirafter", .{});
442 continue;
443 }
444 path = args[i];
445 }
446 try d.comp.after_include_dirs.append(d.comp.gpa, path);
343447 } else if (mem.startsWith(u8, arg, "-isystem")) {
344448 var path = arg["-isystem".len..];
345449 if (path.len == 0) {
346450 i += 1;
347451 if (i >= args.len) {
348 try d.err("expected argument after -isystem");
452 try d.err("expected argument after -isystem", .{});
453 continue;
454 }
455 path = args[i];
456 }
457 try d.comp.system_include_dirs.append(d.comp.gpa, path);
458 } else if (mem.startsWith(u8, arg, "-F")) {
459 var path = arg["-F".len..];
460 if (path.len == 0) {
461 i += 1;
462 if (i >= args.len) {
463 try d.err("expected argument after -F", .{});
464 continue;
465 }
466 path = args[i];
467 }
468 try d.comp.framework_dirs.append(d.comp.gpa, path);
469 } else if (mem.startsWith(u8, arg, "-iframework")) {
470 var path = arg["-iframework".len..];
471 if (path.len == 0) {
472 i += 1;
473 if (i >= args.len) {
474 try d.err("expected argument after -iframework", .{});
349475 continue;
350476 }
351477 path = args[i];
352478 }
353 const duped = try d.comp.gpa.dupe(u8, path);
354 errdefer d.comp.gpa.free(duped);
355 try d.comp.system_include_dirs.append(d.comp.gpa, duped);
479 try d.comp.system_framework_dirs.append(d.comp.gpa, path);
480 } else if (option(arg, "--embed-dir=")) |path| {
481 try d.comp.embed_dirs.append(d.comp.gpa, path);
356482 } else if (option(arg, "--emulate=")) |compiler_str| {
357483 const compiler = std.meta.stringToEnum(LangOpts.Compiler, compiler_str) orelse {
358 try d.comp.addDiagnostic(.{ .tag = .cli_invalid_emulate, .extra = .{ .str = arg } }, &.{});
484 try d.err("invalid compiler '{s}'", .{arg});
359485 continue;
360486 };
361487 d.comp.langopts.setEmulatedCompiler(compiler);
488 switch (d.comp.langopts.emulate) {
489 .clang => try d.diagnostics.set("clang", .off),
490 .gcc => try d.diagnostics.set("gnu", .off),
491 .msvc => try d.diagnostics.set("microsoft", .off),
492 }
362493 } else if (option(arg, "-ffp-eval-method=")) |fp_method_str| {
363494 const fp_eval_method = std.meta.stringToEnum(LangOpts.FPEvalMethod, fp_method_str) orelse .indeterminate;
364495 if (fp_eval_method == .indeterminate) {
365 try d.comp.addDiagnostic(.{ .tag = .cli_invalid_fp_eval_method, .extra = .{ .str = fp_method_str } }, &.{});
496 try d.err("unsupported argument '{s}' to option '-ffp-eval-method='; expected 'source', 'double', or 'extended'", .{fp_method_str});
366497 continue;
367498 }
368499 d.comp.langopts.setFpEvalMethod(fp_eval_method);
......@@ -371,7 +502,7 @@ pub fn parseArgs(
371502 if (file.len == 0) {
372503 i += 1;
373504 if (i >= args.len) {
374 try d.err("expected argument after -o");
505 try d.err("expected argument after -o", .{});
375506 continue;
376507 }
377508 file = args[i];
......@@ -380,38 +511,51 @@ pub fn parseArgs(
380511 } else if (option(arg, "--sysroot=")) |sysroot| {
381512 d.sysroot = sysroot;
382513 } else if (mem.eql(u8, arg, "-pedantic")) {
383 d.comp.diagnostics.options.pedantic = .warning;
514 d.diagnostics.state.extensions = .warning;
515 } else if (mem.eql(u8, arg, "-pedantic-errors")) {
516 d.diagnostics.state.extensions = .@"error";
517 } else if (mem.eql(u8, arg, "-w")) {
518 d.diagnostics.state.ignore_warnings = true;
384519 } else if (option(arg, "--rtlib=")) |rtlib| {
385520 if (mem.eql(u8, rtlib, "compiler-rt") or mem.eql(u8, rtlib, "libgcc") or mem.eql(u8, rtlib, "platform")) {
386521 d.rtlib = rtlib;
387522 } else {
388 try d.comp.addDiagnostic(.{ .tag = .invalid_rtlib, .extra = .{ .str = rtlib } }, &.{});
523 try d.err("invalid runtime library name '{s}'", .{rtlib});
389524 }
390 } else if (option(arg, "-Werror=")) |err_name| {
391 try d.comp.diagnostics.set(err_name, .@"error");
392525 } else if (mem.eql(u8, arg, "-Wno-fatal-errors")) {
393 d.comp.diagnostics.fatal_errors = false;
394 } else if (option(arg, "-Wno-")) |err_name| {
395 try d.comp.diagnostics.set(err_name, .off);
526 d.diagnostics.state.fatal_errors = false;
396527 } else if (mem.eql(u8, arg, "-Wfatal-errors")) {
397 d.comp.diagnostics.fatal_errors = true;
528 d.diagnostics.state.fatal_errors = true;
529 } else if (mem.eql(u8, arg, "-Wno-everything")) {
530 d.diagnostics.state.enable_all_warnings = false;
531 } else if (mem.eql(u8, arg, "-Weverything")) {
532 d.diagnostics.state.enable_all_warnings = true;
533 } else if (mem.eql(u8, arg, "-Werror")) {
534 d.diagnostics.state.error_warnings = true;
535 } else if (mem.eql(u8, arg, "-Wno-error")) {
536 d.diagnostics.state.error_warnings = false;
537 } else if (option(arg, "-Werror=")) |err_name| {
538 try d.diagnostics.set(err_name, .@"error");
539 } else if (option(arg, "-Wno-error=")) |err_name| {
540 // TODO this should not set to warning if the option has not been specified.
541 try d.diagnostics.set(err_name, .warning);
542 } else if (option(arg, "-Wno-")) |err_name| {
543 try d.diagnostics.set(err_name, .off);
398544 } else if (option(arg, "-W")) |err_name| {
399 try d.comp.diagnostics.set(err_name, .warning);
545 try d.diagnostics.set(err_name, .warning);
400546 } else if (option(arg, "-std=")) |standard| {
401547 d.comp.langopts.setStandard(standard) catch
402 try d.comp.addDiagnostic(.{ .tag = .cli_invalid_standard, .extra = .{ .str = arg } }, &.{});
548 try d.err("invalid standard '{s}'", .{arg});
403549 } else if (mem.eql(u8, arg, "-S") or mem.eql(u8, arg, "--assemble")) {
404550 d.only_preprocess_and_compile = true;
405 } else if (option(arg, "--target=")) |triple| {
406 const query = std.Target.Query.parse(.{ .arch_os_abi = triple }) catch {
407 try d.comp.addDiagnostic(.{ .tag = .cli_invalid_target, .extra = .{ .str = arg } }, &.{});
551 } else if (mem.eql(u8, arg, "-target")) {
552 i += 1;
553 if (i >= args.len) {
554 try d.err("expected argument after -target", .{});
408555 continue;
409 };
410 const target = std.zig.system.resolveTargetQuery(query) catch |e| {
411 return d.fatal("unable to resolve target: {s}", .{errorDescription(e)});
412 };
413 d.comp.target = target;
414 d.comp.langopts.setEmulatedCompiler(target_util.systemCompiler(target));
556 }
557 d.raw_target_triple = args[i];
558 } else if (option(arg, "--target=")) |triple| {
415559 d.raw_target_triple = triple;
416560 } else if (mem.eql(u8, arg, "--verbose-ast")) {
417561 d.verbose_ast = true;
......@@ -460,6 +604,13 @@ pub fn parseArgs(
460604 d.nolibc = true;
461605 } else if (mem.eql(u8, arg, "-nobuiltininc")) {
462606 d.nobuiltininc = true;
607 } else if (mem.eql(u8, arg, "-resource-dir")) {
608 i += 1;
609 if (i >= args.len) {
610 try d.err("expected argument after -resource-dir", .{});
611 continue;
612 }
613 d.resource_dir = args[i];
463614 } else if (mem.eql(u8, arg, "-nostdinc") or mem.eql(u8, arg, "--no-standard-includes")) {
464615 d.nostdinc = true;
465616 } else if (mem.eql(u8, arg, "-nostdlibinc")) {
......@@ -476,10 +627,10 @@ pub fn parseArgs(
476627 break;
477628 }
478629 } else {
479 try d.comp.addDiagnostic(.{ .tag = .invalid_unwindlib, .extra = .{ .str = unwindlib } }, &.{});
630 try d.err("invalid unwind library name '{s}'", .{unwindlib});
480631 }
481632 } else {
482 try d.comp.addDiagnostic(.{ .tag = .cli_unknown_arg, .extra = .{ .str = arg } }, &.{});
633 try d.warn("unknown argument '{s}'", .{arg});
483634 }
484635 } else if (std.mem.endsWith(u8, arg, ".o") or std.mem.endsWith(u8, arg, ".obj")) {
485636 try d.link_objects.append(d.comp.gpa, arg);
......@@ -490,6 +641,23 @@ pub fn parseArgs(
490641 try d.inputs.append(d.comp.gpa, source);
491642 }
492643 }
644 if (d.raw_target_triple) |triple| triple: {
645 const query = std.Target.Query.parse(.{ .arch_os_abi = triple }) catch {
646 try d.err("invalid target '{s}'", .{triple});
647 d.raw_target_triple = null;
648 break :triple;
649 };
650 const target = std.zig.system.resolveTargetQuery(query) catch |e| {
651 return d.fatal("unable to resolve target: {s}", .{errorDescription(e)});
652 };
653 d.comp.target = target;
654 d.comp.langopts.setEmulatedCompiler(target_util.systemCompiler(target));
655 switch (d.comp.langopts.emulate) {
656 .clang => try d.diagnostics.set("clang", .off),
657 .gcc => try d.diagnostics.set("gnu", .off),
658 .msvc => try d.diagnostics.set("microsoft", .off),
659 }
660 }
493661 if (d.comp.langopts.preserve_comments and !d.only_preprocess) {
494662 return d.fatal("invalid argument '{s}' only allowed with '-E'", .{comment_arg});
495663 }
......@@ -507,6 +675,11 @@ pub fn parseArgs(
507675 return d.fatal("invalid value '{0s}' in '-fgnuc-version={0s}'", .{gnuc_version});
508676 }
509677 d.comp.langopts.gnuc_version = version.toUnsigned();
678 const pic_level, const is_pie = try d.getPICMode(pic_arg);
679 d.comp.code_gen_options.pic_level = pic_level;
680 d.comp.code_gen_options.is_pie = is_pie;
681 if (declspec_attrs) |some| d.comp.langopts.declspec_attrs = some;
682 if (ms_extensions) |some| d.comp.langopts.setMSExtensions(some);
510683 return false;
511684}
512685
......@@ -519,29 +692,59 @@ fn option(arg: []const u8, name: []const u8) ?[]const u8 {
519692
520693fn addSource(d: *Driver, path: []const u8) !Source {
521694 if (mem.eql(u8, "-", path)) {
522 var stdin_reader: std.fs.File.Reader = .initStreaming(.stdin(), &.{});
523 const input = try stdin_reader.interface.allocRemaining(d.comp.gpa, .limited(std.math.maxInt(u32)));
524 defer d.comp.gpa.free(input);
525 return d.comp.addSourceFromBuffer("<stdin>", input);
695 return d.comp.addSourceFromFile(.stdin(), "<stdin>", .user);
526696 }
527697 return d.comp.addSourceFromPath(path);
528698}
529699
530pub fn err(d: *Driver, msg: []const u8) !void {
531 try d.comp.addDiagnostic(.{ .tag = .cli_error, .extra = .{ .str = msg } }, &.{});
700pub fn err(d: *Driver, fmt: []const u8, args: anytype) Compilation.Error!void {
701 var sf = std.heap.stackFallback(1024, d.comp.gpa);
702 var allocating: std.Io.Writer.Allocating = .init(sf.get());
703 defer allocating.deinit();
704
705 Diagnostics.formatArgs(&allocating.writer, fmt, args) catch return error.OutOfMemory;
706 try d.diagnostics.add(.{ .kind = .@"error", .text = allocating.getWritten(), .location = null });
707}
708
709pub fn warn(d: *Driver, fmt: []const u8, args: anytype) Compilation.Error!void {
710 var sf = std.heap.stackFallback(1024, d.comp.gpa);
711 var allocating: std.Io.Writer.Allocating = .init(sf.get());
712 defer allocating.deinit();
713
714 Diagnostics.formatArgs(&allocating.writer, fmt, args) catch return error.OutOfMemory;
715 try d.diagnostics.add(.{ .kind = .warning, .text = allocating.getWritten(), .location = null });
716}
717
718pub fn unsupportedOptionForTarget(d: *Driver, target: std.Target, opt: []const u8) Compilation.Error!void {
719 try d.err(
720 "unsupported option '{s}' for target '{s}-{s}-{s}'",
721 .{ opt, @tagName(target.cpu.arch), @tagName(target.os.tag), @tagName(target.abi) },
722 );
532723}
533724
534725pub fn fatal(d: *Driver, comptime fmt: []const u8, args: anytype) error{ FatalError, OutOfMemory } {
535 try d.comp.diagnostics.list.append(d.comp.gpa, .{
536 .tag = .cli_error,
537 .kind = .@"fatal error",
538 .extra = .{ .str = try std.fmt.allocPrint(d.comp.diagnostics.arena.allocator(), fmt, args) },
539 });
540 return error.FatalError;
726 var sf = std.heap.stackFallback(1024, d.comp.gpa);
727 var allocating: std.Io.Writer.Allocating = .init(sf.get());
728 defer allocating.deinit();
729
730 Diagnostics.formatArgs(&allocating.writer, fmt, args) catch return error.OutOfMemory;
731 try d.diagnostics.add(.{ .kind = .@"fatal error", .text = allocating.getWritten(), .location = null });
732 unreachable;
541733}
542734
543pub fn renderErrors(d: *Driver) void {
544 Diagnostics.render(d.comp, d.detectConfig(std.fs.File.stderr()));
735pub fn printDiagnosticsStats(d: *Driver) void {
736 const warnings = d.diagnostics.warnings;
737 const errors = d.diagnostics.errors;
738
739 const w_s: []const u8 = if (warnings == 1) "" else "s";
740 const e_s: []const u8 = if (errors == 1) "" else "s";
741 if (errors != 0 and warnings != 0) {
742 std.debug.print("{d} warning{s} and {d} error{s} generated.\n", .{ warnings, w_s, errors, e_s });
743 } else if (warnings != 0) {
744 std.debug.print("{d} warning{s} generated.\n", .{ warnings, w_s });
745 } else if (errors != 0) {
746 std.debug.print("{d} error{s} generated.\n", .{ errors, e_s });
747 }
545748}
546749
547750pub fn detectConfig(d: *Driver, file: std.fs.File) std.Io.tty.Config {
......@@ -589,12 +792,26 @@ var stdout_buffer: [4096]u8 = undefined;
589792
590793/// The entry point of the Aro compiler.
591794/// **MAY call `exit` if `fast_exit` is set.**
592pub fn main(d: *Driver, tc: *Toolchain, args: []const []const u8, comptime fast_exit: bool) !void {
593 var macro_buf = std.array_list.Managed(u8).init(d.comp.gpa);
594 defer macro_buf.deinit();
795pub fn main(d: *Driver, tc: *Toolchain, args: []const []const u8, comptime fast_exit: bool, asm_gen_fn: ?AsmCodeGenFn) Compilation.Error!void {
796 const user_macros = macros: {
797 var macro_buf: std.ArrayListUnmanaged(u8) = .empty;
798 defer macro_buf.deinit(d.comp.gpa);
595799
596 const std_out = std.fs.File.stdout().deprecatedWriter();
597 if (try parseArgs(d, std_out, macro_buf.writer(), args)) return;
800 var stdout_buf: [256]u8 = undefined;
801 var stdout = std.fs.File.stdout().writer(&stdout_buf);
802 if (parseArgs(d, &stdout.interface, &macro_buf, args) catch |er| switch (er) {
803 error.WriteFailed => return d.fatal("failed to write to stdout: {s}", .{errorDescription(er)}),
804 error.OutOfMemory => return error.OutOfMemory,
805 error.FatalError => return error.FatalError,
806 }) return;
807 if (macro_buf.items.len > std.math.maxInt(u32)) {
808 return d.fatal("user provided macro source exceeded max size", .{});
809 }
810 const contents = try macro_buf.toOwnedSlice(d.comp.gpa);
811 errdefer d.comp.gpa.free(contents);
812
813 break :macros try d.comp.addSourceFromOwnedBuffer("<command line>", contents, .user);
814 };
598815
599816 const linking = !(d.only_preprocess or d.only_syntax or d.only_compile or d.only_preprocess_and_compile);
600817
......@@ -605,38 +822,31 @@ pub fn main(d: *Driver, tc: *Toolchain, args: []const []const u8, comptime fast_
605822 }
606823
607824 if (!linking) for (d.link_objects.items) |obj| {
608 try d.comp.addDiagnostic(.{ .tag = .cli_unused_link_object, .extra = .{ .str = obj } }, &.{});
825 try d.err("{s}: linker input file unused because linking not done", .{obj});
609826 };
610827
611 try tc.discover();
828 tc.discover() catch |er| switch (er) {
829 error.OutOfMemory => return error.OutOfMemory,
830 error.TooManyMultilibs => return d.fatal("found more than one multilib with the same priority", .{}),
831 };
612832 tc.defineSystemIncludes() catch |er| switch (er) {
613833 error.OutOfMemory => return error.OutOfMemory,
614834 error.AroIncludeNotFound => return d.fatal("unable to find Aro builtin headers", .{}),
615835 };
616836
617 const builtin = try d.comp.generateBuiltinMacros(d.system_defines);
618 const user_macros = try d.comp.addSourceFromBuffer("<command line>", macro_buf.items);
619
837 const builtin_macros = d.comp.generateBuiltinMacros(d.system_defines) catch |er| switch (er) {
838 error.FileTooBig => return d.fatal("builtin macro source exceeded max size", .{}),
839 else => |e| return e,
840 };
620841 if (fast_exit and d.inputs.items.len == 1) {
621 d.processSource(tc, d.inputs.items[0], builtin, user_macros, fast_exit) catch |e| switch (e) {
622 error.FatalError => {
623 d.renderErrors();
624 d.exitWithCleanup(1);
625 },
626 else => |er| return er,
627 };
842 try d.processSource(tc, d.inputs.items[0], builtin_macros, user_macros, fast_exit, asm_gen_fn);
628843 unreachable;
629844 }
630845
631846 for (d.inputs.items) |source| {
632 d.processSource(tc, source, builtin, user_macros, fast_exit) catch |e| switch (e) {
633 error.FatalError => {
634 d.renderErrors();
635 },
636 else => |er| return er,
637 };
847 try d.processSource(tc, source, builtin_macros, user_macros, fast_exit, asm_gen_fn);
638848 }
639 if (d.comp.diagnostics.errors != 0) {
849 if (d.diagnostics.errors != 0) {
640850 if (fast_exit) d.exitWithCleanup(1);
641851 return;
642852 }
......@@ -646,6 +856,65 @@ pub fn main(d: *Driver, tc: *Toolchain, args: []const []const u8, comptime fast_
646856 if (fast_exit) std.process.exit(0);
647857}
648858
859fn getRandomFilename(d: *Driver, buf: *[std.fs.max_name_bytes]u8, extension: []const u8) ![]const u8 {
860 const random_bytes_count = 12;
861 const sub_path_len = comptime std.fs.base64_encoder.calcSize(random_bytes_count);
862
863 var random_bytes: [random_bytes_count]u8 = undefined;
864 std.crypto.random.bytes(&random_bytes);
865 var random_name: [sub_path_len]u8 = undefined;
866 _ = std.fs.base64_encoder.encode(&random_name, &random_bytes);
867
868 const fmt_template = "/tmp/{s}{s}";
869 const fmt_args = .{
870 random_name,
871 extension,
872 };
873 return std.fmt.bufPrint(buf, fmt_template, fmt_args) catch return d.fatal("Filename too long for filesystem: " ++ fmt_template, fmt_args);
874}
875
876/// If it's used, buf will either hold a filename or `/tmp/<12 random bytes with base-64 encoding>.<extension>`
877/// both of which should fit into max_name_bytes for all systems
878fn getOutFileName(d: *Driver, source: Source, buf: *[std.fs.max_name_bytes]u8) ![]const u8 {
879 if (d.only_compile or d.only_preprocess_and_compile) {
880 const fmt_template = "{s}{s}";
881 const fmt_args = .{
882 std.fs.path.stem(source.path),
883 if (d.only_preprocess_and_compile) ".s" else d.comp.target.ofmt.fileExt(d.comp.target.cpu.arch),
884 };
885 return d.output_name orelse
886 std.fmt.bufPrint(buf, fmt_template, fmt_args) catch return d.fatal("Filename too long for filesystem: " ++ fmt_template, fmt_args);
887 }
888
889 return d.getRandomFilename(buf, d.comp.target.ofmt.fileExt(d.comp.target.cpu.arch));
890}
891
892fn invokeAssembler(d: *Driver, tc: *Toolchain, input_path: []const u8, output_path: []const u8) !void {
893 var assembler_path_buf: [std.fs.max_path_bytes]u8 = undefined;
894 const assembler_path = try tc.getAssemblerPath(&assembler_path_buf);
895 const argv = [_][]const u8{ assembler_path, input_path, "-o", output_path };
896
897 var child = std.process.Child.init(&argv, d.comp.gpa);
898 // TODO handle better
899 child.stdin_behavior = .Inherit;
900 child.stdout_behavior = .Inherit;
901 child.stderr_behavior = .Inherit;
902
903 const term = child.spawnAndWait() catch |er| {
904 return d.fatal("unable to spawn linker: {s}", .{errorDescription(er)});
905 };
906 switch (term) {
907 .Exited => |code| if (code != 0) {
908 const e = d.fatal("assembler exited with an error code", .{});
909 return e;
910 },
911 else => {
912 const e = d.fatal("assembler crashed", .{});
913 return e;
914 },
915 }
916}
917
649918fn processSource(
650919 d: *Driver,
651920 tc: *Toolchain,
......@@ -653,8 +922,11 @@ fn processSource(
653922 builtin: Source,
654923 user_macros: Source,
655924 comptime fast_exit: bool,
925 asm_gen_fn: ?AsmCodeGenFn,
656926) !void {
657927 d.comp.generated_buf.items.len = 0;
928 const prev_total = d.diagnostics.errors;
929
658930 var pp = try Preprocessor.initDefault(d.comp);
659931 defer pp.deinit();
660932
......@@ -677,15 +949,15 @@ fn processSource(
677949 try pp.preprocessSources(&.{ source, builtin, user_macros });
678950
679951 if (d.only_preprocess) {
680 d.renderErrors();
952 d.printDiagnosticsStats();
681953
682 if (d.comp.diagnostics.errors != 0) {
954 if (d.diagnostics.errors != prev_total) {
683955 if (fast_exit) std.process.exit(1); // Not linking, no need for cleanup.
684956 return;
685957 }
686958
687959 const file = if (d.output_name) |some|
688 std.fs.cwd().createFile(some, .{}) catch |er|
960 d.comp.cwd.createFile(some, .{}) catch |er|
689961 return d.fatal("unable to create output file '{s}': {s}", .{ some, errorDescription(er) })
690962 else
691963 std.fs.File.stdout();
......@@ -711,10 +983,9 @@ fn processSource(
711983 stdout_writer.interface.flush() catch {};
712984 }
713985
714 const prev_errors = d.comp.diagnostics.errors;
715 d.renderErrors();
986 d.printDiagnosticsStats();
716987
717 if (d.comp.diagnostics.errors != prev_errors) {
988 if (d.diagnostics.errors != prev_total) {
718989 if (fast_exit) d.exitWithCleanup(1);
719990 return; // do not compile if there were errors
720991 }
......@@ -731,69 +1002,81 @@ fn processSource(
7311002 );
7321003 }
7331004
734 var ir = try tree.genIr();
735 defer ir.deinit(d.comp.gpa);
1005 var name_buf: [std.fs.max_name_bytes]u8 = undefined;
1006 const out_file_name = try d.getOutFileName(source, &name_buf);
7361007
737 if (d.verbose_ir) {
738 var stdout_writer = std.fs.File.stdout().writer(&stdout_buffer);
739 ir.dump(d.comp.gpa, d.detectConfig(.stdout()), &stdout_writer.interface) catch {};
740 stdout_writer.interface.flush() catch {};
741 }
1008 if (d.use_assembly_backend) {
1009 const asm_fn = asm_gen_fn orelse return d.fatal(
1010 "Assembly codegen not supported",
1011 .{},
1012 );
7421013
743 var render_errors: Ir.Renderer.ErrorList = .{};
744 defer {
745 for (render_errors.values()) |msg| d.comp.gpa.free(msg);
746 render_errors.deinit(d.comp.gpa);
747 }
1014 const assembly = try asm_fn(d.comp.target, &tree);
1015 defer assembly.deinit(d.comp.gpa);
7481016
749 var obj = ir.render(d.comp.gpa, d.comp.target, &render_errors) catch |e| switch (e) {
750 error.OutOfMemory => return error.OutOfMemory,
751 error.LowerFail => {
752 return d.fatal(
753 "unable to render Ir to machine code: {s}",
754 .{render_errors.values()[0]},
755 );
756 },
757 };
758 defer obj.deinit();
1017 if (d.only_preprocess_and_compile) {
1018 const out_file = d.comp.cwd.createFile(out_file_name, .{}) catch |er|
1019 return d.fatal("unable to create output file '{s}': {s}", .{ out_file_name, errorDescription(er) });
1020 defer out_file.close();
7591021
760 // If it's used, name_buf will either hold a filename or `/tmp/<12 random bytes with base-64 encoding>.<extension>`
761 // both of which should fit into max_name_bytes for all systems
762 var name_buf: [std.fs.max_name_bytes]u8 = undefined;
1022 assembly.writeToFile(out_file) catch |er|
1023 return d.fatal("unable to write to output file '{s}': {s}", .{ out_file_name, errorDescription(er) });
1024 if (fast_exit) std.process.exit(0); // Not linking, no need for cleanup.
1025 return;
1026 }
7631027
764 const out_file_name = if (d.only_compile) blk: {
765 const fmt_template = "{s}{s}";
766 const fmt_args = .{
767 std.fs.path.stem(source.path),
768 d.comp.target.ofmt.fileExt(d.comp.target.cpu.arch),
769 };
770 break :blk d.output_name orelse
771 std.fmt.bufPrint(&name_buf, fmt_template, fmt_args) catch return d.fatal("Filename too long for filesystem: " ++ fmt_template, fmt_args);
772 } else blk: {
773 const random_bytes_count = 12;
774 const sub_path_len = comptime std.fs.base64_encoder.calcSize(random_bytes_count);
775
776 var random_bytes: [random_bytes_count]u8 = undefined;
777 std.crypto.random.bytes(&random_bytes);
778 var random_name: [sub_path_len]u8 = undefined;
779 _ = std.fs.base64_encoder.encode(&random_name, &random_bytes);
780
781 const fmt_template = "/tmp/{s}{s}";
782 const fmt_args = .{
783 random_name,
784 d.comp.target.ofmt.fileExt(d.comp.target.cpu.arch),
1028 // write to assembly_out_file_name
1029 // then assemble to out_file_name
1030 var assembly_name_buf: [std.fs.max_name_bytes]u8 = undefined;
1031 const assembly_out_file_name = try d.getRandomFilename(&assembly_name_buf, ".s");
1032 const out_file = d.comp.cwd.createFile(assembly_out_file_name, .{}) catch |er|
1033 return d.fatal("unable to create output file '{s}': {s}", .{ assembly_out_file_name, errorDescription(er) });
1034 defer out_file.close();
1035 assembly.writeToFile(out_file) catch |er|
1036 return d.fatal("unable to write to output file '{s}': {s}", .{ assembly_out_file_name, errorDescription(er) });
1037 try d.invokeAssembler(tc, assembly_out_file_name, out_file_name);
1038 if (d.only_compile) {
1039 if (fast_exit) std.process.exit(0); // Not linking, no need for cleanup.
1040 return;
1041 }
1042 } else {
1043 var ir = try tree.genIr();
1044 defer ir.deinit(d.comp.gpa);
1045
1046 if (d.verbose_ir) {
1047 var stdout_buf: [4096]u8 = undefined;
1048 var stdout = std.fs.File.stdout().writer(&stdout_buf);
1049 ir.dump(d.comp.gpa, d.detectConfig(stdout.file), &stdout.interface) catch {};
1050 }
1051
1052 var render_errors: Ir.Renderer.ErrorList = .{};
1053 defer {
1054 for (render_errors.values()) |msg| d.comp.gpa.free(msg);
1055 render_errors.deinit(d.comp.gpa);
1056 }
1057
1058 var obj = ir.render(d.comp.gpa, d.comp.target, &render_errors) catch |e| switch (e) {
1059 error.OutOfMemory => return error.OutOfMemory,
1060 error.LowerFail => {
1061 return d.fatal(
1062 "unable to render Ir to machine code: {s}",
1063 .{render_errors.values()[0]},
1064 );
1065 },
7851066 };
786 break :blk std.fmt.bufPrint(&name_buf, fmt_template, fmt_args) catch return d.fatal("Filename too long for filesystem: " ++ fmt_template, fmt_args);
787 };
1067 defer obj.deinit();
7881068
789 const out_file = std.fs.cwd().createFile(out_file_name, .{}) catch |er|
790 return d.fatal("unable to create output file '{s}': {s}", .{ out_file_name, errorDescription(er) });
791 defer out_file.close();
1069 const out_file = d.comp.cwd.createFile(out_file_name, .{}) catch |er|
1070 return d.fatal("unable to create output file '{s}': {s}", .{ out_file_name, errorDescription(er) });
1071 defer out_file.close();
7921072
793 obj.finish(out_file) catch |er|
794 return d.fatal("could not output to object file '{s}': {s}", .{ out_file_name, errorDescription(er) });
1073 var file_buf: [4096]u8 = undefined;
1074 var file_writer = out_file.writer(&file_buf);
1075 obj.finish(&file_writer.interface) catch
1076 return d.fatal("could not output to object file '{s}': {s}", .{ out_file_name, errorDescription(file_writer.err.?) });
1077 }
7951078
796 if (d.only_compile) {
1079 if (d.only_compile or d.only_preprocess_and_compile) {
7971080 if (fast_exit) std.process.exit(0); // Not linking, no need for cleanup.
7981081 return;
7991082 }
......@@ -805,18 +1088,18 @@ fn processSource(
8051088 }
8061089}
8071090
808fn dumpLinkerArgs(items: []const []const u8) !void {
809 const stdout = std.fs.File.stdout().deprecatedWriter();
1091fn dumpLinkerArgs(w: *std.Io.Writer, items: []const []const u8) !void {
8101092 for (items, 0..) |item, i| {
811 if (i > 0) try stdout.writeByte(' ');
812 try stdout.print("\"{f}\"", .{std.zig.fmtString(item)});
1093 if (i > 0) try w.writeByte(' ');
1094 try w.print("\"{f}\"", .{std.zig.fmtString(item)});
8131095 }
814 try stdout.writeByte('\n');
1096 try w.writeByte('\n');
1097 try w.flush();
8151098}
8161099
8171100/// The entry point of the Aro compiler.
8181101/// **MAY call `exit` if `fast_exit` is set.**
819pub fn invokeLinker(d: *Driver, tc: *Toolchain, comptime fast_exit: bool) !void {
1102pub fn invokeLinker(d: *Driver, tc: *Toolchain, comptime fast_exit: bool) Compilation.Error!void {
8201103 var argv = std.array_list.Managed([]const u8).init(d.comp.gpa);
8211104 defer argv.deinit();
8221105
......@@ -827,8 +1110,10 @@ pub fn invokeLinker(d: *Driver, tc: *Toolchain, comptime fast_exit: bool) !void
8271110 try tc.buildLinkerArgs(&argv);
8281111
8291112 if (d.verbose_linker_args) {
830 dumpLinkerArgs(argv.items) catch |er| {
831 return d.fatal("unable to dump linker args: {s}", .{errorDescription(er)});
1113 var stdout_buf: [4096]u8 = undefined;
1114 var stdout = std.fs.File.stdout().writer(&stdout_buf);
1115 dumpLinkerArgs(&stdout.interface, argv.items) catch {
1116 return d.fatal("unable to dump linker args: {s}", .{errorDescription(stdout.err.?)});
8321117 };
8331118 }
8341119 var child = std.process.Child.init(argv.items, d.comp.gpa);
......@@ -861,3 +1146,171 @@ fn exitWithCleanup(d: *Driver, code: u8) noreturn {
8611146 }
8621147 std.process.exit(code);
8631148}
1149
1150/// Parses the various -fpic/-fPIC/-fpie/-fPIE arguments.
1151/// Then, smooshes them together with platform defaults, to decide whether
1152/// this compile should be using PIC mode or not.
1153/// Returns a tuple of ( backend.CodeGenOptions.PicLevel, IsPIE).
1154pub fn getPICMode(d: *Driver, lastpic: []const u8) Compilation.Error!struct { backend.CodeGenOptions.PicLevel, bool } {
1155 const eqlIgnoreCase = std.ascii.eqlIgnoreCase;
1156
1157 const target = d.comp.target;
1158 const linker = d.use_linker orelse @import("system_defaults").linker;
1159 const is_bfd_linker = eqlIgnoreCase(linker, "bfd");
1160
1161 const is_pie_default = switch (target_util.isPIEDefault(target)) {
1162 .yes => true,
1163 .no => false,
1164 .depends_on_linker => if (is_bfd_linker)
1165 target.cpu.arch == .x86_64 // CrossWindows
1166 else
1167 false, //MSVC
1168 };
1169 const is_pic_default = switch (target_util.isPICdefault(target)) {
1170 .yes => true,
1171 .no => false,
1172 .depends_on_linker => if (is_bfd_linker)
1173 target.cpu.arch == .x86_64
1174 else
1175 (target.cpu.arch == .x86_64 or target.cpu.arch == .aarch64),
1176 };
1177
1178 var pie: bool = is_pie_default;
1179 var pic: bool = pie or is_pic_default;
1180 // The Darwin/MachO default to use PIC does not apply when using -static.
1181 if (target.ofmt == .macho and d.static) {
1182 pic, pie = .{ false, false };
1183 }
1184 var is_piclevel_two = pic;
1185
1186 const kernel_or_kext: bool = d.mkernel or d.apple_kext;
1187
1188 // Android-specific defaults for PIC/PIE
1189 if (target.abi.isAndroid()) {
1190 switch (target.cpu.arch) {
1191 .arm,
1192 .armeb,
1193 .thumb,
1194 .thumbeb,
1195 .aarch64,
1196 .mips,
1197 .mipsel,
1198 .mips64,
1199 .mips64el,
1200 => pic = true, // "-fpic"
1201
1202 .x86, .x86_64 => {
1203 pic = true; // "-fPIC"
1204 is_piclevel_two = true;
1205 },
1206 else => {},
1207 }
1208 }
1209
1210 // OHOS-specific defaults for PIC/PIE
1211 if (target.abi == .ohos and target.cpu.arch == .aarch64)
1212 pic = true;
1213
1214 // OpenBSD-specific defaults for PIE
1215 if (target.os.tag == .openbsd) {
1216 switch (target.cpu.arch) {
1217 .arm, .aarch64, .mips64, .mips64el, .x86, .x86_64 => is_piclevel_two = false, // "-fpie"
1218 .powerpc, .sparc64 => is_piclevel_two = true, // "-fPIE"
1219 else => {},
1220 }
1221 }
1222
1223 // The last argument relating to either PIC or PIE wins, and no
1224 // other argument is used. If the last argument is any flavor of the
1225 // '-fno-...' arguments, both PIC and PIE are disabled. Any PIE
1226 // option implicitly enables PIC at the same level.
1227 if (target.os.tag == .windows and
1228 !target_util.isCygwinMinGW(target) and
1229 (eqlIgnoreCase(lastpic, "-fpic") or eqlIgnoreCase(lastpic, "-fpie"))) // -fpic/-fPIC, -fpie/-fPIE
1230 {
1231 try d.unsupportedOptionForTarget(target, lastpic);
1232 if (target.cpu.arch == .x86_64)
1233 return .{ .two, false };
1234 return .{ .none, false };
1235 }
1236
1237 // Check whether the tool chain trumps the PIC-ness decision. If the PIC-ness
1238 // is forced, then neither PIC nor PIE flags will have no effect.
1239 const forced = switch (target_util.isPICDefaultForced(target)) {
1240 .yes => true,
1241 .no => false,
1242 .depends_on_linker => if (is_bfd_linker) target.cpu.arch == .x86_64 else target.cpu.arch == .aarch64 or target.cpu.arch == .x86_64,
1243 };
1244 if (!forced) {
1245 // -fpic/-fPIC, -fpie/-fPIE
1246 if (eqlIgnoreCase(lastpic, "-fpic") or eqlIgnoreCase(lastpic, "-fpie")) {
1247 pie = eqlIgnoreCase(lastpic, "-fpie");
1248 pic = pie or eqlIgnoreCase(lastpic, "-fpic");
1249 is_piclevel_two = mem.eql(u8, lastpic, "-fPIE") or mem.eql(u8, lastpic, "-fPIC");
1250 } else {
1251 pic, pie = .{ false, false };
1252 if (target_util.isPS(target)) {
1253 if (d.cmodel != .kernel) {
1254 pic = true;
1255 try d.warn(
1256 "option '{s}' was ignored by the {s} toolchain, using '-fPIC'",
1257 .{ lastpic, if (target.os.tag == .ps4) "PS4" else "PS5" },
1258 );
1259 }
1260 }
1261 }
1262 }
1263
1264 if (pic and (target.os.tag.isDarwin() or target_util.isPS(target))) {
1265 is_piclevel_two = is_piclevel_two or is_pic_default;
1266 }
1267
1268 // This kernel flags are a trump-card: they will disable PIC/PIE
1269 // generation, independent of the argument order.
1270 if (kernel_or_kext and
1271 (!(target.os.tag != .ios) or (target.os.isAtLeast(.ios, .{ .major = 6, .minor = 0, .patch = 0 }) orelse false)) and
1272 !(target.os.tag != .watchos) and
1273 !(target.os.tag != .driverkit))
1274 {
1275 pie, pic = .{ false, false };
1276 }
1277
1278 if (d.dynamic_nopic == true) {
1279 if (!target.os.tag.isDarwin()) {
1280 try d.unsupportedOptionForTarget(target, "-mdynamic-no-pic");
1281 }
1282 pic = is_pic_default or forced;
1283 return .{ if (pic) .two else .none, false };
1284 }
1285
1286 const embedded_pi_supported = target.cpu.arch.isArm();
1287 if (!embedded_pi_supported) {
1288 if (d.ropi) try d.unsupportedOptionForTarget(target, "-fropi");
1289 if (d.rwpi) try d.unsupportedOptionForTarget(target, "-frwpi");
1290 }
1291
1292 // ROPI and RWPI are not compatible with PIC or PIE.
1293 if ((d.ropi or d.rwpi) and (pic or pie)) {
1294 try d.err("embedded and GOT-based position independence are incompatible", .{});
1295 }
1296
1297 if (target.cpu.arch.isMIPS()) {
1298 // When targeting the N64 ABI, PIC is the default, except in the case
1299 // when the -mno-abicalls option is used. In that case we exit
1300 // at next check regardless of PIC being set below.
1301 // TODO: implement incomplete!!
1302 if (target.cpu.arch.isMIPS64())
1303 pic = true;
1304
1305 // When targettng MIPS with -mno-abicalls, it's always static.
1306 if (d.mabicalls == false)
1307 return .{ .none, false };
1308
1309 // Unlike other architectures, MIPS, even with -fPIC/-mxgot/multigot,
1310 // does not use PIC level 2 for historical reasons.
1311 is_piclevel_two = false;
1312 }
1313
1314 if (pic) return .{ if (is_piclevel_two) .two else .one, pie };
1315 return .{ .none, false };
1316}
lib/compiler/aro/aro/Driver/Filesystem.zig+6-6
......@@ -96,7 +96,7 @@ fn findProgramByNamePosix(name: []const u8, path: ?[]const u8, buf: []u8) ?[]con
9696}
9797
9898pub const Filesystem = union(enum) {
99 real: void,
99 real: std.fs.Dir,
100100 fake: []const Entry,
101101
102102 const Entry = struct {
......@@ -172,8 +172,8 @@ pub const Filesystem = union(enum) {
172172
173173 pub fn exists(fs: Filesystem, path: []const u8) bool {
174174 switch (fs) {
175 .real => {
176 std.fs.cwd().access(path, .{}) catch return false;
175 .real => |cwd| {
176 cwd.access(path, .{}) catch return false;
177177 return true;
178178 },
179179 .fake => |paths| return existsFake(paths, path),
......@@ -210,8 +210,8 @@ pub const Filesystem = union(enum) {
210210 /// Otherwise returns a slice of `buf`. If the file is larger than `buf` partial contents are returned
211211 pub fn readFile(fs: Filesystem, path: []const u8, buf: []u8) ?[]const u8 {
212212 return switch (fs) {
213 .real => {
214 const file = std.fs.cwd().openFile(path, .{}) catch return null;
213 .real => |cwd| {
214 const file = cwd.openFile(path, .{}) catch return null;
215215 defer file.close();
216216
217217 const bytes_read = file.readAll(buf) catch return null;
......@@ -223,7 +223,7 @@ pub const Filesystem = union(enum) {
223223
224224 pub fn openDir(fs: Filesystem, dir_name: []const u8) std.fs.Dir.OpenError!Dir {
225225 return switch (fs) {
226 .real => .{ .dir = try std.fs.cwd().openDir(dir_name, .{ .access_sub_paths = false, .iterate = true }) },
226 .real => |cwd| .{ .dir = try cwd.openDir(dir_name, .{ .access_sub_paths = false, .iterate = true }) },
227227 .fake => |entries| .{ .fake = .{ .entries = entries, .path = dir_name } },
228228 };
229229 }
lib/compiler/aro/aro/Driver/GCCDetector.zig+9-11
......@@ -1,9 +1,11 @@
11const std = @import("std");
2const Toolchain = @import("../Toolchain.zig");
3const target_util = @import("../target.zig");
2
43const system_defaults = @import("system_defaults");
4
55const GCCVersion = @import("GCCVersion.zig");
66const Multilib = @import("Multilib.zig");
7const target_util = @import("../target.zig");
8const Toolchain = @import("../Toolchain.zig");
79
810const GCCDetector = @This();
911
......@@ -50,7 +52,7 @@ fn addDefaultGCCPrefixes(prefixes: *std.ArrayListUnmanaged([]const u8), tc: *con
5052 if (sysroot.len == 0) {
5153 prefixes.appendAssumeCapacity("/usr");
5254 } else {
53 var usr_path = try tc.arena.alloc(u8, 4 + sysroot.len);
55 var usr_path = try tc.driver.comp.arena.alloc(u8, 4 + sysroot.len);
5456 @memcpy(usr_path[0..4], "/usr");
5557 @memcpy(usr_path[4..], sysroot);
5658 prefixes.appendAssumeCapacity(usr_path);
......@@ -284,11 +286,6 @@ fn collectLibDirsAndTriples(
284286 },
285287 .x86 => {
286288 lib_dirs.appendSliceAssumeCapacity(&X86LibDirs);
287 triple_aliases.appendSliceAssumeCapacity(&X86Triples);
288 biarch_libdirs.appendSliceAssumeCapacity(&X86_64LibDirs);
289 biarch_triple_aliases.appendSliceAssumeCapacity(&X86_64Triples);
290 biarch_libdirs.appendSliceAssumeCapacity(&X32LibDirs);
291 biarch_triple_aliases.appendSliceAssumeCapacity(&X32Triples);
292289 },
293290 .loongarch64 => {
294291 lib_dirs.appendSliceAssumeCapacity(&LoongArch64LibDirs);
......@@ -587,6 +584,7 @@ fn scanLibDirForGCCTriple(
587584) !void {
588585 var path_buf: [std.fs.max_path_bytes]u8 = undefined;
589586 var fib = std.heap.FixedBufferAllocator.init(&path_buf);
587 const arena = tc.driver.comp.arena;
590588 for (0..2) |i| {
591589 if (i == 0 and !gcc_dir_exists) continue;
592590 if (i == 1 and !gcc_cross_dir_exists) continue;
......@@ -619,9 +617,9 @@ fn scanLibDirForGCCTriple(
619617 if (!try self.scanGCCForMultilibs(tc, target, .{ dir_name, version_text }, needs_biarch_suffix)) continue;
620618
621619 self.version = candidate_version;
622 self.gcc_triple = try tc.arena.dupe(u8, candidate_triple);
623 self.install_path = try std.fs.path.join(tc.arena, &.{ lib_dir, lib_suffix, version_text });
624 self.parent_lib_path = try std.fs.path.join(tc.arena, &.{ self.install_path, "..", "..", ".." });
620 self.gcc_triple = try arena.dupe(u8, candidate_triple);
621 self.install_path = try std.fs.path.join(arena, &.{ lib_dir, lib_suffix, version_text });
622 self.parent_lib_path = try std.fs.path.join(arena, &.{ self.install_path, "..", "..", ".." });
625623 self.is_valid = true;
626624 }
627625 }
lib/compiler/aro/aro/Hideset.zig+4-3
......@@ -10,8 +10,9 @@
1010const std = @import("std");
1111const mem = std.mem;
1212const Allocator = mem.Allocator;
13const Source = @import("Source.zig");
13
1414const Compilation = @import("Compilation.zig");
15const Source = @import("Source.zig");
1516const Tokenizer = @import("Tokenizer.zig");
1617
1718pub const Hideset = @This();
......@@ -51,10 +52,10 @@ pub const Index = enum(u32) {
5152 _,
5253};
5354
54map: std.AutoHashMapUnmanaged(Identifier, Index) = .empty,
55map: std.AutoHashMapUnmanaged(Identifier, Index) = .{},
5556/// Used for computing union/intersection of two lists; stored here so that allocations can be retained
5657/// until hideset is deinit'ed
57tmp_map: std.AutoHashMapUnmanaged(Identifier, void) = .empty,
58tmp_map: std.AutoHashMapUnmanaged(Identifier, void) = .{},
5859linked_list: Item.List = .{},
5960comp: *const Compilation,
6061
lib/compiler/aro/aro/InitList.zig+17-70
......@@ -3,17 +3,16 @@
33const std = @import("std");
44const Allocator = std.mem.Allocator;
55const testing = std.testing;
6
7const Diagnostics = @import("Diagnostics.zig");
8const Parser = @import("Parser.zig");
69const Tree = @import("Tree.zig");
710const Token = Tree.Token;
811const TokenIndex = Tree.TokenIndex;
9const NodeIndex = Tree.NodeIndex;
10const Type = @import("Type.zig");
11const Diagnostics = @import("Diagnostics.zig");
12const NodeList = std.array_list.Managed(NodeIndex);
13const Parser = @import("Parser.zig");
12const Node = Tree.Node;
1413
1514const Item = struct {
16 list: InitList = .{},
15 list: InitList,
1716 index: u64,
1817
1918 fn order(_: void, a: Item, b: Item) std.math.Order {
......@@ -24,7 +23,7 @@ const Item = struct {
2423const InitList = @This();
2524
2625list: std.ArrayListUnmanaged(Item) = .empty,
27node: NodeIndex = .none,
26node: Node.OptIndex = .null,
2827tok: TokenIndex = 0,
2928
3029/// Deinitialize freeing all memory.
......@@ -34,50 +33,6 @@ pub fn deinit(il: *InitList, gpa: Allocator) void {
3433 il.* = undefined;
3534}
3635
37/// Insert initializer at index, returning previous entry if one exists.
38pub fn put(il: *InitList, gpa: Allocator, index: usize, node: NodeIndex, tok: TokenIndex) !?TokenIndex {
39 const items = il.list.items;
40 var left: usize = 0;
41 var right: usize = items.len;
42
43 // Append new value to empty list
44 if (left == right) {
45 const item = try il.list.addOne(gpa);
46 item.* = .{
47 .list = .{ .node = node, .tok = tok },
48 .index = index,
49 };
50 return null;
51 }
52
53 while (left < right) {
54 // Avoid overflowing in the midpoint calculation
55 const mid = left + (right - left) / 2;
56 // Compare the key with the midpoint element
57 switch (std.math.order(index, items[mid].index)) {
58 .eq => {
59 // Replace previous entry.
60 const prev = items[mid].list.tok;
61 items[mid].list.deinit(gpa);
62 items[mid] = .{
63 .list = .{ .node = node, .tok = tok },
64 .index = index,
65 };
66 return prev;
67 },
68 .gt => left = mid + 1,
69 .lt => right = mid,
70 }
71 }
72
73 // Insert a new value into a sorted position.
74 try il.list.insert(gpa, left, .{
75 .list = .{ .node = node, .tok = tok },
76 .index = index,
77 });
78 return null;
79}
80
8136/// Find item at index, create new if one does not exist.
8237pub fn find(il: *InitList, gpa: Allocator, index: u64) !*InitList {
8338 const items = il.list.items;
......@@ -85,13 +40,21 @@ pub fn find(il: *InitList, gpa: Allocator, index: u64) !*InitList {
8540 var right: usize = items.len;
8641
8742 // Append new value to empty list
88 if (left == right) {
43 if (il.list.items.len == 0) {
8944 const item = try il.list.addOne(gpa);
9045 item.* = .{
91 .list = .{ .node = .none, .tok = 0 },
46 .list = .{},
9247 .index = index,
9348 };
9449 return &item.list;
50 } else if (il.list.items[il.list.items.len - 1].index < index) {
51 // Append a new value to the end of the list.
52 const new = try il.list.addOne(gpa);
53 new.* = .{
54 .list = .{},
55 .index = index,
56 };
57 return &new.list;
9558 }
9659
9760 while (left < right) {
......@@ -107,7 +70,7 @@ pub fn find(il: *InitList, gpa: Allocator, index: u64) !*InitList {
10770
10871 // Insert a new value into a sorted position.
10972 try il.list.insert(gpa, left, .{
110 .list = .{ .node = .none, .tok = 0 },
73 .list = .{},
11174 .index = index,
11275 });
11376 return &il.list.items[left].list;
......@@ -118,22 +81,6 @@ test "basic usage" {
11881 var il: InitList = .{};
11982 defer il.deinit(gpa);
12083
121 {
122 var i: usize = 0;
123 while (i < 5) : (i += 1) {
124 const prev = try il.put(gpa, i, .none, 0);
125 try testing.expect(prev == null);
126 }
127 }
128
129 {
130 const failing = testing.failing_allocator;
131 var i: usize = 0;
132 while (i < 5) : (i += 1) {
133 _ = try il.find(failing, i);
134 }
135 }
136
13784 {
13885 var item = try il.find(gpa, 0);
13986 var i: usize = 1;
lib/compiler/aro/aro/LangOpts.zig+6-10
......@@ -1,6 +1,7 @@
11const std = @import("std");
2const DiagnosticTag = @import("Diagnostics.zig").Tag;
2
33const char_info = @import("char_info.zig");
4const DiagnosticTag = @import("Diagnostics.zig").Tag;
45
56pub const Compiler = enum {
67 clang,
......@@ -144,14 +145,9 @@ pub fn setStandard(self: *LangOpts, name: []const u8) error{InvalidStandard}!voi
144145 self.standard = Standard.NameMap.get(name) orelse return error.InvalidStandard;
145146}
146147
147pub fn enableMSExtensions(self: *LangOpts) void {
148 self.declspec_attrs = true;
149 self.ms_extensions = true;
150}
151
152pub fn disableMSExtensions(self: *LangOpts) void {
153 self.declspec_attrs = false;
154 self.ms_extensions = true;
148pub fn setMSExtensions(self: *LangOpts, enabled: bool) void {
149 self.declspec_attrs = enabled;
150 self.ms_extensions = enabled;
155151}
156152
157153pub fn hasChar8_T(self: *const LangOpts) bool {
......@@ -164,7 +160,7 @@ pub fn hasDigraphs(self: *const LangOpts) bool {
164160
165161pub fn setEmulatedCompiler(self: *LangOpts, compiler: Compiler) void {
166162 self.emulate = compiler;
167 if (compiler == .msvc) self.enableMSExtensions();
163 self.setMSExtensions(compiler == .msvc);
168164}
169165
170166pub fn setFpEvalMethod(self: *LangOpts, fp_eval_method: FPEvalMethod) void {
lib/compiler/aro/aro/Parser.zig+5474-4294
......@@ -3,38 +3,40 @@ const mem = std.mem;
33const Allocator = mem.Allocator;
44const assert = std.debug.assert;
55const big = std.math.big;
6
7const Attribute = @import("Attribute.zig");
8const Builtins = @import("Builtins.zig");
9const Builtin = Builtins.Builtin;
10const evalBuiltin = @import("Builtins/eval.zig").eval;
11const char_info = @import("char_info.zig");
612const Compilation = @import("Compilation.zig");
13const Diagnostics = @import("Diagnostics.zig");
14const InitList = @import("InitList.zig");
15const Preprocessor = @import("Preprocessor.zig");
16const record_layout = @import("record_layout.zig");
717const Source = @import("Source.zig");
18const StringId = @import("StringInterner.zig").StringId;
19const SymbolStack = @import("SymbolStack.zig");
20const Symbol = SymbolStack.Symbol;
21const target_util = @import("target.zig");
22const text_literal = @import("text_literal.zig");
823const Tokenizer = @import("Tokenizer.zig");
9const Preprocessor = @import("Preprocessor.zig");
1024const Tree = @import("Tree.zig");
1125const Token = Tree.Token;
1226const NumberPrefix = Token.NumberPrefix;
1327const NumberSuffix = Token.NumberSuffix;
1428const TokenIndex = Tree.TokenIndex;
15const NodeIndex = Tree.NodeIndex;
16const Type = @import("Type.zig");
17const Diagnostics = @import("Diagnostics.zig");
18const NodeList = std.array_list.Managed(NodeIndex);
19const InitList = @import("InitList.zig");
20const Attribute = @import("Attribute.zig");
21const char_info = @import("char_info.zig");
22const text_literal = @import("text_literal.zig");
29const Node = Tree.Node;
30const TypeStore = @import("TypeStore.zig");
31const Type = TypeStore.Type;
32const QualType = TypeStore.QualType;
2333const Value = @import("Value.zig");
24const SymbolStack = @import("SymbolStack.zig");
25const Symbol = SymbolStack.Symbol;
26const record_layout = @import("record_layout.zig");
27const StrInt = @import("StringInterner.zig");
28const StringId = StrInt.StringId;
29const Builtins = @import("Builtins.zig");
30const Builtin = Builtins.Builtin;
31const evalBuiltin = @import("Builtins/eval.zig").eval;
32const target_util = @import("target.zig");
3334
35const NodeList = std.ArrayList(Node.Index);
3436const Switch = struct {
3537 default: ?TokenIndex = null,
3638 ranges: std.array_list.Managed(Range),
37 ty: Type,
39 qt: QualType,
3840 comp: *Compilation,
3941
4042 const Range = struct {
......@@ -63,6 +65,15 @@ const Label = union(enum) {
6365 label: TokenIndex,
6466};
6567
68const InitContext = enum {
69 /// inits do not need to be compile-time constants
70 runtime,
71 /// constexpr variable, could be any scope but inits must be compile-time constants
72 constexpr,
73 /// static and global variables, inits must be compile-time constants
74 static,
75};
76
6677pub const Error = Compilation.Error || error{ParsingFailed};
6778
6879/// An attribute that has been parsed but not yet validated in its context
......@@ -89,15 +100,13 @@ const Parser = @This();
89100// values from preprocessor
90101pp: *Preprocessor,
91102comp: *Compilation,
103diagnostics: *Diagnostics,
92104gpa: mem.Allocator,
93105tok_ids: []const Token.Id,
94106tok_i: TokenIndex = 0,
95107
96// values of the incomplete Tree
97arena: Allocator,
98nodes: Tree.Node.List = .{},
99data: NodeList,
100value_map: Tree.ValueMap,
108/// The AST being constructed.
109tree: Tree,
101110
102111// buffers used during compilation
103112syms: SymbolStack = .{},
......@@ -105,12 +114,17 @@ strings: std.array_list.Managed(u8),
105114labels: std.array_list.Managed(Label),
106115list_buf: NodeList,
107116decl_buf: NodeList,
117/// Function type parameters, also used for generic selection association
118/// duplicate checking.
108119param_buf: std.array_list.Managed(Type.Func.Param),
120/// Enum type fields.
109121enum_buf: std.array_list.Managed(Type.Enum.Field),
122/// Record type fields.
110123record_buf: std.array_list.Managed(Type.Record.Field),
111attr_buf: std.MultiArrayList(TentativeAttribute) = .{},
124/// Attributes that have been parsed but not yet validated or applied.
125attr_buf: std.MultiArrayList(TentativeAttribute) = .empty,
126/// Used to store validated attributes before they are applied to types.
112127attr_application_buf: std.ArrayListUnmanaged(Attribute) = .empty,
113field_attr_buf: std.array_list.Managed([]const Attribute),
114128/// type name -> variable name location for tentative definitions (top-level defs with thus-far-incomplete types)
115129/// e.g. `struct Foo bar;` where `struct Foo` is not defined yet.
116130/// The key is the StringId of `Foo` and the value is the TokenIndex of `bar`
......@@ -135,46 +149,51 @@ computed_goto_tok: ?TokenIndex = null,
135149/// so that it is not used in its own initializer.
136150auto_type_decl_name: StringId = .empty,
137151
152init_context: InitContext = .runtime,
153
138154/// Various variables that are different for each function.
139155func: struct {
140 /// null if not in function, will always be plain func, var_args_func or old_style_func
141 ty: ?Type = null,
156 /// null if not in function, will always be plain func
157 qt: ?QualType = null,
142158 name: TokenIndex = 0,
143159 ident: ?Result = null,
144160 pretty_ident: ?Result = null,
145161} = .{},
162
146163/// Various variables that are different for each record.
147164record: struct {
148165 // invalid means we're not parsing a record
149166 kind: Token.Id = .invalid,
150167 flexible_field: ?TokenIndex = null,
151168 start: usize = 0,
152 field_attr_start: usize = 0,
153169
154170 fn addField(r: @This(), p: *Parser, name: StringId, tok: TokenIndex) Error!void {
155171 var i = p.record_members.items.len;
156172 while (i > r.start) {
157173 i -= 1;
158174 if (p.record_members.items[i].name == name) {
159 try p.errStr(.duplicate_member, tok, p.tokSlice(tok));
160 try p.errTok(.previous_definition, p.record_members.items[i].tok);
175 try p.err(tok, .duplicate_member, .{p.tokSlice(tok)});
176 try p.err(p.record_members.items[i].tok, .previous_definition, .{});
161177 break;
162178 }
163179 }
164180 try p.record_members.append(p.gpa, .{ .name = name, .tok = tok });
165181 }
166182
167 fn addFieldsFromAnonymous(r: @This(), p: *Parser, ty: Type) Error!void {
168 for (ty.getRecord().?.fields) |f| {
169 if (f.isAnonymousRecord()) {
170 try r.addFieldsFromAnonymous(p, f.ty.canonicalize(.standard));
171 } else if (f.name_tok != 0) {
183 fn addFieldsFromAnonymous(r: @This(), p: *Parser, record_ty: Type.Record) Error!void {
184 for (record_ty.fields) |f| {
185 if (f.name_tok == 0) {
186 if (f.qt.getRecord(p.comp)) |field_record_ty| {
187 try r.addFieldsFromAnonymous(p, field_record_ty);
188 }
189 } else {
172190 try r.addField(p, f.name, f.name_tok);
173191 }
174192 }
175193 }
176194} = .{},
177record_members: std.ArrayListUnmanaged(struct { tok: TokenIndex, name: StringId }) = .empty,
195record_members: std.ArrayListUnmanaged(struct { tok: TokenIndex, name: StringId }) = .{},
196
178197@"switch": ?*Switch = null,
179198in_loop: bool = false,
180199pragma_pack: ?u8 = null,
......@@ -189,32 +208,49 @@ string_ids: struct {
189208
190209/// Checks codepoint for various pedantic warnings
191210/// Returns true if diagnostic issued
192fn checkIdentifierCodepointWarnings(comp: *Compilation, codepoint: u21, loc: Source.Location) Compilation.Error!bool {
211fn checkIdentifierCodepointWarnings(p: *Parser, codepoint: u21, loc: Source.Location) Compilation.Error!bool {
193212 assert(codepoint >= 0x80);
194213
195 const err_start = comp.diagnostics.list.items.len;
214 const prev_total = p.diagnostics.total;
215 var sf = std.heap.stackFallback(1024, p.gpa);
216 var allocating: std.Io.Writer.Allocating = .init(sf.get());
217 defer allocating.deinit();
196218
197219 if (!char_info.isC99IdChar(codepoint)) {
198 try comp.addDiagnostic(.{
199 .tag = .c99_compat,
200 .loc = loc,
201 }, &.{});
220 const diagnostic: Diagnostic = .c99_compat;
221 try p.diagnostics.add(.{
222 .kind = diagnostic.kind,
223 .text = diagnostic.fmt,
224 .extension = diagnostic.extension,
225 .opt = diagnostic.opt,
226 .location = loc.expand(p.comp),
227 });
202228 }
203229 if (char_info.isInvisible(codepoint)) {
204 try comp.addDiagnostic(.{
205 .tag = .unicode_zero_width,
206 .loc = loc,
207 .extra = .{ .actual_codepoint = codepoint },
208 }, &.{});
230 const diagnostic: Diagnostic = .unicode_zero_width;
231 p.formatArgs(&allocating.writer, diagnostic.fmt, .{Codepoint.init(codepoint)}) catch return error.OutOfMemory;
232
233 try p.diagnostics.add(.{
234 .kind = diagnostic.kind,
235 .text = allocating.getWritten(),
236 .extension = diagnostic.extension,
237 .opt = diagnostic.opt,
238 .location = loc.expand(p.comp),
239 });
209240 }
210241 if (char_info.homoglyph(codepoint)) |resembles| {
211 try comp.addDiagnostic(.{
212 .tag = .unicode_homoglyph,
213 .loc = loc,
214 .extra = .{ .codepoints = .{ .actual = codepoint, .resembles = resembles } },
215 }, &.{});
242 const diagnostic: Diagnostic = .unicode_homoglyph;
243 p.formatArgs(&allocating.writer, diagnostic.fmt, .{ Codepoint.init(codepoint), resembles }) catch return error.OutOfMemory;
244
245 try p.diagnostics.add(.{
246 .kind = diagnostic.kind,
247 .text = allocating.getWritten(),
248 .extension = diagnostic.extension,
249 .opt = diagnostic.opt,
250 .location = loc.expand(p.comp),
251 });
216252 }
217 return comp.diagnostics.list.items.len != err_start;
253 return p.diagnostics.total != prev_total;
218254}
219255
220256/// Issues diagnostics for the current extended identifier token
......@@ -226,7 +262,7 @@ fn validateExtendedIdentifier(p: *Parser) !bool {
226262
227263 const slice = p.tokSlice(p.tok_i);
228264 const view = std.unicode.Utf8View.init(slice) catch {
229 try p.errTok(.invalid_utf8, p.tok_i);
265 try p.err(p.tok_i, .invalid_utf8, .{});
230266 return error.FatalError;
231267 };
232268 var it = view.iterator();
......@@ -247,10 +283,16 @@ fn validateExtendedIdentifier(p: *Parser) !bool {
247283 }
248284 if (codepoint == '$') {
249285 warned = true;
250 if (p.comp.langopts.dollars_in_identifiers) try p.comp.addDiagnostic(.{
251 .tag = .dollar_in_identifier_extension,
252 .loc = loc,
253 }, &.{});
286 if (p.comp.langopts.dollars_in_identifiers) {
287 const diagnostic: Diagnostic = .dollar_in_identifier_extension;
288 try p.diagnostics.add(.{
289 .kind = diagnostic.kind,
290 .text = diagnostic.fmt,
291 .extension = diagnostic.extension,
292 .opt = diagnostic.opt,
293 .location = loc.expand(p.comp),
294 });
295 }
254296 }
255297
256298 if (codepoint <= 0x7F) continue;
......@@ -264,7 +306,7 @@ fn validateExtendedIdentifier(p: *Parser) !bool {
264306 }
265307
266308 if (!warned) {
267 warned = try checkIdentifierCodepointWarnings(p.comp, codepoint, loc);
309 warned = try p.checkIdentifierCodepointWarnings(codepoint, loc);
268310 }
269311
270312 // Check NFC normalization.
......@@ -274,22 +316,22 @@ fn validateExtendedIdentifier(p: *Parser) !bool {
274316 canonical_class != .not_reordered)
275317 {
276318 normalized = false;
277 try p.errStr(.identifier_not_normalized, p.tok_i, slice);
319 try p.err(p.tok_i, .identifier_not_normalized, .{slice});
278320 continue;
279321 }
280322 if (char_info.isNormalized(codepoint) != .yes) {
281323 normalized = false;
282 try p.errExtra(.identifier_not_normalized, p.tok_i, .{ .normalized = slice });
324 try p.err(p.tok_i, .identifier_not_normalized, .{Normalized.init(slice)});
283325 }
284326 last_canonical_class = canonical_class;
285327 }
286328
287329 if (!valid_identifier) {
288330 if (len == 1) {
289 try p.errExtra(.unexpected_character, p.tok_i, .{ .actual_codepoint = invalid_char });
331 try p.err(p.tok_i, .unexpected_character, .{Codepoint.init(invalid_char)});
290332 return false;
291333 } else {
292 try p.errExtra(.invalid_identifier_start_char, p.tok_i, .{ .actual_codepoint = invalid_char });
334 try p.err(p.tok_i, .invalid_identifier_start_char, .{Codepoint.init(invalid_char)});
293335 }
294336 }
295337
......@@ -312,7 +354,7 @@ fn eatIdentifier(p: *Parser) !?TokenIndex {
312354 // Handle illegal '$' characters in identifiers
313355 if (!p.comp.langopts.dollars_in_identifiers) {
314356 if (p.tok_ids[p.tok_i] == .invalid and p.tokSlice(p.tok_i)[0] == '$') {
315 try p.err(.dollars_in_identifiers);
357 try p.err(p.tok_i, .dollars_in_identifiers, .{});
316358 p.tok_i += 1;
317359 return error.ParsingFailed;
318360 }
......@@ -362,40 +404,33 @@ pub fn tokSlice(p: *Parser, tok: TokenIndex) []const u8 {
362404fn expectClosing(p: *Parser, opening: TokenIndex, id: Token.Id) Error!void {
363405 _ = p.expectToken(id) catch |e| {
364406 if (e == error.ParsingFailed) {
365 try p.errTok(switch (id) {
407 try p.err(opening, switch (id) {
366408 .r_paren => .to_match_paren,
367409 .r_brace => .to_match_brace,
368410 .r_bracket => .to_match_brace,
369411 else => unreachable,
370 }, opening);
412 }, .{});
371413 }
372414 return e;
373415 };
374416}
375417
376fn errOverflow(p: *Parser, op_tok: TokenIndex, res: Result) !void {
377 try p.errStr(.overflow, op_tok, try res.str(p));
378}
418pub const Diagnostic = @import("Parser/Diagnostic.zig");
379419
380fn errExpectedToken(p: *Parser, expected: Token.Id, actual: Token.Id) Error {
381 switch (actual) {
382 .invalid => try p.errExtra(.expected_invalid, p.tok_i, .{ .tok_id_expected = expected }),
383 .eof => try p.errExtra(.expected_eof, p.tok_i, .{ .tok_id_expected = expected }),
384 else => try p.errExtra(.expected_token, p.tok_i, .{ .tok_id = .{
385 .expected = expected,
386 .actual = actual,
387 } }),
420pub fn err(p: *Parser, tok_i: TokenIndex, diagnostic: Diagnostic, args: anytype) Compilation.Error!void {
421 if (p.extension_suppressed) {
422 if (diagnostic.extension and diagnostic.kind == .off) return;
388423 }
389 return error.ParsingFailed;
390}
424 if (diagnostic.suppress_version) |some| if (p.comp.langopts.standard.atLeast(some)) return;
425 if (diagnostic.suppress_unless_version) |some| if (!p.comp.langopts.standard.atLeast(some)) return;
426 if (p.diagnostics.effectiveKind(diagnostic) == .off) return;
391427
392pub fn errStr(p: *Parser, tag: Diagnostics.Tag, tok_i: TokenIndex, str: []const u8) Compilation.Error!void {
393 @branchHint(.cold);
394 return p.errExtra(tag, tok_i, .{ .str = str });
395}
428 var sf = std.heap.stackFallback(1024, p.gpa);
429 var allocating: std.Io.Writer.Allocating = .init(sf.get());
430 defer allocating.deinit();
431
432 p.formatArgs(&allocating.writer, diagnostic.fmt, args) catch return error.OutOfMemory;
396433
397pub fn errExtra(p: *Parser, tag: Diagnostics.Tag, tok_i: TokenIndex, extra: Diagnostics.Message.Extra) Compilation.Error!void {
398 @branchHint(.cold);
399434 const tok = p.pp.tokens.get(tok_i);
400435 var loc = tok.loc;
401436 if (tok_i != 0 and tok.id == .eof) {
......@@ -404,196 +439,232 @@ pub fn errExtra(p: *Parser, tag: Diagnostics.Tag, tok_i: TokenIndex, extra: Diag
404439 loc = prev.loc;
405440 loc.byte_offset += @intCast(p.tokSlice(tok_i - 1).len);
406441 }
407 try p.comp.addDiagnostic(.{
408 .tag = tag,
409 .loc = loc,
410 .extra = extra,
411 }, p.pp.expansionSlice(tok_i));
412}
413
414pub fn errTok(p: *Parser, tag: Diagnostics.Tag, tok_i: TokenIndex) Compilation.Error!void {
415 @branchHint(.cold);
416 return p.errExtra(tag, tok_i, .{ .none = {} });
417}
442 try p.diagnostics.addWithLocation(p.comp, .{
443 .kind = diagnostic.kind,
444 .text = allocating.getWritten(),
445 .opt = diagnostic.opt,
446 .extension = diagnostic.extension,
447 .location = loc.expand(p.comp),
448 }, p.pp.expansionSlice(tok_i), true);
449}
450
451fn formatArgs(p: *Parser, w: *std.Io.Writer, fmt: []const u8, args: anytype) !void {
452 var i: usize = 0;
453 inline for (std.meta.fields(@TypeOf(args))) |arg_info| {
454 const arg = @field(args, arg_info.name);
455 i += switch (@TypeOf(arg)) {
456 []const u8 => try Diagnostics.formatString(w, fmt[i..], arg),
457 Tree.Token.Id => try formatTokenId(w, fmt[i..], arg),
458 QualType => try p.formatQualType(w, fmt[i..], arg),
459 text_literal.Ascii => try arg.format(w, fmt[i..]),
460 Result => try p.formatResult(w, fmt[i..], arg),
461 *Result => try p.formatResult(w, fmt[i..], arg.*),
462 Enumerator, *Enumerator => try p.formatResult(w, fmt[i..], .{
463 .node = undefined,
464 .val = arg.val,
465 .qt = arg.qt,
466 }),
467 Codepoint => try arg.format(w, fmt[i..]),
468 Normalized => try arg.format(w, fmt[i..]),
469 Escaped => try arg.format(w, fmt[i..]),
470 else => switch (@typeInfo(@TypeOf(arg))) {
471 .int, .comptime_int => try Diagnostics.formatInt(w, fmt[i..], arg),
472 .pointer => try Diagnostics.formatString(w, fmt[i..], arg),
473 else => unreachable,
474 },
475 };
476 }
477 try w.writeAll(fmt[i..]);
478}
479
480fn formatTokenId(w: *std.Io.Writer, fmt: []const u8, tok_id: Tree.Token.Id) !usize {
481 const template = "{tok_id}";
482 const i = std.mem.indexOf(u8, fmt, template).?;
483 try w.writeAll(fmt[0..i]);
484 try w.writeAll(tok_id.symbol());
485 return i + template.len;
486}
487
488fn formatQualType(p: *Parser, w: *std.Io.Writer, fmt: []const u8, qt: QualType) !usize {
489 const template = "{qt}";
490 const i = std.mem.indexOf(u8, fmt, template).?;
491 try w.writeAll(fmt[0..i]);
492 try w.writeByte('\'');
493 try qt.print(p.comp, w);
494 try w.writeByte('\'');
495
496 if (qt.isC23Auto()) return i + template.len;
497 if (qt.get(p.comp, .vector)) |vector_ty| {
498 try w.print(" (vector of {d} '", .{vector_ty.len});
499 try vector_ty.elem.printDesugared(p.comp, w);
500 try w.writeAll("' values)");
501 } else if (qt.shouldDesugar(p.comp)) {
502 try w.writeAll(" (aka '");
503 try qt.printDesugared(p.comp, w);
504 try w.writeAll("')");
505 }
506 return i + template.len;
507}
508
509fn formatResult(p: *Parser, w: *std.Io.Writer, fmt: []const u8, res: Result) !usize {
510 const template = "{value}";
511 const i = std.mem.indexOf(u8, fmt, template).?;
512 try w.writeAll(fmt[0..i]);
513
514 switch (res.val.opt_ref) {
515 .none => try w.writeAll("(none)"),
516 .null => try w.writeAll("nullptr_t"),
517 else => if (try res.val.print(res.qt, p.comp, w)) |nested| switch (nested) {
518 .pointer => |ptr| {
519 const ptr_node: Node.Index = @enumFromInt(ptr.node);
520 const decl_name = p.tree.tokSlice(ptr_node.tok(&p.tree));
521 try ptr.offset.printPointer(decl_name, p.comp, w);
522 },
523 },
524 }
418525
419pub fn err(p: *Parser, tag: Diagnostics.Tag) Compilation.Error!void {
420 @branchHint(.cold);
421 return p.errExtra(tag, p.tok_i, .{ .none = {} });
526 return i + template.len;
422527}
423528
424pub fn todo(p: *Parser, msg: []const u8) Error {
425 try p.errStr(.todo, p.tok_i, msg);
426 return error.ParsingFailed;
427}
529const Normalized = struct {
530 str: []const u8,
428531
429pub fn removeNull(p: *Parser, str: Value) !Value {
430 const strings_top = p.strings.items.len;
431 defer p.strings.items.len = strings_top;
432 {
433 const bytes = p.comp.interner.get(str.ref()).bytes;
434 try p.strings.appendSlice(bytes[0 .. bytes.len - 1]);
532 fn init(str: []const u8) Normalized {
533 return .{ .str = str };
435534 }
436 return Value.intern(p.comp, .{ .bytes = p.strings.items[strings_top..] });
437}
438535
439pub fn typeStr(p: *Parser, ty: Type) ![]const u8 {
440 if (@import("builtin").mode != .Debug) {
441 if (ty.is(.invalid)) {
442 return "Tried to render invalid type - this is an aro bug.";
536 pub fn format(ctx: Normalized, w: *std.Io.Writer, fmt_str: []const u8) !usize {
537 const template = "{normalized}";
538 const i = std.mem.indexOf(u8, fmt_str, template).?;
539 try w.writeAll(fmt_str[0..i]);
540 var it: std.unicode.Utf8Iterator = .{
541 .bytes = ctx.str,
542 .i = 0,
543 };
544 while (it.nextCodepoint()) |codepoint| {
545 if (codepoint < 0x7F) {
546 try w.writeByte(@intCast(codepoint));
547 } else if (codepoint < 0xFFFF) {
548 try w.writeAll("\\u");
549 try w.printInt(codepoint, 16, .upper, .{
550 .fill = '0',
551 .width = 4,
552 });
553 } else {
554 try w.writeAll("\\U");
555 try w.printInt(codepoint, 16, .upper, .{
556 .fill = '0',
557 .width = 8,
558 });
559 }
443560 }
561 return i + template.len;
444562 }
445 if (Type.Builder.fromType(ty).str(p.comp.langopts)) |str| return str;
446 const strings_top = p.strings.items.len;
447 defer p.strings.items.len = strings_top;
563};
448564
449 const mapper = p.comp.string_interner.getSlowTypeMapper();
450 {
451 var unmanaged = p.strings.moveToUnmanaged();
452 var allocating: std.Io.Writer.Allocating = .fromArrayList(p.comp.gpa, &unmanaged);
453 defer {
454 unmanaged = allocating.toArrayList();
455 p.strings = unmanaged.toManaged(p.comp.gpa);
456 }
457 ty.print(mapper, p.comp.langopts, &allocating.writer) catch |e| switch (e) {
458 error.WriteFailed => return error.OutOfMemory,
459 };
460 }
461 return try p.comp.diagnostics.arena.allocator().dupe(u8, p.strings.items[strings_top..]);
462}
565const Codepoint = struct {
566 codepoint: u21,
463567
464pub fn typePairStr(p: *Parser, a: Type, b: Type) ![]const u8 {
465 return p.typePairStrExtra(a, " and ", b);
466}
568 fn init(codepoint: u21) Codepoint {
569 return .{ .codepoint = codepoint };
570 }
467571
468pub fn typePairStrExtra(p: *Parser, a: Type, msg: []const u8, b: Type) Error![]const u8 {
469 if (@import("builtin").mode != .Debug) {
470 if (a.is(.invalid) or b.is(.invalid)) {
471 return "Tried to render invalid type - this is an aro bug.";
472 }
572 pub fn format(ctx: Codepoint, w: *std.Io.Writer, fmt_str: []const u8) !usize {
573 const template = "{codepoint}";
574 const i = std.mem.indexOf(u8, fmt_str, template).?;
575 try w.writeAll(fmt_str[0..i]);
576 try w.print("{X:0>4}", .{ctx.codepoint});
577 return i + template.len;
473578 }
474 const strings_top = p.strings.items.len;
475 defer p.strings.items.len = strings_top;
579};
476580
477 try p.strings.append('\'');
478 const mapper = p.comp.string_interner.getSlowTypeMapper();
479 {
480 var unmanaged = p.strings.moveToUnmanaged();
481 var allocating: std.Io.Writer.Allocating = .fromArrayList(p.comp.gpa, &unmanaged);
482 defer {
483 unmanaged = allocating.toArrayList();
484 p.strings = unmanaged.toManaged(p.comp.gpa);
485 }
486 a.print(mapper, p.comp.langopts, &allocating.writer) catch |e| switch (e) {
487 error.WriteFailed => return error.OutOfMemory,
488 };
581const Escaped = struct {
582 str: []const u8,
583
584 fn init(str: []const u8) Escaped {
585 return .{ .str = str };
489586 }
490 try p.strings.append('\'');
491 try p.strings.appendSlice(msg);
492 try p.strings.append('\'');
493 {
494 var unmanaged = p.strings.moveToUnmanaged();
495 var allocating: std.Io.Writer.Allocating = .fromArrayList(p.comp.gpa, &unmanaged);
496 defer {
497 unmanaged = allocating.toArrayList();
498 p.strings = unmanaged.toManaged(p.comp.gpa);
499 }
500 b.print(mapper, p.comp.langopts, &allocating.writer) catch |e| switch (e) {
501 error.WriteFailed => return error.OutOfMemory,
502 };
587
588 pub fn format(ctx: Escaped, w: *std.Io.Writer, fmt_str: []const u8) !usize {
589 const template = "{s}";
590 const i = std.mem.indexOf(u8, fmt_str, template).?;
591 try w.writeAll(fmt_str[0..i]);
592 try std.zig.stringEscape(ctx.str, w);
593 return i + template.len;
503594 }
504 try p.strings.append('\'');
505 return try p.comp.diagnostics.arena.allocator().dupe(u8, p.strings.items[strings_top..]);
595};
596
597pub fn todo(p: *Parser, msg: []const u8) Error {
598 try p.err(p.tok_i, .todo, .{msg});
599 return error.ParsingFailed;
506600}
507601
508pub fn valueChangedStr(p: *Parser, res: *Result, old_value: Value, int_ty: Type) Error![]const u8 {
602pub fn removeNull(p: *Parser, str: Value) !Value {
509603 const strings_top = p.strings.items.len;
510604 defer p.strings.items.len = strings_top;
511
512 const type_pair_str = try p.typePairStrExtra(res.ty, " to ", int_ty);
513605 {
514 var unmanaged = p.strings.moveToUnmanaged();
515 var allocating: std.Io.Writer.Allocating = .fromArrayList(p.comp.gpa, &unmanaged);
516 defer {
517 unmanaged = allocating.toArrayList();
518 p.strings = unmanaged.toManaged(p.comp.gpa);
519 }
520 allocating.writer.writeAll(type_pair_str) catch return error.OutOfMemory;
521
522 allocating.writer.writeAll(" changes ") catch return error.OutOfMemory;
523 if (res.val.isZero(p.comp)) allocating.writer.writeAll("non-zero ") catch return error.OutOfMemory;
524 allocating.writer.writeAll("value from ") catch return error.OutOfMemory;
525 old_value.print(res.ty, p.comp, &allocating.writer) catch |e| switch (e) {
526 error.WriteFailed => return error.OutOfMemory,
527 };
528 allocating.writer.writeAll(" to ") catch return error.OutOfMemory;
529 res.val.print(int_ty, p.comp, &allocating.writer) catch |e| switch (e) {
530 error.WriteFailed => return error.OutOfMemory,
531 };
606 const bytes = p.comp.interner.get(str.ref()).bytes;
607 try p.strings.appendSlice(bytes[0 .. bytes.len - 1]);
532608 }
533
534 return try p.comp.diagnostics.arena.allocator().dupe(u8, p.strings.items[strings_top..]);
609 return Value.intern(p.comp, .{ .bytes = p.strings.items[strings_top..] });
535610}
536611
537fn checkDeprecatedUnavailable(p: *Parser, ty: Type, usage_tok: TokenIndex, decl_tok: TokenIndex) !void {
538 if (ty.getAttribute(.@"error")) |@"error"| {
539 const strings_top = p.strings.items.len;
540 defer p.strings.items.len = strings_top;
612pub fn errValueChanged(p: *Parser, tok_i: TokenIndex, diagnostic: Diagnostic, res: Result, old_val: Value, int_qt: QualType) !void {
613 const zero_str = if (res.val.isZero(p.comp)) "non-zero " else "";
614 const old_res: Result = .{
615 .node = undefined,
616 .val = old_val,
617 .qt = res.qt,
618 };
619 const new_res: Result = .{
620 .node = undefined,
621 .val = res.val,
622 .qt = int_qt,
623 };
624 try p.err(tok_i, diagnostic, .{ res.qt, int_qt, zero_str, old_res, new_res });
625}
541626
627fn checkDeprecatedUnavailable(p: *Parser, ty: QualType, usage_tok: TokenIndex, decl_tok: TokenIndex) !void {
628 if (ty.getAttribute(p.comp, .@"error")) |@"error"| {
542629 const msg_str = p.comp.interner.get(@"error".msg.ref()).bytes;
543 try p.strings.print("call to '{s}' declared with attribute error: {f}", .{
544 p.tokSlice(@"error".__name_tok), std.zig.fmtString(msg_str),
545 });
546 const str = try p.comp.diagnostics.arena.allocator().dupe(u8, p.strings.items[strings_top..]);
547 try p.errStr(.error_attribute, usage_tok, str);
630 try p.err(usage_tok, .error_attribute, .{ p.tokSlice(@"error".__name_tok), std.zig.fmtString(msg_str) });
548631 }
549 if (ty.getAttribute(.warning)) |warning| {
550 const strings_top = p.strings.items.len;
551 defer p.strings.items.len = strings_top;
552
632 if (ty.getAttribute(p.comp, .warning)) |warning| {
553633 const msg_str = p.comp.interner.get(warning.msg.ref()).bytes;
554 try p.strings.print("call to '{s}' declared with attribute warning: {f}", .{
555 p.tokSlice(warning.__name_tok), std.zig.fmtString(msg_str),
556 });
557 const str = try p.comp.diagnostics.arena.allocator().dupe(u8, p.strings.items[strings_top..]);
558 try p.errStr(.warning_attribute, usage_tok, str);
634 try p.err(usage_tok, .warning_attribute, .{ p.tokSlice(warning.__name_tok), std.zig.fmtString(msg_str) });
559635 }
560 if (ty.getAttribute(.unavailable)) |unavailable| {
561 try p.errDeprecated(.unavailable, usage_tok, unavailable.msg);
562 try p.errStr(.unavailable_note, unavailable.__name_tok, p.tokSlice(decl_tok));
636 if (ty.getAttribute(p.comp, .unavailable)) |unavailable| {
637 try p.errDeprecated(usage_tok, .unavailable, unavailable.msg);
638 try p.err(unavailable.__name_tok, .unavailable_note, .{p.tokSlice(decl_tok)});
563639 return error.ParsingFailed;
564 } else if (ty.getAttribute(.deprecated)) |deprecated| {
565 try p.errDeprecated(.deprecated_declarations, usage_tok, deprecated.msg);
566 try p.errStr(.deprecated_note, deprecated.__name_tok, p.tokSlice(decl_tok));
640 }
641 if (ty.getAttribute(p.comp, .deprecated)) |deprecated| {
642 try p.errDeprecated(usage_tok, .deprecated_declarations, deprecated.msg);
643 try p.err(deprecated.__name_tok, .deprecated_note, .{p.tokSlice(decl_tok)});
567644 }
568645}
569646
570fn errDeprecated(p: *Parser, tag: Diagnostics.Tag, tok_i: TokenIndex, msg: ?Value) Compilation.Error!void {
571 const strings_top = p.strings.items.len;
572 defer p.strings.items.len = strings_top;
647fn errDeprecated(p: *Parser, tok_i: TokenIndex, diagnostic: Diagnostic, msg: ?Value) Compilation.Error!void {
648 const colon_str: []const u8 = if (msg != null) ": " else "";
649 const msg_str: []const u8 = if (msg) |m| p.comp.interner.get(m.ref()).bytes else "";
650 return p.err(tok_i, diagnostic, .{ p.tokSlice(tok_i), colon_str, Escaped.init(msg_str) });
651}
573652
574 try p.strings.print("'{s}' is ", .{p.tokSlice(tok_i)});
575 const reason: []const u8 = switch (tag) {
576 .unavailable => "unavailable",
577 .deprecated_declarations => "deprecated",
578 else => unreachable,
579 };
580 try p.strings.appendSlice(reason);
581 if (msg) |m| {
582 const str = p.comp.interner.get(m.ref()).bytes;
583 try p.strings.print(": {f}", .{std.zig.fmtString(str)});
584 }
585 const str = try p.comp.diagnostics.arena.allocator().dupe(u8, p.strings.items[strings_top..]);
586 return p.errStr(tag, tok_i, str);
653fn addNode(p: *Parser, node: Tree.Node) Allocator.Error!Node.Index {
654 if (p.in_macro) return undefined;
655 return p.tree.addNode(node);
587656}
588657
589fn addNode(p: *Parser, node: Tree.Node) Allocator.Error!NodeIndex {
590 if (p.in_macro) return .none;
591 const res = p.nodes.len;
592 try p.nodes.append(p.gpa, node);
593 return @enumFromInt(res);
658fn errExpectedToken(p: *Parser, expected: Token.Id, actual: Token.Id) Error {
659 switch (actual) {
660 .invalid => try p.err(p.tok_i, .expected_invalid, .{expected}),
661 .eof => try p.err(p.tok_i, .expected_eof, .{expected}),
662 else => try p.err(p.tok_i, .expected_token, .{ expected, actual }),
663 }
664 return error.ParsingFailed;
594665}
595666
596fn addList(p: *Parser, nodes: []const NodeIndex) Allocator.Error!Tree.Node.Range {
667fn addList(p: *Parser, nodes: []const Node.Index) Allocator.Error!Tree.Node.Range {
597668 if (p.in_macro) return Tree.Node.Range{ .start = 0, .end = 0 };
598669 const start: u32 = @intCast(p.data.items.len);
599670 try p.data.appendSlice(nodes);
......@@ -601,6 +672,51 @@ fn addList(p: *Parser, nodes: []const NodeIndex) Allocator.Error!Tree.Node.Range
601672 return Tree.Node.Range{ .start = start, .end = end };
602673}
603674
675/// Recursively sets the defintion field of `tentative_decl` to `definition`.
676pub fn setTentativeDeclDefinition(p: *Parser, tentative_decl: Node.Index, definition: Node.Index) void {
677 const node_data = &p.tree.nodes.items(.data)[@intFromEnum(tentative_decl)];
678 switch (p.tree.nodes.items(.tag)[@intFromEnum(tentative_decl)]) {
679 .fn_proto => {},
680 .variable => {},
681 else => return,
682 }
683
684 const prev: Node.OptIndex = @enumFromInt(node_data[2]);
685
686 node_data[2] = @intFromEnum(definition);
687 if (prev.unpack()) |some| {
688 p.setTentativeDeclDefinition(some, definition);
689 }
690}
691
692/// Clears the defintion field of declarations that were not defined so that
693/// the field always contains a _def if present.
694fn clearNonTentativeDefinitions(p: *Parser) void {
695 const tags = p.tree.nodes.items(.tag);
696 const data = p.tree.nodes.items(.data);
697 for (p.tree.root_decls.items) |root_decl| {
698 switch (tags[@intFromEnum(root_decl)]) {
699 .fn_proto => {
700 const node_data = &data[@intFromEnum(root_decl)];
701 if (node_data[2] != @intFromEnum(Node.OptIndex.null)) {
702 if (tags[node_data[2]] != .fn_def) {
703 node_data[2] = @intFromEnum(Node.OptIndex.null);
704 }
705 }
706 },
707 .variable => {
708 const node_data = &data[@intFromEnum(root_decl)];
709 if (node_data[2] != @intFromEnum(Node.OptIndex.null)) {
710 if (tags[node_data[2]] != .variable_def) {
711 node_data[2] = @intFromEnum(Node.OptIndex.null);
712 }
713 }
714 },
715 else => {},
716 }
717 }
718}
719
604720fn findLabel(p: *Parser, name: []const u8) ?TokenIndex {
605721 for (p.labels.items) |item| {
606722 switch (item) {
......@@ -611,64 +727,36 @@ fn findLabel(p: *Parser, name: []const u8) ?TokenIndex {
611727 return null;
612728}
613729
614fn nodeIs(p: *Parser, node: NodeIndex, tag: Tree.Tag) bool {
730fn nodeIs(p: *Parser, node: Node.Index, comptime tag: std.meta.Tag(Tree.Node)) bool {
615731 return p.getNode(node, tag) != null;
616732}
617733
618pub fn getDecayedStringLiteral(p: *Parser, node: NodeIndex) ?Value {
619 const cast_node = p.getNode(node, .implicit_cast) orelse return null;
620 const data = p.nodes.items(.data)[@intFromEnum(cast_node)];
621 if (data.cast.kind != .array_to_pointer) return null;
622 const literal_node = p.getNode(data.cast.operand, .string_literal_expr) orelse return null;
623 return p.value_map.get(literal_node);
624}
625
626fn getNode(p: *Parser, node: NodeIndex, tag: Tree.Tag) ?NodeIndex {
734pub fn getDecayedStringLiteral(p: *Parser, node: Node.Index) ?Value {
627735 var cur = node;
628 const tags = p.nodes.items(.tag);
629 const data = p.nodes.items(.data);
630736 while (true) {
631 const cur_tag = tags[@intFromEnum(cur)];
632 if (cur_tag == .paren_expr) {
633 cur = data[@intFromEnum(cur)].un;
634 } else if (cur_tag == tag) {
635 return cur;
636 } else {
637 return null;
737 switch (cur.get(&p.tree)) {
738 .paren_expr => |un| cur = un.operand,
739 .string_literal_expr => return p.tree.value_map.get(cur),
740 .cast => |cast| switch (cast.kind) {
741 .no_op, .bitcast, .array_to_pointer => cur = cast.operand,
742 else => return null,
743 },
744 else => return null,
638745 }
639746 }
640747}
641748
642fn nodeIsCompoundLiteral(p: *Parser, node: NodeIndex) bool {
749fn getNode(p: *Parser, node: Node.Index, comptime tag: std.meta.Tag(Tree.Node)) ?@FieldType(Node, @tagName(tag)) {
643750 var cur = node;
644 const tags = p.nodes.items(.tag);
645 const data = p.nodes.items(.data);
646751 while (true) {
647 switch (tags[@intFromEnum(cur)]) {
648 .paren_expr => cur = data[@intFromEnum(cur)].un,
649 .compound_literal_expr,
650 .static_compound_literal_expr,
651 .thread_local_compound_literal_expr,
652 .static_thread_local_compound_literal_expr,
653 => return true,
654 else => return false,
752 switch (cur.get(&p.tree)) {
753 .paren_expr => |un| cur = un.operand,
754 tag => |data| return data,
755 else => return null,
655756 }
656757 }
657758}
658759
659fn tmpTree(p: *Parser) Tree {
660 return .{
661 .nodes = p.nodes.slice(),
662 .data = p.data.items,
663 .value_map = p.value_map,
664 .comp = p.comp,
665 .arena = undefined,
666 .generated = undefined,
667 .tokens = undefined,
668 .root_decls = undefined,
669 };
670}
671
672760fn pragma(p: *Parser) Compilation.Error!bool {
673761 var found_pragma = false;
674762 while (p.eatToken(.keyword_pragma)) |_| {
......@@ -691,30 +779,22 @@ fn pragma(p: *Parser) Compilation.Error!bool {
691779fn diagnoseIncompleteDefinitions(p: *Parser) !void {
692780 @branchHint(.cold);
693781
694 const node_slices = p.nodes.slice();
695 const tags = node_slices.items(.tag);
696 const tys = node_slices.items(.ty);
697 const data = node_slices.items(.data);
698
699 for (p.decl_buf.items) |decl_node| {
700 const idx = @intFromEnum(decl_node);
701 switch (tags[idx]) {
702 .struct_forward_decl, .union_forward_decl, .enum_forward_decl => {},
782 for (p.decl_buf.items) |decl_index| {
783 const node = decl_index.get(&p.tree);
784 const forward = switch (node) {
785 .struct_forward_decl, .union_forward_decl, .enum_forward_decl => |forward| forward,
703786 else => continue,
704 }
787 };
705788
706 const ty = tys[idx];
707 const decl_type_name = if (ty.getRecord()) |rec|
708 rec.name
709 else if (ty.get(.@"enum")) |en|
710 en.data.@"enum".name
711 else
712 unreachable;
789 const decl_type_name = switch (forward.container_qt.base(p.comp).type) {
790 .@"struct", .@"union" => |record_ty| record_ty.name,
791 .@"enum" => |enum_ty| enum_ty.name,
792 else => unreachable,
793 };
713794
714795 const tentative_def_tok = p.tentative_defs.get(decl_type_name) orelse continue;
715 const type_str = try p.typeStr(ty);
716 try p.errStr(.tentative_definition_incomplete, tentative_def_tok, type_str);
717 try p.errStr(.forward_declaration_here, data[idx].decl_ref, type_str);
796 try p.err(tentative_def_tok, .tentative_definition_incomplete, .{forward.container_qt});
797 try p.err(forward.name_or_kind_tok, .forward_declaration_here, .{forward.container_qt});
718798 }
719799}
720800
......@@ -723,39 +803,37 @@ pub fn parse(pp: *Preprocessor) Error!Tree {
723803 assert(pp.linemarkers == .none);
724804 pp.comp.pragmaEvent(.before_parse);
725805
726 var arena = std.heap.ArenaAllocator.init(pp.comp.gpa);
727 errdefer arena.deinit();
728 var p = Parser{
806 const expected_implicit_typedef_max = 7;
807 try pp.tokens.ensureUnusedCapacity(pp.gpa, expected_implicit_typedef_max);
808
809 var p: Parser = .{
729810 .pp = pp,
730811 .comp = pp.comp,
812 .diagnostics = pp.diagnostics,
731813 .gpa = pp.comp.gpa,
732 .arena = arena.allocator(),
814 .tree = .{
815 .comp = pp.comp,
816 .tokens = undefined, // Set after implicit typedefs
817 },
733818 .tok_ids = pp.tokens.items(.id),
734 .strings = std.array_list.Managed(u8).init(pp.comp.gpa),
735 .value_map = Tree.ValueMap.init(pp.comp.gpa),
736 .data = NodeList.init(pp.comp.gpa),
737 .labels = std.array_list.Managed(Label).init(pp.comp.gpa),
738 .list_buf = NodeList.init(pp.comp.gpa),
739 .decl_buf = NodeList.init(pp.comp.gpa),
740 .param_buf = std.array_list.Managed(Type.Func.Param).init(pp.comp.gpa),
741 .enum_buf = std.array_list.Managed(Type.Enum.Field).init(pp.comp.gpa),
742 .record_buf = std.array_list.Managed(Type.Record.Field).init(pp.comp.gpa),
743 .field_attr_buf = std.array_list.Managed([]const Attribute).init(pp.comp.gpa),
819 .strings = .init(pp.comp.gpa),
820 .labels = .init(pp.comp.gpa),
821 .list_buf = .init(pp.comp.gpa),
822 .decl_buf = .init(pp.comp.gpa),
823 .param_buf = .init(pp.comp.gpa),
824 .enum_buf = .init(pp.comp.gpa),
825 .record_buf = .init(pp.comp.gpa),
744826 .string_ids = .{
745 .declspec_id = try StrInt.intern(pp.comp, "__declspec"),
746 .main_id = try StrInt.intern(pp.comp, "main"),
747 .file = try StrInt.intern(pp.comp, "FILE"),
748 .jmp_buf = try StrInt.intern(pp.comp, "jmp_buf"),
749 .sigjmp_buf = try StrInt.intern(pp.comp, "sigjmp_buf"),
750 .ucontext_t = try StrInt.intern(pp.comp, "ucontext_t"),
827 .declspec_id = try pp.comp.internString("__declspec"),
828 .main_id = try pp.comp.internString("main"),
829 .file = try pp.comp.internString("FILE"),
830 .jmp_buf = try pp.comp.internString("jmp_buf"),
831 .sigjmp_buf = try pp.comp.internString("sigjmp_buf"),
832 .ucontext_t = try pp.comp.internString("ucontext_t"),
751833 },
752834 };
753 errdefer {
754 p.nodes.deinit(pp.comp.gpa);
755 p.value_map.deinit();
756 }
835 errdefer p.tree.deinit();
757836 defer {
758 p.data.deinit();
759837 p.labels.deinit();
760838 p.strings.deinit();
761839 p.syms.deinit(pp.comp.gpa);
......@@ -768,41 +846,35 @@ pub fn parse(pp: *Preprocessor) Error!Tree {
768846 p.attr_buf.deinit(pp.comp.gpa);
769847 p.attr_application_buf.deinit(pp.comp.gpa);
770848 p.tentative_defs.deinit(pp.comp.gpa);
771 assert(p.field_attr_buf.items.len == 0);
772 p.field_attr_buf.deinit();
773849 }
774850
775851 try p.syms.pushScope(&p);
776852 defer p.syms.popScope();
777853
778 // NodeIndex 0 must be invalid
779 _ = try p.addNode(.{ .tag = .invalid, .ty = undefined, .data = undefined, .loc = undefined });
780
781854 {
782855 if (p.comp.langopts.hasChar8_T()) {
783 try p.syms.defineTypedef(&p, try StrInt.intern(p.comp, "char8_t"), .{ .specifier = .uchar }, 0, .none);
856 try p.addImplicitTypedef("char8_t", .uchar);
784857 }
785 try p.syms.defineTypedef(&p, try StrInt.intern(p.comp, "__int128_t"), .{ .specifier = .int128 }, 0, .none);
786 try p.syms.defineTypedef(&p, try StrInt.intern(p.comp, "__uint128_t"), .{ .specifier = .uint128 }, 0, .none);
787
788 const elem_ty = try p.arena.create(Type);
789 elem_ty.* = .{ .specifier = .char };
790 try p.syms.defineTypedef(&p, try StrInt.intern(p.comp, "__builtin_ms_va_list"), .{
791 .specifier = .pointer,
792 .data = .{ .sub_type = elem_ty },
793 }, 0, .none);
858 try p.addImplicitTypedef("__int128_t", .int128);
859 try p.addImplicitTypedef("__uint128_t", .uint128);
794860
795 const ty = &pp.comp.types.va_list;
796 try p.syms.defineTypedef(&p, try StrInt.intern(p.comp, "__builtin_va_list"), ty.*, 0, .none);
861 try p.addImplicitTypedef("__builtin_ms_va_list", .char_pointer);
797862
798 if (ty.isArray()) ty.decayArray();
863 const va_list_qt = pp.comp.type_store.va_list;
864 try p.addImplicitTypedef("__builtin_va_list", va_list_qt);
865 pp.comp.type_store.va_list = try va_list_qt.decay(pp.comp);
799866
800 try p.syms.defineTypedef(&p, try StrInt.intern(p.comp, "__NSConstantString"), pp.comp.types.ns_constant_string.ty, 0, .none);
867 try p.addImplicitTypedef("__NSConstantString", pp.comp.type_store.ns_constant_string);
801868
802869 if (p.comp.float80Type()) |float80_ty| {
803 try p.syms.defineTypedef(&p, try StrInt.intern(p.comp, "__float80"), float80_ty, 0, .none);
870 try p.addImplicitTypedef("__float80", float80_ty);
804871 }
872
873 // Set here so that the newly generated tokens are included.
874 p.tree.tokens = p.pp.tokens.slice();
805875 }
876 const implicit_typedef_count = p.decl_buf.items.len;
877 assert(implicit_typedef_count <= expected_implicit_typedef_max);
806878
807879 while (p.eatToken(.eof) == null) {
808880 if (try p.pragma()) continue;
......@@ -824,7 +896,7 @@ pub fn parse(pp: *Preprocessor) Error!Tree {
824896 .keyword_asm1,
825897 .keyword_asm2,
826898 => {},
827 else => try p.err(.expected_external_decl),
899 else => try p.err(p.tok_i, .expected_external_decl, .{}),
828900 }
829901 continue;
830902 }
......@@ -839,35 +911,60 @@ pub fn parse(pp: *Preprocessor) Error!Tree {
839911 continue;
840912 }
841913 if (p.eatToken(.semicolon)) |tok| {
842 try p.errTok(.extra_semi, tok);
914 try p.err(tok, .extra_semi, .{});
915 const empty = try p.tree.addNode(.{ .empty_decl = .{
916 .semicolon = tok,
917 } });
918 try p.decl_buf.append(empty);
843919 continue;
844920 }
845 try p.err(.expected_external_decl);
846 p.tok_i += 1;
921 try p.err(p.tok_i, .expected_external_decl, .{});
922 p.nextExternDecl();
847923 }
848924 if (p.tentative_defs.count() > 0) {
849925 try p.diagnoseIncompleteDefinitions();
850926 }
851927
852 const root_decls = try p.decl_buf.toOwnedSlice();
853 errdefer pp.comp.gpa.free(root_decls);
854 if (root_decls.len == 0) {
855 try p.errTok(.empty_translation_unit, p.tok_i - 1);
928 p.tree.root_decls = p.decl_buf.moveToUnmanaged();
929 if (p.tree.root_decls.items.len == implicit_typedef_count) {
930 try p.err(p.tok_i - 1, .empty_translation_unit, .{});
856931 }
857932 pp.comp.pragmaEvent(.after_parse);
858933
859 const data = try p.data.toOwnedSlice();
860 errdefer pp.comp.gpa.free(data);
861 return Tree{
862 .comp = pp.comp,
863 .tokens = pp.tokens.slice(),
864 .arena = arena,
865 .generated = pp.comp.generated_buf.items,
866 .nodes = p.nodes.toOwnedSlice(),
867 .data = data,
868 .root_decls = root_decls,
869 .value_map = p.value_map,
870 };
934 p.clearNonTentativeDefinitions();
935
936 return p.tree;
937}
938
939fn addImplicitTypedef(p: *Parser, name: []const u8, qt: QualType) !void {
940 const start = p.comp.generated_buf.items.len;
941 try p.comp.generated_buf.appendSlice(p.comp.gpa, name);
942 try p.comp.generated_buf.append(p.comp.gpa, '\n');
943
944 const name_tok: u32 = @intCast(p.pp.tokens.len);
945 p.pp.tokens.appendAssumeCapacity(.{ .id = .identifier, .loc = .{
946 .id = .generated,
947 .byte_offset = @intCast(start),
948 .line = p.pp.generated_line,
949 } });
950 p.pp.generated_line += 1;
951
952 const node = try p.addNode(.{
953 .typedef = .{
954 .name_tok = name_tok,
955 .qt = qt,
956 .implicit = true,
957 },
958 });
959
960 const interned_name = try p.comp.internString(name);
961 const typedef_qt = (try p.comp.type_store.put(p.gpa, .{ .typedef = .{
962 .base = qt,
963 .name = interned_name,
964 .decl_node = node,
965 } })).withQualifiers(qt);
966 try p.syms.defineTypedef(p, interned_name, typedef_qt, name_tok, node);
967 try p.decl_buf.append(node);
871968}
872969
873970fn skipToPragmaSentinel(p: *Parser) void {
......@@ -895,9 +992,7 @@ fn nextExternDecl(p: *Parser) void {
895992 while (true) : (p.tok_i += 1) {
896993 switch (p.tok_ids[p.tok_i]) {
897994 .l_paren, .l_brace, .l_bracket => parens += 1,
898 .r_paren, .r_brace, .r_bracket => if (parens != 0) {
899 parens -= 1;
900 },
995 .r_paren, .r_brace, .r_bracket => parens -|= 1,
901996 .keyword_typedef,
902997 .keyword_extern,
903998 .keyword_static,
......@@ -969,15 +1064,15 @@ fn skipTo(p: *Parser, id: Token.Id) void {
9691064}
9701065
9711066/// Called after a typedef is defined
972fn typedefDefined(p: *Parser, name: StringId, ty: Type) void {
1067fn typedefDefined(p: *Parser, name: StringId, ty: QualType) void {
9731068 if (name == p.string_ids.file) {
974 p.comp.types.file = ty;
1069 p.comp.type_store.file = ty;
9751070 } else if (name == p.string_ids.jmp_buf) {
976 p.comp.types.jmp_buf = ty;
1071 p.comp.type_store.jmp_buf = ty;
9771072 } else if (name == p.string_ids.sigjmp_buf) {
978 p.comp.types.sigjmp_buf = ty;
1073 p.comp.type_store.sigjmp_buf = ty;
9791074 } else if (name == p.string_ids.ucontext_t) {
980 p.comp.types.ucontext_t = ty;
1075 p.comp.type_store.ucontext_t = ty;
9811076 }
9821077}
9831078
......@@ -994,97 +1089,120 @@ fn decl(p: *Parser) Error!bool {
9941089
9951090 try p.attributeSpecifier();
9961091
997 var decl_spec = if (try p.declSpec()) |some| some else blk: {
998 if (p.func.ty != null) {
1092 var decl_spec = (try p.declSpec()) orelse blk: {
1093 if (p.func.qt != null) {
9991094 p.tok_i = first_tok;
10001095 return false;
10011096 }
10021097 switch (p.tok_ids[first_tok]) {
1003 .asterisk, .l_paren, .identifier, .extended_identifier => {},
1098 .asterisk, .l_paren => {},
1099 .identifier, .extended_identifier => switch (p.tok_ids[first_tok + 1]) {
1100 .identifier, .extended_identifier => {
1101 // The most likely reason for `identifier identifier` is
1102 // an unknown type name.
1103 try p.err(p.tok_i, .unknown_type_name, .{p.tokSlice(p.tok_i)});
1104 p.tok_i += 1;
1105 break :blk DeclSpec{ .qt = .invalid };
1106 },
1107 else => {},
1108 },
10041109 else => if (p.tok_i != first_tok) {
1005 try p.err(.expected_ident_or_l_paren);
1110 try p.err(p.tok_i, .expected_ident_or_l_paren, .{});
10061111 return error.ParsingFailed;
10071112 } else return false,
10081113 }
1009 var spec: Type.Builder = .{};
1010 break :blk DeclSpec{ .ty = try spec.finish(p) };
1114 var builder: TypeStore.Builder = .{ .parser = p };
1115 break :blk DeclSpec{ .qt = try builder.finish() };
10111116 };
10121117 if (decl_spec.noreturn) |tok| {
10131118 const attr = Attribute{ .tag = .noreturn, .args = .{ .noreturn = .{} }, .syntax = .keyword };
10141119 try p.attr_buf.append(p.gpa, .{ .attr = attr, .tok = tok });
10151120 }
1016 var init_d = (try p.initDeclarator(&decl_spec, attr_buf_top)) orelse {
1121
1122 var decl_node = try p.tree.addNode(.{ .empty_decl = .{
1123 .semicolon = first_tok,
1124 } });
1125 var init_d = (try p.initDeclarator(&decl_spec, attr_buf_top, decl_node)) orelse {
10171126 _ = try p.expectToken(.semicolon);
1018 if (decl_spec.ty.is(.@"enum") or
1019 (decl_spec.ty.isRecord() and !decl_spec.ty.isAnonymousRecord(p.comp) and
1020 !decl_spec.ty.isTypeof())) // we follow GCC and clang's behavior here
1021 {
1022 const specifier = decl_spec.ty.canonicalize(.standard).specifier;
1023 const attrs = p.attr_buf.items(.attr)[attr_buf_top..];
1024 const toks = p.attr_buf.items(.tok)[attr_buf_top..];
1025 for (attrs, toks) |attr, tok| {
1026 try p.errExtra(.ignored_record_attr, tok, .{
1027 .ignored_record_attr = .{ .tag = attr.tag, .specifier = switch (specifier) {
1028 .@"enum" => .@"enum",
1029 .@"struct" => .@"struct",
1030 .@"union" => .@"union",
1031 else => unreachable,
1032 } },
1033 });
1127
1128 missing_decl: {
1129 if (decl_spec.qt.type(p.comp) == .typeof) {
1130 // we follow GCC and clang's behavior here
1131 try p.err(first_tok, .missing_declaration, .{});
1132 return true;
1133 }
1134 switch (decl_spec.qt.base(p.comp).type) {
1135 .@"enum" => break :missing_decl,
1136 .@"struct", .@"union" => |record_ty| if (!record_ty.isAnonymous(p.comp)) break :missing_decl,
1137 else => {},
10341138 }
1139
1140 try p.err(first_tok, .missing_declaration, .{});
10351141 return true;
10361142 }
10371143
1038 try p.errTok(.missing_declaration, first_tok);
1144 const attrs = p.attr_buf.items(.attr)[attr_buf_top..];
1145 const toks = p.attr_buf.items(.tok)[attr_buf_top..];
1146 for (attrs, toks) |attr, tok| {
1147 try p.err(tok, .ignored_record_attr, .{
1148 @tagName(attr.tag), @tagName(decl_spec.qt.base(p.comp).type),
1149 });
1150 }
10391151 return true;
10401152 };
10411153
10421154 // Check for function definition.
1043 if (init_d.d.func_declarator != null and init_d.initializer.node == .none and init_d.d.ty.isFunc()) fn_def: {
1044 if (decl_spec.auto_type) |tok_i| {
1045 try p.errStr(.auto_type_not_allowed, tok_i, "function return type");
1046 return error.ParsingFailed;
1047 }
1048
1155 if (init_d.d.declarator_type == .func and init_d.initializer == null) fn_def: {
10491156 switch (p.tok_ids[p.tok_i]) {
10501157 .comma, .semicolon => break :fn_def,
10511158 .l_brace => {},
10521159 else => if (init_d.d.old_style_func == null) {
1053 try p.err(.expected_fn_body);
1160 try p.err(p.tok_i - 1, .expected_fn_body, .{});
10541161 return true;
10551162 },
10561163 }
1057 if (p.func.ty != null) try p.err(.func_not_in_root);
1058
1059 const node = try p.addNode(undefined); // reserve space
1060 const interned_declarator_name = try StrInt.intern(p.comp, p.tokSlice(init_d.d.name));
1061 try p.syms.defineSymbol(p, interned_declarator_name, init_d.d.ty, init_d.d.name, node, .{}, false);
1164 if (p.func.qt != null) try p.err(p.tok_i, .func_not_in_root, .{});
10621165
1166 const interned_declarator_name = try p.comp.internString(p.tokSlice(init_d.d.name));
1167 try p.syms.defineSymbol(p, interned_declarator_name, init_d.d.qt, init_d.d.name, decl_node, .{}, false);
10631168 const func = p.func;
10641169 p.func = .{
1065 .ty = init_d.d.ty,
1170 .qt = init_d.d.qt,
10661171 .name = init_d.d.name,
10671172 };
1068 if (interned_declarator_name == p.string_ids.main_id and !init_d.d.ty.returnType().is(.int)) {
1069 try p.errTok(.main_return_type, init_d.d.name);
1070 }
10711173 defer p.func = func;
10721174
1175 // Check return type of 'main' function.
1176 if (interned_declarator_name == p.string_ids.main_id) {
1177 const func_ty = init_d.d.qt.get(p.comp, .func).?;
1178 const int_ty = func_ty.return_type.get(p.comp, .int);
1179 if (int_ty == null or int_ty.? != .int) {
1180 try p.err(init_d.d.name, .main_return_type, .{});
1181 }
1182 }
1183
10731184 try p.syms.pushScope(p);
10741185 defer p.syms.popScope();
10751186
10761187 // Collect old style parameter declarations.
10771188 if (init_d.d.old_style_func != null) {
1078 var base_ty = init_d.d.ty.base();
1079 base_ty.specifier = .func;
1080
10811189 const param_buf_top = p.param_buf.items.len;
10821190 defer p.param_buf.items.len = param_buf_top;
10831191
1192 // We cannot refer to the function type here because the pointer to
1193 // type_store.extra might get invalidated while parsing the param decls.
1194 const func_qt = init_d.d.qt.base(p.comp).qt;
1195 const params_len = func_qt.get(p.comp, .func).?.params.len;
1196
1197 const new_params = try p.param_buf.addManyAsSlice(params_len);
1198 for (new_params) |*new_param| {
1199 new_param.name = .empty;
1200 }
1201
10841202 param_loop: while (true) {
10851203 const param_decl_spec = (try p.declSpec()) orelse break;
10861204 if (p.eatToken(.semicolon)) |semi| {
1087 try p.errTok(.missing_declaration, semi);
1205 try p.err(semi, .missing_declaration, .{});
10881206 continue :param_loop;
10891207 }
10901208
......@@ -1092,62 +1210,85 @@ fn decl(p: *Parser) Error!bool {
10921210 const attr_buf_top_declarator = p.attr_buf.len;
10931211 defer p.attr_buf.len = attr_buf_top_declarator;
10941212
1095 var d = (try p.declarator(param_decl_spec.ty, .param)) orelse {
1096 try p.errTok(.missing_declaration, first_tok);
1213 var param_d = (try p.declarator(param_decl_spec.qt, .param)) orelse {
1214 try p.err(first_tok, .missing_declaration, .{});
10971215 _ = try p.expectToken(.semicolon);
10981216 continue :param_loop;
10991217 };
11001218 try p.attributeSpecifier();
11011219
1102 if (d.ty.hasIncompleteSize() and !d.ty.is(.void)) try p.errStr(.parameter_incomplete_ty, d.name, try p.typeStr(d.ty));
1103 if (d.ty.isFunc()) {
1104 // Params declared as functions are converted to function pointers.
1105 const elem_ty = try p.arena.create(Type);
1106 elem_ty.* = d.ty;
1107 d.ty = Type{
1108 .specifier = .pointer,
1109 .data = .{ .sub_type = elem_ty },
1110 };
1111 } else if (d.ty.isArray()) {
1112 // params declared as arrays are converted to pointers
1113 d.ty.decayArray();
1114 } else if (d.ty.is(.void)) {
1115 try p.errTok(.invalid_void_param, d.name);
1220 if (param_d.qt.hasIncompleteSize(p.comp)) {
1221 if (param_d.qt.is(p.comp, .void)) {
1222 try p.err(param_d.name, .invalid_void_param, .{});
1223 } else {
1224 try p.err(param_d.name, .parameter_incomplete_ty, .{param_d.qt});
1225 }
1226 } else {
1227 // Decay params declared as functions or arrays to pointer.
1228 param_d.qt = try param_d.qt.decay(p.comp);
11161229 }
11171230
1231 const attributed_qt = try Attribute.applyParameterAttributes(p, param_d.qt, attr_buf_top_declarator, .alignas_on_param);
1232
1233 try param_decl_spec.validateParam(p);
1234 const param_node = try p.addNode(.{
1235 .param = .{
1236 .name_tok = param_d.name,
1237 .qt = attributed_qt,
1238 .storage_class = switch (param_decl_spec.storage_class) {
1239 .none => .auto,
1240 .register => .register,
1241 else => .auto, // Error reported in `validateParam`
1242 },
1243 },
1244 });
1245
1246 const name_str = p.tokSlice(param_d.name);
1247 const interned_name = try p.comp.internString(name_str);
1248 try p.syms.defineParam(p, interned_name, attributed_qt, param_d.name, param_node);
1249
11181250 // find and correct parameter types
1119 // TODO check for missing declarations and redefinitions
1120 const name_str = p.tokSlice(d.name);
1121 const interned_name = try StrInt.intern(p.comp, name_str);
1122 for (init_d.d.ty.params()) |*param| {
1251 for (func_qt.get(p.comp, .func).?.params, new_params) |param, *new_param| {
11231252 if (param.name == interned_name) {
1124 param.ty = d.ty;
1253 new_param.* = .{
1254 .qt = attributed_qt,
1255 .name = param.name,
1256 .node = .pack(param_node),
1257 .name_tok = param.name_tok,
1258 };
11251259 break;
11261260 }
11271261 } else {
1128 try p.errStr(.parameter_missing, d.name, name_str);
1262 try p.err(param_d.name, .parameter_missing, .{name_str});
11291263 }
1130 d.ty = try Attribute.applyParameterAttributes(p, d.ty, attr_buf_top_declarator, .alignas_on_param);
1131
1132 // bypass redefinition check to avoid duplicate errors
1133 try p.syms.define(p.gpa, .{
1134 .kind = .def,
1135 .name = interned_name,
1136 .tok = d.name,
1137 .ty = d.ty,
1138 .val = .{},
1139 });
1264
11401265 if (p.eatToken(.comma) == null) break;
11411266 }
11421267 _ = try p.expectToken(.semicolon);
11431268 }
1144 } else {
1145 for (init_d.d.ty.params()) |param| {
1146 if (param.ty.hasUnboundVLA()) try p.errTok(.unbound_vla, param.name_tok);
1147 if (param.ty.hasIncompleteSize() and !param.ty.is(.void) and param.ty.specifier != .invalid) try p.errStr(.parameter_incomplete_ty, param.name_tok, try p.typeStr(param.ty));
11481269
1270 const func_ty = func_qt.get(p.comp, .func).?;
1271 for (func_ty.params, new_params) |param, *new_param| {
1272 if (new_param.name == .empty) {
1273 try p.err(param.name_tok, .param_not_declared, .{param.name.lookup(p.comp)});
1274 new_param.* = .{
1275 .name = param.name,
1276 .name_tok = param.name_tok,
1277 .node = param.node,
1278 .qt = .int,
1279 };
1280 }
1281 }
1282 // Update the functio type to contain the declared parameters.
1283 p.func.qt = try p.comp.type_store.put(p.gpa, .{ .func = .{
1284 .kind = .normal,
1285 .params = new_params,
1286 .return_type = func_ty.return_type,
1287 } });
1288 } else if (init_d.d.qt.get(p.comp, .func)) |func_ty| {
1289 for (func_ty.params) |param| {
11491290 if (param.name == .empty) {
1150 try p.errTok(.omitting_parameter_name, param.name_tok);
1291 try p.err(param.name_tok, .omitting_parameter_name, .{});
11511292 continue;
11521293 }
11531294
......@@ -1156,33 +1297,53 @@ fn decl(p: *Parser) Error!bool {
11561297 .kind = .def,
11571298 .name = param.name,
11581299 .tok = param.name_tok,
1159 .ty = param.ty,
1300 .qt = param.qt,
11601301 .val = .{},
1302 .node = param.node,
11611303 });
1304 if (param.qt.isInvalid()) continue;
1305
1306 if (param.qt.get(p.comp, .pointer)) |pointer_ty| {
1307 if (pointer_ty.decayed) |decayed_qt| {
1308 if (decayed_qt.get(p.comp, .array)) |array_ty| {
1309 if (array_ty.len == .unspecified_variable) {
1310 try p.err(param.name_tok, .unbound_vla, .{});
1311 }
1312 }
1313 }
1314 }
1315 if (param.qt.hasIncompleteSize(p.comp) and !param.qt.is(p.comp, .void)) {
1316 try p.err(param.name_tok, .parameter_incomplete_ty, .{param.qt});
1317 }
11621318 }
11631319 }
11641320
11651321 const body = (try p.compoundStmt(true, null)) orelse {
11661322 assert(init_d.d.old_style_func != null);
1167 try p.err(.expected_fn_body);
1323 try p.err(p.tok_i, .expected_fn_body, .{});
11681324 return true;
11691325 };
1170 p.nodes.set(@intFromEnum(node), .{
1171 .ty = init_d.d.ty,
1172 .tag = try decl_spec.validateFnDef(p),
1173 .data = .{ .decl = .{ .name = init_d.d.name, .node = body } },
1174 .loc = @enumFromInt(init_d.d.name),
1175 });
1176 try p.decl_buf.append(node);
1326
1327 try decl_spec.validateFnDef(p);
1328 try p.tree.setNode(.{ .function = .{
1329 .name_tok = init_d.d.name,
1330 .@"inline" = decl_spec.@"inline" != null,
1331 .static = decl_spec.storage_class == .static,
1332 .qt = p.func.qt.?,
1333 .body = body,
1334 .definition = null,
1335 } }, @intFromEnum(decl_node));
1336
1337 try p.decl_buf.append(decl_node);
11771338
11781339 // check gotos
1179 if (func.ty == null) {
1340 if (func.qt == null) {
11801341 for (p.labels.items) |item| {
11811342 if (item == .unresolved_goto)
1182 try p.errStr(.undeclared_label, item.unresolved_goto, p.tokSlice(item.unresolved_goto));
1343 try p.err(item.unresolved_goto, .undeclared_label, .{p.tokSlice(item.unresolved_goto)});
11831344 }
11841345 if (p.computed_goto_tok) |goto_tok| {
1185 if (!p.contains_address_of_label) try p.errTok(.invalid_computed_goto, goto_tok);
1346 if (!p.contains_address_of_label) try p.err(goto_tok, .invalid_computed_goto, .{});
11861347 }
11871348 p.labels.items.len = 0;
11881349 p.label_count = 0;
......@@ -1195,59 +1356,110 @@ fn decl(p: *Parser) Error!bool {
11951356 // Declare all variable/typedef declarators.
11961357 var warned_auto = false;
11971358 while (true) {
1198 if (init_d.d.old_style_func) |tok_i| try p.errTok(.invalid_old_style_params, tok_i);
1199 const tag = try decl_spec.validate(p, &init_d.d.ty, init_d.initializer.node != .none);
1359 if (init_d.d.old_style_func) |tok_i| try p.err(tok_i, .invalid_old_style_params, .{});
12001360
1201 const tok = switch (decl_spec.storage_class) {
1202 .auto, .@"extern", .register, .static, .typedef => |tok| tok,
1203 .none => init_d.d.name,
1204 };
1205 const node = try p.addNode(.{
1206 .ty = init_d.d.ty,
1207 .tag = tag,
1208 .data = .{
1209 .decl = .{ .name = init_d.d.name, .node = init_d.initializer.node },
1210 },
1211 .loc = @enumFromInt(tok),
1212 });
1213 try p.decl_buf.append(node);
1361 if (decl_spec.storage_class == .typedef) {
1362 try decl_spec.validateDecl(p);
1363 try p.tree.setNode(.{ .typedef = .{
1364 .name_tok = init_d.d.name,
1365 .qt = init_d.d.qt,
1366 .implicit = false,
1367 } }, @intFromEnum(decl_node));
1368 } else if (init_d.d.declarator_type == .func or init_d.d.qt.is(p.comp, .func)) {
1369 try decl_spec.validateFnDecl(p);
1370 try p.tree.setNode(.{ .function = .{
1371 .name_tok = init_d.d.name,
1372 .qt = init_d.d.qt,
1373 .static = decl_spec.storage_class == .static,
1374 .@"inline" = decl_spec.@"inline" != null,
1375 .body = null,
1376 .definition = null,
1377 } }, @intFromEnum(decl_node));
1378 } else {
1379 try decl_spec.validateDecl(p);
1380 var node_qt = init_d.d.qt;
1381 if (p.func.qt == null and decl_spec.storage_class != .@"extern") {
1382 if (node_qt.get(p.comp, .array)) |array_ty| {
1383 if (array_ty.len == .incomplete) {
1384 // Create tentative array node with fixed type.
1385 node_qt = try p.comp.type_store.put(p.gpa, .{ .array = .{
1386 .elem = array_ty.elem,
1387 .len = .{ .fixed = 1 },
1388 } });
1389 }
1390 }
1391 }
1392
1393 try p.tree.setNode(.{
1394 .variable = .{
1395 .name_tok = init_d.d.name,
1396 .qt = node_qt,
1397 .thread_local = decl_spec.thread_local != null,
1398 .implicit = false,
1399 .storage_class = switch (decl_spec.storage_class) {
1400 .auto => .auto,
1401 .register => .register,
1402 .static => .static,
1403 .@"extern" => if (init_d.initializer == null) .@"extern" else .auto,
1404 else => .auto, // Error reported in `validate`
1405 },
1406 .initializer = if (init_d.initializer) |some| some.node else null,
1407 .definition = null,
1408 },
1409 }, @intFromEnum(decl_node));
1410 }
1411 try p.decl_buf.append(decl_node);
12141412
1215 const interned_name = try StrInt.intern(p.comp, p.tokSlice(init_d.d.name));
1413 const interned_name = try p.comp.internString(p.tokSlice(init_d.d.name));
12161414 if (decl_spec.storage_class == .typedef) {
1217 try p.syms.defineTypedef(p, interned_name, init_d.d.ty, init_d.d.name, node);
1218 p.typedefDefined(interned_name, init_d.d.ty);
1219 } else if (init_d.initializer.node != .none or
1220 (p.func.ty != null and decl_spec.storage_class != .@"extern"))
1221 {
1415 const typedef_qt = if (init_d.d.qt.isInvalid())
1416 init_d.d.qt
1417 else
1418 (try p.comp.type_store.put(p.gpa, .{ .typedef = .{
1419 .base = init_d.d.qt,
1420 .name = interned_name,
1421 .decl_node = decl_node,
1422 } })).withQualifiers(init_d.d.qt);
1423 try p.syms.defineTypedef(p, interned_name, typedef_qt, init_d.d.name, decl_node);
1424 p.typedefDefined(interned_name, typedef_qt);
1425 } else if (init_d.initializer) |init| {
12221426 // TODO validate global variable/constexpr initializer comptime known
12231427 try p.syms.defineSymbol(
12241428 p,
12251429 interned_name,
1226 init_d.d.ty,
1430 init_d.d.qt,
12271431 init_d.d.name,
1228 node,
1229 if (init_d.d.ty.isConst() or decl_spec.constexpr != null) init_d.initializer.val else .{},
1432 decl_node,
1433 if (init_d.d.qt.@"const" or decl_spec.constexpr != null) init.val else .{},
12301434 decl_spec.constexpr != null,
12311435 );
1436 } else if (init_d.d.qt.is(p.comp, .func)) {
1437 try p.syms.declareSymbol(p, interned_name, init_d.d.qt, init_d.d.name, decl_node);
1438 } else if (p.func.qt != null and decl_spec.storage_class != .@"extern") {
1439 try p.syms.defineSymbol(p, interned_name, init_d.d.qt, init_d.d.name, decl_node, .{}, false);
12321440 } else {
1233 try p.syms.declareSymbol(p, interned_name, init_d.d.ty, init_d.d.name, node);
1441 try p.syms.declareSymbol(p, interned_name, init_d.d.qt, init_d.d.name, decl_node);
12341442 }
12351443
12361444 if (p.eatToken(.comma) == null) break;
12371445
12381446 if (!warned_auto) {
1447 // TODO these are warnings in clang
12391448 if (decl_spec.auto_type) |tok_i| {
1240 try p.errTok(.auto_type_requires_single_declarator, tok_i);
1449 try p.err(tok_i, .auto_type_requires_single_declarator, .{});
12411450 warned_auto = true;
12421451 }
1243 if (p.comp.langopts.standard.atLeast(.c23) and decl_spec.storage_class == .auto) {
1244 try p.errTok(.c23_auto_single_declarator, decl_spec.storage_class.auto);
1452 if (decl_spec.c23_auto) |tok_i| {
1453 try p.err(tok_i, .c23_auto_single_declarator, .{});
12451454 warned_auto = true;
12461455 }
12471456 }
12481457
1249 init_d = (try p.initDeclarator(&decl_spec, attr_buf_top)) orelse {
1250 try p.err(.expected_ident_or_l_paren);
1458 decl_node = try p.tree.addNode(.{ .empty_decl = .{
1459 .semicolon = p.tok_i - 1,
1460 } });
1461 init_d = (try p.initDeclarator(&decl_spec, attr_buf_top, decl_node)) orelse {
1462 try p.err(p.tok_i, .expected_ident_or_l_paren, .{});
12511463 continue;
12521464 };
12531465 }
......@@ -1256,46 +1468,32 @@ fn decl(p: *Parser) Error!bool {
12561468 return true;
12571469}
12581470
1259fn staticAssertMessage(p: *Parser, cond_node: NodeIndex, message: Result) Error!?[]const u8 {
1260 const cond_tag = p.nodes.items(.tag)[@intFromEnum(cond_node)];
1261 if (cond_tag != .builtin_types_compatible_p and message.node == .none) return null;
1471fn staticAssertMessage(p: *Parser, cond_node: Node.Index, maybe_message: ?Result, allocating: *std.Io.Writer.Allocating) !?[]const u8 {
1472 const w = &allocating.writer;
12621473
1263 var allocating: std.Io.Writer.Allocating = .init(p.gpa);
1264 defer allocating.deinit();
1265
1266 const buf = &allocating.writer;
1474 const cond = cond_node.get(&p.tree);
1475 if (cond == .builtin_types_compatible_p) {
1476 try w.writeAll("'__builtin_types_compatible_p(");
12671477
1268 if (cond_tag == .builtin_types_compatible_p) {
1269 const mapper = p.comp.string_interner.getSlowTypeMapper();
1270 const data = p.nodes.items(.data)[@intFromEnum(cond_node)].bin;
1478 const lhs_ty = cond.builtin_types_compatible_p.lhs;
1479 try lhs_ty.print(p.comp, w);
1480 try w.writeAll(", ");
12711481
1272 buf.writeAll("'__builtin_types_compatible_p(") catch return error.OutOfMemory;
1273
1274 const lhs_ty = p.nodes.items(.ty)[@intFromEnum(data.lhs)];
1275 lhs_ty.print(mapper, p.comp.langopts, buf) catch |e| switch (e) {
1276 error.WriteFailed => return error.OutOfMemory,
1277 };
1278 buf.writeAll(", ") catch return error.OutOfMemory;
1482 const rhs_ty = cond.builtin_types_compatible_p.rhs;
1483 try rhs_ty.print(p.comp, w);
12791484
1280 const rhs_ty = p.nodes.items(.ty)[@intFromEnum(data.rhs)];
1281 rhs_ty.print(mapper, p.comp.langopts, buf) catch |e| switch (e) {
1282 error.WriteFailed => return error.OutOfMemory,
1283 };
1485 try w.writeAll(")'");
1486 } else if (maybe_message == null) return null;
12841487
1285 buf.writeAll(")'") catch return error.OutOfMemory;
1286 }
1287 if (message.node != .none) {
1288 assert(p.nodes.items(.tag)[@intFromEnum(message.node)] == .string_literal_expr);
1289 if (buf.buffered().len > 0) {
1290 buf.writeByte(' ') catch return error.OutOfMemory;
1488 if (maybe_message) |message| {
1489 assert(message.node.get(&p.tree) == .string_literal_expr);
1490 if (allocating.getWritten().len > 0) {
1491 try w.writeByte(' ');
12911492 }
12921493 const bytes = p.comp.interner.get(message.val.ref()).bytes;
1293 try allocating.ensureUnusedCapacity(bytes.len);
1294 Value.printString(bytes, message.ty, p.comp, buf) catch |e| switch (e) {
1295 error.WriteFailed => return error.OutOfMemory,
1296 };
1494 try Value.printString(bytes, message.qt, p.comp, w);
12971495 }
1298 return try p.comp.diagnostics.arena.allocator().dupe(u8, allocating.written());
1496 return allocating.getWritten();
12991497}
13001498
13011499/// staticAssert
......@@ -1317,50 +1515,48 @@ fn staticAssert(p: *Parser) Error!bool {
13171515 .unterminated_string_literal,
13181516 => try p.stringLiteral(),
13191517 else => {
1320 try p.err(.expected_str_literal);
1518 try p.err(p.tok_i, .expected_str_literal, .{});
13211519 return error.ParsingFailed;
13221520 },
13231521 }
13241522 else
1325 Result{};
1523 null;
13261524 try p.expectClosing(l_paren, .r_paren);
13271525 _ = try p.expectToken(.semicolon);
1328 if (str.node == .none) {
1329 try p.errTok(.static_assert_missing_message, static_assert);
1330 try p.errStr(.pre_c23_compat, static_assert, "'_Static_assert' with no message");
1526 if (str == null) {
1527 try p.err(static_assert, .static_assert_missing_message, .{});
1528 try p.err(static_assert, .pre_c23_compat, .{"'_Static_assert' with no message"});
13311529 }
13321530
1333 // Array will never be zero; a value of zero for a pointer is a null pointer constant
1334 if ((res.ty.isArray() or res.ty.isPtr()) and !res.val.isZero(p.comp)) {
1335 const err_start = p.comp.diagnostics.list.items.len;
1336 try p.errTok(.const_decl_folded, res_token);
1337 if (res.ty.isPtr() and err_start != p.comp.diagnostics.list.items.len) {
1338 // Don't show the note if the .const_decl_folded diagnostic was not added
1339 try p.errTok(.constant_expression_conversion_not_allowed, res_token);
1340 }
1531 const is_int_expr = res.qt.isInvalid() or res.qt.isInt(p.comp);
1532 try res.castToBool(p, .bool, res_token);
1533 if (!is_int_expr) {
1534 res.val = .{};
13411535 }
1342 try res.boolCast(p, .{ .specifier = .bool }, res_token);
13431536 if (res.val.opt_ref == .none) {
1344 if (res.ty.specifier != .invalid) {
1345 try p.errTok(.static_assert_not_constant, res_token);
1537 if (!res.qt.isInvalid()) {
1538 try p.err(res_token, .static_assert_not_constant, .{});
13461539 }
13471540 } else {
13481541 if (!res.val.toBool(p.comp)) {
1349 if (try p.staticAssertMessage(res_node, str)) |message| {
1350 try p.errStr(.static_assert_failure_message, static_assert, message);
1542 var sf = std.heap.stackFallback(1024, p.gpa);
1543 var allocating: std.Io.Writer.Allocating = .init(sf.get());
1544 defer allocating.deinit();
1545
1546 if (p.staticAssertMessage(res_node, str, &allocating) catch return error.OutOfMemory) |message| {
1547 try p.err(static_assert, .static_assert_failure_message, .{message});
13511548 } else {
1352 try p.errTok(.static_assert_failure, static_assert);
1549 try p.err(static_assert, .static_assert_failure, .{});
13531550 }
13541551 }
13551552 }
13561553
13571554 const node = try p.addNode(.{
1358 .tag = .static_assert,
1359 .data = .{ .bin = .{
1360 .lhs = res.node,
1361 .rhs = str.node,
1362 } },
1363 .loc = @enumFromInt(static_assert),
1555 .static_assert = .{
1556 .assert_tok = static_assert,
1557 .cond = res.node,
1558 .message = if (str) |some| some.node else null,
1559 },
13641560 });
13651561 try p.decl_buf.append(node);
13661562 return true;
......@@ -1380,95 +1576,62 @@ pub const DeclSpec = struct {
13801576 @"inline": ?TokenIndex = null,
13811577 noreturn: ?TokenIndex = null,
13821578 auto_type: ?TokenIndex = null,
1383 ty: Type,
1579 c23_auto: ?TokenIndex = null,
1580 qt: QualType,
13841581
1385 fn validateParam(d: DeclSpec, p: *Parser, ty: *Type) Error!void {
1582 fn validateParam(d: DeclSpec, p: *Parser) Error!void {
13861583 switch (d.storage_class) {
1387 .none => {},
1388 .register => ty.qual.register = true,
1389 .auto, .@"extern", .static, .typedef => |tok_i| try p.errTok(.invalid_storage_on_param, tok_i),
1390 }
1391 if (d.thread_local) |tok_i| try p.errTok(.threadlocal_non_var, tok_i);
1392 if (d.@"inline") |tok_i| try p.errStr(.func_spec_non_func, tok_i, "inline");
1393 if (d.noreturn) |tok_i| try p.errStr(.func_spec_non_func, tok_i, "_Noreturn");
1394 if (d.constexpr) |tok_i| try p.errTok(.invalid_storage_on_param, tok_i);
1395 if (d.auto_type) |tok_i| {
1396 try p.errStr(.auto_type_not_allowed, tok_i, "function prototype");
1397 ty.* = Type.invalid;
1584 .none, .register => {},
1585 .auto, .@"extern", .static, .typedef => |tok_i| try p.err(tok_i, .invalid_storage_on_param, .{}),
13981586 }
1587 if (d.thread_local) |tok_i| try p.err(tok_i, .threadlocal_non_var, .{});
1588 if (d.@"inline") |tok_i| try p.err(tok_i, .func_spec_non_func, .{"inline"});
1589 if (d.noreturn) |tok_i| try p.err(tok_i, .func_spec_non_func, .{"_Noreturn"});
1590 if (d.constexpr) |tok_i| try p.err(tok_i, .invalid_storage_on_param, .{});
13991591 }
14001592
1401 fn validateFnDef(d: DeclSpec, p: *Parser) Error!Tree.Tag {
1593 fn validateFnDef(d: DeclSpec, p: *Parser) Error!void {
14021594 switch (d.storage_class) {
14031595 .none, .@"extern", .static => {},
1404 .auto, .register, .typedef => |tok_i| try p.errTok(.illegal_storage_on_func, tok_i),
1596 .auto, .register, .typedef => |tok_i| try p.err(tok_i, .illegal_storage_on_func, .{}),
14051597 }
1406 if (d.thread_local) |tok_i| try p.errTok(.threadlocal_non_var, tok_i);
1407 if (d.constexpr) |tok_i| try p.errTok(.illegal_storage_on_func, tok_i);
1598 if (d.thread_local) |tok_i| try p.err(tok_i, .threadlocal_non_var, .{});
1599 if (d.constexpr) |tok_i| try p.err(tok_i, .illegal_storage_on_func, .{});
1600 }
14081601
1409 const is_static = d.storage_class == .static;
1410 const is_inline = d.@"inline" != null;
1411 if (is_static) {
1412 if (is_inline) return .inline_static_fn_def;
1413 return .static_fn_def;
1414 } else {
1415 if (is_inline) return .inline_fn_def;
1416 return .fn_def;
1602 fn validateFnDecl(d: DeclSpec, p: *Parser) Error!void {
1603 switch (d.storage_class) {
1604 .none, .@"extern" => {},
1605 .static => |tok_i| if (p.func.qt != null) try p.err(tok_i, .static_func_not_global, .{}),
1606 .typedef => unreachable,
1607 .auto, .register => |tok_i| try p.err(tok_i, .illegal_storage_on_func, .{}),
14171608 }
1609 if (d.thread_local) |tok_i| try p.err(tok_i, .threadlocal_non_var, .{});
1610 if (d.constexpr) |tok_i| try p.err(tok_i, .illegal_storage_on_func, .{});
14181611 }
14191612
1420 fn validate(d: DeclSpec, p: *Parser, ty: *Type, has_init: bool) Error!Tree.Tag {
1421 const is_static = d.storage_class == .static;
1422 if (ty.isFunc() and d.storage_class != .typedef) {
1423 switch (d.storage_class) {
1424 .none, .@"extern" => {},
1425 .static => |tok_i| if (p.func.ty != null) try p.errTok(.static_func_not_global, tok_i),
1426 .typedef => unreachable,
1427 .auto, .register => |tok_i| try p.errTok(.illegal_storage_on_func, tok_i),
1428 }
1429 if (d.thread_local) |tok_i| try p.errTok(.threadlocal_non_var, tok_i);
1430 if (d.constexpr) |tok_i| try p.errTok(.illegal_storage_on_func, tok_i);
1431
1432 const is_inline = d.@"inline" != null;
1433 if (is_static) {
1434 if (is_inline) return .inline_static_fn_proto;
1435 return .static_fn_proto;
1436 } else {
1437 if (is_inline) return .inline_fn_proto;
1438 return .fn_proto;
1439 }
1440 } else {
1441 if (d.@"inline") |tok_i| try p.errStr(.func_spec_non_func, tok_i, "inline");
1442 // TODO move to attribute validation
1443 if (d.noreturn) |tok_i| try p.errStr(.func_spec_non_func, tok_i, "_Noreturn");
1444 switch (d.storage_class) {
1445 .auto => if (p.func.ty == null and !p.comp.langopts.standard.atLeast(.c23)) {
1446 try p.err(.illegal_storage_on_global);
1447 },
1448 .register => if (p.func.ty == null) try p.err(.illegal_storage_on_global),
1449 .typedef => return .typedef,
1450 else => {},
1451 }
1452 ty.qual.register = d.storage_class == .register;
1453
1454 const is_extern = d.storage_class == .@"extern" and !has_init;
1455 if (d.thread_local != null) {
1456 if (is_static) return .threadlocal_static_var;
1457 if (is_extern) return .threadlocal_extern_var;
1458 return .threadlocal_var;
1459 } else {
1460 if (is_static) return .static_var;
1461 if (is_extern) return .extern_var;
1462 return .@"var";
1463 }
1613 fn validateDecl(d: DeclSpec, p: *Parser) Error!void {
1614 if (d.@"inline") |tok_i| try p.err(tok_i, .func_spec_non_func, .{"inline"});
1615 // TODO move to attribute validation
1616 if (d.noreturn) |tok_i| try p.err(tok_i, .func_spec_non_func, .{"_Noreturn"});
1617 switch (d.storage_class) {
1618 .auto => std.debug.assert(!p.comp.langopts.standard.atLeast(.c23)),
1619 .register => if (p.func.qt == null) try p.err(p.tok_i, .illegal_storage_on_global, .{}),
1620 else => {},
14641621 }
14651622 }
1623
1624 fn initContext(d: DeclSpec, p: *Parser) InitContext {
1625 if (d.constexpr != null) return .constexpr;
1626 if (p.func.qt == null or d.storage_class == .static) return .static;
1627 return .runtime;
1628 }
14661629};
14671630
14681631/// typeof
14691632/// : keyword_typeof '(' typeName ')'
14701633/// | keyword_typeof '(' expr ')'
1471fn typeof(p: *Parser) Error!?Type {
1634fn typeof(p: *Parser) Error!?QualType {
14721635 var unqual = false;
14731636 switch (p.tok_ids[p.tok_i]) {
14741637 .keyword_typeof, .keyword_typeof1, .keyword_typeof2 => p.tok_i += 1,
......@@ -1479,92 +1642,85 @@ fn typeof(p: *Parser) Error!?Type {
14791642 else => return null,
14801643 }
14811644 const l_paren = try p.expectToken(.l_paren);
1482 if (try p.typeName()) |ty| {
1645 if (try p.typeName()) |qt| {
14831646 try p.expectClosing(l_paren, .r_paren);
1484 if (ty.is(.invalid)) return null;
1485
1486 const typeof_ty = try p.arena.create(Type);
1487 typeof_ty.* = .{
1488 .data = ty.data,
1489 .qual = if (unqual) .{} else ty.qual.inheritFromTypeof(),
1490 .specifier = ty.specifier,
1491 };
1647 if (qt.isInvalid()) return null;
14921648
1493 return Type{
1494 .data = .{ .sub_type = typeof_ty },
1495 .specifier = .typeof_type,
1496 };
1649 return (try p.comp.type_store.put(p.gpa, .{ .typeof = .{
1650 .base = qt,
1651 .expr = null,
1652 } })).withQualifiers(qt);
14971653 }
14981654 const typeof_expr = try p.parseNoEval(expr);
1499 try typeof_expr.expect(p);
15001655 try p.expectClosing(l_paren, .r_paren);
1501 // Special case nullptr_t since it's defined as typeof(nullptr)
1502 if (typeof_expr.ty.is(.nullptr_t)) {
1503 return Type{
1504 .specifier = .nullptr_t,
1505 .qual = if (unqual) .{} else typeof_expr.ty.qual.inheritFromTypeof(),
1506 };
1507 } else if (typeof_expr.ty.is(.invalid)) {
1508 return null;
1509 }
1656 if (typeof_expr.qt.isInvalid()) return null;
15101657
1511 const inner = try p.arena.create(Type.Expr);
1512 inner.* = .{
1513 .node = typeof_expr.node,
1514 .ty = .{
1515 .data = typeof_expr.ty.data,
1516 .qual = if (unqual) .{} else typeof_expr.ty.qual.inheritFromTypeof(),
1517 .specifier = typeof_expr.ty.specifier,
1518 .decayed = typeof_expr.ty.decayed,
1519 },
1520 };
1521
1522 return Type{
1523 .data = .{ .expr = inner },
1524 .specifier = .typeof_expr,
1525 .decayed = typeof_expr.ty.decayed,
1526 };
1658 const typeof_qt = try p.comp.type_store.put(p.gpa, .{ .typeof = .{
1659 .base = typeof_expr.qt,
1660 .expr = typeof_expr.node,
1661 } });
1662 if (unqual) return typeof_qt;
1663 return typeof_qt.withQualifiers(typeof_expr.qt);
15271664}
15281665
1529/// declSpec: (storageClassSpec | typeSpec | typeQual | funcSpec | alignSpec)+
1666/// declSpec: (storageClassSpec | typeSpec | funcSpec | autoTypeSpec)+
15301667/// funcSpec : keyword_inline | keyword_noreturn
1668/// autoTypeSpec : keyword_auto_type
15311669fn declSpec(p: *Parser) Error!?DeclSpec {
1532 var d: DeclSpec = .{ .ty = .{ .specifier = undefined } };
1533 var spec: Type.Builder = .{};
1670 var d: DeclSpec = .{ .qt = .invalid };
1671 var builder: TypeStore.Builder = .{ .parser = p };
15341672
1535 var combined_auto = !p.comp.langopts.standard.atLeast(.c23);
15361673 const start = p.tok_i;
15371674 while (true) {
1538 if (!combined_auto and d.storage_class == .auto) {
1539 try spec.combine(p, .c23_auto, d.storage_class.auto);
1540 combined_auto = true;
1541 }
1542 if (try p.storageClassSpec(&d)) continue;
1543 if (try p.typeSpec(&spec)) continue;
15441675 const id = p.tok_ids[p.tok_i];
15451676 switch (id) {
15461677 .keyword_inline, .keyword_inline1, .keyword_inline2 => {
15471678 if (d.@"inline" != null) {
1548 try p.errStr(.duplicate_decl_spec, p.tok_i, "inline");
1679 try p.err(p.tok_i, .duplicate_decl_spec, .{"inline"});
15491680 }
15501681 d.@"inline" = p.tok_i;
1682 p.tok_i += 1;
1683 continue;
15511684 },
15521685 .keyword_noreturn => {
15531686 if (d.noreturn != null) {
1554 try p.errStr(.duplicate_decl_spec, p.tok_i, "_Noreturn");
1687 try p.err(p.tok_i, .duplicate_decl_spec, .{"_Noreturn"});
15551688 }
15561689 d.noreturn = p.tok_i;
1690 p.tok_i += 1;
1691 continue;
15571692 },
1558 else => break,
1693 .keyword_auto_type => {
1694 try p.err(p.tok_i, .auto_type_extension, .{});
1695 try builder.combine(.auto_type, p.tok_i);
1696 if (builder.type == .auto_type) d.auto_type = p.tok_i;
1697 p.tok_i += 1;
1698 continue;
1699 },
1700 .keyword_auto => if (p.comp.langopts.standard.atLeast(.c23)) {
1701 try builder.combine(.c23_auto, p.tok_i);
1702 if (builder.type == .c23_auto) d.c23_auto = p.tok_i;
1703 p.tok_i += 1;
1704 continue;
1705 },
1706 .keyword_forceinline, .keyword_forceinline2 => {
1707 try p.attr_buf.append(p.gpa, .{
1708 .attr = .{ .tag = .always_inline, .args = .{ .always_inline = .{} }, .syntax = .keyword },
1709 .tok = p.tok_i,
1710 });
1711 p.tok_i += 1;
1712 continue;
1713 },
1714 else => {},
15591715 }
1560 p.tok_i += 1;
1561 }
15621716
1563 if (p.tok_i == start) return null;
1717 if (try p.storageClassSpec(&d)) continue;
1718 if (try p.typeSpec(&builder)) continue;
1719 if (p.tok_i == start) return null;
15641720
1565 d.ty = try spec.finish(p);
1566 d.auto_type = spec.auto_type_tok;
1567 return d;
1721 d.qt = try builder.finish();
1722 return d;
1723 }
15681724}
15691725
15701726/// storageClassSpec:
......@@ -1586,22 +1742,22 @@ fn storageClassSpec(p: *Parser, d: *DeclSpec) Error!bool {
15861742 .keyword_register,
15871743 => {
15881744 if (d.storage_class != .none) {
1589 try p.errStr(.multiple_storage_class, p.tok_i, @tagName(d.storage_class));
1745 try p.err(p.tok_i, .multiple_storage_class, .{@tagName(d.storage_class)});
15901746 return error.ParsingFailed;
15911747 }
15921748 if (d.thread_local != null) {
15931749 switch (id) {
15941750 .keyword_extern, .keyword_static => {},
1595 else => try p.errStr(.cannot_combine_spec, p.tok_i, id.lexeme().?),
1751 else => try p.err(p.tok_i, .cannot_combine_spec, .{id.lexeme().?}),
15961752 }
1597 if (d.constexpr) |tok| try p.errStr(.cannot_combine_spec, p.tok_i, p.tok_ids[tok].lexeme().?);
1753 if (d.constexpr) |tok| try p.err(p.tok_i, .cannot_combine_spec, .{p.tok_ids[tok].lexeme().?});
15981754 }
15991755 if (d.constexpr != null) {
16001756 switch (id) {
16011757 .keyword_auto, .keyword_register, .keyword_static => {},
1602 else => try p.errStr(.cannot_combine_spec, p.tok_i, id.lexeme().?),
1758 else => try p.err(p.tok_i, .cannot_combine_spec, .{id.lexeme().?}),
16031759 }
1604 if (d.thread_local) |tok| try p.errStr(.cannot_combine_spec, p.tok_i, p.tok_ids[tok].lexeme().?);
1760 if (d.thread_local) |tok| try p.err(p.tok_i, .cannot_combine_spec, .{p.tok_ids[tok].lexeme().?});
16051761 }
16061762 switch (id) {
16071763 .keyword_typedef => d.storage_class = .{ .typedef = p.tok_i },
......@@ -1616,23 +1772,23 @@ fn storageClassSpec(p: *Parser, d: *DeclSpec) Error!bool {
16161772 .keyword_c23_thread_local,
16171773 => {
16181774 if (d.thread_local != null) {
1619 try p.errStr(.duplicate_decl_spec, p.tok_i, id.lexeme().?);
1775 try p.err(p.tok_i, .duplicate_decl_spec, .{id.lexeme().?});
16201776 }
1621 if (d.constexpr) |tok| try p.errStr(.cannot_combine_spec, p.tok_i, p.tok_ids[tok].lexeme().?);
1777 if (d.constexpr) |tok| try p.err(p.tok_i, .cannot_combine_spec, .{p.tok_ids[tok].lexeme().?});
16221778 switch (d.storage_class) {
16231779 .@"extern", .none, .static => {},
1624 else => try p.errStr(.cannot_combine_spec, p.tok_i, @tagName(d.storage_class)),
1780 else => try p.err(p.tok_i, .cannot_combine_spec, .{@tagName(d.storage_class)}),
16251781 }
16261782 d.thread_local = p.tok_i;
16271783 },
16281784 .keyword_constexpr => {
16291785 if (d.constexpr != null) {
1630 try p.errStr(.duplicate_decl_spec, p.tok_i, id.lexeme().?);
1786 try p.err(p.tok_i, .duplicate_decl_spec, .{id.lexeme().?});
16311787 }
1632 if (d.thread_local) |tok| try p.errStr(.cannot_combine_spec, p.tok_i, p.tok_ids[tok].lexeme().?);
1788 if (d.thread_local) |tok| try p.err(p.tok_i, .cannot_combine_spec, .{p.tok_ids[tok].lexeme().?});
16331789 switch (d.storage_class) {
16341790 .auto, .register, .none, .static => {},
1635 else => try p.errStr(.cannot_combine_spec, p.tok_i, @tagName(d.storage_class)),
1791 else => try p.err(p.tok_i, .cannot_combine_spec, .{@tagName(d.storage_class)}),
16361792 }
16371793 d.constexpr = p.tok_i;
16381794 },
......@@ -1643,7 +1799,7 @@ fn storageClassSpec(p: *Parser, d: *DeclSpec) Error!bool {
16431799 return p.tok_i != start;
16441800}
16451801
1646const InitDeclarator = struct { d: Declarator, initializer: Result = .{} };
1802const InitDeclarator = struct { d: Declarator, initializer: ?Result = null };
16471803
16481804/// attribute
16491805/// : attrIdentifier
......@@ -1652,15 +1808,16 @@ const InitDeclarator = struct { d: Declarator, initializer: Result = .{} };
16521808/// | attrIdentifier '(' (expr (',' expr)*)? ')'
16531809fn attribute(p: *Parser, kind: Attribute.Kind, namespace: ?[]const u8) Error!?TentativeAttribute {
16541810 const name_tok = p.tok_i;
1655 switch (p.tok_ids[p.tok_i]) {
1656 .keyword_const, .keyword_const1, .keyword_const2 => p.tok_i += 1,
1657 else => _ = try p.expectIdentifier(),
1811 if (!p.tok_ids[p.tok_i].isMacroIdentifier()) {
1812 return p.errExpectedToken(.identifier, p.tok_ids[p.tok_i]);
16581813 }
1814 _ = (try p.eatIdentifier()) orelse {
1815 p.tok_i += 1;
1816 };
16591817 const name = p.tokSlice(name_tok);
16601818
16611819 const attr = Attribute.fromString(kind, namespace, name) orelse {
1662 const tag: Diagnostics.Tag = if (kind == .declspec) .declspec_attr_not_supported else .unknown_attribute;
1663 try p.errStr(tag, name_tok, name);
1820 try p.err(name_tok, if (kind == .declspec) .declspec_attr_not_supported else .unknown_attribute, .{name});
16641821 if (p.eatToken(.l_paren)) |_| p.skipTo(.r_paren);
16651822 return null;
16661823 };
......@@ -1677,21 +1834,18 @@ fn attribute(p: *Parser, kind: Attribute.Kind, namespace: ?[]const u8) Error!?Te
16771834
16781835 if (Attribute.wantsIdentEnum(attr)) {
16791836 if (try p.eatIdentifier()) |ident| {
1680 if (Attribute.diagnoseIdent(attr, &arguments, p.tokSlice(ident))) |msg| {
1681 try p.errExtra(msg.tag, ident, msg.extra);
1837 if (try Attribute.diagnoseIdent(attr, &arguments, ident, p)) {
16821838 p.skipTo(.r_paren);
16831839 return error.ParsingFailed;
16841840 }
16851841 } else {
1686 try p.errExtra(.attribute_requires_identifier, name_tok, .{ .str = name });
1842 try p.err(name_tok, .attribute_requires_identifier, .{name});
16871843 return error.ParsingFailed;
16881844 }
16891845 } else {
16901846 const arg_start = p.tok_i;
1691 var first_expr = try p.assignExpr();
1692 try first_expr.expect(p);
1693 if (try p.diagnose(attr, &arguments, arg_idx, first_expr)) |msg| {
1694 try p.errExtra(msg.tag, arg_start, msg.extra);
1847 const first_expr = try p.expect(assignExpr);
1848 if (try p.diagnose(attr, &arguments, arg_idx, first_expr, arg_start)) {
16951849 p.skipTo(.r_paren);
16961850 return error.ParsingFailed;
16971851 }
......@@ -1701,10 +1855,8 @@ fn attribute(p: *Parser, kind: Attribute.Kind, namespace: ?[]const u8) Error!?Te
17011855 _ = try p.expectToken(.comma);
17021856
17031857 const arg_start = p.tok_i;
1704 var arg_expr = try p.assignExpr();
1705 try arg_expr.expect(p);
1706 if (try p.diagnose(attr, &arguments, arg_idx, arg_expr)) |msg| {
1707 try p.errExtra(msg.tag, arg_start, msg.extra);
1858 const arg_expr = try p.expect(assignExpr);
1859 if (try p.diagnose(attr, &arguments, arg_idx, arg_expr, arg_start)) {
17081860 p.skipTo(.r_paren);
17091861 return error.ParsingFailed;
17101862 }
......@@ -1713,18 +1865,19 @@ fn attribute(p: *Parser, kind: Attribute.Kind, namespace: ?[]const u8) Error!?Te
17131865 else => {},
17141866 }
17151867 if (arg_idx < required_count) {
1716 try p.errExtra(.attribute_not_enough_args, name_tok, .{ .attr_arg_count = .{ .attribute = attr, .expected = required_count } });
1868 try p.err(name_tok, .attribute_not_enough_args, .{
1869 @tagName(attr), required_count,
1870 });
17171871 return error.ParsingFailed;
17181872 }
17191873 return TentativeAttribute{ .attr = .{ .tag = attr, .args = arguments, .syntax = kind.toSyntax() }, .tok = name_tok };
17201874}
17211875
1722fn diagnose(p: *Parser, attr: Attribute.Tag, arguments: *Attribute.Arguments, arg_idx: u32, res: Result) !?Diagnostics.Message {
1876fn diagnose(p: *Parser, attr: Attribute.Tag, arguments: *Attribute.Arguments, arg_idx: u32, res: Result, arg_start: TokenIndex) !bool {
17231877 if (Attribute.wantsAlignment(attr, arg_idx)) {
1724 return Attribute.diagnoseAlignment(attr, arguments, arg_idx, res, p);
1878 return Attribute.diagnoseAlignment(attr, arguments, arg_idx, res, arg_start, p);
17251879 }
1726 const node = p.nodes.get(@intFromEnum(res.node));
1727 return Attribute.diagnose(attr, arguments, arg_idx, res, node, p);
1880 return Attribute.diagnose(attr, arguments, arg_idx, res, arg_start, res.node.get(&p.tree), p);
17281881}
17291882
17301883/// attributeList : (attribute (',' attribute)*)?
......@@ -1812,8 +1965,8 @@ fn attributeSpecifierExtra(p: *Parser, declarator_name: ?TokenIndex) Error!void
18121965 const attr_buf_top = p.attr_buf.len;
18131966 if (try p.msvcAttribute()) {
18141967 if (declarator_name) |name_tok| {
1815 try p.errTok(.declspec_not_allowed_after_declarator, maybe_declspec_tok);
1816 try p.errTok(.declarator_name_tok, name_tok);
1968 try p.err(maybe_declspec_tok, .declspec_not_allowed_after_declarator, .{});
1969 try p.err(name_tok, .declarator_name_tok, .{});
18171970 p.attr_buf.len = attr_buf_top;
18181971 }
18191972 continue;
......@@ -1823,130 +1976,180 @@ fn attributeSpecifierExtra(p: *Parser, declarator_name: ?TokenIndex) Error!void
18231976}
18241977
18251978/// initDeclarator : declarator assembly? attributeSpecifier? ('=' initializer)?
1826fn initDeclarator(p: *Parser, decl_spec: *DeclSpec, attr_buf_top: usize) Error!?InitDeclarator {
1979fn initDeclarator(p: *Parser, decl_spec: *DeclSpec, attr_buf_top: usize, decl_node: Node.Index) Error!?InitDeclarator {
18271980 const this_attr_buf_top = p.attr_buf.len;
18281981 defer p.attr_buf.len = this_attr_buf_top;
18291982
18301983 var init_d = InitDeclarator{
1831 .d = (try p.declarator(decl_spec.ty, .normal)) orelse return null,
1984 .d = (try p.declarator(decl_spec.qt, .normal)) orelse return null,
18321985 };
18331986
1834 if (decl_spec.ty.is(.c23_auto) and !init_d.d.ty.is(.c23_auto)) {
1835 try p.errTok(.c23_auto_plain_declarator, decl_spec.storage_class.auto);
1836 return error.ParsingFailed;
1837 }
1838
18391987 try p.attributeSpecifierExtra(init_d.d.name);
18401988 _ = try p.assembly(.decl_label);
18411989 try p.attributeSpecifierExtra(init_d.d.name);
18421990
1991 switch (init_d.d.declarator_type) {
1992 .func => {
1993 if (decl_spec.auto_type) |tok_i| {
1994 try p.err(tok_i, .auto_type_not_allowed, .{"function return type"});
1995 init_d.d.qt = .invalid;
1996 } else if (decl_spec.c23_auto) |tok_i| {
1997 try p.err(tok_i, .c23_auto_not_allowed, .{"function return type"});
1998 init_d.d.qt = .invalid;
1999 }
2000 },
2001 .array => {
2002 if (decl_spec.auto_type) |tok_i| {
2003 try p.err(tok_i, .auto_type_array, .{p.tokSlice(init_d.d.name)});
2004 init_d.d.qt = .invalid;
2005 } else if (decl_spec.c23_auto) |tok_i| {
2006 try p.err(tok_i, .c23_auto_array, .{p.tokSlice(init_d.d.name)});
2007 init_d.d.qt = .invalid;
2008 }
2009 },
2010 .pointer => {
2011 if (decl_spec.auto_type != null or decl_spec.c23_auto != null) {
2012 // TODO this is not a hard error in clang
2013 try p.err(p.tok_i, .auto_type_requires_plain_declarator, .{});
2014 init_d.d.qt = .invalid;
2015 }
2016 },
2017 .other => if (decl_spec.storage_class == .typedef) {
2018 if (decl_spec.auto_type) |tok_i| {
2019 try p.err(tok_i, .auto_type_not_allowed, .{"typedef"});
2020 init_d.d.qt = .invalid;
2021 } else if (decl_spec.c23_auto) |tok_i| {
2022 try p.err(tok_i, .c23_auto_not_allowed, .{"typedef"});
2023 init_d.d.qt = .invalid;
2024 }
2025 },
2026 }
2027
18432028 var apply_var_attributes = false;
18442029 if (decl_spec.storage_class == .typedef) {
1845 if (decl_spec.auto_type) |tok_i| {
1846 try p.errStr(.auto_type_not_allowed, tok_i, "typedef");
1847 return error.ParsingFailed;
1848 }
1849 init_d.d.ty = try Attribute.applyTypeAttributes(p, init_d.d.ty, attr_buf_top, null);
1850 } else if (init_d.d.ty.isFunc()) {
1851 init_d.d.ty = try Attribute.applyFunctionAttributes(p, init_d.d.ty, attr_buf_top);
2030 init_d.d.qt = try Attribute.applyTypeAttributes(p, init_d.d.qt, attr_buf_top, null);
2031 } else if (init_d.d.declarator_type == .func or init_d.d.qt.is(p.comp, .func)) {
2032 init_d.d.qt = try Attribute.applyFunctionAttributes(p, init_d.d.qt, attr_buf_top);
18522033 } else {
18532034 apply_var_attributes = true;
18542035 }
1855 const c23_auto = init_d.d.ty.is(.c23_auto);
1856 const auto_type = init_d.d.ty.is(.auto_type);
18572036
1858 if (p.eatToken(.equal)) |eq| init: {
2037 if (p.eatToken(.equal)) |eq| {
18592038 if (decl_spec.storage_class == .typedef or
1860 (init_d.d.func_declarator != null and init_d.d.ty.isFunc()))
2039 (init_d.d.declarator_type == .func and init_d.d.qt.is(p.comp, .func)))
18612040 {
1862 try p.errTok(.illegal_initializer, eq);
1863 } else if (init_d.d.ty.is(.variable_len_array)) {
1864 try p.errTok(.vla_init, eq);
2041 try p.err(eq, .illegal_initializer, .{});
2042 } else if (init_d.d.qt.get(p.comp, .array)) |array_ty| {
2043 if (array_ty.len == .variable) try p.err(eq, .vla_init, .{});
18652044 } else if (decl_spec.storage_class == .@"extern") {
1866 try p.err(.extern_initializer);
2045 try p.err(p.tok_i, .extern_initializer, .{});
18672046 decl_spec.storage_class = .none;
18682047 }
18692048
1870 if (init_d.d.ty.hasIncompleteSize() and !init_d.d.ty.is(.incomplete_array)) {
1871 try p.errStr(.variable_incomplete_ty, init_d.d.name, try p.typeStr(init_d.d.ty));
1872 return error.ParsingFailed;
1873 }
1874 if (p.tok_ids[p.tok_i] == .l_brace and init_d.d.ty.is(.c23_auto)) {
1875 try p.errTok(.c23_auto_scalar_init, decl_spec.storage_class.auto);
1876 return error.ParsingFailed;
2049 incomplete: {
2050 if (init_d.d.qt.isInvalid()) break :incomplete;
2051 if (init_d.d.qt.isC23Auto()) break :incomplete;
2052 if (init_d.d.qt.isAutoType()) break :incomplete;
2053 if (!init_d.d.qt.hasIncompleteSize(p.comp)) break :incomplete;
2054 if (init_d.d.qt.get(p.comp, .array)) |array_ty| {
2055 if (array_ty.len == .incomplete) break :incomplete;
2056 }
2057 try p.err(init_d.d.name, .variable_incomplete_ty, .{init_d.d.qt});
2058 init_d.d.qt = .invalid;
18772059 }
18782060
18792061 try p.syms.pushScope(p);
18802062 defer p.syms.popScope();
18812063
1882 const interned_name = try StrInt.intern(p.comp, p.tokSlice(init_d.d.name));
1883 try p.syms.declareSymbol(p, interned_name, init_d.d.ty, init_d.d.name, .none);
1884 if (c23_auto or auto_type) {
2064 const interned_name = try p.comp.internString(p.tokSlice(init_d.d.name));
2065 try p.syms.declareSymbol(p, interned_name, init_d.d.qt, init_d.d.name, decl_node);
2066
2067 // TODO this should be a stack of auto type names because of statement expressions.
2068 if (init_d.d.qt.isAutoType() or init_d.d.qt.isC23Auto()) {
18852069 p.auto_type_decl_name = interned_name;
18862070 }
18872071 defer p.auto_type_decl_name = .empty;
18882072
1889 var init_list_expr = try p.initializer(init_d.d.ty);
2073 const init_context = p.init_context;
2074 defer p.init_context = init_context;
2075 p.init_context = decl_spec.initContext(p);
2076 var init_list_expr = try p.initializer(init_d.d.qt);
18902077 init_d.initializer = init_list_expr;
1891 if (!init_list_expr.ty.isArray()) break :init;
1892 if (init_d.d.ty.is(.incomplete_array)) {
1893 init_d.d.ty.setIncompleteArrayLen(init_list_expr.ty.arrayLen() orelse break :init);
2078
2079 // Set incomplete array length if possible.
2080 if (init_d.d.qt.get(p.comp, .array)) |base_array_ty| {
2081 if (base_array_ty.len == .incomplete) if (init_list_expr.qt.get(p.comp, .array)) |init_array_ty| {
2082 switch (init_array_ty.len) {
2083 .fixed, .static => |len| {
2084 init_d.d.qt = (try p.comp.type_store.put(p.gpa, .{ .array = .{
2085 .elem = base_array_ty.elem,
2086 .len = .{ .fixed = len },
2087 } })).withQualifiers(init_d.d.qt);
2088 },
2089 else => {},
2090 }
2091 };
18942092 }
18952093 }
18962094
18972095 const name = init_d.d.name;
1898 if (auto_type or c23_auto) {
1899 if (init_d.initializer.node == .none) {
1900 init_d.d.ty = Type.invalid;
1901 if (c23_auto) {
1902 try p.errStr(.c32_auto_requires_initializer, decl_spec.storage_class.auto, p.tokSlice(name));
2096 if (init_d.d.qt.isAutoType() or init_d.d.qt.isC23Auto()) {
2097 if (init_d.initializer) |some| {
2098 init_d.d.qt = some.qt.withQualifiers(init_d.d.qt);
2099 } else {
2100 if (init_d.d.qt.isC23Auto()) {
2101 try p.err(name, .c23_auto_requires_initializer, .{});
19032102 } else {
1904 try p.errStr(.auto_type_requires_initializer, name, p.tokSlice(name));
2103 try p.err(name, .auto_type_requires_initializer, .{p.tokSlice(name)});
19052104 }
2105 init_d.d.qt = .invalid;
19062106 return init_d;
1907 } else {
1908 init_d.d.ty.specifier = init_d.initializer.ty.specifier;
1909 init_d.d.ty.data = init_d.initializer.ty.data;
1910 init_d.d.ty.decayed = init_d.initializer.ty.decayed;
19112107 }
19122108 }
19132109 if (apply_var_attributes) {
1914 init_d.d.ty = try Attribute.applyVariableAttributes(p, init_d.d.ty, attr_buf_top, null);
2110 init_d.d.qt = try Attribute.applyVariableAttributes(p, init_d.d.qt, attr_buf_top, null);
19152111 }
1916 if (decl_spec.storage_class != .typedef and init_d.d.ty.hasIncompleteSize()) incomplete: {
1917 const specifier = init_d.d.ty.canonicalize(.standard).specifier;
1918 if (decl_spec.storage_class == .@"extern") switch (specifier) {
2112
2113 incomplete: {
2114 if (decl_spec.storage_class == .typedef) break :incomplete;
2115 if (init_d.d.qt.isInvalid()) break :incomplete;
2116 if (!init_d.d.qt.hasIncompleteSize(p.comp)) break :incomplete;
2117
2118 const init_type = init_d.d.qt.base(p.comp).type;
2119 if (decl_spec.storage_class == .@"extern") switch (init_type) {
19192120 .@"struct", .@"union", .@"enum" => break :incomplete,
1920 .incomplete_array => {
1921 init_d.d.ty.decayArray();
1922 break :incomplete;
1923 },
2121 .array => |array_ty| if (array_ty.len == .incomplete) break :incomplete,
19242122 else => {},
19252123 };
19262124 // if there was an initializer expression it must have contained an error
1927 if (init_d.initializer.node != .none) break :incomplete;
1928
1929 if (p.func.ty == null) {
1930 if (specifier == .incomplete_array) {
1931 // TODO properly check this after finishing parsing
1932 try p.errStr(.tentative_array, name, try p.typeStr(init_d.d.ty));
1933 break :incomplete;
1934 } else if (init_d.d.ty.getRecord()) |record| {
1935 _ = try p.tentative_defs.getOrPutValue(p.gpa, record.name, init_d.d.name);
1936 break :incomplete;
1937 } else if (init_d.d.ty.get(.@"enum")) |en| {
1938 _ = try p.tentative_defs.getOrPutValue(p.gpa, en.data.@"enum".name, init_d.d.name);
1939 break :incomplete;
2125 if (init_d.initializer != null) break :incomplete;
2126
2127 if (p.func.qt == null) {
2128 switch (init_type) {
2129 .array => |array_ty| if (array_ty.len == .incomplete) {
2130 // TODO properly check this after finishing parsing
2131 try p.err(name, .tentative_array, .{});
2132 break :incomplete;
2133 },
2134 .@"struct", .@"union" => |record_ty| {
2135 _ = try p.tentative_defs.getOrPutValue(p.gpa, record_ty.name, init_d.d.name);
2136 break :incomplete;
2137 },
2138 .@"enum" => |enum_ty| {
2139 _ = try p.tentative_defs.getOrPutValue(p.gpa, enum_ty.name, init_d.d.name);
2140 break :incomplete;
2141 },
2142 else => {},
19402143 }
19412144 }
1942 try p.errStr(.variable_incomplete_ty, name, try p.typeStr(init_d.d.ty));
2145 try p.err(name, .variable_incomplete_ty, .{init_d.d.qt});
2146 init_d.d.qt = .invalid;
19432147 }
19442148 return init_d;
19452149}
19462150
19472151/// typeSpec
19482152/// : keyword_void
1949/// | keyword_auto_type
19502153/// | keyword_char
19512154/// | keyword_short
19522155/// | keyword_int
......@@ -1960,53 +2163,48 @@ fn initDeclarator(p: *Parser, decl_spec: *DeclSpec, attr_buf_top: usize) Error!?
19602163/// | keyword_bool
19612164/// | keyword_c23_bool
19622165/// | keyword_complex
1963/// | atomicTypeSpec
2166/// | keyword_atomic '(' typeName ')'
19642167/// | recordSpec
19652168/// | enumSpec
19662169/// | typedef // IDENTIFIER
19672170/// | typeof
19682171/// | keyword_bit_int '(' integerConstExpr ')'
1969/// atomicTypeSpec : keyword_atomic '(' typeName ')'
1970/// alignSpec
1971/// : keyword_alignas '(' typeName ')'
1972/// | keyword_alignas '(' integerConstExpr ')'
1973/// | keyword_c23_alignas '(' typeName ')'
1974/// | keyword_c23_alignas '(' integerConstExpr ')'
1975fn typeSpec(p: *Parser, ty: *Type.Builder) Error!bool {
2172/// | typeQual
2173/// | keyword_alignas '(' typeName ')'
2174/// | keyword_alignas '(' integerConstExpr ')'
2175/// | keyword_c23_alignas '(' typeName ')'
2176/// | keyword_c23_alignas '(' integerConstExpr ')'
2177fn typeSpec(p: *Parser, builder: *TypeStore.Builder) Error!bool {
19762178 const start = p.tok_i;
19772179 while (true) {
19782180 try p.attributeSpecifier();
19792181
1980 if (try p.typeof()) |inner_ty| {
1981 try ty.combineFromTypeof(p, inner_ty, start);
2182 if (try p.typeof()) |typeof_qt| {
2183 try builder.combineFromTypeof(typeof_qt, start);
19822184 continue;
19832185 }
1984 if (try p.typeQual(&ty.qual)) continue;
2186 if (try p.typeQual(builder, true)) continue;
19852187 switch (p.tok_ids[p.tok_i]) {
1986 .keyword_void => try ty.combine(p, .void, p.tok_i),
1987 .keyword_auto_type => {
1988 try p.errTok(.auto_type_extension, p.tok_i);
1989 try ty.combine(p, .auto_type, p.tok_i);
1990 },
1991 .keyword_bool, .keyword_c23_bool => try ty.combine(p, .bool, p.tok_i),
1992 .keyword_int8, .keyword_int8_2, .keyword_char => try ty.combine(p, .char, p.tok_i),
1993 .keyword_int16, .keyword_int16_2, .keyword_short => try ty.combine(p, .short, p.tok_i),
1994 .keyword_int32, .keyword_int32_2, .keyword_int => try ty.combine(p, .int, p.tok_i),
1995 .keyword_long => try ty.combine(p, .long, p.tok_i),
1996 .keyword_int64, .keyword_int64_2 => try ty.combine(p, .long_long, p.tok_i),
1997 .keyword_int128 => try ty.combine(p, .int128, p.tok_i),
1998 .keyword_signed, .keyword_signed1, .keyword_signed2 => try ty.combine(p, .signed, p.tok_i),
1999 .keyword_unsigned => try ty.combine(p, .unsigned, p.tok_i),
2000 .keyword_fp16 => try ty.combine(p, .fp16, p.tok_i),
2001 .keyword_float16 => try ty.combine(p, .float16, p.tok_i),
2002 .keyword_float => try ty.combine(p, .float, p.tok_i),
2003 .keyword_double => try ty.combine(p, .double, p.tok_i),
2004 .keyword_complex => try ty.combine(p, .complex, p.tok_i),
2188 .keyword_void => try builder.combine(.void, p.tok_i),
2189 .keyword_bool, .keyword_c23_bool => try builder.combine(.bool, p.tok_i),
2190 .keyword_int8, .keyword_int8_2, .keyword_char => try builder.combine(.char, p.tok_i),
2191 .keyword_int16, .keyword_int16_2, .keyword_short => try builder.combine(.short, p.tok_i),
2192 .keyword_int32, .keyword_int32_2, .keyword_int => try builder.combine(.int, p.tok_i),
2193 .keyword_long => try builder.combine(.long, p.tok_i),
2194 .keyword_int64, .keyword_int64_2 => try builder.combine(.long_long, p.tok_i),
2195 .keyword_int128 => try builder.combine(.int128, p.tok_i),
2196 .keyword_signed, .keyword_signed1, .keyword_signed2 => try builder.combine(.signed, p.tok_i),
2197 .keyword_unsigned => try builder.combine(.unsigned, p.tok_i),
2198 .keyword_fp16 => try builder.combine(.fp16, p.tok_i),
2199 .keyword_float16 => try builder.combine(.float16, p.tok_i),
2200 .keyword_float => try builder.combine(.float, p.tok_i),
2201 .keyword_double => try builder.combine(.double, p.tok_i),
2202 .keyword_complex => try builder.combine(.complex, p.tok_i),
20052203 .keyword_float128_1, .keyword_float128_2 => {
20062204 if (!p.comp.hasFloat128()) {
2007 try p.errStr(.type_not_supported_on_target, p.tok_i, p.tok_ids[p.tok_i].lexeme().?);
2205 try p.err(p.tok_i, .type_not_supported_on_target, .{p.tok_ids[p.tok_i].lexeme().?});
20082206 }
2009 try ty.combine(p, .float128, p.tok_i);
2207 try builder.combine(.float128, p.tok_i);
20102208 },
20112209 .keyword_atomic => {
20122210 const atomic_tok = p.tok_i;
......@@ -2016,19 +2214,19 @@ fn typeSpec(p: *Parser, ty: *Type.Builder) Error!bool {
20162214 p.tok_i = atomic_tok;
20172215 break;
20182216 };
2019 const inner_ty = (try p.typeName()) orelse {
2020 try p.err(.expected_type);
2217 const base_qt = (try p.typeName()) orelse {
2218 try p.err(p.tok_i, .expected_type, .{});
20212219 return error.ParsingFailed;
20222220 };
20232221 try p.expectClosing(l_paren, .r_paren);
20242222
2025 const new_spec = Type.Builder.fromType(inner_ty);
2026 try ty.combine(p, new_spec, atomic_tok);
2223 if (base_qt.isQualified() and !base_qt.isInvalid()) {
2224 try p.err(atomic_tok, .atomic_qualified, .{base_qt});
2225 builder.type = .{ .other = .invalid };
2226 continue;
2227 }
20272228
2028 if (ty.qual.atomic != null)
2029 try p.errStr(.duplicate_decl_spec, atomic_tok, "atomic")
2030 else
2031 ty.qual.atomic = atomic_tok;
2229 try builder.combineAtomic(base_qt, atomic_tok);
20322230 continue;
20332231 },
20342232 .keyword_alignas,
......@@ -2038,11 +2236,11 @@ fn typeSpec(p: *Parser, ty: *Type.Builder) Error!bool {
20382236 p.tok_i += 1;
20392237 const l_paren = try p.expectToken(.l_paren);
20402238 const typename_start = p.tok_i;
2041 if (try p.typeName()) |inner_ty| {
2042 if (!inner_ty.alignable()) {
2043 try p.errStr(.invalid_alignof, typename_start, try p.typeStr(inner_ty));
2239 if (try p.typeName()) |inner_qt| {
2240 if (!inner_qt.alignable(p.comp)) {
2241 try p.err(typename_start, .invalid_alignof, .{inner_qt});
20442242 }
2045 const alignment = Attribute.Alignment{ .requested = inner_ty.alignof(p.comp) };
2243 const alignment = Attribute.Alignment{ .requested = inner_qt.alignof(p.comp) };
20462244 try p.attr_buf.append(p.gpa, .{
20472245 .attr = .{ .tag = .aligned, .args = .{
20482246 .aligned = .{ .alignment = alignment, .__name_tok = align_tok },
......@@ -2054,12 +2252,11 @@ fn typeSpec(p: *Parser, ty: *Type.Builder) Error!bool {
20542252 const res = try p.integerConstExpr(.no_const_decl_folding);
20552253 if (!res.val.isZero(p.comp)) {
20562254 var args = Attribute.initArguments(.aligned, align_tok);
2057 if (try p.diagnose(.aligned, &args, 0, res)) |msg| {
2058 try p.errExtra(msg.tag, arg_start, msg.extra);
2255 if (try p.diagnose(.aligned, &args, 0, res, arg_start)) {
20592256 p.skipTo(.r_paren);
20602257 return error.ParsingFailed;
20612258 }
2062 args.aligned.alignment.?.node = res.node;
2259 args.aligned.alignment.?.node = .pack(res.node);
20632260 try p.attr_buf.append(p.gpa, .{
20642261 .attr = .{ .tag = .aligned, .args = args, .syntax = .keyword },
20652262 .tok = align_tok,
......@@ -2069,47 +2266,24 @@ fn typeSpec(p: *Parser, ty: *Type.Builder) Error!bool {
20692266 try p.expectClosing(l_paren, .r_paren);
20702267 continue;
20712268 },
2072 .keyword_stdcall,
2073 .keyword_stdcall2,
2074 .keyword_thiscall,
2075 .keyword_thiscall2,
2076 .keyword_vectorcall,
2077 .keyword_vectorcall2,
2078 => try p.attr_buf.append(p.gpa, .{
2079 .attr = .{ .tag = .calling_convention, .args = .{
2080 .calling_convention = .{ .cc = switch (p.tok_ids[p.tok_i]) {
2081 .keyword_stdcall,
2082 .keyword_stdcall2,
2083 => .stdcall,
2084 .keyword_thiscall,
2085 .keyword_thiscall2,
2086 => .thiscall,
2087 .keyword_vectorcall,
2088 .keyword_vectorcall2,
2089 => .vectorcall,
2090 else => unreachable,
2091 } },
2092 }, .syntax = .keyword },
2093 .tok = p.tok_i,
2094 }),
20952269 .keyword_struct, .keyword_union => {
20962270 const tag_tok = p.tok_i;
20972271 const record_ty = try p.recordSpec();
2098 try ty.combine(p, Type.Builder.fromType(record_ty), tag_tok);
2272 try builder.combine(.{ .other = record_ty }, tag_tok);
20992273 continue;
21002274 },
21012275 .keyword_enum => {
21022276 const tag_tok = p.tok_i;
21032277 const enum_ty = try p.enumSpec();
2104 try ty.combine(p, Type.Builder.fromType(enum_ty), tag_tok);
2278 try builder.combine(.{ .other = enum_ty }, tag_tok);
21052279 continue;
21062280 },
21072281 .identifier, .extended_identifier => {
2108 var interned_name = try StrInt.intern(p.comp, p.tokSlice(p.tok_i));
2282 var interned_name = try p.comp.internString(p.tokSlice(p.tok_i));
21092283 var declspec_found = false;
21102284
21112285 if (interned_name == p.string_ids.declspec_id) {
2112 try p.errTok(.declspec_not_enabled, p.tok_i);
2286 try p.err(p.tok_i, .declspec_not_enabled, .{});
21132287 p.tok_i += 1;
21142288 if (p.eatToken(.l_paren)) |_| {
21152289 p.skipTo(.r_paren);
......@@ -2117,15 +2291,14 @@ fn typeSpec(p: *Parser, ty: *Type.Builder) Error!bool {
21172291 }
21182292 declspec_found = true;
21192293 }
2120 if (ty.typedef != null) break;
21212294 if (declspec_found) {
2122 interned_name = try StrInt.intern(p.comp, p.tokSlice(p.tok_i));
2295 interned_name = try p.comp.internString(p.tokSlice(p.tok_i));
21232296 }
2124 const typedef = (try p.syms.findTypedef(p, interned_name, p.tok_i, ty.specifier != .none)) orelse break;
2125 if (!ty.combineTypedef(p, typedef.ty, typedef.tok)) break;
2297 const typedef = (try p.syms.findTypedef(p, interned_name, p.tok_i, builder.type != .none)) orelse break;
2298 if (!builder.combineTypedef(typedef.qt)) break;
21262299 },
21272300 .keyword_bit_int => {
2128 try p.err(.bit_int);
2301 try p.err(p.tok_i, .bit_int, .{});
21292302 const bit_int_tok = p.tok_i;
21302303 p.tok_i += 1;
21312304 const l_paren = try p.expectToken(.l_paren);
......@@ -2134,15 +2307,15 @@ fn typeSpec(p: *Parser, ty: *Type.Builder) Error!bool {
21342307
21352308 var bits: u64 = undefined;
21362309 if (res.val.opt_ref == .none) {
2137 try p.errTok(.expected_integer_constant_expr, bit_int_tok);
2310 try p.err(bit_int_tok, .expected_integer_constant_expr, .{});
21382311 return error.ParsingFailed;
2139 } else if (res.val.compare(.lte, Value.zero, p.comp)) {
2312 } else if (res.val.compare(.lte, .zero, p.comp)) {
21402313 bits = 0;
21412314 } else {
21422315 bits = res.val.toInt(u64, p.comp) orelse std.math.maxInt(u64);
21432316 }
21442317
2145 try ty.combine(p, .{ .bit_int = bits }, bit_int_tok);
2318 try builder.combine(.{ .bit_int = bits }, bit_int_tok);
21462319 continue;
21472320 },
21482321 else => break,
......@@ -2163,18 +2336,20 @@ fn getAnonymousName(p: *Parser, kind_tok: TokenIndex) !StringId {
21632336 else => "record field",
21642337 };
21652338
2339 var arena = p.comp.type_store.anon_name_arena.promote(p.gpa);
2340 defer p.comp.type_store.anon_name_arena = arena.state;
21662341 const str = try std.fmt.allocPrint(
2167 p.arena,
2342 arena.allocator(),
21682343 "(anonymous {s} at {s}:{d}:{d})",
21692344 .{ kind_str, source.path, line_col.line_no, line_col.col },
21702345 );
2171 return StrInt.intern(p.comp, str);
2346 return p.comp.internString(str);
21722347}
21732348
21742349/// recordSpec
2175/// : (keyword_struct | keyword_union) IDENTIFIER? { recordDecl* }
2350/// : (keyword_struct | keyword_union) IDENTIFIER? { recordDecls }
21762351/// | (keyword_struct | keyword_union) IDENTIFIER
2177fn recordSpec(p: *Parser) Error!Type {
2352fn recordSpec(p: *Parser) Error!QualType {
21782353 const starting_pragma_pack = p.pragma_pack;
21792354 const kind_tok = p.tok_i;
21802355 const is_struct = p.tok_ids[kind_tok] == .keyword_struct;
......@@ -2183,37 +2358,51 @@ fn recordSpec(p: *Parser) Error!Type {
21832358 defer p.attr_buf.len = attr_buf_top;
21842359 try p.attributeSpecifier();
21852360
2361 const reserved_index = try p.tree.nodes.addOne(p.gpa);
2362
21862363 const maybe_ident = try p.eatIdentifier();
21872364 const l_brace = p.eatToken(.l_brace) orelse {
21882365 const ident = maybe_ident orelse {
2189 try p.err(.ident_or_l_brace);
2366 try p.err(p.tok_i, .ident_or_l_brace, .{});
21902367 return error.ParsingFailed;
21912368 };
21922369 // check if this is a reference to a previous type
2193 const interned_name = try StrInt.intern(p.comp, p.tokSlice(ident));
2370 const interned_name = try p.comp.internString(p.tokSlice(ident));
21942371 if (try p.syms.findTag(p, interned_name, p.tok_ids[kind_tok], ident, p.tok_ids[p.tok_i])) |prev| {
2195 return prev.ty;
2372 return prev.qt;
21962373 } else {
2197 // this is a forward declaration, create a new record Type.
2198 const record_ty = try Type.Record.create(p.arena, interned_name);
2199 const ty = try Attribute.applyTypeAttributes(p, .{
2200 .specifier = if (is_struct) .@"struct" else .@"union",
2201 .data = .{ .record = record_ty },
2202 }, attr_buf_top, null);
2374 // this is a forward declaration, create a new record type.
2375 const record_ty: Type.Record = .{
2376 .name = interned_name,
2377 .layout = null,
2378 .decl_node = @enumFromInt(reserved_index),
2379 .fields = &.{},
2380 };
2381 const record_qt = try p.comp.type_store.put(p.gpa, if (is_struct)
2382 .{ .@"struct" = record_ty }
2383 else
2384 .{ .@"union" = record_ty });
2385
2386 const attributed_qt = try Attribute.applyTypeAttributes(p, record_qt, attr_buf_top, null);
22032387 try p.syms.define(p.gpa, .{
22042388 .kind = if (is_struct) .@"struct" else .@"union",
22052389 .name = interned_name,
22062390 .tok = ident,
2207 .ty = ty,
2391 .qt = attributed_qt,
22082392 .val = .{},
22092393 });
2210 try p.decl_buf.append(try p.addNode(.{
2211 .tag = if (is_struct) .struct_forward_decl else .union_forward_decl,
2212 .ty = ty,
2213 .data = .{ .decl_ref = ident },
2214 .loc = @enumFromInt(ident),
2215 }));
2216 return ty;
2394
2395 const fw: Node.ContainerForwardDecl = .{
2396 .name_or_kind_tok = ident,
2397 .container_qt = attributed_qt,
2398 .definition = null,
2399 };
2400 try p.tree.setNode(if (is_struct)
2401 .{ .struct_forward_decl = fw }
2402 else
2403 .{ .union_forward_decl = fw }, reserved_index);
2404 try p.decl_buf.append(@enumFromInt(reserved_index));
2405 return attributed_qt;
22172406 }
22182407 };
22192408
......@@ -2221,44 +2410,52 @@ fn recordSpec(p: *Parser) Error!Type {
22212410 errdefer if (!done) p.skipTo(.r_brace);
22222411
22232412 // Get forward declared type or create a new one
2224 var defined = false;
2225 const record_ty: *Type.Record = if (maybe_ident) |ident| record_ty: {
2226 const ident_str = p.tokSlice(ident);
2227 const interned_name = try StrInt.intern(p.comp, ident_str);
2228 if (try p.syms.defineTag(p, interned_name, p.tok_ids[kind_tok], ident)) |prev| {
2229 if (!prev.ty.hasIncompleteSize()) {
2230 // if the record isn't incomplete, this is a redefinition
2231 try p.errStr(.redefinition, ident, ident_str);
2232 try p.errTok(.previous_definition, prev.tok);
2233 } else {
2234 defined = true;
2235 break :record_ty prev.ty.get(if (is_struct) .@"struct" else .@"union").?.data.record;
2413 var record_ty: Type.Record, const qt: QualType = blk: {
2414 const interned_name = if (maybe_ident) |ident| interned: {
2415 const ident_str = p.tokSlice(ident);
2416 const interned_name = try p.comp.internString(ident_str);
2417 if (try p.syms.defineTag(p, interned_name, p.tok_ids[kind_tok], ident)) |prev| {
2418 const record_ty = prev.qt.getRecord(p.comp).?;
2419 if (record_ty.layout != null) {
2420 // if the record isn't incomplete, this is a redefinition
2421 try p.err(ident, .redefinition, .{ident_str});
2422 try p.err(prev.tok, .previous_definition, .{});
2423 } else {
2424 break :blk .{ record_ty, prev.qt };
2425 }
22362426 }
2427 break :interned interned_name;
2428 } else try p.getAnonymousName(kind_tok);
2429
2430 // Initially create ty as a regular non-attributed type, since attributes for a record
2431 // can be specified after the closing rbrace, which we haven't encountered yet.
2432 const record_ty: Type.Record = .{
2433 .name = interned_name,
2434 .decl_node = @enumFromInt(reserved_index),
2435 .layout = null,
2436 .fields = &.{},
2437 };
2438 const record_qt = try p.comp.type_store.put(p.gpa, if (is_struct)
2439 .{ .@"struct" = record_ty }
2440 else
2441 .{ .@"union" = record_ty });
2442
2443 // declare a symbol for the type
2444 // We need to replace the symbol's type if it has attributes
2445 if (maybe_ident != null) {
2446 try p.syms.define(p.gpa, .{
2447 .kind = if (is_struct) .@"struct" else .@"union",
2448 .name = record_ty.name,
2449 .tok = maybe_ident.?,
2450 .qt = record_qt,
2451 .val = .{},
2452 });
22372453 }
2238 break :record_ty try Type.Record.create(p.arena, interned_name);
2239 } else try Type.Record.create(p.arena, try p.getAnonymousName(kind_tok));
22402454
2241 // Initially create ty as a regular non-attributed type, since attributes for a record
2242 // can be specified after the closing rbrace, which we haven't encountered yet.
2243 var ty = Type{
2244 .specifier = if (is_struct) .@"struct" else .@"union",
2245 .data = .{ .record = record_ty },
2455 break :blk .{ record_ty, record_qt };
22462456 };
22472457
2248 // declare a symbol for the type
2249 // We need to replace the symbol's type if it has attributes
2250 if (maybe_ident != null and !defined) {
2251 try p.syms.define(p.gpa, .{
2252 .kind = if (is_struct) .@"struct" else .@"union",
2253 .name = record_ty.name,
2254 .tok = maybe_ident.?,
2255 .ty = ty,
2256 .val = .{},
2257 });
2258 }
2259
2260 // reserve space for this record
2261 try p.decl_buf.append(.none);
2458 try p.decl_buf.append(@enumFromInt(reserved_index));
22622459 const decl_buf_top = p.decl_buf.items.len;
22632460 const record_buf_top = p.record_buf.items.len;
22642461 errdefer p.decl_buf.items.len = decl_buf_top - 1;
......@@ -2269,100 +2466,121 @@ fn recordSpec(p: *Parser) Error!Type {
22692466
22702467 const old_record = p.record;
22712468 const old_members = p.record_members.items.len;
2272 const old_field_attr_start = p.field_attr_buf.items.len;
22732469 p.record = .{
22742470 .kind = p.tok_ids[kind_tok],
22752471 .start = p.record_members.items.len,
2276 .field_attr_start = p.field_attr_buf.items.len,
22772472 };
22782473 defer p.record = old_record;
22792474 defer p.record_members.items.len = old_members;
2280 defer p.field_attr_buf.items.len = old_field_attr_start;
22812475
22822476 try p.recordDecls();
22832477
2284 if (p.record.flexible_field) |some| {
2285 if (p.record_buf.items[record_buf_top..].len == 1 and is_struct) {
2286 try p.errTok(.flexible_in_empty, some);
2287 }
2288 }
2478 const fields = p.record_buf.items[record_buf_top..];
22892479
2290 for (p.record_buf.items[record_buf_top..]) |field| {
2291 if (field.ty.hasIncompleteSize() and !field.ty.is(.incomplete_array)) break;
2292 } else {
2293 record_ty.fields = try p.arena.dupe(Type.Record.Field, p.record_buf.items[record_buf_top..]);
2294 }
2295 const attr_count = p.field_attr_buf.items.len - old_field_attr_start;
2296 const record_decls = p.decl_buf.items[decl_buf_top..];
2297 if (attr_count > 0) {
2298 if (attr_count != record_decls.len) {
2299 // A mismatch here means that non-field decls were parsed. This can happen if there were
2300 // parse errors during attribute parsing. Bail here because if there are any field attributes,
2301 // there must be exactly one per field.
2302 return error.ParsingFailed;
2480 if (p.record.flexible_field) |some| {
2481 if (fields.len == 1 and is_struct) {
2482 if (p.comp.langopts.emulate == .msvc) {
2483 try p.err(some, .flexible_in_empty_msvc, .{});
2484 } else {
2485 try p.err(some, .flexible_in_empty, .{});
2486 }
23032487 }
2304 const field_attr_slice = p.field_attr_buf.items[old_field_attr_start..];
2305 const duped = try p.arena.dupe([]const Attribute, field_attr_slice);
2306 record_ty.field_attributes = duped.ptr;
23072488 }
23082489
23092490 if (p.record_buf.items.len == record_buf_top) {
2310 try p.errStr(.empty_record, kind_tok, p.tokSlice(kind_tok));
2311 try p.errStr(.empty_record_size, kind_tok, p.tokSlice(kind_tok));
2491 try p.err(kind_tok, .empty_record, .{p.tokSlice(kind_tok)});
2492 try p.err(kind_tok, .empty_record_size, .{p.tokSlice(kind_tok)});
23122493 }
23132494 try p.expectClosing(l_brace, .r_brace);
23142495 done = true;
23152496 try p.attributeSpecifier();
23162497
2317 ty = try Attribute.applyTypeAttributes(p, .{
2318 .specifier = if (is_struct) .@"struct" else .@"union",
2319 .data = .{ .record = record_ty },
2320 }, attr_buf_top, null);
2321 if (ty.specifier == .attributed and maybe_ident != null) {
2498 const any_incomplete = blk: {
2499 for (fields) |field| {
2500 if (field.qt.hasIncompleteSize(p.comp) and !field.qt.is(p.comp, .array)) break :blk true;
2501 }
2502 // Set fields and a dummy layout before addign attributes.
2503 record_ty.fields = fields;
2504 record_ty.layout = .{
2505 .size_bits = 8,
2506 .field_alignment_bits = 8,
2507 .pointer_alignment_bits = 8,
2508 .required_alignment_bits = 8,
2509 };
2510 record_ty.decl_node = @enumFromInt(reserved_index);
2511
2512 const base_type = qt.base(p.comp);
2513 if (is_struct) {
2514 std.debug.assert(base_type.type.@"struct".name == record_ty.name);
2515 try p.comp.type_store.set(p.gpa, .{ .@"struct" = record_ty }, @intFromEnum(base_type.qt._index));
2516 } else {
2517 std.debug.assert(base_type.type.@"union".name == record_ty.name);
2518 try p.comp.type_store.set(p.gpa, .{ .@"union" = record_ty }, @intFromEnum(base_type.qt._index));
2519 }
2520 break :blk false;
2521 };
2522
2523 const attributed_qt = try Attribute.applyTypeAttributes(p, qt, attr_buf_top, null);
2524
2525 // Make sure the symbol for this record points to the attributed type.
2526 if (attributed_qt != qt and maybe_ident != null) {
23222527 const ident_str = p.tokSlice(maybe_ident.?);
2323 const interned_name = try StrInt.intern(p.comp, ident_str);
2528 const interned_name = try p.comp.internString(ident_str);
23242529 const ptr = p.syms.getPtr(interned_name, .tags);
2325 ptr.ty = ty;
2530 ptr.qt = attributed_qt;
23262531 }
23272532
2328 if (!ty.hasIncompleteSize()) {
2533 if (!any_incomplete) {
23292534 const pragma_pack_value = switch (p.comp.langopts.emulate) {
23302535 .clang => starting_pragma_pack,
23312536 .gcc => p.pragma_pack,
23322537 // TODO: msvc considers `#pragma pack` on a per-field basis
23332538 .msvc => p.pragma_pack,
23342539 };
2335 record_layout.compute(record_ty, ty, p.comp, pragma_pack_value) catch |er| switch (er) {
2336 error.Overflow => try p.errStr(.record_too_large, maybe_ident orelse kind_tok, try p.typeStr(ty)),
2337 };
2540 if (record_layout.compute(fields, attributed_qt, p.comp, pragma_pack_value)) |layout| {
2541 record_ty.fields = fields;
2542 record_ty.layout = layout;
2543 } else |er| switch (er) {
2544 error.Overflow => try p.err(maybe_ident orelse kind_tok, .record_too_large, .{qt}),
2545 }
2546
2547 // Override previous incomplete layout and fields.
2548 const base_qt = qt.base(p.comp).qt;
2549 const ts = &p.comp.type_store;
2550 var extra_index = ts.types.items(.data)[@intFromEnum(base_qt._index)][1];
2551
2552 const layout_size = 5;
2553 comptime std.debug.assert(@sizeOf(Type.Record.Layout) == @sizeOf(u32) * layout_size);
2554 const field_size = 10;
2555 comptime std.debug.assert(@sizeOf(Type.Record.Field) == @sizeOf(u32) * field_size);
2556
2557 extra_index += 1; // For decl_node
2558 const casted_layout: *const [layout_size]u32 = @ptrCast(&record_ty.layout);
2559 ts.extra.items[extra_index..][0..layout_size].* = casted_layout.*;
2560 extra_index += layout_size;
2561 extra_index += 1; // For field length
2562
2563 for (record_ty.fields) |*field| {
2564 const casted: *const [field_size]u32 = @ptrCast(field);
2565 ts.extra.items[extra_index..][0..field_size].* = casted.*;
2566 extra_index += field_size;
2567 }
23382568 }
23392569
23402570 // finish by creating a node
2341 var node: Tree.Node = .{
2342 .tag = if (is_struct) .struct_decl_two else .union_decl_two,
2343 .ty = ty,
2344 .data = .{ .two = .{ .none, .none } },
2345 .loc = @enumFromInt(maybe_ident orelse kind_tok),
2571 const cd: Node.ContainerDecl = .{
2572 .name_or_kind_tok = maybe_ident orelse kind_tok,
2573 .container_qt = attributed_qt,
2574 .fields = p.decl_buf.items[decl_buf_top..],
23462575 };
2347 switch (record_decls.len) {
2348 0 => {},
2349 1 => node.data = .{ .two = .{ record_decls[0], .none } },
2350 2 => node.data = .{ .two = .{ record_decls[0], record_decls[1] } },
2351 else => {
2352 node.tag = if (is_struct) .struct_decl else .union_decl;
2353 node.data = .{ .range = try p.addList(record_decls) };
2354 },
2355 }
2356 p.decl_buf.items[decl_buf_top - 1] = try p.addNode(node);
2357 if (p.func.ty == null) {
2576 try p.tree.setNode(if (is_struct) .{ .struct_decl = cd } else .{ .union_decl = cd }, reserved_index);
2577 if (p.func.qt == null) {
23582578 _ = p.tentative_defs.remove(record_ty.name);
23592579 }
2360 return ty;
2580 return attributed_qt;
23612581}
23622582
2363/// recordDecl
2364/// : specQual (recordDeclarator (',' recordDeclarator)*)? ;
2365/// | staticAssert
2583/// recordDecls : (keyword_extension? recordDecl | staticAssert)*
23662584fn recordDecls(p: *Parser) Error!void {
23672585 while (true) {
23682586 if (try p.pragma()) continue;
......@@ -2372,23 +2590,59 @@ fn recordDecls(p: *Parser) Error!void {
23722590 defer p.extension_suppressed = saved_extension;
23732591 p.extension_suppressed = true;
23742592
2375 if (try p.parseOrNextDecl(recordDeclarator)) continue;
2376 try p.err(.expected_type);
2593 if (try p.parseOrNextDecl(recordDecl)) continue;
2594 try p.err(p.tok_i, .expected_type, .{});
23772595 p.nextExternDecl();
23782596 continue;
23792597 }
2380 if (try p.parseOrNextDecl(recordDeclarator)) continue;
2598 if (try p.parseOrNextDecl(recordDecl)) continue;
23812599 break;
23822600 }
23832601}
23842602
2385/// recordDeclarator : keyword_extension? declarator (':' integerConstExpr)?
2386fn recordDeclarator(p: *Parser) Error!bool {
2603/// recordDecl : typeSpec+ (recordDeclarator (',' recordDeclarator)*)?
2604/// recordDeclarator : declarator (':' integerConstExpr)?
2605fn recordDecl(p: *Parser) Error!bool {
23872606 const attr_buf_top = p.attr_buf.len;
23882607 defer p.attr_buf.len = attr_buf_top;
2389 const base_ty = (try p.specQual()) orelse return false;
2608
2609 const base_qt: QualType = blk: {
2610 const start = p.tok_i;
2611 var builder: TypeStore.Builder = .{ .parser = p };
2612 while (true) {
2613 if (try p.typeSpec(&builder)) continue;
2614 const id = p.tok_ids[p.tok_i];
2615 switch (id) {
2616 .keyword_auto => {
2617 if (!p.comp.langopts.standard.atLeast(.c23)) break;
2618
2619 try p.err(p.tok_i, .c23_auto_not_allowed, .{if (p.record.kind == .keyword_struct) "struct member" else "union member"});
2620 try builder.combine(.c23_auto, p.tok_i);
2621 },
2622 .keyword_auto_type => {
2623 try p.err(p.tok_i, .auto_type_extension, .{});
2624 try p.err(p.tok_i, .auto_type_not_allowed, .{if (p.record.kind == .keyword_struct) "struct member" else "union member"});
2625 try builder.combine(.auto_type, p.tok_i);
2626 },
2627 .identifier, .extended_identifier => {
2628 if (builder.type != .none) break;
2629 try p.err(p.tok_i, .unknown_type_name, .{p.tokSlice(p.tok_i)});
2630 builder.type = .{ .other = .invalid };
2631 },
2632 else => break,
2633 }
2634 p.tok_i += 1;
2635 break;
2636 }
2637 if (p.tok_i == start) return false;
2638 break :blk switch (builder.type) {
2639 .auto_type, .c23_auto => .invalid,
2640 else => try builder.finish(),
2641 };
2642 };
23902643
23912644 try p.attributeSpecifier(); // .record
2645 var error_on_unnamed = false;
23922646 while (true) {
23932647 const this_decl_top = p.attr_buf.len;
23942648 defer p.attr_buf.len = this_decl_top;
......@@ -2397,43 +2651,40 @@ fn recordDeclarator(p: *Parser) Error!bool {
23972651
23982652 // 0 means unnamed
23992653 var name_tok: TokenIndex = 0;
2400 var ty = base_ty;
2401 if (ty.is(.auto_type)) {
2402 try p.errStr(.auto_type_not_allowed, p.tok_i, if (p.record.kind == .keyword_struct) "struct member" else "union member");
2403 ty = Type.invalid;
2404 }
2405 var bits_node: NodeIndex = .none;
2654 var qt = base_qt;
2655 var bits_node: ?Node.Index = null;
24062656 var bits: ?u32 = null;
24072657 const first_tok = p.tok_i;
2408 if (try p.declarator(ty, .record)) |d| {
2658 if (try p.declarator(qt, .record)) |d| {
24092659 name_tok = d.name;
2410 ty = d.ty;
2660 qt = d.qt;
2661 error_on_unnamed = true;
24112662 }
24122663
24132664 if (p.eatToken(.colon)) |_| bits: {
24142665 const bits_tok = p.tok_i;
24152666 const res = try p.integerConstExpr(.gnu_folding_extension);
2416 if (!ty.isInt()) {
2417 try p.errStr(.non_int_bitfield, first_tok, try p.typeStr(ty));
2667 if (!qt.isInvalid() and !qt.isRealInt(p.comp)) {
2668 try p.err(first_tok, .non_int_bitfield, .{qt});
24182669 break :bits;
24192670 }
24202671
24212672 if (res.val.opt_ref == .none) {
2422 try p.errTok(.expected_integer_constant_expr, bits_tok);
2673 try p.err(bits_tok, .expected_integer_constant_expr, .{});
24232674 break :bits;
2424 } else if (res.val.compare(.lt, Value.zero, p.comp)) {
2425 try p.errStr(.negative_bitwidth, first_tok, try res.str(p));
2675 } else if (res.val.compare(.lt, .zero, p.comp)) {
2676 try p.err(first_tok, .negative_bitwidth, .{res});
24262677 break :bits;
24272678 }
24282679
24292680 // incomplete size error is reported later
2430 const bit_size = ty.bitSizeof(p.comp) orelse break :bits;
2681 const bit_size = qt.bitSizeofOrNull(p.comp) orelse break :bits;
24312682 const bits_unchecked = res.val.toInt(u32, p.comp) orelse std.math.maxInt(u32);
24322683 if (bits_unchecked > bit_size) {
2433 try p.errTok(.bitfield_too_big, name_tok);
2684 try p.err(name_tok, .bitfield_too_big, .{});
24342685 break :bits;
24352686 } else if (bits_unchecked == 0 and name_tok != 0) {
2436 try p.errTok(.zero_width_named_field, name_tok);
2687 try p.err(name_tok, .zero_width_named_field, .{});
24372688 break :bits;
24382689 }
24392690
......@@ -2442,85 +2693,126 @@ fn recordDeclarator(p: *Parser) Error!bool {
24422693 }
24432694
24442695 try p.attributeSpecifier(); // .record
2445 const to_append = try Attribute.applyFieldAttributes(p, &ty, attr_buf_top);
24462696
2447 const any_fields_have_attrs = p.field_attr_buf.items.len > p.record.field_attr_start;
2697 const to_append = try Attribute.applyFieldAttributes(p, &qt, attr_buf_top);
24482698
2449 if (any_fields_have_attrs) {
2450 try p.field_attr_buf.append(to_append);
2451 } else {
2452 if (to_append.len > 0) {
2453 const preceding = p.record_members.items.len - p.record.start;
2454 if (preceding > 0) {
2455 try p.field_attr_buf.appendNTimes(&.{}, preceding);
2456 }
2457 try p.field_attr_buf.append(to_append);
2458 }
2459 }
2699 const attr_index: u32 = @intCast(p.comp.type_store.attributes.items.len);
2700 const attr_len: u32 = @intCast(to_append.len);
2701 try p.comp.type_store.attributes.appendSlice(p.gpa, to_append);
24602702
2461 if (name_tok == 0 and bits_node == .none) unnamed: {
2462 if (ty.is(.@"enum") or ty.hasIncompleteSize()) break :unnamed;
2463 if (ty.isAnonymousRecord(p.comp)) {
2464 // An anonymous record appears as indirect fields on the parent
2465 try p.record_buf.append(.{
2466 .name = try p.getAnonymousName(first_tok),
2467 .ty = ty,
2468 });
2469 const node = try p.addNode(.{
2470 .tag = .indirect_record_field_decl,
2471 .ty = ty,
2472 .data = undefined,
2473 .loc = @enumFromInt(first_tok),
2474 });
2475 try p.decl_buf.append(node);
2476 try p.record.addFieldsFromAnonymous(p, ty);
2477 break; // must be followed by a semicolon
2703 if (name_tok == 0 and bits == null) unnamed: {
2704 var is_typedef = false;
2705 if (!qt.isInvalid()) loop: switch (qt.type(p.comp)) {
2706 .attributed => |attributed_ty| continue :loop attributed_ty.base.type(p.comp),
2707 .typedef => |typedef_ty| {
2708 is_typedef = true;
2709 continue :loop typedef_ty.base.type(p.comp);
2710 },
2711 // typeof intentionally ignored here
2712 .@"enum" => break :unnamed,
2713 .@"struct", .@"union" => |record_ty| if ((record_ty.isAnonymous(p.comp) and !is_typedef) or
2714 (p.comp.langopts.ms_extensions and is_typedef))
2715 {
2716 if (!(record_ty.isAnonymous(p.comp) and !is_typedef)) {
2717 try p.err(first_tok, .anonymous_struct, .{});
2718 }
2719 // An anonymous record appears as indirect fields on the parent
2720 try p.record_buf.append(.{
2721 .name = try p.getAnonymousName(first_tok),
2722 .qt = qt,
2723 ._attr_index = attr_index,
2724 ._attr_len = attr_len,
2725 });
2726
2727 const node = try p.addNode(.{
2728 .record_field = .{
2729 .name_or_first_tok = name_tok,
2730 .qt = qt,
2731 .bit_width = null,
2732 },
2733 });
2734 try p.decl_buf.append(node);
2735 try p.record.addFieldsFromAnonymous(p, record_ty);
2736 break; // must be followed by a semicolon
2737 },
2738 else => {},
2739 };
2740 if (error_on_unnamed) {
2741 try p.err(first_tok, .expected_member_name, .{});
2742 } else {
2743 try p.err(p.tok_i, .missing_declaration, .{});
24782744 }
2479 try p.err(.missing_declaration);
2745 if (p.eatToken(.comma) == null) break;
2746 continue;
24802747 } else {
2481 const interned_name = if (name_tok != 0) try StrInt.intern(p.comp, p.tokSlice(name_tok)) else try p.getAnonymousName(first_tok);
2748 const interned_name = if (name_tok != 0) try p.comp.internString(p.tokSlice(name_tok)) else try p.getAnonymousName(first_tok);
24822749 try p.record_buf.append(.{
24832750 .name = interned_name,
2484 .ty = ty,
2751 .qt = qt,
24852752 .name_tok = name_tok,
2486 .bit_width = bits,
2753 .bit_width = if (bits) |some| @enumFromInt(some) else .null,
2754 ._attr_index = attr_index,
2755 ._attr_len = attr_len,
24872756 });
24882757 if (name_tok != 0) try p.record.addField(p, interned_name, name_tok);
24892758 const node = try p.addNode(.{
2490 .tag = .record_field_decl,
2491 .ty = ty,
2492 .data = .{ .decl = .{ .name = name_tok, .node = bits_node } },
2493 .loc = @enumFromInt(if (name_tok != 0) name_tok else first_tok),
2759 .record_field = .{
2760 .name_or_first_tok = name_tok,
2761 .qt = qt,
2762 .bit_width = bits_node,
2763 },
24942764 });
24952765 try p.decl_buf.append(node);
24962766 }
24972767
2498 if (ty.isFunc()) {
2499 try p.errTok(.func_field, first_tok);
2500 } else if (ty.is(.variable_len_array)) {
2501 try p.errTok(.vla_field, first_tok);
2502 } else if (ty.is(.incomplete_array)) {
2503 if (p.record.kind == .keyword_union) {
2504 try p.errTok(.flexible_in_union, first_tok);
2505 }
2506 if (p.record.flexible_field) |some| {
2507 if (p.record.kind == .keyword_struct) {
2508 try p.errTok(.flexible_non_final, some);
2509 }
2768 if (!qt.isInvalid()) {
2769 const field_type = qt.base(p.comp);
2770 switch (field_type.type) {
2771 .func => {
2772 try p.err(first_tok, .func_field, .{});
2773 qt = .invalid;
2774 },
2775 .array => |array_ty| switch (array_ty.len) {
2776 .static, .unspecified_variable => unreachable,
2777 .variable => {
2778 try p.err(first_tok, .vla_field, .{});
2779 qt = .invalid;
2780 },
2781 .fixed => {},
2782 .incomplete => {
2783 if (p.record.kind == .keyword_union) {
2784 if (p.comp.langopts.emulate == .msvc) {
2785 try p.err(first_tok, .flexible_in_union_msvc, .{});
2786 } else {
2787 try p.err(first_tok, .flexible_in_union, .{});
2788 qt = .invalid;
2789 }
2790 }
2791 if (p.record.flexible_field) |some| {
2792 if (p.record.kind == .keyword_struct) {
2793 try p.err(some, .flexible_non_final, .{});
2794 }
2795 }
2796 p.record.flexible_field = first_tok;
2797 },
2798 },
2799 else => if (field_type.qt.hasIncompleteSize(p.comp)) {
2800 try p.err(first_tok, .field_incomplete_ty, .{qt});
2801 } else if (p.record.flexible_field) |some| {
2802 std.debug.assert(some != first_tok);
2803 if (p.record.kind == .keyword_struct) try p.err(some, .flexible_non_final, .{});
2804 },
25102805 }
2511 p.record.flexible_field = first_tok;
2512 } else if (ty.specifier != .invalid and ty.hasIncompleteSize()) {
2513 try p.errStr(.field_incomplete_ty, first_tok, try p.typeStr(ty));
2514 } else if (p.record.flexible_field) |some| {
2515 if (some != first_tok and p.record.kind == .keyword_struct) try p.errTok(.flexible_non_final, some);
25162806 }
2807
25172808 if (p.eatToken(.comma) == null) break;
2809 error_on_unnamed = true;
25182810 }
25192811
25202812 if (p.eatToken(.semicolon) == null) {
25212813 const tok_id = p.tok_ids[p.tok_i];
25222814 if (tok_id == .r_brace) {
2523 try p.err(.missing_semicolon);
2815 try p.err(p.tok_i, .missing_semicolon, .{});
25242816 } else {
25252817 return p.errExpectedToken(.semicolon, tok_id);
25262818 }
......@@ -2529,11 +2821,11 @@ fn recordDeclarator(p: *Parser) Error!bool {
25292821 return true;
25302822}
25312823
2532/// specQual : (typeSpec | typeQual | alignSpec)+
2533fn specQual(p: *Parser) Error!?Type {
2534 var spec: Type.Builder = .{};
2535 if (try p.typeSpec(&spec)) {
2536 return try spec.finish(p);
2824/// specQual : typeSpec+
2825fn specQual(p: *Parser) Error!?QualType {
2826 var builder: TypeStore.Builder = .{ .parser = p };
2827 if (try p.typeSpec(&builder)) {
2828 return try builder.finish();
25372829 }
25382830 return null;
25392831}
......@@ -2541,7 +2833,7 @@ fn specQual(p: *Parser) Error!?Type {
25412833/// enumSpec
25422834/// : keyword_enum IDENTIFIER? (: typeName)? { enumerator (',' enumerator)? ',') }
25432835/// | keyword_enum IDENTIFIER (: typeName)?
2544fn enumSpec(p: *Parser) Error!Type {
2836fn enumSpec(p: *Parser) Error!QualType {
25452837 const enum_tok = p.tok_i;
25462838 p.tok_i += 1;
25472839 const attr_buf_top = p.attr_buf.len;
......@@ -2549,7 +2841,7 @@ fn enumSpec(p: *Parser) Error!Type {
25492841 try p.attributeSpecifier();
25502842
25512843 const maybe_ident = try p.eatIdentifier();
2552 const fixed_ty = if (p.eatToken(.colon)) |colon| fixed: {
2844 const fixed_qt = if (p.eatToken(.colon)) |colon| fixed: {
25532845 const ty_start = p.tok_i;
25542846 const fixed = (try p.specQual()) orelse {
25552847 if (p.record.kind != .invalid) {
......@@ -2557,53 +2849,60 @@ fn enumSpec(p: *Parser) Error!Type {
25572849 p.tok_i -= 1;
25582850 break :fixed null;
25592851 }
2560 try p.err(.expected_type);
2561 try p.errTok(.enum_fixed, colon);
2852 try p.err(p.tok_i, .expected_type, .{});
2853 try p.err(colon, .enum_fixed, .{});
25622854 break :fixed null;
25632855 };
25642856
2565 if (!fixed.isInt() or fixed.is(.@"enum")) {
2566 try p.errStr(.invalid_type_underlying_enum, ty_start, try p.typeStr(fixed));
2567 break :fixed Type.int;
2857 const fixed_sk = fixed.scalarKind(p.comp);
2858 if (fixed_sk == .@"enum" or !fixed_sk.isInt() or !fixed_sk.isReal()) {
2859 try p.err(ty_start, .invalid_type_underlying_enum, .{fixed});
2860 break :fixed null;
25682861 }
25692862
2570 try p.errTok(.enum_fixed, colon);
2863 try p.err(colon, .enum_fixed, .{});
25712864 break :fixed fixed;
25722865 } else null;
25732866
2867 const reserved_index = try p.tree.nodes.addOne(p.gpa);
2868
25742869 const l_brace = p.eatToken(.l_brace) orelse {
25752870 const ident = maybe_ident orelse {
2576 try p.err(.ident_or_l_brace);
2871 try p.err(p.tok_i, .ident_or_l_brace, .{});
25772872 return error.ParsingFailed;
25782873 };
25792874 // check if this is a reference to a previous type
2580 const interned_name = try StrInt.intern(p.comp, p.tokSlice(ident));
2581 if (try p.syms.findTag(p, interned_name, .keyword_enum, ident, p.tok_ids[p.tok_i])) |prev| {
2875 const interned_name = try p.comp.internString(p.tokSlice(ident));
2876 if (try p.syms.findTag(p, interned_name, p.tok_ids[enum_tok], ident, p.tok_ids[p.tok_i])) |prev| {
25822877 // only check fixed underlying type in forward declarations and not in references.
25832878 if (p.tok_ids[p.tok_i] == .semicolon)
2584 try p.checkEnumFixedTy(fixed_ty, ident, prev);
2585 return prev.ty;
2879 try p.checkEnumFixedTy(fixed_qt, ident, prev);
2880 return prev.qt;
25862881 } else {
2587 // this is a forward declaration, create a new enum Type.
2588 const enum_ty = try Type.Enum.create(p.arena, interned_name, fixed_ty);
2589 const ty = try Attribute.applyTypeAttributes(p, .{
2590 .specifier = .@"enum",
2591 .data = .{ .@"enum" = enum_ty },
2592 }, attr_buf_top, null);
2882 const enum_qt = try p.comp.type_store.put(p.gpa, .{ .@"enum" = .{
2883 .name = interned_name,
2884 .tag = fixed_qt,
2885 .fixed = fixed_qt != null,
2886 .incomplete = true,
2887 .decl_node = @enumFromInt(reserved_index),
2888 .fields = &.{},
2889 } });
2890
2891 const attributed_qt = try Attribute.applyTypeAttributes(p, enum_qt, attr_buf_top, null);
25932892 try p.syms.define(p.gpa, .{
25942893 .kind = .@"enum",
25952894 .name = interned_name,
25962895 .tok = ident,
2597 .ty = ty,
2896 .qt = attributed_qt,
25982897 .val = .{},
25992898 });
2600 try p.decl_buf.append(try p.addNode(.{
2601 .tag = .enum_forward_decl,
2602 .ty = ty,
2603 .data = .{ .decl_ref = ident },
2604 .loc = @enumFromInt(ident),
2605 }));
2606 return ty;
2899
2900 try p.decl_buf.append(try p.addNode(.{ .enum_forward_decl = .{
2901 .name_or_kind_tok = ident,
2902 .container_qt = attributed_qt,
2903 .definition = null,
2904 } }));
2905 return attributed_qt;
26072906 }
26082907 };
26092908
......@@ -2612,26 +2911,41 @@ fn enumSpec(p: *Parser) Error!Type {
26122911
26132912 // Get forward declared type or create a new one
26142913 var defined = false;
2615 const enum_ty: *Type.Enum = if (maybe_ident) |ident| enum_ty: {
2616 const ident_str = p.tokSlice(ident);
2617 const interned_name = try StrInt.intern(p.comp, ident_str);
2618 if (try p.syms.defineTag(p, interned_name, .keyword_enum, ident)) |prev| {
2619 const enum_ty = prev.ty.get(.@"enum").?.data.@"enum";
2620 if (!enum_ty.isIncomplete() and !enum_ty.fixed) {
2621 // if the enum isn't incomplete, this is a redefinition
2622 try p.errStr(.redefinition, ident, ident_str);
2623 try p.errTok(.previous_definition, prev.tok);
2624 } else {
2625 try p.checkEnumFixedTy(fixed_ty, ident, prev);
2626 defined = true;
2627 break :enum_ty enum_ty;
2914 var enum_ty: Type.Enum, const qt: QualType = blk: {
2915 const interned_name = if (maybe_ident) |ident| interned: {
2916 const ident_str = p.tokSlice(ident);
2917 const interned_name = try p.comp.internString(ident_str);
2918 if (try p.syms.defineTag(p, interned_name, p.tok_ids[enum_tok], ident)) |prev| {
2919 const enum_ty = prev.qt.get(p.comp, .@"enum").?;
2920 if (!enum_ty.incomplete) {
2921 // if the record isn't incomplete, this is a redefinition
2922 try p.err(ident, .redefinition, .{ident_str});
2923 try p.err(prev.tok, .previous_definition, .{});
2924 } else {
2925 try p.checkEnumFixedTy(fixed_qt, ident, prev);
2926 defined = true;
2927 break :blk .{ enum_ty, prev.qt };
2928 }
26282929 }
2629 }
2630 break :enum_ty try Type.Enum.create(p.arena, interned_name, fixed_ty);
2631 } else try Type.Enum.create(p.arena, try p.getAnonymousName(enum_tok), fixed_ty);
2930 break :interned interned_name;
2931 } else try p.getAnonymousName(enum_tok);
2932
2933 // Initially create ty as a regular non-attributed type, since attributes for a record
2934 // can be specified after the closing rbrace, which we haven't encountered yet.
2935 const enum_ty: Type.Enum = .{
2936 .name = interned_name,
2937 .decl_node = @enumFromInt(reserved_index),
2938 .tag = fixed_qt,
2939 .incomplete = true,
2940 .fixed = fixed_qt != null,
2941 .fields = &.{},
2942 };
2943 const enum_qt = try p.comp.type_store.put(p.gpa, .{ .@"enum" = enum_ty });
2944 break :blk .{ enum_ty, enum_qt };
2945 };
26322946
26332947 // reserve space for this enum
2634 try p.decl_buf.append(.none);
2948 try p.decl_buf.append(@enumFromInt(reserved_index));
26352949 const decl_buf_top = p.decl_buf.items.len;
26362950 const list_buf_top = p.list_buf.items.len;
26372951 const enum_buf_top = p.enum_buf.items.len;
......@@ -2642,187 +2956,190 @@ fn enumSpec(p: *Parser) Error!Type {
26422956 p.enum_buf.items.len = enum_buf_top;
26432957 }
26442958
2645 var e = Enumerator.init(fixed_ty);
2959 var e = Enumerator.init(fixed_qt);
26462960 while (try p.enumerator(&e)) |field_and_node| {
26472961 try p.enum_buf.append(field_and_node.field);
26482962 try p.list_buf.append(field_and_node.node);
26492963 if (p.eatToken(.comma) == null) break;
26502964 }
26512965
2652 if (p.enum_buf.items.len == enum_buf_top) try p.err(.empty_enum);
2966 if (p.enum_buf.items.len == enum_buf_top) try p.err(p.tok_i, .empty_enum, .{});
26532967 try p.expectClosing(l_brace, .r_brace);
26542968 done = true;
26552969 try p.attributeSpecifier();
26562970
2657 const ty = try Attribute.applyTypeAttributes(p, .{
2658 .specifier = .@"enum",
2659 .data = .{ .@"enum" = enum_ty },
2660 }, attr_buf_top, null);
2971 const attributed_qt = try Attribute.applyTypeAttributes(p, qt, attr_buf_top, null);
26612972 if (!enum_ty.fixed) {
2662 const tag_specifier = try e.getTypeSpecifier(p, ty.enumIsPacked(p.comp), maybe_ident orelse enum_tok);
2663 enum_ty.tag_ty = .{ .specifier = tag_specifier };
2973 enum_ty.tag = try e.getTypeSpecifier(p, attributed_qt.enumIsPacked(p.comp), maybe_ident orelse enum_tok);
26642974 }
26652975
26662976 const enum_fields = p.enum_buf.items[enum_buf_top..];
26672977 const field_nodes = p.list_buf.items[list_buf_top..];
26682978
2669 if (fixed_ty == null) {
2670 for (enum_fields, 0..) |*field, i| {
2671 if (field.ty.eql(Type.int, p.comp, false)) continue;
2979 if (fixed_qt == null) {
2980 // Coerce all fields to final type.
2981 for (enum_fields, field_nodes) |*field, field_node| {
2982 if (field.qt.eql(.int, p.comp)) continue;
26722983
26732984 const sym = p.syms.get(field.name, .vars) orelse continue;
26742985 if (sym.kind != .enumeration) continue; // already an error
26752986
2676 var res = Result{ .node = field.node, .ty = field.ty, .val = sym.val };
2677 const dest_ty = if (p.comp.fixedEnumTagSpecifier()) |some|
2678 Type{ .specifier = some }
2679 else if (try res.intFitsInType(p, Type.int))
2680 Type.int
2681 else if (!res.ty.eql(enum_ty.tag_ty, p.comp, false))
2682 enum_ty.tag_ty
2987 var res: Result = .{ .node = undefined, .qt = field.qt, .val = sym.val };
2988 const dest_ty: QualType = if (p.comp.fixedEnumTagType()) |some|
2989 some
2990 else if (try res.intFitsInType(p, .int))
2991 .int
2992 else if (!res.qt.eql(enum_ty.tag.?, p.comp))
2993 enum_ty.tag.?
26832994 else
26842995 continue;
26852996
26862997 const symbol = p.syms.getPtr(field.name, .vars);
26872998 _ = try symbol.val.intCast(dest_ty, p.comp);
2688 symbol.ty = dest_ty;
2689 p.nodes.items(.ty)[@intFromEnum(field_nodes[i])] = dest_ty;
2690 field.ty = dest_ty;
2691 res.ty = dest_ty;
2999 try p.tree.value_map.put(p.gpa, field_node, symbol.val);
26923000
2693 if (res.node != .none) {
2694 try res.implicitCast(p, .int_cast);
2695 field.node = res.node;
2696 p.nodes.items(.data)[@intFromEnum(field_nodes[i])].decl.node = res.node;
3001 symbol.qt = dest_ty;
3002 field.qt = dest_ty;
3003 res.qt = dest_ty;
3004
3005 // Create a new enum_field node with the correct type.
3006 var new_field_node = field_node.get(&p.tree);
3007 new_field_node.enum_field.qt = dest_ty;
3008
3009 if (new_field_node.enum_field.init) |some| {
3010 res.node = some;
3011 try res.implicitCast(p, .int_cast, some.tok(&p.tree));
3012 new_field_node.enum_field.init = res.node;
26973013 }
3014
3015 try p.tree.setNode(new_field_node, @intFromEnum(field_node));
26983016 }
26993017 }
27003018
2701 enum_ty.fields = try p.arena.dupe(Type.Enum.Field, enum_fields);
3019 { // Override previous incomplete type
3020 enum_ty.fields = enum_fields;
3021 enum_ty.incomplete = false;
3022 enum_ty.decl_node = @enumFromInt(reserved_index);
3023 const base_type = attributed_qt.base(p.comp);
3024 std.debug.assert(base_type.type.@"enum".name == enum_ty.name);
3025 try p.comp.type_store.set(p.gpa, .{ .@"enum" = enum_ty }, @intFromEnum(base_type.qt._index));
3026 }
27023027
27033028 // declare a symbol for the type
27043029 if (maybe_ident != null and !defined) {
27053030 try p.syms.define(p.gpa, .{
27063031 .kind = .@"enum",
27073032 .name = enum_ty.name,
2708 .ty = ty,
3033 .qt = attributed_qt,
27093034 .tok = maybe_ident.?,
27103035 .val = .{},
27113036 });
27123037 }
27133038
27143039 // finish by creating a node
2715 var node: Tree.Node = .{
2716 .tag = .enum_decl_two,
2717 .ty = ty,
2718 .data = .{
2719 .two = .{ .none, .none },
2720 },
2721 .loc = @enumFromInt(maybe_ident orelse enum_tok),
2722 };
2723 switch (field_nodes.len) {
2724 0 => {},
2725 1 => node.data = .{ .two = .{ field_nodes[0], .none } },
2726 2 => node.data = .{ .two = .{ field_nodes[0], field_nodes[1] } },
2727 else => {
2728 node.tag = .enum_decl;
2729 node.data = .{ .range = try p.addList(field_nodes) };
2730 },
2731 }
2732 p.decl_buf.items[decl_buf_top - 1] = try p.addNode(node);
2733 if (p.func.ty == null) {
3040 try p.tree.setNode(.{ .enum_decl = .{
3041 .name_or_kind_tok = maybe_ident orelse enum_tok,
3042 .container_qt = attributed_qt,
3043 .fields = field_nodes,
3044 } }, reserved_index);
3045
3046 if (p.func.qt == null) {
27343047 _ = p.tentative_defs.remove(enum_ty.name);
27353048 }
2736 return ty;
3049 return attributed_qt;
27373050}
27383051
2739fn checkEnumFixedTy(p: *Parser, fixed_ty: ?Type, ident_tok: TokenIndex, prev: Symbol) !void {
2740 const enum_ty = prev.ty.get(.@"enum").?.data.@"enum";
2741 if (fixed_ty) |some| {
3052fn checkEnumFixedTy(p: *Parser, fixed_qt: ?QualType, ident_tok: TokenIndex, prev: Symbol) !void {
3053 const enum_ty = prev.qt.get(p.comp, .@"enum").?;
3054 if (fixed_qt) |some| {
27423055 if (!enum_ty.fixed) {
2743 try p.errTok(.enum_prev_nonfixed, ident_tok);
2744 try p.errTok(.previous_definition, prev.tok);
3056 try p.err(ident_tok, .enum_prev_nonfixed, .{});
3057 try p.err(prev.tok, .previous_definition, .{});
27453058 return error.ParsingFailed;
27463059 }
27473060
2748 if (!enum_ty.tag_ty.eql(some, p.comp, false)) {
2749 const str = try p.typePairStrExtra(some, " (was ", enum_ty.tag_ty);
2750 try p.errStr(.enum_different_explicit_ty, ident_tok, str);
2751 try p.errTok(.previous_definition, prev.tok);
3061 if (!enum_ty.tag.?.eql(some, p.comp)) {
3062 try p.err(ident_tok, .enum_different_explicit_ty, .{ some, enum_ty.tag.? });
3063 try p.err(prev.tok, .previous_definition, .{});
27523064 return error.ParsingFailed;
27533065 }
27543066 } else if (enum_ty.fixed) {
2755 try p.errTok(.enum_prev_fixed, ident_tok);
2756 try p.errTok(.previous_definition, prev.tok);
3067 try p.err(ident_tok, .enum_prev_fixed, .{});
3068 try p.err(prev.tok, .previous_definition, .{});
27573069 return error.ParsingFailed;
27583070 }
27593071}
27603072
27613073const Enumerator = struct {
2762 res: Result,
3074 val: Value = .{},
3075 qt: QualType,
27633076 num_positive_bits: usize = 0,
27643077 num_negative_bits: usize = 0,
27653078 fixed: bool,
27663079
2767 fn init(fixed_ty: ?Type) Enumerator {
3080 fn init(fixed_ty: ?QualType) Enumerator {
27683081 return .{
2769 .res = .{ .ty = fixed_ty orelse .{ .specifier = .int } },
3082 .qt = fixed_ty orelse .int,
27703083 .fixed = fixed_ty != null,
27713084 };
27723085 }
27733086
27743087 /// Increment enumerator value adjusting type if needed.
27753088 fn incr(e: *Enumerator, p: *Parser, tok: TokenIndex) !void {
2776 e.res.node = .none;
2777 const old_val = e.res.val;
3089 const old_val = e.val;
27783090 if (old_val.opt_ref == .none) {
27793091 // First enumerator, set to 0 fits in all types.
2780 e.res.val = Value.zero;
3092 e.val = .zero;
27813093 return;
27823094 }
2783 if (try e.res.val.add(e.res.val, Value.one, e.res.ty, p.comp)) {
3095 if (try e.val.add(e.val, .one, e.qt, p.comp)) {
27843096 if (e.fixed) {
2785 try p.errStr(.enum_not_representable_fixed, tok, try p.typeStr(e.res.ty));
3097 try p.err(tok, .enum_not_representable_fixed, .{e.qt});
27863098 return;
27873099 }
2788 const new_ty = if (p.comp.nextLargestIntSameSign(e.res.ty)) |larger| blk: {
2789 try p.errTok(.enumerator_overflow, tok);
2790 break :blk larger;
2791 } else blk: {
2792 const signed = !e.res.ty.isUnsignedInt(p.comp);
2793 const bit_size: u8 = @intCast(e.res.ty.bitSizeof(p.comp).? - @intFromBool(signed));
2794 try p.errExtra(.enum_not_representable, tok, .{ .pow_2_as_string = bit_size });
2795 break :blk Type{ .specifier = .ulong_long };
2796 };
2797 e.res.ty = new_ty;
2798 _ = try e.res.val.add(old_val, Value.one, e.res.ty, p.comp);
3100 if (p.comp.nextLargestIntSameSign(e.qt)) |larger| {
3101 try p.err(tok, .enumerator_overflow, .{});
3102 e.qt = larger;
3103 } else {
3104 const signed = e.qt.signedness(p.comp) == .signed;
3105 const bit_size = e.qt.bitSizeof(p.comp) - @intFromBool(signed);
3106 try p.err(tok, .enum_not_representable, .{switch (bit_size) {
3107 63 => "9223372036854775808",
3108 64 => "18446744073709551616",
3109 127 => "170141183460469231731687303715884105728",
3110 128 => "340282366920938463463374607431768211456",
3111 else => unreachable,
3112 }});
3113 e.qt = .ulong_long;
3114 }
3115 _ = try e.val.add(old_val, .one, e.qt, p.comp);
27993116 }
28003117 }
28013118
28023119 /// Set enumerator value to specified value.
2803 fn set(e: *Enumerator, p: *Parser, res: Result, tok: TokenIndex) !void {
2804 if (res.ty.specifier == .invalid) return;
2805 if (e.fixed and !res.ty.eql(e.res.ty, p.comp, false)) {
2806 if (!try res.intFitsInType(p, e.res.ty)) {
2807 try p.errStr(.enum_not_representable_fixed, tok, try p.typeStr(e.res.ty));
3120 fn set(e: *Enumerator, p: *Parser, res: *Result, tok: TokenIndex) !void {
3121 if (res.qt.isInvalid()) return;
3122 if (e.fixed and !res.qt.eql(e.qt, p.comp)) {
3123 if (!try res.intFitsInType(p, e.qt)) {
3124 try p.err(tok, .enum_not_representable_fixed, .{e.qt});
28083125 return error.ParsingFailed;
28093126 }
2810 var copy = res;
2811 copy.ty = e.res.ty;
2812 try copy.implicitCast(p, .int_cast);
2813 e.res = copy;
3127 res.qt = e.qt;
3128 try res.implicitCast(p, .int_cast, tok);
3129 e.val = res.val;
28143130 } else {
2815 e.res = res;
2816 try e.res.intCast(p, e.res.ty.integerPromotion(p.comp), tok);
3131 try res.castToInt(p, res.qt.promoteInt(p.comp), tok);
3132 e.qt = res.qt;
3133 e.val = res.val;
28173134 }
28183135 }
28193136
2820 fn getTypeSpecifier(e: *const Enumerator, p: *Parser, is_packed: bool, tok: TokenIndex) !Type.Specifier {
2821 if (p.comp.fixedEnumTagSpecifier()) |tag_specifier| return tag_specifier;
3137 fn getTypeSpecifier(e: *const Enumerator, p: *Parser, is_packed: bool, tok: TokenIndex) !QualType {
3138 if (p.comp.fixedEnumTagType()) |tag_specifier| return tag_specifier;
28223139
2823 const char_width = (Type{ .specifier = .schar }).sizeof(p.comp).? * 8;
2824 const short_width = (Type{ .specifier = .short }).sizeof(p.comp).? * 8;
2825 const int_width = (Type{ .specifier = .int }).sizeof(p.comp).? * 8;
3140 const char_width = Type.Int.schar.bits(p.comp);
3141 const short_width = Type.Int.short.bits(p.comp);
3142 const int_width = Type.Int.int.bits(p.comp);
28263143 if (e.num_negative_bits > 0) {
28273144 if (is_packed and e.num_negative_bits <= char_width and e.num_positive_bits < char_width) {
28283145 return .schar;
......@@ -2831,13 +3148,13 @@ const Enumerator = struct {
28313148 } else if (e.num_negative_bits <= int_width and e.num_positive_bits < int_width) {
28323149 return .int;
28333150 }
2834 const long_width = (Type{ .specifier = .long }).sizeof(p.comp).? * 8;
3151 const long_width = Type.Int.long.bits(p.comp);
28353152 if (e.num_negative_bits <= long_width and e.num_positive_bits < long_width) {
28363153 return .long;
28373154 }
2838 const long_long_width = (Type{ .specifier = .long_long }).sizeof(p.comp).? * 8;
3155 const long_long_width = Type.Int.long_long.bits(p.comp);
28393156 if (e.num_negative_bits > long_long_width or e.num_positive_bits >= long_long_width) {
2840 try p.errTok(.enum_too_large, tok);
3157 try p.err(tok, .enum_too_large, .{});
28413158 }
28423159 return .long_long;
28433160 }
......@@ -2847,21 +3164,21 @@ const Enumerator = struct {
28473164 return .ushort;
28483165 } else if (e.num_positive_bits <= int_width) {
28493166 return .uint;
2850 } else if (e.num_positive_bits <= (Type{ .specifier = .long }).sizeof(p.comp).? * 8) {
3167 } else if (e.num_positive_bits <= Type.Int.long.bits(p.comp)) {
28513168 return .ulong;
28523169 }
28533170 return .ulong_long;
28543171 }
28553172};
28563173
2857const EnumFieldAndNode = struct { field: Type.Enum.Field, node: NodeIndex };
3174const EnumFieldAndNode = struct { field: Type.Enum.Field, node: Node.Index };
28583175
28593176/// enumerator : IDENTIFIER ('=' integerConstExpr)
28603177fn enumerator(p: *Parser, e: *Enumerator) Error!?EnumFieldAndNode {
28613178 _ = try p.pragma();
28623179 const name_tok = (try p.eatIdentifier()) orelse {
28633180 if (p.tok_ids[p.tok_i] == .r_brace) return null;
2864 try p.err(.expected_identifier);
3181 try p.err(p.tok_i, .expected_identifier, .{});
28653182 p.skipTo(.r_brace);
28663183 return error.ParsingFailed;
28673184 };
......@@ -2869,83 +3186,85 @@ fn enumerator(p: *Parser, e: *Enumerator) Error!?EnumFieldAndNode {
28693186 defer p.attr_buf.len = attr_buf_top;
28703187 try p.attributeSpecifier();
28713188
2872 const err_start = p.comp.diagnostics.list.items.len;
2873 if (p.eatToken(.equal)) |_| {
2874 const specified = try p.integerConstExpr(.gnu_folding_extension);
3189 const prev_total = p.diagnostics.total;
3190 const field_init = if (p.eatToken(.equal)) |_| blk: {
3191 var specified = try p.integerConstExpr(.gnu_folding_extension);
28753192 if (specified.val.opt_ref == .none) {
2876 try p.errTok(.enum_val_unavailable, name_tok + 2);
3193 try p.err(name_tok + 2, .enum_val_unavailable, .{});
28773194 try e.incr(p, name_tok);
3195 break :blk null;
28783196 } else {
2879 try e.set(p, specified, name_tok);
3197 try e.set(p, &specified, name_tok);
3198 break :blk specified.node;
28803199 }
2881 } else {
3200 } else blk: {
28823201 try e.incr(p, name_tok);
2883 }
2884
2885 var res = e.res;
2886 res.ty = try Attribute.applyEnumeratorAttributes(p, res.ty, attr_buf_top);
3202 break :blk null;
3203 };
28873204
2888 if (res.ty.isUnsignedInt(p.comp) or res.val.compare(.gte, Value.zero, p.comp)) {
2889 e.num_positive_bits = @max(e.num_positive_bits, res.val.minUnsignedBits(p.comp));
3205 if (e.qt.signedness(p.comp) == .unsigned or e.val.compare(.gte, .zero, p.comp)) {
3206 e.num_positive_bits = @max(e.num_positive_bits, e.val.minUnsignedBits(p.comp));
28903207 } else {
2891 e.num_negative_bits = @max(e.num_negative_bits, res.val.minSignedBits(p.comp));
3208 e.num_negative_bits = @max(e.num_negative_bits, e.val.minSignedBits(p.comp));
28923209 }
28933210
2894 if (err_start == p.comp.diagnostics.list.items.len) {
3211 if (prev_total == p.diagnostics.total) {
28953212 // only do these warnings if we didn't already warn about overflow or non-representable values
2896 if (e.res.val.compare(.lt, Value.zero, p.comp)) {
2897 const min_val = try Value.minInt(Type.int, p.comp);
2898 if (e.res.val.compare(.lt, min_val, p.comp)) {
2899 try p.errStr(.enumerator_too_small, name_tok, try e.res.str(p));
3213 if (e.val.compare(.lt, .zero, p.comp)) {
3214 const min_val = try Value.minInt(.int, p.comp);
3215 if (e.val.compare(.lt, min_val, p.comp)) {
3216 try p.err(name_tok, .enumerator_too_small, .{e});
29003217 }
29013218 } else {
2902 const max_val = try Value.maxInt(Type.int, p.comp);
2903 if (e.res.val.compare(.gt, max_val, p.comp)) {
2904 try p.errStr(.enumerator_too_large, name_tok, try e.res.str(p));
3219 const max_val = try Value.maxInt(.int, p.comp);
3220 if (e.val.compare(.gt, max_val, p.comp)) {
3221 try p.err(name_tok, .enumerator_too_large, .{e});
29053222 }
29063223 }
29073224 }
29083225
2909 const interned_name = try StrInt.intern(p.comp, p.tokSlice(name_tok));
2910 try p.syms.defineEnumeration(p, interned_name, res.ty, name_tok, e.res.val);
3226 const attributed_qt = try Attribute.applyEnumeratorAttributes(p, e.qt, attr_buf_top);
29113227 const node = try p.addNode(.{
2912 .tag = .enum_field_decl,
2913 .ty = res.ty,
2914 .data = .{ .decl = .{
2915 .name = name_tok,
2916 .node = res.node,
2917 } },
2918 .loc = @enumFromInt(name_tok),
3228 .enum_field = .{
3229 .name_tok = name_tok,
3230 .qt = attributed_qt,
3231 .init = field_init,
3232 },
29193233 });
2920 try p.value_map.put(node, e.res.val);
2921 return EnumFieldAndNode{ .field = .{
3234 try p.tree.value_map.put(p.gpa, node, e.val);
3235
3236 const interned_name = try p.comp.internString(p.tokSlice(name_tok));
3237 try p.syms.defineEnumeration(p, interned_name, attributed_qt, name_tok, e.val, node);
3238
3239 return .{ .field = .{
29223240 .name = interned_name,
2923 .ty = res.ty,
3241 .qt = attributed_qt,
29243242 .name_tok = name_tok,
2925 .node = res.node,
29263243 }, .node = node };
29273244}
29283245
29293246/// typeQual : keyword_const | keyword_restrict | keyword_volatile | keyword_atomic
2930fn typeQual(p: *Parser, b: *Type.Qualifiers.Builder) Error!bool {
3247fn typeQual(p: *Parser, b: *TypeStore.Builder, allow_attr: bool) Error!bool {
29313248 var any = false;
29323249 while (true) {
3250 if (allow_attr and try p.msTypeAttribute()) continue;
3251 if (allow_attr) try p.attributeSpecifier();
29333252 switch (p.tok_ids[p.tok_i]) {
29343253 .keyword_restrict, .keyword_restrict1, .keyword_restrict2 => {
29353254 if (b.restrict != null)
2936 try p.errStr(.duplicate_decl_spec, p.tok_i, "restrict")
3255 try p.err(p.tok_i, .duplicate_decl_spec, .{"restrict"})
29373256 else
29383257 b.restrict = p.tok_i;
29393258 },
29403259 .keyword_const, .keyword_const1, .keyword_const2 => {
29413260 if (b.@"const" != null)
2942 try p.errStr(.duplicate_decl_spec, p.tok_i, "const")
3261 try p.err(p.tok_i, .duplicate_decl_spec, .{"const"})
29433262 else
29443263 b.@"const" = p.tok_i;
29453264 },
29463265 .keyword_volatile, .keyword_volatile1, .keyword_volatile2 => {
29473266 if (b.@"volatile" != null)
2948 try p.errStr(.duplicate_decl_spec, p.tok_i, "volatile")
3267 try p.err(p.tok_i, .duplicate_decl_spec, .{"volatile"})
29493268 else
29503269 b.@"volatile" = p.tok_i;
29513270 },
......@@ -2953,73 +3272,324 @@ fn typeQual(p: *Parser, b: *Type.Qualifiers.Builder) Error!bool {
29533272 // _Atomic(typeName) instead of just _Atomic
29543273 if (p.tok_ids[p.tok_i + 1] == .l_paren) break;
29553274 if (b.atomic != null)
2956 try p.errStr(.duplicate_decl_spec, p.tok_i, "atomic")
3275 try p.err(p.tok_i, .duplicate_decl_spec, .{"atomic"})
29573276 else
29583277 b.atomic = p.tok_i;
29593278 },
2960 else => break,
2961 }
2962 p.tok_i += 1;
2963 any = true;
2964 }
3279 .keyword_unaligned, .keyword_unaligned2 => {
3280 if (b.unaligned != null)
3281 try p.err(p.tok_i, .duplicate_decl_spec, .{"__unaligned"})
3282 else
3283 b.unaligned = p.tok_i;
3284 },
3285 .keyword_nonnull, .keyword_nullable, .keyword_nullable_result, .keyword_null_unspecified => |tok_id| {
3286 const sym_str = p.tok_ids[p.tok_i].symbol();
3287 try p.err(p.tok_i, .nullability_extension, .{sym_str});
3288 const new: @FieldType(TypeStore.Builder, "nullability") = switch (tok_id) {
3289 .keyword_nonnull => .{ .nonnull = p.tok_i },
3290 .keyword_nullable => .{ .nullable = p.tok_i },
3291 .keyword_nullable_result => .{ .nullable_result = p.tok_i },
3292 .keyword_null_unspecified => .{ .null_unspecified = p.tok_i },
3293 else => unreachable,
3294 };
3295 if (std.meta.activeTag(b.nullability) == new) {
3296 try p.err(p.tok_i, .duplicate_nullability, .{sym_str});
3297 } else switch (b.nullability) {
3298 .none => {
3299 b.nullability = new;
3300 try p.attr_buf.append(p.gpa, .{
3301 .attr = .{ .tag = .nullability, .args = .{
3302 .nullability = .{ .kind = switch (tok_id) {
3303 .keyword_nonnull => .nonnull,
3304 .keyword_nullable => .nullable,
3305 .keyword_nullable_result => .nullable_result,
3306 .keyword_null_unspecified => .unspecified,
3307 else => unreachable,
3308 } },
3309 }, .syntax = .keyword },
3310 .tok = p.tok_i,
3311 });
3312 },
3313 .nonnull,
3314 .nullable,
3315 .nullable_result,
3316 .null_unspecified,
3317 => |prev| try p.err(p.tok_i, .conflicting_nullability, .{ p.tok_ids[p.tok_i], p.tok_ids[prev] }),
3318 }
3319 },
3320 else => break,
3321 }
3322 p.tok_i += 1;
3323 any = true;
3324 }
3325 return any;
3326}
3327
3328fn msTypeAttribute(p: *Parser) !bool {
3329 var any = false;
3330 while (true) {
3331 switch (p.tok_ids[p.tok_i]) {
3332 .keyword_stdcall,
3333 .keyword_stdcall2,
3334 .keyword_thiscall,
3335 .keyword_thiscall2,
3336 .keyword_vectorcall,
3337 .keyword_vectorcall2,
3338 .keyword_fastcall,
3339 .keyword_fastcall2,
3340 .keyword_regcall,
3341 .keyword_cdecl,
3342 .keyword_cdecl2,
3343 => {
3344 try p.attr_buf.append(p.gpa, .{
3345 .attr = .{ .tag = .calling_convention, .args = .{
3346 .calling_convention = .{ .cc = switch (p.tok_ids[p.tok_i]) {
3347 .keyword_stdcall,
3348 .keyword_stdcall2,
3349 => .stdcall,
3350 .keyword_thiscall,
3351 .keyword_thiscall2,
3352 => .thiscall,
3353 .keyword_vectorcall,
3354 .keyword_vectorcall2,
3355 => .vectorcall,
3356 .keyword_fastcall,
3357 .keyword_fastcall2,
3358 => .fastcall,
3359 .keyword_regcall,
3360 => .regcall,
3361 .keyword_cdecl,
3362 .keyword_cdecl2,
3363 => .c,
3364 else => unreachable,
3365 } },
3366 }, .syntax = .keyword },
3367 .tok = p.tok_i,
3368 });
3369 any = true;
3370 p.tok_i += 1;
3371 },
3372 else => break,
3373 }
3374 }
29653375 return any;
29663376}
29673377
29683378const Declarator = struct {
29693379 name: TokenIndex,
2970 ty: Type,
2971 func_declarator: ?TokenIndex = null,
3380 qt: QualType,
29723381 old_style_func: ?TokenIndex = null,
3382
3383 /// What kind of a type did this declarator declare?
3384 /// Used redundantly with `qt` in case it was set to `.invalid` by `validate`.
3385 declarator_type: enum { other, func, array, pointer } = .other,
3386
3387 const Kind = enum { normal, abstract, param, record };
3388
3389 fn validate(d: *Declarator, p: *Parser, source_tok: TokenIndex) Parser.Error!void {
3390 switch (try validateExtra(p, d.qt, source_tok)) {
3391 .normal => return,
3392 .nested_invalid => if (d.declarator_type == .func) return,
3393 .nested_auto => {
3394 if (d.declarator_type == .func) return;
3395 if (d.qt.isAutoType() or d.qt.isC23Auto()) return;
3396 },
3397 .declarator_combine => return,
3398 }
3399 d.qt = .invalid;
3400 }
3401
3402 const ValidationResult = enum {
3403 nested_invalid,
3404 nested_auto,
3405 declarator_combine,
3406 normal,
3407 };
3408
3409 fn validateExtra(p: *Parser, cur: QualType, source_tok: TokenIndex) Parser.Error!ValidationResult {
3410 if (cur.isInvalid()) return .nested_invalid;
3411 if (cur.isAutoType()) return .nested_auto;
3412 if (cur.isC23Auto()) return .nested_auto;
3413 if (cur._index == .declarator_combine) return .declarator_combine;
3414
3415 switch (cur.type(p.comp)) {
3416 .pointer => |pointer_ty| {
3417 return validateExtra(p, pointer_ty.child, source_tok);
3418 },
3419 .atomic => |atomic_ty| {
3420 return validateExtra(p, atomic_ty, source_tok);
3421 },
3422 .array => |array_ty| {
3423 const elem_qt = array_ty.elem;
3424 const child_res = try validateExtra(p, elem_qt, source_tok);
3425 if (child_res != .normal) return child_res;
3426
3427 if (elem_qt.hasIncompleteSize(p.comp)) {
3428 try p.err(source_tok, .array_incomplete_elem, .{elem_qt});
3429 return .nested_invalid;
3430 }
3431 switch (array_ty.len) {
3432 .fixed, .static => |len| {
3433 const elem_size = elem_qt.sizeofOrNull(p.comp) orelse 1;
3434 const max_elems = p.comp.maxArrayBytes() / @max(1, elem_size);
3435 if (len > max_elems) {
3436 try p.err(source_tok, .array_too_large, .{});
3437 return .nested_invalid;
3438 }
3439 },
3440 else => {},
3441 }
3442
3443 if (elem_qt.is(p.comp, .func)) {
3444 try p.err(source_tok, .array_func_elem, .{});
3445 return .nested_invalid;
3446 }
3447 if (elem_qt.get(p.comp, .array)) |elem_array_ty| {
3448 if (elem_array_ty.len == .static) {
3449 try p.err(source_tok, .static_non_outermost_array, .{});
3450 }
3451 if (elem_qt.isQualified()) {
3452 try p.err(source_tok, .qualifier_non_outermost_array, .{});
3453 }
3454 }
3455 return .normal;
3456 },
3457 .func => |func_ty| {
3458 const ret_qt = func_ty.return_type;
3459 const child_res = try validateExtra(p, ret_qt, source_tok);
3460 if (child_res != .normal) return child_res;
3461
3462 if (ret_qt.is(p.comp, .array)) try p.err(source_tok, .func_cannot_return_array, .{});
3463 if (ret_qt.is(p.comp, .func)) try p.err(source_tok, .func_cannot_return_func, .{});
3464 if (ret_qt.@"const") {
3465 try p.err(source_tok, .qual_on_ret_type, .{"const"});
3466 }
3467 if (ret_qt.@"volatile") {
3468 try p.err(source_tok, .qual_on_ret_type, .{"volatile"});
3469 }
3470 if (ret_qt.get(p.comp, .float)) |float| {
3471 if (float == .fp16 and !p.comp.hasHalfPrecisionFloatABI()) {
3472 try p.err(source_tok, .suggest_pointer_for_invalid_fp16, .{"function return value"});
3473 }
3474 }
3475 return .normal;
3476 },
3477 else => return .normal,
3478 }
3479 }
29733480};
2974const DeclaratorKind = enum { normal, abstract, param, record };
29753481
29763482/// declarator : pointer? (IDENTIFIER | '(' declarator ')') directDeclarator*
29773483/// abstractDeclarator
29783484/// : pointer? ('(' abstractDeclarator ')')? directAbstractDeclarator*
3485/// pointer : '*' typeQual* pointer?
29793486fn declarator(
29803487 p: *Parser,
2981 base_type: Type,
2982 kind: DeclaratorKind,
3488 base_qt: QualType,
3489 kind: Declarator.Kind,
29833490) Error!?Declarator {
2984 const start = p.tok_i;
2985 var d = Declarator{ .name = 0, .ty = try p.pointer(base_type) };
2986 if (base_type.is(.auto_type) and !d.ty.is(.auto_type)) {
2987 try p.errTok(.auto_type_requires_plain_declarator, start);
2988 return error.ParsingFailed;
3491 var d = Declarator{ .name = 0, .qt = base_qt };
3492
3493 // Parse potential pointer declarators first.
3494 while (p.eatToken(.asterisk)) |_| {
3495 d.declarator_type = .pointer;
3496 var builder: TypeStore.Builder = .{ .parser = p };
3497 _ = try p.typeQual(&builder, true);
3498
3499 const pointer_qt = try p.comp.type_store.put(p.gpa, .{ .pointer = .{
3500 .child = d.qt,
3501 .decayed = null,
3502 } });
3503 d.qt = try builder.finishQuals(pointer_qt);
29893504 }
29903505
29913506 const maybe_ident = p.tok_i;
29923507 if (kind != .abstract and (try p.eatIdentifier()) != null) {
29933508 d.name = maybe_ident;
29943509 const combine_tok = p.tok_i;
2995 d.ty = try p.directDeclarator(d.ty, &d, kind);
2996 try d.ty.validateCombinedType(p, combine_tok);
3510 d.qt = try p.directDeclarator(&d, kind);
3511 try d.validate(p, combine_tok);
29973512 return d;
29983513 } else if (p.eatToken(.l_paren)) |l_paren| blk: {
2999 var res = (try p.declarator(.{ .specifier = .void }, kind)) orelse {
3514 // C23 and declspec attributes are not allowed here
3515 while (try p.gnuAttribute()) {}
3516
3517 // Parse Microsoft keyword type attributes.
3518 _ = try p.msTypeAttribute();
3519
3520 const special_marker: QualType = .{ ._index = .declarator_combine };
3521 var res = (try p.declarator(special_marker, kind)) orelse {
30003522 p.tok_i = l_paren;
30013523 break :blk;
30023524 };
30033525 try p.expectClosing(l_paren, .r_paren);
30043526 const suffix_start = p.tok_i;
3005 const outer = try p.directDeclarator(d.ty, &d, kind);
3006 try res.ty.combine(outer);
3007 try res.ty.validateCombinedType(p, suffix_start);
3008 res.old_style_func = d.old_style_func;
3009 if (d.func_declarator) |some| res.func_declarator = some;
3527 const outer = try p.directDeclarator(&d, kind);
3528
3529 // Correct the base type now that it is known.
3530 // If res.qt is the special marker there was no inner type.
3531 if (res.qt._index == .declarator_combine) {
3532 res.qt = outer;
3533 res.declarator_type = d.declarator_type;
3534 } else if (outer.isInvalid() or res.qt.isInvalid()) {
3535 res.qt = outer;
3536 } else {
3537 var cur = res.qt;
3538 while (true) {
3539 switch (cur.type(p.comp)) {
3540 .pointer => |pointer_ty| if (pointer_ty.child._index != .declarator_combine) {
3541 cur = pointer_ty.child;
3542 continue;
3543 },
3544 .atomic => |atomic_ty| if (atomic_ty._index != .declarator_combine) {
3545 cur = atomic_ty;
3546 continue;
3547 },
3548 .array => |array_ty| if (array_ty.elem._index != .declarator_combine) {
3549 cur = array_ty.elem;
3550 continue;
3551 },
3552 .func => |func_ty| if (func_ty.return_type._index != .declarator_combine) {
3553 cur = func_ty.return_type;
3554 continue;
3555 },
3556 else => unreachable,
3557 }
3558 // Child type is always stored in repr.data[0]
3559 p.comp.type_store.types.items(.data)[@intFromEnum(cur._index)][0] = @bitCast(outer);
3560 break;
3561 }
3562 }
3563
3564 try res.validate(p, suffix_start);
30103565 return res;
30113566 }
30123567
30133568 const expected_ident = p.tok_i;
30143569
3015 d.ty = try p.directDeclarator(d.ty, &d, kind);
3016
3017 if (kind == .normal and !d.ty.isEnumOrRecord()) {
3018 try p.errTok(.expected_ident_or_l_paren, expected_ident);
3019 return error.ParsingFailed;
3570 d.qt = try p.directDeclarator(&d, kind);
3571 if (kind == .normal) {
3572 var cur = d.qt;
3573 while (true) {
3574 // QualType.base inlined here because of potential
3575 // .declarator_combine.
3576 if (cur._index == .declarator_combine) break;
3577 switch (cur.type(p.comp)) {
3578 .typeof => |typeof_ty| cur = typeof_ty.base,
3579 .typedef => |typedef_ty| cur = typedef_ty.base,
3580 .attributed => |attributed_ty| cur = attributed_ty.base,
3581 else => |ty| switch (ty) {
3582 .@"enum", .@"struct", .@"union" => break,
3583 else => {
3584 try p.err(expected_ident, .expected_ident_or_l_paren, .{});
3585 return error.ParsingFailed;
3586 },
3587 },
3588 }
3589 }
30203590 }
3021 try d.ty.validateCombinedType(p, expected_ident);
3022 if (start == p.tok_i) return null;
3591 try d.validate(p, expected_ident);
3592 if (d.qt == base_qt) return null;
30233593 return d;
30243594}
30253595
......@@ -3036,212 +3606,190 @@ fn declarator(
30363606/// | '[' typeQual+ keyword_static assignExpr ']'
30373607/// | '[' '*' ']'
30383608/// | '(' paramDecls? ')'
3039fn directDeclarator(p: *Parser, base_type: Type, d: *Declarator, kind: DeclaratorKind) Error!Type {
3609fn directDeclarator(
3610 p: *Parser,
3611 base_declarator: *Declarator,
3612 kind: Declarator.Kind,
3613) Error!QualType {
30403614 if (p.eatToken(.l_bracket)) |l_bracket| {
3615 // Check for C23 attribute
30413616 if (p.tok_ids[p.tok_i] == .l_bracket) {
30423617 switch (kind) {
30433618 .normal, .record => if (p.comp.langopts.standard.atLeast(.c23)) {
30443619 p.tok_i -= 1;
3045 return base_type;
3620 return base_declarator.qt;
30463621 },
30473622 .param, .abstract => {},
30483623 }
3049 try p.err(.expected_expr);
3624 try p.err(p.tok_i, .expected_expr, .{});
30503625 return error.ParsingFailed;
30513626 }
3052 var res_ty = Type{
3053 // so that we can get any restrict type that might be present
3054 .specifier = .pointer,
3055 };
3056 var quals = Type.Qualifiers.Builder{};
30573627
3058 var got_quals = try p.typeQual(&quals);
3628 var builder: TypeStore.Builder = .{ .parser = p };
3629
3630 var got_quals = try p.typeQual(&builder, false);
30593631 var static = p.eatToken(.keyword_static);
3060 if (static != null and !got_quals) got_quals = try p.typeQual(&quals);
3632 if (static != null and !got_quals) got_quals = try p.typeQual(&builder, false);
30613633 var star = p.eatToken(.asterisk);
30623634 const size_tok = p.tok_i;
30633635
30643636 const const_decl_folding = p.const_decl_folding;
30653637 p.const_decl_folding = .gnu_vla_folding_extension;
3066 const size = if (star) |_| Result{} else try p.assignExpr();
3638 const opt_size = if (star) |_| null else try p.assignExpr();
30673639 p.const_decl_folding = const_decl_folding;
30683640
30693641 try p.expectClosing(l_bracket, .r_bracket);
30703642
30713643 if (star != null and static != null) {
3072 try p.errTok(.invalid_static_star, static.?);
3644 try p.err(static.?, .invalid_static_star, .{});
30733645 static = null;
30743646 }
30753647 if (kind != .param) {
30763648 if (static != null)
3077 try p.errTok(.static_non_param, l_bracket)
3649 try p.err(l_bracket, .static_non_param, .{})
30783650 else if (got_quals)
3079 try p.errTok(.array_qualifiers, l_bracket);
3080 if (star) |some| try p.errTok(.star_non_param, some);
3651 try p.err(l_bracket, .array_qualifiers, .{});
3652 if (star) |some| try p.err(some, .star_non_param, .{});
30813653 static = null;
3082 quals = .{};
3654 builder = .{ .parser = p };
30833655 star = null;
3084 } else {
3085 try quals.finish(p, &res_ty);
30863656 }
3087 if (static) |_| try size.expect(p);
3657 if (static) |_| _ = try p.expectResult(opt_size);
30883658
3089 if (base_type.is(.auto_type)) {
3090 try p.errStr(.array_of_auto_type, d.name, p.tokSlice(d.name));
3091 return error.ParsingFailed;
3092 }
3659 const outer = try p.directDeclarator(base_declarator, kind);
30933660
3094 const outer = try p.directDeclarator(base_type, d, kind);
3661 // Set after call to `directDeclarator` since we will return an
3662 // array type from here.
3663 base_declarator.declarator_type = .array;
30953664
3096 if (!size.ty.isInt()) {
3097 try p.errStr(.array_size_non_int, size_tok, try p.typeStr(size.ty));
3665 if (opt_size != null and !opt_size.?.qt.isInvalid() and !opt_size.?.qt.isRealInt(p.comp)) {
3666 try p.err(size_tok, .array_size_non_int, .{opt_size.?.qt});
30983667 return error.ParsingFailed;
30993668 }
3100 if (base_type.is(.c23_auto) or outer.is(.invalid)) {
3101 // issue error later
3102 return Type.invalid;
3103 } else if (size.val.opt_ref == .none) {
3104 if (size.node != .none) {
3105 try p.errTok(.vla, size_tok);
3106 if (p.func.ty == null and kind != .param and p.record.kind == .invalid) {
3107 try p.errTok(.variable_len_array_file_scope, d.name);
3669
3670 if (opt_size) |size| {
3671 if (size.val.opt_ref == .none) {
3672 try p.err(size_tok, .vla, .{});
3673 if (p.func.qt == null and kind != .param and p.record.kind == .invalid) {
3674 try p.err(base_declarator.name, .variable_len_array_file_scope, .{});
31083675 }
3109 const expr_ty = try p.arena.create(Type.Expr);
3110 expr_ty.ty = .{ .specifier = .void };
3111 expr_ty.node = size.node;
3112 res_ty.data = .{ .expr = expr_ty };
3113 res_ty.specifier = .variable_len_array;
3114
3115 if (static) |some| try p.errTok(.useless_static, some);
3116 } else if (star) |_| {
3117 const elem_ty = try p.arena.create(Type);
3118 elem_ty.* = .{ .specifier = .void };
3119 res_ty.data = .{ .sub_type = elem_ty };
3120 res_ty.specifier = .unspecified_variable_len_array;
3676
3677 const array_qt = try p.comp.type_store.put(p.gpa, .{ .array = .{
3678 .elem = outer,
3679 .len = .{ .variable = size.node },
3680 } });
3681
3682 if (static) |some| try p.err(some, .useless_static, .{});
3683 return builder.finishQuals(array_qt);
31213684 } else {
3122 const arr_ty = try p.arena.create(Type.Array);
3123 arr_ty.elem = .{ .specifier = .void };
3124 arr_ty.len = 0;
3125 res_ty.data = .{ .array = arr_ty };
3126 res_ty.specifier = .incomplete_array;
3127 }
3685 if (size.val.isZero(p.comp)) {
3686 try p.err(l_bracket, .zero_length_array, .{});
3687 } else if (size.val.compare(.lt, .zero, p.comp)) {
3688 try p.err(l_bracket, .negative_array_size, .{});
3689 return error.ParsingFailed;
3690 }
3691
3692 const len = size.val.toInt(u64, p.comp) orelse std.math.maxInt(u64);
3693 const array_qt = try p.comp.type_store.put(p.gpa, .{ .array = .{
3694 .elem = outer,
3695 .len = if (static != null)
3696 .{ .static = len }
3697 else
3698 .{ .fixed = len },
3699 } });
3700 return builder.finishQuals(array_qt);
3701 }
3702 } else if (star) |_| {
3703 const array_qt = try p.comp.type_store.put(p.gpa, .{ .array = .{
3704 .elem = outer,
3705 .len = .unspecified_variable,
3706 } });
3707 return builder.finishQuals(array_qt);
31283708 } else {
3129 // `outer` is validated later so it may be invalid here
3130 const outer_size = outer.sizeof(p.comp);
3131 const max_elems = p.comp.maxArrayBytes() / @max(1, outer_size orelse 1);
3132
3133 var size_val = size.val;
3134 if (size_val.isZero(p.comp)) {
3135 try p.errTok(.zero_length_array, l_bracket);
3136 } else if (size_val.compare(.lt, Value.zero, p.comp)) {
3137 try p.errTok(.negative_array_size, l_bracket);
3138 return error.ParsingFailed;
3139 }
3140 const arr_ty = try p.arena.create(Type.Array);
3141 arr_ty.elem = .{ .specifier = .void };
3142 arr_ty.len = size_val.toInt(u64, p.comp) orelse std.math.maxInt(u64);
3143 if (arr_ty.len > max_elems) {
3144 try p.errTok(.array_too_large, l_bracket);
3145 arr_ty.len = max_elems;
3146 }
3147 res_ty.data = .{ .array = arr_ty };
3148 res_ty.specifier = if (static != null) .static_array else .array;
3709 const array_qt = try p.comp.type_store.put(p.gpa, .{ .array = .{
3710 .elem = outer,
3711 .len = .incomplete,
3712 } });
3713 return builder.finishQuals(array_qt);
31493714 }
3150
3151 try res_ty.combine(outer);
3152 return res_ty;
31533715 } else if (p.eatToken(.l_paren)) |l_paren| {
3154 d.func_declarator = l_paren;
3155
3156 const func_ty = try p.arena.create(Type.Func);
3157 func_ty.params = &.{};
3158 func_ty.return_type.specifier = .void;
3159 var specifier: Type.Specifier = .func;
3716 var func_ty: Type.Func = .{
3717 .kind = undefined,
3718 .return_type = undefined,
3719 .params = &.{},
3720 };
31603721
31613722 if (p.eatToken(.ellipsis)) |_| {
3162 try p.err(.param_before_var_args);
3723 try p.err(p.tok_i, .param_before_var_args, .{});
31633724 try p.expectClosing(l_paren, .r_paren);
3164 var res_ty = Type{ .specifier = .func, .data = .{ .func = func_ty } };
3725 func_ty.kind = .variadic;
3726
3727 func_ty.return_type = try p.directDeclarator(base_declarator, kind);
31653728
3166 const outer = try p.directDeclarator(base_type, d, kind);
3167 try res_ty.combine(outer);
3168 return res_ty;
3729 // Set after call to `directDeclarator` since we will return
3730 // a function type from here.
3731 base_declarator.declarator_type = .func;
3732 return p.comp.type_store.put(p.gpa, .{ .func = func_ty });
31693733 }
31703734
3171 if (try p.paramDecls(d)) |params| {
3735 // Set here so the call to directDeclarator for the return type
3736 // doesn't clobber this function type's parameters.
3737 const param_buf_top = p.param_buf.items.len;
3738 defer p.param_buf.items.len = param_buf_top;
3739
3740 if (try p.paramDecls()) |params| {
3741 func_ty.kind = .normal;
31723742 func_ty.params = params;
3173 if (p.eatToken(.ellipsis)) |_| specifier = .var_args_func;
3743 if (p.eatToken(.ellipsis)) |_| func_ty.kind = .variadic;
31743744 } else if (p.tok_ids[p.tok_i] == .r_paren) {
3175 specifier = if (p.comp.langopts.standard.atLeast(.c23))
3176 .func
3745 func_ty.kind = if (p.comp.langopts.standard.atLeast(.c23))
3746 .normal
31773747 else
3178 .old_style_func;
3748 .old_style;
31793749 } else if (p.tok_ids[p.tok_i] == .identifier or p.tok_ids[p.tok_i] == .extended_identifier) {
3180 d.old_style_func = p.tok_i;
3181 const param_buf_top = p.param_buf.items.len;
3750 base_declarator.old_style_func = p.tok_i;
31823751 try p.syms.pushScope(p);
3183 defer {
3184 p.param_buf.items.len = param_buf_top;
3185 p.syms.popScope();
3186 }
3752 defer p.syms.popScope();
31873753
3188 specifier = .old_style_func;
3754 func_ty.kind = .old_style;
31893755 while (true) {
31903756 const name_tok = try p.expectIdentifier();
3191 const interned_name = try StrInt.intern(p.comp, p.tokSlice(name_tok));
3192 try p.syms.defineParam(p, interned_name, undefined, name_tok);
3757 const interned_name = try p.comp.internString(p.tokSlice(name_tok));
3758 try p.syms.defineParam(p, interned_name, undefined, name_tok, null);
31933759 try p.param_buf.append(.{
31943760 .name = interned_name,
31953761 .name_tok = name_tok,
3196 .ty = .{ .specifier = .int },
3762 .qt = .int,
3763 .node = .null,
31973764 });
31983765 if (p.eatToken(.comma) == null) break;
31993766 }
3200 func_ty.params = try p.arena.dupe(Type.Func.Param, p.param_buf.items[param_buf_top..]);
3767 func_ty.params = p.param_buf.items[param_buf_top..];
32013768 } else {
3202 try p.err(.expected_param_decl);
3769 try p.err(p.tok_i, .expected_param_decl, .{});
32033770 }
32043771
32053772 try p.expectClosing(l_paren, .r_paren);
3206 var res_ty = Type{
3207 .specifier = specifier,
3208 .data = .{ .func = func_ty },
3209 };
3773 func_ty.return_type = try p.directDeclarator(base_declarator, kind);
32103774
3211 const outer = try p.directDeclarator(base_type, d, kind);
3212 try res_ty.combine(outer);
3213 return res_ty;
3214 } else return base_type;
3215}
3775 // Set after call to `directDeclarator` since we will return
3776 // a function type from here.
3777 base_declarator.declarator_type = .func;
32163778
3217/// pointer : '*' typeQual* pointer?
3218fn pointer(p: *Parser, base_ty: Type) Error!Type {
3219 var ty = base_ty;
3220 while (p.eatToken(.asterisk)) |_| {
3221 if (!ty.is(.invalid)) {
3222 const elem_ty = try p.arena.create(Type);
3223 elem_ty.* = ty;
3224 ty = Type{
3225 .specifier = .pointer,
3226 .data = .{ .sub_type = elem_ty },
3227 };
3228 }
3229 var quals = Type.Qualifiers.Builder{};
3230 _ = try p.typeQual(&quals);
3231 try quals.finish(p, &ty);
3232 }
3233 return ty;
3779 return p.comp.type_store.put(p.gpa, .{ .func = func_ty });
3780 } else return base_declarator.qt;
32343781}
32353782
32363783/// paramDecls : paramDecl (',' paramDecl)* (',' '...')
32373784/// paramDecl : declSpec (declarator | abstractDeclarator)
3238fn paramDecls(p: *Parser, d: *Declarator) Error!?[]Type.Func.Param {
3785fn paramDecls(p: *Parser) Error!?[]Type.Func.Param {
32393786 // TODO warn about visibility of types declared here
3240 const param_buf_top = p.param_buf.items.len;
3241 defer p.param_buf.items.len = param_buf_top;
32423787 try p.syms.pushScope(p);
32433788 defer p.syms.popScope();
32443789
3790 // Clearing the param buf is handled in directDeclarator.
3791 const param_buf_top = p.param_buf.items.len;
3792
32453793 while (true) {
32463794 const attr_buf_top = p.attr_buf.len;
32473795 defer p.attr_buf.len = attr_buf_top;
......@@ -3252,13 +3800,13 @@ fn paramDecls(p: *Parser, d: *Declarator) Error!?[]Type.Func.Param {
32523800 {
32533801 // handle deprecated K&R style parameters
32543802 const identifier = try p.expectIdentifier();
3255 try p.errStr(.unknown_type_name, identifier, p.tokSlice(identifier));
3256 if (d.old_style_func == null) d.old_style_func = identifier;
3803 try p.err(identifier, .unknown_type_name, .{p.tokSlice(identifier)});
32573804
32583805 try p.param_buf.append(.{
3259 .name = try StrInt.intern(p.comp, p.tokSlice(identifier)),
3806 .name = try p.comp.internString(p.tokSlice(identifier)),
32603807 .name_tok = identifier,
3261 .ty = .{ .specifier = .int },
3808 .qt = .int,
3809 .node = .null,
32623810 });
32633811
32643812 if (p.eatToken(.comma) == null) break;
......@@ -3267,775 +3815,893 @@ fn paramDecls(p: *Parser, d: *Declarator) Error!?[]Type.Func.Param {
32673815 } else if (p.param_buf.items.len == param_buf_top) {
32683816 return null;
32693817 } else blk: {
3270 var spec: Type.Builder = .{};
3271 break :blk DeclSpec{ .ty = try spec.finish(p) };
3818 try p.err(p.tok_i, .missing_type_specifier, .{});
3819 break :blk DeclSpec{ .qt = .int };
32723820 };
32733821
32743822 var name_tok: TokenIndex = 0;
3823 var interned_name: StringId = .empty;
32753824 const first_tok = p.tok_i;
3276 var param_ty = param_decl_spec.ty;
3277 if (try p.declarator(param_decl_spec.ty, .param)) |some| {
3278 if (some.old_style_func) |tok_i| try p.errTok(.invalid_old_style_params, tok_i);
3279 try p.attributeSpecifier();
3825 var param_qt = param_decl_spec.qt;
3826 if (param_decl_spec.auto_type) |tok_i| {
3827 try p.err(tok_i, .auto_type_not_allowed, .{"function prototype"});
3828 param_qt = .invalid;
3829 }
3830 if (param_decl_spec.c23_auto) |tok_i| {
3831 try p.err(tok_i, .c23_auto_not_allowed, .{"function prototype"});
3832 param_qt = .invalid;
3833 }
32803834
3835 if (try p.declarator(param_qt, .param)) |some| {
3836 if (some.old_style_func) |tok_i| try p.err(tok_i, .invalid_old_style_params, .{});
3837 try p.attributeSpecifier();
32813838 name_tok = some.name;
3282 param_ty = some.ty;
3283 if (some.name != 0) {
3284 const interned_name = try StrInt.intern(p.comp, p.tokSlice(name_tok));
3285 try p.syms.defineParam(p, interned_name, param_ty, name_tok);
3286 }
3839 param_qt = some.qt;
32873840 }
3288 param_ty = try Attribute.applyParameterAttributes(p, param_ty, attr_buf_top, .alignas_on_param);
32893841
3290 if (param_ty.isFunc()) {
3291 // params declared as functions are converted to function pointers
3292 const elem_ty = try p.arena.create(Type);
3293 elem_ty.* = param_ty;
3294 param_ty = Type{
3295 .specifier = .pointer,
3296 .data = .{ .sub_type = elem_ty },
3297 };
3298 } else if (param_ty.isArray()) {
3299 // params declared as arrays are converted to pointers
3300 param_ty.decayArray();
3301 } else if (param_ty.is(.void)) {
3842 if (param_qt.is(p.comp, .void)) {
33023843 // validate void parameters
33033844 if (p.param_buf.items.len == param_buf_top) {
33043845 if (p.tok_ids[p.tok_i] != .r_paren) {
3305 try p.err(.void_only_param);
3306 if (param_ty.anyQual()) try p.err(.void_param_qualified);
3846 try p.err(p.tok_i, .void_only_param, .{});
3847 if (param_qt.isQualified()) try p.err(p.tok_i, .void_param_qualified, .{});
33073848 return error.ParsingFailed;
33083849 }
3309 return &[0]Type.Func.Param{};
3850 return &.{};
33103851 }
3311 try p.err(.void_must_be_first_param);
3852 try p.err(p.tok_i, .void_must_be_first_param, .{});
33123853 return error.ParsingFailed;
3854 } else {
3855 // Decay params declared as functions or arrays to pointer.
3856 param_qt = try param_qt.decay(p.comp);
3857 }
3858 try param_decl_spec.validateParam(p);
3859 param_qt = try Attribute.applyParameterAttributes(p, param_qt, attr_buf_top, .alignas_on_param);
3860
3861 if (param_qt.get(p.comp, .float)) |float| {
3862 if (float == .fp16 and !p.comp.hasHalfPrecisionFloatABI()) {
3863 try p.err(first_tok, .suggest_pointer_for_invalid_fp16, .{"parameters"});
3864 }
3865 }
3866
3867 var param_node: Node.OptIndex = .null;
3868 if (name_tok != 0) {
3869 const node = try p.addNode(.{
3870 .param = .{
3871 .name_tok = name_tok,
3872 .qt = param_qt,
3873 .storage_class = switch (param_decl_spec.storage_class) {
3874 .none => .auto,
3875 .register => .register,
3876 else => .auto, // Error reported in `validateParam`
3877 },
3878 },
3879 });
3880 param_node = .pack(node);
3881 interned_name = try p.comp.internString(p.tokSlice(name_tok));
3882 try p.syms.defineParam(p, interned_name, param_qt, name_tok, node);
33133883 }
33143884
3315 try param_decl_spec.validateParam(p, &param_ty);
33163885 try p.param_buf.append(.{
3317 .name = if (name_tok == 0) .empty else try StrInt.intern(p.comp, p.tokSlice(name_tok)),
3886 .name = interned_name,
33183887 .name_tok = if (name_tok == 0) first_tok else name_tok,
3319 .ty = param_ty,
3888 .qt = param_qt,
3889 .node = param_node,
33203890 });
33213891
33223892 if (p.eatToken(.comma) == null) break;
33233893 if (p.tok_ids[p.tok_i] == .ellipsis) break;
33243894 }
3325 return try p.arena.dupe(Type.Func.Param, p.param_buf.items[param_buf_top..]);
3895 return p.param_buf.items[param_buf_top..];
33263896}
33273897
33283898/// typeName : specQual abstractDeclarator
3329fn typeName(p: *Parser) Error!?Type {
3899fn typeName(p: *Parser) Error!?QualType {
33303900 const attr_buf_top = p.attr_buf.len;
33313901 defer p.attr_buf.len = attr_buf_top;
33323902 const ty = (try p.specQual()) orelse return null;
33333903 if (try p.declarator(ty, .abstract)) |some| {
3334 if (some.old_style_func) |tok_i| try p.errTok(.invalid_old_style_params, tok_i);
3335 return try Attribute.applyTypeAttributes(p, some.ty, attr_buf_top, .align_ignored);
3904 if (some.old_style_func) |tok_i| try p.err(tok_i, .invalid_old_style_params, .{});
3905 return try Attribute.applyTypeAttributes(p, some.qt, attr_buf_top, .align_ignored);
33363906 }
33373907 return try Attribute.applyTypeAttributes(p, ty, attr_buf_top, .align_ignored);
33383908}
33393909
3340fn complexInitializer(p: *Parser, init_ty: Type) Error!Result {
3341 assert(p.tok_ids[p.tok_i] == .l_brace);
3342 assert(init_ty.isComplex());
3343
3344 const real_ty = init_ty.makeReal();
3345 if (real_ty.isInt()) {
3346 return p.todo("Complex integer initializers");
3347 }
3348 const l_brace = p.tok_i;
3349 p.tok_i += 1;
3350 try p.errTok(.complex_component_init, l_brace);
3351
3352 const first_tok = p.tok_i;
3353 var first = try p.assignExpr();
3354 try first.expect(p);
3355 try p.coerceInit(&first, first_tok, real_ty);
3356
3357 var second: Result = .{
3358 .ty = real_ty,
3359 .val = Value.zero,
3360 };
3361 if (p.eatToken(.comma)) |_| {
3362 const second_tok = p.tok_i;
3363 const maybe_second = try p.assignExpr();
3364 if (!maybe_second.empty(p)) {
3365 second = maybe_second;
3366 try p.coerceInit(&second, second_tok, real_ty);
3367 }
3368 }
3369
3370 // Eat excess initializers
3371 var extra_tok: ?TokenIndex = null;
3372 while (p.eatToken(.comma)) |_| {
3373 if (p.tok_ids[p.tok_i] == .r_brace) break;
3374 extra_tok = p.tok_i;
3375 const extra = try p.assignExpr();
3376 if (extra.empty(p)) {
3377 try p.errTok(.expected_expr, p.tok_i);
3378 p.skipTo(.r_brace);
3379 return error.ParsingFailed;
3380 }
3381 }
3382 try p.expectClosing(l_brace, .r_brace);
3383 if (extra_tok) |tok| {
3384 try p.errTok(.excess_scalar_init, tok);
3385 }
3386
3387 const arr_init_node: Tree.Node = .{
3388 .tag = .array_init_expr_two,
3389 .ty = init_ty,
3390 .data = .{ .two = .{ first.node, second.node } },
3391 .loc = @enumFromInt(l_brace),
3392 };
3393 var res: Result = .{
3394 .node = try p.addNode(arr_init_node),
3395 .ty = init_ty,
3396 };
3397 if (first.val.opt_ref != .none and second.val.opt_ref != .none) {
3398 res.val = try Value.intern(p.comp, switch (real_ty.bitSizeof(p.comp).?) {
3399 32 => .{ .complex = .{ .cf32 = .{ first.val.toFloat(f32, p.comp), second.val.toFloat(f32, p.comp) } } },
3400 64 => .{ .complex = .{ .cf64 = .{ first.val.toFloat(f64, p.comp), second.val.toFloat(f64, p.comp) } } },
3401 80 => .{ .complex = .{ .cf80 = .{ first.val.toFloat(f80, p.comp), second.val.toFloat(f80, p.comp) } } },
3402 128 => .{ .complex = .{ .cf128 = .{ first.val.toFloat(f128, p.comp), second.val.toFloat(f128, p.comp) } } },
3403 else => unreachable,
3404 });
3405 }
3406 return res;
3407}
3408
34093910/// initializer
34103911/// : assignExpr
34113912/// | '{' initializerItems '}'
3412fn initializer(p: *Parser, init_ty: Type) Error!Result {
3413 // fast path for non-braced initializers
3414 if (p.tok_ids[p.tok_i] != .l_brace) {
3913fn initializer(p: *Parser, init_qt: QualType) Error!Result {
3914 const l_brace = p.eatToken(.l_brace) orelse {
3915 // fast path for non-braced initializers
34153916 const tok = p.tok_i;
3416 var res = try p.assignExpr();
3417 try res.expect(p);
3418 if (try p.coerceArrayInit(&res, tok, init_ty)) return res;
3419 try p.coerceInit(&res, tok, init_ty);
3917 var res = try p.expect(assignExpr);
3918 if (try p.coerceArrayInit(res, tok, init_qt)) return res;
3919 try p.coerceInit(&res, tok, init_qt);
34203920 return res;
3421 }
3422 if (init_ty.is(.auto_type)) {
3423 try p.err(.auto_type_with_init_list);
3424 return error.ParsingFailed;
3425 }
3921 };
34263922
3427 if (init_ty.isComplex()) {
3428 return p.complexInitializer(init_ty);
3923 // We want to parse the initializer even if the target is
3924 // invalidly inferred.
3925 var final_init_qt = init_qt;
3926 if (init_qt.isAutoType()) {
3927 try p.err(l_brace, .auto_type_with_init_list, .{});
3928 final_init_qt = .invalid;
3929 } else if (init_qt.isC23Auto()) {
3930 try p.err(l_brace, .c23_auto_with_init_list, .{});
3931 final_init_qt = .invalid;
34293932 }
3933
34303934 var il: InitList = .{};
34313935 defer il.deinit(p.gpa);
34323936
3433 _ = try p.initializerItem(&il, init_ty);
3937 try p.initializerItem(&il, final_init_qt, l_brace);
34343938
3435 const res = try p.convertInitList(il, init_ty);
3436 var res_ty = p.nodes.items(.ty)[@intFromEnum(res)];
3437 res_ty.qual = init_ty.qual;
3438 return Result{ .ty = res_ty, .node = res };
3939 const list_node = try p.convertInitList(il, final_init_qt);
3940 return .{
3941 .qt = list_node.qt(&p.tree).withQualifiers(final_init_qt),
3942 .node = list_node,
3943 .val = p.tree.value_map.get(list_node) orelse .{},
3944 };
34393945}
34403946
3441/// initializerItems : designation? initializer (',' designation? initializer)* ','?
3442/// designation : designator+ '='
3443/// designator
3444/// : '[' integerConstExpr ']'
3445/// | '.' identifier
3446fn initializerItem(p: *Parser, il: *InitList, init_ty: Type) Error!bool {
3447 const l_brace = p.eatToken(.l_brace) orelse {
3448 const tok = p.tok_i;
3449 var res = try p.assignExpr();
3450 if (res.empty(p)) return false;
3947const IndexList = std.ArrayListUnmanaged(u64);
34513948
3452 const arr = try p.coerceArrayInit(&res, tok, init_ty);
3453 if (!arr) try p.coerceInit(&res, tok, init_ty);
3454 if (il.tok != 0) {
3455 try p.errTok(.initializer_overrides, tok);
3456 try p.errTok(.previous_initializer, il.tok);
3457 }
3458 il.node = res.node;
3459 il.tok = tok;
3460 return true;
3461 };
3949/// initializerItems : designation? initializer (',' designation? initializer)* ','?
3950fn initializerItem(p: *Parser, il: *InitList, init_qt: QualType, l_brace: TokenIndex) Error!void {
3951 const is_scalar = !init_qt.isInvalid() and init_qt.scalarKind(p.comp) != .none;
34623952
3463 const is_scalar = init_ty.isScalar();
3464 const is_complex = init_ty.isComplex();
3465 const scalar_inits_needed: usize = if (is_complex) 2 else 1;
34663953 if (p.eatToken(.r_brace)) |_| {
3467 if (is_scalar) try p.errTok(.empty_scalar_init, l_brace);
3468 if (il.tok != 0) {
3469 try p.errTok(.initializer_overrides, l_brace);
3470 try p.errTok(.previous_initializer, il.tok);
3954 try p.err(l_brace, .empty_initializer, .{});
3955 if (il.tok != 0 and !init_qt.isInvalid()) {
3956 try p.err(l_brace, .initializer_overrides, .{});
3957 try p.err(il.tok, .previous_initializer, .{});
34713958 }
3472 il.node = .none;
3959 il.node = .null;
34733960 il.tok = l_brace;
3474 return true;
3961 return;
34753962 }
34763963
3477 var count: u64 = 0;
3478 var warned_excess = false;
3479 var is_str_init = false;
3480 var index_hint: ?u64 = null;
3481 while (true) : (count += 1) {
3482 errdefer p.skipTo(.r_brace);
3483
3484 var first_tok = p.tok_i;
3485 var cur_ty = init_ty;
3486 var cur_il = il;
3487 var designation = false;
3488 var cur_index_hint: ?u64 = null;
3489 while (true) {
3490 if (p.eatToken(.l_bracket)) |l_bracket| {
3491 if (!cur_ty.isArray()) {
3492 try p.errStr(.invalid_array_designator, l_bracket, try p.typeStr(cur_ty));
3493 return error.ParsingFailed;
3494 }
3495 const expr_tok = p.tok_i;
3496 const index_res = try p.integerConstExpr(.gnu_folding_extension);
3497 try p.expectClosing(l_bracket, .r_bracket);
3964 var index_list: IndexList = .empty;
3965 defer index_list.deinit(p.gpa);
34983966
3499 if (index_res.val.opt_ref == .none) {
3500 try p.errTok(.expected_integer_constant_expr, expr_tok);
3501 return error.ParsingFailed;
3502 } else if (index_res.val.compare(.lt, Value.zero, p.comp)) {
3503 try p.errStr(.negative_array_designator, l_bracket + 1, try index_res.str(p));
3504 return error.ParsingFailed;
3505 }
3967 var seen_any = false;
3968 var warned_excess = init_qt.isInvalid();
3969 while (true) : (seen_any = true) {
3970 errdefer p.skipTo(.r_brace);
35063971
3507 const max_len = cur_ty.arrayLen() orelse std.math.maxInt(usize);
3508 const index_int = index_res.val.toInt(u64, p.comp) orelse std.math.maxInt(u64);
3509 if (index_int >= max_len) {
3510 try p.errStr(.oob_array_designator, l_bracket + 1, try index_res.str(p));
3511 return error.ParsingFailed;
3512 }
3513 cur_index_hint = cur_index_hint orelse index_int;
3514
3515 cur_il = try cur_il.find(p.gpa, index_int);
3516 cur_ty = cur_ty.elemType();
3517 designation = true;
3518 } else if (p.eatToken(.period)) |period| {
3519 const field_tok = try p.expectIdentifier();
3520 const field_str = p.tokSlice(field_tok);
3521 const field_name = try StrInt.intern(p.comp, field_str);
3522 cur_ty = cur_ty.canonicalize(.standard);
3523 if (!cur_ty.isRecord()) {
3524 try p.errStr(.invalid_field_designator, period, try p.typeStr(cur_ty));
3525 return error.ParsingFailed;
3526 } else if (!cur_ty.hasField(field_name)) {
3527 try p.errStr(.no_such_field_designator, period, field_str);
3528 return error.ParsingFailed;
3529 }
3972 const designated = try p.designation(il, init_qt, &index_list);
3973 if (!designated and init_qt.hasAttribute(p.comp, .designated_init)) {
3974 try p.err(p.tok_i, .designated_init_needed, .{});
3975 }
35303976
3531 // TODO check if union already has field set
3532 outer: while (true) {
3533 for (cur_ty.data.record.fields, 0..) |f, i| {
3534 if (f.isAnonymousRecord()) {
3535 // Recurse into anonymous field if it has a field by the name.
3536 if (!f.ty.hasField(field_name)) continue;
3537 cur_ty = f.ty.canonicalize(.standard);
3538 cur_il = try il.find(p.gpa, i);
3539 cur_index_hint = cur_index_hint orelse i;
3540 continue :outer;
3541 }
3542 if (field_name == f.name) {
3543 cur_il = try cur_il.find(p.gpa, i);
3544 cur_ty = f.ty;
3545 cur_index_hint = cur_index_hint orelse i;
3546 break :outer;
3547 }
3548 }
3549 unreachable; // we already checked that the starting type has this field
3977 const first_tok = p.tok_i;
3978 if (p.eatToken(.l_brace)) |inner_l_brace| {
3979 if (try p.findBracedInitializer(il, init_qt, first_tok, &index_list)) |item| {
3980 if (item.il.tok != 0 and !init_qt.isInvalid()) {
3981 try p.err(first_tok, .initializer_overrides, .{});
3982 try p.err(item.il.tok, .previous_initializer, .{});
3983 item.il.deinit(p.gpa);
3984 item.il.* = .{};
35503985 }
3551 designation = true;
3552 } else break;
3553 }
3554 if (designation) index_hint = null;
3555 defer index_hint = cur_index_hint orelse null;
3556
3557 if (designation) _ = try p.expectToken(.equal);
3558
3559 if (!designation and cur_ty.hasAttribute(.designated_init)) {
3560 try p.err(.designated_init_needed);
3561 }
3562
3563 var saw = false;
3564 if (is_str_init and p.isStringInit(init_ty)) {
3565 // discard further strings
3566 var tmp_il = InitList{};
3567 defer tmp_il.deinit(p.gpa);
3568 saw = try p.initializerItem(&tmp_il, .{ .specifier = .void });
3569 } else if (count == 0 and p.isStringInit(init_ty)) {
3570 is_str_init = true;
3571 saw = try p.initializerItem(il, init_ty);
3572 } else if (is_scalar and count >= scalar_inits_needed) {
3573 // discard further scalars
3574 var tmp_il = InitList{};
3575 defer tmp_il.deinit(p.gpa);
3576 saw = try p.initializerItem(&tmp_il, .{ .specifier = .void });
3577 } else if (p.tok_ids[p.tok_i] == .l_brace) {
3578 if (designation) {
3579 // designation overrides previous value, let existing mechanism handle it
3580 saw = try p.initializerItem(cur_il, cur_ty);
3581 } else if (try p.findAggregateInitializer(&cur_il, &cur_ty, &index_hint)) {
3582 saw = try p.initializerItem(cur_il, cur_ty);
3986 try p.initializerItem(item.il, item.qt, inner_l_brace);
35833987 } else {
35843988 // discard further values
3585 var tmp_il = InitList{};
3989 var tmp_il: InitList = .{};
35863990 defer tmp_il.deinit(p.gpa);
3587 saw = try p.initializerItem(&tmp_il, .{ .specifier = .void });
3588 if (!warned_excess) try p.errTok(if (init_ty.isArray()) .excess_array_init else .excess_struct_init, first_tok);
3991 try p.initializerItem(&tmp_il, .invalid, inner_l_brace);
3992 if (!warned_excess) try p.err(first_tok, switch (init_qt.base(p.comp).type) {
3993 .array => if (il.node != .null and p.isStringInit(init_qt, il.node.unpack().?))
3994 .excess_str_init
3995 else
3996 .excess_array_init,
3997 .@"struct" => .excess_struct_init,
3998 .@"union" => .excess_union_init,
3999 .vector => .excess_vector_init,
4000 else => .excess_scalar_init,
4001 }, .{});
4002
4003 warned_excess = true;
4004 }
4005 } else if (try p.assignExpr()) |res| {
4006 if (is_scalar and il.node != .null) {
4007 if (!warned_excess) try p.err(first_tok, .excess_scalar_init, .{});
35894008 warned_excess = true;
4009 } else {
4010 _ = try p.findScalarInitializer(il, init_qt, res, first_tok, &warned_excess, &index_list, 0);
35904011 }
3591 } else single_item: {
3592 first_tok = p.tok_i;
3593 var res = try p.assignExpr();
3594 saw = !res.empty(p);
3595 if (!saw) break :single_item;
4012 } else if (designated or (seen_any and p.tok_ids[p.tok_i] != .r_brace)) {
4013 try p.err(p.tok_i, .expected_expr, .{});
4014 } else break;
4015
4016 if (p.eatToken(.comma) == null) break;
4017 }
4018 try p.expectClosing(l_brace, .r_brace);
35964019
3597 excess: {
3598 if (index_hint) |*hint| {
3599 if (try p.findScalarInitializerAt(&cur_il, &cur_ty, &res, first_tok, hint)) break :excess;
3600 } else if (try p.findScalarInitializer(&cur_il, &cur_ty, &res, first_tok)) break :excess;
4020 if (il.tok == 0) il.tok = l_brace;
4021}
36014022
3602 if (designation) break :excess;
3603 if (!warned_excess) try p.errTok(if (init_ty.isArray()) .excess_array_init else .excess_struct_init, first_tok);
3604 warned_excess = true;
4023fn setInitializer(p: *Parser, il: *InitList, init_qt: QualType, tok: TokenIndex, res: Result) !void {
4024 var copy = res;
36054025
3606 break :single_item;
3607 }
4026 const arr = try p.coerceArrayInit(copy, tok, init_qt);
4027 if (!arr) try p.coerceInit(&copy, tok, init_qt);
4028 if (il.tok != 0 and !init_qt.isInvalid()) {
4029 try p.err(tok, .initializer_overrides, .{});
4030 try p.err(il.tok, .previous_initializer, .{});
4031 }
4032 il.node = .pack(copy.node);
4033 il.tok = tok;
4034}
36084035
3609 const arr = try p.coerceArrayInit(&res, first_tok, cur_ty);
3610 if (!arr) try p.coerceInit(&res, first_tok, cur_ty);
3611 if (cur_il.tok != 0) {
3612 try p.errTok(.initializer_overrides, first_tok);
3613 try p.errTok(.previous_initializer, cur_il.tok);
4036/// designation : designator+ '='?
4037/// designator
4038/// : '[' integerConstExpr ']'
4039/// | '.' identifier
4040fn designation(p: *Parser, il: *InitList, init_qt: QualType, index_list: *IndexList) !bool {
4041 switch (p.tok_ids[p.tok_i]) {
4042 .l_bracket, .period => index_list.items.len = 0,
4043 else => return false,
4044 }
4045
4046 var cur_qt = init_qt;
4047 var cur_il = il;
4048 while (true) {
4049 if (p.eatToken(.l_bracket)) |l_bracket| {
4050 const array_ty = cur_qt.get(p.comp, .array) orelse {
4051 try p.err(l_bracket, .invalid_array_designator, .{cur_qt});
4052 return error.ParsingFailed;
4053 };
4054 const expr_tok = p.tok_i;
4055 const index_res = try p.integerConstExpr(.gnu_folding_extension);
4056 try p.expectClosing(l_bracket, .r_bracket);
4057 if (cur_qt.isInvalid()) continue;
4058
4059 if (index_res.val.opt_ref == .none) {
4060 try p.err(expr_tok, .expected_integer_constant_expr, .{});
4061 return error.ParsingFailed;
4062 } else if (index_res.val.compare(.lt, .zero, p.comp)) {
4063 try p.err(l_bracket + 1, .negative_array_designator, .{index_res});
4064 return error.ParsingFailed;
36144065 }
3615 cur_il.node = res.node;
3616 cur_il.tok = first_tok;
3617 }
36184066
3619 if (!saw) {
3620 if (designation) {
3621 try p.err(.expected_expr);
4067 const max_len = switch (array_ty.len) {
4068 .fixed, .static => |len| len,
4069 else => std.math.maxInt(u64),
4070 };
4071 const index_int = index_res.val.toInt(u64, p.comp) orelse std.math.maxInt(u64);
4072 if (index_int >= max_len) {
4073 try p.err(l_bracket + 1, .oob_array_designator, .{index_res});
36224074 return error.ParsingFailed;
36234075 }
3624 break;
3625 } else if (count == 1) {
3626 if (is_str_init) try p.errTok(.excess_str_init, first_tok);
3627 if (is_scalar and !is_complex) try p.errTok(.excess_scalar_init, first_tok);
3628 } else if (count == 2) {
3629 if (is_scalar and is_complex) try p.errTok(.excess_scalar_init, first_tok);
3630 }
36314076
3632 if (p.eatToken(.comma) == null) break;
3633 }
3634 try p.expectClosing(l_brace, .r_brace);
4077 try index_list.append(p.gpa, index_int);
4078 cur_il = try cur_il.find(p.gpa, index_int);
4079 cur_qt = array_ty.elem;
4080 } else if (p.eatToken(.period)) |period| {
4081 const field_tok = try p.expectIdentifier();
4082 if (cur_qt.isInvalid()) continue;
36354083
3636 if (is_complex and count == 1) { // count of 1 means we saw exactly 2 items in the initializer list
3637 try p.errTok(.complex_component_init, l_brace);
4084 const field_str = p.tokSlice(field_tok);
4085 const target_name = try p.comp.internString(field_str);
4086 var record_ty = cur_qt.getRecord(p.comp) orelse {
4087 try p.err(period, .invalid_field_designator, .{cur_qt});
4088 return error.ParsingFailed;
4089 };
4090
4091 var field_index: u32 = 0;
4092 while (field_index < record_ty.fields.len) {
4093 const field = record_ty.fields[field_index];
4094 if (field.name_tok == 0) if (field.qt.getRecord(p.comp)) |field_record_ty| {
4095 // Recurse into anonymous field if it has a field by the name.
4096 if (!field_record_ty.hasField(p.comp, target_name)) continue;
4097 try index_list.append(p.gpa, field_index);
4098 cur_il = try il.find(p.gpa, field_index);
4099 record_ty = field_record_ty;
4100 field_index = 0;
4101 continue;
4102 };
4103 if (field.name == target_name) {
4104 cur_qt = field.qt;
4105 try index_list.append(p.gpa, field_index);
4106 cur_il = try cur_il.find(p.gpa, field_index);
4107 break;
4108 }
4109 field_index += 1;
4110 } else {
4111 try p.err(period, .no_such_field_designator, .{field_str});
4112 return error.ParsingFailed;
4113 }
4114 } else break;
36384115 }
3639 if (is_scalar or is_str_init) return true;
3640 if (il.tok != 0) {
3641 try p.errTok(.initializer_overrides, l_brace);
3642 try p.errTok(.previous_initializer, il.tok);
4116
4117 if (p.eatToken(.equal) == null) {
4118 try p.err(p.tok_i, .gnu_missing_eq_designator, .{});
36434119 }
3644 il.node = .none;
3645 il.tok = l_brace;
36464120 return true;
36474121}
36484122
3649/// Returns true if the value is unused.
3650fn findScalarInitializerAt(p: *Parser, il: **InitList, ty: *Type, res: *Result, first_tok: TokenIndex, start_index: *u64) Error!bool {
3651 if (ty.isArray()) {
3652 if (il.*.node != .none) return false;
3653 start_index.* += 1;
4123/// Returns true if the item was filled.
4124fn findScalarInitializer(
4125 p: *Parser,
4126 il: *InitList,
4127 qt: QualType,
4128 res: Result,
4129 first_tok: TokenIndex,
4130 warned_excess: *bool,
4131 index_list: *IndexList,
4132 index_list_top: u32,
4133) Error!bool {
4134 if (qt.isInvalid()) return false;
4135 if (index_list.items.len <= index_list_top) try index_list.append(p.gpa, 0);
4136 const index = index_list.items[index_list_top];
4137
4138 switch (qt.base(p.comp).type) {
4139 .complex => |complex_ty| {
4140 if (il.node != .null or index >= 2) {
4141 if (!warned_excess.*) try p.err(first_tok, .excess_scalar_init, .{});
4142 warned_excess.* = true;
4143 return true;
4144 }
4145 if (res.qt.eql(qt, p.comp) and il.list.items.len == 0) {
4146 try p.setInitializer(il, qt, first_tok, res);
4147 return true;
4148 }
36544149
3655 const arr_ty = ty.*;
3656 const elem_count = arr_ty.arrayLen() orelse std.math.maxInt(u64);
3657 if (elem_count == 0) {
3658 try p.errTok(.empty_aggregate_init_braces, first_tok);
3659 return error.ParsingFailed;
3660 }
3661 const elem_ty = arr_ty.elemType();
3662 const arr_il = il.*;
3663 if (start_index.* < elem_count) {
3664 ty.* = elem_ty;
3665 il.* = try arr_il.find(p.gpa, start_index.*);
3666 _ = try p.findScalarInitializer(il, ty, res, first_tok);
3667 return true;
3668 }
3669 return false;
3670 } else if (ty.get(.@"struct")) |struct_ty| {
3671 if (il.*.node != .none) return false;
3672 start_index.* += 1;
4150 const elem_il = try il.find(p.gpa, index);
4151 if (try p.setInitializerIfEqual(elem_il, complex_ty, first_tok, res) or
4152 try p.findScalarInitializer(
4153 elem_il,
4154 complex_ty,
4155 res,
4156 first_tok,
4157 warned_excess,
4158 index_list,
4159 index_list_top + 1,
4160 ))
4161 {
4162 const new_index = index + 1;
4163 index_list.items[index_list_top] = new_index;
4164 index_list.items.len = index_list_top + 1;
4165 return new_index >= 2;
4166 }
4167
4168 return false;
4169 },
4170 .vector => |vector_ty| {
4171 if (il.node != .null or index >= vector_ty.len) {
4172 if (!warned_excess.*) try p.err(first_tok, .excess_vector_init, .{});
4173 warned_excess.* = true;
4174 return true;
4175 }
4176 if (il.list.items.len == 0 and (res.qt.eql(qt, p.comp) or
4177 (res.qt.is(p.comp, .vector) and res.qt.sizeCompare(qt, p.comp) == .eq)))
4178 {
4179 try p.setInitializer(il, qt, first_tok, res);
4180 return true;
4181 }
4182
4183 const elem_il = try il.find(p.gpa, index);
4184 if (try p.setInitializerIfEqual(elem_il, vector_ty.elem, first_tok, res) or
4185 try p.findScalarInitializer(
4186 elem_il,
4187 vector_ty.elem,
4188 res,
4189 first_tok,
4190 warned_excess,
4191 index_list,
4192 index_list_top + 1,
4193 ))
4194 {
4195 const new_index = index + 1;
4196 index_list.items[index_list_top] = new_index;
4197 index_list.items.len = index_list_top + 1;
4198 return new_index >= vector_ty.len;
4199 }
4200
4201 return false;
4202 },
4203 .array => |array_ty| {
4204 const max_len = switch (array_ty.len) {
4205 .fixed, .static => |len| len,
4206 else => std.math.maxInt(u64),
4207 };
4208 if (max_len == 0) {
4209 try p.err(first_tok, .empty_aggregate_init_braces, .{});
4210 return true;
4211 }
4212
4213 if (il.node != .null or index >= max_len) {
4214 if (!warned_excess.*) {
4215 if (il.node.unpack()) |some| if (p.isStringInit(qt, some)) {
4216 try p.err(first_tok, .excess_str_init, .{});
4217 warned_excess.* = true;
4218 return true;
4219 };
4220 try p.err(first_tok, .excess_array_init, .{});
4221 }
4222 warned_excess.* = true;
4223 return true;
4224 }
4225 if (il.list.items.len == 0 and p.isStringInit(qt, res.node) and
4226 try p.coerceArrayInit(res, first_tok, qt))
4227 {
4228 try p.setInitializer(il, qt, first_tok, res);
4229 return true;
4230 }
4231
4232 const elem_il = try il.find(p.gpa, index);
4233 if (try p.setInitializerIfEqual(elem_il, array_ty.elem, first_tok, res) or
4234 try p.findScalarInitializer(
4235 elem_il,
4236 array_ty.elem,
4237 res,
4238 first_tok,
4239 warned_excess,
4240 index_list,
4241 index_list_top + 1,
4242 ))
4243 {
4244 const new_index = index + 1;
4245 index_list.items[index_list_top] = new_index;
4246 index_list.items.len = index_list_top + 1;
4247 return new_index >= max_len;
4248 }
4249
4250 return false;
4251 },
4252 .@"struct" => |struct_ty| {
4253 if (struct_ty.fields.len == 0) {
4254 try p.err(first_tok, .empty_aggregate_init_braces, .{});
4255 return true;
4256 }
4257
4258 if (il.node != .null or index >= struct_ty.fields.len) {
4259 if (!warned_excess.*) try p.err(first_tok, .excess_struct_init, .{});
4260 warned_excess.* = true;
4261 return true;
4262 }
4263
4264 const field = struct_ty.fields[@intCast(index)];
4265 const field_il = try il.find(p.gpa, index);
4266 if (try p.setInitializerIfEqual(field_il, field.qt, first_tok, res) or
4267 try p.findScalarInitializer(
4268 field_il,
4269 field.qt,
4270 res,
4271 first_tok,
4272 warned_excess,
4273 index_list,
4274 index_list_top + 1,
4275 ))
4276 {
4277 const new_index = index + 1;
4278 index_list.items[index_list_top] = new_index;
4279 index_list.items.len = index_list_top + 1;
4280 return new_index >= struct_ty.fields.len;
4281 }
4282
4283 return false;
4284 },
4285 .@"union" => |union_ty| {
4286 if (union_ty.fields.len == 0) {
4287 try p.err(first_tok, .empty_aggregate_init_braces, .{});
4288 return true;
4289 }
4290
4291 if (il.node != .null or il.list.items.len > 1 or
4292 (il.list.items.len == 1 and il.list.items[0].index != index))
4293 {
4294 if (!warned_excess.*) try p.err(first_tok, .excess_union_init, .{});
4295 warned_excess.* = true;
4296 return true;
4297 }
4298
4299 const field = union_ty.fields[@intCast(index)];
4300 const field_il = try il.find(p.gpa, index);
4301 if (try p.setInitializerIfEqual(field_il, field.qt, first_tok, res) or
4302 try p.findScalarInitializer(
4303 field_il,
4304 field.qt,
4305 res,
4306 first_tok,
4307 warned_excess,
4308 index_list,
4309 index_list_top + 1,
4310 ))
4311 {
4312 const new_index = index + 1;
4313 index_list.items[index_list_top] = new_index;
4314 index_list.items.len = index_list_top + 1;
4315 }
36734316
3674 const fields = struct_ty.data.record.fields;
3675 if (fields.len == 0) {
3676 try p.errTok(.empty_aggregate_init_braces, first_tok);
3677 return error.ParsingFailed;
3678 }
3679 const struct_il = il.*;
3680 if (start_index.* < fields.len) {
3681 const field = fields[@intCast(start_index.*)];
3682 ty.* = field.ty;
3683 il.* = try struct_il.find(p.gpa, start_index.*);
3684 _ = try p.findScalarInitializer(il, ty, res, first_tok);
36854317 return true;
3686 }
3687 return false;
3688 } else if (ty.get(.@"union")) |_| {
3689 return false;
4318 },
4319 else => {
4320 try p.setInitializer(il, qt, first_tok, res);
4321 return true;
4322 },
36904323 }
3691 return il.*.node == .none;
36924324}
36934325
3694/// Returns true if the value is unused.
3695fn findScalarInitializer(p: *Parser, il: **InitList, ty: *Type, res: *Result, first_tok: TokenIndex) Error!bool {
3696 const actual_ty = res.ty;
3697 if (ty.isArray() or ty.isComplex()) {
3698 if (il.*.node != .none) return false;
3699 if (try p.coerceArrayInitExtra(res, first_tok, ty.*, false)) return true;
3700 const start_index = il.*.list.items.len;
3701 var index = if (start_index != 0) il.*.list.items[start_index - 1].index else start_index;
4326fn setInitializerIfEqual(p: *Parser, il: *InitList, init_qt: QualType, tok: TokenIndex, res: Result) !bool {
4327 if (!res.qt.eql(init_qt, p.comp)) return false;
4328 try p.setInitializer(il, init_qt, tok, res);
4329 return true;
4330}
37024331
3703 const arr_ty = ty.*;
3704 const elem_count: u64 = arr_ty.expectedInitListSize() orelse std.math.maxInt(u64);
3705 if (elem_count == 0) {
3706 try p.errTok(.empty_aggregate_init_braces, first_tok);
3707 return error.ParsingFailed;
3708 }
3709 const elem_ty = arr_ty.elemType();
3710 const arr_il = il.*;
3711 while (index < elem_count) : (index += 1) {
3712 ty.* = elem_ty;
3713 il.* = try arr_il.find(p.gpa, index);
3714 if (il.*.node == .none and actual_ty.eql(elem_ty, p.comp, false)) return true;
3715 if (try p.findScalarInitializer(il, ty, res, first_tok)) return true;
3716 }
3717 return false;
3718 } else if (ty.get(.@"struct")) |struct_ty| {
3719 if (il.*.node != .none) return false;
3720 if (actual_ty.eql(ty.*, p.comp, false)) return true;
3721 const start_index = il.*.list.items.len;
3722 var index = if (start_index != 0) il.*.list.items[start_index - 1].index + 1 else start_index;
3723
3724 const fields = struct_ty.data.record.fields;
3725 if (fields.len == 0) {
3726 try p.errTok(.empty_aggregate_init_braces, first_tok);
3727 return error.ParsingFailed;
3728 }
3729 const struct_il = il.*;
3730 while (index < fields.len) : (index += 1) {
3731 const field = fields[@intCast(index)];
3732 ty.* = field.ty;
3733 il.* = try struct_il.find(p.gpa, index);
3734 if (il.*.node == .none and actual_ty.eql(field.ty, p.comp, false)) return true;
3735 if (il.*.node == .none and try p.coerceArrayInitExtra(res, first_tok, ty.*, false)) return true;
3736 if (try p.findScalarInitializer(il, ty, res, first_tok)) return true;
3737 }
3738 return false;
3739 } else if (ty.get(.@"union")) |union_ty| {
3740 if (il.*.node != .none) return false;
3741 if (actual_ty.eql(ty.*, p.comp, false)) return true;
3742 if (union_ty.data.record.fields.len == 0) {
3743 try p.errTok(.empty_aggregate_init_braces, first_tok);
3744 return error.ParsingFailed;
3745 }
3746 ty.* = union_ty.data.record.fields[0].ty;
3747 il.* = try il.*.find(p.gpa, 0);
3748 // if (il.*.node == .none and actual_ty.eql(ty, p.comp, false)) return true;
3749 if (try p.coerceArrayInitExtra(res, first_tok, ty.*, false)) return true;
3750 if (try p.findScalarInitializer(il, ty, res, first_tok)) return true;
3751 return false;
4332const InitItem = struct { il: *InitList, qt: QualType };
4333
4334fn findBracedInitializer(
4335 p: *Parser,
4336 il: *InitList,
4337 qt: QualType,
4338 first_tok: TokenIndex,
4339 index_list: *IndexList,
4340) Error!?InitItem {
4341 if (qt.isInvalid()) {
4342 if (il.node != .null) return .{ .il = il, .qt = qt };
4343 return null;
37524344 }
3753 return il.*.node == .none;
3754}
4345 if (index_list.items.len == 0) try index_list.append(p.gpa, 0);
4346 const index = index_list.items[0];
37554347
3756fn findAggregateInitializer(p: *Parser, il: **InitList, ty: *Type, start_index: *?u64) Error!bool {
3757 if (ty.isArray()) {
3758 if (il.*.node != .none) return false;
3759 const list_index = il.*.list.items.len;
3760 const index = if (start_index.*) |*some| blk: {
3761 some.* += 1;
3762 break :blk some.*;
3763 } else if (list_index != 0)
3764 il.*.list.items[list_index - 1].index + 1
3765 else
3766 list_index;
3767
3768 const arr_ty = ty.*;
3769 const elem_count = arr_ty.arrayLen() orelse std.math.maxInt(u64);
3770 const elem_ty = arr_ty.elemType();
3771 if (index < elem_count) {
3772 ty.* = elem_ty;
3773 il.* = try il.*.find(p.gpa, index);
3774 return true;
3775 }
3776 return false;
3777 } else if (ty.get(.@"struct")) |struct_ty| {
3778 if (il.*.node != .none) return false;
3779 const list_index = il.*.list.items.len;
3780 const index = if (start_index.*) |*some| blk: {
3781 some.* += 1;
3782 break :blk some.*;
3783 } else if (list_index != 0)
3784 il.*.list.items[list_index - 1].index + 1
3785 else
3786 list_index;
4348 switch (qt.base(p.comp).type) {
4349 .complex => |complex_ty| {
4350 if (il.node != .null) return null;
37874351
3788 const field_count = struct_ty.data.record.fields.len;
3789 if (index < field_count) {
3790 ty.* = struct_ty.data.record.fields[@intCast(index)].ty;
3791 il.* = try il.*.find(p.gpa, index);
3792 return true;
3793 }
3794 return false;
3795 } else if (ty.get(.@"union")) |union_ty| {
3796 if (il.*.node != .none) return false;
3797 if (start_index.*) |_| return false; // overrides
3798 if (union_ty.data.record.fields.len == 0) return false;
4352 if (index < 2) {
4353 index_list.items[0] = index + 1;
4354 index_list.items.len = 1;
4355 return .{ .il = try il.find(p.gpa, index), .qt = complex_ty };
4356 }
4357 },
4358 .vector => |vector_ty| {
4359 if (il.node != .null) return null;
37994360
3800 ty.* = union_ty.data.record.fields[0].ty;
3801 il.* = try il.*.find(p.gpa, 0);
3802 return true;
3803 } else {
3804 try p.err(.too_many_scalar_init_braces);
3805 return il.*.node == .none;
3806 }
3807}
4361 if (index < vector_ty.len) {
4362 index_list.items[0] = index + 1;
4363 index_list.items.len = 1;
4364 return .{ .il = try il.find(p.gpa, index), .qt = vector_ty.elem };
4365 }
4366 },
4367 .array => |array_ty| {
4368 if (il.node != .null) return null;
4369
4370 const max_len = switch (array_ty.len) {
4371 .fixed, .static => |len| len,
4372 else => std.math.maxInt(u64),
4373 };
4374 if (index < max_len) {
4375 index_list.items[0] = index + 1;
4376 index_list.items.len = 1;
4377 return .{ .il = try il.find(p.gpa, index), .qt = array_ty.elem };
4378 }
4379 },
4380 .@"struct" => |struct_ty| {
4381 if (il.node != .null) return null;
4382
4383 if (index < struct_ty.fields.len) {
4384 index_list.items[0] = index + 1;
4385 index_list.items.len = 1;
4386 const field_qt = struct_ty.fields[@intCast(index)].qt;
4387 return .{ .il = try il.find(p.gpa, index), .qt = field_qt };
4388 }
4389 },
4390 .@"union" => |union_ty| {
4391 if (il.node != .null) return null;
4392 if (union_ty.fields.len == 0) return null;
38084393
3809fn coerceArrayInit(p: *Parser, item: *Result, tok: TokenIndex, target: Type) !bool {
3810 return p.coerceArrayInitExtra(item, tok, target, true);
4394 if (index < union_ty.fields.len) {
4395 index_list.items[0] = index + 1;
4396 index_list.items.len = 1;
4397 const field_qt = union_ty.fields[@intCast(index)].qt;
4398 return .{ .il = try il.find(p.gpa, index), .qt = field_qt };
4399 }
4400 },
4401 else => {
4402 try p.err(first_tok, .too_many_scalar_init_braces, .{});
4403 if (il.node == .null) return .{ .il = il, .qt = qt };
4404 },
4405 }
4406 return null;
38114407}
38124408
3813fn coerceArrayInitExtra(p: *Parser, item: *Result, tok: TokenIndex, target: Type, report_err: bool) !bool {
3814 if (!target.isArray()) return false;
4409fn coerceArrayInit(p: *Parser, item: Result, tok: TokenIndex, target: QualType) !bool {
4410 if (target.isInvalid()) return false;
4411 const target_array_ty = target.get(p.comp, .array) orelse return false;
38154412
38164413 const is_str_lit = p.nodeIs(item.node, .string_literal_expr);
3817 if (!is_str_lit and !p.nodeIsCompoundLiteral(item.node) or !item.ty.isArray()) {
3818 if (!report_err) return false;
3819 try p.errTok(.array_init_str, tok);
4414 const maybe_item_array_ty = item.qt.get(p.comp, .array);
4415 if (!is_str_lit and (!p.nodeIs(item.node, .compound_literal_expr) or maybe_item_array_ty == null)) {
4416 try p.err(tok, .array_init_str, .{});
38204417 return true; // do not do further coercion
38214418 }
38224419
3823 const target_spec = target.elemType().canonicalize(.standard).specifier;
3824 const item_spec = item.ty.elemType().canonicalize(.standard).specifier;
4420 const target_elem = target_array_ty.elem;
4421 const item_elem = maybe_item_array_ty.?.elem;
38254422
3826 const compatible = target.elemType().eql(item.ty.elemType(), p.comp, false) or
3827 (is_str_lit and item_spec == .char and (target_spec == .uchar or target_spec == .schar)) or
3828 (is_str_lit and item_spec == .uchar and (target_spec == .uchar or target_spec == .schar or target_spec == .char));
4423 const target_int = target_elem.get(p.comp, .int) orelse .int; // not int; string compat checks below will fail by design
4424 const item_int = item_elem.get(p.comp, .int) orelse .int; // not int; string compat checks below will fail by design
4425
4426 const compatible = target_elem.eql(item_elem, p.comp) or
4427 (is_str_lit and item_int == .char and (target_int == .uchar or target_int == .schar)) or
4428 (is_str_lit and item_int == .uchar and (target_int == .uchar or target_int == .schar or target_int == .char));
38294429 if (!compatible) {
3830 if (!report_err) return false;
3831 const e_msg = " with array of type ";
3832 try p.errStr(.incompatible_array_init, tok, try p.typePairStrExtra(target, e_msg, item.ty));
4430 try p.err(tok, .incompatible_array_init, .{ target, item.qt });
38334431 return true; // do not do further coercion
38344432 }
38354433
3836 if (target.get(.array)) |arr_ty| {
3837 assert(item.ty.specifier == .array);
3838 const len = item.ty.arrayLen().?;
3839 const array_len = arr_ty.arrayLen().?;
4434 if (target_array_ty.len == .fixed) {
4435 const target_len = target_array_ty.len.fixed;
4436 const item_len = switch (maybe_item_array_ty.?.len) {
4437 .fixed, .static => |len| len,
4438 else => unreachable,
4439 };
4440
38404441 if (is_str_lit) {
38414442 // the null byte of a string can be dropped
3842 if (len - 1 > array_len and report_err) {
3843 try p.errTok(.str_init_too_long, tok);
3844 }
3845 } else if (len > array_len and report_err) {
3846 try p.errStr(
3847 .arr_init_too_long,
3848 tok,
3849 try p.typePairStrExtra(target, " with array of type ", item.ty),
3850 );
4443 if (item_len - 1 > target_len) {
4444 try p.err(tok, .str_init_too_long, .{});
4445 }
4446 } else if (item_len > target_len) {
4447 try p.err(tok, .arr_init_too_long, .{ target, item.qt });
38514448 }
38524449 }
38534450 return true;
38544451}
38554452
3856fn coerceInit(p: *Parser, item: *Result, tok: TokenIndex, target: Type) !void {
3857 if (target.is(.void)) return; // Do not do type coercion on excess items
4453fn coerceInit(p: *Parser, item: *Result, tok: TokenIndex, target: QualType) !void {
4454 if (target.isInvalid()) return;
38584455
38594456 const node = item.node;
3860 try item.lvalConversion(p);
3861 if (target.is(.auto_type)) {
3862 if (p.getNode(node, .member_access_expr) orelse p.getNode(node, .member_access_ptr_expr)) |member_node| {
3863 if (p.tmpTree().isBitfield(member_node)) try p.errTok(.auto_type_from_bitfield, tok);
4457 if (target.isAutoType() or target.isC23Auto()) {
4458 if (p.getNode(node, .member_access_expr) orelse p.getNode(node, .member_access_ptr_expr)) |access| {
4459 if (access.isBitFieldWidth(&p.tree) != null) try p.err(tok, .auto_type_from_bitfield, .{});
38644460 }
3865 return;
3866 } else if (target.is(.c23_auto)) {
4461 try item.lvalConversion(p, tok);
38674462 return;
38684463 }
3869
3870 try item.coerce(p, target, tok, .init);
3871}
3872
3873fn isStringInit(p: *Parser, ty: Type) bool {
3874 if (!ty.isArray() or !ty.elemType().isInt()) return false;
3875 var i = p.tok_i;
3876 while (true) : (i += 1) {
3877 switch (p.tok_ids[i]) {
3878 .l_paren => {},
3879 .string_literal,
3880 .string_literal_utf_16,
3881 .string_literal_utf_8,
3882 .string_literal_utf_32,
3883 .string_literal_wide,
3884 => return true,
3885 else => return false,
3886 }
4464
4465 try item.coerce(p, target, tok, .init);
4466 if (item.val.opt_ref == .none) runtime: {
4467 const diagnostic: Diagnostic = switch (p.init_context) {
4468 .runtime => break :runtime,
4469 .constexpr => .constexpr_requires_const,
4470 .static => break :runtime, // TODO: set this to .non_constant_initializer once we are capable of saving all valid values
4471 };
4472 p.init_context = .runtime; // Suppress further "non-constant initializer" errors
4473 try p.err(tok, diagnostic, .{});
4474 }
4475 if (target.@"const" or p.init_context == .constexpr) {
4476 return item.putValue(p);
38874477 }
4478 return item.saveValue(p);
4479}
4480
4481fn isStringInit(p: *Parser, init_qt: QualType, node: Node.Index) bool {
4482 const init_array_ty = init_qt.get(p.comp, .array) orelse return false;
4483 if (!init_array_ty.elem.is(p.comp, .int)) return false;
4484 return p.nodeIs(node, .string_literal_expr);
38884485}
38894486
38904487/// Convert InitList into an AST
3891fn convertInitList(p: *Parser, il: InitList, init_ty: Type) Error!NodeIndex {
3892 const is_complex = init_ty.isComplex();
3893 if (init_ty.isScalar() and !is_complex) {
3894 if (il.node == .none) {
3895 return p.addNode(.{ .tag = .default_init_expr, .ty = init_ty, .data = undefined });
3896 }
3897 return il.node;
3898 } else if (init_ty.is(.variable_len_array)) {
3899 return error.ParsingFailed; // vla invalid, reported earlier
3900 } else if (init_ty.isArray() or is_complex) {
3901 if (il.node != .none) {
3902 return il.node;
3903 }
3904 const list_buf_top = p.list_buf.items.len;
3905 defer p.list_buf.items.len = list_buf_top;
3906
3907 const elem_ty = init_ty.elemType();
3908
3909 const max_items: u64 = init_ty.expectedInitListSize() orelse std.math.maxInt(usize);
3910 var start: u64 = 0;
3911 for (il.list.items) |*init| {
3912 if (init.index > start) {
4488fn convertInitList(p: *Parser, il: InitList, init_qt: QualType) Error!Node.Index {
4489 if (init_qt.isInvalid()) {
4490 return try p.addNode(.{ .default_init_expr = .{
4491 .last_tok = p.tok_i,
4492 .qt = init_qt,
4493 } });
4494 }
4495
4496 if (il.node.unpack()) |some| return some;
4497
4498 switch (init_qt.base(p.comp).type) {
4499 .complex => |complex_ty| {
4500 if (il.list.items.len == 0) {
4501 return p.addNode(.{ .default_init_expr = .{
4502 .last_tok = p.tok_i - 1,
4503 .qt = init_qt,
4504 } });
4505 }
4506 const first = try p.convertInitList(il.list.items[0].list, complex_ty);
4507 const second = if (il.list.items.len > 1)
4508 try p.convertInitList(il.list.items[1].list, complex_ty)
4509 else
4510 null;
4511
4512 if (il.list.items.len == 2) {
4513 try p.err(il.tok, .complex_component_init, .{});
4514 }
4515
4516 const node = try p.addNode(.{ .array_init_expr = .{
4517 .container_qt = init_qt,
4518 .items = if (second) |some|
4519 &.{ first, some }
4520 else
4521 &.{first},
4522 .l_brace_tok = il.tok,
4523 } });
4524 if (!complex_ty.isFloat(p.comp)) return node;
4525
4526 const first_node = il.list.items[0].list.node.unpack() orelse return node;
4527 const second_node = if (il.list.items.len > 1) il.list.items[1].list.node else .null;
4528
4529 const first_val = p.tree.value_map.get(first_node) orelse return node;
4530 const second_val = if (second_node.unpack()) |some| p.tree.value_map.get(some) orelse return node else Value.zero;
4531 const complex_val = try Value.intern(p.comp, switch (complex_ty.bitSizeof(p.comp)) {
4532 32 => .{ .complex = .{ .cf32 = .{ first_val.toFloat(f32, p.comp), second_val.toFloat(f32, p.comp) } } },
4533 64 => .{ .complex = .{ .cf64 = .{ first_val.toFloat(f64, p.comp), second_val.toFloat(f64, p.comp) } } },
4534 80 => .{ .complex = .{ .cf80 = .{ first_val.toFloat(f80, p.comp), second_val.toFloat(f80, p.comp) } } },
4535 128 => .{ .complex = .{ .cf128 = .{ first_val.toFloat(f128, p.comp), second_val.toFloat(f128, p.comp) } } },
4536 else => unreachable,
4537 });
4538 try p.tree.value_map.put(p.gpa, node, complex_val);
4539 return node;
4540 },
4541 .vector => |vector_ty| {
4542 const list_buf_top = p.list_buf.items.len;
4543 defer p.list_buf.items.len = list_buf_top;
4544
4545 const elem_ty = init_qt.childType(p.comp);
4546
4547 const max_len = vector_ty.len;
4548 var start: u64 = 0;
4549 for (il.list.items) |*init| {
4550 if (init.index > start) {
4551 const elem = try p.addNode(.{
4552 .array_filler_expr = .{
4553 .last_tok = p.tok_i - 1,
4554 .count = init.index - start,
4555 .qt = elem_ty,
4556 },
4557 });
4558 try p.list_buf.append(elem);
4559 }
4560 start = init.index + 1;
4561
4562 const elem = try p.convertInitList(init.list, elem_ty);
4563 try p.list_buf.append(elem);
4564 }
4565
4566 if (start < max_len) {
39134567 const elem = try p.addNode(.{
3914 .tag = .array_filler_expr,
3915 .ty = elem_ty,
3916 .data = .{ .int = init.index - start },
4568 .array_filler_expr = .{
4569 .last_tok = p.tok_i - 1,
4570 .count = max_len - start,
4571 .qt = elem_ty,
4572 },
39174573 });
39184574 try p.list_buf.append(elem);
39194575 }
3920 start = init.index + 1;
3921
3922 const elem = try p.convertInitList(init.list, elem_ty);
3923 try p.list_buf.append(elem);
3924 }
39254576
3926 var arr_init_node: Tree.Node = .{
3927 .tag = .array_init_expr_two,
3928 .ty = init_ty,
3929 .data = .{ .two = .{ .none, .none } },
3930 };
3931
3932 const max_elems = p.comp.maxArrayBytes() / (@max(1, elem_ty.sizeof(p.comp) orelse 1));
3933 if (start > max_elems) {
3934 try p.errTok(.array_too_large, il.tok);
3935 start = max_elems;
3936 }
3937
3938 if (init_ty.specifier == .incomplete_array) {
3939 arr_init_node.ty.specifier = .array;
3940 arr_init_node.ty.data.array.len = start;
3941 } else if (init_ty.is(.incomplete_array)) {
3942 const arr_ty = try p.arena.create(Type.Array);
3943 arr_ty.* = .{ .elem = init_ty.elemType(), .len = start };
3944 arr_init_node.ty = .{
3945 .specifier = .array,
3946 .data = .{ .array = arr_ty },
4577 return p.addNode(.{ .array_init_expr = .{
4578 .l_brace_tok = il.tok,
4579 .container_qt = init_qt,
4580 .items = p.list_buf.items[list_buf_top..],
4581 } });
4582 },
4583 .array => |array_ty| {
4584 const list_buf_top = p.list_buf.items.len;
4585 defer p.list_buf.items.len = list_buf_top;
4586
4587 const elem_ty = init_qt.childType(p.comp);
4588
4589 const max_len = switch (array_ty.len) {
4590 .fixed, .static => |len| len,
4591 // vla invalid, reported earlier
4592 .variable => return try p.addNode(.{ .default_init_expr = .{
4593 .last_tok = p.tok_i,
4594 .qt = init_qt,
4595 } }),
4596 else => std.math.maxInt(u64),
39474597 };
3948 } else if (start < max_items) {
3949 const elem = try p.addNode(.{
3950 .tag = .array_filler_expr,
3951 .ty = elem_ty,
3952 .data = .{ .int = max_items - start },
3953 });
3954 try p.list_buf.append(elem);
3955 }
4598 var start: u64 = 0;
4599 for (il.list.items) |*init| {
4600 if (init.index > start) {
4601 const elem = try p.addNode(.{
4602 .array_filler_expr = .{
4603 .last_tok = p.tok_i - 1,
4604 .count = init.index - start,
4605 .qt = elem_ty,
4606 },
4607 });
4608 try p.list_buf.append(elem);
4609 }
4610 start = init.index + 1;
39564611
3957 const items = p.list_buf.items[list_buf_top..];
3958 switch (items.len) {
3959 0 => {},
3960 1 => arr_init_node.data.two[0] = items[0],
3961 2 => arr_init_node.data.two = .{ items[0], items[1] },
3962 else => {
3963 arr_init_node.tag = .array_init_expr;
3964 arr_init_node.data = .{ .range = try p.addList(items) };
3965 },
3966 }
3967 return try p.addNode(arr_init_node);
3968 } else if (init_ty.get(.@"struct")) |struct_ty| {
3969 assert(!struct_ty.hasIncompleteSize());
3970 if (il.node != .none) {
3971 return il.node;
3972 }
4612 const elem = try p.convertInitList(init.list, elem_ty);
4613 try p.list_buf.append(elem);
4614 }
39734615
3974 const list_buf_top = p.list_buf.items.len;
3975 defer p.list_buf.items.len = list_buf_top;
4616 const max_elems = p.comp.maxArrayBytes() / (@max(1, elem_ty.sizeofOrNull(p.comp) orelse 1));
4617 if (start > max_elems) {
4618 try p.err(il.tok, .array_too_large, .{});
4619 start = max_elems;
4620 }
39764621
3977 var init_index: usize = 0;
3978 for (struct_ty.data.record.fields, 0..) |f, i| {
3979 if (init_index < il.list.items.len and il.list.items[init_index].index == i) {
3980 const item = try p.convertInitList(il.list.items[init_index].list, f.ty);
3981 try p.list_buf.append(item);
3982 init_index += 1;
3983 } else {
3984 const item = try p.addNode(.{ .tag = .default_init_expr, .ty = f.ty, .data = undefined });
3985 try p.list_buf.append(item);
4622 var arr_init_qt = init_qt;
4623 if (array_ty.len == .incomplete) {
4624 arr_init_qt = try p.comp.type_store.put(p.gpa, .{ .array = .{
4625 .elem = array_ty.elem,
4626 .len = .{ .fixed = start },
4627 } });
4628 } else if (start < max_len) {
4629 const elem = try p.addNode(.{
4630 .array_filler_expr = .{
4631 .last_tok = p.tok_i - 1,
4632 .count = max_len - start,
4633 .qt = elem_ty,
4634 },
4635 });
4636 try p.list_buf.append(elem);
39864637 }
3987 }
39884638
3989 var struct_init_node: Tree.Node = .{
3990 .tag = .struct_init_expr_two,
3991 .ty = init_ty,
3992 .data = .{ .two = .{ .none, .none } },
3993 };
3994 const items = p.list_buf.items[list_buf_top..];
3995 switch (items.len) {
3996 0 => {},
3997 1 => struct_init_node.data.two[0] = items[0],
3998 2 => struct_init_node.data.two = .{ items[0], items[1] },
3999 else => {
4000 struct_init_node.tag = .struct_init_expr;
4001 struct_init_node.data = .{ .range = try p.addList(items) };
4002 },
4003 }
4004 return try p.addNode(struct_init_node);
4005 } else if (init_ty.get(.@"union")) |union_ty| {
4006 if (il.node != .none) {
4007 return il.node;
4008 }
4639 return p.addNode(.{ .array_init_expr = .{
4640 .l_brace_tok = il.tok,
4641 .container_qt = arr_init_qt,
4642 .items = p.list_buf.items[list_buf_top..],
4643 } });
4644 },
4645 .@"struct" => |struct_ty| {
4646 assert(struct_ty.layout != null);
4647 const list_buf_top = p.list_buf.items.len;
4648 defer p.list_buf.items.len = list_buf_top;
4649
4650 var init_index: usize = 0;
4651 for (struct_ty.fields, 0..) |field, i| {
4652 if (init_index < il.list.items.len and il.list.items[init_index].index == i) {
4653 const item = try p.convertInitList(il.list.items[init_index].list, field.qt);
4654 try p.list_buf.append(item);
4655 init_index += 1;
4656 } else {
4657 const item = try p.addNode(.{
4658 .default_init_expr = .{
4659 .last_tok = il.tok,
4660 .qt = field.qt,
4661 },
4662 });
4663 try p.list_buf.append(item);
4664 }
4665 }
40094666
4010 var union_init_node: Tree.Node = .{
4011 .tag = .union_init_expr,
4012 .ty = init_ty,
4013 .data = .{ .union_init = .{ .field_index = 0, .node = .none } },
4014 };
4015 if (union_ty.data.record.fields.len == 0) {
4016 // do nothing for empty unions
4017 } else if (il.list.items.len == 0) {
4018 union_init_node.data.union_init.node = try p.addNode(.{
4019 .tag = .default_init_expr,
4020 .ty = init_ty,
4021 .data = undefined,
4022 });
4023 } else {
4024 const init = il.list.items[0];
4025 const index: u32 = @truncate(init.index);
4026 const field_ty = union_ty.data.record.fields[index].ty;
4027 union_init_node.data.union_init = .{
4028 .field_index = index,
4029 .node = try p.convertInitList(init.list, field_ty),
4667 return p.addNode(.{ .struct_init_expr = .{
4668 .l_brace_tok = il.tok,
4669 .container_qt = init_qt,
4670 .items = p.list_buf.items[list_buf_top..],
4671 } });
4672 },
4673 .@"union" => |union_ty| {
4674 const init_node, const index = if (union_ty.fields.len == 0)
4675 // do nothing for empty unions
4676 .{ null, 0 }
4677 else if (il.list.items.len == 0)
4678 .{ try p.addNode(.{ .default_init_expr = .{
4679 .last_tok = p.tok_i - 1,
4680 .qt = init_qt,
4681 } }), 0 }
4682 else blk: {
4683 const init = il.list.items[0];
4684 const index: u32 = @truncate(init.index);
4685 const field_qt = union_ty.fields[index].qt;
4686
4687 break :blk .{ try p.convertInitList(init.list, field_qt), index };
40304688 };
4031 }
4032 return try p.addNode(union_init_node);
4033 } else {
4034 return error.ParsingFailed; // initializer target is invalid, reported earlier
4689 return p.addNode(.{ .union_init_expr = .{
4690 .field_index = index,
4691 .initializer = init_node,
4692 .l_brace_tok = il.tok,
4693 .union_qt = init_qt,
4694 } });
4695 },
4696 // initializer target is invalid, reported earlier
4697 else => return try p.addNode(.{ .default_init_expr = .{
4698 .last_tok = p.tok_i,
4699 .qt = init_qt,
4700 } }),
40354701 }
40364702}
40374703
4038fn msvcAsmStmt(p: *Parser) Error!?NodeIndex {
4704fn msvcAsmStmt(p: *Parser) Error!?Node.Index {
40394705 return p.todo("MSVC assembly statements");
40404706}
40414707
......@@ -4043,7 +4709,7 @@ fn msvcAsmStmt(p: *Parser) Error!?NodeIndex {
40434709fn asmOperand(p: *Parser, names: *std.array_list.Managed(?TokenIndex), constraints: *NodeList, exprs: *NodeList) Error!void {
40444710 if (p.eatToken(.l_bracket)) |l_bracket| {
40454711 const ident = (try p.eatIdentifier()) orelse {
4046 try p.err(.expected_identifier);
4712 try p.err(p.tok_i, .expected_identifier, .{});
40474713 return error.ParsingFailed;
40484714 };
40494715 try names.append(ident);
......@@ -4055,12 +4721,12 @@ fn asmOperand(p: *Parser, names: *std.array_list.Managed(?TokenIndex), constrain
40554721 try constraints.append(constraint.node);
40564722
40574723 const l_paren = p.eatToken(.l_paren) orelse {
4058 try p.errExtra(.expected_token, p.tok_i, .{ .tok_id = .{ .actual = p.tok_ids[p.tok_i], .expected = .l_paren } });
4724 try p.err(p.tok_i, .expected_token, .{ p.tok_ids[p.tok_i], .l_paren });
40594725 return error.ParsingFailed;
40604726 };
4061 const res = try p.expr();
4727 const maybe_res = try p.expr();
40624728 try p.expectClosing(l_paren, .r_paren);
4063 try res.expect(p);
4729 const res = try p.expectResult(maybe_res);
40644730 try exprs.append(res.node);
40654731}
40664732
......@@ -4070,21 +4736,21 @@ fn asmOperand(p: *Parser, names: *std.array_list.Managed(?TokenIndex), constrain
40704736/// | asmStr ':' asmOperand* ':' asmOperand*
40714737/// | asmStr ':' asmOperand* ':' asmOperand* : asmStr? (',' asmStr)*
40724738/// | asmStr ':' asmOperand* ':' asmOperand* : asmStr? (',' asmStr)* : IDENTIFIER (',' IDENTIFIER)*
4073fn gnuAsmStmt(p: *Parser, quals: Tree.GNUAssemblyQualifiers, asm_tok: TokenIndex, l_paren: TokenIndex) Error!NodeIndex {
4739fn gnuAsmStmt(p: *Parser, quals: Tree.GNUAssemblyQualifiers, asm_tok: TokenIndex, l_paren: TokenIndex) Error!Node.Index {
40744740 const asm_str = try p.asmStr();
40754741 try p.checkAsmStr(asm_str.val, l_paren);
40764742
40774743 if (p.tok_ids[p.tok_i] == .r_paren) {
4078 return p.addNode(.{
4079 .tag = .gnu_asm_simple,
4080 .ty = .{ .specifier = .void },
4081 .data = .{ .un = asm_str.node },
4082 .loc = @enumFromInt(asm_tok),
4744 return try p.addNode(.{
4745 .gnu_asm_simple = .{
4746 .asm_str = asm_str.node,
4747 .asm_tok = asm_tok,
4748 },
40834749 });
40844750 }
40854751
40864752 const expected_items = 8; // arbitrarily chosen, most assembly will have fewer than 8 inputs/outputs/constraints/names
4087 const bytes_needed = expected_items * @sizeOf(?TokenIndex) + expected_items * 3 * @sizeOf(NodeIndex);
4753 const bytes_needed = expected_items * @sizeOf(?TokenIndex) + expected_items * 3 * @sizeOf(Node.Index);
40884754
40894755 var stack_fallback = std.heap.stackFallback(bytes_needed, p.gpa);
40904756 const allocator = stack_fallback.get();
......@@ -4154,7 +4820,7 @@ fn gnuAsmStmt(p: *Parser, quals: Tree.GNUAssemblyQualifiers, asm_tok: TokenIndex
41544820 }
41554821
41564822 if (!quals.goto and (p.tok_ids[p.tok_i] != .r_paren or ate_extra_colon)) {
4157 try p.errExtra(.expected_token, p.tok_i, .{ .tok_id = .{ .actual = p.tok_ids[p.tok_i], .expected = .r_paren } });
4823 try p.err(p.tok_i, .expected_token, .{ Tree.Token.Id.r_paren, p.tok_ids[p.tok_i] });
41584824 return error.ParsingFailed;
41594825 }
41604826
......@@ -4166,7 +4832,7 @@ fn gnuAsmStmt(p: *Parser, quals: Tree.GNUAssemblyQualifiers, asm_tok: TokenIndex
41664832 }
41674833 while (true) {
41684834 const ident = (try p.eatIdentifier()) orelse {
4169 try p.err(.expected_identifier);
4835 try p.err(p.tok_i, .expected_identifier, .{});
41704836 return error.ParsingFailed;
41714837 };
41724838 const ident_str = p.tokSlice(ident);
......@@ -4176,15 +4842,11 @@ fn gnuAsmStmt(p: *Parser, quals: Tree.GNUAssemblyQualifiers, asm_tok: TokenIndex
41764842 };
41774843 try names.append(ident);
41784844
4179 const elem_ty = try p.arena.create(Type);
4180 elem_ty.* = .{ .specifier = .void };
4181 const result_ty = Type{ .specifier = .pointer, .data = .{ .sub_type = elem_ty } };
4182
41834845 const label_addr_node = try p.addNode(.{
4184 .tag = .addr_of_label,
4185 .data = .{ .decl_ref = label },
4186 .ty = result_ty,
4187 .loc = @enumFromInt(ident),
4846 .addr_of_label = .{
4847 .label_tok = label,
4848 .qt = .void_pointer,
4849 },
41884850 });
41894851 try exprs.append(label_addr_node);
41904852
......@@ -4192,12 +4854,15 @@ fn gnuAsmStmt(p: *Parser, quals: Tree.GNUAssemblyQualifiers, asm_tok: TokenIndex
41924854 if (p.eatToken(.comma) == null) break;
41934855 }
41944856 } else if (quals.goto) {
4195 try p.errExtra(.expected_token, p.tok_i, .{ .tok_id = .{ .actual = p.tok_ids[p.tok_i], .expected = .colon } });
4857 try p.err(p.tok_i, .expected_token, .{ Token.Id.colon, p.tok_ids[p.tok_i] });
41964858 return error.ParsingFailed;
41974859 }
41984860
41994861 // TODO: validate and insert into AST
4200 return .none;
4862 return p.addNode(.{ .null_stmt = .{
4863 .semicolon_or_r_brace_tok = asm_tok,
4864 .qt = .void,
4865 } });
42014866}
42024867
42034868fn checkAsmStr(p: *Parser, asm_str: Value, tok: TokenIndex) !void {
......@@ -4205,7 +4870,7 @@ fn checkAsmStr(p: *Parser, asm_str: Value, tok: TokenIndex) !void {
42054870 const str = p.comp.interner.get(asm_str.ref()).bytes;
42064871 if (str.len > 1) {
42074872 // Empty string (just a NUL byte) is ok because it does not emit any assembly
4208 try p.errTok(.gnu_asm_disabled, tok);
4873 try p.err(tok, .gnu_asm_disabled, .{});
42094874 }
42104875 }
42114876}
......@@ -4214,11 +4879,11 @@ fn checkAsmStr(p: *Parser, asm_str: Value, tok: TokenIndex) !void {
42144879/// : keyword_asm asmQual* '(' asmStr ')'
42154880/// | keyword_asm asmQual* '(' gnuAsmStmt ')'
42164881/// | keyword_asm msvcAsmStmt
4217fn assembly(p: *Parser, kind: enum { global, decl_label, stmt }) Error!?NodeIndex {
4882fn assembly(p: *Parser, kind: enum { global, decl_label, stmt }) Error!?Node.Index {
42184883 const asm_tok = p.tok_i;
42194884 switch (p.tok_ids[p.tok_i]) {
42204885 .keyword_asm => {
4221 try p.err(.extension_token_used);
4886 try p.err(p.tok_i, .extension_token_used, .{});
42224887 p.tok_i += 1;
42234888 },
42244889 .keyword_asm1, .keyword_asm2 => p.tok_i += 1,
......@@ -4232,25 +4897,25 @@ fn assembly(p: *Parser, kind: enum { global, decl_label, stmt }) Error!?NodeInde
42324897 var quals: Tree.GNUAssemblyQualifiers = .{};
42334898 while (true) : (p.tok_i += 1) switch (p.tok_ids[p.tok_i]) {
42344899 .keyword_volatile, .keyword_volatile1, .keyword_volatile2 => {
4235 if (kind != .stmt) try p.errStr(.meaningless_asm_qual, p.tok_i, "volatile");
4236 if (quals.@"volatile") try p.errStr(.duplicate_asm_qual, p.tok_i, "volatile");
4900 if (kind != .stmt) try p.err(p.tok_i, .meaningless_asm_qual, .{"volatile"});
4901 if (quals.@"volatile") try p.err(p.tok_i, .duplicate_asm_qual, .{"volatile"});
42374902 quals.@"volatile" = true;
42384903 },
42394904 .keyword_inline, .keyword_inline1, .keyword_inline2 => {
4240 if (kind != .stmt) try p.errStr(.meaningless_asm_qual, p.tok_i, "inline");
4241 if (quals.@"inline") try p.errStr(.duplicate_asm_qual, p.tok_i, "inline");
4905 if (kind != .stmt) try p.err(p.tok_i, .meaningless_asm_qual, .{"inline"});
4906 if (quals.@"inline") try p.err(p.tok_i, .duplicate_asm_qual, .{"inline"});
42424907 quals.@"inline" = true;
42434908 },
42444909 .keyword_goto => {
4245 if (kind != .stmt) try p.errStr(.meaningless_asm_qual, p.tok_i, "goto");
4246 if (quals.goto) try p.errStr(.duplicate_asm_qual, p.tok_i, "goto");
4910 if (kind != .stmt) try p.err(p.tok_i, .meaningless_asm_qual, .{"goto"});
4911 if (quals.goto) try p.err(p.tok_i, .duplicate_asm_qual, .{"goto"});
42474912 quals.goto = true;
42484913 },
42494914 else => break,
42504915 };
42514916
42524917 const l_paren = try p.expectToken(.l_paren);
4253 var result_node: NodeIndex = .none;
4918 var result_node: ?Node.Index = null;
42544919 switch (kind) {
42554920 .decl_label => {
42564921 const asm_str = try p.asmStr();
......@@ -4263,10 +4928,10 @@ fn assembly(p: *Parser, kind: enum { global, decl_label, stmt }) Error!?NodeInde
42634928 const asm_str = try p.asmStr();
42644929 try p.checkAsmStr(asm_str.val, l_paren);
42654930 result_node = try p.addNode(.{
4266 .tag = .file_scope_asm,
4267 .ty = .{ .specifier = .void },
4268 .data = .{ .decl = .{ .name = asm_tok, .node = asm_str.node } },
4269 .loc = @enumFromInt(asm_tok),
4931 .global_asm = .{
4932 .asm_tok = asm_tok,
4933 .asm_str = asm_str.node,
4934 },
42704935 });
42714936 },
42724937 .stmt => result_node = try p.gnuAsmStmt(quals, asm_tok, l_paren),
......@@ -4283,22 +4948,22 @@ fn asmStr(p: *Parser) Error!Result {
42834948 while (true) : (i += 1) switch (p.tok_ids[i]) {
42844949 .string_literal, .unterminated_string_literal => {},
42854950 .string_literal_utf_16, .string_literal_utf_8, .string_literal_utf_32 => {
4286 try p.errStr(.invalid_asm_str, p.tok_i, "unicode");
4951 try p.err(p.tok_i, .invalid_asm_str, .{"unicode"});
42874952 return error.ParsingFailed;
42884953 },
42894954 .string_literal_wide => {
4290 try p.errStr(.invalid_asm_str, p.tok_i, "wide");
4955 try p.err(p.tok_i, .invalid_asm_str, .{"wide"});
42914956 return error.ParsingFailed;
42924957 },
42934958 else => {
42944959 if (i == p.tok_i) {
4295 try p.errStr(.expected_str_literal_in, p.tok_i, "asm");
4960 try p.err(p.tok_i, .expected_str_literal_in, .{"asm"});
42964961 return error.ParsingFailed;
42974962 }
42984963 break;
42994964 },
43004965 };
4301 return try p.stringLiteral();
4966 return p.stringLiteral();
43024967}
43034968
43044969// ====== statements ======
......@@ -4317,54 +4982,62 @@ fn asmStr(p: *Parser) Error!Result {
43174982/// | keyword_return expr? ';'
43184983/// | assembly ';'
43194984/// | expr? ';'
4320fn stmt(p: *Parser) Error!NodeIndex {
4985fn stmt(p: *Parser) Error!Node.Index {
43214986 if (try p.labeledStmt()) |some| return some;
43224987 if (try p.compoundStmt(false, null)) |some| return some;
43234988 if (p.eatToken(.keyword_if)) |kw_if| {
43244989 const l_paren = try p.expectToken(.l_paren);
4990
43254991 const cond_tok = p.tok_i;
4326 var cond = try p.expr();
4327 try cond.expect(p);
4328 try cond.lvalConversion(p);
4992 var cond = try p.expect(expr);
4993 try cond.lvalConversion(p, cond_tok);
43294994 try cond.usualUnaryConversion(p, cond_tok);
4330 if (!cond.ty.isScalar())
4331 try p.errStr(.statement_scalar, l_paren + 1, try p.typeStr(cond.ty));
4995 if (!cond.qt.isInvalid() and cond.qt.scalarKind(p.comp) == .none)
4996 try p.err(l_paren + 1, .statement_scalar, .{cond.qt});
43324997 try cond.saveValue(p);
4998
43334999 try p.expectClosing(l_paren, .r_paren);
43345000
4335 const then = try p.stmt();
4336 const @"else" = if (p.eatToken(.keyword_else)) |_| try p.stmt() else .none;
5001 const then_body = try p.stmt();
5002 const else_body = if (p.eatToken(.keyword_else)) |_| try p.stmt() else null;
43375003
4338 if (then != .none and @"else" != .none)
4339 return try p.addNode(.{
4340 .tag = .if_then_else_stmt,
4341 .data = .{ .if3 = .{ .cond = cond.node, .body = (try p.addList(&.{ then, @"else" })).start } },
4342 .loc = @enumFromInt(kw_if),
4343 })
4344 else
4345 return try p.addNode(.{
4346 .tag = .if_then_stmt,
4347 .data = .{ .bin = .{ .lhs = cond.node, .rhs = then } },
4348 .loc = @enumFromInt(kw_if),
4349 });
5004 if (p.nodeIs(then_body, .null_stmt) and else_body == null) {
5005 const semicolon_tok = then_body.get(&p.tree).null_stmt.semicolon_or_r_brace_tok;
5006 const locs = p.pp.tokens.items(.loc);
5007 const if_loc = locs[kw_if];
5008 const semicolon_loc = locs[semicolon_tok];
5009 if (if_loc.line == semicolon_loc.line) {
5010 try p.err(semicolon_tok, .empty_if_body, .{});
5011 try p.err(semicolon_tok, .empty_if_body_note, .{});
5012 }
5013 }
5014
5015 return p.addNode(.{ .if_stmt = .{
5016 .if_tok = kw_if,
5017 .cond = cond.node,
5018 .then_body = then_body,
5019 .else_body = else_body,
5020 } });
43505021 }
43515022 if (p.eatToken(.keyword_switch)) |kw_switch| {
43525023 const l_paren = try p.expectToken(.l_paren);
43535024 const cond_tok = p.tok_i;
4354 var cond = try p.expr();
4355 try cond.expect(p);
4356 try cond.lvalConversion(p);
5025 var cond = try p.expect(expr);
5026 try cond.lvalConversion(p, cond_tok);
43575027 try cond.usualUnaryConversion(p, cond_tok);
43585028
4359 if (!cond.ty.isInt())
4360 try p.errStr(.statement_int, l_paren + 1, try p.typeStr(cond.ty));
5029 // Switch condition can't be complex.
5030 if (!cond.qt.isInvalid() and !cond.qt.isRealInt(p.comp)) {
5031 try p.err(l_paren + 1, .statement_int, .{cond.qt});
5032 }
5033
43615034 try cond.saveValue(p);
43625035 try p.expectClosing(l_paren, .r_paren);
43635036
43645037 const old_switch = p.@"switch";
43655038 var @"switch" = Switch{
43665039 .ranges = std.array_list.Managed(Switch.Range).init(p.gpa),
4367 .ty = cond.ty,
5040 .qt = cond.qt,
43685041 .comp = p.comp,
43695042 };
43705043 p.@"switch" = &@"switch";
......@@ -4375,22 +5048,23 @@ fn stmt(p: *Parser) Error!NodeIndex {
43755048
43765049 const body = try p.stmt();
43775050
4378 return try p.addNode(.{
4379 .tag = .switch_stmt,
4380 .data = .{ .bin = .{ .lhs = cond.node, .rhs = body } },
4381 .loc = @enumFromInt(kw_switch),
4382 });
5051 return p.addNode(.{ .switch_stmt = .{
5052 .switch_tok = kw_switch,
5053 .cond = cond.node,
5054 .body = body,
5055 } });
43835056 }
43845057 if (p.eatToken(.keyword_while)) |kw_while| {
43855058 const l_paren = try p.expectToken(.l_paren);
5059
43865060 const cond_tok = p.tok_i;
4387 var cond = try p.expr();
4388 try cond.expect(p);
4389 try cond.lvalConversion(p);
5061 var cond = try p.expect(expr);
5062 try cond.lvalConversion(p, cond_tok);
43905063 try cond.usualUnaryConversion(p, cond_tok);
4391 if (!cond.ty.isScalar())
4392 try p.errStr(.statement_scalar, l_paren + 1, try p.typeStr(cond.ty));
5064 if (!cond.qt.isInvalid() and cond.qt.scalarKind(p.comp) == .none)
5065 try p.err(l_paren + 1, .statement_scalar, .{cond.qt});
43935066 try cond.saveValue(p);
5067
43945068 try p.expectClosing(l_paren, .r_paren);
43955069
43965070 const body = body: {
......@@ -4400,11 +5074,11 @@ fn stmt(p: *Parser) Error!NodeIndex {
44005074 break :body try p.stmt();
44015075 };
44025076
4403 return try p.addNode(.{
4404 .tag = .while_stmt,
4405 .data = .{ .bin = .{ .lhs = cond.node, .rhs = body } },
4406 .loc = @enumFromInt(kw_while),
4407 });
5077 return p.addNode(.{ .while_stmt = .{
5078 .while_tok = kw_while,
5079 .cond = cond.node,
5080 .body = body,
5081 } });
44085082 }
44095083 if (p.eatToken(.keyword_do)) |kw_do| {
44105084 const body = body: {
......@@ -4416,23 +5090,24 @@ fn stmt(p: *Parser) Error!NodeIndex {
44165090
44175091 _ = try p.expectToken(.keyword_while);
44185092 const l_paren = try p.expectToken(.l_paren);
5093
44195094 const cond_tok = p.tok_i;
4420 var cond = try p.expr();
4421 try cond.expect(p);
4422 try cond.lvalConversion(p);
5095 var cond = try p.expect(expr);
5096 try cond.lvalConversion(p, cond_tok);
44235097 try cond.usualUnaryConversion(p, cond_tok);
44245098
4425 if (!cond.ty.isScalar())
4426 try p.errStr(.statement_scalar, l_paren + 1, try p.typeStr(cond.ty));
5099 if (!cond.qt.isInvalid() and cond.qt.scalarKind(p.comp) == .none)
5100 try p.err(l_paren + 1, .statement_scalar, .{cond.qt});
44275101 try cond.saveValue(p);
44285102 try p.expectClosing(l_paren, .r_paren);
44295103
44305104 _ = try p.expectToken(.semicolon);
4431 return try p.addNode(.{
4432 .tag = .do_while_stmt,
4433 .data = .{ .bin = .{ .lhs = cond.node, .rhs = body } },
4434 .loc = @enumFromInt(kw_do),
4435 });
5105
5106 return p.addNode(.{ .do_while_stmt = .{
5107 .do_tok = kw_do,
5108 .cond = cond.node,
5109 .body = body,
5110 } });
44365111 }
44375112 if (p.eatToken(.keyword_for)) |kw_for| {
44385113 try p.syms.pushScope(p);
......@@ -4445,30 +5120,41 @@ fn stmt(p: *Parser) Error!NodeIndex {
44455120
44465121 // for (init
44475122 const init_start = p.tok_i;
4448 var err_start = p.comp.diagnostics.list.items.len;
4449 var init = if (!got_decl) try p.expr() else Result{};
4450 try init.saveValue(p);
4451 try init.maybeWarnUnused(p, init_start, err_start);
5123 var prev_total = p.diagnostics.total;
5124 const init = init: {
5125 if (got_decl) break :init null;
5126 var init = (try p.expr()) orelse break :init null;
5127
5128 try init.saveValue(p);
5129 try init.maybeWarnUnused(p, init_start, prev_total);
5130 break :init init.node;
5131 };
44525132 if (!got_decl) _ = try p.expectToken(.semicolon);
44535133
44545134 // for (init; cond
4455 const cond_tok = p.tok_i;
4456 var cond = try p.expr();
4457 if (cond.node != .none) {
4458 try cond.lvalConversion(p);
5135 const cond = cond: {
5136 const cond_tok = p.tok_i;
5137 var cond = (try p.expr()) orelse break :cond null;
5138
5139 try cond.lvalConversion(p, cond_tok);
44595140 try cond.usualUnaryConversion(p, cond_tok);
4460 if (!cond.ty.isScalar())
4461 try p.errStr(.statement_scalar, l_paren + 1, try p.typeStr(cond.ty));
4462 }
4463 try cond.saveValue(p);
5141 if (!cond.qt.isInvalid() and cond.qt.scalarKind(p.comp) == .none)
5142 try p.err(l_paren + 1, .statement_scalar, .{cond.qt});
5143 try cond.saveValue(p);
5144 break :cond cond.node;
5145 };
44645146 _ = try p.expectToken(.semicolon);
44655147
44665148 // for (init; cond; incr
44675149 const incr_start = p.tok_i;
4468 err_start = p.comp.diagnostics.list.items.len;
4469 var incr = try p.expr();
4470 try incr.maybeWarnUnused(p, incr_start, err_start);
4471 try incr.saveValue(p);
5150 prev_total = p.diagnostics.total;
5151 const incr = incr: {
5152 var incr = (try p.expr()) orelse break :incr null;
5153
5154 try incr.maybeWarnUnused(p, incr_start, prev_total);
5155 try incr.saveValue(p);
5156 break :incr incr.node;
5157 };
44725158 try p.expectClosing(l_paren, .r_paren);
44735159
44745160 const body = body: {
......@@ -4478,59 +5164,42 @@ fn stmt(p: *Parser) Error!NodeIndex {
44785164 break :body try p.stmt();
44795165 };
44805166
4481 if (got_decl) {
4482 const start = (try p.addList(p.decl_buf.items[decl_buf_top..])).start;
4483 const end = (try p.addList(&.{ cond.node, incr.node, body })).end;
4484
4485 return try p.addNode(.{
4486 .tag = .for_decl_stmt,
4487 .data = .{ .range = .{ .start = start, .end = end } },
4488 .loc = @enumFromInt(kw_for),
4489 });
4490 } else if (init.node == .none and cond.node == .none and incr.node == .none) {
4491 return try p.addNode(.{
4492 .tag = .forever_stmt,
4493 .data = .{ .un = body },
4494 .loc = @enumFromInt(kw_for),
4495 });
4496 } else return try p.addNode(.{
4497 .tag = .for_stmt,
4498 .data = .{ .if3 = .{
4499 .cond = body,
4500 .body = (try p.addList(&.{ init.node, cond.node, incr.node })).start,
4501 } },
4502 .loc = @enumFromInt(kw_for),
4503 });
5167 return p.addNode(.{ .for_stmt = .{
5168 .for_tok = kw_for,
5169 .init = if (decl_buf_top == p.decl_buf.items.len)
5170 .{ .expr = init }
5171 else
5172 .{ .decls = p.decl_buf.items[decl_buf_top..] },
5173 .cond = cond,
5174 .incr = incr,
5175 .body = body,
5176 } });
45045177 }
45055178 if (p.eatToken(.keyword_goto)) |goto_tok| {
45065179 if (p.eatToken(.asterisk)) |_| {
45075180 const expr_tok = p.tok_i;
4508 var e = try p.expr();
4509 try e.expect(p);
4510 try e.lvalConversion(p);
5181 var goto_expr = try p.expect(expr);
5182 try goto_expr.lvalConversion(p, expr_tok);
45115183 p.computed_goto_tok = p.computed_goto_tok orelse goto_tok;
4512 if (!e.ty.isPtr()) {
4513 const elem_ty = try p.arena.create(Type);
4514 elem_ty.* = .{ .specifier = .void, .qual = .{ .@"const" = true } };
4515 const result_ty = Type{
4516 .specifier = .pointer,
4517 .data = .{ .sub_type = elem_ty },
4518 };
4519 if (!e.ty.isInt()) {
4520 try p.errStr(.incompatible_arg, expr_tok, try p.typePairStrExtra(e.ty, " to parameter of incompatible type ", result_ty));
5184
5185 if (!goto_expr.qt.isInvalid() and !goto_expr.qt.isPointer(p.comp)) {
5186 const result_qt = try p.comp.type_store.put(p.gpa, .{ .pointer = .{
5187 .child = .{ .@"const" = true, ._index = .void },
5188 .decayed = null,
5189 } });
5190 if (!goto_expr.qt.isRealInt(p.comp)) {
5191 try p.err(expr_tok, .incompatible_arg, .{ goto_expr.qt, result_qt });
45215192 return error.ParsingFailed;
45225193 }
4523 if (e.val.isZero(p.comp)) {
4524 try e.nullCast(p, result_ty);
5194 if (goto_expr.val.isZero(p.comp)) {
5195 try goto_expr.nullToPointer(p, result_qt, expr_tok);
45255196 } else {
4526 try p.errStr(.implicit_int_to_ptr, expr_tok, try p.typePairStrExtra(e.ty, " to ", result_ty));
4527 try e.ptrCast(p, result_ty);
5197 try p.err(expr_tok, .implicit_int_to_ptr, .{ goto_expr.qt, result_qt });
5198 try goto_expr.castToPointer(p, result_qt, expr_tok);
45285199 }
45295200 }
45305201
4531 try e.un(p, .computed_goto_stmt, goto_tok);
4532 _ = try p.expectToken(.semicolon);
4533 return e.node;
5202 return p.addNode(.{ .computed_goto_stmt = .{ .goto_tok = goto_tok, .expr = goto_expr.node } });
45345203 }
45355204 const name_tok = try p.expectIdentifier();
45365205 const str = p.tokSlice(name_tok);
......@@ -4538,33 +5207,28 @@ fn stmt(p: *Parser) Error!NodeIndex {
45385207 try p.labels.append(.{ .unresolved_goto = name_tok });
45395208 }
45405209 _ = try p.expectToken(.semicolon);
4541 return try p.addNode(.{
4542 .tag = .goto_stmt,
4543 .data = .{ .decl_ref = name_tok },
4544 .loc = @enumFromInt(goto_tok),
4545 });
5210 return p.addNode(.{ .goto_stmt = .{ .label_tok = name_tok } });
45465211 }
45475212 if (p.eatToken(.keyword_continue)) |cont| {
4548 if (!p.in_loop) try p.errTok(.continue_not_in_loop, cont);
5213 if (!p.in_loop) try p.err(cont, .continue_not_in_loop, .{});
45495214 _ = try p.expectToken(.semicolon);
4550 return try p.addNode(.{ .tag = .continue_stmt, .data = undefined, .loc = @enumFromInt(cont) });
5215 return p.addNode(.{ .continue_stmt = .{ .continue_tok = cont } });
45515216 }
45525217 if (p.eatToken(.keyword_break)) |br| {
4553 if (!p.in_loop and p.@"switch" == null) try p.errTok(.break_not_in_loop_or_switch, br);
5218 if (!p.in_loop and p.@"switch" == null) try p.err(br, .break_not_in_loop_or_switch, .{});
45545219 _ = try p.expectToken(.semicolon);
4555 return try p.addNode(.{ .tag = .break_stmt, .data = undefined, .loc = @enumFromInt(br) });
5220 return p.addNode(.{ .break_stmt = .{ .break_tok = br } });
45565221 }
45575222 if (try p.returnStmt()) |some| return some;
45585223 if (try p.assembly(.stmt)) |some| return some;
45595224
45605225 const expr_start = p.tok_i;
4561 const err_start = p.comp.diagnostics.list.items.len;
5226 const prev_total = p.diagnostics.total;
45625227
4563 const e = try p.expr();
4564 if (e.node != .none) {
5228 if (try p.expr()) |some| {
45655229 _ = try p.expectToken(.semicolon);
4566 try e.maybeWarnUnused(p, expr_start, err_start);
4567 return e.node;
5230 try some.maybeWarnUnused(p, expr_start, prev_total);
5231 return some.node;
45685232 }
45695233
45705234 const attr_buf_top = p.attr_buf.len;
......@@ -4572,12 +5236,13 @@ fn stmt(p: *Parser) Error!NodeIndex {
45725236 try p.attributeSpecifier();
45735237
45745238 if (p.eatToken(.semicolon)) |semicolon| {
4575 var null_node: Tree.Node = .{ .tag = .null_stmt, .data = undefined, .loc = @enumFromInt(semicolon) };
4576 null_node.ty = try Attribute.applyStatementAttributes(p, null_node.ty, expr_start, attr_buf_top);
4577 return p.addNode(null_node);
5239 return p.addNode(.{ .null_stmt = .{
5240 .semicolon_or_r_brace_tok = semicolon,
5241 .qt = try Attribute.applyStatementAttributes(p, expr_start, attr_buf_top),
5242 } });
45785243 }
45795244
4580 try p.err(.expected_stmt);
5245 try p.err(p.tok_i, .expected_stmt, .{});
45815246 return error.ParsingFailed;
45825247}
45835248
......@@ -4585,13 +5250,13 @@ fn stmt(p: *Parser) Error!NodeIndex {
45855250/// : IDENTIFIER ':' stmt
45865251/// | keyword_case integerConstExpr ':' stmt
45875252/// | keyword_default ':' stmt
4588fn labeledStmt(p: *Parser) Error!?NodeIndex {
5253fn labeledStmt(p: *Parser) Error!?Node.Index {
45895254 if ((p.tok_ids[p.tok_i] == .identifier or p.tok_ids[p.tok_i] == .extended_identifier) and p.tok_ids[p.tok_i + 1] == .colon) {
45905255 const name_tok = try p.expectIdentifier();
45915256 const str = p.tokSlice(name_tok);
45925257 if (p.findLabel(str)) |some| {
4593 try p.errStr(.duplicate_label, name_tok, str);
4594 try p.errStr(.previous_label, some, str);
5258 try p.err(name_tok, .duplicate_label, .{str});
5259 try p.err(some, .previous_label, .{str});
45955260 } else {
45965261 p.label_count += 1;
45975262 try p.labels.append(.{ .label = name_tok });
......@@ -4610,73 +5275,74 @@ fn labeledStmt(p: *Parser) Error!?NodeIndex {
46105275 defer p.attr_buf.len = attr_buf_top;
46115276 try p.attributeSpecifier();
46125277
4613 var labeled_stmt = Tree.Node{
4614 .tag = .labeled_stmt,
4615 .data = .{ .decl = .{ .name = name_tok, .node = try p.labelableStmt() } },
4616 .loc = @enumFromInt(name_tok),
4617 };
4618 labeled_stmt.ty = try Attribute.applyLabelAttributes(p, labeled_stmt.ty, attr_buf_top);
4619 return try p.addNode(labeled_stmt);
5278 return try p.addNode(.{ .labeled_stmt = .{
5279 .qt = try Attribute.applyLabelAttributes(p, attr_buf_top),
5280 .body = try p.labelableStmt(),
5281 .label_tok = name_tok,
5282 } });
46205283 } else if (p.eatToken(.keyword_case)) |case| {
4621 const first_item = try p.integerConstExpr(.gnu_folding_extension);
5284 var first_item = try p.integerConstExpr(.gnu_folding_extension);
46225285 const ellipsis = p.tok_i;
4623 const second_item = if (p.eatToken(.ellipsis) != null) blk: {
4624 try p.errTok(.gnu_switch_range, ellipsis);
5286 var second_item = if (p.eatToken(.ellipsis) != null) blk: {
5287 try p.err(ellipsis, .gnu_switch_range, .{});
46255288 break :blk try p.integerConstExpr(.gnu_folding_extension);
46265289 } else null;
46275290 _ = try p.expectToken(.colon);
46285291
4629 if (p.@"switch") |some| check: {
4630 if (some.ty.hasIncompleteSize()) break :check; // error already reported for incomplete size
5292 if (p.@"switch") |@"switch"| check: {
5293 if (@"switch".qt.hasIncompleteSize(p.comp)) break :check; // error already reported for incomplete size
5294
5295 // Coerce to switch condition type
5296 try first_item.coerce(p, @"switch".qt, case + 1, .assign);
5297 try first_item.putValue(p);
5298 if (second_item) |*item| {
5299 try item.coerce(p, @"switch".qt, ellipsis + 1, .assign);
5300 try item.putValue(p);
5301 }
46315302
46325303 const first = first_item.val;
46335304 const last = if (second_item) |second| second.val else first;
46345305 if (first.opt_ref == .none) {
4635 try p.errTok(.case_val_unavailable, case + 1);
5306 try p.err(case + 1, .case_val_unavailable, .{});
46365307 break :check;
46375308 } else if (last.opt_ref == .none) {
4638 try p.errTok(.case_val_unavailable, ellipsis + 1);
5309 try p.err(ellipsis + 1, .case_val_unavailable, .{});
46395310 break :check;
46405311 } else if (last.compare(.lt, first, p.comp)) {
4641 try p.errTok(.empty_case_range, case + 1);
5312 try p.err(case + 1, .empty_case_range, .{});
46425313 break :check;
46435314 }
46445315
46455316 // TODO cast to target type
4646 const prev = (try some.add(first, last, case + 1)) orelse break :check;
5317 const prev = (try @"switch".add(first, last, case + 1)) orelse break :check;
46475318
46485319 // TODO check which value was already handled
4649 try p.errStr(.duplicate_switch_case, case + 1, try first_item.str(p));
4650 try p.errTok(.previous_case, prev.tok);
5320 try p.err(case + 1, .duplicate_switch_case, .{first_item});
5321 try p.err(prev.tok, .previous_case, .{});
46515322 } else {
4652 try p.errStr(.case_not_in_switch, case, "case");
4653 }
4654
4655 const s = try p.labelableStmt();
4656 if (second_item) |some| return try p.addNode(.{
4657 .tag = .case_range_stmt,
4658 .data = .{ .if3 = .{ .cond = s, .body = (try p.addList(&.{ first_item.node, some.node })).start } },
4659 .loc = @enumFromInt(case),
4660 }) else return try p.addNode(.{
4661 .tag = .case_stmt,
4662 .data = .{ .bin = .{ .lhs = first_item.node, .rhs = s } },
4663 .loc = @enumFromInt(case),
4664 });
5323 try p.err(case, .case_not_in_switch, .{"case"});
5324 }
5325
5326 return try p.addNode(.{ .case_stmt = .{
5327 .case_tok = case,
5328 .start = first_item.node,
5329 .end = if (second_item) |some| some.node else null,
5330 .body = try p.labelableStmt(),
5331 } });
46655332 } else if (p.eatToken(.keyword_default)) |default| {
46665333 _ = try p.expectToken(.colon);
4667 const s = try p.labelableStmt();
4668 const node = try p.addNode(.{
4669 .tag = .default_stmt,
4670 .data = .{ .un = s },
4671 .loc = @enumFromInt(default),
4672 });
5334 const node = try p.addNode(.{ .default_stmt = .{
5335 .default_tok = default,
5336 .body = try p.labelableStmt(),
5337 } });
5338
46735339 const @"switch" = p.@"switch" orelse {
4674 try p.errStr(.case_not_in_switch, default, "default");
5340 try p.err(default, .case_not_in_switch, .{"default"});
46755341 return node;
46765342 };
46775343 if (@"switch".default) |previous| {
4678 try p.errTok(.multiple_default, default);
4679 try p.errTok(.previous_case, previous);
5344 try p.err(default, .multiple_default, .{});
5345 try p.err(previous, .previous_case, .{});
46805346 } else {
46815347 @"switch".default = default;
46825348 }
......@@ -4684,21 +5350,24 @@ fn labeledStmt(p: *Parser) Error!?NodeIndex {
46845350 } else return null;
46855351}
46865352
4687fn labelableStmt(p: *Parser) Error!NodeIndex {
5353fn labelableStmt(p: *Parser) Error!Node.Index {
46885354 if (p.tok_ids[p.tok_i] == .r_brace) {
4689 try p.err(.label_compound_end);
4690 return p.addNode(.{ .tag = .null_stmt, .data = undefined, .loc = @enumFromInt(p.tok_i) });
5355 try p.err(p.tok_i, .label_compound_end, .{});
5356 return p.addNode(.{ .null_stmt = .{
5357 .semicolon_or_r_brace_tok = p.tok_i,
5358 .qt = .void,
5359 } });
46915360 }
46925361 return p.stmt();
46935362}
46945363
46955364const StmtExprState = struct {
46965365 last_expr_tok: TokenIndex = 0,
4697 last_expr_res: Result = .{ .ty = .{ .specifier = .void } },
5366 last_expr_qt: QualType = .void,
46985367};
46995368
47005369/// compoundStmt : '{' ( decl | keyword_extension decl | staticAssert | stmt)* '}'
4701fn compoundStmt(p: *Parser, is_fn_body: bool, stmt_expr_state: ?*StmtExprState) Error!?NodeIndex {
5370fn compoundStmt(p: *Parser, is_fn_body: bool, stmt_expr_state: ?*StmtExprState) Error!?Node.Index {
47025371 const l_brace = p.eatToken(.l_brace) orelse return null;
47035372
47045373 const decl_buf_top = p.decl_buf.items.len;
......@@ -4731,14 +5400,10 @@ fn compoundStmt(p: *Parser, is_fn_body: bool, stmt_expr_state: ?*StmtExprState)
47315400 },
47325401 else => |e| return e,
47335402 };
4734 if (s == .none) continue;
47355403 if (stmt_expr_state) |state| {
47365404 state.* = .{
47375405 .last_expr_tok = stmt_tok,
4738 .last_expr_res = .{
4739 .node = s,
4740 .ty = p.nodes.items(.ty)[@intFromEnum(s)],
4741 },
5406 .last_expr_qt = s.qt(&p.tree),
47425407 };
47435408 }
47445409 try p.decl_buf.append(s);
......@@ -4747,7 +5412,7 @@ fn compoundStmt(p: *Parser, is_fn_body: bool, stmt_expr_state: ?*StmtExprState)
47475412 noreturn_index = p.tok_i;
47485413 noreturn_label_count = p.label_count;
47495414 }
4750 switch (p.nodes.items(.tag)[@intFromEnum(s)]) {
5415 switch (s.get(&p.tree)) {
47515416 .case_stmt, .default_stmt, .labeled_stmt => noreturn_index = null,
47525417 else => {},
47535418 }
......@@ -4756,7 +5421,7 @@ fn compoundStmt(p: *Parser, is_fn_body: bool, stmt_expr_state: ?*StmtExprState)
47565421
47575422 if (noreturn_index) |some| {
47585423 // if new labels were defined we cannot be certain that the code is unreachable
4759 if (some != p.tok_i - 1 and noreturn_label_count == p.label_count) try p.errTok(.unreachable_code, some);
5424 if (some != p.tok_i - 1 and noreturn_label_count == p.label_count) try p.err(some, .unreachable_code, .{});
47605425 }
47615426 if (is_fn_body) {
47625427 const last_noreturn = if (p.decl_buf.items.len == decl_buf_top)
......@@ -4764,82 +5429,84 @@ fn compoundStmt(p: *Parser, is_fn_body: bool, stmt_expr_state: ?*StmtExprState)
47645429 else
47655430 p.nodeIsNoreturn(p.decl_buf.items[p.decl_buf.items.len - 1]);
47665431
4767 if (last_noreturn != .yes) {
4768 const ret_ty = p.func.ty.?.returnType();
5432 const ret_qt: QualType = if (p.func.qt.?.get(p.comp, .func)) |func_ty| func_ty.return_type else .invalid;
5433 if (last_noreturn != .yes and !ret_qt.isInvalid()) {
47695434 var return_zero = false;
4770 if (last_noreturn == .no and !ret_ty.is(.void) and !ret_ty.isFunc() and !ret_ty.isArray()) {
4771 const func_name = p.tokSlice(p.func.name);
4772 const interned_name = try StrInt.intern(p.comp, func_name);
4773 if (interned_name == p.string_ids.main_id and ret_ty.is(.int)) {
4774 return_zero = true;
4775 } else {
4776 try p.errStr(.func_does_not_return, p.tok_i - 1, func_name);
4777 }
4778 }
4779 try p.decl_buf.append(try p.addNode(.{ .tag = .implicit_return, .ty = p.func.ty.?.returnType(), .data = .{ .return_zero = return_zero }, .loc = @enumFromInt(r_brace) }));
5435 if (last_noreturn == .no) switch (ret_qt.base(p.comp).type) {
5436 .void => {},
5437 .func, .array => {}, // Invalid, error reported elsewhere
5438 else => {
5439 const func_name = p.tokSlice(p.func.name);
5440 const interned_name = try p.comp.internString(func_name);
5441
5442 if (interned_name == p.string_ids.main_id) {
5443 if (ret_qt.get(p.comp, .int)) |int_ty| {
5444 if (int_ty == .int) return_zero = true;
5445 }
5446 }
5447
5448 if (!return_zero) {
5449 try p.err(p.tok_i - 1, .func_does_not_return, .{func_name});
5450 }
5451 },
5452 };
5453
5454 const implicit_ret = try p.addNode(.{ .return_stmt = .{
5455 .return_tok = r_brace,
5456 .return_qt = ret_qt,
5457 .operand = .{ .implicit = return_zero },
5458 } });
5459 try p.decl_buf.append(implicit_ret);
47805460 }
47815461 if (p.func.ident) |some| try p.decl_buf.insert(decl_buf_top, some.node);
47825462 if (p.func.pretty_ident) |some| try p.decl_buf.insert(decl_buf_top, some.node);
47835463 }
47845464
4785 var node: Tree.Node = .{
4786 .tag = .compound_stmt_two,
4787 .data = .{ .two = .{ .none, .none } },
4788 .loc = @enumFromInt(l_brace),
4789 };
4790 const statements = p.decl_buf.items[decl_buf_top..];
4791 switch (statements.len) {
4792 0 => {},
4793 1 => node.data = .{ .two = .{ statements[0], .none } },
4794 2 => node.data = .{ .two = .{ statements[0], statements[1] } },
4795 else => {
4796 node.tag = .compound_stmt;
4797 node.data = .{ .range = try p.addList(statements) };
5465 return try p.addNode(.{ .compound_stmt = .{
5466 .body = p.decl_buf.items[decl_buf_top..],
5467 .l_brace_tok = l_brace,
5468 } });
5469}
5470
5471fn pointerValue(p: *Parser, node: Node.Index, offset: Value) !Value {
5472 switch (node.get(&p.tree)) {
5473 .decl_ref_expr => |decl_ref| {
5474 const var_name = try p.comp.internString(p.tokSlice(decl_ref.name_tok));
5475 const sym = p.syms.findSymbol(var_name) orelse return .{};
5476 const sym_node = sym.node.unpack() orelse return .{};
5477 return Value.pointer(.{ .node = @intFromEnum(sym_node), .offset = offset.ref() }, p.comp);
47985478 },
5479 .string_literal_expr => return p.tree.value_map.get(node).?,
5480 else => return .{},
47995481 }
4800 return try p.addNode(node);
48015482}
48025483
48035484const NoreturnKind = enum { no, yes, complex };
48045485
4805fn nodeIsNoreturn(p: *Parser, node: NodeIndex) NoreturnKind {
4806 switch (p.nodes.items(.tag)[@intFromEnum(node)]) {
5486fn nodeIsNoreturn(p: *Parser, node: Node.Index) NoreturnKind {
5487 switch (node.get(&p.tree)) {
48075488 .break_stmt, .continue_stmt, .return_stmt => return .yes,
4808 .if_then_else_stmt => {
4809 const data = p.data.items[p.nodes.items(.data)[@intFromEnum(node)].if3.body..];
4810 const then_type = p.nodeIsNoreturn(data[0]);
4811 const else_type = p.nodeIsNoreturn(data[1]);
5489 .if_stmt => |@"if"| {
5490 const else_type = p.nodeIsNoreturn(@"if".else_body orelse return .no);
5491 const then_type = p.nodeIsNoreturn(@"if".then_body);
48125492 if (then_type == .complex or else_type == .complex) return .complex;
48135493 if (then_type == .yes and else_type == .yes) return .yes;
48145494 return .no;
48155495 },
4816 .compound_stmt_two => {
4817 const data = p.nodes.items(.data)[@intFromEnum(node)];
4818 const lhs_type = if (data.two[0] != .none) p.nodeIsNoreturn(data.two[0]) else .no;
4819 const rhs_type = if (data.two[1] != .none) p.nodeIsNoreturn(data.two[1]) else .no;
4820 if (lhs_type == .complex or rhs_type == .complex) return .complex;
4821 if (lhs_type == .yes or rhs_type == .yes) return .yes;
4822 return .no;
4823 },
4824 .compound_stmt => {
4825 const data = p.nodes.items(.data)[@intFromEnum(node)];
4826 var it = data.range.start;
4827 while (it != data.range.end) : (it += 1) {
4828 const kind = p.nodeIsNoreturn(p.data.items[it]);
5496 .compound_stmt => |compound| {
5497 for (compound.body) |body_stmt| {
5498 const kind = p.nodeIsNoreturn(body_stmt);
48295499 if (kind != .no) return kind;
48305500 }
48315501 return .no;
48325502 },
4833 .labeled_stmt => {
4834 const data = p.nodes.items(.data)[@intFromEnum(node)];
4835 return p.nodeIsNoreturn(data.decl.node);
5503 .labeled_stmt => |labeled| {
5504 return p.nodeIsNoreturn(labeled.body);
48365505 },
4837 .default_stmt => {
4838 const data = p.nodes.items(.data)[@intFromEnum(node)];
4839 if (data.un == .none) return .no;
4840 return p.nodeIsNoreturn(data.un);
5506 .default_stmt => |default| {
5507 return p.nodeIsNoreturn(default.body);
48415508 },
4842 .while_stmt, .do_while_stmt, .for_decl_stmt, .forever_stmt, .for_stmt, .switch_stmt => return .complex,
5509 .while_stmt, .do_while_stmt, .for_stmt, .switch_stmt => return .complex,
48435510 else => return .no,
48445511 }
48455512}
......@@ -4928,61 +5595,63 @@ fn nextStmt(p: *Parser, l_brace: TokenIndex) !void {
49285595 unreachable;
49295596}
49305597
4931fn returnStmt(p: *Parser) Error!?NodeIndex {
5598fn returnStmt(p: *Parser) Error!?Node.Index {
49325599 const ret_tok = p.eatToken(.keyword_return) orelse return null;
49335600
49345601 const e_tok = p.tok_i;
4935 var e = try p.expr();
5602 var ret_expr = try p.expr();
49365603 _ = try p.expectToken(.semicolon);
4937 const ret_ty = p.func.ty.?.returnType();
49385604
4939 if (p.func.ty.?.hasAttribute(.noreturn)) {
4940 try p.errStr(.invalid_noreturn, e_tok, p.tokSlice(p.func.name));
4941 }
5605 const func_qt = p.func.qt.?; // `return` cannot be parsed outside of a function.
5606 const ret_qt: QualType = if (func_qt.get(p.comp, .func)) |func_ty| func_ty.return_type else .invalid;
5607 const ret_void = !ret_qt.isInvalid() and ret_qt.is(p.comp, .void);
49425608
4943 if (e.node == .none) {
4944 if (!ret_ty.is(.void)) try p.errStr(.func_should_return, ret_tok, p.tokSlice(p.func.name));
4945 return try p.addNode(.{ .tag = .return_stmt, .data = .{ .un = e.node }, .loc = @enumFromInt(ret_tok) });
4946 } else if (ret_ty.is(.void)) {
4947 try p.errStr(.void_func_returns_value, e_tok, p.tokSlice(p.func.name));
4948 return try p.addNode(.{ .tag = .return_stmt, .data = .{ .un = e.node }, .loc = @enumFromInt(ret_tok) });
5609 if (func_qt.hasAttribute(p.comp, .noreturn)) {
5610 try p.err(e_tok, .invalid_noreturn, .{p.tokSlice(p.func.name)});
49495611 }
49505612
4951 try e.lvalConversion(p);
4952 try e.coerce(p, ret_ty, e_tok, .ret);
5613 if (ret_expr) |*some| {
5614 if (ret_void) {
5615 try p.err(e_tok, .void_func_returns_value, .{p.tokSlice(p.func.name)});
5616 } else {
5617 try some.coerce(p, ret_qt, e_tok, .ret);
5618
5619 try some.saveValue(p);
5620 }
5621 } else if (!ret_void) {
5622 try p.err(ret_tok, .func_should_return, .{p.tokSlice(p.func.name)});
5623 }
49535624
4954 try e.saveValue(p);
4955 return try p.addNode(.{ .tag = .return_stmt, .data = .{ .un = e.node }, .loc = @enumFromInt(ret_tok) });
5625 return try p.addNode(.{ .return_stmt = .{
5626 .return_tok = ret_tok,
5627 .operand = if (ret_expr) |some| .{ .expr = some.node } else .none,
5628 .return_qt = ret_qt,
5629 } });
49565630}
49575631
49585632// ====== expressions ======
49595633
49605634pub fn macroExpr(p: *Parser) Compilation.Error!bool {
4961 const res = p.condExpr() catch |e| switch (e) {
5635 const res = p.expect(condExpr) catch |e| switch (e) {
49625636 error.OutOfMemory => return error.OutOfMemory,
49635637 error.FatalError => return error.FatalError,
49645638 error.ParsingFailed => return false,
49655639 };
4966 if (res.val.opt_ref == .none) {
4967 try p.errTok(.expected_expr, p.tok_i);
4968 return false;
4969 }
49705640 return res.val.toBool(p.comp);
49715641}
49725642
49735643const CallExpr = union(enum) {
4974 standard: NodeIndex,
5644 standard: Node.Index,
49755645 builtin: struct {
4976 node: NodeIndex,
5646 builtin_tok: TokenIndex,
49775647 tag: Builtin.Tag,
49785648 },
49795649
4980 fn init(p: *Parser, call_node: NodeIndex, func_node: NodeIndex) CallExpr {
4981 if (p.getNode(call_node, .builtin_call_expr_one)) |node| {
4982 const data = p.nodes.items(.data)[@intFromEnum(node)];
4983 const name = p.tokSlice(data.decl.name);
4984 const builtin_ty = p.comp.builtins.lookup(name);
4985 return .{ .builtin = .{ .node = node, .tag = builtin_ty.builtin.tag } };
5650 fn init(p: *Parser, call_node: Node.Index, func_node: Node.Index) CallExpr {
5651 if (p.getNode(call_node, .builtin_ref)) |builtin_ref| {
5652 const name = p.tokSlice(builtin_ref.name_tok);
5653 const expanded = p.comp.builtins.lookup(name);
5654 return .{ .builtin = .{ .builtin_tok = builtin_ref.name_tok, .tag = expanded.builtin.tag } };
49865655 }
49875656 return .{ .standard = func_node };
49885657 }
......@@ -4991,9 +5660,9 @@ const CallExpr = union(enum) {
49915660 return switch (self) {
49925661 .standard => true,
49935662 .builtin => |builtin| switch (builtin.tag) {
4994 Builtin.tagFromName("__builtin_va_start").?,
4995 Builtin.tagFromName("__va_start").?,
4996 Builtin.tagFromName("va_start").?,
5663 .__builtin_va_start,
5664 .__va_start,
5665 .va_start,
49975666 => arg_idx != 1,
49985667 else => true,
49995668 },
......@@ -5004,17 +5673,17 @@ const CallExpr = union(enum) {
50045673 return switch (self) {
50055674 .standard => true,
50065675 .builtin => |builtin| switch (builtin.tag) {
5007 Builtin.tagFromName("__builtin_va_start").?,
5008 Builtin.tagFromName("__va_start").?,
5009 Builtin.tagFromName("va_start").?,
5676 .__builtin_va_start,
5677 .__va_start,
5678 .va_start,
50105679 => arg_idx != 1,
5011 Builtin.tagFromName("__builtin_add_overflow").?,
5012 Builtin.tagFromName("__builtin_complex").?,
5013 Builtin.tagFromName("__builtin_isinf").?,
5014 Builtin.tagFromName("__builtin_isinf_sign").?,
5015 Builtin.tagFromName("__builtin_mul_overflow").?,
5016 Builtin.tagFromName("__builtin_isnan").?,
5017 Builtin.tagFromName("__builtin_sub_overflow").?,
5680 .__builtin_add_overflow,
5681 .__builtin_complex,
5682 .__builtin_isinf,
5683 .__builtin_isinf_sign,
5684 .__builtin_mul_overflow,
5685 .__builtin_isnan,
5686 .__builtin_sub_overflow,
50185687 => false,
50195688 else => true,
50205689 },
......@@ -5030,16 +5699,16 @@ const CallExpr = union(enum) {
50305699 fn checkVarArg(self: CallExpr, p: *Parser, first_after: TokenIndex, param_tok: TokenIndex, arg: *Result, arg_idx: u32) Error!void {
50315700 if (self == .standard) return;
50325701
5033 const builtin_tok = p.nodes.items(.data)[@intFromEnum(self.builtin.node)].decl.name;
5702 const builtin_tok = self.builtin.builtin_tok;
50345703 switch (self.builtin.tag) {
5035 Builtin.tagFromName("__builtin_va_start").?,
5036 Builtin.tagFromName("__va_start").?,
5037 Builtin.tagFromName("va_start").?,
5704 .__builtin_va_start,
5705 .__va_start,
5706 .va_start,
50385707 => return p.checkVaStartArg(builtin_tok, first_after, param_tok, arg, arg_idx),
5039 Builtin.tagFromName("__builtin_complex").? => return p.checkComplexArg(builtin_tok, first_after, param_tok, arg, arg_idx),
5040 Builtin.tagFromName("__builtin_add_overflow").?,
5041 Builtin.tagFromName("__builtin_sub_overflow").?,
5042 Builtin.tagFromName("__builtin_mul_overflow").?,
5708 .__builtin_complex => return p.checkComplexArg(builtin_tok, first_after, param_tok, arg, arg_idx),
5709 .__builtin_add_overflow,
5710 .__builtin_sub_overflow,
5711 .__builtin_mul_overflow,
50435712 => return p.checkArithOverflowArg(builtin_tok, first_after, param_tok, arg, arg_idx),
50445713
50455714 else => {},
......@@ -5055,222 +5724,165 @@ const CallExpr = union(enum) {
50555724 return switch (self) {
50565725 .standard => null,
50575726 .builtin => |builtin| switch (builtin.tag) {
5058 Builtin.tagFromName("__c11_atomic_thread_fence").?,
5059 Builtin.tagFromName("__c11_atomic_signal_fence").?,
5060 Builtin.tagFromName("__c11_atomic_is_lock_free").?,
5061 Builtin.tagFromName("__builtin_isinf").?,
5062 Builtin.tagFromName("__builtin_isinf_sign").?,
5063 Builtin.tagFromName("__builtin_isnan").?,
5727 .__c11_atomic_thread_fence,
5728 .__c11_atomic_signal_fence,
5729 .__c11_atomic_is_lock_free,
5730 .__builtin_isinf,
5731 .__builtin_isinf_sign,
5732 .__builtin_isnan,
50645733 => 1,
50655734
5066 Builtin.tagFromName("__builtin_complex").?,
5067 Builtin.tagFromName("__c11_atomic_load").?,
5068 Builtin.tagFromName("__c11_atomic_init").?,
5735 .__builtin_complex,
5736 .__c11_atomic_load,
5737 .__c11_atomic_init,
50695738 => 2,
50705739
5071 Builtin.tagFromName("__c11_atomic_store").?,
5072 Builtin.tagFromName("__c11_atomic_exchange").?,
5073 Builtin.tagFromName("__c11_atomic_fetch_add").?,
5074 Builtin.tagFromName("__c11_atomic_fetch_sub").?,
5075 Builtin.tagFromName("__c11_atomic_fetch_or").?,
5076 Builtin.tagFromName("__c11_atomic_fetch_xor").?,
5077 Builtin.tagFromName("__c11_atomic_fetch_and").?,
5078 Builtin.tagFromName("__atomic_fetch_add").?,
5079 Builtin.tagFromName("__atomic_fetch_sub").?,
5080 Builtin.tagFromName("__atomic_fetch_and").?,
5081 Builtin.tagFromName("__atomic_fetch_xor").?,
5082 Builtin.tagFromName("__atomic_fetch_or").?,
5083 Builtin.tagFromName("__atomic_fetch_nand").?,
5084 Builtin.tagFromName("__atomic_add_fetch").?,
5085 Builtin.tagFromName("__atomic_sub_fetch").?,
5086 Builtin.tagFromName("__atomic_and_fetch").?,
5087 Builtin.tagFromName("__atomic_xor_fetch").?,
5088 Builtin.tagFromName("__atomic_or_fetch").?,
5089 Builtin.tagFromName("__atomic_nand_fetch").?,
5090 Builtin.tagFromName("__builtin_add_overflow").?,
5091 Builtin.tagFromName("__builtin_sub_overflow").?,
5092 Builtin.tagFromName("__builtin_mul_overflow").?,
5740 .__c11_atomic_store,
5741 .__c11_atomic_exchange,
5742 .__c11_atomic_fetch_add,
5743 .__c11_atomic_fetch_sub,
5744 .__c11_atomic_fetch_or,
5745 .__c11_atomic_fetch_xor,
5746 .__c11_atomic_fetch_and,
5747 .__atomic_fetch_add,
5748 .__atomic_fetch_sub,
5749 .__atomic_fetch_and,
5750 .__atomic_fetch_xor,
5751 .__atomic_fetch_or,
5752 .__atomic_fetch_nand,
5753 .__atomic_add_fetch,
5754 .__atomic_sub_fetch,
5755 .__atomic_and_fetch,
5756 .__atomic_xor_fetch,
5757 .__atomic_or_fetch,
5758 .__atomic_nand_fetch,
5759 .__builtin_add_overflow,
5760 .__builtin_sub_overflow,
5761 .__builtin_mul_overflow,
50935762 => 3,
50945763
5095 Builtin.tagFromName("__c11_atomic_compare_exchange_strong").?,
5096 Builtin.tagFromName("__c11_atomic_compare_exchange_weak").?,
5764 .__c11_atomic_compare_exchange_strong,
5765 .__c11_atomic_compare_exchange_weak,
50975766 => 5,
50985767
5099 Builtin.tagFromName("__atomic_compare_exchange").?,
5100 Builtin.tagFromName("__atomic_compare_exchange_n").?,
5768 .__atomic_compare_exchange,
5769 .__atomic_compare_exchange_n,
51015770 => 6,
51025771 else => null,
51035772 },
51045773 };
51055774 }
51065775
5107 fn returnType(self: CallExpr, p: *Parser, callable_ty: Type) Type {
5108 return switch (self) {
5109 .standard => callable_ty.returnType(),
5110 .builtin => |builtin| switch (builtin.tag) {
5111 Builtin.tagFromName("__c11_atomic_exchange").? => {
5112 if (p.list_buf.items.len != 4) return Type.invalid; // wrong number of arguments; already an error
5113 const second_param = p.list_buf.items[2];
5114 return p.nodes.items(.ty)[@intFromEnum(second_param)];
5115 },
5116 Builtin.tagFromName("__c11_atomic_load").? => {
5117 if (p.list_buf.items.len != 3) return Type.invalid; // wrong number of arguments; already an error
5118 const first_param = p.list_buf.items[1];
5119 const ty = p.nodes.items(.ty)[@intFromEnum(first_param)];
5120 if (!ty.isPtr()) return Type.invalid;
5121 return ty.elemType();
5122 },
5776 fn returnType(self: CallExpr, p: *Parser, func_qt: QualType) !QualType {
5777 if (self == .standard) {
5778 return if (func_qt.get(p.comp, .func)) |func_ty| func_ty.return_type else .invalid;
5779 }
5780 const builtin = self.builtin;
5781 const func_ty = func_qt.get(p.comp, .func).?;
5782 return switch (builtin.tag) {
5783 .__c11_atomic_exchange => {
5784 if (p.list_buf.items.len != 4) return .invalid; // wrong number of arguments; already an error
5785 const second_param = p.list_buf.items[2];
5786 return second_param.qt(&p.tree);
5787 },
5788 .__c11_atomic_load => {
5789 if (p.list_buf.items.len != 3) return .invalid; // wrong number of arguments; already an error
5790 const first_param = p.list_buf.items[1];
5791 const qt = first_param.qt(&p.tree);
5792 if (!qt.isPointer(p.comp)) return .invalid;
5793 return qt.childType(p.comp);
5794 },
51235795
5124 Builtin.tagFromName("__atomic_fetch_add").?,
5125 Builtin.tagFromName("__atomic_add_fetch").?,
5126 Builtin.tagFromName("__c11_atomic_fetch_add").?,
5127
5128 Builtin.tagFromName("__atomic_fetch_sub").?,
5129 Builtin.tagFromName("__atomic_sub_fetch").?,
5130 Builtin.tagFromName("__c11_atomic_fetch_sub").?,
5131
5132 Builtin.tagFromName("__atomic_fetch_and").?,
5133 Builtin.tagFromName("__atomic_and_fetch").?,
5134 Builtin.tagFromName("__c11_atomic_fetch_and").?,
5135
5136 Builtin.tagFromName("__atomic_fetch_xor").?,
5137 Builtin.tagFromName("__atomic_xor_fetch").?,
5138 Builtin.tagFromName("__c11_atomic_fetch_xor").?,
5139
5140 Builtin.tagFromName("__atomic_fetch_or").?,
5141 Builtin.tagFromName("__atomic_or_fetch").?,
5142 Builtin.tagFromName("__c11_atomic_fetch_or").?,
5143
5144 Builtin.tagFromName("__atomic_fetch_nand").?,
5145 Builtin.tagFromName("__atomic_nand_fetch").?,
5146 Builtin.tagFromName("__c11_atomic_fetch_nand").?,
5147 => {
5148 if (p.list_buf.items.len != 3) return Type.invalid; // wrong number of arguments; already an error
5149 const second_param = p.list_buf.items[2];
5150 return p.nodes.items(.ty)[@intFromEnum(second_param)];
5151 },
5152 Builtin.tagFromName("__builtin_complex").? => {
5153 if (p.list_buf.items.len < 1) return Type.invalid; // not enough arguments; already an error
5154 const last_param = p.list_buf.items[p.list_buf.items.len - 1];
5155 return p.nodes.items(.ty)[@intFromEnum(last_param)].makeComplex();
5156 },
5157 Builtin.tagFromName("__atomic_compare_exchange").?,
5158 Builtin.tagFromName("__atomic_compare_exchange_n").?,
5159 Builtin.tagFromName("__c11_atomic_is_lock_free").?,
5160 => .{ .specifier = .bool },
5161 else => callable_ty.returnType(),
5162
5163 Builtin.tagFromName("__c11_atomic_compare_exchange_strong").?,
5164 Builtin.tagFromName("__c11_atomic_compare_exchange_weak").?,
5165 => {
5166 if (p.list_buf.items.len != 6) return Type.invalid; // wrong number of arguments
5167 const third_param = p.list_buf.items[3];
5168 return p.nodes.items(.ty)[@intFromEnum(third_param)];
5169 },
5796 .__atomic_fetch_add,
5797 .__atomic_add_fetch,
5798 .__c11_atomic_fetch_add,
5799
5800 .__atomic_fetch_sub,
5801 .__atomic_sub_fetch,
5802 .__c11_atomic_fetch_sub,
5803
5804 .__atomic_fetch_and,
5805 .__atomic_and_fetch,
5806 .__c11_atomic_fetch_and,
5807
5808 .__atomic_fetch_xor,
5809 .__atomic_xor_fetch,
5810 .__c11_atomic_fetch_xor,
5811
5812 .__atomic_fetch_or,
5813 .__atomic_or_fetch,
5814 .__c11_atomic_fetch_or,
5815
5816 .__atomic_fetch_nand,
5817 .__atomic_nand_fetch,
5818 .__c11_atomic_fetch_nand,
5819 => {
5820 if (p.list_buf.items.len != 3) return .invalid; // wrong number of arguments; already an error
5821 const second_param = p.list_buf.items[2];
5822 return second_param.qt(&p.tree);
5823 },
5824 .__builtin_complex => {
5825 if (p.list_buf.items.len < 1) return .invalid; // not enough arguments; already an error
5826 const last_param = p.list_buf.items[p.list_buf.items.len - 1];
5827 return try last_param.qt(&p.tree).toComplex(p.comp);
5828 },
5829 .__atomic_compare_exchange,
5830 .__atomic_compare_exchange_n,
5831 .__c11_atomic_is_lock_free,
5832 => .bool,
5833 else => func_ty.return_type,
5834
5835 .__c11_atomic_compare_exchange_strong,
5836 .__c11_atomic_compare_exchange_weak,
5837 => {
5838 if (p.list_buf.items.len != 6) return .invalid; // wrong number of arguments
5839 const third_param = p.list_buf.items[3];
5840 return third_param.qt(&p.tree);
51705841 },
51715842 };
51725843 }
51735844
5174 fn finish(self: CallExpr, p: *Parser, ty: Type, list_buf_top: usize, arg_count: u32) Error!Result {
5175 const ret_ty = self.returnType(p, ty);
5845 fn finish(self: CallExpr, p: *Parser, func_qt: QualType, list_buf_top: usize, l_paren: TokenIndex) Error!Result {
5846 const args = p.list_buf.items[list_buf_top..];
5847 const return_qt = try self.returnType(p, func_qt);
51765848 switch (self) {
5177 .standard => |func_node| {
5178 var call_node: Tree.Node = .{
5179 .tag = .call_expr_one,
5180 .ty = ret_ty,
5181 .data = .{ .two = .{ func_node, .none } },
5182 };
5183 const args = p.list_buf.items[list_buf_top..];
5184 switch (arg_count) {
5185 0 => {},
5186 1 => call_node.data.two[1] = args[1], // args[0] == func.node
5187 else => {
5188 call_node.tag = .call_expr;
5189 call_node.data = .{ .range = try p.addList(args) };
5190 },
5191 }
5192 return Result{ .node = try p.addNode(call_node), .ty = ret_ty };
5849 .standard => |func_node| return .{
5850 .qt = return_qt,
5851 .node = try p.addNode(.{ .call_expr = .{
5852 .l_paren_tok = l_paren,
5853 .qt = return_qt.unqualified(),
5854 .callee = func_node,
5855 .args = args,
5856 } }),
51935857 },
5194 .builtin => |builtin| {
5195 const index = @intFromEnum(builtin.node);
5196 var call_node = p.nodes.get(index);
5197 defer p.nodes.set(index, call_node);
5198 call_node.ty = ret_ty;
5199 const args = p.list_buf.items[list_buf_top..];
5200 switch (arg_count) {
5201 0 => {},
5202 1 => call_node.data.decl.node = args[1], // args[0] == func.node
5203 else => {
5204 call_node.tag = .builtin_call_expr;
5205 args[0] = @enumFromInt(call_node.data.decl.name);
5206 call_node.data = .{ .range = try p.addList(args) };
5207 },
5208 }
5209 const val = try evalBuiltin(builtin.tag, p, args[1..]);
5210 return Result{ .node = builtin.node, .ty = ret_ty, .val = val };
5858 .builtin => |builtin| return .{
5859 .val = try evalBuiltin(builtin.tag, p, args),
5860 .qt = return_qt,
5861 .node = try p.addNode(.{ .builtin_call_expr = .{
5862 .builtin_tok = builtin.builtin_tok,
5863 .qt = return_qt,
5864 .args = args,
5865 } }),
52115866 },
52125867 }
52135868 }
52145869};
52155870
52165871pub const Result = struct {
5217 node: NodeIndex = .none,
5218 ty: Type = .{ .specifier = .int },
5872 node: Node.Index,
5873 qt: QualType = .int,
52195874 val: Value = .{},
52205875
5221 const invalid: Result = .{ .ty = Type.invalid };
5222
5223 pub fn str(res: Result, p: *Parser) ![]const u8 {
5224 switch (res.val.opt_ref) {
5225 .none => return "(none)",
5226 .null => return "nullptr_t",
5227 else => {},
5228 }
5229 const strings_top = p.strings.items.len;
5230 defer p.strings.items.len = strings_top;
5231
5232 {
5233 var unmanaged = p.strings.moveToUnmanaged();
5234 var allocating: std.Io.Writer.Allocating = .fromArrayList(p.comp.gpa, &unmanaged);
5235 defer {
5236 unmanaged = allocating.toArrayList();
5237 p.strings = unmanaged.toManaged(p.comp.gpa);
5238 }
5239 res.val.print(res.ty, p.comp, &allocating.writer) catch |e| switch (e) {
5240 error.WriteFailed => return error.OutOfMemory,
5241 };
5242 }
5243 return try p.comp.diagnostics.arena.allocator().dupe(u8, p.strings.items[strings_top..]);
5244 }
5245
5246 fn expect(res: Result, p: *Parser) Error!void {
5247 if (p.in_macro) {
5248 if (res.val.opt_ref == .none) {
5249 try p.errTok(.expected_expr, p.tok_i);
5250 return error.ParsingFailed;
5251 }
5252 return;
5253 }
5254 if (res.node == .none) {
5255 try p.errTok(.expected_expr, p.tok_i);
5256 return error.ParsingFailed;
5257 }
5258 }
5259
5260 fn empty(res: Result, p: *Parser) bool {
5261 if (p.in_macro) return res.val.opt_ref == .none;
5262 return res.node == .none;
5263 }
5264
5265 fn maybeWarnUnused(res: Result, p: *Parser, expr_start: TokenIndex, err_start: usize) Error!void {
5266 if (res.ty.is(.void) or res.node == .none) return;
5267 // don't warn about unused result if the expression contained errors besides other unused results
5268 for (p.comp.diagnostics.list.items[err_start..]) |err_item| {
5269 if (err_item.tag != .unused_value) return;
5270 }
5876 fn maybeWarnUnused(res: Result, p: *Parser, expr_start: TokenIndex, prev_total: usize) Error!void {
5877 if (res.qt.is(p.comp, .void)) return;
5878 if (res.qt.isInvalid()) return;
5879 // // don't warn about unused result if the expression contained errors besides other unused results
5880 if (p.diagnostics.total != prev_total) return; // TODO improve
5881 // for (p.diagnostics.list.items[err_start..]) |err_item| {
5882 // if (err_item.tag != .unused_value) return;
5883 // }
52715884 var cur_node = res.node;
5272 while (true) switch (p.nodes.items(.tag)[@intFromEnum(cur_node)]) {
5273 .invalid, // So that we don't need to check for node == 0
5885 while (true) switch (cur_node.get(&p.tree)) {
52745886 .assign_expr,
52755887 .mul_assign_expr,
52765888 .div_assign_expr,
......@@ -5287,109 +5899,135 @@ pub const Result = struct {
52875899 .post_inc_expr,
52885900 .post_dec_expr,
52895901 => return,
5290 .call_expr, .call_expr_one => {
5291 const tmp_tree = p.tmpTree();
5292 const child_nodes = tmp_tree.childNodes(cur_node);
5293 const fn_ptr = child_nodes[0];
5294 const call_info = tmp_tree.callableResultUsage(fn_ptr) orelse return;
5295 if (call_info.nodiscard) try p.errStr(.nodiscard_unused, expr_start, p.tokSlice(call_info.tok));
5296 if (call_info.warn_unused_result) try p.errStr(.warn_unused_result, expr_start, p.tokSlice(call_info.tok));
5902 .call_expr => |call| {
5903 const call_info = p.tree.callableResultUsage(call.callee) orelse return;
5904 if (call_info.nodiscard) try p.err(expr_start, .nodiscard_unused, .{p.tokSlice(call_info.tok)});
5905 if (call_info.warn_unused_result) try p.err(expr_start, .warn_unused_result, .{p.tokSlice(call_info.tok)});
52975906 return;
52985907 },
5299 .stmt_expr => {
5300 const body = p.nodes.items(.data)[@intFromEnum(cur_node)].un;
5301 switch (p.nodes.items(.tag)[@intFromEnum(body)]) {
5302 .compound_stmt_two => {
5303 const body_stmt = p.nodes.items(.data)[@intFromEnum(body)].two;
5304 cur_node = if (body_stmt[1] != .none) body_stmt[1] else body_stmt[0];
5305 },
5306 .compound_stmt => {
5307 const data = p.nodes.items(.data)[@intFromEnum(body)];
5308 cur_node = p.data.items[data.range.end - 1];
5309 },
5310 else => unreachable,
5311 }
5908 .builtin_call_expr => |call| {
5909 const expanded = p.comp.builtins.lookup(p.tokSlice(call.builtin_tok));
5910 const attributes = expanded.builtin.properties.attributes;
5911 if (attributes.pure) try p.err(call.builtin_tok, .builtin_unused, .{"pure"});
5912 if (attributes.@"const") try p.err(call.builtin_tok, .builtin_unused, .{"const"});
5913 return;
53125914 },
5313 .comma_expr => cur_node = p.nodes.items(.data)[@intFromEnum(cur_node)].bin.rhs,
5314 .paren_expr => cur_node = p.nodes.items(.data)[@intFromEnum(cur_node)].un,
5915 .stmt_expr => |stmt_expr| {
5916 const compound = stmt_expr.operand.get(&p.tree).compound_stmt;
5917 cur_node = compound.body[compound.body.len - 1];
5918 },
5919 .comma_expr => |comma| cur_node = comma.rhs,
5920 .paren_expr => |grouped| cur_node = grouped.operand,
53155921 else => break,
53165922 };
5317 try p.errTok(.unused_value, expr_start);
5923 try p.err(expr_start, .unused_value, .{});
53185924 }
53195925
5320 fn boolRes(lhs: *Result, p: *Parser, tag: Tree.Tag, rhs: Result, tok_i: TokenIndex) !void {
5926 fn boolRes(lhs: *Result, p: *Parser, tag: std.meta.Tag(Node), rhs: Result, tok_i: TokenIndex) !void {
53215927 if (lhs.val.opt_ref == .null) {
5322 lhs.val = Value.zero;
5928 lhs.val = .zero;
53235929 }
5324 if (lhs.ty.specifier != .invalid) {
5325 lhs.ty = Type.int;
5930 if (!lhs.qt.isInvalid()) {
5931 lhs.qt = .int;
53265932 }
53275933 return lhs.bin(p, tag, rhs, tok_i);
53285934 }
53295935
5330 fn bin(lhs: *Result, p: *Parser, tag: Tree.Tag, rhs: Result, tok_i: TokenIndex) !void {
5331 lhs.node = try p.addNode(.{
5332 .tag = tag,
5333 .ty = lhs.ty,
5334 .data = .{ .bin = .{ .lhs = lhs.node, .rhs = rhs.node } },
5335 .loc = @enumFromInt(tok_i),
5336 });
5936 fn bin(lhs: *Result, p: *Parser, rt_tag: std.meta.Tag(Node), rhs: Result, tok_i: TokenIndex) !void {
5937 const bin_data: Node.Binary = .{
5938 .op_tok = tok_i,
5939 .lhs = lhs.node,
5940 .rhs = rhs.node,
5941 .qt = lhs.qt,
5942 };
5943 switch (rt_tag) {
5944 // zig fmt: off
5945 inline .comma_expr, .assign_expr, .mul_assign_expr, .div_assign_expr,
5946 .mod_assign_expr, .add_assign_expr, .sub_assign_expr, .shl_assign_expr,
5947 .shr_assign_expr, .bit_and_assign_expr, .bit_xor_assign_expr,
5948 .bit_or_assign_expr, .bool_or_expr, .bool_and_expr, .bit_or_expr,
5949 .bit_xor_expr, .bit_and_expr, .equal_expr, .not_equal_expr,
5950 .less_than_expr, .less_than_equal_expr, .greater_than_expr,
5951 .greater_than_equal_expr, .shl_expr, .shr_expr, .add_expr,
5952 .sub_expr, .mul_expr, .div_expr, .mod_expr,
5953 // zig fmt: on
5954 => |tag| lhs.node = try p.addNode(@unionInit(Node, @tagName(tag), bin_data)),
5955 else => unreachable,
5956 }
53375957 }
53385958
5339 fn un(operand: *Result, p: *Parser, tag: Tree.Tag, tok_i: TokenIndex) Error!void {
5340 operand.node = try p.addNode(.{
5341 .tag = tag,
5342 .ty = operand.ty,
5343 .data = .{ .un = operand.node },
5344 .loc = @enumFromInt(tok_i),
5345 });
5959 fn un(operand: *Result, p: *Parser, rt_tag: std.meta.Tag(Node), tok_i: TokenIndex) Error!void {
5960 const un_data: Node.Unary = .{
5961 .op_tok = tok_i,
5962 .operand = operand.node,
5963 .qt = operand.qt,
5964 };
5965 switch (rt_tag) {
5966 // zig fmt: off
5967 inline .addr_of_expr, .deref_expr, .plus_expr, .negate_expr,
5968 .bit_not_expr, .bool_not_expr, .pre_inc_expr, .pre_dec_expr,
5969 .imag_expr, .real_expr, .post_inc_expr,.post_dec_expr,
5970 .paren_expr, .stmt_expr, .imaginary_literal, .compound_assign_dummy_expr,
5971 // zig fmt: on
5972 => |tag| operand.node = try p.addNode(@unionInit(Node, @tagName(tag), un_data)),
5973 else => unreachable,
5974 }
53465975 }
53475976
5348 fn implicitCast(operand: *Result, p: *Parser, kind: Tree.CastKind) Error!void {
5977 fn implicitCast(operand: *Result, p: *Parser, kind: Node.Cast.Kind, tok: TokenIndex) Error!void {
53495978 operand.node = try p.addNode(.{
5350 .tag = .implicit_cast,
5351 .ty = operand.ty,
5352 .data = .{ .cast = .{ .operand = operand.node, .kind = kind } },
5979 .cast = .{
5980 .l_paren = tok,
5981 .kind = kind,
5982 .operand = operand.node,
5983 .qt = operand.qt,
5984 .implicit = true,
5985 },
53535986 });
53545987 }
53555988
53565989 fn adjustCondExprPtrs(a: *Result, tok: TokenIndex, b: *Result, p: *Parser) !bool {
5357 assert(a.ty.isPtr() and b.ty.isPtr());
5990 assert(a.qt.isPointer(p.comp) and b.qt.isPointer(p.comp));
53585991
5359 const a_elem = a.ty.elemType();
5360 const b_elem = b.ty.elemType();
5361 if (a_elem.eql(b_elem, p.comp, true)) return true;
5992 const a_elem = a.qt.childType(p.comp);
5993 const b_elem = b.qt.childType(p.comp);
5994 if (a_elem.eqlQualified(b_elem, p.comp)) return true;
53625995
5363 var adjusted_elem_ty = try p.arena.create(Type);
5364 adjusted_elem_ty.* = a_elem;
5996 const has_void_pointer_branch = a.qt.scalarKind(p.comp) == .void_pointer or
5997 b.qt.scalarKind(p.comp) == .void_pointer;
53655998
5366 const has_void_star_branch = a.ty.isVoidStar() or b.ty.isVoidStar();
5367 const only_quals_differ = a_elem.eql(b_elem, p.comp, false);
5368 const pointers_compatible = only_quals_differ or has_void_star_branch;
5999 const only_quals_differ = a_elem.eql(b_elem, p.comp);
6000 const pointers_compatible = only_quals_differ or has_void_pointer_branch;
53696001
5370 if (!pointers_compatible or has_void_star_branch) {
6002 var adjusted_elem_qt = a_elem;
6003 if (!pointers_compatible or has_void_pointer_branch) {
53716004 if (!pointers_compatible) {
5372 try p.errStr(.pointer_mismatch, tok, try p.typePairStrExtra(a.ty, " and ", b.ty));
6005 try p.err(tok, .pointer_mismatch, .{ a.qt, b.qt });
53736006 }
5374 adjusted_elem_ty.* = .{ .specifier = .void };
6007 adjusted_elem_qt = .void;
53756008 }
6009
53766010 if (pointers_compatible) {
5377 adjusted_elem_ty.qual = a_elem.qual.mergeCV(b_elem.qual);
6011 adjusted_elem_qt.@"const" = a_elem.@"const" or b_elem.@"const";
6012 adjusted_elem_qt.@"volatile" = a_elem.@"volatile" or b_elem.@"volatile";
6013 // TODO restrict?
53786014 }
5379 if (!adjusted_elem_ty.eql(a_elem, p.comp, true)) {
5380 a.ty = .{
5381 .data = .{ .sub_type = adjusted_elem_ty },
5382 .specifier = .pointer,
5383 };
5384 try a.implicitCast(p, .bitcast);
6015
6016 if (!adjusted_elem_qt.eqlQualified(a_elem, p.comp)) {
6017 a.qt = try p.comp.type_store.put(p.gpa, .{ .pointer = .{
6018 .child = adjusted_elem_qt,
6019 .decayed = null,
6020 } });
6021 try a.implicitCast(p, .bitcast, tok);
53856022 }
5386 if (!adjusted_elem_ty.eql(b_elem, p.comp, true)) {
5387 b.ty = .{
5388 .data = .{ .sub_type = adjusted_elem_ty },
5389 .specifier = .pointer,
5390 };
5391 try b.implicitCast(p, .bitcast);
6023 if (!adjusted_elem_qt.eqlQualified(b_elem, p.comp)) {
6024 b.qt = try p.comp.type_store.put(p.gpa, .{ .pointer = .{
6025 .child = adjusted_elem_qt,
6026 .decayed = null,
6027 } });
6028 try b.implicitCast(p, .bitcast, tok);
53926029 }
6030
53936031 return true;
53946032 }
53956033
......@@ -5403,37 +6041,48 @@ pub const Result = struct {
54036041 conditional,
54046042 add,
54056043 sub,
5406 }) Error!bool {
5407 if (b.ty.specifier == .invalid) {
6044 }) !bool {
6045 if (b.qt.isInvalid()) {
54086046 try a.saveValue(p);
5409 a.ty = Type.invalid;
6047 a.qt = .invalid;
54106048 }
5411 if (a.ty.specifier == .invalid) {
6049 if (a.qt.isInvalid()) {
54126050 return false;
54136051 }
5414 try a.lvalConversion(p);
5415 try b.lvalConversion(p);
6052 try a.lvalConversion(p, tok);
6053 try b.lvalConversion(p, tok);
54166054
5417 const a_vec = a.ty.is(.vector);
5418 const b_vec = b.ty.is(.vector);
6055 const a_vec = a.qt.is(p.comp, .vector);
6056 const b_vec = b.qt.is(p.comp, .vector);
54196057 if (a_vec and b_vec) {
5420 if (a.ty.eql(b.ty, p.comp, false)) {
6058 if (a.qt.eql(b.qt, p.comp)) {
54216059 return a.shouldEval(b, p);
54226060 }
5423 return a.invalidBinTy(tok, b, p);
6061 if (a.qt.sizeCompare(b.qt, p.comp) == .eq) {
6062 b.qt = a.qt;
6063 try b.implicitCast(p, .bitcast, tok);
6064 return a.shouldEval(b, p);
6065 }
6066 try p.err(tok, .incompatible_vec_types, .{ a.qt, b.qt });
6067 a.val = .{};
6068 b.val = .{};
6069 a.qt = .invalid;
6070 return false;
54246071 } else if (a_vec) {
5425 if (b.coerceExtra(p, a.ty.elemType(), tok, .test_coerce)) {
6072 if (b.coerceExtra(p, a.qt.childType(p.comp), tok, .test_coerce)) {
54266073 try b.saveValue(p);
5427 try b.implicitCast(p, .vector_splat);
6074 b.qt = a.qt;
6075 try b.implicitCast(p, .vector_splat, tok);
54286076 return a.shouldEval(b, p);
54296077 } else |er| switch (er) {
54306078 error.CoercionFailed => return a.invalidBinTy(tok, b, p),
54316079 else => |e| return e,
54326080 }
54336081 } else if (b_vec) {
5434 if (a.coerceExtra(p, b.ty.elemType(), tok, .test_coerce)) {
6082 if (a.coerceExtra(p, b.qt.childType(p.comp), tok, .test_coerce)) {
54356083 try a.saveValue(p);
5436 try a.implicitCast(p, .vector_splat);
6084 a.qt = b.qt;
6085 try a.implicitCast(p, .vector_splat, tok);
54376086 return a.shouldEval(b, p);
54386087 } else |er| switch (er) {
54396088 error.CoercionFailed => return a.invalidBinTy(tok, b, p),
......@@ -5441,21 +6090,18 @@ pub const Result = struct {
54416090 }
54426091 }
54436092
5444 const a_int = a.ty.isInt();
5445 const b_int = b.ty.isInt();
5446 if (a_int and b_int) {
6093 const a_sk = a.qt.scalarKind(p.comp);
6094 const b_sk = b.qt.scalarKind(p.comp);
6095
6096 if (a_sk.isInt() and b_sk.isInt()) {
54476097 try a.usualArithmeticConversion(b, p, tok);
54486098 return a.shouldEval(b, p);
54496099 }
54506100 if (kind == .integer) return a.invalidBinTy(tok, b, p);
54516101
5452 const a_float = a.ty.isFloat();
5453 const b_float = b.ty.isFloat();
5454 const a_arithmetic = a_int or a_float;
5455 const b_arithmetic = b_int or b_float;
5456 if (a_arithmetic and b_arithmetic) {
6102 if (a_sk.isArithmetic() and b_sk.isArithmetic()) {
54576103 // <, <=, >, >= only work on real types
5458 if (kind == .relational and (!a.ty.isReal() or !b.ty.isReal()))
6104 if (kind == .relational and (!a_sk.isReal() or !b_sk.isReal()))
54596105 return a.invalidBinTy(tok, b, p);
54606106
54616107 try a.usualArithmeticConversion(b, p, tok);
......@@ -5463,372 +6109,443 @@ pub const Result = struct {
54636109 }
54646110 if (kind == .arithmetic) return a.invalidBinTy(tok, b, p);
54656111
5466 const a_nullptr = a.ty.is(.nullptr_t);
5467 const b_nullptr = b.ty.is(.nullptr_t);
5468 const a_ptr = a.ty.isPtr();
5469 const b_ptr = b.ty.isPtr();
5470 const a_scalar = a_arithmetic or a_ptr;
5471 const b_scalar = b_arithmetic or b_ptr;
54726112 switch (kind) {
54736113 .boolean_logic => {
5474 if (!(a_scalar or a_nullptr) or !(b_scalar or b_nullptr)) return a.invalidBinTy(tok, b, p);
6114 if (!(a_sk != .none or a_sk == .nullptr_t) or
6115 !(b_sk != .none or b_sk == .nullptr_t))
6116 {
6117 return a.invalidBinTy(tok, b, p);
6118 }
54756119
54766120 // Do integer promotions but nothing else
5477 if (a_int) try a.intCast(p, a.ty.integerPromotion(p.comp), tok);
5478 if (b_int) try b.intCast(p, b.ty.integerPromotion(p.comp), tok);
6121 if (a_sk.isInt()) try a.castToInt(p, a.qt.promoteInt(p.comp), tok);
6122 if (b_sk.isInt()) try b.castToInt(p, b.qt.promoteInt(p.comp), tok);
54796123 return a.shouldEval(b, p);
54806124 },
54816125 .relational, .equality => {
5482 if (kind == .equality and (a_nullptr or b_nullptr)) {
5483 if (a_nullptr and b_nullptr) return a.shouldEval(b, p);
5484 const nullptr_res = if (a_nullptr) a else b;
5485 const other_res = if (a_nullptr) b else a;
5486 if (other_res.ty.isPtr()) {
5487 try nullptr_res.nullCast(p, other_res.ty);
6126 if (kind == .equality and (a_sk == .nullptr_t or b_sk == .nullptr_t)) {
6127 if (a_sk == .nullptr_t and b_sk == .nullptr_t) return a.shouldEval(b, p);
6128
6129 const nullptr_res = if (a_sk == .nullptr_t) a else b;
6130 const other_res = if (a_sk == .nullptr_t) b else a;
6131
6132 if (other_res.qt.isPointer(p.comp)) {
6133 try nullptr_res.nullToPointer(p, other_res.qt, tok);
54886134 return other_res.shouldEval(nullptr_res, p);
54896135 } else if (other_res.val.isZero(p.comp)) {
5490 other_res.val = Value.null;
5491 try other_res.nullCast(p, nullptr_res.ty);
6136 other_res.val = .null;
6137 try other_res.nullToPointer(p, nullptr_res.qt, tok);
54926138 return other_res.shouldEval(nullptr_res, p);
54936139 }
54946140 return a.invalidBinTy(tok, b, p);
54956141 }
6142
54966143 // comparisons between floats and pointes not allowed
5497 if (!a_scalar or !b_scalar or (a_float and b_ptr) or (b_float and a_ptr))
6144 if (a_sk == .none or b_sk == .none or (a_sk.isFloat() and b_sk.isPointer()) or (b_sk.isFloat() and a_sk.isPointer()))
54986145 return a.invalidBinTy(tok, b, p);
5499
5500 if ((a_int or b_int) and !(a.val.isZero(p.comp) or b.val.isZero(p.comp))) {
5501 try p.errStr(.comparison_ptr_int, tok, try p.typePairStr(a.ty, b.ty));
5502 } else if (a_ptr and b_ptr) {
5503 if (!a.ty.isVoidStar() and !b.ty.isVoidStar() and !a.ty.eql(b.ty, p.comp, false))
5504 try p.errStr(.comparison_distinct_ptr, tok, try p.typePairStr(a.ty, b.ty));
5505 } else if (a_ptr) {
5506 try b.ptrCast(p, a.ty);
6146 if (a_sk == .nullptr_t or b_sk == .nullptr_t) return a.invalidBinTy(tok, b, p);
6147
6148 if ((a_sk.isInt() or b_sk.isInt()) and !(a.val.isZero(p.comp) or b.val.isZero(p.comp))) {
6149 try p.err(tok, .comparison_ptr_int, .{ a.qt, b.qt });
6150 } else if (a_sk.isPointer() and b_sk.isPointer()) {
6151 if (a_sk != .void_pointer and b_sk != .void_pointer) {
6152 const a_elem = a.qt.childType(p.comp);
6153 const b_elem = b.qt.childType(p.comp);
6154 if (!a_elem.eql(b_elem, p.comp)) {
6155 try p.err(tok, .comparison_distinct_ptr, .{ a.qt, b.qt });
6156 try b.castToPointer(p, a.qt, tok);
6157 }
6158 } else if (a_sk == .void_pointer) {
6159 try b.castToPointer(p, a.qt, tok);
6160 } else if (b_sk == .void_pointer) {
6161 try a.castToPointer(p, b.qt, tok);
6162 }
6163 } else if (a_sk.isPointer()) {
6164 try b.castToPointer(p, a.qt, tok);
55076165 } else {
5508 assert(b_ptr);
5509 try a.ptrCast(p, b.ty);
6166 assert(b_sk.isPointer());
6167 try a.castToPointer(p, b.qt, tok);
55106168 }
55116169
55126170 return a.shouldEval(b, p);
55136171 },
55146172 .conditional => {
55156173 // doesn't matter what we return here, as the result is ignored
5516 if (a.ty.is(.void) or b.ty.is(.void)) {
5517 try a.toVoid(p);
5518 try b.toVoid(p);
6174 if (a.qt.is(p.comp, .void) or b.qt.is(p.comp, .void)) {
6175 try a.castToVoid(p, tok);
6176 try b.castToVoid(p, tok);
55196177 return true;
55206178 }
5521 if (a_nullptr and b_nullptr) return true;
5522 if ((a_ptr and b_int) or (a_int and b_ptr)) {
6179
6180 if (a_sk == .nullptr_t and b_sk == .nullptr_t) return true;
6181
6182 if ((a_sk.isPointer() and b_sk.isInt()) or (a_sk.isInt() and b_sk.isPointer())) {
55236183 if (a.val.isZero(p.comp) or b.val.isZero(p.comp)) {
5524 try a.nullCast(p, b.ty);
5525 try b.nullCast(p, a.ty);
6184 try a.nullToPointer(p, b.qt, tok);
6185 try b.nullToPointer(p, a.qt, tok);
55266186 return true;
55276187 }
5528 const int_ty = if (a_int) a else b;
5529 const ptr_ty = if (a_ptr) a else b;
5530 try p.errStr(.implicit_int_to_ptr, tok, try p.typePairStrExtra(int_ty.ty, " to ", ptr_ty.ty));
5531 try int_ty.ptrCast(p, ptr_ty.ty);
6188 const int_ty = if (a_sk.isInt()) a else b;
6189 const ptr_ty = if (a_sk.isPointer()) a else b;
6190 try p.err(tok, .implicit_int_to_ptr, .{ int_ty.qt, ptr_ty.qt });
6191 try int_ty.castToPointer(p, ptr_ty.qt, tok);
55326192
55336193 return true;
55346194 }
5535 if (a_ptr and b_ptr) return a.adjustCondExprPtrs(tok, b, p);
5536 if ((a_ptr and b_nullptr) or (a_nullptr and b_ptr)) {
5537 const nullptr_res = if (a_nullptr) a else b;
5538 const ptr_res = if (a_nullptr) b else a;
5539 try nullptr_res.nullCast(p, ptr_res.ty);
6195 if ((a_sk.isPointer() and b_sk == .nullptr_t) or (a_sk == .nullptr_t and b_sk.isPointer())) {
6196 const nullptr_res = if (a_sk == .nullptr_t) a else b;
6197 const ptr_res = if (a_sk == .nullptr_t) b else a;
6198 try nullptr_res.nullToPointer(p, ptr_res.qt, tok);
55406199 return true;
55416200 }
5542 if (a.ty.isRecord() and b.ty.isRecord() and a.ty.eql(b.ty, p.comp, false)) {
6201 if (a_sk.isPointer() and b_sk.isPointer()) return a.adjustCondExprPtrs(tok, b, p);
6202
6203 if (a.qt.getRecord(p.comp) != null and b.qt.getRecord(p.comp) != null and a.qt.eql(b.qt, p.comp)) {
55436204 return true;
55446205 }
55456206 return a.invalidBinTy(tok, b, p);
55466207 },
55476208 .add => {
55486209 // if both aren't arithmetic one should be pointer and the other an integer
5549 if (a_ptr == b_ptr or a_int == b_int) return a.invalidBinTy(tok, b, p);
6210 if (a_sk.isPointer() == b_sk.isPointer() or a_sk.isInt() == b_sk.isInt()) return a.invalidBinTy(tok, b, p);
6211
6212 if (a_sk == .void_pointer or b_sk == .void_pointer)
6213 try p.err(tok, .gnu_pointer_arith, .{});
6214
6215 if (a_sk == .nullptr_t) try a.nullToPointer(p, .void_pointer, tok);
6216 if (b_sk == .nullptr_t) try b.nullToPointer(p, .void_pointer, tok);
55506217
55516218 // Do integer promotions but nothing else
5552 if (a_int) try a.intCast(p, a.ty.integerPromotion(p.comp), tok);
5553 if (b_int) try b.intCast(p, b.ty.integerPromotion(p.comp), tok);
6219 if (a_sk.isInt()) try a.castToInt(p, a.qt.promoteInt(p.comp), tok);
6220 if (b_sk.isInt()) try b.castToInt(p, b.qt.promoteInt(p.comp), tok);
55546221
55556222 // The result type is the type of the pointer operand
5556 if (a_int) a.ty = b.ty else b.ty = a.ty;
6223 if (a_sk.isInt()) a.qt = b.qt else b.qt = a.qt;
55576224 return a.shouldEval(b, p);
55586225 },
55596226 .sub => {
5560 // if both aren't arithmetic then either both should be pointers or just a
5561 if (!a_ptr or !(b_ptr or b_int)) return a.invalidBinTy(tok, b, p);
6227 // if both aren't arithmetic then either both should be pointers or just the left one.
6228 if (!a_sk.isPointer() or !(b_sk.isPointer() or b_sk.isInt())) return a.invalidBinTy(tok, b, p);
6229
6230 if (a_sk == .void_pointer)
6231 try p.err(tok, .gnu_pointer_arith, .{});
6232
6233 if (a_sk == .nullptr_t) try a.nullToPointer(p, .void_pointer, tok);
6234 if (b_sk == .nullptr_t) try b.nullToPointer(p, .void_pointer, tok);
55626235
5563 if (a_ptr and b_ptr) {
5564 if (!a.ty.eql(b.ty, p.comp, false)) try p.errStr(.incompatible_pointers, tok, try p.typePairStr(a.ty, b.ty));
5565 a.ty = p.comp.types.ptrdiff;
6236 if (a_sk.isPointer() and b_sk.isPointer()) {
6237 const a_child_qt = a.qt.get(p.comp, .pointer).?.child;
6238 const b_child_qt = b.qt.get(p.comp, .pointer).?.child;
6239
6240 if (!a_child_qt.eql(b_child_qt, p.comp)) try p.err(tok, .incompatible_pointers, .{ a.qt, b.qt });
6241 if (a.qt.childType(p.comp).sizeofOrNull(p.comp) orelse 1 == 0) try p.err(tok, .subtract_pointers_zero_elem_size, .{a.qt.childType(p.comp)});
6242 a.qt = p.comp.type_store.ptrdiff;
55666243 }
55676244
55686245 // Do integer promotion on b if needed
5569 if (b_int) try b.intCast(p, b.ty.integerPromotion(p.comp), tok);
6246 if (b_sk.isInt()) try b.castToInt(p, b.qt.promoteInt(p.comp), tok);
55706247 return a.shouldEval(b, p);
55716248 },
55726249 else => return a.invalidBinTy(tok, b, p),
55736250 }
55746251 }
55756252
5576 fn lvalConversion(res: *Result, p: *Parser) Error!void {
5577 if (res.ty.isFunc()) {
5578 if (res.ty.isInvalidFunc()) {
5579 res.ty = .{ .specifier = .invalid };
5580 } else {
5581 const elem_ty = try p.arena.create(Type);
5582 elem_ty.* = res.ty;
5583 res.ty.specifier = .pointer;
5584 res.ty.data = .{ .sub_type = elem_ty };
5585 }
5586 try res.implicitCast(p, .function_to_pointer);
5587 } else if (res.ty.isArray()) {
5588 res.val = .{};
5589 res.ty.decayArray();
5590 try res.implicitCast(p, .array_to_pointer);
5591 } else if (!p.in_macro and p.tmpTree().isLval(res.node)) {
5592 res.ty.qual = .{};
5593 try res.implicitCast(p, .lval_to_rval);
6253 fn lvalConversion(res: *Result, p: *Parser, tok: TokenIndex) Error!void {
6254 if (res.qt.is(p.comp, .func)) {
6255 res.val = try p.pointerValue(res.node, .zero);
6256
6257 res.qt = try res.qt.decay(p.comp);
6258 try res.implicitCast(p, .function_to_pointer, tok);
6259 } else if (res.qt.is(p.comp, .array)) {
6260 res.val = try p.pointerValue(res.node, .zero);
6261
6262 res.qt = try res.qt.decay(p.comp);
6263 try res.implicitCast(p, .array_to_pointer, tok);
6264 } else if (!p.in_macro and p.tree.isLval(res.node)) {
6265 res.qt = res.qt.unqualified();
6266 try res.implicitCast(p, .lval_to_rval, tok);
55946267 }
55956268 }
55966269
5597 fn boolCast(res: *Result, p: *Parser, bool_ty: Type, tok: TokenIndex) Error!void {
5598 if (res.ty.isArray()) {
6270 fn castToBool(res: *Result, p: *Parser, bool_qt: QualType, tok: TokenIndex) Error!void {
6271 if (res.qt.isInvalid()) return;
6272 std.debug.assert(!bool_qt.isInvalid());
6273
6274 const src_sk = res.qt.scalarKind(p.comp);
6275 if (res.qt.is(p.comp, .array)) {
55996276 if (res.val.is(.bytes, p.comp)) {
5600 try p.errStr(.string_literal_to_bool, tok, try p.typePairStrExtra(res.ty, " to ", bool_ty));
6277 try p.err(tok, .string_literal_to_bool, .{ res.qt, bool_qt });
56016278 } else {
5602 try p.errStr(.array_address_to_bool, tok, p.tokSlice(tok));
6279 try p.err(tok, .array_address_to_bool, .{p.tokSlice(tok)});
56036280 }
5604 try res.lvalConversion(p);
5605 res.val = Value.one;
5606 res.ty = bool_ty;
5607 try res.implicitCast(p, .pointer_to_bool);
5608 } else if (res.ty.isPtr()) {
6281 try res.lvalConversion(p, tok);
6282 res.val = .one;
6283 res.qt = bool_qt;
6284 try res.implicitCast(p, .pointer_to_bool, tok);
6285 } else if (src_sk.isPointer()) {
56096286 res.val.boolCast(p.comp);
5610 res.ty = bool_ty;
5611 try res.implicitCast(p, .pointer_to_bool);
5612 } else if (res.ty.isInt() and !res.ty.is(.bool)) {
6287 res.qt = bool_qt;
6288 try res.implicitCast(p, .pointer_to_bool, tok);
6289 } else if (src_sk.isInt() and src_sk != .bool) {
56136290 res.val.boolCast(p.comp);
5614 res.ty = bool_ty;
5615 try res.implicitCast(p, .int_to_bool);
5616 } else if (res.ty.isFloat()) {
5617 const old_value = res.val;
5618 const value_change_kind = try res.val.floatToInt(bool_ty, p.comp);
5619 try res.floatToIntWarning(p, bool_ty, old_value, value_change_kind, tok);
5620 if (!res.ty.isReal()) {
5621 res.ty = res.ty.makeReal();
5622 try res.implicitCast(p, .complex_float_to_real);
5623 }
5624 res.ty = bool_ty;
5625 try res.implicitCast(p, .float_to_bool);
5626 }
5627 }
5628
5629 fn intCast(res: *Result, p: *Parser, int_ty: Type, tok: TokenIndex) Error!void {
5630 if (int_ty.hasIncompleteSize()) return error.ParsingFailed; // Diagnostic already issued
5631 if (res.ty.is(.bool)) {
5632 res.ty = int_ty.makeReal();
5633 try res.implicitCast(p, .bool_to_int);
5634 if (!int_ty.isReal()) {
5635 res.ty = int_ty;
5636 try res.implicitCast(p, .real_to_complex_int);
5637 }
5638 } else if (res.ty.isPtr()) {
5639 res.ty = int_ty.makeReal();
5640 try res.implicitCast(p, .pointer_to_int);
5641 if (!int_ty.isReal()) {
5642 res.ty = int_ty;
5643 try res.implicitCast(p, .real_to_complex_int);
5644 }
5645 } else if (res.ty.isFloat()) {
5646 const old_value = res.val;
5647 const value_change_kind = try res.val.floatToInt(int_ty, p.comp);
5648 try res.floatToIntWarning(p, int_ty, old_value, value_change_kind, tok);
5649 const old_real = res.ty.isReal();
5650 const new_real = int_ty.isReal();
5651 if (old_real and new_real) {
5652 res.ty = int_ty;
5653 try res.implicitCast(p, .float_to_int);
5654 } else if (old_real) {
5655 res.ty = int_ty.makeReal();
5656 try res.implicitCast(p, .float_to_int);
5657 res.ty = int_ty;
5658 try res.implicitCast(p, .real_to_complex_int);
5659 } else if (new_real) {
5660 res.ty = res.ty.makeReal();
5661 try res.implicitCast(p, .complex_float_to_real);
5662 res.ty = int_ty;
5663 try res.implicitCast(p, .float_to_int);
6291 if (!src_sk.isReal()) {
6292 res.qt = res.qt.toReal(p.comp);
6293 try res.implicitCast(p, .complex_int_to_real, tok);
6294 }
6295 res.qt = bool_qt;
6296 try res.implicitCast(p, .int_to_bool, tok);
6297 } else if (src_sk.isFloat()) {
6298 const old_val = res.val;
6299 const value_change_kind = try res.val.floatToInt(bool_qt, p.comp);
6300 try res.floatToIntWarning(p, bool_qt, old_val, value_change_kind, tok);
6301 if (!src_sk.isReal()) {
6302 res.qt = res.qt.toReal(p.comp);
6303 try res.implicitCast(p, .complex_float_to_real, tok);
6304 }
6305 res.qt = bool_qt;
6306 try res.implicitCast(p, .float_to_bool, tok);
6307 }
6308 }
6309
6310 fn castToInt(res: *Result, p: *Parser, int_qt: QualType, tok: TokenIndex) Error!void {
6311 if (res.qt.isInvalid()) return;
6312 std.debug.assert(!int_qt.isInvalid());
6313 if (int_qt.hasIncompleteSize(p.comp)) {
6314 return error.ParsingFailed; // Cast to incomplete enum, diagnostic already issued
6315 }
6316
6317 const src_sk = res.qt.scalarKind(p.comp);
6318 const dest_sk = int_qt.scalarKind(p.comp);
6319
6320 if (src_sk == .bool) {
6321 res.qt = int_qt.toReal(p.comp);
6322 try res.implicitCast(p, .bool_to_int, tok);
6323 if (!dest_sk.isReal()) {
6324 res.qt = int_qt;
6325 try res.implicitCast(p, .real_to_complex_int, tok);
6326 }
6327 } else if (src_sk.isPointer()) {
6328 res.val = .{};
6329 res.qt = int_qt.toReal(p.comp);
6330 try res.implicitCast(p, .pointer_to_int, tok);
6331 if (!dest_sk.isReal()) {
6332 res.qt = int_qt;
6333 try res.implicitCast(p, .real_to_complex_int, tok);
6334 }
6335 } else if (res.qt.isFloat(p.comp)) {
6336 const old_val = res.val;
6337 const value_change_kind = try res.val.floatToInt(int_qt, p.comp);
6338 try res.floatToIntWarning(p, int_qt, old_val, value_change_kind, tok);
6339 if (src_sk.isReal() and dest_sk.isReal()) {
6340 res.qt = int_qt;
6341 try res.implicitCast(p, .float_to_int, tok);
6342 } else if (src_sk.isReal()) {
6343 res.qt = int_qt.toReal(p.comp);
6344 try res.implicitCast(p, .float_to_int, tok);
6345 res.qt = int_qt;
6346 try res.implicitCast(p, .real_to_complex_int, tok);
6347 } else if (dest_sk.isReal()) {
6348 res.qt = res.qt.toReal(p.comp);
6349 try res.implicitCast(p, .complex_float_to_real, tok);
6350 res.qt = int_qt;
6351 try res.implicitCast(p, .float_to_int, tok);
56646352 } else {
5665 res.ty = int_ty;
5666 try res.implicitCast(p, .complex_float_to_complex_int);
6353 res.qt = int_qt;
6354 try res.implicitCast(p, .complex_float_to_complex_int, tok);
56676355 }
5668 } else if (!res.ty.eql(int_ty, p.comp, true)) {
6356 } else if (!res.qt.eql(int_qt, p.comp)) {
56696357 const old_val = res.val;
5670 const value_change_kind = try res.val.intCast(int_ty, p.comp);
6358 const value_change_kind = try res.val.intCast(int_qt, p.comp);
56716359 switch (value_change_kind) {
56726360 .none => {},
5673 .truncated => try p.errStr(.int_value_changed, tok, try p.valueChangedStr(res, old_val, int_ty)),
5674 .sign_changed => try p.errStr(.sign_conversion, tok, try p.typePairStrExtra(res.ty, " to ", int_ty)),
5675 }
5676
5677 const old_real = res.ty.isReal();
5678 const new_real = int_ty.isReal();
5679 if (old_real and new_real) {
5680 res.ty = int_ty;
5681 try res.implicitCast(p, .int_cast);
5682 } else if (old_real) {
5683 const real_int_ty = int_ty.makeReal();
5684 if (!res.ty.eql(real_int_ty, p.comp, false)) {
5685 res.ty = real_int_ty;
5686 try res.implicitCast(p, .int_cast);
6361 .truncated => try p.errValueChanged(tok, .int_value_changed, res.*, old_val, int_qt),
6362 .sign_changed => try p.err(tok, .sign_conversion, .{ res.qt, int_qt }),
6363 }
6364
6365 if (src_sk.isReal() and dest_sk.isReal()) {
6366 res.qt = int_qt;
6367 try res.implicitCast(p, .int_cast, tok);
6368 } else if (src_sk.isReal()) {
6369 const real_int_qt = int_qt.toReal(p.comp);
6370 if (!res.qt.eql(real_int_qt, p.comp)) {
6371 res.qt = real_int_qt;
6372 try res.implicitCast(p, .int_cast, tok);
56876373 }
5688 res.ty = int_ty;
5689 try res.implicitCast(p, .real_to_complex_int);
5690 } else if (new_real) {
5691 res.ty = res.ty.makeReal();
5692 try res.implicitCast(p, .complex_int_to_real);
5693 res.ty = int_ty;
5694 try res.implicitCast(p, .int_cast);
6374 res.qt = int_qt;
6375 try res.implicitCast(p, .real_to_complex_int, tok);
6376 } else if (dest_sk.isReal()) {
6377 res.qt = res.qt.toReal(p.comp);
6378 try res.implicitCast(p, .complex_int_to_real, tok);
6379 res.qt = int_qt;
6380 try res.implicitCast(p, .int_cast, tok);
56956381 } else {
5696 res.ty = int_ty;
5697 try res.implicitCast(p, .complex_int_cast);
6382 res.qt = int_qt;
6383 try res.implicitCast(p, .complex_int_cast, tok);
56986384 }
56996385 }
57006386 }
57016387
5702 fn floatToIntWarning(res: *Result, p: *Parser, int_ty: Type, old_value: Value, change_kind: Value.FloatToIntChangeKind, tok: TokenIndex) Error!void {
6388 fn floatToIntWarning(
6389 res: Result,
6390 p: *Parser,
6391 int_qt: QualType,
6392 old_val: Value,
6393 change_kind: Value.FloatToIntChangeKind,
6394 tok: TokenIndex,
6395 ) !void {
57036396 switch (change_kind) {
5704 .none => return p.errStr(.float_to_int, tok, try p.typePairStrExtra(res.ty, " to ", int_ty)),
5705 .out_of_range => return p.errStr(.float_out_of_range, tok, try p.typePairStrExtra(res.ty, " to ", int_ty)),
5706 .overflow => return p.errStr(.float_overflow_conversion, tok, try p.typePairStrExtra(res.ty, " to ", int_ty)),
5707 .nonzero_to_zero => return p.errStr(.float_zero_conversion, tok, try p.valueChangedStr(res, old_value, int_ty)),
5708 .value_changed => return p.errStr(.float_value_changed, tok, try p.valueChangedStr(res, old_value, int_ty)),
5709 }
5710 }
5711
5712 fn floatCast(res: *Result, p: *Parser, float_ty: Type) Error!void {
5713 if (res.ty.is(.bool)) {
5714 try res.val.intToFloat(float_ty, p.comp);
5715 res.ty = float_ty.makeReal();
5716 try res.implicitCast(p, .bool_to_float);
5717 if (!float_ty.isReal()) {
5718 res.ty = float_ty;
5719 try res.implicitCast(p, .real_to_complex_float);
5720 }
5721 } else if (res.ty.isInt()) {
5722 try res.val.intToFloat(float_ty, p.comp);
5723 const old_real = res.ty.isReal();
5724 const new_real = float_ty.isReal();
5725 if (old_real and new_real) {
5726 res.ty = float_ty;
5727 try res.implicitCast(p, .int_to_float);
5728 } else if (old_real) {
5729 res.ty = float_ty.makeReal();
5730 try res.implicitCast(p, .int_to_float);
5731 res.ty = float_ty;
5732 try res.implicitCast(p, .real_to_complex_float);
5733 } else if (new_real) {
5734 res.ty = res.ty.makeReal();
5735 try res.implicitCast(p, .complex_int_to_real);
5736 res.ty = float_ty;
5737 try res.implicitCast(p, .int_to_float);
6397 .none => return p.err(tok, .float_to_int, .{ res.qt, int_qt }),
6398 .out_of_range => return p.err(tok, .float_out_of_range, .{ res.qt, int_qt }),
6399 .overflow => return p.err(tok, .float_overflow_conversion, .{ res.qt, int_qt }),
6400 .nonzero_to_zero => return p.errValueChanged(tok, .float_zero_conversion, res, old_val, int_qt),
6401 .value_changed => return p.errValueChanged(tok, .float_value_changed, res, old_val, int_qt),
6402 }
6403 }
6404
6405 fn castToFloat(res: *Result, p: *Parser, float_qt: QualType, tok: TokenIndex) Error!void {
6406 const src_sk = res.qt.scalarKind(p.comp);
6407 const dest_sk = float_qt.scalarKind(p.comp);
6408
6409 if (src_sk == .bool) {
6410 try res.val.intToFloat(float_qt, p.comp);
6411 res.qt = float_qt.toReal(p.comp);
6412 try res.implicitCast(p, .bool_to_float, tok);
6413 if (!dest_sk.isReal()) {
6414 res.qt = float_qt;
6415 try res.implicitCast(p, .real_to_complex_float, tok);
6416 }
6417 } else if (src_sk.isInt()) {
6418 try res.val.intToFloat(float_qt, p.comp);
6419 if (src_sk.isReal() and dest_sk.isReal()) {
6420 res.qt = float_qt;
6421 try res.implicitCast(p, .int_to_float, tok);
6422 } else if (src_sk.isReal()) {
6423 res.qt = float_qt.toReal(p.comp);
6424 try res.implicitCast(p, .int_to_float, tok);
6425 res.qt = float_qt;
6426 try res.implicitCast(p, .real_to_complex_float, tok);
6427 } else if (dest_sk.isReal()) {
6428 res.qt = res.qt.toReal(p.comp);
6429 try res.implicitCast(p, .complex_int_to_real, tok);
6430 res.qt = float_qt;
6431 try res.implicitCast(p, .int_to_float, tok);
57386432 } else {
5739 res.ty = float_ty;
5740 try res.implicitCast(p, .complex_int_to_complex_float);
5741 }
5742 } else if (!res.ty.eql(float_ty, p.comp, true)) {
5743 try res.val.floatCast(float_ty, p.comp);
5744 const old_real = res.ty.isReal();
5745 const new_real = float_ty.isReal();
5746 if (old_real and new_real) {
5747 res.ty = float_ty;
5748 try res.implicitCast(p, .float_cast);
5749 } else if (old_real) {
5750 if (res.ty.floatRank() != float_ty.floatRank()) {
5751 res.ty = float_ty.makeReal();
5752 try res.implicitCast(p, .float_cast);
6433 res.qt = float_qt;
6434 try res.implicitCast(p, .complex_int_to_complex_float, tok);
6435 }
6436 } else if (!res.qt.eql(float_qt, p.comp)) {
6437 try res.val.floatCast(float_qt, p.comp);
6438 if (src_sk.isReal() and dest_sk.isReal()) {
6439 res.qt = float_qt;
6440 try res.implicitCast(p, .float_cast, tok);
6441 } else if (src_sk.isReal()) {
6442 if (res.qt.floatRank(p.comp) != float_qt.floatRank(p.comp)) {
6443 res.qt = float_qt.toReal(p.comp);
6444 try res.implicitCast(p, .float_cast, tok);
57536445 }
5754 res.ty = float_ty;
5755 try res.implicitCast(p, .real_to_complex_float);
5756 } else if (new_real) {
5757 res.ty = res.ty.makeReal();
5758 try res.implicitCast(p, .complex_float_to_real);
5759 if (res.ty.floatRank() != float_ty.floatRank()) {
5760 res.ty = float_ty;
5761 try res.implicitCast(p, .float_cast);
6446 res.qt = float_qt;
6447 try res.implicitCast(p, .real_to_complex_float, tok);
6448 } else if (dest_sk.isReal()) {
6449 res.qt = res.qt.toReal(p.comp);
6450 try res.implicitCast(p, .complex_float_to_real, tok);
6451 if (res.qt.floatRank(p.comp) != float_qt.floatRank(p.comp)) {
6452 res.qt = float_qt;
6453 try res.implicitCast(p, .float_cast, tok);
57626454 }
57636455 } else {
5764 res.ty = float_ty;
5765 try res.implicitCast(p, .complex_float_cast);
6456 res.qt = float_qt;
6457 try res.implicitCast(p, .complex_float_cast, tok);
57666458 }
57676459 }
57686460 }
57696461
57706462 /// Converts a bool or integer to a pointer
5771 fn ptrCast(res: *Result, p: *Parser, ptr_ty: Type) Error!void {
5772 if (res.ty.is(.bool)) {
5773 res.ty = ptr_ty;
5774 try res.implicitCast(p, .bool_to_pointer);
5775 } else if (res.ty.isInt()) {
5776 _ = try res.val.intCast(ptr_ty, p.comp);
5777 res.ty = ptr_ty;
5778 try res.implicitCast(p, .int_to_pointer);
6463 fn castToPointer(res: *Result, p: *Parser, ptr_qt: QualType, tok: TokenIndex) Error!void {
6464 const src_sk = res.qt.scalarKind(p.comp);
6465 if (src_sk == .bool) {
6466 res.qt = ptr_qt;
6467 try res.implicitCast(p, .bool_to_pointer, tok);
6468 } else if (src_sk.isInt()) {
6469 _ = try res.val.intCast(ptr_qt, p.comp);
6470 res.qt = ptr_qt;
6471 try res.implicitCast(p, .int_to_pointer, tok);
6472 } else if (src_sk == .nullptr_t) {
6473 try res.nullToPointer(p, ptr_qt, tok);
6474 } else if (src_sk.isPointer() and !res.qt.eql(ptr_qt, p.comp)) {
6475 if (ptr_qt.is(p.comp, .nullptr_t)) {
6476 res.qt = .invalid;
6477 return;
6478 }
6479
6480 const src_elem = res.qt.childType(p.comp);
6481 const dest_elem = ptr_qt.childType(p.comp);
6482 res.qt = ptr_qt;
6483
6484 if (dest_elem.eql(src_elem, p.comp) and
6485 (dest_elem.@"const" == src_elem.@"const" or dest_elem.@"const") and
6486 (dest_elem.@"volatile" == src_elem.@"volatile" or dest_elem.@"volatile"))
6487 {
6488 // Gaining qualifiers is a no-op.
6489 try res.implicitCast(p, .no_op, tok);
6490 } else {
6491 try res.implicitCast(p, .bitcast, tok);
6492 }
57796493 }
57806494 }
57816495
5782 /// Convert pointer to one with a different child type
5783 fn ptrChildTypeCast(res: *Result, p: *Parser, ptr_ty: Type) Error!void {
5784 res.ty = ptr_ty;
5785 return res.implicitCast(p, .bitcast);
5786 }
5787
5788 fn toVoid(res: *Result, p: *Parser) Error!void {
5789 if (!res.ty.is(.void)) {
5790 res.ty = .{ .specifier = .void };
5791 try res.implicitCast(p, .to_void);
6496 fn castToVoid(res: *Result, p: *Parser, tok: TokenIndex) Error!void {
6497 if (!res.qt.is(p.comp, .void)) {
6498 res.qt = .void;
6499 try res.implicitCast(p, .to_void, tok);
57926500 }
57936501 }
57946502
5795 fn nullCast(res: *Result, p: *Parser, ptr_ty: Type) Error!void {
5796 if (!res.ty.is(.nullptr_t) and !res.val.isZero(p.comp)) return;
5797 res.ty = ptr_ty;
5798 try res.implicitCast(p, .null_to_pointer);
6503 fn nullToPointer(res: *Result, p: *Parser, ptr_ty: QualType, tok: TokenIndex) Error!void {
6504 if (!res.qt.is(p.comp, .nullptr_t) and !res.val.isZero(p.comp)) return;
6505 res.val = .null;
6506 res.qt = ptr_ty;
6507 try res.implicitCast(p, .null_to_pointer, tok);
57996508 }
58006509
58016510 fn usualUnaryConversion(res: *Result, p: *Parser, tok: TokenIndex) Error!void {
5802 if (res.ty.isFloat()) fp_eval: {
6511 if (res.qt.isInvalid()) return;
6512 if (res.qt.isFloat(p.comp)) fp_eval: {
58036513 const eval_method = p.comp.langopts.fp_eval_method orelse break :fp_eval;
58046514 switch (eval_method) {
58056515 .source => {},
58066516 .indeterminate => unreachable,
58076517 .double => {
5808 if (res.ty.floatRank() < (Type{ .specifier = .double }).floatRank()) {
5809 const spec: Type.Specifier = if (res.ty.isReal()) .double else .complex_double;
5810 return res.floatCast(p, .{ .specifier = spec });
6518 if (res.qt.floatRank(p.comp) < QualType.double.floatRank(p.comp)) {
6519 var res_qt: QualType = .double;
6520 if (res.qt.is(p.comp, .complex)) res_qt = try res_qt.toComplex(p.comp);
6521 return res.castToFloat(p, res_qt, tok);
58116522 }
58126523 },
58136524 .extended => {
5814 if (res.ty.floatRank() < (Type{ .specifier = .long_double }).floatRank()) {
5815 const spec: Type.Specifier = if (res.ty.isReal()) .long_double else .complex_long_double;
5816 return res.floatCast(p, .{ .specifier = spec });
6525 if (res.qt.floatRank(p.comp) < QualType.long_double.floatRank(p.comp)) {
6526 var res_qt: QualType = .long_double;
6527 if (res.qt.is(p.comp, .complex)) res_qt = try res_qt.toComplex(p.comp);
6528 return res.castToFloat(p, res_qt, tok);
58176529 }
58186530 },
58196531 }
58206532 }
58216533
5822 if (res.ty.is(.fp16) and !p.comp.langopts.use_native_half_type) {
5823 return res.floatCast(p, .{ .specifier = .float });
6534 if (!p.comp.langopts.use_native_half_type) {
6535 if (res.qt.get(p.comp, .float)) |float_ty| {
6536 if (float_ty == .fp16) {
6537 return res.castToFloat(p, .float, tok);
6538 }
6539 }
58246540 }
5825 if (res.ty.isInt()) {
5826 if (p.tmpTree().bitfieldWidth(res.node, true)) |width| {
5827 if (res.ty.bitfieldPromotion(p.comp, width)) |promotion_ty| {
5828 return res.intCast(p, promotion_ty, tok);
6541
6542 if (res.qt.isInt(p.comp) and !p.in_macro) {
6543 if (p.tree.bitfieldWidth(res.node, true)) |width| {
6544 if (res.qt.promoteBitfield(p.comp, width)) |promotion_ty| {
6545 return res.castToInt(p, promotion_ty, tok);
58296546 }
58306547 }
5831 return res.intCast(p, res.ty.integerPromotion(p.comp), tok);
6548 return res.castToInt(p, res.qt.promoteInt(p.comp), tok);
58326549 }
58336550 }
58346551
......@@ -5837,70 +6554,88 @@ pub const Result = struct {
58376554 try b.usualUnaryConversion(p, tok);
58386555
58396556 // if either is a float cast to that type
5840 if (a.ty.isFloat() or b.ty.isFloat()) {
5841 const float_types = [6][2]Type.Specifier{
5842 .{ .complex_long_double, .long_double },
5843 .{ .complex_float128, .float128 },
5844 .{ .complex_double, .double },
5845 .{ .complex_float, .float },
5846 // No `_Complex __fp16` type
5847 .{ .invalid, .fp16 },
5848 .{ .complex_float16, .float16 },
5849 };
5850 const a_spec = a.ty.canonicalize(.standard).specifier;
5851 const b_spec = b.ty.canonicalize(.standard).specifier;
5852 if (p.comp.target.cTypeBitSize(.longdouble) == 128) {
5853 if (try a.floatConversion(b, a_spec, b_spec, p, float_types[0])) return;
5854 }
5855 if (try a.floatConversion(b, a_spec, b_spec, p, float_types[1])) return;
5856 if (p.comp.target.cTypeBitSize(.longdouble) == 80) {
5857 if (try a.floatConversion(b, a_spec, b_spec, p, float_types[0])) return;
5858 }
5859 if (try a.floatConversion(b, a_spec, b_spec, p, float_types[2])) return;
5860 if (p.comp.target.cTypeBitSize(.longdouble) == 64) {
5861 if (try a.floatConversion(b, a_spec, b_spec, p, float_types[0])) return;
5862 }
5863 if (try a.floatConversion(b, a_spec, b_spec, p, float_types[3])) return;
5864 if (try a.floatConversion(b, a_spec, b_spec, p, float_types[4])) return;
5865 if (try a.floatConversion(b, a_spec, b_spec, p, float_types[5])) return;
5866 unreachable;
6557 const a_float = a.qt.isFloat(p.comp);
6558 const b_float = b.qt.isFloat(p.comp);
6559 if (a_float and b_float) {
6560 const a_complex = a.qt.is(p.comp, .complex);
6561 const b_complex = b.qt.is(p.comp, .complex);
6562
6563 const res_qt = if (a.qt.floatRank(p.comp) > b.qt.floatRank(p.comp))
6564 (if (!a_complex and b_complex)
6565 try a.qt.toComplex(p.comp)
6566 else
6567 a.qt)
6568 else
6569 (if (!b_complex and a_complex)
6570 try b.qt.toComplex(p.comp)
6571 else
6572 b.qt);
6573
6574 try a.castToFloat(p, res_qt, tok);
6575 try b.castToFloat(p, res_qt, tok);
6576 return;
6577 } else if (a_float) {
6578 try b.castToFloat(p, a.qt, tok);
6579 return;
6580 } else if (b_float) {
6581 try a.castToFloat(p, b.qt, tok);
6582 return;
58676583 }
58686584
5869 if (a.ty.eql(b.ty, p.comp, true)) {
6585 if (a.qt.eql(b.qt, p.comp)) {
58706586 // cast to promoted type
5871 try a.intCast(p, a.ty, tok);
5872 try b.intCast(p, b.ty, tok);
6587 try a.castToInt(p, a.qt, tok);
6588 try b.castToInt(p, b.qt, tok);
58736589 return;
58746590 }
58756591
5876 const target = a.ty.integerConversion(b.ty, p.comp);
5877 if (!target.isReal()) {
5878 try a.saveValue(p);
5879 try b.saveValue(p);
6592 const a_real = a.qt.toReal(p.comp);
6593 const b_real = b.qt.toReal(p.comp);
6594
6595 const type_order = a.qt.intRankOrder(b.qt, p.comp);
6596 const a_signed = a.qt.signedness(p.comp) == .signed;
6597 const b_signed = b.qt.signedness(p.comp) == .signed;
6598
6599 var target_qt: QualType = .invalid;
6600 if (a_signed == b_signed) {
6601 // If both have the same sign, use higher-rank type.
6602 target_qt = switch (type_order) {
6603 .lt => b.qt,
6604 .eq, .gt => a_real,
6605 };
6606 } else if (type_order != if (a_signed) std.math.Order.gt else std.math.Order.lt) {
6607 // Only one is signed; and the unsigned type has rank >= the signed type
6608 // Use the unsigned type
6609 target_qt = if (b_signed) a_real else b_real;
6610 } else if (a_real.bitSizeof(p.comp) != b_real.bitSizeof(p.comp)) {
6611 // Signed type is higher rank and sizes are not equal
6612 // Use the signed type
6613 target_qt = if (a_signed) a_real else b_real;
6614 } else {
6615 // Signed type is higher rank but same size as unsigned type
6616 // e.g. `long` and `unsigned` on x86-linux-gnu
6617 // Use unsigned version of the signed type
6618 target_qt = if (a_signed) try a_real.makeIntUnsigned(p.comp) else try b_real.makeIntUnsigned(p.comp);
58806619 }
5881 try a.intCast(p, target, tok);
5882 try b.intCast(p, target, tok);
5883 }
58846620
5885 fn floatConversion(a: *Result, b: *Result, a_spec: Type.Specifier, b_spec: Type.Specifier, p: *Parser, pair: [2]Type.Specifier) !bool {
5886 if (a_spec == pair[0] or a_spec == pair[1] or
5887 b_spec == pair[0] or b_spec == pair[1])
5888 {
5889 const both_real = a.ty.isReal() and b.ty.isReal();
5890 const res_spec = pair[@intFromBool(both_real)];
5891 const ty = Type{ .specifier = res_spec };
5892 try a.floatCast(p, ty);
5893 try b.floatCast(p, ty);
5894 return true;
6621 if (a.qt.is(p.comp, .complex) or b.qt.is(p.comp, .complex)) {
6622 target_qt = try target_qt.toComplex(p.comp);
58956623 }
5896 return false;
6624
6625 if (target_qt.is(p.comp, .complex)) {
6626 // TODO implement complex int values
6627 try a.saveValue(p);
6628 try b.saveValue(p);
6629 }
6630 try a.castToInt(p, target_qt, tok);
6631 try b.castToInt(p, target_qt, tok);
58976632 }
58986633
58996634 fn invalidBinTy(a: *Result, tok: TokenIndex, b: *Result, p: *Parser) Error!bool {
5900 try p.errStr(.invalid_bin_types, tok, try p.typePairStr(a.ty, b.ty));
6635 try p.err(tok, .invalid_bin_types, .{ a.qt, b.qt });
59016636 a.val = .{};
59026637 b.val = .{};
5903 a.ty = Type.invalid;
6638 a.qt = .invalid;
59046639 return false;
59056640 }
59066641
......@@ -5917,168 +6652,213 @@ pub const Result = struct {
59176652 /// Saves value and replaces it with `.unavailable`.
59186653 fn saveValue(res: *Result, p: *Parser) !void {
59196654 assert(!p.in_macro);
5920 if (res.val.opt_ref == .none or res.val.opt_ref == .null) return;
5921 if (!p.in_macro) try p.value_map.put(res.node, res.val);
6655 try res.putValue(p);
59226656 res.val = .{};
59236657 }
59246658
5925 fn castType(res: *Result, p: *Parser, to: Type, operand_tok: TokenIndex, l_paren: TokenIndex) Error!void {
5926 var cast_kind: Tree.CastKind = undefined;
6659 /// Saves value without altering the result.
6660 fn putValue(res: *const Result, p: *Parser) !void {
6661 if (res.val.opt_ref == .none or res.val.opt_ref == .null) return;
6662 if (!p.in_macro) try p.tree.value_map.put(p.gpa, res.node, res.val);
6663 }
6664
6665 fn castType(res: *Result, p: *Parser, dest_qt: QualType, operand_tok: TokenIndex, l_paren: TokenIndex) !void {
6666 if (res.qt.isInvalid()) {
6667 res.val = .{};
6668 return;
6669 } else if (dest_qt.isInvalid()) {
6670 res.val = .{};
6671 res.qt = .invalid;
6672 return;
6673 }
6674 var cast_kind: Node.Cast.Kind = undefined;
59276675
5928 if (to.is(.void)) {
6676 const dest_sk = dest_qt.scalarKind(p.comp);
6677 const src_sk = res.qt.scalarKind(p.comp);
6678
6679 const dest_vec = dest_qt.is(p.comp, .vector);
6680 const src_vec = res.qt.is(p.comp, .vector);
6681
6682 if (dest_qt.is(p.comp, .void)) {
59296683 // everything can cast to void
59306684 cast_kind = .to_void;
59316685 res.val = .{};
5932 } else if (to.is(.nullptr_t)) {
5933 if (res.ty.is(.nullptr_t)) {
6686 } else if (res.qt.is(p.comp, .void)) {
6687 try p.err(operand_tok, .invalid_cast_operand_type, .{res.qt});
6688 return error.ParsingFailed;
6689 } else if (dest_vec and src_vec) {
6690 if (dest_qt.eql(res.qt, p.comp)) {
6691 cast_kind = .no_op;
6692 } else if (dest_qt.sizeCompare(res.qt, p.comp) == .eq) {
6693 cast_kind = .bitcast;
6694 } else {
6695 try p.err(l_paren, .invalid_vec_conversion, .{ dest_qt, res.qt });
6696 return error.ParsingFailed;
6697 }
6698 } else if (dest_vec or src_vec) {
6699 const non_vec_sk = if (dest_vec) src_sk else dest_sk;
6700 const vec_qt = if (dest_vec) dest_qt else res.qt;
6701 const non_vec_qt = if (dest_vec) res.qt else dest_qt;
6702 const non_vec_tok = if (dest_vec) operand_tok else l_paren;
6703 if (non_vec_sk == .none) {
6704 try p.err(non_vec_tok, .invalid_cast_operand_type, .{non_vec_qt});
6705 return error.ParsingFailed;
6706 } else if (!non_vec_sk.isInt()) {
6707 try p.err(non_vec_tok, .invalid_vec_conversion_scalar, .{ vec_qt, non_vec_qt });
6708 return error.ParsingFailed;
6709 } else if (dest_qt.sizeCompare(res.qt, p.comp) != .eq) {
6710 try p.err(non_vec_tok, .invalid_vec_conversion_int, .{ vec_qt, non_vec_qt });
6711 return error.ParsingFailed;
6712 } else {
6713 cast_kind = .bitcast;
6714 }
6715 } else if (dest_sk == .nullptr_t) {
6716 res.val = .{};
6717 if (src_sk == .nullptr_t) {
59346718 cast_kind = .no_op;
59356719 } else {
5936 try p.errStr(.invalid_object_cast, l_paren, try p.typePairStrExtra(res.ty, " to ", to));
6720 try p.err(l_paren, .invalid_object_cast, .{ res.qt, dest_qt });
59376721 return error.ParsingFailed;
59386722 }
5939 } else if (res.ty.is(.nullptr_t)) {
5940 if (to.is(.bool)) {
5941 try res.nullCast(p, res.ty);
6723 } else if (src_sk == .nullptr_t) {
6724 if (dest_sk == .bool) {
6725 try res.nullToPointer(p, res.qt, l_paren);
59426726 res.val.boolCast(p.comp);
5943 res.ty = .{ .specifier = .bool };
5944 try res.implicitCast(p, .pointer_to_bool);
6727 res.qt = .bool;
6728 try res.implicitCast(p, .pointer_to_bool, l_paren);
59456729 try res.saveValue(p);
5946 } else if (to.isPtr()) {
5947 try res.nullCast(p, to);
6730 } else if (dest_sk.isPointer()) {
6731 try res.nullToPointer(p, dest_qt, l_paren);
59486732 } else {
5949 try p.errStr(.invalid_object_cast, l_paren, try p.typePairStrExtra(res.ty, " to ", to));
6733 try p.err(l_paren, .invalid_object_cast, .{ res.qt, dest_qt });
59506734 return error.ParsingFailed;
59516735 }
59526736 cast_kind = .no_op;
5953 } else if (res.val.isZero(p.comp) and to.isPtr()) {
6737 } else if (res.val.isZero(p.comp) and dest_sk.isPointer()) {
59546738 cast_kind = .null_to_pointer;
5955 } else if (to.isScalar()) cast: {
5956 const old_float = res.ty.isFloat();
5957 const new_float = to.isFloat();
5958
5959 if (new_float and res.ty.isPtr()) {
5960 try p.errStr(.invalid_cast_to_float, l_paren, try p.typeStr(to));
6739 } else if (dest_sk != .none) cast: {
6740 if (dest_sk.isFloat() and src_sk.isPointer()) {
6741 try p.err(l_paren, .invalid_cast_to_float, .{dest_qt});
59616742 return error.ParsingFailed;
5962 } else if (old_float and to.isPtr()) {
5963 try p.errStr(.invalid_cast_to_pointer, l_paren, try p.typeStr(res.ty));
6743 } else if ((src_sk.isFloat() or !src_sk.isReal()) and dest_sk.isPointer()) {
6744 try p.err(l_paren, .invalid_cast_to_pointer, .{res.qt});
59646745 return error.ParsingFailed;
59656746 }
5966 const old_real = res.ty.isReal();
5967 const new_real = to.isReal();
59686747
5969 if (to.eql(res.ty, p.comp, false)) {
6748 if (dest_qt.eql(res.qt, p.comp)) {
59706749 cast_kind = .no_op;
5971 } else if (to.is(.bool)) {
5972 if (res.ty.isPtr()) {
6750 } else if (dest_sk == .bool) {
6751 if (src_sk.isPointer()) {
59736752 cast_kind = .pointer_to_bool;
5974 } else if (res.ty.isInt()) {
5975 if (!old_real) {
5976 res.ty = res.ty.makeReal();
5977 try res.implicitCast(p, .complex_int_to_real);
6753 } else if (src_sk.isInt()) {
6754 if (!src_sk.isReal()) {
6755 res.qt = res.qt.toReal(p.comp);
6756 try res.implicitCast(p, .complex_int_to_real, l_paren);
59786757 }
59796758 cast_kind = .int_to_bool;
5980 } else if (old_float) {
5981 if (!old_real) {
5982 res.ty = res.ty.makeReal();
5983 try res.implicitCast(p, .complex_float_to_real);
6759 } else if (src_sk.isFloat()) {
6760 if (!src_sk.isReal()) {
6761 res.qt = res.qt.toReal(p.comp);
6762 try res.implicitCast(p, .complex_float_to_real, l_paren);
59846763 }
59856764 cast_kind = .float_to_bool;
59866765 }
5987 } else if (to.isInt()) {
5988 if (res.ty.is(.bool)) {
5989 if (!new_real) {
5990 res.ty = to.makeReal();
5991 try res.implicitCast(p, .bool_to_int);
6766 } else if (dest_sk.isInt()) {
6767 if (src_sk == .bool) {
6768 if (!dest_sk.isReal()) {
6769 res.qt = dest_qt.toReal(p.comp);
6770 try res.implicitCast(p, .bool_to_int, l_paren);
59926771 cast_kind = .real_to_complex_int;
59936772 } else {
59946773 cast_kind = .bool_to_int;
59956774 }
5996 } else if (res.ty.isInt()) {
5997 if (old_real and new_real) {
6775 } else if (src_sk.isInt()) {
6776 if (src_sk.isReal() and dest_sk.isReal()) {
59986777 cast_kind = .int_cast;
5999 } else if (old_real) {
6000 res.ty = to.makeReal();
6001 try res.implicitCast(p, .int_cast);
6778 } else if (src_sk.isReal()) {
6779 res.qt = dest_qt.toReal(p.comp);
6780 try res.implicitCast(p, .int_cast, l_paren);
60026781 cast_kind = .real_to_complex_int;
6003 } else if (new_real) {
6004 res.ty = res.ty.makeReal();
6005 try res.implicitCast(p, .complex_int_to_real);
6782 } else if (dest_sk.isReal()) {
6783 res.qt = res.qt.toReal(p.comp);
6784 try res.implicitCast(p, .complex_int_to_real, l_paren);
60066785 cast_kind = .int_cast;
60076786 } else {
60086787 cast_kind = .complex_int_cast;
60096788 }
6010 } else if (res.ty.isPtr()) {
6011 if (!new_real) {
6012 res.ty = to.makeReal();
6013 try res.implicitCast(p, .pointer_to_int);
6789 } else if (src_sk.isPointer()) {
6790 res.val = .{};
6791 if (!dest_sk.isReal()) {
6792 res.qt = dest_qt.toReal(p.comp);
6793 try res.implicitCast(p, .pointer_to_int, l_paren);
60146794 cast_kind = .real_to_complex_int;
60156795 } else {
60166796 cast_kind = .pointer_to_int;
60176797 }
6018 } else if (old_real and new_real) {
6798 } else if (src_sk.isReal() and dest_sk.isReal()) {
60196799 cast_kind = .float_to_int;
6020 } else if (old_real) {
6021 res.ty = to.makeReal();
6022 try res.implicitCast(p, .float_to_int);
6800 } else if (src_sk.isReal()) {
6801 res.qt = dest_qt.toReal(p.comp);
6802 try res.implicitCast(p, .float_to_int, l_paren);
60236803 cast_kind = .real_to_complex_int;
6024 } else if (new_real) {
6025 res.ty = res.ty.makeReal();
6026 try res.implicitCast(p, .complex_float_to_real);
6804 } else if (dest_sk.isReal()) {
6805 res.qt = res.qt.toReal(p.comp);
6806 try res.implicitCast(p, .complex_float_to_real, l_paren);
60276807 cast_kind = .float_to_int;
60286808 } else {
60296809 cast_kind = .complex_float_to_complex_int;
60306810 }
6031 } else if (to.isPtr()) {
6032 if (res.ty.isArray())
6033 cast_kind = .array_to_pointer
6034 else if (res.ty.isPtr())
6035 cast_kind = .bitcast
6036 else if (res.ty.isFunc())
6037 cast_kind = .function_to_pointer
6038 else if (res.ty.is(.bool))
6039 cast_kind = .bool_to_pointer
6040 else if (res.ty.isInt()) {
6041 if (!old_real) {
6042 res.ty = res.ty.makeReal();
6043 try res.implicitCast(p, .complex_int_to_real);
6811 } else if (dest_sk.isPointer()) {
6812 if (src_sk.isPointer()) {
6813 cast_kind = .bitcast;
6814 } else if (src_sk.isInt()) {
6815 if (!src_sk.isReal()) {
6816 res.qt = res.qt.toReal(p.comp);
6817 try res.implicitCast(p, .complex_int_to_real, l_paren);
60446818 }
60456819 cast_kind = .int_to_pointer;
6820 } else if (src_sk == .bool) {
6821 cast_kind = .bool_to_pointer;
6822 } else if (res.qt.is(p.comp, .array)) {
6823 cast_kind = .array_to_pointer;
6824 } else if (res.qt.is(p.comp, .func)) {
6825 cast_kind = .function_to_pointer;
60466826 } else {
6047 try p.errStr(.cond_expr_type, operand_tok, try p.typeStr(res.ty));
6827 try p.err(operand_tok, .invalid_cast_operand_type, .{res.qt});
60486828 return error.ParsingFailed;
60496829 }
6050 } else if (new_float) {
6051 if (res.ty.is(.bool)) {
6052 if (!new_real) {
6053 res.ty = to.makeReal();
6054 try res.implicitCast(p, .bool_to_float);
6830 } else if (dest_sk.isFloat()) {
6831 if (src_sk == .bool) {
6832 if (!dest_sk.isReal()) {
6833 res.qt = dest_qt.toReal(p.comp);
6834 try res.implicitCast(p, .bool_to_float, l_paren);
60556835 cast_kind = .real_to_complex_float;
60566836 } else {
60576837 cast_kind = .bool_to_float;
60586838 }
6059 } else if (res.ty.isInt()) {
6060 if (old_real and new_real) {
6839 } else if (src_sk.isInt()) {
6840 if (src_sk.isReal() and dest_sk.isReal()) {
60616841 cast_kind = .int_to_float;
6062 } else if (old_real) {
6063 res.ty = to.makeReal();
6064 try res.implicitCast(p, .int_to_float);
6842 } else if (src_sk.isReal()) {
6843 res.qt = dest_qt.toReal(p.comp);
6844 try res.implicitCast(p, .int_to_float, l_paren);
60656845 cast_kind = .real_to_complex_float;
6066 } else if (new_real) {
6067 res.ty = res.ty.makeReal();
6068 try res.implicitCast(p, .complex_int_to_real);
6846 } else if (dest_sk.isReal()) {
6847 res.qt = res.qt.toReal(p.comp);
6848 try res.implicitCast(p, .complex_int_to_real, l_paren);
60696849 cast_kind = .int_to_float;
60706850 } else {
60716851 cast_kind = .complex_int_to_complex_float;
60726852 }
6073 } else if (old_real and new_real) {
6853 } else if (src_sk.isReal() and dest_sk.isReal()) {
60746854 cast_kind = .float_cast;
6075 } else if (old_real) {
6076 res.ty = to.makeReal();
6077 try res.implicitCast(p, .float_cast);
6855 } else if (src_sk.isReal()) {
6856 res.qt = dest_qt.toReal(p.comp);
6857 try res.implicitCast(p, .float_cast, l_paren);
60786858 cast_kind = .real_to_complex_float;
6079 } else if (new_real) {
6080 res.ty = res.ty.makeReal();
6081 try res.implicitCast(p, .complex_float_to_real);
6859 } else if (dest_sk.isReal()) {
6860 res.qt = res.qt.toReal(p.comp);
6861 try res.implicitCast(p, .complex_float_to_real, l_paren);
60826862 cast_kind = .float_cast;
60836863 } else {
60846864 cast_kind = .complex_float_cast;
......@@ -6086,67 +6866,71 @@ pub const Result = struct {
60866866 }
60876867 if (res.val.opt_ref == .none) break :cast;
60886868
6089 const old_int = res.ty.isInt() or res.ty.isPtr();
6090 const new_int = to.isInt() or to.isPtr();
6091 if (to.is(.bool)) {
6869 const src_int = src_sk.isInt() or src_sk.isPointer();
6870 const dest_int = dest_sk.isInt() or dest_sk.isPointer();
6871 if (dest_sk == .bool) {
60926872 res.val.boolCast(p.comp);
6093 } else if (old_float and new_int) {
6094 if (to.hasIncompleteSize()) {
6095 try p.errStr(.cast_to_incomplete_type, l_paren, try p.typeStr(to));
6873 } else if (src_sk.isFloat() and dest_int) {
6874 if (dest_qt.hasIncompleteSize(p.comp)) {
6875 try p.err(l_paren, .cast_to_incomplete_type, .{dest_qt});
60966876 return error.ParsingFailed;
60976877 }
60986878 // Explicit cast, no conversion warning
6099 _ = try res.val.floatToInt(to, p.comp);
6100 } else if (new_float and old_int) {
6101 try res.val.intToFloat(to, p.comp);
6102 } else if (new_float and old_float) {
6103 try res.val.floatCast(to, p.comp);
6104 } else if (old_int and new_int) {
6105 if (to.hasIncompleteSize()) {
6106 try p.errStr(.cast_to_incomplete_type, l_paren, try p.typeStr(to));
6879 _ = try res.val.floatToInt(dest_qt, p.comp);
6880 } else if (dest_sk.isFloat() and src_int) {
6881 try res.val.intToFloat(dest_qt, p.comp);
6882 } else if (dest_sk.isFloat() and src_sk.isFloat()) {
6883 try res.val.floatCast(dest_qt, p.comp);
6884 } else if (src_int and dest_int) {
6885 if (dest_qt.hasIncompleteSize(p.comp)) {
6886 try p.err(l_paren, .cast_to_incomplete_type, .{dest_qt});
61076887 return error.ParsingFailed;
61086888 }
6109 _ = try res.val.intCast(to, p.comp);
6889 _ = try res.val.intCast(dest_qt, p.comp);
61106890 }
6111 } else if (to.get(.@"union")) |union_ty| {
6112 if (union_ty.data.record.hasFieldOfType(res.ty, p.comp)) {
6113 cast_kind = .union_cast;
6114 try p.errTok(.gnu_union_cast, l_paren);
6115 } else {
6116 if (union_ty.data.record.isIncomplete()) {
6117 try p.errStr(.cast_to_incomplete_type, l_paren, try p.typeStr(to));
6118 } else {
6119 try p.errStr(.invalid_union_cast, l_paren, try p.typeStr(res.ty));
6120 }
6891 } else if (dest_qt.get(p.comp, .@"union")) |union_ty| {
6892 if (union_ty.layout == null) {
6893 try p.err(l_paren, .cast_to_incomplete_type, .{dest_qt});
61216894 return error.ParsingFailed;
61226895 }
6123 } else {
6124 if (to.is(.auto_type)) {
6125 try p.errTok(.invalid_cast_to_auto_type, l_paren);
6896
6897 for (union_ty.fields) |field| {
6898 if (field.qt.eql(res.qt, p.comp)) {
6899 cast_kind = .union_cast;
6900 try p.err(l_paren, .gnu_union_cast, .{});
6901 break;
6902 }
61266903 } else {
6127 try p.errStr(.invalid_cast_type, l_paren, try p.typeStr(to));
6904 try p.err(l_paren, .invalid_union_cast, .{res.qt});
6905 return error.ParsingFailed;
61286906 }
6907 } else {
6908 try p.err(l_paren, .invalid_cast_type, .{dest_qt});
61296909 return error.ParsingFailed;
61306910 }
6131 if (to.anyQual()) try p.errStr(.qual_cast, l_paren, try p.typeStr(to));
6132 if (to.isInt() and res.ty.isPtr() and to.sizeCompare(res.ty, p.comp) == .lt) {
6133 try p.errStr(.cast_to_smaller_int, l_paren, try p.typePairStrExtra(to, " from ", res.ty));
6911
6912 if (dest_qt.isQualified()) try p.err(l_paren, .qual_cast, .{dest_qt});
6913 if (dest_sk.isInt() and src_sk.isPointer() and dest_qt.sizeCompare(res.qt, p.comp) == .lt) {
6914 try p.err(l_paren, .cast_to_smaller_int, .{ dest_qt, res.qt });
61346915 }
6135 res.ty = to;
6136 res.ty.qual = .{};
6916
6917 res.qt = dest_qt.unqualified();
61376918 res.node = try p.addNode(.{
6138 .tag = .explicit_cast,
6139 .ty = res.ty,
6140 .data = .{ .cast = .{ .operand = res.node, .kind = cast_kind } },
6141 .loc = @enumFromInt(l_paren),
6919 .cast = .{
6920 .l_paren = l_paren,
6921 .qt = res.qt,
6922 .operand = res.node,
6923 .kind = cast_kind,
6924 .implicit = false,
6925 },
61426926 });
61436927 }
61446928
6145 fn intFitsInType(res: Result, p: *Parser, ty: Type) !bool {
6929 fn intFitsInType(res: Result, p: *Parser, ty: QualType) !bool {
61466930 const max_int = try Value.maxInt(ty, p.comp);
61476931 const min_int = try Value.minInt(ty, p.comp);
61486932 return res.val.compare(.lte, max_int, p.comp) and
6149 (res.ty.isUnsignedInt(p.comp) or res.val.compare(.gte, min_int, p.comp));
6933 (res.qt.signedness(p.comp) == .unsigned or res.val.compare(.gte, min_int, p.comp));
61506934 }
61516935
61526936 const CoerceContext = union(enum) {
......@@ -6158,26 +6942,17 @@ pub const Result = struct {
61586942
61596943 fn note(c: CoerceContext, p: *Parser) !void {
61606944 switch (c) {
6161 .arg => |tok| try p.errTok(.parameter_here, tok),
6945 .arg => |tok| try p.err(tok, .parameter_here, .{}),
61626946 .test_coerce => unreachable,
61636947 else => {},
61646948 }
61656949 }
6166
6167 fn typePairStr(c: CoerceContext, p: *Parser, dest_ty: Type, src_ty: Type) ![]const u8 {
6168 switch (c) {
6169 .assign, .init => return p.typePairStrExtra(dest_ty, " from incompatible type ", src_ty),
6170 .ret => return p.typePairStrExtra(src_ty, " from a function with incompatible result type ", dest_ty),
6171 .arg => return p.typePairStrExtra(src_ty, " to parameter of incompatible type ", dest_ty),
6172 .test_coerce => unreachable,
6173 }
6174 }
61756950 };
61766951
61776952 /// Perform assignment-like coercion to `dest_ty`.
6178 fn coerce(res: *Result, p: *Parser, dest_ty: Type, tok: TokenIndex, c: CoerceContext) Error!void {
6179 if (res.ty.specifier == .invalid or dest_ty.specifier == .invalid) {
6180 res.ty = Type.invalid;
6953 fn coerce(res: *Result, p: *Parser, dest_ty: QualType, tok: TokenIndex, c: CoerceContext) Error!void {
6954 if (dest_ty.isInvalid()) {
6955 res.qt = .invalid;
61816956 return;
61826957 }
61836958 return res.coerceExtra(p, dest_ty, tok, c) catch |er| switch (er) {
......@@ -6189,103 +6964,126 @@ pub const Result = struct {
61896964 fn coerceExtra(
61906965 res: *Result,
61916966 p: *Parser,
6192 dest_ty: Type,
6967 dest_qt: QualType,
61936968 tok: TokenIndex,
61946969 c: CoerceContext,
61956970 ) (Error || error{CoercionFailed})!void {
61966971 // Subject of the coercion does not need to be qualified.
6197 var unqual_ty = dest_ty.canonicalize(.standard);
6198 unqual_ty.qual = .{};
6199 if (unqual_ty.is(.nullptr_t)) {
6200 if (res.ty.is(.nullptr_t)) return;
6201 } else if (unqual_ty.is(.bool)) {
6202 if (res.ty.isScalar() and !res.ty.is(.nullptr_t)) {
6972 const src_original_qt = res.qt;
6973 switch (c) {
6974 .init, .ret, .assign => try res.lvalConversion(p, tok),
6975 else => {},
6976 }
6977 if (res.qt.isInvalid()) return;
6978 const dest_unqual = dest_qt.unqualified();
6979 const dest_sk = dest_unqual.scalarKind(p.comp);
6980 const src_sk = res.qt.scalarKind(p.comp);
6981
6982 if (dest_qt.is(p.comp, .vector) and res.qt.is(p.comp, .vector)) {
6983 if (dest_unqual.eql(res.qt, p.comp)) return;
6984 if (dest_unqual.sizeCompare(res.qt, p.comp) == .eq) {
6985 res.qt = dest_unqual;
6986 return res.implicitCast(p, .bitcast, tok);
6987 }
6988 } else if (dest_sk == .nullptr_t) {
6989 if (src_sk == .nullptr_t) return;
6990 } else if (dest_sk == .bool) {
6991 if (src_sk != .none and src_sk != .nullptr_t) {
62036992 // this is ridiculous but it's what clang does
6204 try res.boolCast(p, unqual_ty, tok);
6993 try res.castToBool(p, dest_unqual, tok);
62056994 return;
62066995 }
6207 } else if (unqual_ty.isInt()) {
6208 if (res.ty.isInt() or res.ty.isFloat()) {
6209 try res.intCast(p, unqual_ty, tok);
6996 } else if (dest_sk.isInt()) {
6997 if (src_sk.isInt() or src_sk.isFloat()) {
6998 try res.castToInt(p, dest_unqual, tok);
62106999 return;
6211 } else if (res.ty.isPtr()) {
7000 } else if (src_sk.isPointer()) {
62127001 if (c == .test_coerce) return error.CoercionFailed;
6213 try p.errStr(.implicit_ptr_to_int, tok, try p.typePairStrExtra(res.ty, " to ", dest_ty));
7002 try p.err(tok, .implicit_ptr_to_int, .{ src_original_qt, dest_unqual });
62147003 try c.note(p);
6215 try res.intCast(p, unqual_ty, tok);
7004 try res.castToInt(p, dest_unqual, tok);
62167005 return;
62177006 }
6218 } else if (unqual_ty.isFloat()) {
6219 if (res.ty.isInt() or res.ty.isFloat()) {
6220 try res.floatCast(p, unqual_ty);
7007 } else if (dest_sk.isFloat()) {
7008 if (src_sk.isInt() or src_sk.isFloat()) {
7009 try res.castToFloat(p, dest_unqual, tok);
62217010 return;
62227011 }
6223 } else if (unqual_ty.isPtr()) {
6224 if (res.ty.is(.nullptr_t) or res.val.isZero(p.comp)) {
6225 try res.nullCast(p, dest_ty);
7012 } else if (dest_sk.isPointer()) {
7013 if (src_sk == .nullptr_t or res.val.isZero(p.comp)) {
7014 try res.nullToPointer(p, dest_unqual, tok);
62267015 return;
6227 } else if (res.ty.isInt() and res.ty.isReal()) {
7016 } else if (src_sk.isInt() and src_sk.isReal()) {
62287017 if (c == .test_coerce) return error.CoercionFailed;
6229 try p.errStr(.implicit_int_to_ptr, tok, try p.typePairStrExtra(res.ty, " to ", dest_ty));
7018 try p.err(tok, .implicit_int_to_ptr, .{ src_original_qt, dest_unqual });
62307019 try c.note(p);
6231 try res.ptrCast(p, unqual_ty);
7020 try res.castToPointer(p, dest_unqual, tok);
62327021 return;
6233 } else if (res.ty.isVoidStar() or unqual_ty.eql(res.ty, p.comp, true)) {
6234 return; // ok
6235 } else if (unqual_ty.isVoidStar() and res.ty.isPtr() or (res.ty.isInt() and res.ty.isReal())) {
6236 return; // ok
6237 } else if (unqual_ty.eql(res.ty, p.comp, false)) {
6238 if (!unqual_ty.elemType().qual.hasQuals(res.ty.elemType().qual)) {
6239 try p.errStr(switch (c) {
6240 .assign => .ptr_assign_discards_quals,
6241 .init => .ptr_init_discards_quals,
6242 .ret => .ptr_ret_discards_quals,
6243 .arg => .ptr_arg_discards_quals,
6244 .test_coerce => return error.CoercionFailed,
6245 }, tok, try c.typePairStr(p, dest_ty, res.ty));
7022 } else if (src_sk == .void_pointer or dest_unqual.eql(res.qt, p.comp)) {
7023 return res.castToPointer(p, dest_unqual, tok);
7024 } else if (dest_sk == .void_pointer and src_sk.isPointer()) {
7025 return res.castToPointer(p, dest_unqual, tok);
7026 } else if (src_sk.isPointer()) {
7027 const src_child = res.qt.childType(p.comp);
7028 const dest_child = dest_unqual.childType(p.comp);
7029 if (src_child.eql(dest_child, p.comp)) {
7030 if ((src_child.@"const" and !dest_child.@"const") or
7031 (src_child.@"volatile" and !dest_child.@"volatile") or
7032 (src_child.restrict and !dest_child.restrict))
7033 {
7034 try p.err(tok, switch (c) {
7035 .assign => .ptr_assign_discards_quals,
7036 .init => .ptr_init_discards_quals,
7037 .ret => .ptr_ret_discards_quals,
7038 .arg => .ptr_arg_discards_quals,
7039 .test_coerce => return error.CoercionFailed,
7040 }, .{ dest_qt, src_original_qt });
7041 }
7042 try res.castToPointer(p, dest_unqual, tok);
7043 return;
62467044 }
6247 try res.ptrCast(p, unqual_ty);
6248 return;
6249 } else if (res.ty.isPtr()) {
6250 const different_sign_only = unqual_ty.elemType().sameRankDifferentSign(res.ty.elemType(), p.comp);
6251 try p.errStr(switch (c) {
6252 .assign => ([2]Diagnostics.Tag{ .incompatible_ptr_assign, .incompatible_ptr_assign_sign })[@intFromBool(different_sign_only)],
6253 .init => ([2]Diagnostics.Tag{ .incompatible_ptr_init, .incompatible_ptr_init_sign })[@intFromBool(different_sign_only)],
6254 .ret => ([2]Diagnostics.Tag{ .incompatible_return, .incompatible_return_sign })[@intFromBool(different_sign_only)],
6255 .arg => ([2]Diagnostics.Tag{ .incompatible_ptr_arg, .incompatible_ptr_arg_sign })[@intFromBool(different_sign_only)],
7045
7046 const different_sign_only = src_child.sameRankDifferentSign(dest_child, p.comp);
7047 switch (c) {
7048 .assign => try p.err(tok, if (different_sign_only) .incompatible_ptr_assign_sign else .incompatible_ptr_assign, .{ dest_qt, src_original_qt }),
7049 .init => try p.err(tok, if (different_sign_only) .incompatible_ptr_init_sign else .incompatible_ptr_init, .{ dest_qt, src_original_qt }),
7050 .ret => try p.err(tok, if (different_sign_only) .incompatible_return_sign else .incompatible_return, .{ src_original_qt, dest_qt }),
7051 .arg => try p.err(tok, if (different_sign_only) .incompatible_ptr_arg_sign else .incompatible_ptr_arg, .{ src_original_qt, dest_qt }),
62567052 .test_coerce => return error.CoercionFailed,
6257 }, tok, try c.typePairStr(p, dest_ty, res.ty));
7053 }
62587054 try c.note(p);
6259 try res.ptrChildTypeCast(p, unqual_ty);
6260 return;
7055
7056 res.qt = dest_unqual;
7057 return res.implicitCast(p, .bitcast, tok);
62617058 }
6262 } else if (unqual_ty.isRecord()) {
6263 if (unqual_ty.eql(res.ty, p.comp, false)) {
7059 } else if (dest_unqual.getRecord(p.comp) != null) {
7060 if (dest_unqual.eql(res.qt, p.comp)) {
62647061 return; // ok
62657062 }
62667063
6267 if (c == .arg) if (unqual_ty.get(.@"union")) |union_ty| {
6268 if (dest_ty.hasAttribute(.transparent_union)) transparent_union: {
6269 res.coerceExtra(p, union_ty.data.record.fields[0].ty, tok, .test_coerce) catch |er| switch (er) {
7064 if (c == .arg) if (dest_unqual.get(p.comp, .@"union")) |union_ty| {
7065 if (dest_unqual.hasAttribute(p.comp, .transparent_union)) transparent_union: {
7066 res.coerceExtra(p, union_ty.fields[0].qt, tok, .test_coerce) catch |er| switch (er) {
62707067 error.CoercionFailed => break :transparent_union,
62717068 else => |e| return e,
62727069 };
6273 res.node = try p.addNode(.{
6274 .tag = .union_init_expr,
6275 .ty = dest_ty,
6276 .data = .{ .union_init = .{ .field_index = 0, .node = res.node } },
6277 });
6278 res.ty = dest_ty;
7070 res.node = try p.addNode(.{ .union_init_expr = .{
7071 .field_index = 0,
7072 .initializer = res.node,
7073 .l_brace_tok = tok,
7074 .union_qt = dest_unqual,
7075 } });
7076 res.qt = dest_unqual;
62797077 return;
62807078 }
62817079 };
6282 } else if (unqual_ty.is(.vector)) {
6283 if (unqual_ty.eql(res.ty, p.comp, false)) {
7080 } else if (dest_unqual.is(p.comp, .vector)) {
7081 if (dest_unqual.eql(res.qt, p.comp)) {
62847082 return; // ok
62857083 }
62867084 } else {
6287 if (c == .assign and (unqual_ty.isArray() or unqual_ty.isFunc())) {
6288 try p.errTok(.not_assignable, tok);
7085 if (c == .assign and (dest_unqual.is(p.comp, .array) or dest_unqual.is(p.comp, .func))) {
7086 try p.err(tok, .not_assignable, .{});
62897087 return;
62907088 } else if (c == .test_coerce) {
62917089 return error.CoercionFailed;
......@@ -6295,40 +7093,52 @@ pub const Result = struct {
62957093 return error.ParsingFailed;
62967094 }
62977095
6298 try p.errStr(switch (c) {
6299 .assign => .incompatible_assign,
6300 .init => .incompatible_init,
6301 .ret => .incompatible_return,
6302 .arg => .incompatible_arg,
7096 switch (c) {
7097 .assign => try p.err(tok, .incompatible_assign, .{ dest_unqual, res.qt }),
7098 .init => try p.err(tok, .incompatible_init, .{ dest_unqual, res.qt }),
7099 .ret => try p.err(tok, .incompatible_return, .{ res.qt, dest_unqual }),
7100 .arg => try p.err(tok, .incompatible_arg, .{ res.qt, dest_unqual }),
63037101 .test_coerce => return error.CoercionFailed,
6304 }, tok, try c.typePairStr(p, dest_ty, res.ty));
7102 }
63057103 try c.note(p);
63067104 }
63077105};
63087106
7107fn expect(p: *Parser, comptime func: fn (*Parser) Error!?Result) Error!Result {
7108 return p.expectResult(try func(p));
7109}
7110
7111fn expectResult(p: *Parser, res: ?Result) Error!Result {
7112 return res orelse {
7113 try p.err(p.tok_i, .expected_expr, .{});
7114 return error.ParsingFailed;
7115 };
7116}
7117
63097118/// expr : assignExpr (',' assignExpr)*
6310fn expr(p: *Parser) Error!Result {
7119fn expr(p: *Parser) Error!?Result {
63117120 var expr_start = p.tok_i;
6312 var err_start = p.comp.diagnostics.list.items.len;
6313 var lhs = try p.assignExpr();
6314 if (p.tok_ids[p.tok_i] == .comma) try lhs.expect(p);
7121 var prev_total = p.diagnostics.total;
7122 var lhs = (try p.assignExpr()) orelse {
7123 if (p.tok_ids[p.tok_i] == .comma) _ = try p.expectResult(null);
7124 return null;
7125 };
63157126 while (p.eatToken(.comma)) |comma| {
6316 try lhs.maybeWarnUnused(p, expr_start, err_start);
7127 try lhs.maybeWarnUnused(p, expr_start, prev_total);
63177128 expr_start = p.tok_i;
6318 err_start = p.comp.diagnostics.list.items.len;
7129 prev_total = p.diagnostics.total;
63197130
6320 var rhs = try p.assignExpr();
6321 try rhs.expect(p);
6322 try rhs.lvalConversion(p);
7131 var rhs = try p.expect(assignExpr);
7132 try rhs.lvalConversion(p, expr_start);
63237133 lhs.val = rhs.val;
6324 lhs.ty = rhs.ty;
7134 lhs.qt = rhs.qt;
63257135 try lhs.bin(p, .comma_expr, rhs, comma);
63267136 }
63277137 return lhs;
63287138}
63297139
6330fn tokToTag(p: *Parser, tok: TokenIndex) Tree.Tag {
6331 return switch (p.tok_ids[tok]) {
7140fn eatTag(p: *Parser, id: Token.Id) ?std.meta.Tag(Node) {
7141 if (p.eatToken(id)) |_| return switch (id) {
63327142 .equal => .assign_expr,
63337143 .asterisk_equal => .mul_assign_expr,
63347144 .slash_equal => .div_assign_expr,
......@@ -6354,69 +7164,84 @@ fn tokToTag(p: *Parser, tok: TokenIndex) Tree.Tag {
63547164 .slash => .div_expr,
63557165 .percent => .mod_expr,
63567166 else => unreachable,
7167 } else return null;
7168}
7169
7170fn nonAssignExpr(assign_node: std.meta.Tag(Node)) std.meta.Tag(Node) {
7171 return switch (assign_node) {
7172 .mul_assign_expr => .mul_expr,
7173 .div_assign_expr => .div_expr,
7174 .mod_assign_expr => .mod_expr,
7175 .add_assign_expr => .add_expr,
7176 .sub_assign_expr => .sub_expr,
7177 .shl_assign_expr => .shl_expr,
7178 .shr_assign_expr => .shr_expr,
7179 .bit_and_assign_expr => .bit_and_expr,
7180 .bit_xor_assign_expr => .bit_xor_expr,
7181 .bit_or_assign_expr => .bit_or_expr,
7182 else => unreachable,
63577183 };
63587184}
63597185
63607186/// assignExpr
63617187/// : condExpr
63627188/// | unExpr ('=' | '*=' | '/=' | '%=' | '+=' | '-=' | '<<=' | '>>=' | '&=' | '^=' | '|=') assignExpr
6363fn assignExpr(p: *Parser) Error!Result {
6364 var lhs = try p.condExpr();
6365 if (lhs.empty(p)) return lhs;
7189fn assignExpr(p: *Parser) Error!?Result {
7190 var lhs = (try p.condExpr()) orelse return null;
63667191
63677192 const tok = p.tok_i;
6368 const eq = p.eatToken(.equal);
6369 const mul = eq orelse p.eatToken(.asterisk_equal);
6370 const div = mul orelse p.eatToken(.slash_equal);
6371 const mod = div orelse p.eatToken(.percent_equal);
6372 const add = mod orelse p.eatToken(.plus_equal);
6373 const sub = add orelse p.eatToken(.minus_equal);
6374 const shl = sub orelse p.eatToken(.angle_bracket_angle_bracket_left_equal);
6375 const shr = shl orelse p.eatToken(.angle_bracket_angle_bracket_right_equal);
6376 const bit_and = shr orelse p.eatToken(.ampersand_equal);
6377 const bit_xor = bit_and orelse p.eatToken(.caret_equal);
6378 const bit_or = bit_xor orelse p.eatToken(.pipe_equal);
6379
6380 const tag = p.tokToTag(bit_or orelse return lhs);
6381 var rhs = try p.assignExpr();
6382 try rhs.expect(p);
6383 try rhs.lvalConversion(p);
7193 const tag = p.eatTag(.equal) orelse
7194 p.eatTag(.asterisk_equal) orelse
7195 p.eatTag(.slash_equal) orelse
7196 p.eatTag(.percent_equal) orelse
7197 p.eatTag(.plus_equal) orelse
7198 p.eatTag(.minus_equal) orelse
7199 p.eatTag(.angle_bracket_angle_bracket_left_equal) orelse
7200 p.eatTag(.angle_bracket_angle_bracket_right_equal) orelse
7201 p.eatTag(.ampersand_equal) orelse
7202 p.eatTag(.caret_equal) orelse
7203 p.eatTag(.pipe_equal) orelse return lhs;
7204
7205 var rhs = try p.expect(assignExpr);
63847206
63857207 var is_const: bool = undefined;
6386 if (!p.tmpTree().isLvalExtra(lhs.node, &is_const) or is_const) {
6387 try p.errTok(.not_assignable, tok);
6388 return error.ParsingFailed;
7208 if (!p.tree.isLvalExtra(lhs.node, &is_const) or is_const) {
7209 try p.err(tok, .not_assignable, .{});
7210 lhs.qt = .invalid;
63897211 }
63907212
6391 // adjustTypes will do do lvalue conversion but we do not want that
6392 var lhs_copy = lhs;
7213 if (tag == .assign_expr) {
7214 try rhs.coerce(p, lhs.qt, tok, .assign);
7215
7216 try lhs.bin(p, tag, rhs, tok);
7217 return lhs;
7218 }
7219
7220 var lhs_dummy = blk: {
7221 var lhs_copy = lhs;
7222 try lhs_copy.un(p, .compound_assign_dummy_expr, tok);
7223 try lhs_copy.lvalConversion(p, tok);
7224 break :blk lhs_copy;
7225 };
63937226 switch (tag) {
6394 .assign_expr => {}, // handle plain assignment separately
63957227 .mul_assign_expr,
63967228 .div_assign_expr,
63977229 .mod_assign_expr,
63987230 => {
6399 if (rhs.val.isZero(p.comp) and lhs.ty.isInt() and rhs.ty.isInt()) {
7231 if (!lhs.qt.isInvalid() and rhs.val.isZero(p.comp) and lhs.qt.isInt(p.comp) and rhs.qt.isInt(p.comp)) {
64007232 switch (tag) {
6401 .div_assign_expr => try p.errStr(.division_by_zero, div.?, "division"),
6402 .mod_assign_expr => try p.errStr(.division_by_zero, mod.?, "remainder"),
7233 .div_assign_expr => try p.err(tok, .division_by_zero, .{"division"}),
7234 .mod_assign_expr => try p.err(tok, .division_by_zero, .{"remainder"}),
64037235 else => {},
64047236 }
64057237 }
6406 _ = try lhs_copy.adjustTypes(tok, &rhs, p, if (tag == .mod_assign_expr) .integer else .arithmetic);
6407 try lhs.bin(p, tag, rhs, bit_or.?);
6408 return lhs;
7238 _ = try lhs_dummy.adjustTypes(tok, &rhs, p, if (tag == .mod_assign_expr) .integer else .arithmetic);
64097239 },
6410 .sub_assign_expr,
6411 .add_assign_expr,
6412 => {
6413 if (lhs.ty.isPtr() and rhs.ty.isInt()) {
6414 try rhs.ptrCast(p, lhs.ty);
6415 } else {
6416 _ = try lhs_copy.adjustTypes(tok, &rhs, p, .arithmetic);
6417 }
6418 try lhs.bin(p, tag, rhs, bit_or.?);
6419 return lhs;
7240 .sub_assign_expr => {
7241 _ = try lhs_dummy.adjustTypes(tok, &rhs, p, .sub);
7242 },
7243 .add_assign_expr => {
7244 _ = try lhs_dummy.adjustTypes(tok, &rhs, p, .add);
64207245 },
64217246 .shl_assign_expr,
64227247 .shr_assign_expr,
......@@ -6424,16 +7249,14 @@ fn assignExpr(p: *Parser) Error!Result {
64247249 .bit_xor_assign_expr,
64257250 .bit_or_assign_expr,
64267251 => {
6427 _ = try lhs_copy.adjustTypes(tok, &rhs, p, .integer);
6428 try lhs.bin(p, tag, rhs, bit_or.?);
6429 return lhs;
7252 _ = try lhs_dummy.adjustTypes(tok, &rhs, p, .integer);
64307253 },
64317254 else => unreachable,
64327255 }
64337256
6434 try rhs.coerce(p, lhs.ty, tok, .assign);
6435
6436 try lhs.bin(p, tag, rhs, bit_or.?);
7257 _ = try lhs_dummy.bin(p, nonAssignExpr(tag), rhs, tok);
7258 try lhs_dummy.coerce(p, lhs.qt, tok, .assign);
7259 try lhs.bin(p, tag, lhs_dummy, tok);
64377260 return lhs;
64387261}
64397262
......@@ -6442,8 +7265,8 @@ fn assignExpr(p: *Parser) Error!Result {
64427265fn integerConstExpr(p: *Parser, decl_folding: ConstDeclFoldingMode) Error!Result {
64437266 const start = p.tok_i;
64447267 const res = try p.constExpr(decl_folding);
6445 if (!res.ty.isInt() and res.ty.specifier != .invalid) {
6446 try p.errTok(.expected_integer_constant_expr, start);
7268 if (!res.qt.isInvalid() and !res.qt.isRealInt(p.comp)) {
7269 try p.err(start, .expected_integer_constant_expr, .{});
64477270 return error.ParsingFailed;
64487271 }
64497272 return res;
......@@ -6456,27 +7279,24 @@ fn constExpr(p: *Parser, decl_folding: ConstDeclFoldingMode) Error!Result {
64567279 defer p.const_decl_folding = const_decl_folding;
64577280 p.const_decl_folding = decl_folding;
64587281
6459 const res = try p.condExpr();
6460 try res.expect(p);
7282 const res = try p.expect(condExpr);
64617283
6462 if (res.ty.specifier == .invalid or res.val.opt_ref == .none) return res;
7284 if (res.qt.isInvalid() or res.val.opt_ref == .none) return res;
64637285
6464 // saveValue sets val to unavailable
6465 var copy = res;
6466 try copy.saveValue(p);
7286 try res.putValue(p);
64677287 return res;
64687288}
64697289
64707290/// condExpr : lorExpr ('?' expression? ':' condExpr)?
6471fn condExpr(p: *Parser) Error!Result {
7291fn condExpr(p: *Parser) Error!?Result {
64727292 const cond_tok = p.tok_i;
6473 var cond = try p.lorExpr();
6474 if (cond.empty(p) or p.eatToken(.question_mark) == null) return cond;
6475 try cond.lvalConversion(p);
7293 var cond = (try p.lorExpr()) orelse return null;
7294 if (p.eatToken(.question_mark) == null) return cond;
7295 try cond.lvalConversion(p, cond_tok);
64767296 const saved_eval = p.no_eval;
64777297
6478 if (!cond.ty.isScalar()) {
6479 try p.errStr(.cond_expr_type, cond_tok, try p.typeStr(cond.ty));
7298 if (cond.qt.scalarKind(p.comp) == .none) {
7299 try p.err(cond_tok, .cond_expr_type, .{cond.qt});
64807300 return error.ParsingFailed;
64817301 }
64827302
......@@ -6487,21 +7307,29 @@ fn condExpr(p: *Parser) Error!Result {
64877307 var then_expr = blk: {
64887308 defer p.no_eval = saved_eval;
64897309 if (cond.val.opt_ref != .none and !cond.val.toBool(p.comp)) p.no_eval = true;
6490 break :blk try p.expr();
7310 break :blk try p.expect(expr);
64917311 };
6492 try then_expr.expect(p);
64937312
64947313 // If we saw a colon then this is a binary conditional expression.
64957314 if (maybe_colon) |colon| {
64967315 var cond_then = cond;
6497 cond_then.node = try p.addNode(.{ .tag = .cond_dummy_expr, .ty = cond.ty, .data = .{ .un = cond.node } });
7316 cond_then.node = try p.addNode(.{
7317 .cond_dummy_expr = .{
7318 .op_tok = colon,
7319 .operand = cond.node,
7320 .qt = cond.qt,
7321 },
7322 });
64987323 _ = try cond_then.adjustTypes(colon, &then_expr, p, .conditional);
6499 cond.ty = then_expr.ty;
7324 cond.qt = then_expr.qt;
65007325 cond.node = try p.addNode(.{
6501 .tag = .binary_cond_expr,
6502 .ty = cond.ty,
6503 .data = .{ .if3 = .{ .cond = cond.node, .body = (try p.addList(&.{ cond_then.node, then_expr.node })).start } },
6504 .loc = @enumFromInt(cond_tok),
7326 .binary_cond_expr = .{
7327 .cond_tok = cond_tok,
7328 .cond = cond.node,
7329 .then_expr = cond_then.node,
7330 .else_expr = then_expr.node,
7331 .qt = cond.qt,
7332 },
65057333 });
65067334 return cond;
65077335 }
......@@ -6510,9 +7338,8 @@ fn condExpr(p: *Parser) Error!Result {
65107338 var else_expr = blk: {
65117339 defer p.no_eval = saved_eval;
65127340 if (cond.val.opt_ref != .none and cond.val.toBool(p.comp)) p.no_eval = true;
6513 break :blk try p.condExpr();
7341 break :blk try p.expect(condExpr);
65147342 };
6515 try else_expr.expect(p);
65167343
65177344 _ = try then_expr.adjustTypes(colon, &else_expr, p, .conditional);
65187345
......@@ -6522,27 +7349,28 @@ fn condExpr(p: *Parser) Error!Result {
65227349 try then_expr.saveValue(p);
65237350 try else_expr.saveValue(p);
65247351 }
6525 cond.ty = then_expr.ty;
7352 cond.qt = then_expr.qt;
65267353 cond.node = try p.addNode(.{
6527 .tag = .cond_expr,
6528 .ty = cond.ty,
6529 .data = .{ .if3 = .{ .cond = cond.node, .body = (try p.addList(&.{ then_expr.node, else_expr.node })).start } },
6530 .loc = @enumFromInt(cond_tok),
7354 .cond_expr = .{
7355 .cond_tok = cond_tok,
7356 .qt = cond.qt,
7357 .cond = cond.node,
7358 .then_expr = then_expr.node,
7359 .else_expr = else_expr.node,
7360 },
65317361 });
65327362 return cond;
65337363}
65347364
65357365/// lorExpr : landExpr ('||' landExpr)*
6536fn lorExpr(p: *Parser) Error!Result {
6537 var lhs = try p.landExpr();
6538 if (lhs.empty(p)) return lhs;
7366fn lorExpr(p: *Parser) Error!?Result {
7367 var lhs = (try p.landExpr()) orelse return null;
65397368 const saved_eval = p.no_eval;
65407369 defer p.no_eval = saved_eval;
65417370
65427371 while (p.eatToken(.pipe_pipe)) |tok| {
65437372 if (lhs.val.opt_ref != .none and lhs.val.toBool(p.comp)) p.no_eval = true;
6544 var rhs = try p.landExpr();
6545 try rhs.expect(p);
7373 var rhs = try p.expect(landExpr);
65467374
65477375 if (try lhs.adjustTypes(tok, &rhs, p, .boolean_logic)) {
65487376 const res = lhs.val.toBool(p.comp) or rhs.val.toBool(p.comp);
......@@ -6556,16 +7384,14 @@ fn lorExpr(p: *Parser) Error!Result {
65567384}
65577385
65587386/// landExpr : orExpr ('&&' orExpr)*
6559fn landExpr(p: *Parser) Error!Result {
6560 var lhs = try p.orExpr();
6561 if (lhs.empty(p)) return lhs;
7387fn landExpr(p: *Parser) Error!?Result {
7388 var lhs = (try p.orExpr()) orelse return null;
65627389 const saved_eval = p.no_eval;
65637390 defer p.no_eval = saved_eval;
65647391
65657392 while (p.eatToken(.ampersand_ampersand)) |tok| {
65667393 if (lhs.val.opt_ref != .none and !lhs.val.toBool(p.comp)) p.no_eval = true;
6567 var rhs = try p.orExpr();
6568 try rhs.expect(p);
7394 var rhs = try p.expect(orExpr);
65697395
65707396 if (try lhs.adjustTypes(tok, &rhs, p, .boolean_logic)) {
65717397 const res = lhs.val.toBool(p.comp) and rhs.val.toBool(p.comp);
......@@ -6579,12 +7405,10 @@ fn landExpr(p: *Parser) Error!Result {
65797405}
65807406
65817407/// orExpr : xorExpr ('|' xorExpr)*
6582fn orExpr(p: *Parser) Error!Result {
6583 var lhs = try p.xorExpr();
6584 if (lhs.empty(p)) return lhs;
7408fn orExpr(p: *Parser) Error!?Result {
7409 var lhs = (try p.xorExpr()) orelse return null;
65857410 while (p.eatToken(.pipe)) |tok| {
6586 var rhs = try p.xorExpr();
6587 try rhs.expect(p);
7411 var rhs = try p.expect(xorExpr);
65887412
65897413 if (try lhs.adjustTypes(tok, &rhs, p, .integer)) {
65907414 lhs.val = try lhs.val.bitOr(rhs.val, p.comp);
......@@ -6595,12 +7419,10 @@ fn orExpr(p: *Parser) Error!Result {
65957419}
65967420
65977421/// xorExpr : andExpr ('^' andExpr)*
6598fn xorExpr(p: *Parser) Error!Result {
6599 var lhs = try p.andExpr();
6600 if (lhs.empty(p)) return lhs;
7422fn xorExpr(p: *Parser) Error!?Result {
7423 var lhs = (try p.andExpr()) orelse return null;
66017424 while (p.eatToken(.caret)) |tok| {
6602 var rhs = try p.andExpr();
6603 try rhs.expect(p);
7425 var rhs = try p.expect(andExpr);
66047426
66057427 if (try lhs.adjustTypes(tok, &rhs, p, .integer)) {
66067428 lhs.val = try lhs.val.bitXor(rhs.val, p.comp);
......@@ -6611,12 +7433,10 @@ fn xorExpr(p: *Parser) Error!Result {
66117433}
66127434
66137435/// andExpr : eqExpr ('&' eqExpr)*
6614fn andExpr(p: *Parser) Error!Result {
6615 var lhs = try p.eqExpr();
6616 if (lhs.empty(p)) return lhs;
7436fn andExpr(p: *Parser) Error!?Result {
7437 var lhs = (try p.eqExpr()) orelse return null;
66177438 while (p.eatToken(.ampersand)) |tok| {
6618 var rhs = try p.eqExpr();
6619 try rhs.expect(p);
7439 var rhs = try p.expect(eqExpr);
66207440
66217441 if (try lhs.adjustTypes(tok, &rhs, p, .integer)) {
66227442 lhs.val = try lhs.val.bitAnd(rhs.val, p.comp);
......@@ -6627,42 +7447,43 @@ fn andExpr(p: *Parser) Error!Result {
66277447}
66287448
66297449/// eqExpr : compExpr (('==' | '!=') compExpr)*
6630fn eqExpr(p: *Parser) Error!Result {
6631 var lhs = try p.compExpr();
6632 if (lhs.empty(p)) return lhs;
7450fn eqExpr(p: *Parser) Error!?Result {
7451 var lhs = (try p.compExpr()) orelse return null;
66337452 while (true) {
6634 const eq = p.eatToken(.equal_equal);
6635 const ne = eq orelse p.eatToken(.bang_equal);
6636 const tag = p.tokToTag(ne orelse break);
6637 var rhs = try p.compExpr();
6638 try rhs.expect(p);
7453 const tok = p.tok_i;
7454 const tag = p.eatTag(.equal_equal) orelse
7455 p.eatTag(.bang_equal) orelse break;
7456 var rhs = try p.expect(compExpr);
66397457
6640 if (try lhs.adjustTypes(ne.?, &rhs, p, .equality)) {
7458 if (try lhs.adjustTypes(tok, &rhs, p, .equality)) {
66417459 const op: std.math.CompareOperator = if (tag == .equal_expr) .eq else .neq;
6642 const res = lhs.val.compare(op, rhs.val, p.comp);
6643 lhs.val = Value.fromBool(res);
7460
7461 const res: ?bool = if (lhs.qt.isPointer(p.comp) or rhs.qt.isPointer(p.comp))
7462 lhs.val.comparePointers(op, rhs.val, p.comp)
7463 else
7464 lhs.val.compare(op, rhs.val, p.comp);
7465
7466 lhs.val = if (res) |val| Value.fromBool(val) else .{};
66447467 } else {
66457468 lhs.val.boolCast(p.comp);
66467469 }
6647 try lhs.boolRes(p, tag, rhs, ne.?);
7470 try lhs.boolRes(p, tag, rhs, tok);
66487471 }
66497472 return lhs;
66507473}
66517474
66527475/// compExpr : shiftExpr (('<' | '<=' | '>' | '>=') shiftExpr)*
6653fn compExpr(p: *Parser) Error!Result {
6654 var lhs = try p.shiftExpr();
6655 if (lhs.empty(p)) return lhs;
7476fn compExpr(p: *Parser) Error!?Result {
7477 var lhs = (try p.shiftExpr()) orelse return null;
66567478 while (true) {
6657 const lt = p.eatToken(.angle_bracket_left);
6658 const le = lt orelse p.eatToken(.angle_bracket_left_equal);
6659 const gt = le orelse p.eatToken(.angle_bracket_right);
6660 const ge = gt orelse p.eatToken(.angle_bracket_right_equal);
6661 const tag = p.tokToTag(ge orelse break);
6662 var rhs = try p.shiftExpr();
6663 try rhs.expect(p);
6664
6665 if (try lhs.adjustTypes(ge.?, &rhs, p, .relational)) {
7479 const tok = p.tok_i;
7480 const tag = p.eatTag(.angle_bracket_left) orelse
7481 p.eatTag(.angle_bracket_left_equal) orelse
7482 p.eatTag(.angle_bracket_right) orelse
7483 p.eatTag(.angle_bracket_right_equal) orelse break;
7484 var rhs = try p.expect(shiftExpr);
7485
7486 if (try lhs.adjustTypes(tok, &rhs, p, .relational)) {
66667487 const op: std.math.CompareOperator = switch (tag) {
66677488 .less_than_expr => .lt,
66687489 .less_than_equal_expr => .lte,
......@@ -6670,171 +7491,168 @@ fn compExpr(p: *Parser) Error!Result {
66707491 .greater_than_equal_expr => .gte,
66717492 else => unreachable,
66727493 };
6673 const res = lhs.val.compare(op, rhs.val, p.comp);
6674 lhs.val = Value.fromBool(res);
7494
7495 const res: ?bool = if (lhs.qt.isPointer(p.comp) or rhs.qt.isPointer(p.comp))
7496 lhs.val.comparePointers(op, rhs.val, p.comp)
7497 else
7498 lhs.val.compare(op, rhs.val, p.comp);
7499 lhs.val = if (res) |val| Value.fromBool(val) else .{};
66757500 } else {
66767501 lhs.val.boolCast(p.comp);
66777502 }
6678 try lhs.boolRes(p, tag, rhs, ge.?);
7503 try lhs.boolRes(p, tag, rhs, tok);
66797504 }
66807505 return lhs;
66817506}
66827507
66837508/// shiftExpr : addExpr (('<<' | '>>') addExpr)*
6684fn shiftExpr(p: *Parser) Error!Result {
6685 var lhs = try p.addExpr();
6686 if (lhs.empty(p)) return lhs;
7509fn shiftExpr(p: *Parser) Error!?Result {
7510 var lhs = (try p.addExpr()) orelse return null;
66877511 while (true) {
6688 const shl = p.eatToken(.angle_bracket_angle_bracket_left);
6689 const shr = shl orelse p.eatToken(.angle_bracket_angle_bracket_right);
6690 const tag = p.tokToTag(shr orelse break);
6691 var rhs = try p.addExpr();
6692 try rhs.expect(p);
6693
6694 if (try lhs.adjustTypes(shr.?, &rhs, p, .integer)) {
6695 if (rhs.val.compare(.lt, Value.zero, p.comp)) {
6696 try p.errStr(.negative_shift_count, shl orelse shr.?, try rhs.str(p));
6697 }
6698 if (rhs.val.compare(.gte, try Value.int(lhs.ty.bitSizeof(p.comp).?, p.comp), p.comp)) {
6699 try p.errStr(.too_big_shift_count, shl orelse shr.?, try rhs.str(p));
6700 }
6701 if (shl != null) {
6702 if (try lhs.val.shl(lhs.val, rhs.val, lhs.ty, p.comp) and
6703 lhs.ty.signedness(p.comp) != .unsigned) try p.errOverflow(shl.?, lhs);
7512 const tok = p.tok_i;
7513 const tag = p.eatTag(.angle_bracket_angle_bracket_left) orelse
7514 p.eatTag(.angle_bracket_angle_bracket_right) orelse break;
7515 var rhs = try p.expect(addExpr);
7516
7517 if (try lhs.adjustTypes(tok, &rhs, p, .integer)) {
7518 if (rhs.val.compare(.lt, .zero, p.comp)) {
7519 try p.err(tok, .negative_shift_count, .{});
7520 }
7521 if (rhs.val.compare(.gte, try Value.int(lhs.qt.bitSizeof(p.comp), p.comp), p.comp)) {
7522 try p.err(tok, .too_big_shift_count, .{});
7523 }
7524 if (tag == .shl_expr) {
7525 if (try lhs.val.shl(lhs.val, rhs.val, lhs.qt, p.comp) and
7526 lhs.qt.signedness(p.comp) != .unsigned) try p.err(tok, .overflow, .{lhs});
67047527 } else {
6705 lhs.val = try lhs.val.shr(rhs.val, lhs.ty, p.comp);
7528 lhs.val = try lhs.val.shr(rhs.val, lhs.qt, p.comp);
67067529 }
67077530 }
6708 try lhs.bin(p, tag, rhs, shr.?);
7531 try lhs.bin(p, tag, rhs, tok);
67097532 }
67107533 return lhs;
67117534}
67127535
67137536/// addExpr : mulExpr (('+' | '-') mulExpr)*
6714fn addExpr(p: *Parser) Error!Result {
6715 var lhs = try p.mulExpr();
6716 if (lhs.empty(p)) return lhs;
7537fn addExpr(p: *Parser) Error!?Result {
7538 var lhs = (try p.mulExpr()) orelse return null;
67177539 while (true) {
6718 const plus = p.eatToken(.plus);
6719 const minus = plus orelse p.eatToken(.minus);
6720 const tag = p.tokToTag(minus orelse break);
6721 var rhs = try p.mulExpr();
6722 try rhs.expect(p);
6723
6724 const lhs_ty = lhs.ty;
6725 if (try lhs.adjustTypes(minus.?, &rhs, p, if (plus != null) .add else .sub)) {
6726 if (plus != null) {
6727 if (try lhs.val.add(lhs.val, rhs.val, lhs.ty, p.comp) and
6728 lhs.ty.signedness(p.comp) != .unsigned) try p.errOverflow(plus.?, lhs);
7540 const tok = p.tok_i;
7541 const tag = p.eatTag(.plus) orelse
7542 p.eatTag(.minus) orelse break;
7543 var rhs = try p.expect(mulExpr);
7544
7545 // We'll want to check this for invalid pointer arithmetic.
7546 const original_lhs_qt = lhs.qt;
7547
7548 if (try lhs.adjustTypes(tok, &rhs, p, if (tag == .add_expr) .add else .sub)) {
7549 const lhs_sk = lhs.qt.scalarKind(p.comp);
7550 if (tag == .add_expr) {
7551 if (try lhs.val.add(lhs.val, rhs.val, lhs.qt, p.comp)) {
7552 if (lhs_sk.isPointer()) {
7553 const increment = lhs;
7554 const ptr_bits = p.comp.type_store.intptr.bitSizeof(p.comp);
7555 const element_size = increment.qt.childType(p.comp).sizeofOrNull(p.comp) orelse 1;
7556 const max_elems = p.comp.maxArrayBytes() / element_size;
7557
7558 try p.err(tok, .array_overflow, .{ increment, ptr_bits, element_size * 8, element_size, max_elems });
7559 } else if (lhs.qt.signedness(p.comp) != .unsigned) {
7560 try p.err(tok, .overflow, .{lhs});
7561 }
7562 }
67297563 } else {
6730 if (try lhs.val.sub(lhs.val, rhs.val, lhs.ty, p.comp) and
6731 lhs.ty.signedness(p.comp) != .unsigned) try p.errOverflow(minus.?, lhs);
7564 const elem_size = if (original_lhs_qt.isPointer(p.comp)) original_lhs_qt.childType(p.comp).sizeofOrNull(p.comp) orelse 1 else 1;
7565 if (elem_size == 0 and rhs.qt.isPointer(p.comp)) {
7566 lhs.val = .{};
7567 } else {
7568 if (try lhs.val.sub(lhs.val, rhs.val, lhs.qt, elem_size, p.comp) and
7569 lhs.qt.signedness(p.comp) != .unsigned)
7570 {
7571 try p.err(tok, .overflow, .{lhs});
7572 }
7573 }
67327574 }
67337575 }
6734 if (lhs.ty.specifier != .invalid and lhs_ty.isPtr() and !lhs_ty.isVoidStar() and lhs_ty.elemType().hasIncompleteSize()) {
6735 try p.errStr(.ptr_arithmetic_incomplete, minus.?, try p.typeStr(lhs_ty.elemType()));
6736 lhs.ty = Type.invalid;
7576 if (!lhs.qt.isInvalid()) {
7577 const lhs_sk = original_lhs_qt.scalarKind(p.comp);
7578 if (lhs_sk == .pointer and original_lhs_qt.childType(p.comp).hasIncompleteSize(p.comp)) {
7579 try p.err(tok, .ptr_arithmetic_incomplete, .{original_lhs_qt.childType(p.comp)});
7580 lhs.qt = .invalid;
7581 }
67377582 }
6738 try lhs.bin(p, tag, rhs, minus.?);
7583 try lhs.bin(p, tag, rhs, tok);
67397584 }
67407585 return lhs;
67417586}
67427587
67437588/// mulExpr : castExpr (('*' | '/' | '%') castExpr)*´
6744fn mulExpr(p: *Parser) Error!Result {
6745 var lhs = try p.castExpr();
6746 if (lhs.empty(p)) return lhs;
7589fn mulExpr(p: *Parser) Error!?Result {
7590 var lhs = (try p.castExpr()) orelse return null;
67477591 while (true) {
6748 const mul = p.eatToken(.asterisk);
6749 const div = mul orelse p.eatToken(.slash);
6750 const percent = div orelse p.eatToken(.percent);
6751 const tag = p.tokToTag(percent orelse break);
6752 var rhs = try p.castExpr();
6753 try rhs.expect(p);
6754
6755 if (rhs.val.isZero(p.comp) and mul == null and !p.no_eval and lhs.ty.isInt() and rhs.ty.isInt()) {
6756 const err_tag: Diagnostics.Tag = if (p.in_macro) .division_by_zero_macro else .division_by_zero;
7592 const tok = p.tok_i;
7593 const tag = p.eatTag(.asterisk) orelse
7594 p.eatTag(.slash) orelse
7595 p.eatTag(.percent) orelse break;
7596 var rhs = try p.expect(castExpr);
7597
7598 if (rhs.val.isZero(p.comp) and tag != .mul_expr and !p.no_eval and lhs.qt.isInt(p.comp) and rhs.qt.isInt(p.comp)) {
67577599 lhs.val = .{};
6758 if (div != null) {
6759 try p.errStr(err_tag, div.?, "division");
6760 } else {
6761 try p.errStr(err_tag, percent.?, "remainder");
6762 }
7600 try p.err(tok, if (p.in_macro) .division_by_zero_macro else .division_by_zero, if (tag == .div_expr) .{"division"} else .{"remainder"});
67637601 if (p.in_macro) return error.ParsingFailed;
67647602 }
67657603
6766 if (try lhs.adjustTypes(percent.?, &rhs, p, if (tag == .mod_expr) .integer else .arithmetic)) {
6767 if (mul != null) {
6768 if (try lhs.val.mul(lhs.val, rhs.val, lhs.ty, p.comp) and
6769 lhs.ty.signedness(p.comp) != .unsigned) try p.errOverflow(mul.?, lhs);
6770 } else if (div != null) {
6771 if (try lhs.val.div(lhs.val, rhs.val, lhs.ty, p.comp) and
6772 lhs.ty.signedness(p.comp) != .unsigned) try p.errOverflow(div.?, lhs);
6773 } else {
6774 var res = try Value.rem(lhs.val, rhs.val, lhs.ty, p.comp);
6775 if (res.opt_ref == .none) {
6776 if (p.in_macro) {
6777 // match clang behavior by defining invalid remainder to be zero in macros
6778 res = Value.zero;
6779 } else {
6780 try lhs.saveValue(p);
6781 try rhs.saveValue(p);
7604 if (try lhs.adjustTypes(tok, &rhs, p, if (tag == .mod_expr) .integer else .arithmetic)) {
7605 switch (tag) {
7606 .mul_expr => if (try lhs.val.mul(lhs.val, rhs.val, lhs.qt, p.comp) and
7607 lhs.qt.signedness(p.comp) != .unsigned) try p.err(tok, .overflow, .{lhs}),
7608 .div_expr => if (try lhs.val.div(lhs.val, rhs.val, lhs.qt, p.comp) and
7609 lhs.qt.signedness(p.comp) != .unsigned) try p.err(tok, .overflow, .{lhs}),
7610 .mod_expr => {
7611 var res = try Value.rem(lhs.val, rhs.val, lhs.qt, p.comp);
7612 if (res.opt_ref == .none) {
7613 if (p.in_macro) {
7614 // match clang behavior by defining invalid remainder to be zero in macros
7615 res = .zero;
7616 } else {
7617 try lhs.saveValue(p);
7618 try rhs.saveValue(p);
7619 }
67827620 }
6783 }
6784 lhs.val = res;
7621 lhs.val = res;
7622 },
7623 else => unreachable,
67857624 }
67867625 }
67877626
6788 try lhs.bin(p, tag, rhs, percent.?);
7627 try lhs.bin(p, tag, rhs, tok);
67897628 }
67907629 return lhs;
67917630}
67927631
6793/// This will always be the last message, if present
6794fn removeUnusedWarningForTok(p: *Parser, last_expr_tok: TokenIndex) void {
6795 if (last_expr_tok == 0) return;
6796 if (p.comp.diagnostics.list.items.len == 0) return;
6797
6798 const last_expr_loc = p.pp.tokens.items(.loc)[last_expr_tok];
6799 const last_msg = p.comp.diagnostics.list.items[p.comp.diagnostics.list.items.len - 1];
6800
6801 if (last_msg.tag == .unused_value and last_msg.loc.eql(last_expr_loc)) {
6802 p.comp.diagnostics.list.items.len = p.comp.diagnostics.list.items.len - 1;
6803 }
6804}
6805
68067632/// castExpr
68077633/// : '(' compoundStmt ')' suffixExpr*
68087634/// | '(' typeName ')' castExpr
68097635/// | '(' typeName ')' '{' initializerItems '}'
6810/// | __builtin_choose_expr '(' integerConstExpr ',' assignExpr ',' assignExpr ')'
6811/// | __builtin_va_arg '(' assignExpr ',' typeName ')'
6812/// | __builtin_offsetof '(' typeName ',' offsetofMemberDesignator ')'
6813/// | __builtin_bitoffsetof '(' typeName ',' offsetofMemberDesignator ')'
68147636/// | unExpr
6815fn castExpr(p: *Parser) Error!Result {
7637fn castExpr(p: *Parser) Error!?Result {
68167638 if (p.eatToken(.l_paren)) |l_paren| cast_expr: {
68177639 if (p.tok_ids[p.tok_i] == .l_brace) {
68187640 const tok = p.tok_i;
6819 try p.err(.gnu_statement_expression);
6820 if (p.func.ty == null) {
6821 try p.err(.stmt_expr_not_allowed_file_scope);
7641 try p.err(p.tok_i, .gnu_statement_expression, .{});
7642 if (p.func.qt == null) {
7643 try p.err(p.tok_i, .stmt_expr_not_allowed_file_scope, .{});
68227644 return error.ParsingFailed;
68237645 }
68247646 var stmt_expr_state: StmtExprState = .{};
68257647 const body_node = (try p.compoundStmt(false, &stmt_expr_state)).?; // compoundStmt only returns null if .l_brace isn't the first token
6826 p.removeUnusedWarningForTok(stmt_expr_state.last_expr_tok);
68277648
6828 var res = Result{
7649 var res: Result = .{
68297650 .node = body_node,
6830 .ty = stmt_expr_state.last_expr_res.ty,
6831 .val = stmt_expr_state.last_expr_res.val,
7651 .qt = stmt_expr_state.last_expr_qt,
68327652 };
68337653 try p.expectClosing(l_paren, .r_paren);
68347654 try res.un(p, .stmt_expr, tok);
6835 while (true) {
6836 const suffix = try p.suffixExpr(res);
6837 if (suffix.empty(p)) break;
7655 while (try p.suffixExpr(res)) |suffix| {
68387656 res = suffix;
68397657 }
68407658 return res;
......@@ -6846,242 +7664,414 @@ fn castExpr(p: *Parser) Error!Result {
68467664 try p.expectClosing(l_paren, .r_paren);
68477665
68487666 if (p.tok_ids[p.tok_i] == .l_brace) {
6849 // Compound literal; handled in unExpr
6850 p.tok_i = l_paren;
6851 break :cast_expr;
7667 var lhs = (try p.compoundLiteral(ty, l_paren)).?;
7668 while (try p.suffixExpr(lhs)) |suffix| {
7669 lhs = suffix;
7670 }
7671 return lhs;
68527672 }
68537673
68547674 const operand_tok = p.tok_i;
6855 var operand = try p.castExpr();
6856 try operand.expect(p);
6857 try operand.lvalConversion(p);
7675 var operand = try p.expect(castExpr);
7676 try operand.lvalConversion(p, operand_tok);
68587677 try operand.castType(p, ty, operand_tok, l_paren);
68597678 return operand;
68607679 }
6861 switch (p.tok_ids[p.tok_i]) {
6862 .builtin_choose_expr => return p.builtinChooseExpr(),
6863 .builtin_va_arg => return p.builtinVaArg(),
6864 .builtin_offsetof => return p.builtinOffsetof(false),
6865 .builtin_bitoffsetof => return p.builtinOffsetof(true),
6866 .builtin_types_compatible_p => return p.typesCompatible(),
6867 // TODO: other special-cased builtins
6868 else => {},
6869 }
68707680 return p.unExpr();
68717681}
68727682
6873fn typesCompatible(p: *Parser) Error!Result {
6874 const builtin_tok = p.tok_i;
6875 p.tok_i += 1;
7683/// shufflevector : __builtin_shufflevector '(' assignExpr ',' assignExpr (',' integerConstExpr)* ')'
7684fn shufflevector(p: *Parser, builtin_tok: TokenIndex) Error!Result {
68767685 const l_paren = try p.expectToken(.l_paren);
68777686
68787687 const first_tok = p.tok_i;
6879 const first = (try p.typeName()) orelse {
6880 try p.err(.expected_type);
6881 p.skipTo(.r_paren);
6882 return error.ParsingFailed;
7688 const lhs = try p.expect(assignExpr);
7689 _ = try p.expectToken(.comma);
7690 const second_tok = p.tok_i;
7691 const rhs = try p.expect(assignExpr);
7692
7693 const max_index: ?Value = blk: {
7694 if (lhs.qt.isInvalid() or rhs.qt.isInvalid()) break :blk null;
7695 const lhs_vec = lhs.qt.get(p.comp, .vector) orelse break :blk null;
7696 const rhs_vec = rhs.qt.get(p.comp, .vector) orelse break :blk null;
7697
7698 break :blk try Value.int(lhs_vec.len + rhs_vec.len, p.comp);
7699 };
7700 const negative_one = try Value.intern(p.comp, .{ .int = .{ .i64 = -1 } });
7701
7702 const list_buf_top = p.list_buf.items.len;
7703 defer p.list_buf.items.len = list_buf_top;
7704 while (p.eatToken(.comma)) |_| {
7705 const index_tok = p.tok_i;
7706 const index = try p.integerConstExpr(.gnu_folding_extension);
7707 try p.list_buf.append(index.node);
7708 if (index.val.compare(.lt, negative_one, p.comp)) {
7709 try p.err(index_tok, .shufflevector_negative_index, .{});
7710 } else if (max_index != null and index.val.compare(.gte, max_index.?, p.comp)) {
7711 try p.err(index_tok, .shufflevector_index_too_big, .{});
7712 }
7713 }
7714
7715 try p.expectClosing(l_paren, .r_paren);
7716
7717 var res_qt: QualType = .invalid;
7718 if (!lhs.qt.isInvalid() and !lhs.qt.is(p.comp, .vector)) {
7719 try p.err(first_tok, .shufflevector_arg, .{"first"});
7720 } else if (!rhs.qt.isInvalid() and !rhs.qt.is(p.comp, .vector)) {
7721 try p.err(second_tok, .shufflevector_arg, .{"second"});
7722 } else if (!lhs.qt.eql(rhs.qt, p.comp)) {
7723 try p.err(builtin_tok, .shufflevector_same_type, .{});
7724 } else if (p.list_buf.items.len == list_buf_top) {
7725 res_qt = lhs.qt;
7726 } else {
7727 res_qt = try p.comp.type_store.put(p.gpa, .{ .vector = .{
7728 .elem = lhs.qt.childType(p.comp),
7729 .len = @intCast(p.list_buf.items.len - list_buf_top),
7730 } });
7731 }
7732
7733 return .{
7734 .qt = res_qt,
7735 .node = try p.addNode(.{
7736 .builtin_shufflevector = .{
7737 .builtin_tok = builtin_tok,
7738 .qt = res_qt,
7739 .lhs = lhs.node,
7740 .rhs = rhs.node,
7741 .indexes = p.list_buf.items[list_buf_top..],
7742 },
7743 }),
68837744 };
6884 const lhs = try p.addNode(.{ .tag = .invalid, .ty = first, .data = undefined, .loc = @enumFromInt(first_tok) });
7745}
7746
7747/// convertvector : __builtin_convertvector '(' assignExpr ',' typeName ')'
7748fn convertvector(p: *Parser, builtin_tok: TokenIndex) Error!Result {
7749 const l_paren = try p.expectToken(.l_paren);
7750
7751 const operand = try p.expect(assignExpr);
68857752 _ = try p.expectToken(.comma);
68867753
6887 const second_tok = p.tok_i;
6888 const second = (try p.typeName()) orelse {
6889 try p.err(.expected_type);
7754 var dest_qt = (try p.typeName()) orelse {
7755 try p.err(p.tok_i, .expected_type, .{});
68907756 p.skipTo(.r_paren);
68917757 return error.ParsingFailed;
68927758 };
6893 const rhs = try p.addNode(.{ .tag = .invalid, .ty = second, .data = undefined, .loc = @enumFromInt(second_tok) });
68947759
68957760 try p.expectClosing(l_paren, .r_paren);
68967761
6897 var first_unqual = first.canonicalize(.standard);
6898 first_unqual.qual.@"const" = false;
6899 first_unqual.qual.@"volatile" = false;
6900 var second_unqual = second.canonicalize(.standard);
6901 second_unqual.qual.@"const" = false;
6902 second_unqual.qual.@"volatile" = false;
7762 if (operand.qt.isInvalid() or operand.qt.isInvalid()) {
7763 dest_qt = .invalid;
7764 } else check: {
7765 const operand_vec = operand.qt.get(p.comp, .vector) orelse {
7766 try p.err(builtin_tok, .convertvector_arg, .{"first"});
7767 dest_qt = .invalid;
7768 break :check;
7769 };
7770 const dest_vec = dest_qt.get(p.comp, .vector) orelse {
7771 try p.err(builtin_tok, .convertvector_arg, .{"second"});
7772 dest_qt = .invalid;
7773 break :check;
7774 };
7775 if (operand_vec.len != dest_vec.len) {
7776 try p.err(builtin_tok, .convertvector_size, .{});
7777 dest_qt = .invalid;
7778 }
7779 }
7780
7781 return .{
7782 .qt = dest_qt,
7783 .node = try p.addNode(.{
7784 .builtin_convertvector = .{
7785 .builtin_tok = builtin_tok,
7786 .dest_qt = dest_qt,
7787 .operand = operand.node,
7788 },
7789 }),
7790 };
7791}
69037792
6904 const compatible = first_unqual.eql(second_unqual, p.comp, true);
7793/// typesCompatible : __builtin_types_compatible_p '(' typeName ',' typeName ')'
7794fn typesCompatible(p: *Parser, builtin_tok: TokenIndex) Error!Result {
7795 const l_paren = try p.expectToken(.l_paren);
69057796
6906 const res = Result{
7797 const lhs = (try p.typeName()) orelse {
7798 try p.err(p.tok_i, .expected_type, .{});
7799 p.skipTo(.r_paren);
7800 return error.ParsingFailed;
7801 };
7802 _ = try p.expectToken(.comma);
7803
7804 const rhs = (try p.typeName()) orelse {
7805 try p.err(p.tok_i, .expected_type, .{});
7806 p.skipTo(.r_paren);
7807 return error.ParsingFailed;
7808 };
7809
7810 try p.expectClosing(l_paren, .r_paren);
7811
7812 const compatible = lhs.eql(rhs, p.comp);
7813 const res: Result = .{
69077814 .val = Value.fromBool(compatible),
7815 .qt = .int,
69087816 .node = try p.addNode(.{
6909 .tag = .builtin_types_compatible_p,
6910 .ty = Type.int,
6911 .data = .{ .bin = .{
7817 .builtin_types_compatible_p = .{
7818 .builtin_tok = builtin_tok,
69127819 .lhs = lhs,
69137820 .rhs = rhs,
6914 } },
6915 .loc = @enumFromInt(builtin_tok),
7821 },
69167822 }),
69177823 };
6918 try p.value_map.put(res.node, res.val);
7824 try res.putValue(p);
69197825 return res;
69207826}
69217827
7828/// chooseExpr : __builtin_choose_expr '(' integerConstExpr ',' assignExpr ',' assignExpr ')'
69227829fn builtinChooseExpr(p: *Parser) Error!Result {
6923 p.tok_i += 1;
69247830 const l_paren = try p.expectToken(.l_paren);
69257831 const cond_tok = p.tok_i;
69267832 var cond = try p.integerConstExpr(.no_const_decl_folding);
69277833 if (cond.val.opt_ref == .none) {
6928 try p.errTok(.builtin_choose_cond, cond_tok);
7834 try p.err(cond_tok, .builtin_choose_cond, .{});
69297835 return error.ParsingFailed;
69307836 }
69317837
69327838 _ = try p.expectToken(.comma);
69337839
6934 var then_expr = if (cond.val.toBool(p.comp)) try p.assignExpr() else try p.parseNoEval(assignExpr);
6935 try then_expr.expect(p);
7840 const then_expr = if (cond.val.toBool(p.comp))
7841 try p.expect(assignExpr)
7842 else
7843 try p.parseNoEval(assignExpr);
69367844
69377845 _ = try p.expectToken(.comma);
69387846
6939 var else_expr = if (!cond.val.toBool(p.comp)) try p.assignExpr() else try p.parseNoEval(assignExpr);
6940 try else_expr.expect(p);
7847 const else_expr = if (!cond.val.toBool(p.comp))
7848 try p.expect(assignExpr)
7849 else
7850 try p.parseNoEval(assignExpr);
69417851
69427852 try p.expectClosing(l_paren, .r_paren);
69437853
69447854 if (cond.val.toBool(p.comp)) {
69457855 cond.val = then_expr.val;
6946 cond.ty = then_expr.ty;
7856 cond.qt = then_expr.qt;
69477857 } else {
69487858 cond.val = else_expr.val;
6949 cond.ty = else_expr.ty;
7859 cond.qt = else_expr.qt;
69507860 }
69517861 cond.node = try p.addNode(.{
6952 .tag = .builtin_choose_expr,
6953 .ty = cond.ty,
6954 .data = .{ .if3 = .{ .cond = cond.node, .body = (try p.addList(&.{ then_expr.node, else_expr.node })).start } },
7862 .builtin_choose_expr = .{
7863 .cond_tok = cond_tok,
7864 .qt = cond.qt,
7865 .cond = cond.node,
7866 .then_expr = then_expr.node,
7867 .else_expr = else_expr.node,
7868 },
69557869 });
69567870 return cond;
69577871}
69587872
6959fn builtinVaArg(p: *Parser) Error!Result {
6960 const builtin_tok = p.tok_i;
6961 p.tok_i += 1;
6962
7873/// vaStart : __builtin_va_arg '(' assignExpr ',' typeName ')'
7874fn builtinVaArg(p: *Parser, builtin_tok: TokenIndex) Error!Result {
69637875 const l_paren = try p.expectToken(.l_paren);
69647876 const va_list_tok = p.tok_i;
6965 var va_list = try p.assignExpr();
6966 try va_list.expect(p);
6967 try va_list.lvalConversion(p);
7877 var va_list = try p.expect(assignExpr);
7878 try va_list.lvalConversion(p, va_list_tok);
69687879
69697880 _ = try p.expectToken(.comma);
69707881
69717882 const ty = (try p.typeName()) orelse {
6972 try p.err(.expected_type);
7883 try p.err(p.tok_i, .expected_type, .{});
69737884 return error.ParsingFailed;
69747885 };
69757886 try p.expectClosing(l_paren, .r_paren);
69767887
6977 if (!va_list.ty.eql(p.comp.types.va_list, p.comp, true)) {
6978 try p.errStr(.incompatible_va_arg, va_list_tok, try p.typeStr(va_list.ty));
7888 if (!va_list.qt.eql(p.comp.type_store.va_list, p.comp)) {
7889 try p.err(va_list_tok, .incompatible_va_arg, .{va_list.qt});
69797890 return error.ParsingFailed;
69807891 }
69817892
6982 return Result{ .ty = ty, .node = try p.addNode(.{
6983 .tag = .special_builtin_call_one,
6984 .ty = ty,
6985 .data = .{ .decl = .{ .name = builtin_tok, .node = va_list.node } },
6986 }) };
7893 return .{
7894 .qt = ty,
7895 .node = try p.addNode(.{
7896 .builtin_call_expr = .{
7897 .builtin_tok = builtin_tok,
7898 .qt = ty,
7899 .args = &.{va_list.node},
7900 },
7901 }),
7902 };
69877903}
69887904
6989fn builtinOffsetof(p: *Parser, want_bits: bool) Error!Result {
6990 const builtin_tok = p.tok_i;
6991 p.tok_i += 1;
7905const OffsetKind = enum { bits, bytes };
69927906
7907/// offsetof
7908/// : __builtin_offsetof '(' typeName ',' offsetofMemberDesignator ')'
7909/// | __builtin_bitoffsetof '(' typeName ',' offsetofMemberDesignator ')'
7910fn builtinOffsetof(p: *Parser, builtin_tok: TokenIndex, offset_kind: OffsetKind) Error!Result {
69937911 const l_paren = try p.expectToken(.l_paren);
69947912 const ty_tok = p.tok_i;
69957913
6996 const ty = (try p.typeName()) orelse {
6997 try p.err(.expected_type);
7914 const operand_qt = (try p.typeName()) orelse {
7915 try p.err(p.tok_i, .expected_type, .{});
69987916 p.skipTo(.r_paren);
69997917 return error.ParsingFailed;
70007918 };
70017919
7002 if (!ty.isRecord()) {
7003 try p.errStr(.offsetof_ty, ty_tok, try p.typeStr(ty));
7920 const record_ty = operand_qt.getRecord(p.comp) orelse {
7921 try p.err(ty_tok, .offsetof_ty, .{operand_qt});
70047922 p.skipTo(.r_paren);
70057923 return error.ParsingFailed;
7006 } else if (ty.hasIncompleteSize()) {
7007 try p.errStr(.offsetof_incomplete, ty_tok, try p.typeStr(ty));
7924 };
7925
7926 if (record_ty.layout == null) {
7927 try p.err(ty_tok, .offsetof_incomplete, .{operand_qt});
70087928 p.skipTo(.r_paren);
70097929 return error.ParsingFailed;
70107930 }
70117931
70127932 _ = try p.expectToken(.comma);
70137933
7014 const offsetof_expr = try p.offsetofMemberDesignator(ty, want_bits);
7934 const offsetof_expr = try p.offsetofMemberDesignator(record_ty, operand_qt, offset_kind, builtin_tok);
70157935
70167936 try p.expectClosing(l_paren, .r_paren);
70177937
7018 return Result{
7019 .ty = p.comp.types.size,
7938 const res: Result = .{
7939 .qt = p.comp.type_store.size,
70207940 .val = offsetof_expr.val,
70217941 .node = try p.addNode(.{
7022 .tag = .special_builtin_call_one,
7023 .ty = p.comp.types.size,
7024 .data = .{ .decl = .{ .name = builtin_tok, .node = offsetof_expr.node } },
7942 .builtin_call_expr = .{
7943 .builtin_tok = builtin_tok,
7944 .qt = p.comp.type_store.size,
7945 .args = &.{offsetof_expr.node},
7946 },
70257947 }),
70267948 };
7949 try res.putValue(p);
7950 return res;
70277951}
70287952
7029/// offsetofMemberDesignator: IDENTIFIER ('.' IDENTIFIER | '[' expr ']' )*
7030fn offsetofMemberDesignator(p: *Parser, base_ty: Type, want_bits: bool) Error!Result {
7953/// offsetofMemberDesignator : IDENTIFIER ('.' IDENTIFIER | '[' expr ']' )*
7954fn offsetofMemberDesignator(
7955 p: *Parser,
7956 base_record_ty: Type.Record,
7957 base_qt: QualType,
7958 offset_kind: OffsetKind,
7959 access_tok: TokenIndex,
7960) Error!Result {
70317961 errdefer p.skipTo(.r_paren);
70327962 const base_field_name_tok = try p.expectIdentifier();
7033 const base_field_name = try StrInt.intern(p.comp, p.tokSlice(base_field_name_tok));
7034 const base_record_ty = base_ty.getRecord().?;
7035 try p.validateFieldAccess(base_record_ty, base_ty, base_field_name_tok, base_field_name);
7036 const base_node = try p.addNode(.{ .tag = .default_init_expr, .ty = base_ty, .data = undefined });
7963 const base_field_name = try p.comp.internString(p.tokSlice(base_field_name_tok));
7964
7965 try p.validateFieldAccess(base_record_ty, base_qt, base_field_name_tok, base_field_name);
7966 const base_node = try p.addNode(.{ .default_init_expr = .{
7967 .last_tok = p.tok_i,
7968 .qt = base_qt,
7969 } });
70377970
70387971 var cur_offset: u64 = 0;
7039 var lhs = try p.fieldAccessExtra(base_node, base_record_ty, base_field_name, false, &cur_offset);
7972 var lhs = try p.fieldAccessExtra(base_node, base_record_ty, base_field_name, false, access_tok, &cur_offset);
70407973
7041 var total_offset = cur_offset;
7974 var total_offset: i64 = @intCast(cur_offset);
7975 var runtime_offset = false;
70427976 while (true) switch (p.tok_ids[p.tok_i]) {
70437977 .period => {
70447978 p.tok_i += 1;
70457979 const field_name_tok = try p.expectIdentifier();
7046 const field_name = try StrInt.intern(p.comp, p.tokSlice(field_name_tok));
7980 const field_name = try p.comp.internString(p.tokSlice(field_name_tok));
70477981
7048 const lhs_record_ty = lhs.ty.getRecord() orelse {
7049 try p.errStr(.offsetof_ty, field_name_tok, try p.typeStr(lhs.ty));
7982 const lhs_record_ty = lhs.qt.getRecord(p.comp) orelse {
7983 try p.err(field_name_tok, .offsetof_ty, .{lhs.qt});
70507984 return error.ParsingFailed;
70517985 };
7052 try p.validateFieldAccess(lhs_record_ty, lhs.ty, field_name_tok, field_name);
7053 lhs = try p.fieldAccessExtra(lhs.node, lhs_record_ty, field_name, false, &cur_offset);
7054 total_offset += cur_offset;
7986 try p.validateFieldAccess(lhs_record_ty, lhs.qt, field_name_tok, field_name);
7987 lhs = try p.fieldAccessExtra(lhs.node, lhs_record_ty, field_name, false, access_tok, &cur_offset);
7988 total_offset += @intCast(cur_offset);
70557989 },
70567990 .l_bracket => {
70577991 const l_bracket_tok = p.tok_i;
70587992 p.tok_i += 1;
7059 var index = try p.expr();
7060 try index.expect(p);
7993 var index = try p.expect(expr);
70617994 _ = try p.expectClosing(l_bracket_tok, .r_bracket);
70627995
7063 if (!lhs.ty.isArray()) {
7064 try p.errStr(.offsetof_array, l_bracket_tok, try p.typeStr(lhs.ty));
7996 const array_ty = lhs.qt.get(p.comp, .array) orelse {
7997 try p.err(l_bracket_tok, .offsetof_array, .{lhs.qt});
70657998 return error.ParsingFailed;
7066 }
7999 };
70678000 var ptr = lhs;
7068 try ptr.lvalConversion(p);
7069 try index.lvalConversion(p);
8001 try ptr.lvalConversion(p, l_bracket_tok);
8002 try index.lvalConversion(p, l_bracket_tok);
70708003
7071 if (index.ty.isInt()) {
8004 if (!index.qt.isInvalid() and index.qt.isRealInt(p.comp)) {
70728005 try p.checkArrayBounds(index, lhs, l_bracket_tok);
8006 } else if (!index.qt.isInvalid()) {
8007 try p.err(l_bracket_tok, .invalid_index, .{});
8008 }
8009
8010 if (index.val.toInt(i64, p.comp)) |index_int| {
8011 total_offset += @as(i64, @intCast(array_ty.elem.bitSizeof(p.comp))) * index_int;
70738012 } else {
7074 try p.errTok(.invalid_index, l_bracket_tok);
8013 runtime_offset = true;
70758014 }
70768015
70778016 try index.saveValue(p);
7078 try ptr.bin(p, .array_access_expr, index, l_bracket_tok);
8017 ptr.node = try p.addNode(.{ .array_access_expr = .{
8018 .l_bracket_tok = l_bracket_tok,
8019 .base = ptr.node,
8020 .index = index.node,
8021 .qt = ptr.qt,
8022 } });
70798023 lhs = ptr;
70808024 },
70818025 else => break,
70828026 };
7083 const val = try Value.int(if (want_bits) total_offset else total_offset / 8, p.comp);
7084 return Result{ .ty = base_ty, .val = val, .node = lhs.node };
8027 return .{
8028 .qt = base_qt,
8029 .val = if (runtime_offset)
8030 .{}
8031 else
8032 try Value.int(if (offset_kind == .bits) total_offset else @divExact(total_offset, 8), p.comp),
8033 .node = lhs.node,
8034 };
8035}
8036
8037fn computeOffsetExtra(p: *Parser, node: Node.Index, offset_so_far: *Value) !Value {
8038 switch (node.get(&p.tree)) {
8039 .cast => |cast| {
8040 return switch (cast.kind) {
8041 .array_to_pointer, .no_op, .bitcast => p.computeOffsetExtra(cast.operand, offset_so_far),
8042 .lval_to_rval => .{},
8043 else => unreachable,
8044 };
8045 },
8046 .paren_expr => |un| return p.computeOffsetExtra(un.operand, offset_so_far),
8047 .decl_ref_expr => return p.pointerValue(node, offset_so_far.*),
8048 .array_access_expr => |access| {
8049 const index_val = p.tree.value_map.get(access.index) orelse return .{};
8050 var size = try Value.int(access.qt.sizeof(p.comp), p.comp);
8051 const mul_overflow = try size.mul(size, index_val, p.comp.type_store.ptrdiff, p.comp);
8052
8053 const add_overflow = try offset_so_far.add(size, offset_so_far.*, p.comp.type_store.ptrdiff, p.comp);
8054 _ = mul_overflow;
8055 _ = add_overflow;
8056 return p.computeOffsetExtra(access.base, offset_so_far);
8057 },
8058 .member_access_expr, .member_access_ptr_expr => |access| {
8059 var ty = access.base.qt(&p.tree);
8060 if (ty.isPointer(p.comp)) ty = ty.childType(p.comp);
8061 const record_ty = ty.getRecord(p.comp).?;
8062
8063 const field_offset = try Value.int(@divExact(record_ty.fields[access.member_index].layout.offset_bits, 8), p.comp);
8064 _ = try offset_so_far.add(field_offset, offset_so_far.*, p.comp.type_store.ptrdiff, p.comp);
8065 return p.computeOffsetExtra(access.base, offset_so_far);
8066 },
8067 else => return .{},
8068 }
8069}
8070
8071/// Compute the offset (in bytes) of an expression from a base pointer.
8072fn computeOffset(p: *Parser, res: Result) !Value {
8073 var val: Value = if (res.val.opt_ref == .none) .zero else res.val;
8074 return p.computeOffsetExtra(res.node, &val);
70858075}
70868076
70878077/// unExpr
......@@ -7092,92 +8082,114 @@ fn offsetofMemberDesignator(p: *Parser, base_ty: Type, want_bits: bool) Error!Re
70928082/// | keyword_sizeof '(' typeName ')'
70938083/// | keyword_alignof '(' typeName ')'
70948084/// | keyword_c23_alignof '(' typeName ')'
7095fn unExpr(p: *Parser) Error!Result {
8085fn unExpr(p: *Parser) Error!?Result {
70968086 const tok = p.tok_i;
70978087 switch (p.tok_ids[tok]) {
70988088 .ampersand_ampersand => {
70998089 const address_tok = p.tok_i;
71008090 p.tok_i += 1;
71018091 const name_tok = try p.expectIdentifier();
7102 try p.errTok(.gnu_label_as_value, address_tok);
8092 try p.err(address_tok, .gnu_label_as_value, .{});
71038093 p.contains_address_of_label = true;
71048094
71058095 const str = p.tokSlice(name_tok);
71068096 if (p.findLabel(str) == null) {
71078097 try p.labels.append(.{ .unresolved_goto = name_tok });
71088098 }
7109 const elem_ty = try p.arena.create(Type);
7110 elem_ty.* = .{ .specifier = .void };
7111 const result_ty = Type{ .specifier = .pointer, .data = .{ .sub_type = elem_ty } };
7112 return Result{
8099
8100 return .{
71138101 .node = try p.addNode(.{
7114 .tag = .addr_of_label,
7115 .data = .{ .decl_ref = name_tok },
7116 .ty = result_ty,
7117 .loc = @enumFromInt(address_tok),
8102 .addr_of_label = .{
8103 .label_tok = name_tok,
8104 .qt = .void_pointer,
8105 },
71188106 }),
7119 .ty = result_ty,
8107 .qt = .void_pointer,
71208108 };
71218109 },
71228110 .ampersand => {
71238111 if (p.in_macro) {
7124 try p.err(.invalid_preproc_operator);
8112 try p.err(p.tok_i, .invalid_preproc_operator, .{});
71258113 return error.ParsingFailed;
71268114 }
8115 const orig_tok_i = p.tok_i;
71278116 p.tok_i += 1;
7128 var operand = try p.castExpr();
7129 try operand.expect(p);
8117 var operand = try p.expect(castExpr);
8118 var addr_val: Value = .{};
71308119
7131 const tree = p.tmpTree();
71328120 if (p.getNode(operand.node, .member_access_expr) orelse
7133 p.getNode(operand.node, .member_access_ptr_expr)) |member_node|
8121 p.getNode(operand.node, .member_access_ptr_expr)) |access|
71348122 {
7135 if (tree.isBitfield(member_node)) try p.errTok(.addr_of_bitfield, tok);
7136 }
7137 if (!tree.isLval(operand.node) and !operand.ty.is(.invalid)) {
7138 try p.errTok(.addr_of_rvalue, tok);
8123 if (access.isBitFieldWidth(&p.tree) != null) try p.err(tok, .addr_of_bitfield, .{});
8124 const lhs_qt = access.base.qt(&p.tree);
8125 if (lhs_qt.hasAttribute(p.comp, .@"packed")) {
8126 const record_ty = lhs_qt.getRecord(p.comp).?;
8127 try p.err(orig_tok_i, .packed_member_address, .{
8128 record_ty.fields[access.member_index].name.lookup(p.comp),
8129 record_ty.name.lookup(p.comp),
8130 });
8131 }
71398132 }
7140 if (operand.ty.qual.register) try p.errTok(.addr_of_register, tok);
8133 if (!operand.qt.isInvalid()) {
8134 if (!p.tree.isLval(operand.node)) {
8135 try p.err(tok, .addr_of_rvalue, .{});
8136 }
8137 addr_val = try p.computeOffset(operand);
71418138
7142 if (!operand.ty.is(.invalid)) {
7143 const elem_ty = try p.arena.create(Type);
7144 elem_ty.* = operand.ty;
7145 operand.ty = Type{
7146 .specifier = .pointer,
7147 .data = .{ .sub_type = elem_ty },
7148 };
8139 operand.qt = try p.comp.type_store.put(p.gpa, .{ .pointer = .{
8140 .child = operand.qt,
8141 .decayed = null,
8142 } });
71498143 }
8144 if (p.getNode(operand.node, .decl_ref_expr)) |decl_ref| {
8145 switch (decl_ref.decl.get(&p.tree)) {
8146 .variable => |variable| {
8147 if (variable.storage_class == .register) try p.err(tok, .addr_of_register, .{});
8148 },
8149 else => {},
8150 }
8151 } else if (p.getNode(operand.node, .compound_literal_expr)) |literal| {
8152 switch (literal.storage_class) {
8153 .register => try p.err(tok, .addr_of_register, .{}),
8154 else => {},
8155 }
8156 }
8157
71508158 try operand.saveValue(p);
71518159 try operand.un(p, .addr_of_expr, tok);
8160 operand.val = addr_val;
71528161 return operand;
71538162 },
71548163 .asterisk => {
7155 const asterisk_loc = p.tok_i;
71568164 p.tok_i += 1;
7157 var operand = try p.castExpr();
7158 try operand.expect(p);
8165 var operand = try p.expect(castExpr);
71598166
7160 if (operand.ty.isArray() or operand.ty.isPtr() or operand.ty.isFunc()) {
7161 try operand.lvalConversion(p);
7162 operand.ty = operand.ty.elemType();
7163 } else {
7164 try p.errTok(.indirection_ptr, tok);
8167 switch (operand.qt.base(p.comp).type) {
8168 .array, .func, .pointer => {
8169 try operand.lvalConversion(p, tok);
8170 operand.qt = operand.qt.childType(p.comp);
8171 operand.val = .{};
8172 },
8173 else => {
8174 try p.err(tok, .indirection_ptr, .{});
8175 },
71658176 }
7166 if (operand.ty.hasIncompleteSize() and !operand.ty.is(.void)) {
7167 try p.errStr(.deref_incomplete_ty_ptr, asterisk_loc, try p.typeStr(operand.ty));
8177
8178 if (operand.qt.hasIncompleteSize(p.comp) and !operand.qt.is(p.comp, .void)) {
8179 try p.err(tok, .deref_incomplete_ty_ptr, .{operand.qt});
71688180 }
7169 operand.ty.qual = .{};
8181
8182 operand.qt = operand.qt.unqualified();
71708183 try operand.un(p, .deref_expr, tok);
71718184 return operand;
71728185 },
71738186 .plus => {
71748187 p.tok_i += 1;
71758188
7176 var operand = try p.castExpr();
7177 try operand.expect(p);
7178 try operand.lvalConversion(p);
7179 if (!operand.ty.isInt() and !operand.ty.isFloat())
7180 try p.errStr(.invalid_argument_un, tok, try p.typeStr(operand.ty));
8189 var operand = try p.expect(castExpr);
8190 try operand.lvalConversion(p, tok);
8191 if (!operand.qt.isInt(p.comp) and !operand.qt.isFloat(p.comp))
8192 try p.err(tok, .invalid_argument_un, .{operand.qt});
71818193
71828194 try operand.usualUnaryConversion(p, tok);
71838195
......@@ -7186,15 +8198,14 @@ fn unExpr(p: *Parser) Error!Result {
71868198 .minus => {
71878199 p.tok_i += 1;
71888200
7189 var operand = try p.castExpr();
7190 try operand.expect(p);
7191 try operand.lvalConversion(p);
7192 if (!operand.ty.isInt() and !operand.ty.isFloat())
7193 try p.errStr(.invalid_argument_un, tok, try p.typeStr(operand.ty));
8201 var operand = try p.expect(castExpr);
8202 try operand.lvalConversion(p, tok);
8203 if (!operand.qt.isInt(p.comp) and !operand.qt.isFloat(p.comp))
8204 try p.err(tok, .invalid_argument_un, .{operand.qt});
71948205
71958206 try operand.usualUnaryConversion(p, tok);
71968207 if (operand.val.isArithmetic(p.comp)) {
7197 _ = try operand.val.sub(Value.zero, operand.val, operand.ty, p.comp);
8208 _ = try operand.val.negate(operand.val, operand.qt, p.comp);
71988209 } else {
71998210 operand.val = .{};
72008211 }
......@@ -7204,22 +8215,24 @@ fn unExpr(p: *Parser) Error!Result {
72048215 .plus_plus => {
72058216 p.tok_i += 1;
72068217
7207 var operand = try p.castExpr();
7208 try operand.expect(p);
7209 if (!operand.ty.isScalar())
7210 try p.errStr(.invalid_argument_un, tok, try p.typeStr(operand.ty));
7211 if (operand.ty.isComplex())
7212 try p.errStr(.complex_prefix_postfix_op, p.tok_i, try p.typeStr(operand.ty));
7213
7214 if (!p.tmpTree().isLval(operand.node) or operand.ty.isConst()) {
7215 try p.errTok(.not_assignable, tok);
8218 var operand = try p.expect(castExpr);
8219 const scalar_kind = operand.qt.scalarKind(p.comp);
8220 if (scalar_kind == .void_pointer)
8221 try p.err(tok, .gnu_pointer_arith, .{});
8222 if (scalar_kind == .none)
8223 try p.err(tok, .invalid_argument_un, .{operand.qt});
8224 if (!scalar_kind.isReal())
8225 try p.err(p.tok_i, .complex_prefix_postfix_op, .{operand.qt});
8226
8227 if (!p.tree.isLval(operand.node) or operand.qt.@"const") {
8228 try p.err(tok, .not_assignable, .{});
72168229 return error.ParsingFailed;
72178230 }
72188231 try operand.usualUnaryConversion(p, tok);
72198232
72208233 if (operand.val.is(.int, p.comp) or operand.val.is(.int, p.comp)) {
7221 if (try operand.val.add(operand.val, Value.one, operand.ty, p.comp))
7222 try p.errOverflow(tok, operand);
8234 if (try operand.val.add(operand.val, .one, operand.qt, p.comp))
8235 try p.err(tok, .overflow, .{operand});
72238236 } else {
72248237 operand.val = .{};
72258238 }
......@@ -7230,22 +8243,24 @@ fn unExpr(p: *Parser) Error!Result {
72308243 .minus_minus => {
72318244 p.tok_i += 1;
72328245
7233 var operand = try p.castExpr();
7234 try operand.expect(p);
7235 if (!operand.ty.isScalar())
7236 try p.errStr(.invalid_argument_un, tok, try p.typeStr(operand.ty));
7237 if (operand.ty.isComplex())
7238 try p.errStr(.complex_prefix_postfix_op, p.tok_i, try p.typeStr(operand.ty));
7239
7240 if (!p.tmpTree().isLval(operand.node) or operand.ty.isConst()) {
7241 try p.errTok(.not_assignable, tok);
8246 var operand = try p.expect(castExpr);
8247 const scalar_kind = operand.qt.scalarKind(p.comp);
8248 if (scalar_kind == .void_pointer)
8249 try p.err(tok, .gnu_pointer_arith, .{});
8250 if (scalar_kind == .none)
8251 try p.err(tok, .invalid_argument_un, .{operand.qt});
8252 if (!scalar_kind.isReal())
8253 try p.err(p.tok_i, .complex_prefix_postfix_op, .{operand.qt});
8254
8255 if (!p.tree.isLval(operand.node) or operand.qt.@"const") {
8256 try p.err(tok, .not_assignable, .{});
72428257 return error.ParsingFailed;
72438258 }
72448259 try operand.usualUnaryConversion(p, tok);
72458260
72468261 if (operand.val.is(.int, p.comp) or operand.val.is(.int, p.comp)) {
7247 if (try operand.val.sub(operand.val, Value.one, operand.ty, p.comp))
7248 try p.errOverflow(tok, operand);
8262 if (try operand.val.decrement(operand.val, operand.qt, p.comp))
8263 try p.err(tok, .overflow, .{operand});
72498264 } else {
72508265 operand.val = .{};
72518266 }
......@@ -7256,21 +8271,21 @@ fn unExpr(p: *Parser) Error!Result {
72568271 .tilde => {
72578272 p.tok_i += 1;
72588273
7259 var operand = try p.castExpr();
7260 try operand.expect(p);
7261 try operand.lvalConversion(p);
8274 var operand = try p.expect(castExpr);
8275 try operand.lvalConversion(p, tok);
72628276 try operand.usualUnaryConversion(p, tok);
7263 if (operand.ty.isInt()) {
7264 if (operand.val.is(.int, p.comp)) {
7265 operand.val = try operand.val.bitNot(operand.ty, p.comp);
7266 }
7267 } else if (operand.ty.isComplex()) {
7268 try p.errStr(.complex_conj, tok, try p.typeStr(operand.ty));
8277 const scalar_kind = operand.qt.scalarKind(p.comp);
8278 if (!scalar_kind.isReal()) {
8279 try p.err(tok, .complex_conj, .{operand.qt});
72698280 if (operand.val.is(.complex, p.comp)) {
7270 operand.val = try operand.val.complexConj(operand.ty, p.comp);
8281 operand.val = try operand.val.complexConj(operand.qt, p.comp);
8282 }
8283 } else if (scalar_kind.isInt()) {
8284 if (operand.val.is(.int, p.comp)) {
8285 operand.val = try operand.val.bitNot(operand.qt, p.comp);
72718286 }
72728287 } else {
7273 try p.errStr(.invalid_argument_un, tok, try p.typeStr(operand.ty));
8288 try p.err(tok, .invalid_argument_un, .{operand.qt});
72748289 operand.val = .{};
72758290 }
72768291 try operand.un(p, .bit_not_expr, tok);
......@@ -7279,70 +8294,87 @@ fn unExpr(p: *Parser) Error!Result {
72798294 .bang => {
72808295 p.tok_i += 1;
72818296
7282 var operand = try p.castExpr();
7283 try operand.expect(p);
7284 try operand.lvalConversion(p);
7285 if (!operand.ty.isScalar())
7286 try p.errStr(.invalid_argument_un, tok, try p.typeStr(operand.ty));
8297 var operand = try p.expect(castExpr);
8298 try operand.lvalConversion(p, tok);
8299 if (operand.qt.scalarKind(p.comp) == .none)
8300 try p.err(tok, .invalid_argument_un, .{operand.qt});
72878301
72888302 try operand.usualUnaryConversion(p, tok);
72898303 if (operand.val.is(.int, p.comp)) {
72908304 operand.val = Value.fromBool(!operand.val.toBool(p.comp));
72918305 } else if (operand.val.opt_ref == .null) {
7292 operand.val = Value.one;
8306 operand.val = .one;
72938307 } else {
7294 if (operand.ty.isDecayed()) {
7295 operand.val = Value.zero;
7296 } else {
7297 operand.val = .{};
8308 operand.val = .{};
8309 if (operand.qt.get(p.comp, .pointer)) |pointer_ty| {
8310 if (pointer_ty.decayed != null) operand.val = .zero;
72988311 }
72998312 }
7300 operand.ty = .{ .specifier = .int };
8313 operand.qt = .int;
73018314 try operand.un(p, .bool_not_expr, tok);
73028315 return operand;
73038316 },
73048317 .keyword_sizeof => {
73058318 p.tok_i += 1;
73068319 const expected_paren = p.tok_i;
7307 var res = Result{};
7308 if (try p.typeName()) |ty| {
7309 res.ty = ty;
7310 try p.errTok(.expected_parens_around_typename, expected_paren);
8320
8321 var has_expr = false;
8322 var res: Result = .{
8323 .node = undefined, // check has_expr
8324 };
8325 if (try p.typeName()) |qt| {
8326 res.qt = qt;
8327 try p.err(expected_paren, .expected_parens_around_typename, .{});
73118328 } else if (p.eatToken(.l_paren)) |l_paren| {
73128329 if (try p.typeName()) |ty| {
7313 res.ty = ty;
8330 res.qt = ty;
73148331 try p.expectClosing(l_paren, .r_paren);
73158332 } else {
73168333 p.tok_i = expected_paren;
73178334 res = try p.parseNoEval(unExpr);
8335 has_expr = true;
73188336 }
73198337 } else {
73208338 res = try p.parseNoEval(unExpr);
8339 has_expr = true;
73218340 }
8341 const operand_qt = res.qt;
73228342
7323 if (res.ty.is(.void)) {
7324 try p.errStr(.pointer_arith_void, tok, "sizeof");
7325 } else if (res.ty.isDecayed()) {
7326 const array_ty = res.ty.originalTypeOfDecayedArray();
7327 const err_str = try p.typePairStrExtra(res.ty, " instead of ", array_ty);
7328 try p.errStr(.sizeof_array_arg, tok, err_str);
7329 }
7330 if (res.ty.sizeof(p.comp)) |size| {
7331 if (size == 0) {
7332 try p.errTok(.sizeof_returns_zero, tok);
7333 }
7334 res.val = try Value.int(size, p.comp);
7335 res.ty = p.comp.types.size;
7336 } else {
8343 if (res.qt.isInvalid()) {
73378344 res.val = .{};
7338 if (res.ty.hasIncompleteSize()) {
7339 try p.errStr(.invalid_sizeof, expected_paren - 1, try p.typeStr(res.ty));
7340 res.ty = Type.invalid;
8345 } else {
8346 const base_type = res.qt.base(p.comp);
8347 switch (base_type.type) {
8348 .void => try p.err(tok, .pointer_arith_void, .{"sizeof"}),
8349 .pointer => |pointer_ty| if (pointer_ty.decayed) |decayed_qt| {
8350 try p.err(tok, .sizeof_array_arg, .{ res.qt, decayed_qt });
8351 },
8352 else => {},
8353 }
8354
8355 if (base_type.qt.sizeofOrNull(p.comp)) |size| {
8356 if (size == 0 and p.comp.langopts.emulate == .msvc) {
8357 try p.err(tok, .sizeof_returns_zero, .{});
8358 }
8359 res.val = try Value.int(size, p.comp);
8360 res.qt = p.comp.type_store.size;
73418361 } else {
7342 res.ty = p.comp.types.size;
8362 res.val = .{};
8363 if (res.qt.hasIncompleteSize(p.comp)) {
8364 try p.err(expected_paren - 1, .invalid_sizeof, .{res.qt});
8365 res.qt = .invalid;
8366 } else {
8367 res.qt = p.comp.type_store.size;
8368 }
73438369 }
73448370 }
7345 try res.un(p, .sizeof_expr, tok);
8371
8372 res.node = try p.addNode(.{ .sizeof_expr = .{
8373 .op_tok = tok,
8374 .qt = res.qt,
8375 .expr = if (has_expr) res.node else null,
8376 .operand_qt = operand_qt,
8377 } });
73468378 return res;
73478379 },
73488380 .keyword_alignof,
......@@ -7352,35 +8384,51 @@ fn unExpr(p: *Parser) Error!Result {
73528384 => {
73538385 p.tok_i += 1;
73548386 const expected_paren = p.tok_i;
7355 var res = Result{};
7356 if (try p.typeName()) |ty| {
7357 res.ty = ty;
7358 try p.errTok(.expected_parens_around_typename, expected_paren);
8387
8388 var has_expr = false;
8389 var res: Result = .{
8390 .node = undefined, // check has_expr
8391 };
8392 if (try p.typeName()) |qt| {
8393 res.qt = qt;
8394 try p.err(expected_paren, .expected_parens_around_typename, .{});
73598395 } else if (p.eatToken(.l_paren)) |l_paren| {
7360 if (try p.typeName()) |ty| {
7361 res.ty = ty;
8396 if (try p.typeName()) |qt| {
8397 res.qt = qt;
73628398 try p.expectClosing(l_paren, .r_paren);
73638399 } else {
73648400 p.tok_i = expected_paren;
73658401 res = try p.parseNoEval(unExpr);
7366 try p.errTok(.alignof_expr, expected_paren);
8402 has_expr = true;
8403
8404 try p.err(expected_paren, .alignof_expr, .{});
73678405 }
73688406 } else {
73698407 res = try p.parseNoEval(unExpr);
7370 try p.errTok(.alignof_expr, expected_paren);
8408 has_expr = true;
8409
8410 try p.err(expected_paren, .alignof_expr, .{});
73718411 }
8412 const operand_qt = res.qt;
73728413
7373 if (res.ty.is(.void)) {
7374 try p.errStr(.pointer_arith_void, tok, "alignof");
8414 if (res.qt.is(p.comp, .void)) {
8415 try p.err(tok, .pointer_arith_void, .{"alignof"});
73758416 }
7376 if (res.ty.alignable()) {
7377 res.val = try Value.int(res.ty.alignof(p.comp), p.comp);
7378 res.ty = p.comp.types.size;
7379 } else {
7380 try p.errStr(.invalid_alignof, expected_paren, try p.typeStr(res.ty));
7381 res.ty = Type.invalid;
8417
8418 if (res.qt.sizeofOrNull(p.comp) != null) {
8419 res.val = try Value.int(res.qt.alignof(p.comp), p.comp);
8420 res.qt = p.comp.type_store.size;
8421 } else if (!res.qt.isInvalid()) {
8422 try p.err(expected_paren, .invalid_alignof, .{res.qt});
8423 res.qt = .invalid;
73828424 }
7383 try res.un(p, .alignof_expr, tok);
8425
8426 res.node = try p.addNode(.{ .alignof_expr = .{
8427 .op_tok = tok,
8428 .qt = res.qt,
8429 .expr = if (has_expr) res.node else null,
8430 .operand_qt = operand_qt,
8431 } });
73848432 return res;
73858433 },
73868434 .keyword_extension => {
......@@ -7389,38 +8437,35 @@ fn unExpr(p: *Parser) Error!Result {
73898437 defer p.extension_suppressed = saved_extension;
73908438 p.extension_suppressed = true;
73918439
7392 var child = try p.castExpr();
7393 try child.expect(p);
7394 return child;
8440 return try p.expect(castExpr);
73958441 },
73968442 .keyword_imag1, .keyword_imag2 => {
73978443 const imag_tok = p.tok_i;
73988444 p.tok_i += 1;
73998445
7400 var operand = try p.castExpr();
7401 try operand.expect(p);
7402 try operand.lvalConversion(p);
7403 if (operand.ty.is(.invalid)) return Result.invalid;
7404 if (!operand.ty.isInt() and !operand.ty.isFloat()) {
7405 try p.errStr(.invalid_imag, imag_tok, try p.typeStr(operand.ty));
8446 var operand = try p.expect(castExpr);
8447 try operand.lvalConversion(p, tok);
8448 if (operand.qt.isInvalid()) return operand;
8449
8450 const scalar_kind = operand.qt.scalarKind(p.comp);
8451 if (!scalar_kind.isArithmetic()) {
8452 try p.err(imag_tok, .invalid_imag, .{operand.qt});
74068453 }
7407 if (operand.ty.isComplex()) {
8454 if (!scalar_kind.isReal()) {
74088455 operand.val = try operand.val.imaginaryPart(p.comp);
7409 } else if (operand.ty.isReal()) {
7410 switch (p.comp.langopts.emulate) {
7411 .msvc => {}, // Doesn't support `_Complex` or `__imag` in the first place
7412 .gcc => operand.val = Value.zero,
7413 .clang => {
7414 if (operand.val.is(.int, p.comp) or operand.val.is(.float, p.comp)) {
7415 operand.val = Value.zero;
7416 } else {
7417 operand.val = .{};
7418 }
7419 },
7420 }
8456 } else switch (p.comp.langopts.emulate) {
8457 .msvc => {}, // Doesn't support `_Complex` or `__imag` in the first place
8458 .gcc => operand.val = .zero,
8459 .clang => {
8460 if (operand.val.is(.int, p.comp) or operand.val.is(.float, p.comp)) {
8461 operand.val = .zero;
8462 } else {
8463 operand.val = .{};
8464 }
8465 },
74218466 }
74228467 // convert _Complex T to T
7423 operand.ty = operand.ty.makeReal();
8468 operand.qt = operand.qt.toReal(p.comp);
74248469 try operand.un(p, .imag_expr, tok);
74258470 return operand;
74268471 },
......@@ -7428,28 +8473,24 @@ fn unExpr(p: *Parser) Error!Result {
74288473 const real_tok = p.tok_i;
74298474 p.tok_i += 1;
74308475
7431 var operand = try p.castExpr();
7432 try operand.expect(p);
7433 try operand.lvalConversion(p);
7434 if (operand.ty.is(.invalid)) return Result.invalid;
7435 if (!operand.ty.isInt() and !operand.ty.isFloat()) {
7436 try p.errStr(.invalid_real, real_tok, try p.typeStr(operand.ty));
8476 var operand = try p.expect(castExpr);
8477 try operand.lvalConversion(p, tok);
8478 if (operand.qt.isInvalid()) return operand;
8479 if (!operand.qt.isInt(p.comp) and !operand.qt.isFloat(p.comp)) {
8480 try p.err(real_tok, .invalid_real, .{operand.qt});
74378481 }
74388482 // convert _Complex T to T
7439 operand.ty = operand.ty.makeReal();
8483 operand.qt = operand.qt.toReal(p.comp);
74408484 operand.val = try operand.val.realPart(p.comp);
74418485 try operand.un(p, .real_expr, tok);
74428486 return operand;
74438487 },
74448488 else => {
7445 var lhs = try p.compoundLiteral();
7446 if (lhs.empty(p)) {
7447 lhs = try p.primaryExpr();
7448 if (lhs.empty(p)) return lhs;
7449 }
7450 while (true) {
7451 const suffix = try p.suffixExpr(lhs);
7452 if (suffix.empty(p)) break;
8489 var lhs = (try p.compoundLiteral(null, null)) orelse
8490 (try p.primaryExpr()) orelse
8491 return null;
8492
8493 while (try p.suffixExpr(lhs)) |suffix| {
74538494 lhs = suffix;
74548495 }
74558496 return lhs;
......@@ -7460,58 +8501,68 @@ fn unExpr(p: *Parser) Error!Result {
74608501/// compoundLiteral
74618502/// : '(' storageClassSpec* type_name ')' '{' initializer_list '}'
74628503/// | '(' storageClassSpec* type_name ')' '{' initializer_list ',' '}'
7463fn compoundLiteral(p: *Parser) Error!Result {
7464 const l_paren = p.eatToken(.l_paren) orelse return Result{};
8504fn compoundLiteral(p: *Parser, qt_opt: ?QualType, opt_l_paren: ?TokenIndex) Error!?Result {
8505 const l_paren, const d = if (qt_opt) |some| .{ opt_l_paren.?, DeclSpec{ .qt = some } } else blk: {
8506 const l_paren = p.eatToken(.l_paren) orelse return null;
74658507
7466 var d: DeclSpec = .{ .ty = .{ .specifier = undefined } };
7467 const any = if (p.comp.langopts.standard.atLeast(.c23))
7468 try p.storageClassSpec(&d)
7469 else
7470 false;
7471
7472 const tag: Tree.Tag = switch (d.storage_class) {
7473 .static => if (d.thread_local != null)
7474 .static_thread_local_compound_literal_expr
8508 var d: DeclSpec = .{ .qt = .invalid };
8509 const any = if (p.comp.langopts.standard.atLeast(.c23))
8510 try p.storageClassSpec(&d)
74758511 else
7476 .static_compound_literal_expr,
7477 .register, .none => if (d.thread_local != null)
7478 .thread_local_compound_literal_expr
7479 else
7480 .compound_literal_expr,
7481 .auto, .@"extern", .typedef => |tok| blk: {
7482 try p.errStr(.invalid_compound_literal_storage_class, tok, @tagName(d.storage_class));
7483 d.storage_class = .none;
7484 break :blk if (d.thread_local != null)
7485 .thread_local_compound_literal_expr
7486 else
7487 .compound_literal_expr;
7488 },
7489 };
8512 false;
74908513
7491 var ty = (try p.typeName()) orelse {
7492 p.tok_i = l_paren;
7493 if (any) {
7494 try p.err(.expected_type);
7495 return error.ParsingFailed;
8514 switch (d.storage_class) {
8515 .auto, .@"extern", .typedef => |tok| {
8516 try p.err(tok, .invalid_compound_literal_storage_class, .{@tagName(d.storage_class)});
8517 d.storage_class = .none;
8518 },
8519 .register => if (p.func.qt == null) try p.err(p.tok_i, .illegal_storage_on_global, .{}),
8520 else => {},
74968521 }
7497 return Result{};
8522
8523 d.qt = (try p.typeName()) orelse {
8524 p.tok_i = l_paren;
8525 if (any) {
8526 try p.err(p.tok_i, .expected_type, .{});
8527 return error.ParsingFailed;
8528 }
8529 return null;
8530 };
8531 try p.expectClosing(l_paren, .r_paren);
8532 break :blk .{ l_paren, d };
74988533 };
7499 if (d.storage_class == .register) ty.qual.register = true;
7500 try p.expectClosing(l_paren, .r_paren);
8534 var qt = d.qt;
75018535
7502 if (ty.isFunc()) {
7503 try p.err(.func_init);
7504 } else if (ty.is(.variable_len_array)) {
7505 try p.err(.vla_init);
7506 } else if (ty.hasIncompleteSize() and !ty.is(.incomplete_array)) {
7507 try p.errStr(.variable_incomplete_ty, p.tok_i, try p.typeStr(ty));
7508 return error.ParsingFailed;
8536 switch (qt.base(p.comp).type) {
8537 .func => try p.err(p.tok_i, .func_init, .{}),
8538 .array => |array_ty| if (array_ty.len == .variable) {
8539 try p.err(p.tok_i, .vla_init, .{});
8540 },
8541 else => if (qt.hasIncompleteSize(p.comp)) {
8542 try p.err(p.tok_i, .variable_incomplete_ty, .{qt});
8543 return error.ParsingFailed;
8544 },
75098545 }
7510 var init_list_expr = try p.initializer(ty);
8546
8547 const init_context = p.init_context;
8548 defer p.init_context = init_context;
8549 p.init_context = d.initContext(p);
8550 var init_list_expr = try p.initializer(qt);
75118551 if (d.constexpr) |_| {
75128552 // TODO error if not constexpr
75138553 }
7514 try init_list_expr.un(p, tag, l_paren);
8554
8555 init_list_expr.node = try p.addNode(.{ .compound_literal_expr = .{
8556 .l_paren_tok = l_paren,
8557 .storage_class = switch (d.storage_class) {
8558 .register => .register,
8559 .static => .static,
8560 else => .auto,
8561 },
8562 .thread_local = d.thread_local != null,
8563 .initializer = init_list_expr.node,
8564 .qt = init_list_expr.qt,
8565 } });
75158566 return init_list_expr;
75168567}
75178568
......@@ -7523,21 +8574,23 @@ fn compoundLiteral(p: *Parser) Error!Result {
75238574/// | '++'
75248575/// | '--'
75258576/// argumentExprList : assignExpr (',' assignExpr)*
7526fn suffixExpr(p: *Parser, lhs: Result) Error!Result {
7527 assert(!lhs.empty(p));
8577fn suffixExpr(p: *Parser, lhs: Result) Error!?Result {
75288578 switch (p.tok_ids[p.tok_i]) {
7529 .l_paren => return p.callExpr(lhs),
8579 .l_paren => return try p.callExpr(lhs),
75308580 .plus_plus => {
75318581 defer p.tok_i += 1;
75328582
75338583 var operand = lhs;
7534 if (!operand.ty.isScalar())
7535 try p.errStr(.invalid_argument_un, p.tok_i, try p.typeStr(operand.ty));
7536 if (operand.ty.isComplex())
7537 try p.errStr(.complex_prefix_postfix_op, p.tok_i, try p.typeStr(operand.ty));
7538
7539 if (!p.tmpTree().isLval(operand.node) or operand.ty.isConst()) {
7540 try p.err(.not_assignable);
8584 const scalar_kind = operand.qt.scalarKind(p.comp);
8585 if (scalar_kind == .void_pointer)
8586 try p.err(p.tok_i, .gnu_pointer_arith, .{});
8587 if (scalar_kind == .none)
8588 try p.err(p.tok_i, .invalid_argument_un, .{operand.qt});
8589 if (!scalar_kind.isReal())
8590 try p.err(p.tok_i, .complex_prefix_postfix_op, .{operand.qt});
8591
8592 if (!p.tree.isLval(operand.node) or operand.qt.@"const") {
8593 try p.err(p.tok_i, .not_assignable, .{});
75418594 return error.ParsingFailed;
75428595 }
75438596 try operand.usualUnaryConversion(p, p.tok_i);
......@@ -7549,13 +8602,16 @@ fn suffixExpr(p: *Parser, lhs: Result) Error!Result {
75498602 defer p.tok_i += 1;
75508603
75518604 var operand = lhs;
7552 if (!operand.ty.isScalar())
7553 try p.errStr(.invalid_argument_un, p.tok_i, try p.typeStr(operand.ty));
7554 if (operand.ty.isComplex())
7555 try p.errStr(.complex_prefix_postfix_op, p.tok_i, try p.typeStr(operand.ty));
7556
7557 if (!p.tmpTree().isLval(operand.node) or operand.ty.isConst()) {
7558 try p.err(.not_assignable);
8605 const scalar_kind = operand.qt.scalarKind(p.comp);
8606 if (scalar_kind == .void_pointer)
8607 try p.err(p.tok_i, .gnu_pointer_arith, .{});
8608 if (scalar_kind == .none)
8609 try p.err(p.tok_i, .invalid_argument_un, .{operand.qt});
8610 if (!scalar_kind.isReal())
8611 try p.err(p.tok_i, .complex_prefix_postfix_op, .{operand.qt});
8612
8613 if (!p.tree.isLval(operand.node) or operand.qt.@"const") {
8614 try p.err(p.tok_i, .not_assignable, .{});
75598615 return error.ParsingFailed;
75608616 }
75618617 try operand.usualUnaryConversion(p, p.tok_i);
......@@ -7566,56 +8622,68 @@ fn suffixExpr(p: *Parser, lhs: Result) Error!Result {
75668622 .l_bracket => {
75678623 const l_bracket = p.tok_i;
75688624 p.tok_i += 1;
7569 var index = try p.expr();
7570 try index.expect(p);
8625 var index = try p.expect(expr);
75718626 try p.expectClosing(l_bracket, .r_bracket);
75728627
75738628 const array_before_conversion = lhs;
75748629 const index_before_conversion = index;
75758630 var ptr = lhs;
7576 try ptr.lvalConversion(p);
7577 try index.lvalConversion(p);
7578 if (ptr.ty.isPtr()) {
7579 ptr.ty = ptr.ty.elemType();
7580 if (index.ty.isInt()) {
8631 try ptr.lvalConversion(p, l_bracket);
8632 try index.lvalConversion(p, l_bracket);
8633 if (ptr.qt.get(p.comp, .pointer)) |pointer_ty| {
8634 ptr.qt = pointer_ty.child;
8635 if (index.qt.isRealInt(p.comp)) {
75818636 try p.checkArrayBounds(index_before_conversion, array_before_conversion, l_bracket);
75828637 } else {
7583 try p.errTok(.invalid_index, l_bracket);
8638 try p.err(l_bracket, .invalid_index, .{});
75848639 }
7585 } else if (index.ty.isPtr()) {
7586 index.ty = index.ty.elemType();
7587 if (ptr.ty.isInt()) {
8640 } else if (index.qt.get(p.comp, .pointer)) |pointer_ty| {
8641 index.qt = pointer_ty.child;
8642 if (ptr.qt.isRealInt(p.comp)) {
75888643 try p.checkArrayBounds(array_before_conversion, index_before_conversion, l_bracket);
75898644 } else {
7590 try p.errTok(.invalid_index, l_bracket);
8645 try p.err(l_bracket, .invalid_index, .{});
75918646 }
75928647 std.mem.swap(Result, &ptr, &index);
7593 } else {
7594 try p.errTok(.invalid_subscript, l_bracket);
8648 } else if (ptr.qt.get(p.comp, .vector)) |vector_ty| {
8649 ptr = array_before_conversion;
8650 ptr.qt = vector_ty.elem;
8651 if (!index.qt.isRealInt(p.comp)) {
8652 try p.err(l_bracket, .invalid_index, .{});
8653 }
8654 } else if (!index.qt.isInvalid() and !ptr.qt.isInvalid()) {
8655 try p.err(l_bracket, .invalid_subscript, .{});
75958656 }
75968657
75978658 try ptr.saveValue(p);
75988659 try index.saveValue(p);
7599 try ptr.bin(p, .array_access_expr, index, l_bracket);
8660 ptr.node = try p.addNode(.{ .array_access_expr = .{
8661 .l_bracket_tok = l_bracket,
8662 .base = ptr.node,
8663 .index = index.node,
8664 .qt = ptr.qt,
8665 } });
76008666 return ptr;
76018667 },
76028668 .period => {
8669 const period = p.tok_i;
76038670 p.tok_i += 1;
76048671 const name = try p.expectIdentifier();
7605 return p.fieldAccess(lhs, name, false);
8672 return try p.fieldAccess(lhs, name, false, period);
76068673 },
76078674 .arrow => {
8675 const arrow = p.tok_i;
76088676 p.tok_i += 1;
76098677 const name = try p.expectIdentifier();
7610 if (lhs.ty.isArray()) {
8678 if (lhs.qt.is(p.comp, .array)) {
76118679 var copy = lhs;
7612 copy.ty.decayArray();
7613 try copy.implicitCast(p, .array_to_pointer);
7614 return p.fieldAccess(copy, name, true);
8680 copy.qt = try copy.qt.decay(p.comp);
8681 try copy.implicitCast(p, .array_to_pointer, arrow);
8682 return try p.fieldAccess(copy, name, true, arrow);
76158683 }
7616 return p.fieldAccess(lhs, name, true);
8684 return try p.fieldAccess(lhs, name, true, arrow);
76178685 },
7618 else => return Result{},
8686 else => return null,
76198687 }
76208688}
76218689
......@@ -7624,76 +8692,97 @@ fn fieldAccess(
76248692 lhs: Result,
76258693 field_name_tok: TokenIndex,
76268694 is_arrow: bool,
8695 access_tok: TokenIndex,
76278696) !Result {
7628 const expr_ty = lhs.ty;
7629 const is_ptr = expr_ty.isPtr();
7630 const expr_base_ty = if (is_ptr) expr_ty.elemType() else expr_ty;
7631 const record_ty = expr_base_ty.getRecord() orelse {
7632 try p.errStr(.expected_record_ty, field_name_tok, try p.typeStr(expr_ty));
8697 if (lhs.qt.isInvalid()) {
8698 const access: Node.MemberAccess = .{
8699 .access_tok = access_tok,
8700 .qt = .invalid,
8701 .base = lhs.node,
8702 .member_index = std.math.maxInt(u32),
8703 };
8704 return .{
8705 .qt = .invalid,
8706 .node = try p.addNode(if (is_arrow)
8707 .{ .member_access_ptr_expr = access }
8708 else
8709 .{ .member_access_expr = access }),
8710 };
8711 }
8712
8713 const expr_qt = if (lhs.qt.get(p.comp, .atomic)) |atomic| atomic else lhs.qt;
8714 const is_ptr = expr_qt.isPointer(p.comp);
8715 const expr_base_qt = if (is_ptr) expr_qt.childType(p.comp) else expr_qt;
8716 const record_qt = if (expr_base_qt.get(p.comp, .atomic)) |atomic| atomic else expr_base_qt;
8717 const record_ty = record_qt.getRecord(p.comp) orelse {
8718 try p.err(field_name_tok, .expected_record_ty, .{expr_qt});
76338719 return error.ParsingFailed;
76348720 };
76358721
7636 if (record_ty.isIncomplete()) {
7637 try p.errStr(.deref_incomplete_ty_ptr, field_name_tok - 2, try p.typeStr(expr_base_ty));
8722 if (record_ty.layout == null) {
8723 std.debug.assert(is_ptr);
8724 try p.err(field_name_tok - 2, .deref_incomplete_ty_ptr, .{expr_base_qt});
76388725 return error.ParsingFailed;
76398726 }
7640 if (is_arrow and !is_ptr) try p.errStr(.member_expr_not_ptr, field_name_tok, try p.typeStr(expr_ty));
7641 if (!is_arrow and is_ptr) try p.errStr(.member_expr_ptr, field_name_tok, try p.typeStr(expr_ty));
8727 if (expr_qt != lhs.qt) try p.err(field_name_tok, .member_expr_atomic, .{lhs.qt});
8728 if (expr_base_qt != record_qt) try p.err(field_name_tok, .member_expr_atomic, .{expr_base_qt});
76428729
7643 const field_name = try StrInt.intern(p.comp, p.tokSlice(field_name_tok));
7644 try p.validateFieldAccess(record_ty, expr_ty, field_name_tok, field_name);
8730 if (is_arrow and !is_ptr) try p.err(field_name_tok, .member_expr_not_ptr, .{expr_qt});
8731 if (!is_arrow and is_ptr) try p.err(field_name_tok, .member_expr_ptr, .{expr_qt});
8732
8733 const field_name = try p.comp.internString(p.tokSlice(field_name_tok));
8734 try p.validateFieldAccess(record_ty, record_qt, field_name_tok, field_name);
76458735 var discard: u64 = 0;
7646 return p.fieldAccessExtra(lhs.node, record_ty, field_name, is_arrow, &discard);
8736 return p.fieldAccessExtra(lhs.node, record_ty, field_name, is_arrow, access_tok, &discard);
76478737}
76488738
7649fn validateFieldAccess(p: *Parser, record_ty: *const Type.Record, expr_ty: Type, field_name_tok: TokenIndex, field_name: StringId) Error!void {
7650 if (record_ty.hasField(field_name)) return;
7651
7652 p.strings.items.len = 0;
7653
7654 try p.strings.print("'{s}' in '", .{p.tokSlice(field_name_tok)});
7655 const mapper = p.comp.string_interner.getSlowTypeMapper();
7656 {
7657 var unmanaged = p.strings.moveToUnmanaged();
7658 var allocating: std.Io.Writer.Allocating = .fromArrayList(p.comp.gpa, &unmanaged);
7659 defer {
7660 unmanaged = allocating.toArrayList();
7661 p.strings = unmanaged.toManaged(p.comp.gpa);
7662 }
7663 expr_ty.print(mapper, p.comp.langopts, &allocating.writer) catch |e| switch (e) {
7664 error.WriteFailed => return error.OutOfMemory,
7665 };
7666 }
7667 try p.strings.append('\'');
7668
7669 const duped = try p.comp.diagnostics.arena.allocator().dupe(u8, p.strings.items);
7670 try p.errStr(.no_such_member, field_name_tok, duped);
8739fn validateFieldAccess(p: *Parser, record_ty: Type.Record, record_qt: QualType, field_name_tok: TokenIndex, field_name: StringId) Error!void {
8740 if (record_ty.hasField(p.comp, field_name)) return;
8741 try p.err(field_name_tok, .no_such_member, .{ p.tokSlice(field_name_tok), record_qt });
76718742 return error.ParsingFailed;
76728743}
76738744
7674fn fieldAccessExtra(p: *Parser, lhs: NodeIndex, record_ty: *const Type.Record, field_name: StringId, is_arrow: bool, offset_bits: *u64) Error!Result {
7675 for (record_ty.fields, 0..) |f, i| {
7676 if (f.isAnonymousRecord()) {
7677 if (!f.ty.hasField(field_name)) continue;
7678 const inner = try p.addNode(.{
7679 .tag = if (is_arrow) .member_access_ptr_expr else .member_access_expr,
7680 .ty = f.ty,
7681 .data = .{ .member = .{ .lhs = lhs, .index = @intCast(i) } },
7682 });
7683 const ret = p.fieldAccessExtra(inner, f.ty.getRecord().?, field_name, false, offset_bits);
7684 offset_bits.* = f.layout.offset_bits;
8745fn fieldAccessExtra(
8746 p: *Parser,
8747 base: Node.Index,
8748 record_ty: Type.Record,
8749 target_name: StringId,
8750 is_arrow: bool,
8751 access_tok: TokenIndex,
8752 offset_bits: *u64,
8753) Error!Result {
8754 for (record_ty.fields, 0..) |field, field_index| {
8755 if (field.name_tok == 0) if (field.qt.getRecord(p.comp)) |field_record_ty| {
8756 if (!field_record_ty.hasField(p.comp, target_name)) continue;
8757
8758 const access: Node.MemberAccess = .{
8759 .access_tok = access_tok,
8760 .qt = field.qt,
8761 .base = base,
8762 .member_index = @intCast(field_index),
8763 };
8764 const inner = try p.addNode(if (is_arrow)
8765 .{ .member_access_ptr_expr = access }
8766 else
8767 .{ .member_access_expr = access });
8768
8769 const ret = p.fieldAccessExtra(inner, field_record_ty, target_name, false, access_tok, offset_bits);
8770 offset_bits.* = field.layout.offset_bits;
76858771 return ret;
7686 }
7687 if (field_name == f.name) {
7688 offset_bits.* = f.layout.offset_bits;
7689 return Result{
7690 .ty = f.ty,
7691 .node = try p.addNode(.{
7692 .tag = if (is_arrow) .member_access_ptr_expr else .member_access_expr,
7693 .ty = f.ty,
7694 .data = .{ .member = .{ .lhs = lhs, .index = @intCast(i) } },
7695 }),
8772 };
8773 if (target_name == field.name) {
8774 offset_bits.* = field.layout.offset_bits;
8775
8776 const access: Node.MemberAccess = .{
8777 .access_tok = access_tok,
8778 .qt = field.qt,
8779 .base = base,
8780 .member_index = @intCast(field_index),
76968781 };
8782 return .{ .qt = field.qt, .node = try p.addNode(if (is_arrow)
8783 .{ .member_access_ptr_expr = access }
8784 else
8785 .{ .member_access_expr = access }) };
76978786 }
76988787 }
76998788 // We already checked that this container has a field by the name.
......@@ -7703,22 +8792,22 @@ fn fieldAccessExtra(p: *Parser, lhs: NodeIndex, record_ty: *const Type.Record, f
77038792fn checkVaStartArg(p: *Parser, builtin_tok: TokenIndex, first_after: TokenIndex, param_tok: TokenIndex, arg: *Result, idx: u32) !void {
77048793 assert(idx != 0);
77058794 if (idx > 1) {
7706 try p.errTok(.closing_paren, first_after);
8795 try p.err(first_after, .closing_paren, .{});
77078796 return error.ParsingFailed;
77088797 }
77098798
7710 var func_ty = p.func.ty orelse {
7711 try p.errTok(.va_start_not_in_func, builtin_tok);
8799 const func_qt = p.func.qt orelse {
8800 try p.err(builtin_tok, .va_start_not_in_func, .{});
77128801 return;
77138802 };
7714 const func_params = func_ty.params();
7715 if (func_ty.specifier != .var_args_func or func_params.len == 0) {
7716 return p.errTok(.va_start_fixed_args, builtin_tok);
8803 const func_ty = func_qt.get(p.comp, .func) orelse return;
8804 if (func_ty.kind != .variadic or func_ty.params.len == 0) {
8805 return p.err(builtin_tok, .va_start_fixed_args, .{});
77178806 }
7718 const last_param_name = func_params[func_params.len - 1].name;
8807 const last_param_name = func_ty.params[func_ty.params.len - 1].name;
77198808 const decl_ref = p.getNode(arg.node, .decl_ref_expr);
7720 if (decl_ref == null or last_param_name != try StrInt.intern(p.comp, p.tokSlice(p.nodes.items(.data)[@intFromEnum(decl_ref.?)].decl_ref))) {
7721 try p.errTok(.va_start_not_last_param, param_tok);
8809 if (decl_ref == null or last_param_name != try p.comp.internString(p.tokSlice(decl_ref.?.name_tok))) {
8810 try p.err(param_tok, .va_start_not_last_param, .{});
77228811 }
77238812}
77248813
......@@ -7726,26 +8815,26 @@ fn checkArithOverflowArg(p: *Parser, builtin_tok: TokenIndex, first_after: Token
77268815 _ = builtin_tok;
77278816 _ = first_after;
77288817 if (idx <= 1) {
7729 if (!arg.ty.isInt()) {
7730 return p.errStr(.overflow_builtin_requires_int, param_tok, try p.typeStr(arg.ty));
8818 if (!arg.qt.isRealInt(p.comp)) {
8819 return p.err(param_tok, .overflow_builtin_requires_int, .{arg.qt});
77318820 }
77328821 } else if (idx == 2) {
7733 if (!arg.ty.isPtr()) return p.errStr(.overflow_result_requires_ptr, param_tok, try p.typeStr(arg.ty));
7734 const child = arg.ty.elemType();
7735 if (!child.isInt() or child.is(.bool) or child.is(.@"enum") or child.qual.@"const") return p.errStr(.overflow_result_requires_ptr, param_tok, try p.typeStr(arg.ty));
8822 if (!arg.qt.isPointer(p.comp)) return p.err(param_tok, .overflow_result_requires_ptr, .{arg.qt});
8823 const child = arg.qt.childType(p.comp);
8824 if (child.scalarKind(p.comp) != .int or child.@"const") return p.err(param_tok, .overflow_result_requires_ptr, .{arg.qt});
77368825 }
77378826}
77388827
77398828fn checkComplexArg(p: *Parser, builtin_tok: TokenIndex, first_after: TokenIndex, param_tok: TokenIndex, arg: *Result, idx: u32) !void {
77408829 _ = builtin_tok;
77418830 _ = first_after;
7742 if (idx <= 1 and !arg.ty.isFloat()) {
7743 try p.errStr(.not_floating_type, param_tok, try p.typeStr(arg.ty));
8831 if (idx <= 1 and !arg.qt.isFloat(p.comp)) {
8832 try p.err(param_tok, .not_floating_type, .{arg.qt});
77448833 } else if (idx == 1) {
77458834 const prev_idx = p.list_buf.items[p.list_buf.items.len - 1];
7746 const prev_ty = p.nodes.items(.ty)[@intFromEnum(prev_idx)];
7747 if (!prev_ty.eql(arg.ty, p.comp, false)) {
7748 try p.errStr(.argument_types_differ, param_tok, try p.typePairStrExtra(prev_ty, " vs ", arg.ty));
8835 const prev_qt = prev_idx.qt(&p.tree);
8836 if (!prev_qt.eql(arg.qt, p.comp)) {
8837 try p.err(param_tok, .argument_types_differ, .{ prev_qt, arg.qt });
77498838 }
77508839 }
77518840}
......@@ -7753,17 +8842,27 @@ fn checkComplexArg(p: *Parser, builtin_tok: TokenIndex, first_after: TokenIndex,
77538842fn callExpr(p: *Parser, lhs: Result) Error!Result {
77548843 const l_paren = p.tok_i;
77558844 p.tok_i += 1;
7756 const ty = lhs.ty.isCallable() orelse {
7757 try p.errStr(.not_callable, l_paren, try p.typeStr(lhs.ty));
7758 return error.ParsingFailed;
8845
8846 // We cannot refer to the function type here because the pointer to
8847 // type_store.extra might get invalidated while parsing args.
8848 const func_qt, const params_len, const func_kind = blk: {
8849 var base_qt = lhs.qt;
8850 if (base_qt.get(p.comp, .pointer)) |pointer_ty| base_qt = pointer_ty.child;
8851 if (base_qt.isInvalid()) break :blk .{ base_qt, std.math.maxInt(usize), undefined };
8852
8853 const func_type_qt = base_qt.base(p.comp);
8854 if (func_type_qt.type != .func) {
8855 try p.err(l_paren, .not_callable, .{lhs.qt});
8856 return error.ParsingFailed;
8857 }
8858 break :blk .{ func_type_qt.qt, func_type_qt.type.func.params.len, func_type_qt.type.func.kind };
77598859 };
7760 const params = ty.params();
8860
77618861 var func = lhs;
7762 try func.lvalConversion(p);
8862 try func.lvalConversion(p, l_paren);
77638863
77648864 const list_buf_top = p.list_buf.items.len;
77658865 defer p.list_buf.items.len = list_buf_top;
7766 try p.list_buf.append(func.node);
77678866 var arg_count: u32 = 0;
77688867 var first_after = l_paren;
77698868
......@@ -7771,20 +8870,21 @@ fn callExpr(p: *Parser, lhs: Result) Error!Result {
77718870
77728871 while (p.eatToken(.r_paren) == null) {
77738872 const param_tok = p.tok_i;
7774 if (arg_count == params.len) first_after = p.tok_i;
7775 var arg = try p.assignExpr();
7776 try arg.expect(p);
8873 if (arg_count == params_len) first_after = p.tok_i;
8874 var arg = try p.expect(assignExpr);
77778875
77788876 if (call_expr.shouldPerformLvalConversion(arg_count)) {
7779 try arg.lvalConversion(p);
8877 try arg.lvalConversion(p, param_tok);
77808878 }
7781 if (arg.ty.hasIncompleteSize() and !arg.ty.is(.void)) return error.ParsingFailed;
8879 if ((arg.qt.hasIncompleteSize(p.comp) and !arg.qt.is(p.comp, .void)) or arg.qt.isInvalid()) return error.ParsingFailed;
8880
8881 if (arg_count >= params_len) {
8882 if (call_expr.shouldPromoteVarArg(arg_count)) switch (arg.qt.base(p.comp).type) {
8883 .int => |int_ty| if (int_ty == .int) try arg.castToInt(p, arg.qt.promoteInt(p.comp), param_tok),
8884 .float => |float_ty| if (float_ty == .double) try arg.castToFloat(p, .double, param_tok),
8885 else => {},
8886 };
77828887
7783 if (arg_count >= params.len) {
7784 if (call_expr.shouldPromoteVarArg(arg_count)) {
7785 if (arg.ty.isInt()) try arg.intCast(p, arg.ty.integerPromotion(p.comp), param_tok);
7786 if (arg.ty.is(.float)) try arg.floatCast(p, .{ .specifier = .double });
7787 }
77888888 try call_expr.checkVarArg(p, first_after, param_tok, &arg, arg_count);
77898889 try arg.saveValue(p);
77908890 try p.list_buf.append(arg.node);
......@@ -7796,26 +8896,30 @@ fn callExpr(p: *Parser, lhs: Result) Error!Result {
77968896 };
77978897 continue;
77988898 }
7799 const p_ty = params[arg_count].ty;
7800 if (p_ty.specifier == .static_array) {
7801 const arg_array_len: u64 = arg.ty.arrayLen() orelse std.math.maxInt(u64);
7802 const param_array_len: u64 = p_ty.arrayLen().?;
7803 if (arg_array_len < param_array_len) {
7804 const extra = Diagnostics.Message.Extra{ .arguments = .{
7805 .expected = @intCast(arg_array_len),
7806 .actual = @intCast(param_array_len),
7807 } };
7808 try p.errExtra(.array_argument_too_small, param_tok, extra);
7809 try p.errTok(.callee_with_static_array, params[arg_count].name_tok);
7810 }
7811 if (arg.val.isZero(p.comp)) {
7812 try p.errTok(.non_null_argument, param_tok);
7813 try p.errTok(.callee_with_static_array, params[arg_count].name_tok);
8899
8900 if (func_qt.get(p.comp, .func)) |func_ty| {
8901 const param = func_ty.params[arg_count];
8902
8903 if (param.qt.get(p.comp, .pointer)) |pointer_ty| static_check: {
8904 const decayed_child_qt = pointer_ty.decayed orelse break :static_check;
8905 const param_array_ty = decayed_child_qt.get(p.comp, .array).?;
8906 if (param_array_ty.len != .static) break :static_check;
8907 const param_array_len = param_array_ty.len.static;
8908 const arg_array_len = arg.qt.arrayLen(p.comp);
8909
8910 if (arg_array_len != null and arg_array_len.? < param_array_len) {
8911 try p.err(param_tok, .array_argument_too_small, .{ arg_array_len.?, param_array_len });
8912 try p.err(param.name_tok, .callee_with_static_array, .{});
8913 }
8914 if (arg.val.isZero(p.comp)) {
8915 try p.err(param_tok, .non_null_argument, .{});
8916 try p.err(param.name_tok, .callee_with_static_array, .{});
8917 }
78148918 }
7815 }
78168919
7817 if (call_expr.shouldCoerceArg(arg_count)) {
7818 try arg.coerce(p, p_ty, param_tok, .{ .arg = params[arg_count].name_tok });
8920 if (call_expr.shouldCoerceArg(arg_count)) {
8921 try arg.coerce(p, param.qt, param_tok, .{ .arg = param.name_tok });
8922 }
78198923 }
78208924 try arg.saveValue(p);
78218925 try p.list_buf.append(arg.node);
......@@ -7826,48 +8930,49 @@ fn callExpr(p: *Parser, lhs: Result) Error!Result {
78268930 break;
78278931 };
78288932 }
8933 if (func_qt.isInvalid()) {
8934 // Skip argument count checks.
8935 return try call_expr.finish(p, func_qt, list_buf_top, l_paren);
8936 }
78298937
7830 const actual: u32 = @intCast(arg_count);
7831 const extra = Diagnostics.Message.Extra{ .arguments = .{
7832 .expected = @intCast(params.len),
7833 .actual = actual,
7834 } };
78358938 if (call_expr.paramCountOverride()) |expected| {
7836 if (expected != actual) {
7837 try p.errExtra(.expected_arguments, first_after, .{ .arguments = .{ .expected = expected, .actual = actual } });
7838 }
7839 } else if (ty.is(.func) and params.len != arg_count) {
7840 try p.errExtra(.expected_arguments, first_after, extra);
7841 } else if (ty.is(.old_style_func) and params.len != arg_count) {
7842 if (params.len == 0)
7843 try p.errTok(.passing_args_to_kr, first_after)
7844 else
7845 try p.errExtra(.expected_arguments_old, first_after, extra);
7846 } else if (ty.is(.var_args_func) and arg_count < params.len) {
7847 try p.errExtra(.expected_at_least_arguments, first_after, extra);
8939 if (expected != arg_count) {
8940 try p.err(first_after, .expected_arguments, .{ expected, arg_count });
8941 }
8942 } else switch (func_kind) {
8943 .normal => if (params_len != arg_count) {
8944 try p.err(first_after, .expected_arguments, .{ params_len, arg_count });
8945 },
8946 .variadic => if (arg_count < params_len) {
8947 try p.err(first_after, .expected_at_least_arguments, .{ params_len, arg_count });
8948 },
8949 .old_style => if (params_len != arg_count) {
8950 if (params_len == 0)
8951 try p.err(first_after, .passing_args_to_kr, .{})
8952 else
8953 try p.err(first_after, .expected_arguments_old, .{ params_len, arg_count });
8954 },
78488955 }
78498956
7850 return call_expr.finish(p, ty, list_buf_top, arg_count);
8957 return try call_expr.finish(p, func_qt, list_buf_top, l_paren);
78518958}
78528959
78538960fn checkArrayBounds(p: *Parser, index: Result, array: Result, tok: TokenIndex) !void {
78548961 if (index.val.opt_ref == .none) return;
78558962
7856 const array_len = array.ty.arrayLen() orelse return;
8963 const array_len = array.qt.arrayLen(p.comp) orelse return;
78578964 if (array_len == 0) return;
78588965
78598966 if (array_len == 1) {
7860 if (p.getNode(array.node, .member_access_expr) orelse p.getNode(array.node, .member_access_ptr_expr)) |node| {
7861 const data = p.nodes.items(.data)[@intFromEnum(node)];
7862 var lhs = p.nodes.items(.ty)[@intFromEnum(data.member.lhs)];
7863 if (lhs.get(.pointer)) |ptr| {
7864 lhs = ptr.data.sub_type.*;
7865 }
7866 if (lhs.is(.@"struct")) {
7867 const record = lhs.getRecord().?;
7868 if (data.member.index + 1 == record.fields.len) {
8967 if (p.getNode(array.node, .member_access_expr) orelse p.getNode(array.node, .member_access_ptr_expr)) |access| {
8968 var base_ty = access.base.qt(&p.tree);
8969 if (base_ty.get(p.comp, .pointer)) |pointer_ty| {
8970 base_ty = pointer_ty.child;
8971 }
8972 if (base_ty.getRecord(p.comp)) |record_ty| {
8973 if (access.member_index + 1 == record_ty.fields.len) {
78698974 if (!index.val.isZero(p.comp)) {
7870 try p.errStr(.old_style_flexible_struct, tok, try index.str(p));
8975 try p.err(tok, .old_style_flexible_struct, .{index});
78718976 }
78728977 return;
78738978 }
......@@ -7875,15 +8980,15 @@ fn checkArrayBounds(p: *Parser, index: Result, array: Result, tok: TokenIndex) !
78758980 }
78768981 }
78778982 const index_int = index.val.toInt(u64, p.comp) orelse std.math.maxInt(u64);
7878 if (index.ty.isUnsignedInt(p.comp)) {
8983 if (index.qt.signedness(p.comp) == .unsigned) {
78798984 if (index_int >= array_len) {
7880 try p.errStr(.array_after, tok, try index.str(p));
8985 try p.err(tok, .array_after, .{index});
78818986 }
78828987 } else {
7883 if (index.val.compare(.lt, Value.zero, p.comp)) {
7884 try p.errStr(.array_before, tok, try index.str(p));
8988 if (index.val.compare(.lt, .zero, p.comp)) {
8989 try p.err(tok, .array_before, .{index});
78858990 } else if (index_int >= array_len) {
7886 try p.errStr(.array_after, tok, try index.str(p));
8991 try p.err(tok, .array_after, .{index});
78878992 }
78888993 }
78898994}
......@@ -7900,221 +9005,262 @@ fn checkArrayBounds(p: *Parser, index: Result, array: Result, tok: TokenIndex) !
79009005/// | STRING_LITERAL
79019006/// | '(' expr ')'
79029007/// | genericSelection
7903fn primaryExpr(p: *Parser) Error!Result {
9008/// | shufflevector
9009/// | convertvector
9010/// | typesCompatible
9011/// | chooseExpr
9012/// | vaStart
9013/// | offsetof
9014fn primaryExpr(p: *Parser) Error!?Result {
79049015 if (p.eatToken(.l_paren)) |l_paren| {
7905 var e = try p.expr();
7906 try e.expect(p);
9016 var grouped_expr = try p.expect(expr);
79079017 try p.expectClosing(l_paren, .r_paren);
7908 try e.un(p, .paren_expr, l_paren);
7909 return e;
9018 try grouped_expr.un(p, .paren_expr, l_paren);
9019 return grouped_expr;
79109020 }
9021
79119022 switch (p.tok_ids[p.tok_i]) {
79129023 .identifier, .extended_identifier => {
79139024 const name_tok = try p.expectIdentifier();
79149025 const name = p.tokSlice(name_tok);
7915 const interned_name = try StrInt.intern(p.comp, name);
9026 const interned_name = try p.comp.internString(name);
79169027 if (interned_name == p.auto_type_decl_name) {
7917 try p.errStr(.auto_type_self_initialized, name_tok, name);
9028 try p.err(name_tok, .auto_type_self_initialized, .{name});
79189029 return error.ParsingFailed;
79199030 }
9031
79209032 if (p.syms.findSymbol(interned_name)) |sym| {
7921 try p.checkDeprecatedUnavailable(sym.ty, name_tok, sym.tok);
9033 if (sym.kind == .typedef) {
9034 try p.err(name_tok, .unexpected_type_name, .{name});
9035 return error.ParsingFailed;
9036 }
9037 if (sym.out_of_scope) {
9038 try p.err(name_tok, .out_of_scope_use, .{name});
9039 try p.err(sym.tok, .previous_definition, .{});
9040 }
9041 try p.checkDeprecatedUnavailable(sym.qt, name_tok, sym.tok);
79229042 if (sym.kind == .constexpr) {
7923 return Result{
9043 return .{
79249044 .val = sym.val,
7925 .ty = sym.ty,
9045 .qt = sym.qt,
79269046 .node = try p.addNode(.{
7927 .tag = .decl_ref_expr,
7928 .ty = sym.ty,
7929 .data = .{ .decl_ref = name_tok },
7930 .loc = @enumFromInt(name_tok),
9047 .decl_ref_expr = .{
9048 .name_tok = name_tok,
9049 .qt = sym.qt,
9050 .decl = sym.node.unpack().?,
9051 },
79319052 }),
79329053 };
79339054 }
79349055 if (sym.val.is(.int, p.comp)) {
79359056 switch (p.const_decl_folding) {
7936 .gnu_folding_extension => try p.errTok(.const_decl_folded, name_tok),
7937 .gnu_vla_folding_extension => try p.errTok(.const_decl_folded_vla, name_tok),
9057 .gnu_folding_extension => try p.err(name_tok, .const_decl_folded, .{}),
9058 .gnu_vla_folding_extension => try p.err(name_tok, .const_decl_folded_vla, .{}),
79389059 else => {},
79399060 }
79409061 }
7941 return Result{
9062
9063 const node = try p.addNode(if (sym.kind == .enumeration)
9064 .{ .enumeration_ref = .{
9065 .name_tok = name_tok,
9066 .qt = sym.qt,
9067 .decl = sym.node.unpack().?,
9068 } }
9069 else
9070 .{ .decl_ref_expr = .{
9071 .name_tok = name_tok,
9072 .qt = sym.qt,
9073 .decl = sym.node.unpack().?,
9074 } });
9075
9076 const res: Result = .{
79429077 .val = if (p.const_decl_folding == .no_const_decl_folding and sym.kind != .enumeration) Value{} else sym.val,
7943 .ty = sym.ty,
7944 .node = try p.addNode(.{
7945 .tag = if (sym.kind == .enumeration) .enumeration_ref else .decl_ref_expr,
7946 .ty = sym.ty,
7947 .data = .{ .decl_ref = name_tok },
7948 .loc = @enumFromInt(name_tok),
7949 }),
9078 .qt = sym.qt,
9079 .node = node,
79509080 };
9081 try res.putValue(p);
9082 return res;
79519083 }
7952 if (try p.comp.builtins.getOrCreate(p.comp, name, p.arena)) |some| {
9084
9085 // Check if this is a builtin call.
9086 if (try p.comp.builtins.getOrCreate(p.comp, name)) |some| {
79539087 for (p.tok_ids[p.tok_i..]) |id| switch (id) {
79549088 .r_paren => {}, // closing grouped expr
79559089 .l_paren => break, // beginning of a call
79569090 else => {
7957 try p.errTok(.builtin_must_be_called, name_tok);
9091 try p.err(name_tok, .builtin_must_be_called, .{});
79589092 return error.ParsingFailed;
79599093 },
79609094 };
79619095 if (some.builtin.properties.header != .none) {
7962 try p.errStr(.implicit_builtin, name_tok, name);
7963 try p.errExtra(.implicit_builtin_header_note, name_tok, .{ .builtin_with_header = .{
7964 .builtin = some.builtin.tag,
7965 .header = some.builtin.properties.header,
7966 } });
9096 try p.err(name_tok, .implicit_builtin, .{name});
9097 try p.err(name_tok, .implicit_builtin_header_note, .{
9098 @tagName(some.builtin.properties.header), Builtin.nameFromTag(some.builtin.tag).span(),
9099 });
9100 }
9101
9102 switch (some.builtin.tag) {
9103 .__builtin_choose_expr => return try p.builtinChooseExpr(),
9104 .__builtin_va_arg => return try p.builtinVaArg(name_tok),
9105 .__builtin_offsetof => return try p.builtinOffsetof(name_tok, .bytes),
9106 .__builtin_bitoffsetof => return try p.builtinOffsetof(name_tok, .bits),
9107 .__builtin_types_compatible_p => return try p.typesCompatible(name_tok),
9108 .__builtin_convertvector => return try p.convertvector(name_tok),
9109 .__builtin_shufflevector => return try p.shufflevector(name_tok),
9110 else => {},
79679111 }
79689112
7969 return Result{
7970 .ty = some.ty,
9113 return .{
9114 .qt = some.qt,
79719115 .node = try p.addNode(.{
7972 .tag = .builtin_call_expr_one,
7973 .ty = some.ty,
7974 .data = .{ .decl = .{ .name = name_tok, .node = .none } },
7975 .loc = @enumFromInt(name_tok),
9116 .builtin_ref = .{
9117 .name_tok = name_tok,
9118 .qt = some.qt,
9119 },
79769120 }),
79779121 };
79789122 }
9123
9124 // Check for unknown builtin or implicit function declaration.
79799125 if (p.tok_ids[p.tok_i] == .l_paren and !p.comp.langopts.standard.atLeast(.c23)) {
79809126 // allow implicitly declaring functions before C99 like `puts("foo")`
79819127 if (mem.startsWith(u8, name, "__builtin_"))
7982 try p.errStr(.unknown_builtin, name_tok, name)
9128 try p.err(name_tok, .unknown_builtin, .{name})
79839129 else
7984 try p.errStr(.implicit_func_decl, name_tok, name);
9130 try p.err(name_tok, .implicit_func_decl, .{name});
79859131
7986 const func_ty = try p.arena.create(Type.Func);
7987 func_ty.* = .{ .return_type = .{ .specifier = .int }, .params = &.{} };
7988 const ty: Type = .{ .specifier = .old_style_func, .data = .{ .func = func_ty } };
9132 const func_qt = try p.comp.type_store.put(p.gpa, .{ .func = .{
9133 .return_type = .int,
9134 .kind = .old_style,
9135 .params = &.{},
9136 } });
79899137 const node = try p.addNode(.{
7990 .ty = ty,
7991 .tag = .fn_proto,
7992 .data = .{ .decl = .{ .name = name_tok } },
7993 .loc = @enumFromInt(name_tok),
9138 .function = .{
9139 .name_tok = name_tok,
9140 .qt = func_qt,
9141 .static = false,
9142 .@"inline" = false,
9143 .definition = null,
9144 .body = null,
9145 },
79949146 });
79959147
79969148 try p.decl_buf.append(node);
7997 try p.syms.declareSymbol(p, interned_name, ty, name_tok, node);
9149 try p.syms.declareSymbol(p, interned_name, func_qt, name_tok, node);
79989150
7999 return Result{
8000 .ty = ty,
9151 return .{
9152 .qt = func_qt,
80019153 .node = try p.addNode(.{
8002 .tag = .decl_ref_expr,
8003 .ty = ty,
8004 .data = .{ .decl_ref = name_tok },
8005 .loc = @enumFromInt(name_tok),
9154 .decl_ref_expr = .{
9155 .name_tok = name_tok,
9156 .qt = func_qt,
9157 .decl = node,
9158 },
80069159 }),
80079160 };
80089161 }
8009 try p.errStr(.undeclared_identifier, name_tok, p.tokSlice(name_tok));
9162
9163 try p.err(name_tok, .undeclared_identifier, .{p.tokSlice(name_tok)});
80109164 return error.ParsingFailed;
80119165 },
80129166 .keyword_true, .keyword_false => |id| {
80139167 const tok_i = p.tok_i;
80149168 p.tok_i += 1;
8015 const res = Result{
8016 .val = Value.fromBool(id == .keyword_true),
8017 .ty = .{ .specifier = .bool },
8018 .node = try p.addNode(.{ .tag = .bool_literal, .ty = .{ .specifier = .bool }, .data = undefined, .loc = @enumFromInt(tok_i) }),
9169 const res: Result = .{
9170 .val = .fromBool(id == .keyword_true),
9171 .qt = .bool,
9172 .node = try p.addNode(.{
9173 .bool_literal = .{
9174 .qt = .bool,
9175 .literal_tok = tok_i,
9176 },
9177 }),
80199178 };
80209179 std.debug.assert(!p.in_macro); // Should have been replaced with .one / .zero
8021 try p.value_map.put(res.node, res.val);
9180 try res.putValue(p);
80229181 return res;
80239182 },
80249183 .keyword_nullptr => {
80259184 defer p.tok_i += 1;
8026 try p.errStr(.pre_c23_compat, p.tok_i, "'nullptr'");
8027 return Result{
8028 .val = Value.null,
8029 .ty = .{ .specifier = .nullptr_t },
9185 try p.err(p.tok_i, .pre_c23_compat, .{"'nullptr'"});
9186 return .{
9187 .val = .null,
9188 .qt = .nullptr_t,
80309189 .node = try p.addNode(.{
8031 .tag = .nullptr_literal,
8032 .ty = .{ .specifier = .nullptr_t },
8033 .data = undefined,
8034 .loc = @enumFromInt(p.tok_i),
9190 .nullptr_literal = .{
9191 .qt = .nullptr_t,
9192 .literal_tok = p.tok_i,
9193 },
80359194 }),
80369195 };
80379196 },
80389197 .macro_func, .macro_function => {
80399198 defer p.tok_i += 1;
8040 var ty: Type = undefined;
9199 var ty: QualType = undefined;
80419200 var tok = p.tok_i;
9201
80429202 if (p.func.ident) |some| {
8043 ty = some.ty;
8044 tok = p.nodes.items(.data)[@intFromEnum(some.node)].decl.name;
8045 } else if (p.func.ty) |_| {
9203 ty = some.qt;
9204 tok = some.node.get(&p.tree).variable.name_tok;
9205 } else if (p.func.qt) |_| {
80469206 const strings_top = p.strings.items.len;
80479207 defer p.strings.items.len = strings_top;
80489208
80499209 try p.strings.appendSlice(p.tokSlice(p.func.name));
80509210 try p.strings.append(0);
8051 const predef = try p.makePredefinedIdentifier(strings_top);
8052 ty = predef.ty;
9211 const predef = try p.makePredefinedIdentifier(p.strings.items[strings_top..]);
9212 ty = predef.qt;
80539213 p.func.ident = predef;
80549214 } else {
8055 const strings_top = p.strings.items.len;
8056 defer p.strings.items.len = strings_top;
8057
8058 try p.strings.append(0);
8059 const predef = try p.makePredefinedIdentifier(strings_top);
8060 ty = predef.ty;
9215 const predef = try p.makePredefinedIdentifier("\x00");
9216 ty = predef.qt;
80619217 p.func.ident = predef;
80629218 try p.decl_buf.append(predef.node);
80639219 }
8064 if (p.func.ty == null) try p.err(.predefined_top_level);
8065 return Result{
8066 .ty = ty,
9220 if (p.func.qt == null) try p.err(p.tok_i, .predefined_top_level, .{});
9221
9222 return .{
9223 .qt = ty,
80679224 .node = try p.addNode(.{
8068 .tag = .decl_ref_expr,
8069 .ty = ty,
8070 .data = .{ .decl_ref = tok },
8071 .loc = @enumFromInt(tok),
9225 .decl_ref_expr = .{
9226 .name_tok = tok,
9227 .qt = ty,
9228 .decl = p.func.ident.?.node,
9229 },
80729230 }),
80739231 };
80749232 },
80759233 .macro_pretty_func => {
80769234 defer p.tok_i += 1;
8077 var ty: Type = undefined;
9235 var qt: QualType = undefined;
80789236 if (p.func.pretty_ident) |some| {
8079 ty = some.ty;
8080 } else if (p.func.ty) |func_ty| {
8081 const strings_top = p.strings.items.len;
8082 defer p.strings.items.len = strings_top;
9237 qt = some.qt;
9238 } else if (p.func.qt) |func_qt| {
9239 var sf = std.heap.stackFallback(1024, p.gpa);
9240 var allocating: std.Io.Writer.Allocating = .init(sf.get());
9241 defer allocating.deinit();
80839242
8084 const mapper = p.comp.string_interner.getSlowTypeMapper();
8085 {
8086 var unmanaged = p.strings.moveToUnmanaged();
8087 var allocating: std.Io.Writer.Allocating = .fromArrayList(p.comp.gpa, &unmanaged);
8088 defer {
8089 unmanaged = allocating.toArrayList();
8090 p.strings = unmanaged.toManaged(p.comp.gpa);
8091 }
8092 Type.printNamed(func_ty, p.tokSlice(p.func.name), mapper, p.comp.langopts, &allocating.writer) catch |e| switch (e) {
8093 error.WriteFailed => return error.OutOfMemory,
8094 };
8095 }
8096 try p.strings.append(0);
8097 const predef = try p.makePredefinedIdentifier(strings_top);
8098 ty = predef.ty;
9243 func_qt.printNamed(p.tokSlice(p.func.name), p.comp, &allocating.writer) catch return error.OutOfMemory;
9244 allocating.writer.writeByte(0) catch return error.OutOfMemory;
9245
9246 const predef = try p.makePredefinedIdentifier(allocating.getWritten());
9247 qt = predef.qt;
80999248 p.func.pretty_ident = predef;
81009249 } else {
8101 const strings_top = p.strings.items.len;
8102 defer p.strings.items.len = strings_top;
8103
8104 try p.strings.appendSlice("top level\x00");
8105 const predef = try p.makePredefinedIdentifier(strings_top);
8106 ty = predef.ty;
9250 const predef = try p.makePredefinedIdentifier("top level\x00");
9251 qt = predef.qt;
81079252 p.func.pretty_ident = predef;
81089253 try p.decl_buf.append(predef.node);
81099254 }
8110 if (p.func.ty == null) try p.err(.predefined_top_level);
8111 return Result{
8112 .ty = ty,
9255 if (p.func.qt == null) try p.err(p.tok_i, .predefined_top_level, .{});
9256 return .{
9257 .qt = qt,
81139258 .node = try p.addNode(.{
8114 .tag = .decl_ref_expr,
8115 .ty = ty,
8116 .data = .{ .decl_ref = p.tok_i },
8117 .loc = @enumFromInt(p.tok_i),
9259 .decl_ref_expr = .{
9260 .name_tok = p.tok_i,
9261 .qt = qt,
9262 .decl = p.func.pretty_ident.?.node,
9263 },
81189264 }),
81199265 };
81209266 },
......@@ -8124,7 +9270,7 @@ fn primaryExpr(p: *Parser) Error!Result {
81249270 .string_literal_utf_32,
81259271 .string_literal_wide,
81269272 .unterminated_string_literal,
8127 => return p.stringLiteral(),
9273 => return try p.stringLiteral(),
81289274 .char_literal,
81299275 .char_literal_utf_8,
81309276 .char_literal_utf_16,
......@@ -8132,22 +9278,30 @@ fn primaryExpr(p: *Parser) Error!Result {
81329278 .char_literal_wide,
81339279 .empty_char_literal,
81349280 .unterminated_char_literal,
8135 => return p.charLiteral(),
9281 => return try p.charLiteral(),
81369282 .zero => {
81379283 defer p.tok_i += 1;
8138 var res: Result = .{ .val = Value.zero, .ty = if (p.in_macro) p.comp.types.intmax else Type.int };
8139 res.node = try p.addNode(.{ .tag = .int_literal, .ty = res.ty, .data = undefined, .loc = @enumFromInt(p.tok_i) });
8140 if (!p.in_macro) try p.value_map.put(res.node, res.val);
9284 const int_qt: QualType = if (p.in_macro) p.comp.type_store.intmax else .int;
9285 const res: Result = .{
9286 .val = .zero,
9287 .qt = int_qt,
9288 .node = try p.addNode(.{ .int_literal = .{ .qt = int_qt, .literal_tok = p.tok_i } }),
9289 };
9290 try res.putValue(p);
81419291 return res;
81429292 },
81439293 .one => {
81449294 defer p.tok_i += 1;
8145 var res: Result = .{ .val = Value.one, .ty = if (p.in_macro) p.comp.types.intmax else Type.int };
8146 res.node = try p.addNode(.{ .tag = .int_literal, .ty = res.ty, .data = undefined, .loc = @enumFromInt(p.tok_i) });
8147 if (!p.in_macro) try p.value_map.put(res.node, res.val);
9295 const int_qt: QualType = if (p.in_macro) p.comp.type_store.intmax else .int;
9296 const res: Result = .{
9297 .val = .one,
9298 .qt = int_qt,
9299 .node = try p.addNode(.{ .int_literal = .{ .qt = int_qt, .literal_tok = p.tok_i } }),
9300 };
9301 try res.putValue(p);
81489302 return res;
81499303 },
8150 .pp_num => return p.ppNum(),
9304 .pp_num => return try p.ppNum(),
81519305 .embed_byte => {
81529306 assert(!p.in_macro);
81539307 const loc = p.pp.tokens.items(.loc)[p.tok_i];
......@@ -8159,34 +9313,40 @@ fn primaryExpr(p: *Parser) Error!Result {
81599313 byte *= 10;
81609314 byte += c - '0';
81619315 }
8162 var res: Result = .{ .val = try Value.int(byte, p.comp) };
8163 res.node = try p.addNode(.{ .tag = .int_literal, .ty = res.ty, .data = undefined, .loc = @enumFromInt(p.tok_i) });
8164 try p.value_map.put(res.node, res.val);
9316 const res: Result = .{
9317 .val = try Value.int(byte, p.comp),
9318 .qt = .int,
9319 .node = try p.addNode(.{ .int_literal = .{ .qt = .int, .literal_tok = p.tok_i } }),
9320 };
9321 try res.putValue(p);
81659322 return res;
81669323 },
81679324 .keyword_generic => return p.genericSelection(),
8168 else => return Result{},
9325 else => return null,
81699326 }
81709327}
81719328
8172fn makePredefinedIdentifier(p: *Parser, strings_top: usize) !Result {
8173 const end: u32 = @intCast(p.strings.items.len);
8174 const elem_ty: Type = .{ .specifier = .char, .qual = .{ .@"const" = true } };
8175 const arr_ty = try p.arena.create(Type.Array);
8176 arr_ty.* = .{ .elem = elem_ty, .len = end - strings_top };
8177 const ty: Type = .{ .specifier = .array, .data = .{ .array = arr_ty } };
9329fn makePredefinedIdentifier(p: *Parser, slice: []const u8) !Result {
9330 const array_qt = try p.comp.type_store.put(p.gpa, .{ .array = .{
9331 .elem = .{ .@"const" = true, ._index = .int_char },
9332 .len = .{ .fixed = slice.len },
9333 } });
81789334
8179 const slice = p.strings.items[strings_top..];
81809335 const val = try Value.intern(p.comp, .{ .bytes = slice });
81819336
8182 const str_lit = try p.addNode(.{ .tag = .string_literal_expr, .ty = ty, .data = undefined, .loc = @enumFromInt(p.tok_i) });
8183 if (!p.in_macro) try p.value_map.put(str_lit, val);
8184
8185 return Result{ .ty = ty, .node = try p.addNode(.{
8186 .tag = .implicit_static_var,
8187 .ty = ty,
8188 .data = .{ .decl = .{ .name = p.tok_i, .node = str_lit } },
8189 .loc = @enumFromInt(p.tok_i),
9337 const str_lit = try p.addNode(.{ .string_literal_expr = .{ .qt = array_qt, .literal_tok = p.tok_i, .kind = .ascii } });
9338 if (!p.in_macro) try p.tree.value_map.put(p.gpa, str_lit, val);
9339
9340 return .{ .qt = array_qt, .node = try p.addNode(.{
9341 .variable = .{
9342 .name_tok = p.tok_i,
9343 .qt = array_qt,
9344 .storage_class = .static,
9345 .thread_local = false,
9346 .implicit = true,
9347 .initializer = str_lit,
9348 .definition = null,
9349 },
81909350 }) };
81919351}
81929352
......@@ -8196,12 +9356,12 @@ fn stringLiteral(p: *Parser) Error!Result {
81969356 var string_kind: text_literal.Kind = .char;
81979357 while (text_literal.Kind.classify(p.tok_ids[string_end], .string_literal)) |next| : (string_end += 1) {
81989358 string_kind = string_kind.concat(next) catch {
8199 try p.errTok(.unsupported_str_cat, string_end);
9359 try p.err(string_end, .unsupported_str_cat, .{});
82009360 while (p.tok_ids[p.tok_i].isStringLiteral()) : (p.tok_i += 1) {}
82019361 return error.ParsingFailed;
82029362 };
82039363 if (string_kind == .unterminated) {
8204 try p.errTok(.unterminated_string_literal_error, string_end);
9364 // Diagnostic issued in preprocessor.
82059365 p.tok_i = string_end + 1;
82069366 return error.ParsingFailed;
82079367 }
......@@ -8220,10 +9380,18 @@ fn stringLiteral(p: *Parser) Error!Result {
82209380 while (p.tok_i < string_end) : (p.tok_i += 1) {
82219381 const this_kind = text_literal.Kind.classify(p.tok_ids[p.tok_i], .string_literal).?;
82229382 const slice = this_kind.contentSlice(p.tokSlice(p.tok_i));
8223 var char_literal_parser = text_literal.Parser.init(slice, this_kind, 0x10ffff, p.comp);
9383 var char_literal_parser: text_literal.Parser = .{
9384 .comp = p.comp,
9385 .literal = slice,
9386 .kind = this_kind,
9387 .max_codepoint = 0x10ffff,
9388 .loc = p.pp.tokens.items(.loc)[p.tok_i],
9389 .expansion_locs = p.pp.expansionSlice(p.tok_i),
9390 .incorrect_encoding_is_error = count > 1,
9391 };
82249392
82259393 try p.strings.ensureUnusedCapacity((slice.len + 1) * @intFromEnum(char_width)); // +1 for null terminator
8226 while (char_literal_parser.next()) |item| switch (item) {
9394 while (try char_literal_parser.next()) |item| switch (item) {
82279395 .value => |v| {
82289396 switch (char_width) {
82299397 .@"1" => p.strings.appendAssumeCapacity(@intCast(v)),
......@@ -8258,7 +9426,6 @@ fn stringLiteral(p: *Parser) Error!Result {
82589426 },
82599427 .improperly_encoded => |bytes| {
82609428 if (count > 1) {
8261 try p.errTok(.illegal_char_encoding_error, p.tok_i);
82629429 return error.ParsingFailed;
82639430 }
82649431 p.strings.appendSliceAssumeCapacity(bytes);
......@@ -8283,9 +9450,6 @@ fn stringLiteral(p: *Parser) Error!Result {
82839450 }
82849451 },
82859452 };
8286 for (char_literal_parser.errors()) |item| {
8287 try p.errExtra(item.tag, p.tok_i, item.extra);
8288 }
82899453 }
82909454 p.strings.appendNTimesAssumeCapacity(0, @intFromEnum(char_width));
82919455 const slice = p.strings.items[literal_start..];
......@@ -8300,36 +9464,45 @@ fn stringLiteral(p: *Parser) Error!Result {
83009464
83019465 const val = try Value.intern(p.comp, .{ .bytes = slice });
83029466
8303 const arr_ty = try p.arena.create(Type.Array);
8304 arr_ty.* = .{ .elem = string_kind.elementType(p.comp), .len = @divExact(slice.len, @intFromEnum(char_width)) };
8305 var res: Result = .{
8306 .ty = .{
8307 .specifier = .array,
8308 .data = .{ .array = arr_ty },
8309 },
9467 const array_qt = try p.comp.type_store.put(p.gpa, .{ .array = .{
9468 .elem = string_kind.elementType(p.comp),
9469 .len = .{ .fixed = @divExact(slice.len, @intFromEnum(char_width)) },
9470 } });
9471 const res: Result = .{
9472 .qt = array_qt,
83109473 .val = val,
9474 .node = try p.addNode(.{ .string_literal_expr = .{
9475 .literal_tok = string_start,
9476 .qt = array_qt,
9477 .kind = switch (string_kind) {
9478 .char, .unterminated => .ascii,
9479 .wide => .wide,
9480 .utf_8 => .utf8,
9481 .utf_16 => .utf16,
9482 .utf_32 => .utf32,
9483 },
9484 } }),
83119485 };
8312 res.node = try p.addNode(.{ .tag = .string_literal_expr, .ty = res.ty, .data = undefined, .loc = @enumFromInt(string_start) });
8313 if (!p.in_macro) try p.value_map.put(res.node, res.val);
9486 try res.putValue(p);
83149487 return res;
83159488}
83169489
8317fn charLiteral(p: *Parser) Error!Result {
9490fn charLiteral(p: *Parser) Error!?Result {
83189491 defer p.tok_i += 1;
83199492 const tok_id = p.tok_ids[p.tok_i];
83209493 const char_kind = text_literal.Kind.classify(tok_id, .char_literal) orelse {
83219494 if (tok_id == .empty_char_literal) {
8322 try p.err(.empty_char_literal_error);
9495 try p.err(p.tok_i, .empty_char_literal_error, .{});
83239496 } else if (tok_id == .unterminated_char_literal) {
8324 try p.err(.unterminated_char_literal_error);
9497 try p.err(p.tok_i, .unterminated_char_literal_error, .{});
83259498 } else unreachable;
83269499 return .{
8327 .ty = Type.int,
8328 .val = Value.zero,
8329 .node = try p.addNode(.{ .tag = .char_literal, .ty = Type.int, .data = undefined, .loc = @enumFromInt(p.tok_i) }),
9500 .qt = .int,
9501 .val = .zero,
9502 .node = try p.addNode(.{ .char_literal = .{ .qt = .int, .literal_tok = p.tok_i, .kind = .ascii } }),
83309503 };
83319504 };
8332 if (char_kind == .utf_8) try p.err(.u8_char_lit);
9505 if (char_kind == .utf_8) try p.err(p.tok_i, .u8_char_lit, .{});
83339506 var val: u32 = 0;
83349507
83359508 const slice = char_kind.contentSlice(p.tokSlice(p.tok_i));
......@@ -8340,14 +9513,21 @@ fn charLiteral(p: *Parser) Error!Result {
83409513 val = slice[0];
83419514 } else {
83429515 const max_codepoint = char_kind.maxCodepoint(p.comp);
8343 var char_literal_parser = text_literal.Parser.init(slice, char_kind, max_codepoint, p.comp);
9516 var char_literal_parser: text_literal.Parser = .{
9517 .comp = p.comp,
9518 .literal = slice,
9519 .kind = char_kind,
9520 .max_codepoint = max_codepoint,
9521 .loc = p.pp.tokens.items(.loc)[p.tok_i],
9522 .expansion_locs = p.pp.expansionSlice(p.tok_i),
9523 };
83449524
83459525 const max_chars_expected = 4;
83469526 var stack_fallback = std.heap.stackFallback(max_chars_expected * @sizeOf(u32), p.comp.gpa);
83479527 var chars = std.array_list.Managed(u32).initCapacity(stack_fallback.get(), max_chars_expected) catch unreachable; // stack allocation already succeeded
83489528 defer chars.deinit();
83499529
8350 while (char_literal_parser.next()) |item| switch (item) {
9530 while (try char_literal_parser.next()) |item| switch (item) {
83519531 .value => |v| try chars.append(v),
83529532 .codepoint => |c| try chars.append(c),
83539533 .improperly_encoded => |s| {
......@@ -8363,7 +9543,7 @@ fn charLiteral(p: *Parser) Error!Result {
83639543 chars.appendAssumeCapacity(c);
83649544 }
83659545 if (max_codepoint_seen > max_codepoint) {
8366 char_literal_parser.err(.char_too_large, .{ .none = {} });
9546 try char_literal_parser.err(.char_too_large, .{});
83679547 }
83689548 },
83699549 };
......@@ -8371,16 +9551,16 @@ fn charLiteral(p: *Parser) Error!Result {
83719551 is_multichar = chars.items.len > 1;
83729552 if (is_multichar) {
83739553 if (char_kind == .char and chars.items.len == 4) {
8374 char_literal_parser.warn(.four_char_char_literal, .{ .none = {} });
9554 try char_literal_parser.warn(.four_char_char_literal, .{});
83759555 } else if (char_kind == .char) {
8376 char_literal_parser.warn(.multichar_literal_warning, .{ .none = {} });
9556 try char_literal_parser.warn(.multichar_literal_warning, .{});
83779557 } else {
8378 const kind = switch (char_kind) {
9558 const kind: []const u8 = switch (char_kind) {
83799559 .wide => "wide",
83809560 .utf_8, .utf_16, .utf_32 => "Unicode",
83819561 else => unreachable,
83829562 };
8383 char_literal_parser.err(.invalid_multichar_literal, .{ .str = kind });
9563 try char_literal_parser.err(.invalid_multichar_literal, .{kind});
83849564 }
83859565 }
83869566
......@@ -8396,20 +9576,17 @@ fn charLiteral(p: *Parser) Error!Result {
83969576 }
83979577
83989578 if (multichar_overflow) {
8399 char_literal_parser.err(.char_lit_too_wide, .{ .none = {} });
8400 }
8401
8402 for (char_literal_parser.errors()) |item| {
8403 try p.errExtra(item.tag, p.tok_i, item.extra);
9579 try char_literal_parser.err(.char_lit_too_wide, .{});
84049580 }
84059581 }
84069582
8407 const ty = char_kind.charLiteralType(p.comp);
9583 const char_literal_qt = char_kind.charLiteralType(p.comp);
84089584 // This is the type the literal will have if we're in a macro; macros always operate on intmax_t/uintmax_t values
8409 const macro_ty = if (ty.isUnsignedInt(p.comp) or (char_kind == .char and p.comp.getCharSignedness() == .unsigned))
8410 p.comp.types.intmax.makeIntegerUnsigned()
9585 const macro_qt = if (char_literal_qt.signedness(p.comp) == .unsigned or
9586 (char_kind == .char and p.comp.getCharSignedness() == .unsigned))
9587 try p.comp.type_store.intmax.makeIntUnsigned(p.comp)
84119588 else
8412 p.comp.types.intmax;
9589 p.comp.type_store.intmax;
84139590
84149591 var value = try Value.int(val, p.comp);
84159592 // C99 6.4.4.4.10
......@@ -8418,28 +9595,38 @@ fn charLiteral(p: *Parser) Error!Result {
84189595 // > that of the single character or escape sequence is converted to type int.
84199596 // This conversion only matters if `char` is signed and has a high-order bit of `1`
84209597 if (char_kind == .char and !is_multichar and val > 0x7F and p.comp.getCharSignedness() == .signed) {
8421 _ = try value.intCast(.{ .specifier = .char }, p.comp);
9598 _ = try value.intCast(.char, p.comp);
84229599 }
84239600
84249601 const res = Result{
8425 .ty = if (p.in_macro) macro_ty else ty,
9602 .qt = if (p.in_macro) macro_qt else char_literal_qt,
84269603 .val = value,
8427 .node = try p.addNode(.{ .tag = .char_literal, .ty = ty, .data = undefined, .loc = @enumFromInt(p.tok_i) }),
9604 .node = try p.addNode(.{ .char_literal = .{
9605 .qt = char_literal_qt,
9606 .literal_tok = p.tok_i,
9607 .kind = switch (char_kind) {
9608 .char, .unterminated => .ascii,
9609 .wide => .wide,
9610 .utf_8 => .utf8,
9611 .utf_16 => .utf16,
9612 .utf_32 => .utf32,
9613 },
9614 } }),
84289615 };
8429 if (!p.in_macro) try p.value_map.put(res.node, res.val);
9616 if (!p.in_macro) try p.tree.value_map.put(p.gpa, res.node, res.val);
84309617 return res;
84319618}
84329619
84339620fn parseFloat(p: *Parser, buf: []const u8, suffix: NumberSuffix, tok_i: TokenIndex) !Result {
8434 const ty = Type{ .specifier = switch (suffix) {
9621 const qt: QualType = switch (suffix) {
84359622 .None, .I => .double,
84369623 .F, .IF => .float,
84379624 .F16, .IF16 => .float16,
84389625 .L, .IL => .long_double,
8439 .W, .IW => p.comp.float80Type().?.specifier,
9626 .W, .IW => p.comp.float80Type().?,
84409627 .Q, .IQ, .F128, .IF128 => .float128,
84419628 else => unreachable,
8442 } };
9629 };
84439630 const val = try Value.intern(p.comp, key: {
84449631 try p.strings.ensureUnusedCapacity(buf.len);
84459632
......@@ -8450,8 +9637,7 @@ fn parseFloat(p: *Parser, buf: []const u8, suffix: NumberSuffix, tok_i: TokenInd
84509637 }
84519638
84529639 const float = std.fmt.parseFloat(f128, p.strings.items[strings_top..]) catch unreachable;
8453 const bits = ty.bitSizeof(p.comp).?;
8454 break :key switch (bits) {
9640 break :key switch (qt.bitSizeof(p.comp)) {
84559641 16 => .{ .float = .{ .f16 = @floatCast(float) } },
84569642 32 => .{ .float = .{ .f32 = @floatCast(float) } },
84579643 64 => .{ .float = .{ .f64 = @floatCast(float) } },
......@@ -8461,22 +9647,15 @@ fn parseFloat(p: *Parser, buf: []const u8, suffix: NumberSuffix, tok_i: TokenInd
84619647 };
84629648 });
84639649 var res = Result{
8464 .ty = ty,
8465 .node = try p.addNode(.{ .tag = .float_literal, .ty = ty, .data = undefined, .loc = @enumFromInt(tok_i) }),
9650 .qt = qt,
9651 .node = try p.addNode(.{ .float_literal = .{ .qt = qt, .literal_tok = tok_i } }),
84669652 .val = val,
84679653 };
84689654 if (suffix.isImaginary()) {
8469 try p.err(.gnu_imaginary_constant);
8470 res.ty = .{ .specifier = switch (suffix) {
8471 .I => .complex_double,
8472 .IF16 => .complex_float16,
8473 .IF => .complex_float,
8474 .IL => .complex_long_double,
8475 .IW => p.comp.float80Type().?.makeComplex().specifier,
8476 .IQ, .IF128 => .complex_float128,
8477 else => unreachable,
8478 } };
8479 res.val = try Value.intern(p.comp, switch (res.ty.bitSizeof(p.comp).?) {
9655 try p.err(p.tok_i, .gnu_imaginary_constant, .{});
9656 res.qt = try qt.toComplex(p.comp);
9657
9658 res.val = try Value.intern(p.comp, switch (res.qt.bitSizeof(p.comp)) {
84809659 32 => .{ .complex = .{ .cf16 = .{ 0.0, val.toFloat(f16, p.comp) } } },
84819660 64 => .{ .complex = .{ .cf32 = .{ 0.0, val.toFloat(f32, p.comp) } } },
84829661 128 => .{ .complex = .{ .cf64 = .{ 0.0, val.toFloat(f64, p.comp) } } },
......@@ -8494,9 +9673,9 @@ fn getIntegerPart(p: *Parser, buf: []const u8, prefix: NumberPrefix, tok_i: Toke
84949673
84959674 if (!prefix.digitAllowed(buf[0])) {
84969675 switch (prefix) {
8497 .binary => try p.errExtra(.invalid_binary_digit, tok_i, .{ .ascii = @intCast(buf[0]) }),
8498 .octal => try p.errExtra(.invalid_octal_digit, tok_i, .{ .ascii = @intCast(buf[0]) }),
8499 .hex => try p.errStr(.invalid_int_suffix, tok_i, buf),
9676 .binary => try p.err(tok_i, .invalid_binary_digit, .{text_literal.Ascii.init(buf[0])}),
9677 .octal => try p.err(tok_i, .invalid_octal_digit, .{text_literal.Ascii.init(buf[0])}),
9678 .hex => try p.err(tok_i, .invalid_int_suffix, .{buf}),
85009679 .decimal => unreachable,
85019680 }
85029681 return error.ParsingFailed;
......@@ -8507,24 +9686,24 @@ fn getIntegerPart(p: *Parser, buf: []const u8, prefix: NumberPrefix, tok_i: Toke
85079686 switch (c) {
85089687 '.' => return buf[0..idx],
85099688 'p', 'P' => return if (prefix == .hex) buf[0..idx] else {
8510 try p.errStr(.invalid_int_suffix, tok_i, buf[idx..]);
9689 try p.err(tok_i, .invalid_int_suffix, .{buf[idx..]});
85119690 return error.ParsingFailed;
85129691 },
85139692 'e', 'E' => {
85149693 switch (prefix) {
85159694 .hex => continue,
85169695 .decimal => return buf[0..idx],
8517 .binary => try p.errExtra(.invalid_binary_digit, tok_i, .{ .ascii = @intCast(c) }),
8518 .octal => try p.errExtra(.invalid_octal_digit, tok_i, .{ .ascii = @intCast(c) }),
9696 .binary => try p.err(tok_i, .invalid_binary_digit, .{text_literal.Ascii.init(c)}),
9697 .octal => try p.err(tok_i, .invalid_octal_digit, .{text_literal.Ascii.init(c)}),
85199698 }
85209699 return error.ParsingFailed;
85219700 },
85229701 '0'...'9', 'a'...'d', 'A'...'D', 'f', 'F' => {
85239702 if (!prefix.digitAllowed(c)) {
85249703 switch (prefix) {
8525 .binary => try p.errExtra(.invalid_binary_digit, tok_i, .{ .ascii = @intCast(c) }),
8526 .octal => try p.errExtra(.invalid_octal_digit, tok_i, .{ .ascii = @intCast(c) }),
8527 .decimal, .hex => try p.errStr(.invalid_int_suffix, tok_i, buf[idx..]),
9704 .binary => try p.err(tok_i, .invalid_binary_digit, .{text_literal.Ascii.init(c)}),
9705 .octal => try p.err(tok_i, .invalid_octal_digit, .{text_literal.Ascii.init(c)}),
9706 .decimal, .hex => try p.err(tok_i, .invalid_int_suffix, .{buf[idx..]}),
85289707 }
85299708 return error.ParsingFailed;
85309709 }
......@@ -8559,33 +9738,33 @@ fn fixedSizeInt(p: *Parser, base: u8, buf: []const u8, suffix: NumberSuffix, tok
85599738 if (overflowed != 0) overflow = true;
85609739 val = sum;
85619740 }
8562 var res: Result = .{ .val = try Value.int(val, p.comp) };
9741 var res: Result = .{
9742 .val = try Value.int(val, p.comp),
9743 .node = undefined, // set later
9744 };
85639745 if (overflow) {
8564 try p.errTok(.int_literal_too_big, tok_i);
8565 res.ty = .{ .specifier = .ulong_long };
8566 res.node = try p.addNode(.{ .tag = .int_literal, .ty = res.ty, .data = undefined, .loc = @enumFromInt(tok_i) });
8567 if (!p.in_macro) try p.value_map.put(res.node, res.val);
9746 try p.err(tok_i, .int_literal_too_big, .{});
9747 res.qt = .ulong_long;
9748 res.node = try p.addNode(.{ .int_literal = .{ .qt = res.qt, .literal_tok = tok_i } });
9749 try res.putValue(p);
85689750 return res;
85699751 }
85709752 const interned_val = try Value.int(val, p.comp);
8571 if (suffix.isSignedInteger()) {
8572 const max_int = try Value.maxInt(p.comp.types.intmax, p.comp);
9753 if (suffix.isSignedInteger() and base == 10) {
9754 const max_int = try Value.maxInt(p.comp.type_store.intmax, p.comp);
85739755 if (interned_val.compare(.gt, max_int, p.comp)) {
8574 try p.errTok(.implicitly_unsigned_literal, tok_i);
9756 try p.err(tok_i, .implicitly_unsigned_literal, .{});
85759757 }
85769758 }
85779759
8578 const signed_specs = .{ .int, .long, .long_long };
8579 const unsigned_specs = .{ .uint, .ulong, .ulong_long };
8580 const signed_oct_hex_specs = .{ .int, .uint, .long, .ulong, .long_long, .ulong_long };
8581 const specs: []const Type.Specifier = if (suffix.signedness() == .unsigned)
8582 &unsigned_specs
9760 const qts: []const QualType = if (suffix.signedness() == .unsigned)
9761 &.{ .uint, .ulong, .ulong_long }
85839762 else if (base == 10)
8584 &signed_specs
9763 &.{ .int, .long, .long_long }
85859764 else
8586 &signed_oct_hex_specs;
9765 &.{ .int, .uint, .long, .ulong, .long_long, .ulong_long };
85879766
8588 const suffix_ty: Type = .{ .specifier = switch (suffix) {
9767 const suffix_qt: QualType = switch (suffix) {
85899768 .None, .I => .int,
85909769 .U, .IU => .uint,
85919770 .UL, .IUL => .ulong,
......@@ -8593,35 +9772,33 @@ fn fixedSizeInt(p: *Parser, base: u8, buf: []const u8, suffix: NumberSuffix, tok
85939772 .L, .IL => .long,
85949773 .LL, .ILL => .long_long,
85959774 else => unreachable,
8596 } };
9775 };
85979776
8598 for (specs) |spec| {
8599 res.ty = Type{ .specifier = spec };
8600 if (res.ty.compareIntegerRanks(suffix_ty, p.comp).compare(.lt)) continue;
8601 const max_int = try Value.maxInt(res.ty, p.comp);
9777 for (qts) |qt| {
9778 res.qt = qt;
9779 if (res.qt.intRankOrder(suffix_qt, p.comp).compare(.lt)) continue;
9780 const max_int = try Value.maxInt(res.qt, p.comp);
86029781 if (interned_val.compare(.lte, max_int, p.comp)) break;
86039782 } else {
8604 res.ty = .{ .specifier = spec: {
8605 if (p.comp.langopts.emulate == .gcc) {
8606 if (target_util.hasInt128(p.comp.target)) {
8607 break :spec .int128;
8608 } else {
8609 break :spec .long_long;
8610 }
9783 if (p.comp.langopts.emulate == .gcc) {
9784 if (target_util.hasInt128(p.comp.target)) {
9785 res.qt = .int128;
86119786 } else {
8612 break :spec .ulong_long;
9787 res.qt = .long_long;
86139788 }
8614 } };
9789 } else {
9790 res.qt = .ulong_long;
9791 }
86159792 }
86169793
8617 res.node = try p.addNode(.{ .tag = .int_literal, .ty = res.ty, .data = undefined, .loc = @enumFromInt(tok_i) });
8618 if (!p.in_macro) try p.value_map.put(res.node, res.val);
9794 res.node = try p.addNode(.{ .int_literal = .{ .qt = res.qt, .literal_tok = tok_i } });
9795 try res.putValue(p);
86199796 return res;
86209797}
86219798
86229799fn parseInt(p: *Parser, prefix: NumberPrefix, buf: []const u8, suffix: NumberSuffix, tok_i: TokenIndex) !Result {
86239800 if (prefix == .binary) {
8624 try p.errTok(.binary_integer_literal, tok_i);
9801 try p.err(tok_i, .binary_integer_literal, .{});
86259802 }
86269803 const base = @intFromEnum(prefix);
86279804 var res = if (suffix.isBitInt())
......@@ -8630,8 +9807,8 @@ fn parseInt(p: *Parser, prefix: NumberPrefix, buf: []const u8, suffix: NumberSuf
86309807 try p.fixedSizeInt(base, buf, suffix, tok_i);
86319808
86329809 if (suffix.isImaginary()) {
8633 try p.errTok(.gnu_imaginary_constant, tok_i);
8634 res.ty = res.ty.makeComplex();
9810 try p.err(tok_i, .gnu_imaginary_constant, .{});
9811 res.qt = try res.qt.toComplex(p.comp);
86359812 res.val = .{};
86369813 try res.un(p, .imaginary_literal, tok_i);
86379814 }
......@@ -8639,8 +9816,8 @@ fn parseInt(p: *Parser, prefix: NumberPrefix, buf: []const u8, suffix: NumberSuf
86399816}
86409817
86419818fn bitInt(p: *Parser, base: u8, buf: []const u8, suffix: NumberSuffix, tok_i: TokenIndex) Error!Result {
8642 try p.errStr(.pre_c23_compat, tok_i, "'_BitInt' suffix for literals");
8643 try p.errTok(.bitint_suffix, tok_i);
9819 try p.err(tok_i, .pre_c23_compat, .{"'_BitInt' suffix for literals"});
9820 try p.err(tok_i, .bitint_suffix, .{});
86449821
86459822 var managed = try big.int.Managed.init(p.gpa);
86469823 defer managed.deinit();
......@@ -8671,15 +9848,16 @@ fn bitInt(p: *Parser, base: u8, buf: []const u8, suffix: NumberSuffix, tok_i: To
86719848 break :blk @intCast(bits_needed);
86729849 };
86739850
8674 var res: Result = .{
9851 const int_qt = try p.comp.type_store.put(p.gpa, .{ .bit_int = .{
9852 .bits = bits_needed,
9853 .signedness = suffix.signedness(),
9854 } });
9855 const res: Result = .{
86759856 .val = try Value.intern(p.comp, .{ .int = .{ .big_int = c } }),
8676 .ty = .{
8677 .specifier = .bit_int,
8678 .data = .{ .int = .{ .bits = bits_needed, .signedness = suffix.signedness() } },
8679 },
9857 .qt = int_qt,
9858 .node = try p.addNode(.{ .int_literal = .{ .qt = int_qt, .literal_tok = tok_i } }),
86809859 };
8681 res.node = try p.addNode(.{ .tag = .int_literal, .ty = res.ty, .data = undefined, .loc = @enumFromInt(tok_i) });
8682 if (!p.in_macro) try p.value_map.put(res.node, res.val);
9860 try res.putValue(p);
86839861 return res;
86849862}
86859863
......@@ -8687,7 +9865,7 @@ fn getFracPart(p: *Parser, buf: []const u8, prefix: NumberPrefix, tok_i: TokenIn
86879865 if (buf.len == 0 or buf[0] != '.') return "";
86889866 assert(prefix != .octal);
86899867 if (prefix == .binary) {
8690 try p.errStr(.invalid_int_suffix, tok_i, buf);
9868 try p.err(tok_i, .invalid_int_suffix, .{buf});
86919869 return error.ParsingFailed;
86929870 }
86939871 for (buf, 0..) |c, idx| {
......@@ -8704,7 +9882,7 @@ fn getExponent(p: *Parser, buf: []const u8, prefix: NumberPrefix, tok_i: TokenIn
87049882 switch (buf[0]) {
87059883 'e', 'E' => assert(prefix == .decimal),
87069884 'p', 'P' => if (prefix != .hex) {
8707 try p.errStr(.invalid_float_suffix, tok_i, buf);
9885 try p.err(tok_i, .invalid_float_suffix, .{buf});
87089886 return error.ParsingFailed;
87099887 },
87109888 else => return "",
......@@ -8720,7 +9898,7 @@ fn getExponent(p: *Parser, buf: []const u8, prefix: NumberPrefix, tok_i: TokenIn
87209898 } else buf.len;
87219899 const exponent = buf[0..end];
87229900 if (std.mem.indexOfAny(u8, exponent, "0123456789") == null) {
8723 try p.errTok(.exponent_has_no_digits, tok_i);
9901 try p.err(tok_i, .exponent_has_no_digits, .{});
87249902 return error.ParsingFailed;
87259903 }
87269904 return exponent;
......@@ -8745,21 +9923,21 @@ pub fn parseNumberToken(p: *Parser, tok_i: TokenIndex) !Result {
87459923 const is_float = (exponent.len > 0 or frac.len > 0);
87469924 const suffix = NumberSuffix.fromString(suffix_str, if (is_float) .float else .int) orelse {
87479925 if (is_float) {
8748 try p.errStr(.invalid_float_suffix, tok_i, suffix_str);
9926 try p.err(tok_i, .invalid_float_suffix, .{suffix_str});
87499927 } else {
8750 try p.errStr(.invalid_int_suffix, tok_i, suffix_str);
9928 try p.err(tok_i, .invalid_int_suffix, .{suffix_str});
87519929 }
87529930 return error.ParsingFailed;
87539931 };
87549932 if (suffix.isFloat80() and p.comp.float80Type() == null) {
8755 try p.errStr(.invalid_float_suffix, tok_i, suffix_str);
9933 try p.err(tok_i, .invalid_float_suffix, .{suffix_str});
87569934 return error.ParsingFailed;
87579935 }
87589936
87599937 if (is_float) {
87609938 assert(prefix == .hex or prefix == .decimal);
87619939 if (prefix == .hex and exponent.len == 0) {
8762 try p.errTok(.hex_floating_constant_requires_exponent, tok_i);
9940 try p.err(tok_i, .hex_floating_constant_requires_exponent, .{});
87639941 return error.ParsingFailed;
87649942 }
87659943 const number = buf[0 .. buf.len - suffix_str.len];
......@@ -8773,107 +9951,117 @@ fn ppNum(p: *Parser) Error!Result {
87739951 defer p.tok_i += 1;
87749952 var res = try p.parseNumberToken(p.tok_i);
87759953 if (p.in_macro) {
8776 if (res.ty.isFloat() or !res.ty.isReal()) {
8777 try p.errTok(.float_literal_in_pp_expr, p.tok_i);
9954 const res_sk = res.qt.scalarKind(p.comp);
9955 if (res_sk.isFloat() or !res_sk.isReal()) {
9956 try p.err(p.tok_i, .float_literal_in_pp_expr, .{});
87789957 return error.ParsingFailed;
87799958 }
8780 res.ty = if (res.ty.isUnsignedInt(p.comp)) p.comp.types.intmax.makeIntegerUnsigned() else p.comp.types.intmax;
9959 res.qt = if (res.qt.signedness(p.comp) == .unsigned)
9960 try p.comp.type_store.intmax.makeIntUnsigned(p.comp)
9961 else
9962 p.comp.type_store.intmax;
87819963 } else if (res.val.opt_ref != .none) {
8782 try p.value_map.put(res.node, res.val);
9964 try res.putValue(p);
87839965 }
87849966 return res;
87859967}
87869968
87879969/// Run a parser function but do not evaluate the result
8788fn parseNoEval(p: *Parser, comptime func: fn (*Parser) Error!Result) Error!Result {
9970fn parseNoEval(p: *Parser, comptime func: fn (*Parser) Error!?Result) Error!Result {
87899971 const no_eval = p.no_eval;
87909972 defer p.no_eval = no_eval;
87919973 p.no_eval = true;
9974
87929975 const parsed = try func(p);
8793 try parsed.expect(p);
8794 return parsed;
9976 return p.expectResult(parsed);
87959977}
87969978
87979979/// genericSelection : keyword_generic '(' assignExpr ',' genericAssoc (',' genericAssoc)* ')'
87989980/// genericAssoc
87999981/// : typeName ':' assignExpr
88009982/// | keyword_default ':' assignExpr
8801fn genericSelection(p: *Parser) Error!Result {
9983fn genericSelection(p: *Parser) Error!?Result {
88029984 const kw_generic = p.tok_i;
88039985 p.tok_i += 1;
88049986 const l_paren = try p.expectToken(.l_paren);
88059987 const controlling_tok = p.tok_i;
9988
88069989 const controlling = try p.parseNoEval(assignExpr);
9990 var controlling_qt = controlling.qt;
9991 if (controlling_qt.is(p.comp, .array)) {
9992 controlling_qt = try controlling_qt.decay(p.comp);
9993 }
88079994 _ = try p.expectToken(.comma);
8808 var controlling_ty = controlling.ty;
8809 if (controlling_ty.isArray()) controlling_ty.decayArray();
88109995
88119996 const list_buf_top = p.list_buf.items.len;
88129997 defer p.list_buf.items.len = list_buf_top;
8813 try p.list_buf.append(controlling.node);
88149998
8815 // Use decl_buf to store the token indexes of previous cases
8816 const decl_buf_top = p.decl_buf.items.len;
8817 defer p.decl_buf.items.len = decl_buf_top;
9999 // Use param_buf to store the token indexes of previous cases
10000 const param_buf_top = p.param_buf.items.len;
10001 defer p.param_buf.items.len = param_buf_top;
881810002
881910003 var default_tok: ?TokenIndex = null;
882010004 var default: Result = undefined;
8821 var chosen_tok: TokenIndex = undefined;
8822 var chosen: Result = .{};
10005 var chosen_tok: ?TokenIndex = null;
10006 var chosen: Result = undefined;
10007
882310008 while (true) {
882410009 const start = p.tok_i;
8825 if (try p.typeName()) |ty| blk: {
8826 if (ty.isArray()) {
8827 try p.errTok(.generic_array_type, start);
8828 } else if (ty.isFunc()) {
8829 try p.errTok(.generic_func_type, start);
8830 } else if (ty.anyQual()) {
8831 try p.errTok(.generic_qual_type, start);
10010 if (try p.typeName()) |qt| blk: {
10011 switch (qt.base(p.comp).type) {
10012 .array => try p.err(start, .generic_array_type, .{}),
10013 .func => try p.err(start, .generic_func_type, .{}),
10014 else => if (qt.isQualified()) {
10015 try p.err(start, .generic_qual_type, .{});
10016 },
883210017 }
8833 _ = try p.expectToken(.colon);
8834 const node = try p.assignExpr();
8835 try node.expect(p);
883610018
8837 if (ty.eql(controlling_ty, p.comp, false)) {
8838 if (chosen.node == .none) {
8839 chosen = node;
10019 const colon = try p.expectToken(.colon);
10020 var res = try p.expect(assignExpr);
10021 res.node = try p.addNode(.{
10022 .generic_association_expr = .{
10023 .colon_tok = colon,
10024 .association_qt = qt,
10025 .expr = res.node,
10026 },
10027 });
10028 try p.list_buf.append(res.node);
10029 try p.param_buf.append(.{ .name = undefined, .qt = qt, .name_tok = start, .node = .null });
10030
10031 if (qt.eql(controlling_qt, p.comp)) {
10032 if (chosen_tok == null) {
10033 chosen = res;
884010034 chosen_tok = start;
884110035 break :blk;
884210036 }
8843 try p.errStr(.generic_duplicate, start, try p.typeStr(ty));
8844 try p.errStr(.generic_duplicate_here, chosen_tok, try p.typeStr(ty));
8845 }
8846 const list_buf = p.list_buf.items[list_buf_top + 1 ..];
8847 const decl_buf = p.decl_buf.items[decl_buf_top..];
8848 if (list_buf.len == decl_buf.len) {
8849 // If these do not have the same length, there is already an error
8850 for (list_buf, decl_buf) |item, prev_tok| {
8851 const prev_ty = p.nodes.items(.ty)[@intFromEnum(item)];
8852 if (prev_ty.eql(ty, p.comp, true)) {
8853 try p.errStr(.generic_duplicate, start, try p.typeStr(ty));
8854 try p.errStr(.generic_duplicate_here, @intFromEnum(prev_tok), try p.typeStr(ty));
8855 }
10037 }
10038
10039 const previous_items = p.param_buf.items[0 .. p.param_buf.items.len - 1][param_buf_top..];
10040 for (previous_items) |prev_item| {
10041 if (prev_item.qt.eql(qt, p.comp)) {
10042 try p.err(start, .generic_duplicate, .{qt});
10043 try p.err(prev_item.name_tok, .generic_duplicate_here, .{qt});
885610044 }
885710045 }
8858 try p.list_buf.append(try p.addNode(.{
8859 .tag = .generic_association_expr,
8860 .ty = ty,
8861 .data = .{ .un = node.node },
8862 .loc = @enumFromInt(start),
8863 }));
8864 try p.decl_buf.append(@enumFromInt(start));
886510046 } else if (p.eatToken(.keyword_default)) |tok| {
10047 _ = try p.expectToken(.colon);
10048 var res = try p.expect(assignExpr);
10049 res.node = try p.addNode(.{
10050 .generic_default_expr = .{
10051 .default_tok = tok,
10052 .expr = res.node,
10053 },
10054 });
10055
886610056 if (default_tok) |prev| {
8867 try p.errTok(.generic_duplicate_default, tok);
8868 try p.errTok(.previous_case, prev);
10057 try p.err(tok, .generic_duplicate_default, .{});
10058 try p.err(prev, .previous_case, .{});
886910059 }
10060 default = res;
887010061 default_tok = tok;
8871 _ = try p.expectToken(.colon);
8872 default = try p.assignExpr();
8873 try default.expect(p);
887410062 } else {
8875 if (p.list_buf.items.len == list_buf_top + 1) {
8876 try p.err(.expected_type);
10063 if (p.list_buf.items.len == list_buf_top) {
10064 try p.err(p.tok_i, .expected_type, .{});
887710065 return error.ParsingFailed;
887810066 }
887910067 break;
......@@ -8882,53 +10070,46 @@ fn genericSelection(p: *Parser) Error!Result {
888210070 }
888310071 try p.expectClosing(l_paren, .r_paren);
888410072
8885 if (chosen.node == .none) {
8886 if (default_tok) |tok| {
8887 try p.list_buf.insert(list_buf_top + 1, try p.addNode(.{
8888 .tag = .generic_default_expr,
8889 .data = .{ .un = default.node },
8890 .ty = default.ty,
8891 .loc = @enumFromInt(tok),
8892 }));
10073 if (chosen_tok == null) {
10074 if (default_tok != null) {
889310075 chosen = default;
889410076 } else {
8895 try p.errStr(.generic_no_match, controlling_tok, try p.typeStr(controlling_ty));
10077 try p.err(controlling_tok, .generic_no_match, .{controlling_qt});
889610078 return error.ParsingFailed;
889710079 }
8898 } else {
8899 try p.list_buf.insert(list_buf_top + 1, try p.addNode(.{
8900 .tag = .generic_association_expr,
8901 .data = .{ .un = chosen.node },
8902 .ty = chosen.ty,
8903 .loc = @enumFromInt(chosen_tok),
8904 }));
8905 if (default_tok) |tok| {
8906 try p.list_buf.append(try p.addNode(.{
8907 .tag = .generic_default_expr,
8908 .data = .{ .un = default.node },
8909 .ty = default.ty,
8910 .loc = @enumFromInt(tok),
8911 }));
8912 }
8913 }
8914
8915 var generic_node: Tree.Node = .{
8916 .tag = .generic_expr_one,
8917 .ty = chosen.ty,
8918 .data = .{ .two = .{ controlling.node, chosen.node } },
8919 .loc = @enumFromInt(kw_generic),
8920 };
8921 const associations = p.list_buf.items[list_buf_top..];
8922 if (associations.len > 2) { // associations[0] == controlling.node
8923 generic_node.tag = .generic_expr;
8924 generic_node.data = .{ .range = try p.addList(associations) };
10080 } else if (default_tok != null) {
10081 try p.list_buf.append(default.node);
10082 }
10083
10084 for (p.list_buf.items[list_buf_top..], list_buf_top..) |item, i| {
10085 if (item == chosen.node) {
10086 _ = p.list_buf.orderedRemove(i);
10087 break;
10088 }
892510089 }
8926 chosen.node = try p.addNode(generic_node);
8927 return chosen;
10090
10091 return .{
10092 .qt = chosen.qt,
10093 .val = chosen.val,
10094 .node = try p.addNode(.{
10095 .generic_expr = .{
10096 .generic_tok = kw_generic,
10097 .controlling = controlling.node,
10098 .chosen = chosen.node,
10099 .qt = chosen.qt,
10100 .rest = p.list_buf.items[list_buf_top..],
10101 },
10102 }),
10103 };
892810104}
892910105
893010106test "Node locations" {
8931 var comp = Compilation.init(std.testing.allocator, std.fs.cwd());
10107 var arena_state: std.heap.ArenaAllocator = .init(std.testing.allocator);
10108 defer arena_state.deinit();
10109 const arena = arena_state.allocator();
10110
10111 var diagnostics: Diagnostics = .{ .output = .ignore };
10112 var comp = Compilation.init(std.testing.allocator, arena, &diagnostics, std.fs.cwd());
893210113 defer comp.deinit();
893310114
893410115 const file = try comp.addSourceFromBuffer("file.c",
......@@ -8940,7 +10121,7 @@ test "Node locations" {
894010121
894110122 const builtin_macros = try comp.generateBuiltinMacros(.no_system_defines);
894210123
8943 var pp = Preprocessor.init(&comp);
10124 var pp = Preprocessor.init(&comp, .default);
894410125 defer pp.deinit();
894510126 try pp.addBuiltinMacros();
894610127
......@@ -8952,10 +10133,9 @@ test "Node locations" {
895210133 var tree = try Parser.parse(&pp);
895310134 defer tree.deinit();
895410135
8955 try std.testing.expectEqual(0, comp.diagnostics.list.items.len);
8956 for (tree.root_decls, 0..) |node, i| {
8957 const tok_i = tree.nodeTok(node).?;
8958 const slice = tree.tokSlice(tok_i);
10136 try std.testing.expectEqual(0, comp.diagnostics.total);
10137 for (tree.root_decls.items[tree.root_decls.items.len - 3 ..], 0..) |node, i| {
10138 const slice = tree.tokSlice(node.tok(&tree));
895910139 const expected = switch (i) {
896010140 0 => "foo",
896110141 1 => "bar",
lib/compiler/aro/aro/Parser/Diagnostic.zig created+2390
......@@ -0,0 +1,2390 @@
1const std = @import("std");
2
3const Diagnostics = @import("../Diagnostics.zig");
4const LangOpts = @import("../LangOpts.zig");
5const Compilation = @import("../Compilation.zig");
6
7const Diagnostic = @This();
8
9fmt: []const u8,
10kind: Diagnostics.Message.Kind,
11opt: ?Diagnostics.Option = null,
12extension: bool = false,
13
14// TODO look into removing these
15suppress_version: ?LangOpts.Standard = null,
16suppress_unless_version: ?LangOpts.Standard = null,
17
18const pointer_sign_message = " converts between pointers to integer types with different sign";
19
20// Maybe someday this will no longer be needed.
21pub const todo: Diagnostic = .{
22 .fmt = "TODO: {s}",
23 .kind = .@"error",
24};
25
26pub const closing_paren: Diagnostic = .{
27 .fmt = "expected closing ')'",
28 .kind = .@"error",
29};
30
31pub const to_match_paren: Diagnostic = .{
32 .fmt = "to match this '('",
33 .kind = .note,
34};
35
36pub const to_match_brace: Diagnostic = .{
37 .fmt = "to match this '{'",
38 .kind = .note,
39};
40
41pub const to_match_bracket: Diagnostic = .{
42 .fmt = "to match this '['",
43 .kind = .note,
44};
45
46pub const float_literal_in_pp_expr: Diagnostic = .{
47 .fmt = "floating point literal in preprocessor expression",
48 .kind = .@"error",
49};
50
51pub const expected_invalid: Diagnostic = .{
52 .fmt = "expected '{tok_id}', found invalid bytes",
53 .kind = .@"error",
54};
55
56pub const expected_eof: Diagnostic = .{
57 .fmt = "expected '{tok_id}' before end of file",
58 .kind = .@"error",
59};
60
61pub const expected_token: Diagnostic = .{
62 .fmt = "expected '{tok_id}', found '{tok_id}'",
63 .kind = .@"error",
64};
65
66pub const expected_expr: Diagnostic = .{
67 .fmt = "expected expression",
68 .kind = .@"error",
69};
70
71pub const unexpected_type_name: Diagnostic = .{
72 .fmt = "unexpected type name '{s}': expected expression",
73 .kind = .@"error",
74};
75
76pub const expected_integer_constant_expr: Diagnostic = .{
77 .fmt = "expression is not an integer constant expression",
78 .kind = .@"error",
79};
80
81pub const missing_type_specifier: Diagnostic = .{
82 .fmt = "type specifier missing, defaults to 'int'",
83 .opt = .@"implicit-int",
84 .kind = .warning,
85};
86
87pub const missing_type_specifier_c23: Diagnostic = .{
88 .fmt = "a type specifier is required for all declarations",
89 .kind = .@"error",
90};
91
92pub const param_not_declared: Diagnostic = .{
93 .fmt = "parameter '{s}' was not declared, defaults to 'int'",
94 .opt = .@"implicit-int",
95 .kind = .warning,
96 .extension = true,
97};
98
99pub const multiple_storage_class: Diagnostic = .{
100 .fmt = "cannot combine with previous '{s}' declaration specifier",
101 .kind = .@"error",
102};
103
104pub const static_assert_failure: Diagnostic = .{
105 .fmt = "static assertion failed",
106 .kind = .@"error",
107};
108
109pub const static_assert_failure_message: Diagnostic = .{
110 .fmt = "static assertion failed {s}",
111 .kind = .@"error",
112};
113
114pub const expected_type: Diagnostic = .{
115 .fmt = "expected a type",
116 .kind = .@"error",
117};
118
119pub const cannot_combine_spec: Diagnostic = .{
120 .fmt = "cannot combine with previous '{s}' specifier",
121 .kind = .@"error",
122};
123
124pub const cannot_combine_spec_qt: Diagnostic = .{
125 .fmt = "cannot combine with previous {qt} specifier",
126 .kind = .@"error",
127};
128
129pub const cannot_combine_with_typeof: Diagnostic = .{
130 .fmt = "'{s} typeof' is invalid",
131 .kind = .@"error",
132};
133
134pub const duplicate_decl_spec: Diagnostic = .{
135 .fmt = "duplicate '{s}' declaration specifier",
136 .opt = .@"duplicate-decl-specifier",
137 .kind = .warning,
138};
139
140pub const restrict_non_pointer: Diagnostic = .{
141 .fmt = "restrict requires a pointer or reference ({qt} is invalid)",
142 .kind = .@"error",
143};
144
145pub const expected_external_decl: Diagnostic = .{
146 .fmt = "expected external declaration",
147 .kind = .@"error",
148};
149
150pub const expected_ident_or_l_paren: Diagnostic = .{
151 .fmt = "expected identifier or '('",
152 .kind = .@"error",
153};
154
155pub const missing_declaration: Diagnostic = .{
156 .fmt = "declaration does not declare anything",
157 .opt = .@"missing-declaration",
158 .kind = .warning,
159 .extension = true,
160};
161
162pub const func_not_in_root: Diagnostic = .{
163 .fmt = "function definition is not allowed here",
164 .kind = .@"error",
165};
166
167pub const illegal_initializer: Diagnostic = .{
168 .fmt = "illegal initializer (only variables can be initialized)",
169 .kind = .@"error",
170};
171
172pub const extern_initializer: Diagnostic = .{
173 .fmt = "extern variable has initializer",
174 .opt = .@"extern-initializer",
175 .kind = .warning,
176};
177
178pub const param_before_var_args: Diagnostic = .{
179 .fmt = "ISO C requires a named parameter before '...'",
180 .kind = .@"error",
181 .suppress_version = .c23,
182};
183
184pub const void_only_param: Diagnostic = .{
185 .fmt = "'void' must be the only parameter if specified",
186 .kind = .@"error",
187};
188
189pub const void_param_qualified: Diagnostic = .{
190 .fmt = "'void' parameter cannot be qualified",
191 .kind = .@"error",
192};
193
194pub const void_must_be_first_param: Diagnostic = .{
195 .fmt = "'void' must be the first parameter if specified",
196 .kind = .@"error",
197};
198
199pub const invalid_storage_on_param: Diagnostic = .{
200 .fmt = "invalid storage class on function parameter",
201 .kind = .@"error",
202};
203
204pub const threadlocal_non_var: Diagnostic = .{
205 .fmt = "_Thread_local only allowed on variables",
206 .kind = .@"error",
207};
208
209pub const func_spec_non_func: Diagnostic = .{
210 .fmt = "'{s}' can only appear on functions",
211 .kind = .@"error",
212};
213
214pub const illegal_storage_on_func: Diagnostic = .{
215 .fmt = "illegal storage class on function",
216 .kind = .@"error",
217};
218
219pub const illegal_storage_on_global: Diagnostic = .{
220 .fmt = "illegal storage class on global variable",
221 .kind = .@"error",
222};
223
224pub const expected_stmt: Diagnostic = .{
225 .fmt = "expected statement",
226 .kind = .@"error",
227};
228
229pub const func_cannot_return_func: Diagnostic = .{
230 .fmt = "function cannot return a function",
231 .kind = .@"error",
232};
233
234pub const func_cannot_return_array: Diagnostic = .{
235 .fmt = "function cannot return an array",
236 .kind = .@"error",
237};
238
239pub const undeclared_identifier: Diagnostic = .{
240 .fmt = "use of undeclared identifier '{s}'",
241 .kind = .@"error",
242};
243
244pub const not_callable: Diagnostic = .{
245 .fmt = "cannot call non function type {qt}",
246 .kind = .@"error",
247};
248
249pub const unsupported_str_cat: Diagnostic = .{
250 .fmt = "unsupported string literal concatenation",
251 .kind = .@"error",
252};
253
254pub const static_func_not_global: Diagnostic = .{
255 .fmt = "static functions must be global",
256 .kind = .@"error",
257};
258
259pub const implicit_func_decl: Diagnostic = .{
260 .fmt = "call to undeclared function '{s}'; ISO C99 and later do not support implicit function declarations",
261 .opt = .@"implicit-function-declaration",
262 .kind = .@"error",
263};
264
265pub const unknown_builtin: Diagnostic = .{
266 .fmt = "use of unknown builtin '{s}'",
267 .opt = .@"implicit-function-declaration",
268 .kind = .@"error",
269};
270
271pub const implicit_builtin: Diagnostic = .{
272 .fmt = "implicitly declaring library function '{s}'",
273 .kind = .@"error",
274 .opt = .@"implicit-function-declaration",
275};
276
277pub const implicit_builtin_header_note: Diagnostic = .{
278 .fmt = "include the header <{s}.h> or explicitly provide a declaration for '{s}'",
279 .kind = .note,
280 .opt = .@"implicit-function-declaration",
281};
282
283pub const expected_param_decl: Diagnostic = .{
284 .fmt = "expected parameter declaration",
285 .kind = .@"error",
286};
287
288pub const invalid_old_style_params: Diagnostic = .{
289 .fmt = "identifier parameter lists are only allowed in function definitions",
290 .kind = .@"error",
291};
292
293pub const expected_fn_body: Diagnostic = .{
294 .fmt = "expected function body after function declaration",
295 .kind = .@"error",
296};
297
298pub const invalid_void_param: Diagnostic = .{
299 .fmt = "parameter cannot have void type",
300 .kind = .@"error",
301};
302
303pub const continue_not_in_loop: Diagnostic = .{
304 .fmt = "'continue' statement not in a loop",
305 .kind = .@"error",
306};
307
308pub const break_not_in_loop_or_switch: Diagnostic = .{
309 .fmt = "'break' statement not in a loop or a switch",
310 .kind = .@"error",
311};
312
313pub const unreachable_code: Diagnostic = .{
314 .fmt = "unreachable code",
315 .opt = .@"unreachable-code",
316 .kind = .warning,
317};
318
319pub const duplicate_label: Diagnostic = .{
320 .fmt = "duplicate label '{s}'",
321 .kind = .@"error",
322};
323
324pub const previous_label: Diagnostic = .{
325 .fmt = "previous definition of label '{s}' was here",
326 .kind = .note,
327};
328
329pub const undeclared_label: Diagnostic = .{
330 .fmt = "use of undeclared label '{s}'",
331 .kind = .@"error",
332};
333
334pub const case_not_in_switch: Diagnostic = .{
335 .fmt = "'{s}' statement not in a switch statement",
336 .kind = .@"error",
337};
338
339pub const duplicate_switch_case: Diagnostic = .{
340 .fmt = "duplicate case value '{value}'",
341 .kind = .@"error",
342};
343
344pub const multiple_default: Diagnostic = .{
345 .fmt = "multiple default cases in the same switch",
346 .kind = .@"error",
347};
348
349pub const previous_case: Diagnostic = .{
350 .fmt = "previous case defined here",
351 .kind = .note,
352};
353
354pub const expected_arguments: Diagnostic = .{
355 .fmt = "expected {d} argument(s) got {d}",
356 .kind = .@"error",
357};
358
359pub const expected_arguments_old: Diagnostic = .{
360 .fmt = expected_arguments.fmt,
361 .kind = .warning,
362};
363
364pub const callee_with_static_array: Diagnostic = .{
365 .fmt = "callee declares array parameter as static here",
366 .kind = .note,
367};
368
369pub const array_argument_too_small: Diagnostic = .{
370 .fmt = "array argument is too small; contains {d} elements, callee requires at least {d}",
371 .kind = .warning,
372 .opt = .@"array-bounds",
373};
374
375pub const non_null_argument: Diagnostic = .{
376 .fmt = "null passed to a callee that requires a non-null argument",
377 .kind = .warning,
378 .opt = .nonnull,
379};
380
381pub const expected_at_least_arguments: Diagnostic = .{
382 .fmt = "expected at least {d} argument(s) got {d}",
383 .kind = .warning,
384};
385
386pub const invalid_static_star: Diagnostic = .{
387 .fmt = "'static' may not be used with an unspecified variable length array size",
388 .kind = .@"error",
389};
390
391pub const static_non_param: Diagnostic = .{
392 .fmt = "'static' used outside of function parameters",
393 .kind = .@"error",
394};
395
396pub const array_qualifiers: Diagnostic = .{
397 .fmt = "type qualifier in non parameter array type",
398 .kind = .@"error",
399};
400
401pub const star_non_param: Diagnostic = .{
402 .fmt = "star modifier used outside of function parameters",
403 .kind = .@"error",
404};
405
406pub const variable_len_array_file_scope: Diagnostic = .{
407 .fmt = "variable length arrays not allowed at file scope",
408 .kind = .@"error",
409};
410
411pub const useless_static: Diagnostic = .{
412 .fmt = "'static' useless without a constant size",
413 .kind = .warning,
414};
415
416pub const negative_array_size: Diagnostic = .{
417 .fmt = "array size must be 0 or greater",
418 .kind = .@"error",
419};
420
421pub const array_incomplete_elem: Diagnostic = .{
422 .fmt = "array has incomplete element type {qt}",
423 .kind = .@"error",
424};
425
426pub const array_func_elem: Diagnostic = .{
427 .fmt = "arrays cannot have functions as their element type",
428 .kind = .@"error",
429};
430
431pub const static_non_outermost_array: Diagnostic = .{
432 .fmt = "'static' used in non-outermost array type",
433 .kind = .@"error",
434};
435
436pub const qualifier_non_outermost_array: Diagnostic = .{
437 .fmt = "type qualifier used in non-outermost array type",
438 .kind = .@"error",
439};
440
441pub const array_overflow: Diagnostic = .{
442 .fmt = "the pointer incremented by {value} refers past the last possible element in {d}-bit address space containing {d}-bit ({d}-byte) elements (max possible {d} elements)",
443 .opt = .@"array-bounds",
444 .kind = .warning,
445};
446
447pub const overflow: Diagnostic = .{
448 .fmt = "overflow in expression; result is '{value}'",
449 .kind = .warning,
450 .opt = .@"integer-overflow",
451};
452
453pub const int_literal_too_big: Diagnostic = .{
454 .fmt = "integer literal is too large to be represented in any integer type",
455 .kind = .@"error",
456};
457
458pub const indirection_ptr: Diagnostic = .{
459 .fmt = "indirection requires pointer operand",
460 .kind = .@"error",
461};
462
463pub const addr_of_rvalue: Diagnostic = .{
464 .fmt = "cannot take the address of an rvalue",
465 .kind = .@"error",
466};
467
468pub const addr_of_bitfield: Diagnostic = .{
469 .fmt = "address of bit-field requested",
470 .kind = .@"error",
471};
472
473pub const not_assignable: Diagnostic = .{
474 .fmt = "expression is not assignable",
475 .kind = .@"error",
476};
477
478pub const ident_or_l_brace: Diagnostic = .{
479 .fmt = "expected identifier or '{'",
480 .kind = .@"error",
481};
482
483pub const empty_enum: Diagnostic = .{
484 .fmt = "empty enum is invalid",
485 .kind = .@"error",
486};
487
488pub const redefinition: Diagnostic = .{
489 .fmt = "redefinition of '{s}'",
490 .kind = .@"error",
491};
492
493pub const previous_definition: Diagnostic = .{
494 .fmt = "previous definition is here",
495 .kind = .note,
496};
497
498pub const previous_declaration: Diagnostic = .{
499 .fmt = "previous declaration is here",
500 .kind = .note,
501};
502
503pub const out_of_scope_use: Diagnostic = .{
504 .fmt = "use of out-of-scope declaration of '{s}'",
505 .kind = .warning,
506 .opt = .@"out-of-scope-function",
507};
508
509pub const expected_identifier: Diagnostic = .{
510 .fmt = "expected identifier",
511 .kind = .@"error",
512};
513
514pub const expected_str_literal: Diagnostic = .{
515 .fmt = "expected string literal for diagnostic message in static_assert",
516 .kind = .@"error",
517};
518
519pub const expected_str_literal_in: Diagnostic = .{
520 .fmt = "expected string literal in '{s}'",
521 .kind = .@"error",
522};
523
524pub const parameter_missing: Diagnostic = .{
525 .fmt = "parameter named '{s}' is missing",
526 .kind = .@"error",
527};
528
529pub const empty_record: Diagnostic = .{
530 .fmt = "empty {s} is a GNU extension",
531 .opt = .@"gnu-empty-struct",
532 .kind = .off,
533 .extension = true,
534};
535
536pub const empty_record_size: Diagnostic = .{
537 .fmt = "empty {s} has size 0 in C, size 1 in C++",
538 .opt = .@"c++-compat",
539 .kind = .off,
540};
541
542pub const wrong_tag: Diagnostic = .{
543 .fmt = "use of '{s}' with tag type that does not match previous definition",
544 .kind = .@"error",
545};
546
547pub const expected_parens_around_typename: Diagnostic = .{
548 .fmt = "expected parentheses around type name",
549 .kind = .@"error",
550};
551
552pub const alignof_expr: Diagnostic = .{
553 .fmt = "'_Alignof' applied to an expression is a GNU extension",
554 .opt = .@"gnu-alignof-expression",
555 .kind = .warning,
556 .extension = true,
557};
558
559pub const invalid_alignof: Diagnostic = .{
560 .fmt = "invalid application of 'alignof' to an incomplete type {qt}",
561 .kind = .@"error",
562};
563
564pub const invalid_sizeof: Diagnostic = .{
565 .fmt = "invalid application of 'sizeof' to an incomplete type {qt}",
566 .kind = .@"error",
567};
568
569pub const generic_qual_type: Diagnostic = .{
570 .fmt = "generic association with qualifiers cannot be matched with",
571 .opt = .@"generic-qual-type",
572 .kind = .warning,
573};
574
575pub const generic_array_type: Diagnostic = .{
576 .fmt = "generic association array type cannot be matched with",
577 .opt = .@"generic-qual-type",
578 .kind = .warning,
579};
580
581pub const generic_func_type: Diagnostic = .{
582 .fmt = "generic association function type cannot be matched with",
583 .opt = .@"generic-qual-type",
584 .kind = .warning,
585};
586
587pub const generic_duplicate: Diagnostic = .{
588 .fmt = "type {qt} in generic association compatible with previously specified type",
589 .kind = .@"error",
590};
591
592pub const generic_duplicate_here: Diagnostic = .{
593 .fmt = "compatible type {qt} specified here",
594 .kind = .note,
595};
596
597pub const generic_duplicate_default: Diagnostic = .{
598 .fmt = "duplicate default generic association",
599 .kind = .@"error",
600};
601
602pub const generic_no_match: Diagnostic = .{
603 .fmt = "controlling expression type {qt} not compatible with any generic association type",
604 .kind = .@"error",
605};
606
607pub const must_use_struct: Diagnostic = .{
608 .fmt = "must use 'struct' tag to refer to type '{s}'",
609 .kind = .@"error",
610};
611
612pub const must_use_union: Diagnostic = .{
613 .fmt = "must use 'union' tag to refer to type '{s}'",
614 .kind = .@"error",
615};
616
617pub const must_use_enum: Diagnostic = .{
618 .fmt = "must use 'enum' tag to refer to type '{s}'",
619 .kind = .@"error",
620};
621
622pub const redefinition_different_sym: Diagnostic = .{
623 .fmt = "redefinition of '{s}' as different kind of symbol",
624 .kind = .@"error",
625};
626
627pub const redefinition_incompatible: Diagnostic = .{
628 .fmt = "redefinition of '{s}' with a different type",
629 .kind = .@"error",
630};
631
632pub const redefinition_of_parameter: Diagnostic = .{
633 .fmt = "redefinition of parameter '{s}'",
634 .kind = .@"error",
635};
636
637pub const invalid_bin_types: Diagnostic = .{
638 .fmt = "invalid operands to binary expression ({qt} and {qt})",
639 .kind = .@"error",
640};
641
642pub const incompatible_vec_types: Diagnostic = .{
643 .fmt = "cannot convert between vector type {qt} and vector type {qt} as implicit conversion would cause truncation",
644 .kind = .@"error",
645};
646
647pub const comparison_ptr_int: Diagnostic = .{
648 .fmt = "comparison between pointer and integer ({qt} and {qt})",
649 .kind = .warning,
650 .opt = .@"pointer-integer-compare",
651 .extension = true,
652};
653
654pub const comparison_distinct_ptr: Diagnostic = .{
655 .fmt = "comparison of distinct pointer types ({qt} and {qt})",
656 .kind = .warning,
657 .opt = .@"compare-distinct-pointer-types",
658 .extension = true,
659};
660
661pub const incompatible_pointers: Diagnostic = .{
662 .fmt = "incompatible pointer types ({qt} and {qt})",
663 .kind = .@"error",
664};
665
666pub const invalid_argument_un: Diagnostic = .{
667 .fmt = "invalid argument type {qt} to unary expression",
668 .kind = .@"error",
669};
670
671pub const incompatible_assign: Diagnostic = .{
672 .fmt = "assignment to {qt} from incompatible type {qt}",
673 .kind = .@"error",
674};
675
676pub const implicit_ptr_to_int: Diagnostic = .{
677 .fmt = "implicit pointer to integer conversion from {qt} to {qt}",
678 .kind = .warning,
679 .opt = .@"int-conversion",
680};
681
682pub const invalid_cast_to_float: Diagnostic = .{
683 .fmt = "pointer cannot be cast to type {qt}",
684 .kind = .@"error",
685};
686
687pub const invalid_cast_to_pointer: Diagnostic = .{
688 .fmt = "operand of type {qt} cannot be cast to a pointer type",
689 .kind = .@"error",
690};
691
692pub const invalid_cast_type: Diagnostic = .{
693 .fmt = "cannot cast to non arithmetic or pointer type {qt}",
694 .kind = .@"error",
695};
696
697pub const invalid_cast_operand_type: Diagnostic = .{
698 .fmt = "operand of type {qt} where arithmetic or pointer type is required",
699 .kind = .@"error",
700};
701
702pub const qual_cast: Diagnostic = .{
703 .fmt = "cast to type {qt} will not preserve qualifiers",
704 .opt = .@"cast-qualifiers",
705 .kind = .warning,
706};
707
708pub const invalid_vec_conversion: Diagnostic = .{
709 .fmt = "invalid conversion between vector type {qt} and {qt} of different size",
710 .kind = .@"error",
711};
712
713pub const invalid_vec_conversion_scalar: Diagnostic = .{
714 .fmt = "invalid conversion between vector type {qt} and scalar type {qt}",
715 .kind = .@"error",
716};
717
718pub const invalid_vec_conversion_int: Diagnostic = .{
719 .fmt = "invalid conversion between vector type {qt} and integer type {qt} of different size",
720 .kind = .@"error",
721};
722
723pub const invalid_index: Diagnostic = .{
724 .fmt = "array subscript is not an integer",
725 .kind = .@"error",
726};
727
728pub const invalid_subscript: Diagnostic = .{
729 .fmt = "subscripted value is not an array, pointer or vector",
730 .kind = .@"error",
731};
732
733pub const array_after: Diagnostic = .{
734 .fmt = "array index {value} is past the end of the array",
735 .opt = .@"array-bounds",
736 .kind = .warning,
737};
738
739pub const array_before: Diagnostic = .{
740 .fmt = "array index {value} is before the beginning of the array",
741 .opt = .@"array-bounds",
742 .kind = .warning,
743};
744
745pub const statement_int: Diagnostic = .{
746 .fmt = "statement requires expression with integer type ({qt} invalid)",
747 .kind = .@"error",
748};
749
750pub const statement_scalar: Diagnostic = .{
751 .fmt = "statement requires expression with scalar type ({qt} invalid)",
752 .kind = .@"error",
753};
754
755pub const func_should_return: Diagnostic = .{
756 .fmt = "non-void function '{s}' should return a value",
757 .opt = .@"return-type",
758 .kind = .@"error",
759};
760
761pub const incompatible_return: Diagnostic = .{
762 .fmt = "returning {qt} from a function with incompatible result type {qt}",
763 .kind = .@"error",
764};
765
766pub const incompatible_return_sign: Diagnostic = .{
767 .fmt = incompatible_return.fmt ++ pointer_sign_message,
768 .kind = .warning,
769 .opt = .@"pointer-sign",
770};
771
772pub const implicit_int_to_ptr: Diagnostic = .{
773 .fmt = "implicit integer to pointer conversion from {qt} to {qt}",
774 .opt = .@"int-conversion",
775 .kind = .warning,
776};
777
778pub const func_does_not_return: Diagnostic = .{
779 .fmt = "non-void function '{s}' does not return a value",
780 .opt = .@"return-type",
781 .kind = .warning,
782};
783
784pub const void_func_returns_value: Diagnostic = .{
785 .fmt = "void function '{s}' should not return a value",
786 .opt = .@"return-type",
787 .kind = .@"error",
788};
789
790pub const incompatible_arg: Diagnostic = .{
791 .fmt = "passing {qt} to parameter of incompatible type {qt}",
792 .kind = .@"error",
793};
794
795pub const incompatible_ptr_arg: Diagnostic = .{
796 .fmt = "passing {qt} to parameter of incompatible type {qt}",
797 .kind = .warning,
798 .opt = .@"incompatible-pointer-types",
799};
800
801pub const incompatible_ptr_arg_sign: Diagnostic = .{
802 .fmt = incompatible_ptr_arg.fmt ++ pointer_sign_message,
803 .kind = .warning,
804 .opt = .@"pointer-sign",
805};
806
807pub const parameter_here: Diagnostic = .{
808 .fmt = "passing argument to parameter here",
809 .kind = .note,
810};
811
812pub const atomic_array: Diagnostic = .{
813 .fmt = "_Atomic cannot be applied to array type {qt}",
814 .kind = .@"error",
815};
816
817pub const atomic_func: Diagnostic = .{
818 .fmt = "_Atomic cannot be applied to function type {qt}",
819 .kind = .@"error",
820};
821
822pub const atomic_incomplete: Diagnostic = .{
823 .fmt = "_Atomic cannot be applied to incomplete type {qt}",
824 .kind = .@"error",
825};
826
827pub const atomic_atomic: Diagnostic = .{
828 .fmt = "_Atomic cannot be applied to atomic type {qt}",
829 .kind = .@"error",
830};
831
832pub const atomic_complex: Diagnostic = .{
833 .fmt = "_Atomic cannot be applied to complex type {qt}",
834 .kind = .@"error",
835};
836
837pub const atomic_qualified: Diagnostic = .{
838 .fmt = "_Atomic cannot be applied to qualified type {qt}",
839 .kind = .@"error",
840};
841
842pub const atomic_auto: Diagnostic = .{
843 .fmt = "_Atomic cannot be applied to type 'auto' in C23",
844 .kind = .@"error",
845};
846
847// pub const atomic_access: Diagnostic = .{
848// .fmt = "accessing a member of an atomic structure or union is undefined behavior",
849// .opt = .@"atomic-access",
850// .kind = .@"error",
851// };
852
853pub const addr_of_register: Diagnostic = .{
854 .fmt = "address of register variable requested",
855 .kind = .@"error",
856};
857
858pub const variable_incomplete_ty: Diagnostic = .{
859 .fmt = "variable has incomplete type {qt}",
860 .kind = .@"error",
861};
862
863pub const parameter_incomplete_ty: Diagnostic = .{
864 .fmt = "parameter has incomplete type {qt}",
865 .kind = .@"error",
866};
867
868pub const tentative_array: Diagnostic = .{
869 .fmt = "tentative array definition assumed to have one element",
870 .kind = .warning,
871};
872
873pub const deref_incomplete_ty_ptr: Diagnostic = .{
874 .fmt = "dereferencing pointer to incomplete type {qt}",
875 .kind = .@"error",
876};
877
878pub const alignas_on_func: Diagnostic = .{
879 .fmt = "'_Alignas' attribute only applies to variables and fields",
880 .kind = .@"error",
881};
882
883pub const alignas_on_param: Diagnostic = .{
884 .fmt = "'_Alignas' attribute cannot be applied to a function parameter",
885 .kind = .@"error",
886};
887
888pub const minimum_alignment: Diagnostic = .{
889 .fmt = "requested alignment is less than minimum alignment of {d}",
890 .kind = .@"error",
891};
892
893pub const maximum_alignment: Diagnostic = .{
894 .fmt = "requested alignment of {value} is too large",
895 .kind = .@"error",
896};
897
898pub const negative_alignment: Diagnostic = .{
899 .fmt = "requested negative alignment of {value} is invalid",
900 .kind = .@"error",
901};
902
903pub const align_ignored: Diagnostic = .{
904 .fmt = "'_Alignas' attribute is ignored here",
905 .kind = .warning,
906};
907
908// pub const zero_align_ignored: Diagnostic = .{
909// .fmt = "requested alignment of zero is ignored",
910// .kind = .warning,
911// };
912
913pub const non_pow2_align: Diagnostic = .{
914 .fmt = "requested alignment is not a power of 2",
915 .kind = .@"error",
916};
917
918pub const pointer_mismatch: Diagnostic = .{
919 .fmt = "pointer type mismatch ({qt} and {qt})",
920 .opt = .@"pointer-type-mismatch",
921 .kind = .warning,
922 .extension = true,
923};
924
925pub const static_assert_not_constant: Diagnostic = .{
926 .fmt = "static assertion expression is not an integral constant expression",
927 .kind = .@"error",
928};
929
930pub const static_assert_missing_message: Diagnostic = .{
931 .fmt = "'_Static_assert' with no message is a C23 extension",
932 .opt = .@"c23-extensions",
933 .kind = .warning,
934 .suppress_version = .c23,
935 .extension = true,
936};
937
938pub const pre_c23_compat: Diagnostic = .{
939 .fmt = "{s} is incompatible with C standards before C23",
940 .kind = .off,
941 .suppress_unless_version = .c23,
942 .opt = .@"pre-c23-compat",
943};
944
945pub const unbound_vla: Diagnostic = .{
946 .fmt = "variable length array must be bound in function definition",
947 .kind = .@"error",
948};
949
950pub const array_too_large: Diagnostic = .{
951 .fmt = "array is too large",
952 .kind = .@"error",
953};
954
955pub const record_too_large: Diagnostic = .{
956 .fmt = "type {qt} is too large",
957 .kind = .@"error",
958};
959
960pub const incompatible_ptr_init: Diagnostic = .{
961 .fmt = "incompatible pointer types initializing {qt} from incompatible type {qt}",
962 .opt = .@"incompatible-pointer-types",
963 .kind = .warning,
964};
965
966pub const incompatible_ptr_init_sign: Diagnostic = .{
967 .fmt = incompatible_ptr_init.fmt ++ pointer_sign_message,
968 .opt = .@"pointer-sign",
969 .kind = .warning,
970};
971
972pub const incompatible_ptr_assign: Diagnostic = .{
973 .fmt = "incompatible pointer types assigning to {qt} from incompatible type {qt}",
974 .opt = .@"incompatible-pointer-types",
975 .kind = .warning,
976};
977
978pub const incompatible_ptr_assign_sign: Diagnostic = .{
979 .fmt = incompatible_ptr_assign.fmt ++ pointer_sign_message,
980 .opt = .@"pointer-sign",
981 .kind = .warning,
982};
983
984pub const vla_init: Diagnostic = .{
985 .fmt = "variable-sized object may not be initialized",
986 .kind = .@"error",
987};
988
989pub const func_init: Diagnostic = .{
990 .fmt = "illegal initializer type",
991 .kind = .@"error",
992};
993
994pub const incompatible_init: Diagnostic = .{
995 .fmt = "initializing {qt} from incompatible type {qt}",
996 .kind = .@"error",
997};
998
999pub const excess_scalar_init: Diagnostic = .{
1000 .fmt = "excess elements in scalar initializer",
1001 .kind = .warning,
1002 .opt = .@"excess-initializers",
1003};
1004
1005pub const excess_str_init: Diagnostic = .{
1006 .fmt = "excess elements in string initializer",
1007 .kind = .warning,
1008 .opt = .@"excess-initializers",
1009};
1010
1011pub const excess_struct_init: Diagnostic = .{
1012 .fmt = "excess elements in struct initializer",
1013 .kind = .warning,
1014 .opt = .@"excess-initializers",
1015};
1016
1017pub const excess_union_init: Diagnostic = .{
1018 .fmt = "excess elements in union initializer",
1019 .kind = .warning,
1020 .opt = .@"excess-initializers",
1021};
1022
1023pub const excess_array_init: Diagnostic = .{
1024 .fmt = "excess elements in array initializer",
1025 .kind = .warning,
1026 .opt = .@"excess-initializers",
1027};
1028
1029pub const excess_vector_init: Diagnostic = .{
1030 .fmt = "excess elements in vector initializer",
1031 .kind = .warning,
1032 .opt = .@"excess-initializers",
1033};
1034
1035pub const str_init_too_long: Diagnostic = .{
1036 .fmt = "initializer-string for char array is too long",
1037 .opt = .@"excess-initializers",
1038 .kind = .warning,
1039 .extension = true,
1040};
1041
1042pub const arr_init_too_long: Diagnostic = .{
1043 .fmt = "cannot initialize type {qt} with array of type {qt}",
1044 .kind = .@"error",
1045};
1046
1047pub const empty_initializer: Diagnostic = .{
1048 .fmt = "use of an empty initializer is a C23 extension",
1049 .opt = .@"c23-extensions",
1050 .kind = .off,
1051 .suppress_version = .c23,
1052 .extension = true,
1053};
1054
1055pub const division_by_zero: Diagnostic = .{
1056 .fmt = "{s} by zero is undefined",
1057 .kind = .warning,
1058 .opt = .@"division-by-zero",
1059};
1060
1061pub const division_by_zero_macro: Diagnostic = .{
1062 .fmt = "{s} by zero in preprocessor expression",
1063 .kind = .@"error",
1064};
1065
1066pub const builtin_choose_cond: Diagnostic = .{
1067 .fmt = "'__builtin_choose_expr' requires a constant expression",
1068 .kind = .@"error",
1069};
1070
1071pub const convertvector_arg: Diagnostic = .{
1072 .fmt = "{s} argument to __builtin_convertvector must be a vector type",
1073 .kind = .@"error",
1074};
1075
1076pub const convertvector_size: Diagnostic = .{
1077 .fmt = "first two arguments to __builtin_convertvector must have the same number of elements",
1078 .kind = .@"error",
1079};
1080
1081pub const shufflevector_arg: Diagnostic = .{
1082 .fmt = "{s} argument to __builtin_shufflevector must be a vector type",
1083 .kind = .@"error",
1084};
1085
1086pub const shufflevector_same_type: Diagnostic = .{
1087 .fmt = "first two arguments to '__builtin_shufflevector' must have the same type",
1088 .kind = .@"error",
1089};
1090
1091pub const shufflevector_negative_index: Diagnostic = .{
1092 .fmt = "index for __builtin_shufflevector must be positive or -1",
1093 .kind = .@"error",
1094};
1095
1096pub const shufflevector_index_too_big: Diagnostic = .{
1097 .fmt = "index for __builtin_shufflevector must be less than the total number of vector elements",
1098 .kind = .@"error",
1099};
1100
1101pub const alignas_unavailable: Diagnostic = .{
1102 .fmt = "'_Alignas' attribute requires integer constant expression",
1103 .kind = .@"error",
1104};
1105
1106pub const case_val_unavailable: Diagnostic = .{
1107 .fmt = "case value must be an integer constant expression",
1108 .kind = .@"error",
1109};
1110
1111pub const enum_val_unavailable: Diagnostic = .{
1112 .fmt = "enum value must be an integer constant expression",
1113 .kind = .@"error",
1114};
1115
1116pub const incompatible_array_init: Diagnostic = .{
1117 .fmt = "cannot initialize array of type {qt} with array of type {qt}",
1118 .kind = .@"error",
1119};
1120
1121pub const array_init_str: Diagnostic = .{
1122 .fmt = "array initializer must be an initializer list or wide string literal",
1123 .kind = .@"error",
1124};
1125
1126pub const initializer_overrides: Diagnostic = .{
1127 .fmt = "initializer overrides previous initialization",
1128 .opt = .@"initializer-overrides",
1129 .kind = .warning,
1130};
1131
1132pub const previous_initializer: Diagnostic = .{
1133 .fmt = "previous initialization",
1134 .kind = .note,
1135};
1136
1137pub const invalid_array_designator: Diagnostic = .{
1138 .fmt = "array designator used for non-array type {qt}",
1139 .kind = .@"error",
1140};
1141
1142pub const negative_array_designator: Diagnostic = .{
1143 .fmt = "array designator value {value} is negative",
1144 .kind = .@"error",
1145};
1146
1147pub const oob_array_designator: Diagnostic = .{
1148 .fmt = "array designator index {value} exceeds array bounds",
1149 .kind = .@"error",
1150};
1151
1152pub const invalid_field_designator: Diagnostic = .{
1153 .fmt = "field designator used for non-record type {qt}",
1154 .kind = .@"error",
1155};
1156
1157pub const no_such_field_designator: Diagnostic = .{
1158 .fmt = "record type has no field named '{s}'",
1159 .kind = .@"error",
1160};
1161
1162pub const empty_aggregate_init_braces: Diagnostic = .{
1163 .fmt = "initializer for aggregate with no elements requires explicit braces",
1164 .kind = .@"error",
1165};
1166
1167pub const ptr_init_discards_quals: Diagnostic = .{
1168 .fmt = "initializing {qt} from incompatible type {qt} discards qualifiers",
1169 .kind = .warning,
1170 .opt = .@"incompatible-pointer-types-discards-qualifiers",
1171};
1172
1173pub const ptr_assign_discards_quals: Diagnostic = .{
1174 .fmt = "assigning to {qt} from incompatible type {qt} discards qualifiers",
1175 .kind = .warning,
1176 .opt = .@"incompatible-pointer-types-discards-qualifiers",
1177};
1178
1179pub const ptr_ret_discards_quals: Diagnostic = .{
1180 .fmt = "returning {qt} from a function with incompatible result type {qt} discards qualifiers",
1181 .kind = .warning,
1182 .opt = .@"incompatible-pointer-types-discards-qualifiers",
1183};
1184
1185pub const ptr_arg_discards_quals: Diagnostic = .{
1186 .fmt = "passing {qt} to parameter of incompatible type {qt} discards qualifiers",
1187 .kind = .warning,
1188 .opt = .@"incompatible-pointer-types-discards-qualifiers",
1189};
1190
1191pub const unknown_attribute: Diagnostic = .{
1192 .fmt = "unknown attribute '{s}' ignored",
1193 .kind = .warning,
1194 .opt = .@"unknown-attributes",
1195};
1196
1197pub const ignored_attribute: Diagnostic = .{
1198 .fmt = "attribute '{s}' ignored on {s}",
1199 .kind = .warning,
1200 .opt = .@"ignored-attributes",
1201};
1202
1203pub const invalid_fallthrough: Diagnostic = .{
1204 .fmt = "fallthrough annotation does not directly precede switch label",
1205 .kind = .@"error",
1206};
1207
1208pub const cannot_apply_attribute_to_statement: Diagnostic = .{
1209 .fmt = "'{s}' attribute cannot be applied to a statement",
1210 .kind = .@"error",
1211};
1212
1213pub const gnu_label_as_value: Diagnostic = .{
1214 .fmt = "use of GNU address-of-label extension",
1215 .opt = .@"gnu-label-as-value",
1216 .kind = .off,
1217 .extension = true,
1218};
1219
1220pub const expected_record_ty: Diagnostic = .{
1221 .fmt = "member reference base type {qt} is not a structure or union",
1222 .kind = .@"error",
1223};
1224
1225pub const member_expr_not_ptr: Diagnostic = .{
1226 .fmt = "member reference type {qt} is not a pointer; did you mean to use '.'?",
1227 .kind = .@"error",
1228};
1229
1230pub const member_expr_ptr: Diagnostic = .{
1231 .fmt = "member reference type {qt} is a pointer; did you mean to use '->'?",
1232 .kind = .@"error",
1233};
1234
1235pub const member_expr_atomic: Diagnostic = .{
1236 .fmt = "accessing a member of atomic type {qt} is undefined behavior",
1237 .kind = .@"error",
1238};
1239
1240pub const no_such_member: Diagnostic = .{
1241 .fmt = "no member named '{s}' in {qt}",
1242 .kind = .@"error",
1243};
1244
1245pub const invalid_computed_goto: Diagnostic = .{
1246 .fmt = "computed goto in function with no address-of-label expressions",
1247 .kind = .@"error",
1248};
1249
1250pub const empty_translation_unit: Diagnostic = .{
1251 .fmt = "ISO C requires a translation unit to contain at least one declaration",
1252 .opt = .@"empty-translation-unit",
1253 .kind = .off,
1254 .extension = true,
1255};
1256
1257pub const omitting_parameter_name: Diagnostic = .{
1258 .fmt = "omitting the parameter name in a function definition is a C23 extension",
1259 .opt = .@"c23-extensions",
1260 .kind = .warning,
1261 .suppress_version = .c23,
1262 .extension = true,
1263};
1264
1265pub const non_int_bitfield: Diagnostic = .{
1266 .fmt = "bit-field has non-integer type {qt}",
1267 .kind = .@"error",
1268};
1269
1270pub const negative_bitwidth: Diagnostic = .{
1271 .fmt = "bit-field has negative width ({value})",
1272 .kind = .@"error",
1273};
1274
1275pub const zero_width_named_field: Diagnostic = .{
1276 .fmt = "named bit-field has zero width",
1277 .kind = .@"error",
1278};
1279
1280pub const bitfield_too_big: Diagnostic = .{
1281 .fmt = "width of bit-field exceeds width of its type",
1282 .kind = .@"error",
1283};
1284
1285pub const invalid_utf8: Diagnostic = .{
1286 .fmt = "source file is not valid UTF-8",
1287 .kind = .@"error",
1288};
1289
1290pub const implicitly_unsigned_literal: Diagnostic = .{
1291 .fmt = "integer literal is too large to be represented in a signed integer type, interpreting as unsigned",
1292 .opt = .@"implicitly-unsigned-literal",
1293 .kind = .warning,
1294 .extension = true,
1295};
1296
1297pub const invalid_preproc_operator: Diagnostic = .{
1298 .fmt = "token is not a valid binary operator in a preprocessor subexpression",
1299 .kind = .@"error",
1300};
1301
1302pub const c99_compat: Diagnostic = .{
1303 .fmt = "using this character in an identifier is incompatible with C99",
1304 .kind = .off,
1305 .opt = .@"c99-compat",
1306};
1307
1308pub const unexpected_character: Diagnostic = .{
1309 .fmt = "unexpected character <U+{codepoint}>",
1310 .kind = .@"error",
1311};
1312
1313pub const invalid_identifier_start_char: Diagnostic = .{
1314 .fmt = "character <U+{codepoint}> not allowed at the start of an identifier",
1315 .kind = .@"error",
1316};
1317
1318pub const unicode_zero_width: Diagnostic = .{
1319 .fmt = "identifier contains Unicode character <U+{codepoint}> that is invisible in some environments",
1320 .kind = .warning,
1321 .opt = .@"unicode-homoglyph",
1322};
1323
1324pub const unicode_homoglyph: Diagnostic = .{
1325 .fmt = "treating Unicode character <U+{codepoint}> as identifier character rather than as '{s}' symbol",
1326 .kind = .warning,
1327 .opt = .@"unicode-homoglyph",
1328};
1329
1330pub const meaningless_asm_qual: Diagnostic = .{
1331 .fmt = "meaningless '{s}' on assembly outside function",
1332 .kind = .@"error",
1333};
1334
1335pub const duplicate_asm_qual: Diagnostic = .{
1336 .fmt = "duplicate asm qualifier '{s}'",
1337 .kind = .@"error",
1338};
1339
1340pub const invalid_asm_str: Diagnostic = .{
1341 .fmt = "cannot use {s} string literal in assembly",
1342 .kind = .@"error",
1343};
1344
1345pub const dollar_in_identifier_extension: Diagnostic = .{
1346 .fmt = "'$' in identifier",
1347 .opt = .@"dollar-in-identifier-extension",
1348 .kind = .off,
1349 .extension = true,
1350};
1351
1352pub const dollars_in_identifiers: Diagnostic = .{
1353 .fmt = "illegal character '$' in identifier",
1354 .kind = .@"error",
1355};
1356
1357pub const predefined_top_level: Diagnostic = .{
1358 .fmt = "predefined identifier is only valid inside function",
1359 .opt = .@"predefined-identifier-outside-function",
1360 .kind = .warning,
1361};
1362
1363pub const incompatible_va_arg: Diagnostic = .{
1364 .fmt = "first argument to va_arg, is of type {qt} and not 'va_list'",
1365 .kind = .@"error",
1366};
1367
1368pub const too_many_scalar_init_braces: Diagnostic = .{
1369 .fmt = "too many braces around scalar initializer",
1370 .opt = .@"many-braces-around-scalar-init",
1371 .kind = .warning,
1372 .extension = true,
1373};
1374
1375// pub const uninitialized_in_own_init: Diagnostic = .{
1376// .fmt = "variable '{s}' is uninitialized when used within its own initialization",
1377// .opt = .uninitialized,
1378// .kind = .off,
1379// };
1380
1381pub const gnu_statement_expression: Diagnostic = .{
1382 .fmt = "use of GNU statement expression extension",
1383 .opt = .@"gnu-statement-expression",
1384 .kind = .off,
1385 .extension = true,
1386};
1387
1388pub const stmt_expr_not_allowed_file_scope: Diagnostic = .{
1389 .fmt = "statement expression not allowed at file scope",
1390 .kind = .@"error",
1391};
1392
1393pub const gnu_imaginary_constant: Diagnostic = .{
1394 .fmt = "imaginary constants are a GNU extension",
1395 .opt = .@"gnu-imaginary-constant",
1396 .kind = .off,
1397 .extension = true,
1398};
1399
1400pub const plain_complex: Diagnostic = .{
1401 .fmt = "plain '_Complex' requires a type specifier; assuming '_Complex double'",
1402 .kind = .warning,
1403 .extension = true,
1404};
1405
1406pub const complex_int: Diagnostic = .{
1407 .fmt = "complex integer types are a GNU extension",
1408 .opt = .@"gnu-complex-integer",
1409 .kind = .off,
1410 .extension = true,
1411};
1412
1413pub const qual_on_ret_type: Diagnostic = .{
1414 .fmt = "'{s}' type qualifier on return type has no effect",
1415 .opt = .@"ignored-qualifiers",
1416 .kind = .off,
1417};
1418
1419pub const extra_semi: Diagnostic = .{
1420 .fmt = "extra ';' outside of a function",
1421 .opt = .@"extra-semi",
1422 .kind = .off,
1423};
1424
1425pub const func_field: Diagnostic = .{
1426 .fmt = "field declared as a function",
1427 .kind = .@"error",
1428};
1429
1430pub const expected_member_name: Diagnostic = .{
1431 .fmt = "expected member name after declarator",
1432 .kind = .@"error",
1433};
1434
1435pub const vla_field: Diagnostic = .{
1436 .fmt = "variable length array fields extension is not supported",
1437 .kind = .@"error",
1438};
1439
1440pub const field_incomplete_ty: Diagnostic = .{
1441 .fmt = "field has incomplete type {qt}",
1442 .kind = .@"error",
1443};
1444
1445pub const flexible_in_union: Diagnostic = .{
1446 .fmt = "flexible array member in union is not allowed",
1447 .kind = .@"error",
1448};
1449
1450pub const flexible_in_union_msvc: Diagnostic = .{
1451 .fmt = "flexible array member in union is a Microsoft extension",
1452 .kind = .off,
1453 .opt = .@"microsoft-flexible-array",
1454 .extension = true,
1455};
1456
1457pub const flexible_non_final: Diagnostic = .{
1458 .fmt = "flexible array member is not at the end of struct",
1459 .kind = .@"error",
1460};
1461
1462pub const flexible_in_empty: Diagnostic = .{
1463 .fmt = "flexible array member in otherwise empty struct",
1464 .kind = .@"error",
1465};
1466
1467pub const flexible_in_empty_msvc: Diagnostic = .{
1468 .fmt = "flexible array member in otherwise empty struct is a Microsoft extension",
1469 .kind = .off,
1470 .opt = .@"microsoft-flexible-array",
1471 .extension = true,
1472};
1473
1474pub const anonymous_struct: Diagnostic = .{
1475 .fmt = "anonymous structs are a Microsoft extension",
1476 .kind = .warning,
1477 .opt = .@"microsoft-anon-tag",
1478 .extension = true,
1479};
1480
1481pub const duplicate_member: Diagnostic = .{
1482 .fmt = "duplicate member '{s}'",
1483 .kind = .@"error",
1484};
1485
1486pub const binary_integer_literal: Diagnostic = .{
1487 .fmt = "binary integer literals are a GNU extension",
1488 .kind = .off,
1489 .opt = .@"gnu-binary-literal",
1490 .extension = true,
1491};
1492
1493pub const builtin_must_be_called: Diagnostic = .{
1494 .fmt = "builtin function must be directly called",
1495 .kind = .@"error",
1496};
1497
1498pub const va_start_not_in_func: Diagnostic = .{
1499 .fmt = "'va_start' cannot be used outside a function",
1500 .kind = .@"error",
1501};
1502
1503pub const va_start_fixed_args: Diagnostic = .{
1504 .fmt = "'va_start' used in a function with fixed args",
1505 .kind = .@"error",
1506};
1507
1508pub const va_start_not_last_param: Diagnostic = .{
1509 .fmt = "second argument to 'va_start' is not the last named parameter",
1510 .opt = .varargs,
1511 .kind = .warning,
1512};
1513
1514pub const attribute_not_enough_args: Diagnostic = .{
1515 .fmt = "'{s}' attribute takes at least {d} argument(s)",
1516 .kind = .@"error",
1517};
1518
1519pub const attribute_too_many_args: Diagnostic = .{
1520 .fmt = "'{s}' attribute takes at most {d} argument(s)",
1521 .kind = .@"error",
1522};
1523
1524pub const attribute_arg_invalid: Diagnostic = .{
1525 .fmt = "attribute argument is invalid, expected {s} but got {s}",
1526 .kind = .@"error",
1527};
1528
1529pub const unknown_attr_enum: Diagnostic = .{
1530 .fmt = "unknown `{s}` argument. Possible values are: {s}",
1531 .kind = .warning,
1532 .opt = .@"ignored-attributes",
1533};
1534
1535pub const attribute_requires_identifier: Diagnostic = .{
1536 .fmt = "'{s}' attribute requires an identifier",
1537 .kind = .@"error",
1538};
1539
1540pub const attribute_int_out_of_range: Diagnostic = .{
1541 .fmt = "attribute value '{value}' out of range",
1542 .kind = .@"error",
1543};
1544
1545pub const declspec_not_enabled: Diagnostic = .{
1546 .fmt = "'__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes",
1547 .kind = .@"error",
1548};
1549
1550pub const declspec_attr_not_supported: Diagnostic = .{
1551 .fmt = "__declspec attribute '{s}' is not supported",
1552 .opt = .@"ignored-attributes",
1553 .kind = .warning,
1554};
1555
1556pub const deprecated_declarations: Diagnostic = .{
1557 .fmt = "'{s}' is deprecated{s}{s}",
1558 .opt = .@"deprecated-declarations",
1559 .kind = .warning,
1560};
1561
1562pub const deprecated_note: Diagnostic = .{
1563 .fmt = "'{s}' has been explicitly marked deprecated here",
1564 .opt = .@"deprecated-declarations",
1565 .kind = .note,
1566};
1567
1568pub const unavailable: Diagnostic = .{
1569 .fmt = "'{s}' is unavailable{s}{s}",
1570 .kind = .@"error",
1571};
1572
1573pub const unavailable_note: Diagnostic = .{
1574 .fmt = "'{s}' has been explicitly marked unavailable here",
1575 .kind = .note,
1576};
1577
1578pub const warning_attribute: Diagnostic = .{
1579 .fmt = "call to '{s}' declared with attribute warning: {s}",
1580 .kind = .warning,
1581 .opt = .@"attribute-warning",
1582};
1583
1584pub const error_attribute: Diagnostic = .{
1585 .fmt = "call to '{s}' declared with attribute error: {s}",
1586 .kind = .@"error",
1587};
1588
1589pub const ignored_record_attr: Diagnostic = .{
1590 .fmt = "attribute '{s}' is ignored, place it after \"{s}\" to apply attribute to type declaration",
1591 .kind = .warning,
1592 .opt = .@"ignored-attributes",
1593};
1594
1595pub const array_size_non_int: Diagnostic = .{
1596 .fmt = "size of array has non-integer type {qt}",
1597 .kind = .@"error",
1598};
1599
1600pub const cast_to_smaller_int: Diagnostic = .{
1601 .fmt = "cast to smaller integer type {qt} from {qt}",
1602 .kind = .warning,
1603 .opt = .@"pointer-to-int-cast",
1604};
1605
1606pub const gnu_switch_range: Diagnostic = .{
1607 .fmt = "use of GNU case range extension",
1608 .opt = .@"gnu-case-range",
1609 .kind = .off,
1610 .extension = true,
1611};
1612
1613pub const empty_case_range: Diagnostic = .{
1614 .fmt = "empty case range specified",
1615 .kind = .warning,
1616};
1617
1618pub const vla: Diagnostic = .{
1619 .fmt = "variable length array used",
1620 .kind = .off,
1621 .opt = .vla,
1622};
1623
1624pub const int_value_changed: Diagnostic = .{
1625 .fmt = "implicit conversion from {qt} to {qt} changes {s}value from {value} to {value}",
1626 .kind = .warning,
1627 .opt = .@"constant-conversion",
1628};
1629
1630pub const sign_conversion: Diagnostic = .{
1631 .fmt = "implicit conversion changes signedness: {qt} to {qt}",
1632 .kind = .off,
1633 .opt = .@"sign-conversion",
1634};
1635
1636pub const float_overflow_conversion: Diagnostic = .{
1637 .fmt = "implicit conversion of non-finite value from {qt} to {qt} is undefined",
1638 .kind = .off,
1639 .opt = .@"float-overflow-conversion",
1640};
1641
1642pub const float_out_of_range: Diagnostic = .{
1643 .fmt = "implicit conversion of out of range value from {qt} to {qt} is undefined",
1644 .kind = .warning,
1645 .opt = .@"literal-conversion",
1646};
1647
1648pub const float_zero_conversion: Diagnostic = .{
1649 .fmt = "implicit conversion from {qt} to {qt} changes {s}value from {value} to {value}",
1650 .kind = .off,
1651 .opt = .@"float-zero-conversion",
1652};
1653
1654pub const float_value_changed: Diagnostic = .{
1655 .fmt = "implicit conversion from {qt} to {qt} changes {s}value from {value} to {value}",
1656 .kind = .warning,
1657 .opt = .@"float-conversion",
1658};
1659
1660pub const float_to_int: Diagnostic = .{
1661 .fmt = "implicit conversion turns floating-point number into integer: {qt} to {qt}",
1662 .kind = .off,
1663 .opt = .@"literal-conversion",
1664};
1665
1666pub const const_decl_folded: Diagnostic = .{
1667 .fmt = "expression is not an integer constant expression; folding it to a constant is a GNU extension",
1668 .kind = .off,
1669 .opt = .@"gnu-folding-constant",
1670 .extension = true,
1671};
1672
1673pub const const_decl_folded_vla: Diagnostic = .{
1674 .fmt = "variable length array folded to constant array as an extension",
1675 .kind = .off,
1676 .opt = .@"gnu-folding-constant",
1677 .extension = true,
1678};
1679
1680pub const redefinition_of_typedef: Diagnostic = .{
1681 .fmt = "typedef redefinition with different types ({qt} vs {qt})",
1682 .kind = .@"error",
1683};
1684
1685pub const offsetof_ty: Diagnostic = .{
1686 .fmt = "offsetof requires struct or union type, {qt} invalid",
1687 .kind = .@"error",
1688};
1689
1690pub const offsetof_incomplete: Diagnostic = .{
1691 .fmt = "offsetof of incomplete type {qt}",
1692 .kind = .@"error",
1693};
1694
1695pub const offsetof_array: Diagnostic = .{
1696 .fmt = "offsetof requires array type, {qt} invalid",
1697 .kind = .@"error",
1698};
1699
1700pub const cond_expr_type: Diagnostic = .{
1701 .fmt = "used type {qt} where arithmetic or pointer type is required",
1702 .kind = .@"error",
1703};
1704
1705pub const enumerator_too_small: Diagnostic = .{
1706 .fmt = "ISO C restricts enumerator values to range of 'int' ({value} is too small)",
1707 .kind = .off,
1708 .extension = true,
1709};
1710
1711pub const enumerator_too_large: Diagnostic = .{
1712 .fmt = "ISO C restricts enumerator values to range of 'int' ({value} is too large)",
1713 .kind = .off,
1714 .extension = true,
1715};
1716
1717pub const enumerator_overflow: Diagnostic = .{
1718 .fmt = "overflow in enumeration value",
1719 .kind = .warning,
1720};
1721
1722pub const enum_not_representable: Diagnostic = .{
1723 .fmt = "incremented enumerator value {s} is not representable in the largest integer type",
1724 .kind = .warning,
1725 .opt = .@"enum-too-large",
1726 .extension = true,
1727};
1728
1729pub const enum_too_large: Diagnostic = .{
1730 .fmt = "enumeration values exceed range of largest integer",
1731 .kind = .warning,
1732 .opt = .@"enum-too-large",
1733 .extension = true,
1734};
1735
1736pub const enum_fixed: Diagnostic = .{
1737 .fmt = "enumeration types with a fixed underlying type are a Clang extension",
1738 .kind = .off,
1739 .opt = .@"fixed-enum-extension",
1740 .extension = true,
1741};
1742
1743pub const enum_prev_nonfixed: Diagnostic = .{
1744 .fmt = "enumeration previously declared with nonfixed underlying type",
1745 .kind = .@"error",
1746};
1747
1748pub const enum_prev_fixed: Diagnostic = .{
1749 .fmt = "enumeration previously declared with fixed underlying type",
1750 .kind = .@"error",
1751};
1752
1753pub const enum_different_explicit_ty: Diagnostic = .{
1754 .fmt = "enumeration redeclared with different underlying type {qt} (was {qt})",
1755 .kind = .@"error",
1756};
1757
1758pub const enum_not_representable_fixed: Diagnostic = .{
1759 .fmt = "enumerator value is not representable in the underlying type {qt}",
1760 .kind = .@"error",
1761};
1762
1763pub const transparent_union_wrong_type: Diagnostic = .{
1764 .fmt = "'transparent_union' attribute only applies to unions",
1765 .opt = .@"ignored-attributes",
1766 .kind = .warning,
1767};
1768
1769pub const transparent_union_one_field: Diagnostic = .{
1770 .fmt = "transparent union definition must contain at least one field; transparent_union attribute ignored",
1771 .opt = .@"ignored-attributes",
1772 .kind = .warning,
1773};
1774
1775pub const transparent_union_size: Diagnostic = .{
1776 .fmt = "size of field '{s}' ({d} bits) does not match the size of the first field in transparent union; transparent_union attribute ignored",
1777 .kind = .warning,
1778 .opt = .@"ignored-attributes",
1779};
1780
1781pub const transparent_union_size_note: Diagnostic = .{
1782 .fmt = "size of first field is {d}",
1783 .kind = .note,
1784};
1785
1786pub const designated_init_invalid: Diagnostic = .{
1787 .fmt = "'designated_init' attribute is only valid on 'struct' type'",
1788 .kind = .@"error",
1789};
1790
1791pub const designated_init_needed: Diagnostic = .{
1792 .fmt = "positional initialization of field in 'struct' declared with 'designated_init' attribute",
1793 .opt = .@"designated-init",
1794 .kind = .warning,
1795};
1796
1797pub const ignore_common: Diagnostic = .{
1798 .fmt = "ignoring attribute 'common' because it conflicts with attribute 'nocommon'",
1799 .opt = .@"ignored-attributes",
1800 .kind = .warning,
1801};
1802
1803pub const ignore_nocommon: Diagnostic = .{
1804 .fmt = "ignoring attribute 'nocommon' because it conflicts with attribute 'common'",
1805 .opt = .@"ignored-attributes",
1806 .kind = .warning,
1807};
1808
1809pub const non_string_ignored: Diagnostic = .{
1810 .fmt = "'nonstring' attribute ignored on objects of type {qt}",
1811 .opt = .@"ignored-attributes",
1812 .kind = .warning,
1813};
1814
1815pub const local_variable_attribute: Diagnostic = .{
1816 .fmt = "'{s}' attribute only applies to local variables",
1817 .opt = .@"ignored-attributes",
1818 .kind = .warning,
1819};
1820
1821pub const ignore_cold: Diagnostic = .{
1822 .fmt = "ignoring attribute 'cold' because it conflicts with attribute 'hot'",
1823 .opt = .@"ignored-attributes",
1824 .kind = .warning,
1825};
1826
1827pub const ignore_hot: Diagnostic = .{
1828 .fmt = "ignoring attribute 'hot' because it conflicts with attribute 'cold'",
1829 .opt = .@"ignored-attributes",
1830 .kind = .warning,
1831};
1832
1833pub const ignore_noinline: Diagnostic = .{
1834 .fmt = "ignoring attribute 'noinline' because it conflicts with attribute 'always_inline'",
1835 .opt = .@"ignored-attributes",
1836 .kind = .warning,
1837};
1838
1839pub const ignore_always_inline: Diagnostic = .{
1840 .fmt = "ignoring attribute 'always_inline' because it conflicts with attribute 'noinline'",
1841 .opt = .@"ignored-attributes",
1842 .kind = .warning,
1843};
1844
1845pub const invalid_noreturn: Diagnostic = .{
1846 .fmt = "function '{s}' declared 'noreturn' should not return",
1847 .kind = .warning,
1848 .opt = .@"invalid-noreturn",
1849};
1850
1851pub const nodiscard_unused: Diagnostic = .{
1852 .fmt = "ignoring return value of '{s}', declared with 'nodiscard' attribute",
1853 .kind = .warning,
1854 .opt = .@"unused-result",
1855};
1856
1857pub const warn_unused_result: Diagnostic = .{
1858 .fmt = "ignoring return value of '{s}', declared with 'warn_unused_result' attribute",
1859 .kind = .warning,
1860 .opt = .@"unused-result",
1861};
1862
1863pub const builtin_unused: Diagnostic = .{
1864 .fmt = "ignoring return value of function declared with {s} attribute",
1865 .kind = .warning,
1866 .opt = .@"unused-value",
1867};
1868
1869pub const unused_value: Diagnostic = .{
1870 .fmt = "expression result unused",
1871 .kind = .warning,
1872 .opt = .@"unused-value",
1873};
1874
1875pub const invalid_vec_elem_ty: Diagnostic = .{
1876 .fmt = "invalid vector element type {qt}",
1877 .kind = .@"error",
1878};
1879
1880pub const bit_int_vec_too_small: Diagnostic = .{
1881 .fmt = "'_BitInt' vector element width must be at least as wide as 'CHAR_BIT'",
1882 .kind = .@"error",
1883};
1884
1885pub const bit_int_vec_not_pow2: Diagnostic = .{
1886 .fmt = "'_BitInt' vector element width must be a power of 2",
1887 .kind = .@"error",
1888};
1889
1890pub const vec_size_not_multiple: Diagnostic = .{
1891 .fmt = "vector size not an integral multiple of component size",
1892 .kind = .@"error",
1893};
1894
1895pub const invalid_imag: Diagnostic = .{
1896 .fmt = "invalid type {qt} to __imag operator",
1897 .kind = .@"error",
1898};
1899
1900pub const invalid_real: Diagnostic = .{
1901 .fmt = "invalid type {qt} to __real operator",
1902 .kind = .@"error",
1903};
1904
1905pub const zero_length_array: Diagnostic = .{
1906 .fmt = "zero size arrays are an extension",
1907 .kind = .off,
1908 .opt = .@"zero-length-array",
1909 .extension = true,
1910};
1911
1912pub const old_style_flexible_struct: Diagnostic = .{
1913 .fmt = "array index {value} is past the end of the array",
1914 .kind = .off,
1915 .opt = .@"old-style-flexible-struct",
1916};
1917
1918pub const main_return_type: Diagnostic = .{
1919 .fmt = "return type of 'main' is not 'int'",
1920 .kind = .warning,
1921 .opt = .@"main-return-type",
1922 .extension = true,
1923};
1924
1925pub const invalid_int_suffix: Diagnostic = .{
1926 .fmt = "invalid suffix '{s}' on integer constant",
1927 .kind = .@"error",
1928};
1929
1930pub const invalid_float_suffix: Diagnostic = .{
1931 .fmt = "invalid suffix '{s}' on floating constant",
1932 .kind = .@"error",
1933};
1934
1935pub const invalid_octal_digit: Diagnostic = .{
1936 .fmt = "invalid digit '{c}' in octal constant",
1937 .kind = .@"error",
1938};
1939
1940pub const invalid_binary_digit: Diagnostic = .{
1941 .fmt = "invalid digit '{c}' in binary constant",
1942 .kind = .@"error",
1943};
1944
1945pub const exponent_has_no_digits: Diagnostic = .{
1946 .fmt = "exponent has no digits",
1947 .kind = .@"error",
1948};
1949
1950pub const hex_floating_constant_requires_exponent: Diagnostic = .{
1951 .fmt = "hexadecimal floating constant requires an exponent",
1952 .kind = .@"error",
1953};
1954
1955pub const sizeof_returns_zero: Diagnostic = .{
1956 .fmt = "sizeof returns 0",
1957 .kind = .warning,
1958};
1959
1960pub const declspec_not_allowed_after_declarator: Diagnostic = .{
1961 .fmt = "'declspec' attribute not allowed after declarator",
1962 .kind = .@"error",
1963};
1964
1965pub const declarator_name_tok: Diagnostic = .{
1966 .fmt = "this declarator",
1967 .kind = .note,
1968};
1969
1970pub const type_not_supported_on_target: Diagnostic = .{
1971 .fmt = "{s} is not supported on this target",
1972 .kind = .@"error",
1973};
1974
1975pub const bit_int: Diagnostic = .{
1976 .fmt = "'_BitInt' in C17 and earlier is a Clang extension",
1977 .kind = .off,
1978 .opt = .@"bit-int-extension",
1979 .suppress_version = .c23,
1980 .extension = true,
1981};
1982
1983pub const unsigned_bit_int_too_small: Diagnostic = .{
1984 .fmt = "{s}unsigned _BitInt must have a bit size of at least 1",
1985 .kind = .@"error",
1986};
1987
1988pub const signed_bit_int_too_small: Diagnostic = .{
1989 .fmt = "{s}signed _BitInt must have a bit size of at least 2",
1990 .kind = .@"error",
1991};
1992
1993pub const unsigned_bit_int_too_big: Diagnostic = .{
1994 .fmt = "{s}unsigned _BitInt of bit sizes greater than " ++ std.fmt.comptimePrint("{d}", .{Compilation.bit_int_max_bits}) ++ " not supported",
1995 .kind = .@"error",
1996};
1997
1998pub const signed_bit_int_too_big: Diagnostic = .{
1999 .fmt = "{s}signed _BitInt of bit sizes greater than " ++ std.fmt.comptimePrint("{d}", .{Compilation.bit_int_max_bits}) ++ " not supported",
2000 .kind = .@"error",
2001};
2002
2003pub const ptr_arithmetic_incomplete: Diagnostic = .{
2004 .fmt = "arithmetic on a pointer to an incomplete type {qt}",
2005 .kind = .@"error",
2006};
2007
2008pub const callconv_not_supported: Diagnostic = .{
2009 .fmt = "'{s}' calling convention is not supported for this target",
2010 .kind = .warning,
2011 .opt = .@"ignored-attributes",
2012};
2013
2014pub const callconv_non_func: Diagnostic = .{
2015 .fmt = "'{s}' only applies to function types; type here is {qt}",
2016 .kind = .warning,
2017 .opt = .@"ignored-attributes",
2018};
2019
2020pub const pointer_arith_void: Diagnostic = .{
2021 .fmt = "invalid application of '{s}' to a void type",
2022 .kind = .off,
2023 .opt = .@"pointer-arith",
2024 .extension = true,
2025};
2026
2027pub const sizeof_array_arg: Diagnostic = .{
2028 .fmt = "sizeof on array function parameter will return size of {qt} instead of {qt}",
2029 .kind = .warning,
2030 .opt = .@"sizeof-array-argument",
2031};
2032
2033pub const array_address_to_bool: Diagnostic = .{
2034 .fmt = "address of array '{s}' will always evaluate to 'true'",
2035 .kind = .warning,
2036 .opt = .@"pointer-bool-conversion",
2037};
2038
2039pub const string_literal_to_bool: Diagnostic = .{
2040 .fmt = "implicit conversion turns string literal into bool: {qt} to {qt}",
2041 .kind = .off,
2042 .opt = .@"string-conversion",
2043};
2044
2045// pub const constant_expression_conversion_not_allowed: Diagnostic = .{
2046// .fmt = "this conversion is not allowed in a constant expression",
2047// .kind = .note,
2048// };
2049
2050pub const invalid_object_cast: Diagnostic = .{
2051 .fmt = "cannot cast an object of type {qt} to {qt}",
2052 .kind = .@"error",
2053};
2054
2055pub const suggest_pointer_for_invalid_fp16: Diagnostic = .{
2056 .fmt = "{s} cannot have __fp16 type; did you forget * ?",
2057 .kind = .@"error",
2058};
2059
2060pub const bitint_suffix: Diagnostic = .{
2061 .fmt = "'_BitInt' suffix for literals is a C23 extension",
2062 .opt = .@"c23-extensions",
2063 .kind = .warning,
2064 .suppress_version = .c23,
2065 .extension = true,
2066};
2067
2068pub const auto_type_extension: Diagnostic = .{
2069 .fmt = "'__auto_type' is a GNU extension",
2070 .opt = .@"gnu-auto-type",
2071 .kind = .off,
2072 .extension = true,
2073};
2074
2075pub const gnu_pointer_arith: Diagnostic = .{
2076 .fmt = "arithmetic on pointers to void is a GNU extension",
2077 .opt = .@"gnu-pointer-arith",
2078 .kind = .off,
2079 .extension = true,
2080};
2081
2082pub const auto_type_not_allowed: Diagnostic = .{
2083 .fmt = "'__auto_type' not allowed in {s}",
2084 .kind = .@"error",
2085};
2086
2087pub const auto_type_requires_initializer: Diagnostic = .{
2088 .fmt = "declaration of variable '{s}' with deduced type requires an initializer",
2089 .kind = .@"error",
2090};
2091
2092pub const auto_type_requires_single_declarator: Diagnostic = .{
2093 .fmt = "'__auto_type' may only be used with a single declarator",
2094 .kind = .@"error",
2095};
2096
2097pub const auto_type_requires_plain_declarator: Diagnostic = .{
2098 .fmt = "'__auto_type' requires a plain identifier as declarator",
2099 .kind = .@"error",
2100};
2101
2102pub const auto_type_from_bitfield: Diagnostic = .{
2103 .fmt = "cannot use bit-field as '__auto_type' initializer",
2104 .kind = .@"error",
2105};
2106
2107pub const auto_type_array: Diagnostic = .{
2108 .fmt = "'{s}' declared as array of '__auto_type'",
2109 .kind = .@"error",
2110};
2111
2112pub const auto_type_with_init_list: Diagnostic = .{
2113 .fmt = "cannot use '__auto_type' with initializer list",
2114 .kind = .@"error",
2115};
2116
2117pub const missing_semicolon: Diagnostic = .{
2118 .fmt = "expected ';' at end of declaration list",
2119 .kind = .warning,
2120 .extension = true,
2121};
2122
2123pub const tentative_definition_incomplete: Diagnostic = .{
2124 .fmt = "tentative definition has type {qt} that is never completed",
2125 .kind = .@"error",
2126};
2127
2128pub const forward_declaration_here: Diagnostic = .{
2129 .fmt = "forward declaration of {qt}",
2130 .kind = .note,
2131};
2132
2133pub const gnu_union_cast: Diagnostic = .{
2134 .fmt = "cast to union type is a GNU extension",
2135 .opt = .@"gnu-union-cast",
2136 .kind = .off,
2137 .extension = true,
2138};
2139
2140pub const invalid_union_cast: Diagnostic = .{
2141 .fmt = "cast to union type from type {qt} not present in union",
2142 .kind = .@"error",
2143};
2144
2145pub const cast_to_incomplete_type: Diagnostic = .{
2146 .fmt = "cast to incomplete type {qt}",
2147 .kind = .@"error",
2148};
2149
2150pub const gnu_asm_disabled: Diagnostic = .{
2151 .fmt = "GNU-style inline assembly is disabled",
2152 .kind = .@"error",
2153};
2154
2155pub const extension_token_used: Diagnostic = .{
2156 .fmt = "extension used",
2157 .kind = .off,
2158 .opt = .@"language-extension-token",
2159 .extension = true,
2160};
2161
2162pub const complex_component_init: Diagnostic = .{
2163 .fmt = "complex initialization specifying real and imaginary components is an extension",
2164 .opt = .@"complex-component-init",
2165 .kind = .off,
2166 .extension = true,
2167};
2168
2169pub const complex_prefix_postfix_op: Diagnostic = .{
2170 .fmt = "ISO C does not support '++'/'--' on complex type {qt}",
2171 .kind = .off,
2172 .extension = true,
2173};
2174
2175pub const not_floating_type: Diagnostic = .{
2176 .fmt = "argument type {qt} is not a real floating point type",
2177 .kind = .@"error",
2178};
2179
2180pub const argument_types_differ: Diagnostic = .{
2181 .fmt = "arguments are of different types ({qt} vs {qt})",
2182 .kind = .@"error",
2183};
2184
2185pub const attribute_requires_string: Diagnostic = .{
2186 .fmt = "attribute '{s}' requires an ordinary string",
2187 .kind = .@"error",
2188};
2189
2190pub const empty_char_literal_error: Diagnostic = .{
2191 .fmt = "empty character constant",
2192 .kind = .@"error",
2193};
2194
2195pub const unterminated_char_literal_error: Diagnostic = .{
2196 .fmt = "missing terminating ' character",
2197 .kind = .@"error",
2198};
2199
2200// pub const def_no_proto_deprecated: Diagnostic = .{
2201// .fmt = "a function definition without a prototype is deprecated in all versions of C and is not supported in C23",
2202// .kind = .warning,
2203// .opt = .@"deprecated-non-prototype",
2204// };
2205
2206pub const passing_args_to_kr: Diagnostic = .{
2207 .fmt = "passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C23",
2208 .kind = .warning,
2209 .opt = .@"deprecated-non-prototype",
2210};
2211
2212pub const unknown_type_name: Diagnostic = .{
2213 .fmt = "unknown type name '{s}'",
2214 .kind = .@"error",
2215};
2216
2217pub const label_compound_end: Diagnostic = .{
2218 .fmt = "label at end of compound statement is a C23 extension",
2219 .opt = .@"c23-extensions",
2220 .kind = .warning,
2221 .suppress_version = .c23,
2222 .extension = true,
2223};
2224
2225pub const u8_char_lit: Diagnostic = .{
2226 .fmt = "UTF-8 character literal is a C23 extension",
2227 .opt = .@"c23-extensions",
2228 .kind = .warning,
2229 .suppress_version = .c23,
2230 .extension = true,
2231};
2232
2233pub const invalid_compound_literal_storage_class: Diagnostic = .{
2234 .fmt = "compound literal cannot have {s} storage class",
2235 .kind = .@"error",
2236};
2237
2238pub const identifier_not_normalized: Diagnostic = .{
2239 .fmt = "'{normalized}' is not in NFC",
2240 .kind = .warning,
2241 .opt = .normalized,
2242};
2243
2244pub const c23_auto_single_declarator: Diagnostic = .{
2245 .fmt = "'auto' can only be used with a single declarator",
2246 .kind = .@"error",
2247};
2248
2249pub const c23_auto_requires_initializer: Diagnostic = .{
2250 .fmt = "'auto' requires an initializer",
2251 .kind = .@"error",
2252};
2253
2254pub const c23_auto_not_allowed: Diagnostic = .{
2255 .fmt = "'auto' not allowed in {s}",
2256 .kind = .@"error",
2257};
2258
2259pub const c23_auto_with_init_list: Diagnostic = .{
2260 .fmt = "cannot use 'auto' with array",
2261 .kind = .@"error",
2262};
2263
2264pub const c23_auto_array: Diagnostic = .{
2265 .fmt = "'{s}' declared as array of 'auto'",
2266 .kind = .@"error",
2267};
2268
2269pub const negative_shift_count: Diagnostic = .{
2270 .fmt = "shift count is negative",
2271 .opt = .@"shift-count-negative",
2272 .kind = .warning,
2273};
2274
2275pub const too_big_shift_count: Diagnostic = .{
2276 .fmt = "shift count >= width of type",
2277 .opt = .@"shift-count-overflow",
2278 .kind = .warning,
2279};
2280
2281pub const complex_conj: Diagnostic = .{
2282 .fmt = "ISO C does not support '~' for complex conjugation of {qt}",
2283 .kind = .off,
2284 .extension = true,
2285};
2286
2287pub const overflow_builtin_requires_int: Diagnostic = .{
2288 .fmt = "operand argument to overflow builtin must be an integer ({qt} invalid)",
2289 .kind = .@"error",
2290};
2291
2292pub const overflow_result_requires_ptr: Diagnostic = .{
2293 .fmt = "result argument to overflow builtin must be a pointer to a non-const integer ({qt} invalid)",
2294 .kind = .@"error",
2295};
2296
2297pub const attribute_todo: Diagnostic = .{
2298 .fmt = "TODO: implement '{s}' attribute for {s}",
2299 .kind = .warning,
2300};
2301
2302pub const invalid_type_underlying_enum: Diagnostic = .{
2303 .fmt = "non-integral type {qt} is an invalid underlying type",
2304 .kind = .@"error",
2305};
2306
2307pub const auto_type_self_initialized: Diagnostic = .{
2308 .fmt = "variable '{s}' declared with deduced type '__auto_type' cannot appear in its own initializer",
2309 .kind = .@"error",
2310};
2311
2312// pub const non_constant_initializer: Diagnostic = .{
2313// .fmt = "initializer element is not a compile-time constant",
2314// .kind = .@"error",
2315// };
2316
2317pub const constexpr_requires_const: Diagnostic = .{
2318 .fmt = "constexpr variable must be initialized by a constant expression",
2319 .kind = .@"error",
2320};
2321
2322pub const subtract_pointers_zero_elem_size: Diagnostic = .{
2323 .fmt = "subtraction of pointers to type {qt} of zero size has undefined behavior",
2324 .kind = .warning,
2325 .opt = .@"pointer-arith",
2326};
2327
2328pub const packed_member_address: Diagnostic = .{
2329 .fmt = "taking address of packed member '{s}' of class or structure '{s}' may result in an unaligned pointer value",
2330 .kind = .warning,
2331 .opt = .@"address-of-packed-member",
2332};
2333
2334pub const attribute_param_out_of_bounds: Diagnostic = .{
2335 .fmt = "'{s}' attribute parameter {d} is out of bounds",
2336 .kind = .@"error",
2337};
2338
2339pub const alloc_align_requires_ptr_return: Diagnostic = .{
2340 .fmt = "'alloc_align' attribute only applies to return values that are pointers",
2341 .opt = .@"ignored-attributes",
2342 .kind = .warning,
2343};
2344
2345pub const alloc_align_required_int_param: Diagnostic = .{
2346 .fmt = "'alloc_align' attribute argument may only refer to a function parameter of integer type",
2347 .kind = .@"error",
2348};
2349
2350pub const gnu_missing_eq_designator: Diagnostic = .{
2351 .fmt = "use of GNU 'missing =' extension in designator",
2352 .kind = .warning,
2353 .opt = .@"gnu-designator",
2354 .extension = true,
2355};
2356
2357pub const empty_if_body: Diagnostic = .{
2358 .fmt = "if statement has empty body",
2359 .kind = .warning,
2360 .opt = .@"empty-body",
2361};
2362
2363pub const empty_if_body_note: Diagnostic = .{
2364 .fmt = "put the semicolon on a separate line to silence this warning",
2365 .kind = .note,
2366 .opt = .@"empty-body",
2367};
2368
2369pub const nullability_extension: Diagnostic = .{
2370 .fmt = "type nullability specifier '{s}' is a Clang extension",
2371 .kind = .off,
2372 .opt = .@"nullability-extension",
2373 .extension = true,
2374};
2375
2376pub const duplicate_nullability: Diagnostic = .{
2377 .fmt = "duplicate nullability specifier '{s}'",
2378 .kind = .warning,
2379 .opt = .nullability,
2380};
2381
2382pub const conflicting_nullability: Diagnostic = .{
2383 .fmt = "nullaibility specifier '{tok_id}' conflicts with existing specifier '{tok_id}'",
2384 .kind = .@"error",
2385};
2386
2387pub const invalid_nullability: Diagnostic = .{
2388 .fmt = "nullability specifier cannot be applied to non-pointer type {qt}",
2389 .kind = .@"error",
2390};
lib/compiler/aro/aro/Pragma.zig+129-2
......@@ -1,7 +1,9 @@
11const std = @import("std");
2
23const Compilation = @import("Compilation.zig");
3const Preprocessor = @import("Preprocessor.zig");
4const Diagnostics = @import("Diagnostics.zig");
45const Parser = @import("Parser.zig");
6const Preprocessor = @import("Preprocessor.zig");
57const TokenIndex = @import("Tree.zig").TokenIndex;
68
79pub const Error = Compilation.Error || error{ UnknownPragma, StopPreprocessing };
......@@ -69,7 +71,7 @@ pub fn pasteTokens(pp: *Preprocessor, start_idx: TokenIndex) ![]const u8 {
6971
7072pub fn shouldPreserveTokens(self: *Pragma, pp: *Preprocessor, start_idx: TokenIndex) bool {
7173 if (self.preserveTokens) |func| return func(self, pp, start_idx);
72 return false;
74 return true;
7375}
7476
7577pub fn preprocessorCB(self: *Pragma, pp: *Preprocessor, start_idx: TokenIndex) Error!void {
......@@ -81,3 +83,128 @@ pub fn parserCB(self: *Pragma, p: *Parser, start_idx: TokenIndex) Compilation.Er
8183 defer std.debug.assert(tok_index == p.tok_i);
8284 if (self.parserHandler) |func| return func(self, p, start_idx);
8385}
86
87pub const Diagnostic = struct {
88 fmt: []const u8,
89 kind: Diagnostics.Message.Kind,
90 opt: ?Diagnostics.Option = null,
91 extension: bool = false,
92
93 pub const pragma_warning_message: Diagnostic = .{
94 .fmt = "{s}",
95 .kind = .warning,
96 .opt = .@"#pragma-messages",
97 };
98
99 pub const pragma_error_message: Diagnostic = .{
100 .fmt = "{s}",
101 .kind = .@"error",
102 };
103
104 pub const pragma_message: Diagnostic = .{
105 .fmt = "#pragma message: {s}",
106 .kind = .note,
107 };
108
109 pub const pragma_requires_string_literal: Diagnostic = .{
110 .fmt = "pragma {s} requires string literal",
111 .kind = .@"error",
112 };
113
114 pub const poisoned_identifier: Diagnostic = .{
115 .fmt = "attempt to use a poisoned identifier",
116 .kind = .@"error",
117 };
118
119 pub const pragma_poison_identifier: Diagnostic = .{
120 .fmt = "can only poison identifier tokens",
121 .kind = .@"error",
122 };
123
124 pub const pragma_poison_macro: Diagnostic = .{
125 .fmt = "poisoning existing macro",
126 .kind = .warning,
127 };
128
129 pub const unknown_gcc_pragma: Diagnostic = .{
130 .fmt = "pragma GCC expected 'error', 'warning', 'diagnostic', 'poison'",
131 .kind = .off,
132 .opt = .@"unknown-pragmas",
133 };
134
135 pub const unknown_gcc_pragma_directive: Diagnostic = .{
136 .fmt = "pragma GCC diagnostic expected 'error', 'warning', 'ignored', 'fatal', 'push', or 'pop'",
137 .kind = .warning,
138 .opt = .@"unknown-pragmas",
139 .extension = true,
140 };
141
142 pub const malformed_warning_check: Diagnostic = .{
143 .fmt = "{s} expected option name (e.g. \"-Wundef\")",
144 .opt = .@"malformed-warning-check",
145 .kind = .warning,
146 .extension = true,
147 };
148
149 pub const pragma_pack_lparen: Diagnostic = .{
150 .fmt = "missing '(' after '#pragma pack' - ignoring",
151 .kind = .warning,
152 .opt = .@"ignored-pragmas",
153 };
154
155 pub const pragma_pack_rparen: Diagnostic = .{
156 .fmt = "missing ')' after '#pragma pack' - ignoring",
157 .kind = .warning,
158 .opt = .@"ignored-pragmas",
159 };
160
161 pub const pragma_pack_unknown_action: Diagnostic = .{
162 .fmt = "unknown action for '#pragma pack' - ignoring",
163 .kind = .warning,
164 .opt = .@"ignored-pragmas",
165 };
166
167 pub const pragma_pack_show: Diagnostic = .{
168 .fmt = "value of #pragma pack(show) == {d}",
169 .kind = .warning,
170 };
171
172 pub const pragma_pack_int_ident: Diagnostic = .{
173 .fmt = "expected integer or identifier in '#pragma pack' - ignored",
174 .kind = .warning,
175 .opt = .@"ignored-pragmas",
176 };
177
178 pub const pragma_pack_int: Diagnostic = .{
179 .fmt = "expected #pragma pack parameter to be '1', '2', '4', '8', or '16'",
180 .opt = .@"ignored-pragmas",
181 .kind = .warning,
182 };
183
184 pub const pragma_pack_undefined_pop: Diagnostic = .{
185 .fmt = "specifying both a name and alignment to 'pop' is undefined",
186 .kind = .warning,
187 };
188
189 pub const pragma_pack_empty_stack: Diagnostic = .{
190 .fmt = "#pragma pack(pop, ...) failed: stack empty",
191 .opt = .@"ignored-pragmas",
192 .kind = .warning,
193 };
194};
195
196pub fn err(pp: *Preprocessor, tok_i: TokenIndex, diagnostic: Diagnostic, args: anytype) Compilation.Error!void {
197 var sf = std.heap.stackFallback(1024, pp.gpa);
198 var allocating: std.Io.Writer.Allocating = .init(sf.get());
199 defer allocating.deinit();
200
201 Diagnostics.formatArgs(&allocating.writer, diagnostic.fmt, args) catch return error.OutOfMemory;
202
203 try pp.diagnostics.addWithLocation(pp.comp, .{
204 .kind = diagnostic.kind,
205 .opt = diagnostic.opt,
206 .text = allocating.getWritten(),
207 .location = pp.tokens.items(.loc)[tok_i].expand(pp.comp),
208 .extension = diagnostic.extension,
209 }, pp.expansionSlice(tok_i), true);
210}
lib/compiler/aro/aro/Preprocessor.zig+679-552
......@@ -2,22 +2,24 @@ const std = @import("std");
22const mem = std.mem;
33const Allocator = mem.Allocator;
44const assert = std.debug.assert;
5
6const Attribute = @import("Attribute.zig");
57const Compilation = @import("Compilation.zig");
68const Error = Compilation.Error;
9const Diagnostics = @import("Diagnostics.zig");
10const features = @import("features.zig");
11const Hideset = @import("Hideset.zig");
12const Parser = @import("Parser.zig");
713const Source = @import("Source.zig");
14const text_literal = @import("text_literal.zig");
815const Tokenizer = @import("Tokenizer.zig");
916const RawToken = Tokenizer.Token;
10const Parser = @import("Parser.zig");
11const Diagnostics = @import("Diagnostics.zig");
17const SourceEpoch = Compilation.Environment.SourceEpoch;
1218const Tree = @import("Tree.zig");
1319const Token = Tree.Token;
1420const TokenWithExpansionLocs = Tree.TokenWithExpansionLocs;
15const Attribute = @import("Attribute.zig");
16const features = @import("features.zig");
17const Hideset = @import("Hideset.zig");
18const Writer = std.Io.Writer;
1921
20const DefineMap = std.StringHashMapUnmanaged(Macro);
22const DefineMap = std.StringArrayHashMapUnmanaged(Macro);
2123const RawTokenList = std.array_list.Managed(RawToken);
2224const max_include_depth = 200;
2325
......@@ -26,7 +28,41 @@ const max_include_depth = 200;
2628/// it is handled there and doesn't escape that function
2729const MacroError = Error || error{StopPreprocessing};
2830
29const Macro = struct {
31const IfContext = struct {
32 const Backing = u2;
33 const Nesting = enum(Backing) {
34 until_else,
35 until_endif,
36 until_endif_seen_else,
37 };
38
39 const buf_size_bits = @bitSizeOf(Backing) * 256;
40 kind: [buf_size_bits / std.mem.byte_size_in_bits]u8,
41 level: u8,
42
43 fn get(self: *const IfContext) Nesting {
44 return @enumFromInt(std.mem.readPackedIntNative(Backing, &self.kind, @as(usize, self.level) * 2));
45 }
46
47 fn set(self: *IfContext, context: Nesting) void {
48 std.mem.writePackedIntNative(Backing, &self.kind, @as(usize, self.level) * 2, @intFromEnum(context));
49 }
50
51 fn increment(self: *IfContext) bool {
52 self.level, const overflowed = @addWithOverflow(self.level, 1);
53 return overflowed != 0;
54 }
55
56 fn decrement(self: *IfContext) void {
57 self.level -= 1;
58 }
59
60 /// Initialize `kind` to an invalid value since it is an error to read the kind before setting it.
61 /// Doing so will trigger safety-checked undefined behavior in `IfContext.get`
62 const default: IfContext = .{ .kind = @splat(0xFF), .level = 0 };
63};
64
65pub const Macro = struct {
3066 /// Parameters of the function type macro
3167 params: []const []const u8,
3268
......@@ -77,7 +113,9 @@ const TokenState = struct {
77113};
78114
79115comp: *Compilation,
116diagnostics: *Diagnostics,
80117gpa: mem.Allocator,
118
81119arena: std.heap.ArenaAllocator,
82120defines: DefineMap = .{},
83121/// Do not directly mutate this; use addToken / addTokenAssumeCapacity / ensureTotalTokenCapacity / ensureUnusedTokenCapacity
......@@ -96,7 +134,7 @@ counter: u32 = 0,
96134expansion_source_loc: Source.Location = undefined,
97135poisoned_identifiers: std.StringHashMap(void),
98136/// Map from Source.Id to macro name in the `#ifndef` condition which guards the source, if any
99include_guards: std.AutoHashMapUnmanaged(Source.Id, []const u8) = .empty,
137include_guards: std.AutoHashMapUnmanaged(Source.Id, []const u8) = .{},
100138
101139/// Store `keyword_define` and `keyword_undef` tokens.
102140/// Used to implement preprocessor debug dump options
......@@ -115,6 +153,10 @@ linemarkers: Linemarkers = .none,
115153
116154hideset: Hideset,
117155
156/// Epoch used for __DATE__, __TIME__, and possibly __TIMESTAMP__
157source_epoch: SourceEpoch,
158m_times: std.AutoHashMapUnmanaged(Source.Id, u64) = .{},
159
118160pub const parse = Parser.parse;
119161
120162pub const Linemarkers = enum {
......@@ -126,9 +168,10 @@ pub const Linemarkers = enum {
126168 numeric_directives,
127169};
128170
129pub fn init(comp: *Compilation) Preprocessor {
171pub fn init(comp: *Compilation, source_epoch: SourceEpoch) Preprocessor {
130172 const pp = Preprocessor{
131173 .comp = comp,
174 .diagnostics = comp.diagnostics,
132175 .gpa = comp.gpa,
133176 .arena = std.heap.ArenaAllocator.init(comp.gpa),
134177 .token_buf = RawTokenList.init(comp.gpa),
......@@ -136,6 +179,7 @@ pub fn init(comp: *Compilation) Preprocessor {
136179 .poisoned_identifiers = std.StringHashMap(void).init(comp.gpa),
137180 .top_expansion_buf = ExpandBuf.init(comp.gpa),
138181 .hideset = .{ .comp = comp },
182 .source_epoch = source_epoch,
139183 };
140184 comp.pragmaEvent(.before_preprocess);
141185 return pp;
......@@ -143,84 +187,28 @@ pub fn init(comp: *Compilation) Preprocessor {
143187
144188/// Initialize Preprocessor with builtin macros.
145189pub fn initDefault(comp: *Compilation) !Preprocessor {
146 var pp = init(comp);
190 const source_epoch: SourceEpoch = comp.environment.sourceEpoch() catch |er| switch (er) {
191 error.InvalidEpoch => blk: {
192 const diagnostic: Diagnostic = .invalid_source_epoch;
193 try comp.diagnostics.add(.{ .text = diagnostic.fmt, .kind = diagnostic.kind, .opt = diagnostic.opt, .location = null });
194 break :blk .default;
195 },
196 };
197
198 var pp = init(comp, source_epoch);
147199 errdefer pp.deinit();
148200 try pp.addBuiltinMacros();
149201 return pp;
150202}
151203
152const builtin_macros = struct {
153 const args = [1][]const u8{"X"};
154
155 const has_attribute = [1]RawToken{.{
156 .id = .macro_param_has_attribute,
157 .source = .generated,
158 }};
159 const has_c_attribute = [1]RawToken{.{
160 .id = .macro_param_has_c_attribute,
161 .source = .generated,
162 }};
163 const has_declspec_attribute = [1]RawToken{.{
164 .id = .macro_param_has_declspec_attribute,
165 .source = .generated,
166 }};
167 const has_warning = [1]RawToken{.{
168 .id = .macro_param_has_warning,
169 .source = .generated,
170 }};
171 const has_feature = [1]RawToken{.{
172 .id = .macro_param_has_feature,
173 .source = .generated,
174 }};
175 const has_extension = [1]RawToken{.{
176 .id = .macro_param_has_extension,
177 .source = .generated,
178 }};
179 const has_builtin = [1]RawToken{.{
180 .id = .macro_param_has_builtin,
181 .source = .generated,
182 }};
183 const has_include = [1]RawToken{.{
184 .id = .macro_param_has_include,
185 .source = .generated,
186 }};
187 const has_include_next = [1]RawToken{.{
188 .id = .macro_param_has_include_next,
189 .source = .generated,
190 }};
191 const has_embed = [1]RawToken{.{
192 .id = .macro_param_has_embed,
193 .source = .generated,
194 }};
195
196 const is_identifier = [1]RawToken{.{
197 .id = .macro_param_is_identifier,
198 .source = .generated,
199 }};
200
201 const pragma_operator = [1]RawToken{.{
202 .id = .macro_param_pragma_operator,
203 .source = .generated,
204 }};
205
206 const file = [1]RawToken{.{
207 .id = .macro_file,
208 .source = .generated,
209 }};
210 const line = [1]RawToken{.{
211 .id = .macro_line,
212 .source = .generated,
213 }};
214 const counter = [1]RawToken{.{
215 .id = .macro_counter,
216 .source = .generated,
217 }};
218};
219
220fn addBuiltinMacro(pp: *Preprocessor, name: []const u8, is_func: bool, tokens: []const RawToken) !void {
204// `param_tok_id` is comptime so that the generated `tokens` list is unique for every macro.
205fn addBuiltinMacro(pp: *Preprocessor, name: []const u8, is_func: bool, comptime param_tok_id: Token.Id) !void {
221206 try pp.defines.putNoClobber(pp.gpa, name, .{
222 .params = &builtin_macros.args,
223 .tokens = tokens,
207 .params = &[1][]const u8{"X"},
208 .tokens = &[1]RawToken{.{
209 .id = param_tok_id,
210 .source = .generated,
211 }},
224212 .var_args = false,
225213 .is_func = is_func,
226214 .loc = .{ .id = .generated },
......@@ -229,22 +217,30 @@ fn addBuiltinMacro(pp: *Preprocessor, name: []const u8, is_func: bool, tokens: [
229217}
230218
231219pub fn addBuiltinMacros(pp: *Preprocessor) !void {
232 try pp.addBuiltinMacro("__has_attribute", true, &builtin_macros.has_attribute);
233 try pp.addBuiltinMacro("__has_c_attribute", true, &builtin_macros.has_c_attribute);
234 try pp.addBuiltinMacro("__has_declspec_attribute", true, &builtin_macros.has_declspec_attribute);
235 try pp.addBuiltinMacro("__has_warning", true, &builtin_macros.has_warning);
236 try pp.addBuiltinMacro("__has_feature", true, &builtin_macros.has_feature);
237 try pp.addBuiltinMacro("__has_extension", true, &builtin_macros.has_extension);
238 try pp.addBuiltinMacro("__has_builtin", true, &builtin_macros.has_builtin);
239 try pp.addBuiltinMacro("__has_include", true, &builtin_macros.has_include);
240 try pp.addBuiltinMacro("__has_include_next", true, &builtin_macros.has_include_next);
241 try pp.addBuiltinMacro("__has_embed", true, &builtin_macros.has_embed);
242 try pp.addBuiltinMacro("__is_identifier", true, &builtin_macros.is_identifier);
243 try pp.addBuiltinMacro("_Pragma", true, &builtin_macros.pragma_operator);
244
245 try pp.addBuiltinMacro("__FILE__", false, &builtin_macros.file);
246 try pp.addBuiltinMacro("__LINE__", false, &builtin_macros.line);
247 try pp.addBuiltinMacro("__COUNTER__", false, &builtin_macros.counter);
220 try pp.addBuiltinMacro("__has_attribute", true, .macro_param_has_attribute);
221 try pp.addBuiltinMacro("__has_c_attribute", true, .macro_param_has_c_attribute);
222 try pp.addBuiltinMacro("__has_declspec_attribute", true, .macro_param_has_declspec_attribute);
223 try pp.addBuiltinMacro("__has_warning", true, .macro_param_has_warning);
224 try pp.addBuiltinMacro("__has_feature", true, .macro_param_has_feature);
225 try pp.addBuiltinMacro("__has_extension", true, .macro_param_has_extension);
226 try pp.addBuiltinMacro("__has_builtin", true, .macro_param_has_builtin);
227 try pp.addBuiltinMacro("__has_include", true, .macro_param_has_include);
228 try pp.addBuiltinMacro("__has_include_next", true, .macro_param_has_include_next);
229 try pp.addBuiltinMacro("__has_embed", true, .macro_param_has_embed);
230 try pp.addBuiltinMacro("__is_identifier", true, .macro_param_is_identifier);
231 try pp.addBuiltinMacro("_Pragma", true, .macro_param_pragma_operator);
232
233 if (pp.comp.langopts.ms_extensions) {
234 try pp.addBuiltinMacro("__identifier", true, .macro_param_ms_identifier);
235 try pp.addBuiltinMacro("__pragma", true, .macro_param_ms_pragma);
236 }
237
238 try pp.addBuiltinMacro("__FILE__", false, .macro_file);
239 try pp.addBuiltinMacro("__LINE__", false, .macro_line);
240 try pp.addBuiltinMacro("__COUNTER__", false, .macro_counter);
241 try pp.addBuiltinMacro("__DATE__", false, .macro_date);
242 try pp.addBuiltinMacro("__TIME__", false, .macro_time);
243 try pp.addBuiltinMacro("__TIMESTAMP__", false, .macro_timestamp);
248244}
249245
250246pub fn deinit(pp: *Preprocessor) void {
......@@ -259,6 +255,7 @@ pub fn deinit(pp: *Preprocessor) void {
259255 pp.hideset.deinit();
260256 for (pp.expansion_entries.items(.locs)) |locs| TokenWithExpansionLocs.free(locs, pp.gpa);
261257 pp.expansion_entries.deinit(pp.gpa);
258 pp.m_times.deinit(pp.gpa);
262259}
263260
264261/// Free buffers that are not needed after preprocessing
......@@ -269,6 +266,14 @@ fn clearBuffers(pp: *Preprocessor) void {
269266 pp.hideset.clearAndFree();
270267}
271268
269fn mTime(pp: *Preprocessor, source_id: Source.Id) !u64 {
270 const gop = try pp.m_times.getOrPut(pp.gpa, source_id);
271 if (!gop.found_existing) {
272 gop.value_ptr.* = pp.comp.getSourceMTimeUncached(source_id) orelse 0;
273 }
274 return gop.value_ptr.*;
275}
276
272277pub fn expansionSlice(pp: *Preprocessor, tok: Tree.TokenIndex) []Source.Location {
273278 const S = struct {
274279 fn orderTokenIndex(context: Tree.TokenIndex, item: Tree.TokenIndex) std.math.Order {
......@@ -349,7 +354,7 @@ pub fn addIncludeResume(pp: *Preprocessor, source: Source.Id, offset: u32, line:
349354 } });
350355}
351356
352fn invalidTokenDiagnostic(tok_id: Token.Id) Diagnostics.Tag {
357fn invalidTokenDiagnostic(tok_id: Token.Id) Diagnostic {
353358 return switch (tok_id) {
354359 .unterminated_string_literal => .unterminated_string_literal_warning,
355360 .empty_char_literal => .empty_char_literal_warning,
......@@ -389,11 +394,7 @@ fn preprocessExtra(pp: *Preprocessor, source: Source) MacroError!TokenWithExpans
389394 const estimated_token_count = source.buf.len / 8;
390395 try pp.ensureTotalTokenCapacity(pp.tokens.len + estimated_token_count);
391396
392 var if_level: u8 = 0;
393 var if_kind: [64]u8 = .{0} ** 64;
394 const until_else = 0;
395 const until_endif = 1;
396 const until_endif_seen_else = 2;
397 var if_context: IfContext = .default;
397398
398399 var start_of_line = true;
399400 while (true) {
......@@ -401,6 +402,7 @@ fn preprocessExtra(pp: *Preprocessor, source: Source) MacroError!TokenWithExpans
401402 switch (tok.id) {
402403 .hash => if (!start_of_line) try pp.addToken(tokFromRaw(tok)) else {
403404 const directive = tokenizer.nextNoWS();
405 const directive_loc: Source.Location = .{ .id = tok.source, .byte_offset = directive.start, .line = directive.line };
404406 switch (directive.id) {
405407 .keyword_error, .keyword_warning => {
406408 // #error tokens..
......@@ -416,27 +418,25 @@ fn preprocessExtra(pp: *Preprocessor, source: Source) MacroError!TokenWithExpans
416418 }
417419 try pp.stringify(pp.top_expansion_buf.items);
418420 const slice = pp.char_buf.items[char_top + 1 .. pp.char_buf.items.len - 2];
419 const duped = try pp.comp.diagnostics.arena.allocator().dupe(u8, slice);
420421
421 try pp.comp.addDiagnostic(.{
422 .tag = if (directive.id == .keyword_error) .error_directive else .warning_directive,
423 .loc = .{ .id = tok.source, .byte_offset = directive.start, .line = directive.line },
424 .extra = .{ .str = duped },
425 }, &.{});
422 try pp.err(
423 directive_loc,
424 if (directive.id == .keyword_error) .error_directive else .warning_directive,
425 .{slice},
426 );
426427 },
427428 .keyword_if => {
428 const sum, const overflowed = @addWithOverflow(if_level, 1);
429 if (overflowed != 0)
429 const overflowed = if_context.increment();
430 if (overflowed)
430431 return pp.fatal(directive, "too many #if nestings", .{});
431 if_level = sum;
432432
433433 if (try pp.expr(&tokenizer)) {
434 std.mem.writePackedIntNative(u2, &if_kind, if_level * 2, until_endif);
434 if_context.set(.until_endif);
435435 if (pp.verbose) {
436436 pp.verboseLog(directive, "entering then branch of #if", .{});
437437 }
438438 } else {
439 std.mem.writePackedIntNative(u2, &if_kind, if_level * 2, until_else);
439 if_context.set(.until_else);
440440 try pp.skip(&tokenizer, .until_else);
441441 if (pp.verbose) {
442442 pp.verboseLog(directive, "entering else branch of #if", .{});
......@@ -444,20 +444,19 @@ fn preprocessExtra(pp: *Preprocessor, source: Source) MacroError!TokenWithExpans
444444 }
445445 },
446446 .keyword_ifdef => {
447 const sum, const overflowed = @addWithOverflow(if_level, 1);
448 if (overflowed != 0)
447 const overflowed = if_context.increment();
448 if (overflowed)
449449 return pp.fatal(directive, "too many #if nestings", .{});
450 if_level = sum;
451450
452451 const macro_name = (try pp.expectMacroName(&tokenizer)) orelse continue;
453452 try pp.expectNl(&tokenizer);
454453 if (pp.defines.get(macro_name) != null) {
455 std.mem.writePackedIntNative(u2, &if_kind, if_level * 2, until_endif);
454 if_context.set(.until_endif);
456455 if (pp.verbose) {
457456 pp.verboseLog(directive, "entering then branch of #ifdef", .{});
458457 }
459458 } else {
460 std.mem.writePackedIntNative(u2, &if_kind, if_level * 2, until_else);
459 if_context.set(.until_else);
461460 try pp.skip(&tokenizer, .until_else);
462461 if (pp.verbose) {
463462 pp.verboseLog(directive, "entering else branch of #ifdef", .{});
......@@ -465,31 +464,30 @@ fn preprocessExtra(pp: *Preprocessor, source: Source) MacroError!TokenWithExpans
465464 }
466465 },
467466 .keyword_ifndef => {
468 const sum, const overflowed = @addWithOverflow(if_level, 1);
469 if (overflowed != 0)
467 const overflowed = if_context.increment();
468 if (overflowed)
470469 return pp.fatal(directive, "too many #if nestings", .{});
471 if_level = sum;
472470
473471 const macro_name = (try pp.expectMacroName(&tokenizer)) orelse continue;
474472 try pp.expectNl(&tokenizer);
475473 if (pp.defines.get(macro_name) == null) {
476 std.mem.writePackedIntNative(u2, &if_kind, if_level * 2, until_endif);
474 if_context.set(.until_endif);
477475 } else {
478 std.mem.writePackedIntNative(u2, &if_kind, if_level * 2, until_else);
476 if_context.set(.until_else);
479477 try pp.skip(&tokenizer, .until_else);
480478 }
481479 },
482480 .keyword_elif => {
483 if (if_level == 0) {
484 try pp.err(directive, .elif_without_if);
485 if_level += 1;
486 std.mem.writePackedIntNative(u2, &if_kind, if_level * 2, until_else);
487 } else if (if_level == 1) {
481 if (if_context.level == 0) {
482 try pp.err(directive, .elif_without_if, .{});
483 _ = if_context.increment();
484 if_context.set(.until_else);
485 } else if (if_context.level == 1) {
488486 guard_name = null;
489487 }
490 switch (std.mem.readPackedIntNative(u2, &if_kind, if_level * 2)) {
491 until_else => if (try pp.expr(&tokenizer)) {
492 std.mem.writePackedIntNative(u2, &if_kind, if_level * 2, until_endif);
488 switch (if_context.get()) {
489 .until_else => if (try pp.expr(&tokenizer)) {
490 if_context.set(.until_endif);
493491 if (pp.verbose) {
494492 pp.verboseLog(directive, "entering then branch of #elif", .{});
495493 }
......@@ -499,27 +497,26 @@ fn preprocessExtra(pp: *Preprocessor, source: Source) MacroError!TokenWithExpans
499497 pp.verboseLog(directive, "entering else branch of #elif", .{});
500498 }
501499 },
502 until_endif => try pp.skip(&tokenizer, .until_endif),
503 until_endif_seen_else => {
504 try pp.err(directive, .elif_after_else);
500 .until_endif => try pp.skip(&tokenizer, .until_endif),
501 .until_endif_seen_else => {
502 try pp.err(directive, .elif_after_else, .{});
505503 skipToNl(&tokenizer);
506504 },
507 else => unreachable,
508505 }
509506 },
510507 .keyword_elifdef => {
511 if (if_level == 0) {
512 try pp.err(directive, .elifdef_without_if);
513 if_level += 1;
514 std.mem.writePackedIntNative(u2, &if_kind, if_level * 2, until_else);
515 } else if (if_level == 1) {
508 if (if_context.level == 0) {
509 try pp.err(directive, .elifdef_without_if, .{});
510 _ = if_context.increment();
511 if_context.set(.until_else);
512 } else if (if_context.level == 1) {
516513 guard_name = null;
517514 }
518 switch (std.mem.readPackedIntNative(u2, &if_kind, if_level * 2)) {
519 until_else => {
515 switch (if_context.get()) {
516 .until_else => {
520517 const macro_name = try pp.expectMacroName(&tokenizer);
521518 if (macro_name == null) {
522 std.mem.writePackedIntNative(u2, &if_kind, if_level * 2, until_else);
519 if_context.set(.until_else);
523520 try pp.skip(&tokenizer, .until_else);
524521 if (pp.verbose) {
525522 pp.verboseLog(directive, "entering else branch of #elifdef", .{});
......@@ -527,12 +524,12 @@ fn preprocessExtra(pp: *Preprocessor, source: Source) MacroError!TokenWithExpans
527524 } else {
528525 try pp.expectNl(&tokenizer);
529526 if (pp.defines.get(macro_name.?) != null) {
530 std.mem.writePackedIntNative(u2, &if_kind, if_level * 2, until_endif);
527 if_context.set(.until_endif);
531528 if (pp.verbose) {
532529 pp.verboseLog(directive, "entering then branch of #elifdef", .{});
533530 }
534531 } else {
535 std.mem.writePackedIntNative(u2, &if_kind, if_level * 2, until_else);
532 if_context.set(.until_else);
536533 try pp.skip(&tokenizer, .until_else);
537534 if (pp.verbose) {
538535 pp.verboseLog(directive, "entering else branch of #elifdef", .{});
......@@ -540,27 +537,26 @@ fn preprocessExtra(pp: *Preprocessor, source: Source) MacroError!TokenWithExpans
540537 }
541538 }
542539 },
543 until_endif => try pp.skip(&tokenizer, .until_endif),
544 until_endif_seen_else => {
545 try pp.err(directive, .elifdef_after_else);
540 .until_endif => try pp.skip(&tokenizer, .until_endif),
541 .until_endif_seen_else => {
542 try pp.err(directive, .elifdef_after_else, .{});
546543 skipToNl(&tokenizer);
547544 },
548 else => unreachable,
549545 }
550546 },
551547 .keyword_elifndef => {
552 if (if_level == 0) {
553 try pp.err(directive, .elifdef_without_if);
554 if_level += 1;
555 std.mem.writePackedIntNative(u2, &if_kind, if_level * 2, until_else);
556 } else if (if_level == 1) {
548 if (if_context.level == 0) {
549 try pp.err(directive, .elifndef_without_if, .{});
550 _ = if_context.increment();
551 if_context.set(.until_else);
552 } else if (if_context.level == 1) {
557553 guard_name = null;
558554 }
559 switch (std.mem.readPackedIntNative(u2, &if_kind, if_level * 2)) {
560 until_else => {
555 switch (if_context.get()) {
556 .until_else => {
561557 const macro_name = try pp.expectMacroName(&tokenizer);
562558 if (macro_name == null) {
563 std.mem.writePackedIntNative(u2, &if_kind, if_level * 2, until_else);
559 if_context.set(.until_else);
564560 try pp.skip(&tokenizer, .until_else);
565561 if (pp.verbose) {
566562 pp.verboseLog(directive, "entering else branch of #elifndef", .{});
......@@ -568,12 +564,12 @@ fn preprocessExtra(pp: *Preprocessor, source: Source) MacroError!TokenWithExpans
568564 } else {
569565 try pp.expectNl(&tokenizer);
570566 if (pp.defines.get(macro_name.?) == null) {
571 std.mem.writePackedIntNative(u2, &if_kind, if_level * 2, until_endif);
567 if_context.set(.until_endif);
572568 if (pp.verbose) {
573569 pp.verboseLog(directive, "entering then branch of #elifndef", .{});
574570 }
575571 } else {
576 std.mem.writePackedIntNative(u2, &if_kind, if_level * 2, until_else);
572 if_context.set(.until_else);
577573 try pp.skip(&tokenizer, .until_else);
578574 if (pp.verbose) {
579575 pp.verboseLog(directive, "entering else branch of #elifndef", .{});
......@@ -581,44 +577,42 @@ fn preprocessExtra(pp: *Preprocessor, source: Source) MacroError!TokenWithExpans
581577 }
582578 }
583579 },
584 until_endif => try pp.skip(&tokenizer, .until_endif),
585 until_endif_seen_else => {
586 try pp.err(directive, .elifdef_after_else);
580 .until_endif => try pp.skip(&tokenizer, .until_endif),
581 .until_endif_seen_else => {
582 try pp.err(directive, .elifdef_after_else, .{});
587583 skipToNl(&tokenizer);
588584 },
589 else => unreachable,
590585 }
591586 },
592587 .keyword_else => {
593588 try pp.expectNl(&tokenizer);
594 if (if_level == 0) {
595 try pp.err(directive, .else_without_if);
589 if (if_context.level == 0) {
590 try pp.err(directive, .else_without_if, .{});
596591 continue;
597 } else if (if_level == 1) {
592 } else if (if_context.level == 1) {
598593 guard_name = null;
599594 }
600 switch (std.mem.readPackedIntNative(u2, &if_kind, if_level * 2)) {
601 until_else => {
602 std.mem.writePackedIntNative(u2, &if_kind, if_level * 2, until_endif_seen_else);
595 switch (if_context.get()) {
596 .until_else => {
597 if_context.set(.until_endif_seen_else);
603598 if (pp.verbose) {
604599 pp.verboseLog(directive, "#else branch here", .{});
605600 }
606601 },
607 until_endif => try pp.skip(&tokenizer, .until_endif_seen_else),
608 until_endif_seen_else => {
609 try pp.err(directive, .else_after_else);
602 .until_endif => try pp.skip(&tokenizer, .until_endif_seen_else),
603 .until_endif_seen_else => {
604 try pp.err(directive, .else_after_else, .{});
610605 skipToNl(&tokenizer);
611606 },
612 else => unreachable,
613607 }
614608 },
615609 .keyword_endif => {
616610 try pp.expectNl(&tokenizer);
617 if (if_level == 0) {
611 if (if_context.level == 0) {
618612 guard_name = null;
619 try pp.err(directive, .endif_without_if);
613 try pp.err(directive, .endif_without_if, .{});
620614 continue;
621 } else if (if_level == 1) {
615 } else if (if_context.level == 1) {
622616 const saved_tokenizer = tokenizer;
623617 defer tokenizer = saved_tokenizer;
624618
......@@ -626,7 +620,7 @@ fn preprocessExtra(pp: *Preprocessor, source: Source) MacroError!TokenWithExpans
626620 while (next.id == .nl) : (next = tokenizer.nextNoWS()) {}
627621 if (next.id != .eof) guard_name = null;
628622 }
629 if_level -= 1;
623 if_context.decrement();
630624 },
631625 .keyword_define => try pp.define(&tokenizer, directive),
632626 .keyword_undef => {
......@@ -635,7 +629,7 @@ fn preprocessExtra(pp: *Preprocessor, source: Source) MacroError!TokenWithExpans
635629 try pp.addToken(tokFromRaw(directive));
636630 }
637631
638 _ = pp.defines.remove(macro_name);
632 _ = pp.defines.orderedRemove(macro_name);
639633 try pp.expectNl(&tokenizer);
640634 },
641635 .keyword_include => {
......@@ -643,15 +637,10 @@ fn preprocessExtra(pp: *Preprocessor, source: Source) MacroError!TokenWithExpans
643637 continue;
644638 },
645639 .keyword_include_next => {
646 try pp.comp.addDiagnostic(.{
647 .tag = .include_next,
648 .loc = .{ .id = tok.source, .byte_offset = directive.start, .line = directive.line },
649 }, &.{});
640 try pp.err(directive_loc, .include_next, .{});
641
650642 if (pp.include_depth == 0) {
651 try pp.comp.addDiagnostic(.{
652 .tag = .include_next_outside_header,
653 .loc = .{ .id = tok.source, .byte_offset = directive.start, .line = directive.line },
654 }, &.{});
643 try pp.err(directive_loc, .include_next_outside_header, .{});
655644 try pp.include(&tokenizer, .first);
656645 } else {
657646 try pp.include(&tokenizer, .next);
......@@ -665,13 +654,13 @@ fn preprocessExtra(pp: *Preprocessor, source: Source) MacroError!TokenWithExpans
665654 .keyword_line => {
666655 // #line number "file"
667656 const digits = tokenizer.nextNoWS();
668 if (digits.id != .pp_num) try pp.err(digits, .line_simple_digit);
657 if (digits.id != .pp_num) try pp.err(digits, .line_simple_digit, .{});
669658 // TODO: validate that the pp_num token is solely digits
670659
671660 if (digits.id == .eof or digits.id == .nl) continue;
672661 const name = tokenizer.nextNoWS();
673662 if (name.id == .eof or name.id == .nl) continue;
674 if (name.id != .string_literal) try pp.err(name, .line_invalid_filename);
663 if (name.id != .string_literal) try pp.err(name, .line_invalid_filename, .{});
675664 try pp.expectNl(&tokenizer);
676665 },
677666 .pp_num => {
......@@ -680,7 +669,7 @@ fn preprocessExtra(pp: *Preprocessor, source: Source) MacroError!TokenWithExpans
680669 // if not, emit `GNU line marker directive requires a simple digit sequence`
681670 const name = tokenizer.nextNoWS();
682671 if (name.id == .eof or name.id == .nl) continue;
683 if (name.id != .string_literal) try pp.err(name, .line_invalid_filename);
672 if (name.id != .string_literal) try pp.err(name, .line_invalid_filename, .{});
684673
685674 const flag_1 = tokenizer.nextNoWS();
686675 if (flag_1.id == .eof or flag_1.id == .nl) continue;
......@@ -694,11 +683,11 @@ fn preprocessExtra(pp: *Preprocessor, source: Source) MacroError!TokenWithExpans
694683 },
695684 .nl => {},
696685 .eof => {
697 if (if_level != 0) try pp.err(tok, .unterminated_conditional_directive);
686 if (if_context.level != 0) try pp.err(tok, .unterminated_conditional_directive, .{});
698687 return tokFromRaw(directive);
699688 },
700689 else => {
701 try pp.err(tok, .invalid_preprocessing_directive);
690 try pp.err(tok, .invalid_preprocessing_directive, .{});
702691 skipToNl(&tokenizer);
703692 },
704693 }
......@@ -713,11 +702,11 @@ fn preprocessExtra(pp: *Preprocessor, source: Source) MacroError!TokenWithExpans
713702 if (pp.preserve_whitespace) try pp.addToken(tokFromRaw(tok));
714703 },
715704 .eof => {
716 if (if_level != 0) try pp.err(tok, .unterminated_conditional_directive);
705 if (if_context.level != 0) try pp.err(tok, .unterminated_conditional_directive, .{});
717706 // The following check needs to occur here and not at the top of the function
718707 // because a pragma may change the level during preprocessing
719708 if (source.buf.len > 0 and source.buf[source.buf.len - 1] != '\n') {
720 try pp.err(tok, .newline_eof);
709 try pp.err(tok, .newline_eof, .{});
721710 }
722711 if (guard_name) |name| {
723712 if (try pp.include_guards.fetchPut(pp.gpa, source.id, name)) |prev| {
......@@ -728,13 +717,13 @@ fn preprocessExtra(pp: *Preprocessor, source: Source) MacroError!TokenWithExpans
728717 },
729718 .unterminated_string_literal, .unterminated_char_literal, .empty_char_literal => |tag| {
730719 start_of_line = false;
731 try pp.err(tok, invalidTokenDiagnostic(tag));
720 try pp.err(tok, invalidTokenDiagnostic(tag), .{});
732721 try pp.expandMacro(&tokenizer, tok);
733722 },
734 .unterminated_comment => try pp.err(tok, .unterminated_comment),
723 .unterminated_comment => try pp.err(tok, .unterminated_comment, .{}),
735724 else => {
736725 if (tok.id.isMacroIdentifier() and pp.poisoned_identifiers.get(pp.tokSlice(tok)) != null) {
737 try pp.err(tok, .poisoned_identifier);
726 try pp.err(tok, .poisoned_identifier, .{});
738727 }
739728 // Add the token to the buffer doing any necessary expansions.
740729 start_of_line = false;
......@@ -746,7 +735,7 @@ fn preprocessExtra(pp: *Preprocessor, source: Source) MacroError!TokenWithExpans
746735
747736/// Get raw token source string.
748737/// Returned slice is invalidated when comp.generated_buf is updated.
749pub fn tokSlice(pp: *Preprocessor, token: anytype) []const u8 {
738pub fn tokSlice(pp: *const Preprocessor, token: anytype) []const u8 {
750739 if (token.id.lexeme()) |some| return some;
751740 const source = pp.comp.getSource(token.source);
752741 return source.buf[token.start..token.end];
......@@ -764,51 +753,77 @@ fn tokFromRaw(raw: RawToken) TokenWithExpansionLocs {
764753 };
765754}
766755
767fn err(pp: *Preprocessor, raw: RawToken, tag: Diagnostics.Tag) !void {
768 try pp.comp.addDiagnostic(.{
769 .tag = tag,
770 .loc = .{
771 .id = raw.source,
772 .byte_offset = raw.start,
773 .line = raw.line,
756pub const Diagnostic = @import("Preprocessor/Diagnostic.zig");
757
758fn err(pp: *Preprocessor, loc: anytype, diagnostic: Diagnostic, args: anytype) Compilation.Error!void {
759 if (pp.diagnostics.effectiveKind(diagnostic) == .off) return;
760
761 var sf = std.heap.stackFallback(1024, pp.gpa);
762 var allocating: std.Io.Writer.Allocating = .init(sf.get());
763 defer allocating.deinit();
764
765 Diagnostics.formatArgs(&allocating.writer, diagnostic.fmt, args) catch return error.OutOfMemory;
766 try pp.diagnostics.addWithLocation(pp.comp, .{
767 .kind = diagnostic.kind,
768 .text = allocating.getWritten(),
769 .opt = diagnostic.opt,
770 .extension = diagnostic.extension,
771 .location = switch (@TypeOf(loc)) {
772 RawToken => (Source.Location{
773 .id = loc.source,
774 .byte_offset = loc.start,
775 .line = loc.line,
776 }).expand(pp.comp),
777 TokenWithExpansionLocs, *TokenWithExpansionLocs => loc.loc.expand(pp.comp),
778 Source.Location => loc.expand(pp.comp),
779 else => @compileError("invalid token type " ++ @typeName(@TypeOf(loc))),
774780 },
775 }, &.{});
776}
777
778fn errStr(pp: *Preprocessor, tok: TokenWithExpansionLocs, tag: Diagnostics.Tag, str: []const u8) !void {
779 try pp.comp.addDiagnostic(.{
780 .tag = tag,
781 .loc = tok.loc,
782 .extra = .{ .str = str },
783 }, tok.expansionSlice());
781 }, switch (@TypeOf(loc)) {
782 RawToken => &.{},
783 TokenWithExpansionLocs, *TokenWithExpansionLocs => loc.expansionSlice(),
784 Source.Location => &.{},
785 else => @compileError("invalid token type"),
786 }, true);
784787}
785788
786789fn fatal(pp: *Preprocessor, raw: RawToken, comptime fmt: []const u8, args: anytype) Compilation.Error {
787 try pp.comp.diagnostics.list.append(pp.gpa, .{
788 .tag = .cli_error,
790 var sf = std.heap.stackFallback(1024, pp.gpa);
791 var allocating: std.Io.Writer.Allocating = .init(sf.get());
792 defer allocating.deinit();
793
794 Diagnostics.formatArgs(&allocating.writer, fmt, args) catch return error.OutOfMemory;
795 try pp.diagnostics.add(.{
789796 .kind = .@"fatal error",
790 .extra = .{ .str = try std.fmt.allocPrint(pp.comp.diagnostics.arena.allocator(), fmt, args) },
791 .loc = .{
797 .text = allocating.getWritten(),
798 .location = (Source.Location{
792799 .id = raw.source,
793800 .byte_offset = raw.start,
794801 .line = raw.line,
795 },
802 }).expand(pp.comp),
796803 });
797 return error.FatalError;
804 unreachable;
798805}
799806
800807fn fatalNotFound(pp: *Preprocessor, tok: TokenWithExpansionLocs, filename: []const u8) Compilation.Error {
801 const old = pp.comp.diagnostics.fatal_errors;
802 pp.comp.diagnostics.fatal_errors = true;
803 defer pp.comp.diagnostics.fatal_errors = old;
808 const old = pp.diagnostics.state.fatal_errors;
809 pp.diagnostics.state.fatal_errors = true;
810 defer pp.diagnostics.state.fatal_errors = old;
804811
805 try pp.comp.diagnostics.addExtra(pp.comp.langopts, .{ .tag = .cli_error, .loc = tok.loc, .extra = .{
806 .str = try std.fmt.allocPrint(pp.comp.diagnostics.arena.allocator(), "'{s}' not found", .{filename}),
807 } }, tok.expansionSlice(), false);
808 unreachable; // addExtra should've returned FatalError
812 var sf = std.heap.stackFallback(1024, pp.gpa);
813 var buf = std.ArrayList(u8).init(sf.get());
814 defer buf.deinit();
815
816 try buf.print("'{s}' not found", .{filename});
817 try pp.diagnostics.addWithLocation(pp.comp, .{
818 .kind = .@"fatal error",
819 .text = buf.items,
820 .location = tok.loc.expand(pp.comp),
821 }, tok.expansionSlice(), true);
822 unreachable; // should've returned FatalError
809823}
810824
811825fn verboseLog(pp: *Preprocessor, raw: RawToken, comptime fmt: []const u8, args: anytype) void {
826 @branchHint(.cold);
812827 const source = pp.comp.getSource(raw.source);
813828 const line_col = source.lineCol(.{ .id = raw.source, .line = raw.line, .byte_offset = raw.start });
814829
......@@ -826,7 +841,7 @@ fn verboseLog(pp: *Preprocessor, raw: RawToken, comptime fmt: []const u8, args:
826841fn expectMacroName(pp: *Preprocessor, tokenizer: *Tokenizer) Error!?[]const u8 {
827842 const macro_name = tokenizer.nextNoWS();
828843 if (!macro_name.id.isMacroIdentifier()) {
829 try pp.err(macro_name, .macro_name_missing);
844 try pp.err(macro_name, .macro_name_missing, .{});
830845 skipToNl(tokenizer);
831846 return null;
832847 }
......@@ -842,7 +857,7 @@ fn expectNl(pp: *Preprocessor, tokenizer: *Tokenizer) Error!void {
842857 if (tok.id == .whitespace or tok.id == .comment) continue;
843858 if (!sent_err) {
844859 sent_err = true;
845 try pp.err(tok, .extra_tokens_directive_end);
860 try pp.err(tok, .extra_tokens_directive_end, .{});
846861 }
847862 }
848863}
......@@ -885,15 +900,12 @@ fn expr(pp: *Preprocessor, tokenizer: *Tokenizer) MacroError!bool {
885900 for (pp.top_expansion_buf.items) |tok| {
886901 if (tok.id == .macro_ws) continue;
887902 if (!tok.id.validPreprocessorExprStart()) {
888 try pp.comp.addDiagnostic(.{
889 .tag = .invalid_preproc_expr_start,
890 .loc = tok.loc,
891 }, tok.expansionSlice());
903 try pp.err(tok, .invalid_preproc_expr_start, .{});
892904 return false;
893905 }
894906 break;
895907 } else {
896 try pp.err(eof, .expected_value_in_expr);
908 try pp.err(eof, .expected_value_in_expr, .{});
897909 return false;
898910 }
899911
......@@ -910,10 +922,7 @@ fn expr(pp: *Preprocessor, tokenizer: *Tokenizer) MacroError!bool {
910922 .string_literal_utf_32,
911923 .string_literal_wide,
912924 => {
913 try pp.comp.addDiagnostic(.{
914 .tag = .string_literal_in_pp_expr,
915 .loc = tok.loc,
916 }, tok.expansionSlice());
925 try pp.err(tok, .string_literal_in_pp_expr, .{});
917926 return false;
918927 },
919928 .plus_plus,
......@@ -940,10 +949,7 @@ fn expr(pp: *Preprocessor, tokenizer: *Tokenizer) MacroError!bool {
940949 .arrow,
941950 .period,
942951 => {
943 try pp.comp.addDiagnostic(.{
944 .tag = .invalid_preproc_operator,
945 .loc = tok.loc,
946 }, tok.expansionSlice());
952 try pp.err(tok, .invalid_preproc_operator, .{});
947953 return false;
948954 },
949955 .macro_ws, .whitespace => continue,
......@@ -954,12 +960,12 @@ fn expr(pp: *Preprocessor, tokenizer: *Tokenizer) MacroError!bool {
954960 const tokens_consumed = try pp.handleKeywordDefined(&tok, items[i + 1 ..], eof);
955961 i += tokens_consumed;
956962 } else {
957 try pp.errStr(tok, .undefined_macro, pp.expandedSlice(tok));
963 try pp.err(tok, .undefined_macro, .{pp.expandedSlice(tok)});
958964
959965 if (i + 1 < pp.top_expansion_buf.items.len and
960966 pp.top_expansion_buf.items[i + 1].id == .l_paren)
961967 {
962 try pp.errStr(tok, .fn_macro_undefined, pp.expandedSlice(tok));
968 try pp.err(tok, .fn_macro_undefined, .{pp.expandedSlice(tok)});
963969 return false;
964970 }
965971
......@@ -967,7 +973,7 @@ fn expr(pp: *Preprocessor, tokenizer: *Tokenizer) MacroError!bool {
967973 }
968974 },
969975 }
970 pp.addTokenAssumeCapacity(tok);
976 pp.addTokenAssumeCapacity(try pp.unescapeUcn(tok));
971977 }
972978 try pp.addToken(.{
973979 .id = .eof,
......@@ -975,18 +981,17 @@ fn expr(pp: *Preprocessor, tokenizer: *Tokenizer) MacroError!bool {
975981 });
976982
977983 // Actually parse it.
978 var parser = Parser{
984 var parser: Parser = .{
979985 .pp = pp,
980986 .comp = pp.comp,
987 .diagnostics = pp.diagnostics,
981988 .gpa = pp.gpa,
982989 .tok_ids = pp.tokens.items(.id),
983990 .tok_i = @intCast(token_state.tokens_len),
984 .arena = pp.arena.allocator(),
985991 .in_macro = true,
986992 .strings = std.array_list.Managed(u8).init(pp.comp.gpa),
987993
988 .data = undefined,
989 .value_map = undefined,
994 .tree = undefined,
990995 .labels = undefined,
991996 .decl_buf = undefined,
992997 .list_buf = undefined,
......@@ -994,7 +999,6 @@ fn expr(pp: *Preprocessor, tokenizer: *Tokenizer) MacroError!bool {
994999 .enum_buf = undefined,
9951000 .record_buf = undefined,
9961001 .attr_buf = undefined,
997 .field_attr_buf = undefined,
9981002 .string_ids = undefined,
9991003 };
10001004 defer parser.strings.deinit();
......@@ -1007,28 +1011,25 @@ fn handleKeywordDefined(pp: *Preprocessor, macro_tok: *TokenWithExpansionLocs, t
10071011 std.debug.assert(macro_tok.id == .keyword_defined);
10081012 var it = TokenIterator.init(tokens);
10091013 const first = it.nextNoWS() orelse {
1010 try pp.err(eof, .macro_name_missing);
1014 try pp.err(eof, .macro_name_missing, .{});
10111015 return it.i;
10121016 };
10131017 switch (first.id) {
10141018 .l_paren => {},
10151019 else => {
10161020 if (!first.id.isMacroIdentifier()) {
1017 try pp.errStr(first, .macro_name_must_be_identifier, pp.expandedSlice(first));
1021 try pp.err(first, .macro_name_must_be_identifier, .{});
10181022 }
10191023 macro_tok.id = if (pp.defines.contains(pp.expandedSlice(first))) .one else .zero;
10201024 return it.i;
10211025 },
10221026 }
10231027 const second = it.nextNoWS() orelse {
1024 try pp.err(eof, .macro_name_missing);
1028 try pp.err(eof, .macro_name_missing, .{});
10251029 return it.i;
10261030 };
10271031 if (!second.id.isMacroIdentifier()) {
1028 try pp.comp.addDiagnostic(.{
1029 .tag = .macro_name_must_be_identifier,
1030 .loc = second.loc,
1031 }, second.expansionSlice());
1032 try pp.err(second, .macro_name_must_be_identifier, .{});
10321033 return it.i;
10331034 }
10341035 macro_tok.id = if (pp.defines.contains(pp.expandedSlice(second))) .one else .zero;
......@@ -1036,14 +1037,8 @@ fn handleKeywordDefined(pp: *Preprocessor, macro_tok: *TokenWithExpansionLocs, t
10361037 const last = it.nextNoWS();
10371038 if (last == null or last.?.id != .r_paren) {
10381039 const tok = last orelse tokFromRaw(eof);
1039 try pp.comp.addDiagnostic(.{
1040 .tag = .closing_paren,
1041 .loc = tok.loc,
1042 }, tok.expansionSlice());
1043 try pp.comp.addDiagnostic(.{
1044 .tag = .to_match_paren,
1045 .loc = first.loc,
1046 }, first.expansionSlice());
1040 try pp.err(tok, .closing_paren, .{});
1041 try pp.err(first, .to_match_paren, .{});
10471042 }
10481043
10491044 return it.i;
......@@ -1070,7 +1065,7 @@ fn skip(
10701065 .keyword_else => {
10711066 if (ifs_seen != 0) continue;
10721067 if (cont == .until_endif_seen_else) {
1073 try pp.err(directive, .else_after_else);
1068 try pp.err(directive, .else_after_else, .{});
10741069 continue;
10751070 }
10761071 tokenizer.* = saved_tokenizer;
......@@ -1079,7 +1074,7 @@ fn skip(
10791074 .keyword_elif => {
10801075 if (ifs_seen != 0 or cont == .until_endif) continue;
10811076 if (cont == .until_endif_seen_else) {
1082 try pp.err(directive, .elif_after_else);
1077 try pp.err(directive, .elif_after_else, .{});
10831078 continue;
10841079 }
10851080 tokenizer.* = saved_tokenizer;
......@@ -1088,7 +1083,7 @@ fn skip(
10881083 .keyword_elifdef => {
10891084 if (ifs_seen != 0 or cont == .until_endif) continue;
10901085 if (cont == .until_endif_seen_else) {
1091 try pp.err(directive, .elifdef_after_else);
1086 try pp.err(directive, .elifdef_after_else, .{});
10921087 continue;
10931088 }
10941089 tokenizer.* = saved_tokenizer;
......@@ -1097,7 +1092,7 @@ fn skip(
10971092 .keyword_elifndef => {
10981093 if (ifs_seen != 0 or cont == .until_endif) continue;
10991094 if (cont == .until_endif_seen_else) {
1100 try pp.err(directive, .elifndef_after_else);
1095 try pp.err(directive, .elifndef_after_else, .{});
11011096 continue;
11021097 }
11031098 tokenizer.* = saved_tokenizer;
......@@ -1129,7 +1124,7 @@ fn skip(
11291124 }
11301125 } else {
11311126 const eof = tokenizer.next();
1132 return pp.err(eof, .unterminated_conditional_directive);
1127 return pp.err(eof, .unterminated_conditional_directive, .{});
11331128 }
11341129}
11351130
......@@ -1194,7 +1189,7 @@ fn expandObjMacro(pp: *Preprocessor, simple_macro: *const Macro) Error!ExpandBuf
11941189 .macro_file => {
11951190 const start = pp.comp.generated_buf.items.len;
11961191 const source = pp.comp.getSource(pp.expansion_source_loc.id);
1197 try pp.comp.generated_buf.print(pp.gpa, "\"{s}\"\n", .{source.path});
1192 try pp.comp.generated_buf.print(pp.gpa, "\"{f}\"\n", .{fmtEscapes(source.path)});
11981193
11991194 buf.appendAssumeCapacity(try pp.makeGeneratedToken(start, .string_literal, tok));
12001195 },
......@@ -1212,6 +1207,24 @@ fn expandObjMacro(pp: *Preprocessor, simple_macro: *const Macro) Error!ExpandBuf
12121207
12131208 buf.appendAssumeCapacity(try pp.makeGeneratedToken(start, .pp_num, tok));
12141209 },
1210 .macro_date, .macro_time => {
1211 const start = pp.comp.generated_buf.items.len;
1212 const timestamp = switch (pp.source_epoch) {
1213 .system, .provided => |ts| ts,
1214 };
1215 try pp.writeDateTimeStamp(.fromTokId(raw.id), timestamp);
1216 buf.appendAssumeCapacity(try pp.makeGeneratedToken(start, .string_literal, tok));
1217 },
1218 .macro_timestamp => {
1219 const start = pp.comp.generated_buf.items.len;
1220 const timestamp = switch (pp.source_epoch) {
1221 .provided => |ts| ts,
1222 .system => try pp.mTime(pp.expansion_source_loc.id),
1223 };
1224
1225 try pp.writeDateTimeStamp(.fromTokId(raw.id), timestamp);
1226 buf.appendAssumeCapacity(try pp.makeGeneratedToken(start, .string_literal, tok));
1227 },
12151228 else => buf.appendAssumeCapacity(tok),
12161229 }
12171230 }
......@@ -1219,6 +1232,64 @@ fn expandObjMacro(pp: *Preprocessor, simple_macro: *const Macro) Error!ExpandBuf
12191232 return buf;
12201233}
12211234
1235const DateTimeStampKind = enum {
1236 date,
1237 time,
1238 timestamp,
1239
1240 fn fromTokId(tok_id: RawToken.Id) DateTimeStampKind {
1241 return switch (tok_id) {
1242 .macro_date => .date,
1243 .macro_time => .time,
1244 .macro_timestamp => .timestamp,
1245 else => unreachable,
1246 };
1247 }
1248};
1249
1250fn writeDateTimeStamp(pp: *Preprocessor, kind: DateTimeStampKind, timestamp: u64) !void {
1251 std.debug.assert(std.time.epoch.Month.jan.numeric() == 1);
1252
1253 const epoch_seconds = std.time.epoch.EpochSeconds{ .secs = timestamp };
1254 const epoch_day = epoch_seconds.getEpochDay();
1255 const day_seconds = epoch_seconds.getDaySeconds();
1256 const year_day = epoch_day.calculateYearDay();
1257 const month_day = year_day.calculateMonthDay();
1258
1259 const day_names = [_][]const u8{ "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun" };
1260 const month_names = [_][]const u8{ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
1261 const day_name = day_names[@intCast((epoch_day.day + 3) % 7)];
1262 const month_name = month_names[month_day.month.numeric() - 1];
1263
1264 switch (kind) {
1265 .date => {
1266 try pp.comp.generated_buf.print(pp.gpa, "\"{s} {d: >2} {d}\"", .{
1267 month_name,
1268 month_day.day_index + 1,
1269 year_day.year,
1270 });
1271 },
1272 .time => {
1273 try pp.comp.generated_buf.print(pp.gpa, "\"{d:0>2}:{d:0>2}:{d:0>2}\"", .{
1274 day_seconds.getHoursIntoDay(),
1275 day_seconds.getMinutesIntoHour(),
1276 day_seconds.getSecondsIntoMinute(),
1277 });
1278 },
1279 .timestamp => {
1280 try pp.comp.generated_buf.print(pp.gpa, "\"{s} {s} {d: >2} {d:0>2}:{d:0>2}:{d:0>2} {d}\"", .{
1281 day_name,
1282 month_name,
1283 month_day.day_index + 1,
1284 day_seconds.getHoursIntoDay(),
1285 day_seconds.getMinutesIntoHour(),
1286 day_seconds.getSecondsIntoMinute(),
1287 year_day.year,
1288 });
1289 },
1290 }
1291}
1292
12221293/// Join a possibly-parenthesized series of string literal tokens into a single string without
12231294/// leading or trailing quotes. The returned slice is invalidated if pp.char_buf changes.
12241295/// Returns error.ExpectedStringLiteral if parentheses are not balanced, a non-string-literal
......@@ -1272,6 +1343,39 @@ fn pragmaOperator(pp: *Preprocessor, arg_tok: TokenWithExpansionLocs, operator_l
12721343 try pp.pragma(&tmp_tokenizer, pragma_tok, operator_loc, arg_tok.expansionSlice());
12731344}
12741345
1346/// Handle Microsoft __pragma operator
1347fn msPragmaOperator(pp: *Preprocessor, pragma_tok: TokenWithExpansionLocs, args: []const TokenWithExpansionLocs) !void {
1348 if (args.len == 0) {
1349 try pp.err(pragma_tok, .unknown_pragma, .{});
1350 return;
1351 }
1352
1353 {
1354 var copy = try pragma_tok.dupe(pp.gpa);
1355 copy.id = .keyword_pragma;
1356 try pp.addToken(copy);
1357 }
1358
1359 const pragma_start: u32 = @intCast(pp.tokens.len);
1360 for (args) |tok| {
1361 switch (tok.id) {
1362 .macro_ws, .comment => continue,
1363 else => try pp.addToken(try tok.dupe(pp.gpa)),
1364 }
1365 }
1366 try pp.addToken(.{ .id = .nl, .loc = .{ .id = .generated } });
1367
1368 const name = pp.expandedSlice(pp.tokens.get(pragma_start));
1369 if (pp.comp.getPragma(name)) |prag| unknown: {
1370 return prag.preprocessorCB(pp, pragma_start) catch |er| switch (er) {
1371 error.UnknownPragma => break :unknown,
1372 else => |e| return e,
1373 };
1374 }
1375
1376 try pp.err(args[0], .unknown_pragma, .{});
1377}
1378
12751379/// Inverts the output of the preprocessor stringify (#) operation
12761380/// (except all whitespace is condensed to a single space)
12771381/// writes output to pp.char_buf; assumes capacity is sufficient
......@@ -1349,10 +1453,7 @@ fn stringify(pp: *Preprocessor, tokens: []const TokenWithExpansionLocs) !void {
13491453 const item = tokenizer.next();
13501454 if (item.id == .unterminated_string_literal) {
13511455 const tok = tokens[tokens.len - 1];
1352 try pp.comp.addDiagnostic(.{
1353 .tag = .invalid_pp_stringify_escape,
1354 .loc = tok.loc,
1355 }, tok.expansionSlice());
1456 try pp.err(tok, .invalid_pp_stringify_escape, .{});
13561457 pp.char_buf.items.len -= 2; // erase unpaired backslash and appended end quote
13571458 pp.char_buf.appendAssumeCapacity('"');
13581459 }
......@@ -1361,10 +1462,7 @@ fn stringify(pp: *Preprocessor, tokens: []const TokenWithExpansionLocs) !void {
13611462
13621463fn reconstructIncludeString(pp: *Preprocessor, param_toks: []const TokenWithExpansionLocs, embed_args: ?*[]const TokenWithExpansionLocs, first: TokenWithExpansionLocs) !?[]const u8 {
13631464 if (param_toks.len == 0) {
1364 try pp.comp.addDiagnostic(.{
1365 .tag = .expected_filename,
1366 .loc = first.loc,
1367 }, first.expansionSlice());
1465 try pp.err(first, .expected_filename, .{});
13681466 return null;
13691467 }
13701468
......@@ -1379,18 +1477,12 @@ fn reconstructIncludeString(pp: *Preprocessor, param_toks: []const TokenWithExpa
13791477 const params = param_toks[begin..end];
13801478
13811479 if (params.len == 0) {
1382 try pp.comp.addDiagnostic(.{
1383 .tag = .expected_filename,
1384 .loc = first.loc,
1385 }, first.expansionSlice());
1480 try pp.err(first, .expected_filename, .{});
13861481 return null;
13871482 }
13881483 // no string pasting
13891484 if (embed_args == null and params[0].id == .string_literal and params.len > 1) {
1390 try pp.comp.addDiagnostic(.{
1391 .tag = .closing_paren,
1392 .loc = params[1].loc,
1393 }, params[1].expansionSlice());
1485 try pp.err(params[1], .closing_paren, .{});
13941486 return null;
13951487 }
13961488
......@@ -1408,16 +1500,10 @@ fn reconstructIncludeString(pp: *Preprocessor, param_toks: []const TokenWithExpa
14081500 const include_str = pp.char_buf.items[char_top..];
14091501 if (include_str.len < 3) {
14101502 if (include_str.len == 0) {
1411 try pp.comp.addDiagnostic(.{
1412 .tag = .expected_filename,
1413 .loc = first.loc,
1414 }, first.expansionSlice());
1503 try pp.err(first, .expected_filename, .{});
14151504 return null;
14161505 }
1417 try pp.comp.addDiagnostic(.{
1418 .tag = .empty_filename,
1419 .loc = params[0].loc,
1420 }, params[0].expansionSlice());
1506 try pp.err(params[0], .empty_filename, .{});
14211507 return null;
14221508 }
14231509
......@@ -1425,25 +1511,18 @@ fn reconstructIncludeString(pp: *Preprocessor, param_toks: []const TokenWithExpa
14251511 '<' => {
14261512 if (include_str[include_str.len - 1] != '>') {
14271513 // Ugly hack to find out where the '>' should go, since we don't have the closing ')' location
1428 const start = params[0].loc;
1429 try pp.comp.addDiagnostic(.{
1430 .tag = .header_str_closing,
1431 .loc = .{ .id = start.id, .byte_offset = start.byte_offset + @as(u32, @intCast(include_str.len)) + 1, .line = start.line },
1432 }, params[0].expansionSlice());
1433 try pp.comp.addDiagnostic(.{
1434 .tag = .header_str_match,
1435 .loc = params[0].loc,
1436 }, params[0].expansionSlice());
1514 var closing = params[0];
1515 closing.loc.byte_offset += @as(u32, @intCast(include_str.len)) + 1;
1516 try pp.err(closing, .header_str_closing, .{});
1517
1518 try pp.err(params[0], .header_str_match, .{});
14371519 return null;
14381520 }
14391521 return include_str;
14401522 },
14411523 '"' => return include_str,
14421524 else => {
1443 try pp.comp.addDiagnostic(.{
1444 .tag = .expected_filename,
1445 .loc = params[0].loc,
1446 }, params[0].expansionSlice());
1525 try pp.err(params[0], .expected_filename, .{});
14471526 return null;
14481527 },
14491528 }
......@@ -1470,10 +1549,7 @@ fn handleBuiltinMacro(pp: *Preprocessor, builtin: RawToken.Id, param_toks: []con
14701549 }
14711550 if (identifier == null and invalid == null) invalid = .{ .id = .eof, .loc = src_loc };
14721551 if (invalid) |some| {
1473 try pp.comp.addDiagnostic(
1474 .{ .tag = .feature_check_requires_identifier, .loc = some.loc },
1475 some.expansionSlice(),
1476 );
1552 try pp.err(some, .feature_check_requires_identifier, .{});
14771553 return false;
14781554 }
14791555
......@@ -1487,7 +1563,11 @@ fn handleBuiltinMacro(pp: *Preprocessor, builtin: RawToken.Id, param_toks: []con
14871563 false;
14881564 },
14891565 .macro_param_has_feature => features.hasFeature(pp.comp, ident_str),
1490 .macro_param_has_extension => features.hasExtension(pp.comp, ident_str),
1566 // If -pedantic-errors is given __has_extension is equivalent to __has_feature
1567 .macro_param_has_extension => if (pp.comp.diagnostics.state.extensions == .@"error")
1568 features.hasFeature(pp.comp, ident_str)
1569 else
1570 features.hasExtension(pp.comp, ident_str),
14911571 .macro_param_has_builtin => pp.comp.hasBuiltin(ident_str),
14921572 else => unreachable,
14931573 };
......@@ -1495,13 +1575,13 @@ fn handleBuiltinMacro(pp: *Preprocessor, builtin: RawToken.Id, param_toks: []con
14951575 .macro_param_has_warning => {
14961576 const actual_param = pp.pasteStringsUnsafe(param_toks) catch |er| switch (er) {
14971577 error.ExpectedStringLiteral => {
1498 try pp.errStr(param_toks[0], .expected_str_literal_in, "__has_warning");
1578 try pp.err(param_toks[0], .expected_str_literal_in, .{"__has_warning"});
14991579 return false;
15001580 },
15011581 else => |e| return e,
15021582 };
15031583 if (!mem.startsWith(u8, actual_param, "-W")) {
1504 try pp.errStr(param_toks[0], .malformed_warning_check, "__has_warning");
1584 try pp.err(param_toks[0], .malformed_warning_check, .{"__has_warning"});
15051585 return false;
15061586 }
15071587 const warning_name = actual_param[2..];
......@@ -1519,11 +1599,7 @@ fn handleBuiltinMacro(pp: *Preprocessor, builtin: RawToken.Id, param_toks: []con
15191599 };
15201600 if (identifier == null and invalid == null) invalid = .{ .id = .eof, .loc = src_loc };
15211601 if (invalid) |some| {
1522 try pp.comp.addDiagnostic(.{
1523 .tag = .missing_tok_builtin,
1524 .loc = some.loc,
1525 .extra = .{ .tok_id_expected = .r_paren },
1526 }, some.expansionSlice());
1602 try pp.err(some, .builtin_missing_r_paren, .{"builtin feature-check macro"});
15271603 return false;
15281604 }
15291605
......@@ -1540,10 +1616,7 @@ fn handleBuiltinMacro(pp: *Preprocessor, builtin: RawToken.Id, param_toks: []con
15401616 const filename = include_str[1 .. include_str.len - 1];
15411617 if (builtin == .macro_param_has_include or pp.include_depth == 0) {
15421618 if (builtin == .macro_param_has_include_next) {
1543 try pp.comp.addDiagnostic(.{
1544 .tag = .include_next_outside_header,
1545 .loc = src_loc,
1546 }, &.{});
1619 try pp.err(src_loc, .include_next_outside_header, .{});
15471620 }
15481621 return pp.comp.hasInclude(filename, src_loc.id, include_type, .first);
15491622 }
......@@ -1675,11 +1748,11 @@ fn expandFuncMacro(
16751748 => {
16761749 const arg = expanded_args.items[0];
16771750 const result = if (arg.len == 0) blk: {
1678 const extra = Diagnostics.Message.Extra{ .arguments = .{ .expected = 1, .actual = 0 } };
1679 try pp.comp.addDiagnostic(.{ .tag = .expected_arguments, .loc = macro_tok.loc, .extra = extra }, &.{});
1751 try pp.err(macro_tok, .expected_arguments, .{ 1, 0 });
16801752 break :blk false;
16811753 } else try pp.handleBuiltinMacro(raw.id, arg, macro_tok.loc);
16821754 const start = pp.comp.generated_buf.items.len;
1755
16831756 try pp.comp.generated_buf.print(pp.gpa, "{}\n", .{@intFromBool(result)});
16841757 try buf.append(try pp.makeGeneratedToken(start, .pp_num, tokFromRaw(raw)));
16851758 },
......@@ -1687,8 +1760,7 @@ fn expandFuncMacro(
16871760 const arg = expanded_args.items[0];
16881761 const not_found = "0\n";
16891762 const result = if (arg.len == 0) blk: {
1690 const extra = Diagnostics.Message.Extra{ .arguments = .{ .expected = 1, .actual = 0 } };
1691 try pp.comp.addDiagnostic(.{ .tag = .expected_arguments, .loc = macro_tok.loc, .extra = extra }, &.{});
1763 try pp.err(macro_tok, .expected_arguments, .{ 1, 0 });
16921764 break :blk not_found;
16931765 } else res: {
16941766 var invalid: ?TokenWithExpansionLocs = null;
......@@ -1723,10 +1795,7 @@ fn expandFuncMacro(
17231795 invalid = .{ .id = .eof, .loc = macro_tok.loc };
17241796 }
17251797 if (invalid) |some| {
1726 try pp.comp.addDiagnostic(
1727 .{ .tag = .feature_check_requires_identifier, .loc = some.loc },
1728 some.expansionSlice(),
1729 );
1798 try pp.err(some, .feature_check_requires_identifier, .{});
17301799 break :res not_found;
17311800 }
17321801 if (vendor_ident) |some| {
......@@ -1763,8 +1832,7 @@ fn expandFuncMacro(
17631832 const arg = expanded_args.items[0];
17641833 const not_found = "0\n";
17651834 const result = if (arg.len == 0) blk: {
1766 const extra = Diagnostics.Message.Extra{ .arguments = .{ .expected = 1, .actual = 0 } };
1767 try pp.comp.addDiagnostic(.{ .tag = .expected_arguments, .loc = macro_tok.loc, .extra = extra }, &.{});
1835 try pp.err(macro_tok, .expected_arguments, .{ 1, 0 });
17681836 break :blk not_found;
17691837 } else res: {
17701838 var embed_args: []const TokenWithExpansionLocs = &.{};
......@@ -1793,10 +1861,7 @@ fn expandFuncMacro(
17931861 const param_first = it.next();
17941862 if (param_first.id == .eof) break;
17951863 if (param_first.id != .identifier) {
1796 try pp.comp.addDiagnostic(
1797 .{ .tag = .malformed_embed_param, .loc = param_first.loc },
1798 param_first.expansionSlice(),
1799 );
1864 try pp.err(param_first, .malformed_embed_param, .{});
18001865 continue;
18011866 }
18021867
......@@ -1809,28 +1874,19 @@ fn expandFuncMacro(
18091874 // vendor::param
18101875 const param = it.next();
18111876 if (param.id != .identifier) {
1812 try pp.comp.addDiagnostic(
1813 .{ .tag = .malformed_embed_param, .loc = param.loc },
1814 param.expansionSlice(),
1815 );
1877 try pp.err(param, .malformed_embed_param, .{});
18161878 continue;
18171879 }
18181880 const l_paren = it.next();
18191881 if (l_paren.id != .l_paren) {
1820 try pp.comp.addDiagnostic(
1821 .{ .tag = .malformed_embed_param, .loc = l_paren.loc },
1822 l_paren.expansionSlice(),
1823 );
1882 try pp.err(l_paren, .malformed_embed_param, .{});
18241883 continue;
18251884 }
18261885 break :blk "doesn't exist";
18271886 },
18281887 .l_paren => Attribute.normalize(pp.expandedSlice(param_first)),
18291888 else => {
1830 try pp.comp.addDiagnostic(
1831 .{ .tag = .malformed_embed_param, .loc = maybe_colon.loc },
1832 maybe_colon.expansionSlice(),
1833 );
1889 try pp.err(maybe_colon, .malformed_embed_param, .{});
18341890 continue;
18351891 },
18361892 };
......@@ -1840,10 +1896,7 @@ fn expandFuncMacro(
18401896 while (true) {
18411897 const next = it.next();
18421898 if (next.id == .eof) {
1843 try pp.comp.addDiagnostic(
1844 .{ .tag = .malformed_embed_limit, .loc = param_first.loc },
1845 param_first.expansionSlice(),
1846 );
1899 try pp.err(param_first, .malformed_embed_limit, .{});
18471900 break;
18481901 }
18491902 if (next.id == .r_paren) break;
......@@ -1853,17 +1906,11 @@ fn expandFuncMacro(
18531906
18541907 if (std.mem.eql(u8, param, "limit")) {
18551908 if (arg_count != 1) {
1856 try pp.comp.addDiagnostic(
1857 .{ .tag = .malformed_embed_limit, .loc = param_first.loc },
1858 param_first.expansionSlice(),
1859 );
1909 try pp.err(param_first, .malformed_embed_limit, .{});
18601910 continue;
18611911 }
18621912 if (first_arg.id != .pp_num) {
1863 try pp.comp.addDiagnostic(
1864 .{ .tag = .malformed_embed_limit, .loc = param_first.loc },
1865 param_first.expansionSlice(),
1866 );
1913 try pp.err(param_first, .malformed_embed_limit, .{});
18671914 continue;
18681915 }
18691916 _ = std.fmt.parseInt(u32, pp.expandedSlice(first_arg), 10) catch {
......@@ -1882,7 +1929,7 @@ fn expandFuncMacro(
18821929 else => unreachable,
18831930 };
18841931 const filename = include_str[1 .. include_str.len - 1];
1885 const contents = (try pp.comp.findEmbed(filename, arg[0].loc.id, include_type, 1)) orelse
1932 const contents = (try pp.comp.findEmbed(filename, arg[0].loc.id, include_type, .limited(1))) orelse
18861933 break :res not_found;
18871934
18881935 defer pp.comp.gpa.free(contents);
......@@ -1893,28 +1940,62 @@ fn expandFuncMacro(
18931940 try buf.append(try pp.makeGeneratedToken(start, .pp_num, tokFromRaw(raw)));
18941941 },
18951942 .macro_param_pragma_operator => {
1896 const param_toks = expanded_args.items[0];
18971943 // Clang and GCC require exactly one token (so, no parentheses or string pasting)
18981944 // even though their error messages indicate otherwise. Ours is slightly more
18991945 // descriptive.
19001946 var invalid: ?TokenWithExpansionLocs = null;
19011947 var string: ?TokenWithExpansionLocs = null;
1902 for (param_toks) |tok| switch (tok.id) {
1903 .string_literal => {
1904 if (string) |_| invalid = tok else string = tok;
1905 },
1906 .macro_ws => continue,
1907 .comment => continue,
1908 else => {
1909 invalid = tok;
1910 break;
1911 },
1912 };
1913 if (string == null and invalid == null) invalid = .{ .loc = macro_tok.loc, .id = .eof };
1914 if (invalid) |some| try pp.comp.addDiagnostic(
1915 .{ .tag = .pragma_operator_string_literal, .loc = some.loc },
1916 some.expansionSlice(),
1917 ) else try pp.pragmaOperator(string.?, macro_tok.loc);
1948 for (expanded_args.items[0]) |tok| {
1949 switch (tok.id) {
1950 .string_literal => {
1951 if (string) |_| {
1952 invalid = tok;
1953 break;
1954 }
1955 string = tok;
1956 },
1957 .macro_ws => continue,
1958 .comment => continue,
1959 else => {
1960 invalid = tok;
1961 break;
1962 },
1963 }
1964 }
1965 if (string == null and invalid == null) invalid = macro_tok;
1966 if (invalid) |some|
1967 try pp.err(some, .pragma_operator_string_literal, .{})
1968 else
1969 try pp.pragmaOperator(string.?, macro_tok.loc);
1970 },
1971 .macro_param_ms_identifier => blk: {
1972 // Expect '__identifier' '(' macro-identifier ')'
1973 var ident: ?TokenWithExpansionLocs = null;
1974 for (expanded_args.items[0]) |tok| {
1975 switch (tok.id) {
1976 .macro_ws => continue,
1977 .comment => continue,
1978 else => {},
1979 }
1980 if (ident) |_| {
1981 try pp.err(tok, .builtin_missing_r_paren, .{"identifier"});
1982 break :blk;
1983 } else if (tok.id.isMacroIdentifier()) {
1984 ident = tok;
1985 } else {
1986 try pp.err(tok, .cannot_convert_to_identifier, .{tok.id.symbol()});
1987 break :blk;
1988 }
1989 }
1990 if (ident) |*some| {
1991 some.id = .identifier;
1992 try buf.append(some.*);
1993 } else {
1994 try pp.err(macro_tok, .expected_identifier, .{});
1995 }
1996 },
1997 .macro_param_ms_pragma => {
1998 try pp.msPragmaOperator(macro_tok, expanded_args.items[0]);
19181999 },
19192000 .comma => {
19202001 if (tok_i + 2 < func_macro.tokens.len and func_macro.tokens[tok_i + 1].id == .hash_hash) {
......@@ -1930,12 +2011,12 @@ fn expandFuncMacro(
19302011 tok_i += consumed;
19312012 if (func_macro.params.len == expanded_args.items.len) {
19322013 // Empty __VA_ARGS__, drop the comma
1933 try pp.err(hash_hash, .comma_deletion_va_args);
2014 try pp.err(hash_hash, .comma_deletion_va_args, .{});
19342015 } else if (func_macro.params.len == 0 and expanded_args.items.len == 1 and expanded_args.items[0].len == 0) {
19352016 // Ambiguous whether this is "empty __VA_ARGS__" or "__VA_ARGS__ omitted"
19362017 if (pp.comp.langopts.standard.isGNU()) {
19372018 // GNU standard, drop the comma
1938 try pp.err(hash_hash, .comma_deletion_va_args);
2019 try pp.err(hash_hash, .comma_deletion_va_args, .{});
19392020 } else {
19402021 // C standard, retain the comma
19412022 try buf.append(tokFromRaw(raw));
......@@ -1943,7 +2024,7 @@ fn expandFuncMacro(
19432024 } else {
19442025 try buf.append(tokFromRaw(raw));
19452026 if (expanded_variable_arguments.items.len > 0 or variable_arguments.items.len == func_macro.params.len) {
1946 try pp.err(hash_hash, .comma_deletion_va_args);
2027 try pp.err(hash_hash, .comma_deletion_va_args, .{});
19472028 }
19482029 const raw_loc = Source.Location{
19492030 .id = maybe_va_args.source,
......@@ -2021,7 +2102,7 @@ fn nextBufToken(
20212102 const raw_tok = tokenizer.next();
20222103 if (raw_tok.id.isMacroIdentifier() and
20232104 pp.poisoned_identifiers.get(pp.tokSlice(raw_tok)) != null)
2024 try pp.err(raw_tok, .poisoned_identifier);
2105 try pp.err(raw_tok, .poisoned_identifier, .{});
20252106
20262107 if (raw_tok.id == .nl) pp.add_expansion_nl += 1;
20272108
......@@ -2058,7 +2139,7 @@ fn collectMacroFuncArguments(
20582139 .l_paren => break,
20592140 else => {
20602141 if (is_builtin) {
2061 try pp.errStr(name_tok, .missing_lparen_after_builtin, pp.expandedSlice(name_tok));
2142 try pp.err(name_tok, .missing_lparen_after_builtin, .{pp.expandedSlice(name_tok)});
20622143 }
20632144 // Not a macro function call, go over normal identifier, rewind
20642145 tokenizer.* = saved_tokenizer;
......@@ -2116,10 +2197,7 @@ fn collectMacroFuncArguments(
21162197 try args.append(owned);
21172198 }
21182199 tokenizer.* = saved_tokenizer;
2119 try pp.comp.addDiagnostic(
2120 .{ .tag = .unterminated_macro_arg_list, .loc = name_tok.loc },
2121 name_tok.expansionSlice(),
2122 );
2200 try pp.err(name_tok, .unterminated_macro_arg_list, .{});
21232201 return error.Unterminated;
21242202 },
21252203 .nl, .whitespace => {
......@@ -2274,25 +2352,16 @@ fn expandMacroExhaustive(
22742352 }
22752353
22762354 // Validate argument count.
2277 const extra = Diagnostics.Message.Extra{
2278 .arguments = .{ .expected = @intCast(macro.params.len), .actual = args_count },
2279 };
22802355 if (macro.var_args and args_count < macro.params.len) {
22812356 free_arg_expansion_locs = true;
2282 try pp.comp.addDiagnostic(
2283 .{ .tag = .expected_at_least_arguments, .loc = buf.items[idx].loc, .extra = extra },
2284 buf.items[idx].expansionSlice(),
2285 );
2357 try pp.err(buf.items[idx], .expected_at_least_arguments, .{ macro.params.len, args_count });
22862358 idx += 1;
22872359 try pp.removeExpandedTokens(buf, idx, macro_scan_idx - idx + 1, &moving_end_idx);
22882360 continue;
22892361 }
22902362 if (!macro.var_args and args_count != macro.params.len) {
22912363 free_arg_expansion_locs = true;
2292 try pp.comp.addDiagnostic(
2293 .{ .tag = .expected_arguments, .loc = buf.items[idx].loc, .extra = extra },
2294 buf.items[idx].expansionSlice(),
2295 );
2364 try pp.err(buf.items[idx], .expected_arguments, .{ macro.params.len, args_count });
22962365 idx += 1;
22972366 try pp.removeExpandedTokens(buf, idx, macro_scan_idx - idx + 1, &moving_end_idx);
22982367 continue;
......@@ -2341,10 +2410,11 @@ fn expandMacroExhaustive(
23412410 try pp.hideset.put(tok.loc, new_hidelist);
23422411
23432412 if (tok.id == .keyword_defined and eval_ctx == .expr) {
2344 try pp.comp.addDiagnostic(.{
2345 .tag = .expansion_to_defined,
2346 .loc = tok.loc,
2347 }, tok.expansionSlice());
2413 if (macro.is_func) {
2414 try pp.err(tok, .expansion_to_defined_func, .{});
2415 } else {
2416 try pp.err(tok, .expansion_to_defined_obj, .{});
2417 }
23482418 }
23492419
23502420 if (i < increment_idx_by and (tok.id == .keyword_defined or pp.defines.contains(pp.expandedSlice(tok.*)))) {
......@@ -2373,6 +2443,54 @@ fn expandMacroExhaustive(
23732443 buf.items.len = moving_end_idx;
23742444}
23752445
2446fn unescapeUcn(pp: *Preprocessor, tok: TokenWithExpansionLocs) !TokenWithExpansionLocs {
2447 switch (tok.id) {
2448 .incomplete_ucn => {
2449 @branchHint(.cold);
2450 try pp.err(tok, .incomplete_ucn, .{});
2451 },
2452 .extended_identifier => {
2453 @branchHint(.cold);
2454 const identifier = pp.expandedSlice(tok);
2455 if (mem.indexOfScalar(u8, identifier, '\\') != null) {
2456 @branchHint(.cold);
2457 const start = pp.comp.generated_buf.items.len;
2458 try pp.comp.generated_buf.ensureUnusedCapacity(pp.gpa, identifier.len + 1);
2459 var identifier_parser: text_literal.Parser = .{
2460 .comp = pp.comp,
2461 .literal = pp.expandedSlice(tok), // re-expand since previous line may have caused a reallocation, invalidating `identifier`
2462 .kind = .utf_8,
2463 .max_codepoint = 0x10ffff,
2464 .loc = tok.loc,
2465 .expansion_locs = tok.expansionSlice(),
2466 .diagnose_incorrect_encoding = false,
2467 };
2468 while (try identifier_parser.next()) |decoded| {
2469 switch (decoded) {
2470 .value => unreachable, // validated by tokenizer
2471 .codepoint => |c| {
2472 var buf: [4]u8 = undefined;
2473 const written = std.unicode.utf8Encode(c, &buf) catch unreachable;
2474 pp.comp.generated_buf.appendSliceAssumeCapacity(buf[0..written]);
2475 },
2476 .improperly_encoded => |bytes| {
2477 pp.comp.generated_buf.appendSliceAssumeCapacity(bytes);
2478 },
2479 .utf8_text => |view| {
2480 pp.comp.generated_buf.appendSliceAssumeCapacity(view.bytes);
2481 },
2482 }
2483 }
2484 pp.comp.generated_buf.appendAssumeCapacity('\n');
2485 defer TokenWithExpansionLocs.free(tok.expansion_locs, pp.gpa);
2486 return pp.makeGeneratedToken(start, .extended_identifier, tok);
2487 }
2488 },
2489 else => {},
2490 }
2491 return tok;
2492}
2493
23762494/// Try to expand a macro after a possible candidate has been read from the `tokenizer`
23772495/// into the `raw` token passed as argument
23782496fn expandMacro(pp: *Preprocessor, tokenizer: *Tokenizer, raw: RawToken) MacroError!void {
......@@ -2402,7 +2520,7 @@ fn expandMacro(pp: *Preprocessor, tokenizer: *Tokenizer, raw: RawToken) MacroErr
24022520 continue;
24032521 }
24042522 tok.id.simplifyMacroKeywordExtra(true);
2405 pp.addTokenAssumeCapacity(tok.*);
2523 pp.addTokenAssumeCapacity(try pp.unescapeUcn(tok.*));
24062524 }
24072525 if (pp.preserve_whitespace) {
24082526 try pp.ensureUnusedTokenCapacity(pp.add_expansion_nl);
......@@ -2488,11 +2606,7 @@ fn pasteTokens(pp: *Preprocessor, lhs_toks: *ExpandBuf, rhs_toks: []const TokenW
24882606 try lhs_toks.append(try pp.makeGeneratedToken(start, pasted_id, lhs));
24892607
24902608 if (next.id != .nl and next.id != .eof) {
2491 try pp.errStr(
2492 lhs,
2493 .pasting_formed_invalid,
2494 try pp.comp.diagnostics.arena.allocator().dupe(u8, pp.comp.generated_buf.items[start..end]),
2495 );
2609 try pp.err(lhs, .pasting_formed_invalid, .{pp.comp.generated_buf.items[start..end]});
24962610 try lhs_toks.append(tokFromRaw(next));
24972611 }
24982612
......@@ -2512,26 +2626,25 @@ fn makeGeneratedToken(pp: *Preprocessor, start: usize, id: Token.Id, source: Tok
25122626}
25132627
25142628/// Defines a new macro and warns if it is a duplicate
2515fn defineMacro(pp: *Preprocessor, define_tok: RawToken, name_tok: RawToken, macro: Macro) Error!void {
2516 const name_str = pp.tokSlice(name_tok);
2629fn defineMacro(pp: *Preprocessor, define_tok: RawToken, name_tok: TokenWithExpansionLocs, macro: Macro) Error!void {
2630 const name_str = pp.expandedSlice(name_tok);
25172631 const gop = try pp.defines.getOrPut(pp.gpa, name_str);
25182632 if (gop.found_existing and !gop.value_ptr.eql(macro, pp)) {
2519 const tag: Diagnostics.Tag = if (gop.value_ptr.is_builtin) .builtin_macro_redefined else .macro_redefined;
2520 const start = pp.comp.diagnostics.list.items.len;
2521 try pp.comp.addDiagnostic(.{
2522 .tag = tag,
2523 .loc = .{ .id = name_tok.source, .byte_offset = name_tok.start, .line = name_tok.line },
2524 .extra = .{ .str = name_str },
2525 }, &.{});
2526 if (!gop.value_ptr.is_builtin and pp.comp.diagnostics.list.items.len != start) {
2527 try pp.comp.addDiagnostic(.{
2528 .tag = .previous_definition,
2529 .loc = gop.value_ptr.loc,
2530 }, &.{});
2633 const loc = name_tok.loc;
2634 const prev_total = pp.diagnostics.total;
2635 if (gop.value_ptr.is_builtin) {
2636 try pp.err(loc, .builtin_macro_redefined, .{});
2637 } else {
2638 try pp.err(loc, .macro_redefined, .{name_str});
2639 }
2640
2641 if (!gop.value_ptr.is_builtin and pp.diagnostics.total != prev_total) {
2642 try pp.err(gop.value_ptr.loc, .previous_definition, .{});
25312643 }
25322644 }
25332645 if (pp.verbose) {
2534 pp.verboseLog(name_tok, "macro {s} defined", .{name_str});
2646 const raw: RawToken = .{ .id = name_tok.id, .source = name_tok.loc.id, .start = name_tok.loc.byte_offset, .line = name_tok.loc.line };
2647 pp.verboseLog(raw, "macro {s} defined", .{name_str});
25352648 }
25362649 if (pp.store_macro_tokens) {
25372650 try pp.addToken(tokFromRaw(define_tok));
......@@ -2542,21 +2655,27 @@ fn defineMacro(pp: *Preprocessor, define_tok: RawToken, name_tok: RawToken, macr
25422655/// Handle a #define directive.
25432656fn define(pp: *Preprocessor, tokenizer: *Tokenizer, define_tok: RawToken) Error!void {
25442657 // Get macro name and validate it.
2545 const macro_name = tokenizer.nextNoWS();
2546 if (macro_name.id == .keyword_defined) {
2547 try pp.err(macro_name, .defined_as_macro_name);
2658 const escaped_macro_name = tokenizer.nextNoWS();
2659 if (escaped_macro_name.id == .keyword_defined) {
2660 try pp.err(escaped_macro_name, .defined_as_macro_name, .{});
25482661 return skipToNl(tokenizer);
25492662 }
2550 if (!macro_name.id.isMacroIdentifier()) {
2551 try pp.err(macro_name, .macro_name_must_be_identifier);
2663 if (!escaped_macro_name.id.isMacroIdentifier()) {
2664 try pp.err(escaped_macro_name, .macro_name_must_be_identifier, .{});
25522665 return skipToNl(tokenizer);
25532666 }
2667 const macro_name = try pp.unescapeUcn(tokFromRaw(escaped_macro_name));
2668 defer TokenWithExpansionLocs.free(macro_name.expansion_locs, pp.gpa);
2669
25542670 var macro_name_token_id = macro_name.id;
25552671 macro_name_token_id.simplifyMacroKeyword();
25562672 switch (macro_name_token_id) {
25572673 .identifier, .extended_identifier => {},
2558 else => if (macro_name_token_id.isMacroIdentifier()) {
2559 try pp.err(macro_name, .keyword_macro);
2674 // TODO allow #define <keyword> <keyword> and #define extern|inline|static|const
2675 else => if (macro_name_token_id.isMacroIdentifier() and
2676 !mem.eql(u8, pp.comp.getSource(tokenizer.source).path, "<builtin>"))
2677 {
2678 try pp.err(macro_name, .keyword_macro, .{});
25602679 },
25612680 }
25622681
......@@ -2567,15 +2686,15 @@ fn define(pp: *Preprocessor, tokenizer: *Tokenizer, define_tok: RawToken) Error!
25672686 .params = &.{},
25682687 .tokens = &.{},
25692688 .var_args = false,
2570 .loc = tokFromRaw(macro_name).loc,
2689 .loc = macro_name.loc,
25712690 .is_func = false,
25722691 }),
25732692 .whitespace => first = tokenizer.next(),
25742693 .l_paren => return pp.defineFn(tokenizer, define_tok, macro_name, first),
2575 else => try pp.err(first, .whitespace_after_macro_name),
2694 else => try pp.err(first, .whitespace_after_macro_name, .{}),
25762695 }
25772696 if (first.id == .hash_hash) {
2578 try pp.err(first, .hash_hash_at_start);
2697 try pp.err(first, .hash_hash_at_start, .{});
25792698 return skipToNl(tokenizer);
25802699 }
25812700 first.id.simplifyMacroKeyword();
......@@ -2592,11 +2711,11 @@ fn define(pp: *Preprocessor, tokenizer: *Tokenizer, define_tok: RawToken) Error!
25922711 const next = tokenizer.nextNoWSComments();
25932712 switch (next.id) {
25942713 .nl, .eof => {
2595 try pp.err(tok, .hash_hash_at_end);
2714 try pp.err(tok, .hash_hash_at_end, .{});
25962715 return;
25972716 },
25982717 .hash_hash => {
2599 try pp.err(next, .hash_hash_at_end);
2718 try pp.err(next, .hash_hash_at_end, .{});
26002719 return;
26012720 },
26022721 else => {},
......@@ -2614,11 +2733,15 @@ fn define(pp: *Preprocessor, tokenizer: *Tokenizer, define_tok: RawToken) Error!
26142733 },
26152734 .whitespace => need_ws = true,
26162735 .unterminated_string_literal, .unterminated_char_literal, .empty_char_literal => |tag| {
2617 try pp.err(tok, invalidTokenDiagnostic(tag));
2736 try pp.err(tok, invalidTokenDiagnostic(tag), .{});
26182737 try pp.token_buf.append(tok);
26192738 },
2620 .unterminated_comment => try pp.err(tok, .unterminated_comment),
2739 .unterminated_comment => try pp.err(tok, .unterminated_comment, .{}),
26212740 else => {
2741 if (tok.id == .incomplete_ucn) {
2742 @branchHint(.cold);
2743 try pp.err(tok, .incomplete_ucn, .{});
2744 }
26222745 if (tok.id != .whitespace and need_ws) {
26232746 need_ws = false;
26242747 try pp.token_buf.append(.{ .id = .macro_ws, .source = .generated });
......@@ -2631,16 +2754,16 @@ fn define(pp: *Preprocessor, tokenizer: *Tokenizer, define_tok: RawToken) Error!
26312754
26322755 const list = try pp.arena.allocator().dupe(RawToken, pp.token_buf.items);
26332756 try pp.defineMacro(define_tok, macro_name, .{
2634 .loc = tokFromRaw(macro_name).loc,
2757 .loc = macro_name.loc,
26352758 .tokens = list,
2636 .params = undefined,
2759 .params = &.{},
26372760 .is_func = false,
26382761 .var_args = false,
26392762 });
26402763}
26412764
26422765/// Handle a function like #define directive.
2643fn defineFn(pp: *Preprocessor, tokenizer: *Tokenizer, define_tok: RawToken, macro_name: RawToken, l_paren: RawToken) Error!void {
2766fn defineFn(pp: *Preprocessor, tokenizer: *Tokenizer, define_tok: RawToken, macro_name: TokenWithExpansionLocs, l_paren: RawToken) Error!void {
26442767 assert(macro_name.id.isMacroIdentifier());
26452768 var params = std.array_list.Managed([]const u8).init(pp.gpa);
26462769 defer params.deinit();
......@@ -2651,19 +2774,19 @@ fn defineFn(pp: *Preprocessor, tokenizer: *Tokenizer, define_tok: RawToken, macr
26512774 while (true) {
26522775 var tok = tokenizer.nextNoWS();
26532776 if (tok.id == .r_paren) break;
2654 if (tok.id == .eof) return pp.err(tok, .unterminated_macro_param_list);
2777 if (tok.id == .eof) return pp.err(tok, .unterminated_macro_param_list, .{});
26552778 if (tok.id == .ellipsis) {
26562779 var_args = true;
26572780 const r_paren = tokenizer.nextNoWS();
26582781 if (r_paren.id != .r_paren) {
2659 try pp.err(r_paren, .missing_paren_param_list);
2660 try pp.err(l_paren, .to_match_paren);
2782 try pp.err(r_paren, .missing_paren_param_list, .{});
2783 try pp.err(l_paren, .to_match_paren, .{});
26612784 return skipToNl(tokenizer);
26622785 }
26632786 break;
26642787 }
26652788 if (!tok.id.isMacroIdentifier()) {
2666 try pp.err(tok, .invalid_token_param_list);
2789 try pp.err(tok, .invalid_token_param_list, .{});
26672790 return skipToNl(tokenizer);
26682791 }
26692792
......@@ -2671,19 +2794,19 @@ fn defineFn(pp: *Preprocessor, tokenizer: *Tokenizer, define_tok: RawToken, macr
26712794
26722795 tok = tokenizer.nextNoWS();
26732796 if (tok.id == .ellipsis) {
2674 try pp.err(tok, .gnu_va_macro);
2797 try pp.err(tok, .gnu_va_macro, .{});
26752798 gnu_var_args = params.pop().?;
26762799 const r_paren = tokenizer.nextNoWS();
26772800 if (r_paren.id != .r_paren) {
2678 try pp.err(r_paren, .missing_paren_param_list);
2679 try pp.err(l_paren, .to_match_paren);
2801 try pp.err(r_paren, .missing_paren_param_list, .{});
2802 try pp.err(l_paren, .to_match_paren, .{});
26802803 return skipToNl(tokenizer);
26812804 }
26822805 break;
26832806 } else if (tok.id == .r_paren) {
26842807 break;
26852808 } else if (tok.id != .comma) {
2686 try pp.err(tok, .expected_comma_param_list);
2809 try pp.err(tok, .expected_comma_param_list, .{});
26872810 return skipToNl(tokenizer);
26882811 }
26892812 }
......@@ -2731,7 +2854,7 @@ fn defineFn(pp: *Preprocessor, tokenizer: *Tokenizer, define_tok: RawToken, macr
27312854 }
27322855 }
27332856 }
2734 try pp.err(param, .hash_not_followed_param);
2857 try pp.err(param, .hash_not_followed_param, .{});
27352858 return skipToNl(tokenizer);
27362859 },
27372860 .hash_hash => {
......@@ -2739,13 +2862,13 @@ fn defineFn(pp: *Preprocessor, tokenizer: *Tokenizer, define_tok: RawToken, macr
27392862 // if ## appears at the beginning, the token buf is still empty
27402863 // in this case, error out
27412864 if (pp.token_buf.items.len == 0) {
2742 try pp.err(tok, .hash_hash_at_start);
2865 try pp.err(tok, .hash_hash_at_start, .{});
27432866 return skipToNl(tokenizer);
27442867 }
27452868 const saved_tokenizer = tokenizer.*;
27462869 const next = tokenizer.nextNoWSComments();
27472870 if (next.id == .nl or next.id == .eof) {
2748 try pp.err(tok, .hash_hash_at_end);
2871 try pp.err(tok, .hash_hash_at_end, .{});
27492872 return;
27502873 }
27512874 tokenizer.* = saved_tokenizer;
......@@ -2756,10 +2879,10 @@ fn defineFn(pp: *Preprocessor, tokenizer: *Tokenizer, define_tok: RawToken, macr
27562879 try pp.token_buf.append(tok);
27572880 },
27582881 .unterminated_string_literal, .unterminated_char_literal, .empty_char_literal => |tag| {
2759 try pp.err(tok, invalidTokenDiagnostic(tag));
2882 try pp.err(tok, invalidTokenDiagnostic(tag), .{});
27602883 try pp.token_buf.append(tok);
27612884 },
2762 .unterminated_comment => try pp.err(tok, .unterminated_comment),
2885 .unterminated_comment => try pp.err(tok, .unterminated_comment, .{}),
27632886 else => {
27642887 if (tok.id != .whitespace and need_ws) {
27652888 need_ws = false;
......@@ -2770,7 +2893,7 @@ fn defineFn(pp: *Preprocessor, tokenizer: *Tokenizer, define_tok: RawToken, macr
27702893 } else if (var_args and tok.id == .keyword_va_opt) {
27712894 const opt_l_paren = tokenizer.next();
27722895 if (opt_l_paren.id != .l_paren) {
2773 try pp.err(opt_l_paren, .va_opt_lparen);
2896 try pp.err(opt_l_paren, .va_opt_lparen, .{});
27742897 return skipToNl(tokenizer);
27752898 }
27762899 tok.start = opt_l_paren.end;
......@@ -2786,8 +2909,8 @@ fn defineFn(pp: *Preprocessor, tokenizer: *Tokenizer, define_tok: RawToken, macr
27862909 parens -= 1;
27872910 },
27882911 .nl, .eof => {
2789 try pp.err(opt_tok, .va_opt_rparen);
2790 try pp.err(opt_l_paren, .to_match_paren);
2912 try pp.err(opt_tok, .va_opt_rparen, .{});
2913 try pp.err(opt_l_paren, .to_match_paren, .{});
27912914 return skipToNl(tokenizer);
27922915 },
27932916 .whitespace => {},
......@@ -2822,7 +2945,7 @@ fn defineFn(pp: *Preprocessor, tokenizer: *Tokenizer, define_tok: RawToken, macr
28222945 .params = param_list,
28232946 .var_args = var_args or gnu_var_args.len != 0,
28242947 .tokens = token_list,
2825 .loc = tokFromRaw(macro_name).loc,
2948 .loc = macro_name.loc,
28262949 });
28272950}
28282951
......@@ -2840,7 +2963,7 @@ fn embed(pp: *Preprocessor, tokenizer: *Tokenizer) MacroError!void {
28402963 // Check for empty filename.
28412964 const tok_slice = pp.expandedSliceExtra(filename_tok, .single_macro_ws);
28422965 if (tok_slice.len < 3) {
2843 try pp.err(first, .empty_filename);
2966 try pp.err(first, .empty_filename, .{});
28442967 return;
28452968 }
28462969 const filename = tok_slice[1 .. tok_slice.len - 1];
......@@ -2865,7 +2988,7 @@ fn embed(pp: *Preprocessor, tokenizer: *Tokenizer) MacroError!void {
28652988 };
28662989 pp.token_buf.items.len = 0;
28672990
2868 var limit: ?u32 = null;
2991 var limit: ?std.Io.Limit = null;
28692992 var prefix: ?Range = null;
28702993 var suffix: ?Range = null;
28712994 var if_empty: ?Range = null;
......@@ -2875,7 +2998,7 @@ fn embed(pp: *Preprocessor, tokenizer: *Tokenizer) MacroError!void {
28752998 .nl, .eof => break,
28762999 .identifier => {},
28773000 else => {
2878 try pp.err(param_first, .malformed_embed_param);
3001 try pp.err(param_first, .malformed_embed_param, .{});
28793002 continue;
28803003 },
28813004 }
......@@ -2889,12 +3012,12 @@ fn embed(pp: *Preprocessor, tokenizer: *Tokenizer) MacroError!void {
28893012 // vendor::param
28903013 const param = tokenizer.nextNoWS();
28913014 if (param.id != .identifier) {
2892 try pp.err(param, .malformed_embed_param);
3015 try pp.err(param, .malformed_embed_param, .{});
28933016 continue;
28943017 }
28953018 const l_paren = tokenizer.nextNoWS();
28963019 if (l_paren.id != .l_paren) {
2897 try pp.err(l_paren, .malformed_embed_param);
3020 try pp.err(l_paren, .malformed_embed_param, .{});
28983021 continue;
28993022 }
29003023 try pp.char_buf.appendSlice(Attribute.normalize(pp.tokSlice(param_first)));
......@@ -2904,7 +3027,7 @@ fn embed(pp: *Preprocessor, tokenizer: *Tokenizer) MacroError!void {
29043027 },
29053028 .l_paren => Attribute.normalize(pp.tokSlice(param_first)),
29063029 else => {
2907 try pp.err(maybe_colon, .malformed_embed_param);
3030 try pp.err(maybe_colon, .malformed_embed_param, .{});
29083031 continue;
29093032 },
29103033 };
......@@ -2914,7 +3037,7 @@ fn embed(pp: *Preprocessor, tokenizer: *Tokenizer) MacroError!void {
29143037 const next = tokenizer.nextNoWS();
29153038 if (next.id == .r_paren) break;
29163039 if (next.id == .eof) {
2917 try pp.err(maybe_colon, .malformed_embed_param);
3040 try pp.err(maybe_colon, .malformed_embed_param, .{});
29183041 break;
29193042 }
29203043 try pp.token_buf.append(next);
......@@ -2923,52 +3046,48 @@ fn embed(pp: *Preprocessor, tokenizer: *Tokenizer) MacroError!void {
29233046
29243047 if (std.mem.eql(u8, param, "limit")) {
29253048 if (limit != null) {
2926 try pp.errStr(tokFromRaw(param_first), .duplicate_embed_param, "limit");
3049 try pp.err(tokFromRaw(param_first), .duplicate_embed_param, .{"limit"});
29273050 continue;
29283051 }
29293052 if (start + 1 != end) {
2930 try pp.err(param_first, .malformed_embed_limit);
3053 try pp.err(param_first, .malformed_embed_limit, .{});
29313054 continue;
29323055 }
29333056 const limit_tok = pp.token_buf.items[start];
29343057 if (limit_tok.id != .pp_num) {
2935 try pp.err(param_first, .malformed_embed_limit);
3058 try pp.err(param_first, .malformed_embed_limit, .{});
29363059 continue;
29373060 }
2938 limit = std.fmt.parseInt(u32, pp.tokSlice(limit_tok), 10) catch {
2939 try pp.err(limit_tok, .malformed_embed_limit);
3061 limit = .limited(std.fmt.parseInt(u32, pp.tokSlice(limit_tok), 10) catch {
3062 try pp.err(limit_tok, .malformed_embed_limit, .{});
29403063 continue;
2941 };
3064 });
29423065 pp.token_buf.items.len = start;
29433066 } else if (std.mem.eql(u8, param, "prefix")) {
29443067 if (prefix != null) {
2945 try pp.errStr(tokFromRaw(param_first), .duplicate_embed_param, "prefix");
3068 try pp.err(tokFromRaw(param_first), .duplicate_embed_param, .{"prefix"});
29463069 continue;
29473070 }
29483071 prefix = .{ .start = start, .end = end };
29493072 } else if (std.mem.eql(u8, param, "suffix")) {
29503073 if (suffix != null) {
2951 try pp.errStr(tokFromRaw(param_first), .duplicate_embed_param, "suffix");
3074 try pp.err(tokFromRaw(param_first), .duplicate_embed_param, .{"suffix"});
29523075 continue;
29533076 }
29543077 suffix = .{ .start = start, .end = end };
29553078 } else if (std.mem.eql(u8, param, "if_empty")) {
29563079 if (if_empty != null) {
2957 try pp.errStr(tokFromRaw(param_first), .duplicate_embed_param, "if_empty");
3080 try pp.err(tokFromRaw(param_first), .duplicate_embed_param, .{"if_empty"});
29583081 continue;
29593082 }
29603083 if_empty = .{ .start = start, .end = end };
29613084 } else {
2962 try pp.errStr(
2963 tokFromRaw(param_first),
2964 .unsupported_embed_param,
2965 try pp.comp.diagnostics.arena.allocator().dupe(u8, param),
2966 );
3085 try pp.err(tokFromRaw(param_first), .unsupported_embed_param, .{param});
29673086 pp.token_buf.items.len = start;
29683087 }
29693088 }
29703089
2971 const embed_bytes = (try pp.comp.findEmbed(filename, first.source, include_type, limit)) orelse
3090 const embed_bytes = (try pp.comp.findEmbed(filename, first.source, include_type, limit orelse .unlimited)) orelse
29723091 return pp.fatalNotFound(filename_tok, filename);
29733092 defer pp.comp.gpa.free(embed_bytes);
29743093
......@@ -3015,10 +3134,8 @@ fn include(pp: *Preprocessor, tokenizer: *Tokenizer, which: Compilation.WhichInc
30153134 pp.include_depth += 1;
30163135 defer pp.include_depth -= 1;
30173136 if (pp.include_depth > max_include_depth) {
3018 try pp.comp.addDiagnostic(.{
3019 .tag = .too_many_includes,
3020 .loc = .{ .id = first.source, .byte_offset = first.start, .line = first.line },
3021 }, &.{});
3137 const loc: Source.Location = .{ .id = first.source, .byte_offset = first.start, .line = first.line };
3138 try pp.err(loc, .too_many_includes, .{});
30223139 return error.StopPreprocessing;
30233140 }
30243141
......@@ -3073,7 +3190,8 @@ fn makePragmaToken(pp: *Preprocessor, raw: RawToken, operator_loc: ?Source.Locat
30733190 return tok;
30743191}
30753192
3076pub fn addToken(pp: *Preprocessor, tok: TokenWithExpansionLocs) !void {
3193pub fn addToken(pp: *Preprocessor, tok_arg: TokenWithExpansionLocs) !void {
3194 const tok = try pp.unescapeUcn(tok_arg);
30773195 if (tok.expansion_locs) |expansion_locs| {
30783196 try pp.expansion_entries.append(pp.gpa, .{ .idx = @intCast(pp.tokens.len), .locs = expansion_locs });
30793197 }
......@@ -3102,10 +3220,10 @@ fn pragma(pp: *Preprocessor, tokenizer: *Tokenizer, pragma_tok: RawToken, operat
31023220 const name_tok = tokenizer.nextNoWS();
31033221 if (name_tok.id == .nl or name_tok.id == .eof) return;
31043222
3105 const name = pp.tokSlice(name_tok);
31063223 try pp.addToken(try pp.makePragmaToken(pragma_tok, operator_loc, arg_locs));
31073224 const pragma_start: u32 = @intCast(pp.tokens.len);
31083225
3226 const name = pp.tokSlice(name_tok);
31093227 const pragma_name_tok = try pp.makePragmaToken(name_tok, operator_loc, arg_locs);
31103228 try pp.addToken(pragma_name_tok);
31113229 while (true) {
......@@ -3127,10 +3245,8 @@ fn pragma(pp: *Preprocessor, tokenizer: *Tokenizer, pragma_tok: RawToken, operat
31273245 else => |e| return e,
31283246 };
31293247 }
3130 return pp.comp.addDiagnostic(.{
3131 .tag = .unknown_pragma,
3132 .loc = pragma_name_tok.loc,
3133 }, pragma_name_tok.expansionSlice());
3248
3249 try pp.err(pragma_name_tok, .unknown_pragma, .{});
31343250}
31353251
31363252fn findIncludeFilenameToken(
......@@ -3155,11 +3271,9 @@ fn findIncludeFilenameToken(
31553271 else => {},
31563272 }
31573273 }
3158 try pp.comp.addDiagnostic(.{
3159 .tag = .header_str_closing,
3160 .loc = .{ .id = first.source, .byte_offset = tokenizer.index, .line = first.line },
3161 }, &.{});
3162 try pp.err(first, .header_str_match);
3274 const loc: Source.Location = .{ .id = first.source, .byte_offset = tokenizer.index, .line = first.line };
3275 try pp.err(loc, .header_str_closing, .{});
3276 try pp.err(first, .header_str_match, .{});
31633277 }
31643278
31653279 const source_tok = tokFromRaw(first);
......@@ -3195,17 +3309,11 @@ fn findIncludeFilenameToken(
31953309 const nl = tokenizer.nextNoWS();
31963310 if ((nl.id != .nl and nl.id != .eof) or expanded_trailing) {
31973311 skipToNl(tokenizer);
3198 try pp.comp.diagnostics.addExtra(pp.comp.langopts, .{
3199 .tag = .extra_tokens_directive_end,
3200 .loc = filename_tok.loc,
3201 }, filename_tok.expansionSlice(), false);
3312 try pp.err(filename_tok, .extra_tokens_directive_end, .{});
32023313 }
32033314 },
32043315 .ignore_trailing_tokens => if (expanded_trailing) {
3205 try pp.comp.diagnostics.addExtra(pp.comp.langopts, .{
3206 .tag = .extra_tokens_directive_end,
3207 .loc = filename_tok.loc,
3208 }, filename_tok.expansionSlice(), false);
3316 try pp.err(filename_tok, .extra_tokens_directive_end, .{});
32093317 },
32103318 }
32113319 return filename_tok;
......@@ -3218,7 +3326,7 @@ fn findIncludeSource(pp: *Preprocessor, tokenizer: *Tokenizer, first: RawToken,
32183326 // Check for empty filename.
32193327 const tok_slice = pp.expandedSliceExtra(filename_tok, .single_macro_ws);
32203328 if (tok_slice.len < 3) {
3221 try pp.err(first, .empty_filename);
3329 try pp.err(first, .empty_filename, .{});
32223330 return error.InvalidInclude;
32233331 }
32243332
......@@ -3236,31 +3344,14 @@ fn findIncludeSource(pp: *Preprocessor, tokenizer: *Tokenizer, first: RawToken,
32363344
32373345fn printLinemarker(
32383346 pp: *Preprocessor,
3239 w: *Writer,
3347 w: *std.Io.Writer,
32403348 line_no: u32,
32413349 source: Source,
32423350 start_resume: enum(u8) { start, @"resume", none },
32433351) !void {
32443352 try w.writeByte('#');
32453353 if (pp.linemarkers == .line_directives) try w.writeAll("line");
3246 try w.print(" {d} \"", .{line_no});
3247 for (source.path) |byte| switch (byte) {
3248 '\n' => try w.writeAll("\\n"),
3249 '\r' => try w.writeAll("\\r"),
3250 '\t' => try w.writeAll("\\t"),
3251 '\\' => try w.writeAll("\\\\"),
3252 '"' => try w.writeAll("\\\""),
3253 ' ', '!', '#'...'&', '('...'[', ']'...'~' => try w.writeByte(byte),
3254 // Use hex escapes for any non-ASCII/unprintable characters.
3255 // This ensures that the parsed version of this string will end up
3256 // containing the same bytes as the input regardless of encoding.
3257 else => {
3258 try w.writeAll("\\x");
3259 // TODO try w.printInt(byte, 16, .lower, .{ .width = 2, .fill = '0' });
3260 try w.print("{x:0>2}", .{byte});
3261 },
3262 };
3263 try w.writeByte('"');
3354 try w.print(" {d} \"{f}\"", .{ line_no, fmtEscapes(source.path) });
32643355 if (pp.linemarkers == .numeric_directives) {
32653356 switch (start_resume) {
32663357 .none => {},
......@@ -3296,7 +3387,7 @@ pub const DumpMode = enum {
32963387/// Pretty-print the macro define or undef at location `loc`.
32973388/// We re-tokenize the directive because we are printing a macro that may have the same name as one in
32983389/// `pp.defines` but a different definition (due to being #undef'ed and then redefined)
3299fn prettyPrintMacro(pp: *Preprocessor, w: *Writer, loc: Source.Location, parts: enum { name_only, name_and_body }) !void {
3390fn prettyPrintMacro(pp: *Preprocessor, w: *std.Io.Writer, loc: Source.Location, parts: enum { name_only, name_and_body }) !void {
33003391 const source = pp.comp.getSource(loc.id);
33013392 var tokenizer: Tokenizer = .{
33023393 .buf = source.buf,
......@@ -3334,9 +3425,8 @@ fn prettyPrintMacro(pp: *Preprocessor, w: *Writer, loc: Source.Location, parts:
33343425 }
33353426}
33363427
3337fn prettyPrintMacrosOnly(pp: *Preprocessor, w: *Writer) !void {
3338 var it = pp.defines.valueIterator();
3339 while (it.next()) |macro| {
3428fn prettyPrintMacrosOnly(pp: *Preprocessor, w: *std.Io.Writer) !void {
3429 for (pp.defines.values()) |macro| {
33403430 if (macro.is_builtin) continue;
33413431
33423432 try w.writeAll("#define ");
......@@ -3346,7 +3436,7 @@ fn prettyPrintMacrosOnly(pp: *Preprocessor, w: *Writer) !void {
33463436}
33473437
33483438/// Pretty print tokens and try to preserve whitespace.
3349pub fn prettyPrintTokens(pp: *Preprocessor, w: *Writer, macro_dump_mode: DumpMode) !void {
3439pub fn prettyPrintTokens(pp: *Preprocessor, w: *std.Io.Writer, macro_dump_mode: DumpMode) !void {
33503440 if (macro_dump_mode == .macros_only) {
33513441 return pp.prettyPrintMacrosOnly(w);
33523442 }
......@@ -3360,6 +3450,7 @@ pub fn prettyPrintTokens(pp: *Preprocessor, w: *Writer, macro_dump_mode: DumpMod
33603450 switch (cur.id) {
33613451 .eof => {
33623452 if (!last_nl) try w.writeByte('\n');
3453 try w.flush();
33633454 return;
33643455 },
33653456 .nl => {
......@@ -3369,6 +3460,7 @@ pub fn prettyPrintTokens(pp: *Preprocessor, w: *Writer, macro_dump_mode: DumpMod
33693460 newlines += 1;
33703461 } else if (id == .eof) {
33713462 if (!last_nl) try w.writeByte('\n');
3463 try w.flush();
33723464 return;
33733465 } else if (id != .whitespace) {
33743466 if (pp.linemarkers == .none) {
......@@ -3462,19 +3554,44 @@ pub fn prettyPrintTokens(pp: *Preprocessor, w: *Writer, macro_dump_mode: DumpMod
34623554 }
34633555}
34643556
3557/// Like `std.zig.fmtEscapes`, but for C strings. Hex escapes are used for any
3558/// non-ASCII/unprintable bytes to ensure that the string bytes do not change if
3559/// the encoding of the file is not UTF-8.
3560fn fmtEscapes(bytes: []const u8) FmtEscapes {
3561 return .{ .bytes = bytes };
3562}
3563const FmtEscapes = struct {
3564 bytes: []const u8,
3565 pub fn format(ctx: FmtEscapes, w: *std.Io.Writer) !void {
3566 for (ctx.bytes) |byte| switch (byte) {
3567 '\n' => try w.writeAll("\\n"),
3568 '\r' => try w.writeAll("\\r"),
3569 '\t' => try w.writeAll("\\t"),
3570 '\\' => try w.writeAll("\\\\"),
3571 '"' => try w.writeAll("\\\""),
3572 ' ', '!', '#'...'&', '('...'[', ']'...'~' => try w.writeByte(byte),
3573 // Use hex escapes for any non-ASCII/unprintable characters.
3574 // This ensures that the parsed version of this string will end up
3575 // containing the same bytes as the input regardless of encoding.
3576 else => try w.print("\\x{x:0>2}", .{byte}),
3577 };
3578 }
3579};
3580
34653581test "Preserve pragma tokens sometimes" {
3466 const allocator = std.testing.allocator;
3582 const gpa = std.testing.allocator;
34673583 const Test = struct {
34683584 fn runPreprocessor(source_text: []const u8) ![]const u8 {
3469 var buf = std.array_list.Managed(u8).init(allocator);
3470 defer buf.deinit();
3585 var arena: std.heap.ArenaAllocator = .init(gpa);
3586 defer arena.deinit();
34713587
3472 var comp = Compilation.init(allocator, std.fs.cwd());
3588 var diagnostics: Diagnostics = .{ .output = .ignore };
3589 var comp = Compilation.init(gpa, arena.allocator(), &diagnostics, std.fs.cwd());
34733590 defer comp.deinit();
34743591
34753592 try comp.addDefaultPragmaHandlers();
34763593
3477 var pp = Preprocessor.init(&comp);
3594 var pp = Preprocessor.init(&comp, .default);
34783595 defer pp.deinit();
34793596
34803597 pp.preserve_whitespace = true;
......@@ -3483,13 +3600,17 @@ test "Preserve pragma tokens sometimes" {
34833600 const test_runner_macros = try comp.addSourceFromBuffer("<test_runner>", source_text);
34843601 const eof = try pp.preprocess(test_runner_macros);
34853602 try pp.addToken(eof);
3486 try pp.prettyPrintTokens(buf.writer(), .result_only);
3487 return allocator.dupe(u8, buf.items);
3603
3604 var allocating: std.Io.Writer.Allocating = .init(gpa);
3605 defer allocating.deinit();
3606
3607 try pp.prettyPrintTokens(&allocating.writer, .result_only);
3608 return allocating.toOwnedSlice();
34883609 }
34893610
34903611 fn check(source_text: []const u8, expected: []const u8) !void {
34913612 const output = try runPreprocessor(source_text);
3492 defer allocator.free(output);
3613 defer gpa.free(output);
34933614
34943615 try std.testing.expectEqualStrings(expected, output);
34953616 }
......@@ -3520,7 +3641,7 @@ test "Preserve pragma tokens sometimes" {
35203641}
35213642
35223643test "destringify" {
3523 const allocator = std.testing.allocator;
3644 const gpa = std.testing.allocator;
35243645 const Test = struct {
35253646 fn testDestringify(pp: *Preprocessor, stringified: []const u8, destringified: []const u8) !void {
35263647 pp.char_buf.clearRetainingCapacity();
......@@ -3529,9 +3650,12 @@ test "destringify" {
35293650 try std.testing.expectEqualStrings(destringified, pp.char_buf.items);
35303651 }
35313652 };
3532 var comp = Compilation.init(allocator, std.fs.cwd());
3653 var arena: std.heap.ArenaAllocator = .init(gpa);
3654 defer arena.deinit();
3655 var diagnostics: Diagnostics = .{ .output = .ignore };
3656 var comp = Compilation.init(gpa, arena.allocator(), &diagnostics, std.fs.cwd());
35333657 defer comp.deinit();
3534 var pp = Preprocessor.init(&comp);
3658 var pp = Preprocessor.init(&comp, .default);
35353659 defer pp.deinit();
35363660
35373661 try Test.testDestringify(&pp, "hello\tworld\n", "hello\tworld\n");
......@@ -3586,30 +3710,33 @@ test "Include guards" {
35863710 };
35873711 }
35883712
3589 fn testIncludeGuard(allocator: std.mem.Allocator, comptime template: []const u8, tok_id: RawToken.Id, expected_guards: u32) !void {
3590 var comp = Compilation.init(allocator, std.fs.cwd());
3713 fn testIncludeGuard(gpa: std.mem.Allocator, comptime template: []const u8, tok_id: RawToken.Id, expected_guards: u32) !void {
3714 var arena_state: std.heap.ArenaAllocator = .init(gpa);
3715 defer arena_state.deinit();
3716 const arena = arena_state.allocator();
3717
3718 var diagnostics: Diagnostics = .{ .output = .ignore };
3719 var comp = Compilation.init(gpa, arena, &diagnostics, std.fs.cwd());
35913720 defer comp.deinit();
3592 var pp = Preprocessor.init(&comp);
3721 var pp = Preprocessor.init(&comp, .default);
35933722 defer pp.deinit();
35943723
3595 const path = try std.fs.path.join(allocator, &.{ ".", "bar.h" });
3596 defer allocator.free(path);
3724 const path = try std.fs.path.join(arena, &.{ ".", "bar.h" });
35973725
35983726 _ = try comp.addSourceFromBuffer(path, "int bar = 5;\n");
35993727
3600 var buf = std.array_list.Managed(u8).init(allocator);
3728 var buf = std.array_list.Managed(u8).init(gpa);
36013729 defer buf.deinit();
36023730
3603 var writer = buf.writer();
36043731 switch (tok_id) {
3605 .keyword_include, .keyword_include_next => try writer.print(template, .{ tok_id.lexeme().?, " \"bar.h\"" }),
3606 .keyword_define, .keyword_undef => try writer.print(template, .{ tok_id.lexeme().?, " BAR" }),
3732 .keyword_include, .keyword_include_next => try buf.print(template, .{ tok_id.lexeme().?, " \"bar.h\"" }),
3733 .keyword_define, .keyword_undef => try buf.print(template, .{ tok_id.lexeme().?, " BAR" }),
36073734 .keyword_ifndef,
36083735 .keyword_ifdef,
36093736 .keyword_elifdef,
36103737 .keyword_elifndef,
3611 => try writer.print(template, .{ tok_id.lexeme().?, " BAR\n#endif" }),
3612 else => try writer.print(template, .{ tok_id.lexeme().?, "" }),
3738 => try buf.print(template, .{ tok_id.lexeme().?, " BAR\n#endif" }),
3739 else => try buf.print(template, .{ tok_id.lexeme().?, "" }),
36133740 }
36143741 const source = try comp.addSourceFromBuffer("test.h", buf.items);
36153742 _ = try pp.preprocess(source);
lib/compiler/aro/aro/Preprocessor/Diagnostic.zig created+442
......@@ -0,0 +1,442 @@
1const std = @import("std");
2
3const Diagnostics = @import("../Diagnostics.zig");
4const LangOpts = @import("../LangOpts.zig");
5const Compilation = @import("../Compilation.zig");
6
7const Diagnostic = @This();
8
9fmt: []const u8,
10kind: Diagnostics.Message.Kind,
11opt: ?Diagnostics.Option = null,
12extension: bool = false,
13
14pub const elif_without_if: Diagnostic = .{
15 .fmt = "#elif without #if",
16 .kind = .@"error",
17};
18
19pub const elif_after_else: Diagnostic = .{
20 .fmt = "#elif after #else",
21 .kind = .@"error",
22};
23
24pub const elifdef_without_if: Diagnostic = .{
25 .fmt = "#elifdef without #if",
26 .kind = .@"error",
27};
28
29pub const elifdef_after_else: Diagnostic = .{
30 .fmt = "#elifdef after #else",
31 .kind = .@"error",
32};
33
34pub const elifndef_without_if: Diagnostic = .{
35 .fmt = "#elifndef without #if",
36 .kind = .@"error",
37};
38
39pub const elifndef_after_else: Diagnostic = .{
40 .fmt = "#elifndef after #else",
41 .kind = .@"error",
42};
43
44pub const else_without_if: Diagnostic = .{
45 .fmt = "#else without #if",
46 .kind = .@"error",
47};
48
49pub const else_after_else: Diagnostic = .{
50 .fmt = "#else after #else",
51 .kind = .@"error",
52};
53
54pub const endif_without_if: Diagnostic = .{
55 .fmt = "#endif without #if",
56 .kind = .@"error",
57};
58
59pub const unknown_pragma: Diagnostic = .{
60 .fmt = "unknown pragma ignored",
61 .opt = .@"unknown-pragmas",
62 .kind = .off,
63};
64
65pub const line_simple_digit: Diagnostic = .{
66 .fmt = "#line directive requires a simple digit sequence",
67 .kind = .@"error",
68};
69
70pub const line_invalid_filename: Diagnostic = .{
71 .fmt = "invalid filename for #line directive",
72 .kind = .@"error",
73};
74
75pub const unterminated_conditional_directive: Diagnostic = .{
76 .fmt = "unterminated conditional directive",
77 .kind = .@"error",
78};
79
80pub const invalid_preprocessing_directive: Diagnostic = .{
81 .fmt = "invalid preprocessing directive",
82 .kind = .@"error",
83};
84
85pub const error_directive: Diagnostic = .{
86 .fmt = "{s}",
87 .kind = .@"error",
88};
89
90pub const warning_directive: Diagnostic = .{
91 .fmt = "{s}",
92 .opt = .@"#warnings",
93 .kind = .warning,
94};
95
96pub const macro_name_missing: Diagnostic = .{
97 .fmt = "macro name missing",
98 .kind = .@"error",
99};
100
101pub const extra_tokens_directive_end: Diagnostic = .{
102 .fmt = "extra tokens at end of macro directive",
103 .kind = .@"error",
104};
105
106pub const expected_value_in_expr: Diagnostic = .{
107 .fmt = "expected value in expression",
108 .kind = .@"error",
109};
110
111pub const defined_as_macro_name: Diagnostic = .{
112 .fmt = "'defined' cannot be used as a macro name",
113 .kind = .@"error",
114};
115
116pub const macro_name_must_be_identifier: Diagnostic = .{
117 .fmt = "macro name must be an identifier",
118 .kind = .@"error",
119};
120
121pub const whitespace_after_macro_name: Diagnostic = .{
122 .fmt = "ISO C99 requires whitespace after the macro name",
123 .opt = .@"c99-extensions",
124 .kind = .warning,
125 .extension = true,
126};
127
128pub const hash_hash_at_start: Diagnostic = .{
129 .fmt = "'##' cannot appear at the start of a macro expansion",
130 .kind = .@"error",
131};
132
133pub const hash_hash_at_end: Diagnostic = .{
134 .fmt = "'##' cannot appear at the end of a macro expansion",
135 .kind = .@"error",
136};
137
138pub const pasting_formed_invalid: Diagnostic = .{
139 .fmt = "pasting formed '{s}', an invalid preprocessing token",
140 .kind = .@"error",
141};
142
143pub const missing_paren_param_list: Diagnostic = .{
144 .fmt = "missing ')' in macro parameter list",
145 .kind = .@"error",
146};
147
148pub const unterminated_macro_param_list: Diagnostic = .{
149 .fmt = "unterminated macro param list",
150 .kind = .@"error",
151};
152
153pub const invalid_token_param_list: Diagnostic = .{
154 .fmt = "invalid token in macro parameter list",
155 .kind = .@"error",
156};
157
158pub const expected_comma_param_list: Diagnostic = .{
159 .fmt = "expected comma in macro parameter list",
160 .kind = .@"error",
161};
162
163pub const hash_not_followed_param: Diagnostic = .{
164 .fmt = "'#' is not followed by a macro parameter",
165 .kind = .@"error",
166};
167
168pub const expected_filename: Diagnostic = .{
169 .fmt = "expected \"FILENAME\" or <FILENAME>",
170 .kind = .@"error",
171};
172
173pub const empty_filename: Diagnostic = .{
174 .fmt = "empty filename",
175 .kind = .@"error",
176};
177
178pub const header_str_closing: Diagnostic = .{
179 .fmt = "expected closing '>'",
180 .kind = .@"error",
181};
182
183pub const header_str_match: Diagnostic = .{
184 .fmt = "to match this '<'",
185 .kind = .note,
186};
187
188pub const string_literal_in_pp_expr: Diagnostic = .{
189 .fmt = "string literal in preprocessor expression",
190 .kind = .@"error",
191};
192
193pub const empty_char_literal_warning: Diagnostic = .{
194 .fmt = "empty character constant",
195 .kind = .warning,
196 .opt = .@"invalid-pp-token",
197 .extension = true,
198};
199
200pub const unterminated_char_literal_warning: Diagnostic = .{
201 .fmt = "missing terminating ' character",
202 .kind = .warning,
203 .opt = .@"invalid-pp-token",
204 .extension = true,
205};
206
207pub const unterminated_string_literal_warning: Diagnostic = .{
208 .fmt = "missing terminating '\"' character",
209 .kind = .warning,
210 .opt = .@"invalid-pp-token",
211 .extension = true,
212};
213
214pub const unterminated_comment: Diagnostic = .{
215 .fmt = "unterminated comment",
216 .kind = .@"error",
217};
218
219pub const malformed_embed_param: Diagnostic = .{
220 .fmt = "unexpected token in embed parameter",
221 .kind = .@"error",
222};
223
224pub const malformed_embed_limit: Diagnostic = .{
225 .fmt = "the limit parameter expects one non-negative integer as a parameter",
226 .kind = .@"error",
227};
228
229pub const duplicate_embed_param: Diagnostic = .{
230 .fmt = "duplicate embed parameter '{s}'",
231 .kind = .warning,
232 .opt = .@"duplicate-embed-param",
233};
234
235pub const unsupported_embed_param: Diagnostic = .{
236 .fmt = "unsupported embed parameter '{s}' embed parameter",
237 .kind = .warning,
238 .opt = .@"unsupported-embed-param",
239};
240
241pub const va_opt_lparen: Diagnostic = .{
242 .fmt = "missing '(' following __VA_OPT__",
243 .kind = .@"error",
244};
245
246pub const va_opt_rparen: Diagnostic = .{
247 .fmt = "unterminated __VA_OPT__ argument list",
248 .kind = .@"error",
249};
250
251pub const keyword_macro: Diagnostic = .{
252 .fmt = "keyword is hidden by macro definition",
253 .kind = .off,
254 .opt = .@"keyword-macro",
255 .extension = true,
256};
257
258pub const undefined_macro: Diagnostic = .{
259 .fmt = "'{s}' is not defined, evaluates to 0",
260 .kind = .off,
261 .opt = .undef,
262};
263
264pub const fn_macro_undefined: Diagnostic = .{
265 .fmt = "function-like macro '{s}' is not defined",
266 .kind = .@"error",
267};
268
269// pub const preprocessing_directive_only: Diagnostic = .{
270// .fmt = "'{s}' must be used within a preprocessing directive",
271// .extra = .tok_id_expected,
272// .kind = .@"error",
273// };
274
275pub const missing_lparen_after_builtin: Diagnostic = .{
276 .fmt = "Missing '(' after built-in macro '{s}'",
277 .kind = .@"error",
278};
279
280pub const too_many_includes: Diagnostic = .{
281 .fmt = "#include nested too deeply",
282 .kind = .@"error",
283};
284
285pub const include_next: Diagnostic = .{
286 .fmt = "#include_next is a language extension",
287 .kind = .off,
288 .opt = .@"gnu-include-next",
289 .extension = true,
290};
291
292pub const include_next_outside_header: Diagnostic = .{
293 .fmt = "#include_next in primary source file; will search from start of include path",
294 .kind = .warning,
295 .opt = .@"include-next-outside-header",
296};
297
298pub const comma_deletion_va_args: Diagnostic = .{
299 .fmt = "token pasting of ',' and __VA_ARGS__ is a GNU extension",
300 .kind = .off,
301 .opt = .@"gnu-zero-variadic-macro-arguments",
302 .extension = true,
303};
304
305pub const expansion_to_defined_obj: Diagnostic = .{
306 .fmt = "macro expansion producing 'defined' has undefined behavior",
307 .kind = .off,
308 .opt = .@"expansion-to-defined",
309};
310
311pub const expansion_to_defined_func: Diagnostic = .{
312 .fmt = expansion_to_defined_obj.fmt,
313 .kind = .off,
314 .opt = .@"expansion-to-defined",
315 .extension = true,
316};
317
318pub const invalid_pp_stringify_escape: Diagnostic = .{
319 .fmt = "invalid string literal, ignoring final '\\'",
320 .kind = .warning,
321};
322
323pub const gnu_va_macro: Diagnostic = .{
324 .fmt = "named variadic macros are a GNU extension",
325 .opt = .@"variadic-macros",
326 .kind = .off,
327 .extension = true,
328};
329
330pub const pragma_operator_string_literal: Diagnostic = .{
331 .fmt = "_Pragma requires exactly one string literal token",
332 .kind = .@"error",
333};
334
335pub const invalid_preproc_expr_start: Diagnostic = .{
336 .fmt = "invalid token at start of a preprocessor expression",
337 .kind = .@"error",
338};
339
340pub const newline_eof: Diagnostic = .{
341 .fmt = "no newline at end of file",
342 .opt = .@"newline-eof",
343 .kind = .off,
344 .extension = true,
345};
346
347pub const malformed_warning_check: Diagnostic = .{
348 .fmt = "{s} expected option name (e.g. \"-Wundef\")",
349 .opt = .@"malformed-warning-check",
350 .kind = .warning,
351 .extension = true,
352};
353
354pub const feature_check_requires_identifier: Diagnostic = .{
355 .fmt = "builtin feature check macro requires a parenthesized identifier",
356 .kind = .@"error",
357};
358
359pub const builtin_macro_redefined: Diagnostic = .{
360 .fmt = "redefining builtin macro",
361 .opt = .@"builtin-macro-redefined",
362 .kind = .warning,
363 .extension = true,
364};
365
366pub const macro_redefined: Diagnostic = .{
367 .fmt = "'{s}' macro redefined",
368 .opt = .@"macro-redefined",
369 .kind = .warning,
370 .extension = true,
371};
372
373pub const previous_definition: Diagnostic = .{
374 .fmt = "previous definition is here",
375 .kind = .note,
376};
377
378pub const unterminated_macro_arg_list: Diagnostic = .{
379 .fmt = "unterminated function macro argument list",
380 .kind = .@"error",
381};
382
383pub const to_match_paren: Diagnostic = .{
384 .fmt = "to match this '('",
385 .kind = .note,
386};
387
388pub const closing_paren: Diagnostic = .{
389 .fmt = "expected closing ')'",
390 .kind = .@"error",
391};
392
393pub const poisoned_identifier: Diagnostic = .{
394 .fmt = "attempt to use a poisoned identifier",
395 .kind = .@"error",
396};
397
398pub const expected_arguments: Diagnostic = .{
399 .fmt = "expected {d} argument(s) got {d}",
400 .kind = .@"error",
401};
402
403pub const expected_at_least_arguments: Diagnostic = .{
404 .fmt = "expected at least {d} argument(s) got {d}",
405 .kind = .warning,
406};
407
408pub const invalid_preproc_operator: Diagnostic = .{
409 .fmt = "token is not a valid binary operator in a preprocessor subexpression",
410 .kind = .@"error",
411};
412
413pub const expected_str_literal_in: Diagnostic = .{
414 .fmt = "expected string literal in '{s}'",
415 .kind = .@"error",
416};
417
418pub const builtin_missing_r_paren: Diagnostic = .{
419 .fmt = "missing ')', after {s}",
420 .kind = .@"error",
421};
422
423pub const cannot_convert_to_identifier: Diagnostic = .{
424 .fmt = "cannot convert {s} to an identifier",
425 .kind = .@"error",
426};
427
428pub const expected_identifier: Diagnostic = .{
429 .fmt = "expected identifier argument",
430 .kind = .@"error",
431};
432
433pub const incomplete_ucn: Diagnostic = .{
434 .fmt = "incomplete universal character name; treating as '\\' followed by identifier",
435 .kind = .warning,
436 .opt = .unicode,
437};
438
439pub const invalid_source_epoch: Diagnostic = .{
440 .fmt = "environment variable SOURCE_DATE_EPOCH must expand to a non-negative integer less than or equal to 253402300799",
441 .kind = .@"error",
442};
lib/compiler/aro/aro/Source.zig+16-3
......@@ -24,6 +24,20 @@ pub const Location = struct {
2424 pub fn eql(a: Location, b: Location) bool {
2525 return a.id == b.id and a.byte_offset == b.byte_offset and a.line == b.line;
2626 }
27
28 pub fn expand(loc: Location, comp: *const @import("Compilation.zig")) ExpandedLocation {
29 const source = comp.getSource(loc.id);
30 return source.lineCol(loc);
31 }
32};
33
34pub const ExpandedLocation = struct {
35 path: []const u8,
36 line: []const u8,
37 line_no: u32,
38 col: u32,
39 width: u32,
40 end_with_splice: bool,
2741};
2842
2943const Source = @This();
......@@ -51,9 +65,7 @@ pub fn physicalLine(source: Source, loc: Location) u32 {
5165 return loc.line + source.numSplicesBefore(loc.byte_offset);
5266}
5367
54const LineCol = struct { line: []const u8, line_no: u32, col: u32, width: u32, end_with_splice: bool };
55
56pub fn lineCol(source: Source, loc: Location) LineCol {
68pub fn lineCol(source: Source, loc: Location) ExpandedLocation {
5769 var start: usize = 0;
5870 // find the start of the line which is either a newline or a splice
5971 if (std.mem.lastIndexOfScalar(u8, source.buf[0..loc.byte_offset], '\n')) |some| start = some + 1;
......@@ -102,6 +114,7 @@ pub fn lineCol(source: Source, loc: Location) LineCol {
102114 nl = source.splice_locs[splice_index];
103115 }
104116 return .{
117 .path = source.path,
105118 .line = source.buf[start..nl],
106119 .line_no = loc.line + splice_index,
107120 .col = col,
lib/compiler/aro/aro/StringInterner.zig+16-64
......@@ -2,82 +2,34 @@ const std = @import("std");
22const mem = std.mem;
33const Compilation = @import("Compilation.zig");
44
5const StringToIdMap = std.StringHashMapUnmanaged(StringId);
5const StringInterner = @This();
66
77pub const StringId = enum(u32) {
8 empty,
8 empty = std.math.maxInt(u32),
99 _,
10};
11
12pub const TypeMapper = struct {
13 const LookupSpeed = enum {
14 fast,
15 slow,
16 };
17
18 data: union(LookupSpeed) {
19 fast: []const []const u8,
20 slow: *const StringToIdMap,
21 },
2210
23 pub fn lookup(self: TypeMapper, string_id: StringInterner.StringId) []const u8 {
24 if (string_id == .empty) return "";
25 switch (self.data) {
26 .fast => |arr| return arr[@intFromEnum(string_id)],
27 .slow => |map| {
28 var it = map.iterator();
29 while (it.next()) |entry| {
30 if (entry.value_ptr.* == string_id) return entry.key_ptr.*;
31 }
32 unreachable;
33 },
34 }
11 pub fn lookup(id: StringId, comp: *const Compilation) []const u8 {
12 if (id == .empty) return "";
13 return comp.string_interner.table.keys()[@intFromEnum(id)];
3514 }
3615
37 pub fn deinit(self: TypeMapper, allocator: mem.Allocator) void {
38 switch (self.data) {
39 .slow => {},
40 .fast => |arr| allocator.free(arr),
41 }
16 pub fn lookupExtra(id: StringId, si: StringInterner) []const u8 {
17 if (id == .empty) return "";
18 return si.table.keys()[@intFromEnum(id)];
4219 }
4320};
4421
45const StringInterner = @This();
46
47string_table: StringToIdMap = .{},
48next_id: StringId = @enumFromInt(@intFromEnum(StringId.empty) + 1),
49
50pub fn deinit(self: *StringInterner, allocator: mem.Allocator) void {
51 self.string_table.deinit(allocator);
52}
22table: std.StringArrayHashMapUnmanaged(void) = .empty,
5323
54pub fn intern(comp: *Compilation, str: []const u8) !StringId {
55 return comp.string_interner.internExtra(comp.gpa, str);
24pub fn deinit(si: *StringInterner, allocator: mem.Allocator) void {
25 si.table.deinit(allocator);
26 si.* = undefined;
5627}
5728
58pub fn internExtra(self: *StringInterner, allocator: mem.Allocator, str: []const u8) !StringId {
29/// Intern externally owned string.
30pub fn intern(si: *StringInterner, allocator: mem.Allocator, str: []const u8) !StringId {
5931 if (str.len == 0) return .empty;
6032
61 const gop = try self.string_table.getOrPut(allocator, str);
62 if (gop.found_existing) return gop.value_ptr.*;
63
64 defer self.next_id = @enumFromInt(@intFromEnum(self.next_id) + 1);
65 gop.value_ptr.* = self.next_id;
66 return self.next_id;
67}
68
69/// deinit for the returned TypeMapper is a no-op and does not need to be called
70pub fn getSlowTypeMapper(self: *const StringInterner) TypeMapper {
71 return TypeMapper{ .data = .{ .slow = &self.string_table } };
72}
73
74/// Caller must call `deinit` on the returned TypeMapper
75pub fn getFastTypeMapper(self: *const StringInterner, allocator: mem.Allocator) !TypeMapper {
76 var strings = try allocator.alloc([]const u8, @intFromEnum(self.next_id));
77 var it = self.string_table.iterator();
78 strings[0] = "";
79 while (it.next()) |entry| {
80 strings[@intFromEnum(entry.value_ptr.*)] = entry.key_ptr.*;
81 }
82 return TypeMapper{ .data = .{ .fast = strings } };
33 const gop = try si.table.getOrPut(allocator, str);
34 return @enumFromInt(gop.index);
8335}
lib/compiler/aro/aro/SymbolStack.zig+119-83
......@@ -2,22 +2,24 @@ const std = @import("std");
22const mem = std.mem;
33const Allocator = mem.Allocator;
44const assert = std.debug.assert;
5
6const Parser = @import("Parser.zig");
7const StringId = @import("StringInterner.zig").StringId;
58const Tree = @import("Tree.zig");
69const Token = Tree.Token;
710const TokenIndex = Tree.TokenIndex;
8const NodeIndex = Tree.NodeIndex;
9const Type = @import("Type.zig");
10const Parser = @import("Parser.zig");
11const Node = Tree.Node;
12const QualType = @import("TypeStore.zig").QualType;
1113const Value = @import("Value.zig");
12const StringId = @import("StringInterner.zig").StringId;
1314
1415const SymbolStack = @This();
1516
1617pub const Symbol = struct {
1718 name: StringId,
18 ty: Type,
19 qt: QualType,
1920 tok: TokenIndex,
20 node: NodeIndex = .none,
21 node: Node.OptIndex = .null,
22 out_of_scope: bool = false,
2123 kind: Kind,
2224 val: Value,
2325};
......@@ -33,14 +35,14 @@ pub const Kind = enum {
3335 constexpr,
3436};
3537
36scopes: std.ArrayListUnmanaged(Scope) = .empty,
38scopes: std.ArrayListUnmanaged(Scope) = .{},
3739/// allocations from nested scopes are retained after popping; `active_len` is the number
3840/// of currently-active items in `scopes`.
3941active_len: usize = 0,
4042
4143const Scope = struct {
42 vars: std.AutoHashMapUnmanaged(StringId, Symbol) = .empty,
43 tags: std.AutoHashMapUnmanaged(StringId, Symbol) = .empty,
44 vars: std.AutoHashMapUnmanaged(StringId, Symbol) = .{},
45 tags: std.AutoHashMapUnmanaged(StringId, Symbol) = .{},
4446
4547 fn deinit(self: *Scope, allocator: Allocator) void {
4648 self.vars.deinit(allocator);
......@@ -82,17 +84,17 @@ pub fn findTypedef(s: *SymbolStack, p: *Parser, name: StringId, name_tok: TokenI
8284 .typedef => return prev,
8385 .@"struct" => {
8486 if (no_type_yet) return null;
85 try p.errStr(.must_use_struct, name_tok, p.tokSlice(name_tok));
87 try p.err(name_tok, .must_use_struct, .{p.tokSlice(name_tok)});
8688 return prev;
8789 },
8890 .@"union" => {
8991 if (no_type_yet) return null;
90 try p.errStr(.must_use_union, name_tok, p.tokSlice(name_tok));
92 try p.err(name_tok, .must_use_union, .{p.tokSlice(name_tok)});
9193 return prev;
9294 },
9395 .@"enum" => {
9496 if (no_type_yet) return null;
95 try p.errStr(.must_use_enum, name_tok, p.tokSlice(name_tok));
97 try p.err(name_tok, .must_use_enum, .{p.tokSlice(name_tok)});
9698 return prev;
9799 },
98100 else => return null,
......@@ -120,8 +122,8 @@ pub fn findTag(
120122 else => unreachable,
121123 }
122124 if (s.get(name, .tags) == null) return null;
123 try p.errStr(.wrong_tag, name_tok, p.tokSlice(name_tok));
124 try p.errTok(.previous_definition, prev.tok);
125 try p.err(name_tok, .wrong_tag, .{p.tokSlice(name_tok)});
126 try p.err(prev.tok, .previous_definition, .{});
125127 return null;
126128}
127129
......@@ -171,23 +173,24 @@ pub fn defineTypedef(
171173 s: *SymbolStack,
172174 p: *Parser,
173175 name: StringId,
174 ty: Type,
176 qt: QualType,
175177 tok: TokenIndex,
176 node: NodeIndex,
178 node: Node.Index,
177179) !void {
178180 if (s.get(name, .vars)) |prev| {
179181 switch (prev.kind) {
180182 .typedef => {
181 if (!prev.ty.is(.invalid)) {
182 if (!ty.eql(prev.ty, p.comp, true)) {
183 try p.errStr(.redefinition_of_typedef, tok, try p.typePairStrExtra(ty, " vs ", prev.ty));
184 if (prev.tok != 0) try p.errTok(.previous_definition, prev.tok);
185 }
183 if (!prev.qt.isInvalid() and !qt.eqlQualified(prev.qt, p.comp)) {
184 if (qt.isInvalid()) return;
185 const non_typedef_qt = qt.type(p.comp).typedef.base;
186 const non_typedef_prev_qt = prev.qt.type(p.comp).typedef.base;
187 try p.err(tok, .redefinition_of_typedef, .{ non_typedef_qt, non_typedef_prev_qt });
188 if (prev.tok != 0) try p.err(prev.tok, .previous_definition, .{});
186189 }
187190 },
188191 .enumeration, .decl, .def, .constexpr => {
189 try p.errStr(.redefinition_different_sym, tok, p.tokSlice(tok));
190 try p.errTok(.previous_definition, prev.tok);
192 try p.err(tok, .redefinition_different_sym, .{p.tokSlice(tok)});
193 try p.err(prev.tok, .previous_definition, .{});
191194 },
192195 else => unreachable,
193196 }
......@@ -196,13 +199,8 @@ pub fn defineTypedef(
196199 .kind = .typedef,
197200 .name = name,
198201 .tok = tok,
199 .ty = .{
200 .name = name,
201 .specifier = ty.specifier,
202 .qual = ty.qual,
203 .data = ty.data,
204 },
205 .node = node,
202 .qt = qt,
203 .node = .pack(node),
206204 .val = .{},
207205 });
208206}
......@@ -211,31 +209,37 @@ pub fn defineSymbol(
211209 s: *SymbolStack,
212210 p: *Parser,
213211 name: StringId,
214 ty: Type,
212 qt: QualType,
215213 tok: TokenIndex,
216 node: NodeIndex,
214 node: Node.Index,
217215 val: Value,
218216 constexpr: bool,
219217) !void {
220218 if (s.get(name, .vars)) |prev| {
221219 switch (prev.kind) {
222220 .enumeration => {
223 try p.errStr(.redefinition_different_sym, tok, p.tokSlice(tok));
224 try p.errTok(.previous_definition, prev.tok);
221 if (qt.isInvalid()) return;
222 try p.err(tok, .redefinition_different_sym, .{p.tokSlice(tok)});
223 try p.err(prev.tok, .previous_definition, .{});
225224 },
226225 .decl => {
227 if (!ty.eql(prev.ty, p.comp, true)) {
228 try p.errStr(.redefinition_incompatible, tok, p.tokSlice(tok));
229 try p.errTok(.previous_definition, prev.tok);
226 if (!prev.qt.isInvalid() and !qt.eqlQualified(prev.qt, p.comp)) {
227 if (qt.isInvalid()) return;
228 try p.err(tok, .redefinition_incompatible, .{p.tokSlice(tok)});
229 try p.err(prev.tok, .previous_definition, .{});
230 } else {
231 if (prev.node.unpack()) |some| p.setTentativeDeclDefinition(some, node);
230232 }
231233 },
232 .def, .constexpr => {
233 try p.errStr(.redefinition, tok, p.tokSlice(tok));
234 try p.errTok(.previous_definition, prev.tok);
234 .def, .constexpr => if (!prev.qt.isInvalid()) {
235 if (qt.isInvalid()) return;
236 try p.err(tok, .redefinition, .{p.tokSlice(tok)});
237 try p.err(prev.tok, .previous_definition, .{});
235238 },
236239 .typedef => {
237 try p.errStr(.redefinition_different_sym, tok, p.tokSlice(tok));
238 try p.errTok(.previous_definition, prev.tok);
240 if (qt.isInvalid()) return;
241 try p.err(tok, .redefinition_different_sym, .{p.tokSlice(tok)});
242 try p.err(prev.tok, .previous_definition, .{});
239243 },
240244 else => unreachable,
241245 }
......@@ -245,8 +249,8 @@ pub fn defineSymbol(
245249 .kind = if (constexpr) .constexpr else .def,
246250 .name = name,
247251 .tok = tok,
248 .ty = ty,
249 .node = node,
252 .qt = qt,
253 .node = .pack(node),
250254 .val = val,
251255 });
252256}
......@@ -264,33 +268,40 @@ pub fn declareSymbol(
264268 s: *SymbolStack,
265269 p: *Parser,
266270 name: StringId,
267 ty: Type,
271 qt: QualType,
268272 tok: TokenIndex,
269 node: NodeIndex,
273 node: Node.Index,
270274) !void {
271275 if (s.get(name, .vars)) |prev| {
272276 switch (prev.kind) {
273277 .enumeration => {
274 try p.errStr(.redefinition_different_sym, tok, p.tokSlice(tok));
275 try p.errTok(.previous_definition, prev.tok);
278 if (qt.isInvalid()) return;
279 try p.err(tok, .redefinition_different_sym, .{p.tokSlice(tok)});
280 try p.err(prev.tok, .previous_definition, .{});
276281 },
277282 .decl => {
278 if (!ty.eql(prev.ty, p.comp, true)) {
279 try p.errStr(.redefinition_incompatible, tok, p.tokSlice(tok));
280 try p.errTok(.previous_definition, prev.tok);
283 if (!prev.qt.isInvalid() and !qt.eqlQualified(prev.qt, p.comp)) {
284 if (qt.isInvalid()) return;
285 try p.err(tok, .redefinition_incompatible, .{p.tokSlice(tok)});
286 try p.err(prev.tok, .previous_definition, .{});
287 } else {
288 if (prev.node.unpack()) |some| p.setTentativeDeclDefinition(node, some);
281289 }
282290 },
283291 .def, .constexpr => {
284 if (!ty.eql(prev.ty, p.comp, true)) {
285 try p.errStr(.redefinition_incompatible, tok, p.tokSlice(tok));
286 try p.errTok(.previous_definition, prev.tok);
292 if (!prev.qt.isInvalid() and !qt.eqlQualified(prev.qt, p.comp)) {
293 if (qt.isInvalid()) return;
294 try p.err(tok, .redefinition_incompatible, .{p.tokSlice(tok)});
295 try p.err(prev.tok, .previous_definition, .{});
287296 } else {
297 if (prev.node.unpack()) |some| p.setTentativeDeclDefinition(node, some);
288298 return;
289299 }
290300 },
291301 .typedef => {
292 try p.errStr(.redefinition_different_sym, tok, p.tokSlice(tok));
293 try p.errTok(.previous_definition, prev.tok);
302 if (qt.isInvalid()) return;
303 try p.err(tok, .redefinition_different_sym, .{p.tokSlice(tok)});
304 try p.err(prev.tok, .previous_definition, .{});
294305 },
295306 else => unreachable,
296307 }
......@@ -299,34 +310,54 @@ pub fn declareSymbol(
299310 .kind = .decl,
300311 .name = name,
301312 .tok = tok,
302 .ty = ty,
303 .node = node,
313 .qt = qt,
314 .node = .pack(node),
304315 .val = .{},
305316 });
317
318 // Declare out of scope symbol for functions declared in functions.
319 if (s.active_len > 1 and !p.comp.langopts.standard.atLeast(.c23) and qt.is(p.comp, .func)) {
320 try s.scopes.items[0].vars.put(p.gpa, name, .{
321 .kind = .decl,
322 .name = name,
323 .tok = tok,
324 .qt = qt,
325 .node = .pack(node),
326 .val = .{},
327 .out_of_scope = true,
328 });
329 }
306330}
307331
308pub fn defineParam(s: *SymbolStack, p: *Parser, name: StringId, ty: Type, tok: TokenIndex) !void {
332pub fn defineParam(
333 s: *SymbolStack,
334 p: *Parser,
335 name: StringId,
336 qt: QualType,
337 tok: TokenIndex,
338 node: ?Node.Index,
339) !void {
309340 if (s.get(name, .vars)) |prev| {
310341 switch (prev.kind) {
311 .enumeration, .decl, .def, .constexpr => {
312 try p.errStr(.redefinition_of_parameter, tok, p.tokSlice(tok));
313 try p.errTok(.previous_definition, prev.tok);
342 .enumeration, .decl, .def, .constexpr => if (!prev.qt.isInvalid()) {
343 if (qt.isInvalid()) return;
344 try p.err(tok, .redefinition_of_parameter, .{p.tokSlice(tok)});
345 try p.err(prev.tok, .previous_definition, .{});
314346 },
315347 .typedef => {
316 try p.errStr(.redefinition_different_sym, tok, p.tokSlice(tok));
317 try p.errTok(.previous_definition, prev.tok);
348 if (qt.isInvalid()) return;
349 try p.err(tok, .redefinition_different_sym, .{p.tokSlice(tok)});
350 try p.err(prev.tok, .previous_definition, .{});
318351 },
319352 else => unreachable,
320353 }
321354 }
322 if (ty.is(.fp16) and !p.comp.hasHalfPrecisionFloatABI()) {
323 try p.errStr(.suggest_pointer_for_invalid_fp16, tok, "parameters");
324 }
325355 try s.define(p.gpa, .{
326356 .kind = .def,
327357 .name = name,
328358 .tok = tok,
329 .ty = ty,
359 .qt = qt,
360 .node = .packOpt(node),
330361 .val = .{},
331362 });
332363}
......@@ -342,20 +373,20 @@ pub fn defineTag(
342373 switch (prev.kind) {
343374 .@"enum" => {
344375 if (kind == .keyword_enum) return prev;
345 try p.errStr(.wrong_tag, tok, p.tokSlice(tok));
346 try p.errTok(.previous_definition, prev.tok);
376 try p.err(tok, .wrong_tag, .{p.tokSlice(tok)});
377 try p.err(prev.tok, .previous_definition, .{});
347378 return null;
348379 },
349380 .@"struct" => {
350381 if (kind == .keyword_struct) return prev;
351 try p.errStr(.wrong_tag, tok, p.tokSlice(tok));
352 try p.errTok(.previous_definition, prev.tok);
382 try p.err(tok, .wrong_tag, .{p.tokSlice(tok)});
383 try p.err(prev.tok, .previous_definition, .{});
353384 return null;
354385 },
355386 .@"union" => {
356387 if (kind == .keyword_union) return prev;
357 try p.errStr(.wrong_tag, tok, p.tokSlice(tok));
358 try p.errTok(.previous_definition, prev.tok);
388 try p.err(tok, .wrong_tag, .{p.tokSlice(tok)});
389 try p.err(prev.tok, .previous_definition, .{});
359390 return null;
360391 },
361392 else => unreachable,
......@@ -366,25 +397,29 @@ pub fn defineEnumeration(
366397 s: *SymbolStack,
367398 p: *Parser,
368399 name: StringId,
369 ty: Type,
400 qt: QualType,
370401 tok: TokenIndex,
371402 val: Value,
403 node: Node.Index,
372404) !void {
373405 if (s.get(name, .vars)) |prev| {
374406 switch (prev.kind) {
375 .enumeration => {
376 try p.errStr(.redefinition, tok, p.tokSlice(tok));
377 try p.errTok(.previous_definition, prev.tok);
407 .enumeration => if (!prev.qt.isInvalid()) {
408 if (qt.isInvalid()) return;
409 try p.err(tok, .redefinition, .{p.tokSlice(tok)});
410 try p.err(prev.tok, .previous_definition, .{});
378411 return;
379412 },
380413 .decl, .def, .constexpr => {
381 try p.errStr(.redefinition_different_sym, tok, p.tokSlice(tok));
382 try p.errTok(.previous_definition, prev.tok);
414 if (qt.isInvalid()) return;
415 try p.err(tok, .redefinition_different_sym, .{p.tokSlice(tok)});
416 try p.err(prev.tok, .previous_definition, .{});
383417 return;
384418 },
385419 .typedef => {
386 try p.errStr(.redefinition_different_sym, tok, p.tokSlice(tok));
387 try p.errTok(.previous_definition, prev.tok);
420 if (qt.isInvalid()) return;
421 try p.err(tok, .redefinition_different_sym, .{p.tokSlice(tok)});
422 try p.err(prev.tok, .previous_definition, .{});
388423 },
389424 else => unreachable,
390425 }
......@@ -393,7 +428,8 @@ pub fn defineEnumeration(
393428 .kind = .enumeration,
394429 .name = name,
395430 .tok = tok,
396 .ty = ty,
431 .qt = qt,
397432 .val = val,
433 .node = .pack(node),
398434 });
399435}
lib/compiler/aro/aro/Tokenizer.zig+238-56
......@@ -1,8 +1,45 @@
11const std = @import("std");
22const assert = std.debug.assert;
3
34const Compilation = @import("Compilation.zig");
4const Source = @import("Source.zig");
55const LangOpts = @import("LangOpts.zig");
6const Source = @import("Source.zig");
7
8/// Value for valid escapes indicates how many characters to consume, not counting leading backslash
9const UCNKind = enum(u8) {
10 /// Just `\`
11 none,
12 /// \u or \U followed by an insufficient number of hex digits
13 incomplete,
14 /// `\uxxxx`
15 hex4 = 5,
16 /// `\Uxxxxxxxx`
17 hex8 = 9,
18
19 /// In the classification phase we do not care if the escape represents a valid universal character name
20 /// e.g. \UFFFFFFFF is acceptable.
21 fn classify(buf: []const u8) UCNKind {
22 assert(buf[0] == '\\');
23 if (buf.len == 1) return .none;
24 switch (buf[1]) {
25 'u' => {
26 if (buf.len < 6) return .incomplete;
27 for (buf[2..6]) |c| {
28 if (!std.ascii.isHex(c)) return .incomplete;
29 }
30 return .hex4;
31 },
32 'U' => {
33 if (buf.len < 10) return .incomplete;
34 for (buf[2..10]) |c| {
35 if (!std.ascii.isHex(c)) return .incomplete;
36 }
37 return .hex8;
38 },
39 else => return .none,
40 }
41 }
42};
643
744pub const Token = struct {
845 id: Id,
......@@ -18,7 +55,7 @@ pub const Token = struct {
1855 eof,
1956 /// identifier containing solely basic character set characters
2057 identifier,
21 /// identifier with at least one extended character
58 /// identifier with at least one extended character or UCN escape sequence
2259 extended_identifier,
2360
2461 // string literals with prefixes
......@@ -147,6 +184,10 @@ pub const Token = struct {
147184 macro_counter,
148185 /// Special token for implementing _Pragma
149186 macro_param_pragma_operator,
187 /// Special token for implementing __identifier (MS extension)
188 macro_param_ms_identifier,
189 /// Special token for implementing __pragma (MS extension)
190 macro_param_ms_pragma,
150191
151192 /// Special identifier for implementing __func__
152193 macro_func,
......@@ -154,6 +195,12 @@ pub const Token = struct {
154195 macro_function,
155196 /// Special identifier for implementing __PRETTY_FUNCTION__
156197 macro_pretty_func,
198 /// Special identifier for implementing __DATE__
199 macro_date,
200 /// Special identifier for implementing __TIME__
201 macro_time,
202 /// Special identifier for implementing __TIMESTAMP__
203 macro_timestamp,
157204
158205 keyword_auto,
159206 keyword_auto_type,
......@@ -290,13 +337,21 @@ pub const Token = struct {
290337 keyword_thiscall2,
291338 keyword_vectorcall,
292339 keyword_vectorcall2,
293
294 // builtins that require special parsing
295 builtin_choose_expr,
296 builtin_va_arg,
297 builtin_offsetof,
298 builtin_bitoffsetof,
299 builtin_types_compatible_p,
340 keyword_fastcall,
341 keyword_fastcall2,
342 keyword_regcall,
343 keyword_cdecl,
344 keyword_cdecl2,
345 keyword_forceinline,
346 keyword_forceinline2,
347 keyword_unaligned,
348 keyword_unaligned2,
349
350 // Type nullability
351 keyword_nonnull,
352 keyword_nullable,
353 keyword_nullable_result,
354 keyword_null_unspecified,
300355
301356 /// Generated by #embed directive
302357 /// Decimal value with no prefix or suffix
......@@ -323,6 +378,12 @@ pub const Token = struct {
323378 /// A comment token if asked to preserve comments.
324379 comment,
325380
381 /// Incomplete universal character name
382 /// This happens if the source text contains `\u` or `\U` followed by an insufficient number of hex
383 /// digits. This token id represents just the backslash; the subsequent `u` or `U` will be treated as the
384 /// leading character of the following identifier token.
385 incomplete_ucn,
386
326387 /// Return true if token is identifier or keyword.
327388 pub fn isMacroIdentifier(id: Id) bool {
328389 switch (id) {
......@@ -347,6 +408,9 @@ pub const Token = struct {
347408 .macro_func,
348409 .macro_function,
349410 .macro_pretty_func,
411 .macro_date,
412 .macro_time,
413 .macro_timestamp,
350414 .keyword_auto,
351415 .keyword_auto_type,
352416 .keyword_break,
......@@ -409,11 +473,6 @@ pub const Token = struct {
409473 .keyword_restrict2,
410474 .keyword_alignof1,
411475 .keyword_alignof2,
412 .builtin_choose_expr,
413 .builtin_va_arg,
414 .builtin_offsetof,
415 .builtin_bitoffsetof,
416 .builtin_types_compatible_p,
417476 .keyword_attribute1,
418477 .keyword_attribute2,
419478 .keyword_extension,
......@@ -444,6 +503,19 @@ pub const Token = struct {
444503 .keyword_thiscall2,
445504 .keyword_vectorcall,
446505 .keyword_vectorcall2,
506 .keyword_fastcall,
507 .keyword_fastcall2,
508 .keyword_regcall,
509 .keyword_cdecl,
510 .keyword_cdecl2,
511 .keyword_forceinline,
512 .keyword_forceinline2,
513 .keyword_unaligned,
514 .keyword_unaligned2,
515 .keyword_nonnull,
516 .keyword_nullable,
517 .keyword_nullable_result,
518 .keyword_null_unspecified,
447519 .keyword_bit_int,
448520 .keyword_c23_alignas,
449521 .keyword_c23_alignof,
......@@ -547,11 +619,18 @@ pub const Token = struct {
547619 .macro_file,
548620 .macro_line,
549621 .macro_counter,
622 .macro_time,
623 .macro_date,
624 .macro_timestamp,
550625 .macro_param_pragma_operator,
626 .macro_param_ms_identifier,
627 .macro_param_ms_pragma,
551628 .placemarker,
552629 => "",
553630 .macro_ws => " ",
554631
632 .incomplete_ucn => "\\",
633
555634 .macro_func => "__func__",
556635 .macro_function => "__FUNCTION__",
557636 .macro_pretty_func => "__PRETTY_FUNCTION__",
......@@ -695,11 +774,6 @@ pub const Token = struct {
695774 .keyword_alignof2 => "__alignof__",
696775 .keyword_typeof1 => "__typeof",
697776 .keyword_typeof2 => "__typeof__",
698 .builtin_choose_expr => "__builtin_choose_expr",
699 .builtin_va_arg => "__builtin_va_arg",
700 .builtin_offsetof => "__builtin_offsetof",
701 .builtin_bitoffsetof => "__builtin_bitoffsetof",
702 .builtin_types_compatible_p => "__builtin_types_compatible_p",
703777 .keyword_attribute1 => "__attribute",
704778 .keyword_attribute2 => "__attribute__",
705779 .keyword_extension => "__extension__",
......@@ -730,6 +804,19 @@ pub const Token = struct {
730804 .keyword_thiscall2 => "_thiscall",
731805 .keyword_vectorcall => "__vectorcall",
732806 .keyword_vectorcall2 => "_vectorcall",
807 .keyword_fastcall => "__fastcall",
808 .keyword_fastcall2 => "_fastcall",
809 .keyword_regcall => "__regcall",
810 .keyword_cdecl => "__cdecl",
811 .keyword_cdecl2 => "_cdecl",
812 .keyword_forceinline => "__forceinline",
813 .keyword_forceinline2 => "_forceinline",
814 .keyword_unaligned => "__unaligned",
815 .keyword_unaligned2 => "_unaligned",
816 .keyword_nonnull => "_Nonnull",
817 .keyword_nullable => "_Nullable",
818 .keyword_nullable_result => "_Nullable_result",
819 .keyword_null_unspecified => "_Null_unspecified",
733820 };
734821 }
735822
......@@ -742,11 +829,6 @@ pub const Token = struct {
742829 .macro_func,
743830 .macro_function,
744831 .macro_pretty_func,
745 .builtin_choose_expr,
746 .builtin_va_arg,
747 .builtin_offsetof,
748 .builtin_bitoffsetof,
749 .builtin_types_compatible_p,
750832 => "an identifier",
751833 .string_literal,
752834 .string_literal_utf_16,
......@@ -763,7 +845,7 @@ pub const Token = struct {
763845 .unterminated_char_literal,
764846 .empty_char_literal,
765847 => "a character literal",
766 .pp_num, .embed_byte => "A number",
848 .pp_num, .embed_byte => "a number",
767849 else => id.lexeme().?,
768850 };
769851 }
......@@ -871,6 +953,12 @@ pub const Token = struct {
871953 .keyword_stdcall2,
872954 .keyword_thiscall2,
873955 .keyword_vectorcall2,
956 .keyword_fastcall2,
957 .keyword_cdecl2,
958 .keyword_forceinline,
959 .keyword_forceinline2,
960 .keyword_unaligned,
961 .keyword_unaligned2,
874962 => if (langopts.ms_extensions) kw else .identifier,
875963 else => kw,
876964 };
......@@ -1013,13 +1101,21 @@ pub const Token = struct {
10131101 .{ "_thiscall", .keyword_thiscall2 },
10141102 .{ "__vectorcall", .keyword_vectorcall },
10151103 .{ "_vectorcall", .keyword_vectorcall2 },
1016
1017 // builtins that require special parsing
1018 .{ "__builtin_choose_expr", .builtin_choose_expr },
1019 .{ "__builtin_va_arg", .builtin_va_arg },
1020 .{ "__builtin_offsetof", .builtin_offsetof },
1021 .{ "__builtin_bitoffsetof", .builtin_bitoffsetof },
1022 .{ "__builtin_types_compatible_p", .builtin_types_compatible_p },
1104 .{ "__fastcall", .keyword_fastcall },
1105 .{ "_fastcall", .keyword_fastcall2 },
1106 .{ "_regcall", .keyword_regcall },
1107 .{ "__cdecl", .keyword_cdecl },
1108 .{ "_cdecl", .keyword_cdecl2 },
1109 .{ "__forceinline", .keyword_forceinline },
1110 .{ "_forceinline", .keyword_forceinline2 },
1111 .{ "__unaligned", .keyword_unaligned },
1112 .{ "_unaligned", .keyword_unaligned2 },
1113
1114 // Type nullability
1115 .{ "_Nonnull", .keyword_nonnull },
1116 .{ "_Nullable", .keyword_nullable },
1117 .{ "_Nullable_result", .keyword_nullable_result },
1118 .{ "_Null_unspecified", .keyword_null_unspecified },
10231119 });
10241120};
10251121
......@@ -1099,6 +1195,26 @@ pub fn next(self: *Tokenizer) Token {
10991195 'u' => state = .u,
11001196 'U' => state = .U,
11011197 'L' => state = .L,
1198 '\\' => {
1199 const ucn_kind = UCNKind.classify(self.buf[self.index..]);
1200 switch (ucn_kind) {
1201 .none => {
1202 self.index += 1;
1203 id = .invalid;
1204 break;
1205 },
1206 .incomplete => {
1207 self.index += 1;
1208 id = .incomplete_ucn;
1209 break;
1210 },
1211 .hex4, .hex8 => {
1212 self.index += @intFromEnum(ucn_kind);
1213 id = .extended_identifier;
1214 state = .extended_identifier;
1215 },
1216 }
1217 },
11021218 'a'...'t', 'v'...'z', 'A'...'K', 'M'...'T', 'V'...'Z', '_' => state = .identifier,
11031219 '=' => state = .equal,
11041220 '!' => state = .bang,
......@@ -1324,6 +1440,20 @@ pub fn next(self: *Tokenizer) Token {
13241440 break;
13251441 },
13261442 0x80...0xFF => state = .extended_identifier,
1443 '\\' => {
1444 const ucn_kind = UCNKind.classify(self.buf[self.index..]);
1445 switch (ucn_kind) {
1446 .none, .incomplete => {
1447 id = if (state == .identifier) Token.getTokenId(self.langopts, self.buf[start..self.index]) else .extended_identifier;
1448 break;
1449 },
1450 .hex4, .hex8 => {
1451 state = .extended_identifier;
1452 self.index += @intFromEnum(ucn_kind);
1453 },
1454 }
1455 },
1456
13271457 else => {
13281458 id = if (state == .identifier) Token.getTokenId(self.langopts, self.buf[start..self.index]) else .extended_identifier;
13291459 break;
......@@ -1731,7 +1861,10 @@ pub fn next(self: *Tokenizer) Token {
17311861 }
17321862 } else if (self.index == self.buf.len) {
17331863 switch (state) {
1734 .start, .line_comment => {},
1864 .start => {},
1865 .line_comment => if (self.langopts.preserve_comments) {
1866 id = .comment;
1867 },
17351868 .u, .u8, .U, .L, .identifier => id = Token.getTokenId(self.langopts, self.buf[start..self.index]),
17361869 .extended_identifier => id = .extended_identifier,
17371870
......@@ -2105,6 +2238,15 @@ test "comments" {
21052238 .hash,
21062239 .identifier,
21072240 });
2241 try expectTokensExtra(
2242 \\//foo
2243 \\void
2244 \\//bar
2245 , &.{
2246 .comment, .nl,
2247 .keyword_void, .nl,
2248 .comment,
2249 }, .{ .preserve_comments = true });
21082250}
21092251
21102252test "extended identifiers" {
......@@ -2147,36 +2289,76 @@ test "C23 keywords" {
21472289 .keyword_c23_thread_local,
21482290 .keyword_nullptr,
21492291 .keyword_typeof_unqual,
2150 }, .c23);
2292 }, .{ .standard = .c23 });
21512293}
21522294
2153test "Tokenizer fuzz test" {
2154 var comp = Compilation.init(std.testing.allocator, std.fs.cwd());
2155 defer comp.deinit();
2156
2157 const input_bytes = std.testing.fuzzInput(.{});
2158 if (input_bytes.len == 0) return;
2159
2160 const source = try comp.addSourceFromBuffer("fuzz.c", input_bytes);
2295test "Universal character names" {
2296 try expectTokens("\\", &.{.invalid});
2297 try expectTokens("\\g", &.{ .invalid, .identifier });
2298 try expectTokens("\\u", &.{ .incomplete_ucn, .identifier });
2299 try expectTokens("\\ua", &.{ .incomplete_ucn, .identifier });
2300 try expectTokens("\\U9", &.{ .incomplete_ucn, .identifier });
2301 try expectTokens("\\ug", &.{ .incomplete_ucn, .identifier });
2302 try expectTokens("\\uag", &.{ .incomplete_ucn, .identifier });
2303
2304 try expectTokens("\\ ", &.{ .invalid, .eof });
2305 try expectTokens("\\g ", &.{ .invalid, .identifier, .eof });
2306 try expectTokens("\\u ", &.{ .incomplete_ucn, .identifier, .eof });
2307 try expectTokens("\\ua ", &.{ .incomplete_ucn, .identifier, .eof });
2308 try expectTokens("\\U9 ", &.{ .incomplete_ucn, .identifier, .eof });
2309 try expectTokens("\\ug ", &.{ .incomplete_ucn, .identifier, .eof });
2310 try expectTokens("\\uag ", &.{ .incomplete_ucn, .identifier, .eof });
2311
2312 try expectTokens("a\\", &.{ .identifier, .invalid });
2313 try expectTokens("a\\g", &.{ .identifier, .invalid, .identifier });
2314 try expectTokens("a\\u", &.{ .identifier, .incomplete_ucn, .identifier });
2315 try expectTokens("a\\ua", &.{ .identifier, .incomplete_ucn, .identifier });
2316 try expectTokens("a\\U9", &.{ .identifier, .incomplete_ucn, .identifier });
2317 try expectTokens("a\\ug", &.{ .identifier, .incomplete_ucn, .identifier });
2318 try expectTokens("a\\uag", &.{ .identifier, .incomplete_ucn, .identifier });
2319
2320 try expectTokens("a\\ ", &.{ .identifier, .invalid, .eof });
2321 try expectTokens("a\\g ", &.{ .identifier, .invalid, .identifier, .eof });
2322 try expectTokens("a\\u ", &.{ .identifier, .incomplete_ucn, .identifier, .eof });
2323 try expectTokens("a\\ua ", &.{ .identifier, .incomplete_ucn, .identifier, .eof });
2324 try expectTokens("a\\U9 ", &.{ .identifier, .incomplete_ucn, .identifier, .eof });
2325 try expectTokens("a\\ug ", &.{ .identifier, .incomplete_ucn, .identifier, .eof });
2326 try expectTokens("a\\uag ", &.{ .identifier, .incomplete_ucn, .identifier, .eof });
2327}
21612328
2162 var tokenizer: Tokenizer = .{
2163 .buf = source.buf,
2164 .source = source.id,
2165 .langopts = comp.langopts,
2329test "Tokenizer fuzz test" {
2330 const Context = struct {
2331 fn testOne(_: @This(), input_bytes: []const u8) anyerror!void {
2332 var arena: std.heap.ArenaAllocator = .init(std.testing.allocator);
2333 defer arena.deinit();
2334 var comp = Compilation.init(std.testing.allocator, arena.allocator(), undefined, std.fs.cwd());
2335 defer comp.deinit();
2336
2337 const source = try comp.addSourceFromBuffer("fuzz.c", input_bytes);
2338
2339 var tokenizer: Tokenizer = .{
2340 .buf = source.buf,
2341 .source = source.id,
2342 .langopts = comp.langopts,
2343 };
2344 while (true) {
2345 const prev_index = tokenizer.index;
2346 const tok = tokenizer.next();
2347 if (tok.id == .eof) break;
2348 try std.testing.expect(prev_index < tokenizer.index); // ensure that the tokenizer always makes progress
2349 }
2350 }
21662351 };
2167 while (true) {
2168 const prev_index = tokenizer.index;
2169 const tok = tokenizer.next();
2170 if (tok.id == .eof) break;
2171 try std.testing.expect(prev_index < tokenizer.index); // ensure that the tokenizer always makes progress
2172 }
2352 return std.testing.fuzz(Context{}, Context.testOne, .{});
21732353}
21742354
2175fn expectTokensExtra(contents: []const u8, expected_tokens: []const Token.Id, standard: ?LangOpts.Standard) !void {
2176 var comp = Compilation.init(std.testing.allocator, std.fs.cwd());
2355fn expectTokensExtra(contents: []const u8, expected_tokens: []const Token.Id, langopts: ?LangOpts) !void {
2356 var arena: std.heap.ArenaAllocator = .init(std.testing.allocator);
2357 defer arena.deinit();
2358 var comp = Compilation.init(std.testing.allocator, arena.allocator(), undefined, std.fs.cwd());
21772359 defer comp.deinit();
2178 if (standard) |provided| {
2179 comp.langopts.standard = provided;
2360 if (langopts) |provided| {
2361 comp.langopts = provided;
21802362 }
21812363 const source = try comp.addSourceFromBuffer("path", contents);
21822364 var tokenizer = Tokenizer{
lib/compiler/aro/aro/Toolchain.zig+33-20
......@@ -1,12 +1,14 @@
11const std = @import("std");
2const Driver = @import("Driver.zig");
3const Compilation = @import("Compilation.zig");
42const mem = std.mem;
3
54const system_defaults = @import("system_defaults");
5
6const Compilation = @import("Compilation.zig");
7const Driver = @import("Driver.zig");
8const Filesystem = @import("Driver/Filesystem.zig").Filesystem;
9const Multilib = @import("Driver/Multilib.zig");
610const target_util = @import("target.zig");
711const Linux = @import("toolchains/Linux.zig");
8const Multilib = @import("Driver/Multilib.zig");
9const Filesystem = @import("Driver/Filesystem.zig").Filesystem;
1012
1113pub const PathList = std.ArrayListUnmanaged([]const u8);
1214
......@@ -48,9 +50,8 @@ const Inner = union(enum) {
4850
4951const Toolchain = @This();
5052
51filesystem: Filesystem = .{ .real = {} },
53filesystem: Filesystem,
5254driver: *Driver,
53arena: mem.Allocator,
5455
5556/// The list of toolchain specific path prefixes to search for libraries.
5657library_paths: PathList = .{},
......@@ -83,7 +84,8 @@ pub fn discover(tc: *Toolchain) !void {
8384
8485 const target = tc.getTarget();
8586 tc.inner = switch (target.os.tag) {
86 .linux => if (target.cpu.arch == .hexagon)
87 .linux,
88 => if (target.cpu.arch == .hexagon)
8789 .{ .unknown = {} } // TODO
8890 else if (target.cpu.arch.isMIPS())
8991 .{ .unknown = {} } // TODO
......@@ -111,6 +113,11 @@ pub fn deinit(tc: *Toolchain) void {
111113 tc.program_paths.deinit(gpa);
112114}
113115
116/// Write assembler path to `buf` and return a slice of it
117pub fn getAssemblerPath(tc: *const Toolchain, buf: []u8) ![]const u8 {
118 return tc.getProgramPath("as", buf);
119}
120
114121/// Write linker path to `buf` and return a slice of it
115122pub fn getLinkerPath(tc: *const Toolchain, buf: []u8) ![]const u8 {
116123 // --ld-path= takes precedence over -fuse-ld= and specifies the executable
......@@ -149,7 +156,12 @@ pub fn getLinkerPath(tc: *const Toolchain, buf: []u8) ![]const u8 {
149156 // to a relative path is surprising. This is more complex due to priorities
150157 // among -B, COMPILER_PATH and PATH. --ld-path= should be used instead.
151158 if (mem.indexOfScalar(u8, use_linker, '/') != null) {
152 try tc.driver.comp.addDiagnostic(.{ .tag = .fuse_ld_path }, &.{});
159 try tc.driver.comp.diagnostics.add(.{
160 .text = "'-fuse-ld=' taking a path is deprecated; use '--ld-path=' instead",
161 .kind = .off,
162 .opt = .@"fuse-ld-path",
163 .location = null,
164 });
153165 }
154166
155167 if (std.fs.path.isAbsolute(use_linker)) {
......@@ -205,7 +217,7 @@ pub fn addFilePathLibArgs(tc: *const Toolchain, argv: *std.array_list.Managed([]
205217 for (tc.file_paths.items) |path| {
206218 bytes_needed += path.len + 2; // +2 for `-L`
207219 }
208 var bytes = try tc.arena.alloc(u8, bytes_needed);
220 var bytes = try tc.driver.comp.arena.alloc(u8, bytes_needed);
209221 var index: usize = 0;
210222 for (tc.file_paths.items) |path| {
211223 @memcpy(bytes[index..][0..2], "-L");
......@@ -252,6 +264,7 @@ pub fn getFilePath(tc: *const Toolchain, name: []const u8) ![]const u8 {
252264 var path_buf: [std.fs.max_path_bytes]u8 = undefined;
253265 var fib = std.heap.FixedBufferAllocator.init(&path_buf);
254266 const allocator = fib.allocator();
267 const arena = tc.driver.comp.arena;
255268
256269 const sysroot = tc.getSysroot();
257270
......@@ -260,15 +273,15 @@ pub fn getFilePath(tc: *const Toolchain, name: []const u8) ![]const u8 {
260273 const aro_dir = std.fs.path.dirname(tc.driver.aro_name) orelse "";
261274 const candidate = try std.fs.path.join(allocator, &.{ aro_dir, "..", name });
262275 if (tc.filesystem.exists(candidate)) {
263 return tc.arena.dupe(u8, candidate);
276 return arena.dupe(u8, candidate);
264277 }
265278
266279 if (tc.searchPaths(&fib, sysroot, tc.library_paths.items, name)) |path| {
267 return tc.arena.dupe(u8, path);
280 return arena.dupe(u8, path);
268281 }
269282
270283 if (tc.searchPaths(&fib, sysroot, tc.file_paths.items, name)) |path| {
271 return try tc.arena.dupe(u8, path);
284 return try arena.dupe(u8, path);
272285 }
273286
274287 return name;
......@@ -299,7 +312,7 @@ const PathKind = enum {
299312 program,
300313};
301314
302/// Join `components` into a path. If the path exists, dupe it into the toolchain arena and
315/// Join `components` into a path. If the path exists, dupe it into the Compilation arena and
303316/// add it to the specified path list.
304317pub fn addPathIfExists(tc: *Toolchain, components: []const []const u8, dest_kind: PathKind) !void {
305318 var path_buf: [std.fs.max_path_bytes]u8 = undefined;
......@@ -308,7 +321,7 @@ pub fn addPathIfExists(tc: *Toolchain, components: []const []const u8, dest_kind
308321 const candidate = try std.fs.path.join(fib.allocator(), components);
309322
310323 if (tc.filesystem.exists(candidate)) {
311 const duped = try tc.arena.dupe(u8, candidate);
324 const duped = try tc.driver.comp.arena.dupe(u8, candidate);
312325 const dest = switch (dest_kind) {
313326 .library => &tc.library_paths,
314327 .file => &tc.file_paths,
......@@ -318,10 +331,10 @@ pub fn addPathIfExists(tc: *Toolchain, components: []const []const u8, dest_kind
318331 }
319332}
320333
321/// Join `components` using the toolchain arena and add the resulting path to `dest_kind`. Does not check
334/// Join `components` using the Compilation arena and add the resulting path to `dest_kind`. Does not check
322335/// whether the path actually exists
323336pub fn addPathFromComponents(tc: *Toolchain, components: []const []const u8, dest_kind: PathKind) !void {
324 const full_path = try std.fs.path.join(tc.arena, components);
337 const full_path = try std.fs.path.join(tc.driver.comp.arena, components);
325338 const dest = switch (dest_kind) {
326339 .library => &tc.library_paths,
327340 .file => &tc.file_paths,
......@@ -331,7 +344,7 @@ pub fn addPathFromComponents(tc: *Toolchain, components: []const []const u8, des
331344}
332345
333346/// Add linker args to `argv`. Does not add path to linker executable as first item; that must be handled separately
334/// Items added to `argv` will be string literals or owned by `tc.arena` so they must not be individually freed
347/// Items added to `argv` will be string literals or owned by `tc.driver.comp.arena` so they must not be individually freed
335348pub fn buildLinkerArgs(tc: *Toolchain, argv: *std.array_list.Managed([]const u8)) !void {
336349 return switch (tc.inner) {
337350 .uninitialized => unreachable,
......@@ -396,7 +409,7 @@ fn getUnwindLibKind(tc: *const Toolchain) !UnwindLibKind {
396409 return .libgcc;
397410 } else if (mem.eql(u8, libname, "libunwind")) {
398411 if (tc.getRuntimeLibKind() == .libgcc) {
399 try tc.driver.comp.addDiagnostic(.{ .tag = .incompatible_unwindlib }, &.{});
412 try tc.driver.err("--rtlib=libgcc requires --unwindlib=libgcc", .{});
400413 }
401414 return .compiler_rt;
402415 } else {
......@@ -472,7 +485,7 @@ pub fn addRuntimeLibs(tc: *const Toolchain, argv: *std.array_list.Managed([]cons
472485 if (target_util.isKnownWindowsMSVCEnvironment(target)) {
473486 const rtlib_str = tc.driver.rtlib orelse system_defaults.rtlib;
474487 if (!mem.eql(u8, rtlib_str, "platform")) {
475 try tc.driver.comp.addDiagnostic(.{ .tag = .unsupported_rtlib_gcc, .extra = .{ .str = "MSVC" } }, &.{});
488 try tc.driver.err("unsupported runtime library 'libgcc' for platform 'MSVC'", .{});
476489 }
477490 } else {
478491 try tc.addLibGCC(argv);
......@@ -494,7 +507,7 @@ pub fn defineSystemIncludes(tc: *Toolchain) !void {
494507
495508 const comp = tc.driver.comp;
496509 if (!tc.driver.nobuiltininc) {
497 try comp.addBuiltinIncludeDir(tc.driver.aro_name);
510 try comp.addBuiltinIncludeDir(tc.driver.aro_name, tc.driver.resource_dir);
498511 }
499512
500513 if (!tc.driver.nostdlibinc) {
lib/compiler/aro/aro/Tree.zig+3182-1002
......@@ -1,14 +1,15 @@
11const std = @import("std");
2
23const Interner = @import("../backend.zig").Interner;
4
35const Attribute = @import("Attribute.zig");
46const CodeGen = @import("CodeGen.zig");
57const Compilation = @import("Compilation.zig");
68const number_affixes = @import("Tree/number_affixes.zig");
79const Source = @import("Source.zig");
810const Tokenizer = @import("Tokenizer.zig");
9const Type = @import("Type.zig");
11const QualType = @import("TypeStore.zig").QualType;
1012const Value = @import("Value.zig");
11const StringInterner = @import("StringInterner.zig");
1213
1314pub const Token = struct {
1415 id: Id,
......@@ -90,532 +91,2702 @@ pub const TokenWithExpansionLocs = struct {
9091 pub fn checkMsEof(tok: TokenWithExpansionLocs, source: Source, comp: *Compilation) !void {
9192 std.debug.assert(tok.id == .eof);
9293 if (source.buf.len > tok.loc.byte_offset and source.buf[tok.loc.byte_offset] == 0x1A) {
93 try comp.addDiagnostic(.{
94 .tag = .ctrl_z_eof,
95 .loc = .{
94 const diagnostic: Compilation.Diagnostic = .ctrl_z_eof;
95 try comp.diagnostics.add(.{
96 .text = diagnostic.fmt,
97 .kind = diagnostic.kind,
98 .opt = diagnostic.opt,
99 .extension = diagnostic.extension,
100 .location = source.lineCol(.{
96101 .id = source.id,
97102 .byte_offset = tok.loc.byte_offset,
98103 .line = tok.loc.line,
99 },
100 }, &.{});
104 }),
105 });
106 }
107 }
108};
109
110pub const TokenIndex = u32;
111pub const ValueMap = std.AutoHashMapUnmanaged(Node.Index, Value);
112
113const Tree = @This();
114
115comp: *Compilation,
116
117// Values from Preprocessor.
118tokens: Token.List.Slice,
119
120// Values owned by this Tree
121nodes: std.MultiArrayList(Node.Repr) = .empty,
122extra: std.ArrayListUnmanaged(u32) = .empty,
123root_decls: std.ArrayListUnmanaged(Node.Index) = .empty,
124value_map: ValueMap = .empty,
125
126pub const genIr = CodeGen.genIr;
127
128pub fn deinit(tree: *Tree) void {
129 tree.nodes.deinit(tree.comp.gpa);
130 tree.extra.deinit(tree.comp.gpa);
131 tree.root_decls.deinit(tree.comp.gpa);
132 tree.value_map.deinit(tree.comp.gpa);
133 tree.* = undefined;
134}
135
136pub const GNUAssemblyQualifiers = struct {
137 @"volatile": bool = false,
138 @"inline": bool = false,
139 goto: bool = false,
140};
141
142pub const Node = union(enum) {
143 empty_decl: EmptyDecl,
144 static_assert: StaticAssert,
145 function: Function,
146 param: Param,
147 variable: Variable,
148 typedef: Typedef,
149 global_asm: SimpleAsm,
150
151 struct_decl: ContainerDecl,
152 union_decl: ContainerDecl,
153 enum_decl: ContainerDecl,
154 struct_forward_decl: ContainerForwardDecl,
155 union_forward_decl: ContainerForwardDecl,
156 enum_forward_decl: ContainerForwardDecl,
157
158 enum_field: EnumField,
159 record_field: RecordField,
160
161 labeled_stmt: LabeledStmt,
162 compound_stmt: CompoundStmt,
163 if_stmt: IfStmt,
164 switch_stmt: SwitchStmt,
165 case_stmt: CaseStmt,
166 default_stmt: DefaultStmt,
167 while_stmt: WhileStmt,
168 do_while_stmt: DoWhileStmt,
169 for_stmt: ForStmt,
170 goto_stmt: GotoStmt,
171 computed_goto_stmt: ComputedGotoStmt,
172 continue_stmt: ContinueStmt,
173 break_stmt: BreakStmt,
174 null_stmt: NullStmt,
175 return_stmt: ReturnStmt,
176 gnu_asm_simple: SimpleAsm,
177
178 assign_expr: Binary,
179 mul_assign_expr: Binary,
180 div_assign_expr: Binary,
181 mod_assign_expr: Binary,
182 add_assign_expr: Binary,
183 sub_assign_expr: Binary,
184 shl_assign_expr: Binary,
185 shr_assign_expr: Binary,
186 bit_and_assign_expr: Binary,
187 bit_xor_assign_expr: Binary,
188 bit_or_assign_expr: Binary,
189 compound_assign_dummy_expr: Unary,
190
191 comma_expr: Binary,
192 bool_or_expr: Binary,
193 bool_and_expr: Binary,
194 bit_or_expr: Binary,
195 bit_xor_expr: Binary,
196 bit_and_expr: Binary,
197 equal_expr: Binary,
198 not_equal_expr: Binary,
199 less_than_expr: Binary,
200 less_than_equal_expr: Binary,
201 greater_than_expr: Binary,
202 greater_than_equal_expr: Binary,
203 shl_expr: Binary,
204 shr_expr: Binary,
205 add_expr: Binary,
206 sub_expr: Binary,
207 mul_expr: Binary,
208 div_expr: Binary,
209 mod_expr: Binary,
210
211 cast: Cast,
212
213 addr_of_expr: Unary,
214 deref_expr: Unary,
215 plus_expr: Unary,
216 negate_expr: Unary,
217 bit_not_expr: Unary,
218 bool_not_expr: Unary,
219 pre_inc_expr: Unary,
220 pre_dec_expr: Unary,
221 imag_expr: Unary,
222 real_expr: Unary,
223 post_inc_expr: Unary,
224 post_dec_expr: Unary,
225 paren_expr: Unary,
226 stmt_expr: Unary,
227
228 addr_of_label: AddrOfLabel,
229
230 array_access_expr: ArrayAccess,
231 member_access_expr: MemberAccess,
232 member_access_ptr_expr: MemberAccess,
233
234 call_expr: Call,
235
236 decl_ref_expr: DeclRef,
237 enumeration_ref: DeclRef,
238
239 builtin_call_expr: BuiltinCall,
240 builtin_ref: BuiltinRef,
241 builtin_types_compatible_p: TypesCompatible,
242 builtin_choose_expr: Conditional,
243 builtin_convertvector: Convertvector,
244 builtin_shufflevector: Shufflevector,
245
246 /// C23 bool literal `true` / `false`
247 bool_literal: Literal,
248 /// C23 nullptr literal
249 nullptr_literal: Literal,
250 /// integer literal, always unsigned
251 int_literal: Literal,
252 /// Same as int_literal, but originates from a char literal
253 char_literal: CharLiteral,
254 /// a floating point literal
255 float_literal: Literal,
256 string_literal_expr: CharLiteral,
257 /// wraps a float or double literal
258 imaginary_literal: Unary,
259 /// A compound literal (type){ init }
260 compound_literal_expr: CompoundLiteral,
261
262 sizeof_expr: TypeInfo,
263 alignof_expr: TypeInfo,
264
265 generic_expr: Generic,
266 generic_association_expr: Generic.Association,
267 generic_default_expr: Generic.Default,
268
269 binary_cond_expr: Conditional,
270 /// Used as the base for casts of the lhs in `binary_cond_expr`.
271 cond_dummy_expr: Unary,
272 cond_expr: Conditional,
273
274 array_init_expr: ContainerInit,
275 struct_init_expr: ContainerInit,
276 union_init_expr: UnionInit,
277 /// Inserted in array_init_expr to represent unspecified elements.
278 /// data.int contains the amount of elements.
279 array_filler_expr: ArrayFiller,
280 /// Inserted in record and scalar initializers for unspecified elements.
281 default_init_expr: DefaultInit,
282
283 pub const EmptyDecl = struct {
284 semicolon: TokenIndex,
285 };
286
287 pub const StaticAssert = struct {
288 assert_tok: TokenIndex,
289 cond: Node.Index,
290 message: ?Node.Index,
291 };
292
293 pub const Function = struct {
294 name_tok: TokenIndex,
295 qt: QualType,
296 static: bool,
297 @"inline": bool,
298 body: ?Node.Index,
299 /// Actual, non-tentative definition of this function.
300 definition: ?Node.Index,
301 };
302
303 pub const Param = struct {
304 name_tok: TokenIndex,
305 qt: QualType,
306 storage_class: enum {
307 auto,
308 register,
309 },
310 };
311
312 pub const Variable = struct {
313 name_tok: TokenIndex,
314 qt: QualType,
315 storage_class: enum {
316 auto,
317 static,
318 @"extern",
319 register,
320 },
321 thread_local: bool,
322 /// From predefined macro __func__, __FUNCTION__ or __PRETTY_FUNCTION__.
323 /// Implies `static == true`.
324 implicit: bool,
325 initializer: ?Node.Index,
326 /// Actual, non-tentative definition of this variable.
327 definition: ?Node.Index,
328 };
329
330 pub const Typedef = struct {
331 name_tok: TokenIndex,
332 qt: QualType,
333 implicit: bool,
334 };
335
336 pub const SimpleAsm = struct {
337 asm_tok: TokenIndex,
338 asm_str: Node.Index,
339 };
340
341 pub const ContainerDecl = struct {
342 name_or_kind_tok: TokenIndex,
343 container_qt: QualType,
344 fields: []const Node.Index,
345 };
346
347 pub const ContainerForwardDecl = struct {
348 name_or_kind_tok: TokenIndex,
349 container_qt: QualType,
350 /// The definition for this forward declaration if one exists.
351 definition: ?Node.Index,
352 };
353
354 pub const EnumField = struct {
355 name_tok: TokenIndex,
356 qt: QualType,
357 init: ?Node.Index,
358 };
359
360 pub const RecordField = struct {
361 name_or_first_tok: TokenIndex,
362 qt: QualType,
363 bit_width: ?Node.Index,
364 };
365
366 pub const LabeledStmt = struct {
367 label_tok: TokenIndex,
368 body: Node.Index,
369 qt: QualType,
370 };
371
372 pub const CompoundStmt = struct {
373 l_brace_tok: TokenIndex,
374 body: []const Node.Index,
375 };
376
377 pub const IfStmt = struct {
378 if_tok: TokenIndex,
379 cond: Node.Index,
380 then_body: Node.Index,
381 else_body: ?Node.Index,
382 };
383
384 pub const SwitchStmt = struct {
385 switch_tok: TokenIndex,
386 cond: Node.Index,
387 body: Node.Index,
388 };
389
390 pub const CaseStmt = struct {
391 case_tok: TokenIndex,
392 start: Node.Index,
393 end: ?Node.Index,
394 body: Node.Index,
395 };
396
397 pub const DefaultStmt = struct {
398 default_tok: TokenIndex,
399 body: Node.Index,
400 };
401
402 pub const WhileStmt = struct {
403 while_tok: TokenIndex,
404 cond: Node.Index,
405 body: Node.Index,
406 };
407
408 pub const DoWhileStmt = struct {
409 do_tok: TokenIndex,
410 cond: Node.Index,
411 body: Node.Index,
412 };
413
414 pub const ForStmt = struct {
415 for_tok: TokenIndex,
416 init: union(enum) {
417 decls: []const Node.Index,
418 expr: ?Node.Index,
419 },
420 cond: ?Node.Index,
421 incr: ?Node.Index,
422 body: Node.Index,
423 };
424
425 pub const GotoStmt = struct {
426 label_tok: TokenIndex,
427 };
428
429 pub const ComputedGotoStmt = struct {
430 goto_tok: TokenIndex,
431 expr: Node.Index,
432 };
433
434 pub const ContinueStmt = struct {
435 continue_tok: TokenIndex,
436 };
437
438 pub const BreakStmt = struct {
439 break_tok: TokenIndex,
440 };
441
442 pub const NullStmt = struct {
443 semicolon_or_r_brace_tok: TokenIndex,
444 qt: QualType,
445 };
446
447 pub const ReturnStmt = struct {
448 return_tok: TokenIndex,
449 return_qt: QualType,
450 operand: union(enum) {
451 expr: Node.Index,
452 /// True if the function is called "main" and return_qt is compatible with int
453 implicit: bool,
454 none,
455 },
456 };
457
458 pub const Binary = struct {
459 qt: QualType,
460 lhs: Node.Index,
461 op_tok: TokenIndex,
462 rhs: Node.Index,
463 };
464
465 pub const Cast = struct {
466 qt: QualType,
467 l_paren: TokenIndex,
468 kind: Kind,
469 operand: Node.Index,
470 implicit: bool,
471
472 pub const Kind = enum {
473 /// Does nothing except possibly add qualifiers
474 no_op,
475 /// Interpret one bit pattern as another. Used for operands which have the same
476 /// size and unrelated types, e.g. casting one pointer type to another
477 bitcast,
478 /// Convert T[] to T *
479 array_to_pointer,
480 /// Converts an lvalue to an rvalue
481 lval_to_rval,
482 /// Convert a function type to a pointer to a function
483 function_to_pointer,
484 /// Convert a pointer type to a _Bool
485 pointer_to_bool,
486 /// Convert a pointer type to an integer type
487 pointer_to_int,
488 /// Convert _Bool to an integer type
489 bool_to_int,
490 /// Convert _Bool to a floating type
491 bool_to_float,
492 /// Convert a _Bool to a pointer; will cause a warning
493 bool_to_pointer,
494 /// Convert an integer type to _Bool
495 int_to_bool,
496 /// Convert an integer to a floating type
497 int_to_float,
498 /// Convert a complex integer to a complex floating type
499 complex_int_to_complex_float,
500 /// Convert an integer type to a pointer type
501 int_to_pointer,
502 /// Convert a floating type to a _Bool
503 float_to_bool,
504 /// Convert a floating type to an integer
505 float_to_int,
506 /// Convert a complex floating type to a complex integer
507 complex_float_to_complex_int,
508 /// Convert one integer type to another
509 int_cast,
510 /// Convert one complex integer type to another
511 complex_int_cast,
512 /// Convert real part of complex integer to a integer
513 complex_int_to_real,
514 /// Create a complex integer type using operand as the real part
515 real_to_complex_int,
516 /// Convert one floating type to another
517 float_cast,
518 /// Convert one complex floating type to another
519 complex_float_cast,
520 /// Convert real part of complex float to a float
521 complex_float_to_real,
522 /// Create a complex floating type using operand as the real part
523 real_to_complex_float,
524 /// Convert type to void
525 to_void,
526 /// Convert a literal 0 to a null pointer
527 null_to_pointer,
528 /// GNU cast-to-union extension
529 union_cast,
530 /// Create vector where each value is same as the input scalar.
531 vector_splat,
532 /// Convert an atomic type to its non atomic base type.
533 atomic_to_non_atomic,
534 /// Convert a non atomic type to an atomic type.
535 non_atomic_to_atomic,
536 };
537 };
538
539 pub const Unary = struct {
540 qt: QualType,
541 op_tok: TokenIndex,
542 operand: Node.Index,
543 };
544
545 pub const AddrOfLabel = struct {
546 label_tok: TokenIndex,
547 qt: QualType,
548 };
549
550 pub const ArrayAccess = struct {
551 l_bracket_tok: TokenIndex,
552 qt: QualType,
553 base: Node.Index,
554 index: Node.Index,
555 };
556
557 pub const MemberAccess = struct {
558 qt: QualType,
559 base: Node.Index,
560 access_tok: TokenIndex,
561 member_index: u32,
562
563 pub fn isBitFieldWidth(access: MemberAccess, tree: *const Tree) ?u32 {
564 var qt = access.base.qt(tree);
565 if (qt.isInvalid()) return null;
566 if (qt.get(tree.comp, .pointer)) |pointer| qt = pointer.child;
567 const record_ty = switch (qt.base(tree.comp).type) {
568 .@"struct", .@"union" => |record| record,
569 else => return null,
570 };
571 return record_ty.fields[access.member_index].bit_width.unpack();
101572 }
573 };
574
575 pub const Call = struct {
576 l_paren_tok: TokenIndex,
577 qt: QualType,
578 callee: Node.Index,
579 args: []const Node.Index,
580 };
581
582 pub const DeclRef = struct {
583 name_tok: TokenIndex,
584 qt: QualType,
585 decl: Node.Index,
586 };
587
588 pub const BuiltinCall = struct {
589 builtin_tok: TokenIndex,
590 qt: QualType,
591 args: []const Node.Index,
592 };
593
594 pub const BuiltinRef = struct {
595 name_tok: TokenIndex,
596 qt: QualType,
597 };
598
599 pub const TypesCompatible = struct {
600 builtin_tok: TokenIndex,
601 lhs: QualType,
602 rhs: QualType,
603 };
604
605 pub const Convertvector = struct {
606 builtin_tok: TokenIndex,
607 dest_qt: QualType,
608 operand: Node.Index,
609 };
610
611 pub const Shufflevector = struct {
612 builtin_tok: TokenIndex,
613 qt: QualType,
614 lhs: Node.Index,
615 rhs: Node.Index,
616 indexes: []const Node.Index,
617 };
618
619 pub const Literal = struct {
620 literal_tok: TokenIndex,
621 qt: QualType,
622 };
623
624 pub const CharLiteral = struct {
625 literal_tok: TokenIndex,
626 qt: QualType,
627 kind: enum {
628 ascii,
629 wide,
630 utf8,
631 utf16,
632 utf32,
633 },
634 };
635
636 pub const CompoundLiteral = struct {
637 l_paren_tok: TokenIndex,
638 qt: QualType,
639 thread_local: bool,
640 storage_class: enum {
641 auto,
642 static,
643 register,
644 },
645 initializer: Node.Index,
646 };
647
648 pub const TypeInfo = struct {
649 qt: QualType,
650 op_tok: TokenIndex,
651 expr: ?Node.Index,
652 operand_qt: QualType,
653 };
654
655 pub const Generic = struct {
656 generic_tok: TokenIndex,
657 qt: QualType,
658
659 // `Generic` child nodes are either an `Association` a `Default`
660 controlling: Node.Index,
661 chosen: Node.Index,
662 rest: []const Node.Index,
663
664 pub const Association = struct {
665 colon_tok: TokenIndex,
666 association_qt: QualType,
667 expr: Node.Index,
668 };
669
670 pub const Default = struct {
671 default_tok: TokenIndex,
672 expr: Node.Index,
673 };
674 };
675
676 pub const Conditional = struct {
677 cond_tok: TokenIndex,
678 qt: QualType,
679 cond: Node.Index,
680 then_expr: Node.Index,
681 else_expr: Node.Index,
682 };
683
684 pub const ContainerInit = struct {
685 l_brace_tok: TokenIndex,
686 container_qt: QualType,
687 items: []const Node.Index,
688 };
689
690 pub const UnionInit = struct {
691 l_brace_tok: TokenIndex,
692 union_qt: QualType,
693 field_index: u32,
694 initializer: ?Node.Index,
695 };
696
697 pub const ArrayFiller = struct {
698 last_tok: TokenIndex,
699 qt: QualType,
700 count: u64,
701 };
702
703 pub const DefaultInit = struct {
704 last_tok: TokenIndex,
705 qt: QualType,
706 };
707
708 pub const Index = enum(u32) {
709 _,
710
711 pub fn get(index: Index, tree: *const Tree) Node {
712 const node_tok = tree.nodes.items(.tok)[@intFromEnum(index)];
713 const node_data = &tree.nodes.items(.data)[@intFromEnum(index)];
714 return switch (tree.nodes.items(.tag)[@intFromEnum(index)]) {
715 .empty_decl => .{
716 .empty_decl = .{
717 .semicolon = node_tok,
718 },
719 },
720 .static_assert => .{
721 .static_assert = .{
722 .assert_tok = node_tok,
723 .cond = @enumFromInt(node_data[0]),
724 .message = unpackOptIndex(node_data[1]),
725 },
726 },
727 .fn_proto => {
728 const attr: Node.Repr.DeclAttr = @bitCast(node_data[1]);
729 return .{
730 .function = .{
731 .name_tok = node_tok,
732 .qt = @bitCast(node_data[0]),
733 .static = attr.static,
734 .@"inline" = attr.@"inline",
735 .body = null,
736 .definition = unpackOptIndex(node_data[2]),
737 },
738 };
739 },
740 .fn_def => {
741 const attr: Node.Repr.DeclAttr = @bitCast(node_data[1]);
742 return .{
743 .function = .{
744 .name_tok = node_tok,
745 .qt = @bitCast(node_data[0]),
746 .static = attr.static,
747 .@"inline" = attr.@"inline",
748 .body = @enumFromInt(node_data[2]),
749 .definition = null,
750 },
751 };
752 },
753 .param => {
754 const attr: Node.Repr.DeclAttr = @bitCast(node_data[1]);
755 return .{
756 .param = .{
757 .name_tok = node_tok,
758 .qt = @bitCast(node_data[0]),
759 .storage_class = if (attr.register)
760 .register
761 else
762 .auto,
763 },
764 };
765 },
766 .variable => {
767 const attr: Node.Repr.DeclAttr = @bitCast(node_data[1]);
768 return .{
769 .variable = .{
770 .name_tok = node_tok,
771 .qt = @bitCast(node_data[0]),
772 .storage_class = if (attr.static)
773 .static
774 else if (attr.@"extern")
775 .@"extern"
776 else if (attr.register)
777 .register
778 else
779 .auto,
780 .thread_local = attr.thread_local,
781 .implicit = attr.implicit,
782 .initializer = null,
783 .definition = unpackOptIndex(node_data[2]),
784 },
785 };
786 },
787 .variable_def => {
788 const attr: Node.Repr.DeclAttr = @bitCast(node_data[1]);
789 return .{
790 .variable = .{
791 .name_tok = node_tok,
792 .qt = @bitCast(node_data[0]),
793 .storage_class = if (attr.static)
794 .static
795 else if (attr.@"extern")
796 .@"extern"
797 else if (attr.register)
798 .register
799 else
800 .auto,
801 .thread_local = attr.thread_local,
802 .implicit = attr.implicit,
803 .initializer = unpackOptIndex(node_data[2]),
804 .definition = null,
805 },
806 };
807 },
808 .typedef => .{
809 .typedef = .{
810 .name_tok = node_tok,
811 .qt = @bitCast(node_data[0]),
812 .implicit = node_data[1] != 0,
813 },
814 },
815 .global_asm => .{
816 .global_asm = .{
817 .asm_tok = node_tok,
818 .asm_str = @enumFromInt(node_data[0]),
819 },
820 },
821 .struct_decl => .{
822 .struct_decl = .{
823 .name_or_kind_tok = node_tok,
824 .container_qt = @bitCast(node_data[0]),
825 .fields = @ptrCast(tree.extra.items[node_data[1]..][0..node_data[2]]),
826 },
827 },
828 .struct_decl_two => .{
829 .struct_decl = .{
830 .name_or_kind_tok = node_tok,
831 .container_qt = @bitCast(node_data[0]),
832 .fields = unPackElems(node_data[1..]),
833 },
834 },
835 .union_decl => .{
836 .union_decl = .{
837 .name_or_kind_tok = node_tok,
838 .container_qt = @bitCast(node_data[0]),
839 .fields = @ptrCast(tree.extra.items[node_data[1]..][0..node_data[2]]),
840 },
841 },
842 .union_decl_two => .{
843 .union_decl = .{
844 .name_or_kind_tok = node_tok,
845 .container_qt = @bitCast(node_data[0]),
846 .fields = unPackElems(node_data[1..]),
847 },
848 },
849 .enum_decl => .{
850 .enum_decl = .{
851 .name_or_kind_tok = node_tok,
852 .container_qt = @bitCast(node_data[0]),
853 .fields = @ptrCast(tree.extra.items[node_data[1]..][0..node_data[2]]),
854 },
855 },
856 .enum_decl_two => .{
857 .enum_decl = .{
858 .name_or_kind_tok = node_tok,
859 .container_qt = @bitCast(node_data[0]),
860 .fields = unPackElems(node_data[1..]),
861 },
862 },
863 .struct_forward_decl => .{
864 .struct_forward_decl = .{
865 .name_or_kind_tok = node_tok,
866 .container_qt = @bitCast(node_data[0]),
867 .definition = null,
868 },
869 },
870 .union_forward_decl => .{
871 .union_forward_decl = .{
872 .name_or_kind_tok = node_tok,
873 .container_qt = @bitCast(node_data[0]),
874 .definition = null,
875 },
876 },
877 .enum_forward_decl => .{
878 .enum_forward_decl = .{
879 .name_or_kind_tok = node_tok,
880 .container_qt = @bitCast(node_data[0]),
881 .definition = null,
882 },
883 },
884 .enum_field => .{
885 .enum_field = .{
886 .name_tok = node_tok,
887 .qt = @bitCast(node_data[0]),
888 .init = unpackOptIndex(node_data[1]),
889 },
890 },
891 .record_field => .{
892 .record_field = .{
893 .name_or_first_tok = node_tok,
894 .qt = @bitCast(node_data[0]),
895 .bit_width = unpackOptIndex(node_data[1]),
896 },
897 },
898 .labeled_stmt => .{
899 .labeled_stmt = .{
900 .label_tok = node_tok,
901 .qt = @bitCast(node_data[0]),
902 .body = @enumFromInt(node_data[1]),
903 },
904 },
905 .compound_stmt => .{
906 .compound_stmt = .{
907 .l_brace_tok = node_tok,
908 .body = @ptrCast(tree.extra.items[node_data[0]..][0..node_data[1]]),
909 },
910 },
911 .compound_stmt_three => .{
912 .compound_stmt = .{
913 .l_brace_tok = node_tok,
914 .body = unPackElems(node_data),
915 },
916 },
917 .if_stmt => .{
918 .if_stmt = .{
919 .if_tok = node_tok,
920 .cond = @enumFromInt(node_data[0]),
921 .then_body = @enumFromInt(node_data[1]),
922 .else_body = unpackOptIndex(node_data[2]),
923 },
924 },
925 .switch_stmt => .{
926 .switch_stmt = .{
927 .switch_tok = node_tok,
928 .cond = @enumFromInt(node_data[0]),
929 .body = @enumFromInt(node_data[1]),
930 },
931 },
932 .case_stmt => .{
933 .case_stmt = .{
934 .case_tok = node_tok,
935 .start = @enumFromInt(node_data[0]),
936 .end = unpackOptIndex(node_data[1]),
937 .body = @enumFromInt(node_data[2]),
938 },
939 },
940 .default_stmt => .{
941 .default_stmt = .{
942 .default_tok = node_tok,
943 .body = @enumFromInt(node_data[0]),
944 },
945 },
946 .while_stmt => .{
947 .while_stmt = .{
948 .while_tok = node_tok,
949 .cond = @enumFromInt(node_data[0]),
950 .body = @enumFromInt(node_data[1]),
951 },
952 },
953 .do_while_stmt => .{
954 .do_while_stmt = .{
955 .do_tok = node_tok,
956 .cond = @enumFromInt(node_data[0]),
957 .body = @enumFromInt(node_data[1]),
958 },
959 },
960 .for_decl => .{
961 .for_stmt = .{
962 .for_tok = node_tok,
963 .init = .{ .decls = @ptrCast(tree.extra.items[node_data[0]..][0 .. node_data[1] - 2]) },
964 .cond = unpackOptIndex(tree.extra.items[node_data[0] + node_data[1] - 2]),
965 .incr = unpackOptIndex(tree.extra.items[node_data[0] + node_data[1] - 1]),
966 .body = @enumFromInt(node_data[2]),
967 },
968 },
969 .for_expr => .{
970 .for_stmt = .{
971 .for_tok = node_tok,
972 .init = .{ .expr = unpackOptIndex(node_data[0]) },
973 .cond = unpackOptIndex(tree.extra.items[node_data[1]]),
974 .incr = unpackOptIndex(tree.extra.items[node_data[1] + 1]),
975 .body = @enumFromInt(node_data[2]),
976 },
977 },
978 .goto_stmt => .{
979 .goto_stmt = .{
980 .label_tok = node_tok,
981 },
982 },
983 .computed_goto_stmt => .{
984 .computed_goto_stmt = .{
985 .goto_tok = node_tok,
986 .expr = @enumFromInt(node_data[0]),
987 },
988 },
989 .continue_stmt => .{
990 .continue_stmt = .{
991 .continue_tok = node_tok,
992 },
993 },
994 .break_stmt => .{
995 .break_stmt = .{
996 .break_tok = node_tok,
997 },
998 },
999 .null_stmt => .{
1000 .null_stmt = .{
1001 .semicolon_or_r_brace_tok = node_tok,
1002 .qt = @bitCast(node_data[0]),
1003 },
1004 },
1005 .return_stmt => .{
1006 .return_stmt = .{
1007 .return_tok = node_tok,
1008 .return_qt = @bitCast(node_data[0]),
1009 .operand = .{
1010 .expr = @enumFromInt(node_data[1]),
1011 },
1012 },
1013 },
1014 .return_none_stmt => .{
1015 .return_stmt = .{
1016 .return_tok = node_tok,
1017 .return_qt = @bitCast(node_data[0]),
1018 .operand = .none,
1019 },
1020 },
1021 .implicit_return => .{
1022 .return_stmt = .{
1023 .return_tok = node_tok,
1024 .return_qt = @bitCast(node_data[0]),
1025 .operand = .{
1026 .implicit = node_data[1] != 0,
1027 },
1028 },
1029 },
1030 .gnu_asm_simple => .{
1031 .gnu_asm_simple = .{
1032 .asm_tok = node_tok,
1033 .asm_str = @enumFromInt(node_data[0]),
1034 },
1035 },
1036 .assign_expr => .{
1037 .assign_expr = .{
1038 .op_tok = node_tok,
1039 .qt = @bitCast(node_data[0]),
1040 .lhs = @enumFromInt(node_data[1]),
1041 .rhs = @enumFromInt(node_data[2]),
1042 },
1043 },
1044 .mul_assign_expr => .{
1045 .mul_assign_expr = .{
1046 .op_tok = node_tok,
1047 .qt = @bitCast(node_data[0]),
1048 .lhs = @enumFromInt(node_data[1]),
1049 .rhs = @enumFromInt(node_data[2]),
1050 },
1051 },
1052 .div_assign_expr => .{
1053 .div_assign_expr = .{
1054 .op_tok = node_tok,
1055 .qt = @bitCast(node_data[0]),
1056 .lhs = @enumFromInt(node_data[1]),
1057 .rhs = @enumFromInt(node_data[2]),
1058 },
1059 },
1060 .mod_assign_expr => .{
1061 .mod_assign_expr = .{
1062 .op_tok = node_tok,
1063 .qt = @bitCast(node_data[0]),
1064 .lhs = @enumFromInt(node_data[1]),
1065 .rhs = @enumFromInt(node_data[2]),
1066 },
1067 },
1068 .add_assign_expr => .{
1069 .add_assign_expr = .{
1070 .op_tok = node_tok,
1071 .qt = @bitCast(node_data[0]),
1072 .lhs = @enumFromInt(node_data[1]),
1073 .rhs = @enumFromInt(node_data[2]),
1074 },
1075 },
1076 .sub_assign_expr => .{
1077 .sub_assign_expr = .{
1078 .op_tok = node_tok,
1079 .qt = @bitCast(node_data[0]),
1080 .lhs = @enumFromInt(node_data[1]),
1081 .rhs = @enumFromInt(node_data[2]),
1082 },
1083 },
1084 .shl_assign_expr => .{
1085 .shl_assign_expr = .{
1086 .op_tok = node_tok,
1087 .qt = @bitCast(node_data[0]),
1088 .lhs = @enumFromInt(node_data[1]),
1089 .rhs = @enumFromInt(node_data[2]),
1090 },
1091 },
1092 .shr_assign_expr => .{
1093 .shr_assign_expr = .{
1094 .op_tok = node_tok,
1095 .qt = @bitCast(node_data[0]),
1096 .lhs = @enumFromInt(node_data[1]),
1097 .rhs = @enumFromInt(node_data[2]),
1098 },
1099 },
1100 .bit_and_assign_expr => .{
1101 .bit_and_assign_expr = .{
1102 .op_tok = node_tok,
1103 .qt = @bitCast(node_data[0]),
1104 .lhs = @enumFromInt(node_data[1]),
1105 .rhs = @enumFromInt(node_data[2]),
1106 },
1107 },
1108 .bit_xor_assign_expr => .{
1109 .bit_xor_assign_expr = .{
1110 .op_tok = node_tok,
1111 .qt = @bitCast(node_data[0]),
1112 .lhs = @enumFromInt(node_data[1]),
1113 .rhs = @enumFromInt(node_data[2]),
1114 },
1115 },
1116 .bit_or_assign_expr => .{
1117 .bit_or_assign_expr = .{
1118 .op_tok = node_tok,
1119 .qt = @bitCast(node_data[0]),
1120 .lhs = @enumFromInt(node_data[1]),
1121 .rhs = @enumFromInt(node_data[2]),
1122 },
1123 },
1124 .compound_assign_dummy_expr => .{
1125 .compound_assign_dummy_expr = .{
1126 .op_tok = node_tok,
1127 .qt = @bitCast(node_data[0]),
1128 .operand = @enumFromInt(node_data[1]),
1129 },
1130 },
1131 .comma_expr => .{
1132 .comma_expr = .{
1133 .op_tok = node_tok,
1134 .qt = @bitCast(node_data[0]),
1135 .lhs = @enumFromInt(node_data[1]),
1136 .rhs = @enumFromInt(node_data[2]),
1137 },
1138 },
1139 .bool_or_expr => .{
1140 .bool_or_expr = .{
1141 .op_tok = node_tok,
1142 .qt = @bitCast(node_data[0]),
1143 .lhs = @enumFromInt(node_data[1]),
1144 .rhs = @enumFromInt(node_data[2]),
1145 },
1146 },
1147 .bool_and_expr => .{
1148 .bool_and_expr = .{
1149 .op_tok = node_tok,
1150 .qt = @bitCast(node_data[0]),
1151 .lhs = @enumFromInt(node_data[1]),
1152 .rhs = @enumFromInt(node_data[2]),
1153 },
1154 },
1155 .bit_or_expr => .{
1156 .bit_or_expr = .{
1157 .op_tok = node_tok,
1158 .qt = @bitCast(node_data[0]),
1159 .lhs = @enumFromInt(node_data[1]),
1160 .rhs = @enumFromInt(node_data[2]),
1161 },
1162 },
1163 .bit_xor_expr => .{
1164 .bit_xor_expr = .{
1165 .op_tok = node_tok,
1166 .qt = @bitCast(node_data[0]),
1167 .lhs = @enumFromInt(node_data[1]),
1168 .rhs = @enumFromInt(node_data[2]),
1169 },
1170 },
1171 .bit_and_expr => .{
1172 .bit_and_expr = .{
1173 .op_tok = node_tok,
1174 .qt = @bitCast(node_data[0]),
1175 .lhs = @enumFromInt(node_data[1]),
1176 .rhs = @enumFromInt(node_data[2]),
1177 },
1178 },
1179 .equal_expr => .{
1180 .equal_expr = .{
1181 .op_tok = node_tok,
1182 .qt = @bitCast(node_data[0]),
1183 .lhs = @enumFromInt(node_data[1]),
1184 .rhs = @enumFromInt(node_data[2]),
1185 },
1186 },
1187 .not_equal_expr => .{
1188 .not_equal_expr = .{
1189 .op_tok = node_tok,
1190 .qt = @bitCast(node_data[0]),
1191 .lhs = @enumFromInt(node_data[1]),
1192 .rhs = @enumFromInt(node_data[2]),
1193 },
1194 },
1195 .less_than_expr => .{
1196 .less_than_expr = .{
1197 .op_tok = node_tok,
1198 .qt = @bitCast(node_data[0]),
1199 .lhs = @enumFromInt(node_data[1]),
1200 .rhs = @enumFromInt(node_data[2]),
1201 },
1202 },
1203 .less_than_equal_expr => .{
1204 .less_than_equal_expr = .{
1205 .op_tok = node_tok,
1206 .qt = @bitCast(node_data[0]),
1207 .lhs = @enumFromInt(node_data[1]),
1208 .rhs = @enumFromInt(node_data[2]),
1209 },
1210 },
1211 .greater_than_expr => .{
1212 .greater_than_expr = .{
1213 .op_tok = node_tok,
1214 .qt = @bitCast(node_data[0]),
1215 .lhs = @enumFromInt(node_data[1]),
1216 .rhs = @enumFromInt(node_data[2]),
1217 },
1218 },
1219 .greater_than_equal_expr => .{
1220 .greater_than_equal_expr = .{
1221 .op_tok = node_tok,
1222 .qt = @bitCast(node_data[0]),
1223 .lhs = @enumFromInt(node_data[1]),
1224 .rhs = @enumFromInt(node_data[2]),
1225 },
1226 },
1227 .shl_expr => .{
1228 .shl_expr = .{
1229 .op_tok = node_tok,
1230 .qt = @bitCast(node_data[0]),
1231 .lhs = @enumFromInt(node_data[1]),
1232 .rhs = @enumFromInt(node_data[2]),
1233 },
1234 },
1235 .shr_expr => .{
1236 .shr_expr = .{
1237 .op_tok = node_tok,
1238 .qt = @bitCast(node_data[0]),
1239 .lhs = @enumFromInt(node_data[1]),
1240 .rhs = @enumFromInt(node_data[2]),
1241 },
1242 },
1243 .add_expr => .{
1244 .add_expr = .{
1245 .op_tok = node_tok,
1246 .qt = @bitCast(node_data[0]),
1247 .lhs = @enumFromInt(node_data[1]),
1248 .rhs = @enumFromInt(node_data[2]),
1249 },
1250 },
1251 .sub_expr => .{
1252 .sub_expr = .{
1253 .op_tok = node_tok,
1254 .qt = @bitCast(node_data[0]),
1255 .lhs = @enumFromInt(node_data[1]),
1256 .rhs = @enumFromInt(node_data[2]),
1257 },
1258 },
1259 .mul_expr => .{
1260 .mul_expr = .{
1261 .op_tok = node_tok,
1262 .qt = @bitCast(node_data[0]),
1263 .lhs = @enumFromInt(node_data[1]),
1264 .rhs = @enumFromInt(node_data[2]),
1265 },
1266 },
1267 .div_expr => .{
1268 .div_expr = .{
1269 .op_tok = node_tok,
1270 .qt = @bitCast(node_data[0]),
1271 .lhs = @enumFromInt(node_data[1]),
1272 .rhs = @enumFromInt(node_data[2]),
1273 },
1274 },
1275 .mod_expr => .{
1276 .mod_expr = .{
1277 .op_tok = node_tok,
1278 .qt = @bitCast(node_data[0]),
1279 .lhs = @enumFromInt(node_data[1]),
1280 .rhs = @enumFromInt(node_data[2]),
1281 },
1282 },
1283 .explicit_cast => .{
1284 .cast = .{
1285 .l_paren = node_tok,
1286 .qt = @bitCast(node_data[0]),
1287 .kind = @enumFromInt(node_data[1]),
1288 .operand = @enumFromInt(node_data[2]),
1289 .implicit = false,
1290 },
1291 },
1292 .implicit_cast => .{
1293 .cast = .{
1294 .l_paren = node_tok,
1295 .qt = @bitCast(node_data[0]),
1296 .kind = @enumFromInt(node_data[1]),
1297 .operand = @enumFromInt(node_data[2]),
1298 .implicit = true,
1299 },
1300 },
1301 .addr_of_expr => .{
1302 .addr_of_expr = .{
1303 .op_tok = node_tok,
1304 .qt = @bitCast(node_data[0]),
1305 .operand = @enumFromInt(node_data[1]),
1306 },
1307 },
1308 .deref_expr => .{
1309 .deref_expr = .{
1310 .op_tok = node_tok,
1311 .qt = @bitCast(node_data[0]),
1312 .operand = @enumFromInt(node_data[1]),
1313 },
1314 },
1315 .plus_expr => .{
1316 .plus_expr = .{
1317 .op_tok = node_tok,
1318 .qt = @bitCast(node_data[0]),
1319 .operand = @enumFromInt(node_data[1]),
1320 },
1321 },
1322 .negate_expr => .{
1323 .negate_expr = .{
1324 .op_tok = node_tok,
1325 .qt = @bitCast(node_data[0]),
1326 .operand = @enumFromInt(node_data[1]),
1327 },
1328 },
1329 .bit_not_expr => .{
1330 .bit_not_expr = .{
1331 .op_tok = node_tok,
1332 .qt = @bitCast(node_data[0]),
1333 .operand = @enumFromInt(node_data[1]),
1334 },
1335 },
1336 .bool_not_expr => .{
1337 .bool_not_expr = .{
1338 .op_tok = node_tok,
1339 .qt = @bitCast(node_data[0]),
1340 .operand = @enumFromInt(node_data[1]),
1341 },
1342 },
1343 .pre_inc_expr => .{
1344 .pre_inc_expr = .{
1345 .op_tok = node_tok,
1346 .qt = @bitCast(node_data[0]),
1347 .operand = @enumFromInt(node_data[1]),
1348 },
1349 },
1350 .pre_dec_expr => .{
1351 .pre_dec_expr = .{
1352 .op_tok = node_tok,
1353 .qt = @bitCast(node_data[0]),
1354 .operand = @enumFromInt(node_data[1]),
1355 },
1356 },
1357 .imag_expr => .{
1358 .imag_expr = .{
1359 .op_tok = node_tok,
1360 .qt = @bitCast(node_data[0]),
1361 .operand = @enumFromInt(node_data[1]),
1362 },
1363 },
1364 .real_expr => .{
1365 .real_expr = .{
1366 .op_tok = node_tok,
1367 .qt = @bitCast(node_data[0]),
1368 .operand = @enumFromInt(node_data[1]),
1369 },
1370 },
1371 .post_inc_expr => .{
1372 .post_inc_expr = .{
1373 .op_tok = node_tok,
1374 .qt = @bitCast(node_data[0]),
1375 .operand = @enumFromInt(node_data[1]),
1376 },
1377 },
1378 .post_dec_expr => .{
1379 .post_dec_expr = .{
1380 .op_tok = node_tok,
1381 .qt = @bitCast(node_data[0]),
1382 .operand = @enumFromInt(node_data[1]),
1383 },
1384 },
1385 .paren_expr => .{
1386 .paren_expr = .{
1387 .op_tok = node_tok,
1388 .qt = @bitCast(node_data[0]),
1389 .operand = @enumFromInt(node_data[1]),
1390 },
1391 },
1392 .stmt_expr => .{
1393 .stmt_expr = .{
1394 .op_tok = node_tok,
1395 .qt = @bitCast(node_data[0]),
1396 .operand = @enumFromInt(node_data[1]),
1397 },
1398 },
1399 .cond_dummy_expr => .{
1400 .cond_dummy_expr = .{
1401 .op_tok = node_tok,
1402 .qt = @bitCast(node_data[0]),
1403 .operand = @enumFromInt(node_data[1]),
1404 },
1405 },
1406 .addr_of_label => .{
1407 .addr_of_label = .{
1408 .label_tok = node_tok,
1409 .qt = @bitCast(node_data[0]),
1410 },
1411 },
1412 .array_access_expr => .{
1413 .array_access_expr = .{
1414 .l_bracket_tok = node_tok,
1415 .qt = @bitCast(node_data[0]),
1416 .base = @enumFromInt(node_data[1]),
1417 .index = @enumFromInt(node_data[2]),
1418 },
1419 },
1420 .call_expr => .{
1421 .call_expr = .{
1422 .l_paren_tok = node_tok,
1423 .qt = @bitCast(node_data[0]),
1424 .callee = @enumFromInt(tree.extra.items[node_data[1]]),
1425 .args = @ptrCast(tree.extra.items[node_data[1] + 1 ..][0 .. node_data[2] - 1]),
1426 },
1427 },
1428 .call_expr_one => .{
1429 .call_expr = .{
1430 .l_paren_tok = node_tok,
1431 .qt = @bitCast(node_data[0]),
1432 .callee = @enumFromInt(node_data[1]),
1433 .args = unPackElems(node_data[2..]),
1434 },
1435 },
1436 .builtin_call_expr => .{
1437 .builtin_call_expr = .{
1438 .builtin_tok = node_tok,
1439 .qt = @bitCast(node_data[0]),
1440 .args = @ptrCast(tree.extra.items[node_data[1]..][0..node_data[2]]),
1441 },
1442 },
1443 .builtin_call_expr_two => .{
1444 .builtin_call_expr = .{
1445 .builtin_tok = node_tok,
1446 .qt = @bitCast(node_data[0]),
1447 .args = unPackElems(node_data[1..]),
1448 },
1449 },
1450 .member_access_expr => .{
1451 .member_access_expr = .{
1452 .access_tok = node_tok,
1453 .qt = @bitCast(node_data[0]),
1454 .base = @enumFromInt(node_data[1]),
1455 .member_index = node_data[2],
1456 },
1457 },
1458 .member_access_ptr_expr => .{
1459 .member_access_ptr_expr = .{
1460 .access_tok = node_tok,
1461 .qt = @bitCast(node_data[0]),
1462 .base = @enumFromInt(node_data[1]),
1463 .member_index = node_data[2],
1464 },
1465 },
1466 .decl_ref_expr => .{
1467 .decl_ref_expr = .{
1468 .name_tok = node_tok,
1469 .qt = @bitCast(node_data[0]),
1470 .decl = @enumFromInt(node_data[1]),
1471 },
1472 },
1473 .enumeration_ref => .{
1474 .enumeration_ref = .{
1475 .name_tok = node_tok,
1476 .qt = @bitCast(node_data[0]),
1477 .decl = @enumFromInt(node_data[1]),
1478 },
1479 },
1480 .builtin_ref => .{
1481 .builtin_ref = .{
1482 .name_tok = node_tok,
1483 .qt = @bitCast(node_data[0]),
1484 },
1485 },
1486 .bool_literal => .{
1487 .bool_literal = .{
1488 .literal_tok = node_tok,
1489 .qt = @bitCast(node_data[0]),
1490 },
1491 },
1492 .nullptr_literal => .{
1493 .nullptr_literal = .{
1494 .literal_tok = node_tok,
1495 .qt = @bitCast(node_data[0]),
1496 },
1497 },
1498 .int_literal => .{
1499 .int_literal = .{
1500 .literal_tok = node_tok,
1501 .qt = @bitCast(node_data[0]),
1502 },
1503 },
1504 .char_literal => .{
1505 .char_literal = .{
1506 .literal_tok = node_tok,
1507 .qt = @bitCast(node_data[0]),
1508 .kind = @enumFromInt(node_data[1]),
1509 },
1510 },
1511 .float_literal => .{
1512 .float_literal = .{
1513 .literal_tok = node_tok,
1514 .qt = @bitCast(node_data[0]),
1515 },
1516 },
1517 .string_literal_expr => .{
1518 .string_literal_expr = .{
1519 .literal_tok = node_tok,
1520 .qt = @bitCast(node_data[0]),
1521 .kind = @enumFromInt(node_data[1]),
1522 },
1523 },
1524 .imaginary_literal => .{
1525 .imaginary_literal = .{
1526 .op_tok = node_tok,
1527 .qt = @bitCast(node_data[0]),
1528 .operand = @enumFromInt(node_data[1]),
1529 },
1530 },
1531 .sizeof_expr => .{
1532 .sizeof_expr = .{
1533 .op_tok = node_tok,
1534 .qt = @bitCast(node_data[0]),
1535 .expr = unpackOptIndex(node_data[1]),
1536 .operand_qt = @bitCast(node_data[2]),
1537 },
1538 },
1539 .alignof_expr => .{
1540 .alignof_expr = .{
1541 .op_tok = node_tok,
1542 .qt = @bitCast(node_data[0]),
1543 .expr = unpackOptIndex(node_data[1]),
1544 .operand_qt = @bitCast(node_data[2]),
1545 },
1546 },
1547
1548 .generic_expr_zero => .{
1549 .generic_expr = .{
1550 .generic_tok = node_tok,
1551 .qt = @bitCast(node_data[0]),
1552 .controlling = @enumFromInt(node_data[1]),
1553 .chosen = @enumFromInt(node_data[2]),
1554 .rest = &.{},
1555 },
1556 },
1557 .generic_expr => .{
1558 .generic_expr = .{
1559 .generic_tok = node_tok,
1560 .qt = @bitCast(node_data[0]),
1561 .controlling = @enumFromInt(tree.extra.items[node_data[1]]),
1562 .chosen = @enumFromInt(tree.extra.items[node_data[1] + 1]),
1563 .rest = @ptrCast(tree.extra.items[node_data[1] + 2 ..][0 .. node_data[2] - 2]),
1564 },
1565 },
1566 .generic_association_expr => .{
1567 .generic_association_expr = .{
1568 .colon_tok = node_tok,
1569 .association_qt = @bitCast(node_data[0]),
1570 .expr = @enumFromInt(node_data[1]),
1571 },
1572 },
1573 .generic_default_expr => .{
1574 .generic_default_expr = .{
1575 .default_tok = node_tok,
1576 .expr = @enumFromInt(node_data[0]),
1577 },
1578 },
1579 .binary_cond_expr => .{
1580 .binary_cond_expr = .{
1581 .cond_tok = node_tok,
1582 .qt = @bitCast(node_data[0]),
1583 .cond = @enumFromInt(node_data[1]),
1584 .then_expr = @enumFromInt(tree.extra.items[node_data[2]]),
1585 .else_expr = @enumFromInt(tree.extra.items[node_data[2] + 1]),
1586 },
1587 },
1588 .cond_expr => .{
1589 .cond_expr = .{
1590 .cond_tok = node_tok,
1591 .qt = @bitCast(node_data[0]),
1592 .cond = @enumFromInt(node_data[1]),
1593 .then_expr = @enumFromInt(tree.extra.items[node_data[2]]),
1594 .else_expr = @enumFromInt(tree.extra.items[node_data[2] + 1]),
1595 },
1596 },
1597 .builtin_choose_expr => .{
1598 .builtin_choose_expr = .{
1599 .cond_tok = node_tok,
1600 .qt = @bitCast(node_data[0]),
1601 .cond = @enumFromInt(node_data[1]),
1602 .then_expr = @enumFromInt(tree.extra.items[node_data[2]]),
1603 .else_expr = @enumFromInt(tree.extra.items[node_data[2] + 1]),
1604 },
1605 },
1606 .builtin_types_compatible_p => .{
1607 .builtin_types_compatible_p = .{
1608 .builtin_tok = node_tok,
1609 .lhs = @bitCast(node_data[0]),
1610 .rhs = @bitCast(node_data[1]),
1611 },
1612 },
1613 .builtin_convertvector => .{
1614 .builtin_convertvector = .{
1615 .builtin_tok = node_tok,
1616 .dest_qt = @bitCast(node_data[0]),
1617 .operand = @enumFromInt(node_data[1]),
1618 },
1619 },
1620 .builtin_shufflevector => .{
1621 .builtin_shufflevector = .{
1622 .builtin_tok = node_tok,
1623 .qt = @bitCast(node_data[0]),
1624 .lhs = @enumFromInt(tree.extra.items[node_data[1]]),
1625 .rhs = @enumFromInt(tree.extra.items[node_data[1] + 1]),
1626 .indexes = @ptrCast(tree.extra.items[node_data[1] + 2 ..][0..node_data[2]]),
1627 },
1628 },
1629 .array_init_expr_two => .{
1630 .array_init_expr = .{
1631 .l_brace_tok = node_tok,
1632 .container_qt = @bitCast(node_data[0]),
1633 .items = unPackElems(node_data[1..]),
1634 },
1635 },
1636 .array_init_expr => .{
1637 .array_init_expr = .{
1638 .l_brace_tok = node_tok,
1639 .container_qt = @bitCast(node_data[0]),
1640 .items = @ptrCast(tree.extra.items[node_data[1]..][0..node_data[2]]),
1641 },
1642 },
1643 .struct_init_expr_two => .{
1644 .struct_init_expr = .{
1645 .l_brace_tok = node_tok,
1646 .container_qt = @bitCast(node_data[0]),
1647 .items = unPackElems(node_data[1..]),
1648 },
1649 },
1650 .struct_init_expr => .{
1651 .struct_init_expr = .{
1652 .l_brace_tok = node_tok,
1653 .container_qt = @bitCast(node_data[0]),
1654 .items = @ptrCast(tree.extra.items[node_data[1]..][0..node_data[2]]),
1655 },
1656 },
1657 .union_init_expr => .{
1658 .union_init_expr = .{
1659 .l_brace_tok = node_tok,
1660 .union_qt = @bitCast(node_data[0]),
1661 .field_index = node_data[1],
1662 .initializer = unpackOptIndex(node_data[2]),
1663 },
1664 },
1665 .array_filler_expr => .{
1666 .array_filler_expr = .{
1667 .last_tok = node_tok,
1668 .qt = @bitCast(node_data[0]),
1669 .count = @bitCast(node_data[1..].*),
1670 },
1671 },
1672 .default_init_expr => .{
1673 .default_init_expr = .{
1674 .last_tok = node_tok,
1675 .qt = @bitCast(node_data[0]),
1676 },
1677 },
1678 .compound_literal_expr => {
1679 const attr: Node.Repr.DeclAttr = @bitCast(node_data[1]);
1680 return .{
1681 .compound_literal_expr = .{
1682 .l_paren_tok = node_tok,
1683 .qt = @bitCast(node_data[0]),
1684 .storage_class = if (attr.static)
1685 .static
1686 else if (attr.register)
1687 .register
1688 else
1689 .auto,
1690 .thread_local = attr.thread_local,
1691 .initializer = @enumFromInt(node_data[2]),
1692 },
1693 };
1694 },
1695 };
1696 }
1697
1698 pub fn tok(index: Index, tree: *const Tree) TokenIndex {
1699 return tree.nodes.items(.tok)[@intFromEnum(index)];
1700 }
1701
1702 pub fn loc(index: Index, tree: *const Tree) ?Source.Location {
1703 const tok_i = index.tok(tree);
1704 return tree.tokens.items(.loc)[@intFromEnum(tok_i)];
1705 }
1706
1707 pub fn qt(index: Index, tree: *const Tree) QualType {
1708 return index.qtOrNull(tree) orelse .void;
1709 }
1710
1711 pub fn qtOrNull(index: Index, tree: *const Tree) ?QualType {
1712 return switch (tree.nodes.items(.tag)[@intFromEnum(index)]) {
1713 .empty_decl,
1714 .static_assert,
1715 .compound_stmt,
1716 .compound_stmt_three,
1717 .if_stmt,
1718 .switch_stmt,
1719 .case_stmt,
1720 .default_stmt,
1721 .while_stmt,
1722 .do_while_stmt,
1723 .for_decl,
1724 .for_expr,
1725 .goto_stmt,
1726 .computed_goto_stmt,
1727 .continue_stmt,
1728 .break_stmt,
1729 .gnu_asm_simple,
1730 .global_asm,
1731 .generic_association_expr,
1732 .generic_default_expr,
1733 => null,
1734 .builtin_types_compatible_p => .int,
1735 else => {
1736 // If a node is typed the type is stored in data[0].
1737 return @bitCast(tree.nodes.items(.data)[@intFromEnum(index)][0]);
1738 },
1739 };
1740 }
1741 };
1742
1743 pub const OptIndex = enum(u32) {
1744 null = std.math.maxInt(u32),
1745 _,
1746
1747 pub fn unpack(opt: OptIndex) ?Index {
1748 return if (opt == .null) null else @enumFromInt(@intFromEnum(opt));
1749 }
1750
1751 pub fn pack(index: Index) OptIndex {
1752 return @enumFromInt(@intFromEnum(index));
1753 }
1754
1755 pub fn packOpt(optional: ?Index) OptIndex {
1756 return if (optional) |some| @enumFromInt(@intFromEnum(some)) else .null;
1757 }
1758 };
1759
1760 pub const Repr = struct {
1761 tag: Tag,
1762 /// If a node is typed the type is stored in data[0]
1763 data: [3]u32,
1764 tok: TokenIndex,
1765
1766 pub const DeclAttr = packed struct(u32) {
1767 @"extern": bool = false,
1768 static: bool = false,
1769 @"inline": bool = false,
1770 thread_local: bool = false,
1771 implicit: bool = false,
1772 register: bool = false,
1773 _: u26 = 0,
1774 };
1775
1776 pub const Tag = enum(u8) {
1777 empty_decl,
1778 static_assert,
1779 fn_proto,
1780 fn_def,
1781 param,
1782 variable,
1783 variable_def,
1784 typedef,
1785 global_asm,
1786 struct_decl,
1787 union_decl,
1788 enum_decl,
1789 struct_decl_two,
1790 union_decl_two,
1791 enum_decl_two,
1792 struct_forward_decl,
1793 union_forward_decl,
1794 enum_forward_decl,
1795 enum_field,
1796 record_field,
1797 labeled_stmt,
1798 compound_stmt,
1799 compound_stmt_three,
1800 if_stmt,
1801 switch_stmt,
1802 case_stmt,
1803 default_stmt,
1804 while_stmt,
1805 do_while_stmt,
1806 for_expr,
1807 for_decl,
1808 goto_stmt,
1809 computed_goto_stmt,
1810 continue_stmt,
1811 break_stmt,
1812 null_stmt,
1813 return_stmt,
1814 return_none_stmt,
1815 implicit_return,
1816 gnu_asm_simple,
1817 comma_expr,
1818 assign_expr,
1819 mul_assign_expr,
1820 div_assign_expr,
1821 mod_assign_expr,
1822 add_assign_expr,
1823 sub_assign_expr,
1824 shl_assign_expr,
1825 shr_assign_expr,
1826 bit_and_assign_expr,
1827 bit_xor_assign_expr,
1828 bit_or_assign_expr,
1829 compound_assign_dummy_expr,
1830 bool_or_expr,
1831 bool_and_expr,
1832 bit_or_expr,
1833 bit_xor_expr,
1834 bit_and_expr,
1835 equal_expr,
1836 not_equal_expr,
1837 less_than_expr,
1838 less_than_equal_expr,
1839 greater_than_expr,
1840 greater_than_equal_expr,
1841 shl_expr,
1842 shr_expr,
1843 add_expr,
1844 sub_expr,
1845 mul_expr,
1846 div_expr,
1847 mod_expr,
1848 explicit_cast,
1849 implicit_cast,
1850 addr_of_expr,
1851 deref_expr,
1852 plus_expr,
1853 negate_expr,
1854 bit_not_expr,
1855 bool_not_expr,
1856 pre_inc_expr,
1857 pre_dec_expr,
1858 imag_expr,
1859 real_expr,
1860 post_inc_expr,
1861 post_dec_expr,
1862 paren_expr,
1863 stmt_expr,
1864 addr_of_label,
1865 array_access_expr,
1866 call_expr_one,
1867 call_expr,
1868 builtin_call_expr,
1869 builtin_call_expr_two,
1870 member_access_expr,
1871 member_access_ptr_expr,
1872 decl_ref_expr,
1873 enumeration_ref,
1874 builtin_ref,
1875 bool_literal,
1876 nullptr_literal,
1877 int_literal,
1878 char_literal,
1879 float_literal,
1880 string_literal_expr,
1881 imaginary_literal,
1882 sizeof_expr,
1883 alignof_expr,
1884 generic_expr,
1885 generic_expr_zero,
1886 generic_association_expr,
1887 generic_default_expr,
1888 binary_cond_expr,
1889 cond_dummy_expr,
1890 cond_expr,
1891 builtin_choose_expr,
1892 builtin_types_compatible_p,
1893 builtin_convertvector,
1894 builtin_shufflevector,
1895 array_init_expr,
1896 array_init_expr_two,
1897 struct_init_expr,
1898 struct_init_expr_two,
1899 union_init_expr,
1900 array_filler_expr,
1901 default_init_expr,
1902 compound_literal_expr,
1903 };
1904 };
1905
1906 pub fn isImplicit(node: Node) bool {
1907 return switch (node) {
1908 .array_filler_expr,
1909 .default_init_expr,
1910 .cond_dummy_expr,
1911 .compound_assign_dummy_expr,
1912 => true,
1913 .return_stmt => |ret| ret.operand == .implicit,
1914 .cast => |cast| cast.implicit,
1915 .variable => |info| info.implicit,
1916 .typedef => |info| info.implicit,
1917 else => false,
1918 };
1919 }
1920};
1921
1922pub fn addNode(tree: *Tree, node: Node) !Node.Index {
1923 const index = try tree.nodes.addOne(tree.comp.gpa);
1924 try tree.setNode(node, index);
1925 return @enumFromInt(index);
1926}
1927
1928pub fn setNode(tree: *Tree, node: Node, index: usize) !void {
1929 var repr: Node.Repr = undefined;
1930 switch (node) {
1931 .empty_decl => |empty| {
1932 repr.tag = .empty_decl;
1933 repr.tok = empty.semicolon;
1934 },
1935 .static_assert => |assert| {
1936 repr.tag = .static_assert;
1937 repr.data[0] = @intFromEnum(assert.cond);
1938 repr.data[1] = packOptIndex(assert.message);
1939 repr.tok = assert.assert_tok;
1940 },
1941 .function => |function| {
1942 repr.tag = if (function.body != null) .fn_def else .fn_proto;
1943 repr.data[0] = @bitCast(function.qt);
1944 repr.data[1] = @bitCast(Node.Repr.DeclAttr{
1945 .static = function.static,
1946 .@"inline" = function.@"inline",
1947 });
1948 if (function.body) |some| {
1949 repr.data[2] = @intFromEnum(some);
1950 } else {
1951 repr.data[2] = packOptIndex(function.definition);
1952 }
1953 repr.tok = function.name_tok;
1954 },
1955 .param => |param| {
1956 repr.tag = .param;
1957 repr.data[0] = @bitCast(param.qt);
1958 repr.data[1] = @bitCast(Node.Repr.DeclAttr{
1959 .register = param.storage_class == .register,
1960 });
1961 repr.tok = param.name_tok;
1962 },
1963 .variable => |variable| {
1964 repr.tag = if (variable.initializer != null) .variable_def else .variable;
1965 repr.data[0] = @bitCast(variable.qt);
1966 repr.data[1] = @bitCast(Node.Repr.DeclAttr{
1967 .@"extern" = variable.storage_class == .@"extern",
1968 .static = variable.storage_class == .static,
1969 .thread_local = variable.thread_local,
1970 .implicit = variable.implicit,
1971 .register = variable.storage_class == .register,
1972 });
1973 if (variable.initializer) |some| {
1974 repr.data[2] = @intFromEnum(some);
1975 } else {
1976 repr.data[2] = packOptIndex(variable.definition);
1977 }
1978 repr.tok = variable.name_tok;
1979 },
1980 .typedef => |typedef| {
1981 repr.tag = .typedef;
1982 repr.data[0] = @bitCast(typedef.qt);
1983 repr.data[1] = @intFromBool(typedef.implicit);
1984 repr.tok = typedef.name_tok;
1985 },
1986 .global_asm => |global_asm| {
1987 repr.tag = .global_asm;
1988 repr.data[0] = @intFromEnum(global_asm.asm_str);
1989 repr.tok = global_asm.asm_tok;
1990 },
1991 .struct_decl => |decl| {
1992 repr.data[0] = @bitCast(decl.container_qt);
1993 if (decl.fields.len > 2) {
1994 repr.tag = .struct_decl;
1995 repr.data[1], repr.data[2] = try tree.addExtra(decl.fields);
1996 } else {
1997 repr.tag = .struct_decl_two;
1998 repr.data[1] = packElem(decl.fields, 0);
1999 repr.data[2] = packElem(decl.fields, 1);
2000 }
2001 repr.tok = decl.name_or_kind_tok;
2002 },
2003 .union_decl => |decl| {
2004 repr.data[0] = @bitCast(decl.container_qt);
2005 if (decl.fields.len > 2) {
2006 repr.tag = .union_decl;
2007 repr.data[1], repr.data[2] = try tree.addExtra(decl.fields);
2008 } else {
2009 repr.tag = .union_decl_two;
2010 repr.data[1] = packElem(decl.fields, 0);
2011 repr.data[2] = packElem(decl.fields, 1);
2012 }
2013 repr.tok = decl.name_or_kind_tok;
2014 },
2015 .enum_decl => |decl| {
2016 repr.data[0] = @bitCast(decl.container_qt);
2017 if (decl.fields.len > 2) {
2018 repr.tag = .enum_decl;
2019 repr.data[1], repr.data[2] = try tree.addExtra(decl.fields);
2020 } else {
2021 repr.tag = .enum_decl_two;
2022 repr.data[1] = packElem(decl.fields, 0);
2023 repr.data[2] = packElem(decl.fields, 1);
2024 }
2025 repr.tok = decl.name_or_kind_tok;
2026 },
2027 .struct_forward_decl => |decl| {
2028 repr.tag = .struct_forward_decl;
2029 repr.data[0] = @bitCast(decl.container_qt);
2030 // TODO decide how to handle definition
2031 // repr.data[1] = decl.definition;
2032 repr.tok = decl.name_or_kind_tok;
2033 },
2034 .union_forward_decl => |decl| {
2035 repr.tag = .union_forward_decl;
2036 repr.data[0] = @bitCast(decl.container_qt);
2037 // TODO decide how to handle definition
2038 // repr.data[1] = decl.definition;
2039 repr.tok = decl.name_or_kind_tok;
2040 },
2041 .enum_forward_decl => |decl| {
2042 repr.tag = .enum_forward_decl;
2043 repr.data[0] = @bitCast(decl.container_qt);
2044 // TODO decide how to handle definition
2045 // repr.data[1] = decl.definition;
2046 repr.tok = decl.name_or_kind_tok;
2047 },
2048 .enum_field => |field| {
2049 repr.tag = .enum_field;
2050 repr.data[0] = @bitCast(field.qt);
2051 repr.data[1] = packOptIndex(field.init);
2052 repr.tok = field.name_tok;
2053 },
2054 .record_field => |field| {
2055 repr.tag = .record_field;
2056 repr.data[0] = @bitCast(field.qt);
2057 repr.data[1] = packOptIndex(field.bit_width);
2058 repr.tok = field.name_or_first_tok;
2059 },
2060 .labeled_stmt => |labeled| {
2061 repr.tag = .labeled_stmt;
2062 repr.data[0] = @bitCast(labeled.qt);
2063 repr.data[1] = @intFromEnum(labeled.body);
2064 repr.tok = labeled.label_tok;
2065 },
2066 .compound_stmt => |compound| {
2067 if (compound.body.len > 3) {
2068 repr.tag = .compound_stmt;
2069 repr.data[0], repr.data[1] = try tree.addExtra(compound.body);
2070 } else {
2071 repr.tag = .compound_stmt_three;
2072 for (&repr.data, 0..) |*data, idx|
2073 data.* = packElem(compound.body, idx);
2074 }
2075 repr.tok = compound.l_brace_tok;
2076 },
2077 .if_stmt => |@"if"| {
2078 repr.tag = .if_stmt;
2079 repr.data[0] = @intFromEnum(@"if".cond);
2080 repr.data[1] = @intFromEnum(@"if".then_body);
2081 repr.data[2] = packOptIndex(@"if".else_body);
2082 repr.tok = @"if".if_tok;
2083 },
2084 .switch_stmt => |@"switch"| {
2085 repr.tag = .switch_stmt;
2086 repr.data[0] = @intFromEnum(@"switch".cond);
2087 repr.data[1] = @intFromEnum(@"switch".body);
2088 repr.tok = @"switch".switch_tok;
2089 },
2090 .case_stmt => |case| {
2091 repr.tag = .case_stmt;
2092 repr.data[0] = @intFromEnum(case.start);
2093 repr.data[1] = packOptIndex(case.end);
2094 repr.data[2] = packOptIndex(case.body);
2095 repr.tok = case.case_tok;
2096 },
2097 .default_stmt => |default| {
2098 repr.tag = .default_stmt;
2099 repr.data[0] = @intFromEnum(default.body);
2100 repr.tok = default.default_tok;
2101 },
2102 .while_stmt => |@"while"| {
2103 repr.tag = .while_stmt;
2104 repr.data[0] = @intFromEnum(@"while".cond);
2105 repr.data[1] = @intFromEnum(@"while".body);
2106 repr.tok = @"while".while_tok;
2107 },
2108 .do_while_stmt => |do_while| {
2109 repr.tag = .do_while_stmt;
2110 repr.data[0] = @intFromEnum(do_while.cond);
2111 repr.data[1] = @intFromEnum(do_while.body);
2112 repr.tok = do_while.do_tok;
2113 },
2114 .for_stmt => |@"for"| {
2115 switch (@"for".init) {
2116 .decls => |decls| {
2117 repr.tag = .for_decl;
2118 repr.data[0] = @intCast(tree.extra.items.len);
2119 const len: u32 = @intCast(decls.len + 2);
2120 try tree.extra.ensureUnusedCapacity(tree.comp.gpa, len);
2121 repr.data[1] = len;
2122 tree.extra.appendSliceAssumeCapacity(@ptrCast(decls));
2123 tree.extra.appendAssumeCapacity(packOptIndex(@"for".cond));
2124 tree.extra.appendAssumeCapacity(packOptIndex(@"for".incr));
2125 },
2126 .expr => |expr| {
2127 repr.tag = .for_expr;
2128 repr.data[0] = packOptIndex(expr);
2129 repr.data[1] = @intCast(tree.extra.items.len);
2130 try tree.extra.ensureUnusedCapacity(tree.comp.gpa, 2);
2131 tree.extra.appendAssumeCapacity(packOptIndex(@"for".cond));
2132 tree.extra.appendAssumeCapacity(packOptIndex(@"for".incr));
2133 },
2134 }
2135 repr.data[2] = @intFromEnum(@"for".body);
2136 repr.tok = @"for".for_tok;
2137 },
2138 .goto_stmt => |goto| {
2139 repr.tag = .goto_stmt;
2140 repr.tok = goto.label_tok;
2141 },
2142 .computed_goto_stmt => |computed_goto| {
2143 repr.tag = .computed_goto_stmt;
2144 repr.data[0] = @intFromEnum(computed_goto.expr);
2145 repr.tok = computed_goto.goto_tok;
2146 },
2147 .continue_stmt => |@"continue"| {
2148 repr.tag = .continue_stmt;
2149 repr.tok = @"continue".continue_tok;
2150 },
2151 .break_stmt => |@"break"| {
2152 repr.tag = .break_stmt;
2153 repr.tok = @"break".break_tok;
2154 },
2155 .null_stmt => |@"null"| {
2156 repr.tag = .null_stmt;
2157 repr.data[0] = @bitCast(@"null".qt);
2158 repr.tok = @"null".semicolon_or_r_brace_tok;
2159 },
2160 .return_stmt => |@"return"| {
2161 repr.data[0] = @bitCast(@"return".return_qt);
2162 switch (@"return".operand) {
2163 .expr => |expr| {
2164 repr.tag = .return_stmt;
2165 repr.data[1] = @intFromEnum(expr);
2166 },
2167 .none => {
2168 repr.tag = .return_none_stmt;
2169 },
2170 .implicit => |zeroes| {
2171 repr.tag = .implicit_return;
2172 repr.data[1] = @intFromBool(zeroes);
2173 },
2174 }
2175 repr.tok = @"return".return_tok;
2176 },
2177 .gnu_asm_simple => |gnu_asm_simple| {
2178 repr.tag = .gnu_asm_simple;
2179 repr.data[0] = @intFromEnum(gnu_asm_simple.asm_str);
2180 repr.tok = gnu_asm_simple.asm_tok;
2181 },
2182 .assign_expr => |bin| {
2183 repr.tag = .assign_expr;
2184 repr.data[0] = @bitCast(bin.qt);
2185 repr.data[1] = @intFromEnum(bin.lhs);
2186 repr.data[2] = @intFromEnum(bin.rhs);
2187 repr.tok = bin.op_tok;
2188 },
2189 .mul_assign_expr => |bin| {
2190 repr.tag = .mul_assign_expr;
2191 repr.data[0] = @bitCast(bin.qt);
2192 repr.data[1] = @intFromEnum(bin.lhs);
2193 repr.data[2] = @intFromEnum(bin.rhs);
2194 repr.tok = bin.op_tok;
2195 },
2196 .div_assign_expr => |bin| {
2197 repr.tag = .div_assign_expr;
2198 repr.data[0] = @bitCast(bin.qt);
2199 repr.data[1] = @intFromEnum(bin.lhs);
2200 repr.data[2] = @intFromEnum(bin.rhs);
2201 repr.tok = bin.op_tok;
2202 },
2203 .mod_assign_expr => |bin| {
2204 repr.tag = .mod_assign_expr;
2205 repr.data[0] = @bitCast(bin.qt);
2206 repr.data[1] = @intFromEnum(bin.lhs);
2207 repr.data[2] = @intFromEnum(bin.rhs);
2208 repr.tok = bin.op_tok;
2209 },
2210 .add_assign_expr => |bin| {
2211 repr.tag = .add_assign_expr;
2212 repr.data[0] = @bitCast(bin.qt);
2213 repr.data[1] = @intFromEnum(bin.lhs);
2214 repr.data[2] = @intFromEnum(bin.rhs);
2215 repr.tok = bin.op_tok;
2216 },
2217 .sub_assign_expr => |bin| {
2218 repr.tag = .sub_assign_expr;
2219 repr.data[0] = @bitCast(bin.qt);
2220 repr.data[1] = @intFromEnum(bin.lhs);
2221 repr.data[2] = @intFromEnum(bin.rhs);
2222 repr.tok = bin.op_tok;
2223 },
2224 .shl_assign_expr => |bin| {
2225 repr.tag = .shl_assign_expr;
2226 repr.data[0] = @bitCast(bin.qt);
2227 repr.data[1] = @intFromEnum(bin.lhs);
2228 repr.data[2] = @intFromEnum(bin.rhs);
2229 repr.tok = bin.op_tok;
2230 },
2231 .shr_assign_expr => |bin| {
2232 repr.tag = .shr_assign_expr;
2233 repr.data[0] = @bitCast(bin.qt);
2234 repr.data[1] = @intFromEnum(bin.lhs);
2235 repr.data[2] = @intFromEnum(bin.rhs);
2236 repr.tok = bin.op_tok;
2237 },
2238 .bit_and_assign_expr => |bin| {
2239 repr.tag = .bit_and_assign_expr;
2240 repr.data[0] = @bitCast(bin.qt);
2241 repr.data[1] = @intFromEnum(bin.lhs);
2242 repr.data[2] = @intFromEnum(bin.rhs);
2243 repr.tok = bin.op_tok;
2244 },
2245 .bit_xor_assign_expr => |bin| {
2246 repr.tag = .bit_xor_assign_expr;
2247 repr.data[0] = @bitCast(bin.qt);
2248 repr.data[1] = @intFromEnum(bin.lhs);
2249 repr.data[2] = @intFromEnum(bin.rhs);
2250 repr.tok = bin.op_tok;
2251 },
2252 .bit_or_assign_expr => |bin| {
2253 repr.tag = .bit_or_assign_expr;
2254 repr.data[0] = @bitCast(bin.qt);
2255 repr.data[1] = @intFromEnum(bin.lhs);
2256 repr.data[2] = @intFromEnum(bin.rhs);
2257 repr.tok = bin.op_tok;
2258 },
2259 .compound_assign_dummy_expr => |un| {
2260 repr.tag = .compound_assign_dummy_expr;
2261 repr.data[0] = @bitCast(un.qt);
2262 repr.data[1] = @intFromEnum(un.operand);
2263 repr.tok = un.op_tok;
2264 },
2265 .comma_expr => |bin| {
2266 repr.tag = .comma_expr;
2267 repr.data[0] = @bitCast(bin.qt);
2268 repr.data[1] = @intFromEnum(bin.lhs);
2269 repr.data[2] = @intFromEnum(bin.rhs);
2270 repr.tok = bin.op_tok;
2271 },
2272 .bool_or_expr => |bin| {
2273 repr.tag = .bool_or_expr;
2274 repr.data[0] = @bitCast(bin.qt);
2275 repr.data[1] = @intFromEnum(bin.lhs);
2276 repr.data[2] = @intFromEnum(bin.rhs);
2277 repr.tok = bin.op_tok;
2278 },
2279 .bool_and_expr => |bin| {
2280 repr.tag = .bool_and_expr;
2281 repr.data[0] = @bitCast(bin.qt);
2282 repr.data[1] = @intFromEnum(bin.lhs);
2283 repr.data[2] = @intFromEnum(bin.rhs);
2284 repr.tok = bin.op_tok;
2285 },
2286 .bit_or_expr => |bin| {
2287 repr.tag = .bit_or_expr;
2288 repr.data[0] = @bitCast(bin.qt);
2289 repr.data[1] = @intFromEnum(bin.lhs);
2290 repr.data[2] = @intFromEnum(bin.rhs);
2291 repr.tok = bin.op_tok;
2292 },
2293 .bit_xor_expr => |bin| {
2294 repr.tag = .bit_xor_expr;
2295 repr.data[0] = @bitCast(bin.qt);
2296 repr.data[1] = @intFromEnum(bin.lhs);
2297 repr.data[2] = @intFromEnum(bin.rhs);
2298 repr.tok = bin.op_tok;
2299 },
2300 .bit_and_expr => |bin| {
2301 repr.tag = .bit_and_expr;
2302 repr.data[0] = @bitCast(bin.qt);
2303 repr.data[1] = @intFromEnum(bin.lhs);
2304 repr.data[2] = @intFromEnum(bin.rhs);
2305 repr.tok = bin.op_tok;
2306 },
2307 .equal_expr => |bin| {
2308 repr.tag = .equal_expr;
2309 repr.data[0] = @bitCast(bin.qt);
2310 repr.data[1] = @intFromEnum(bin.lhs);
2311 repr.data[2] = @intFromEnum(bin.rhs);
2312 repr.tok = bin.op_tok;
2313 },
2314 .not_equal_expr => |bin| {
2315 repr.tag = .not_equal_expr;
2316 repr.data[0] = @bitCast(bin.qt);
2317 repr.data[1] = @intFromEnum(bin.lhs);
2318 repr.data[2] = @intFromEnum(bin.rhs);
2319 repr.tok = bin.op_tok;
2320 },
2321 .less_than_expr => |bin| {
2322 repr.tag = .less_than_expr;
2323 repr.data[0] = @bitCast(bin.qt);
2324 repr.data[1] = @intFromEnum(bin.lhs);
2325 repr.data[2] = @intFromEnum(bin.rhs);
2326 repr.tok = bin.op_tok;
2327 },
2328 .less_than_equal_expr => |bin| {
2329 repr.tag = .less_than_equal_expr;
2330 repr.data[0] = @bitCast(bin.qt);
2331 repr.data[1] = @intFromEnum(bin.lhs);
2332 repr.data[2] = @intFromEnum(bin.rhs);
2333 repr.tok = bin.op_tok;
2334 },
2335 .greater_than_expr => |bin| {
2336 repr.tag = .greater_than_expr;
2337 repr.data[0] = @bitCast(bin.qt);
2338 repr.data[1] = @intFromEnum(bin.lhs);
2339 repr.data[2] = @intFromEnum(bin.rhs);
2340 repr.tok = bin.op_tok;
2341 },
2342 .greater_than_equal_expr => |bin| {
2343 repr.tag = .greater_than_equal_expr;
2344 repr.data[0] = @bitCast(bin.qt);
2345 repr.data[1] = @intFromEnum(bin.lhs);
2346 repr.data[2] = @intFromEnum(bin.rhs);
2347 repr.tok = bin.op_tok;
2348 },
2349 .shl_expr => |bin| {
2350 repr.tag = .shl_expr;
2351 repr.data[0] = @bitCast(bin.qt);
2352 repr.data[1] = @intFromEnum(bin.lhs);
2353 repr.data[2] = @intFromEnum(bin.rhs);
2354 repr.tok = bin.op_tok;
2355 },
2356 .shr_expr => |bin| {
2357 repr.tag = .shr_expr;
2358 repr.data[0] = @bitCast(bin.qt);
2359 repr.data[1] = @intFromEnum(bin.lhs);
2360 repr.data[2] = @intFromEnum(bin.rhs);
2361 repr.tok = bin.op_tok;
2362 },
2363 .add_expr => |bin| {
2364 repr.tag = .add_expr;
2365 repr.data[0] = @bitCast(bin.qt);
2366 repr.data[1] = @intFromEnum(bin.lhs);
2367 repr.data[2] = @intFromEnum(bin.rhs);
2368 repr.tok = bin.op_tok;
2369 },
2370 .sub_expr => |bin| {
2371 repr.tag = .sub_expr;
2372 repr.data[0] = @bitCast(bin.qt);
2373 repr.data[1] = @intFromEnum(bin.lhs);
2374 repr.data[2] = @intFromEnum(bin.rhs);
2375 repr.tok = bin.op_tok;
2376 },
2377 .mul_expr => |bin| {
2378 repr.tag = .mul_expr;
2379 repr.data[0] = @bitCast(bin.qt);
2380 repr.data[1] = @intFromEnum(bin.lhs);
2381 repr.data[2] = @intFromEnum(bin.rhs);
2382 repr.tok = bin.op_tok;
2383 },
2384 .div_expr => |bin| {
2385 repr.tag = .div_expr;
2386 repr.data[0] = @bitCast(bin.qt);
2387 repr.data[1] = @intFromEnum(bin.lhs);
2388 repr.data[2] = @intFromEnum(bin.rhs);
2389 repr.tok = bin.op_tok;
2390 },
2391 .mod_expr => |bin| {
2392 repr.tag = .mod_expr;
2393 repr.data[0] = @bitCast(bin.qt);
2394 repr.data[1] = @intFromEnum(bin.lhs);
2395 repr.data[2] = @intFromEnum(bin.rhs);
2396 repr.tok = bin.op_tok;
2397 },
2398 .cast => |cast| {
2399 repr.tag = if (cast.implicit) .implicit_cast else .explicit_cast;
2400 repr.data[0] = @bitCast(cast.qt);
2401 repr.data[1] = @intFromEnum(cast.kind);
2402 repr.data[2] = @intFromEnum(cast.operand);
2403 repr.tok = cast.l_paren;
2404 },
2405 .addr_of_expr => |un| {
2406 repr.tag = .addr_of_expr;
2407 repr.data[0] = @bitCast(un.qt);
2408 repr.data[1] = @intFromEnum(un.operand);
2409 repr.tok = un.op_tok;
2410 },
2411 .deref_expr => |un| {
2412 repr.tag = .deref_expr;
2413 repr.data[0] = @bitCast(un.qt);
2414 repr.data[1] = @intFromEnum(un.operand);
2415 repr.tok = un.op_tok;
2416 },
2417 .plus_expr => |un| {
2418 repr.tag = .plus_expr;
2419 repr.data[0] = @bitCast(un.qt);
2420 repr.data[1] = @intFromEnum(un.operand);
2421 repr.tok = un.op_tok;
2422 },
2423 .negate_expr => |un| {
2424 repr.tag = .negate_expr;
2425 repr.data[0] = @bitCast(un.qt);
2426 repr.data[1] = @intFromEnum(un.operand);
2427 repr.tok = un.op_tok;
2428 },
2429 .bit_not_expr => |un| {
2430 repr.tag = .bit_not_expr;
2431 repr.data[0] = @bitCast(un.qt);
2432 repr.data[1] = @intFromEnum(un.operand);
2433 repr.tok = un.op_tok;
2434 },
2435 .bool_not_expr => |un| {
2436 repr.tag = .bool_not_expr;
2437 repr.data[0] = @bitCast(un.qt);
2438 repr.data[1] = @intFromEnum(un.operand);
2439 repr.tok = un.op_tok;
2440 },
2441 .pre_inc_expr => |un| {
2442 repr.tag = .pre_inc_expr;
2443 repr.data[0] = @bitCast(un.qt);
2444 repr.data[1] = @intFromEnum(un.operand);
2445 repr.tok = un.op_tok;
2446 },
2447 .pre_dec_expr => |un| {
2448 repr.tag = .pre_dec_expr;
2449 repr.data[0] = @bitCast(un.qt);
2450 repr.data[1] = @intFromEnum(un.operand);
2451 repr.tok = un.op_tok;
2452 },
2453 .imag_expr => |un| {
2454 repr.tag = .imag_expr;
2455 repr.data[0] = @bitCast(un.qt);
2456 repr.data[1] = @intFromEnum(un.operand);
2457 repr.tok = un.op_tok;
2458 },
2459 .real_expr => |un| {
2460 repr.tag = .real_expr;
2461 repr.data[0] = @bitCast(un.qt);
2462 repr.data[1] = @intFromEnum(un.operand);
2463 repr.tok = un.op_tok;
2464 },
2465 .post_inc_expr => |un| {
2466 repr.tag = .post_inc_expr;
2467 repr.data[0] = @bitCast(un.qt);
2468 repr.data[1] = @intFromEnum(un.operand);
2469 repr.tok = un.op_tok;
2470 },
2471 .post_dec_expr => |un| {
2472 repr.tag = .post_dec_expr;
2473 repr.data[0] = @bitCast(un.qt);
2474 repr.data[1] = @intFromEnum(un.operand);
2475 repr.tok = un.op_tok;
2476 },
2477 .paren_expr => |un| {
2478 repr.tag = .paren_expr;
2479 repr.data[0] = @bitCast(un.qt);
2480 repr.data[1] = @intFromEnum(un.operand);
2481 repr.tok = un.op_tok;
2482 },
2483 .stmt_expr => |un| {
2484 repr.tag = .stmt_expr;
2485 repr.data[0] = @bitCast(un.qt);
2486 repr.data[1] = @intFromEnum(un.operand);
2487 repr.tok = un.op_tok;
2488 },
2489 .cond_dummy_expr => |un| {
2490 repr.tag = .cond_dummy_expr;
2491 repr.data[0] = @bitCast(un.qt);
2492 repr.data[1] = @intFromEnum(un.operand);
2493 repr.tok = un.op_tok;
2494 },
2495 .addr_of_label => |addr_of| {
2496 repr.tag = .addr_of_label;
2497 repr.data[0] = @bitCast(addr_of.qt);
2498 repr.tok = addr_of.label_tok;
2499 },
2500 .array_access_expr => |access| {
2501 repr.tag = .array_access_expr;
2502 repr.data[0] = @bitCast(access.qt);
2503 repr.data[1] = @intFromEnum(access.base);
2504 repr.data[2] = @intFromEnum(access.index);
2505 repr.tok = access.l_bracket_tok;
2506 },
2507 .call_expr => |call| {
2508 repr.data[0] = @bitCast(call.qt);
2509 if (call.args.len > 1) {
2510 repr.tag = .call_expr;
2511 repr.data[1] = @intCast(tree.extra.items.len);
2512 const len: u32 = @intCast(call.args.len + 1);
2513 repr.data[2] = len;
2514 try tree.extra.ensureUnusedCapacity(tree.comp.gpa, len);
2515 tree.extra.appendAssumeCapacity(@intFromEnum(call.callee));
2516 tree.extra.appendSliceAssumeCapacity(@ptrCast(call.args));
2517 } else {
2518 repr.tag = .call_expr_one;
2519 repr.data[1] = @intFromEnum(call.callee);
2520 repr.data[2] = packElem(call.args, 0);
2521 }
2522 repr.tok = call.l_paren_tok;
2523 },
2524 .builtin_call_expr => |call| {
2525 repr.data[0] = @bitCast(call.qt);
2526 if (call.args.len > 2) {
2527 repr.tag = .builtin_call_expr;
2528 repr.data[1], repr.data[2] = try tree.addExtra(call.args);
2529 } else {
2530 repr.tag = .builtin_call_expr_two;
2531 repr.data[1] = packElem(call.args, 0);
2532 repr.data[2] = packElem(call.args, 1);
2533 }
2534 repr.tok = call.builtin_tok;
2535 },
2536 .member_access_expr => |access| {
2537 repr.tag = .member_access_expr;
2538 repr.data[0] = @bitCast(access.qt);
2539 repr.data[1] = @intFromEnum(access.base);
2540 repr.data[2] = access.member_index;
2541 repr.tok = access.access_tok;
2542 },
2543 .member_access_ptr_expr => |access| {
2544 repr.tag = .member_access_ptr_expr;
2545 repr.data[0] = @bitCast(access.qt);
2546 repr.data[1] = @intFromEnum(access.base);
2547 repr.data[2] = access.member_index;
2548 repr.tok = access.access_tok;
2549 },
2550 .decl_ref_expr => |decl_ref| {
2551 repr.tag = .decl_ref_expr;
2552 repr.data[0] = @bitCast(decl_ref.qt);
2553 repr.data[1] = @intFromEnum(decl_ref.decl);
2554 repr.tok = decl_ref.name_tok;
2555 },
2556 .enumeration_ref => |enumeration_ref| {
2557 repr.tag = .enumeration_ref;
2558 repr.data[0] = @bitCast(enumeration_ref.qt);
2559 repr.data[1] = @intFromEnum(enumeration_ref.decl);
2560 repr.tok = enumeration_ref.name_tok;
2561 },
2562 .builtin_ref => |builtin_ref| {
2563 repr.tag = .builtin_ref;
2564 repr.data[0] = @bitCast(builtin_ref.qt);
2565 repr.tok = builtin_ref.name_tok;
2566 },
2567 .bool_literal => |literal| {
2568 repr.tag = .bool_literal;
2569 repr.data[0] = @bitCast(literal.qt);
2570 repr.tok = literal.literal_tok;
2571 },
2572 .nullptr_literal => |literal| {
2573 repr.tag = .nullptr_literal;
2574 repr.data[0] = @bitCast(literal.qt);
2575 repr.tok = literal.literal_tok;
2576 },
2577 .int_literal => |literal| {
2578 repr.tag = .int_literal;
2579 repr.data[0] = @bitCast(literal.qt);
2580 repr.tok = literal.literal_tok;
2581 },
2582 .char_literal => |literal| {
2583 repr.tag = .char_literal;
2584 repr.data[0] = @bitCast(literal.qt);
2585 repr.data[1] = @intFromEnum(literal.kind);
2586 repr.tok = literal.literal_tok;
2587 },
2588 .float_literal => |literal| {
2589 repr.tag = .float_literal;
2590 repr.data[0] = @bitCast(literal.qt);
2591 repr.tok = literal.literal_tok;
2592 },
2593 .string_literal_expr => |literal| {
2594 repr.tag = .string_literal_expr;
2595 repr.data[0] = @bitCast(literal.qt);
2596 repr.data[1] = @intFromEnum(literal.kind);
2597 repr.tok = literal.literal_tok;
2598 },
2599 .imaginary_literal => |un| {
2600 repr.tag = .imaginary_literal;
2601 repr.data[0] = @bitCast(un.qt);
2602 repr.data[1] = @intFromEnum(un.operand);
2603 repr.tok = un.op_tok;
2604 },
2605 .sizeof_expr => |type_info| {
2606 repr.tag = .sizeof_expr;
2607 repr.data[0] = @bitCast(type_info.qt);
2608 repr.data[1] = packOptIndex(type_info.expr);
2609 repr.data[2] = @bitCast(type_info.operand_qt);
2610 repr.tok = type_info.op_tok;
2611 },
2612 .alignof_expr => |type_info| {
2613 repr.tag = .alignof_expr;
2614 repr.data[0] = @bitCast(type_info.qt);
2615 repr.data[1] = packOptIndex(type_info.expr);
2616 repr.data[2] = @bitCast(type_info.operand_qt);
2617 repr.tok = type_info.op_tok;
2618 },
2619 .generic_expr => |generic| {
2620 repr.data[0] = @bitCast(generic.qt);
2621 if (generic.rest.len > 0) {
2622 repr.tag = .generic_expr;
2623 repr.data[1] = @intCast(tree.extra.items.len);
2624 const len: u32 = @intCast(generic.rest.len + 2);
2625 repr.data[2] = len;
2626 try tree.extra.ensureUnusedCapacity(tree.comp.gpa, len);
2627 tree.extra.appendAssumeCapacity(@intFromEnum(generic.controlling));
2628 tree.extra.appendAssumeCapacity(@intFromEnum(generic.chosen));
2629 tree.extra.appendSliceAssumeCapacity(@ptrCast(generic.rest));
2630 } else {
2631 repr.tag = .generic_expr_zero;
2632 repr.data[1] = @intFromEnum(generic.controlling);
2633 repr.data[2] = @intFromEnum(generic.chosen);
2634 }
2635 repr.tok = generic.generic_tok;
2636 },
2637 .generic_association_expr => |association| {
2638 repr.tag = .generic_association_expr;
2639 repr.data[0] = @bitCast(association.association_qt);
2640 repr.data[1] = @intFromEnum(association.expr);
2641 repr.tok = association.colon_tok;
2642 },
2643 .generic_default_expr => |default| {
2644 repr.tag = .generic_default_expr;
2645 repr.data[0] = @intFromEnum(default.expr);
2646 repr.tok = default.default_tok;
2647 },
2648 .binary_cond_expr => |cond| {
2649 repr.tag = .binary_cond_expr;
2650 repr.data[0] = @bitCast(cond.qt);
2651 repr.data[1] = @intFromEnum(cond.cond);
2652 repr.data[2], _ = try tree.addExtra(&.{ cond.then_expr, cond.else_expr });
2653 repr.tok = cond.cond_tok;
2654 },
2655 .cond_expr => |cond| {
2656 repr.tag = .cond_expr;
2657 repr.data[0] = @bitCast(cond.qt);
2658 repr.data[1] = @intFromEnum(cond.cond);
2659 repr.data[2], _ = try tree.addExtra(&.{ cond.then_expr, cond.else_expr });
2660 repr.tok = cond.cond_tok;
2661 },
2662 .builtin_choose_expr => |cond| {
2663 repr.tag = .builtin_choose_expr;
2664 repr.data[0] = @bitCast(cond.qt);
2665 repr.data[1] = @intFromEnum(cond.cond);
2666 repr.data[2], _ = try tree.addExtra(&.{ cond.then_expr, cond.else_expr });
2667 repr.tok = cond.cond_tok;
2668 },
2669 .builtin_types_compatible_p => |builtin| {
2670 repr.tag = .builtin_types_compatible_p;
2671 repr.data[0] = @bitCast(builtin.lhs);
2672 repr.data[1] = @bitCast(builtin.rhs);
2673 repr.tok = builtin.builtin_tok;
2674 },
2675 .builtin_convertvector => |builtin| {
2676 repr.tag = .builtin_convertvector;
2677 repr.data[0] = @bitCast(builtin.dest_qt);
2678 repr.data[1] = @intFromEnum(builtin.operand);
2679 repr.tok = builtin.builtin_tok;
2680 },
2681 .builtin_shufflevector => |builtin| {
2682 repr.tag = .builtin_shufflevector;
2683 repr.data[0] = @bitCast(builtin.qt);
2684 repr.data[1] = @intCast(tree.extra.items.len);
2685 repr.data[2] = @intCast(builtin.indexes.len);
2686 repr.tok = builtin.builtin_tok;
2687 try tree.extra.ensureUnusedCapacity(tree.comp.gpa, builtin.indexes.len + 2);
2688 tree.extra.appendAssumeCapacity(@intFromEnum(builtin.lhs));
2689 tree.extra.appendAssumeCapacity(@intFromEnum(builtin.rhs));
2690 tree.extra.appendSliceAssumeCapacity(@ptrCast(builtin.indexes));
2691 },
2692 .array_init_expr => |init| {
2693 repr.data[0] = @bitCast(init.container_qt);
2694 if (init.items.len > 2) {
2695 repr.tag = .array_init_expr;
2696 repr.data[1], repr.data[2] = try tree.addExtra(init.items);
2697 } else {
2698 repr.tag = .array_init_expr_two;
2699 repr.data[1] = packElem(init.items, 0);
2700 repr.data[2] = packElem(init.items, 1);
2701 }
2702 repr.tok = init.l_brace_tok;
2703 },
2704 .struct_init_expr => |init| {
2705 repr.data[0] = @bitCast(init.container_qt);
2706 if (init.items.len > 2) {
2707 repr.tag = .struct_init_expr;
2708 repr.data[1], repr.data[2] = try tree.addExtra(init.items);
2709 } else {
2710 repr.tag = .struct_init_expr_two;
2711 repr.data[1] = packElem(init.items, 0);
2712 repr.data[2] = packElem(init.items, 1);
2713 }
2714 repr.tok = init.l_brace_tok;
2715 },
2716 .union_init_expr => |init| {
2717 repr.tag = .union_init_expr;
2718 repr.data[0] = @bitCast(init.union_qt);
2719 repr.data[1] = init.field_index;
2720 repr.data[2] = packOptIndex(init.initializer);
2721 repr.tok = init.l_brace_tok;
2722 },
2723 .array_filler_expr => |filler| {
2724 repr.tag = .array_filler_expr;
2725 repr.data[0] = @bitCast(filler.qt);
2726 repr.data[1], repr.data[2] = @as([2]u32, @bitCast(filler.count));
2727 repr.tok = filler.last_tok;
2728 },
2729 .default_init_expr => |default| {
2730 repr.tag = .default_init_expr;
2731 repr.data[0] = @bitCast(default.qt);
2732 repr.tok = default.last_tok;
2733 },
2734 .compound_literal_expr => |literal| {
2735 repr.tag = .compound_literal_expr;
2736 repr.data[0] = @bitCast(literal.qt);
2737 repr.data[1] = @bitCast(Node.Repr.DeclAttr{
2738 .static = literal.storage_class == .static,
2739 .register = literal.storage_class == .register,
2740 .thread_local = literal.thread_local,
2741 });
2742 repr.data[2] = @intFromEnum(literal.initializer);
2743 repr.tok = literal.l_paren_tok;
2744 },
1022745 }
103};
104
105pub const TokenIndex = u32;
106pub const NodeIndex = enum(u32) { none, _ };
107pub const ValueMap = std.AutoHashMap(NodeIndex, Value);
108
109const Tree = @This();
110
111comp: *Compilation,
112arena: std.heap.ArenaAllocator,
113generated: []const u8,
114tokens: Token.List.Slice,
115nodes: Node.List.Slice,
116data: []const NodeIndex,
117root_decls: []const NodeIndex,
118value_map: ValueMap,
119
120pub const genIr = CodeGen.genIr;
121
122pub fn deinit(tree: *Tree) void {
123 tree.comp.gpa.free(tree.root_decls);
124 tree.comp.gpa.free(tree.data);
125 tree.nodes.deinit(tree.comp.gpa);
126 tree.arena.deinit();
127 tree.value_map.deinit();
2746 tree.nodes.set(index, repr);
1282747}
1292748
130pub const GNUAssemblyQualifiers = struct {
131 @"volatile": bool = false,
132 @"inline": bool = false,
133 goto: bool = false,
134};
135
136pub const Node = struct {
137 tag: Tag,
138 ty: Type = .{ .specifier = .void },
139 data: Data,
140 loc: Loc = .none,
141
142 pub const Range = struct { start: u32, end: u32 };
143
144 pub const Loc = enum(u32) {
145 none = std.math.maxInt(u32),
146 _,
147 };
148
149 pub const Data = union {
150 decl: struct {
151 name: TokenIndex,
152 node: NodeIndex = .none,
153 },
154 decl_ref: TokenIndex,
155 two: [2]NodeIndex,
156 range: Range,
157 if3: struct {
158 cond: NodeIndex,
159 body: u32,
160 },
161 un: NodeIndex,
162 bin: struct {
163 lhs: NodeIndex,
164 rhs: NodeIndex,
165 },
166 member: struct {
167 lhs: NodeIndex,
168 index: u32,
169 },
170 union_init: struct {
171 field_index: u32,
172 node: NodeIndex,
173 },
174 cast: struct {
175 operand: NodeIndex,
176 kind: CastKind,
177 },
178 int: u64,
179 return_zero: bool,
180
181 pub fn forDecl(data: Data, tree: *const Tree) struct {
182 decls: []const NodeIndex,
183 cond: NodeIndex,
184 incr: NodeIndex,
185 body: NodeIndex,
186 } {
187 const items = tree.data[data.range.start..data.range.end];
188 const decls = items[0 .. items.len - 3];
189
190 return .{
191 .decls = decls,
192 .cond = items[items.len - 3],
193 .incr = items[items.len - 2],
194 .body = items[items.len - 1],
195 };
196 }
197
198 pub fn forStmt(data: Data, tree: *const Tree) struct {
199 init: NodeIndex,
200 cond: NodeIndex,
201 incr: NodeIndex,
202 body: NodeIndex,
203 } {
204 const items = tree.data[data.if3.body..];
205
206 return .{
207 .init = items[0],
208 .cond = items[1],
209 .incr = items[2],
210 .body = data.if3.cond,
211 };
212 }
213 };
214
215 pub const List = std.MultiArrayList(Node);
216};
217
218pub const CastKind = enum(u8) {
219 /// Does nothing except possibly add qualifiers
220 no_op,
221 /// Interpret one bit pattern as another. Used for operands which have the same
222 /// size and unrelated types, e.g. casting one pointer type to another
223 bitcast,
224 /// Convert T[] to T *
225 array_to_pointer,
226 /// Converts an lvalue to an rvalue
227 lval_to_rval,
228 /// Convert a function type to a pointer to a function
229 function_to_pointer,
230 /// Convert a pointer type to a _Bool
231 pointer_to_bool,
232 /// Convert a pointer type to an integer type
233 pointer_to_int,
234 /// Convert _Bool to an integer type
235 bool_to_int,
236 /// Convert _Bool to a floating type
237 bool_to_float,
238 /// Convert a _Bool to a pointer; will cause a warning
239 bool_to_pointer,
240 /// Convert an integer type to _Bool
241 int_to_bool,
242 /// Convert an integer to a floating type
243 int_to_float,
244 /// Convert a complex integer to a complex floating type
245 complex_int_to_complex_float,
246 /// Convert an integer type to a pointer type
247 int_to_pointer,
248 /// Convert a floating type to a _Bool
249 float_to_bool,
250 /// Convert a floating type to an integer
251 float_to_int,
252 /// Convert a complex floating type to a complex integer
253 complex_float_to_complex_int,
254 /// Convert one integer type to another
255 int_cast,
256 /// Convert one complex integer type to another
257 complex_int_cast,
258 /// Convert real part of complex integer to a integer
259 complex_int_to_real,
260 /// Create a complex integer type using operand as the real part
261 real_to_complex_int,
262 /// Convert one floating type to another
263 float_cast,
264 /// Convert one complex floating type to another
265 complex_float_cast,
266 /// Convert real part of complex float to a float
267 complex_float_to_real,
268 /// Create a complex floating type using operand as the real part
269 real_to_complex_float,
270 /// Convert type to void
271 to_void,
272 /// Convert a literal 0 to a null pointer
273 null_to_pointer,
274 /// GNU cast-to-union extension
275 union_cast,
276 /// Create vector where each value is same as the input scalar.
277 vector_splat,
278};
2749fn packOptIndex(opt: ?Node.Index) u32 {
2750 return @intFromEnum(Node.OptIndex.packOpt(opt));
2751}
2792752
280pub const Tag = enum(u8) {
281 /// Must appear at index 0. Also used as the tag for __builtin_types_compatible_p arguments, since the arguments are types
282 /// Reaching it is always the result of a bug.
283 invalid,
284
285 // ====== Decl ======
286
287 /// _Static_assert
288 /// loc is token index of _Static_assert
289 static_assert,
290
291 // function prototype
292 fn_proto,
293 static_fn_proto,
294 inline_fn_proto,
295 inline_static_fn_proto,
296
297 // function definition
298 fn_def,
299 static_fn_def,
300 inline_fn_def,
301 inline_static_fn_def,
302
303 // variable declaration
304 @"var",
305 extern_var,
306 static_var,
307 // same as static_var, used for __func__, __FUNCTION__ and __PRETTY_FUNCTION__
308 implicit_static_var,
309 threadlocal_var,
310 threadlocal_extern_var,
311 threadlocal_static_var,
312
313 /// __asm__("...") at file scope
314 /// loc is token index of __asm__ keyword
315 file_scope_asm,
316
317 // typedef declaration
318 typedef,
319
320 // container declarations
321 /// { two[0]; two[1]; }
322 struct_decl_two,
323 /// { two[0]; two[1]; }
324 union_decl_two,
325 /// { two[0], two[1], }
326 enum_decl_two,
327 /// { range }
328 struct_decl,
329 /// { range }
330 union_decl,
331 /// { range }
332 enum_decl,
333 /// struct decl_ref;
334 struct_forward_decl,
335 /// union decl_ref;
336 union_forward_decl,
337 /// enum decl_ref;
338 enum_forward_decl,
339
340 /// name = node
341 enum_field_decl,
342 /// ty name : node
343 /// name == 0 means unnamed
344 record_field_decl,
345 /// Used when a record has an unnamed record as a field
346 indirect_record_field_decl,
347
348 // ====== Stmt ======
349
350 labeled_stmt,
351 /// { two[0]; two[1]; } first and second may be null
352 compound_stmt_two,
353 /// { data }
354 compound_stmt,
355 /// if (first) data[second] else data[second+1];
356 if_then_else_stmt,
357 /// if (first) second; second may be null
358 if_then_stmt,
359 /// switch (first) second
360 switch_stmt,
361 /// case first: second
362 case_stmt,
363 /// case data[body]...data[body+1]: cond
364 case_range_stmt,
365 /// default: first
366 default_stmt,
367 /// while (first) second
368 while_stmt,
369 /// do second while(first);
370 do_while_stmt,
371 /// for (data[..]; data[len-3]; data[len-2]) data[len-1]
372 for_decl_stmt,
373 /// for (;;;) first
374 forever_stmt,
375 /// for (data[first]; data[first+1]; data[first+2]) second
376 for_stmt,
377 /// goto first;
378 goto_stmt,
379 /// goto *un;
380 computed_goto_stmt,
381 // continue; first and second unused
382 continue_stmt,
383 // break; first and second unused
384 break_stmt,
385 // null statement (just a semicolon); first and second unused
386 null_stmt,
387 /// return first; first may be null
388 return_stmt,
389 /// Assembly statement of the form __asm__("string literal")
390 gnu_asm_simple,
391
392 // ====== Expr ======
393
394 /// lhs , rhs
395 comma_expr,
396 /// lhs ? data[0] : data[1]
397 binary_cond_expr,
398 /// Used as the base for casts of the lhs in `binary_cond_expr`.
399 cond_dummy_expr,
400 /// lhs ? data[0] : data[1]
401 cond_expr,
402 /// lhs = rhs
403 assign_expr,
404 /// lhs *= rhs
405 mul_assign_expr,
406 /// lhs /= rhs
407 div_assign_expr,
408 /// lhs %= rhs
409 mod_assign_expr,
410 /// lhs += rhs
411 add_assign_expr,
412 /// lhs -= rhs
413 sub_assign_expr,
414 /// lhs <<= rhs
415 shl_assign_expr,
416 /// lhs >>= rhs
417 shr_assign_expr,
418 /// lhs &= rhs
419 bit_and_assign_expr,
420 /// lhs ^= rhs
421 bit_xor_assign_expr,
422 /// lhs |= rhs
423 bit_or_assign_expr,
424 /// lhs || rhs
425 bool_or_expr,
426 /// lhs && rhs
427 bool_and_expr,
428 /// lhs | rhs
429 bit_or_expr,
430 /// lhs ^ rhs
431 bit_xor_expr,
432 /// lhs & rhs
433 bit_and_expr,
434 /// lhs == rhs
435 equal_expr,
436 /// lhs != rhs
437 not_equal_expr,
438 /// lhs < rhs
439 less_than_expr,
440 /// lhs <= rhs
441 less_than_equal_expr,
442 /// lhs > rhs
443 greater_than_expr,
444 /// lhs >= rhs
445 greater_than_equal_expr,
446 /// lhs << rhs
447 shl_expr,
448 /// lhs >> rhs
449 shr_expr,
450 /// lhs + rhs
451 add_expr,
452 /// lhs - rhs
453 sub_expr,
454 /// lhs * rhs
455 mul_expr,
456 /// lhs / rhs
457 div_expr,
458 /// lhs % rhs
459 mod_expr,
460 /// Explicit: (type) cast
461 explicit_cast,
462 /// Implicit: cast
463 implicit_cast,
464 /// &un
465 addr_of_expr,
466 /// &&decl_ref
467 addr_of_label,
468 /// *un
469 deref_expr,
470 /// +un
471 plus_expr,
472 /// -un
473 negate_expr,
474 /// ~un
475 bit_not_expr,
476 /// !un
477 bool_not_expr,
478 /// ++un
479 pre_inc_expr,
480 /// --un
481 pre_dec_expr,
482 /// __imag un
483 imag_expr,
484 /// __real un
485 real_expr,
486 /// lhs[rhs] lhs is pointer/array type, rhs is integer type
487 array_access_expr,
488 /// two[0](two[1]) two[1] may be 0
489 call_expr_one,
490 /// data[0](data[1..])
491 call_expr,
492 /// decl
493 builtin_call_expr_one,
494 builtin_call_expr,
495 /// lhs.member
496 member_access_expr,
497 /// lhs->member
498 member_access_ptr_expr,
499 /// un++
500 post_inc_expr,
501 /// un--
502 post_dec_expr,
503 /// (un)
504 paren_expr,
505 /// decl_ref
506 decl_ref_expr,
507 /// decl_ref
508 enumeration_ref,
509 /// C23 bool literal `true` / `false`
510 bool_literal,
511 /// C23 nullptr literal
512 nullptr_literal,
513 /// integer literal, always unsigned
514 int_literal,
515 /// Same as int_literal, but originates from a char literal
516 char_literal,
517 /// a floating point literal
518 float_literal,
519 /// wraps a float or double literal: un
520 imaginary_literal,
521 /// tree.str[index..][0..len]
522 string_literal_expr,
523 /// sizeof(un?)
524 sizeof_expr,
525 /// _Alignof(un?)
526 alignof_expr,
527 /// _Generic(controlling two[0], chosen two[1])
528 generic_expr_one,
529 /// _Generic(controlling range[0], chosen range[1], rest range[2..])
530 generic_expr,
531 /// ty: un
532 generic_association_expr,
533 // default: un
534 generic_default_expr,
535 /// __builtin_choose_expr(lhs, data[0], data[1])
536 builtin_choose_expr,
537 /// __builtin_types_compatible_p(lhs, rhs)
538 builtin_types_compatible_p,
539 /// decl - special builtins require custom parsing
540 special_builtin_call_one,
541 /// ({ un })
542 stmt_expr,
543
544 // ====== Initializer expressions ======
545
546 /// { two[0], two[1] }
547 array_init_expr_two,
548 /// { range }
549 array_init_expr,
550 /// { two[0], two[1] }
551 struct_init_expr_two,
552 /// { range }
553 struct_init_expr,
554 /// { union_init }
555 union_init_expr,
556
557 /// (ty){ un }
558 /// loc is token index of l_paren
559 compound_literal_expr,
560 /// (static ty){ un }
561 /// loc is token index of l_paren
562 static_compound_literal_expr,
563 /// (thread_local ty){ un }
564 /// loc is token index of l_paren
565 thread_local_compound_literal_expr,
566 /// (static thread_local ty){ un }
567 /// loc is token index of l_paren
568 static_thread_local_compound_literal_expr,
569
570 /// Inserted at the end of a function body if no return stmt is found.
571 /// ty is the functions return type
572 /// data is return_zero which is true if the function is called "main" and ty is compatible with int
573 /// loc is token index of closing r_brace of function
574 implicit_return,
2753fn unpackOptIndex(idx: u32) ?Node.Index {
2754 return @as(Node.OptIndex, @enumFromInt(idx)).unpack();
2755}
5752756
576 /// Inserted in array_init_expr to represent unspecified elements.
577 /// data.int contains the amount of elements.
578 array_filler_expr,
579 /// Inserted in record and scalar initializers for unspecified elements.
580 default_init_expr,
2757fn packElem(nodes: []const Node.Index, index: usize) u32 {
2758 return if (nodes.len > index) @intFromEnum(nodes[index]) else @intFromEnum(Node.OptIndex.null);
2759}
5812760
582 pub fn isImplicit(tag: Tag) bool {
583 return switch (tag) {
584 .implicit_cast,
585 .implicit_return,
586 .array_filler_expr,
587 .default_init_expr,
588 .implicit_static_var,
589 .cond_dummy_expr,
590 => true,
591 else => false,
592 };
2761fn unPackElems(data: []const u32) []const Node.Index {
2762 const sentinel = @intFromEnum(Node.OptIndex.null);
2763 for (data, 0..) |item, i| {
2764 if (item == sentinel) return @ptrCast(data[0..i]);
5932765 }
594};
2766 return @ptrCast(data);
2767}
2768
2769/// Returns index to `tree.extra` and length of data
2770fn addExtra(tree: *Tree, data: []const Node.Index) !struct { u32, u32 } {
2771 const index: u32 = @intCast(tree.extra.items.len);
2772 try tree.extra.appendSlice(tree.comp.gpa, @ptrCast(data));
2773 return .{ index, @intCast(data.len) };
2774}
5952775
596pub fn isBitfield(tree: *const Tree, node: NodeIndex) bool {
2776pub fn isBitfield(tree: *const Tree, node: Node.Index) bool {
5972777 return tree.bitfieldWidth(node, false) != null;
5982778}
5992779
6002780/// Returns null if node is not a bitfield. If inspect_lval is true, this function will
6012781/// recurse into implicit lval_to_rval casts (useful for arithmetic conversions)
602pub fn bitfieldWidth(tree: *const Tree, node: NodeIndex, inspect_lval: bool) ?u32 {
603 if (node == .none) return null;
604 switch (tree.nodes.items(.tag)[@intFromEnum(node)]) {
605 .member_access_expr, .member_access_ptr_expr => {
606 const member = tree.nodes.items(.data)[@intFromEnum(node)].member;
607 var ty = tree.nodes.items(.ty)[@intFromEnum(member.lhs)];
608 if (ty.isPtr()) ty = ty.elemType();
609 const record_ty = ty.get(.@"struct") orelse ty.get(.@"union") orelse return null;
610 const field = record_ty.data.record.fields[member.index];
611 return field.bit_width;
612 },
613 .implicit_cast => {
2782pub fn bitfieldWidth(tree: *const Tree, node: Node.Index, inspect_lval: bool) ?u32 {
2783 switch (node.get(tree)) {
2784 .member_access_expr, .member_access_ptr_expr => |access| return access.isBitFieldWidth(tree),
2785 .cast => |cast| {
6142786 if (!inspect_lval) return null;
6152787
616 const data = tree.nodes.items(.data)[@intFromEnum(node)];
617 return switch (data.cast.kind) {
618 .lval_to_rval => tree.bitfieldWidth(data.cast.operand, false),
2788 return switch (cast.kind) {
2789 .lval_to_rval => tree.bitfieldWidth(cast.operand, false),
6192790 else => null,
6202791 };
6212792 },
......@@ -632,34 +2803,29 @@ const CallableResultUsage = struct {
6322803 warn_unused_result: bool,
6332804};
6342805
635pub fn callableResultUsage(tree: *const Tree, node: NodeIndex) ?CallableResultUsage {
636 const data = tree.nodes.items(.data);
637
2806pub fn callableResultUsage(tree: *const Tree, node: Node.Index) ?CallableResultUsage {
6382807 var cur_node = node;
639 while (true) switch (tree.nodes.items(.tag)[@intFromEnum(cur_node)]) {
640 .decl_ref_expr => {
641 const tok = data[@intFromEnum(cur_node)].decl_ref;
642 const fn_ty = tree.nodes.items(.ty)[@intFromEnum(node)].elemType();
643 return .{
644 .tok = tok,
645 .nodiscard = fn_ty.hasAttribute(.nodiscard),
646 .warn_unused_result = fn_ty.hasAttribute(.warn_unused_result),
647 };
2808 while (true) switch (cur_node.get(tree)) {
2809 .decl_ref_expr => |decl_ref| return .{
2810 .tok = decl_ref.name_tok,
2811 .nodiscard = decl_ref.qt.hasAttribute(tree.comp, .nodiscard),
2812 .warn_unused_result = decl_ref.qt.hasAttribute(tree.comp, .warn_unused_result),
6482813 },
649 .paren_expr => cur_node = data[@intFromEnum(cur_node)].un,
650 .comma_expr => cur_node = data[@intFromEnum(cur_node)].bin.rhs,
651
652 .explicit_cast, .implicit_cast => cur_node = data[@intFromEnum(cur_node)].cast.operand,
653 .addr_of_expr, .deref_expr => cur_node = data[@intFromEnum(cur_node)].un,
654 .call_expr_one => cur_node = data[@intFromEnum(cur_node)].two[0],
655 .call_expr => cur_node = tree.data[data[@intFromEnum(cur_node)].range.start],
656 .member_access_expr, .member_access_ptr_expr => {
657 const member = data[@intFromEnum(cur_node)].member;
658 var ty = tree.nodes.items(.ty)[@intFromEnum(member.lhs)];
659 if (ty.isPtr()) ty = ty.elemType();
660 const record = ty.getRecord().?;
661 const field = record.fields[member.index];
662 const attributes = if (record.field_attributes) |attrs| attrs[member.index] else &.{};
2814
2815 .paren_expr, .addr_of_expr, .deref_expr => |un| cur_node = un.operand,
2816 .comma_expr => |bin| cur_node = bin.rhs,
2817 .cast => |cast| cur_node = cast.operand,
2818 .call_expr => |call| cur_node = call.callee,
2819 .member_access_expr, .member_access_ptr_expr => |access| {
2820 var qt = access.base.qt(tree);
2821 if (qt.get(tree.comp, .pointer)) |pointer| qt = pointer.child;
2822 const record_ty = switch (qt.base(tree.comp).type) {
2823 .@"struct", .@"union" => |record| record,
2824 else => return null,
2825 };
2826
2827 const field = record_ty.fields[access.member_index];
2828 const attributes = field.attributes(tree.comp);
6632829 return .{
6642830 .tok = field.name_tok,
6652831 .nodiscard = for (attributes) |attr| {
......@@ -674,177 +2840,115 @@ pub fn callableResultUsage(tree: *const Tree, node: NodeIndex) ?CallableResultUs
6742840 };
6752841}
6762842
677pub fn isLval(tree: *const Tree, node: NodeIndex) bool {
2843pub fn isLval(tree: *const Tree, node: Node.Index) bool {
6782844 var is_const: bool = undefined;
6792845 return tree.isLvalExtra(node, &is_const);
6802846}
6812847
682pub fn isLvalExtra(tree: *const Tree, node: NodeIndex, is_const: *bool) bool {
2848pub fn isLvalExtra(tree: *const Tree, node: Node.Index, is_const: *bool) bool {
6832849 is_const.* = false;
684 switch (tree.nodes.items(.tag)[@intFromEnum(node)]) {
685 .compound_literal_expr,
686 .static_compound_literal_expr,
687 .thread_local_compound_literal_expr,
688 .static_thread_local_compound_literal_expr,
689 => {
690 is_const.* = tree.nodes.items(.ty)[@intFromEnum(node)].isConst();
2850 var cur_node = node;
2851 switch (cur_node.get(tree)) {
2852 .compound_literal_expr => |literal| {
2853 is_const.* = literal.qt.@"const";
6912854 return true;
6922855 },
6932856 .string_literal_expr => return true,
694 .member_access_ptr_expr => {
695 const lhs_expr = tree.nodes.items(.data)[@intFromEnum(node)].member.lhs;
696 const ptr_ty = tree.nodes.items(.ty)[@intFromEnum(lhs_expr)];
697 if (ptr_ty.isPtr()) is_const.* = ptr_ty.elemType().isConst();
2857 .member_access_ptr_expr => |access| {
2858 const ptr_qt = access.base.qt(tree);
2859 if (ptr_qt.get(tree.comp, .pointer)) |pointer| is_const.* = pointer.child.@"const";
6982860 return true;
6992861 },
700 .array_access_expr => {
701 const lhs_expr = tree.nodes.items(.data)[@intFromEnum(node)].bin.lhs;
702 if (lhs_expr != .none) {
703 const array_ty = tree.nodes.items(.ty)[@intFromEnum(lhs_expr)];
704 if (array_ty.isPtr() or array_ty.isArray()) is_const.* = array_ty.elemType().isConst();
705 }
706 return true;
2862 .member_access_expr => |access| {
2863 return tree.isLvalExtra(access.base, is_const);
7072864 },
708 .decl_ref_expr => {
709 const decl_ty = tree.nodes.items(.ty)[@intFromEnum(node)];
710 is_const.* = decl_ty.isConst();
2865 .array_access_expr => |access| {
2866 const base_qt = access.base.qt(tree);
2867 // Array access operand undergoes lval conversions so the base can never
2868 // be a pure array type.
2869 if (base_qt.get(tree.comp, .pointer)) |pointer| is_const.* = pointer.child.@"const";
7112870 return true;
7122871 },
713 .deref_expr => {
714 const data = tree.nodes.items(.data)[@intFromEnum(node)];
715 const operand_ty = tree.nodes.items(.ty)[@intFromEnum(data.un)];
716 if (operand_ty.isFunc()) return false;
717 if (operand_ty.isPtr() or operand_ty.isArray()) is_const.* = operand_ty.elemType().isConst();
2872 .decl_ref_expr => |decl_ref| {
2873 is_const.* = decl_ref.qt.@"const";
7182874 return true;
7192875 },
720 .member_access_expr => {
721 const data = tree.nodes.items(.data)[@intFromEnum(node)];
722 return tree.isLvalExtra(data.member.lhs, is_const);
2876 .deref_expr => |un| {
2877 const operand_qt = un.operand.qt(tree);
2878 switch (operand_qt.base(tree.comp).type) {
2879 .func => return false,
2880 .pointer => |pointer| is_const.* = pointer.child.@"const",
2881 else => {},
2882 }
2883 return true;
7232884 },
724 .paren_expr => {
725 const data = tree.nodes.items(.data)[@intFromEnum(node)];
726 return tree.isLvalExtra(data.un, is_const);
2885 .paren_expr => |un| {
2886 return tree.isLvalExtra(un.operand, is_const);
7272887 },
728 .builtin_choose_expr => {
729 const data = tree.nodes.items(.data)[@intFromEnum(node)];
730
731 if (tree.value_map.get(data.if3.cond)) |val| {
732 const offset = @intFromBool(val.isZero(tree.comp));
733 return tree.isLvalExtra(tree.data[data.if3.body + offset], is_const);
2888 .builtin_choose_expr => |conditional| {
2889 if (tree.value_map.get(conditional.cond)) |val| {
2890 if (!val.isZero(tree.comp)) {
2891 return tree.isLvalExtra(conditional.then_expr, is_const);
2892 } else {
2893 return tree.isLvalExtra(conditional.else_expr, is_const);
2894 }
7342895 }
7352896 return false;
7362897 },
2898 .compound_assign_dummy_expr => return true,
7372899 else => return false,
7382900 }
7392901}
7402902
741/// This should only be used for node tags that represent AST nodes which have an arbitrary number of children
742/// It particular it should *not* be used for nodes with .un or .bin data types
743///
744/// For call expressions, child_nodes[0] is the function pointer being called and child_nodes[1..]
745/// are the arguments
746///
747/// For generic selection expressions, child_nodes[0] is the controlling expression,
748/// child_nodes[1] is the chosen expression (it is a syntax error for there to be no chosen expression),
749/// and child_nodes[2..] are the remaining expressions.
750pub fn childNodes(tree: *const Tree, node: NodeIndex) []const NodeIndex {
751 const tags = tree.nodes.items(.tag);
752 const data = tree.nodes.items(.data);
753 switch (tags[@intFromEnum(node)]) {
754 .compound_stmt_two,
755 .array_init_expr_two,
756 .struct_init_expr_two,
757 .enum_decl_two,
758 .struct_decl_two,
759 .union_decl_two,
760 .call_expr_one,
761 .generic_expr_one,
762 => {
763 const index: u32 = @intFromEnum(node);
764 const end = std.mem.indexOfScalar(NodeIndex, &data[index].two, .none) orelse 2;
765 return data[index].two[0..end];
766 },
767 .compound_stmt,
768 .array_init_expr,
769 .struct_init_expr,
770 .enum_decl,
771 .struct_decl,
772 .union_decl,
773 .call_expr,
774 .generic_expr,
775 => {
776 const range = data[@intFromEnum(node)].range;
777 return tree.data[range.start..range.end];
778 },
779 else => unreachable,
780 }
781}
782
7832903pub fn tokSlice(tree: *const Tree, tok_i: TokenIndex) []const u8 {
7842904 if (tree.tokens.items(.id)[tok_i].lexeme()) |some| return some;
7852905 const loc = tree.tokens.items(.loc)[tok_i];
7862906 return tree.comp.locSlice(loc);
7872907}
7882908
789pub fn nodeTok(tree: *const Tree, node: NodeIndex) ?TokenIndex {
790 std.debug.assert(node != .none);
791 const loc = tree.nodes.items(.loc)[@intFromEnum(node)];
792 return switch (loc) {
793 .none => null,
794 else => |tok_i| @intFromEnum(tok_i),
795 };
796}
797
798pub fn nodeLoc(tree: *const Tree, node: NodeIndex) ?Source.Location {
799 const tok_i = tree.nodeTok(node) orelse return null;
800 return tree.tokens.items(.loc)[@intFromEnum(tok_i)];
801}
802
803pub fn dump(tree: *const Tree, config: std.Io.tty.Config, writer: anytype) !void {
804 const mapper = tree.comp.string_interner.getFastTypeMapper(tree.comp.gpa) catch tree.comp.string_interner.getSlowTypeMapper();
805 defer mapper.deinit(tree.comp.gpa);
806
807 for (tree.root_decls) |i| {
808 try tree.dumpNode(i, 0, mapper, config, writer);
809 try writer.writeByte('\n');
2909pub fn dump(tree: *const Tree, config: std.Io.tty.Config, w: *std.Io.Writer) std.Io.tty.Config.SetColorError!void {
2910 for (tree.root_decls.items) |i| {
2911 try tree.dumpNode(i, 0, config, w);
2912 try w.writeByte('\n');
8102913 }
2914 try w.flush();
8112915}
8122916
813fn dumpFieldAttributes(tree: *const Tree, attributes: []const Attribute, level: u32, writer: anytype) !void {
2917fn dumpFieldAttributes(tree: *const Tree, attributes: []const Attribute, level: u32, w: *std.Io.Writer) !void {
8142918 for (attributes) |attr| {
815 try writer.writeByteNTimes(' ', level);
816 try writer.print("field attr: {s}", .{@tagName(attr.tag)});
817 try tree.dumpAttribute(attr, writer);
2919 try w.splatByteAll(' ', level);
2920 try w.print("field attr: {s}", .{@tagName(attr.tag)});
2921 try tree.dumpAttribute(attr, w);
8182922 }
8192923}
8202924
821fn dumpAttribute(tree: *const Tree, attr: Attribute, writer: anytype) !void {
2925fn dumpAttribute(tree: *const Tree, attr: Attribute, w: *std.Io.Writer) !void {
8222926 switch (attr.tag) {
8232927 inline else => |tag| {
8242928 const args = @field(attr.args, @tagName(tag));
8252929 const fields = @typeInfo(@TypeOf(args)).@"struct".fields;
8262930 if (fields.len == 0) {
827 try writer.writeByte('\n');
2931 try w.writeByte('\n');
8282932 return;
8292933 }
830 try writer.writeByte(' ');
2934 try w.writeByte(' ');
8312935 inline for (fields, 0..) |f, i| {
8322936 if (comptime std.mem.eql(u8, f.name, "__name_tok")) continue;
8332937 if (i != 0) {
834 try writer.writeAll(", ");
2938 try w.writeAll(", ");
8352939 }
836 try writer.writeAll(f.name);
837 try writer.writeAll(": ");
2940 try w.writeAll(f.name);
2941 try w.writeAll(": ");
8382942 switch (f.type) {
839 Interner.Ref => try writer.print("\"{s}\"", .{tree.interner.get(@field(args, f.name)).bytes}),
840 ?Interner.Ref => try writer.print("\"{?s}\"", .{if (@field(args, f.name)) |str| tree.interner.get(str).bytes else null}),
2943 Interner.Ref => try w.print("\"{s}\"", .{tree.interner.get(@field(args, f.name)).bytes}),
2944 ?Interner.Ref => try w.print("\"{?s}\"", .{if (@field(args, f.name)) |str| tree.interner.get(str).bytes else null}),
8412945 else => switch (@typeInfo(f.type)) {
842 .@"enum" => try writer.writeAll(@tagName(@field(args, f.name))),
843 else => try writer.print("{any}", .{@field(args, f.name)}),
2946 .@"enum" => try w.writeAll(@tagName(@field(args, f.name))),
2947 else => try w.print("{any}", .{@field(args, f.name)}),
8442948 },
8452949 }
8462950 }
847 try writer.writeByte('\n');
2951 try w.writeByte('\n');
8482952 return;
8492953 },
8502954 }
......@@ -852,11 +2956,10 @@ fn dumpAttribute(tree: *const Tree, attr: Attribute, writer: anytype) !void {
8522956
8532957fn dumpNode(
8542958 tree: *const Tree,
855 node: NodeIndex,
2959 node_index: Node.Index,
8562960 level: u32,
857 mapper: StringInterner.TypeMapper,
8582961 config: std.Io.tty.Config,
859 w: anytype,
2962 w: *std.Io.Writer,
8602963) !void {
8612964 const delta = 2;
8622965 const half = delta / 2;
......@@ -866,43 +2969,63 @@ fn dumpNode(
8662969 const NAME = std.Io.tty.Color.bright_red;
8672970 const LITERAL = std.Io.tty.Color.bright_green;
8682971 const ATTRIBUTE = std.Io.tty.Color.bright_yellow;
869 std.debug.assert(node != .none);
870
871 const tag = tree.nodes.items(.tag)[@intFromEnum(node)];
872 const data = tree.nodes.items(.data)[@intFromEnum(node)];
873 const ty = tree.nodes.items(.ty)[@intFromEnum(node)];
874 try w.writeByteNTimes(' ', level);
875
876 try config.setColor(w, if (tag.isImplicit()) IMPLICIT else TAG);
877 try w.print("{s}: ", .{@tagName(tag)});
878 if (tag == .implicit_cast or tag == .explicit_cast) {
879 try config.setColor(w, .white);
880 try w.print("({s}) ", .{@tagName(data.cast.kind)});
2972
2973 const node = node_index.get(tree);
2974 try w.splatByteAll(' ', level);
2975
2976 if (config == .no_color) {
2977 if (node.isImplicit()) try w.writeAll("implicit ");
2978 } else {
2979 try config.setColor(w, if (node.isImplicit()) IMPLICIT else TAG);
8812980 }
882 try config.setColor(w, TYPE);
883 try w.writeByte('\'');
884 const name = ty.getName();
885 if (name != .empty) {
886 try w.print("{s}': '", .{mapper.lookup(name)});
2981 try w.print("{s}", .{@tagName(node)});
2982
2983 if (node_index.qtOrNull(tree)) |qt| {
2984 try w.writeAll(": ");
2985 switch (node) {
2986 .cast => |cast| {
2987 try config.setColor(w, .white);
2988 try w.print("({s}) ", .{@tagName(cast.kind)});
2989 },
2990 else => {},
2991 }
2992
2993 try config.setColor(w, TYPE);
2994 try w.writeByte('\'');
2995 try qt.dump(tree.comp, w);
2996 try w.writeByte('\'');
8872997 }
888 try ty.dump(mapper, tree.comp.langopts, w);
889 try w.writeByte('\'');
8902998
891 if (tree.isLval(node)) {
2999 if (tree.isLval(node_index)) {
8923000 try config.setColor(w, ATTRIBUTE);
8933001 try w.writeAll(" lvalue");
8943002 }
895 if (tree.isBitfield(node)) {
3003 if (tree.isBitfield(node_index)) {
8963004 try config.setColor(w, ATTRIBUTE);
8973005 try w.writeAll(" bitfield");
8983006 }
899 if (tree.value_map.get(node)) |val| {
3007
3008 if (tree.value_map.get(node_index)) |val| {
9003009 try config.setColor(w, LITERAL);
9013010 try w.writeAll(" (value: ");
902 try val.print(ty, tree.comp, w);
3011 if (try val.print(node_index.qt(tree), tree.comp, w)) |nested| switch (nested) {
3012 .pointer => |ptr| {
3013 switch (tree.nodes.items(.tag)[ptr.node]) {
3014 .compound_literal_expr => {
3015 try w.writeAll("(compound literal) ");
3016 _ = try ptr.offset.print(tree.comp.type_store.ptrdiff, tree.comp, w);
3017 },
3018 else => {
3019 const ptr_node: Node.Index = @enumFromInt(ptr.node);
3020 const decl_name = tree.tokSlice(ptr_node.tok(tree));
3021 try ptr.offset.printPointer(decl_name, tree.comp, w);
3022 },
3023 }
3024 },
3025 };
9033026 try w.writeByte(')');
9043027 }
905 if (tag == .implicit_return and data.return_zero) {
3028 if (node == .return_stmt and node.return_stmt.operand == .implicit and node.return_stmt.operand.implicit) {
9063029 try config.setColor(w, IMPLICIT);
9073030 try w.writeAll(" (value: 0)");
9083031 try config.setColor(w, .reset);
......@@ -911,379 +3034,428 @@ fn dumpNode(
9113034 try w.writeAll("\n");
9123035 try config.setColor(w, .reset);
9133036
914 if (ty.specifier == .attributed) {
3037 if (node_index.qtOrNull(tree)) |qt| {
9153038 try config.setColor(w, ATTRIBUTE);
916 var it = Attribute.Iterator.initType(ty);
3039 var it = Attribute.Iterator.initType(qt, tree.comp);
9173040 while (it.next()) |item| {
9183041 const attr, _ = item;
919 try w.writeByteNTimes(' ', level + half);
3042 try w.splatByteAll(' ', level + half);
9203043 try w.print("attr: {s}", .{@tagName(attr.tag)});
9213044 try tree.dumpAttribute(attr, w);
9223045 }
9233046 try config.setColor(w, .reset);
9243047 }
9253048
926 switch (tag) {
927 .invalid => unreachable,
928 .file_scope_asm => {
929 try w.writeByteNTimes(' ', level + 1);
930 try tree.dumpNode(data.decl.node, level + delta, mapper, config, w);
3049 switch (node) {
3050 .empty_decl => {},
3051 .global_asm, .gnu_asm_simple => |@"asm"| {
3052 try w.splatByteAll(' ', level + 1);
3053 try tree.dumpNode(@"asm".asm_str, level + delta, config, w);
9313054 },
932 .gnu_asm_simple => {
933 try w.writeByteNTimes(' ', level);
934 try tree.dumpNode(data.un, level, mapper, config, w);
935 },
936 .static_assert => {
937 try w.writeByteNTimes(' ', level + 1);
3055 .static_assert => |assert| {
3056 try w.splatByteAll(' ', level + 1);
9383057 try w.writeAll("condition:\n");
939 try tree.dumpNode(data.bin.lhs, level + delta, mapper, config, w);
940 if (data.bin.rhs != .none) {
941 try w.writeByteNTimes(' ', level + 1);
3058 try tree.dumpNode(assert.cond, level + delta, config, w);
3059 if (assert.message) |some| {
3060 try w.splatByteAll(' ', level + 1);
9423061 try w.writeAll("diagnostic:\n");
943 try tree.dumpNode(data.bin.rhs, level + delta, mapper, config, w);
3062 try tree.dumpNode(some, level + delta, config, w);
3063 }
3064 },
3065 .function => |function| {
3066 try w.splatByteAll(' ', level + half);
3067
3068 try config.setColor(w, ATTRIBUTE);
3069 if (function.static) try w.writeAll("static ");
3070 if (function.@"inline") try w.writeAll("inline ");
3071
3072 try config.setColor(w, .reset);
3073 try w.writeAll("name: ");
3074 try config.setColor(w, NAME);
3075 try w.print("{s}\n", .{tree.tokSlice(function.name_tok)});
3076 try config.setColor(w, .reset);
3077
3078 if (function.body) |body| {
3079 try w.splatByteAll(' ', level + half);
3080 try w.writeAll("body:\n");
3081 try tree.dumpNode(body, level + delta, config, w);
3082 }
3083 if (function.definition) |definition| {
3084 try w.splatByteAll(' ', level + half);
3085 try w.writeAll("definition: ");
3086 try config.setColor(w, NAME);
3087 try w.print("0x{X}\n", .{@intFromEnum(definition)});
3088 try config.setColor(w, .reset);
9443089 }
9453090 },
946 .fn_proto,
947 .static_fn_proto,
948 .inline_fn_proto,
949 .inline_static_fn_proto,
950 => {
951 try w.writeByteNTimes(' ', level + half);
3091 .typedef => |typedef| {
3092 try w.splatByteAll(' ', level + half);
9523093 try w.writeAll("name: ");
9533094 try config.setColor(w, NAME);
954 try w.print("{s}\n", .{tree.tokSlice(data.decl.name)});
3095 try w.print("{s}\n", .{tree.tokSlice(typedef.name_tok)});
9553096 try config.setColor(w, .reset);
9563097 },
957 .fn_def,
958 .static_fn_def,
959 .inline_fn_def,
960 .inline_static_fn_def,
961 => {
962 try w.writeByteNTimes(' ', level + half);
3098 .param => |param| {
3099 try w.splatByteAll(' ', level + half);
3100
3101 switch (param.storage_class) {
3102 .auto => {},
3103 .register => {
3104 try config.setColor(w, ATTRIBUTE);
3105 try w.writeAll("register ");
3106 try config.setColor(w, .reset);
3107 },
3108 }
3109
9633110 try w.writeAll("name: ");
9643111 try config.setColor(w, NAME);
965 try w.print("{s}\n", .{tree.tokSlice(data.decl.name)});
3112 try w.print("{s}\n", .{tree.tokSlice(param.name_tok)});
9663113 try config.setColor(w, .reset);
967 try w.writeByteNTimes(' ', level + half);
968 try w.writeAll("body:\n");
969 try tree.dumpNode(data.decl.node, level + delta, mapper, config, w);
970 },
971 .typedef,
972 .@"var",
973 .extern_var,
974 .static_var,
975 .implicit_static_var,
976 .threadlocal_var,
977 .threadlocal_extern_var,
978 .threadlocal_static_var,
979 => {
980 try w.writeByteNTimes(' ', level + half);
3114 },
3115 .variable => |variable| {
3116 try w.splatByteAll(' ', level + half);
3117
3118 try config.setColor(w, ATTRIBUTE);
3119 switch (variable.storage_class) {
3120 .auto => {},
3121 .static => try w.writeAll("static "),
3122 .@"extern" => try w.writeAll("extern "),
3123 .register => try w.writeAll("register "),
3124 }
3125 if (variable.thread_local) try w.writeAll("thread_local ");
3126 try config.setColor(w, .reset);
3127
9813128 try w.writeAll("name: ");
9823129 try config.setColor(w, NAME);
983 try w.print("{s}\n", .{tree.tokSlice(data.decl.name)});
3130 try w.print("{s}\n", .{tree.tokSlice(variable.name_tok)});
9843131 try config.setColor(w, .reset);
985 if (data.decl.node != .none) {
986 try w.writeByteNTimes(' ', level + half);
3132
3133 if (variable.initializer) |some| {
3134 try config.setColor(w, .reset);
3135 try w.splatByteAll(' ', level + half);
9873136 try w.writeAll("init:\n");
988 try tree.dumpNode(data.decl.node, level + delta, mapper, config, w);
3137 try tree.dumpNode(some, level + delta, config, w);
3138 }
3139 if (variable.definition) |definition| {
3140 try w.splatByteAll(' ', level + half);
3141 try w.writeAll("definition: ");
3142 try config.setColor(w, NAME);
3143 try w.print("0x{X}\n", .{@intFromEnum(definition)});
3144 try config.setColor(w, .reset);
9893145 }
9903146 },
991 .enum_field_decl => {
992 try w.writeByteNTimes(' ', level + half);
3147 .enum_field => |field| {
3148 try w.splatByteAll(' ', level + half);
9933149 try w.writeAll("name: ");
9943150 try config.setColor(w, NAME);
995 try w.print("{s}\n", .{tree.tokSlice(data.decl.name)});
3151 try w.print("{s}\n", .{tree.tokSlice(field.name_tok)});
9963152 try config.setColor(w, .reset);
997 if (data.decl.node != .none) {
998 try w.writeByteNTimes(' ', level + half);
999 try w.writeAll("value:\n");
1000 try tree.dumpNode(data.decl.node, level + delta, mapper, config, w);
3153 if (field.init) |some| {
3154 try w.splatByteAll(' ', level + half);
3155 try w.writeAll("init:\n");
3156 try tree.dumpNode(some, level + delta, config, w);
10013157 }
10023158 },
1003 .record_field_decl => {
1004 if (data.decl.name != 0) {
1005 try w.writeByteNTimes(' ', level + half);
3159 .record_field => |field| {
3160 const name_tok_id = tree.tokens.items(.id)[field.name_or_first_tok];
3161 if (name_tok_id == .identifier or name_tok_id == .extended_identifier) {
3162 try w.splatByteAll(' ', level + half);
10063163 try w.writeAll("name: ");
10073164 try config.setColor(w, NAME);
1008 try w.print("{s}\n", .{tree.tokSlice(data.decl.name)});
3165 try w.print("{s}\n", .{tree.tokSlice(field.name_or_first_tok)});
10093166 try config.setColor(w, .reset);
10103167 }
1011 if (data.decl.node != .none) {
1012 try w.writeByteNTimes(' ', level + half);
3168 if (field.bit_width) |some| {
3169 try w.splatByteAll(' ', level + half);
10133170 try w.writeAll("bits:\n");
1014 try tree.dumpNode(data.decl.node, level + delta, mapper, config, w);
3171 try tree.dumpNode(some, level + delta, config, w);
3172 }
3173 },
3174 .compound_stmt => |compound| {
3175 for (compound.body, 0..) |stmt, i| {
3176 if (i != 0) try w.writeByte('\n');
3177 try tree.dumpNode(stmt, level + delta, config, w);
3178 }
3179 },
3180 .enum_decl => |decl| {
3181 for (decl.fields, 0..) |field, i| {
3182 if (i != 0) try w.writeByte('\n');
3183 try tree.dumpNode(field, level + delta, config, w);
10153184 }
10163185 },
1017 .indirect_record_field_decl => {},
1018 .compound_stmt,
1019 .array_init_expr,
1020 .struct_init_expr,
1021 .enum_decl,
1022 .struct_decl,
1023 .union_decl,
1024 .compound_stmt_two,
1025 .array_init_expr_two,
1026 .struct_init_expr_two,
1027 .enum_decl_two,
1028 .struct_decl_two,
1029 .union_decl_two,
1030 => {
1031 const child_nodes = tree.childNodes(node);
1032 const maybe_field_attributes = if (ty.getRecord()) |record| record.field_attributes else null;
1033 for (child_nodes, 0..) |stmt, i| {
3186 .struct_decl, .union_decl => |decl| {
3187 const fields = switch (node_index.qt(tree).base(tree.comp).type) {
3188 .@"struct", .@"union" => |record| record.fields,
3189 else => unreachable,
3190 };
3191
3192 var field_i: u32 = 0;
3193 for (decl.fields, 0..) |field_node, i| {
10343194 if (i != 0) try w.writeByte('\n');
1035 try tree.dumpNode(stmt, level + delta, mapper, config, w);
1036 if (maybe_field_attributes) |field_attributes| {
1037 if (field_attributes[i].len == 0) continue;
3195 try tree.dumpNode(field_node, level + delta, config, w);
10383196
1039 try config.setColor(w, ATTRIBUTE);
1040 try tree.dumpFieldAttributes(field_attributes[i], level + delta + half, w);
1041 try config.setColor(w, .reset);
1042 }
3197 if (field_node.get(tree) != .record_field) continue;
3198 if (fields.len == 0) continue;
3199
3200 const field_attributes = fields[field_i].attributes(tree.comp);
3201 field_i += 1;
3202
3203 if (field_attributes.len == 0) continue;
3204
3205 try config.setColor(w, ATTRIBUTE);
3206 try tree.dumpFieldAttributes(field_attributes, level + delta + half, w);
3207 try config.setColor(w, .reset);
3208 }
3209 },
3210 .array_init_expr, .struct_init_expr => |init| {
3211 for (init.items, 0..) |item, i| {
3212 if (i != 0) try w.writeByte('\n');
3213 try tree.dumpNode(item, level + delta, config, w);
10433214 }
10443215 },
1045 .union_init_expr => {
1046 try w.writeByteNTimes(' ', level + half);
3216 .union_init_expr => |init| {
3217 try w.splatByteAll(' ', level + half);
10473218 try w.writeAll("field index: ");
10483219 try config.setColor(w, LITERAL);
1049 try w.print("{d}\n", .{data.union_init.field_index});
3220 try w.print("{d}\n", .{init.field_index});
10503221 try config.setColor(w, .reset);
1051 if (data.union_init.node != .none) {
1052 try tree.dumpNode(data.union_init.node, level + delta, mapper, config, w);
3222 if (init.initializer) |some| {
3223 try tree.dumpNode(some, level + delta, config, w);
10533224 }
10543225 },
1055 .compound_literal_expr,
1056 .static_compound_literal_expr,
1057 .thread_local_compound_literal_expr,
1058 .static_thread_local_compound_literal_expr,
1059 => {
1060 try tree.dumpNode(data.un, level + half, mapper, config, w);
3226 .compound_literal_expr => |literal| {
3227 if (literal.storage_class != .auto or literal.thread_local) {
3228 try w.splatByteAll(' ', level + half - 1);
3229
3230 try config.setColor(w, ATTRIBUTE);
3231 switch (literal.storage_class) {
3232 .auto => {},
3233 .static => try w.writeAll(" static"),
3234 .register => try w.writeAll(" register"),
3235 }
3236 if (literal.thread_local) try w.writeAll(" thread_local");
3237 try w.writeByte('\n');
3238 try config.setColor(w, .reset);
3239 }
3240
3241 try tree.dumpNode(literal.initializer, level + half, config, w);
10613242 },
1062 .labeled_stmt => {
1063 try w.writeByteNTimes(' ', level + half);
3243 .labeled_stmt => |labeled| {
3244 try w.splatByteAll(' ', level + half);
10643245 try w.writeAll("label: ");
10653246 try config.setColor(w, LITERAL);
1066 try w.print("{s}\n", .{tree.tokSlice(data.decl.name)});
3247 try w.print("{s}\n", .{tree.tokSlice(labeled.label_tok)});
3248
10673249 try config.setColor(w, .reset);
1068 if (data.decl.node != .none) {
1069 try w.writeByteNTimes(' ', level + half);
1070 try w.writeAll("stmt:\n");
1071 try tree.dumpNode(data.decl.node, level + delta, mapper, config, w);
1072 }
1073 },
1074 .case_stmt => {
1075 try w.writeByteNTimes(' ', level + half);
1076 try w.writeAll("value:\n");
1077 try tree.dumpNode(data.bin.lhs, level + delta, mapper, config, w);
1078 if (data.bin.rhs != .none) {
1079 try w.writeByteNTimes(' ', level + half);
1080 try w.writeAll("stmt:\n");
1081 try tree.dumpNode(data.bin.rhs, level + delta, mapper, config, w);
1082 }
3250 try w.splatByteAll(' ', level + half);
3251 try w.writeAll("stmt:\n");
3252 try tree.dumpNode(labeled.body, level + delta, config, w);
10833253 },
1084 .case_range_stmt => {
1085 try w.writeByteNTimes(' ', level + half);
1086 try w.writeAll("range start:\n");
1087 try tree.dumpNode(tree.data[data.if3.body], level + delta, mapper, config, w);
3254 .case_stmt => |case| {
3255 try w.splatByteAll(' ', level + half);
10883256
1089 try w.writeByteNTimes(' ', level + half);
1090 try w.writeAll("range end:\n");
1091 try tree.dumpNode(tree.data[data.if3.body + 1], level + delta, mapper, config, w);
3257 if (case.end) |some| {
3258 try w.writeAll("range start:\n");
3259 try tree.dumpNode(case.start, level + delta, config, w);
10923260
1093 if (data.if3.cond != .none) {
1094 try w.writeByteNTimes(' ', level + half);
1095 try w.writeAll("stmt:\n");
1096 try tree.dumpNode(data.if3.cond, level + delta, mapper, config, w);
3261 try w.splatByteAll(' ', level + half);
3262 try w.writeAll("range end:\n");
3263 try tree.dumpNode(some, level + delta, config, w);
3264 } else {
3265 try w.writeAll("value:\n");
3266 try tree.dumpNode(case.start, level + delta, config, w);
10973267 }
3268
3269 try w.splatByteAll(' ', level + half);
3270 try w.writeAll("stmt:\n");
3271 try tree.dumpNode(case.body, level + delta, config, w);
10983272 },
1099 .default_stmt => {
1100 if (data.un != .none) {
1101 try w.writeByteNTimes(' ', level + half);
1102 try w.writeAll("stmt:\n");
1103 try tree.dumpNode(data.un, level + delta, mapper, config, w);
1104 }
3273 .default_stmt => |default| {
3274 try w.splatByteAll(' ', level + half);
3275 try w.writeAll("stmt:\n");
3276 try tree.dumpNode(default.body, level + delta, config, w);
11053277 },
1106 .binary_cond_expr, .cond_expr, .if_then_else_stmt, .builtin_choose_expr => {
1107 try w.writeByteNTimes(' ', level + half);
3278 .binary_cond_expr, .cond_expr, .builtin_choose_expr => |conditional| {
3279 try w.splatByteAll(' ', level + half);
11083280 try w.writeAll("cond:\n");
1109 try tree.dumpNode(data.if3.cond, level + delta, mapper, config, w);
3281 try tree.dumpNode(conditional.cond, level + delta, config, w);
11103282
1111 try w.writeByteNTimes(' ', level + half);
3283 try w.splatByteAll(' ', level + half);
11123284 try w.writeAll("then:\n");
1113 try tree.dumpNode(tree.data[data.if3.body], level + delta, mapper, config, w);
3285 try tree.dumpNode(conditional.then_expr, level + delta, config, w);
11143286
1115 try w.writeByteNTimes(' ', level + half);
3287 try w.splatByteAll(' ', level + half);
11163288 try w.writeAll("else:\n");
1117 try tree.dumpNode(tree.data[data.if3.body + 1], level + delta, mapper, config, w);
3289 try tree.dumpNode(conditional.else_expr, level + delta, config, w);
11183290 },
1119 .builtin_types_compatible_p => {
1120 std.debug.assert(tree.nodes.items(.tag)[@intFromEnum(data.bin.lhs)] == .invalid);
1121 std.debug.assert(tree.nodes.items(.tag)[@intFromEnum(data.bin.rhs)] == .invalid);
1122
1123 try w.writeByteNTimes(' ', level + half);
3291 .builtin_types_compatible_p => |call| {
3292 try w.splatByteAll(' ', level + half);
11243293 try w.writeAll("lhs: ");
1125
1126 const lhs_ty = tree.nodes.items(.ty)[@intFromEnum(data.bin.lhs)];
11273294 try config.setColor(w, TYPE);
1128 try lhs_ty.dump(mapper, tree.comp.langopts, w);
1129 try config.setColor(w, .reset);
3295 try call.lhs.dump(tree.comp, w);
11303296 try w.writeByte('\n');
3297 try config.setColor(w, .reset);
11313298
1132 try w.writeByteNTimes(' ', level + half);
3299 try w.splatByteAll(' ', level + half);
11333300 try w.writeAll("rhs: ");
1134
1135 const rhs_ty = tree.nodes.items(.ty)[@intFromEnum(data.bin.rhs)];
11363301 try config.setColor(w, TYPE);
1137 try rhs_ty.dump(mapper, tree.comp.langopts, w);
1138 try config.setColor(w, .reset);
3302 try call.rhs.dump(tree.comp, w);
11393303 try w.writeByte('\n');
3304 try config.setColor(w, .reset);
11403305 },
1141 .if_then_stmt => {
1142 try w.writeByteNTimes(' ', level + half);
1143 try w.writeAll("cond:\n");
1144 try tree.dumpNode(data.bin.lhs, level + delta, mapper, config, w);
3306 .builtin_convertvector => |convert| {
3307 try w.splatByteAll(' ', level + half);
3308 try w.writeAll("operand:\n");
3309 try tree.dumpNode(convert.operand, level + delta, config, w);
3310 },
3311 .builtin_shufflevector => |shuffle| {
3312 try w.splatByteAll(' ', level + half);
3313 try w.writeAll("lhs:\n");
3314 try tree.dumpNode(shuffle.lhs, level + delta, config, w);
3315
3316 try w.splatByteAll(' ', level + half);
3317 try w.writeAll("rhs:\n");
3318 try tree.dumpNode(shuffle.rhs, level + delta, config, w);
11453319
1146 if (data.bin.rhs != .none) {
1147 try w.writeByteNTimes(' ', level + half);
1148 try w.writeAll("then:\n");
1149 try tree.dumpNode(data.bin.rhs, level + delta, mapper, config, w);
3320 if (shuffle.indexes.len > 0) {
3321 try w.splatByteAll(' ', level + half);
3322 try w.writeAll("indexes:\n");
3323 for (shuffle.indexes) |index| {
3324 try tree.dumpNode(index, level + delta, config, w);
3325 }
11503326 }
11513327 },
1152 .switch_stmt, .while_stmt, .do_while_stmt => {
1153 try w.writeByteNTimes(' ', level + half);
3328 .if_stmt => |@"if"| {
3329 try w.splatByteAll(' ', level + half);
11543330 try w.writeAll("cond:\n");
1155 try tree.dumpNode(data.bin.lhs, level + delta, mapper, config, w);
3331 try tree.dumpNode(@"if".cond, level + delta, config, w);
11563332
1157 if (data.bin.rhs != .none) {
1158 try w.writeByteNTimes(' ', level + half);
1159 try w.writeAll("body:\n");
1160 try tree.dumpNode(data.bin.rhs, level + delta, mapper, config, w);
3333 try w.splatByteAll(' ', level + half);
3334 try w.writeAll("then:\n");
3335 try tree.dumpNode(@"if".then_body, level + delta, config, w);
3336
3337 if (@"if".else_body) |some| {
3338 try w.splatByteAll(' ', level + half);
3339 try w.writeAll("else:\n");
3340 try tree.dumpNode(some, level + delta, config, w);
11613341 }
11623342 },
1163 .for_decl_stmt => {
1164 const for_decl = data.forDecl(tree);
3343 .switch_stmt => |@"switch"| {
3344 try w.splatByteAll(' ', level + half);
3345 try w.writeAll("cond:\n");
3346 try tree.dumpNode(@"switch".cond, level + delta, config, w);
11653347
1166 try w.writeByteNTimes(' ', level + half);
1167 try w.writeAll("decl:\n");
1168 for (for_decl.decls) |decl| {
1169 try tree.dumpNode(decl, level + delta, mapper, config, w);
1170 try w.writeByte('\n');
1171 }
1172 if (for_decl.cond != .none) {
1173 try w.writeByteNTimes(' ', level + half);
1174 try w.writeAll("cond:\n");
1175 try tree.dumpNode(for_decl.cond, level + delta, mapper, config, w);
1176 }
1177 if (for_decl.incr != .none) {
1178 try w.writeByteNTimes(' ', level + half);
1179 try w.writeAll("incr:\n");
1180 try tree.dumpNode(for_decl.incr, level + delta, mapper, config, w);
1181 }
1182 if (for_decl.body != .none) {
1183 try w.writeByteNTimes(' ', level + half);
1184 try w.writeAll("body:\n");
1185 try tree.dumpNode(for_decl.body, level + delta, mapper, config, w);
1186 }
3348 try w.splatByteAll(' ', level + half);
3349 try w.writeAll("body:\n");
3350 try tree.dumpNode(@"switch".body, level + delta, config, w);
11873351 },
1188 .forever_stmt => {
1189 if (data.un != .none) {
1190 try w.writeByteNTimes(' ', level + half);
1191 try w.writeAll("body:\n");
1192 try tree.dumpNode(data.un, level + delta, mapper, config, w);
1193 }
3352 .while_stmt => |@"while"| {
3353 try w.splatByteAll(' ', level + half);
3354 try w.writeAll("cond:\n");
3355 try tree.dumpNode(@"while".cond, level + delta, config, w);
3356
3357 try w.splatByteAll(' ', level + half);
3358 try w.writeAll("body:\n");
3359 try tree.dumpNode(@"while".body, level + delta, config, w);
11943360 },
1195 .for_stmt => {
1196 const for_stmt = data.forStmt(tree);
3361 .do_while_stmt => |do| {
3362 try w.splatByteAll(' ', level + half);
3363 try w.writeAll("cond:\n");
3364 try tree.dumpNode(do.cond, level + delta, config, w);
11973365
1198 if (for_stmt.init != .none) {
1199 try w.writeByteNTimes(' ', level + half);
1200 try w.writeAll("init:\n");
1201 try tree.dumpNode(for_stmt.init, level + delta, mapper, config, w);
3366 try w.splatByteAll(' ', level + half);
3367 try w.writeAll("body:\n");
3368 try tree.dumpNode(do.body, level + delta, config, w);
3369 },
3370 .for_stmt => |@"for"| {
3371 switch (@"for".init) {
3372 .decls => |decls| {
3373 try w.splatByteAll(' ', level + half);
3374 try w.writeAll("decl:\n");
3375 for (decls) |decl| {
3376 try tree.dumpNode(decl, level + delta, config, w);
3377 try w.writeByte('\n');
3378 }
3379 },
3380 .expr => |expr| if (expr) |some| {
3381 try w.splatByteAll(' ', level + half);
3382 try w.writeAll("init:\n");
3383 try tree.dumpNode(some, level + delta, config, w);
3384 },
12023385 }
1203 if (for_stmt.cond != .none) {
1204 try w.writeByteNTimes(' ', level + half);
3386 if (@"for".cond) |some| {
3387 try w.splatByteAll(' ', level + half);
12053388 try w.writeAll("cond:\n");
1206 try tree.dumpNode(for_stmt.cond, level + delta, mapper, config, w);
3389 try tree.dumpNode(some, level + delta, config, w);
12073390 }
1208 if (for_stmt.incr != .none) {
1209 try w.writeByteNTimes(' ', level + half);
3391 if (@"for".incr) |some| {
3392 try w.splatByteAll(' ', level + half);
12103393 try w.writeAll("incr:\n");
1211 try tree.dumpNode(for_stmt.incr, level + delta, mapper, config, w);
1212 }
1213 if (for_stmt.body != .none) {
1214 try w.writeByteNTimes(' ', level + half);
1215 try w.writeAll("body:\n");
1216 try tree.dumpNode(for_stmt.body, level + delta, mapper, config, w);
3394 try tree.dumpNode(some, level + delta, config, w);
12173395 }
3396 try w.splatByteAll(' ', level + half);
3397 try w.writeAll("body:\n");
3398 try tree.dumpNode(@"for".body, level + delta, config, w);
12183399 },
1219 .goto_stmt, .addr_of_label => {
1220 try w.writeByteNTimes(' ', level + half);
3400 .addr_of_label => |addr| {
3401 try w.splatByteAll(' ', level + half);
12213402 try w.writeAll("label: ");
12223403 try config.setColor(w, LITERAL);
1223 try w.print("{s}\n", .{tree.tokSlice(data.decl_ref)});
3404 try w.print("{s}\n", .{tree.tokSlice(addr.label_tok)});
12243405 try config.setColor(w, .reset);
12253406 },
1226 .continue_stmt, .break_stmt, .implicit_return, .null_stmt => {},
1227 .return_stmt => {
1228 if (data.un != .none) {
1229 try w.writeByteNTimes(' ', level + half);
1230 try w.writeAll("expr:\n");
1231 try tree.dumpNode(data.un, level + delta, mapper, config, w);
3407 .goto_stmt => |goto| {
3408 try w.splatByteAll(' ', level + half);
3409 try w.writeAll("label: ");
3410 try config.setColor(w, LITERAL);
3411 try w.print("{s}\n", .{tree.tokSlice(goto.label_tok)});
3412 try config.setColor(w, .reset);
3413 },
3414 .computed_goto_stmt => |goto| {
3415 try w.splatByteAll(' ', level + half);
3416 try w.writeAll("expr:\n");
3417 try tree.dumpNode(goto.expr, level + delta, config, w);
3418 },
3419 .continue_stmt, .break_stmt, .null_stmt => {},
3420 .return_stmt => |ret| {
3421 switch (ret.operand) {
3422 .expr => |expr| {
3423 try w.splatByteAll(' ', level + half);
3424 try w.writeAll("expr:\n");
3425 try tree.dumpNode(expr, level + delta, config, w);
3426 },
3427 .implicit => {},
3428 .none => {},
12323429 }
12333430 },
1234 .call_expr, .call_expr_one => {
1235 const child_nodes = tree.childNodes(node);
1236 const fn_ptr = child_nodes[0];
1237 const args = child_nodes[1..];
1238
1239 try w.writeByteNTimes(' ', level + half);
1240 try w.writeAll("lhs:\n");
1241 try tree.dumpNode(fn_ptr, level + delta, mapper, config, w);
3431 .call_expr => |call| {
3432 try w.splatByteAll(' ', level + half);
3433 try w.writeAll("callee:\n");
3434 try tree.dumpNode(call.callee, level + delta, config, w);
12423435
1243 if (args.len > 0) {
1244 try w.writeByteNTimes(' ', level + half);
3436 if (call.args.len > 0) {
3437 try w.splatByteAll(' ', level + half);
12453438 try w.writeAll("args:\n");
1246 for (args) |arg| {
1247 try tree.dumpNode(arg, level + delta, mapper, config, w);
3439 for (call.args) |arg| {
3440 try tree.dumpNode(arg, level + delta, config, w);
12483441 }
12493442 }
12503443 },
1251 .builtin_call_expr => {
1252 try w.writeByteNTimes(' ', level + half);
3444 .builtin_call_expr => |call| {
3445 try w.splatByteAll(' ', level + half);
12533446 try w.writeAll("name: ");
12543447 try config.setColor(w, NAME);
1255 try w.print("{s}\n", .{tree.tokSlice(@intFromEnum(tree.data[data.range.start]))});
3448 try w.print("{s}\n", .{tree.tokSlice(call.builtin_tok)});
12563449 try config.setColor(w, .reset);
12573450
1258 try w.writeByteNTimes(' ', level + half);
1259 try w.writeAll("args:\n");
1260 for (tree.data[data.range.start + 1 .. data.range.end]) |arg| try tree.dumpNode(arg, level + delta, mapper, config, w);
1261 },
1262 .builtin_call_expr_one => {
1263 try w.writeByteNTimes(' ', level + half);
1264 try w.writeAll("name: ");
1265 try config.setColor(w, NAME);
1266 try w.print("{s}\n", .{tree.tokSlice(data.decl.name)});
1267 try config.setColor(w, .reset);
1268 if (data.decl.node != .none) {
1269 try w.writeByteNTimes(' ', level + half);
1270 try w.writeAll("arg:\n");
1271 try tree.dumpNode(data.decl.node, level + delta, mapper, config, w);
1272 }
1273 },
1274 .special_builtin_call_one => {
1275 try w.writeByteNTimes(' ', level + half);
1276 try w.writeAll("name: ");
1277 try config.setColor(w, NAME);
1278 try w.print("{s}\n", .{tree.tokSlice(data.decl.name)});
1279 try config.setColor(w, .reset);
1280 if (data.decl.node != .none) {
1281 try w.writeByteNTimes(' ', level + half);
1282 try w.writeAll("arg:\n");
1283 try tree.dumpNode(data.decl.node, level + delta, mapper, config, w);
3451 if (call.args.len > 0) {
3452 try w.splatByteAll(' ', level + half);
3453 try w.writeAll("args:\n");
3454 for (call.args) |arg| {
3455 try tree.dumpNode(arg, level + delta, config, w);
3456 }
12843457 }
12853458 },
1286 .comma_expr,
12873459 .assign_expr,
12883460 .mul_assign_expr,
12893461 .div_assign_expr,
......@@ -1295,6 +3467,7 @@ fn dumpNode(
12953467 .bit_and_assign_expr,
12963468 .bit_xor_assign_expr,
12973469 .bit_or_assign_expr,
3470 .comma_expr,
12983471 .bool_or_expr,
12993472 .bool_and_expr,
13003473 .bit_or_expr,
......@@ -1313,17 +3486,17 @@ fn dumpNode(
13133486 .mul_expr,
13143487 .div_expr,
13153488 .mod_expr,
1316 => {
1317 try w.writeByteNTimes(' ', level + 1);
3489 => |bin| {
3490 try w.splatByteAll(' ', level + 1);
13183491 try w.writeAll("lhs:\n");
1319 try tree.dumpNode(data.bin.lhs, level + delta, mapper, config, w);
1320 try w.writeByteNTimes(' ', level + 1);
3492 try tree.dumpNode(bin.lhs, level + delta, config, w);
3493
3494 try w.splatByteAll(' ', level + 1);
13213495 try w.writeAll("rhs:\n");
1322 try tree.dumpNode(data.bin.rhs, level + delta, mapper, config, w);
3496 try tree.dumpNode(bin.rhs, level + delta, config, w);
13233497 },
1324 .explicit_cast, .implicit_cast => try tree.dumpNode(data.cast.operand, level + delta, mapper, config, w),
3498 .cast => |cast| try tree.dumpNode(cast.operand, level + delta, config, w),
13253499 .addr_of_expr,
1326 .computed_goto_stmt,
13273500 .deref_expr,
13283501 .plus_expr,
13293502 .negate_expr,
......@@ -1336,23 +3509,25 @@ fn dumpNode(
13363509 .post_inc_expr,
13373510 .post_dec_expr,
13383511 .paren_expr,
1339 => {
1340 try w.writeByteNTimes(' ', level + 1);
3512 .stmt_expr,
3513 .imaginary_literal,
3514 => |un| {
3515 try w.splatByteAll(' ', level + 1);
13413516 try w.writeAll("operand:\n");
1342 try tree.dumpNode(data.un, level + delta, mapper, config, w);
3517 try tree.dumpNode(un.operand, level + delta, config, w);
13433518 },
1344 .decl_ref_expr => {
1345 try w.writeByteNTimes(' ', level + 1);
3519 .decl_ref_expr, .enumeration_ref => |dr| {
3520 try w.splatByteAll(' ', level + 1);
13463521 try w.writeAll("name: ");
13473522 try config.setColor(w, NAME);
1348 try w.print("{s}\n", .{tree.tokSlice(data.decl_ref)});
3523 try w.print("{s}\n", .{tree.tokSlice(dr.name_tok)});
13493524 try config.setColor(w, .reset);
13503525 },
1351 .enumeration_ref => {
1352 try w.writeByteNTimes(' ', level + 1);
3526 .builtin_ref => |dr| {
3527 try w.splatByteAll(' ', level + 1);
13533528 try w.writeAll("name: ");
13543529 try config.setColor(w, NAME);
1355 try w.print("{s}\n", .{tree.tokSlice(data.decl_ref)});
3530 try w.print("{s}\n", .{tree.tokSlice(dr.name_tok)});
13563531 try config.setColor(w, .reset);
13573532 },
13583533 .bool_literal,
......@@ -1362,67 +3537,71 @@ fn dumpNode(
13623537 .float_literal,
13633538 .string_literal_expr,
13643539 => {},
1365 .member_access_expr, .member_access_ptr_expr => {
1366 try w.writeByteNTimes(' ', level + 1);
3540 .member_access_expr, .member_access_ptr_expr => |access| {
3541 try w.splatByteAll(' ', level + 1);
13673542 try w.writeAll("lhs:\n");
1368 try tree.dumpNode(data.member.lhs, level + delta, mapper, config, w);
3543 try tree.dumpNode(access.base, level + delta, config, w);
13693544
1370 var lhs_ty = tree.nodes.items(.ty)[@intFromEnum(data.member.lhs)];
1371 if (lhs_ty.isPtr()) lhs_ty = lhs_ty.elemType();
1372 lhs_ty = lhs_ty.canonicalize(.standard);
3545 var base_qt = access.base.qt(tree);
3546 if (base_qt.get(tree.comp, .pointer)) |some| base_qt = some.child;
3547 const fields = (base_qt.getRecord(tree.comp) orelse return).fields;
13733548
1374 try w.writeByteNTimes(' ', level + 1);
3549 try w.splatByteAll(' ', level + 1);
13753550 try w.writeAll("name: ");
13763551 try config.setColor(w, NAME);
1377 try w.print("{s}\n", .{mapper.lookup(lhs_ty.data.record.fields[data.member.index].name)});
3552 try w.print("{s}\n", .{fields[access.member_index].name.lookup(tree.comp)});
13783553 try config.setColor(w, .reset);
13793554 },
1380 .array_access_expr => {
1381 if (data.bin.lhs != .none) {
1382 try w.writeByteNTimes(' ', level + 1);
1383 try w.writeAll("lhs:\n");
1384 try tree.dumpNode(data.bin.lhs, level + delta, mapper, config, w);
1385 }
1386 try w.writeByteNTimes(' ', level + 1);
3555 .array_access_expr => |access| {
3556 try w.splatByteAll(' ', level + 1);
3557 try w.writeAll("base:\n");
3558 try tree.dumpNode(access.base, level + delta, config, w);
3559
3560 try w.splatByteAll(' ', level + 1);
13873561 try w.writeAll("index:\n");
1388 try tree.dumpNode(data.bin.rhs, level + delta, mapper, config, w);
3562 try tree.dumpNode(access.index, level + delta, config, w);
13893563 },
1390 .sizeof_expr, .alignof_expr => {
1391 if (data.un != .none) {
1392 try w.writeByteNTimes(' ', level + 1);
3564 .sizeof_expr, .alignof_expr => |type_info| {
3565 if (type_info.expr) |some| {
3566 try w.splatByteAll(' ', level + 1);
13933567 try w.writeAll("expr:\n");
1394 try tree.dumpNode(data.un, level + delta, mapper, config, w);
3568 try tree.dumpNode(some, level + delta, config, w);
3569 } else {
3570 try w.splatByteAll(' ', level + half);
3571 try w.writeAll("operand type: ");
3572 try config.setColor(w, TYPE);
3573 try type_info.operand_qt.dump(tree.comp, w);
3574 try w.writeByte('\n');
3575 try config.setColor(w, .reset);
13953576 }
13963577 },
1397 .generic_expr, .generic_expr_one => {
1398 const child_nodes = tree.childNodes(node);
1399 const controlling = child_nodes[0];
1400 const chosen = child_nodes[1];
1401 const rest = child_nodes[2..];
1402
1403 try w.writeByteNTimes(' ', level + 1);
3578 .generic_expr => |generic| {
3579 try w.splatByteAll(' ', level + 1);
14043580 try w.writeAll("controlling:\n");
1405 try tree.dumpNode(controlling, level + delta, mapper, config, w);
1406 try w.writeByteNTimes(' ', level + 1);
3581 try tree.dumpNode(generic.controlling, level + delta, config, w);
3582 try w.splatByteAll(' ', level + 1);
14073583 try w.writeAll("chosen:\n");
1408 try tree.dumpNode(chosen, level + delta, mapper, config, w);
3584 try tree.dumpNode(generic.chosen, level + delta, config, w);
14093585
1410 if (rest.len > 0) {
1411 try w.writeByteNTimes(' ', level + 1);
3586 if (generic.rest.len > 0) {
3587 try w.splatByteAll(' ', level + 1);
14123588 try w.writeAll("rest:\n");
1413 for (rest) |expr| {
1414 try tree.dumpNode(expr, level + delta, mapper, config, w);
3589 for (generic.rest) |expr| {
3590 try tree.dumpNode(expr, level + delta, config, w);
14153591 }
14163592 }
14173593 },
1418 .generic_association_expr, .generic_default_expr, .stmt_expr, .imaginary_literal => {
1419 try tree.dumpNode(data.un, level + delta, mapper, config, w);
3594 .generic_association_expr => |assoc| {
3595 try tree.dumpNode(assoc.expr, level + delta, config, w);
3596 },
3597 .generic_default_expr => |default| {
3598 try tree.dumpNode(default.expr, level + delta, config, w);
14203599 },
1421 .array_filler_expr => {
1422 try w.writeByteNTimes(' ', level + 1);
3600 .array_filler_expr => |filler| {
3601 try w.splatByteAll(' ', level + 1);
14233602 try w.writeAll("count: ");
14243603 try config.setColor(w, LITERAL);
1425 try w.print("{d}\n", .{data.int});
3604 try w.print("{d}\n", .{filler.count});
14263605 try config.setColor(w, .reset);
14273606 },
14283607 .struct_forward_decl,
......@@ -1430,6 +3609,7 @@ fn dumpNode(
14303609 .enum_forward_decl,
14313610 .default_init_expr,
14323611 .cond_dummy_expr,
3612 .compound_assign_dummy_expr,
14333613 => {},
14343614 }
14353615}
lib/compiler/aro/aro/Type.zig deleted-2676
......@@ -1,2676 +0,0 @@
1const std = @import("std");
2const Tree = @import("Tree.zig");
3const TokenIndex = Tree.TokenIndex;
4const NodeIndex = Tree.NodeIndex;
5const Parser = @import("Parser.zig");
6const Compilation = @import("Compilation.zig");
7const Attribute = @import("Attribute.zig");
8const StringInterner = @import("StringInterner.zig");
9const StringId = StringInterner.StringId;
10const target_util = @import("target.zig");
11const LangOpts = @import("LangOpts.zig");
12const Writer = std.Io.Writer;
13
14pub const Qualifiers = packed struct {
15 @"const": bool = false,
16 atomic: bool = false,
17 @"volatile": bool = false,
18 restrict: bool = false,
19
20 // for function parameters only, stored here since it fits in the padding
21 register: bool = false,
22
23 pub fn any(quals: Qualifiers) bool {
24 return quals.@"const" or quals.restrict or quals.@"volatile" or quals.atomic;
25 }
26
27 pub fn dump(quals: Qualifiers, w: *Writer) !void {
28 if (quals.@"const") try w.writeAll("const ");
29 if (quals.atomic) try w.writeAll("_Atomic ");
30 if (quals.@"volatile") try w.writeAll("volatile ");
31 if (quals.restrict) try w.writeAll("restrict ");
32 if (quals.register) try w.writeAll("register ");
33 }
34
35 /// Merge the const/volatile qualifiers, used by type resolution
36 /// of the conditional operator
37 pub fn mergeCV(a: Qualifiers, b: Qualifiers) Qualifiers {
38 return .{
39 .@"const" = a.@"const" or b.@"const",
40 .@"volatile" = a.@"volatile" or b.@"volatile",
41 };
42 }
43
44 /// Merge all qualifiers, used by typeof()
45 fn mergeAll(a: Qualifiers, b: Qualifiers) Qualifiers {
46 return .{
47 .@"const" = a.@"const" or b.@"const",
48 .atomic = a.atomic or b.atomic,
49 .@"volatile" = a.@"volatile" or b.@"volatile",
50 .restrict = a.restrict or b.restrict,
51 .register = a.register or b.register,
52 };
53 }
54
55 /// Checks if a has all the qualifiers of b
56 pub fn hasQuals(a: Qualifiers, b: Qualifiers) bool {
57 if (b.@"const" and !a.@"const") return false;
58 if (b.@"volatile" and !a.@"volatile") return false;
59 if (b.atomic and !a.atomic) return false;
60 return true;
61 }
62
63 /// register is a storage class and not actually a qualifier
64 /// so it is not preserved by typeof()
65 pub fn inheritFromTypeof(quals: Qualifiers) Qualifiers {
66 var res = quals;
67 res.register = false;
68 return res;
69 }
70
71 pub const Builder = struct {
72 @"const": ?TokenIndex = null,
73 atomic: ?TokenIndex = null,
74 @"volatile": ?TokenIndex = null,
75 restrict: ?TokenIndex = null,
76
77 pub fn finish(b: Qualifiers.Builder, p: *Parser, ty: *Type) !void {
78 if (ty.specifier != .pointer and b.restrict != null) {
79 try p.errStr(.restrict_non_pointer, b.restrict.?, try p.typeStr(ty.*));
80 }
81 if (b.atomic) |some| {
82 if (ty.isArray()) try p.errStr(.atomic_array, some, try p.typeStr(ty.*));
83 if (ty.isFunc()) try p.errStr(.atomic_func, some, try p.typeStr(ty.*));
84 if (ty.hasIncompleteSize()) try p.errStr(.atomic_incomplete, some, try p.typeStr(ty.*));
85 }
86
87 if (b.@"const" != null) ty.qual.@"const" = true;
88 if (b.atomic != null) ty.qual.atomic = true;
89 if (b.@"volatile" != null) ty.qual.@"volatile" = true;
90 if (b.restrict != null) ty.qual.restrict = true;
91 }
92 };
93};
94
95// TODO improve memory usage
96pub const Func = struct {
97 return_type: Type,
98 params: []Param,
99
100 pub const Param = struct {
101 ty: Type,
102 name: StringId,
103 name_tok: TokenIndex,
104 };
105
106 fn eql(a: *const Func, b: *const Func, a_spec: Specifier, b_spec: Specifier, comp: *const Compilation) bool {
107 // return type cannot have qualifiers
108 if (!a.return_type.eql(b.return_type, comp, false)) return false;
109 if (a.params.len == 0 and b.params.len == 0) return true;
110
111 if (a.params.len != b.params.len) {
112 if (a_spec == .old_style_func or b_spec == .old_style_func) {
113 const maybe_has_params = if (a_spec == .old_style_func) b else a;
114 for (maybe_has_params.params) |param| {
115 if (param.ty.undergoesDefaultArgPromotion(comp)) return false;
116 }
117 return true;
118 }
119 return false;
120 }
121 if ((a_spec == .func) != (b_spec == .func)) return false;
122 // TODO validate this
123 for (a.params, b.params) |param, b_qual| {
124 var a_unqual = param.ty;
125 a_unqual.qual.@"const" = false;
126 a_unqual.qual.@"volatile" = false;
127 var b_unqual = b_qual.ty;
128 b_unqual.qual.@"const" = false;
129 b_unqual.qual.@"volatile" = false;
130 if (!a_unqual.eql(b_unqual, comp, true)) return false;
131 }
132 return true;
133 }
134};
135
136pub const Array = struct {
137 len: u64,
138 elem: Type,
139};
140
141pub const Expr = struct {
142 node: NodeIndex,
143 ty: Type,
144};
145
146pub const Attributed = struct {
147 attributes: []Attribute,
148 base: Type,
149
150 pub fn create(allocator: std.mem.Allocator, base_ty: Type, attributes: []const Attribute) !*Attributed {
151 const attributed_type = try allocator.create(Attributed);
152 errdefer allocator.destroy(attributed_type);
153 const duped = try allocator.dupe(Attribute, attributes);
154
155 attributed_type.* = .{
156 .attributes = duped,
157 .base = base_ty,
158 };
159 return attributed_type;
160 }
161};
162
163// TODO improve memory usage
164pub const Enum = struct {
165 fields: []Field,
166 tag_ty: Type,
167 name: StringId,
168 fixed: bool,
169
170 pub const Field = struct {
171 ty: Type,
172 name: StringId,
173 name_tok: TokenIndex,
174 node: NodeIndex,
175 };
176
177 pub fn isIncomplete(e: Enum) bool {
178 return e.fields.len == std.math.maxInt(usize);
179 }
180
181 pub fn create(allocator: std.mem.Allocator, name: StringId, fixed_ty: ?Type) !*Enum {
182 var e = try allocator.create(Enum);
183 e.name = name;
184 e.fields.len = std.math.maxInt(usize);
185 if (fixed_ty) |some| e.tag_ty = some;
186 e.fixed = fixed_ty != null;
187 return e;
188 }
189};
190
191pub const TypeLayout = struct {
192 /// The size of the type in bits.
193 ///
194 /// This is the value returned by `sizeof` in C
195 /// (but in bits instead of bytes). This is a multiple of `pointer_alignment_bits`.
196 size_bits: u64,
197 /// The alignment of the type, in bits, when used as a field in a record.
198 ///
199 /// This is usually the value returned by `_Alignof` in C, but there are some edge
200 /// cases in GCC where `_Alignof` returns a smaller value.
201 field_alignment_bits: u32,
202 /// The alignment, in bits, of valid pointers to this type.
203 /// `size_bits` is a multiple of this value.
204 pointer_alignment_bits: u32,
205 /// The required alignment of the type in bits.
206 ///
207 /// This value is only used by MSVC targets. It is 8 on all other
208 /// targets. On MSVC targets, this value restricts the effects of `#pragma pack` except
209 /// in some cases involving bit-fields.
210 required_alignment_bits: u32,
211};
212
213pub const FieldLayout = struct {
214 /// `offset_bits` and `size_bits` should both be INVALID if and only if the field
215 /// is an unnamed bitfield. There is no way to reference an unnamed bitfield in C, so
216 /// there should be no way to observe these values. If it is used, this value will
217 /// maximize the chance that a safety-checked overflow will occur.
218 const INVALID = std.math.maxInt(u64);
219
220 /// The offset of the field, in bits, from the start of the struct.
221 offset_bits: u64 = INVALID,
222 /// The size, in bits, of the field.
223 ///
224 /// For bit-fields, this is the width of the field.
225 size_bits: u64 = INVALID,
226
227 pub fn isUnnamed(self: FieldLayout) bool {
228 return self.offset_bits == INVALID and self.size_bits == INVALID;
229 }
230};
231
232// TODO improve memory usage
233pub const Record = struct {
234 fields: []Field,
235 type_layout: TypeLayout,
236 /// If this is null, none of the fields have attributes
237 /// Otherwise, it's a pointer to N items (where N == number of fields)
238 /// and the item at index i is the attributes for the field at index i
239 field_attributes: ?[*][]const Attribute,
240 name: StringId,
241
242 pub const Field = struct {
243 ty: Type,
244 name: StringId,
245 /// zero for anonymous fields
246 name_tok: TokenIndex = 0,
247 bit_width: ?u32 = null,
248 layout: FieldLayout = .{
249 .offset_bits = 0,
250 .size_bits = 0,
251 },
252
253 pub fn isNamed(f: *const Field) bool {
254 return f.name_tok != 0;
255 }
256
257 pub fn isAnonymousRecord(f: Field) bool {
258 return !f.isNamed() and f.ty.isRecord();
259 }
260
261 /// false for bitfields
262 pub fn isRegularField(f: *const Field) bool {
263 return f.bit_width == null;
264 }
265
266 /// bit width as specified in the C source. Asserts that `f` is a bitfield.
267 pub fn specifiedBitWidth(f: *const Field) u32 {
268 return f.bit_width.?;
269 }
270 };
271
272 pub fn isIncomplete(r: Record) bool {
273 return r.fields.len == std.math.maxInt(usize);
274 }
275
276 pub fn create(allocator: std.mem.Allocator, name: StringId) !*Record {
277 var r = try allocator.create(Record);
278 r.name = name;
279 r.fields.len = std.math.maxInt(usize);
280 r.field_attributes = null;
281 r.type_layout = .{
282 .size_bits = 8,
283 .field_alignment_bits = 8,
284 .pointer_alignment_bits = 8,
285 .required_alignment_bits = 8,
286 };
287 return r;
288 }
289
290 pub fn hasFieldOfType(self: *const Record, ty: Type, comp: *const Compilation) bool {
291 if (self.isIncomplete()) return false;
292 for (self.fields) |f| {
293 if (ty.eql(f.ty, comp, false)) return true;
294 }
295 return false;
296 }
297
298 pub fn hasField(self: *const Record, name: StringId) bool {
299 std.debug.assert(!self.isIncomplete());
300 for (self.fields) |f| {
301 if (f.isAnonymousRecord() and f.ty.getRecord().?.hasField(name)) return true;
302 if (name == f.name) return true;
303 }
304 return false;
305 }
306};
307
308pub const Specifier = enum {
309 /// A NaN-like poison value
310 invalid,
311
312 /// GNU auto type
313 /// This is a placeholder specifier - it must be replaced by the actual type specifier (determined by the initializer)
314 auto_type,
315 /// C23 auto, behaves like auto_type
316 c23_auto,
317
318 void,
319 bool,
320
321 // integers
322 char,
323 schar,
324 uchar,
325 short,
326 ushort,
327 int,
328 uint,
329 long,
330 ulong,
331 long_long,
332 ulong_long,
333 int128,
334 uint128,
335 complex_char,
336 complex_schar,
337 complex_uchar,
338 complex_short,
339 complex_ushort,
340 complex_int,
341 complex_uint,
342 complex_long,
343 complex_ulong,
344 complex_long_long,
345 complex_ulong_long,
346 complex_int128,
347 complex_uint128,
348
349 // data.int
350 bit_int,
351 complex_bit_int,
352
353 // floating point numbers
354 fp16,
355 float16,
356 float,
357 double,
358 long_double,
359 float128,
360 complex_float16,
361 complex_float,
362 complex_double,
363 complex_long_double,
364 complex_float128,
365
366 // data.sub_type
367 pointer,
368 unspecified_variable_len_array,
369 // data.func
370 /// int foo(int bar, char baz) and int (void)
371 func,
372 /// int foo(int bar, char baz, ...)
373 var_args_func,
374 /// int foo(bar, baz) and int foo()
375 /// is also var args, but we can give warnings about incorrect amounts of parameters
376 old_style_func,
377
378 // data.array
379 array,
380 static_array,
381 incomplete_array,
382 vector,
383 // data.expr
384 variable_len_array,
385
386 // data.record
387 @"struct",
388 @"union",
389
390 // data.enum
391 @"enum",
392
393 /// typeof(type-name)
394 typeof_type,
395
396 /// typeof(expression)
397 typeof_expr,
398
399 /// data.attributed
400 attributed,
401
402 /// C23 nullptr_t
403 nullptr_t,
404};
405
406const Type = @This();
407
408/// All fields of Type except data may be mutated
409data: union {
410 sub_type: *Type,
411 func: *Func,
412 array: *Array,
413 expr: *Expr,
414 @"enum": *Enum,
415 record: *Record,
416 attributed: *Attributed,
417 none: void,
418 int: struct {
419 bits: u16,
420 signedness: std.builtin.Signedness,
421 },
422} = .{ .none = {} },
423specifier: Specifier,
424qual: Qualifiers = .{},
425decayed: bool = false,
426/// typedef name, if any
427name: StringId = .empty,
428
429pub const int = Type{ .specifier = .int };
430pub const invalid = Type{ .specifier = .invalid };
431
432/// Determine if type matches the given specifier, recursing into typeof
433/// types if necessary.
434pub fn is(ty: Type, specifier: Specifier) bool {
435 std.debug.assert(specifier != .typeof_type and specifier != .typeof_expr);
436 return ty.get(specifier) != null;
437}
438
439pub fn withAttributes(self: Type, allocator: std.mem.Allocator, attributes: []const Attribute) !Type {
440 if (attributes.len == 0) return self;
441 const attributed_type = try Type.Attributed.create(allocator, self, attributes);
442 return .{ .specifier = .attributed, .data = .{ .attributed = attributed_type }, .decayed = self.decayed };
443}
444
445pub fn isCallable(ty: Type) ?Type {
446 return switch (ty.specifier) {
447 .func, .var_args_func, .old_style_func => ty,
448 .pointer => if (ty.data.sub_type.isFunc()) ty.data.sub_type.* else null,
449 .typeof_type => ty.data.sub_type.isCallable(),
450 .typeof_expr => ty.data.expr.ty.isCallable(),
451 .attributed => ty.data.attributed.base.isCallable(),
452 else => null,
453 };
454}
455
456pub fn isFunc(ty: Type) bool {
457 return switch (ty.specifier) {
458 .func, .var_args_func, .old_style_func => true,
459 .typeof_type => ty.data.sub_type.isFunc(),
460 .typeof_expr => ty.data.expr.ty.isFunc(),
461 .attributed => ty.data.attributed.base.isFunc(),
462 else => false,
463 };
464}
465
466pub fn isArray(ty: Type) bool {
467 return switch (ty.specifier) {
468 .array, .static_array, .incomplete_array, .variable_len_array, .unspecified_variable_len_array => !ty.isDecayed(),
469 .typeof_type => !ty.isDecayed() and ty.data.sub_type.isArray(),
470 .typeof_expr => !ty.isDecayed() and ty.data.expr.ty.isArray(),
471 .attributed => !ty.isDecayed() and ty.data.attributed.base.isArray(),
472 else => false,
473 };
474}
475
476/// Must only be used to set the length of an incomplete array as determined by its initializer
477pub fn setIncompleteArrayLen(ty: *Type, len: u64) void {
478 switch (ty.specifier) {
479 .incomplete_array => {
480 // Modifying .data is exceptionally allowed for .incomplete_array.
481 ty.data.array.len = len;
482 ty.specifier = .array;
483 },
484
485 .typeof_type => ty.data.sub_type.setIncompleteArrayLen(len),
486 .typeof_expr => ty.data.expr.ty.setIncompleteArrayLen(len),
487 .attributed => ty.data.attributed.base.setIncompleteArrayLen(len),
488
489 else => unreachable,
490 }
491}
492
493/// Whether the type is promoted if used as a variadic argument or as an argument to a function with no prototype
494fn undergoesDefaultArgPromotion(ty: Type, comp: *const Compilation) bool {
495 return switch (ty.specifier) {
496 .bool => true,
497 .char, .uchar, .schar => true,
498 .short, .ushort => true,
499 .@"enum" => if (comp.langopts.emulate == .clang) ty.data.@"enum".isIncomplete() else false,
500 .float => true,
501
502 .typeof_type => ty.data.sub_type.undergoesDefaultArgPromotion(comp),
503 .typeof_expr => ty.data.expr.ty.undergoesDefaultArgPromotion(comp),
504 .attributed => ty.data.attributed.base.undergoesDefaultArgPromotion(comp),
505 else => false,
506 };
507}
508
509pub fn isScalar(ty: Type) bool {
510 return ty.isInt() or ty.isScalarNonInt();
511}
512
513/// To avoid calling isInt() twice for allowable loop/if controlling expressions
514pub fn isScalarNonInt(ty: Type) bool {
515 return ty.isFloat() or ty.isPtr() or ty.is(.nullptr_t);
516}
517
518pub fn isDecayed(ty: Type) bool {
519 return ty.decayed;
520}
521
522pub fn isPtr(ty: Type) bool {
523 return switch (ty.specifier) {
524 .pointer => true,
525
526 .array,
527 .static_array,
528 .incomplete_array,
529 .variable_len_array,
530 .unspecified_variable_len_array,
531 => ty.isDecayed(),
532 .typeof_type => ty.isDecayed() or ty.data.sub_type.isPtr(),
533 .typeof_expr => ty.isDecayed() or ty.data.expr.ty.isPtr(),
534 .attributed => ty.isDecayed() or ty.data.attributed.base.isPtr(),
535 else => false,
536 };
537}
538
539pub fn isInt(ty: Type) bool {
540 return switch (ty.specifier) {
541 // zig fmt: off
542 .@"enum", .bool, .char, .schar, .uchar, .short, .ushort, .int, .uint, .long, .ulong,
543 .long_long, .ulong_long, .int128, .uint128, .complex_char, .complex_schar, .complex_uchar,
544 .complex_short, .complex_ushort, .complex_int, .complex_uint, .complex_long, .complex_ulong,
545 .complex_long_long, .complex_ulong_long, .complex_int128, .complex_uint128,
546 .bit_int, .complex_bit_int => true,
547 // zig fmt: on
548 .typeof_type => ty.data.sub_type.isInt(),
549 .typeof_expr => ty.data.expr.ty.isInt(),
550 .attributed => ty.data.attributed.base.isInt(),
551 else => false,
552 };
553}
554
555pub fn isFloat(ty: Type) bool {
556 return switch (ty.specifier) {
557 // zig fmt: off
558 .float, .double, .long_double, .complex_float, .complex_double, .complex_long_double,
559 .fp16, .float16, .float128, .complex_float128, .complex_float16 => true,
560 // zig fmt: on
561 .typeof_type => ty.data.sub_type.isFloat(),
562 .typeof_expr => ty.data.expr.ty.isFloat(),
563 .attributed => ty.data.attributed.base.isFloat(),
564 else => false,
565 };
566}
567
568pub fn isReal(ty: Type) bool {
569 return switch (ty.specifier) {
570 // zig fmt: off
571 .complex_float, .complex_double, .complex_long_double,
572 .complex_float128, .complex_char, .complex_schar, .complex_uchar, .complex_short,
573 .complex_ushort, .complex_int, .complex_uint, .complex_long, .complex_ulong,
574 .complex_long_long, .complex_ulong_long, .complex_int128, .complex_uint128,
575 .complex_bit_int, .complex_float16 => false,
576 // zig fmt: on
577 .typeof_type => ty.data.sub_type.isReal(),
578 .typeof_expr => ty.data.expr.ty.isReal(),
579 .attributed => ty.data.attributed.base.isReal(),
580 else => true,
581 };
582}
583
584pub fn isComplex(ty: Type) bool {
585 return switch (ty.specifier) {
586 // zig fmt: off
587 .complex_float, .complex_double, .complex_long_double,
588 .complex_float128, .complex_char, .complex_schar, .complex_uchar, .complex_short,
589 .complex_ushort, .complex_int, .complex_uint, .complex_long, .complex_ulong,
590 .complex_long_long, .complex_ulong_long, .complex_int128, .complex_uint128,
591 .complex_bit_int, .complex_float16 => true,
592 // zig fmt: on
593 .typeof_type => ty.data.sub_type.isComplex(),
594 .typeof_expr => ty.data.expr.ty.isComplex(),
595 .attributed => ty.data.attributed.base.isComplex(),
596 else => false,
597 };
598}
599
600pub fn isVoidStar(ty: Type) bool {
601 return switch (ty.specifier) {
602 .pointer => ty.data.sub_type.specifier == .void,
603 .typeof_type => ty.data.sub_type.isVoidStar(),
604 .typeof_expr => ty.data.expr.ty.isVoidStar(),
605 .attributed => ty.data.attributed.base.isVoidStar(),
606 else => false,
607 };
608}
609
610pub fn isTypeof(ty: Type) bool {
611 return switch (ty.specifier) {
612 .typeof_type, .typeof_expr => true,
613 else => false,
614 };
615}
616
617pub fn isConst(ty: Type) bool {
618 return switch (ty.specifier) {
619 .typeof_type => ty.qual.@"const" or ty.data.sub_type.isConst(),
620 .typeof_expr => ty.qual.@"const" or ty.data.expr.ty.isConst(),
621 .attributed => ty.data.attributed.base.isConst(),
622 else => ty.qual.@"const",
623 };
624}
625
626pub fn isUnsignedInt(ty: Type, comp: *const Compilation) bool {
627 return ty.signedness(comp) == .unsigned;
628}
629
630pub fn signedness(ty: Type, comp: *const Compilation) std.builtin.Signedness {
631 return switch (ty.specifier) {
632 // zig fmt: off
633 .char, .complex_char => return comp.getCharSignedness(),
634 .uchar, .ushort, .uint, .ulong, .ulong_long, .uint128, .bool, .complex_uchar, .complex_ushort,
635 .complex_uint, .complex_ulong, .complex_ulong_long, .complex_uint128 => .unsigned,
636 // zig fmt: on
637 .bit_int, .complex_bit_int => ty.data.int.signedness,
638 .typeof_type => ty.data.sub_type.signedness(comp),
639 .typeof_expr => ty.data.expr.ty.signedness(comp),
640 .attributed => ty.data.attributed.base.signedness(comp),
641 else => .signed,
642 };
643}
644
645pub fn isEnumOrRecord(ty: Type) bool {
646 return switch (ty.specifier) {
647 .@"enum", .@"struct", .@"union" => true,
648 .typeof_type => ty.data.sub_type.isEnumOrRecord(),
649 .typeof_expr => ty.data.expr.ty.isEnumOrRecord(),
650 .attributed => ty.data.attributed.base.isEnumOrRecord(),
651 else => false,
652 };
653}
654
655pub fn isRecord(ty: Type) bool {
656 return switch (ty.specifier) {
657 .@"struct", .@"union" => true,
658 .typeof_type => ty.data.sub_type.isRecord(),
659 .typeof_expr => ty.data.expr.ty.isRecord(),
660 .attributed => ty.data.attributed.base.isRecord(),
661 else => false,
662 };
663}
664
665pub fn isAnonymousRecord(ty: Type, comp: *const Compilation) bool {
666 return switch (ty.specifier) {
667 // anonymous records can be recognized by their names which are in
668 // the format "(anonymous TAG at path:line:col)".
669 .@"struct", .@"union" => {
670 const mapper = comp.string_interner.getSlowTypeMapper();
671 return mapper.lookup(ty.data.record.name)[0] == '(';
672 },
673 .typeof_type => ty.data.sub_type.isAnonymousRecord(comp),
674 .typeof_expr => ty.data.expr.ty.isAnonymousRecord(comp),
675 .attributed => ty.data.attributed.base.isAnonymousRecord(comp),
676 else => false,
677 };
678}
679
680pub fn elemType(ty: Type) Type {
681 return switch (ty.specifier) {
682 .pointer, .unspecified_variable_len_array => ty.data.sub_type.*,
683 .array, .static_array, .incomplete_array, .vector => ty.data.array.elem,
684 .variable_len_array => ty.data.expr.ty,
685 .typeof_type, .typeof_expr => {
686 const unwrapped = ty.canonicalize(.preserve_quals);
687 var elem = unwrapped.elemType();
688 elem.qual = elem.qual.mergeAll(unwrapped.qual);
689 return elem;
690 },
691 .attributed => ty.data.attributed.base.elemType(),
692 .invalid => Type.invalid,
693 // zig fmt: off
694 .complex_float, .complex_double, .complex_long_double,
695 .complex_float128, .complex_char, .complex_schar, .complex_uchar, .complex_short,
696 .complex_ushort, .complex_int, .complex_uint, .complex_long, .complex_ulong,
697 .complex_long_long, .complex_ulong_long, .complex_int128, .complex_uint128,
698 .complex_bit_int, .complex_float16 => ty.makeReal(),
699 // zig fmt: on
700 else => unreachable,
701 };
702}
703
704pub fn returnType(ty: Type) Type {
705 return switch (ty.specifier) {
706 .func, .var_args_func, .old_style_func => ty.data.func.return_type,
707 .typeof_type => ty.data.sub_type.returnType(),
708 .typeof_expr => ty.data.expr.ty.returnType(),
709 .attributed => ty.data.attributed.base.returnType(),
710 .invalid => Type.invalid,
711 else => unreachable,
712 };
713}
714
715pub fn params(ty: Type) []Func.Param {
716 return switch (ty.specifier) {
717 .func, .var_args_func, .old_style_func => ty.data.func.params,
718 .typeof_type => ty.data.sub_type.params(),
719 .typeof_expr => ty.data.expr.ty.params(),
720 .attributed => ty.data.attributed.base.params(),
721 .invalid => &.{},
722 else => unreachable,
723 };
724}
725
726/// Returns true if the return value or any param of `ty` is `.invalid`
727/// Asserts that ty is a function type
728pub fn isInvalidFunc(ty: Type) bool {
729 if (ty.returnType().is(.invalid)) return true;
730 for (ty.params()) |param| {
731 if (param.ty.is(.invalid)) return true;
732 }
733 return false;
734}
735
736pub fn arrayLen(ty: Type) ?u64 {
737 return switch (ty.specifier) {
738 .array, .static_array => ty.data.array.len,
739 .typeof_type => ty.data.sub_type.arrayLen(),
740 .typeof_expr => ty.data.expr.ty.arrayLen(),
741 .attributed => ty.data.attributed.base.arrayLen(),
742 else => null,
743 };
744}
745
746/// Complex numbers are scalars but they can be initialized with a 2-element initList
747pub fn expectedInitListSize(ty: Type) ?u64 {
748 return if (ty.isComplex()) 2 else ty.arrayLen();
749}
750
751pub fn anyQual(ty: Type) bool {
752 return switch (ty.specifier) {
753 .typeof_type => ty.qual.any() or ty.data.sub_type.anyQual(),
754 .typeof_expr => ty.qual.any() or ty.data.expr.ty.anyQual(),
755 else => ty.qual.any(),
756 };
757}
758
759pub fn getRecord(ty: Type) ?*const Type.Record {
760 return switch (ty.specifier) {
761 .attributed => ty.data.attributed.base.getRecord(),
762 .typeof_type => ty.data.sub_type.getRecord(),
763 .typeof_expr => ty.data.expr.ty.getRecord(),
764 .@"struct", .@"union" => ty.data.record,
765 else => null,
766 };
767}
768
769pub fn compareIntegerRanks(a: Type, b: Type, comp: *const Compilation) std.math.Order {
770 std.debug.assert(a.isInt() and b.isInt());
771 if (a.eql(b, comp, false)) return .eq;
772
773 const a_unsigned = a.isUnsignedInt(comp);
774 const b_unsigned = b.isUnsignedInt(comp);
775
776 const a_rank = a.integerRank(comp);
777 const b_rank = b.integerRank(comp);
778 if (a_unsigned == b_unsigned) {
779 return std.math.order(a_rank, b_rank);
780 }
781 if (a_unsigned) {
782 if (a_rank >= b_rank) return .gt;
783 return .lt;
784 }
785 std.debug.assert(b_unsigned);
786 if (b_rank >= a_rank) return .lt;
787 return .gt;
788}
789
790fn realIntegerConversion(a: Type, b: Type, comp: *const Compilation) Type {
791 std.debug.assert(a.isReal() and b.isReal());
792 const type_order = a.compareIntegerRanks(b, comp);
793 const a_signed = !a.isUnsignedInt(comp);
794 const b_signed = !b.isUnsignedInt(comp);
795 if (a_signed == b_signed) {
796 // If both have the same sign, use higher-rank type.
797 return switch (type_order) {
798 .lt => b,
799 .eq, .gt => a,
800 };
801 } else if (type_order != if (a_signed) std.math.Order.gt else std.math.Order.lt) {
802 // Only one is signed; and the unsigned type has rank >= the signed type
803 // Use the unsigned type
804 return if (b_signed) a else b;
805 } else if (a.bitSizeof(comp).? != b.bitSizeof(comp).?) {
806 // Signed type is higher rank and sizes are not equal
807 // Use the signed type
808 return if (a_signed) a else b;
809 } else {
810 // Signed type is higher rank but same size as unsigned type
811 // e.g. `long` and `unsigned` on x86-linux-gnu
812 // Use unsigned version of the signed type
813 return if (a_signed) a.makeIntegerUnsigned() else b.makeIntegerUnsigned();
814 }
815}
816
817pub fn makeIntegerUnsigned(ty: Type) Type {
818 // TODO discards attributed/typeof
819 var base_ty = ty.canonicalize(.standard);
820 switch (base_ty.specifier) {
821 // zig fmt: off
822 .uchar, .ushort, .uint, .ulong, .ulong_long, .uint128,
823 .complex_uchar, .complex_ushort, .complex_uint, .complex_ulong, .complex_ulong_long, .complex_uint128,
824 => return ty,
825 // zig fmt: on
826
827 .char, .complex_char => {
828 base_ty.specifier = @enumFromInt(@intFromEnum(base_ty.specifier) + 2);
829 return base_ty;
830 },
831
832 // zig fmt: off
833 .schar, .short, .int, .long, .long_long, .int128,
834 .complex_schar, .complex_short, .complex_int, .complex_long, .complex_long_long, .complex_int128 => {
835 base_ty.specifier = @enumFromInt(@intFromEnum(base_ty.specifier) + 1);
836 return base_ty;
837 },
838 // zig fmt: on
839
840 .bit_int, .complex_bit_int => {
841 base_ty.data.int.signedness = .unsigned;
842 return base_ty;
843 },
844 else => unreachable,
845 }
846}
847
848/// Find the common type of a and b for binary operations
849pub fn integerConversion(a: Type, b: Type, comp: *const Compilation) Type {
850 const a_real = a.isReal();
851 const b_real = b.isReal();
852 const target_ty = a.makeReal().realIntegerConversion(b.makeReal(), comp);
853 return if (a_real and b_real) target_ty else target_ty.makeComplex();
854}
855
856pub fn integerPromotion(ty: Type, comp: *Compilation) Type {
857 var specifier = ty.specifier;
858 switch (specifier) {
859 .@"enum" => {
860 if (ty.hasIncompleteSize()) return .{ .specifier = .int };
861 if (ty.data.@"enum".fixed) return ty.data.@"enum".tag_ty.integerPromotion(comp);
862
863 specifier = ty.data.@"enum".tag_ty.specifier;
864 },
865 .bit_int, .complex_bit_int => return .{ .specifier = specifier, .data = ty.data },
866 else => {},
867 }
868 return switch (specifier) {
869 else => .{
870 .specifier = switch (specifier) {
871 // zig fmt: off
872 .bool, .char, .schar, .uchar, .short => .int,
873 .ushort => if (ty.sizeof(comp).? == sizeof(.{ .specifier = .int }, comp)) Specifier.uint else .int,
874 .int, .uint, .long, .ulong, .long_long, .ulong_long, .int128, .uint128, .complex_char,
875 .complex_schar, .complex_uchar, .complex_short, .complex_ushort, .complex_int,
876 .complex_uint, .complex_long, .complex_ulong, .complex_long_long, .complex_ulong_long,
877 .complex_int128, .complex_uint128 => specifier,
878 // zig fmt: on
879 .typeof_type => return ty.data.sub_type.integerPromotion(comp),
880 .typeof_expr => return ty.data.expr.ty.integerPromotion(comp),
881 .attributed => return ty.data.attributed.base.integerPromotion(comp),
882 .invalid => .invalid,
883 else => unreachable, // _BitInt, or not an integer type
884 },
885 },
886 };
887}
888
889/// Promote a bitfield. If `int` can hold all the values of the underlying field,
890/// promote to int. Otherwise, promote to unsigned int
891/// Returns null if no promotion is necessary
892pub fn bitfieldPromotion(ty: Type, comp: *Compilation, width: u32) ?Type {
893 const type_size_bits = ty.bitSizeof(comp).?;
894
895 // Note: GCC and clang will promote `long: 3` to int even though the C standard does not allow this
896 if (width < type_size_bits) {
897 return int;
898 }
899
900 if (width == type_size_bits) {
901 return if (ty.isUnsignedInt(comp)) .{ .specifier = .uint } else int;
902 }
903
904 return null;
905}
906
907pub fn hasIncompleteSize(ty: Type) bool {
908 if (ty.isDecayed()) return false;
909 return switch (ty.specifier) {
910 .void, .incomplete_array => true,
911 .@"enum" => ty.data.@"enum".isIncomplete() and !ty.data.@"enum".fixed,
912 .@"struct", .@"union" => ty.data.record.isIncomplete(),
913 .array, .static_array => ty.data.array.elem.hasIncompleteSize(),
914 .typeof_type => ty.data.sub_type.hasIncompleteSize(),
915 .typeof_expr, .variable_len_array => ty.data.expr.ty.hasIncompleteSize(),
916 .unspecified_variable_len_array => ty.data.sub_type.hasIncompleteSize(),
917 .attributed => ty.data.attributed.base.hasIncompleteSize(),
918 else => false,
919 };
920}
921
922pub fn hasUnboundVLA(ty: Type) bool {
923 var cur = ty;
924 while (true) {
925 switch (cur.specifier) {
926 .unspecified_variable_len_array => return true,
927 .array,
928 .static_array,
929 .incomplete_array,
930 .variable_len_array,
931 => cur = cur.elemType(),
932 .typeof_type => cur = cur.data.sub_type.*,
933 .typeof_expr => cur = cur.data.expr.ty,
934 .attributed => cur = cur.data.attributed.base,
935 else => return false,
936 }
937 }
938}
939
940pub fn hasField(ty: Type, name: StringId) bool {
941 return ty.getRecord().?.hasField(name);
942}
943
944const TypeSizeOrder = enum {
945 lt,
946 gt,
947 eq,
948 indeterminate,
949};
950
951pub fn sizeCompare(a: Type, b: Type, comp: *Compilation) TypeSizeOrder {
952 const a_size = a.sizeof(comp) orelse return .indeterminate;
953 const b_size = b.sizeof(comp) orelse return .indeterminate;
954 return switch (std.math.order(a_size, b_size)) {
955 .lt => .lt,
956 .gt => .gt,
957 .eq => .eq,
958 };
959}
960
961/// Size of type as reported by sizeof
962pub fn sizeof(ty: Type, comp: *const Compilation) ?u64 {
963 if (ty.isPtr()) return comp.target.ptrBitWidth() / 8;
964
965 return switch (ty.specifier) {
966 .auto_type, .c23_auto => unreachable,
967 .variable_len_array, .unspecified_variable_len_array => null,
968 .incomplete_array => return if (comp.langopts.emulate == .msvc) @as(?u64, 0) else null,
969 .func, .var_args_func, .old_style_func, .void, .bool => 1,
970 .char, .schar, .uchar => 1,
971 .short => comp.target.cTypeByteSize(.short),
972 .ushort => comp.target.cTypeByteSize(.ushort),
973 .int => comp.target.cTypeByteSize(.int),
974 .uint => comp.target.cTypeByteSize(.uint),
975 .long => comp.target.cTypeByteSize(.long),
976 .ulong => comp.target.cTypeByteSize(.ulong),
977 .long_long => comp.target.cTypeByteSize(.longlong),
978 .ulong_long => comp.target.cTypeByteSize(.ulonglong),
979 .long_double => comp.target.cTypeByteSize(.longdouble),
980 .int128, .uint128 => 16,
981 .fp16, .float16 => 2,
982 .float => comp.target.cTypeByteSize(.float),
983 .double => comp.target.cTypeByteSize(.double),
984 .float128 => 16,
985 .bit_int => {
986 return std.mem.alignForward(u64, (@as(u32, ty.data.int.bits) + 7) / 8, ty.alignof(comp));
987 },
988 // zig fmt: off
989 .complex_char, .complex_schar, .complex_uchar, .complex_short, .complex_ushort, .complex_int,
990 .complex_uint, .complex_long, .complex_ulong, .complex_long_long, .complex_ulong_long,
991 .complex_int128, .complex_uint128, .complex_float, .complex_double,
992 .complex_long_double, .complex_float128, .complex_bit_int, .complex_float16,
993 => return 2 * ty.makeReal().sizeof(comp).?,
994 // zig fmt: on
995 .pointer => unreachable,
996 .static_array,
997 .nullptr_t,
998 => comp.target.ptrBitWidth() / 8,
999 .array, .vector => {
1000 const size = ty.data.array.elem.sizeof(comp) orelse return null;
1001 const arr_size = size * ty.data.array.len;
1002 if (comp.langopts.emulate == .msvc) {
1003 // msvc ignores array type alignment.
1004 // Since the size might not be a multiple of the field
1005 // alignment, the address of the second element might not be properly aligned
1006 // for the field alignment. A flexible array has size 0. See test case 0018.
1007 return arr_size;
1008 } else {
1009 return std.mem.alignForward(u64, arr_size, ty.alignof(comp));
1010 }
1011 },
1012 .@"struct", .@"union" => if (ty.data.record.isIncomplete()) null else @as(u64, ty.data.record.type_layout.size_bits / 8),
1013 .@"enum" => if (ty.data.@"enum".isIncomplete() and !ty.data.@"enum".fixed) null else ty.data.@"enum".tag_ty.sizeof(comp),
1014 .typeof_type => ty.data.sub_type.sizeof(comp),
1015 .typeof_expr => ty.data.expr.ty.sizeof(comp),
1016 .attributed => ty.data.attributed.base.sizeof(comp),
1017 .invalid => return null,
1018 };
1019}
1020
1021pub fn bitSizeof(ty: Type, comp: *const Compilation) ?u64 {
1022 return switch (ty.specifier) {
1023 .bool => if (comp.langopts.emulate == .msvc) @as(u64, 8) else 1,
1024 .typeof_type => ty.data.sub_type.bitSizeof(comp),
1025 .typeof_expr => ty.data.expr.ty.bitSizeof(comp),
1026 .attributed => ty.data.attributed.base.bitSizeof(comp),
1027 .bit_int => return ty.data.int.bits,
1028 .long_double => comp.target.cTypeBitSize(.longdouble),
1029 else => 8 * (ty.sizeof(comp) orelse return null),
1030 };
1031}
1032
1033pub fn alignable(ty: Type) bool {
1034 return (ty.isArray() or !ty.hasIncompleteSize() or ty.is(.void)) and !ty.is(.invalid);
1035}
1036
1037/// Get the alignment of a type
1038pub fn alignof(ty: Type, comp: *const Compilation) u29 {
1039 // don't return the attribute for records
1040 // layout has already accounted for requested alignment
1041 if (ty.requestedAlignment(comp)) |requested| {
1042 // gcc does not respect alignment on enums
1043 if (ty.get(.@"enum")) |ty_enum| {
1044 if (comp.langopts.emulate == .gcc) {
1045 return ty_enum.alignof(comp);
1046 }
1047 } else if (ty.getRecord()) |rec| {
1048 if (ty.hasIncompleteSize()) return 0;
1049 const computed: u29 = @intCast(@divExact(rec.type_layout.field_alignment_bits, 8));
1050 return @max(requested, computed);
1051 } else if (comp.langopts.emulate == .msvc) {
1052 const type_align = ty.data.attributed.base.alignof(comp);
1053 return @max(requested, type_align);
1054 }
1055 return requested;
1056 }
1057
1058 return switch (ty.specifier) {
1059 .invalid => unreachable,
1060 .auto_type, .c23_auto => unreachable,
1061
1062 .variable_len_array,
1063 .incomplete_array,
1064 .unspecified_variable_len_array,
1065 .array,
1066 .vector,
1067 => if (ty.isPtr()) switch (comp.target.cpu.arch) {
1068 .avr => 1,
1069 else => comp.target.ptrBitWidth() / 8,
1070 } else ty.elemType().alignof(comp),
1071 .func, .var_args_func, .old_style_func => target_util.defaultFunctionAlignment(comp.target),
1072 .char, .schar, .uchar, .void, .bool => 1,
1073
1074 // zig fmt: off
1075 .complex_char, .complex_schar, .complex_uchar, .complex_short, .complex_ushort, .complex_int,
1076 .complex_uint, .complex_long, .complex_ulong, .complex_long_long, .complex_ulong_long,
1077 .complex_int128, .complex_uint128, .complex_float, .complex_double,
1078 .complex_long_double, .complex_float128, .complex_bit_int, .complex_float16,
1079 => return ty.makeReal().alignof(comp),
1080 // zig fmt: on
1081
1082 .short => comp.target.cTypeAlignment(.short),
1083 .ushort => comp.target.cTypeAlignment(.ushort),
1084 .int => comp.target.cTypeAlignment(.int),
1085 .uint => comp.target.cTypeAlignment(.uint),
1086
1087 .long => comp.target.cTypeAlignment(.long),
1088 .ulong => comp.target.cTypeAlignment(.ulong),
1089 .long_long => comp.target.cTypeAlignment(.longlong),
1090 .ulong_long => comp.target.cTypeAlignment(.ulonglong),
1091
1092 .bit_int => {
1093 // https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2709.pdf
1094 // _BitInt(N) types align with existing calling conventions. They have the same size and alignment as the
1095 // smallest basic type that can contain them. Types that are larger than __int64_t are conceptually treated
1096 // as struct of register size chunks. The number of chunks is the smallest number that can contain the type.
1097 if (ty.data.int.bits > 64) return 8;
1098 const basic_type = comp.intLeastN(ty.data.int.bits, ty.data.int.signedness);
1099 return basic_type.alignof(comp);
1100 },
1101
1102 .float => comp.target.cTypeAlignment(.float),
1103 .double => comp.target.cTypeAlignment(.double),
1104 .long_double => comp.target.cTypeAlignment(.longdouble),
1105
1106 .int128, .uint128 => if (comp.target.cpu.arch == .s390x and comp.target.os.tag == .linux and comp.target.abi.isGnu()) 8 else 16,
1107 .fp16, .float16 => 2,
1108
1109 .float128 => 16,
1110 .pointer,
1111 .static_array,
1112 .nullptr_t,
1113 => switch (comp.target.cpu.arch) {
1114 .avr => 1,
1115 else => comp.target.ptrBitWidth() / 8,
1116 },
1117 .@"struct", .@"union" => if (ty.data.record.isIncomplete()) 0 else @intCast(ty.data.record.type_layout.field_alignment_bits / 8),
1118 .@"enum" => if (ty.data.@"enum".isIncomplete() and !ty.data.@"enum".fixed) 0 else ty.data.@"enum".tag_ty.alignof(comp),
1119 .typeof_type => ty.data.sub_type.alignof(comp),
1120 .typeof_expr => ty.data.expr.ty.alignof(comp),
1121 .attributed => ty.data.attributed.base.alignof(comp),
1122 };
1123}
1124
1125// This enum should be kept public because it is used by the downstream zig translate-c
1126pub const QualHandling = enum {
1127 standard,
1128 preserve_quals,
1129};
1130
1131/// Canonicalize a possibly-typeof() type. If the type is not a typeof() type, simply
1132/// return it. Otherwise, determine the actual qualified type.
1133/// The `qual_handling` parameter can be used to return the full set of qualifiers
1134/// added by typeof() operations, which is useful when determining the elemType of
1135/// arrays and pointers.
1136pub fn canonicalize(ty: Type, qual_handling: QualHandling) Type {
1137 var cur = ty;
1138 var qual = cur.qual;
1139 while (true) {
1140 switch (cur.specifier) {
1141 .typeof_type => cur = cur.data.sub_type.*,
1142 .typeof_expr => cur = cur.data.expr.ty,
1143 .attributed => cur = cur.data.attributed.base,
1144 else => break,
1145 }
1146 qual = qual.mergeAll(cur.qual);
1147 }
1148 if ((cur.isArray() or cur.isPtr()) and qual_handling == .standard) {
1149 cur.qual = .{};
1150 } else {
1151 cur.qual = qual;
1152 }
1153 cur.decayed = ty.decayed;
1154 return cur;
1155}
1156
1157pub fn get(ty: *const Type, specifier: Specifier) ?*const Type {
1158 std.debug.assert(specifier != .typeof_type and specifier != .typeof_expr);
1159 return switch (ty.specifier) {
1160 .typeof_type => ty.data.sub_type.get(specifier),
1161 .typeof_expr => ty.data.expr.ty.get(specifier),
1162 .attributed => ty.data.attributed.base.get(specifier),
1163 else => if (ty.specifier == specifier) ty else null,
1164 };
1165}
1166
1167pub fn requestedAlignment(ty: Type, comp: *const Compilation) ?u29 {
1168 return switch (ty.specifier) {
1169 .typeof_type => ty.data.sub_type.requestedAlignment(comp),
1170 .typeof_expr => ty.data.expr.ty.requestedAlignment(comp),
1171 .attributed => annotationAlignment(comp, Attribute.Iterator.initType(ty)),
1172 else => null,
1173 };
1174}
1175
1176pub fn enumIsPacked(ty: Type, comp: *const Compilation) bool {
1177 std.debug.assert(ty.is(.@"enum"));
1178 return comp.langopts.short_enums or target_util.packAllEnums(comp.target) or ty.hasAttribute(.@"packed");
1179}
1180
1181pub fn getName(ty: Type) StringId {
1182 return switch (ty.specifier) {
1183 .typeof_type => if (ty.name == .empty) ty.data.sub_type.getName() else ty.name,
1184 .typeof_expr => if (ty.name == .empty) ty.data.expr.ty.getName() else ty.name,
1185 .attributed => if (ty.name == .empty) ty.data.attributed.base.getName() else ty.name,
1186 else => ty.name,
1187 };
1188}
1189
1190pub fn annotationAlignment(comp: *const Compilation, attrs: Attribute.Iterator) ?u29 {
1191 var it = attrs;
1192 var max_requested: ?u29 = null;
1193 var last_aligned_index: ?usize = null;
1194 while (it.next()) |item| {
1195 const attribute, const index = item;
1196 if (attribute.tag != .aligned) continue;
1197 if (last_aligned_index) |aligned_index| {
1198 // once we recurse into a new type, after an `aligned` attribute was found, we're done
1199 if (index <= aligned_index) break;
1200 }
1201 last_aligned_index = index;
1202 const requested = if (attribute.args.aligned.alignment) |alignment| alignment.requested else target_util.defaultAlignment(comp.target);
1203 if (max_requested == null or max_requested.? < requested) {
1204 max_requested = requested;
1205 }
1206 }
1207 return max_requested;
1208}
1209
1210pub fn eql(a_param: Type, b_param: Type, comp: *const Compilation, check_qualifiers: bool) bool {
1211 const a = a_param.canonicalize(.standard);
1212 const b = b_param.canonicalize(.standard);
1213
1214 if (a.specifier == .invalid or b.specifier == .invalid) return false;
1215 if (a.alignof(comp) != b.alignof(comp)) return false;
1216 if (a.isPtr()) {
1217 if (!b.isPtr()) return false;
1218 } else if (a.isFunc()) {
1219 if (!b.isFunc()) return false;
1220 } else if (a.isArray()) {
1221 if (!b.isArray()) return false;
1222 } else if (a.specifier == .@"enum" and b.specifier != .@"enum") {
1223 return a.data.@"enum".tag_ty.eql(b, comp, check_qualifiers);
1224 } else if (b.specifier == .@"enum" and a.specifier != .@"enum") {
1225 return a.eql(b.data.@"enum".tag_ty, comp, check_qualifiers);
1226 } else if (a.specifier != b.specifier) return false;
1227
1228 if (a.qual.atomic != b.qual.atomic) return false;
1229 if (check_qualifiers) {
1230 if (a.qual.@"const" != b.qual.@"const") return false;
1231 if (a.qual.@"volatile" != b.qual.@"volatile") return false;
1232 }
1233
1234 if (a.isPtr()) {
1235 return a_param.elemType().eql(b_param.elemType(), comp, check_qualifiers);
1236 }
1237 switch (a.specifier) {
1238 .pointer => unreachable,
1239
1240 .func,
1241 .var_args_func,
1242 .old_style_func,
1243 => if (!a.data.func.eql(b.data.func, a.specifier, b.specifier, comp)) return false,
1244
1245 .array,
1246 .static_array,
1247 .incomplete_array,
1248 .vector,
1249 => {
1250 const a_len = a.arrayLen();
1251 const b_len = b.arrayLen();
1252 if (a_len == null or b_len == null) {
1253 // At least one array is incomplete; only check child type for equality
1254 } else if (a_len.? != b_len.?) {
1255 return false;
1256 }
1257 if (!a.elemType().eql(b.elemType(), comp, false)) return false;
1258 },
1259 .variable_len_array => {
1260 if (!a.elemType().eql(b.elemType(), comp, check_qualifiers)) return false;
1261 },
1262 .@"struct", .@"union" => if (a.data.record != b.data.record) return false,
1263 .@"enum" => if (a.data.@"enum" != b.data.@"enum") return false,
1264 .bit_int, .complex_bit_int => return a.data.int.bits == b.data.int.bits and a.data.int.signedness == b.data.int.signedness,
1265
1266 else => {},
1267 }
1268 return true;
1269}
1270
1271/// Decays an array to a pointer
1272pub fn decayArray(ty: *Type) void {
1273 std.debug.assert(ty.isArray());
1274 ty.decayed = true;
1275}
1276
1277pub fn originalTypeOfDecayedArray(ty: Type) Type {
1278 std.debug.assert(ty.isDecayed());
1279 var copy = ty;
1280 copy.decayed = false;
1281 return copy;
1282}
1283
1284/// Rank for floating point conversions, ignoring domain (complex vs real)
1285/// Asserts that ty is a floating point type
1286pub fn floatRank(ty: Type) usize {
1287 const real = ty.makeReal();
1288 return switch (real.specifier) {
1289 // TODO: bfloat16 => 0
1290 .float16 => 1,
1291 .fp16 => 2,
1292 .float => 3,
1293 .double => 4,
1294 .long_double => 5,
1295 .float128 => 6,
1296 // TODO: ibm128 => 7
1297 else => unreachable,
1298 };
1299}
1300
1301/// Rank for integer conversions, ignoring domain (complex vs real)
1302/// Asserts that ty is an integer type
1303pub fn integerRank(ty: Type, comp: *const Compilation) usize {
1304 const real = ty.makeReal();
1305 return @intCast(switch (real.specifier) {
1306 .bit_int => @as(u64, real.data.int.bits) << 3,
1307
1308 .bool => 1 + (ty.bitSizeof(comp).? << 3),
1309 .char, .schar, .uchar => 2 + (ty.bitSizeof(comp).? << 3),
1310 .short, .ushort => 3 + (ty.bitSizeof(comp).? << 3),
1311 .int, .uint => 4 + (ty.bitSizeof(comp).? << 3),
1312 .long, .ulong => 5 + (ty.bitSizeof(comp).? << 3),
1313 .long_long, .ulong_long => 6 + (ty.bitSizeof(comp).? << 3),
1314 .int128, .uint128 => 7 + (ty.bitSizeof(comp).? << 3),
1315
1316 .typeof_type => ty.data.sub_type.integerRank(comp),
1317 .typeof_expr => ty.data.expr.ty.integerRank(comp),
1318 .attributed => ty.data.attributed.base.integerRank(comp),
1319
1320 .@"enum" => real.data.@"enum".tag_ty.integerRank(comp),
1321
1322 else => unreachable,
1323 });
1324}
1325
1326/// Returns true if `a` and `b` are integer types that differ only in sign
1327pub fn sameRankDifferentSign(a: Type, b: Type, comp: *const Compilation) bool {
1328 if (!a.isInt() or !b.isInt()) return false;
1329 if (a.hasIncompleteSize() or b.hasIncompleteSize()) return false;
1330 if (a.integerRank(comp) != b.integerRank(comp)) return false;
1331 return a.isUnsignedInt(comp) != b.isUnsignedInt(comp);
1332}
1333
1334pub fn makeReal(ty: Type) Type {
1335 // TODO discards attributed/typeof
1336 var base_ty = ty.canonicalize(.standard);
1337 switch (base_ty.specifier) {
1338 .complex_float16, .complex_float, .complex_double, .complex_long_double, .complex_float128 => {
1339 base_ty.specifier = @enumFromInt(@intFromEnum(base_ty.specifier) - 5);
1340 return base_ty;
1341 },
1342 .complex_char, .complex_schar, .complex_uchar, .complex_short, .complex_ushort, .complex_int, .complex_uint, .complex_long, .complex_ulong, .complex_long_long, .complex_ulong_long, .complex_int128, .complex_uint128 => {
1343 base_ty.specifier = @enumFromInt(@intFromEnum(base_ty.specifier) - 13);
1344 return base_ty;
1345 },
1346 .complex_bit_int => {
1347 base_ty.specifier = .bit_int;
1348 return base_ty;
1349 },
1350 else => return ty,
1351 }
1352}
1353
1354pub fn makeComplex(ty: Type) Type {
1355 // TODO discards attributed/typeof
1356 var base_ty = ty.canonicalize(.standard);
1357 switch (base_ty.specifier) {
1358 .float, .double, .long_double, .float128 => {
1359 base_ty.specifier = @enumFromInt(@intFromEnum(base_ty.specifier) + 5);
1360 return base_ty;
1361 },
1362 .char, .schar, .uchar, .short, .ushort, .int, .uint, .long, .ulong, .long_long, .ulong_long, .int128, .uint128 => {
1363 base_ty.specifier = @enumFromInt(@intFromEnum(base_ty.specifier) + 13);
1364 return base_ty;
1365 },
1366 .bit_int => {
1367 base_ty.specifier = .complex_bit_int;
1368 return base_ty;
1369 },
1370 else => return ty,
1371 }
1372}
1373
1374/// Combines types recursively in the order they were parsed, uses `.void` specifier as a sentinel value.
1375pub fn combine(inner: *Type, outer: Type) Parser.Error!void {
1376 switch (inner.specifier) {
1377 .pointer => return inner.data.sub_type.combine(outer),
1378 .unspecified_variable_len_array => {
1379 std.debug.assert(!inner.isDecayed());
1380 try inner.data.sub_type.combine(outer);
1381 },
1382 .variable_len_array => {
1383 std.debug.assert(!inner.isDecayed());
1384 try inner.data.expr.ty.combine(outer);
1385 },
1386 .array, .static_array, .incomplete_array => {
1387 std.debug.assert(!inner.isDecayed());
1388 try inner.data.array.elem.combine(outer);
1389 },
1390 .func, .var_args_func, .old_style_func => {
1391 try inner.data.func.return_type.combine(outer);
1392 },
1393 .typeof_type,
1394 .typeof_expr,
1395 => std.debug.assert(!inner.isDecayed()),
1396 .void, .invalid => inner.* = outer,
1397 else => unreachable,
1398 }
1399}
1400
1401pub fn validateCombinedType(ty: Type, p: *Parser, source_tok: TokenIndex) Parser.Error!void {
1402 switch (ty.specifier) {
1403 .pointer => return ty.data.sub_type.validateCombinedType(p, source_tok),
1404 .unspecified_variable_len_array,
1405 .variable_len_array,
1406 .array,
1407 .static_array,
1408 .incomplete_array,
1409 => {
1410 const elem_ty = ty.elemType();
1411 if (elem_ty.hasIncompleteSize()) {
1412 try p.errStr(.array_incomplete_elem, source_tok, try p.typeStr(elem_ty));
1413 return error.ParsingFailed;
1414 }
1415 if (elem_ty.isFunc()) {
1416 try p.errTok(.array_func_elem, source_tok);
1417 return error.ParsingFailed;
1418 }
1419 if (elem_ty.specifier == .static_array and elem_ty.isArray()) {
1420 try p.errTok(.static_non_outermost_array, source_tok);
1421 }
1422 if (elem_ty.anyQual() and elem_ty.isArray()) {
1423 try p.errTok(.qualifier_non_outermost_array, source_tok);
1424 }
1425 },
1426 .func, .var_args_func, .old_style_func => {
1427 const ret_ty = &ty.data.func.return_type;
1428 if (ret_ty.isArray()) try p.errTok(.func_cannot_return_array, source_tok);
1429 if (ret_ty.isFunc()) try p.errTok(.func_cannot_return_func, source_tok);
1430 if (ret_ty.qual.@"const") {
1431 try p.errStr(.qual_on_ret_type, source_tok, "const");
1432 ret_ty.qual.@"const" = false;
1433 }
1434 if (ret_ty.qual.@"volatile") {
1435 try p.errStr(.qual_on_ret_type, source_tok, "volatile");
1436 ret_ty.qual.@"volatile" = false;
1437 }
1438 if (ret_ty.qual.atomic) {
1439 try p.errStr(.qual_on_ret_type, source_tok, "atomic");
1440 ret_ty.qual.atomic = false;
1441 }
1442 if (ret_ty.is(.fp16) and !p.comp.hasHalfPrecisionFloatABI()) {
1443 try p.errStr(.suggest_pointer_for_invalid_fp16, source_tok, "function return value");
1444 }
1445 },
1446 .typeof_type => return ty.data.sub_type.validateCombinedType(p, source_tok),
1447 .typeof_expr => return ty.data.expr.ty.validateCombinedType(p, source_tok),
1448 .attributed => return ty.data.attributed.base.validateCombinedType(p, source_tok),
1449 else => {},
1450 }
1451}
1452
1453/// An unfinished Type
1454pub const Builder = struct {
1455 complex_tok: ?TokenIndex = null,
1456 bit_int_tok: ?TokenIndex = null,
1457 auto_type_tok: ?TokenIndex = null,
1458 typedef: ?struct {
1459 tok: TokenIndex,
1460 ty: Type,
1461 } = null,
1462 specifier: Builder.Specifier = .none,
1463 qual: Qualifiers.Builder = .{},
1464 typeof: ?Type = null,
1465 /// When true an error is returned instead of adding a diagnostic message.
1466 /// Used for trying to combine typedef types.
1467 error_on_invalid: bool = false,
1468
1469 pub const Specifier = union(enum) {
1470 none,
1471 void,
1472 /// GNU __auto_type extension
1473 auto_type,
1474 /// C23 auto
1475 c23_auto,
1476 nullptr_t,
1477 bool,
1478 char,
1479 schar,
1480 uchar,
1481 complex_char,
1482 complex_schar,
1483 complex_uchar,
1484
1485 unsigned,
1486 signed,
1487 short,
1488 sshort,
1489 ushort,
1490 short_int,
1491 sshort_int,
1492 ushort_int,
1493 int,
1494 sint,
1495 uint,
1496 long,
1497 slong,
1498 ulong,
1499 long_int,
1500 slong_int,
1501 ulong_int,
1502 long_long,
1503 slong_long,
1504 ulong_long,
1505 long_long_int,
1506 slong_long_int,
1507 ulong_long_int,
1508 int128,
1509 sint128,
1510 uint128,
1511 complex_unsigned,
1512 complex_signed,
1513 complex_short,
1514 complex_sshort,
1515 complex_ushort,
1516 complex_short_int,
1517 complex_sshort_int,
1518 complex_ushort_int,
1519 complex_int,
1520 complex_sint,
1521 complex_uint,
1522 complex_long,
1523 complex_slong,
1524 complex_ulong,
1525 complex_long_int,
1526 complex_slong_int,
1527 complex_ulong_int,
1528 complex_long_long,
1529 complex_slong_long,
1530 complex_ulong_long,
1531 complex_long_long_int,
1532 complex_slong_long_int,
1533 complex_ulong_long_int,
1534 complex_int128,
1535 complex_sint128,
1536 complex_uint128,
1537 bit_int: u64,
1538 sbit_int: u64,
1539 ubit_int: u64,
1540 complex_bit_int: u64,
1541 complex_sbit_int: u64,
1542 complex_ubit_int: u64,
1543
1544 fp16,
1545 float16,
1546 float,
1547 double,
1548 long_double,
1549 float128,
1550 complex,
1551 complex_float16,
1552 complex_float,
1553 complex_double,
1554 complex_long_double,
1555 complex_float128,
1556
1557 pointer: *Type,
1558 unspecified_variable_len_array: *Type,
1559 decayed_unspecified_variable_len_array: *Type,
1560 func: *Func,
1561 var_args_func: *Func,
1562 old_style_func: *Func,
1563 array: *Array,
1564 decayed_array: *Array,
1565 static_array: *Array,
1566 decayed_static_array: *Array,
1567 incomplete_array: *Array,
1568 decayed_incomplete_array: *Array,
1569 vector: *Array,
1570 variable_len_array: *Expr,
1571 decayed_variable_len_array: *Expr,
1572 @"struct": *Record,
1573 @"union": *Record,
1574 @"enum": *Enum,
1575 typeof_type: *Type,
1576 decayed_typeof_type: *Type,
1577 typeof_expr: *Expr,
1578 decayed_typeof_expr: *Expr,
1579
1580 attributed: *Attributed,
1581 decayed_attributed: *Attributed,
1582
1583 pub fn str(spec: Builder.Specifier, langopts: LangOpts) ?[]const u8 {
1584 return switch (spec) {
1585 .none => unreachable,
1586 .void => "void",
1587 .auto_type => "__auto_type",
1588 .c23_auto => "auto",
1589 .nullptr_t => "nullptr_t",
1590 .bool => if (langopts.standard.atLeast(.c23)) "bool" else "_Bool",
1591 .char => "char",
1592 .schar => "signed char",
1593 .uchar => "unsigned char",
1594 .unsigned => "unsigned",
1595 .signed => "signed",
1596 .short => "short",
1597 .ushort => "unsigned short",
1598 .sshort => "signed short",
1599 .short_int => "short int",
1600 .sshort_int => "signed short int",
1601 .ushort_int => "unsigned short int",
1602 .int => "int",
1603 .sint => "signed int",
1604 .uint => "unsigned int",
1605 .long => "long",
1606 .slong => "signed long",
1607 .ulong => "unsigned long",
1608 .long_int => "long int",
1609 .slong_int => "signed long int",
1610 .ulong_int => "unsigned long int",
1611 .long_long => "long long",
1612 .slong_long => "signed long long",
1613 .ulong_long => "unsigned long long",
1614 .long_long_int => "long long int",
1615 .slong_long_int => "signed long long int",
1616 .ulong_long_int => "unsigned long long int",
1617 .int128 => "__int128",
1618 .sint128 => "signed __int128",
1619 .uint128 => "unsigned __int128",
1620 .complex_char => "_Complex char",
1621 .complex_schar => "_Complex signed char",
1622 .complex_uchar => "_Complex unsigned char",
1623 .complex_unsigned => "_Complex unsigned",
1624 .complex_signed => "_Complex signed",
1625 .complex_short => "_Complex short",
1626 .complex_ushort => "_Complex unsigned short",
1627 .complex_sshort => "_Complex signed short",
1628 .complex_short_int => "_Complex short int",
1629 .complex_sshort_int => "_Complex signed short int",
1630 .complex_ushort_int => "_Complex unsigned short int",
1631 .complex_int => "_Complex int",
1632 .complex_sint => "_Complex signed int",
1633 .complex_uint => "_Complex unsigned int",
1634 .complex_long => "_Complex long",
1635 .complex_slong => "_Complex signed long",
1636 .complex_ulong => "_Complex unsigned long",
1637 .complex_long_int => "_Complex long int",
1638 .complex_slong_int => "_Complex signed long int",
1639 .complex_ulong_int => "_Complex unsigned long int",
1640 .complex_long_long => "_Complex long long",
1641 .complex_slong_long => "_Complex signed long long",
1642 .complex_ulong_long => "_Complex unsigned long long",
1643 .complex_long_long_int => "_Complex long long int",
1644 .complex_slong_long_int => "_Complex signed long long int",
1645 .complex_ulong_long_int => "_Complex unsigned long long int",
1646 .complex_int128 => "_Complex __int128",
1647 .complex_sint128 => "_Complex signed __int128",
1648 .complex_uint128 => "_Complex unsigned __int128",
1649
1650 .fp16 => "__fp16",
1651 .float16 => "_Float16",
1652 .float => "float",
1653 .double => "double",
1654 .long_double => "long double",
1655 .float128 => "__float128",
1656 .complex => "_Complex",
1657 .complex_float16 => "_Complex _Float16",
1658 .complex_float => "_Complex float",
1659 .complex_double => "_Complex double",
1660 .complex_long_double => "_Complex long double",
1661 .complex_float128 => "_Complex __float128",
1662
1663 .attributed => |attributed| Builder.fromType(attributed.base).str(langopts),
1664
1665 else => null,
1666 };
1667 }
1668 };
1669
1670 pub fn finish(b: Builder, p: *Parser) Parser.Error!Type {
1671 var ty: Type = .{ .specifier = undefined };
1672 if (b.typedef) |typedef| {
1673 ty = typedef.ty;
1674 if (ty.isArray()) {
1675 var elem = ty.elemType();
1676 try b.qual.finish(p, &elem);
1677 // TODO this really should be easier
1678 switch (ty.specifier) {
1679 .array, .static_array, .incomplete_array => {
1680 const old = ty.data.array;
1681 ty.data.array = try p.arena.create(Array);
1682 ty.data.array.* = .{
1683 .len = old.len,
1684 .elem = elem,
1685 };
1686 },
1687 .variable_len_array, .unspecified_variable_len_array => {
1688 const old = ty.data.expr;
1689 ty.data.expr = try p.arena.create(Expr);
1690 ty.data.expr.* = .{
1691 .node = old.node,
1692 .ty = elem,
1693 };
1694 },
1695 .typeof_type => {}, // TODO handle
1696 .typeof_expr => {}, // TODO handle
1697 .attributed => {}, // TODO handle
1698 else => unreachable,
1699 }
1700
1701 return ty;
1702 }
1703 try b.qual.finish(p, &ty);
1704 return ty;
1705 }
1706 switch (b.specifier) {
1707 .none => {
1708 if (b.typeof) |typeof| {
1709 ty = typeof;
1710 } else {
1711 ty.specifier = .int;
1712 if (p.comp.langopts.standard.atLeast(.c23)) {
1713 try p.err(.missing_type_specifier_c23);
1714 } else {
1715 try p.err(.missing_type_specifier);
1716 }
1717 }
1718 },
1719 .void => ty.specifier = .void,
1720 .auto_type => ty.specifier = .auto_type,
1721 .c23_auto => ty.specifier = .c23_auto,
1722 .nullptr_t => unreachable, // nullptr_t can only be accessed via typeof(nullptr)
1723 .bool => ty.specifier = .bool,
1724 .char => ty.specifier = .char,
1725 .schar => ty.specifier = .schar,
1726 .uchar => ty.specifier = .uchar,
1727 .complex_char => ty.specifier = .complex_char,
1728 .complex_schar => ty.specifier = .complex_schar,
1729 .complex_uchar => ty.specifier = .complex_uchar,
1730
1731 .unsigned => ty.specifier = .uint,
1732 .signed => ty.specifier = .int,
1733 .short_int, .sshort_int, .short, .sshort => ty.specifier = .short,
1734 .ushort, .ushort_int => ty.specifier = .ushort,
1735 .int, .sint => ty.specifier = .int,
1736 .uint => ty.specifier = .uint,
1737 .long, .slong, .long_int, .slong_int => ty.specifier = .long,
1738 .ulong, .ulong_int => ty.specifier = .ulong,
1739 .long_long, .slong_long, .long_long_int, .slong_long_int => ty.specifier = .long_long,
1740 .ulong_long, .ulong_long_int => ty.specifier = .ulong_long,
1741 .int128, .sint128 => ty.specifier = .int128,
1742 .uint128 => ty.specifier = .uint128,
1743 .complex_unsigned => ty.specifier = .complex_uint,
1744 .complex_signed => ty.specifier = .complex_int,
1745 .complex_short_int, .complex_sshort_int, .complex_short, .complex_sshort => ty.specifier = .complex_short,
1746 .complex_ushort, .complex_ushort_int => ty.specifier = .complex_ushort,
1747 .complex_int, .complex_sint => ty.specifier = .complex_int,
1748 .complex_uint => ty.specifier = .complex_uint,
1749 .complex_long, .complex_slong, .complex_long_int, .complex_slong_int => ty.specifier = .complex_long,
1750 .complex_ulong, .complex_ulong_int => ty.specifier = .complex_ulong,
1751 .complex_long_long, .complex_slong_long, .complex_long_long_int, .complex_slong_long_int => ty.specifier = .complex_long_long,
1752 .complex_ulong_long, .complex_ulong_long_int => ty.specifier = .complex_ulong_long,
1753 .complex_int128, .complex_sint128 => ty.specifier = .complex_int128,
1754 .complex_uint128 => ty.specifier = .complex_uint128,
1755 .bit_int, .sbit_int, .ubit_int, .complex_bit_int, .complex_ubit_int, .complex_sbit_int => |bits| {
1756 const unsigned = b.specifier == .ubit_int or b.specifier == .complex_ubit_int;
1757 const complex_str = if (b.complex_tok != null) "_Complex " else "";
1758 if (unsigned) {
1759 if (bits < 1) {
1760 try p.errStr(.unsigned_bit_int_too_small, b.bit_int_tok.?, complex_str);
1761 return Type.invalid;
1762 }
1763 } else {
1764 if (bits < 2) {
1765 try p.errStr(.signed_bit_int_too_small, b.bit_int_tok.?, complex_str);
1766 return Type.invalid;
1767 }
1768 }
1769 if (bits > Compilation.bit_int_max_bits) {
1770 try p.errStr(if (unsigned) .unsigned_bit_int_too_big else .signed_bit_int_too_big, b.bit_int_tok.?, complex_str);
1771 return Type.invalid;
1772 }
1773 ty.specifier = if (b.complex_tok != null) .complex_bit_int else .bit_int;
1774 ty.data = .{ .int = .{
1775 .signedness = if (unsigned) .unsigned else .signed,
1776 .bits = @intCast(bits),
1777 } };
1778 },
1779
1780 .fp16 => ty.specifier = .fp16,
1781 .float16 => ty.specifier = .float16,
1782 .float => ty.specifier = .float,
1783 .double => ty.specifier = .double,
1784 .long_double => ty.specifier = .long_double,
1785 .float128 => ty.specifier = .float128,
1786 .complex_float16 => ty.specifier = .complex_float16,
1787 .complex_float => ty.specifier = .complex_float,
1788 .complex_double => ty.specifier = .complex_double,
1789 .complex_long_double => ty.specifier = .complex_long_double,
1790 .complex_float128 => ty.specifier = .complex_float128,
1791 .complex => {
1792 try p.errTok(.plain_complex, p.tok_i - 1);
1793 ty.specifier = .complex_double;
1794 },
1795
1796 .pointer => |data| {
1797 ty.specifier = .pointer;
1798 ty.data = .{ .sub_type = data };
1799 },
1800 .unspecified_variable_len_array, .decayed_unspecified_variable_len_array => |data| {
1801 ty.specifier = .unspecified_variable_len_array;
1802 ty.data = .{ .sub_type = data };
1803 ty.decayed = b.specifier == .decayed_unspecified_variable_len_array;
1804 },
1805 .func => |data| {
1806 ty.specifier = .func;
1807 ty.data = .{ .func = data };
1808 },
1809 .var_args_func => |data| {
1810 ty.specifier = .var_args_func;
1811 ty.data = .{ .func = data };
1812 },
1813 .old_style_func => |data| {
1814 ty.specifier = .old_style_func;
1815 ty.data = .{ .func = data };
1816 },
1817 .array, .decayed_array => |data| {
1818 ty.specifier = .array;
1819 ty.data = .{ .array = data };
1820 ty.decayed = b.specifier == .decayed_array;
1821 },
1822 .static_array, .decayed_static_array => |data| {
1823 ty.specifier = .static_array;
1824 ty.data = .{ .array = data };
1825 ty.decayed = b.specifier == .decayed_static_array;
1826 },
1827 .incomplete_array, .decayed_incomplete_array => |data| {
1828 ty.specifier = .incomplete_array;
1829 ty.data = .{ .array = data };
1830 ty.decayed = b.specifier == .decayed_incomplete_array;
1831 },
1832 .vector => |data| {
1833 ty.specifier = .vector;
1834 ty.data = .{ .array = data };
1835 },
1836 .variable_len_array, .decayed_variable_len_array => |data| {
1837 ty.specifier = .variable_len_array;
1838 ty.data = .{ .expr = data };
1839 ty.decayed = b.specifier == .decayed_variable_len_array;
1840 },
1841 .@"struct" => |data| {
1842 ty.specifier = .@"struct";
1843 ty.data = .{ .record = data };
1844 },
1845 .@"union" => |data| {
1846 ty.specifier = .@"union";
1847 ty.data = .{ .record = data };
1848 },
1849 .@"enum" => |data| {
1850 ty.specifier = .@"enum";
1851 ty.data = .{ .@"enum" = data };
1852 },
1853 .typeof_type, .decayed_typeof_type => |data| {
1854 ty.specifier = .typeof_type;
1855 ty.data = .{ .sub_type = data };
1856 ty.decayed = b.specifier == .decayed_typeof_type;
1857 },
1858 .typeof_expr, .decayed_typeof_expr => |data| {
1859 ty.specifier = .typeof_expr;
1860 ty.data = .{ .expr = data };
1861 ty.decayed = b.specifier == .decayed_typeof_expr;
1862 },
1863 .attributed, .decayed_attributed => |data| {
1864 ty.specifier = .attributed;
1865 ty.data = .{ .attributed = data };
1866 ty.decayed = b.specifier == .decayed_attributed;
1867 },
1868 }
1869 if (!ty.isReal() and ty.isInt()) {
1870 if (b.complex_tok) |tok| try p.errTok(.complex_int, tok);
1871 }
1872 try b.qual.finish(p, &ty);
1873 return ty;
1874 }
1875
1876 fn cannotCombine(b: Builder, p: *Parser, source_tok: TokenIndex) !void {
1877 if (b.error_on_invalid) return error.CannotCombine;
1878 const ty_str = b.specifier.str(p.comp.langopts) orelse try p.typeStr(try b.finish(p));
1879 try p.errExtra(.cannot_combine_spec, source_tok, .{ .str = ty_str });
1880 if (b.typedef) |some| try p.errStr(.spec_from_typedef, some.tok, try p.typeStr(some.ty));
1881 }
1882
1883 fn duplicateSpec(b: *Builder, p: *Parser, source_tok: TokenIndex, spec: []const u8) !void {
1884 if (b.error_on_invalid) return error.CannotCombine;
1885 if (p.comp.langopts.emulate != .clang) return b.cannotCombine(p, source_tok);
1886 try p.errStr(.duplicate_decl_spec, p.tok_i, spec);
1887 }
1888
1889 pub fn combineFromTypeof(b: *Builder, p: *Parser, new: Type, source_tok: TokenIndex) Compilation.Error!void {
1890 if (b.typeof != null) return p.errStr(.cannot_combine_spec, source_tok, "typeof");
1891 if (b.specifier != .none) return p.errStr(.invalid_typeof, source_tok, @tagName(b.specifier));
1892 const inner = switch (new.specifier) {
1893 .typeof_type => new.data.sub_type.*,
1894 .typeof_expr => new.data.expr.ty,
1895 .nullptr_t => new, // typeof(nullptr) is special-cased to be an unwrapped typeof-expr
1896 else => unreachable,
1897 };
1898
1899 b.typeof = switch (inner.specifier) {
1900 .attributed => inner.data.attributed.base,
1901 else => new,
1902 };
1903 }
1904
1905 /// Try to combine type from typedef, returns true if successful.
1906 pub fn combineTypedef(b: *Builder, p: *Parser, typedef_ty: Type, name_tok: TokenIndex) bool {
1907 if (typedef_ty.is(.invalid)) return false;
1908 b.error_on_invalid = true;
1909 defer b.error_on_invalid = false;
1910
1911 const new_spec = fromType(typedef_ty);
1912 b.combineExtra(p, new_spec, 0) catch |err| switch (err) {
1913 error.FatalError => unreachable, // we do not add any diagnostics
1914 error.OutOfMemory => unreachable, // we do not add any diagnostics
1915 error.ParsingFailed => unreachable, // we do not add any diagnostics
1916 error.CannotCombine => return false,
1917 };
1918 b.typedef = .{ .tok = name_tok, .ty = typedef_ty };
1919 return true;
1920 }
1921
1922 pub fn combine(b: *Builder, p: *Parser, new: Builder.Specifier, source_tok: TokenIndex) !void {
1923 b.combineExtra(p, new, source_tok) catch |err| switch (err) {
1924 error.CannotCombine => unreachable,
1925 else => |e| return e,
1926 };
1927 }
1928
1929 fn combineExtra(b: *Builder, p: *Parser, new: Builder.Specifier, source_tok: TokenIndex) !void {
1930 if (b.typeof != null) {
1931 if (b.error_on_invalid) return error.CannotCombine;
1932 try p.errStr(.invalid_typeof, source_tok, @tagName(new));
1933 }
1934
1935 switch (new) {
1936 .complex => b.complex_tok = source_tok,
1937 .bit_int => b.bit_int_tok = source_tok,
1938 .auto_type => b.auto_type_tok = source_tok,
1939 else => {},
1940 }
1941
1942 if (new == .int128 and !target_util.hasInt128(p.comp.target)) {
1943 try p.errStr(.type_not_supported_on_target, source_tok, "__int128");
1944 }
1945
1946 switch (new) {
1947 else => switch (b.specifier) {
1948 .none => b.specifier = new,
1949 else => return b.cannotCombine(p, source_tok),
1950 },
1951 .signed => b.specifier = switch (b.specifier) {
1952 .none => .signed,
1953 .char => .schar,
1954 .short => .sshort,
1955 .short_int => .sshort_int,
1956 .int => .sint,
1957 .long => .slong,
1958 .long_int => .slong_int,
1959 .long_long => .slong_long,
1960 .long_long_int => .slong_long_int,
1961 .int128 => .sint128,
1962 .bit_int => |bits| .{ .sbit_int = bits },
1963 .complex => .complex_signed,
1964 .complex_char => .complex_schar,
1965 .complex_short => .complex_sshort,
1966 .complex_short_int => .complex_sshort_int,
1967 .complex_int => .complex_sint,
1968 .complex_long => .complex_slong,
1969 .complex_long_int => .complex_slong_int,
1970 .complex_long_long => .complex_slong_long,
1971 .complex_long_long_int => .complex_slong_long_int,
1972 .complex_int128 => .complex_sint128,
1973 .complex_bit_int => |bits| .{ .complex_sbit_int = bits },
1974 .signed,
1975 .sshort,
1976 .sshort_int,
1977 .sint,
1978 .slong,
1979 .slong_int,
1980 .slong_long,
1981 .slong_long_int,
1982 .sint128,
1983 .sbit_int,
1984 .complex_schar,
1985 .complex_signed,
1986 .complex_sshort,
1987 .complex_sshort_int,
1988 .complex_sint,
1989 .complex_slong,
1990 .complex_slong_int,
1991 .complex_slong_long,
1992 .complex_slong_long_int,
1993 .complex_sint128,
1994 .complex_sbit_int,
1995 => return b.duplicateSpec(p, source_tok, "signed"),
1996 else => return b.cannotCombine(p, source_tok),
1997 },
1998 .unsigned => b.specifier = switch (b.specifier) {
1999 .none => .unsigned,
2000 .char => .uchar,
2001 .short => .ushort,
2002 .short_int => .ushort_int,
2003 .int => .uint,
2004 .long => .ulong,
2005 .long_int => .ulong_int,
2006 .long_long => .ulong_long,
2007 .long_long_int => .ulong_long_int,
2008 .int128 => .uint128,
2009 .bit_int => |bits| .{ .ubit_int = bits },
2010 .complex => .complex_unsigned,
2011 .complex_char => .complex_uchar,
2012 .complex_short => .complex_ushort,
2013 .complex_short_int => .complex_ushort_int,
2014 .complex_int => .complex_uint,
2015 .complex_long => .complex_ulong,
2016 .complex_long_int => .complex_ulong_int,
2017 .complex_long_long => .complex_ulong_long,
2018 .complex_long_long_int => .complex_ulong_long_int,
2019 .complex_int128 => .complex_uint128,
2020 .complex_bit_int => |bits| .{ .complex_ubit_int = bits },
2021 .unsigned,
2022 .ushort,
2023 .ushort_int,
2024 .uint,
2025 .ulong,
2026 .ulong_int,
2027 .ulong_long,
2028 .ulong_long_int,
2029 .uint128,
2030 .ubit_int,
2031 .complex_uchar,
2032 .complex_unsigned,
2033 .complex_ushort,
2034 .complex_ushort_int,
2035 .complex_uint,
2036 .complex_ulong,
2037 .complex_ulong_int,
2038 .complex_ulong_long,
2039 .complex_ulong_long_int,
2040 .complex_uint128,
2041 .complex_ubit_int,
2042 => return b.duplicateSpec(p, source_tok, "unsigned"),
2043 else => return b.cannotCombine(p, source_tok),
2044 },
2045 .char => b.specifier = switch (b.specifier) {
2046 .none => .char,
2047 .unsigned => .uchar,
2048 .signed => .schar,
2049 .complex => .complex_char,
2050 .complex_signed => .complex_schar,
2051 .complex_unsigned => .complex_uchar,
2052 else => return b.cannotCombine(p, source_tok),
2053 },
2054 .short => b.specifier = switch (b.specifier) {
2055 .none => .short,
2056 .unsigned => .ushort,
2057 .signed => .sshort,
2058 .int => .short_int,
2059 .sint => .sshort_int,
2060 .uint => .ushort_int,
2061 .complex => .complex_short,
2062 .complex_signed => .complex_sshort,
2063 .complex_unsigned => .complex_ushort,
2064 else => return b.cannotCombine(p, source_tok),
2065 },
2066 .int => b.specifier = switch (b.specifier) {
2067 .none => .int,
2068 .signed => .sint,
2069 .unsigned => .uint,
2070 .short => .short_int,
2071 .sshort => .sshort_int,
2072 .ushort => .ushort_int,
2073 .long => .long_int,
2074 .slong => .slong_int,
2075 .ulong => .ulong_int,
2076 .long_long => .long_long_int,
2077 .slong_long => .slong_long_int,
2078 .ulong_long => .ulong_long_int,
2079 .complex => .complex_int,
2080 .complex_signed => .complex_sint,
2081 .complex_unsigned => .complex_uint,
2082 .complex_short => .complex_short_int,
2083 .complex_sshort => .complex_sshort_int,
2084 .complex_ushort => .complex_ushort_int,
2085 .complex_long => .complex_long_int,
2086 .complex_slong => .complex_slong_int,
2087 .complex_ulong => .complex_ulong_int,
2088 .complex_long_long => .complex_long_long_int,
2089 .complex_slong_long => .complex_slong_long_int,
2090 .complex_ulong_long => .complex_ulong_long_int,
2091 else => return b.cannotCombine(p, source_tok),
2092 },
2093 .long => b.specifier = switch (b.specifier) {
2094 .none => .long,
2095 .double => .long_double,
2096 .long => .long_long,
2097 .unsigned => .ulong,
2098 .signed => .long,
2099 .int => .long_int,
2100 .sint => .slong_int,
2101 .ulong => .ulong_long,
2102 .complex => .complex_long,
2103 .complex_signed => .complex_slong,
2104 .complex_unsigned => .complex_ulong,
2105 .complex_long => .complex_long_long,
2106 .complex_slong => .complex_slong_long,
2107 .complex_ulong => .complex_ulong_long,
2108 .complex_double => .complex_long_double,
2109 else => return b.cannotCombine(p, source_tok),
2110 },
2111 .int128 => b.specifier = switch (b.specifier) {
2112 .none => .int128,
2113 .unsigned => .uint128,
2114 .signed => .sint128,
2115 .complex => .complex_int128,
2116 .complex_signed => .complex_sint128,
2117 .complex_unsigned => .complex_uint128,
2118 else => return b.cannotCombine(p, source_tok),
2119 },
2120 .bit_int => b.specifier = switch (b.specifier) {
2121 .none => .{ .bit_int = new.bit_int },
2122 .unsigned => .{ .ubit_int = new.bit_int },
2123 .signed => .{ .sbit_int = new.bit_int },
2124 .complex => .{ .complex_bit_int = new.bit_int },
2125 .complex_signed => .{ .complex_sbit_int = new.bit_int },
2126 .complex_unsigned => .{ .complex_ubit_int = new.bit_int },
2127 else => return b.cannotCombine(p, source_tok),
2128 },
2129 .auto_type => b.specifier = switch (b.specifier) {
2130 .none => .auto_type,
2131 else => return b.cannotCombine(p, source_tok),
2132 },
2133 .c23_auto => b.specifier = switch (b.specifier) {
2134 .none => .c23_auto,
2135 else => return b.cannotCombine(p, source_tok),
2136 },
2137 .fp16 => b.specifier = switch (b.specifier) {
2138 .none => .fp16,
2139 else => return b.cannotCombine(p, source_tok),
2140 },
2141 .float16 => b.specifier = switch (b.specifier) {
2142 .none => .float16,
2143 .complex => .complex_float16,
2144 else => return b.cannotCombine(p, source_tok),
2145 },
2146 .float => b.specifier = switch (b.specifier) {
2147 .none => .float,
2148 .complex => .complex_float,
2149 else => return b.cannotCombine(p, source_tok),
2150 },
2151 .double => b.specifier = switch (b.specifier) {
2152 .none => .double,
2153 .long => .long_double,
2154 .complex_long => .complex_long_double,
2155 .complex => .complex_double,
2156 else => return b.cannotCombine(p, source_tok),
2157 },
2158 .float128 => b.specifier = switch (b.specifier) {
2159 .none => .float128,
2160 .complex => .complex_float128,
2161 else => return b.cannotCombine(p, source_tok),
2162 },
2163 .complex => b.specifier = switch (b.specifier) {
2164 .none => .complex,
2165 .float16 => .complex_float16,
2166 .float => .complex_float,
2167 .double => .complex_double,
2168 .long_double => .complex_long_double,
2169 .float128 => .complex_float128,
2170 .char => .complex_char,
2171 .schar => .complex_schar,
2172 .uchar => .complex_uchar,
2173 .unsigned => .complex_unsigned,
2174 .signed => .complex_signed,
2175 .short => .complex_short,
2176 .sshort => .complex_sshort,
2177 .ushort => .complex_ushort,
2178 .short_int => .complex_short_int,
2179 .sshort_int => .complex_sshort_int,
2180 .ushort_int => .complex_ushort_int,
2181 .int => .complex_int,
2182 .sint => .complex_sint,
2183 .uint => .complex_uint,
2184 .long => .complex_long,
2185 .slong => .complex_slong,
2186 .ulong => .complex_ulong,
2187 .long_int => .complex_long_int,
2188 .slong_int => .complex_slong_int,
2189 .ulong_int => .complex_ulong_int,
2190 .long_long => .complex_long_long,
2191 .slong_long => .complex_slong_long,
2192 .ulong_long => .complex_ulong_long,
2193 .long_long_int => .complex_long_long_int,
2194 .slong_long_int => .complex_slong_long_int,
2195 .ulong_long_int => .complex_ulong_long_int,
2196 .int128 => .complex_int128,
2197 .sint128 => .complex_sint128,
2198 .uint128 => .complex_uint128,
2199 .bit_int => |bits| .{ .complex_bit_int = bits },
2200 .sbit_int => |bits| .{ .complex_sbit_int = bits },
2201 .ubit_int => |bits| .{ .complex_ubit_int = bits },
2202 .complex,
2203 .complex_float,
2204 .complex_double,
2205 .complex_long_double,
2206 .complex_float128,
2207 .complex_char,
2208 .complex_schar,
2209 .complex_uchar,
2210 .complex_unsigned,
2211 .complex_signed,
2212 .complex_short,
2213 .complex_sshort,
2214 .complex_ushort,
2215 .complex_short_int,
2216 .complex_sshort_int,
2217 .complex_ushort_int,
2218 .complex_int,
2219 .complex_sint,
2220 .complex_uint,
2221 .complex_long,
2222 .complex_slong,
2223 .complex_ulong,
2224 .complex_long_int,
2225 .complex_slong_int,
2226 .complex_ulong_int,
2227 .complex_long_long,
2228 .complex_slong_long,
2229 .complex_ulong_long,
2230 .complex_long_long_int,
2231 .complex_slong_long_int,
2232 .complex_ulong_long_int,
2233 .complex_int128,
2234 .complex_sint128,
2235 .complex_uint128,
2236 .complex_bit_int,
2237 .complex_sbit_int,
2238 .complex_ubit_int,
2239 => return b.duplicateSpec(p, source_tok, "_Complex"),
2240 else => return b.cannotCombine(p, source_tok),
2241 },
2242 }
2243 }
2244
2245 pub fn fromType(ty: Type) Builder.Specifier {
2246 return switch (ty.specifier) {
2247 .void => .void,
2248 .auto_type => .auto_type,
2249 .c23_auto => .c23_auto,
2250 .nullptr_t => .nullptr_t,
2251 .bool => .bool,
2252 .char => .char,
2253 .schar => .schar,
2254 .uchar => .uchar,
2255 .short => .short,
2256 .ushort => .ushort,
2257 .int => .int,
2258 .uint => .uint,
2259 .long => .long,
2260 .ulong => .ulong,
2261 .long_long => .long_long,
2262 .ulong_long => .ulong_long,
2263 .int128 => .int128,
2264 .uint128 => .uint128,
2265 .bit_int => if (ty.data.int.signedness == .unsigned) {
2266 return .{ .ubit_int = ty.data.int.bits };
2267 } else {
2268 return .{ .bit_int = ty.data.int.bits };
2269 },
2270 .complex_char => .complex_char,
2271 .complex_schar => .complex_schar,
2272 .complex_uchar => .complex_uchar,
2273 .complex_short => .complex_short,
2274 .complex_ushort => .complex_ushort,
2275 .complex_int => .complex_int,
2276 .complex_uint => .complex_uint,
2277 .complex_long => .complex_long,
2278 .complex_ulong => .complex_ulong,
2279 .complex_long_long => .complex_long_long,
2280 .complex_ulong_long => .complex_ulong_long,
2281 .complex_int128 => .complex_int128,
2282 .complex_uint128 => .complex_uint128,
2283 .complex_bit_int => if (ty.data.int.signedness == .unsigned) {
2284 return .{ .complex_ubit_int = ty.data.int.bits };
2285 } else {
2286 return .{ .complex_bit_int = ty.data.int.bits };
2287 },
2288 .fp16 => .fp16,
2289 .float16 => .float16,
2290 .float => .float,
2291 .double => .double,
2292 .float128 => .float128,
2293 .long_double => .long_double,
2294 .complex_float16 => .complex_float16,
2295 .complex_float => .complex_float,
2296 .complex_double => .complex_double,
2297 .complex_long_double => .complex_long_double,
2298 .complex_float128 => .complex_float128,
2299
2300 .pointer => .{ .pointer = ty.data.sub_type },
2301 .unspecified_variable_len_array => if (ty.isDecayed())
2302 .{ .decayed_unspecified_variable_len_array = ty.data.sub_type }
2303 else
2304 .{ .unspecified_variable_len_array = ty.data.sub_type },
2305 .func => .{ .func = ty.data.func },
2306 .var_args_func => .{ .var_args_func = ty.data.func },
2307 .old_style_func => .{ .old_style_func = ty.data.func },
2308 .array => if (ty.isDecayed())
2309 .{ .decayed_array = ty.data.array }
2310 else
2311 .{ .array = ty.data.array },
2312 .static_array => if (ty.isDecayed())
2313 .{ .decayed_static_array = ty.data.array }
2314 else
2315 .{ .static_array = ty.data.array },
2316 .incomplete_array => if (ty.isDecayed())
2317 .{ .decayed_incomplete_array = ty.data.array }
2318 else
2319 .{ .incomplete_array = ty.data.array },
2320 .vector => .{ .vector = ty.data.array },
2321 .variable_len_array => if (ty.isDecayed())
2322 .{ .decayed_variable_len_array = ty.data.expr }
2323 else
2324 .{ .variable_len_array = ty.data.expr },
2325 .@"struct" => .{ .@"struct" = ty.data.record },
2326 .@"union" => .{ .@"union" = ty.data.record },
2327 .@"enum" => .{ .@"enum" = ty.data.@"enum" },
2328
2329 .typeof_type => if (ty.isDecayed())
2330 .{ .decayed_typeof_type = ty.data.sub_type }
2331 else
2332 .{ .typeof_type = ty.data.sub_type },
2333 .typeof_expr => if (ty.isDecayed())
2334 .{ .decayed_typeof_expr = ty.data.expr }
2335 else
2336 .{ .typeof_expr = ty.data.expr },
2337
2338 .attributed => if (ty.isDecayed())
2339 .{ .decayed_attributed = ty.data.attributed }
2340 else
2341 .{ .attributed = ty.data.attributed },
2342 else => unreachable,
2343 };
2344 }
2345};
2346
2347/// Use with caution
2348pub fn base(ty: *Type) *Type {
2349 return switch (ty.specifier) {
2350 .typeof_type => ty.data.sub_type.base(),
2351 .typeof_expr => ty.data.expr.ty.base(),
2352 .attributed => ty.data.attributed.base.base(),
2353 else => ty,
2354 };
2355}
2356
2357pub fn getAttribute(ty: Type, comptime tag: Attribute.Tag) ?Attribute.ArgumentsForTag(tag) {
2358 if (tag == .aligned) @compileError("use requestedAlignment");
2359 var it = Attribute.Iterator.initType(ty);
2360 while (it.next()) |item| {
2361 const attribute, _ = item;
2362 if (attribute.tag == tag) return @field(attribute.args, @tagName(tag));
2363 }
2364 return null;
2365}
2366
2367pub fn hasAttribute(ty: Type, tag: Attribute.Tag) bool {
2368 var it = Attribute.Iterator.initType(ty);
2369 while (it.next()) |item| {
2370 const attr, _ = item;
2371 if (attr.tag == tag) return true;
2372 }
2373 return false;
2374}
2375
2376/// printf format modifier
2377pub fn formatModifier(ty: Type) []const u8 {
2378 return switch (ty.specifier) {
2379 .schar, .uchar => "hh",
2380 .short, .ushort => "h",
2381 .int, .uint => "",
2382 .long, .ulong => "l",
2383 .long_long, .ulong_long => "ll",
2384 else => unreachable,
2385 };
2386}
2387
2388/// Suffix for integer values of this type
2389pub fn intValueSuffix(ty: Type, comp: *const Compilation) []const u8 {
2390 return switch (ty.specifier) {
2391 .schar, .short, .int => "",
2392 .long => "L",
2393 .long_long => "LL",
2394 .uchar, .char => {
2395 if (ty.specifier == .char and comp.getCharSignedness() == .signed) return "";
2396 // Only 8-bit char supported currently;
2397 // TODO: handle platforms with 16-bit int + 16-bit char
2398 std.debug.assert(ty.sizeof(comp).? == 1);
2399 return "";
2400 },
2401 .ushort => {
2402 if (ty.sizeof(comp).? < int.sizeof(comp).?) {
2403 return "";
2404 }
2405 return "U";
2406 },
2407 .uint => "U",
2408 .ulong => "UL",
2409 .ulong_long => "ULL",
2410 else => unreachable, // not integer
2411 };
2412}
2413
2414/// Print type in C style
2415pub fn print(ty: Type, mapper: StringInterner.TypeMapper, langopts: LangOpts, w: *Writer) Writer.Error!void {
2416 _ = try ty.printPrologue(mapper, langopts, w);
2417 try ty.printEpilogue(mapper, langopts, w);
2418}
2419
2420pub fn printNamed(ty: Type, name: []const u8, mapper: StringInterner.TypeMapper, langopts: LangOpts, w: *Writer) Writer.Error!void {
2421 const simple = try ty.printPrologue(mapper, langopts, w);
2422 if (simple) try w.writeByte(' ');
2423 try w.writeAll(name);
2424 try ty.printEpilogue(mapper, langopts, w);
2425}
2426
2427const StringGetter = fn (TokenIndex) []const u8;
2428
2429/// return true if `ty` is simple
2430fn printPrologue(ty: Type, mapper: StringInterner.TypeMapper, langopts: LangOpts, w: *Writer) Writer.Error!bool {
2431 if (ty.qual.atomic) {
2432 var non_atomic_ty = ty;
2433 non_atomic_ty.qual.atomic = false;
2434 try w.writeAll("_Atomic(");
2435 try non_atomic_ty.print(mapper, langopts, w);
2436 try w.writeAll(")");
2437 return true;
2438 }
2439 if (ty.isPtr()) {
2440 const elem_ty = ty.elemType();
2441 const simple = try elem_ty.printPrologue(mapper, langopts, w);
2442 if (simple) try w.writeByte(' ');
2443 if (elem_ty.isFunc() or elem_ty.isArray()) try w.writeByte('(');
2444 try w.writeByte('*');
2445 try ty.qual.dump(w);
2446 return false;
2447 }
2448 switch (ty.specifier) {
2449 .pointer => unreachable,
2450 .func, .var_args_func, .old_style_func => {
2451 const ret_ty = ty.data.func.return_type;
2452 const simple = try ret_ty.printPrologue(mapper, langopts, w);
2453 if (simple) try w.writeByte(' ');
2454 return false;
2455 },
2456 .array, .static_array, .incomplete_array, .unspecified_variable_len_array, .variable_len_array => {
2457 const elem_ty = ty.elemType();
2458 const simple = try elem_ty.printPrologue(mapper, langopts, w);
2459 if (simple) try w.writeByte(' ');
2460 return false;
2461 },
2462 .typeof_type, .typeof_expr => {
2463 const actual = ty.canonicalize(.standard);
2464 return actual.printPrologue(mapper, langopts, w);
2465 },
2466 .attributed => {
2467 const actual = ty.canonicalize(.standard);
2468 return actual.printPrologue(mapper, langopts, w);
2469 },
2470 else => {},
2471 }
2472 try ty.qual.dump(w);
2473
2474 switch (ty.specifier) {
2475 .@"enum" => if (ty.data.@"enum".fixed) {
2476 try w.print("enum {s}: ", .{mapper.lookup(ty.data.@"enum".name)});
2477 try ty.data.@"enum".tag_ty.dump(mapper, langopts, w);
2478 } else {
2479 try w.print("enum {s}", .{mapper.lookup(ty.data.@"enum".name)});
2480 },
2481 .@"struct" => try w.print("struct {s}", .{mapper.lookup(ty.data.record.name)}),
2482 .@"union" => try w.print("union {s}", .{mapper.lookup(ty.data.record.name)}),
2483 .vector => {
2484 const len = ty.data.array.len;
2485 const elem_ty = ty.data.array.elem;
2486 try w.print("__attribute__((__vector_size__({d} * sizeof(", .{len});
2487 _ = try elem_ty.printPrologue(mapper, langopts, w);
2488 try w.writeAll(")))) ");
2489 _ = try elem_ty.printPrologue(mapper, langopts, w);
2490 try w.print(" (vector of {d} '", .{len});
2491 _ = try elem_ty.printPrologue(mapper, langopts, w);
2492 try w.writeAll("' values)");
2493 },
2494 .bit_int => try w.print("{s} _BitInt({d})", .{ @tagName(ty.data.int.signedness), ty.data.int.bits }),
2495 .complex_bit_int => try w.print("_Complex {s} _BitInt({d})", .{ @tagName(ty.data.int.signedness), ty.data.int.bits }),
2496 else => try w.writeAll(Builder.fromType(ty).str(langopts).?),
2497 }
2498 return true;
2499}
2500
2501fn printEpilogue(ty: Type, mapper: StringInterner.TypeMapper, langopts: LangOpts, w: *Writer) Writer.Error!void {
2502 if (ty.qual.atomic) return;
2503 if (ty.isPtr()) {
2504 const elem_ty = ty.elemType();
2505 if (elem_ty.isFunc() or elem_ty.isArray()) try w.writeByte(')');
2506 try elem_ty.printEpilogue(mapper, langopts, w);
2507 return;
2508 }
2509 switch (ty.specifier) {
2510 .pointer => unreachable, // handled above
2511 .func, .var_args_func, .old_style_func => {
2512 try w.writeByte('(');
2513 for (ty.data.func.params, 0..) |param, i| {
2514 if (i != 0) try w.writeAll(", ");
2515 _ = try param.ty.printPrologue(mapper, langopts, w);
2516 try param.ty.printEpilogue(mapper, langopts, w);
2517 }
2518 if (ty.specifier != .func) {
2519 if (ty.data.func.params.len != 0) try w.writeAll(", ");
2520 try w.writeAll("...");
2521 } else if (ty.data.func.params.len == 0) {
2522 try w.writeAll("void");
2523 }
2524 try w.writeByte(')');
2525 try ty.data.func.return_type.printEpilogue(mapper, langopts, w);
2526 },
2527 .array, .static_array => {
2528 try w.writeByte('[');
2529 if (ty.specifier == .static_array) try w.writeAll("static ");
2530 try ty.qual.dump(w);
2531 try w.print("{d}]", .{ty.data.array.len});
2532 try ty.data.array.elem.printEpilogue(mapper, langopts, w);
2533 },
2534 .incomplete_array => {
2535 try w.writeByte('[');
2536 try ty.qual.dump(w);
2537 try w.writeByte(']');
2538 try ty.data.array.elem.printEpilogue(mapper, langopts, w);
2539 },
2540 .unspecified_variable_len_array => {
2541 try w.writeByte('[');
2542 try ty.qual.dump(w);
2543 try w.writeAll("*]");
2544 try ty.data.sub_type.printEpilogue(mapper, langopts, w);
2545 },
2546 .variable_len_array => {
2547 try w.writeByte('[');
2548 try ty.qual.dump(w);
2549 try w.writeAll("<expr>]");
2550 try ty.data.expr.ty.printEpilogue(mapper, langopts, w);
2551 },
2552 .typeof_type, .typeof_expr => {
2553 const actual = ty.canonicalize(.standard);
2554 try actual.printEpilogue(mapper, langopts, w);
2555 },
2556 .attributed => {
2557 const actual = ty.canonicalize(.standard);
2558 try actual.printEpilogue(mapper, langopts, w);
2559 },
2560 else => {},
2561 }
2562}
2563
2564/// Useful for debugging, too noisy to be enabled by default.
2565const dump_detailed_containers = false;
2566
2567// Print as Zig types since those are actually readable
2568pub fn dump(ty: Type, mapper: StringInterner.TypeMapper, langopts: LangOpts, w: *Writer) Writer.Error!void {
2569 try ty.qual.dump(w);
2570 switch (ty.specifier) {
2571 .invalid => try w.writeAll("invalid"),
2572 .pointer => {
2573 try w.writeAll("*");
2574 try ty.data.sub_type.dump(mapper, langopts, w);
2575 },
2576 .func, .var_args_func, .old_style_func => {
2577 if (ty.specifier == .old_style_func)
2578 try w.writeAll("kr (")
2579 else
2580 try w.writeAll("fn (");
2581 for (ty.data.func.params, 0..) |param, i| {
2582 if (i != 0) try w.writeAll(", ");
2583 if (param.name != .empty) try w.print("{s}: ", .{mapper.lookup(param.name)});
2584 try param.ty.dump(mapper, langopts, w);
2585 }
2586 if (ty.specifier != .func) {
2587 if (ty.data.func.params.len != 0) try w.writeAll(", ");
2588 try w.writeAll("...");
2589 }
2590 try w.writeAll(") ");
2591 try ty.data.func.return_type.dump(mapper, langopts, w);
2592 },
2593 .array, .static_array => {
2594 if (ty.isDecayed()) try w.writeAll("*d");
2595 try w.writeByte('[');
2596 if (ty.specifier == .static_array) try w.writeAll("static ");
2597 try w.print("{d}]", .{ty.data.array.len});
2598 try ty.data.array.elem.dump(mapper, langopts, w);
2599 },
2600 .vector => {
2601 try w.print("vector({d}, ", .{ty.data.array.len});
2602 try ty.data.array.elem.dump(mapper, langopts, w);
2603 try w.writeAll(")");
2604 },
2605 .incomplete_array => {
2606 if (ty.isDecayed()) try w.writeAll("*d");
2607 try w.writeAll("[]");
2608 try ty.data.array.elem.dump(mapper, langopts, w);
2609 },
2610 .@"enum" => {
2611 const enum_ty = ty.data.@"enum";
2612 if (enum_ty.isIncomplete() and !enum_ty.fixed) {
2613 try w.print("enum {s}", .{mapper.lookup(enum_ty.name)});
2614 } else {
2615 try w.print("enum {s}: ", .{mapper.lookup(enum_ty.name)});
2616 try enum_ty.tag_ty.dump(mapper, langopts, w);
2617 }
2618 if (dump_detailed_containers) try dumpEnum(enum_ty, mapper, w);
2619 },
2620 .@"struct" => {
2621 try w.print("struct {s}", .{mapper.lookup(ty.data.record.name)});
2622 if (dump_detailed_containers) try dumpRecord(ty.data.record, mapper, langopts, w);
2623 },
2624 .@"union" => {
2625 try w.print("union {s}", .{mapper.lookup(ty.data.record.name)});
2626 if (dump_detailed_containers) try dumpRecord(ty.data.record, mapper, langopts, w);
2627 },
2628 .unspecified_variable_len_array => {
2629 if (ty.isDecayed()) try w.writeAll("*d");
2630 try w.writeAll("[*]");
2631 try ty.data.sub_type.dump(mapper, langopts, w);
2632 },
2633 .variable_len_array => {
2634 if (ty.isDecayed()) try w.writeAll("*d");
2635 try w.writeAll("[<expr>]");
2636 try ty.data.expr.ty.dump(mapper, langopts, w);
2637 },
2638 .typeof_type => {
2639 try w.writeAll("typeof(");
2640 try ty.data.sub_type.dump(mapper, langopts, w);
2641 try w.writeAll(")");
2642 },
2643 .typeof_expr => {
2644 try w.writeAll("typeof(<expr>: ");
2645 try ty.data.expr.ty.dump(mapper, langopts, w);
2646 try w.writeAll(")");
2647 },
2648 .attributed => {
2649 if (ty.isDecayed()) try w.writeAll("*d:");
2650 try w.writeAll("attributed(");
2651 try ty.data.attributed.base.canonicalize(.standard).dump(mapper, langopts, w);
2652 try w.writeAll(")");
2653 },
2654 .bit_int => try w.print("{s} _BitInt({d})", .{ @tagName(ty.data.int.signedness), ty.data.int.bits }),
2655 .complex_bit_int => try w.print("_Complex {s} _BitInt({d})", .{ @tagName(ty.data.int.signedness), ty.data.int.bits }),
2656 else => try w.writeAll(Builder.fromType(ty).str(langopts).?),
2657 }
2658}
2659
2660fn dumpEnum(@"enum": *Enum, mapper: StringInterner.TypeMapper, w: *Writer) Writer.Error!void {
2661 try w.writeAll(" {");
2662 for (@"enum".fields) |field| {
2663 try w.print(" {s} = {d},", .{ mapper.lookup(field.name), field.value });
2664 }
2665 try w.writeAll(" }");
2666}
2667
2668fn dumpRecord(record: *Record, mapper: StringInterner.TypeMapper, langopts: LangOpts, w: *Writer) Writer.Error!void {
2669 try w.writeAll(" {");
2670 for (record.fields) |field| {
2671 try w.writeByte(' ');
2672 try field.ty.dump(mapper, langopts, w);
2673 try w.print(" {s}: {d};", .{ mapper.lookup(field.name), field.bit_width });
2674 }
2675 try w.writeAll(" }");
2676}
lib/compiler/aro/aro/TypeStore.zig created+3008
......@@ -0,0 +1,3008 @@
1pub const std = @import("std");
2
3const Attribute = @import("Attribute.zig");
4const Compilation = @import("Compilation.zig");
5const LangOpts = @import("LangOpts.zig");
6const record_layout = @import("record_layout.zig");
7const Parser = @import("Parser.zig");
8const StringInterner = @import("StringInterner.zig");
9const StringId = StringInterner.StringId;
10const target_util = @import("target.zig");
11const Tree = @import("Tree.zig");
12const Node = Tree.Node;
13const TokenIndex = Tree.TokenIndex;
14
15const Repr = struct {
16 tag: Tag,
17 /// If a Type has a child type it is stored in data[0].
18 data: [2]u32,
19
20 pub const Tag = enum(u8) {
21 complex,
22 bit_int,
23 atomic,
24 func,
25 func_variadic,
26 func_old_style,
27 func_zero,
28 func_variadic_zero,
29 func_old_style_zero,
30 func_one,
31 func_variadic_one,
32 func_old_style_one,
33 pointer,
34 pointer_decayed,
35 array_incomplete,
36 array_fixed,
37 array_static,
38 array_variable,
39 array_unspecified_variable,
40 vector,
41 @"struct",
42 struct_incomplete,
43 @"union",
44 union_incomplete,
45 @"enum",
46 enum_fixed,
47 enum_incomplete,
48 enum_incomplete_fixed,
49 typeof,
50 typeof_expr,
51 typedef,
52 attributed,
53 attributed_one,
54 };
55};
56
57const Index = enum(u29) {
58 /// A NaN-like poison value
59 /// Can only be nested in function types.
60 invalid = std.math.maxInt(u29) - 0,
61 /// GNU auto type
62 /// This is a placeholder specifier - it must be replaced by the actual type specifier (determined by the initializer)
63 /// Must *NOT* be nested.
64 auto_type = std.math.maxInt(u29) - 1,
65 /// C23 auto, behaves like auto_type
66 /// Must *NOT* be nested.
67 c23_auto = std.math.maxInt(u29) - 2,
68 void = std.math.maxInt(u29) - 3,
69 bool = std.math.maxInt(u29) - 4,
70 nullptr_t = std.math.maxInt(u29) - 5,
71 int_char = std.math.maxInt(u29) - 6,
72 int_schar = std.math.maxInt(u29) - 7,
73 int_uchar = std.math.maxInt(u29) - 8,
74 int_short = std.math.maxInt(u29) - 9,
75 int_ushort = std.math.maxInt(u29) - 10,
76 int_int = std.math.maxInt(u29) - 11,
77 int_uint = std.math.maxInt(u29) - 12,
78 int_long = std.math.maxInt(u29) - 13,
79 int_ulong = std.math.maxInt(u29) - 14,
80 int_long_long = std.math.maxInt(u29) - 15,
81 int_ulong_long = std.math.maxInt(u29) - 16,
82 int_int128 = std.math.maxInt(u29) - 17,
83 int_uint128 = std.math.maxInt(u29) - 18,
84 float_fp16 = std.math.maxInt(u29) - 19,
85 float_float16 = std.math.maxInt(u29) - 20,
86 float_float = std.math.maxInt(u29) - 21,
87 float_double = std.math.maxInt(u29) - 22,
88 float_long_double = std.math.maxInt(u29) - 23,
89 float_float128 = std.math.maxInt(u29) - 24,
90 void_pointer = std.math.maxInt(u29) - 25,
91 char_pointer = std.math.maxInt(u29) - 26,
92 int_pointer = std.math.maxInt(u29) - 27,
93 /// Special type used when combining declarators.
94 declarator_combine = std.math.maxInt(u29) - 28,
95 _,
96};
97
98const TypeStore = @This();
99
100pub const QualType = packed struct(u32) {
101 @"const": bool = false,
102 @"volatile": bool = false,
103 restrict: bool = false,
104
105 _index: Index,
106
107 pub const invalid: QualType = .{ ._index = .invalid };
108 pub const auto_type: QualType = .{ ._index = .auto_type };
109 pub const c23_auto: QualType = .{ ._index = .c23_auto };
110 pub const @"void": QualType = .{ ._index = .void };
111 pub const @"bool": QualType = .{ ._index = .bool };
112 pub const nullptr_t: QualType = .{ ._index = .nullptr_t };
113 pub const char: QualType = .{ ._index = .int_char };
114 pub const schar: QualType = .{ ._index = .int_schar };
115 pub const uchar: QualType = .{ ._index = .int_uchar };
116 pub const short: QualType = .{ ._index = .int_short };
117 pub const ushort: QualType = .{ ._index = .int_ushort };
118 pub const int: QualType = .{ ._index = .int_int };
119 pub const uint: QualType = .{ ._index = .int_uint };
120 pub const long: QualType = .{ ._index = .int_long };
121 pub const ulong: QualType = .{ ._index = .int_ulong };
122 pub const long_long: QualType = .{ ._index = .int_long_long };
123 pub const ulong_long: QualType = .{ ._index = .int_ulong_long };
124 pub const int128: QualType = .{ ._index = .int_int128 };
125 pub const uint128: QualType = .{ ._index = .int_uint128 };
126 pub const fp16: QualType = .{ ._index = .float_fp16 };
127 pub const float16: QualType = .{ ._index = .float_float16 };
128 pub const float: QualType = .{ ._index = .float_float };
129 pub const double: QualType = .{ ._index = .float_double };
130 pub const long_double: QualType = .{ ._index = .float_long_double };
131 pub const float128: QualType = .{ ._index = .float_float128 };
132 pub const void_pointer: QualType = .{ ._index = .void_pointer };
133 pub const char_pointer: QualType = .{ ._index = .char_pointer };
134 pub const int_pointer: QualType = .{ ._index = .int_pointer };
135
136 pub fn isInvalid(qt: QualType) bool {
137 return qt._index == .invalid;
138 }
139
140 pub fn isAutoType(qt: QualType) bool {
141 return qt._index == .auto_type;
142 }
143
144 pub fn isC23Auto(qt: QualType) bool {
145 return qt._index == .c23_auto;
146 }
147
148 pub fn isQualified(qt: QualType) bool {
149 return qt.@"const" or qt.@"volatile" or qt.restrict;
150 }
151
152 pub fn unqualified(qt: QualType) QualType {
153 return .{ ._index = qt._index };
154 }
155
156 pub fn withQualifiers(target: QualType, quals_from: QualType) QualType {
157 return .{
158 ._index = target._index,
159 .@"const" = quals_from.@"const",
160 .@"volatile" = quals_from.@"volatile",
161 .restrict = quals_from.restrict,
162 };
163 }
164
165 pub fn @"type"(qt: QualType, comp: *const Compilation) Type {
166 switch (qt._index) {
167 .invalid => unreachable,
168 .auto_type => unreachable,
169 .c23_auto => unreachable,
170 .declarator_combine => unreachable,
171 .void => return .void,
172 .bool => return .bool,
173 .nullptr_t => return .nullptr_t,
174 .int_char => return .{ .int = .char },
175 .int_schar => return .{ .int = .schar },
176 .int_uchar => return .{ .int = .uchar },
177 .int_short => return .{ .int = .short },
178 .int_ushort => return .{ .int = .ushort },
179 .int_int => return .{ .int = .int },
180 .int_uint => return .{ .int = .uint },
181 .int_long => return .{ .int = .long },
182 .int_ulong => return .{ .int = .ulong },
183 .int_long_long => return .{ .int = .long_long },
184 .int_ulong_long => return .{ .int = .ulong_long },
185 .int_int128 => return .{ .int = .int128 },
186 .int_uint128 => return .{ .int = .uint128 },
187 .float_fp16 => return .{ .float = .fp16 },
188 .float_float16 => return .{ .float = .float16 },
189 .float_float => return .{ .float = .float },
190 .float_double => return .{ .float = .double },
191 .float_long_double => return .{ .float = .long_double },
192 .float_float128 => return .{ .float = .float128 },
193 .void_pointer => return .{ .pointer = .{ .child = .void, .decayed = null } },
194 .char_pointer => return .{ .pointer = .{ .child = .char, .decayed = null } },
195 .int_pointer => return .{ .pointer = .{ .child = .int, .decayed = null } },
196
197 else => {},
198 }
199
200 const repr = comp.type_store.types.get(@intFromEnum(qt._index));
201 return switch (repr.tag) {
202 .complex => .{ .complex = @bitCast(repr.data[0]) },
203 .atomic => .{ .atomic = @bitCast(repr.data[0]) },
204 .bit_int => .{ .bit_int = .{
205 .bits = @intCast(repr.data[0]),
206 .signedness = @enumFromInt(repr.data[1]),
207 } },
208 .func_zero => .{ .func = .{
209 .return_type = @bitCast(repr.data[0]),
210 .kind = .normal,
211 .params = &.{},
212 } },
213 .func_variadic_zero => .{ .func = .{
214 .return_type = @bitCast(repr.data[0]),
215 .kind = .variadic,
216 .params = &.{},
217 } },
218 .func_old_style_zero => .{ .func = .{
219 .return_type = @bitCast(repr.data[0]),
220 .kind = .old_style,
221 .params = &.{},
222 } },
223 .func_one,
224 .func_variadic_one,
225 .func_old_style_one,
226 .func,
227 .func_variadic,
228 .func_old_style,
229 => {
230 const param_size = 4;
231 comptime std.debug.assert(@sizeOf(Type.Func.Param) == @sizeOf(u32) * param_size);
232
233 const extra = comp.type_store.extra.items;
234 const params_len = switch (repr.tag) {
235 .func_one, .func_variadic_one, .func_old_style_one => 1,
236 .func, .func_variadic, .func_old_style => extra[repr.data[1]],
237 else => unreachable,
238 };
239 const extra_params = extra[repr.data[1] + @intFromBool(params_len > 1) ..][0 .. params_len * param_size];
240
241 return .{ .func = .{
242 .return_type = @bitCast(repr.data[0]),
243 .kind = switch (repr.tag) {
244 .func_one, .func => .normal,
245 .func_variadic_one, .func_variadic => .variadic,
246 .func_old_style_one, .func_old_style => .old_style,
247 else => unreachable,
248 },
249 .params = std.mem.bytesAsSlice(Type.Func.Param, std.mem.sliceAsBytes(extra_params)),
250 } };
251 },
252 .pointer => .{ .pointer = .{
253 .child = @bitCast(repr.data[0]),
254 .decayed = null,
255 } },
256 .pointer_decayed => .{ .pointer = .{
257 .child = @bitCast(repr.data[0]),
258 .decayed = @bitCast(repr.data[1]),
259 } },
260 .array_incomplete => .{ .array = .{
261 .elem = @bitCast(repr.data[0]),
262 .len = .incomplete,
263 } },
264 .array_fixed => .{ .array = .{
265 .elem = @bitCast(repr.data[0]),
266 .len = .{ .fixed = @bitCast(comp.type_store.extra.items[repr.data[1]..][0..2].*) },
267 } },
268 .array_static => .{ .array = .{
269 .elem = @bitCast(repr.data[0]),
270 .len = .{ .static = @bitCast(comp.type_store.extra.items[repr.data[1]..][0..2].*) },
271 } },
272 .array_variable => .{ .array = .{
273 .elem = @bitCast(repr.data[0]),
274 .len = .{ .variable = @enumFromInt(repr.data[1]) },
275 } },
276 .array_unspecified_variable => .{ .array = .{
277 .elem = @bitCast(repr.data[0]),
278 .len = .unspecified_variable,
279 } },
280 .vector => .{ .vector = .{
281 .elem = @bitCast(repr.data[0]),
282 .len = repr.data[1],
283 } },
284 .@"struct", .@"union" => {
285 const layout_size = 5;
286 comptime std.debug.assert(@sizeOf(Type.Record.Layout) == @sizeOf(u32) * layout_size);
287 const field_size = 10;
288 comptime std.debug.assert(@sizeOf(Type.Record.Field) == @sizeOf(u32) * field_size);
289
290 const extra = comp.type_store.extra.items;
291 const layout = @as(*Type.Record.Layout, @ptrCast(extra[repr.data[1] + 1 ..][0..layout_size])).*;
292 const fields_len = extra[repr.data[1] + layout_size + 1];
293 const extra_fields = extra[repr.data[1] + layout_size + 2 ..][0 .. fields_len * field_size];
294
295 const record: Type.Record = .{
296 .name = @enumFromInt(repr.data[0]),
297 .decl_node = @enumFromInt(extra[repr.data[1]]),
298 .layout = layout,
299 .fields = std.mem.bytesAsSlice(Type.Record.Field, std.mem.sliceAsBytes(extra_fields)),
300 };
301 return switch (repr.tag) {
302 .@"struct" => .{ .@"struct" = record },
303 .@"union" => .{ .@"union" = record },
304 else => unreachable,
305 };
306 },
307 .struct_incomplete => .{ .@"struct" = .{
308 .name = @enumFromInt(repr.data[0]),
309 .decl_node = @enumFromInt(repr.data[1]),
310 .layout = null,
311 .fields = &.{},
312 } },
313 .union_incomplete => .{ .@"union" = .{
314 .name = @enumFromInt(repr.data[0]),
315 .decl_node = @enumFromInt(repr.data[1]),
316 .layout = null,
317 .fields = &.{},
318 } },
319 .@"enum", .enum_fixed => {
320 const extra = comp.type_store.extra.items;
321 const field_size = 3;
322 comptime std.debug.assert(@sizeOf(Type.Enum.Field) == @sizeOf(u32) * field_size);
323
324 const fields_len = extra[repr.data[1] + 2];
325 const extra_fields = extra[repr.data[1] + 3 ..][0 .. fields_len * field_size];
326
327 return .{ .@"enum" = .{
328 .name = @enumFromInt(extra[repr.data[1]]),
329 .decl_node = @enumFromInt(extra[repr.data[1] + 1]),
330 .tag = @bitCast(repr.data[0]),
331 .incomplete = false,
332 .fixed = repr.tag == .enum_fixed,
333 .fields = std.mem.bytesAsSlice(Type.Enum.Field, std.mem.sliceAsBytes(extra_fields)),
334 } };
335 },
336 .enum_incomplete => .{
337 .@"enum" = .{
338 .tag = null,
339 .name = @enumFromInt(repr.data[0]),
340 .decl_node = @enumFromInt(repr.data[1]),
341 .incomplete = true,
342 .fixed = false,
343 .fields = &.{},
344 },
345 },
346 .enum_incomplete_fixed => .{
347 .@"enum" = .{
348 .tag = @bitCast(repr.data[0]),
349 .name = @enumFromInt(comp.type_store.extra.items[repr.data[1]]),
350 .decl_node = @enumFromInt(comp.type_store.extra.items[repr.data[1] + 1]),
351 .incomplete = true,
352 .fixed = true,
353 .fields = &.{},
354 },
355 },
356 .typeof => .{ .typeof = .{
357 .base = @bitCast(repr.data[0]),
358 .expr = null,
359 } },
360 .typeof_expr => .{ .typeof = .{
361 .base = @bitCast(repr.data[0]),
362 .expr = @enumFromInt(repr.data[1]),
363 } },
364 .typedef => .{ .typedef = .{
365 .base = @bitCast(repr.data[0]),
366 .name = @enumFromInt(comp.type_store.extra.items[repr.data[1]]),
367 .decl_node = @enumFromInt(comp.type_store.extra.items[repr.data[1] + 1]),
368 } },
369 .attributed => {
370 const extra = comp.type_store.extra.items;
371 return .{ .attributed = .{
372 .base = @bitCast(repr.data[0]),
373 .attributes = comp.type_store.attributes.items[extra[repr.data[1]]..][0..extra[repr.data[1] + 1]],
374 } };
375 },
376 .attributed_one => .{ .attributed = .{
377 .base = @bitCast(repr.data[0]),
378 .attributes = comp.type_store.attributes.items[repr.data[1]..][0..1],
379 } },
380 };
381 }
382
383 pub fn base(qt: QualType, comp: *const Compilation) struct { type: Type, qt: QualType } {
384 var cur = qt;
385 while (true) switch (cur.type(comp)) {
386 .typeof => |typeof| cur = typeof.base,
387 .typedef => |typedef| cur = typedef.base,
388 .attributed => |attributed| cur = attributed.base,
389 else => |ty| return .{ .type = ty, .qt = cur },
390 };
391 }
392
393 pub fn getRecord(qt: QualType, comp: *const Compilation) ?Type.Record {
394 return switch (qt.base(comp).type) {
395 .@"struct", .@"union" => |record| record,
396 else => null,
397 };
398 }
399
400 pub fn get(qt: QualType, comp: *const Compilation, comptime tag: std.meta.Tag(Type)) ?@FieldType(Type, @tagName(tag)) {
401 comptime std.debug.assert(tag != .typeof and tag != .attributed and tag != .typedef);
402 switch (qt._index) {
403 .invalid, .auto_type, .c23_auto => return null,
404 else => {},
405 }
406
407 const base_type = qt.base(comp).type;
408 if (base_type == tag) return @field(base_type, @tagName(tag));
409 return null;
410 }
411
412 pub fn is(qt: QualType, comp: *const Compilation, comptime tag: std.meta.Tag(Type)) bool {
413 return qt.get(comp, tag) != null;
414 }
415
416 pub fn childType(qt: QualType, comp: *const Compilation) QualType {
417 if (qt.isInvalid()) return .invalid;
418 return switch (qt.base(comp).type) {
419 .complex => |complex| complex,
420 .pointer => |pointer| pointer.child,
421 .array => |array| array.elem,
422 .vector => |vector| vector.elem,
423 else => unreachable,
424 };
425 }
426
427 pub fn arrayLen(qt: QualType, comp: *Compilation) ?u64 {
428 const array_type = switch (qt.base(comp).type) {
429 .array => |array| array,
430 .pointer => |pointer| blk: {
431 const decayed = pointer.decayed orelse return null;
432 break :blk decayed.get(comp, .array) orelse return null;
433 },
434 else => return null,
435 };
436 switch (array_type.len) {
437 .fixed, .static => |len| return len,
438 else => return null,
439 }
440 }
441
442 pub const TypeSizeOrder = enum { lt, gt, eq, indeterminate };
443
444 pub fn sizeCompare(a: QualType, b: QualType, comp: *const Compilation) TypeSizeOrder {
445 const a_size = a.sizeofOrNull(comp) orelse return .indeterminate;
446 const b_size = b.sizeofOrNull(comp) orelse return .indeterminate;
447 return switch (std.math.order(a_size, b_size)) {
448 .lt => .lt,
449 .gt => .gt,
450 .eq => .eq,
451 };
452 }
453
454 /// Size of a type as reported by the sizeof operator.
455 pub fn sizeof(qt: QualType, comp: *const Compilation) u64 {
456 return qt.sizeofOrNull(comp).?;
457 }
458
459 /// Size of a type as reported by the sizeof operator.
460 /// Returns null for incomplete types.
461 pub fn sizeofOrNull(qt: QualType, comp: *const Compilation) ?u64 {
462 if (qt.isInvalid()) return null;
463 return loop: switch (qt.base(comp).type) {
464 .void => 1,
465 .bool => 1,
466 .func => 1,
467 .nullptr_t, .pointer => comp.target.ptrBitWidth() / 8,
468 .int => |int_ty| int_ty.bits(comp) / 8,
469 .float => |float_ty| float_ty.bits(comp) / 8,
470 .complex => |complex| complex.sizeofOrNull(comp),
471 .bit_int => |bit_int| {
472 return std.mem.alignForward(u64, (@as(u32, bit_int.bits) + 7) / 8, qt.alignof(comp));
473 },
474 .atomic => |atomic| atomic.sizeofOrNull(comp),
475 .vector => |vector| {
476 const elem_size = vector.elem.sizeofOrNull(comp) orelse return null;
477 return elem_size * vector.len;
478 },
479 .array => |array| {
480 const len = switch (array.len) {
481 .variable, .unspecified_variable => return null,
482 .incomplete => {
483 return if (comp.langopts.emulate == .msvc) 0 else null;
484 },
485 .fixed, .static => |len| len,
486 };
487 const elem_size = array.elem.sizeofOrNull(comp) orelse return null;
488 const arr_size = elem_size * len;
489 if (comp.langopts.emulate == .msvc) {
490 // msvc ignores array type alignment.
491 // Since the size might not be a multiple of the field
492 // alignment, the address of the second element might not be properly aligned
493 // for the field alignment. A flexible array has size 0. See test case 0018.
494 return arr_size;
495 } else {
496 return std.mem.alignForward(u64, arr_size, qt.alignof(comp));
497 }
498 },
499 .@"struct", .@"union" => |record| {
500 const layout = record.layout orelse return null;
501 return layout.size_bits / 8;
502 },
503 .@"enum" => |enum_ty| {
504 const tag = enum_ty.tag orelse return null;
505 continue :loop tag.base(comp).type;
506 },
507 .typeof => unreachable,
508 .typedef => unreachable,
509 .attributed => unreachable,
510 };
511 }
512
513 /// Size of type in bits as it would have in a bitfield.
514 pub fn bitSizeof(qt: QualType, comp: *const Compilation) u64 {
515 return qt.bitSizeofOrNull(comp).?;
516 }
517
518 /// Size of type in bits as it would have in a bitfield.
519 /// Returns null for incomplete types.
520 pub fn bitSizeofOrNull(qt: QualType, comp: *const Compilation) ?u64 {
521 if (qt.isInvalid()) return null;
522 return loop: switch (qt.base(comp).type) {
523 .bool => if (comp.langopts.emulate == .msvc) 8 else 1,
524 .bit_int => |bit_int| bit_int.bits,
525 .float => |float_ty| float_ty.bits(comp),
526 .int => |int_ty| int_ty.bits(comp),
527 .nullptr_t, .pointer => comp.target.ptrBitWidth(),
528 .atomic => |atomic| continue :loop atomic.base(comp).type,
529 .complex => |complex| {
530 const child_size = complex.bitSizeofOrNull(comp) orelse return null;
531 return child_size * 2;
532 },
533 else => 8 * (qt.sizeofOrNull(comp) orelse return null),
534 };
535 }
536
537 pub fn hasIncompleteSize(qt: QualType, comp: *const Compilation) bool {
538 if (qt.isInvalid()) return false;
539 return switch (qt.base(comp).type) {
540 .void => true,
541 .array => |array| array.len == .incomplete,
542 .@"enum" => |enum_ty| enum_ty.incomplete and !enum_ty.fixed,
543 .@"struct", .@"union" => |record| record.layout == null,
544 else => false,
545 };
546 }
547
548 pub fn signedness(qt: QualType, comp: *const Compilation) std.builtin.Signedness {
549 return loop: switch (qt.base(comp).type) {
550 .complex => |complex| continue :loop complex.base(comp).type,
551 .atomic => |atomic| continue :loop atomic.base(comp).type,
552 .bool => .unsigned,
553 .bit_int => |bit_int| bit_int.signedness,
554 .int => |int_ty| switch (int_ty) {
555 .char => comp.getCharSignedness(),
556 .schar, .short, .int, .long, .long_long, .int128 => .signed,
557 .uchar, .ushort, .uint, .ulong, .ulong_long, .uint128 => .unsigned,
558 },
559 // Pointer values are signed.
560 .pointer, .nullptr_t => .signed,
561 .@"enum" => .signed,
562 else => unreachable,
563 };
564 }
565
566 /// Size of a type as reported by the alignof operator.
567 pub fn alignof(qt: QualType, comp: *const Compilation) u32 {
568 if (qt.requestedAlignment(comp)) |requested| request: {
569 if (qt.is(comp, .@"enum")) {
570 if (comp.langopts.emulate == .gcc) {
571 // gcc does not respect alignment on enums
572 break :request;
573 }
574 } else if (qt.getRecord(comp)) |record_ty| {
575 const layout = record_ty.layout orelse return 0;
576
577 // don't return the attribute for records
578 // layout has already accounted for requested alignment
579 const computed = @divExact(layout.field_alignment_bits, 8);
580 return @max(requested, computed);
581 } else if (comp.langopts.emulate == .msvc) {
582 const type_align = qt.base(comp).qt.alignof(comp);
583 return @max(requested, type_align);
584 }
585 return requested;
586 }
587
588 return loop: switch (qt.base(comp).type) {
589 .void => 1,
590 .bool => 1,
591 .int => |int_ty| switch (int_ty) {
592 .char,
593 .schar,
594 .uchar,
595 => 1,
596 .short => comp.target.cTypeAlignment(.short),
597 .ushort => comp.target.cTypeAlignment(.ushort),
598 .int => comp.target.cTypeAlignment(.int),
599 .uint => comp.target.cTypeAlignment(.uint),
600
601 .long => comp.target.cTypeAlignment(.long),
602 .ulong => comp.target.cTypeAlignment(.ulong),
603 .long_long => comp.target.cTypeAlignment(.longlong),
604 .ulong_long => comp.target.cTypeAlignment(.ulonglong),
605 .int128, .uint128 => if (comp.target.cpu.arch == .s390x and comp.target.os.tag == .linux and comp.target.abi.isGnu()) 8 else 16,
606 },
607 .float => |float_ty| switch (float_ty) {
608 .float => comp.target.cTypeAlignment(.float),
609 .double => comp.target.cTypeAlignment(.double),
610 .long_double => comp.target.cTypeAlignment(.longdouble),
611 .fp16, .float16 => 2,
612 .float128 => 16,
613 },
614 .bit_int => |bit_int| {
615 // https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2709.pdf
616 // _BitInt(N) types align with existing calling conventions. They have the same size and alignment as the
617 // smallest basic type that can contain them. Types that are larger than __int64_t are conceptually treated
618 // as struct of register size chunks. The number of chunks is the smallest number that can contain the type.
619 if (bit_int.bits > 64) return 8;
620 const basic_type = comp.intLeastN(bit_int.bits, bit_int.signedness);
621 return basic_type.alignof(comp);
622 },
623 .atomic => |atomic| continue :loop atomic.base(comp).type,
624 .complex => |complex| continue :loop complex.base(comp).type,
625
626 .pointer, .nullptr_t => switch (comp.target.cpu.arch) {
627 .avr => 1,
628 else => comp.target.ptrBitWidth() / 8,
629 },
630
631 .func => target_util.defaultFunctionAlignment(comp.target),
632
633 .array => |array| continue :loop array.elem.base(comp).type,
634 .vector => |vector| continue :loop vector.elem.base(comp).type,
635
636 .@"struct", .@"union" => |record| {
637 const layout = record.layout orelse return 0;
638 return layout.field_alignment_bits / 8;
639 },
640 .@"enum" => |enum_ty| {
641 const tag = enum_ty.tag orelse return 0;
642 continue :loop tag.base(comp).type;
643 },
644 .typeof => unreachable,
645 .typedef => unreachable,
646 .attributed => unreachable,
647 };
648 }
649
650 /// Suffix for integer values of this type
651 pub fn intValueSuffix(qt: QualType, comp: *const Compilation) []const u8 {
652 return switch (qt.get(comp, .int).?) {
653 .short, .int => "",
654 .long => "L",
655 .long_long => "LL",
656 .schar, .uchar, .char => {
657 // Only 8-bit char supported currently;
658 // TODO: handle platforms with 16-bit int + 16-bit char
659 std.debug.assert(qt.sizeof(comp) == 1);
660 return "";
661 },
662 .ushort => {
663 if (qt.sizeof(comp) < int.sizeof(comp)) {
664 return "";
665 }
666 return "U";
667 },
668 .uint => "U",
669 .ulong => "UL",
670 .ulong_long => "ULL",
671 else => unreachable, // TODO
672 };
673 }
674
675 /// printf format modifier
676 pub fn formatModifier(qt: QualType, comp: *const Compilation) []const u8 {
677 return switch (qt.get(comp, .int).?) {
678 .schar, .uchar => "hh",
679 .short, .ushort => "h",
680 .int, .uint => "",
681 .long, .ulong => "l",
682 .long_long, .ulong_long => "ll",
683 else => unreachable, // TODO
684 };
685 }
686
687 /// Make real int type unsigned.
688 /// Discards attributes.
689 pub fn makeIntUnsigned(qt: QualType, comp: *Compilation) !QualType {
690 switch (qt.base(comp).type) {
691 .int => |kind| switch (kind) {
692 .char => return .uchar,
693 .schar => return .uchar,
694 .uchar => return .uchar,
695 .short => return .ushort,
696 .ushort => return .ushort,
697 .int => return .uint,
698 .uint => return .uint,
699 .long => return .ulong,
700 .ulong => return .ulong,
701 .long_long => return .ulong_long,
702 .ulong_long => return .ulong_long,
703 .int128 => return .uint128,
704 .uint128 => return .uint128,
705 },
706 .bit_int => |bit_int| {
707 return try comp.type_store.put(comp.gpa, .{ .bit_int = .{
708 .signedness = .unsigned,
709 .bits = bit_int.bits,
710 } });
711 },
712 else => unreachable,
713 }
714 }
715
716 pub fn toReal(qt: QualType, comp: *const Compilation) QualType {
717 return switch (qt.base(comp).type) {
718 .complex => |complex| complex,
719 else => qt,
720 };
721 }
722
723 pub fn toComplex(qt: QualType, comp: *Compilation) !QualType {
724 if (std.debug.runtime_safety) {
725 switch (qt.base(comp).type) {
726 .complex => unreachable,
727 .float => |float_ty| if (float_ty == .fp16) unreachable,
728 .int, .bit_int => {},
729 else => unreachable,
730 }
731 }
732 return comp.type_store.put(comp.gpa, .{ .complex = qt });
733 }
734
735 pub fn decay(qt: QualType, comp: *Compilation) !QualType {
736 if (qt.isInvalid()) return .invalid;
737 switch (qt.base(comp).type) {
738 .array => |array_ty| {
739 // Copy const and volatile to the element
740 var elem_qt = array_ty.elem;
741 elem_qt.@"const" = qt.@"const" or elem_qt.@"const";
742 elem_qt.@"volatile" = qt.@"volatile" or elem_qt.@"volatile";
743
744 var pointer_qt = try comp.type_store.put(comp.gpa, .{ .pointer = .{
745 .child = elem_qt,
746 .decayed = qt,
747 } });
748
749 // .. and restrict to the pointer.
750 pointer_qt.restrict = qt.restrict or array_ty.elem.restrict;
751 return pointer_qt;
752 },
753 .func => |func_ty| {
754 if (func_ty.return_type.isInvalid()) {
755 return .invalid;
756 }
757 for (func_ty.params) |param| {
758 if (param.qt.isInvalid()) {
759 return .invalid;
760 }
761 }
762
763 return comp.type_store.put(comp.gpa, .{ .pointer = .{
764 .child = qt,
765 .decayed = null,
766 } });
767 },
768 else => return qt,
769 }
770 }
771
772 /// Rank for floating point conversions, ignoring domain (complex vs real)
773 /// Asserts that ty is a floating point type
774 pub fn floatRank(qt: QualType, comp: *const Compilation) usize {
775 return loop: switch (qt.base(comp).type) {
776 .float => |float_ty| switch (float_ty) {
777 // TODO: bfloat16 => 0
778 .float16 => 1,
779 .fp16 => 2,
780 .float => 3,
781 .double => 4,
782 .long_double => 5,
783 .float128 => 6,
784 // TODO: ibm128 => 7
785 },
786 .complex => |complex| continue :loop complex.base(comp).type,
787 .atomic => |atomic| continue :loop atomic.base(comp).type,
788 else => unreachable,
789 };
790 }
791
792 /// Rank for integer conversions, ignoring domain (complex vs real)
793 /// Asserts that ty is an integer type
794 pub fn intRank(qt: QualType, comp: *const Compilation) usize {
795 return loop: switch (qt.base(comp).type) {
796 .bit_int => |bit_int| @as(usize, bit_int.bits) * 8,
797 .bool => 1 + @as(usize, @intCast((QualType.bool.bitSizeof(comp) * 8))),
798 .int => |int_ty| switch (int_ty) {
799 .char, .schar, .uchar => 2 + (int_ty.bits(comp) * 8),
800 .short, .ushort => 3 + (int_ty.bits(comp) * 8),
801 .int, .uint => 4 + (int_ty.bits(comp) * 8),
802 .long, .ulong => 5 + (int_ty.bits(comp) * 8),
803 .long_long, .ulong_long => 6 + (int_ty.bits(comp) * 8),
804 .int128, .uint128 => 7 + (int_ty.bits(comp) * 8),
805 },
806 .complex => |complex| continue :loop complex.base(comp).type,
807 .atomic => |atomic| continue :loop atomic.base(comp).type,
808 .@"enum" => |enum_ty| continue :loop enum_ty.tag.?.base(comp).type,
809 else => unreachable,
810 };
811 }
812
813 pub fn intRankOrder(a: QualType, b: QualType, comp: *const Compilation) std.math.Order {
814 std.debug.assert(a.isInt(comp) and b.isInt(comp));
815
816 const a_unsigned = a.signedness(comp) == .unsigned;
817 const b_unsigned = b.signedness(comp) == .unsigned;
818
819 const a_rank = a.intRank(comp);
820 const b_rank = b.intRank(comp);
821 if (a_unsigned == b_unsigned) {
822 return std.math.order(a_rank, b_rank);
823 }
824 if (a_unsigned) {
825 if (a_rank >= b_rank) return .gt;
826 return .lt;
827 }
828 std.debug.assert(b_unsigned);
829 if (b_rank >= a_rank) return .lt;
830 return .gt;
831 }
832
833 /// Returns true if `a` and `b` are integer types that differ only in sign
834 pub fn sameRankDifferentSign(a: QualType, b: QualType, comp: *const Compilation) bool {
835 if (!a.isInt(comp) or !b.isInt(comp)) return false;
836 if (a.hasIncompleteSize(comp) or b.hasIncompleteSize(comp)) return false;
837 if (a.intRank(comp) != b.intRank(comp)) return false;
838 return a.signedness(comp) != b.signedness(comp);
839 }
840
841 pub fn promoteInt(qt: QualType, comp: *const Compilation) QualType {
842 return loop: switch (qt.base(comp).type) {
843 .bool => return .int,
844 .@"enum" => |enum_ty| if (enum_ty.tag) |tag| {
845 continue :loop tag.base(comp).type;
846 } else return .int,
847 .bit_int => return qt,
848 .complex => return qt, // Assume complex integer type
849 .int => |int_ty| switch (int_ty) {
850 .char, .schar, .uchar, .short => .int,
851 .ushort => if (Type.Int.uchar.bits(comp) == Type.Int.int.bits(comp)) .uint else .int,
852 else => return qt,
853 },
854 .atomic => |atomic| continue :loop atomic.base(comp).type,
855 else => unreachable, // Not an integer type
856 };
857 }
858
859 /// Promote a bitfield. If `int` can hold all the values of the underlying field,
860 /// promote to int. Otherwise, promote to unsigned int
861 /// Returns null if no promotion is necessary
862 pub fn promoteBitfield(qt: QualType, comp: *const Compilation, width: u32) ?QualType {
863 const type_size_bits = qt.bitSizeof(comp);
864
865 // Note: GCC and clang will promote `long: 3` to int even though the C standard does not allow this
866 if (width < type_size_bits) {
867 return .int;
868 }
869
870 if (width == type_size_bits) {
871 return if (qt.signedness(comp) == .unsigned) .uint else .int;
872 }
873
874 return null;
875 }
876
877 pub const ScalarKind = enum {
878 @"enum",
879 bool,
880 int,
881 float,
882 pointer,
883 nullptr_t,
884 void_pointer,
885 complex_int,
886 complex_float,
887 none,
888
889 pub fn isInt(sk: ScalarKind) bool {
890 return switch (sk) {
891 .bool, .@"enum", .int, .complex_int => true,
892 else => false,
893 };
894 }
895
896 pub fn isFloat(sk: ScalarKind) bool {
897 return switch (sk) {
898 .float, .complex_float => true,
899 else => false,
900 };
901 }
902
903 pub fn isReal(sk: ScalarKind) bool {
904 return switch (sk) {
905 .complex_int, .complex_float => false,
906 else => true,
907 };
908 }
909
910 pub fn isPointer(sk: ScalarKind) bool {
911 return switch (sk) {
912 .pointer, .void_pointer => true,
913 else => false,
914 };
915 }
916
917 /// Equivalent to isInt() or isFloat()
918 pub fn isArithmetic(sk: ScalarKind) bool {
919 return switch (sk) {
920 .bool, .@"enum", .int, .complex_int, .float, .complex_float => true,
921 else => false,
922 };
923 }
924 };
925
926 pub fn scalarKind(qt: QualType, comp: *const Compilation) ScalarKind {
927 loop: switch (qt.base(comp).type) {
928 .bool => return .bool,
929 .int, .bit_int => return .int,
930 .float => return .float,
931 .nullptr_t => return .nullptr_t,
932 .pointer => |pointer| switch (pointer.child.base(comp).type) {
933 .void => return .void_pointer,
934 else => return .pointer,
935 },
936 .@"enum" => return .@"enum",
937 .complex => |complex| switch (complex.base(comp).type) {
938 .int, .bit_int => return .complex_int,
939 .float => return .complex_float,
940 else => unreachable,
941 },
942 .atomic => |atomic| continue :loop atomic.base(comp).type,
943 else => return .none,
944 }
945 }
946
947 // Prefer calling scalarKind directly if checking multiple kinds.
948 pub fn isInt(qt: QualType, comp: *const Compilation) bool {
949 return qt.scalarKind(comp).isInt();
950 }
951
952 pub fn isRealInt(qt: QualType, comp: *const Compilation) bool {
953 const sk = qt.scalarKind(comp);
954 return sk.isInt() and sk.isReal();
955 }
956
957 // Prefer calling scalarKind directly if checking multiple kinds.
958 pub fn isFloat(qt: QualType, comp: *const Compilation) bool {
959 return qt.scalarKind(comp).isFloat();
960 }
961
962 // Prefer calling scalarKind directly if checking multiple kinds.
963 pub fn isPointer(qt: QualType, comp: *const Compilation) bool {
964 return qt.scalarKind(comp).isPointer();
965 }
966
967 pub fn eqlQualified(a_qt: QualType, b_qt: QualType, comp: *const Compilation) bool {
968 if (a_qt.@"const" != b_qt.@"const") return false;
969 if (a_qt.@"volatile" != b_qt.@"volatile") return false;
970 if (a_qt.restrict != b_qt.restrict) return false;
971
972 return a_qt.eql(b_qt, comp);
973 }
974
975 pub fn eql(a_qt: QualType, b_qt: QualType, comp: *const Compilation) bool {
976 if (a_qt.isInvalid() or b_qt.isInvalid()) return false;
977 if (a_qt._index == b_qt._index) return true;
978
979 const a_type_qt = a_qt.base(comp);
980 const a_type = a_type_qt.type;
981 const b_type_qt = b_qt.base(comp);
982 const b_type = b_type_qt.type;
983
984 // Alignment check also guards against comparing incomplete enums to ints.
985 if (a_type_qt.qt.alignof(comp) != b_type_qt.qt.alignof(comp)) return false;
986 if (a_type == .@"enum" and b_type != .@"enum") {
987 return a_type.@"enum".tag.?.eql(b_qt, comp);
988 } else if (a_type != .@"enum" and b_type == .@"enum") {
989 return b_type.@"enum".tag.?.eql(a_qt, comp);
990 }
991
992 if (std.meta.activeTag(a_type) != b_type) return false;
993 switch (a_type) {
994 .void => return true,
995 .bool => return true,
996 .nullptr_t => return true,
997 .int => |a_int| return a_int == b_type.int,
998 .float => |a_float| return a_float == b_type.float,
999 .complex => |a_complex| {
1000 const b_complex = b_type.complex;
1001 // Complex child type cannot be qualified.
1002 return a_complex.eql(b_complex, comp);
1003 },
1004 .bit_int => |a_bit_int| {
1005 const b_bit_int = b_type.bit_int;
1006 if (a_bit_int.bits != b_bit_int.bits) return false;
1007 if (a_bit_int.signedness != b_bit_int.signedness) return false;
1008 return true;
1009 },
1010 .atomic => |a_atomic| {
1011 const b_atomic = b_type.atomic;
1012 // Atomic child type cannot be qualified.
1013 return a_atomic.eql(b_atomic, comp);
1014 },
1015 .func => |a_func| {
1016 const b_func = b_type.func;
1017
1018 // Function return type cannot be qualified.
1019 if (!a_func.return_type.eql(b_func.return_type, comp)) return false;
1020
1021 if (a_func.params.len == 0 and b_func.params.len == 0) {
1022 return (a_func.kind == .variadic) == (b_func.kind == .variadic);
1023 }
1024
1025 if (a_func.params.len != b_func.params.len) {
1026 if (a_func.kind == .old_style and b_func.kind == .old_style) return true;
1027 if (a_func.kind == .old_style or b_func.kind == .old_style) {
1028 const maybe_has_params = if (a_func.kind == .old_style) b_func else a_func;
1029
1030 // Check if any args undergo default argument promotion.
1031 for (maybe_has_params.params) |param| {
1032 switch (param.qt.base(comp).type) {
1033 .bool => return false,
1034 .int => |int_ty| switch (int_ty) {
1035 .char, .uchar, .schar => return false,
1036 else => {},
1037 },
1038 .float => |float_ty| if (float_ty != .double) return false,
1039 .@"enum" => |enum_ty| {
1040 if (comp.langopts.emulate == .clang and enum_ty.incomplete) return false;
1041 },
1042 else => {},
1043 }
1044 }
1045 return true;
1046 }
1047 return false;
1048 }
1049
1050 if ((a_func.kind == .normal) != (b_func.kind == .normal)) return false;
1051
1052 for (a_func.params, b_func.params) |a_param, b_param| {
1053 // Function parameters cannot be qualified.
1054 if (!a_param.qt.eql(b_param.qt, comp)) return false;
1055 }
1056 return true;
1057 },
1058 .pointer => |a_pointer| {
1059 const b_pointer = b_type.pointer;
1060 return a_pointer.child.eqlQualified(b_pointer.child, comp);
1061 },
1062 .array => |a_array| {
1063 const b_array = b_type.array;
1064 const a_len = switch (a_array.len) {
1065 .fixed, .static => |len| len,
1066 else => null,
1067 };
1068 const b_len = switch (b_array.len) {
1069 .fixed, .static => |len| len,
1070 else => null,
1071 };
1072 if (a_len != null and b_len != null) {
1073 return a_len.? == b_len.?;
1074 }
1075
1076 // Array element qualifiers are ignored.
1077 return a_array.elem.eql(b_array.elem, comp);
1078 },
1079 .vector => |a_vector| {
1080 const b_vector = b_type.vector;
1081 if (a_vector.len != b_vector.len) return false;
1082
1083 // Vector elemnent qualifiers are checked.
1084 return a_vector.elem.eqlQualified(b_vector.elem, comp);
1085 },
1086 .@"struct", .@"union", .@"enum" => return a_type_qt.qt._index == b_type_qt.qt._index,
1087
1088 .typeof => unreachable, // Never returned from base()
1089 .typedef => unreachable, // Never returned from base()
1090 .attributed => unreachable, // Never returned from base()
1091 }
1092 }
1093
1094 pub fn getAttribute(qt: QualType, comp: *const Compilation, comptime tag: Attribute.Tag) ?Attribute.ArgumentsForTag(tag) {
1095 if (tag == .aligned) @compileError("use requestedAlignment");
1096 var it = Attribute.Iterator.initType(qt, comp);
1097 while (it.next()) |item| {
1098 const attribute, _ = item;
1099 if (attribute.tag == tag) return @field(attribute.args, @tagName(tag));
1100 }
1101 return null;
1102 }
1103
1104 pub fn hasAttribute(qt: QualType, comp: *const Compilation, tag: Attribute.Tag) bool {
1105 var it = Attribute.Iterator.initType(qt, comp);
1106 while (it.next()) |item| {
1107 const attr, _ = item;
1108 if (attr.tag == tag) return true;
1109 }
1110 return false;
1111 }
1112
1113 pub fn alignable(qt: QualType, comp: *const Compilation) bool {
1114 if (qt.isInvalid()) return true; // Avoid redundant error.
1115 const base_type = qt.base(comp);
1116 return switch (base_type.type) {
1117 .array, .void => false,
1118 else => !base_type.qt.hasIncompleteSize(comp),
1119 };
1120 }
1121
1122 pub fn requestedAlignment(qt: QualType, comp: *const Compilation) ?u32 {
1123 return annotationAlignment(comp, Attribute.Iterator.initType(qt, comp));
1124 }
1125
1126 pub fn annotationAlignment(comp: *const Compilation, attrs: Attribute.Iterator) ?u32 {
1127 var it = attrs;
1128 var max_requested: ?u32 = null;
1129 var last_aligned_index: ?usize = null;
1130 while (it.next()) |item| {
1131 const attribute, const index = item;
1132 if (attribute.tag != .aligned) continue;
1133 if (last_aligned_index) |aligned_index| {
1134 // once we recurse into a new type, after an `aligned` attribute was found, we're done
1135 if (index <= aligned_index) break;
1136 }
1137 last_aligned_index = index;
1138 const requested = if (attribute.args.aligned.alignment) |alignment| alignment.requested else target_util.defaultAlignment(comp.target);
1139 if (max_requested == null or max_requested.? < requested) {
1140 max_requested = requested;
1141 }
1142 }
1143 return max_requested;
1144 }
1145
1146 pub fn enumIsPacked(qt: QualType, comp: *const Compilation) bool {
1147 std.debug.assert(qt.is(comp, .@"enum"));
1148 return comp.langopts.short_enums or target_util.packAllEnums(comp.target) or qt.hasAttribute(comp, .@"packed");
1149 }
1150
1151 pub fn shouldDesugar(qt: QualType, comp: *const Compilation) bool {
1152 loop: switch (qt.type(comp)) {
1153 .attributed => |attributed| continue :loop attributed.base.type(comp),
1154 .pointer => |pointer| continue :loop pointer.child.type(comp),
1155 .func => |func| {
1156 for (func.params) |param| {
1157 if (param.qt.shouldDesugar(comp)) return true;
1158 }
1159 continue :loop func.return_type.type(comp);
1160 },
1161 .typeof => return true,
1162 .typedef => |typedef| return !typedef.base.is(comp, .nullptr_t),
1163 else => return false,
1164 }
1165 }
1166
1167 pub fn print(qt: QualType, comp: *const Compilation, w: *std.Io.Writer) std.Io.Writer.Error!void {
1168 if (qt.isC23Auto()) {
1169 try w.writeAll("auto");
1170 return;
1171 }
1172 _ = try qt.printPrologue(comp, false, w);
1173 try qt.printEpilogue(comp, false, w);
1174 }
1175
1176 pub fn printNamed(qt: QualType, name: []const u8, comp: *const Compilation, w: *std.Io.Writer) std.Io.Writer.Error!void {
1177 if (qt.isC23Auto()) {
1178 try w.print("auto {s}", .{name});
1179 return;
1180 }
1181 const simple = try qt.printPrologue(comp, false, w);
1182 if (simple) try w.writeByte(' ');
1183 try w.writeAll(name);
1184 try qt.printEpilogue(comp, false, w);
1185 }
1186
1187 pub fn printDesugared(qt: QualType, comp: *const Compilation, w: *std.Io.Writer) std.Io.Writer.Error!void {
1188 _ = try qt.printPrologue(comp, true, w);
1189 try qt.printEpilogue(comp, true, w);
1190 }
1191
1192 fn printPrologue(qt: QualType, comp: *const Compilation, desugar: bool, w: *std.Io.Writer) std.Io.Writer.Error!bool {
1193 loop: switch (qt.type(comp)) {
1194 .pointer => |pointer| {
1195 const simple = try pointer.child.printPrologue(comp, desugar, w);
1196 if (simple) try w.writeByte(' ');
1197 switch (pointer.child.base(comp).type) {
1198 .func, .array => try w.writeByte('('),
1199 else => {},
1200 }
1201 try w.writeByte('*');
1202 if (qt.@"const") try w.writeAll("const");
1203 if (qt.@"volatile") {
1204 if (qt.@"const") try w.writeByte(' ');
1205 try w.writeAll("volatile");
1206 }
1207 if (qt.restrict) {
1208 if (qt.@"const" or qt.@"volatile") try w.writeByte(' ');
1209 try w.writeAll("restrict");
1210 }
1211 return false;
1212 },
1213 .func => |func| {
1214 const simple = try func.return_type.printPrologue(comp, desugar, w);
1215 if (simple) try w.writeByte(' ');
1216 return false;
1217 },
1218 .array => |array| {
1219 const simple = try array.elem.printPrologue(comp, desugar, w);
1220 if (simple) try w.writeByte(' ');
1221 return false;
1222 },
1223 .typeof => |typeof| if (desugar) {
1224 continue :loop typeof.base.type(comp);
1225 } else {
1226 try w.writeAll("typeof(");
1227 try typeof.base.print(comp, w);
1228 try w.writeAll(")");
1229 return true;
1230 },
1231 .typedef => |typedef| if (desugar) {
1232 continue :loop typedef.base.type(comp);
1233 } else {
1234 try w.writeAll(typedef.name.lookup(comp));
1235 return true;
1236 },
1237 .attributed => |attributed| continue :loop attributed.base.type(comp),
1238 else => {},
1239 }
1240 if (qt.@"const") try w.writeAll("const ");
1241 if (qt.@"volatile") try w.writeAll("volatile ");
1242
1243 switch (qt.base(comp).type) {
1244 .pointer => unreachable,
1245 .func => unreachable,
1246 .array => unreachable,
1247 .typeof => unreachable,
1248 .typedef => unreachable,
1249 .attributed => unreachable,
1250
1251 .void => try w.writeAll("void"),
1252 .bool => try w.writeAll(if (comp.langopts.standard.atLeast(.c23)) "bool" else "_Bool"),
1253 .nullptr_t => try w.writeAll("nullptr_t"),
1254 .int => |int_ty| switch (int_ty) {
1255 .char => try w.writeAll("char"),
1256 .schar => try w.writeAll("signed char"),
1257 .uchar => try w.writeAll("unsigned char"),
1258 .short => try w.writeAll("short"),
1259 .ushort => try w.writeAll("unsigned short"),
1260 .int => try w.writeAll("int"),
1261 .uint => try w.writeAll("unsigned int"),
1262 .long => try w.writeAll("long"),
1263 .ulong => try w.writeAll("unsigned long"),
1264 .long_long => try w.writeAll("long long"),
1265 .ulong_long => try w.writeAll("unsigned long long"),
1266 .int128 => try w.writeAll("__int128"),
1267 .uint128 => try w.writeAll("unsigned __int128"),
1268 },
1269 .bit_int => |bit_int| try w.print("{s} _BitInt({d})", .{ @tagName(bit_int.signedness), bit_int.bits }),
1270 .float => |float_ty| switch (float_ty) {
1271 .fp16 => try w.writeAll("__fp16"),
1272 .float16 => try w.writeAll("_Float16"),
1273 .float => try w.writeAll("float"),
1274 .double => try w.writeAll("double"),
1275 .long_double => try w.writeAll("long double"),
1276 .float128 => try w.writeAll("__float128"),
1277 },
1278 .complex => |complex| {
1279 try w.writeAll("_Complex ");
1280 _ = try complex.printPrologue(comp, desugar, w);
1281 },
1282 .atomic => |atomic| {
1283 try w.writeAll("_Atomic(");
1284 _ = try atomic.printPrologue(comp, desugar, w);
1285 try atomic.printEpilogue(comp, desugar, w);
1286 try w.writeAll(")");
1287 },
1288
1289 .vector => |vector| {
1290 try w.print("__attribute__((__vector_size__({d} * sizeof(", .{vector.len});
1291 _ = try vector.elem.printPrologue(comp, desugar, w);
1292 try w.writeAll(")))) ");
1293 _ = try vector.elem.printPrologue(comp, desugar, w);
1294 },
1295
1296 .@"struct" => |struct_ty| try w.print("struct {s}", .{struct_ty.name.lookup(comp)}),
1297 .@"union" => |union_ty| try w.print("union {s}", .{union_ty.name.lookup(comp)}),
1298 .@"enum" => |enum_ty| if (enum_ty.fixed) {
1299 try w.print("enum {s}: ", .{enum_ty.name.lookup(comp)});
1300 _ = try enum_ty.tag.?.printPrologue(comp, desugar, w);
1301 } else {
1302 try w.print("enum {s}", .{enum_ty.name.lookup(comp)});
1303 },
1304 }
1305 return true;
1306 }
1307
1308 fn printEpilogue(qt: QualType, comp: *const Compilation, desugar: bool, w: *std.Io.Writer) std.Io.Writer.Error!void {
1309 loop: switch (qt.type(comp)) {
1310 .pointer => |pointer| {
1311 switch (pointer.child.base(comp).type) {
1312 .func, .array => try w.writeByte(')'),
1313 else => {},
1314 }
1315 continue :loop pointer.child.type(comp);
1316 },
1317 .func => |func| {
1318 try w.writeByte('(');
1319 for (func.params, 0..) |param, i| {
1320 if (i != 0) try w.writeAll(", ");
1321 _ = try param.qt.printPrologue(comp, desugar, w);
1322 try param.qt.printEpilogue(comp, desugar, w);
1323 }
1324 if (func.kind != .normal) {
1325 if (func.params.len != 0) try w.writeAll(", ");
1326 try w.writeAll("...");
1327 } else if (func.params.len == 0 and !comp.langopts.standard.atLeast(.c23)) {
1328 try w.writeAll("void");
1329 }
1330 try w.writeByte(')');
1331 continue :loop func.return_type.type(comp);
1332 },
1333 .array => |array| {
1334 try w.writeByte('[');
1335 switch (array.len) {
1336 .fixed, .static => |len| try w.print("{d}", .{len}),
1337 .incomplete => {},
1338 .unspecified_variable => try w.writeByte('*'),
1339 .variable => try w.writeAll("<expr>"),
1340 }
1341
1342 const static = array.len == .static;
1343 if (static) try w.writeAll("static");
1344 if (qt.@"const") {
1345 if (static) try w.writeByte(' ');
1346 try w.writeAll("const");
1347 }
1348 if (qt.@"volatile") {
1349 if (static or qt.@"const") try w.writeByte(' ');
1350 try w.writeAll("volatile");
1351 }
1352 if (qt.restrict) {
1353 if (static or qt.@"const" or qt.@"volatile") try w.writeByte(' ');
1354 try w.writeAll("restrict");
1355 }
1356 try w.writeByte(']');
1357
1358 continue :loop array.elem.type(comp);
1359 },
1360 .attributed => |attributed| continue :loop attributed.base.type(comp),
1361 else => {},
1362 }
1363 }
1364
1365 pub fn dump(qt: QualType, comp: *const Compilation, w: *std.Io.Writer) std.Io.Writer.Error!void {
1366 if (qt.@"const") try w.writeAll("const ");
1367 if (qt.@"volatile") try w.writeAll("volatile ");
1368 if (qt.restrict) try w.writeAll("restrict ");
1369 if (qt.isInvalid()) return w.writeAll("invalid");
1370 switch (qt.type(comp)) {
1371 .pointer => |pointer| {
1372 if (pointer.decayed) |decayed| {
1373 try w.writeAll("decayed *");
1374 try decayed.dump(comp, w);
1375 } else {
1376 try w.writeAll("*");
1377 try pointer.child.dump(comp, w);
1378 }
1379 },
1380 .func => |func| {
1381 if (func.kind == .old_style)
1382 try w.writeAll("kr (")
1383 else
1384 try w.writeAll("fn (");
1385
1386 for (func.params, 0..) |param, i| {
1387 if (i != 0) try w.writeAll(", ");
1388 if (param.name != .empty) try w.print("{s}: ", .{param.name.lookup(comp)});
1389 try param.qt.dump(comp, w);
1390 }
1391 if (func.kind != .normal) {
1392 if (func.params.len != 0) try w.writeAll(", ");
1393 try w.writeAll("...");
1394 }
1395 try w.writeAll(") ");
1396 try func.return_type.dump(comp, w);
1397 },
1398 .array => |array| {
1399 switch (array.len) {
1400 .fixed => |len| try w.print("[{d}]", .{len}),
1401 .static => |len| try w.print("[static {d}]", .{len}),
1402 .incomplete => try w.writeAll("[]"),
1403 .unspecified_variable => try w.writeAll("[*]"),
1404 .variable => try w.writeAll("[<expr>]"),
1405 }
1406 try array.elem.dump(comp, w);
1407 },
1408 .vector => |vector| {
1409 try w.print("vector({d}, ", .{vector.len});
1410 try vector.elem.dump(comp, w);
1411 try w.writeAll(")");
1412 },
1413 .typeof => |typeof| {
1414 try w.writeAll("typeof(");
1415 if (typeof.expr != null) try w.writeAll("<expr>: ");
1416 try typeof.base.dump(comp, w);
1417 try w.writeAll(")");
1418 },
1419 .attributed => |attributed| {
1420 try w.writeAll("attributed(");
1421 try attributed.base.dump(comp, w);
1422 try w.writeAll(")");
1423 },
1424 .typedef => |typedef| {
1425 try w.writeAll(typedef.name.lookup(comp));
1426 try w.writeAll(": ");
1427 try typedef.base.dump(comp, w);
1428 },
1429 .@"enum" => |enum_ty| {
1430 try w.print("enum {s}: ", .{enum_ty.name.lookup(comp)});
1431 if (enum_ty.tag) |some| {
1432 try some.dump(comp, w);
1433 } else {
1434 try w.writeAll("<incomplete>");
1435 }
1436 },
1437 else => try qt.unqualified().print(comp, w),
1438 }
1439 }
1440};
1441
1442pub const Type = union(enum) {
1443 void,
1444 bool,
1445 /// C23 nullptr_t
1446 nullptr_t,
1447
1448 int: Int,
1449 float: Float,
1450 complex: QualType,
1451 bit_int: BitInt,
1452 atomic: QualType,
1453
1454 func: Func,
1455 pointer: Pointer,
1456 array: Array,
1457 vector: Vector,
1458
1459 @"struct": Record,
1460 @"union": Record,
1461 @"enum": Enum,
1462
1463 typeof: TypeOf,
1464 typedef: TypeDef,
1465 attributed: Attributed,
1466
1467 pub const Int = enum {
1468 char,
1469 schar,
1470 uchar,
1471 short,
1472 ushort,
1473 int,
1474 uint,
1475 long,
1476 ulong,
1477 long_long,
1478 ulong_long,
1479 int128,
1480 uint128,
1481
1482 pub fn bits(int: Int, comp: *const Compilation) u16 {
1483 return switch (int) {
1484 .char => comp.target.cTypeBitSize(.char),
1485 .schar => comp.target.cTypeBitSize(.char),
1486 .uchar => comp.target.cTypeBitSize(.char),
1487 .short => comp.target.cTypeBitSize(.short),
1488 .ushort => comp.target.cTypeBitSize(.ushort),
1489 .int => comp.target.cTypeBitSize(.int),
1490 .uint => comp.target.cTypeBitSize(.uint),
1491 .long => comp.target.cTypeBitSize(.long),
1492 .ulong => comp.target.cTypeBitSize(.ulong),
1493 .long_long => comp.target.cTypeBitSize(.longlong),
1494 .ulong_long => comp.target.cTypeBitSize(.ulonglong),
1495 .int128 => 128,
1496 .uint128 => 128,
1497 };
1498 }
1499 };
1500
1501 pub const Float = enum {
1502 fp16,
1503 float16,
1504 float,
1505 double,
1506 long_double,
1507 float128,
1508
1509 pub fn bits(float: Float, comp: *const Compilation) u16 {
1510 return switch (float) {
1511 .fp16 => 16,
1512 .float16 => 16,
1513 .float => comp.target.cTypeBitSize(.float),
1514 .double => comp.target.cTypeBitSize(.double),
1515 .long_double => comp.target.cTypeBitSize(.longdouble),
1516 .float128 => 128,
1517 };
1518 }
1519 };
1520
1521 pub const BitInt = struct {
1522 /// Must be >= 1 if unsigned and >= 2 if signed
1523 bits: u16,
1524 signedness: std.builtin.Signedness,
1525 };
1526
1527 pub const Func = struct {
1528 return_type: QualType,
1529 kind: enum {
1530 /// int foo(int bar, char baz) and int (void)
1531 normal,
1532 /// int foo(int bar, char baz, ...)
1533 variadic,
1534 /// int foo(bar, baz) and int foo()
1535 /// is also var args, but we can give warnings about incorrect amounts of parameters
1536 old_style,
1537 },
1538 params: []const Param,
1539
1540 pub const Param = extern struct {
1541 qt: QualType,
1542 name: StringId,
1543 name_tok: TokenIndex,
1544 node: Node.OptIndex,
1545 };
1546 };
1547
1548 pub const Pointer = struct {
1549 child: QualType,
1550 decayed: ?QualType,
1551 };
1552
1553 pub const Array = struct {
1554 elem: QualType,
1555 len: union(enum) {
1556 incomplete,
1557 fixed: u64,
1558 static: u64,
1559 variable: Node.Index,
1560 unspecified_variable,
1561 },
1562 };
1563
1564 pub const Vector = struct {
1565 elem: QualType,
1566 len: u32,
1567 };
1568
1569 pub const Record = struct {
1570 name: StringId,
1571 decl_node: Node.Index,
1572 layout: ?Layout = null,
1573 fields: []const Field,
1574
1575 pub const Field = extern struct {
1576 qt: QualType,
1577 name: StringId,
1578 /// zero for anonymous fields
1579 name_tok: TokenIndex = 0,
1580 bit_width: enum(u32) {
1581 null = std.math.maxInt(u32),
1582 _,
1583
1584 pub fn unpack(width: @This()) ?u32 {
1585 if (width == .null) return null;
1586 return @intFromEnum(width);
1587 }
1588 } = .null,
1589 layout: Field.Layout = .{
1590 .offset_bits = 0,
1591 .size_bits = 0,
1592 },
1593 _attr_index: u32 = 0,
1594 _attr_len: u32 = 0,
1595
1596 pub fn attributes(field: Field, comp: *const Compilation) []const Attribute {
1597 return comp.type_store.attributes.items[field._attr_index..][0..field._attr_len];
1598 }
1599
1600 pub const Layout = extern struct {
1601 /// `offset_bits` and `size_bits` should both be INVALID if and only if the field
1602 /// is an unnamed bitfield. There is no way to reference an unnamed bitfield in C, so
1603 /// there should be no way to observe these values. If it is used, this value will
1604 /// maximize the chance that a safety-checked overflow will occur.
1605 const INVALID = std.math.maxInt(u64);
1606
1607 /// The offset of the field, in bits, from the start of the struct.
1608 offset_bits: u64 align(4) = INVALID,
1609 /// The size, in bits, of the field.
1610 ///
1611 /// For bit-fields, this is the width of the field.
1612 size_bits: u64 align(4) = INVALID,
1613 };
1614 };
1615
1616 pub const Layout = extern struct {
1617 /// The size of the type in bits.
1618 ///
1619 /// This is the value returned by `sizeof` in C
1620 /// (but in bits instead of bytes). This is a multiple of `pointer_alignment_bits`.
1621 size_bits: u64 align(4),
1622 /// The alignment of the type, in bits, when used as a field in a record.
1623 ///
1624 /// This is usually the value returned by `_Alignof` in C, but there are some edge
1625 /// cases in GCC where `_Alignof` returns a smaller value.
1626 field_alignment_bits: u32,
1627 /// The alignment, in bits, of valid pointers to this type.
1628 /// `size_bits` is a multiple of this value.
1629 pointer_alignment_bits: u32,
1630 /// The required alignment of the type in bits.
1631 ///
1632 /// This value is only used by MSVC targets. It is 8 on all other
1633 /// targets. On MSVC targets, this value restricts the effects of `#pragma pack` except
1634 /// in some cases involving bit-fields.
1635 required_alignment_bits: u32,
1636 };
1637
1638 pub fn isAnonymous(record: Record, comp: *const Compilation) bool {
1639 // anonymous records can be recognized by their names which are in
1640 // the format "(anonymous TAG at path:line:col)".
1641 return record.name.lookup(comp)[0] == '(';
1642 }
1643
1644 pub fn hasField(record: Record, comp: *const Compilation, name: StringId) bool {
1645 std.debug.assert(record.layout != null);
1646 std.debug.assert(name != .empty);
1647 for (record.fields) |field| {
1648 if (name == field.name) return true;
1649 if (field.name_tok == 0) if (field.qt.getRecord(comp)) |field_record_ty| {
1650 if (field_record_ty.hasField(comp, name)) return true;
1651 };
1652 }
1653 return false;
1654 }
1655 };
1656
1657 pub const Enum = struct {
1658 /// Null if the enum is incomplete and not fixed.
1659 tag: ?QualType,
1660 fixed: bool,
1661 incomplete: bool,
1662 name: StringId,
1663 decl_node: Node.Index,
1664 fields: []const Field,
1665
1666 pub const Field = extern struct {
1667 qt: QualType,
1668 name: StringId,
1669 name_tok: TokenIndex,
1670 };
1671
1672 pub fn isAnonymous(@"enum": Enum, comp: *const Compilation) bool {
1673 // anonymous enums can be recognized by their names which are in
1674 // the format "(anonymous TAG at path:line:col)".
1675 return @"enum".name.lookup(comp)[0] == '(';
1676 }
1677 };
1678
1679 pub const TypeOf = struct {
1680 base: QualType,
1681 expr: ?Node.Index,
1682 };
1683
1684 pub const TypeDef = struct {
1685 base: QualType,
1686 name: StringId,
1687 decl_node: Node.Index,
1688 };
1689
1690 pub const Attributed = struct {
1691 base: QualType,
1692 attributes: []const Attribute,
1693 };
1694};
1695
1696types: std.MultiArrayList(Repr) = .empty,
1697extra: std.ArrayListUnmanaged(u32) = .empty,
1698attributes: std.ArrayListUnmanaged(Attribute) = .empty,
1699anon_name_arena: std.heap.ArenaAllocator.State = .{},
1700
1701wchar: QualType = .invalid,
1702uint_least16_t: QualType = .invalid,
1703uint_least32_t: QualType = .invalid,
1704ptrdiff: QualType = .invalid,
1705size: QualType = .invalid,
1706va_list: QualType = .invalid,
1707pid_t: QualType = .invalid,
1708ns_constant_string: QualType = .invalid,
1709file: QualType = .invalid,
1710jmp_buf: QualType = .invalid,
1711sigjmp_buf: QualType = .invalid,
1712ucontext_t: QualType = .invalid,
1713intmax: QualType = .invalid,
1714intptr: QualType = .invalid,
1715int16: QualType = .invalid,
1716int64: QualType = .invalid,
1717
1718pub fn deinit(ts: *TypeStore, gpa: std.mem.Allocator) void {
1719 ts.types.deinit(gpa);
1720 ts.extra.deinit(gpa);
1721 ts.attributes.deinit(gpa);
1722 ts.anon_name_arena.promote(gpa).deinit();
1723 ts.* = undefined;
1724}
1725
1726pub fn put(ts: *TypeStore, gpa: std.mem.Allocator, ty: Type) !QualType {
1727 return .{ ._index = try ts.putExtra(gpa, ty) };
1728}
1729
1730pub fn putExtra(ts: *TypeStore, gpa: std.mem.Allocator, ty: Type) !Index {
1731 switch (ty) {
1732 .void => return .void,
1733 .bool => return .bool,
1734 .nullptr_t => return .nullptr_t,
1735 .int => |int| switch (int) {
1736 .char => return .int_char,
1737 .schar => return .int_schar,
1738 .uchar => return .int_uchar,
1739 .short => return .int_short,
1740 .ushort => return .int_ushort,
1741 .int => return .int_int,
1742 .uint => return .int_uint,
1743 .long => return .int_long,
1744 .ulong => return .int_ulong,
1745 .long_long => return .int_long_long,
1746 .ulong_long => return .int_ulong_long,
1747 .int128 => return .int_int128,
1748 .uint128 => return .int_uint128,
1749 },
1750 .float => |float| switch (float) {
1751 .fp16 => return .float_fp16,
1752 .float16 => return .float_float16,
1753 .float => return .float_float,
1754 .double => return .float_double,
1755 .long_double => return .float_long_double,
1756 .float128 => return .float_float128,
1757 },
1758 else => {},
1759 }
1760 const index = try ts.types.addOne(gpa);
1761 try ts.set(gpa, ty, index);
1762 return @enumFromInt(index);
1763}
1764
1765pub fn set(ts: *TypeStore, gpa: std.mem.Allocator, ty: Type, index: usize) !void {
1766 var repr: Repr = undefined;
1767 switch (ty) {
1768 .void => unreachable,
1769 .bool => unreachable,
1770 .nullptr_t => unreachable,
1771 .int => unreachable,
1772 .float => unreachable,
1773 .complex => |complex| {
1774 repr.tag = .complex;
1775 repr.data[0] = @bitCast(complex);
1776 },
1777 .bit_int => |bit_int| {
1778 repr.tag = .bit_int;
1779 repr.data[0] = bit_int.bits;
1780 repr.data[1] = @intFromEnum(bit_int.signedness);
1781 },
1782 .atomic => |atomic| {
1783 repr.tag = .atomic;
1784 std.debug.assert(!atomic.@"const" and !atomic.@"volatile");
1785 repr.data[0] = @bitCast(atomic);
1786 },
1787 .func => |func| {
1788 repr.data[0] = @bitCast(func.return_type);
1789
1790 const extra_index: u32 = @intCast(ts.extra.items.len);
1791 repr.data[1] = extra_index;
1792 if (func.params.len > 1) {
1793 try ts.extra.append(gpa, @intCast(func.params.len));
1794 }
1795
1796 const param_size = 4;
1797 comptime std.debug.assert(@sizeOf(Type.Func.Param) == @sizeOf(u32) * param_size);
1798
1799 try ts.extra.ensureUnusedCapacity(gpa, func.params.len * param_size);
1800 for (func.params) |*param| {
1801 const casted: *const [param_size]u32 = @ptrCast(param);
1802 ts.extra.appendSliceAssumeCapacity(casted);
1803 }
1804
1805 repr.tag = switch (func.kind) {
1806 .normal => switch (func.params.len) {
1807 0 => .func_zero,
1808 1 => .func_one,
1809 else => .func,
1810 },
1811 .variadic => switch (func.params.len) {
1812 0 => .func_variadic_zero,
1813 1 => .func_variadic_one,
1814 else => .func_variadic,
1815 },
1816 .old_style => switch (func.params.len) {
1817 0 => .func_old_style_zero,
1818 1 => .func_old_style_one,
1819 else => .func_old_style,
1820 },
1821 };
1822 },
1823 .pointer => |pointer| {
1824 repr.data[0] = @bitCast(pointer.child);
1825 if (pointer.decayed) |array| {
1826 repr.tag = .pointer_decayed;
1827 repr.data[1] = @bitCast(array);
1828 } else {
1829 repr.tag = .pointer;
1830 }
1831 },
1832 .array => |array| {
1833 repr.data[0] = @bitCast(array.elem);
1834
1835 const extra_index: u32 = @intCast(ts.extra.items.len);
1836 switch (array.len) {
1837 .incomplete => {
1838 repr.tag = .array_incomplete;
1839 },
1840 .fixed => |len| {
1841 repr.tag = .array_fixed;
1842 repr.data[1] = extra_index;
1843 try ts.extra.appendSlice(gpa, &@as([2]u32, @bitCast(len)));
1844 },
1845 .static => |len| {
1846 repr.tag = .array_static;
1847 repr.data[1] = extra_index;
1848 try ts.extra.appendSlice(gpa, &@as([2]u32, @bitCast(len)));
1849 },
1850 .variable => |expr| {
1851 repr.tag = .array_variable;
1852 repr.data[1] = @intFromEnum(expr);
1853 },
1854 .unspecified_variable => {
1855 repr.tag = .array_unspecified_variable;
1856 },
1857 }
1858 },
1859 .vector => |vector| {
1860 repr.tag = .vector;
1861 repr.data[0] = @bitCast(vector.elem);
1862 repr.data[1] = vector.len;
1863 },
1864 .@"struct", .@"union" => |record| record: {
1865 repr.data[0] = @intFromEnum(record.name);
1866 const layout = record.layout orelse {
1867 std.debug.assert(record.fields.len == 0);
1868 repr.tag = switch (ty) {
1869 .@"struct" => .struct_incomplete,
1870 .@"union" => .union_incomplete,
1871 else => unreachable,
1872 };
1873 repr.data[1] = @intFromEnum(record.decl_node);
1874 break :record;
1875 };
1876 repr.tag = switch (ty) {
1877 .@"struct" => .@"struct",
1878 .@"union" => .@"union",
1879 else => unreachable,
1880 };
1881
1882 const extra_index: u32 = @intCast(ts.extra.items.len);
1883 repr.data[1] = extra_index;
1884
1885 const layout_size = 5;
1886 comptime std.debug.assert(@sizeOf(Type.Record.Layout) == @sizeOf(u32) * layout_size);
1887 const field_size = 10;
1888 comptime std.debug.assert(@sizeOf(Type.Record.Field) == @sizeOf(u32) * field_size);
1889 try ts.extra.ensureUnusedCapacity(gpa, record.fields.len * field_size + layout_size + 2);
1890
1891 ts.extra.appendAssumeCapacity(@intFromEnum(record.decl_node));
1892 const casted_layout: *const [layout_size]u32 = @ptrCast(&layout);
1893 ts.extra.appendSliceAssumeCapacity(casted_layout);
1894 ts.extra.appendAssumeCapacity(@intCast(record.fields.len));
1895
1896 for (record.fields) |*field| {
1897 const casted: *const [field_size]u32 = @ptrCast(field);
1898 ts.extra.appendSliceAssumeCapacity(casted);
1899 }
1900 },
1901 .@"enum" => |@"enum"| @"enum": {
1902 if (@"enum".incomplete) {
1903 std.debug.assert(@"enum".fields.len == 0);
1904 if (@"enum".fixed) {
1905 repr.tag = .enum_incomplete_fixed;
1906 repr.data[0] = @bitCast(@"enum".tag.?);
1907 repr.data[1] = @intCast(ts.extra.items.len);
1908 try ts.extra.appendSlice(gpa, &.{
1909 @intFromEnum(@"enum".name),
1910 @intFromEnum(@"enum".decl_node),
1911 });
1912 } else {
1913 repr.tag = .enum_incomplete;
1914 repr.data[0] = @intFromEnum(@"enum".name);
1915 repr.data[1] = @intFromEnum(@"enum".decl_node);
1916 }
1917 break :@"enum";
1918 }
1919 repr.tag = if (@"enum".fixed) .enum_fixed else .@"enum";
1920 repr.data[0] = @bitCast(@"enum".tag.?);
1921
1922 const extra_index: u32 = @intCast(ts.extra.items.len);
1923 repr.data[1] = extra_index;
1924
1925 const field_size = 3;
1926 comptime std.debug.assert(@sizeOf(Type.Enum.Field) == @sizeOf(u32) * field_size);
1927 try ts.extra.ensureUnusedCapacity(gpa, @"enum".fields.len * field_size + 3);
1928
1929 ts.extra.appendAssumeCapacity(@intFromEnum(@"enum".name));
1930 ts.extra.appendAssumeCapacity(@intFromEnum(@"enum".decl_node));
1931 ts.extra.appendAssumeCapacity(@intCast(@"enum".fields.len));
1932
1933 for (@"enum".fields) |*field| {
1934 const casted: *const [field_size]u32 = @ptrCast(field);
1935 ts.extra.appendSliceAssumeCapacity(casted);
1936 }
1937 },
1938 .typeof => |typeof| {
1939 repr.data[0] = @bitCast(typeof.base);
1940 if (typeof.expr) |some| {
1941 repr.tag = .typeof_expr;
1942 repr.data[1] = @intFromEnum(some);
1943 } else {
1944 repr.tag = .typeof;
1945 }
1946 },
1947 .typedef => |typedef| {
1948 repr.tag = .typedef;
1949 repr.data[0] = @bitCast(typedef.base);
1950 repr.data[1] = @intCast(ts.extra.items.len);
1951 try ts.extra.appendSlice(gpa, &.{
1952 @intFromEnum(typedef.name),
1953 @intFromEnum(typedef.decl_node),
1954 });
1955 },
1956 .attributed => |attributed| {
1957 repr.data[0] = @bitCast(attributed.base);
1958
1959 const attr_index: u32 = @intCast(ts.attributes.items.len);
1960 const attr_count: u32 = @intCast(attributed.attributes.len);
1961 try ts.attributes.appendSlice(gpa, attributed.attributes);
1962 if (attr_count > 1) {
1963 repr.tag = .attributed;
1964 const extra_index: u32 = @intCast(ts.extra.items.len);
1965 repr.data[1] = extra_index;
1966 try ts.extra.appendSlice(gpa, &.{ attr_index, attr_count });
1967 } else {
1968 repr.tag = .attributed_one;
1969 repr.data[1] = attr_index;
1970 }
1971 },
1972 }
1973 ts.types.set(index, repr);
1974}
1975
1976pub fn initNamedTypes(ts: *TypeStore, comp: *Compilation) !void {
1977 const os = comp.target.os.tag;
1978 ts.wchar = switch (comp.target.cpu.arch) {
1979 .xcore => .uchar,
1980 .ve, .msp430 => .uint,
1981 .arm, .armeb, .thumb, .thumbeb => if (os != .windows and os != .netbsd and os != .openbsd) .uint else .int,
1982 .aarch64, .aarch64_be => if (!os.isDarwin() and os != .netbsd) .uint else .int,
1983 .x86_64, .x86 => if (os == .windows) .ushort else .int,
1984 else => .int,
1985 };
1986
1987 const ptr_width = comp.target.ptrBitWidth();
1988 ts.ptrdiff = if (os == .windows and ptr_width == 64)
1989 .long_long
1990 else switch (ptr_width) {
1991 16 => .int,
1992 32 => .int,
1993 64 => .long,
1994 else => unreachable,
1995 };
1996
1997 ts.size = if (os == .windows and ptr_width == 64)
1998 .ulong_long
1999 else switch (ptr_width) {
2000 16 => .uint,
2001 32 => .uint,
2002 64 => .ulong,
2003 else => unreachable,
2004 };
2005
2006 ts.pid_t = switch (os) {
2007 .haiku => .long,
2008 // Todo: pid_t is required to "a signed integer type"; are there any systems
2009 // on which it is `short int`?
2010 else => .int,
2011 };
2012
2013 ts.intmax = target_util.intMaxType(comp.target);
2014 ts.intptr = target_util.intPtrType(comp.target);
2015 ts.int16 = target_util.int16Type(comp.target);
2016 ts.int64 = target_util.int64Type(comp.target);
2017 ts.uint_least16_t = comp.intLeastN(16, .unsigned);
2018 ts.uint_least32_t = comp.intLeastN(32, .unsigned);
2019
2020 ts.ns_constant_string = try ts.generateNsConstantStringType(comp);
2021 ts.va_list = try ts.generateVaListType(comp);
2022}
2023
2024fn generateNsConstantStringType(ts: *TypeStore, comp: *Compilation) !QualType {
2025 const const_int_ptr: QualType = .{ .@"const" = true, ._index = .int_pointer };
2026 const const_char_ptr: QualType = .{ .@"const" = true, ._index = .char_pointer };
2027
2028 var record: Type.Record = .{
2029 .name = try comp.internString("__NSConstantString_tag"),
2030 .layout = null,
2031 .decl_node = undefined, // TODO
2032 .fields = &.{},
2033 };
2034 const qt = try ts.put(comp.gpa, .{ .@"struct" = record });
2035
2036 var fields: [4]Type.Record.Field = .{
2037 .{ .name = try comp.internString("isa"), .qt = const_int_ptr },
2038 .{ .name = try comp.internString("flags"), .qt = .int },
2039 .{ .name = try comp.internString("str"), .qt = const_char_ptr },
2040 .{ .name = try comp.internString("length"), .qt = .long },
2041 };
2042 record.fields = &fields;
2043 record.layout = record_layout.compute(&fields, qt, comp, null) catch unreachable;
2044 try ts.set(comp.gpa, .{ .@"struct" = record }, @intFromEnum(qt._index));
2045
2046 return qt;
2047}
2048
2049fn generateVaListType(ts: *TypeStore, comp: *Compilation) !QualType {
2050 const Kind = enum { aarch64_va_list, x86_64_va_list };
2051 const kind: Kind = switch (comp.target.cpu.arch) {
2052 .aarch64, .aarch64_be => switch (comp.target.os.tag) {
2053 .windows => return .char_pointer,
2054 .ios, .macos, .tvos, .watchos => return .char_pointer,
2055 else => .aarch64_va_list,
2056 },
2057 .arm, .armeb, .thumb, .thumbeb => switch (comp.target.os.tag) {
2058 .ios, .macos, .tvos, .watchos, .visionos => return .char_pointer,
2059 else => return .void_pointer,
2060 },
2061 .sparc, .wasm32, .wasm64, .bpfel, .bpfeb, .riscv32, .riscv64, .avr, .spirv32, .spirv64 => return .void_pointer,
2062 .powerpc => switch (comp.target.os.tag) {
2063 .ios, .macos, .tvos, .watchos, .aix => return .char_pointer,
2064 else => return .void, // unknown
2065 },
2066 .x86, .msp430 => return .char_pointer,
2067 .x86_64 => switch (comp.target.os.tag) {
2068 .windows => return .char_pointer,
2069 else => .x86_64_va_list,
2070 },
2071 else => return .void, // unknown
2072 };
2073
2074 const struct_qt = switch (kind) {
2075 .aarch64_va_list => blk: {
2076 var record: Type.Record = .{
2077 .name = try comp.internString("__va_list_tag"),
2078 .decl_node = undefined, // TODO
2079 .layout = null,
2080 .fields = &.{},
2081 };
2082 const qt = try ts.put(comp.gpa, .{ .@"struct" = record });
2083
2084 var fields: [5]Type.Record.Field = .{
2085 .{ .name = try comp.internString("__stack"), .qt = .void_pointer },
2086 .{ .name = try comp.internString("__gr_top"), .qt = .void_pointer },
2087 .{ .name = try comp.internString("__vr_top"), .qt = .void_pointer },
2088 .{ .name = try comp.internString("__gr_offs"), .qt = .int },
2089 .{ .name = try comp.internString("__vr_offs"), .qt = .int },
2090 };
2091 record.fields = &fields;
2092 record.layout = record_layout.compute(&fields, qt, comp, null) catch unreachable;
2093 try ts.set(comp.gpa, .{ .@"struct" = record }, @intFromEnum(qt._index));
2094
2095 break :blk qt;
2096 },
2097 .x86_64_va_list => blk: {
2098 var record: Type.Record = .{
2099 .name = try comp.internString("__va_list_tag"),
2100 .decl_node = undefined, // TODO
2101 .layout = null,
2102 .fields = &.{},
2103 };
2104 const qt = try ts.put(comp.gpa, .{ .@"struct" = record });
2105
2106 var fields: [4]Type.Record.Field = .{
2107 .{ .name = try comp.internString("gp_offset"), .qt = .uint },
2108 .{ .name = try comp.internString("fp_offset"), .qt = .uint },
2109 .{ .name = try comp.internString("overflow_arg_area"), .qt = .void_pointer },
2110 .{ .name = try comp.internString("reg_save_area"), .qt = .void_pointer },
2111 };
2112 record.fields = &fields;
2113 record.layout = record_layout.compute(&fields, qt, comp, null) catch unreachable;
2114 try ts.set(comp.gpa, .{ .@"struct" = record }, @intFromEnum(qt._index));
2115
2116 break :blk qt;
2117 },
2118 };
2119
2120 return ts.put(comp.gpa, .{ .array = .{
2121 .elem = struct_qt,
2122 .len = .{ .fixed = 1 },
2123 } });
2124}
2125
2126/// An unfinished Type
2127pub const Builder = struct {
2128 parser: *Parser,
2129
2130 @"const": ?TokenIndex = null,
2131 /// _Atomic
2132 atomic: ?TokenIndex = null,
2133 @"volatile": ?TokenIndex = null,
2134 restrict: ?TokenIndex = null,
2135 unaligned: ?TokenIndex = null,
2136 nullability: union(enum) {
2137 none,
2138 nonnull: TokenIndex,
2139 nullable: TokenIndex,
2140 nullable_result: TokenIndex,
2141 null_unspecified: TokenIndex,
2142 } = .none,
2143
2144 complex_tok: ?TokenIndex = null,
2145 bit_int_tok: ?TokenIndex = null,
2146 typedef: bool = false,
2147 typeof: bool = false,
2148 /// _Atomic(type)
2149 atomic_type: ?TokenIndex = null,
2150
2151 type: Specifier = .none,
2152 /// When true an error is returned instead of adding a diagnostic message.
2153 /// Used for trying to combine typedef types.
2154 error_on_invalid: bool = false,
2155
2156 pub const Specifier = union(enum) {
2157 none,
2158 void,
2159 /// GNU __auto_type extension
2160 auto_type,
2161 /// C23 auto
2162 c23_auto,
2163 nullptr_t,
2164 bool,
2165 char,
2166 schar,
2167 uchar,
2168 complex_char,
2169 complex_schar,
2170 complex_uchar,
2171
2172 unsigned,
2173 signed,
2174 short,
2175 sshort,
2176 ushort,
2177 short_int,
2178 sshort_int,
2179 ushort_int,
2180 int,
2181 sint,
2182 uint,
2183 long,
2184 slong,
2185 ulong,
2186 long_int,
2187 slong_int,
2188 ulong_int,
2189 long_long,
2190 slong_long,
2191 ulong_long,
2192 long_long_int,
2193 slong_long_int,
2194 ulong_long_int,
2195 int128,
2196 sint128,
2197 uint128,
2198 complex_unsigned,
2199 complex_signed,
2200 complex_short,
2201 complex_sshort,
2202 complex_ushort,
2203 complex_short_int,
2204 complex_sshort_int,
2205 complex_ushort_int,
2206 complex_int,
2207 complex_sint,
2208 complex_uint,
2209 complex_long,
2210 complex_slong,
2211 complex_ulong,
2212 complex_long_int,
2213 complex_slong_int,
2214 complex_ulong_int,
2215 complex_long_long,
2216 complex_slong_long,
2217 complex_ulong_long,
2218 complex_long_long_int,
2219 complex_slong_long_int,
2220 complex_ulong_long_int,
2221 complex_int128,
2222 complex_sint128,
2223 complex_uint128,
2224 bit_int: u64,
2225 sbit_int: u64,
2226 ubit_int: u64,
2227 complex_bit_int: u64,
2228 complex_sbit_int: u64,
2229 complex_ubit_int: u64,
2230
2231 fp16,
2232 float16,
2233 float,
2234 double,
2235 long_double,
2236 float128,
2237 complex,
2238 complex_float16,
2239 complex_float,
2240 complex_double,
2241 complex_long_double,
2242 complex_float128,
2243
2244 // Any not simply constructed from specifier keywords.
2245 other: QualType,
2246
2247 pub fn str(spec: Builder.Specifier, langopts: LangOpts) ?[]const u8 {
2248 return switch (spec) {
2249 .none => unreachable,
2250 .void => "void",
2251 .auto_type => "__auto_type",
2252 .c23_auto => "auto",
2253 .nullptr_t => "nullptr_t",
2254 .bool => if (langopts.standard.atLeast(.c23)) "bool" else "_Bool",
2255 .char => "char",
2256 .schar => "signed char",
2257 .uchar => "unsigned char",
2258 .unsigned => "unsigned",
2259 .signed => "signed",
2260 .short => "short",
2261 .ushort => "unsigned short",
2262 .sshort => "signed short",
2263 .short_int => "short int",
2264 .sshort_int => "signed short int",
2265 .ushort_int => "unsigned short int",
2266 .int => "int",
2267 .sint => "signed int",
2268 .uint => "unsigned int",
2269 .long => "long",
2270 .slong => "signed long",
2271 .ulong => "unsigned long",
2272 .long_int => "long int",
2273 .slong_int => "signed long int",
2274 .ulong_int => "unsigned long int",
2275 .long_long => "long long",
2276 .slong_long => "signed long long",
2277 .ulong_long => "unsigned long long",
2278 .long_long_int => "long long int",
2279 .slong_long_int => "signed long long int",
2280 .ulong_long_int => "unsigned long long int",
2281 .int128 => "__int128",
2282 .sint128 => "signed __int128",
2283 .uint128 => "unsigned __int128",
2284 .complex_char => "_Complex char",
2285 .complex_schar => "_Complex signed char",
2286 .complex_uchar => "_Complex unsigned char",
2287 .complex_unsigned => "_Complex unsigned",
2288 .complex_signed => "_Complex signed",
2289 .complex_short => "_Complex short",
2290 .complex_ushort => "_Complex unsigned short",
2291 .complex_sshort => "_Complex signed short",
2292 .complex_short_int => "_Complex short int",
2293 .complex_sshort_int => "_Complex signed short int",
2294 .complex_ushort_int => "_Complex unsigned short int",
2295 .complex_int => "_Complex int",
2296 .complex_sint => "_Complex signed int",
2297 .complex_uint => "_Complex unsigned int",
2298 .complex_long => "_Complex long",
2299 .complex_slong => "_Complex signed long",
2300 .complex_ulong => "_Complex unsigned long",
2301 .complex_long_int => "_Complex long int",
2302 .complex_slong_int => "_Complex signed long int",
2303 .complex_ulong_int => "_Complex unsigned long int",
2304 .complex_long_long => "_Complex long long",
2305 .complex_slong_long => "_Complex signed long long",
2306 .complex_ulong_long => "_Complex unsigned long long",
2307 .complex_long_long_int => "_Complex long long int",
2308 .complex_slong_long_int => "_Complex signed long long int",
2309 .complex_ulong_long_int => "_Complex unsigned long long int",
2310 .complex_int128 => "_Complex __int128",
2311 .complex_sint128 => "_Complex signed __int128",
2312 .complex_uint128 => "_Complex unsigned __int128",
2313
2314 .fp16 => "__fp16",
2315 .float16 => "_Float16",
2316 .float => "float",
2317 .double => "double",
2318 .long_double => "long double",
2319 .float128 => "__float128",
2320 .complex => "_Complex",
2321 .complex_float16 => "_Complex _Float16",
2322 .complex_float => "_Complex float",
2323 .complex_double => "_Complex double",
2324 .complex_long_double => "_Complex long double",
2325 .complex_float128 => "_Complex __float128",
2326
2327 else => null,
2328 };
2329 }
2330 };
2331
2332 pub fn finish(b: Builder) Parser.Error!QualType {
2333 const qt: QualType = switch (b.type) {
2334 .none => blk: {
2335 if (b.parser.comp.langopts.standard.atLeast(.c23)) {
2336 try b.parser.err(b.parser.tok_i, .missing_type_specifier_c23, .{});
2337 } else {
2338 try b.parser.err(b.parser.tok_i, .missing_type_specifier, .{});
2339 }
2340 break :blk .int;
2341 },
2342 .void => .void,
2343 .auto_type => .auto_type,
2344 .c23_auto => .c23_auto,
2345 .nullptr_t => unreachable, // nullptr_t can only be accessed via typeof(nullptr)
2346 .bool => .bool,
2347 .char => .char,
2348 .schar => .schar,
2349 .uchar => .uchar,
2350
2351 .unsigned => .uint,
2352 .signed => .int,
2353 .short_int, .sshort_int, .short, .sshort => .short,
2354 .ushort, .ushort_int => .ushort,
2355 .int, .sint => .int,
2356 .uint => .uint,
2357 .long, .slong, .long_int, .slong_int => .long,
2358 .ulong, .ulong_int => .ulong,
2359 .long_long, .slong_long, .long_long_int, .slong_long_int => .long_long,
2360 .ulong_long, .ulong_long_int => .ulong_long,
2361 .int128, .sint128 => .int128,
2362 .uint128 => .uint128,
2363
2364 .complex_char,
2365 .complex_schar,
2366 .complex_uchar,
2367 .complex_unsigned,
2368 .complex_signed,
2369 .complex_short_int,
2370 .complex_sshort_int,
2371 .complex_short,
2372 .complex_sshort,
2373 .complex_ushort,
2374 .complex_ushort_int,
2375 .complex_int,
2376 .complex_sint,
2377 .complex_uint,
2378 .complex_long,
2379 .complex_slong,
2380 .complex_long_int,
2381 .complex_slong_int,
2382 .complex_ulong,
2383 .complex_ulong_int,
2384 .complex_long_long,
2385 .complex_slong_long,
2386 .complex_long_long_int,
2387 .complex_slong_long_int,
2388 .complex_ulong_long,
2389 .complex_ulong_long_int,
2390 .complex_int128,
2391 .complex_sint128,
2392 .complex_uint128,
2393 => blk: {
2394 const base_qt: QualType = switch (b.type) {
2395 .complex_char => .char,
2396 .complex_schar => .schar,
2397 .complex_uchar => .uchar,
2398 .complex_unsigned => .uint,
2399 .complex_signed => .int,
2400 .complex_short_int, .complex_sshort_int, .complex_short, .complex_sshort => .short,
2401 .complex_ushort, .complex_ushort_int => .ushort,
2402 .complex_int, .complex_sint => .int,
2403 .complex_uint => .uint,
2404 .complex_long, .complex_slong, .complex_long_int, .complex_slong_int => .long,
2405 .complex_ulong, .complex_ulong_int => .ulong,
2406 .complex_long_long, .complex_slong_long, .complex_long_long_int, .complex_slong_long_int => .long_long,
2407 .complex_ulong_long, .complex_ulong_long_int => .ulong_long,
2408 .complex_int128, .complex_sint128 => .int128,
2409 .complex_uint128 => .uint128,
2410 else => unreachable,
2411 };
2412 if (b.complex_tok) |tok| try b.parser.err(tok, .complex_int, .{});
2413 break :blk try base_qt.toComplex(b.parser.comp);
2414 },
2415
2416 .bit_int, .sbit_int, .ubit_int, .complex_bit_int, .complex_ubit_int, .complex_sbit_int => |bits| blk: {
2417 const unsigned = b.type == .ubit_int or b.type == .complex_ubit_int;
2418 const complex = b.type == .complex_bit_int or b.type == .complex_ubit_int or b.type == .complex_sbit_int;
2419 const complex_str = if (complex) "_Complex " else "";
2420
2421 if (unsigned) {
2422 if (bits < 1) {
2423 try b.parser.err(b.bit_int_tok.?, .unsigned_bit_int_too_small, .{complex_str});
2424 return .invalid;
2425 }
2426 } else {
2427 if (bits < 2) {
2428 try b.parser.err(b.bit_int_tok.?, .signed_bit_int_too_small, .{complex_str});
2429 return .invalid;
2430 }
2431 }
2432 if (bits > Compilation.bit_int_max_bits) {
2433 try b.parser.err(b.bit_int_tok.?, if (unsigned) .unsigned_bit_int_too_big else .signed_bit_int_too_big, .{complex_str});
2434 return .invalid;
2435 }
2436 if (b.complex_tok) |tok| try b.parser.err(tok, .complex_int, .{});
2437
2438 const qt = try b.parser.comp.type_store.put(b.parser.gpa, .{ .bit_int = .{
2439 .signedness = if (unsigned) .unsigned else .signed,
2440 .bits = @intCast(bits),
2441 } });
2442 break :blk if (complex) try qt.toComplex(b.parser.comp) else qt;
2443 },
2444
2445 .fp16 => .fp16,
2446 .float16 => .float16,
2447 .float => .float,
2448 .double => .double,
2449 .long_double => .long_double,
2450 .float128 => .float128,
2451
2452 .complex_float16,
2453 .complex_float,
2454 .complex_double,
2455 .complex_long_double,
2456 .complex_float128,
2457 .complex,
2458 => blk: {
2459 const base_qt: QualType = switch (b.type) {
2460 .complex_float16 => .float16,
2461 .complex_float => .float,
2462 .complex_double => .double,
2463 .complex_long_double => .long_double,
2464 .complex_float128 => .float128,
2465 .complex => .double,
2466 else => unreachable,
2467 };
2468 if (b.type == .complex) try b.parser.err(b.parser.tok_i - 1, .plain_complex, .{});
2469 break :blk try base_qt.toComplex(b.parser.comp);
2470 },
2471
2472 .other => |qt| qt,
2473 };
2474 return b.finishQuals(qt);
2475 }
2476
2477 pub fn finishQuals(b: Builder, qt: QualType) !QualType {
2478 if (qt.isInvalid()) return .invalid;
2479 var result_qt = qt;
2480 if (b.atomic_type orelse b.atomic) |atomic_tok| {
2481 if (result_qt.isAutoType()) return b.parser.todo("_Atomic __auto_type");
2482 if (result_qt.isC23Auto()) {
2483 try b.parser.err(atomic_tok, .atomic_auto, .{});
2484 return .invalid;
2485 }
2486 if (result_qt.hasIncompleteSize(b.parser.comp)) {
2487 try b.parser.err(atomic_tok, .atomic_incomplete, .{qt});
2488 return .invalid;
2489 }
2490 switch (result_qt.base(b.parser.comp).type) {
2491 .array => {
2492 try b.parser.err(atomic_tok, .atomic_array, .{qt});
2493 return .invalid;
2494 },
2495 .func => {
2496 try b.parser.err(atomic_tok, .atomic_func, .{qt});
2497 return .invalid;
2498 },
2499 .atomic => {
2500 try b.parser.err(atomic_tok, .atomic_atomic, .{qt});
2501 return .invalid;
2502 },
2503 .complex => {
2504 try b.parser.err(atomic_tok, .atomic_complex, .{qt});
2505 return .invalid;
2506 },
2507 else => {
2508 result_qt = try b.parser.comp.type_store.put(b.parser.gpa, .{ .atomic = result_qt });
2509 },
2510 }
2511 }
2512
2513 // We can't use `qt.isPointer()` because `qt` might contain a `.declarator_combine`.
2514 const is_pointer = qt.isAutoType() or qt.isC23Auto() or qt.base(b.parser.comp).type == .pointer;
2515
2516 if (b.unaligned != null and !is_pointer) {
2517 result_qt = (try b.parser.comp.type_store.put(b.parser.gpa, .{ .attributed = .{
2518 .base = result_qt,
2519 .attributes = &.{.{ .tag = .unaligned, .args = .{ .unaligned = .{} }, .syntax = .keyword }},
2520 } })).withQualifiers(result_qt);
2521 }
2522 switch (b.nullability) {
2523 .none => {},
2524 .nonnull,
2525 .nullable,
2526 .nullable_result,
2527 .null_unspecified,
2528 => |tok| if (!is_pointer) {
2529 // TODO this should be checked later so that auto types can be properly validated.
2530 try b.parser.err(tok, .invalid_nullability, .{qt});
2531 },
2532 }
2533
2534 if (b.@"const" != null) result_qt.@"const" = true;
2535 if (b.@"volatile" != null) result_qt.@"volatile" = true;
2536
2537 if (b.restrict) |restrict_tok| {
2538 if (result_qt.isAutoType()) return b.parser.todo("restrict __auto_type");
2539 if (result_qt.isC23Auto()) {
2540 try b.parser.err(restrict_tok, .restrict_non_pointer, .{qt});
2541 return result_qt;
2542 }
2543 switch (qt.base(b.parser.comp).type) {
2544 .array, .pointer => result_qt.restrict = true,
2545 else => {
2546 try b.parser.err(restrict_tok, .restrict_non_pointer, .{qt});
2547 },
2548 }
2549 }
2550 return result_qt;
2551 }
2552
2553 fn cannotCombine(b: Builder, source_tok: TokenIndex) !void {
2554 if (b.type.str(b.parser.comp.langopts)) |some| {
2555 return b.parser.err(source_tok, .cannot_combine_spec, .{some});
2556 }
2557 try b.parser.err(source_tok, .cannot_combine_spec_qt, .{try b.finish()});
2558 }
2559
2560 fn duplicateSpec(b: *Builder, source_tok: TokenIndex, spec: []const u8) !void {
2561 if (b.parser.comp.langopts.emulate != .clang) return b.cannotCombine(source_tok);
2562 try b.parser.err(b.parser.tok_i, .duplicate_decl_spec, .{spec});
2563 }
2564
2565 pub fn combineFromTypeof(b: *Builder, new: QualType, source_tok: TokenIndex) Compilation.Error!void {
2566 if (b.atomic_type != null) return b.parser.err(source_tok, .cannot_combine_spec, .{"_Atomic"});
2567 if (b.typedef) return b.parser.err(source_tok, .cannot_combine_spec, .{"type-name"});
2568 if (b.typeof) return b.parser.err(source_tok, .cannot_combine_spec, .{"typeof"});
2569 if (b.type != .none) return b.parser.err(source_tok, .cannot_combine_with_typeof, .{@tagName(b.type)});
2570 b.typeof = true;
2571 b.type = .{ .other = new };
2572 }
2573
2574 pub fn combineAtomic(b: *Builder, base_qt: QualType, source_tok: TokenIndex) !void {
2575 if (b.atomic_type != null) return b.parser.err(source_tok, .cannot_combine_spec, .{"_Atomic"});
2576 if (b.typedef) return b.parser.err(source_tok, .cannot_combine_spec, .{"type-name"});
2577 if (b.typeof) return b.parser.err(source_tok, .cannot_combine_spec, .{"typeof"});
2578
2579 const new_spec = TypeStore.Builder.fromType(b.parser.comp, base_qt);
2580 try b.combine(new_spec, source_tok);
2581
2582 b.atomic_type = source_tok;
2583 }
2584
2585 /// Try to combine type from typedef, returns true if successful.
2586 pub fn combineTypedef(b: *Builder, typedef_qt: QualType) bool {
2587 if (b.type != .none) return false;
2588
2589 b.typedef = true;
2590 b.type = .{ .other = typedef_qt };
2591 return true;
2592 }
2593
2594 pub fn combine(b: *Builder, new: Builder.Specifier, source_tok: TokenIndex) !void {
2595 if (b.typeof) {
2596 return b.parser.err(source_tok, .cannot_combine_with_typeof, .{@tagName(new)});
2597 }
2598 if (b.atomic_type != null) {
2599 return b.parser.err(source_tok, .cannot_combine_spec, .{"_Atomic"});
2600 }
2601 if (b.typedef) {
2602 return b.parser.err(source_tok, .cannot_combine_spec, .{"type-name"});
2603 }
2604 if (b.type == .other and b.type.other.isInvalid()) return;
2605
2606 switch (new) {
2607 .complex => b.complex_tok = source_tok,
2608 .bit_int => b.bit_int_tok = source_tok,
2609 else => {},
2610 }
2611
2612 if (new == .int128 and !target_util.hasInt128(b.parser.comp.target)) {
2613 try b.parser.err(source_tok, .type_not_supported_on_target, .{"__int128"});
2614 }
2615
2616 b.type = switch (new) {
2617 else => switch (b.type) {
2618 .none => new,
2619 else => return b.cannotCombine(source_tok),
2620 },
2621 .signed => switch (b.type) {
2622 .none => .signed,
2623 .char => .schar,
2624 .short => .sshort,
2625 .short_int => .sshort_int,
2626 .int => .sint,
2627 .long => .slong,
2628 .long_int => .slong_int,
2629 .long_long => .slong_long,
2630 .long_long_int => .slong_long_int,
2631 .int128 => .sint128,
2632 .bit_int => |bits| .{ .sbit_int = bits },
2633 .complex => .complex_signed,
2634 .complex_char => .complex_schar,
2635 .complex_short => .complex_sshort,
2636 .complex_short_int => .complex_sshort_int,
2637 .complex_int => .complex_sint,
2638 .complex_long => .complex_slong,
2639 .complex_long_int => .complex_slong_int,
2640 .complex_long_long => .complex_slong_long,
2641 .complex_long_long_int => .complex_slong_long_int,
2642 .complex_int128 => .sint128,
2643 .complex_bit_int => |bits| .{ .complex_sbit_int = bits },
2644 .signed,
2645 .sshort,
2646 .sshort_int,
2647 .sint,
2648 .slong,
2649 .slong_int,
2650 .slong_long,
2651 .slong_long_int,
2652 .sint128,
2653 .sbit_int,
2654 .complex_schar,
2655 .complex_signed,
2656 .complex_sshort,
2657 .complex_sshort_int,
2658 .complex_sint,
2659 .complex_slong,
2660 .complex_slong_int,
2661 .complex_slong_long,
2662 .complex_slong_long_int,
2663 .complex_sint128,
2664 .complex_sbit_int,
2665 => return b.duplicateSpec(source_tok, "signed"),
2666 else => return b.cannotCombine(source_tok),
2667 },
2668 .unsigned => switch (b.type) {
2669 .none => .unsigned,
2670 .char => .uchar,
2671 .short => .ushort,
2672 .short_int => .ushort_int,
2673 .int => .uint,
2674 .long => .ulong,
2675 .long_int => .ulong_int,
2676 .long_long => .ulong_long,
2677 .long_long_int => .ulong_long_int,
2678 .int128 => .uint128,
2679 .bit_int => |bits| .{ .ubit_int = bits },
2680 .complex => .complex_unsigned,
2681 .complex_char => .complex_uchar,
2682 .complex_short => .complex_ushort,
2683 .complex_short_int => .complex_ushort_int,
2684 .complex_int => .complex_uint,
2685 .complex_long => .complex_ulong,
2686 .complex_long_int => .complex_ulong_int,
2687 .complex_long_long => .complex_ulong_long,
2688 .complex_long_long_int => .complex_ulong_long_int,
2689 .complex_int128 => .complex_uint128,
2690 .complex_bit_int => |bits| .{ .complex_ubit_int = bits },
2691 .unsigned,
2692 .ushort,
2693 .ushort_int,
2694 .uint,
2695 .ulong,
2696 .ulong_int,
2697 .ulong_long,
2698 .ulong_long_int,
2699 .uint128,
2700 .ubit_int,
2701 .complex_uchar,
2702 .complex_unsigned,
2703 .complex_ushort,
2704 .complex_ushort_int,
2705 .complex_uint,
2706 .complex_ulong,
2707 .complex_ulong_int,
2708 .complex_ulong_long,
2709 .complex_ulong_long_int,
2710 .complex_uint128,
2711 .complex_ubit_int,
2712 => return b.duplicateSpec(source_tok, "unsigned"),
2713 else => return b.cannotCombine(source_tok),
2714 },
2715 .char => switch (b.type) {
2716 .none => .char,
2717 .unsigned => .uchar,
2718 .signed => .schar,
2719 .complex => .complex_char,
2720 .complex_signed => .schar,
2721 .complex_unsigned => .uchar,
2722 else => return b.cannotCombine(source_tok),
2723 },
2724 .short => switch (b.type) {
2725 .none => .short,
2726 .unsigned => .ushort,
2727 .signed => .sshort,
2728 .int => .short_int,
2729 .sint => .sshort_int,
2730 .uint => .ushort_int,
2731 .complex => .complex_short,
2732 .complex_signed => .sshort,
2733 .complex_unsigned => .ushort,
2734 else => return b.cannotCombine(source_tok),
2735 },
2736 .int => switch (b.type) {
2737 .none => .int,
2738 .signed => .sint,
2739 .unsigned => .uint,
2740 .short => .short_int,
2741 .sshort => .sshort_int,
2742 .ushort => .ushort_int,
2743 .long => .long_int,
2744 .slong => .slong_int,
2745 .ulong => .ulong_int,
2746 .long_long => .long_long_int,
2747 .slong_long => .slong_long_int,
2748 .ulong_long => .ulong_long_int,
2749 .complex => .complex_int,
2750 .complex_signed => .complex_sint,
2751 .complex_unsigned => .complex_uint,
2752 .complex_short => .complex_short_int,
2753 .complex_sshort => .complex_sshort_int,
2754 .complex_ushort => .complex_ushort_int,
2755 .complex_long => .complex_long_int,
2756 .complex_slong => .complex_slong_int,
2757 .complex_ulong => .complex_ulong_int,
2758 .complex_long_long => .complex_long_long_int,
2759 .complex_slong_long => .complex_slong_long_int,
2760 .complex_ulong_long => .complex_ulong_long_int,
2761 else => return b.cannotCombine(source_tok),
2762 },
2763 .long => switch (b.type) {
2764 .none => .long,
2765 .double => .long_double,
2766 .unsigned => .ulong,
2767 .signed => .slong,
2768 .int => .long_int,
2769 .uint => .ulong_int,
2770 .sint => .slong_int,
2771 .long => .long_long,
2772 .slong => .slong_long,
2773 .ulong => .ulong_long,
2774 .complex => .complex_long,
2775 .complex_signed => .complex_slong,
2776 .complex_unsigned => .complex_ulong,
2777 .complex_long => .complex_long_long,
2778 .complex_slong => .complex_slong_long,
2779 .complex_ulong => .complex_ulong_long,
2780 .complex_double => .complex_long_double,
2781 else => return b.cannotCombine(source_tok),
2782 },
2783 .long_long => switch (b.type) {
2784 .none => .long_long,
2785 .unsigned => .ulong_long,
2786 .signed => .slong_long,
2787 .int => .long_long_int,
2788 .sint => .slong_long_int,
2789 .long => .long_long,
2790 .slong => .slong_long,
2791 .ulong => .ulong_long,
2792 .complex => .complex_long,
2793 .complex_signed => .complex_slong_long,
2794 .complex_unsigned => .complex_ulong_long,
2795 .complex_long => .complex_long_long,
2796 .complex_slong => .complex_slong_long,
2797 .complex_ulong => .complex_ulong_long,
2798 .long_long,
2799 .ulong_long,
2800 .ulong_long_int,
2801 .complex_long_long,
2802 .complex_ulong_long,
2803 .complex_ulong_long_int,
2804 => return b.duplicateSpec(source_tok, "long"),
2805 else => return b.cannotCombine(source_tok),
2806 },
2807 .int128 => switch (b.type) {
2808 .none => .int128,
2809 .unsigned => .uint128,
2810 .signed => .sint128,
2811 .complex => .complex_int128,
2812 .complex_signed => .complex_sint128,
2813 .complex_unsigned => .complex_uint128,
2814 else => return b.cannotCombine(source_tok),
2815 },
2816 .bit_int => switch (b.type) {
2817 .none => .{ .bit_int = new.bit_int },
2818 .unsigned => .{ .ubit_int = new.bit_int },
2819 .signed => .{ .sbit_int = new.bit_int },
2820 .complex => .{ .complex_bit_int = new.bit_int },
2821 .complex_signed => .{ .complex_sbit_int = new.bit_int },
2822 .complex_unsigned => .{ .complex_ubit_int = new.bit_int },
2823 else => return b.cannotCombine(source_tok),
2824 },
2825 .auto_type => switch (b.type) {
2826 .none => .auto_type,
2827 else => return b.cannotCombine(source_tok),
2828 },
2829 .c23_auto => switch (b.type) {
2830 .none => .c23_auto,
2831 else => return b.cannotCombine(source_tok),
2832 },
2833 .fp16 => switch (b.type) {
2834 .none => .fp16,
2835 else => return b.cannotCombine(source_tok),
2836 },
2837 .float16 => switch (b.type) {
2838 .none => .float16,
2839 .complex => .complex_float16,
2840 else => return b.cannotCombine(source_tok),
2841 },
2842 .float => switch (b.type) {
2843 .none => .float,
2844 .complex => .complex_float,
2845 else => return b.cannotCombine(source_tok),
2846 },
2847 .double => switch (b.type) {
2848 .none => .double,
2849 .long => .long_double,
2850 .complex_long => .complex_long_double,
2851 .complex => .complex_double,
2852 else => return b.cannotCombine(source_tok),
2853 },
2854 .float128 => switch (b.type) {
2855 .none => .float128,
2856 .complex => .complex_float128,
2857 else => return b.cannotCombine(source_tok),
2858 },
2859 .complex => switch (b.type) {
2860 .none => .complex,
2861 .float16 => .complex_float16,
2862 .float => .complex_float,
2863 .double => .complex_double,
2864 .long_double => .complex_long_double,
2865 .float128 => .complex_float128,
2866 .char => .complex_char,
2867 .schar => .complex_schar,
2868 .uchar => .complex_uchar,
2869 .unsigned => .complex_unsigned,
2870 .signed => .complex_signed,
2871 .short => .complex_short,
2872 .sshort => .complex_sshort,
2873 .ushort => .complex_ushort,
2874 .short_int => .complex_short_int,
2875 .sshort_int => .complex_sshort_int,
2876 .ushort_int => .complex_ushort_int,
2877 .int => .complex_int,
2878 .sint => .complex_sint,
2879 .uint => .complex_uint,
2880 .long => .complex_long,
2881 .slong => .complex_slong,
2882 .ulong => .complex_ulong,
2883 .long_int => .complex_long_int,
2884 .slong_int => .complex_slong_int,
2885 .ulong_int => .complex_ulong_int,
2886 .long_long => .complex_long_long,
2887 .slong_long => .complex_slong_long,
2888 .ulong_long => .complex_ulong_long,
2889 .long_long_int => .complex_long_long_int,
2890 .slong_long_int => .complex_slong_long_int,
2891 .ulong_long_int => .complex_ulong_long_int,
2892 .int128 => .complex_int128,
2893 .sint128 => .complex_sint128,
2894 .uint128 => .complex_uint128,
2895 .bit_int => |bits| .{ .complex_bit_int = bits },
2896 .sbit_int => |bits| .{ .complex_sbit_int = bits },
2897 .ubit_int => |bits| .{ .complex_ubit_int = bits },
2898 .complex,
2899 .complex_float,
2900 .complex_double,
2901 .complex_long_double,
2902 .complex_float128,
2903 .complex_char,
2904 .complex_schar,
2905 .complex_uchar,
2906 .complex_unsigned,
2907 .complex_signed,
2908 .complex_short,
2909 .complex_sshort,
2910 .complex_ushort,
2911 .complex_short_int,
2912 .complex_sshort_int,
2913 .complex_ushort_int,
2914 .complex_int,
2915 .complex_sint,
2916 .complex_uint,
2917 .complex_long,
2918 .complex_slong,
2919 .complex_ulong,
2920 .complex_long_int,
2921 .complex_slong_int,
2922 .complex_ulong_int,
2923 .complex_long_long,
2924 .complex_slong_long,
2925 .complex_ulong_long,
2926 .complex_long_long_int,
2927 .complex_slong_long_int,
2928 .complex_ulong_long_int,
2929 .complex_int128,
2930 .complex_sint128,
2931 .complex_uint128,
2932 .complex_bit_int,
2933 .complex_sbit_int,
2934 .complex_ubit_int,
2935 => return b.duplicateSpec(source_tok, "_Complex"),
2936 else => return b.cannotCombine(source_tok),
2937 },
2938 };
2939 }
2940
2941 pub fn fromType(comp: *const Compilation, qt: QualType) Builder.Specifier {
2942 return switch (qt.base(comp).type) {
2943 .void => .void,
2944 .nullptr_t => .nullptr_t,
2945 .bool => .bool,
2946 .int => |int| switch (int) {
2947 .char => .char,
2948 .schar => .schar,
2949 .uchar => .uchar,
2950 .short => .short,
2951 .ushort => .ushort,
2952 .int => .int,
2953 .uint => .uint,
2954 .long => .long,
2955 .ulong => .ulong,
2956 .long_long => .long_long,
2957 .ulong_long => .ulong_long,
2958 .int128 => .int128,
2959 .uint128 => .uint128,
2960 },
2961 .bit_int => |bit_int| if (bit_int.signedness == .unsigned) {
2962 return .{ .ubit_int = bit_int.bits };
2963 } else {
2964 return .{ .bit_int = bit_int.bits };
2965 },
2966 .float => |float| switch (float) {
2967 .fp16 => .fp16,
2968 .float16 => .float16,
2969 .float => .float,
2970 .double => .double,
2971 .long_double => .long_double,
2972 .float128 => .float128,
2973 },
2974 .complex => |complex| switch (complex.base(comp).type) {
2975 .int => |int| switch (int) {
2976 .char => .complex_char,
2977 .schar => .complex_schar,
2978 .uchar => .complex_uchar,
2979 .short => .complex_short,
2980 .ushort => .complex_ushort,
2981 .int => .complex_int,
2982 .uint => .complex_uint,
2983 .long => .complex_long,
2984 .ulong => .complex_ulong,
2985 .long_long => .complex_long_long,
2986 .ulong_long => .complex_ulong_long,
2987 .int128 => .complex_int128,
2988 .uint128 => .complex_uint128,
2989 },
2990 .bit_int => |bit_int| if (bit_int.signedness == .unsigned) {
2991 return .{ .complex_ubit_int = bit_int.bits };
2992 } else {
2993 return .{ .complex_bit_int = bit_int.bits };
2994 },
2995 .float => |float| switch (float) {
2996 .fp16 => unreachable,
2997 .float16 => .complex_float16,
2998 .float => .complex_float,
2999 .double => .complex_double,
3000 .long_double => .complex_long_double,
3001 .float128 => .complex_float128,
3002 },
3003 else => unreachable,
3004 },
3005 else => .{ .other = qt },
3006 };
3007 }
3008};
lib/compiler/aro/aro/Value.zig+255-117
......@@ -2,14 +2,14 @@ const std = @import("std");
22const assert = std.debug.assert;
33const BigIntConst = std.math.big.int.Const;
44const BigIntMutable = std.math.big.int.Mutable;
5const backend = @import("../backend.zig");
6const Interner = backend.Interner;
5
6const Interner = @import("../backend.zig").Interner;
77const BigIntSpace = Interner.Tag.Int.BigIntSpace;
8
9const annex_g = @import("annex_g.zig");
810const Compilation = @import("Compilation.zig");
9const Type = @import("Type.zig");
1011const target_util = @import("target.zig");
11const annex_g = @import("annex_g.zig");
12const Writer = std.Io.Writer;
12const QualType = @import("TypeStore.zig").QualType;
1313
1414const Value = @This();
1515
......@@ -33,11 +33,19 @@ pub fn int(i: anytype, comp: *Compilation) !Value {
3333 }
3434}
3535
36pub fn pointer(r: Interner.Key.Pointer, comp: *Compilation) !Value {
37 return intern(comp, .{ .pointer = r });
38}
39
3640pub fn ref(v: Value) Interner.Ref {
3741 std.debug.assert(v.opt_ref != .none);
3842 return @enumFromInt(@intFromEnum(v.opt_ref));
3943}
4044
45pub fn fromRef(r: Interner.Ref) Value {
46 return .{ .opt_ref = @enumFromInt(@intFromEnum(r)) };
47}
48
4149pub fn is(v: Value, tag: std.meta.Tag(Interner.Key), comp: *const Compilation) bool {
4250 if (v.opt_ref == .none) return false;
4351 return comp.interner.get(v.ref()) == tag;
......@@ -68,7 +76,11 @@ test "minUnsignedBits" {
6876 }
6977 };
7078
71 var comp = Compilation.init(std.testing.allocator, std.fs.cwd());
79 var arena_state: std.heap.ArenaAllocator = .init(std.testing.allocator);
80 defer arena_state.deinit();
81 const arena = arena_state.allocator();
82
83 var comp = Compilation.init(std.testing.allocator, arena, undefined, std.fs.cwd());
7284 defer comp.deinit();
7385 const target_query = try std.Target.Query.parse(.{ .arch_os_abi = "x86_64-linux-gnu" });
7486 comp.target = try std.zig.system.resolveTargetQuery(target_query);
......@@ -103,7 +115,11 @@ test "minSignedBits" {
103115 }
104116 };
105117
106 var comp = Compilation.init(std.testing.allocator, std.fs.cwd());
118 var arena_state: std.heap.ArenaAllocator = .init(std.testing.allocator);
119 defer arena_state.deinit();
120 const arena = arena_state.allocator();
121
122 var comp = Compilation.init(std.testing.allocator, arena, undefined, std.fs.cwd());
107123 defer comp.deinit();
108124 const target_query = try std.Target.Query.parse(.{ .arch_os_abi = "x86_64-linux-gnu" });
109125 comp.target = try std.zig.system.resolveTargetQuery(target_query);
......@@ -133,24 +149,27 @@ pub const FloatToIntChangeKind = enum {
133149
134150/// Converts the stored value from a float to an integer.
135151/// `.none` value remains unchanged.
136pub fn floatToInt(v: *Value, dest_ty: Type, comp: *Compilation) !FloatToIntChangeKind {
152pub fn floatToInt(v: *Value, dest_ty: QualType, comp: *Compilation) !FloatToIntChangeKind {
137153 if (v.opt_ref == .none) return .none;
138154
139155 const float_val = v.toFloat(f128, comp);
140156 const was_zero = float_val == 0;
141157
142 if (dest_ty.is(.bool)) {
158 if (dest_ty.is(comp, .bool)) {
143159 const was_one = float_val == 1.0;
144160 v.* = fromBool(!was_zero);
145161 if (was_zero or was_one) return .none;
146162 return .value_changed;
147 } else if (dest_ty.isUnsignedInt(comp) and float_val < 0) {
163 } else if (dest_ty.signedness(comp) == .unsigned and float_val < 0) {
148164 v.* = zero;
149165 return .out_of_range;
166 } else if (!std.math.isFinite(float_val)) {
167 v.* = .{};
168 return .overflow;
150169 }
151170
152171 const signedness = dest_ty.signedness(comp);
153 const bits: usize = @intCast(dest_ty.bitSizeof(comp).?);
172 const bits: usize = @intCast(dest_ty.bitSizeof(comp));
154173
155174 var big_int: std.math.big.int.Mutable = .{
156175 .limbs = try comp.gpa.alloc(std.math.big.Limb, @max(
......@@ -160,6 +179,7 @@ pub fn floatToInt(v: *Value, dest_ty: Type, comp: *Compilation) !FloatToIntChang
160179 .len = undefined,
161180 .positive = undefined,
162181 };
182 defer comp.gpa.free(big_int.limbs);
163183 const had_fraction = switch (big_int.setFloat(float_val, .trunc)) {
164184 .inexact => true,
165185 .exact => false,
......@@ -177,11 +197,11 @@ pub fn floatToInt(v: *Value, dest_ty: Type, comp: *Compilation) !FloatToIntChang
177197
178198/// Converts the stored value from an integer to a float.
179199/// `.none` value remains unchanged.
180pub fn intToFloat(v: *Value, dest_ty: Type, comp: *Compilation) !void {
200pub fn intToFloat(v: *Value, dest_ty: QualType, comp: *Compilation) !void {
181201 if (v.opt_ref == .none) return;
182202
183 if (dest_ty.isComplex()) {
184 const bits = dest_ty.bitSizeof(comp).?;
203 if (dest_ty.is(comp, .complex)) {
204 const bits = dest_ty.bitSizeof(comp);
185205 const cf: Interner.Key.Complex = switch (bits) {
186206 32 => .{ .cf16 = .{ v.toFloat(f16, comp), 0 } },
187207 64 => .{ .cf32 = .{ v.toFloat(f32, comp), 0 } },
......@@ -193,7 +213,7 @@ pub fn intToFloat(v: *Value, dest_ty: Type, comp: *Compilation) !void {
193213 v.* = try intern(comp, .{ .complex = cf });
194214 return;
195215 }
196 const bits = dest_ty.bitSizeof(comp).?;
216 const bits = dest_ty.bitSizeof(comp);
197217 return switch (comp.interner.get(v.ref()).int) {
198218 inline .u64, .i64 => |data| {
199219 const f: Interner.Key.Float = switch (bits) {
......@@ -232,14 +252,16 @@ pub const IntCastChangeKind = enum {
232252
233253/// Truncates or extends bits based on type.
234254/// `.none` value remains unchanged.
235pub fn intCast(v: *Value, dest_ty: Type, comp: *Compilation) !IntCastChangeKind {
255pub fn intCast(v: *Value, dest_ty: QualType, comp: *Compilation) !IntCastChangeKind {
236256 if (v.opt_ref == .none) return .none;
257 const key = comp.interner.get(v.ref());
258 if (key == .pointer or key == .bytes) return .none;
237259
238 const dest_bits: usize = @intCast(dest_ty.bitSizeof(comp).?);
260 const dest_bits: usize = @intCast(dest_ty.bitSizeof(comp));
239261 const dest_signed = dest_ty.signedness(comp) == .signed;
240262
241263 var space: BigIntSpace = undefined;
242 const big = v.toBigInt(&space, comp);
264 const big = key.toBigInt(&space);
243265 const value_bits = big.bitCountTwosComp();
244266
245267 // if big is negative, then is signed.
......@@ -269,10 +291,10 @@ pub fn intCast(v: *Value, dest_ty: Type, comp: *Compilation) !IntCastChangeKind
269291
270292/// Converts the stored value to a float of the specified type
271293/// `.none` value remains unchanged.
272pub fn floatCast(v: *Value, dest_ty: Type, comp: *Compilation) !void {
294pub fn floatCast(v: *Value, dest_ty: QualType, comp: *Compilation) !void {
273295 if (v.opt_ref == .none) return;
274 const bits = dest_ty.bitSizeof(comp).?;
275 if (dest_ty.isComplex()) {
296 const bits = dest_ty.bitSizeof(comp);
297 if (dest_ty.is(comp, .complex)) {
276298 const cf: Interner.Key.Complex = switch (bits) {
277299 32 => .{ .cf16 = .{ v.toFloat(f16, comp), v.imag(f16, comp) } },
278300 64 => .{ .cf32 = .{ v.toFloat(f32, comp), v.imag(f32, comp) } },
......@@ -370,11 +392,8 @@ fn bigIntToFloat(limbs: []const std.math.big.Limb, positive: bool) f128 {
370392 }
371393}
372394
373pub fn toBigInt(val: Value, space: *BigIntSpace, comp: *const Compilation) BigIntConst {
374 return switch (comp.interner.get(val.ref()).int) {
375 inline .u64, .i64 => |x| BigIntMutable.init(&space.limbs, x).toConst(),
376 .big_int => |b| b,
377 };
395fn toBigInt(val: Value, space: *BigIntSpace, comp: *const Compilation) BigIntConst {
396 return comp.interner.get(val.ref()).toBigInt(space);
378397}
379398
380399pub fn isZero(v: Value, comp: *const Compilation) bool {
......@@ -398,6 +417,7 @@ pub fn isZero(v: Value, comp: *const Compilation) bool {
398417 inline else => |data| return data[0] == 0.0 and data[1] == 0.0,
399418 },
400419 .bytes => return false,
420 .pointer => return false,
401421 else => unreachable,
402422 }
403423}
......@@ -461,12 +481,19 @@ pub fn toBool(v: Value, comp: *const Compilation) bool {
461481
462482pub fn toInt(v: Value, comptime T: type, comp: *const Compilation) ?T {
463483 if (v.opt_ref == .none) return null;
464 if (comp.interner.get(v.ref()) != .int) return null;
484 const key = comp.interner.get(v.ref());
485 if (key != .int) return null;
465486 var space: BigIntSpace = undefined;
466 const big_int = v.toBigInt(&space, comp);
487 const big_int = key.toBigInt(&space);
467488 return big_int.toInt(T) catch null;
468489}
469490
491pub fn toBytes(v: Value, comp: *const Compilation) []const u8 {
492 assert(v.opt_ref != .none);
493 const key = comp.interner.get(v.ref());
494 return key.bytes;
495}
496
470497const ComplexOp = enum {
471498 add,
472499 sub,
......@@ -492,10 +519,11 @@ fn complexAddSub(lhs: Value, rhs: Value, comptime T: type, op: ComplexOp, comp:
492519 };
493520}
494521
495pub fn add(res: *Value, lhs: Value, rhs: Value, ty: Type, comp: *Compilation) !bool {
496 const bits: usize = @intCast(ty.bitSizeof(comp).?);
497 if (ty.isFloat()) {
498 if (ty.isComplex()) {
522pub fn add(res: *Value, lhs: Value, rhs: Value, qt: QualType, comp: *Compilation) !bool {
523 const bits: usize = @intCast(qt.bitSizeof(comp));
524 const scalar_kind = qt.scalarKind(comp);
525 if (scalar_kind.isFloat()) {
526 if (scalar_kind == .complex_float) {
499527 res.* = switch (bits) {
500528 32 => try complexAddSub(lhs, rhs, f16, .add, comp),
501529 64 => try complexAddSub(lhs, rhs, f32, .add, comp),
......@@ -516,29 +544,60 @@ pub fn add(res: *Value, lhs: Value, rhs: Value, ty: Type, comp: *Compilation) !b
516544 };
517545 res.* = try intern(comp, .{ .float = f });
518546 return false;
519 } else {
520 var lhs_space: BigIntSpace = undefined;
521 var rhs_space: BigIntSpace = undefined;
522 const lhs_bigint = lhs.toBigInt(&lhs_space, comp);
523 const rhs_bigint = rhs.toBigInt(&rhs_space, comp);
547 }
548 const lhs_key = comp.interner.get(lhs.ref());
549 const rhs_key = comp.interner.get(rhs.ref());
550 if (lhs_key == .bytes or rhs_key == .bytes) {
551 res.* = .{};
552 return false;
553 }
554 if (lhs_key == .pointer or rhs_key == .pointer) {
555 const rel, const index = if (lhs_key == .pointer)
556 .{ lhs_key.pointer, rhs }
557 else
558 .{ rhs_key.pointer, lhs };
559
560 const elem_size = try int(qt.childType(comp).sizeofOrNull(comp) orelse 1, comp);
561 var total_offset: Value = undefined;
562 const mul_overflow = try total_offset.mul(elem_size, index, comp.type_store.ptrdiff, comp);
563 const old_offset = fromRef(rel.offset);
564 const add_overflow = try total_offset.add(total_offset, old_offset, comp.type_store.ptrdiff, comp);
565 _ = try total_offset.intCast(comp.type_store.ptrdiff, comp);
566 res.* = try pointer(.{ .node = rel.node, .offset = total_offset.ref() }, comp);
567 return mul_overflow or add_overflow;
568 }
524569
525 const limbs = try comp.gpa.alloc(
526 std.math.big.Limb,
527 std.math.big.int.calcTwosCompLimbCount(bits),
528 );
529 defer comp.gpa.free(limbs);
530 var result_bigint = BigIntMutable{ .limbs = limbs, .positive = undefined, .len = undefined };
570 var lhs_space: BigIntSpace = undefined;
571 var rhs_space: BigIntSpace = undefined;
572 const lhs_bigint = lhs_key.toBigInt(&lhs_space);
573 const rhs_bigint = rhs_key.toBigInt(&rhs_space);
531574
532 const overflowed = result_bigint.addWrap(lhs_bigint, rhs_bigint, ty.signedness(comp), bits);
533 res.* = try intern(comp, .{ .int = .{ .big_int = result_bigint.toConst() } });
534 return overflowed;
535 }
575 const limbs = try comp.gpa.alloc(
576 std.math.big.Limb,
577 std.math.big.int.calcTwosCompLimbCount(bits),
578 );
579 defer comp.gpa.free(limbs);
580 var result_bigint = BigIntMutable{ .limbs = limbs, .positive = undefined, .len = undefined };
581
582 const overflowed = result_bigint.addWrap(lhs_bigint, rhs_bigint, qt.signedness(comp), bits);
583 res.* = try intern(comp, .{ .int = .{ .big_int = result_bigint.toConst() } });
584 return overflowed;
585}
586
587pub fn negate(res: *Value, val: Value, qt: QualType, comp: *Compilation) !bool {
588 return res.sub(zero, val, qt, undefined, comp);
589}
590
591pub fn decrement(res: *Value, val: Value, qt: QualType, comp: *Compilation) !bool {
592 return res.sub(val, one, qt, undefined, comp);
536593}
537594
538pub fn sub(res: *Value, lhs: Value, rhs: Value, ty: Type, comp: *Compilation) !bool {
539 const bits: usize = @intCast(ty.bitSizeof(comp).?);
540 if (ty.isFloat()) {
541 if (ty.isComplex()) {
595/// elem_size is only used when subtracting two pointers, so we can scale the result by the size of the element type
596pub fn sub(res: *Value, lhs: Value, rhs: Value, qt: QualType, elem_size: u64, comp: *Compilation) !bool {
597 const bits: usize = @intCast(qt.bitSizeof(comp));
598 const scalar_kind = qt.scalarKind(comp);
599 if (scalar_kind.isFloat()) {
600 if (scalar_kind == .complex_float) {
542601 res.* = switch (bits) {
543602 32 => try complexAddSub(lhs, rhs, f16, .sub, comp),
544603 64 => try complexAddSub(lhs, rhs, f32, .sub, comp),
......@@ -559,29 +618,61 @@ pub fn sub(res: *Value, lhs: Value, rhs: Value, ty: Type, comp: *Compilation) !b
559618 };
560619 res.* = try intern(comp, .{ .float = f });
561620 return false;
562 } else {
563 var lhs_space: BigIntSpace = undefined;
564 var rhs_space: BigIntSpace = undefined;
565 const lhs_bigint = lhs.toBigInt(&lhs_space, comp);
566 const rhs_bigint = rhs.toBigInt(&rhs_space, comp);
567
568 const limbs = try comp.gpa.alloc(
569 std.math.big.Limb,
570 std.math.big.int.calcTwosCompLimbCount(bits),
571 );
572 defer comp.gpa.free(limbs);
573 var result_bigint = BigIntMutable{ .limbs = limbs, .positive = undefined, .len = undefined };
574
575 const overflowed = result_bigint.subWrap(lhs_bigint, rhs_bigint, ty.signedness(comp), bits);
576 res.* = try intern(comp, .{ .int = .{ .big_int = result_bigint.toConst() } });
621 }
622 const lhs_key = comp.interner.get(lhs.ref());
623 const rhs_key = comp.interner.get(rhs.ref());
624 if (lhs_key == .bytes or rhs_key == .bytes) {
625 res.* = .{};
626 return false;
627 }
628 if (lhs_key == .pointer and rhs_key == .pointer) {
629 const lhs_pointer = lhs_key.pointer;
630 const rhs_pointer = rhs_key.pointer;
631 if (lhs_pointer.node != rhs_pointer.node) {
632 res.* = .{};
633 return false;
634 }
635 const lhs_offset = fromRef(lhs_pointer.offset);
636 const rhs_offset = fromRef(rhs_pointer.offset);
637 const overflowed = try res.sub(lhs_offset, rhs_offset, comp.type_store.ptrdiff, undefined, comp);
638 const rhs_size = try int(elem_size, comp);
639 _ = try res.div(res.*, rhs_size, comp.type_store.ptrdiff, comp);
577640 return overflowed;
641 } else if (lhs_key == .pointer) {
642 const rel = lhs_key.pointer;
643
644 const lhs_size = try int(elem_size, comp);
645 var total_offset: Value = undefined;
646 const mul_overflow = try total_offset.mul(lhs_size, rhs, comp.type_store.ptrdiff, comp);
647 const old_offset = fromRef(rel.offset);
648 const add_overflow = try total_offset.sub(old_offset, total_offset, comp.type_store.ptrdiff, undefined, comp);
649 _ = try total_offset.intCast(comp.type_store.ptrdiff, comp);
650 res.* = try pointer(.{ .node = rel.node, .offset = total_offset.ref() }, comp);
651 return mul_overflow or add_overflow;
578652 }
653
654 var lhs_space: BigIntSpace = undefined;
655 var rhs_space: BigIntSpace = undefined;
656 const lhs_bigint = lhs_key.toBigInt(&lhs_space);
657 const rhs_bigint = rhs_key.toBigInt(&rhs_space);
658
659 const limbs = try comp.gpa.alloc(
660 std.math.big.Limb,
661 std.math.big.int.calcTwosCompLimbCount(bits),
662 );
663 defer comp.gpa.free(limbs);
664 var result_bigint = BigIntMutable{ .limbs = limbs, .positive = undefined, .len = undefined };
665
666 const overflowed = result_bigint.subWrap(lhs_bigint, rhs_bigint, qt.signedness(comp), bits);
667 res.* = try intern(comp, .{ .int = .{ .big_int = result_bigint.toConst() } });
668 return overflowed;
579669}
580670
581pub fn mul(res: *Value, lhs: Value, rhs: Value, ty: Type, comp: *Compilation) !bool {
582 const bits: usize = @intCast(ty.bitSizeof(comp).?);
583 if (ty.isFloat()) {
584 if (ty.isComplex()) {
671pub fn mul(res: *Value, lhs: Value, rhs: Value, qt: QualType, comp: *Compilation) !bool {
672 const bits: usize = @intCast(qt.bitSizeof(comp));
673 const scalar_kind = qt.scalarKind(comp);
674 if (scalar_kind.isFloat()) {
675 if (scalar_kind == .complex_float) {
585676 const cf: Interner.Key.Complex = switch (bits) {
586677 32 => .{ .cf16 = annex_g.complexFloatMul(f16, lhs.toFloat(f16, comp), lhs.imag(f16, comp), rhs.toFloat(f16, comp), rhs.imag(f16, comp)) },
587678 64 => .{ .cf32 = annex_g.complexFloatMul(f32, lhs.toFloat(f32, comp), lhs.imag(f32, comp), rhs.toFloat(f32, comp), rhs.imag(f32, comp)) },
......@@ -624,7 +715,7 @@ pub fn mul(res: *Value, lhs: Value, rhs: Value, ty: Type, comp: *Compilation) !b
624715
625716 result_bigint.mul(lhs_bigint, rhs_bigint, limbs_buffer, comp.gpa);
626717
627 const signedness = ty.signedness(comp);
718 const signedness = qt.signedness(comp);
628719 const overflowed = !result_bigint.toConst().fitsInTwosComp(signedness, bits);
629720 if (overflowed) {
630721 result_bigint.truncate(result_bigint.toConst(), signedness, bits);
......@@ -635,10 +726,11 @@ pub fn mul(res: *Value, lhs: Value, rhs: Value, ty: Type, comp: *Compilation) !b
635726}
636727
637728/// caller guarantees rhs != 0
638pub fn div(res: *Value, lhs: Value, rhs: Value, ty: Type, comp: *Compilation) !bool {
639 const bits: usize = @intCast(ty.bitSizeof(comp).?);
640 if (ty.isFloat()) {
641 if (ty.isComplex()) {
729pub fn div(res: *Value, lhs: Value, rhs: Value, qt: QualType, comp: *Compilation) !bool {
730 const bits: usize = @intCast(qt.bitSizeof(comp));
731 const scalar_kind = qt.scalarKind(comp);
732 if (scalar_kind.isFloat()) {
733 if (scalar_kind == .complex_float) {
642734 const cf: Interner.Key.Complex = switch (bits) {
643735 32 => .{ .cf16 = annex_g.complexFloatDiv(f16, lhs.toFloat(f16, comp), lhs.imag(f16, comp), rhs.toFloat(f16, comp), rhs.imag(f16, comp)) },
644736 64 => .{ .cf32 = annex_g.complexFloatDiv(f32, lhs.toFloat(f32, comp), lhs.imag(f32, comp), rhs.toFloat(f32, comp), rhs.imag(f32, comp)) },
......@@ -689,22 +781,21 @@ pub fn div(res: *Value, lhs: Value, rhs: Value, ty: Type, comp: *Compilation) !b
689781 result_q.divTrunc(&result_r, lhs_bigint, rhs_bigint, limbs_buffer);
690782
691783 res.* = try intern(comp, .{ .int = .{ .big_int = result_q.toConst() } });
692 return !result_q.toConst().fitsInTwosComp(ty.signedness(comp), bits);
784 return !result_q.toConst().fitsInTwosComp(qt.signedness(comp), bits);
693785 }
694786}
695787
696788/// caller guarantees rhs != 0
697789/// caller guarantees lhs != std.math.minInt(T) OR rhs != -1
698pub fn rem(lhs: Value, rhs: Value, ty: Type, comp: *Compilation) !Value {
790pub fn rem(lhs: Value, rhs: Value, qt: QualType, comp: *Compilation) !Value {
699791 var lhs_space: BigIntSpace = undefined;
700792 var rhs_space: BigIntSpace = undefined;
701793 const lhs_bigint = lhs.toBigInt(&lhs_space, comp);
702794 const rhs_bigint = rhs.toBigInt(&rhs_space, comp);
703795
704 const signedness = ty.signedness(comp);
705 if (signedness == .signed) {
796 if (qt.signedness(comp) == .signed) {
706797 var spaces: [2]BigIntSpace = undefined;
707 const min_val = try Value.minInt(ty, comp);
798 const min_val = try Value.minInt(qt, comp);
708799 const negative = BigIntMutable.init(&spaces[0].limbs, -1).toConst();
709800 const big_one = BigIntMutable.init(&spaces[1].limbs, 1).toConst();
710801 if (lhs.compare(.eq, min_val, comp) and rhs_bigint.eql(negative)) {
......@@ -712,9 +803,9 @@ pub fn rem(lhs: Value, rhs: Value, ty: Type, comp: *Compilation) !Value {
712803 } else if (rhs_bigint.order(big_one).compare(.lt)) {
713804 // lhs - @divTrunc(lhs, rhs) * rhs
714805 var tmp: Value = undefined;
715 _ = try tmp.div(lhs, rhs, ty, comp);
716 _ = try tmp.mul(tmp, rhs, ty, comp);
717 _ = try tmp.sub(lhs, tmp, ty, comp);
806 _ = try tmp.div(lhs, rhs, qt, comp);
807 _ = try tmp.mul(tmp, rhs, qt, comp);
808 _ = try tmp.sub(lhs, tmp, qt, undefined, comp);
718809 return tmp;
719810 }
720811 }
......@@ -801,8 +892,8 @@ pub fn bitAnd(lhs: Value, rhs: Value, comp: *Compilation) !Value {
801892 return intern(comp, .{ .int = .{ .big_int = result_bigint.toConst() } });
802893}
803894
804pub fn bitNot(val: Value, ty: Type, comp: *Compilation) !Value {
805 const bits: usize = @intCast(ty.bitSizeof(comp).?);
895pub fn bitNot(val: Value, qt: QualType, comp: *Compilation) !Value {
896 const bits: usize = @intCast(qt.bitSizeof(comp));
806897 var val_space: Value.BigIntSpace = undefined;
807898 const val_bigint = val.toBigInt(&val_space, comp);
808899
......@@ -813,21 +904,21 @@ pub fn bitNot(val: Value, ty: Type, comp: *Compilation) !Value {
813904 defer comp.gpa.free(limbs);
814905 var result_bigint = BigIntMutable{ .limbs = limbs, .positive = undefined, .len = undefined };
815906
816 result_bigint.bitNotWrap(val_bigint, ty.signedness(comp), bits);
907 result_bigint.bitNotWrap(val_bigint, qt.signedness(comp), bits);
817908 return intern(comp, .{ .int = .{ .big_int = result_bigint.toConst() } });
818909}
819910
820pub fn shl(res: *Value, lhs: Value, rhs: Value, ty: Type, comp: *Compilation) !bool {
911pub fn shl(res: *Value, lhs: Value, rhs: Value, qt: QualType, comp: *Compilation) !bool {
821912 var lhs_space: Value.BigIntSpace = undefined;
822913 const lhs_bigint = lhs.toBigInt(&lhs_space, comp);
823914 const shift = rhs.toInt(usize, comp) orelse std.math.maxInt(usize);
824915
825 const bits: usize = @intCast(ty.bitSizeof(comp).?);
916 const bits: usize = @intCast(qt.bitSizeof(comp));
826917 if (shift > bits) {
827918 if (lhs_bigint.positive) {
828 res.* = try Value.maxInt(ty, comp);
919 res.* = try Value.maxInt(qt, comp);
829920 } else {
830 res.* = try Value.minInt(ty, comp);
921 res.* = try Value.minInt(qt, comp);
831922 }
832923 return true;
833924 }
......@@ -840,7 +931,7 @@ pub fn shl(res: *Value, lhs: Value, rhs: Value, ty: Type, comp: *Compilation) !b
840931 var result_bigint = BigIntMutable{ .limbs = limbs, .positive = undefined, .len = undefined };
841932
842933 result_bigint.shiftLeft(lhs_bigint, shift);
843 const signedness = ty.signedness(comp);
934 const signedness = qt.signedness(comp);
844935 const overflowed = !result_bigint.toConst().fitsInTwosComp(signedness, bits);
845936 if (overflowed) {
846937 result_bigint.truncate(result_bigint.toConst(), signedness, bits);
......@@ -849,7 +940,7 @@ pub fn shl(res: *Value, lhs: Value, rhs: Value, ty: Type, comp: *Compilation) !b
849940 return overflowed;
850941}
851942
852pub fn shr(lhs: Value, rhs: Value, ty: Type, comp: *Compilation) !Value {
943pub fn shr(lhs: Value, rhs: Value, qt: QualType, comp: *Compilation) !Value {
853944 var lhs_space: Value.BigIntSpace = undefined;
854945 const lhs_bigint = lhs.toBigInt(&lhs_space, comp);
855946 const shift = rhs.toInt(usize, comp) orelse return zero;
......@@ -865,7 +956,7 @@ pub fn shr(lhs: Value, rhs: Value, ty: Type, comp: *Compilation) !Value {
865956 }
866957 }
867958
868 const bits: usize = @intCast(ty.bitSizeof(comp).?);
959 const bits: usize = @intCast(qt.bitSizeof(comp));
869960 const limbs = try comp.gpa.alloc(
870961 std.math.big.Limb,
871962 std.math.big.int.calcTwosCompLimbCount(bits),
......@@ -877,8 +968,8 @@ pub fn shr(lhs: Value, rhs: Value, ty: Type, comp: *Compilation) !Value {
877968 return intern(comp, .{ .int = .{ .big_int = result_bigint.toConst() } });
878969}
879970
880pub fn complexConj(val: Value, ty: Type, comp: *Compilation) !Value {
881 const bits = ty.bitSizeof(comp).?;
971pub fn complexConj(val: Value, qt: QualType, comp: *Compilation) !Value {
972 const bits = qt.bitSizeof(comp);
882973 const cf: Interner.Key.Complex = switch (bits) {
883974 32 => .{ .cf16 = .{ val.toFloat(f16, comp), -val.imag(f16, comp) } },
884975 64 => .{ .cf32 = .{ val.toFloat(f32, comp), -val.imag(f32, comp) } },
......@@ -890,12 +981,17 @@ pub fn complexConj(val: Value, ty: Type, comp: *Compilation) !Value {
890981 return intern(comp, .{ .complex = cf });
891982}
892983
893pub fn compare(lhs: Value, op: std.math.CompareOperator, rhs: Value, comp: *const Compilation) bool {
984fn shallowCompare(lhs: Value, op: std.math.CompareOperator, rhs: Value) ?bool {
894985 if (op == .eq) {
895986 return lhs.opt_ref == rhs.opt_ref;
896987 } else if (lhs.opt_ref == rhs.opt_ref) {
897988 return std.math.Order.eq.compare(op);
898989 }
990 return null;
991}
992
993pub fn compare(lhs: Value, op: std.math.CompareOperator, rhs: Value, comp: *const Compilation) bool {
994 if (lhs.shallowCompare(op, rhs)) |val| return val;
899995
900996 const lhs_key = comp.interner.get(lhs.ref());
901997 const rhs_key = comp.interner.get(rhs.ref());
......@@ -918,10 +1014,33 @@ pub fn compare(lhs: Value, op: std.math.CompareOperator, rhs: Value, comp: *cons
9181014 return lhs_bigint.order(rhs_bigint).compare(op);
9191015}
9201016
921fn twosCompIntLimit(limit: std.math.big.int.TwosCompIntLimit, ty: Type, comp: *Compilation) !Value {
922 const signedness = ty.signedness(comp);
1017/// Returns null for values that cannot be compared at compile time (e.g. `&x < &y`) for globals `x` and `y`.
1018pub fn comparePointers(lhs: Value, op: std.math.CompareOperator, rhs: Value, comp: *const Compilation) ?bool {
1019 if (lhs.shallowCompare(op, rhs)) |val| return val;
1020
1021 const lhs_key = comp.interner.get(lhs.ref());
1022 const rhs_key = comp.interner.get(rhs.ref());
1023
1024 if (lhs_key == .pointer and rhs_key == .pointer) {
1025 const lhs_pointer = lhs_key.pointer;
1026 const rhs_pointer = rhs_key.pointer;
1027 switch (op) {
1028 .eq => if (lhs_pointer.node != rhs_pointer.node) return false,
1029 .neq => if (lhs_pointer.node != rhs_pointer.node) return true,
1030 else => if (lhs_pointer.node != rhs_pointer.node) return null,
1031 }
1032
1033 const lhs_offset = fromRef(lhs_pointer.offset);
1034 const rhs_offset = fromRef(rhs_pointer.offset);
1035 return lhs_offset.compare(op, rhs_offset, comp);
1036 }
1037 return null;
1038}
1039
1040fn twosCompIntLimit(limit: std.math.big.int.TwosCompIntLimit, qt: QualType, comp: *Compilation) !Value {
1041 const signedness = qt.signedness(comp);
9231042 if (limit == .min and signedness == .unsigned) return Value.zero;
924 const mag_bits: usize = @intCast(ty.bitSizeof(comp).?);
1043 const mag_bits: usize = @intCast(qt.bitSizeof(comp));
9251044 switch (mag_bits) {
9261045 inline 8, 16, 32, 64 => |bits| {
9271046 if (limit == .min) return Value.int(@as(i64, std.math.minInt(std.meta.Int(.signed, bits))), comp);
......@@ -946,44 +1065,63 @@ fn twosCompIntLimit(limit: std.math.big.int.TwosCompIntLimit, ty: Type, comp: *C
9461065 return Value.intern(comp, .{ .int = .{ .big_int = result_bigint.toConst() } });
9471066}
9481067
949pub fn minInt(ty: Type, comp: *Compilation) !Value {
950 return twosCompIntLimit(.min, ty, comp);
1068pub fn minInt(qt: QualType, comp: *Compilation) !Value {
1069 return twosCompIntLimit(.min, qt, comp);
1070}
1071
1072pub fn maxInt(qt: QualType, comp: *Compilation) !Value {
1073 return twosCompIntLimit(.max, qt, comp);
9511074}
9521075
953pub fn maxInt(ty: Type, comp: *Compilation) !Value {
954 return twosCompIntLimit(.max, ty, comp);
1076const NestedPrint = union(enum) {
1077 pointer: struct {
1078 node: u32,
1079 offset: Value,
1080 },
1081};
1082
1083pub fn printPointer(offset: Value, base: []const u8, comp: *const Compilation, w: *std.Io.Writer) std.Io.Writer.Error!void {
1084 try w.writeByte('&');
1085 try w.writeAll(base);
1086 if (!offset.isZero(comp)) {
1087 const maybe_nested = try offset.print(comp.type_store.ptrdiff, comp, w);
1088 std.debug.assert(maybe_nested == null);
1089 }
9551090}
9561091
957pub fn print(v: Value, ty: Type, comp: *const Compilation, w: *Writer) Writer.Error!void {
958 if (ty.is(.bool)) {
959 return w.writeAll(if (v.isZero(comp)) "false" else "true");
1092pub fn print(v: Value, qt: QualType, comp: *const Compilation, w: *std.Io.Writer) std.Io.Writer.Error!?NestedPrint {
1093 if (qt.is(comp, .bool)) {
1094 try w.writeAll(if (v.isZero(comp)) "false" else "true");
1095 return null;
9601096 }
9611097 const key = comp.interner.get(v.ref());
9621098 switch (key) {
963 .null => return w.writeAll("nullptr_t"),
1099 .null => try w.writeAll("nullptr_t"),
9641100 .int => |repr| switch (repr) {
965 inline .u64, .i64, .big_int => |x| return w.print("{d}", .{x}),
1101 inline else => |x| try w.print("{d}", .{x}),
9661102 },
9671103 .float => |repr| switch (repr) {
968 .f16 => |x| return w.print("{d}", .{@round(@as(f64, @floatCast(x)) * 1000) / 1000}),
969 .f32 => |x| return w.print("{d}", .{@round(@as(f64, @floatCast(x)) * 1000000) / 1000000}),
970 inline else => |x| return w.print("{d}", .{@as(f64, @floatCast(x))}),
1104 .f16 => |x| try w.print("{d}", .{@round(@as(f64, @floatCast(x)) * 1000) / 1000}),
1105 .f32 => |x| try w.print("{d}", .{@round(@as(f64, @floatCast(x)) * 1000000) / 1000000}),
1106 inline else => |x| try w.print("{d}", .{@as(f64, @floatCast(x))}),
9711107 },
972 .bytes => |b| return printString(b, ty, comp, w),
1108 .bytes => |b| try printString(b, qt, comp, w),
9731109 .complex => |repr| switch (repr) {
974 .cf32 => |components| return w.print("{d} + {d}i", .{ @round(@as(f64, @floatCast(components[0])) * 1000000) / 1000000, @round(@as(f64, @floatCast(components[1])) * 1000000) / 1000000 }),
975 inline else => |components| return w.print("{d} + {d}i", .{ @as(f64, @floatCast(components[0])), @as(f64, @floatCast(components[1])) }),
1110 .cf32 => |components| try w.print("{d} + {d}i", .{ @round(@as(f64, @floatCast(components[0])) * 1000000) / 1000000, @round(@as(f64, @floatCast(components[1])) * 1000000) / 1000000 }),
1111 inline else => |components| try w.print("{d} + {d}i", .{ @as(f64, @floatCast(components[0])), @as(f64, @floatCast(components[1])) }),
9761112 },
1113 .pointer => |ptr| return .{ .pointer = .{ .node = ptr.node, .offset = fromRef(ptr.offset) } },
9771114 else => unreachable, // not a value
9781115 }
1116 return null;
9791117}
9801118
981pub fn printString(bytes: []const u8, ty: Type, comp: *const Compilation, w: *Writer) Writer.Error!void {
982 const size: Compilation.CharUnitSize = @enumFromInt(ty.elemType().sizeof(comp).?);
1119pub fn printString(bytes: []const u8, qt: QualType, comp: *const Compilation, w: *std.Io.Writer) std.Io.Writer.Error!void {
1120 const size: Compilation.CharUnitSize = @enumFromInt(qt.childType(comp).sizeof(comp));
9831121 const without_null = bytes[0 .. bytes.len - @intFromEnum(size)];
9841122 try w.writeByte('"');
9851123 switch (size) {
986 .@"1" => try w.print("{f}", .{std.zig.fmtString(without_null)}),
1124 .@"1" => try std.zig.stringEscape(without_null, w),
9871125 .@"2" => {
9881126 var items: [2]u16 = undefined;
9891127 var i: usize = 0;
lib/compiler/aro/aro/char_info.zig+40-40
......@@ -442,48 +442,48 @@ pub fn isInvisible(codepoint: u21) bool {
442442}
443443
444444/// Checks for identifier characters which resemble non-identifier characters
445pub fn homoglyph(codepoint: u21) ?u21 {
445pub fn homoglyph(codepoint: u21) ?[]const u8 {
446446 assert(codepoint > 0x7F);
447447 return switch (codepoint) {
448 0x01c3 => '!', // LATIN LETTER RETROFLEX CLICK
449 0x037e => ';', // GREEK QUESTION MARK
450 0x2212 => '-', // MINUS SIGN
451 0x2215 => '/', // DIVISION SLASH
452 0x2216 => '\\', // SET MINUS
453 0x2217 => '*', // ASTERISK OPERATOR
454 0x2223 => '|', // DIVIDES
455 0x2227 => '^', // LOGICAL AND
456 0x2236 => ':', // RATIO
457 0x223c => '~', // TILDE OPERATOR
458 0xa789 => ':', // MODIFIER LETTER COLON
459 0xff01 => '!', // FULLWIDTH EXCLAMATION MARK
460 0xff03 => '#', // FULLWIDTH NUMBER SIGN
461 0xff04 => '$', // FULLWIDTH DOLLAR SIGN
462 0xff05 => '%', // FULLWIDTH PERCENT SIGN
463 0xff06 => '&', // FULLWIDTH AMPERSAND
464 0xff08 => '(', // FULLWIDTH LEFT PARENTHESIS
465 0xff09 => ')', // FULLWIDTH RIGHT PARENTHESIS
466 0xff0a => '*', // FULLWIDTH ASTERISK
467 0xff0b => '+', // FULLWIDTH ASTERISK
468 0xff0c => ',', // FULLWIDTH COMMA
469 0xff0d => '-', // FULLWIDTH HYPHEN-MINUS
470 0xff0e => '.', // FULLWIDTH FULL STOP
471 0xff0f => '/', // FULLWIDTH SOLIDUS
472 0xff1a => ':', // FULLWIDTH COLON
473 0xff1b => ';', // FULLWIDTH SEMICOLON
474 0xff1c => '<', // FULLWIDTH LESS-THAN SIGN
475 0xff1d => '=', // FULLWIDTH EQUALS SIGN
476 0xff1e => '>', // FULLWIDTH GREATER-THAN SIGN
477 0xff1f => '?', // FULLWIDTH QUESTION MARK
478 0xff20 => '@', // FULLWIDTH COMMERCIAL AT
479 0xff3b => '[', // FULLWIDTH LEFT SQUARE BRACKET
480 0xff3c => '\\', // FULLWIDTH REVERSE SOLIDUS
481 0xff3d => ']', // FULLWIDTH RIGHT SQUARE BRACKET
482 0xff3e => '^', // FULLWIDTH CIRCUMFLEX ACCENT
483 0xff5b => '{', // FULLWIDTH LEFT CURLY BRACKET
484 0xff5c => '|', // FULLWIDTH VERTICAL LINE
485 0xff5d => '}', // FULLWIDTH RIGHT CURLY BRACKET
486 0xff5e => '~', // FULLWIDTH TILDE
448 0x01c3 => "!", // LATIN LETTER RETROFLEX CLICK
449 0x037e => ";", // GREEK QUESTION MARK
450 0x2212 => "-", // MINUS SIGN
451 0x2215 => "/", // DIVISION SLASH
452 0x2216 => "\\", // SET MINUS
453 0x2217 => "*", // ASTERISK OPERATOR
454 0x2223 => "|", // DIVIDES
455 0x2227 => "^", // LOGICAL AND
456 0x2236 => ":", // RATIO
457 0x223c => "~", // TILDE OPERATOR
458 0xa789 => ":", // MODIFIER LETTER COLON
459 0xff01 => "!", // FULLWIDTH EXCLAMATION MARK
460 0xff03 => "#", // FULLWIDTH NUMBER SIGN
461 0xff04 => "$", // FULLWIDTH DOLLAR SIGN
462 0xff05 => "%", // FULLWIDTH PERCENT SIGN
463 0xff06 => "&", // FULLWIDTH AMPERSAND
464 0xff08 => "(", // FULLWIDTH LEFT PARENTHESIS
465 0xff09 => ")", // FULLWIDTH RIGHT PARENTHESIS
466 0xff0a => "*", // FULLWIDTH ASTERISK
467 0xff0b => "+", // FULLWIDTH ASTERISK
468 0xff0c => ",", // FULLWIDTH COMMA
469 0xff0d => "-", // FULLWIDTH HYPHEN-MINUS
470 0xff0e => ".", // FULLWIDTH FULL STOP
471 0xff0f => "/", // FULLWIDTH SOLIDUS
472 0xff1a => ":", // FULLWIDTH COLON
473 0xff1b => ";", // FULLWIDTH SEMICOLON
474 0xff1c => "<", // FULLWIDTH LESS-THAN SIGN
475 0xff1d => "=", // FULLWIDTH EQUALS SIGN
476 0xff1e => ">", // FULLWIDTH GREATER-THAN SIGN
477 0xff1f => "?", // FULLWIDTH QUESTION MARK
478 0xff20 => "@", // FULLWIDTH COMMERCIAL AT
479 0xff3b => "[", // FULLWIDTH LEFT SQUARE BRACKET
480 0xff3c => "\\", // FULLWIDTH REVERSE SOLIDUS
481 0xff3d => "]", // FULLWIDTH RIGHT SQUARE BRACKET
482 0xff3e => "^", // FULLWIDTH CIRCUMFLEX ACCENT
483 0xff5b => "{", // FULLWIDTH LEFT CURLY BRACKET
484 0xff5c => "|", // FULLWIDTH VERTICAL LINE
485 0xff5d => "}", // FULLWIDTH RIGHT CURLY BRACKET
486 0xff5e => "~", // FULLWIDTH TILDE
487487 else => null,
488488 };
489489}
lib/compiler/aro/aro/features.zig+2-2
......@@ -57,13 +57,13 @@ pub fn hasExtension(comp: *Compilation, ext: []const u8) bool {
5757 // C11 features
5858 .c_alignas = true,
5959 .c_alignof = true,
60 .c_atomic = false, // TODO
60 .c_atomic = true,
6161 .c_generic_selections = true,
6262 .c_static_assert = true,
6363 .c_thread_local = target_util.isTlsSupported(comp.target),
6464 // misc
6565 .overloadable_unmarked = false, // TODO
66 .statement_attributes_with_gnu_syntax = false, // TODO
66 .statement_attributes_with_gnu_syntax = true,
6767 .gnu_asm = true,
6868 .gnu_asm_goto_with_outputs = true,
6969 .matrix_types = false, // TODO
lib/compiler/aro/aro/pragmas/gcc.zig+26-54
......@@ -1,10 +1,11 @@
11const std = @import("std");
22const mem = std.mem;
3
34const Compilation = @import("../Compilation.zig");
4const Pragma = @import("../Pragma.zig");
55const Diagnostics = @import("../Diagnostics.zig");
6const Preprocessor = @import("../Preprocessor.zig");
76const Parser = @import("../Parser.zig");
7const Pragma = @import("../Pragma.zig");
8const Preprocessor = @import("../Preprocessor.zig");
89const TokenIndex = @import("../Tree.zig").TokenIndex;
910
1011const GCC = @This();
......@@ -18,8 +19,8 @@ pragma: Pragma = .{
1819 .parserHandler = parserHandler,
1920 .preserveTokens = preserveTokens,
2021},
21original_options: Diagnostics.Options = .{},
22options_stack: std.ArrayListUnmanaged(Diagnostics.Options) = .empty,
22original_state: Diagnostics.State = .{},
23state_stack: std.ArrayListUnmanaged(Diagnostics.State) = .{},
2324
2425const Directive = enum {
2526 warning,
......@@ -38,19 +39,19 @@ const Directive = enum {
3839
3940fn beforePreprocess(pragma: *Pragma, comp: *Compilation) void {
4041 var self: *GCC = @fieldParentPtr("pragma", pragma);
41 self.original_options = comp.diagnostics.options;
42 self.original_state = comp.diagnostics.state;
4243}
4344
4445fn beforeParse(pragma: *Pragma, comp: *Compilation) void {
4546 var self: *GCC = @fieldParentPtr("pragma", pragma);
46 comp.diagnostics.options = self.original_options;
47 self.options_stack.items.len = 0;
47 comp.diagnostics.state = self.original_state;
48 self.state_stack.items.len = 0;
4849}
4950
5051fn afterParse(pragma: *Pragma, comp: *Compilation) void {
5152 var self: *GCC = @fieldParentPtr("pragma", pragma);
52 comp.diagnostics.options = self.original_options;
53 self.options_stack.items.len = 0;
53 comp.diagnostics.state = self.original_state;
54 self.state_stack.items.len = 0;
5455}
5556
5657pub fn init(allocator: mem.Allocator) !*Pragma {
......@@ -61,7 +62,7 @@ pub fn init(allocator: mem.Allocator) !*Pragma {
6162
6263fn deinit(pragma: *Pragma, comp: *Compilation) void {
6364 var self: *GCC = @fieldParentPtr("pragma", pragma);
64 self.options_stack.deinit(comp.gpa);
65 self.state_stack.deinit(comp.gpa);
6566 comp.gpa.destroy(self);
6667}
6768
......@@ -76,23 +77,14 @@ fn diagnosticHandler(self: *GCC, pp: *Preprocessor, start_idx: TokenIndex) Pragm
7677 .ignored, .warning, .@"error", .fatal => {
7778 const str = Pragma.pasteTokens(pp, start_idx + 1) catch |err| switch (err) {
7879 error.ExpectedStringLiteral => {
79 return pp.comp.addDiagnostic(.{
80 .tag = .pragma_requires_string_literal,
81 .loc = diagnostic_tok.loc,
82 .extra = .{ .str = "GCC diagnostic" },
83 }, pp.expansionSlice(start_idx));
80 return Pragma.err(pp, start_idx, .pragma_requires_string_literal, .{"GCC diagnostic"});
8481 },
8582 else => |e| return e,
8683 };
8784 if (!mem.startsWith(u8, str, "-W")) {
88 const next = pp.tokens.get(start_idx + 1);
89 return pp.comp.addDiagnostic(.{
90 .tag = .malformed_warning_check,
91 .loc = next.loc,
92 .extra = .{ .str = "GCC diagnostic" },
93 }, pp.expansionSlice(start_idx + 1));
85 return Pragma.err(pp, start_idx + 1, .malformed_warning_check, .{"GCC diagnostic"});
9486 }
95 const new_kind: Diagnostics.Kind = switch (diagnostic) {
87 const new_kind: Diagnostics.Message.Kind = switch (diagnostic) {
9688 .ignored => .off,
9789 .warning => .warning,
9890 .@"error" => .@"error",
......@@ -100,10 +92,10 @@ fn diagnosticHandler(self: *GCC, pp: *Preprocessor, start_idx: TokenIndex) Pragm
10092 else => unreachable,
10193 };
10294
103 try pp.comp.diagnostics.set(str[2..], new_kind);
95 try pp.diagnostics.set(str[2..], new_kind);
10496 },
105 .push => try self.options_stack.append(pp.comp.gpa, pp.comp.diagnostics.options),
106 .pop => pp.comp.diagnostics.options = self.options_stack.pop() orelse self.original_options,
97 .push => try self.state_stack.append(pp.comp.gpa, pp.diagnostics.state),
98 .pop => pp.diagnostics.state = self.state_stack.pop() orelse self.original_state,
10799 }
108100}
109101
......@@ -112,38 +104,24 @@ fn preprocessorHandler(pragma: *Pragma, pp: *Preprocessor, start_idx: TokenIndex
112104 const directive_tok = pp.tokens.get(start_idx + 1);
113105 if (directive_tok.id == .nl) return;
114106
115 const gcc_pragma = std.meta.stringToEnum(Directive, pp.expandedSlice(directive_tok)) orelse
116 return pp.comp.addDiagnostic(.{
117 .tag = .unknown_gcc_pragma,
118 .loc = directive_tok.loc,
119 }, pp.expansionSlice(start_idx + 1));
107 const gcc_pragma = std.meta.stringToEnum(Directive, pp.expandedSlice(directive_tok)) orelse {
108 return Pragma.err(pp, start_idx + 1, .unknown_gcc_pragma, .{});
109 };
120110
121111 switch (gcc_pragma) {
122112 .warning, .@"error" => {
123113 const text = Pragma.pasteTokens(pp, start_idx + 2) catch |err| switch (err) {
124114 error.ExpectedStringLiteral => {
125 return pp.comp.addDiagnostic(.{
126 .tag = .pragma_requires_string_literal,
127 .loc = directive_tok.loc,
128 .extra = .{ .str = @tagName(gcc_pragma) },
129 }, pp.expansionSlice(start_idx + 1));
115 return Pragma.err(pp, start_idx + 1, .pragma_requires_string_literal, .{@tagName(gcc_pragma)});
130116 },
131117 else => |e| return e,
132118 };
133 const extra = Diagnostics.Message.Extra{ .str = try pp.comp.diagnostics.arena.allocator().dupe(u8, text) };
134 const diagnostic_tag: Diagnostics.Tag = if (gcc_pragma == .warning) .pragma_warning_message else .pragma_error_message;
135 return pp.comp.addDiagnostic(
136 .{ .tag = diagnostic_tag, .loc = directive_tok.loc, .extra = extra },
137 pp.expansionSlice(start_idx + 1),
138 );
119
120 return Pragma.err(pp, start_idx + 1, if (gcc_pragma == .warning) .pragma_warning_message else .pragma_error_message, .{text});
139121 },
140122 .diagnostic => return self.diagnosticHandler(pp, start_idx + 2) catch |err| switch (err) {
141123 error.UnknownPragma => {
142 const tok = pp.tokens.get(start_idx + 2);
143 return pp.comp.addDiagnostic(.{
144 .tag = .unknown_gcc_pragma_directive,
145 .loc = tok.loc,
146 }, pp.expansionSlice(start_idx + 2));
124 return Pragma.err(pp, start_idx + 2, .unknown_gcc_pragma_directive, .{});
147125 },
148126 else => |e| return e,
149127 },
......@@ -154,17 +132,11 @@ fn preprocessorHandler(pragma: *Pragma, pp: *Preprocessor, start_idx: TokenIndex
154132 if (tok.id == .nl) break;
155133
156134 if (!tok.id.isMacroIdentifier()) {
157 return pp.comp.addDiagnostic(.{
158 .tag = .pragma_poison_identifier,
159 .loc = tok.loc,
160 }, pp.expansionSlice(start_idx + i));
135 return Pragma.err(pp, start_idx + i, .pragma_poison_identifier, .{});
161136 }
162137 const str = pp.expandedSlice(tok);
163138 if (pp.defines.get(str) != null) {
164 try pp.comp.addDiagnostic(.{
165 .tag = .pragma_poison_macro,
166 .loc = tok.loc,
167 }, pp.expansionSlice(start_idx + i));
139 try Pragma.err(pp, start_idx + i, .pragma_poison_macro, .{});
168140 }
169141 try pp.poisoned_identifiers.put(str, {});
170142 }
lib/compiler/aro/aro/pragmas/message.zig+22-13
......@@ -1,12 +1,13 @@
11const std = @import("std");
22const mem = std.mem;
3
34const Compilation = @import("../Compilation.zig");
4const Pragma = @import("../Pragma.zig");
55const Diagnostics = @import("../Diagnostics.zig");
6const Preprocessor = @import("../Preprocessor.zig");
76const Parser = @import("../Parser.zig");
8const TokenIndex = @import("../Tree.zig").TokenIndex;
7const Pragma = @import("../Pragma.zig");
8const Preprocessor = @import("../Preprocessor.zig");
99const Source = @import("../Source.zig");
10const TokenIndex = @import("../Tree.zig").TokenIndex;
1011
1112const Message = @This();
1213
......@@ -27,24 +28,32 @@ fn deinit(pragma: *Pragma, comp: *Compilation) void {
2728}
2829
2930fn preprocessorHandler(_: *Pragma, pp: *Preprocessor, start_idx: TokenIndex) Pragma.Error!void {
30 const message_tok = pp.tokens.get(start_idx);
31 const message_expansion_locs = pp.expansionSlice(start_idx);
32
3331 const str = Pragma.pasteTokens(pp, start_idx + 1) catch |err| switch (err) {
3432 error.ExpectedStringLiteral => {
35 return pp.comp.addDiagnostic(.{
36 .tag = .pragma_requires_string_literal,
37 .loc = message_tok.loc,
38 .extra = .{ .str = "message" },
39 }, message_expansion_locs);
33 return Pragma.err(pp, start_idx, .pragma_requires_string_literal, .{"message"});
4034 },
4135 else => |e| return e,
4236 };
4337
38 const message_tok = pp.tokens.get(start_idx);
39 const message_expansion_locs = pp.expansionSlice(start_idx);
4440 const loc = if (message_expansion_locs.len != 0)
4541 message_expansion_locs[message_expansion_locs.len - 1]
4642 else
4743 message_tok.loc;
48 const extra = Diagnostics.Message.Extra{ .str = try pp.comp.diagnostics.arena.allocator().dupe(u8, str) };
49 return pp.comp.addDiagnostic(.{ .tag = .pragma_message, .loc = loc, .extra = extra }, &.{});
44
45 const diagnostic: Pragma.Diagnostic = .pragma_message;
46
47 var sf = std.heap.stackFallback(1024, pp.gpa);
48 var allocating: std.Io.Writer.Allocating = .init(sf.get());
49 defer allocating.deinit();
50
51 Diagnostics.formatArgs(&allocating.writer, diagnostic.fmt, .{str}) catch return error.OutOfMemory;
52
53 try pp.diagnostics.add(.{
54 .text = allocating.getWritten(),
55 .kind = diagnostic.kind,
56 .opt = diagnostic.opt,
57 .location = loc.expand(pp.comp),
58 });
5059}
lib/compiler/aro/aro/pragmas/once.zig+16-7
......@@ -1,12 +1,13 @@
11const std = @import("std");
22const mem = std.mem;
3
34const Compilation = @import("../Compilation.zig");
4const Pragma = @import("../Pragma.zig");
55const Diagnostics = @import("../Diagnostics.zig");
6const Preprocessor = @import("../Preprocessor.zig");
76const Parser = @import("../Parser.zig");
8const TokenIndex = @import("../Tree.zig").TokenIndex;
7const Pragma = @import("../Pragma.zig");
8const Preprocessor = @import("../Preprocessor.zig");
99const Source = @import("../Source.zig");
10const TokenIndex = @import("../Tree.zig").TokenIndex;
1011
1112const Once = @This();
1213
......@@ -14,6 +15,7 @@ pragma: Pragma = .{
1415 .afterParse = afterParse,
1516 .deinit = deinit,
1617 .preprocessorHandler = preprocessorHandler,
18 .preserveTokens = preserveTokens,
1719},
1820pragma_once: std.AutoHashMap(Source.Id, void),
1921preprocess_count: u32 = 0,
......@@ -42,10 +44,13 @@ fn preprocessorHandler(pragma: *Pragma, pp: *Preprocessor, start_idx: TokenIndex
4244 const name_tok = pp.tokens.get(start_idx);
4345 const next = pp.tokens.get(start_idx + 1);
4446 if (next.id != .nl) {
45 try pp.comp.addDiagnostic(.{
46 .tag = .extra_tokens_directive_end,
47 .loc = name_tok.loc,
48 }, pp.expansionSlice(start_idx + 1));
47 const diagnostic: Preprocessor.Diagnostic = .extra_tokens_directive_end;
48 return pp.diagnostics.addWithLocation(pp.comp, .{
49 .text = diagnostic.fmt,
50 .kind = diagnostic.kind,
51 .opt = diagnostic.opt,
52 .location = name_tok.loc.expand(pp.comp),
53 }, pp.expansionSlice(start_idx + 1), true);
4954 }
5055 const seen = self.preprocess_count == pp.preprocess_count;
5156 const prev = try self.pragma_once.fetchPut(name_tok.loc.id, {});
......@@ -54,3 +59,7 @@ fn preprocessorHandler(pragma: *Pragma, pp: *Preprocessor, start_idx: TokenIndex
5459 }
5560 self.preprocess_count = pp.preprocess_count;
5661}
62
63fn preserveTokens(_: *Pragma, _: *Preprocessor, _: TokenIndex) bool {
64 return false;
65}
lib/compiler/aro/aro/pragmas/pack.zig+16-23
......@@ -1,10 +1,11 @@
11const std = @import("std");
22const mem = std.mem;
3
34const Compilation = @import("../Compilation.zig");
4const Pragma = @import("../Pragma.zig");
55const Diagnostics = @import("../Diagnostics.zig");
6const Preprocessor = @import("../Preprocessor.zig");
76const Parser = @import("../Parser.zig");
7const Pragma = @import("../Pragma.zig");
8const Preprocessor = @import("../Preprocessor.zig");
89const Tree = @import("../Tree.zig");
910const TokenIndex = Tree.TokenIndex;
1011
......@@ -13,9 +14,8 @@ const Pack = @This();
1314pragma: Pragma = .{
1415 .deinit = deinit,
1516 .parserHandler = parserHandler,
16 .preserveTokens = preserveTokens,
1717},
18stack: std.ArrayListUnmanaged(struct { label: []const u8, val: u8 }) = .empty,
18stack: std.ArrayListUnmanaged(struct { label: []const u8, val: u8 }) = .{},
1919
2020pub fn init(allocator: mem.Allocator) !*Pragma {
2121 var pack = try allocator.create(Pack);
......@@ -34,10 +34,7 @@ fn parserHandler(pragma: *Pragma, p: *Parser, start_idx: TokenIndex) Compilation
3434 var idx = start_idx + 1;
3535 const l_paren = p.pp.tokens.get(idx);
3636 if (l_paren.id != .l_paren) {
37 return p.comp.addDiagnostic(.{
38 .tag = .pragma_pack_lparen,
39 .loc = l_paren.loc,
40 }, p.pp.expansionSlice(idx));
37 return Pragma.err(p.pp, idx, .pragma_pack_lparen, .{});
4138 }
4239 idx += 1;
4340
......@@ -54,11 +51,11 @@ fn parserHandler(pragma: *Pragma, p: *Parser, start_idx: TokenIndex) Compilation
5451 pop,
5552 };
5653 const action = std.meta.stringToEnum(Action, p.tokSlice(arg)) orelse {
57 return p.errTok(.pragma_pack_unknown_action, arg);
54 return Pragma.err(p.pp, arg, .pragma_pack_unknown_action, .{});
5855 };
5956 switch (action) {
6057 .show => {
61 try p.errExtra(.pragma_pack_show, arg, .{ .unsigned = p.pragma_pack orelse 8 });
58 return Pragma.err(p.pp, arg, .pragma_pack_show, .{p.pragma_pack orelse 8});
6259 },
6360 .push, .pop => {
6461 var new_val: ?u8 = null;
......@@ -75,11 +72,13 @@ fn parserHandler(pragma: *Pragma, p: *Parser, start_idx: TokenIndex) Compilation
7572 idx += 1;
7673 const int = idx;
7774 idx += 1;
78 if (tok_ids[int] != .pp_num) return p.errTok(.pragma_pack_int_ident, int);
75 if (tok_ids[int] != .pp_num) {
76 return Pragma.err(p.pp, int, .pragma_pack_int_ident, .{});
77 }
7978 new_val = (try packInt(p, int)) orelse return;
8079 }
8180 },
82 else => return p.errTok(.pragma_pack_int_ident, next),
81 else => return Pragma.err(p.pp, next, .pragma_pack_int_ident, .{}),
8382 }
8483 }
8584 if (action == .push) {
......@@ -87,9 +86,9 @@ fn parserHandler(pragma: *Pragma, p: *Parser, start_idx: TokenIndex) Compilation
8786 } else {
8887 pack.pop(p, label);
8988 if (new_val != null) {
90 try p.errTok(.pragma_pack_undefined_pop, arg);
89 try Pragma.err(p.pp, arg, .pragma_pack_undefined_pop, .{});
9190 } else if (pack.stack.items.len == 0) {
92 try p.errTok(.pragma_pack_empty_stack, arg);
91 try Pragma.err(p.pp, arg, .pragma_pack_empty_stack, .{});
9392 }
9493 }
9594 if (new_val) |some| {
......@@ -115,14 +114,14 @@ fn parserHandler(pragma: *Pragma, p: *Parser, start_idx: TokenIndex) Compilation
115114 }
116115
117116 if (tok_ids[idx] != .r_paren) {
118 return p.errTok(.pragma_pack_rparen, idx);
117 return Pragma.err(p.pp, idx, .pragma_pack_rparen, .{});
119118 }
120119}
121120
122121fn packInt(p: *Parser, tok_i: TokenIndex) Compilation.Error!?u8 {
123122 const res = p.parseNumberToken(tok_i) catch |err| switch (err) {
124123 error.ParsingFailed => {
125 try p.errTok(.pragma_pack_int, tok_i);
124 try Pragma.err(p.pp, tok_i, .pragma_pack_int, .{});
126125 return null;
127126 },
128127 else => |e| return e,
......@@ -131,7 +130,7 @@ fn packInt(p: *Parser, tok_i: TokenIndex) Compilation.Error!?u8 {
131130 switch (int) {
132131 1, 2, 4, 8, 16 => return @intCast(int),
133132 else => {
134 try p.errTok(.pragma_pack_int, tok_i);
133 try Pragma.err(p.pp, tok_i, .pragma_pack_int, .{});
135134 return null;
136135 },
137136 }
......@@ -156,9 +155,3 @@ fn pop(pack: *Pack, p: *Parser, maybe_label: ?[]const u8) void {
156155 p.pragma_pack = prev.val;
157156 }
158157}
159
160fn preserveTokens(_: *Pragma, pp: *Preprocessor, start_idx: TokenIndex) bool {
161 _ = pp;
162 _ = start_idx;
163 return true;
164}
lib/compiler/aro/aro/record_layout.zig+80-82
......@@ -2,15 +2,18 @@
22//! Licensed under MIT license: https://github.com/mahkoh/repr-c/tree/master/repc/facade
33
44const std = @import("std");
5const Type = @import("Type.zig");
5
66const Attribute = @import("Attribute.zig");
77const Compilation = @import("Compilation.zig");
88const Parser = @import("Parser.zig");
9const target_util = @import("target.zig");
10const TypeStore = @import("TypeStore.zig");
11const QualType = TypeStore.QualType;
12const Type = TypeStore.Type;
913const Record = Type.Record;
1014const Field = Record.Field;
11const TypeLayout = Type.TypeLayout;
12const FieldLayout = Type.FieldLayout;
13const target_util = @import("target.zig");
15const RecordLayout = Type.Record.Layout;
16const FieldLayout = Type.Record.Field.Layout;
1417
1518const BITS_PER_BYTE = 8;
1619
......@@ -42,36 +45,33 @@ const SysVContext = struct {
4245
4346 comp: *const Compilation,
4447
45 fn init(ty: Type, comp: *const Compilation, pragma_pack: ?u8) SysVContext {
48 fn init(qt: QualType, comp: *const Compilation, pragma_pack: ?u8) SysVContext {
4649 const pack_value: ?u64 = if (pragma_pack) |pak| @as(u64, pak) * BITS_PER_BYTE else null;
47 const req_align = @as(u32, (ty.requestedAlignment(comp) orelse 1)) * BITS_PER_BYTE;
50 const req_align = @as(u32, (qt.requestedAlignment(comp) orelse 1)) * BITS_PER_BYTE;
4851 return SysVContext{
49 .attr_packed = ty.hasAttribute(.@"packed"),
52 .attr_packed = qt.hasAttribute(comp, .@"packed"),
5053 .max_field_align_bits = pack_value,
5154 .aligned_bits = req_align,
52 .is_union = ty.is(.@"union"),
55 .is_union = qt.is(comp, .@"union"),
5356 .size_bits = 0,
5457 .comp = comp,
5558 .ongoing_bitfield = null,
5659 };
5760 }
5861
59 fn layoutFields(self: *SysVContext, rec: *const Record) !void {
60 for (rec.fields, 0..) |*fld, fld_indx| {
61 if (fld.ty.specifier == .invalid) continue;
62 const type_layout = computeLayout(fld.ty, self.comp);
62 fn layoutFields(self: *SysVContext, fields: []Type.Record.Field) !void {
63 for (fields) |*field| {
64 if (field.qt.isInvalid()) continue;
65 const type_layout = computeLayout(field.qt, self.comp);
6366
64 var field_attrs: ?[]const Attribute = null;
65 if (rec.field_attributes) |attrs| {
66 field_attrs = attrs[fld_indx];
67 }
67 const attributes = field.attributes(self.comp);
6868 if (self.comp.target.isMinGW()) {
69 fld.layout = try self.layoutMinGWField(fld, field_attrs, type_layout);
69 field.layout = try self.layoutMinGWField(field, attributes, type_layout);
7070 } else {
71 if (fld.isRegularField()) {
72 fld.layout = try self.layoutRegularField(field_attrs, type_layout);
71 if (field.bit_width.unpack()) |bit_width| {
72 field.layout = try self.layoutBitField(attributes, type_layout, field.name_tok != 0, bit_width);
7373 } else {
74 fld.layout = try self.layoutBitField(field_attrs, type_layout, fld.isNamed(), fld.specifiedBitWidth());
74 field.layout = try self.layoutRegularField(attributes, type_layout);
7575 }
7676 }
7777 }
......@@ -83,7 +83,7 @@ const SysVContext = struct {
8383 /// - the field is a bit-field and the previous field was a non-zero-sized bit-field with the same type size
8484 /// - the field is a zero-sized bit-field and the previous field was not a non-zero-sized bit-field
8585 /// See test case 0068.
86 fn ignoreTypeAlignment(is_attr_packed: bool, bit_width: ?u32, ongoing_bitfield: ?OngoingBitfield, fld_layout: TypeLayout) bool {
86 fn ignoreTypeAlignment(is_attr_packed: bool, bit_width: ?u32, ongoing_bitfield: ?OngoingBitfield, fld_layout: RecordLayout) bool {
8787 if (is_attr_packed) return true;
8888 if (bit_width) |width| {
8989 if (ongoing_bitfield) |ongoing| {
......@@ -98,12 +98,12 @@ const SysVContext = struct {
9898 fn layoutMinGWField(
9999 self: *SysVContext,
100100 field: *const Field,
101 field_attrs: ?[]const Attribute,
102 field_layout: TypeLayout,
101 field_attrs: []const Attribute,
102 field_layout: RecordLayout,
103103 ) !FieldLayout {
104 const annotation_alignment_bits = BITS_PER_BYTE * @as(u32, (Type.annotationAlignment(self.comp, Attribute.Iterator.initSlice(field_attrs)) orelse 1));
104 const annotation_alignment_bits = BITS_PER_BYTE * (QualType.annotationAlignment(self.comp, Attribute.Iterator.initSlice(field_attrs)) orelse 1);
105105 const is_attr_packed = self.attr_packed or isPacked(field_attrs);
106 const ignore_type_alignment = ignoreTypeAlignment(is_attr_packed, field.bit_width, self.ongoing_bitfield, field_layout);
106 const ignore_type_alignment = ignoreTypeAlignment(is_attr_packed, field.bit_width.unpack(), self.ongoing_bitfield, field_layout);
107107
108108 var field_alignment_bits: u64 = field_layout.field_alignment_bits;
109109 if (ignore_type_alignment) {
......@@ -120,16 +120,16 @@ const SysVContext = struct {
120120 // - the field is a non-zero-width bit-field and not packed.
121121 // See test case 0069.
122122 const update_record_alignment =
123 field.isRegularField() or
124 (field.specifiedBitWidth() == 0 and self.ongoing_bitfield != null) or
125 (field.specifiedBitWidth() != 0 and !is_attr_packed);
123 field.bit_width == .null or
124 (field.bit_width.unpack().? == 0 and self.ongoing_bitfield != null) or
125 (field.bit_width.unpack().? != 0 and !is_attr_packed);
126126
127127 // If a field affects the alignment of a record, the alignment is calculated in the
128128 // usual way except that __attribute__((packed)) is ignored on a zero-width bit-field.
129129 // See test case 0068.
130130 if (update_record_alignment) {
131131 var ty_alignment_bits = field_layout.field_alignment_bits;
132 if (is_attr_packed and (field.isRegularField() or field.specifiedBitWidth() != 0)) {
132 if (is_attr_packed and (field.bit_width == .null or field.bit_width.unpack().? != 0)) {
133133 ty_alignment_bits = BITS_PER_BYTE;
134134 }
135135 ty_alignment_bits = @max(ty_alignment_bits, annotation_alignment_bits);
......@@ -145,10 +145,10 @@ const SysVContext = struct {
145145 // @attr_packed _ { size: 64, alignment: 64 }long long:0,
146146 // { offset: 8, size: 8 }d { size: 8, alignment: 8 }char,
147147 // }
148 if (field.isRegularField()) {
149 return self.layoutRegularFieldMinGW(field_layout.size_bits, field_alignment_bits);
148 if (field.bit_width.unpack()) |bit_width| {
149 return self.layoutBitFieldMinGW(field_layout.size_bits, field_alignment_bits, field.name_tok != 0, bit_width);
150150 } else {
151 return self.layoutBitFieldMinGW(field_layout.size_bits, field_alignment_bits, field.isNamed(), field.specifiedBitWidth());
151 return self.layoutRegularFieldMinGW(field_layout.size_bits, field_alignment_bits);
152152 }
153153 }
154154
......@@ -227,8 +227,8 @@ const SysVContext = struct {
227227
228228 fn layoutRegularField(
229229 self: *SysVContext,
230 fld_attrs: ?[]const Attribute,
231 fld_layout: TypeLayout,
230 fld_attrs: []const Attribute,
231 fld_layout: RecordLayout,
232232 ) !FieldLayout {
233233 var fld_align_bits = fld_layout.field_alignment_bits;
234234
......@@ -240,7 +240,7 @@ const SysVContext = struct {
240240
241241 // The field alignment can be increased by __attribute__((aligned)) annotations on the
242242 // field. See test case 0085.
243 if (Type.annotationAlignment(self.comp, Attribute.Iterator.initSlice(fld_attrs))) |anno| {
243 if (QualType.annotationAlignment(self.comp, Attribute.Iterator.initSlice(fld_attrs))) |anno| {
244244 fld_align_bits = @max(fld_align_bits, @as(u32, anno) * BITS_PER_BYTE);
245245 }
246246
......@@ -268,8 +268,8 @@ const SysVContext = struct {
268268
269269 fn layoutBitField(
270270 self: *SysVContext,
271 fld_attrs: ?[]const Attribute,
272 fld_layout: TypeLayout,
271 fld_attrs: []const Attribute,
272 fld_layout: RecordLayout,
273273 is_named: bool,
274274 bit_width: u64,
275275 ) !FieldLayout {
......@@ -302,7 +302,7 @@ const SysVContext = struct {
302302 const attr_packed = self.attr_packed or isPacked(fld_attrs);
303303 const has_packing_annotation = attr_packed or self.max_field_align_bits != null;
304304
305 const annotation_alignment = if (Type.annotationAlignment(self.comp, Attribute.Iterator.initSlice(fld_attrs))) |anno| @as(u32, anno) * BITS_PER_BYTE else 1;
305 const annotation_alignment = if (QualType.annotationAlignment(self.comp, Attribute.Iterator.initSlice(fld_attrs))) |anno| @as(u32, anno) * BITS_PER_BYTE else 1;
306306
307307 const first_unused_bit: u64 = if (self.is_union) 0 else self.size_bits;
308308 var field_align_bits: u64 = 1;
......@@ -403,9 +403,9 @@ const MsvcContext = struct {
403403 is_union: bool,
404404 comp: *const Compilation,
405405
406 fn init(ty: Type, comp: *const Compilation, pragma_pack: ?u8) MsvcContext {
406 fn init(qt: QualType, comp: *const Compilation, pragma_pack: ?u8) MsvcContext {
407407 var pack_value: ?u32 = null;
408 if (ty.hasAttribute(.@"packed")) {
408 if (qt.hasAttribute(comp, .@"packed")) {
409409 // __attribute__((packed)) behaves like #pragma pack(1) in clang. See test case 0056.
410410 pack_value = BITS_PER_BYTE;
411411 }
......@@ -420,8 +420,8 @@ const MsvcContext = struct {
420420
421421 // The required alignment can be increased by adding a __declspec(align)
422422 // annotation. See test case 0023.
423 const must_align = @as(u32, (ty.requestedAlignment(comp) orelse 1)) * BITS_PER_BYTE;
424 return MsvcContext{
423 const must_align = @as(u32, (qt.requestedAlignment(comp) orelse 1)) * BITS_PER_BYTE;
424 return .{
425425 .req_align_bits = must_align,
426426 .pointer_align_bits = must_align,
427427 .field_align_bits = must_align,
......@@ -429,26 +429,26 @@ const MsvcContext = struct {
429429 .max_field_align_bits = pack_value,
430430 .ongoing_bitfield = null,
431431 .contains_non_bitfield = false,
432 .is_union = ty.is(.@"union"),
432 .is_union = qt.is(comp, .@"union"),
433433 .comp = comp,
434434 };
435435 }
436436
437 fn layoutField(self: *MsvcContext, fld: *const Field, fld_attrs: ?[]const Attribute) !FieldLayout {
438 const type_layout = computeLayout(fld.ty, self.comp);
437 fn layoutField(self: *MsvcContext, fld: *const Field, fld_attrs: []const Attribute) !FieldLayout {
438 const type_layout = computeLayout(fld.qt, self.comp);
439439
440440 // The required alignment of the field is the maximum of the required alignment of the
441441 // underlying type and the __declspec(align) annotation on the field itself.
442442 // See test case 0028.
443443 var req_align = type_layout.required_alignment_bits;
444 if (Type.annotationAlignment(self.comp, Attribute.Iterator.initSlice(fld_attrs))) |anno| {
444 if (QualType.annotationAlignment(self.comp, Attribute.Iterator.initSlice(fld_attrs))) |anno| {
445445 req_align = @max(@as(u32, anno) * BITS_PER_BYTE, req_align);
446446 }
447447
448448 // The required alignment of a record is the maximum of the required alignments of its
449449 // fields except that the required alignment of bitfields is ignored.
450450 // See test case 0029.
451 if (fld.isRegularField()) {
451 if (fld.bit_width == .null) {
452452 self.req_align_bits = @max(self.req_align_bits, req_align);
453453 }
454454
......@@ -459,7 +459,7 @@ const MsvcContext = struct {
459459 fld_align_bits = @min(fld_align_bits, max_align);
460460 }
461461 // check the requested alignment of the field type.
462 if (fld.ty.requestedAlignment(self.comp)) |type_req_align| {
462 if (fld.qt.requestedAlignment(self.comp)) |type_req_align| {
463463 fld_align_bits = @max(fld_align_bits, type_req_align * 8);
464464 }
465465
......@@ -471,10 +471,10 @@ const MsvcContext = struct {
471471 // __attribute__((packed)) on a field is a clang extension. It behaves as if #pragma
472472 // pack(1) had been applied only to this field. See test case 0057.
473473 fld_align_bits = @max(fld_align_bits, req_align);
474 if (fld.isRegularField()) {
475 return self.layoutRegularField(type_layout.size_bits, fld_align_bits);
474 if (fld.bit_width.unpack()) |bit_width| {
475 return self.layoutBitField(type_layout.size_bits, fld_align_bits, bit_width);
476476 } else {
477 return self.layoutBitField(type_layout.size_bits, fld_align_bits, fld.specifiedBitWidth());
477 return self.layoutRegularField(type_layout.size_bits, fld_align_bits);
478478 }
479479 }
480480
......@@ -567,16 +567,16 @@ const MsvcContext = struct {
567567 }
568568};
569569
570pub fn compute(rec: *Type.Record, ty: Type, comp: *const Compilation, pragma_pack: ?u8) Error!void {
570pub fn compute(fields: []Type.Record.Field, qt: QualType, comp: *const Compilation, pragma_pack: ?u8) Error!Type.Record.Layout {
571571 switch (comp.langopts.emulate) {
572572 .gcc, .clang => {
573 var context = SysVContext.init(ty, comp, pragma_pack);
573 var context = SysVContext.init(qt, comp, pragma_pack);
574574
575 try context.layoutFields(rec);
575 try context.layoutFields(fields);
576576
577577 context.size_bits = try alignForward(context.size_bits, context.aligned_bits);
578578
579 rec.type_layout = .{
579 return .{
580580 .size_bits = context.size_bits,
581581 .field_alignment_bits = context.aligned_bits,
582582 .pointer_alignment_bits = context.aligned_bits,
......@@ -584,15 +584,10 @@ pub fn compute(rec: *Type.Record, ty: Type, comp: *const Compilation, pragma_pac
584584 };
585585 },
586586 .msvc => {
587 var context = MsvcContext.init(ty, comp, pragma_pack);
588 for (rec.fields, 0..) |*fld, fld_indx| {
589 if (fld.ty.specifier == .invalid) continue;
590 var field_attrs: ?[]const Attribute = null;
591 if (rec.field_attributes) |attrs| {
592 field_attrs = attrs[fld_indx];
593 }
594
595 fld.layout = try context.layoutField(fld, field_attrs);
587 var context = MsvcContext.init(qt, comp, pragma_pack);
588 for (fields) |*field| {
589 if (field.qt.isInvalid()) continue;
590 field.layout = try context.layoutField(field, field.attributes(comp));
596591 }
597592 if (context.size_bits == 0) {
598593 // As an extension, MSVC allows records that only contain zero-sized bitfields and empty
......@@ -601,7 +596,7 @@ pub fn compute(rec: *Type.Record, ty: Type, comp: *const Compilation, pragma_pac
601596 context.handleZeroSizedRecord();
602597 }
603598 context.size_bits = try alignForward(context.size_bits, context.pointer_align_bits);
604 rec.type_layout = .{
599 return .{
605600 .size_bits = context.size_bits,
606601 .field_alignment_bits = context.field_align_bits,
607602 .pointer_alignment_bits = context.pointer_align_bits,
......@@ -611,23 +606,26 @@ pub fn compute(rec: *Type.Record, ty: Type, comp: *const Compilation, pragma_pac
611606 }
612607}
613608
614fn computeLayout(ty: Type, comp: *const Compilation) TypeLayout {
615 if (ty.getRecord()) |rec| {
616 const requested = BITS_PER_BYTE * (ty.requestedAlignment(comp) orelse 0);
617 return .{
618 .size_bits = rec.type_layout.size_bits,
619 .pointer_alignment_bits = @max(requested, rec.type_layout.pointer_alignment_bits),
620 .field_alignment_bits = @max(requested, rec.type_layout.field_alignment_bits),
621 .required_alignment_bits = rec.type_layout.required_alignment_bits,
622 };
623 } else {
624 const type_align = ty.alignof(comp) * BITS_PER_BYTE;
625 return .{
626 .size_bits = ty.bitSizeof(comp) orelse 0,
627 .pointer_alignment_bits = type_align,
628 .field_alignment_bits = type_align,
629 .required_alignment_bits = BITS_PER_BYTE,
630 };
609fn computeLayout(qt: QualType, comp: *const Compilation) RecordLayout {
610 switch (qt.base(comp).type) {
611 .@"struct", .@"union" => |record| {
612 const requested = BITS_PER_BYTE * (qt.requestedAlignment(comp) orelse 0);
613 return .{
614 .size_bits = record.layout.?.size_bits,
615 .pointer_alignment_bits = @max(requested, record.layout.?.pointer_alignment_bits),
616 .field_alignment_bits = @max(requested, record.layout.?.field_alignment_bits),
617 .required_alignment_bits = record.layout.?.required_alignment_bits,
618 };
619 },
620 else => {
621 const type_align = qt.alignof(comp) * BITS_PER_BYTE;
622 return .{
623 .size_bits = qt.bitSizeofOrNull(comp) orelse 0,
624 .pointer_alignment_bits = type_align,
625 .field_alignment_bits = type_align,
626 .required_alignment_bits = BITS_PER_BYTE,
627 };
628 },
631629 }
632630}
633631
lib/compiler/aro/aro/target.zig+300-87
......@@ -1,15 +1,18 @@
11const std = @import("std");
2
3const backend = @import("../backend.zig");
4
25const LangOpts = @import("LangOpts.zig");
3const Type = @import("Type.zig");
46const TargetSet = @import("Builtins/Properties.zig").TargetSet;
7const QualType = @import("TypeStore.zig").QualType;
58
69/// intmax_t for this target
7pub fn intMaxType(target: std.Target) Type {
10pub fn intMaxType(target: std.Target) QualType {
811 switch (target.cpu.arch) {
912 .aarch64,
1013 .aarch64_be,
1114 .sparc64,
12 => if (target.os.tag != .openbsd) return .{ .specifier = .long },
15 => if (target.os.tag != .openbsd) return .long,
1316
1417 .bpfel,
1518 .bpfeb,
......@@ -19,28 +22,28 @@ pub fn intMaxType(target: std.Target) Type {
1922 .powerpc64,
2023 .powerpc64le,
2124 .ve,
22 => return .{ .specifier = .long },
25 => return .long,
2326
2427 .x86_64 => switch (target.os.tag) {
2528 .windows, .openbsd => {},
2629 else => switch (target.abi) {
2730 .gnux32, .muslx32 => {},
28 else => return .{ .specifier = .long },
31 else => return .long,
2932 },
3033 },
3134
3235 else => {},
3336 }
34 return .{ .specifier = .long_long };
37 return .long_long;
3538}
3639
3740/// intptr_t for this target
38pub fn intPtrType(target: std.Target) Type {
39 if (target.os.tag == .haiku) return .{ .specifier = .long };
41pub fn intPtrType(target: std.Target) QualType {
42 if (target.os.tag == .haiku) return .long;
4043
4144 switch (target.cpu.arch) {
4245 .aarch64, .aarch64_be => switch (target.os.tag) {
43 .windows => return .{ .specifier = .long_long },
46 .windows => return .long_long,
4447 else => {},
4548 },
4649
......@@ -55,28 +58,28 @@ pub fn intPtrType(target: std.Target) Type {
5558 .spirv32,
5659 .arc,
5760 .avr,
58 => return .{ .specifier = .int },
61 => return .int,
5962
6063 .sparc => switch (target.os.tag) {
6164 .netbsd, .openbsd => {},
62 else => return .{ .specifier = .int },
65 else => return .int,
6366 },
6467
6568 .powerpc, .powerpcle => switch (target.os.tag) {
66 .linux, .freebsd, .netbsd => return .{ .specifier = .int },
69 .linux, .freebsd, .netbsd => return .int,
6770 else => {},
6871 },
6972
7073 // 32-bit x86 Darwin, OpenBSD, and RTEMS use long (the default); others use int
7174 .x86 => switch (target.os.tag) {
7275 .openbsd, .rtems => {},
73 else => if (!target.os.tag.isDarwin()) return .{ .specifier = .int },
76 else => if (!target.os.tag.isDarwin()) return .int,
7477 },
7578
7679 .x86_64 => switch (target.os.tag) {
77 .windows => return .{ .specifier = .long_long },
80 .windows => return .long_long,
7881 else => switch (target.abi) {
79 .gnux32, .muslx32 => return .{ .specifier = .int },
82 .gnux32, .muslx32 => return .int,
8083 else => {},
8184 },
8285 },
......@@ -84,29 +87,29 @@ pub fn intPtrType(target: std.Target) Type {
8487 else => {},
8588 }
8689
87 return .{ .specifier = .long };
90 return .long;
8891}
8992
9093/// int16_t for this target
91pub fn int16Type(target: std.Target) Type {
94pub fn int16Type(target: std.Target) QualType {
9295 return switch (target.cpu.arch) {
93 .avr => .{ .specifier = .int },
94 else => .{ .specifier = .short },
96 .avr => .int,
97 else => .short,
9598 };
9699}
97100
98101/// sig_atomic_t for this target
99pub fn sigAtomicType(target: std.Target) Type {
100 if (target.cpu.arch.isWasm()) return .{ .specifier = .long };
102pub fn sigAtomicType(target: std.Target) QualType {
103 if (target.cpu.arch.isWasm()) return .long;
101104 return switch (target.cpu.arch) {
102 .avr => .{ .specifier = .schar },
103 .msp430 => .{ .specifier = .long },
104 else => .{ .specifier = .int },
105 .avr => .schar,
106 .msp430 => .long,
107 else => .int,
105108 };
106109}
107110
108111/// int64_t for this target
109pub fn int64Type(target: std.Target) Type {
112pub fn int64Type(target: std.Target) QualType {
110113 switch (target.cpu.arch) {
111114 .loongarch64,
112115 .ve,
......@@ -116,20 +119,20 @@ pub fn int64Type(target: std.Target) Type {
116119 .powerpc64le,
117120 .bpfel,
118121 .bpfeb,
119 => return .{ .specifier = .long },
122 => return .long,
120123
121124 .sparc64 => return intMaxType(target),
122125
123126 .x86, .x86_64 => if (!target.os.tag.isDarwin()) return intMaxType(target),
124 .aarch64, .aarch64_be => if (!target.os.tag.isDarwin() and target.os.tag != .openbsd and target.os.tag != .windows) return .{ .specifier = .long },
127 .aarch64, .aarch64_be => if (!target.os.tag.isDarwin() and target.os.tag != .openbsd and target.os.tag != .windows) return .long,
125128 else => {},
126129 }
127 return .{ .specifier = .long_long };
130 return .long_long;
128131}
129132
130pub fn float80Type(target: std.Target) ?Type {
133pub fn float80Type(target: std.Target) ?QualType {
131134 switch (target.cpu.arch) {
132 .x86, .x86_64 => return .{ .specifier = .long_double },
135 .x86, .x86_64 => return .long_double,
133136 else => {},
134137 }
135138 return null;
......@@ -165,7 +168,7 @@ pub fn ignoreNonZeroSizedBitfieldTypeAlignment(target: std.Target) bool {
165168 switch (target.cpu.arch) {
166169 .avr => return true,
167170 .arm => {
168 if (target.cpu.has(.arm, .has_v7)) {
171 if (std.Target.arm.featureSetHas(target.cpu.features, .has_v7)) {
169172 switch (target.os.tag) {
170173 .ios => return true,
171174 else => return false,
......@@ -188,7 +191,7 @@ pub fn minZeroWidthBitfieldAlignment(target: std.Target) ?u29 {
188191 switch (target.cpu.arch) {
189192 .avr => return 8,
190193 .arm => {
191 if (target.cpu.has(.arm, .has_v7)) {
194 if (std.Target.arm.featureSetHas(target.cpu.features, .has_v7)) {
192195 switch (target.os.tag) {
193196 .ios => return 32,
194197 else => return null,
......@@ -206,7 +209,7 @@ pub fn unnamedFieldAffectsAlignment(target: std.Target) bool {
206209 return true;
207210 },
208211 .armeb => {
209 if (target.cpu.has(.arm, .has_v7)) {
212 if (std.Target.arm.featureSetHas(target.cpu.features, .has_v7)) {
210213 if (std.Target.Abi.default(target.cpu.arch, target.os.tag) == .eabi) return true;
211214 }
212215 },
......@@ -233,7 +236,7 @@ pub fn defaultAlignment(target: std.Target) u29 {
233236 switch (target.cpu.arch) {
234237 .avr => return 1,
235238 .arm => if (target.abi.isAndroid() or target.os.tag == .ios) return 16 else return 8,
236 .sparc => if (target.cpu.has(.sparc, .v9)) return 16 else return 8,
239 .sparc => if (std.Target.sparc.featureSetHas(target.cpu.features, .v9)) return 16 else return 8,
237240 .mips, .mipsel => switch (target.abi) {
238241 .none, .gnuabi64 => return 16,
239242 else => return 8,
......@@ -245,7 +248,8 @@ pub fn defaultAlignment(target: std.Target) u29 {
245248pub fn systemCompiler(target: std.Target) LangOpts.Compiler {
246249 // Android is linux but not gcc, so these checks go first
247250 // the rest for documentation as fn returns .clang
248 if (target.abi.isAndroid() or
251 if (target.os.tag.isDarwin() or
252 target.abi.isAndroid() or
249253 target.os.tag.isBSD() or
250254 target.os.tag == .fuchsia or
251255 target.os.tag == .solaris or
......@@ -271,7 +275,7 @@ pub fn systemCompiler(target: std.Target) LangOpts.Compiler {
271275pub fn hasFloat128(target: std.Target) bool {
272276 if (target.cpu.arch.isWasm()) return true;
273277 if (target.os.tag.isDarwin()) return false;
274 if (target.cpu.arch.isPowerPC()) return target.cpu.has(.powerpc, .float128);
278 if (target.cpu.arch.isPowerPC()) return std.Target.powerpc.featureSetHas(target.cpu.features, .float128);
275279 return switch (target.os.tag) {
276280 .dragonfly,
277281 .haiku,
......@@ -339,7 +343,7 @@ pub const FPSemantics = enum {
339343 .spirv32,
340344 .spirv64,
341345 => return .IEEEHalf,
342 .x86, .x86_64 => if (target.cpu.has(.x86, .sse2)) return .IEEEHalf,
346 .x86, .x86_64 => if (std.Target.x86.featureSetHas(target.cpu.features, .sse2)) return .IEEEHalf,
343347 else => {},
344348 }
345349 return null;
......@@ -374,6 +378,10 @@ pub fn isCygwinMinGW(target: std.Target) bool {
374378 return target.os.tag == .windows and (target.abi == .gnu or target.abi == .cygnus);
375379}
376380
381pub fn isPS(target: std.Target) bool {
382 return (target.os.tag == .ps4 or target.os.tag == .ps5) and target.cpu.arch == .x86_64;
383}
384
377385pub fn builtinEnabled(target: std.Target, enabled_for: TargetSet) bool {
378386 var it = enabled_for.iterator();
379387 while (it.next()) |val| {
......@@ -404,7 +412,7 @@ pub fn defaultFpEvalMethod(target: std.Target) LangOpts.FPEvalMethod {
404412 return .double;
405413 }
406414 }
407 if (target.cpu.has(.x86, .sse)) {
415 if (std.Target.x86.featureSetHas(target.cpu.features, .sse)) {
408416 return .source;
409417 }
410418 return .extended;
......@@ -497,6 +505,8 @@ pub fn get32BitArchVariant(target: std.Target) ?std.Target {
497505 .spirv32,
498506 .loongarch32,
499507 .xtensa,
508 .propeller,
509 .or1k,
500510 => {}, // Already 32 bit
501511
502512 .aarch64 => copy.cpu.arch = .arm,
......@@ -530,6 +540,8 @@ pub fn get64BitArchVariant(target: std.Target) ?std.Target {
530540 .msp430,
531541 .xcore,
532542 .xtensa,
543 .propeller,
544 .or1k,
533545 => return null,
534546
535547 .aarch64,
......@@ -621,11 +633,14 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 {
621633 .nvptx64 => "nvptx64",
622634 .spirv32 => "spirv32",
623635 .spirv64 => "spirv64",
624 .kalimba => "kalimba",
625636 .lanai => "lanai",
626637 .wasm32 => "wasm32",
627638 .wasm64 => "wasm64",
628639 .ve => "ve",
640 // Note: propeller1, kalimba and or1k are not supported in LLVM; this is the Zig arch name
641 .kalimba => "kalimba",
642 .propeller => "propeller",
643 .or1k => "or1k",
629644 };
630645 writer.writeAll(llvm_arch) catch unreachable;
631646 writer.writeByte('-') catch unreachable;
......@@ -721,64 +736,262 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 {
721736 return writer.buffered();
722737}
723738
724test "alignment functions - smoke test" {
725 var target: std.Target = undefined;
726 const x86 = std.Target.Cpu.Arch.x86_64;
727 target.os = std.Target.Os.Tag.defaultVersionRange(.linux, x86, .none);
728 target.cpu = std.Target.Cpu.baseline(x86, target.os);
729 target.abi = std.Target.Abi.default(x86, target.os.tag);
730
731 try std.testing.expect(isTlsSupported(target));
732 try std.testing.expect(!ignoreNonZeroSizedBitfieldTypeAlignment(target));
733 try std.testing.expect(minZeroWidthBitfieldAlignment(target) == null);
734 try std.testing.expect(!unnamedFieldAffectsAlignment(target));
735 try std.testing.expect(defaultAlignment(target) == 16);
736 try std.testing.expect(!packAllEnums(target));
737 try std.testing.expect(systemCompiler(target) == .gcc);
738
739 const arm = std.Target.Cpu.Arch.arm;
740 target.os = std.Target.Os.Tag.defaultVersionRange(.ios, arm, .none);
741 target.cpu = std.Target.Cpu.baseline(arm, target.os);
742 target.abi = std.Target.Abi.default(arm, target.os.tag);
743
744 try std.testing.expect(!isTlsSupported(target));
745 try std.testing.expect(ignoreNonZeroSizedBitfieldTypeAlignment(target));
746 try std.testing.expectEqual(@as(?u29, 32), minZeroWidthBitfieldAlignment(target));
747 try std.testing.expect(unnamedFieldAffectsAlignment(target));
748 try std.testing.expect(defaultAlignment(target) == 16);
749 try std.testing.expect(!packAllEnums(target));
750 try std.testing.expect(systemCompiler(target) == .clang);
739pub const DefaultPIStatus = enum { yes, no, depends_on_linker };
740
741pub fn isPIEDefault(target: std.Target) DefaultPIStatus {
742 return switch (target.os.tag) {
743 .aix,
744 .haiku,
745
746 .macos,
747 .ios,
748 .tvos,
749 .watchos,
750 .visionos,
751 .driverkit,
752
753 .dragonfly,
754 .netbsd,
755 .freebsd,
756 .solaris,
757
758 .cuda,
759 .amdhsa,
760 .amdpal,
761 .mesa3d,
762
763 .ps4,
764 .ps5,
765
766 .hurd,
767 .zos,
768 => .no,
769
770 .openbsd,
771 .fuchsia,
772 => .yes,
773
774 .linux => {
775 if (target.abi == .ohos)
776 return .yes;
777
778 switch (target.cpu.arch) {
779 .ve => return .no,
780 else => return if (target.os.tag == .linux or target.abi.isAndroid() or target.abi.isMusl()) .yes else .no,
781 }
782 },
783
784 .windows => {
785 if (target.isMinGW())
786 return .no;
787
788 if (target.abi == .itanium)
789 return if (target.cpu.arch == .x86_64) .yes else .no;
790
791 if (target.abi == .msvc or target.abi == .none)
792 return .depends_on_linker;
793
794 return .no;
795 },
796
797 else => {
798 switch (target.cpu.arch) {
799 .hexagon => {
800 // CLANG_DEFAULT_PIE_ON_LINUX
801 return if (target.os.tag == .linux or target.abi.isAndroid() or target.abi.isMusl()) .yes else .no;
802 },
803
804 else => return .no,
805 }
806 },
807 };
751808}
752809
753test "target size/align tests" {
754 var comp: @import("Compilation.zig") = undefined;
810pub fn isPICdefault(target: std.Target) DefaultPIStatus {
811 return switch (target.os.tag) {
812 .aix,
813 .haiku,
814
815 .macos,
816 .ios,
817 .tvos,
818 .watchos,
819 .visionos,
820 .driverkit,
821
822 .amdhsa,
823 .amdpal,
824 .mesa3d,
825
826 .ps4,
827 .ps5,
828 => .yes,
829
830 .fuchsia,
831 .cuda,
832 .zos,
833 => .no,
834
835 .dragonfly,
836 .openbsd,
837 .netbsd,
838 .freebsd,
839 .solaris,
840 .hurd,
841 => {
842 return switch (target.cpu.arch) {
843 .mips64, .mips64el => .yes,
844 else => .no,
845 };
846 },
847
848 .linux => {
849 if (target.abi == .ohos)
850 return .no;
755851
756 const x86 = std.Target.Cpu.Arch.x86;
757 comp.target.cpu.arch = x86;
758 comp.target.cpu.model = &std.Target.x86.cpu.i586;
759 comp.target.os = std.Target.Os.Tag.defaultVersionRange(.linux, x86, .none);
760 comp.target.abi = std.Target.Abi.gnu;
852 return switch (target.cpu.arch) {
853 .mips64, .mips64el => .yes,
854 else => .no,
855 };
856 },
761857
762 const tt: Type = .{
763 .specifier = .long_long,
858 .windows => {
859 if (target.isMinGW())
860 return if (target.cpu.arch == .x86_64 or target.cpu.arch == .aarch64) .yes else .no;
861
862 if (target.abi == .itanium)
863 return if (target.cpu.arch == .x86_64) .yes else .no;
864
865 if (target.abi == .msvc or target.abi == .none)
866 return .depends_on_linker;
867
868 if (target.ofmt == .macho)
869 return .yes;
870
871 return switch (target.cpu.arch) {
872 .x86_64, .mips64, .mips64el => .yes,
873 else => .no,
874 };
875 },
876
877 else => {
878 if (target.ofmt == .macho)
879 return .yes;
880
881 return switch (target.cpu.arch) {
882 .mips64, .mips64el => .yes,
883 else => .no,
884 };
885 },
764886 };
887}
765888
766 try std.testing.expectEqual(@as(u64, 8), tt.sizeof(&comp).?);
767 try std.testing.expectEqual(@as(u64, 4), tt.alignof(&comp));
889pub fn isPICDefaultForced(target: std.Target) DefaultPIStatus {
890 return switch (target.os.tag) {
891 .aix, .amdhsa, .amdpal, .mesa3d => .yes,
892
893 .haiku,
894 .dragonfly,
895 .openbsd,
896 .netbsd,
897 .freebsd,
898 .solaris,
899 .cuda,
900 .ps4,
901 .ps5,
902 .hurd,
903 .linux,
904 .fuchsia,
905 .zos,
906 => .no,
907
908 .windows => {
909 if (target.isMinGW())
910 return .yes;
768911
769 const arm = std.Target.Cpu.Arch.arm;
770 comp.target.cpu = std.Target.Cpu.Model.toCpu(&std.Target.arm.cpu.cortex_r4, arm);
771 comp.target.os = std.Target.Os.Tag.defaultVersionRange(.ios, arm, .none);
772 comp.target.abi = std.Target.Abi.none;
912 if (target.abi == .itanium)
913 return if (target.cpu.arch == .x86_64) .yes else .no;
773914
774 const ct: Type = .{
775 .specifier = .char,
915 // if (bfd) return target.cpu.arch == .x86_64 else target.cpu.arch == .x86_64 or target.cpu.arch == .aarch64;
916 if (target.abi == .msvc or target.abi == .none)
917 return .depends_on_linker;
918
919 if (target.ofmt == .macho)
920 return if (target.cpu.arch == .aarch64 or target.cpu.arch == .x86_64) .yes else .no;
921
922 return if (target.cpu.arch == .x86_64) .yes else .no;
923 },
924
925 .macos,
926 .ios,
927 .tvos,
928 .watchos,
929 .visionos,
930 .driverkit,
931 => if (target.cpu.arch == .x86_64 or target.cpu.arch == .aarch64) .yes else .no,
932
933 else => {
934 return switch (target.cpu.arch) {
935 .hexagon,
936 .lanai,
937 .avr,
938 .riscv32,
939 .riscv64,
940 .csky,
941 .xcore,
942 .wasm32,
943 .wasm64,
944 .ve,
945 .spirv32,
946 .spirv64,
947 => .no,
948
949 .msp430 => .yes,
950
951 else => {
952 if (target.ofmt == .macho)
953 return if (target.cpu.arch == .aarch64 or target.cpu.arch == .x86_64) .yes else .no;
954 return .no;
955 },
956 };
957 },
776958 };
959}
777960
778 try std.testing.expectEqual(true, comp.target.cpu.has(.arm, .has_v7));
779 try std.testing.expectEqual(@as(u64, 1), ct.sizeof(&comp).?);
780 try std.testing.expectEqual(@as(u64, 1), ct.alignof(&comp));
781 try std.testing.expectEqual(true, ignoreNonZeroSizedBitfieldTypeAlignment(comp.target));
961test "alignment functions - smoke test" {
962 const linux: std.Target.Os = .{ .tag = .linux, .version_range = .{ .none = {} } };
963 const x86_64_target: std.Target = .{
964 .abi = std.Target.Abi.default(.x86_64, linux.tag),
965 .cpu = std.Target.Cpu.Model.generic(.x86_64).toCpu(.x86_64),
966 .os = linux,
967 .ofmt = .elf,
968 };
969
970 try std.testing.expect(isTlsSupported(x86_64_target));
971 try std.testing.expect(!ignoreNonZeroSizedBitfieldTypeAlignment(x86_64_target));
972 try std.testing.expect(minZeroWidthBitfieldAlignment(x86_64_target) == null);
973 try std.testing.expect(!unnamedFieldAffectsAlignment(x86_64_target));
974 try std.testing.expect(defaultAlignment(x86_64_target) == 16);
975 try std.testing.expect(!packAllEnums(x86_64_target));
976 try std.testing.expect(systemCompiler(x86_64_target) == .gcc);
977}
978
979test "target size/align tests" {
980 var comp: @import("Compilation.zig") = undefined;
981
982 const linux: std.Target.Os = .{ .tag = .linux, .version_range = .{ .none = {} } };
983 const x86_target: std.Target = .{
984 .abi = std.Target.Abi.default(.x86, linux.tag),
985 .cpu = std.Target.Cpu.Model.generic(.x86).toCpu(.x86),
986 .os = linux,
987 .ofmt = .elf,
988 };
989 comp.target = x86_target;
990
991 const tt: QualType = .long_long;
992
993 try std.testing.expectEqual(@as(u64, 8), tt.sizeof(&comp));
994 try std.testing.expectEqual(@as(u64, 4), tt.alignof(&comp));
782995}
783996
784997/// The canonical integer representation of nullptr_t.
lib/compiler/aro/aro/text_literal.zig+263-104
......@@ -1,11 +1,13 @@
11//! Parsing and classification of string and character literals
22
33const std = @import("std");
4const mem = std.mem;
5
46const Compilation = @import("Compilation.zig");
5const Type = @import("Type.zig");
67const Diagnostics = @import("Diagnostics.zig");
78const Tokenizer = @import("Tokenizer.zig");
8const mem = std.mem;
9const QualType = @import("TypeStore.zig").QualType;
10const Source = @import("Source.zig");
911
1012pub const Item = union(enum) {
1113 /// decoded hex or character escape
......@@ -18,11 +20,6 @@ pub const Item = union(enum) {
1820 utf8_text: std.unicode.Utf8View,
1921};
2022
21const CharDiagnostic = struct {
22 tag: Diagnostics.Tag,
23 extra: Diagnostics.Message.Extra,
24};
25
2623pub const Kind = enum {
2724 char,
2825 wide,
......@@ -91,13 +88,13 @@ pub const Kind = enum {
9188 }
9289
9390 /// The C type of a character literal of this kind
94 pub fn charLiteralType(kind: Kind, comp: *const Compilation) Type {
91 pub fn charLiteralType(kind: Kind, comp: *const Compilation) QualType {
9592 return switch (kind) {
96 .char => Type.int,
97 .wide => comp.types.wchar,
98 .utf_8 => .{ .specifier = .uchar },
99 .utf_16 => comp.types.uint_least16_t,
100 .utf_32 => comp.types.uint_least32_t,
93 .char => .int,
94 .wide => comp.type_store.wchar,
95 .utf_8 => .uchar,
96 .utf_16 => comp.type_store.uint_least16_t,
97 .utf_32 => comp.type_store.uint_least32_t,
10198 .unterminated => unreachable,
10299 };
103100 }
......@@ -120,7 +117,7 @@ pub const Kind = enum {
120117 pub fn charUnitSize(kind: Kind, comp: *const Compilation) Compilation.CharUnitSize {
121118 return switch (kind) {
122119 .char => .@"1",
123 .wide => switch (comp.types.wchar.sizeof(comp).?) {
120 .wide => switch (comp.type_store.wchar.sizeof(comp)) {
124121 2 => .@"2",
125122 4 => .@"4",
126123 else => unreachable,
......@@ -140,37 +137,55 @@ pub const Kind = enum {
140137 }
141138
142139 /// The C type of an element of a string literal of this kind
143 pub fn elementType(kind: Kind, comp: *const Compilation) Type {
140 pub fn elementType(kind: Kind, comp: *const Compilation) QualType {
144141 return switch (kind) {
145142 .unterminated => unreachable,
146 .char => .{ .specifier = .char },
147 .utf_8 => if (comp.langopts.hasChar8_T()) .{ .specifier = .uchar } else .{ .specifier = .char },
143 .char => .char,
144 .utf_8 => if (comp.langopts.hasChar8_T()) .uchar else .char,
148145 else => kind.charLiteralType(comp),
149146 };
150147 }
151148};
152149
150pub const Ascii = struct {
151 val: u7,
152
153 pub fn init(val: anytype) Ascii {
154 return .{ .val = @intCast(val) };
155 }
156
157 pub fn format(ctx: Ascii, w: *std.Io.Writer, fmt_str: []const u8) !usize {
158 const template = "{c}";
159 const i = std.mem.indexOf(u8, fmt_str, template).?;
160 try w.writeAll(fmt_str[0..i]);
161
162 if (std.ascii.isPrint(ctx.val)) {
163 try w.writeByte(ctx.val);
164 } else {
165 try w.print("x{x:0>2}", .{ctx.val});
166 }
167 return i + template.len;
168 }
169};
170
153171pub const Parser = struct {
172 comp: *const Compilation,
154173 literal: []const u8,
155174 i: usize = 0,
156175 kind: Kind,
157176 max_codepoint: u21,
177 loc: Source.Location,
178 /// Offset added to `loc.byte_offset` when emitting an error.
179 offset: u32 = 0,
180 expansion_locs: []const Source.Location,
158181 /// We only want to issue a max of 1 error per char literal
159182 errored: bool = false,
160 errors_buffer: [4]CharDiagnostic,
161 errors_len: usize,
162 comp: *const Compilation,
163
164 pub fn init(literal: []const u8, kind: Kind, max_codepoint: u21, comp: *const Compilation) Parser {
165 return .{
166 .literal = literal,
167 .comp = comp,
168 .kind = kind,
169 .max_codepoint = max_codepoint,
170 .errors_buffer = undefined,
171 .errors_len = 0,
172 };
173 }
183 /// Makes incorrect encoding always an error.
184 /// Used when concatenating string literals.
185 incorrect_encoding_is_error: bool = false,
186 /// If this is false, do not issue any diagnostics for incorrect character encoding
187 /// Incorrect encoding is allowed if we are unescaping an identifier in the preprocessor
188 diagnose_incorrect_encoding: bool = true,
174189
175190 fn prefixLen(self: *const Parser) usize {
176191 return switch (self.kind) {
......@@ -181,65 +196,204 @@ pub const Parser = struct {
181196 };
182197 }
183198
184 pub fn errors(p: *Parser) []CharDiagnostic {
185 return p.errors_buffer[0..p.errors_len];
199 const Diagnostic = struct {
200 fmt: []const u8,
201 kind: Diagnostics.Message.Kind,
202 opt: ?Diagnostics.Option = null,
203 extension: bool = false,
204
205 pub const illegal_char_encoding_error: Diagnostic = .{
206 .fmt = "illegal character encoding in character literal",
207 .kind = .@"error",
208 };
209
210 pub const illegal_char_encoding_warning: Diagnostic = .{
211 .fmt = "illegal character encoding in character literal",
212 .kind = .warning,
213 .opt = .@"invalid-source-encoding",
214 };
215
216 pub const missing_hex_escape: Diagnostic = .{
217 .fmt = "\\{c} used with no following hex digits",
218 .kind = .@"error",
219 };
220
221 pub const escape_sequence_overflow: Diagnostic = .{
222 .fmt = "escape sequence out of range",
223 .kind = .@"error",
224 };
225
226 pub const incomplete_universal_character: Diagnostic = .{
227 .fmt = "incomplete universal character name",
228 .kind = .@"error",
229 };
230
231 pub const invalid_universal_character: Diagnostic = .{
232 .fmt = "invalid universal character",
233 .kind = .@"error",
234 };
235
236 pub const char_too_large: Diagnostic = .{
237 .fmt = "character too large for enclosing character literal type",
238 .kind = .@"error",
239 };
240
241 pub const ucn_basic_char_error: Diagnostic = .{
242 .fmt = "character '{c}' cannot be specified by a universal character name",
243 .kind = .@"error",
244 };
245
246 pub const ucn_basic_char_warning: Diagnostic = .{
247 .fmt = "specifying character '{c}' with a universal character name is incompatible with C standards before C23",
248 .kind = .off,
249 .opt = .@"pre-c23-compat",
250 };
251
252 pub const ucn_control_char_error: Diagnostic = .{
253 .fmt = "universal character name refers to a control character",
254 .kind = .@"error",
255 };
256
257 pub const ucn_control_char_warning: Diagnostic = .{
258 .fmt = "universal character name referring to a control character is incompatible with C standards before C23",
259 .kind = .off,
260 .opt = .@"pre-c23-compat",
261 };
262
263 pub const c89_ucn_in_literal: Diagnostic = .{
264 .fmt = "universal character names are only valid in C99 or later",
265 .kind = .warning,
266 .opt = .unicode,
267 };
268
269 const non_standard_escape_char: Diagnostic = .{
270 .fmt = "use of non-standard escape character '\\{c}'",
271 .kind = .off,
272 .extension = true,
273 };
274
275 pub const unknown_escape_sequence: Diagnostic = .{
276 .fmt = "unknown escape sequence '\\{c}'",
277 .kind = .warning,
278 .opt = .@"unknown-escape-sequence",
279 };
280
281 pub const four_char_char_literal: Diagnostic = .{
282 .fmt = "multi-character character constant",
283 .opt = .@"four-char-constants",
284 .kind = .off,
285 };
286
287 pub const multichar_literal_warning: Diagnostic = .{
288 .fmt = "multi-character character constant",
289 .kind = .warning,
290 .opt = .multichar,
291 };
292
293 pub const invalid_multichar_literal: Diagnostic = .{
294 .fmt = "{s} character literals may not contain multiple characters",
295 .kind = .@"error",
296 };
297
298 pub const char_lit_too_wide: Diagnostic = .{
299 .fmt = "character constant too long for its type",
300 .kind = .warning,
301 };
302
303 // pub const wide_multichar_literal: Diagnostic = .{
304 // .fmt = "extraneous characters in character constant ignored",
305 // .kind = .warning,
306 // };
307 };
308
309 pub fn err(p: *Parser, diagnostic: Diagnostic, args: anytype) !void {
310 defer p.offset = 0;
311 if (p.errored) return;
312 defer p.errored = true;
313 try p.warn(diagnostic, args);
186314 }
187315
188 pub fn err(self: *Parser, tag: Diagnostics.Tag, extra: Diagnostics.Message.Extra) void {
189 if (self.errored) return;
190 self.errored = true;
191 const diagnostic: CharDiagnostic = .{ .tag = tag, .extra = extra };
192 if (self.errors_len == self.errors_buffer.len) {
193 self.errors_buffer[self.errors_buffer.len - 1] = diagnostic;
194 } else {
195 self.errors_buffer[self.errors_len] = diagnostic;
196 self.errors_len += 1;
197 }
316 pub fn warn(p: *Parser, diagnostic: Diagnostic, args: anytype) Compilation.Error!void {
317 defer p.offset = 0;
318 if (p.errored) return;
319 if (p.comp.diagnostics.effectiveKind(diagnostic) == .off) return;
320
321 var sf = std.heap.stackFallback(1024, p.comp.gpa);
322 var allocating: std.Io.Writer.Allocating = .init(sf.get());
323 defer allocating.deinit();
324
325 formatArgs(&allocating.writer, diagnostic.fmt, args) catch return error.OutOfMemory;
326
327 var offset_location = p.loc;
328 offset_location.byte_offset += p.offset;
329 try p.comp.diagnostics.addWithLocation(p.comp, .{
330 .kind = diagnostic.kind,
331 .text = allocating.getWritten(),
332 .opt = diagnostic.opt,
333 .extension = diagnostic.extension,
334 .location = offset_location.expand(p.comp),
335 }, p.expansion_locs, true);
198336 }
199337
200 pub fn warn(self: *Parser, tag: Diagnostics.Tag, extra: Diagnostics.Message.Extra) void {
201 if (self.errored) return;
202 if (self.errors_len < self.errors_buffer.len) {
203 self.errors_buffer[self.errors_len] = .{ .tag = tag, .extra = extra };
204 self.errors_len += 1;
338 fn formatArgs(w: *std.Io.Writer, fmt: []const u8, args: anytype) !void {
339 var i: usize = 0;
340 inline for (std.meta.fields(@TypeOf(args))) |arg_info| {
341 const arg = @field(args, arg_info.name);
342 i += switch (@TypeOf(arg)) {
343 []const u8 => try Diagnostics.formatString(w, fmt[i..], arg),
344 Ascii => try arg.format(w, fmt[i..]),
345 else => switch (@typeInfo(@TypeOf(arg))) {
346 .int, .comptime_int => try Diagnostics.formatInt(w, fmt[i..], arg),
347 .pointer => try Diagnostics.formatString(w, fmt[i..], arg),
348 else => unreachable,
349 },
350 };
205351 }
352 try w.writeAll(fmt[i..]);
206353 }
207354
208 pub fn next(self: *Parser) ?Item {
209 if (self.i >= self.literal.len) return null;
355 pub fn next(p: *Parser) !?Item {
356 if (p.i >= p.literal.len) return null;
210357
211 const start = self.i;
212 if (self.literal[start] != '\\') {
213 self.i = mem.indexOfScalarPos(u8, self.literal, start + 1, '\\') orelse self.literal.len;
214 const unescaped_slice = self.literal[start..self.i];
358 const start = p.i;
359 if (p.literal[start] != '\\') {
360 p.i = mem.indexOfScalarPos(u8, p.literal, start + 1, '\\') orelse p.literal.len;
361 const unescaped_slice = p.literal[start..p.i];
215362
216363 const view = std.unicode.Utf8View.init(unescaped_slice) catch {
217 if (self.kind != .char) {
218 self.err(.illegal_char_encoding_error, .{ .none = {} });
364 if (!p.diagnose_incorrect_encoding) {
365 return .{ .improperly_encoded = p.literal[start..p.i] };
366 }
367 if (p.incorrect_encoding_is_error) {
368 try p.warn(.illegal_char_encoding_error, .{});
369 return .{ .improperly_encoded = p.literal[start..p.i] };
370 }
371 if (p.kind != .char) {
372 try p.err(.illegal_char_encoding_error, .{});
219373 return null;
220374 }
221 self.warn(.illegal_char_encoding_warning, .{ .none = {} });
222 return .{ .improperly_encoded = self.literal[start..self.i] };
375 try p.warn(.illegal_char_encoding_warning, .{});
376 return .{ .improperly_encoded = p.literal[start..p.i] };
223377 };
224378 return .{ .utf8_text = view };
225379 }
226 switch (self.literal[start + 1]) {
227 'u', 'U' => return self.parseUnicodeEscape(),
228 else => return self.parseEscapedChar(),
380 switch (p.literal[start + 1]) {
381 'u', 'U' => return try p.parseUnicodeEscape(),
382 else => return try p.parseEscapedChar(),
229383 }
230384 }
231385
232 fn parseUnicodeEscape(self: *Parser) ?Item {
233 const start = self.i;
386 fn parseUnicodeEscape(p: *Parser) !?Item {
387 const start = p.i;
234388
235 std.debug.assert(self.literal[self.i] == '\\');
389 std.debug.assert(p.literal[p.i] == '\\');
236390
237 const kind = self.literal[self.i + 1];
391 const kind = p.literal[p.i + 1];
238392 std.debug.assert(kind == 'u' or kind == 'U');
239393
240 self.i += 2;
241 if (self.i >= self.literal.len or !std.ascii.isHex(self.literal[self.i])) {
242 self.err(.missing_hex_escape, .{ .ascii = @intCast(kind) });
394 p.i += 2;
395 if (p.i >= p.literal.len or !std.ascii.isHex(p.literal[p.i])) {
396 try p.err(.missing_hex_escape, .{Ascii.init(kind)});
243397 return null;
244398 }
245399 const expected_len: usize = if (kind == 'u') 4 else 8;
......@@ -247,66 +401,66 @@ pub const Parser = struct {
247401 var count: usize = 0;
248402 var val: u32 = 0;
249403
250 for (self.literal[self.i..], 0..) |c, i| {
404 for (p.literal[p.i..], 0..) |c, i| {
251405 if (i == expected_len) break;
252406
253 const char = std.fmt.charToDigit(c, 16) catch {
254 break;
255 };
407 const char = std.fmt.charToDigit(c, 16) catch break;
256408
257409 val, const overflow = @shlWithOverflow(val, 4);
258410 overflowed = overflowed or overflow != 0;
259411 val |= char;
260412 count += 1;
261413 }
262 self.i += expected_len;
414 p.i += expected_len;
263415
264416 if (overflowed) {
265 self.err(.escape_sequence_overflow, .{ .offset = start + self.prefixLen() });
417 p.offset += @intCast(start + p.prefixLen());
418 try p.err(.escape_sequence_overflow, .{});
266419 return null;
267420 }
268421
269422 if (count != expected_len) {
270 self.err(.incomplete_universal_character, .{ .none = {} });
423 try p.err(.incomplete_universal_character, .{});
271424 return null;
272425 }
273426
274427 if (val > std.math.maxInt(u21) or !std.unicode.utf8ValidCodepoint(@intCast(val))) {
275 self.err(.invalid_universal_character, .{ .offset = start + self.prefixLen() });
428 p.offset += @intCast(start + p.prefixLen());
429 try p.err(.invalid_universal_character, .{});
276430 return null;
277431 }
278432
279 if (val > self.max_codepoint) {
280 self.err(.char_too_large, .{ .none = {} });
433 if (val > p.max_codepoint) {
434 try p.err(.char_too_large, .{});
281435 return null;
282436 }
283437
284438 if (val < 0xA0 and (val != '$' and val != '@' and val != '`')) {
285 const is_error = !self.comp.langopts.standard.atLeast(.c23);
439 const is_error = !p.comp.langopts.standard.atLeast(.c23);
286440 if (val >= 0x20 and val <= 0x7F) {
287441 if (is_error) {
288 self.err(.ucn_basic_char_error, .{ .ascii = @intCast(val) });
289 } else {
290 self.warn(.ucn_basic_char_warning, .{ .ascii = @intCast(val) });
442 try p.err(.ucn_basic_char_error, .{Ascii.init(val)});
443 } else if (!p.comp.langopts.standard.atLeast(.c23)) {
444 try p.warn(.ucn_basic_char_warning, .{Ascii.init(val)});
291445 }
292446 } else {
293447 if (is_error) {
294 self.err(.ucn_control_char_error, .{ .none = {} });
295 } else {
296 self.warn(.ucn_control_char_warning, .{ .none = {} });
448 try p.err(.ucn_control_char_error, .{});
449 } else if (!p.comp.langopts.standard.atLeast(.c23)) {
450 try p.warn(.ucn_control_char_warning, .{});
297451 }
298452 }
299453 }
300454
301 self.warn(.c89_ucn_in_literal, .{ .none = {} });
455 if (!p.comp.langopts.standard.atLeast(.c99)) try p.warn(.c89_ucn_in_literal, .{});
302456 return .{ .codepoint = @intCast(val) };
303457 }
304458
305 fn parseEscapedChar(self: *Parser) Item {
306 self.i += 1;
307 const c = self.literal[self.i];
459 fn parseEscapedChar(p: *Parser) !Item {
460 p.i += 1;
461 const c = p.literal[p.i];
308462 defer if (c != 'x' and (c < '0' or c > '7')) {
309 self.i += 1;
463 p.i += 1;
310464 };
311465
312466 switch (c) {
......@@ -319,36 +473,40 @@ pub const Parser = struct {
319473 'a' => return .{ .value = 0x07 },
320474 'b' => return .{ .value = 0x08 },
321475 'e', 'E' => {
322 self.warn(.non_standard_escape_char, .{ .invalid_escape = .{ .char = c, .offset = @intCast(self.i) } });
476 p.offset += @intCast(p.i);
477 try p.warn(.non_standard_escape_char, .{Ascii.init(c)});
323478 return .{ .value = 0x1B };
324479 },
325480 '(', '{', '[', '%' => {
326 self.warn(.non_standard_escape_char, .{ .invalid_escape = .{ .char = c, .offset = @intCast(self.i) } });
481 p.offset += @intCast(p.i);
482 try p.warn(.non_standard_escape_char, .{Ascii.init(c)});
327483 return .{ .value = c };
328484 },
329485 'f' => return .{ .value = 0x0C },
330486 'v' => return .{ .value = 0x0B },
331 'x' => return .{ .value = self.parseNumberEscape(.hex) },
332 '0'...'7' => return .{ .value = self.parseNumberEscape(.octal) },
487 'x' => return .{ .value = try p.parseNumberEscape(.hex) },
488 '0'...'7' => return .{ .value = try p.parseNumberEscape(.octal) },
333489 'u', 'U' => unreachable, // handled by parseUnicodeEscape
334490 else => {
335 self.warn(.unknown_escape_sequence, .{ .invalid_escape = .{ .char = c, .offset = @intCast(self.i) } });
491 p.offset += @intCast(p.i);
492 try p.warn(.unknown_escape_sequence, .{Ascii.init(c)});
336493 return .{ .value = c };
337494 },
338495 }
339496 }
340497
341 fn parseNumberEscape(self: *Parser, base: EscapeBase) u32 {
498 fn parseNumberEscape(p: *Parser, base: EscapeBase) !u32 {
342499 var val: u32 = 0;
343500 var count: usize = 0;
344501 var overflowed = false;
345 const start = self.i;
346 defer self.i += count;
502 const start = p.i;
503 defer p.i += count;
504
347505 const slice = switch (base) {
348 .octal => self.literal[self.i..@min(self.literal.len, self.i + 3)], // max 3 chars
506 .octal => p.literal[p.i..@min(p.literal.len, p.i + 3)], // max 3 chars
349507 .hex => blk: {
350 self.i += 1;
351 break :blk self.literal[self.i..]; // skip over 'x'; could have an arbitrary number of chars
508 p.i += 1;
509 break :blk p.literal[p.i..]; // skip over 'x'; could have an arbitrary number of chars
352510 },
353511 };
354512 for (slice) |c| {
......@@ -358,13 +516,14 @@ pub const Parser = struct {
358516 val += char;
359517 count += 1;
360518 }
361 if (overflowed or val > self.kind.maxInt(self.comp)) {
362 self.err(.escape_sequence_overflow, .{ .offset = start + self.prefixLen() });
519 if (overflowed or val > p.kind.maxInt(p.comp)) {
520 p.offset += @intCast(start + p.prefixLen());
521 try p.err(.escape_sequence_overflow, .{});
363522 return 0;
364523 }
365524 if (count == 0) {
366525 std.debug.assert(base == .hex);
367 self.err(.missing_hex_escape, .{ .ascii = 'x' });
526 try p.err(.missing_hex_escape, .{Ascii.init('x')});
368527 }
369528 return val;
370529 }
lib/compiler/aro/aro/toolchains/Linux.zig+17-15
......@@ -1,12 +1,14 @@
11const std = @import("std");
22const mem = std.mem;
3
4const system_defaults = @import("system_defaults");
5
36const Compilation = @import("../Compilation.zig");
4const GCCDetector = @import("../Driver/GCCDetector.zig");
5const Toolchain = @import("../Toolchain.zig");
67const Driver = @import("../Driver.zig");
78const Distro = @import("../Driver/Distro.zig");
9const GCCDetector = @import("../Driver/GCCDetector.zig");
810const target_util = @import("../target.zig");
9const system_defaults = @import("system_defaults");
11const Toolchain = @import("../Toolchain.zig");
1012
1113const Linux = @This();
1214
......@@ -144,7 +146,7 @@ fn getPIE(self: *const Linux, d: *const Driver) bool {
144146fn getStaticPIE(self: *const Linux, d: *Driver) !bool {
145147 _ = self;
146148 if (d.static_pie and d.pie != null) {
147 try d.err("cannot specify 'nopie' along with 'static-pie'");
149 try d.err("cannot specify 'nopie' along with 'static-pie'", .{});
148150 }
149151 return d.static_pie;
150152}
......@@ -195,7 +197,7 @@ pub fn buildLinkerArgs(self: *const Linux, tc: *const Toolchain, argv: *std.arra
195197 if (target_util.ldEmulationOption(d.comp.target, null)) |emulation| {
196198 try argv.appendSlice(&.{ "-m", emulation });
197199 } else {
198 try d.err("Unknown target triple");
200 try d.err("Unknown target triple", .{});
199201 return;
200202 }
201203 if (d.comp.target.cpu.arch.isRISCV()) {
......@@ -214,9 +216,9 @@ pub fn buildLinkerArgs(self: *const Linux, tc: *const Toolchain, argv: *std.arra
214216 const dynamic_linker = d.comp.target.standardDynamicLinkerPath();
215217 // todo: check for --dyld-prefix
216218 if (dynamic_linker.get()) |path| {
217 try argv.appendSlice(&.{ "-dynamic-linker", try tc.arena.dupe(u8, path) });
219 try argv.appendSlice(&.{ "-dynamic-linker", try d.comp.arena.dupe(u8, path) });
218220 } else {
219 try d.err("Could not find dynamic linker path");
221 try d.err("Could not find dynamic linker path", .{});
220222 }
221223 }
222224 }
......@@ -318,7 +320,7 @@ pub fn buildLinkerArgs(self: *const Linux, tc: *const Toolchain, argv: *std.arra
318320
319321fn getMultiarchTriple(target: std.Target) ?[]const u8 {
320322 const is_android = target.abi.isAndroid();
321 const is_mips_r6 = target.cpu.has(.mips, .mips32r6);
323 const is_mips_r6 = std.Target.mips.featureSetHas(target.cpu.features, .mips32r6);
322324 return switch (target.cpu.arch) {
323325 .arm, .thumb => if (is_android) "arm-linux-androideabi" else if (target.abi == .gnueabihf) "arm-linux-gnueabihf" else "arm-linux-gnueabi",
324326 .armeb, .thumbeb => if (target.abi == .gnueabihf) "armeb-linux-gnueabihf" else "armeb-linux-gnueabi",
......@@ -372,13 +374,13 @@ pub fn defineSystemIncludes(self: *const Linux, tc: *const Toolchain) !void {
372374 // musl prefers /usr/include before builtin includes, so musl targets will add builtins
373375 // at the end of this function (unless disabled with nostdlibinc)
374376 if (!tc.driver.nobuiltininc and (!target.abi.isMusl() or tc.driver.nostdlibinc)) {
375 try comp.addBuiltinIncludeDir(tc.driver.aro_name);
377 try comp.addBuiltinIncludeDir(tc.driver.aro_name, tc.driver.resource_dir);
376378 }
377379
378380 if (tc.driver.nostdlibinc) return;
379381
380382 const sysroot = tc.getSysroot();
381 const local_include = try std.fmt.allocPrint(comp.gpa, "{s}{s}", .{ sysroot, "/usr/local/include" });
383 const local_include = try std.fs.path.join(comp.gpa, &.{ sysroot, "/usr/local/include" });
382384 defer comp.gpa.free(local_include);
383385 try comp.addSystemIncludeDir(local_include);
384386
......@@ -389,7 +391,7 @@ pub fn defineSystemIncludes(self: *const Linux, tc: *const Toolchain) !void {
389391 }
390392
391393 if (getMultiarchTriple(target)) |triple| {
392 const joined = try std.fs.path.join(comp.gpa, &.{ sysroot, "usr", "include", triple });
394 const joined = try std.fs.path.join(comp.gpa, &.{ sysroot, "/usr/include", triple });
393395 defer comp.gpa.free(joined);
394396 if (tc.filesystem.exists(joined)) {
395397 try comp.addSystemIncludeDir(joined);
......@@ -403,7 +405,7 @@ pub fn defineSystemIncludes(self: *const Linux, tc: *const Toolchain) !void {
403405
404406 std.debug.assert(!tc.driver.nostdlibinc);
405407 if (!tc.driver.nobuiltininc and target.abi.isMusl()) {
406 try comp.addBuiltinIncludeDir(tc.driver.aro_name);
408 try comp.addBuiltinIncludeDir(tc.driver.aro_name, tc.driver.resource_dir);
407409 }
408410}
409411
......@@ -414,7 +416,7 @@ test Linux {
414416 defer arena_instance.deinit();
415417 const arena = arena_instance.allocator();
416418
417 var comp = Compilation.init(std.testing.allocator, std.fs.cwd());
419 var comp = Compilation.init(std.testing.allocator, arena, undefined, std.fs.cwd());
418420 defer comp.deinit();
419421 comp.environment = .{
420422 .path = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
......@@ -426,7 +428,7 @@ test Linux {
426428 comp.target = try std.zig.system.resolveTargetQuery(target_query);
427429 comp.langopts.setEmulatedCompiler(.gcc);
428430
429 var driver: Driver = .{ .comp = &comp };
431 var driver: Driver = .{ .comp = &comp, .diagnostics = undefined };
430432 defer driver.deinit();
431433 driver.raw_target_triple = raw_triple;
432434
......@@ -434,7 +436,7 @@ test Linux {
434436 try driver.link_objects.append(driver.comp.gpa, link_obj);
435437 driver.temp_file_count += 1;
436438
437 var toolchain: Toolchain = .{ .driver = &driver, .arena = arena, .filesystem = .{ .fake = &.{
439 var toolchain: Toolchain = .{ .driver = &driver, .filesystem = .{ .fake = &.{
438440 .{ .path = "/tmp" },
439441 .{ .path = "/usr" },
440442 .{ .path = "/usr/lib64" },
lib/compiler/aro/assembly_backend.zig created+12
......@@ -0,0 +1,12 @@
1const std = @import("std");
2
3const aro = @import("aro");
4
5pub const x86_64 = @import("assembly_backend/x86_64.zig");
6
7pub fn genAsm(target: std.Target, tree: *const aro.Tree) aro.Compilation.Error!aro.Assembly {
8 return switch (target.cpu.arch) {
9 .x86_64 => x86_64.genAsm(tree),
10 else => std.debug.panic("genAsm not implemented: {s}", .{@tagName(target.cpu.arch)}),
11 };
12}
lib/compiler/aro/assembly_backend/x86_64.zig created+254
......@@ -0,0 +1,254 @@
1const std = @import("std");
2const Allocator = std.mem.Allocator;
3const assert = std.debug.assert;
4
5const aro = @import("aro");
6const Assembly = aro.Assembly;
7const Compilation = aro.Compilation;
8const Node = Tree.Node;
9const Source = aro.Source;
10const Tree = aro.Tree;
11const QualType = aro.QualType;
12const Value = aro.Value;
13
14const AsmCodeGen = @This();
15const Error = aro.Compilation.Error;
16
17tree: *const Tree,
18comp: *Compilation,
19text: *std.Io.Writer,
20data: *std.Io.Writer,
21
22const StorageUnit = enum(u8) {
23 byte = 8,
24 short = 16,
25 long = 32,
26 quad = 64,
27
28 fn trunc(self: StorageUnit, val: u64) u64 {
29 return switch (self) {
30 .byte => @as(u8, @truncate(val)),
31 .short => @as(u16, @truncate(val)),
32 .long => @as(u32, @truncate(val)),
33 .quad => val,
34 };
35 }
36};
37
38fn serializeInt(value: u64, storage_unit: StorageUnit, w: *std.Io.Writer) !void {
39 try w.print(" .{s} 0x{x}\n", .{ @tagName(storage_unit), storage_unit.trunc(value) });
40}
41
42fn serializeFloat(comptime T: type, value: T, w: *std.Io.Writer) !void {
43 switch (T) {
44 f128 => {
45 const bytes = std.mem.asBytes(&value);
46 const first = std.mem.bytesToValue(u64, bytes[0..8]);
47 try serializeInt(first, .quad, w);
48 const second = std.mem.bytesToValue(u64, bytes[8..16]);
49 return serializeInt(second, .quad, w);
50 },
51 f80 => {
52 const bytes = std.mem.asBytes(&value);
53 const first = std.mem.bytesToValue(u64, bytes[0..8]);
54 try serializeInt(first, .quad, w);
55 const second = std.mem.bytesToValue(u16, bytes[8..10]);
56 try serializeInt(second, .short, w);
57 return w.writeAll(" .zero 6\n");
58 },
59 else => {
60 const size = @bitSizeOf(T);
61 const storage_unit = std.meta.intToEnum(StorageUnit, size) catch unreachable;
62 const IntTy = @Type(.{ .int = .{ .signedness = .unsigned, .bits = size } });
63 const int_val: IntTy = @bitCast(value);
64 return serializeInt(int_val, storage_unit, w);
65 },
66 }
67}
68
69pub fn todo(c: *AsmCodeGen, msg: []const u8, tok: Tree.TokenIndex) Error {
70 const loc: Source.Location = c.tree.tokens.items(.loc)[tok];
71
72 var sf = std.heap.stackFallback(1024, c.comp.gpa);
73 var buf = std.ArrayList(u8).init(sf.get());
74 defer buf.deinit();
75
76 try buf.print("TODO: {s}", .{msg});
77 try c.comp.diagnostics.add(.{
78 .text = buf.items,
79 .kind = .@"error",
80 .location = loc.expand(c.comp),
81 });
82 return error.FatalError;
83}
84
85fn emitAggregate(c: *AsmCodeGen, qt: QualType, node: Node.Index) !void {
86 _ = qt;
87 return c.todo("Codegen aggregates", node.tok(c.tree));
88}
89
90fn emitSingleValue(c: *AsmCodeGen, qt: QualType, node: Node.Index) !void {
91 const value = c.tree.value_map.get(node) orelse return;
92 const bit_size = qt.bitSizeof(c.comp);
93 const scalar_kind = qt.scalarKind(c.comp);
94 if (!scalar_kind.isReal()) {
95 return c.todo("Codegen _Complex values", node.tok(c.tree));
96 } else if (scalar_kind.isInt()) {
97 const storage_unit = std.meta.intToEnum(StorageUnit, bit_size) catch return c.todo("Codegen _BitInt values", node.tok(c.tree));
98 try c.data.print(" .{s} ", .{@tagName(storage_unit)});
99 _ = try value.print(qt, c.comp, c.data);
100 try c.data.writeByte('\n');
101 } else if (scalar_kind.isFloat()) {
102 switch (bit_size) {
103 16 => return serializeFloat(f16, value.toFloat(f16, c.comp), c.data),
104 32 => return serializeFloat(f32, value.toFloat(f32, c.comp), c.data),
105 64 => return serializeFloat(f64, value.toFloat(f64, c.comp), c.data),
106 80 => return serializeFloat(f80, value.toFloat(f80, c.comp), c.data),
107 128 => return serializeFloat(f128, value.toFloat(f128, c.comp), c.data),
108 else => unreachable,
109 }
110 } else if (scalar_kind.isPointer()) {
111 return c.todo("Codegen pointer", node.tok(c.tree));
112 } else if (qt.is(c.comp, .array)) {
113 // Todo:
114 // Handle truncated initializers e.g. char x[3] = "hello";
115 // Zero out remaining bytes if initializer is shorter than storage capacity
116 // Handle non-char strings
117 const bytes = value.toBytes(c.comp);
118 const directive = if (bytes.len > bit_size / 8) "ascii" else "string";
119 try c.data.print(" .{s} ", .{directive});
120 try Value.printString(bytes, qt, c.comp, c.data);
121
122 try c.data.writeByte('\n');
123 } else unreachable;
124}
125
126fn emitValue(c: *AsmCodeGen, qt: QualType, node: Node.Index) !void {
127 switch (node.get(c.tree)) {
128 .array_init_expr,
129 .struct_init_expr,
130 .union_init_expr,
131 => return c.todo("Codegen multiple inits", node.tok(c.tree)),
132 else => return c.emitSingleValue(qt, node),
133 }
134}
135
136pub fn genAsm(tree: *const Tree) Error!Assembly {
137 var data: std.Io.Writer.Allocating = .init(tree.comp.gpa);
138 defer data.deinit();
139
140 var text: std.Io.Writer.Allocating = .init(tree.comp.gpa);
141 defer text.deinit();
142
143 var codegen: AsmCodeGen = .{
144 .tree = tree,
145 .comp = tree.comp,
146 .text = &text.writer,
147 .data = &data.writer,
148 };
149
150 codegen.genDecls() catch |err| switch (err) {
151 error.WriteFailed => return error.OutOfMemory,
152 error.OutOfMemory => return error.OutOfMemory,
153 error.FatalError => return error.FatalError,
154 };
155
156 const text_slice = try text.toOwnedSlice();
157 errdefer tree.comp.gpa.free(text_slice);
158 const data_slice = try data.toOwnedSlice();
159 return .{
160 .text = text_slice,
161 .data = data_slice,
162 };
163}
164
165fn genDecls(c: *AsmCodeGen) !void {
166 if (c.tree.comp.code_gen_options.debug) {
167 const sources = c.tree.comp.sources.values();
168 for (sources) |source| {
169 try c.data.print(" .file {d} \"{s}\"\n", .{ @intFromEnum(source.id) - 1, source.path });
170 }
171 }
172
173 for (c.tree.root_decls.items) |decl| {
174 switch (decl.get(c.tree)) {
175 .static_assert,
176 .typedef,
177 .struct_decl,
178 .union_decl,
179 .enum_decl,
180 => {},
181
182 .function => |function| {
183 if (function.body == null) continue;
184 try c.genFn(function);
185 },
186
187 .variable => |variable| try c.genVar(variable),
188
189 else => unreachable,
190 }
191 }
192 try c.text.writeAll(" .section .note.GNU-stack,\"\",@progbits\n");
193}
194
195fn genFn(c: *AsmCodeGen, function: Node.Function) !void {
196 return c.todo("Codegen functions", function.name_tok);
197}
198
199fn genVar(c: *AsmCodeGen, variable: Node.Variable) !void {
200 const comp = c.comp;
201 const qt = variable.qt;
202
203 const is_tentative = variable.initializer == null;
204 const size = qt.sizeofOrNull(comp) orelse blk: {
205 // tentative array definition assumed to have one element
206 std.debug.assert(is_tentative and qt.is(c.comp, .array));
207 break :blk qt.childType(c.comp).sizeof(comp);
208 };
209
210 const name = c.tree.tokSlice(variable.name_tok);
211 const nat_align = qt.alignof(comp);
212 const alignment = if (qt.is(c.comp, .array) and size >= 16) @max(16, nat_align) else nat_align;
213
214 if (variable.storage_class == .static) {
215 try c.data.print(" .local \"{s}\"\n", .{name});
216 } else {
217 try c.data.print(" .globl \"{s}\"\n", .{name});
218 }
219
220 if (is_tentative and comp.code_gen_options.common) {
221 try c.data.print(" .comm \"{s}\", {d}, {d}\n", .{ name, size, alignment });
222 return;
223 }
224 if (variable.initializer) |init| {
225 if (variable.thread_local and comp.code_gen_options.data_sections) {
226 try c.data.print(" .section .tdata.\"{s}\",\"awT\",@progbits\n", .{name});
227 } else if (variable.thread_local) {
228 try c.data.writeAll(" .section .tdata,\"awT\",@progbits\n");
229 } else if (comp.code_gen_options.data_sections) {
230 try c.data.print(" .section .data.\"{s}\",\"aw\",@progbits\n", .{name});
231 } else {
232 try c.data.writeAll(" .data\n");
233 }
234
235 try c.data.print(" .type \"{s}\", @object\n", .{name});
236 try c.data.print(" .size \"{s}\", {d}\n", .{ name, size });
237 try c.data.print(" .align {d}\n", .{alignment});
238 try c.data.print("\"{s}\":\n", .{name});
239 try c.emitValue(qt, init);
240 return;
241 }
242 if (variable.thread_local and comp.code_gen_options.data_sections) {
243 try c.data.print(" .section .tbss.\"{s}\",\"awT\",@nobits\n", .{name});
244 } else if (variable.thread_local) {
245 try c.data.writeAll(" .section .tbss,\"awT\",@nobits\n");
246 } else if (comp.code_gen_options.data_sections) {
247 try c.data.print(" .section .bss.\"{s}\",\"aw\",@nobits\n", .{name});
248 } else {
249 try c.data.writeAll(" .bss\n");
250 }
251 try c.data.print(" .align {d}\n", .{alignment});
252 try c.data.print("\"{s}\":\n", .{name});
253 try c.data.print(" .zero {d}\n", .{size});
254}
lib/compiler/aro/backend.zig+12-1
......@@ -1,12 +1,23 @@
1pub const Assembly = @import("backend/Assembly.zig");
2pub const CodeGenOptions = @import("backend/CodeGenOptions.zig");
13pub const Interner = @import("backend/Interner.zig");
24pub const Ir = @import("backend/Ir.zig");
35pub const Object = @import("backend/Object.zig");
46
57pub const CallingConvention = enum {
6 C,
8 c,
79 stdcall,
810 thiscall,
911 vectorcall,
12 fastcall,
13 regcall,
14 riscv_vector,
15 aarch64_sve_pcs,
16 aarch64_vector_pcs,
17 arm_aapcs,
18 arm_aapcs_vfp,
19 x86_64_sysv,
20 x86_64_win,
1021};
1122
1223pub const version_str = "aro-zig";
lib/compiler/aro/backend/Assembly.zig created+20
......@@ -0,0 +1,20 @@
1const std = @import("std");
2const Allocator = std.mem.Allocator;
3
4data: []const u8,
5text: []const u8,
6
7const Assembly = @This();
8
9pub fn deinit(self: *const Assembly, gpa: Allocator) void {
10 gpa.free(self.data);
11 gpa.free(self.text);
12}
13
14pub fn writeToFile(self: Assembly, file: std.fs.File) !void {
15 var vec: [2]std.posix.iovec_const = .{
16 .{ .base = self.data.ptr, .len = self.data.len },
17 .{ .base = self.text.ptr, .len = self.text.len },
18 };
19 return file.writevAll(&vec);
20}
lib/compiler/aro/backend/CodeGenOptions.zig created+64
......@@ -0,0 +1,64 @@
1const std = @import("std");
2
3/// place uninitialized global variables in a common block
4common: bool,
5/// Place each function into its own section in the output file if the target supports arbitrary sections
6func_sections: bool,
7/// Place each data item into its own section in the output file if the target supports arbitrary sections
8data_sections: bool,
9pic_level: PicLevel,
10/// Generate position-independent code that can only be linked into executables
11is_pie: bool,
12optimization_level: OptimizationLevel,
13/// Generate debug information
14debug: bool,
15
16pub const PicLevel = enum(u8) {
17 /// Do not generate position-independent code
18 none = 0,
19 /// Generate position-independent code (PIC) suitable for use in a shared library, if supported for the target machine.
20 one = 1,
21 /// If supported for the target machine, emit position-independent code, suitable for dynamic linking and avoiding
22 /// any limit on the size of the global offset table.
23 two = 2,
24};
25
26pub const OptimizationLevel = enum {
27 @"0",
28 @"1",
29 @"2",
30 @"3",
31 /// Optimize for size
32 s,
33 /// Disregard strict standards compliance
34 fast,
35 /// Optimize debugging experience
36 g,
37 /// Optimize aggressively for size rather than speed
38 z,
39
40 const level_map = std.StaticStringMap(OptimizationLevel).initComptime(.{
41 .{ "0", .@"0" },
42 .{ "1", .@"1" },
43 .{ "2", .@"2" },
44 .{ "3", .@"3" },
45 .{ "s", .s },
46 .{ "fast", .fast },
47 .{ "g", .g },
48 .{ "z", .z },
49 });
50
51 pub fn fromString(str: []const u8) ?OptimizationLevel {
52 return level_map.get(str);
53 }
54};
55
56pub const default: @This() = .{
57 .common = false,
58 .func_sections = false,
59 .data_sections = false,
60 .pic_level = .none,
61 .is_pie = false,
62 .optimization_level = .@"0",
63 .debug = false,
64};
lib/compiler/aro/backend/Interner.zig+38-4
......@@ -8,14 +8,14 @@ const Limb = std.math.big.Limb;
88
99const Interner = @This();
1010
11map: std.AutoArrayHashMapUnmanaged(void, void) = .empty,
11map: std.AutoArrayHashMapUnmanaged(void, void) = .{},
1212items: std.MultiArrayList(struct {
1313 tag: Tag,
1414 data: u32,
1515}) = .{},
16extra: std.ArrayListUnmanaged(u32) = .empty,
17limbs: std.ArrayListUnmanaged(Limb) = .empty,
18strings: std.ArrayListUnmanaged(u8) = .empty,
16extra: std.ArrayListUnmanaged(u32) = .{},
17limbs: std.ArrayListUnmanaged(Limb) = .{},
18strings: std.ArrayListUnmanaged(u8) = .{},
1919
2020const KeyAdapter = struct {
2121 interner: *const Interner,
......@@ -65,6 +65,7 @@ pub const Key = union(enum) {
6565 float: Float,
6666 complex: Complex,
6767 bytes: []const u8,
68 pointer: Pointer,
6869
6970 pub const Float = union(enum) {
7071 f16: f16,
......@@ -80,6 +81,12 @@ pub const Key = union(enum) {
8081 cf80: [2]f80,
8182 cf128: [2]f128,
8283 };
84 pub const Pointer = struct {
85 /// NodeIndex of decl or compound literal whose address we are offsetting from
86 node: u32,
87 /// Offset in bytes
88 offset: Ref,
89 };
8390
8491 pub fn hash(key: Key) u32 {
8592 var hasher = Hash.init(0);
......@@ -199,6 +206,10 @@ pub const Key = union(enum) {
199206 }
200207 return null;
201208 }
209
210 pub fn toBigInt(key: Key, space: *Tag.Int.BigIntSpace) BigIntConst {
211 return key.int.toBigInt(space);
212 }
202213};
203214
204215pub const Ref = enum(u32) {
......@@ -303,6 +314,8 @@ pub const Tag = enum(u8) {
303314 bytes,
304315 /// `data` is `Record`
305316 record_ty,
317 /// `data` is Pointer
318 pointer,
306319
307320 pub const Array = struct {
308321 len0: u32,
......@@ -322,6 +335,11 @@ pub const Tag = enum(u8) {
322335 child: Ref,
323336 };
324337
338 pub const Pointer = struct {
339 node: u32,
340 offset: Ref,
341 };
342
325343 pub const Int = struct {
326344 limbs_index: u32,
327345 limbs_len: u32,
......@@ -606,6 +624,15 @@ pub fn put(i: *Interner, gpa: Allocator, key: Key) !Ref {
606624 }),
607625 });
608626 },
627 .pointer => |info| {
628 i.items.appendAssumeCapacity(.{
629 .tag = .pointer,
630 .data = try i.addExtra(gpa, Tag.Pointer{
631 .node = info.node,
632 .offset = info.offset,
633 }),
634 });
635 },
609636 .int => |repr| int: {
610637 var space: Tag.Int.BigIntSpace = undefined;
611638 const big = repr.toBigInt(&space);
......@@ -792,6 +819,13 @@ pub fn get(i: *const Interner, ref: Ref) Key {
792819 .child = vector_ty.child,
793820 } };
794821 },
822 .pointer => {
823 const pointer = i.extraData(Tag.Pointer, data);
824 return .{ .pointer = .{
825 .node = pointer.node,
826 .offset = pointer.offset,
827 } };
828 },
795829 .u32 => .{ .int = .{ .u64 = data } },
796830 .i32 => .{ .int = .{ .i64 = @as(i32, @bitCast(data)) } },
797831 .int_positive, .int_negative => {
lib/compiler/aro/backend/Ir.zig+11-10
......@@ -26,9 +26,9 @@ pub const Builder = struct {
2626 arena: std.heap.ArenaAllocator,
2727 interner: *Interner,
2828
29 decls: std.StringArrayHashMapUnmanaged(Decl) = .empty,
29 decls: std.StringArrayHashMapUnmanaged(Decl) = .{},
3030 instructions: std.MultiArrayList(Ir.Inst) = .{},
31 body: std.ArrayListUnmanaged(Ref) = .empty,
31 body: std.ArrayListUnmanaged(Ref) = .{},
3232 alloc_count: u32 = 0,
3333 arg_count: u32 = 0,
3434 current_label: Ref = undefined,
......@@ -382,13 +382,14 @@ const ATTRIBUTE = std.Io.tty.Color.bright_yellow;
382382
383383const RefMap = std.AutoArrayHashMap(Ref, void);
384384
385pub fn dump(ir: *const Ir, gpa: Allocator, config: std.Io.tty.Config, w: anytype) !void {
385pub fn dump(ir: *const Ir, gpa: Allocator, config: std.Io.tty.Config, w: *std.Io.Writer) !void {
386386 for (ir.decls.keys(), ir.decls.values()) |name, *decl| {
387387 try ir.dumpDecl(decl, gpa, name, config, w);
388388 }
389 try w.flush();
389390}
390391
391fn dumpDecl(ir: *const Ir, decl: *const Decl, gpa: Allocator, name: []const u8, config: std.Io.tty.Config, w: anytype) !void {
392fn dumpDecl(ir: *const Ir, decl: *const Decl, gpa: Allocator, name: []const u8, config: std.Io.tty.Config, w: *std.Io.Writer) !void {
392393 const tags = decl.instructions.items(.tag);
393394 const data = decl.instructions.items(.data);
394395
......@@ -609,7 +610,7 @@ fn dumpDecl(ir: *const Ir, decl: *const Decl, gpa: Allocator, name: []const u8,
609610 try w.writeAll("}\n\n");
610611}
611612
612fn writeType(ir: Ir, ty_ref: Interner.Ref, config: std.Io.tty.Config, w: anytype) !void {
613fn writeType(ir: Ir, ty_ref: Interner.Ref, config: std.Io.tty.Config, w: *std.Io.Writer) !void {
613614 const ty = ir.interner.get(ty_ref);
614615 try config.setColor(w, TYPE);
615616 switch (ty) {
......@@ -639,7 +640,7 @@ fn writeType(ir: Ir, ty_ref: Interner.Ref, config: std.Io.tty.Config, w: anytype
639640 }
640641}
641642
642fn writeValue(ir: Ir, val: Interner.Ref, config: std.Io.tty.Config, w: anytype) !void {
643fn writeValue(ir: Ir, val: Interner.Ref, config: std.Io.tty.Config, w: *std.Io.Writer) !void {
643644 try config.setColor(w, LITERAL);
644645 const key = ir.interner.get(val);
645646 switch (key) {
......@@ -650,12 +651,12 @@ fn writeValue(ir: Ir, val: Interner.Ref, config: std.Io.tty.Config, w: anytype)
650651 .float => |repr| switch (repr) {
651652 inline else => |x| return w.print("{d}", .{@as(f64, @floatCast(x))}),
652653 },
653 .bytes => |b| return std.zig.stringEscape(b, "", .{}, w),
654 .bytes => |b| return std.zig.stringEscape(b, w),
654655 else => unreachable, // not a value
655656 }
656657}
657658
658fn writeRef(ir: Ir, decl: *const Decl, ref_map: *RefMap, ref: Ref, config: std.Io.tty.Config, w: anytype) !void {
659fn writeRef(ir: Ir, decl: *const Decl, ref_map: *RefMap, ref: Ref, config: std.Io.tty.Config, w: *std.Io.Writer) !void {
659660 assert(ref != .none);
660661 const index = @intFromEnum(ref);
661662 const ty_ref = decl.instructions.items(.ty)[index];
......@@ -678,7 +679,7 @@ fn writeRef(ir: Ir, decl: *const Decl, ref_map: *RefMap, ref: Ref, config: std.I
678679 try w.print(" %{d}", .{ref_index});
679680}
680681
681fn writeNewRef(ir: Ir, decl: *const Decl, ref_map: *RefMap, ref: Ref, config: std.Io.tty.Config, w: anytype) !void {
682fn writeNewRef(ir: Ir, decl: *const Decl, ref_map: *RefMap, ref: Ref, config: std.Io.tty.Config, w: *std.Io.Writer) !void {
682683 try ref_map.put(ref, {});
683684 try w.writeAll(" ");
684685 try ir.writeRef(decl, ref_map, ref, config, w);
......@@ -687,7 +688,7 @@ fn writeNewRef(ir: Ir, decl: *const Decl, ref_map: *RefMap, ref: Ref, config: st
687688 try config.setColor(w, INST);
688689}
689690
690fn writeLabel(decl: *const Decl, label_map: *RefMap, ref: Ref, config: std.Io.tty.Config, w: anytype) !void {
691fn writeLabel(decl: *const Decl, label_map: *RefMap, ref: Ref, config: std.Io.tty.Config, w: *std.Io.Writer) !void {
691692 assert(ref != .none);
692693 const index = @intFromEnum(ref);
693694 const label = decl.instructions.items(.data)[index].label;
lib/compiler/aro/backend/Object.zig+2-2
......@@ -65,9 +65,9 @@ pub fn addRelocation(obj: *Object, name: []const u8, section: Section, address:
6565 }
6666}
6767
68pub fn finish(obj: *Object, file: std.fs.File) !void {
68pub fn finish(obj: *Object, w: *std.Io.Writer) !void {
6969 switch (obj.format) {
70 .elf => return @as(*Elf, @alignCast(@fieldParentPtr("obj", obj))).finish(file),
70 .elf => return @as(*Elf, @alignCast(@fieldParentPtr("obj", obj))).finish(w),
7171 else => unreachable,
7272 }
7373}
lib/compiler/aro/backend/Object/Elf.zig+22-25
......@@ -5,7 +5,7 @@ const Object = @import("../Object.zig");
55
66const Section = struct {
77 data: std.array_list.Managed(u8),
8 relocations: std.ArrayListUnmanaged(Relocation) = .empty,
8 relocations: std.ArrayListUnmanaged(Relocation) = .{},
99 flags: u64,
1010 type: u32,
1111 index: u16 = undefined,
......@@ -37,9 +37,9 @@ const Elf = @This();
3737
3838obj: Object,
3939/// The keys are owned by the Codegen.tree
40sections: std.StringHashMapUnmanaged(*Section) = .empty,
41local_symbols: std.StringHashMapUnmanaged(*Symbol) = .empty,
42global_symbols: std.StringHashMapUnmanaged(*Symbol) = .empty,
40sections: std.StringHashMapUnmanaged(*Section) = .{},
41local_symbols: std.StringHashMapUnmanaged(*Symbol) = .{},
42global_symbols: std.StringHashMapUnmanaged(*Symbol) = .{},
4343unnamed_symbol_mangle: u32 = 0,
4444strtab_len: u64 = strtab_default.len,
4545arena: std.heap.ArenaAllocator,
......@@ -170,12 +170,8 @@ pub fn addRelocation(elf: *Elf, name: []const u8, section_kind: Object.Section,
170170/// relocations
171171/// strtab
172172/// section headers
173pub fn finish(elf: *Elf, file: std.fs.File) !void {
174 var file_buffer: [1024]u8 = undefined;
175 var file_writer = file.writer(&file_buffer);
176 const w = &file_writer.interface;
177
178 var num_sections: std.elf.Elf64_Half = additional_sections;
173pub fn finish(elf: *Elf, w: *std.Io.Writer) !void {
174 var num_sections: std.elf.Half = additional_sections;
179175 var relocations_len: std.elf.Elf64_Off = 0;
180176 var sections_len: std.elf.Elf64_Off = 0;
181177 {
......@@ -196,8 +192,9 @@ pub fn finish(elf: *Elf, file: std.fs.File) !void {
196192 const strtab_offset = rela_offset + relocations_len;
197193 const sh_offset = strtab_offset + elf.strtab_len;
198194 const sh_offset_aligned = std.mem.alignForward(u64, sh_offset, 16);
195 const endian = elf.obj.target.cpu.arch.endian();
199196
200 const elf_header = std.elf.Elf64_Ehdr{
197 const elf_header: std.elf.Elf64_Ehdr = .{
201198 .e_ident = .{ 0x7F, 'E', 'L', 'F', 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
202199 .e_type = std.elf.ET.REL, // we only produce relocatables
203200 .e_machine = elf.obj.target.toElfMachine(),
......@@ -213,7 +210,7 @@ pub fn finish(elf: *Elf, file: std.fs.File) !void {
213210 .e_shnum = num_sections,
214211 .e_shstrndx = strtab_index,
215212 };
216 try w.writeStruct(elf_header);
213 try w.writeStruct(elf_header, endian);
217214
218215 // write contents of sections
219216 {
......@@ -222,13 +219,13 @@ pub fn finish(elf: *Elf, file: std.fs.File) !void {
222219 }
223220
224221 // pad to 8 bytes
225 try w.writeByteNTimes(0, @intCast(symtab_offset_aligned - symtab_offset));
222 try w.splatByteAll(0, @intCast(symtab_offset_aligned - symtab_offset));
226223
227224 var name_offset: u32 = strtab_default.len;
228225 // write symbols
229226 {
230227 // first symbol must be null
231 try w.writeStruct(std.mem.zeroes(std.elf.Elf64_Sym));
228 try w.writeStruct(std.mem.zeroes(std.elf.Elf64_Sym), endian);
232229
233230 var sym_index: u16 = 1;
234231 var it = elf.local_symbols.iterator();
......@@ -241,7 +238,7 @@ pub fn finish(elf: *Elf, file: std.fs.File) !void {
241238 .st_shndx = if (sym.section) |some| some.index else 0,
242239 .st_value = sym.offset,
243240 .st_size = sym.size,
244 });
241 }, endian);
245242 sym.index = sym_index;
246243 sym_index += 1;
247244 name_offset += @intCast(entry.key_ptr.len + 1); // +1 for null byte
......@@ -256,7 +253,7 @@ pub fn finish(elf: *Elf, file: std.fs.File) !void {
256253 .st_shndx = if (sym.section) |some| some.index else 0,
257254 .st_value = sym.offset,
258255 .st_size = sym.size,
259 });
256 }, endian);
260257 sym.index = sym_index;
261258 sym_index += 1;
262259 name_offset += @intCast(entry.key_ptr.len + 1); // +1 for null byte
......@@ -272,7 +269,7 @@ pub fn finish(elf: *Elf, file: std.fs.File) !void {
272269 .r_offset = rela.offset,
273270 .r_addend = rela.addend,
274271 .r_info = (@as(u64, rela.symbol.index) << 32) | rela.type,
275 });
272 }, endian);
276273 }
277274 }
278275 }
......@@ -294,13 +291,13 @@ pub fn finish(elf: *Elf, file: std.fs.File) !void {
294291 }
295292
296293 // pad to 16 bytes
297 try w.writeByteNTimes(0, @intCast(sh_offset_aligned - sh_offset));
294 try w.splatByteAll(0, @intCast(sh_offset_aligned - sh_offset));
298295 // mandatory null header
299 try w.writeStruct(std.mem.zeroes(std.elf.Elf64_Shdr));
296 try w.writeStruct(std.mem.zeroes(std.elf.Elf64_Shdr), endian);
300297
301298 // write strtab section header
302299 {
303 const sect_header = std.elf.Elf64_Shdr{
300 const sect_header: std.elf.Elf64_Shdr = .{
304301 .sh_name = strtab_name,
305302 .sh_type = std.elf.SHT_STRTAB,
306303 .sh_flags = 0,
......@@ -312,12 +309,12 @@ pub fn finish(elf: *Elf, file: std.fs.File) !void {
312309 .sh_addralign = 1,
313310 .sh_entsize = 0,
314311 };
315 try w.writeStruct(sect_header);
312 try w.writeStruct(sect_header, endian);
316313 }
317314
318315 // write symtab section header
319316 {
320 const sect_header = std.elf.Elf64_Shdr{
317 const sect_header: std.elf.Elf64_Shdr = .{
321318 .sh_name = symtab_name,
322319 .sh_type = std.elf.SHT_SYMTAB,
323320 .sh_flags = 0,
......@@ -329,7 +326,7 @@ pub fn finish(elf: *Elf, file: std.fs.File) !void {
329326 .sh_addralign = 8,
330327 .sh_entsize = @sizeOf(std.elf.Elf64_Sym),
331328 };
332 try w.writeStruct(sect_header);
329 try w.writeStruct(sect_header, endian);
333330 }
334331
335332 // remaining section headers
......@@ -352,7 +349,7 @@ pub fn finish(elf: *Elf, file: std.fs.File) !void {
352349 .sh_info = 0,
353350 .sh_addralign = if (sect.flags & std.elf.SHF_EXECINSTR != 0) 16 else 1,
354351 .sh_entsize = 0,
355 });
352 }, endian);
356353
357354 if (rela_count != 0) {
358355 const size = rela_count * @sizeOf(std.elf.Elf64_Rela);
......@@ -367,7 +364,7 @@ pub fn finish(elf: *Elf, file: std.fs.File) !void {
367364 .sh_info = sect.index,
368365 .sh_addralign = 8,
369366 .sh_entsize = @sizeOf(std.elf.Elf64_Rela),
370 });
367 }, endian);
371368 rela_sect_offset += size;
372369 }
373370
lib/compiler/aro/main.zig created+80
......@@ -0,0 +1,80 @@
1const std = @import("std");
2const Allocator = mem.Allocator;
3const mem = std.mem;
4const process = std.process;
5const aro = @import("aro");
6const Compilation = aro.Compilation;
7const Diagnostics = aro.Diagnostics;
8const Driver = aro.Driver;
9const Toolchain = aro.Toolchain;
10const assembly_backend = @import("assembly_backend");
11
12var general_purpose_allocator = std.heap.GeneralPurposeAllocator(.{}){};
13
14pub fn main() u8 {
15 const gpa = if (@import("builtin").link_libc)
16 std.heap.raw_c_allocator
17 else
18 general_purpose_allocator.allocator();
19 defer if (!@import("builtin").link_libc) {
20 _ = general_purpose_allocator.deinit();
21 };
22
23 var arena_instance = std.heap.ArenaAllocator.init(gpa);
24 defer arena_instance.deinit();
25 const arena = arena_instance.allocator();
26
27 const fast_exit = @import("builtin").mode != .Debug;
28
29 const args = process.argsAlloc(arena) catch {
30 std.debug.print("out of memory\n", .{});
31 if (fast_exit) process.exit(1);
32 return 1;
33 };
34
35 const aro_name = std.fs.selfExePathAlloc(gpa) catch {
36 std.debug.print("unable to find Aro executable path\n", .{});
37 if (fast_exit) process.exit(1);
38 return 1;
39 };
40 defer gpa.free(aro_name);
41
42 var stderr_buf: [1024]u8 = undefined;
43 var stderr = std.fs.File.stderr().writer(&stderr_buf);
44 var diagnostics: Diagnostics = .{
45 .output = .{ .to_writer = .{
46 .color = .detect(stderr.file),
47 .writer = &stderr.interface,
48 } },
49 };
50
51 var comp = Compilation.initDefault(gpa, arena, &diagnostics, std.fs.cwd()) catch |er| switch (er) {
52 error.OutOfMemory => {
53 std.debug.print("out of memory\n", .{});
54 if (fast_exit) process.exit(1);
55 return 1;
56 },
57 };
58 defer comp.deinit();
59
60 var driver: Driver = .{ .comp = &comp, .aro_name = aro_name, .diagnostics = &diagnostics };
61 defer driver.deinit();
62
63 var toolchain: Toolchain = .{ .driver = &driver, .filesystem = .{ .real = comp.cwd } };
64 defer toolchain.deinit();
65
66 driver.main(&toolchain, args, fast_exit, assembly_backend.genAsm) catch |er| switch (er) {
67 error.OutOfMemory => {
68 std.debug.print("out of memory\n", .{});
69 if (fast_exit) process.exit(1);
70 return 1;
71 },
72 error.FatalError => {
73 driver.printDiagnosticsStats();
74 if (fast_exit) process.exit(1);
75 return 1;
76 },
77 };
78 if (fast_exit) process.exit(@intFromBool(comp.diagnostics.errors != 0));
79 return @intFromBool(diagnostics.errors != 0);
80}
lib/compiler/aro_translate_c.zig deleted-1832
......@@ -1,1832 +0,0 @@
1const std = @import("std");
2const mem = std.mem;
3const assert = std.debug.assert;
4const CallingConvention = std.builtin.CallingConvention;
5const aro = @import("aro");
6const CToken = aro.Tokenizer.Token;
7const Tree = aro.Tree;
8const NodeIndex = Tree.NodeIndex;
9const TokenIndex = Tree.TokenIndex;
10const Type = aro.Type;
11pub const ast = @import("aro_translate_c/ast.zig");
12const ZigNode = ast.Node;
13const ZigTag = ZigNode.Tag;
14const Scope = ScopeExtra(Context, Type);
15const Context = @This();
16
17gpa: mem.Allocator,
18arena: mem.Allocator,
19decl_table: std.AutoArrayHashMapUnmanaged(usize, []const u8) = .empty,
20alias_list: AliasList,
21global_scope: *Scope.Root,
22mangle_count: u32 = 0,
23/// Table of record decls that have been demoted to opaques.
24opaque_demotes: std.AutoHashMapUnmanaged(usize, void) = .empty,
25/// Table of unnamed enums and records that are child types of typedefs.
26unnamed_typedefs: std.AutoHashMapUnmanaged(usize, []const u8) = .empty,
27/// Needed to decide if we are parsing a typename
28typedefs: std.StringArrayHashMapUnmanaged(void) = .empty,
29
30/// This one is different than the root scope's name table. This contains
31/// a list of names that we found by visiting all the top level decls without
32/// translating them. The other maps are updated as we translate; this one is updated
33/// up front in a pre-processing step.
34global_names: std.StringArrayHashMapUnmanaged(void) = .empty,
35
36/// This is similar to `global_names`, but contains names which we would
37/// *like* to use, but do not strictly *have* to if they are unavailable.
38/// These are relevant to types, which ideally we would name like
39/// 'struct_foo' with an alias 'foo', but if either of those names is taken,
40/// may be mangled.
41/// This is distinct from `global_names` so we can detect at a type
42/// declaration whether or not the name is available.
43weak_global_names: std.StringArrayHashMapUnmanaged(void) = .empty,
44
45pattern_list: PatternList,
46tree: Tree,
47comp: *aro.Compilation,
48mapper: aro.TypeMapper,
49
50fn getMangle(c: *Context) u32 {
51 c.mangle_count += 1;
52 return c.mangle_count;
53}
54
55/// Convert an aro TokenIndex to a 'file:line:column' string
56fn locStr(c: *Context, tok_idx: TokenIndex) ![]const u8 {
57 const token_loc = c.tree.tokens.items(.loc)[tok_idx];
58 const source = c.comp.getSource(token_loc.id);
59 const line_col = source.lineCol(token_loc);
60 const filename = source.path;
61
62 const line = source.physicalLine(token_loc);
63 const col = line_col.col;
64
65 return std.fmt.allocPrint(c.arena, "{s}:{d}:{d}", .{ filename, line, col });
66}
67
68fn maybeSuppressResult(c: *Context, used: ResultUsed, result: ZigNode) TransError!ZigNode {
69 if (used == .used) return result;
70 return ZigTag.discard.create(c.arena, .{ .should_skip = false, .value = result });
71}
72
73fn addTopLevelDecl(c: *Context, name: []const u8, decl_node: ZigNode) !void {
74 const gop = try c.global_scope.sym_table.getOrPut(name);
75 if (!gop.found_existing) {
76 gop.value_ptr.* = decl_node;
77 try c.global_scope.nodes.append(decl_node);
78 }
79}
80
81fn fail(
82 c: *Context,
83 err: anytype,
84 source_loc: TokenIndex,
85 comptime format: []const u8,
86 args: anytype,
87) (@TypeOf(err) || error{OutOfMemory}) {
88 try warn(c, &c.global_scope.base, source_loc, format, args);
89 return err;
90}
91
92fn failDecl(c: *Context, loc: TokenIndex, name: []const u8, comptime format: []const u8, args: anytype) Error!void {
93 // location
94 // pub const name = @compileError(msg);
95 const fail_msg = try std.fmt.allocPrint(c.arena, format, args);
96 try addTopLevelDecl(c, name, try ZigTag.fail_decl.create(c.arena, .{ .actual = name, .mangled = fail_msg }));
97 const str = try c.locStr(loc);
98 const location_comment = try std.fmt.allocPrint(c.arena, "// {s}", .{str});
99 try c.global_scope.nodes.append(try ZigTag.warning.create(c.arena, location_comment));
100}
101
102fn warn(c: *Context, scope: *Scope, loc: TokenIndex, comptime format: []const u8, args: anytype) !void {
103 const str = try c.locStr(loc);
104 const value = try std.fmt.allocPrint(c.arena, "// {s}: warning: " ++ format, .{str} ++ args);
105 try scope.appendNode(try ZigTag.warning.create(c.arena, value));
106}
107
108pub fn translate(
109 gpa: mem.Allocator,
110 comp: *aro.Compilation,
111 args: []const []const u8,
112) !std.zig.Ast {
113 try comp.addDefaultPragmaHandlers();
114 comp.langopts.setEmulatedCompiler(aro.target_util.systemCompiler(comp.target));
115
116 var driver: aro.Driver = .{ .comp = comp };
117 defer driver.deinit();
118
119 var macro_buf: std.Io.Writer.Allocating = .init(gpa);
120 defer macro_buf.deinit();
121
122 var trash: [64]u8 = undefined;
123 var discarding: std.Io.Writer.Discarding = .init(&trash);
124 assert(!try driver.parseArgs(&discarding.writer, &macro_buf.writer, args));
125 assert(driver.inputs.items.len == 1);
126 const source = driver.inputs.items[0];
127
128 const builtin_macros = try comp.generateBuiltinMacros(.include_system_defines);
129 const user_macros = try comp.addSourceFromBuffer("<command line>", macro_buf.written());
130
131 var pp = try aro.Preprocessor.initDefault(comp);
132 defer pp.deinit();
133
134 try pp.preprocessSources(&.{ source, builtin_macros, user_macros });
135
136 var tree = try pp.parse();
137 defer tree.deinit();
138
139 // Workaround for https://github.com/Vexu/arocc/issues/603
140 for (comp.diagnostics.list.items) |msg| {
141 if (msg.kind == .@"error" or msg.kind == .@"fatal error") return error.ParsingFailed;
142 }
143
144 const mapper = tree.comp.string_interner.getFastTypeMapper(tree.comp.gpa) catch tree.comp.string_interner.getSlowTypeMapper();
145 defer mapper.deinit(tree.comp.gpa);
146
147 var arena_allocator = std.heap.ArenaAllocator.init(gpa);
148 defer arena_allocator.deinit();
149 const arena = arena_allocator.allocator();
150
151 var context = Context{
152 .gpa = gpa,
153 .arena = arena,
154 .alias_list = AliasList.init(gpa),
155 .global_scope = try arena.create(Scope.Root),
156 .pattern_list = try PatternList.init(gpa),
157 .comp = comp,
158 .mapper = mapper,
159 .tree = tree,
160 };
161 context.global_scope.* = Scope.Root.init(&context);
162 defer {
163 context.decl_table.deinit(gpa);
164 context.alias_list.deinit();
165 context.global_names.deinit(gpa);
166 context.opaque_demotes.deinit(gpa);
167 context.unnamed_typedefs.deinit(gpa);
168 context.typedefs.deinit(gpa);
169 context.global_scope.deinit();
170 context.pattern_list.deinit(gpa);
171 }
172
173 @setEvalBranchQuota(2000);
174 inline for (@typeInfo(std.zig.c_builtins).@"struct".decls) |decl| {
175 const builtin_fn = try ZigTag.pub_var_simple.create(arena, .{
176 .name = decl.name,
177 .init = try ZigTag.import_c_builtin.create(arena, decl.name),
178 });
179 try addTopLevelDecl(&context, decl.name, builtin_fn);
180 }
181
182 try prepopulateGlobalNameTable(&context);
183 try transTopLevelDecls(&context);
184
185 for (context.alias_list.items) |alias| {
186 if (!context.global_scope.sym_table.contains(alias.alias)) {
187 const node = try ZigTag.alias.create(arena, .{ .actual = alias.alias, .mangled = alias.name });
188 try addTopLevelDecl(&context, alias.alias, node);
189 }
190 }
191
192 return ast.render(gpa, context.global_scope.nodes.items);
193}
194
195fn prepopulateGlobalNameTable(c: *Context) !void {
196 const node_tags = c.tree.nodes.items(.tag);
197 const node_types = c.tree.nodes.items(.ty);
198 const node_data = c.tree.nodes.items(.data);
199 for (c.tree.root_decls) |node| {
200 const data = node_data[@intFromEnum(node)];
201 switch (node_tags[@intFromEnum(node)]) {
202 .typedef => {},
203
204 .struct_decl_two,
205 .union_decl_two,
206 .struct_decl,
207 .union_decl,
208 .struct_forward_decl,
209 .union_forward_decl,
210 .enum_decl_two,
211 .enum_decl,
212 .enum_forward_decl,
213 => {
214 const raw_ty = node_types[@intFromEnum(node)];
215 const ty = raw_ty.canonicalize(.standard);
216 const name_id = if (ty.isRecord()) ty.data.record.name else ty.data.@"enum".name;
217 const decl_name = c.mapper.lookup(name_id);
218 const container_prefix = if (ty.is(.@"struct")) "struct" else if (ty.is(.@"union")) "union" else "enum";
219 const prefixed_name = try std.fmt.allocPrint(c.arena, "{s}_{s}", .{ container_prefix, decl_name });
220 // `decl_name` and `prefixed_name` are the preferred names for this type.
221 // However, we can name it anything else if necessary, so these are "weak names".
222 try c.weak_global_names.ensureUnusedCapacity(c.gpa, 2);
223 c.weak_global_names.putAssumeCapacity(decl_name, {});
224 c.weak_global_names.putAssumeCapacity(prefixed_name, {});
225 },
226
227 .fn_proto,
228 .static_fn_proto,
229 .inline_fn_proto,
230 .inline_static_fn_proto,
231 .fn_def,
232 .static_fn_def,
233 .inline_fn_def,
234 .inline_static_fn_def,
235 .@"var",
236 .extern_var,
237 .static_var,
238 .threadlocal_var,
239 .threadlocal_extern_var,
240 .threadlocal_static_var,
241 => {
242 const decl_name = c.tree.tokSlice(data.decl.name);
243 try c.global_names.put(c.gpa, decl_name, {});
244 },
245 .static_assert => {},
246 else => unreachable,
247 }
248 }
249}
250
251fn transTopLevelDecls(c: *Context) !void {
252 for (c.tree.root_decls) |node| {
253 try transDecl(c, &c.global_scope.base, node);
254 }
255}
256
257fn transDecl(c: *Context, scope: *Scope, decl: NodeIndex) !void {
258 const node_tags = c.tree.nodes.items(.tag);
259 const node_data = c.tree.nodes.items(.data);
260 const node_ty = c.tree.nodes.items(.ty);
261 const data = node_data[@intFromEnum(decl)];
262 switch (node_tags[@intFromEnum(decl)]) {
263 .typedef => {
264 try transTypeDef(c, scope, decl);
265 },
266
267 .struct_decl_two,
268 .union_decl_two,
269 => {
270 try transRecordDecl(c, scope, node_ty[@intFromEnum(decl)]);
271 },
272 .struct_decl,
273 .union_decl,
274 => {
275 try transRecordDecl(c, scope, node_ty[@intFromEnum(decl)]);
276 },
277
278 .enum_decl_two => {
279 var fields = [2]NodeIndex{ data.bin.lhs, data.bin.rhs };
280 var field_count: u8 = 0;
281 if (fields[0] != .none) field_count += 1;
282 if (fields[1] != .none) field_count += 1;
283 const enum_decl = node_ty[@intFromEnum(decl)].canonicalize(.standard).data.@"enum";
284 try transEnumDecl(c, scope, enum_decl, fields[0..field_count]);
285 },
286 .enum_decl => {
287 const fields = c.tree.data[data.range.start..data.range.end];
288 const enum_decl = node_ty[@intFromEnum(decl)].canonicalize(.standard).data.@"enum";
289 try transEnumDecl(c, scope, enum_decl, fields);
290 },
291
292 .enum_field_decl,
293 .record_field_decl,
294 .indirect_record_field_decl,
295 .struct_forward_decl,
296 .union_forward_decl,
297 .enum_forward_decl,
298 => return,
299
300 .fn_proto,
301 .static_fn_proto,
302 .inline_fn_proto,
303 .inline_static_fn_proto,
304 .fn_def,
305 .static_fn_def,
306 .inline_fn_def,
307 .inline_static_fn_def,
308 => {
309 try transFnDecl(c, decl, true);
310 },
311
312 .@"var",
313 .extern_var,
314 .static_var,
315 .threadlocal_var,
316 .threadlocal_extern_var,
317 .threadlocal_static_var,
318 => {
319 try transVarDecl(c, decl);
320 },
321 .static_assert => try warn(c, &c.global_scope.base, 0, "ignoring _Static_assert declaration", .{}),
322 else => unreachable,
323 }
324}
325
326fn transTypeDef(c: *Context, scope: *Scope, typedef_decl: NodeIndex) Error!void {
327 const ty = c.tree.nodes.items(.ty)[@intFromEnum(typedef_decl)];
328 const data = c.tree.nodes.items(.data)[@intFromEnum(typedef_decl)];
329
330 const toplevel = scope.id == .root;
331 const bs: *Scope.Block = if (!toplevel) try scope.findBlockScope(c) else undefined;
332
333 var name: []const u8 = c.tree.tokSlice(data.decl.name);
334 try c.typedefs.put(c.gpa, name, {});
335
336 if (!toplevel) name = try bs.makeMangledName(c, name);
337
338 const typedef_loc = data.decl.name;
339 const init_node = transType(c, scope, ty, .standard, typedef_loc) catch |err| switch (err) {
340 error.UnsupportedType => {
341 return failDecl(c, typedef_loc, name, "unable to resolve typedef child type", .{});
342 },
343 error.OutOfMemory => |e| return e,
344 };
345
346 const payload = try c.arena.create(ast.Payload.SimpleVarDecl);
347 payload.* = .{
348 .base = .{ .tag = ([2]ZigTag{ .var_simple, .pub_var_simple })[@intFromBool(toplevel)] },
349 .data = .{
350 .name = name,
351 .init = init_node,
352 },
353 };
354 const node = ZigNode.initPayload(&payload.base);
355
356 if (toplevel) {
357 try addTopLevelDecl(c, name, node);
358 } else {
359 try scope.appendNode(node);
360 if (node.tag() != .pub_var_simple) {
361 try bs.discardVariable(c, name);
362 }
363 }
364}
365
366fn mangleWeakGlobalName(c: *Context, want_name: []const u8) ![]const u8 {
367 var cur_name = want_name;
368
369 if (!c.weak_global_names.contains(want_name)) {
370 // This type wasn't noticed by the name detection pass, so nothing has been treating this as
371 // a weak global name. We must mangle it to avoid conflicts with locals.
372 cur_name = try std.fmt.allocPrint(c.arena, "{s}_{d}", .{ want_name, c.getMangle() });
373 }
374
375 while (c.global_names.contains(cur_name)) {
376 cur_name = try std.fmt.allocPrint(c.arena, "{s}_{d}", .{ want_name, c.getMangle() });
377 }
378 return cur_name;
379}
380
381fn transRecordDecl(c: *Context, scope: *Scope, record_ty: Type) Error!void {
382 const record_decl = record_ty.getRecord().?;
383 if (c.decl_table.get(@intFromPtr(record_decl))) |_|
384 return; // Avoid processing this decl twice
385 const toplevel = scope.id == .root;
386 const bs: *Scope.Block = if (!toplevel) try scope.findBlockScope(c) else undefined;
387
388 const container_kind: ZigTag = if (record_ty.is(.@"union")) .@"union" else .@"struct";
389 const container_kind_name: []const u8 = @tagName(container_kind);
390
391 var is_unnamed = false;
392 var bare_name: []const u8 = c.mapper.lookup(record_decl.name);
393 var name = bare_name;
394
395 if (c.unnamed_typedefs.get(@intFromPtr(record_decl))) |typedef_name| {
396 bare_name = typedef_name;
397 name = typedef_name;
398 } else {
399 if (record_ty.isAnonymousRecord(c.comp)) {
400 bare_name = try std.fmt.allocPrint(c.arena, "unnamed_{d}", .{c.getMangle()});
401 is_unnamed = true;
402 }
403 name = try std.fmt.allocPrint(c.arena, "{s}_{s}", .{ container_kind_name, bare_name });
404 if (toplevel and !is_unnamed) {
405 name = try mangleWeakGlobalName(c, name);
406 }
407 }
408 if (!toplevel) name = try bs.makeMangledName(c, name);
409 try c.decl_table.putNoClobber(c.gpa, @intFromPtr(record_decl), name);
410
411 const is_pub = toplevel and !is_unnamed;
412 const init_node = blk: {
413 if (record_decl.isIncomplete()) {
414 try c.opaque_demotes.put(c.gpa, @intFromPtr(record_decl), {});
415 break :blk ZigTag.opaque_literal.init();
416 }
417
418 var fields = try std.array_list.Managed(ast.Payload.Record.Field).initCapacity(c.gpa, record_decl.fields.len);
419 defer fields.deinit();
420
421 // TODO: Add support for flexible array field functions
422 var functions = std.array_list.Managed(ZigNode).init(c.gpa);
423 defer functions.deinit();
424
425 var unnamed_field_count: u32 = 0;
426
427 // If a record doesn't have any attributes that would affect the alignment and
428 // layout, then we can just use a simple `extern` type. If it does have attributes,
429 // then we need to inspect the layout and assign an `align` value for each field.
430 const has_alignment_attributes = record_decl.field_attributes != null or
431 record_ty.hasAttribute(.@"packed") or
432 record_ty.hasAttribute(.aligned);
433 const head_field_alignment: ?c_uint = if (has_alignment_attributes) headFieldAlignment(record_decl) else null;
434
435 for (record_decl.fields, 0..) |field, field_index| {
436 const field_loc = field.name_tok;
437
438 // Demote record to opaque if it contains a bitfield
439 if (!field.isRegularField()) {
440 try c.opaque_demotes.put(c.gpa, @intFromPtr(record_decl), {});
441 try warn(c, scope, field_loc, "{s} demoted to opaque type - has bitfield", .{container_kind_name});
442 break :blk ZigTag.opaque_literal.init();
443 }
444
445 var field_name = c.mapper.lookup(field.name);
446 if (!field.isNamed()) {
447 field_name = try std.fmt.allocPrint(c.arena, "unnamed_{d}", .{unnamed_field_count});
448 unnamed_field_count += 1;
449 }
450 const field_type = transType(c, scope, field.ty, .preserve_quals, field_loc) catch |err| switch (err) {
451 error.UnsupportedType => {
452 try c.opaque_demotes.put(c.gpa, @intFromPtr(record_decl), {});
453 try warn(c, scope, 0, "{s} demoted to opaque type - unable to translate type of field {s}", .{
454 container_kind_name,
455 field_name,
456 });
457 break :blk ZigTag.opaque_literal.init();
458 },
459 else => |e| return e,
460 };
461
462 const field_alignment = if (has_alignment_attributes)
463 alignmentForField(record_decl, head_field_alignment, field_index)
464 else
465 null;
466
467 // C99 introduced designated initializers for structs. Omitted fields are implicitly
468 // initialized to zero. Some C APIs are designed with this in mind. Defaulting to zero
469 // values for translated struct fields permits Zig code to comfortably use such an API.
470 const default_value = if (container_kind == .@"struct")
471 try ZigTag.std_mem_zeroes.create(c.arena, field_type)
472 else
473 null;
474
475 fields.appendAssumeCapacity(.{
476 .name = field_name,
477 .type = field_type,
478 .alignment = field_alignment,
479 .default_value = default_value,
480 });
481 }
482
483 const record_payload = try c.arena.create(ast.Payload.Record);
484 record_payload.* = .{
485 .base = .{ .tag = container_kind },
486 .data = .{
487 .layout = .@"extern",
488 .fields = try c.arena.dupe(ast.Payload.Record.Field, fields.items),
489 .functions = try c.arena.dupe(ZigNode, functions.items),
490 .variables = &.{},
491 },
492 };
493 break :blk ZigNode.initPayload(&record_payload.base);
494 };
495
496 const payload = try c.arena.create(ast.Payload.SimpleVarDecl);
497 payload.* = .{
498 .base = .{ .tag = ([2]ZigTag{ .var_simple, .pub_var_simple })[@intFromBool(is_pub)] },
499 .data = .{
500 .name = name,
501 .init = init_node,
502 },
503 };
504 const node = ZigNode.initPayload(&payload.base);
505 if (toplevel) {
506 try addTopLevelDecl(c, name, node);
507 // Only add the alias if the name is available *and* it was caught by
508 // name detection. Don't bother performing a weak mangle, since a
509 // mangled name is of no real use here.
510 if (!is_unnamed and !c.global_names.contains(bare_name) and c.weak_global_names.contains(bare_name))
511 try c.alias_list.append(.{ .alias = bare_name, .name = name });
512 } else {
513 try scope.appendNode(node);
514 if (node.tag() != .pub_var_simple) {
515 try bs.discardVariable(c, name);
516 }
517 }
518}
519
520fn transFnDecl(c: *Context, fn_decl: NodeIndex, is_pub: bool) Error!void {
521 const raw_ty = c.tree.nodes.items(.ty)[@intFromEnum(fn_decl)];
522 const fn_ty = raw_ty.canonicalize(.standard);
523 const node_data = c.tree.nodes.items(.data)[@intFromEnum(fn_decl)];
524 if (c.decl_table.get(@intFromPtr(fn_ty.data.func))) |_|
525 return; // Avoid processing this decl twice
526
527 const fn_name = c.tree.tokSlice(node_data.decl.name);
528 if (c.global_scope.sym_table.contains(fn_name))
529 return; // Avoid processing this decl twice
530
531 const fn_decl_loc = 0; // TODO
532 const has_body = node_data.decl.node != .none;
533 const is_always_inline = has_body and raw_ty.getAttribute(.always_inline) != null;
534 const proto_ctx = FnProtoContext{
535 .fn_name = fn_name,
536 .is_inline = is_always_inline,
537 .is_extern = !has_body,
538 .is_export = switch (c.tree.nodes.items(.tag)[@intFromEnum(fn_decl)]) {
539 .fn_proto, .fn_def => has_body and !is_always_inline,
540
541 .inline_fn_proto, .inline_fn_def, .inline_static_fn_proto, .inline_static_fn_def, .static_fn_proto, .static_fn_def => false,
542
543 else => unreachable,
544 },
545 .is_pub = is_pub,
546 };
547
548 const proto_node = transFnType(c, &c.global_scope.base, raw_ty, fn_ty, fn_decl_loc, proto_ctx) catch |err| switch (err) {
549 error.UnsupportedType => {
550 return failDecl(c, fn_decl_loc, fn_name, "unable to resolve prototype of function", .{});
551 },
552 error.OutOfMemory => |e| return e,
553 };
554
555 if (!has_body) {
556 return addTopLevelDecl(c, fn_name, proto_node);
557 }
558 const proto_payload = proto_node.castTag(.func).?;
559
560 // actual function definition with body
561 const body_stmt = node_data.decl.node;
562 var block_scope = try Scope.Block.init(c, &c.global_scope.base, false);
563 block_scope.return_type = fn_ty.data.func.return_type;
564 defer block_scope.deinit();
565
566 var scope = &block_scope.base;
567 _ = &scope;
568
569 var param_id: c_uint = 0;
570 for (proto_payload.data.params, fn_ty.data.func.params) |*param, param_info| {
571 const param_name = param.name orelse {
572 proto_payload.data.is_extern = true;
573 proto_payload.data.is_export = false;
574 proto_payload.data.is_inline = false;
575 try warn(c, &c.global_scope.base, fn_decl_loc, "function {s} parameter has no name, demoted to extern", .{fn_name});
576 return addTopLevelDecl(c, fn_name, proto_node);
577 };
578
579 const is_const = param_info.ty.qual.@"const";
580
581 const mangled_param_name = try block_scope.makeMangledName(c, param_name);
582 param.name = mangled_param_name;
583
584 if (!is_const) {
585 const bare_arg_name = try std.fmt.allocPrint(c.arena, "arg_{s}", .{mangled_param_name});
586 const arg_name = try block_scope.makeMangledName(c, bare_arg_name);
587 param.name = arg_name;
588
589 const redecl_node = try ZigTag.arg_redecl.create(c.arena, .{ .actual = mangled_param_name, .mangled = arg_name });
590 try block_scope.statements.append(redecl_node);
591 }
592 try block_scope.discardVariable(c, mangled_param_name);
593
594 param_id += 1;
595 }
596
597 transCompoundStmtInline(c, body_stmt, &block_scope) catch |err| switch (err) {
598 error.OutOfMemory => |e| return e,
599 error.UnsupportedTranslation,
600 error.UnsupportedType,
601 => {
602 proto_payload.data.is_extern = true;
603 proto_payload.data.is_export = false;
604 proto_payload.data.is_inline = false;
605 try warn(c, &c.global_scope.base, fn_decl_loc, "unable to translate function, demoted to extern", .{});
606 return addTopLevelDecl(c, fn_name, proto_node);
607 },
608 };
609
610 proto_payload.data.body = try block_scope.complete(c);
611 return addTopLevelDecl(c, fn_name, proto_node);
612}
613
614fn transVarDecl(c: *Context, node: NodeIndex) Error!void {
615 const data = c.tree.nodes.items(.data)[@intFromEnum(node)];
616 const name = c.tree.tokSlice(data.decl.name);
617 return failDecl(c, data.decl.name, name, "unable to translate variable declaration", .{});
618}
619
620fn transEnumDecl(c: *Context, scope: *Scope, enum_decl: *const Type.Enum, field_nodes: []const NodeIndex) Error!void {
621 if (c.decl_table.get(@intFromPtr(enum_decl))) |_|
622 return; // Avoid processing this decl twice
623 const toplevel = scope.id == .root;
624 const bs: *Scope.Block = if (!toplevel) try scope.findBlockScope(c) else undefined;
625
626 var is_unnamed = false;
627 var bare_name: []const u8 = c.mapper.lookup(enum_decl.name);
628 var name = bare_name;
629 if (c.unnamed_typedefs.get(@intFromPtr(enum_decl))) |typedef_name| {
630 bare_name = typedef_name;
631 name = typedef_name;
632 } else {
633 if (bare_name.len == 0) {
634 bare_name = try std.fmt.allocPrint(c.arena, "unnamed_{d}", .{c.getMangle()});
635 is_unnamed = true;
636 }
637 name = try std.fmt.allocPrint(c.arena, "enum_{s}", .{bare_name});
638 }
639 if (!toplevel) name = try bs.makeMangledName(c, name);
640 try c.decl_table.putNoClobber(c.gpa, @intFromPtr(enum_decl), name);
641
642 const enum_type_node = if (!enum_decl.isIncomplete()) blk: {
643 for (enum_decl.fields, field_nodes) |field, field_node| {
644 var enum_val_name: []const u8 = c.mapper.lookup(field.name);
645 if (!toplevel) {
646 enum_val_name = try bs.makeMangledName(c, enum_val_name);
647 }
648
649 const enum_const_type_node: ?ZigNode = transType(c, scope, field.ty, .standard, field.name_tok) catch |err| switch (err) {
650 error.UnsupportedType => null,
651 else => |e| return e,
652 };
653
654 const val = c.tree.value_map.get(field_node).?;
655 const enum_const_def = try ZigTag.enum_constant.create(c.arena, .{
656 .name = enum_val_name,
657 .is_public = toplevel,
658 .type = enum_const_type_node,
659 .value = try transCreateNodeAPInt(c, val),
660 });
661 if (toplevel)
662 try addTopLevelDecl(c, enum_val_name, enum_const_def)
663 else {
664 try scope.appendNode(enum_const_def);
665 try bs.discardVariable(c, enum_val_name);
666 }
667 }
668
669 break :blk transType(c, scope, enum_decl.tag_ty, .standard, 0) catch |err| switch (err) {
670 error.UnsupportedType => {
671 return failDecl(c, 0, name, "unable to translate enum integer type", .{});
672 },
673 else => |e| return e,
674 };
675 } else blk: {
676 try c.opaque_demotes.put(c.gpa, @intFromPtr(enum_decl), {});
677 break :blk ZigTag.opaque_literal.init();
678 };
679
680 const is_pub = toplevel and !is_unnamed;
681 const payload = try c.arena.create(ast.Payload.SimpleVarDecl);
682 payload.* = .{
683 .base = .{ .tag = ([2]ZigTag{ .var_simple, .pub_var_simple })[@intFromBool(is_pub)] },
684 .data = .{
685 .init = enum_type_node,
686 .name = name,
687 },
688 };
689 const node = ZigNode.initPayload(&payload.base);
690 if (toplevel) {
691 try addTopLevelDecl(c, name, node);
692 if (!is_unnamed)
693 try c.alias_list.append(.{ .alias = bare_name, .name = name });
694 } else {
695 try scope.appendNode(node);
696 if (node.tag() != .pub_var_simple) {
697 try bs.discardVariable(c, name);
698 }
699 }
700}
701
702fn getTypeStr(c: *Context, ty: Type) ![]const u8 {
703 var allocating: std.Io.Writer.Allocating = .init(c.gpa);
704 defer allocating.deinit();
705 ty.print(c.mapper, c.comp.langopts, &allocating.writer) catch return error.OutOfMemory;
706 return c.arena.dupe(u8, allocating.written());
707}
708
709fn transType(c: *Context, scope: *Scope, raw_ty: Type, qual_handling: Type.QualHandling, source_loc: TokenIndex) TypeError!ZigNode {
710 const ty = raw_ty.canonicalize(qual_handling);
711 if (ty.qual.atomic) {
712 const type_name = try getTypeStr(c, ty);
713 return fail(c, error.UnsupportedType, source_loc, "unsupported type: '{s}'", .{type_name});
714 }
715
716 switch (ty.specifier) {
717 .void => return ZigTag.type.create(c.arena, "anyopaque"),
718 .bool => return ZigTag.type.create(c.arena, "bool"),
719 .char => return ZigTag.type.create(c.arena, "c_char"),
720 .schar => return ZigTag.type.create(c.arena, "i8"),
721 .uchar => return ZigTag.type.create(c.arena, "u8"),
722 .short => return ZigTag.type.create(c.arena, "c_short"),
723 .ushort => return ZigTag.type.create(c.arena, "c_ushort"),
724 .int => return ZigTag.type.create(c.arena, "c_int"),
725 .uint => return ZigTag.type.create(c.arena, "c_uint"),
726 .long => return ZigTag.type.create(c.arena, "c_long"),
727 .ulong => return ZigTag.type.create(c.arena, "c_ulong"),
728 .long_long => return ZigTag.type.create(c.arena, "c_longlong"),
729 .ulong_long => return ZigTag.type.create(c.arena, "c_ulonglong"),
730 .int128 => return ZigTag.type.create(c.arena, "i128"),
731 .uint128 => return ZigTag.type.create(c.arena, "u128"),
732 .fp16, .float16 => return ZigTag.type.create(c.arena, "f16"),
733 .float => return ZigTag.type.create(c.arena, "f32"),
734 .double => return ZigTag.type.create(c.arena, "f64"),
735 .long_double => return ZigTag.type.create(c.arena, "c_longdouble"),
736 .float128 => return ZigTag.type.create(c.arena, "f128"),
737 .@"enum" => {
738 const enum_decl = ty.data.@"enum";
739 var trans_scope = scope;
740 if (enum_decl.name != .empty) {
741 const decl_name = c.mapper.lookup(enum_decl.name);
742 if (c.weak_global_names.contains(decl_name)) trans_scope = &c.global_scope.base;
743 }
744 try transEnumDecl(c, trans_scope, enum_decl, &.{});
745 return ZigTag.identifier.create(c.arena, c.decl_table.get(@intFromPtr(enum_decl)).?);
746 },
747 .pointer => {
748 const child_type = ty.elemType();
749
750 const is_fn_proto = child_type.isFunc();
751 const is_const = is_fn_proto or child_type.isConst();
752 const is_volatile = child_type.qual.@"volatile";
753 const elem_type = try transType(c, scope, child_type, qual_handling, source_loc);
754 const ptr_info: @FieldType(ast.Payload.Pointer, "data") = .{
755 .is_const = is_const,
756 .is_volatile = is_volatile,
757 .elem_type = elem_type,
758 };
759 if (is_fn_proto or
760 typeIsOpaque(c, child_type) or
761 typeWasDemotedToOpaque(c, child_type))
762 {
763 const ptr = try ZigTag.single_pointer.create(c.arena, ptr_info);
764 return ZigTag.optional_type.create(c.arena, ptr);
765 }
766
767 return ZigTag.c_pointer.create(c.arena, ptr_info);
768 },
769 .unspecified_variable_len_array, .incomplete_array => {
770 const child_type = ty.elemType();
771 const is_const = child_type.qual.@"const";
772 const is_volatile = child_type.qual.@"volatile";
773 const elem_type = try transType(c, scope, child_type, qual_handling, source_loc);
774
775 return ZigTag.c_pointer.create(c.arena, .{ .is_const = is_const, .is_volatile = is_volatile, .elem_type = elem_type });
776 },
777 .array,
778 .static_array,
779 => {
780 const size = ty.arrayLen().?;
781 const elem_type = try transType(c, scope, ty.elemType(), qual_handling, source_loc);
782 return ZigTag.array_type.create(c.arena, .{ .len = size, .elem_type = elem_type });
783 },
784 .func,
785 .var_args_func,
786 .old_style_func,
787 => return transFnType(c, scope, ty, ty, source_loc, .{}),
788 .@"struct",
789 .@"union",
790 => {
791 var trans_scope = scope;
792 if (ty.isAnonymousRecord(c.comp)) {
793 const record_decl = ty.data.record;
794 const name_id = c.mapper.lookup(record_decl.name);
795 if (c.weak_global_names.contains(name_id)) trans_scope = &c.global_scope.base;
796 }
797 try transRecordDecl(c, trans_scope, ty);
798 const name = c.decl_table.get(@intFromPtr(ty.data.record)).?;
799 return ZigTag.identifier.create(c.arena, name);
800 },
801 .attributed,
802 .typeof_type,
803 .typeof_expr,
804 => unreachable,
805 else => return error.UnsupportedType,
806 }
807}
808
809/// Look ahead through the fields of the record to determine what the alignment of the record
810/// would be without any align/packed/etc. attributes. This helps us determine whether or not
811/// the fields with 0 offset need an `align` qualifier. Strictly speaking, we could just
812/// pedantically assign those fields the same alignment as the parent's pointer alignment,
813/// but this helps the generated code to be a little less verbose.
814fn headFieldAlignment(record_decl: *const Type.Record) ?c_uint {
815 const bits_per_byte = 8;
816 const parent_ptr_alignment_bits = record_decl.type_layout.pointer_alignment_bits;
817 const parent_ptr_alignment = parent_ptr_alignment_bits / bits_per_byte;
818 var max_field_alignment_bits: u64 = 0;
819 for (record_decl.fields) |field| {
820 if (field.ty.getRecord()) |field_record_decl| {
821 const child_record_alignment = field_record_decl.type_layout.field_alignment_bits;
822 if (child_record_alignment > max_field_alignment_bits)
823 max_field_alignment_bits = child_record_alignment;
824 } else {
825 const field_size = field.layout.size_bits;
826 if (field_size > max_field_alignment_bits)
827 max_field_alignment_bits = field_size;
828 }
829 }
830 if (max_field_alignment_bits != parent_ptr_alignment_bits) {
831 return parent_ptr_alignment;
832 } else {
833 return null;
834 }
835}
836
837/// This function inspects the generated layout of a record to determine the alignment for a
838/// particular field. This approach is necessary because unlike Zig, a C compiler is not
839/// required to fulfill the requested alignment, which means we'd risk generating different code
840/// if we only look at the user-requested alignment.
841///
842/// Returns a ?c_uint to match Clang's behaviour of using c_uint. The return type can be changed
843/// after the Clang frontend for translate-c is removed. A null value indicates that a field is
844/// 'naturally aligned'.
845fn alignmentForField(
846 record_decl: *const Type.Record,
847 head_field_alignment: ?c_uint,
848 field_index: usize,
849) ?c_uint {
850 const fields = record_decl.fields;
851 assert(fields.len != 0);
852 const field = fields[field_index];
853
854 const bits_per_byte = 8;
855 const parent_ptr_alignment_bits = record_decl.type_layout.pointer_alignment_bits;
856 const parent_ptr_alignment = parent_ptr_alignment_bits / bits_per_byte;
857
858 // bitfields aren't supported yet. Until support is added, records with bitfields
859 // should be demoted to opaque, and this function shouldn't be called for them.
860 if (!field.isRegularField()) {
861 @panic("TODO: add bitfield support for records");
862 }
863
864 const field_offset_bits: u64 = field.layout.offset_bits;
865 const field_size_bits: u64 = field.layout.size_bits;
866
867 // Fields with zero width always have an alignment of 1
868 if (field_size_bits == 0) {
869 return 1;
870 }
871
872 // Fields with 0 offset inherit the parent's pointer alignment.
873 if (field_offset_bits == 0) {
874 return head_field_alignment;
875 }
876
877 // Records have a natural alignment when used as a field, and their size is
878 // a multiple of this alignment value. For all other types, the natural alignment
879 // is their size.
880 const field_natural_alignment_bits: u64 = if (field.ty.getRecord()) |record| record.type_layout.field_alignment_bits else field_size_bits;
881 const rem_bits = field_offset_bits % field_natural_alignment_bits;
882
883 // If there's a remainder, then the alignment is smaller than the field's
884 // natural alignment
885 if (rem_bits > 0) {
886 const rem_alignment = rem_bits / bits_per_byte;
887 if (rem_alignment > 0 and std.math.isPowerOfTwo(rem_alignment)) {
888 const actual_alignment = @min(rem_alignment, parent_ptr_alignment);
889 return @as(c_uint, @truncate(actual_alignment));
890 } else {
891 return 1;
892 }
893 }
894
895 // A field may have an offset which positions it to be naturally aligned, but the
896 // parent's pointer alignment determines if this is actually true, so we take the minimum
897 // value.
898 // For example, a float field (4 bytes wide) with a 4 byte offset is positioned to have natural
899 // alignment, but if the parent pointer alignment is 2, then the actual alignment of the
900 // float is 2.
901 const field_natural_alignment: u64 = field_natural_alignment_bits / bits_per_byte;
902 const offset_alignment = field_offset_bits / bits_per_byte;
903 const possible_alignment = @min(parent_ptr_alignment, offset_alignment);
904 if (possible_alignment == field_natural_alignment) {
905 return null;
906 } else if (possible_alignment < field_natural_alignment) {
907 if (std.math.isPowerOfTwo(possible_alignment)) {
908 return possible_alignment;
909 } else {
910 return 1;
911 }
912 } else { // possible_alignment > field_natural_alignment
913 // Here, the field is positioned be at a higher alignment than it's natural alignment. This means we
914 // need to determine whether it's a specified alignment. We can determine that from the padding preceding
915 // the field.
916 const padding_from_prev_field: u64 = blk: {
917 if (field_offset_bits != 0) {
918 const previous_field = fields[field_index - 1];
919 break :blk (field_offset_bits - previous_field.layout.offset_bits) - previous_field.layout.size_bits;
920 } else {
921 break :blk 0;
922 }
923 };
924 if (padding_from_prev_field < field_natural_alignment_bits) {
925 return null;
926 } else {
927 return possible_alignment;
928 }
929 }
930}
931
932const FnProtoContext = struct {
933 is_pub: bool = false,
934 is_export: bool = false,
935 is_extern: bool = false,
936 is_inline: bool = false,
937 fn_name: ?[]const u8 = null,
938};
939
940fn transFnType(
941 c: *Context,
942 scope: *Scope,
943 raw_ty: Type,
944 fn_ty: Type,
945 source_loc: TokenIndex,
946 ctx: FnProtoContext,
947) !ZigNode {
948 const param_count: usize = fn_ty.data.func.params.len;
949 const fn_params = try c.arena.alloc(ast.Payload.Param, param_count);
950
951 for (fn_ty.data.func.params, fn_params) |param_info, *param_node| {
952 const param_ty = param_info.ty;
953 const is_noalias = param_ty.qual.restrict;
954
955 const param_name: ?[]const u8 = if (param_info.name == .empty)
956 null
957 else
958 c.mapper.lookup(param_info.name);
959
960 const type_node = try transType(c, scope, param_ty, .standard, param_info.name_tok);
961 param_node.* = .{
962 .is_noalias = is_noalias,
963 .name = param_name,
964 .type = type_node,
965 };
966 }
967
968 const linksection_string = blk: {
969 if (raw_ty.getAttribute(.section)) |section| {
970 break :blk c.comp.interner.get(section.name.ref()).bytes;
971 }
972 break :blk null;
973 };
974
975 const alignment: ?c_uint = raw_ty.requestedAlignment(c.comp) orelse null;
976
977 const explicit_callconv = null;
978 // const explicit_callconv = if ((ctx.is_inline or ctx.is_export or ctx.is_extern) and ctx.cc == .C) null else ctx.cc;
979
980 const return_type_node = blk: {
981 if (raw_ty.getAttribute(.noreturn) != null) {
982 break :blk ZigTag.noreturn_type.init();
983 } else {
984 const return_ty = fn_ty.data.func.return_type;
985 if (return_ty.is(.void)) {
986 // convert primitive anyopaque to actual void (only for return type)
987 break :blk ZigTag.void_type.init();
988 } else {
989 break :blk transType(c, scope, return_ty, .standard, source_loc) catch |err| switch (err) {
990 error.UnsupportedType => {
991 try warn(c, scope, source_loc, "unsupported function proto return type", .{});
992 return err;
993 },
994 error.OutOfMemory => |e| return e,
995 };
996 }
997 }
998 };
999
1000 const payload = try c.arena.create(ast.Payload.Func);
1001 payload.* = .{
1002 .base = .{ .tag = .func },
1003 .data = .{
1004 .is_pub = ctx.is_pub,
1005 .is_extern = ctx.is_extern,
1006 .is_export = ctx.is_export,
1007 .is_inline = ctx.is_inline,
1008 .is_var_args = switch (fn_ty.specifier) {
1009 .func => false,
1010 .var_args_func => true,
1011 .old_style_func => !ctx.is_export and !ctx.is_inline,
1012 else => unreachable,
1013 },
1014 .name = ctx.fn_name,
1015 .linksection_string = linksection_string,
1016 .explicit_callconv = explicit_callconv,
1017 .params = fn_params,
1018 .return_type = return_type_node,
1019 .body = null,
1020 .alignment = alignment,
1021 },
1022 };
1023 return ZigNode.initPayload(&payload.base);
1024}
1025
1026fn transStmt(c: *Context, node: NodeIndex) TransError!ZigNode {
1027 _ = c;
1028 _ = node;
1029 return error.UnsupportedTranslation;
1030}
1031
1032fn transCompoundStmtInline(c: *Context, compound: NodeIndex, block: *Scope.Block) TransError!void {
1033 const data = c.tree.nodes.items(.data)[@intFromEnum(compound)];
1034 var buf: [2]NodeIndex = undefined;
1035 // TODO move these helpers to Aro
1036 const stmts = switch (c.tree.nodes.items(.tag)[@intFromEnum(compound)]) {
1037 .compound_stmt_two => blk: {
1038 if (data.bin.lhs != .none) buf[0] = data.bin.lhs;
1039 if (data.bin.rhs != .none) buf[1] = data.bin.rhs;
1040 break :blk buf[0 .. @as(u32, @intFromBool(data.bin.lhs != .none)) + @intFromBool(data.bin.rhs != .none)];
1041 },
1042 .compound_stmt => c.tree.data[data.range.start..data.range.end],
1043 else => unreachable,
1044 };
1045 for (stmts) |stmt| {
1046 const result = try transStmt(c, stmt);
1047 switch (result.tag()) {
1048 .declaration, .empty_block => {},
1049 else => try block.statements.append(result),
1050 }
1051 }
1052}
1053
1054fn recordHasBitfield(record: *const Type.Record) bool {
1055 if (record.isIncomplete()) return false;
1056 for (record.fields) |field| {
1057 if (!field.isRegularField()) return true;
1058 }
1059 return false;
1060}
1061
1062fn typeIsOpaque(c: *Context, ty: Type) bool {
1063 return switch (ty.specifier) {
1064 .void => true,
1065 .@"struct", .@"union" => recordHasBitfield(ty.getRecord().?),
1066 .typeof_type => typeIsOpaque(c, ty.data.sub_type.*),
1067 .typeof_expr => typeIsOpaque(c, ty.data.expr.ty),
1068 .attributed => typeIsOpaque(c, ty.data.attributed.base),
1069 else => false,
1070 };
1071}
1072
1073fn typeWasDemotedToOpaque(c: *Context, ty: Type) bool {
1074 switch (ty.specifier) {
1075 .@"struct", .@"union" => {
1076 const record = ty.getRecord().?;
1077 if (c.opaque_demotes.contains(@intFromPtr(record))) return true;
1078 for (record.fields) |field| {
1079 if (typeWasDemotedToOpaque(c, field.ty)) return true;
1080 }
1081 return false;
1082 },
1083
1084 .@"enum" => return c.opaque_demotes.contains(@intFromPtr(ty.data.@"enum")),
1085
1086 .typeof_type => return typeWasDemotedToOpaque(c, ty.data.sub_type.*),
1087 .typeof_expr => return typeWasDemotedToOpaque(c, ty.data.expr.ty),
1088 .attributed => return typeWasDemotedToOpaque(c, ty.data.attributed.base),
1089 else => return false,
1090 }
1091}
1092
1093fn transCompoundStmt(c: *Context, scope: *Scope, compound: NodeIndex) TransError!ZigNode {
1094 var block_scope = try Scope.Block.init(c, scope, false);
1095 defer block_scope.deinit();
1096 try transCompoundStmtInline(c, compound, &block_scope);
1097 return try block_scope.complete(c);
1098}
1099
1100fn transExpr(c: *Context, node: NodeIndex, result_used: ResultUsed) TransError!ZigNode {
1101 std.debug.assert(node != .none);
1102 const ty = c.tree.nodes.items(.ty)[@intFromEnum(node)];
1103 if (c.tree.value_map.get(node)) |val| {
1104 // TODO handle other values
1105 const int = try transCreateNodeAPInt(c, val);
1106 const as_node = try ZigTag.as.create(c.arena, .{
1107 .lhs = try transType(c, undefined, ty, .standard, undefined),
1108 .rhs = int,
1109 });
1110 return maybeSuppressResult(c, result_used, as_node);
1111 }
1112 const node_tags = c.tree.nodes.items(.tag);
1113 switch (node_tags[@intFromEnum(node)]) {
1114 else => unreachable, // Not an expression.
1115 }
1116 return .none;
1117}
1118
1119fn transCreateNodeAPInt(c: *Context, int: aro.Value) !ZigNode {
1120 var space: aro.Interner.Tag.Int.BigIntSpace = undefined;
1121 var big = int.toBigInt(&space, c.comp);
1122 const is_negative = !big.positive;
1123 big.positive = true;
1124
1125 const str = big.toStringAlloc(c.arena, 10, .lower) catch |err| switch (err) {
1126 error.OutOfMemory => return error.OutOfMemory,
1127 };
1128 const res = try ZigTag.integer_literal.create(c.arena, str);
1129 if (is_negative) return ZigTag.negate.create(c.arena, res);
1130 return res;
1131}
1132
1133pub const PatternList = struct {
1134 patterns: []Pattern,
1135
1136 /// Templates must be function-like macros
1137 /// first element is macro source, second element is the name of the function
1138 /// in std.lib.zig.c_translation.Macros which implements it
1139 const templates = [_][2][]const u8{
1140 [2][]const u8{ "f_SUFFIX(X) (X ## f)", "F_SUFFIX" },
1141 [2][]const u8{ "F_SUFFIX(X) (X ## F)", "F_SUFFIX" },
1142
1143 [2][]const u8{ "u_SUFFIX(X) (X ## u)", "U_SUFFIX" },
1144 [2][]const u8{ "U_SUFFIX(X) (X ## U)", "U_SUFFIX" },
1145
1146 [2][]const u8{ "l_SUFFIX(X) (X ## l)", "L_SUFFIX" },
1147 [2][]const u8{ "L_SUFFIX(X) (X ## L)", "L_SUFFIX" },
1148
1149 [2][]const u8{ "ul_SUFFIX(X) (X ## ul)", "UL_SUFFIX" },
1150 [2][]const u8{ "uL_SUFFIX(X) (X ## uL)", "UL_SUFFIX" },
1151 [2][]const u8{ "Ul_SUFFIX(X) (X ## Ul)", "UL_SUFFIX" },
1152 [2][]const u8{ "UL_SUFFIX(X) (X ## UL)", "UL_SUFFIX" },
1153
1154 [2][]const u8{ "ll_SUFFIX(X) (X ## ll)", "LL_SUFFIX" },
1155 [2][]const u8{ "LL_SUFFIX(X) (X ## LL)", "LL_SUFFIX" },
1156
1157 [2][]const u8{ "ull_SUFFIX(X) (X ## ull)", "ULL_SUFFIX" },
1158 [2][]const u8{ "uLL_SUFFIX(X) (X ## uLL)", "ULL_SUFFIX" },
1159 [2][]const u8{ "Ull_SUFFIX(X) (X ## Ull)", "ULL_SUFFIX" },
1160 [2][]const u8{ "ULL_SUFFIX(X) (X ## ULL)", "ULL_SUFFIX" },
1161
1162 [2][]const u8{ "f_SUFFIX(X) X ## f", "F_SUFFIX" },
1163 [2][]const u8{ "F_SUFFIX(X) X ## F", "F_SUFFIX" },
1164
1165 [2][]const u8{ "u_SUFFIX(X) X ## u", "U_SUFFIX" },
1166 [2][]const u8{ "U_SUFFIX(X) X ## U", "U_SUFFIX" },
1167
1168 [2][]const u8{ "l_SUFFIX(X) X ## l", "L_SUFFIX" },
1169 [2][]const u8{ "L_SUFFIX(X) X ## L", "L_SUFFIX" },
1170
1171 [2][]const u8{ "ul_SUFFIX(X) X ## ul", "UL_SUFFIX" },
1172 [2][]const u8{ "uL_SUFFIX(X) X ## uL", "UL_SUFFIX" },
1173 [2][]const u8{ "Ul_SUFFIX(X) X ## Ul", "UL_SUFFIX" },
1174 [2][]const u8{ "UL_SUFFIX(X) X ## UL", "UL_SUFFIX" },
1175
1176 [2][]const u8{ "ll_SUFFIX(X) X ## ll", "LL_SUFFIX" },
1177 [2][]const u8{ "LL_SUFFIX(X) X ## LL", "LL_SUFFIX" },
1178
1179 [2][]const u8{ "ull_SUFFIX(X) X ## ull", "ULL_SUFFIX" },
1180 [2][]const u8{ "uLL_SUFFIX(X) X ## uLL", "ULL_SUFFIX" },
1181 [2][]const u8{ "Ull_SUFFIX(X) X ## Ull", "ULL_SUFFIX" },
1182 [2][]const u8{ "ULL_SUFFIX(X) X ## ULL", "ULL_SUFFIX" },
1183
1184 [2][]const u8{ "CAST_OR_CALL(X, Y) (X)(Y)", "CAST_OR_CALL" },
1185 [2][]const u8{ "CAST_OR_CALL(X, Y) ((X)(Y))", "CAST_OR_CALL" },
1186
1187 [2][]const u8{
1188 \\wl_container_of(ptr, sample, member) \
1189 \\(__typeof__(sample))((char *)(ptr) - \
1190 \\ offsetof(__typeof__(*sample), member))
1191 ,
1192 "WL_CONTAINER_OF",
1193 },
1194
1195 [2][]const u8{ "IGNORE_ME(X) ((void)(X))", "DISCARD" },
1196 [2][]const u8{ "IGNORE_ME(X) (void)(X)", "DISCARD" },
1197 [2][]const u8{ "IGNORE_ME(X) ((const void)(X))", "DISCARD" },
1198 [2][]const u8{ "IGNORE_ME(X) (const void)(X)", "DISCARD" },
1199 [2][]const u8{ "IGNORE_ME(X) ((volatile void)(X))", "DISCARD" },
1200 [2][]const u8{ "IGNORE_ME(X) (volatile void)(X)", "DISCARD" },
1201 [2][]const u8{ "IGNORE_ME(X) ((const volatile void)(X))", "DISCARD" },
1202 [2][]const u8{ "IGNORE_ME(X) (const volatile void)(X)", "DISCARD" },
1203 [2][]const u8{ "IGNORE_ME(X) ((volatile const void)(X))", "DISCARD" },
1204 [2][]const u8{ "IGNORE_ME(X) (volatile const void)(X)", "DISCARD" },
1205 };
1206
1207 /// Assumes that `ms` represents a tokenized function-like macro.
1208 fn buildArgsHash(allocator: mem.Allocator, ms: MacroSlicer, hash: *ArgsPositionMap) MacroProcessingError!void {
1209 assert(ms.tokens.len > 2);
1210 assert(ms.tokens[0].id.isMacroIdentifier());
1211 assert(ms.tokens[1].id == .l_paren);
1212
1213 var i: usize = 2;
1214 while (true) : (i += 1) {
1215 const token = ms.tokens[i];
1216 switch (token.id) {
1217 .r_paren => break,
1218 .comma => continue,
1219 .identifier, .extended_identifier => {
1220 const identifier = ms.slice(token);
1221 try hash.put(allocator, identifier, i);
1222 },
1223 else => return error.UnexpectedMacroToken,
1224 }
1225 }
1226 }
1227
1228 const Pattern = struct {
1229 tokens: []const CToken,
1230 source: []const u8,
1231 impl: []const u8,
1232 args_hash: ArgsPositionMap,
1233
1234 fn init(self: *Pattern, allocator: mem.Allocator, template: [2][]const u8) Error!void {
1235 const source = template[0];
1236 const impl = template[1];
1237
1238 var tok_list = std.array_list.Managed(CToken).init(allocator);
1239 defer tok_list.deinit();
1240 try tokenizeMacro(source, &tok_list);
1241 const tokens = try allocator.dupe(CToken, tok_list.items);
1242
1243 self.* = .{
1244 .tokens = tokens,
1245 .source = source,
1246 .impl = impl,
1247 .args_hash = .{},
1248 };
1249 const ms = MacroSlicer{ .source = source, .tokens = tokens };
1250 buildArgsHash(allocator, ms, &self.args_hash) catch |err| switch (err) {
1251 error.UnexpectedMacroToken => unreachable,
1252 else => |e| return e,
1253 };
1254 }
1255
1256 fn deinit(self: *Pattern, allocator: mem.Allocator) void {
1257 self.args_hash.deinit(allocator);
1258 allocator.free(self.tokens);
1259 }
1260
1261 /// This function assumes that `ms` has already been validated to contain a function-like
1262 /// macro, and that the parsed template macro in `self` also contains a function-like
1263 /// macro. Please review this logic carefully if changing that assumption. Two
1264 /// function-like macros are considered equivalent if and only if they contain the same
1265 /// list of tokens, modulo parameter names.
1266 pub fn isEquivalent(self: Pattern, ms: MacroSlicer, args_hash: ArgsPositionMap) bool {
1267 if (self.tokens.len != ms.tokens.len) return false;
1268 if (args_hash.count() != self.args_hash.count()) return false;
1269
1270 var i: usize = 2;
1271 while (self.tokens[i].id != .r_paren) : (i += 1) {}
1272
1273 const pattern_slicer = MacroSlicer{ .source = self.source, .tokens = self.tokens };
1274 while (i < self.tokens.len) : (i += 1) {
1275 const pattern_token = self.tokens[i];
1276 const macro_token = ms.tokens[i];
1277 if (pattern_token.id != macro_token.id) return false;
1278
1279 const pattern_bytes = pattern_slicer.slice(pattern_token);
1280 const macro_bytes = ms.slice(macro_token);
1281 switch (pattern_token.id) {
1282 .identifier, .extended_identifier => {
1283 const pattern_arg_index = self.args_hash.get(pattern_bytes);
1284 const macro_arg_index = args_hash.get(macro_bytes);
1285
1286 if (pattern_arg_index == null and macro_arg_index == null) {
1287 if (!mem.eql(u8, pattern_bytes, macro_bytes)) return false;
1288 } else if (pattern_arg_index != null and macro_arg_index != null) {
1289 if (pattern_arg_index.? != macro_arg_index.?) return false;
1290 } else {
1291 return false;
1292 }
1293 },
1294 .string_literal, .char_literal, .pp_num => {
1295 if (!mem.eql(u8, pattern_bytes, macro_bytes)) return false;
1296 },
1297 else => {
1298 // other tags correspond to keywords and operators that do not contain a "payload"
1299 // that can vary
1300 },
1301 }
1302 }
1303 return true;
1304 }
1305 };
1306
1307 pub fn init(allocator: mem.Allocator) Error!PatternList {
1308 const patterns = try allocator.alloc(Pattern, templates.len);
1309 for (templates, 0..) |template, i| {
1310 try patterns[i].init(allocator, template);
1311 }
1312 return PatternList{ .patterns = patterns };
1313 }
1314
1315 pub fn deinit(self: *PatternList, allocator: mem.Allocator) void {
1316 for (self.patterns) |*pattern| pattern.deinit(allocator);
1317 allocator.free(self.patterns);
1318 }
1319
1320 pub fn match(self: PatternList, allocator: mem.Allocator, ms: MacroSlicer) Error!?Pattern {
1321 var args_hash: ArgsPositionMap = .{};
1322 defer args_hash.deinit(allocator);
1323
1324 buildArgsHash(allocator, ms, &args_hash) catch |err| switch (err) {
1325 error.UnexpectedMacroToken => return null,
1326 else => |e| return e,
1327 };
1328
1329 for (self.patterns) |pattern| if (pattern.isEquivalent(ms, args_hash)) return pattern;
1330 return null;
1331 }
1332};
1333
1334pub const MacroSlicer = struct {
1335 source: []const u8,
1336 tokens: []const CToken,
1337
1338 pub fn slice(self: MacroSlicer, token: CToken) []const u8 {
1339 return self.source[token.start..token.end];
1340 }
1341};
1342
1343// Maps macro parameter names to token position, for determining if different
1344// identifiers refer to the same positional argument in different macros.
1345pub const ArgsPositionMap = std.StringArrayHashMapUnmanaged(usize);
1346
1347pub const Error = std.mem.Allocator.Error;
1348pub const MacroProcessingError = Error || error{UnexpectedMacroToken};
1349pub const TypeError = Error || error{UnsupportedType};
1350pub const TransError = TypeError || error{UnsupportedTranslation};
1351
1352pub const SymbolTable = std.StringArrayHashMap(ast.Node);
1353pub const AliasList = std.array_list.Managed(struct {
1354 alias: []const u8,
1355 name: []const u8,
1356});
1357
1358pub const ResultUsed = enum {
1359 used,
1360 unused,
1361};
1362
1363pub fn ScopeExtra(comptime ScopeExtraContext: type, comptime ScopeExtraType: type) type {
1364 return struct {
1365 id: Id,
1366 parent: ?*ScopeExtraScope,
1367
1368 const ScopeExtraScope = @This();
1369
1370 pub const Id = enum {
1371 block,
1372 root,
1373 condition,
1374 loop,
1375 do_loop,
1376 };
1377
1378 /// Used for the scope of condition expressions, for example `if (cond)`.
1379 /// The block is lazily initialised because it is only needed for rare
1380 /// cases of comma operators being used.
1381 pub const Condition = struct {
1382 base: ScopeExtraScope,
1383 block: ?Block = null,
1384
1385 pub fn getBlockScope(self: *Condition, c: *ScopeExtraContext) !*Block {
1386 if (self.block) |*b| return b;
1387 self.block = try Block.init(c, &self.base, true);
1388 return &self.block.?;
1389 }
1390
1391 pub fn deinit(self: *Condition) void {
1392 if (self.block) |*b| b.deinit();
1393 }
1394 };
1395
1396 /// Represents an in-progress Node.Block. This struct is stack-allocated.
1397 /// When it is deinitialized, it produces an Node.Block which is allocated
1398 /// into the main arena.
1399 pub const Block = struct {
1400 base: ScopeExtraScope,
1401 statements: std.array_list.Managed(ast.Node),
1402 variables: AliasList,
1403 mangle_count: u32 = 0,
1404 label: ?[]const u8 = null,
1405
1406 /// By default all variables are discarded, since we do not know in advance if they
1407 /// will be used. This maps the variable's name to the Discard payload, so that if
1408 /// the variable is subsequently referenced we can indicate that the discard should
1409 /// be skipped during the intermediate AST -> Zig AST render step.
1410 variable_discards: std.StringArrayHashMap(*ast.Payload.Discard),
1411
1412 /// When the block corresponds to a function, keep track of the return type
1413 /// so that the return expression can be cast, if necessary
1414 return_type: ?ScopeExtraType = null,
1415
1416 /// C static local variables are wrapped in a block-local struct. The struct
1417 /// is named after the (mangled) variable name, the Zig variable within the
1418 /// struct itself is given this name.
1419 pub const static_inner_name = "static";
1420
1421 /// C extern variables declared within a block are wrapped in a block-local
1422 /// struct. The struct is named ExternLocal_[variable_name], the Zig variable
1423 /// within the struct itself is [variable_name] by neccessity since it's an
1424 /// extern reference to an existing symbol.
1425 pub const extern_inner_prepend = "ExternLocal";
1426
1427 pub fn init(c: *ScopeExtraContext, parent: *ScopeExtraScope, labeled: bool) !Block {
1428 var blk = Block{
1429 .base = .{
1430 .id = .block,
1431 .parent = parent,
1432 },
1433 .statements = std.array_list.Managed(ast.Node).init(c.gpa),
1434 .variables = AliasList.init(c.gpa),
1435 .variable_discards = std.StringArrayHashMap(*ast.Payload.Discard).init(c.gpa),
1436 };
1437 if (labeled) {
1438 blk.label = try blk.makeMangledName(c, "blk");
1439 }
1440 return blk;
1441 }
1442
1443 pub fn deinit(self: *Block) void {
1444 self.statements.deinit();
1445 self.variables.deinit();
1446 self.variable_discards.deinit();
1447 self.* = undefined;
1448 }
1449
1450 pub fn complete(self: *Block, c: *ScopeExtraContext) !ast.Node {
1451 if (self.base.parent.?.id == .do_loop) {
1452 // We reserve 1 extra statement if the parent is a do_loop. This is in case of
1453 // do while, we want to put `if (cond) break;` at the end.
1454 const alloc_len = self.statements.items.len + @intFromBool(self.base.parent.?.id == .do_loop);
1455 var stmts = try c.arena.alloc(ast.Node, alloc_len);
1456 stmts.len = self.statements.items.len;
1457 @memcpy(stmts[0..self.statements.items.len], self.statements.items);
1458 return ast.Node.Tag.block.create(c.arena, .{
1459 .label = self.label,
1460 .stmts = stmts,
1461 });
1462 }
1463 if (self.statements.items.len == 0) return ast.Node.Tag.empty_block.init();
1464 return ast.Node.Tag.block.create(c.arena, .{
1465 .label = self.label,
1466 .stmts = try c.arena.dupe(ast.Node, self.statements.items),
1467 });
1468 }
1469
1470 /// Given the desired name, return a name that does not shadow anything from outer scopes.
1471 /// Inserts the returned name into the scope.
1472 /// The name will not be visible to callers of getAlias.
1473 pub fn reserveMangledName(scope: *Block, c: *ScopeExtraContext, name: []const u8) ![]const u8 {
1474 return scope.createMangledName(c, name, true);
1475 }
1476
1477 /// Same as reserveMangledName, but enables the alias immediately.
1478 pub fn makeMangledName(scope: *Block, c: *ScopeExtraContext, name: []const u8) ![]const u8 {
1479 return scope.createMangledName(c, name, false);
1480 }
1481
1482 pub fn createMangledName(scope: *Block, c: *ScopeExtraContext, name: []const u8, reservation: bool) ![]const u8 {
1483 const name_copy = try c.arena.dupe(u8, name);
1484 var proposed_name = name_copy;
1485 while (scope.contains(proposed_name)) {
1486 scope.mangle_count += 1;
1487 proposed_name = try std.fmt.allocPrint(c.arena, "{s}_{d}", .{ name, scope.mangle_count });
1488 }
1489 const new_mangle = try scope.variables.addOne();
1490 if (reservation) {
1491 new_mangle.* = .{ .name = name_copy, .alias = name_copy };
1492 } else {
1493 new_mangle.* = .{ .name = name_copy, .alias = proposed_name };
1494 }
1495 return proposed_name;
1496 }
1497
1498 pub fn getAlias(scope: *Block, name: []const u8) []const u8 {
1499 for (scope.variables.items) |p| {
1500 if (std.mem.eql(u8, p.name, name))
1501 return p.alias;
1502 }
1503 return scope.base.parent.?.getAlias(name);
1504 }
1505
1506 /// Finds the (potentially) mangled struct name for a locally scoped extern variable or function given the original declaration name.
1507 ///
1508 /// Block scoped extern declarations translate to:
1509 /// const MangledStructName = struct {extern [qualifiers] original_extern_variable_name: [type]};
1510 /// This finds MangledStructName given original_extern_variable_name for referencing correctly in transDeclRefExpr()
1511 pub fn getLocalExternAlias(scope: *Block, name: []const u8) ?[]const u8 {
1512 for (scope.statements.items) |node| {
1513 switch (node.tag()) {
1514 .extern_local_var => {
1515 const parent_node = node.castTag(.extern_local_var).?;
1516 const init_node = parent_node.data.init.castTag(.var_decl).?;
1517 if (std.mem.eql(u8, init_node.data.name, name)) {
1518 return parent_node.data.name;
1519 }
1520 },
1521 .extern_local_fn => {
1522 const parent_node = node.castTag(.extern_local_fn).?;
1523 const init_node = parent_node.data.init.castTag(.func).?;
1524 if (std.mem.eql(u8, init_node.data.name.?, name)) {
1525 return parent_node.data.name;
1526 }
1527 },
1528 else => {},
1529 }
1530 }
1531 return null;
1532 }
1533
1534 pub fn localContains(scope: *Block, name: []const u8) bool {
1535 for (scope.variables.items) |p| {
1536 if (std.mem.eql(u8, p.alias, name))
1537 return true;
1538 }
1539 return false;
1540 }
1541
1542 pub fn contains(scope: *Block, name: []const u8) bool {
1543 if (scope.localContains(name))
1544 return true;
1545 return scope.base.parent.?.contains(name);
1546 }
1547
1548 pub fn discardVariable(scope: *Block, c: *ScopeExtraContext, name: []const u8) Error!void {
1549 const name_node = try ast.Node.Tag.identifier.create(c.arena, name);
1550 const discard = try ast.Node.Tag.discard.create(c.arena, .{ .should_skip = false, .value = name_node });
1551 try scope.statements.append(discard);
1552 try scope.variable_discards.putNoClobber(name, discard.castTag(.discard).?);
1553 }
1554 };
1555
1556 pub const Root = struct {
1557 base: ScopeExtraScope,
1558 sym_table: SymbolTable,
1559 blank_macros: std.StringArrayHashMap(void),
1560 context: *ScopeExtraContext,
1561 nodes: std.array_list.Managed(ast.Node),
1562
1563 pub fn init(c: *ScopeExtraContext) Root {
1564 return .{
1565 .base = .{
1566 .id = .root,
1567 .parent = null,
1568 },
1569 .sym_table = SymbolTable.init(c.gpa),
1570 .blank_macros = std.StringArrayHashMap(void).init(c.gpa),
1571 .context = c,
1572 .nodes = std.array_list.Managed(ast.Node).init(c.gpa),
1573 };
1574 }
1575
1576 pub fn deinit(scope: *Root) void {
1577 scope.sym_table.deinit();
1578 scope.blank_macros.deinit();
1579 scope.nodes.deinit();
1580 }
1581
1582 /// Check if the global scope contains this name, without looking into the "future", e.g.
1583 /// ignore the preprocessed decl and macro names.
1584 pub fn containsNow(scope: *Root, name: []const u8) bool {
1585 return scope.sym_table.contains(name);
1586 }
1587
1588 /// Check if the global scope contains the name, includes all decls that haven't been translated yet.
1589 pub fn contains(scope: *Root, name: []const u8) bool {
1590 return scope.containsNow(name) or scope.context.global_names.contains(name) or scope.context.weak_global_names.contains(name);
1591 }
1592 };
1593
1594 pub fn findBlockScope(inner: *ScopeExtraScope, c: *ScopeExtraContext) !*Block {
1595 var scope = inner;
1596 while (true) {
1597 switch (scope.id) {
1598 .root => unreachable,
1599 .block => return @fieldParentPtr("base", scope),
1600 .condition => return @as(*Condition, @fieldParentPtr("base", scope)).getBlockScope(c),
1601 else => scope = scope.parent.?,
1602 }
1603 }
1604 }
1605
1606 pub fn findBlockReturnType(inner: *ScopeExtraScope) ScopeExtraType {
1607 var scope = inner;
1608 while (true) {
1609 switch (scope.id) {
1610 .root => unreachable,
1611 .block => {
1612 const block: *Block = @fieldParentPtr("base", scope);
1613 if (block.return_type) |ty| return ty;
1614 scope = scope.parent.?;
1615 },
1616 else => scope = scope.parent.?,
1617 }
1618 }
1619 }
1620
1621 pub fn getAlias(scope: *ScopeExtraScope, name: []const u8) []const u8 {
1622 return switch (scope.id) {
1623 .root => name,
1624 .block => @as(*Block, @fieldParentPtr("base", scope)).getAlias(name),
1625 .loop, .do_loop, .condition => scope.parent.?.getAlias(name),
1626 };
1627 }
1628
1629 pub fn getLocalExternAlias(scope: *ScopeExtraScope, name: []const u8) ?[]const u8 {
1630 return switch (scope.id) {
1631 .root => null,
1632 .block => ret: {
1633 const block = @as(*Block, @fieldParentPtr("base", scope));
1634 const alias_name = block.getLocalExternAlias(name);
1635 if (alias_name) |_alias_name| {
1636 break :ret _alias_name;
1637 }
1638 break :ret scope.parent.?.getLocalExternAlias(name);
1639 },
1640 .loop, .do_loop, .condition => scope.parent.?.getLocalExternAlias(name),
1641 };
1642 }
1643
1644 pub fn contains(scope: *ScopeExtraScope, name: []const u8) bool {
1645 return switch (scope.id) {
1646 .root => @as(*Root, @fieldParentPtr("base", scope)).contains(name),
1647 .block => @as(*Block, @fieldParentPtr("base", scope)).contains(name),
1648 .loop, .do_loop, .condition => scope.parent.?.contains(name),
1649 };
1650 }
1651
1652 pub fn getBreakableScope(inner: *ScopeExtraScope) *ScopeExtraScope {
1653 var scope = inner;
1654 while (true) {
1655 switch (scope.id) {
1656 .root => unreachable,
1657 .loop, .do_loop => return scope,
1658 else => scope = scope.parent.?,
1659 }
1660 }
1661 }
1662
1663 /// Appends a node to the first block scope if inside a function, or to the root tree if not.
1664 pub fn appendNode(inner: *ScopeExtraScope, node: ast.Node) !void {
1665 var scope = inner;
1666 while (true) {
1667 switch (scope.id) {
1668 .root => {
1669 const root: *Root = @fieldParentPtr("base", scope);
1670 return root.nodes.append(node);
1671 },
1672 .block => {
1673 const block: *Block = @fieldParentPtr("base", scope);
1674 return block.statements.append(node);
1675 },
1676 else => scope = scope.parent.?,
1677 }
1678 }
1679 }
1680
1681 pub fn skipVariableDiscard(inner: *ScopeExtraScope, name: []const u8) void {
1682 if (true) {
1683 // TODO: due to 'local variable is never mutated' errors, we can
1684 // only skip discards if a variable is used as an lvalue, which
1685 // we don't currently have detection for in translate-c.
1686 // Once #17584 is completed, perhaps we can do away with this
1687 // logic entirely, and instead rely on render to fixup code.
1688 return;
1689 }
1690 var scope = inner;
1691 while (true) {
1692 switch (scope.id) {
1693 .root => return,
1694 .block => {
1695 const block: *Block = @fieldParentPtr("base", scope);
1696 if (block.variable_discards.get(name)) |discard| {
1697 discard.data.should_skip = true;
1698 return;
1699 }
1700 },
1701 else => {},
1702 }
1703 scope = scope.parent.?;
1704 }
1705 }
1706 };
1707}
1708
1709pub fn tokenizeMacro(source: []const u8, tok_list: *std.array_list.Managed(CToken)) Error!void {
1710 var tokenizer: aro.Tokenizer = .{
1711 .buf = source,
1712 .source = .unused,
1713 .langopts = .{},
1714 };
1715 while (true) {
1716 const tok = tokenizer.next();
1717 switch (tok.id) {
1718 .whitespace => continue,
1719 .nl, .eof => {
1720 try tok_list.append(tok);
1721 break;
1722 },
1723 else => {},
1724 }
1725 try tok_list.append(tok);
1726 }
1727}
1728
1729// Testing here instead of test/translate_c.zig allows us to also test that the
1730// mapped function exists in `std.zig.c_translation.Macros`
1731test "Macro matching" {
1732 const testing = std.testing;
1733 const helper = struct {
1734 const MacroFunctions = std.zig.c_translation.Macros;
1735 fn checkMacro(allocator: mem.Allocator, pattern_list: PatternList, source: []const u8, comptime expected_match: ?[]const u8) !void {
1736 var tok_list = std.array_list.Managed(CToken).init(allocator);
1737 defer tok_list.deinit();
1738 try tokenizeMacro(source, &tok_list);
1739 const macro_slicer: MacroSlicer = .{ .source = source, .tokens = tok_list.items };
1740 const matched = try pattern_list.match(allocator, macro_slicer);
1741 if (expected_match) |expected| {
1742 try testing.expectEqualStrings(expected, matched.?.impl);
1743 try testing.expect(@hasDecl(MacroFunctions, expected));
1744 } else {
1745 try testing.expectEqual(@as(@TypeOf(matched), null), matched);
1746 }
1747 }
1748 };
1749 const allocator = std.testing.allocator;
1750 var pattern_list = try PatternList.init(allocator);
1751 defer pattern_list.deinit(allocator);
1752
1753 try helper.checkMacro(allocator, pattern_list, "BAR(Z) (Z ## F)", "F_SUFFIX");
1754 try helper.checkMacro(allocator, pattern_list, "BAR(Z) (Z ## U)", "U_SUFFIX");
1755 try helper.checkMacro(allocator, pattern_list, "BAR(Z) (Z ## L)", "L_SUFFIX");
1756 try helper.checkMacro(allocator, pattern_list, "BAR(Z) (Z ## LL)", "LL_SUFFIX");
1757 try helper.checkMacro(allocator, pattern_list, "BAR(Z) (Z ## UL)", "UL_SUFFIX");
1758 try helper.checkMacro(allocator, pattern_list, "BAR(Z) (Z ## ULL)", "ULL_SUFFIX");
1759 try helper.checkMacro(allocator, pattern_list,
1760 \\container_of(a, b, c) \
1761 \\(__typeof__(b))((char *)(a) - \
1762 \\ offsetof(__typeof__(*b), c))
1763 , "WL_CONTAINER_OF");
1764
1765 try helper.checkMacro(allocator, pattern_list, "NO_MATCH(X, Y) (X + Y)", null);
1766 try helper.checkMacro(allocator, pattern_list, "CAST_OR_CALL(X, Y) (X)(Y)", "CAST_OR_CALL");
1767 try helper.checkMacro(allocator, pattern_list, "CAST_OR_CALL(X, Y) ((X)(Y))", "CAST_OR_CALL");
1768 try helper.checkMacro(allocator, pattern_list, "IGNORE_ME(X) (void)(X)", "DISCARD");
1769 try helper.checkMacro(allocator, pattern_list, "IGNORE_ME(X) ((void)(X))", "DISCARD");
1770 try helper.checkMacro(allocator, pattern_list, "IGNORE_ME(X) (const void)(X)", "DISCARD");
1771 try helper.checkMacro(allocator, pattern_list, "IGNORE_ME(X) ((const void)(X))", "DISCARD");
1772 try helper.checkMacro(allocator, pattern_list, "IGNORE_ME(X) (volatile void)(X)", "DISCARD");
1773 try helper.checkMacro(allocator, pattern_list, "IGNORE_ME(X) ((volatile void)(X))", "DISCARD");
1774 try helper.checkMacro(allocator, pattern_list, "IGNORE_ME(X) (const volatile void)(X)", "DISCARD");
1775 try helper.checkMacro(allocator, pattern_list, "IGNORE_ME(X) ((const volatile void)(X))", "DISCARD");
1776 try helper.checkMacro(allocator, pattern_list, "IGNORE_ME(X) (volatile const void)(X)", "DISCARD");
1777 try helper.checkMacro(allocator, pattern_list, "IGNORE_ME(X) ((volatile const void)(X))", "DISCARD");
1778}
1779
1780/// Renders errors and fatal errors + associated notes (e.g. "expanded from here"); does not render warnings or associated notes
1781/// Terminates with exit code 1
1782fn renderErrorsAndExit(comp: *aro.Compilation) noreturn {
1783 defer std.process.exit(1);
1784
1785 var buffer: [1000]u8 = undefined;
1786 var writer = aro.Diagnostics.defaultMsgWriter(std.Io.tty.detectConfig(std.fs.File.stderr()), &buffer);
1787 defer writer.deinit(); // writer deinit must run *before* exit so that stderr is flushed
1788
1789 var saw_error = false;
1790 for (comp.diagnostics.list.items) |msg| {
1791 switch (msg.kind) {
1792 .@"error", .@"fatal error" => {
1793 saw_error = true;
1794 aro.Diagnostics.renderMessage(comp, &writer, msg);
1795 },
1796 .warning => saw_error = false,
1797 .note => {
1798 if (saw_error) {
1799 aro.Diagnostics.renderMessage(comp, &writer, msg);
1800 }
1801 },
1802 .off => {},
1803 .default => unreachable,
1804 }
1805 }
1806}
1807
1808pub fn main() !void {
1809 var arena_instance = std.heap.ArenaAllocator.init(std.heap.page_allocator);
1810 defer arena_instance.deinit();
1811 const arena = arena_instance.allocator();
1812
1813 var general_purpose_allocator: std.heap.GeneralPurposeAllocator(.{}) = .init;
1814 const gpa = general_purpose_allocator.allocator();
1815
1816 const args = try std.process.argsAlloc(arena);
1817
1818 var aro_comp = aro.Compilation.init(gpa, std.fs.cwd());
1819 defer aro_comp.deinit();
1820
1821 var tree = translate(gpa, &aro_comp, args) catch |err| switch (err) {
1822 error.ParsingFailed, error.FatalError => renderErrorsAndExit(&aro_comp),
1823 error.OutOfMemory => return error.OutOfMemory,
1824 error.WriteFailed => return error.WriteFailed,
1825 error.StreamTooLong => std.process.fatal("An input file was larger than 4GiB", .{}),
1826 };
1827 defer tree.deinit(gpa);
1828
1829 const formatted = try tree.renderAlloc(arena);
1830 try std.fs.File.stdout().writeAll(formatted);
1831 return std.process.cleanExit();
1832}
lib/compiler/aro_translate_c/ast.zig deleted-2982
......@@ -1,2982 +0,0 @@
1const std = @import("std");
2const Allocator = std.mem.Allocator;
3
4pub const Node = extern union {
5 /// If the tag value is less than Tag.no_payload_count, then no pointer
6 /// dereference is needed.
7 tag_if_small_enough: usize,
8 ptr_otherwise: *Payload,
9
10 pub const Tag = enum {
11 /// Declarations add themselves to the correct scopes and should not be emitted as this tag.
12 declaration,
13 null_literal,
14 undefined_literal,
15 /// opaque {}
16 opaque_literal,
17 true_literal,
18 false_literal,
19 empty_block,
20 return_void,
21 zero_literal,
22 one_literal,
23 void_type,
24 noreturn_type,
25 @"anytype",
26 @"continue",
27 @"break",
28 // After this, the tag requires a payload.
29
30 integer_literal,
31 float_literal,
32 string_literal,
33 char_literal,
34 enum_literal,
35 /// "string"[0..end]
36 string_slice,
37 identifier,
38 fn_identifier,
39 @"if",
40 /// if (!operand) break;
41 if_not_break,
42 @"while",
43 /// while (true) operand
44 while_true,
45 @"switch",
46 /// else => operand,
47 switch_else,
48 /// items => body,
49 switch_prong,
50 break_val,
51 @"return",
52 field_access,
53 array_access,
54 call,
55 var_decl,
56 /// const name = struct { init }
57 static_local_var,
58 /// const ExternLocal_name = struct { init }
59 extern_local_var,
60 /// const ExternLocal_name = struct { init }
61 extern_local_fn,
62 /// var name = init.*
63 mut_str,
64 func,
65 warning,
66 @"struct",
67 @"union",
68 @"comptime",
69 @"defer",
70 array_init,
71 tuple,
72 container_init,
73 container_init_dot,
74 helpers_cast,
75 /// _ = operand;
76 discard,
77
78 // a + b
79 add,
80 // a = b
81 add_assign,
82 // c = (a = b)
83 add_wrap,
84 add_wrap_assign,
85 sub,
86 sub_assign,
87 sub_wrap,
88 sub_wrap_assign,
89 mul,
90 mul_assign,
91 mul_wrap,
92 mul_wrap_assign,
93 div,
94 div_assign,
95 shl,
96 shl_assign,
97 shr,
98 shr_assign,
99 mod,
100 mod_assign,
101 @"and",
102 @"or",
103 less_than,
104 less_than_equal,
105 greater_than,
106 greater_than_equal,
107 equal,
108 not_equal,
109 bit_and,
110 bit_and_assign,
111 bit_or,
112 bit_or_assign,
113 bit_xor,
114 bit_xor_assign,
115 array_cat,
116 ellipsis3,
117 assign,
118
119 /// @import("std").zig.c_builtins.<name>
120 import_c_builtin,
121 /// @intCast(operand)
122 int_cast,
123 /// @constCast(operand)
124 const_cast,
125 /// @volatileCast(operand)
126 volatile_cast,
127 /// @import("std").zig.c_translation.promoteIntLiteral(value, type, base)
128 helpers_promoteIntLiteral,
129 /// @import("std").zig.c_translation.signedRemainder(lhs, rhs)
130 signed_remainder,
131 /// @divTrunc(lhs, rhs)
132 div_trunc,
133 /// @intFromBool(operand)
134 int_from_bool,
135 /// @as(lhs, rhs)
136 as,
137 /// @truncate(operand)
138 truncate,
139 /// @bitCast(operand)
140 bit_cast,
141 /// @floatCast(operand)
142 float_cast,
143 /// @intFromFloat(operand)
144 int_from_float,
145 /// @floatFromInt(operand)
146 float_from_int,
147 /// @ptrFromInt(operand)
148 ptr_from_int,
149 /// @intFromPtr(operand)
150 int_from_ptr,
151 /// @alignCast(operand)
152 align_cast,
153 /// @ptrCast(operand)
154 ptr_cast,
155 /// @divExact(lhs, rhs)
156 div_exact,
157 /// @offsetOf(lhs, rhs)
158 offset_of,
159 /// @splat(operand)
160 vector_zero_init,
161 /// @shuffle(type, a, b, mask)
162 shuffle,
163 /// @extern(ty, .{ .name = n })
164 builtin_extern,
165
166 /// @import("std").zig.c_translation.MacroArithmetic.<op>(lhs, rhs)
167 macro_arithmetic,
168
169 asm_simple,
170
171 negate,
172 negate_wrap,
173 bit_not,
174 not,
175 address_of,
176 /// .?
177 unwrap,
178 /// .*
179 deref,
180
181 block,
182 /// { operand }
183 block_single,
184
185 sizeof,
186 alignof,
187 typeof,
188 typeinfo,
189 type,
190
191 optional_type,
192 c_pointer,
193 single_pointer,
194 array_type,
195 null_sentinel_array_type,
196
197 /// @import("std").zig.c_translation.sizeof(operand)
198 helpers_sizeof,
199 /// @import("std").zig.c_translation.FlexibleArrayType(lhs, rhs)
200 helpers_flexible_array_type,
201 /// @import("std").zig.c_translation.shuffleVectorIndex(lhs, rhs)
202 helpers_shuffle_vector_index,
203 /// @import("std").zig.c_translation.Macro.<operand>
204 helpers_macro,
205 /// @Vector(lhs, rhs)
206 vector,
207 /// @import("std").mem.zeroes(operand)
208 std_mem_zeroes,
209 /// @import("std").mem.zeroInit(lhs, rhs)
210 std_mem_zeroinit,
211 // pub const name = @compileError(msg);
212 fail_decl,
213 // var actual = mangled;
214 arg_redecl,
215 /// pub const alias = actual;
216 alias,
217 /// const name = init;
218 var_simple,
219 /// pub const name = init;
220 pub_var_simple,
221 /// pub? const name (: type)? = value
222 enum_constant,
223
224 /// pub inline fn name(params) return_type body
225 pub_inline_fn,
226
227 /// [0]type{}
228 empty_array,
229 /// [1]type{val} ** count
230 array_filler,
231
232 pub const last_no_payload_tag = Tag.@"break";
233 pub const no_payload_count = @intFromEnum(last_no_payload_tag) + 1;
234
235 pub fn Type(comptime t: Tag) type {
236 return switch (t) {
237 .declaration,
238 .null_literal,
239 .undefined_literal,
240 .opaque_literal,
241 .true_literal,
242 .false_literal,
243 .empty_block,
244 .return_void,
245 .zero_literal,
246 .one_literal,
247 .void_type,
248 .noreturn_type,
249 .@"anytype",
250 .@"continue",
251 .@"break",
252 => @compileError("Type Tag " ++ @tagName(t) ++ " has no payload"),
253
254 .std_mem_zeroes,
255 .@"return",
256 .@"comptime",
257 .@"defer",
258 .asm_simple,
259 .negate,
260 .negate_wrap,
261 .bit_not,
262 .not,
263 .optional_type,
264 .address_of,
265 .unwrap,
266 .deref,
267 .int_from_ptr,
268 .empty_array,
269 .while_true,
270 .if_not_break,
271 .switch_else,
272 .block_single,
273 .helpers_sizeof,
274 .int_from_bool,
275 .sizeof,
276 .alignof,
277 .typeof,
278 .typeinfo,
279 .align_cast,
280 .truncate,
281 .bit_cast,
282 .float_cast,
283 .int_from_float,
284 .float_from_int,
285 .ptr_from_int,
286 .ptr_cast,
287 .int_cast,
288 .const_cast,
289 .volatile_cast,
290 .vector_zero_init,
291 => Payload.UnOp,
292
293 .add,
294 .add_assign,
295 .add_wrap,
296 .add_wrap_assign,
297 .sub,
298 .sub_assign,
299 .sub_wrap,
300 .sub_wrap_assign,
301 .mul,
302 .mul_assign,
303 .mul_wrap,
304 .mul_wrap_assign,
305 .div,
306 .div_assign,
307 .shl,
308 .shl_assign,
309 .shr,
310 .shr_assign,
311 .mod,
312 .mod_assign,
313 .@"and",
314 .@"or",
315 .less_than,
316 .less_than_equal,
317 .greater_than,
318 .greater_than_equal,
319 .equal,
320 .not_equal,
321 .bit_and,
322 .bit_and_assign,
323 .bit_or,
324 .bit_or_assign,
325 .bit_xor,
326 .bit_xor_assign,
327 .div_trunc,
328 .signed_remainder,
329 .as,
330 .array_cat,
331 .ellipsis3,
332 .assign,
333 .array_access,
334 .std_mem_zeroinit,
335 .helpers_flexible_array_type,
336 .helpers_shuffle_vector_index,
337 .vector,
338 .div_exact,
339 .offset_of,
340 .helpers_cast,
341 => Payload.BinOp,
342
343 .integer_literal,
344 .float_literal,
345 .string_literal,
346 .char_literal,
347 .enum_literal,
348 .identifier,
349 .fn_identifier,
350 .warning,
351 .type,
352 .helpers_macro,
353 .import_c_builtin,
354 => Payload.Value,
355 .discard => Payload.Discard,
356 .@"if" => Payload.If,
357 .@"while" => Payload.While,
358 .@"switch", .array_init, .switch_prong => Payload.Switch,
359 .break_val => Payload.BreakVal,
360 .call => Payload.Call,
361 .var_decl => Payload.VarDecl,
362 .func => Payload.Func,
363 .@"struct", .@"union" => Payload.Record,
364 .tuple => Payload.TupleInit,
365 .container_init => Payload.ContainerInit,
366 .container_init_dot => Payload.ContainerInitDot,
367 .helpers_promoteIntLiteral => Payload.PromoteIntLiteral,
368 .block => Payload.Block,
369 .c_pointer, .single_pointer => Payload.Pointer,
370 .array_type, .null_sentinel_array_type => Payload.Array,
371 .arg_redecl, .alias, .fail_decl => Payload.ArgRedecl,
372 .var_simple,
373 .pub_var_simple,
374 .static_local_var,
375 .extern_local_var,
376 .extern_local_fn,
377 .mut_str,
378 => Payload.SimpleVarDecl,
379 .enum_constant => Payload.EnumConstant,
380 .array_filler => Payload.ArrayFiller,
381 .pub_inline_fn => Payload.PubInlineFn,
382 .field_access => Payload.FieldAccess,
383 .string_slice => Payload.StringSlice,
384 .shuffle => Payload.Shuffle,
385 .builtin_extern => Payload.Extern,
386 .macro_arithmetic => Payload.MacroArithmetic,
387 };
388 }
389
390 pub fn init(comptime t: Tag) Node {
391 comptime std.debug.assert(@intFromEnum(t) < Tag.no_payload_count);
392 return .{ .tag_if_small_enough = @intFromEnum(t) };
393 }
394
395 pub fn create(comptime t: Tag, ally: Allocator, data: Data(t)) error{OutOfMemory}!Node {
396 const ptr = try ally.create(t.Type());
397 ptr.* = .{
398 .base = .{ .tag = t },
399 .data = data,
400 };
401 return Node{ .ptr_otherwise = &ptr.base };
402 }
403
404 pub fn Data(comptime t: Tag) type {
405 return @FieldType(t.Type(), "data");
406 }
407 };
408
409 pub fn tag(self: Node) Tag {
410 if (self.tag_if_small_enough < Tag.no_payload_count) {
411 return @as(Tag, @enumFromInt(@as(std.meta.Tag(Tag), @intCast(self.tag_if_small_enough))));
412 } else {
413 return self.ptr_otherwise.tag;
414 }
415 }
416
417 pub fn castTag(self: Node, comptime t: Tag) ?*t.Type() {
418 if (self.tag_if_small_enough < Tag.no_payload_count)
419 return null;
420
421 if (self.ptr_otherwise.tag == t)
422 return @alignCast(@fieldParentPtr("base", self.ptr_otherwise));
423
424 return null;
425 }
426
427 pub fn initPayload(payload: *Payload) Node {
428 std.debug.assert(@intFromEnum(payload.tag) >= Tag.no_payload_count);
429 return .{ .ptr_otherwise = payload };
430 }
431
432 pub fn isNoreturn(node: Node, break_counts: bool) bool {
433 switch (node.tag()) {
434 .block => {
435 const block_node = node.castTag(.block).?;
436 if (block_node.data.stmts.len == 0) return false;
437
438 const last = block_node.data.stmts[block_node.data.stmts.len - 1];
439 return last.isNoreturn(break_counts);
440 },
441 .@"switch" => {
442 const switch_node = node.castTag(.@"switch").?;
443
444 for (switch_node.data.cases) |case| {
445 const body = if (case.castTag(.switch_else)) |some|
446 some.data
447 else if (case.castTag(.switch_prong)) |some|
448 some.data.cond
449 else
450 unreachable;
451
452 if (!body.isNoreturn(break_counts)) return false;
453 }
454 return true;
455 },
456 .@"return", .return_void => return true,
457 .@"break" => if (break_counts) return true,
458 else => {},
459 }
460 return false;
461 }
462};
463
464pub const Payload = struct {
465 tag: Node.Tag,
466
467 pub const Value = struct {
468 base: Payload,
469 data: []const u8,
470 };
471
472 pub const UnOp = struct {
473 base: Payload,
474 data: Node,
475 };
476
477 pub const BinOp = struct {
478 base: Payload,
479 data: struct {
480 lhs: Node,
481 rhs: Node,
482 },
483 };
484
485 pub const Discard = struct {
486 base: Payload,
487 data: struct {
488 should_skip: bool,
489 value: Node,
490 },
491 };
492
493 pub const If = struct {
494 base: Payload,
495 data: struct {
496 cond: Node,
497 then: Node,
498 @"else": ?Node,
499 },
500 };
501
502 pub const While = struct {
503 base: Payload,
504 data: struct {
505 cond: Node,
506 body: Node,
507 cont_expr: ?Node,
508 },
509 };
510
511 pub const Switch = struct {
512 base: Payload,
513 data: struct {
514 cond: Node,
515 cases: []Node,
516 },
517 };
518
519 pub const BreakVal = struct {
520 base: Payload,
521 data: struct {
522 label: ?[]const u8,
523 val: Node,
524 },
525 };
526
527 pub const Call = struct {
528 base: Payload,
529 data: struct {
530 lhs: Node,
531 args: []Node,
532 },
533 };
534
535 pub const VarDecl = struct {
536 base: Payload,
537 data: struct {
538 is_pub: bool,
539 is_const: bool,
540 is_extern: bool,
541 is_export: bool,
542 is_threadlocal: bool,
543 alignment: ?c_uint,
544 linksection_string: ?[]const u8,
545 name: []const u8,
546 type: Node,
547 init: ?Node,
548 },
549 };
550
551 pub const Func = struct {
552 base: Payload,
553 data: struct {
554 is_pub: bool,
555 is_extern: bool,
556 is_export: bool,
557 is_inline: bool,
558 is_var_args: bool,
559 name: ?[]const u8,
560 linksection_string: ?[]const u8,
561 explicit_callconv: ?CallingConvention,
562 params: []Param,
563 return_type: Node,
564 body: ?Node,
565 alignment: ?c_uint,
566 },
567
568 pub const CallingConvention = enum {
569 c,
570 x86_64_sysv,
571 x86_64_win,
572 x86_stdcall,
573 x86_fastcall,
574 x86_thiscall,
575 x86_vectorcall,
576 aarch64_vfabi,
577 arm_aapcs,
578 arm_aapcs_vfp,
579 m68k_rtd,
580 };
581 };
582
583 pub const Param = struct {
584 is_noalias: bool,
585 name: ?[]const u8,
586 type: Node,
587 };
588
589 pub const Record = struct {
590 base: Payload,
591 data: struct {
592 layout: enum { @"packed", @"extern", none },
593 fields: []Field,
594 functions: []Node,
595 variables: []Node,
596 },
597
598 pub const Field = struct {
599 name: []const u8,
600 type: Node,
601 alignment: ?c_uint,
602 default_value: ?Node,
603 };
604 };
605
606 pub const TupleInit = struct {
607 base: Payload,
608 data: []Node,
609 };
610
611 pub const ContainerInit = struct {
612 base: Payload,
613 data: struct {
614 lhs: Node,
615 inits: []Initializer,
616 },
617
618 pub const Initializer = struct {
619 name: []const u8,
620 value: Node,
621 };
622 };
623
624 pub const ContainerInitDot = struct {
625 base: Payload,
626 data: []Initializer,
627
628 pub const Initializer = struct {
629 name: []const u8,
630 value: Node,
631 };
632 };
633
634 pub const Block = struct {
635 base: Payload,
636 data: struct {
637 label: ?[]const u8,
638 stmts: []Node,
639 },
640 };
641
642 pub const Array = struct {
643 base: Payload,
644 data: ArrayTypeInfo,
645
646 pub const ArrayTypeInfo = struct {
647 elem_type: Node,
648 len: usize,
649 };
650 };
651
652 pub const Pointer = struct {
653 base: Payload,
654 data: struct {
655 elem_type: Node,
656 is_const: bool,
657 is_volatile: bool,
658 },
659 };
660
661 pub const ArgRedecl = struct {
662 base: Payload,
663 data: struct {
664 actual: []const u8,
665 mangled: []const u8,
666 },
667 };
668
669 pub const SimpleVarDecl = struct {
670 base: Payload,
671 data: struct {
672 name: []const u8,
673 init: Node,
674 },
675 };
676
677 pub const EnumConstant = struct {
678 base: Payload,
679 data: struct {
680 name: []const u8,
681 is_public: bool,
682 type: ?Node,
683 value: Node,
684 },
685 };
686
687 pub const ArrayFiller = struct {
688 base: Payload,
689 data: struct {
690 type: Node,
691 filler: Node,
692 count: usize,
693 },
694 };
695
696 pub const PubInlineFn = struct {
697 base: Payload,
698 data: struct {
699 name: []const u8,
700 params: []Param,
701 return_type: Node,
702 body: Node,
703 },
704 };
705
706 pub const FieldAccess = struct {
707 base: Payload,
708 data: struct {
709 lhs: Node,
710 field_name: []const u8,
711 },
712 };
713
714 pub const PromoteIntLiteral = struct {
715 base: Payload,
716 data: struct {
717 value: Node,
718 type: Node,
719 base: Node,
720 },
721 };
722
723 pub const StringSlice = struct {
724 base: Payload,
725 data: struct {
726 string: Node,
727 end: usize,
728 },
729 };
730
731 pub const Shuffle = struct {
732 base: Payload,
733 data: struct {
734 element_type: Node,
735 a: Node,
736 b: Node,
737 mask_vector: Node,
738 },
739 };
740
741 pub const Extern = struct {
742 base: Payload,
743 data: struct {
744 type: Node,
745 name: Node,
746 },
747 };
748
749 pub const MacroArithmetic = struct {
750 base: Payload,
751 data: struct {
752 op: Operator,
753 lhs: Node,
754 rhs: Node,
755 },
756
757 pub const Operator = enum { div, rem };
758 };
759};
760
761/// Converts the nodes into a Zig Ast.
762/// Caller must free the source slice.
763pub fn render(gpa: Allocator, nodes: []const Node) !std.zig.Ast {
764 var ctx = Context{
765 .gpa = gpa,
766 .buf = std.array_list.Managed(u8).init(gpa),
767 };
768 defer ctx.buf.deinit();
769 defer ctx.nodes.deinit(gpa);
770 defer ctx.extra_data.deinit(gpa);
771 defer ctx.tokens.deinit(gpa);
772
773 // Estimate that each top level node has 10 child nodes.
774 const estimated_node_count = nodes.len * 10;
775 try ctx.nodes.ensureTotalCapacity(gpa, estimated_node_count);
776 // Estimate that each each node has 2 tokens.
777 const estimated_tokens_count = estimated_node_count * 2;
778 try ctx.tokens.ensureTotalCapacity(gpa, estimated_tokens_count);
779 // Estimate that each each token is 3 bytes long.
780 const estimated_buf_len = estimated_tokens_count * 3;
781 try ctx.buf.ensureTotalCapacity(estimated_buf_len);
782
783 ctx.nodes.appendAssumeCapacity(.{
784 .tag = .root,
785 .main_token = 0,
786 .data = undefined,
787 });
788
789 const root_members = blk: {
790 var result = std.array_list.Managed(NodeIndex).init(gpa);
791 defer result.deinit();
792
793 for (nodes) |node| {
794 const res = try renderNode(&ctx, node);
795 if (node.tag() == .warning) continue;
796 try result.append(res);
797 }
798 break :blk try ctx.listToSpan(result.items);
799 };
800
801 ctx.nodes.items(.data)[0] = .{ .extra_range = root_members };
802
803 try ctx.tokens.append(gpa, .{
804 .tag = .eof,
805 .start = @as(u32, @intCast(ctx.buf.items.len)),
806 });
807
808 return std.zig.Ast{
809 .source = try ctx.buf.toOwnedSliceSentinel(0),
810 .tokens = ctx.tokens.toOwnedSlice(),
811 .nodes = ctx.nodes.toOwnedSlice(),
812 .extra_data = try ctx.extra_data.toOwnedSlice(gpa),
813 .errors = &.{},
814 .mode = .zig,
815 };
816}
817
818const NodeIndex = std.zig.Ast.Node.Index;
819const NodeOptionalIndex = std.zig.Ast.Node.OptionalIndex;
820const NodeSubRange = std.zig.Ast.Node.SubRange;
821const TokenIndex = std.zig.Ast.TokenIndex;
822const TokenOptionalIndex = std.zig.Ast.OptionalTokenIndex;
823const TokenTag = std.zig.Token.Tag;
824const ExtraIndex = std.zig.Ast.ExtraIndex;
825
826const Context = struct {
827 gpa: Allocator,
828 buf: std.array_list.Managed(u8),
829 nodes: std.zig.Ast.NodeList = .{},
830 extra_data: std.ArrayListUnmanaged(u32) = .empty,
831 tokens: std.zig.Ast.TokenList = .{},
832
833 fn addTokenFmt(c: *Context, tag: TokenTag, comptime format: []const u8, args: anytype) Allocator.Error!TokenIndex {
834 const start_index = c.buf.items.len;
835 try c.buf.print(format ++ " ", args);
836
837 try c.tokens.append(c.gpa, .{
838 .tag = tag,
839 .start = @as(u32, @intCast(start_index)),
840 });
841
842 return @intCast(c.tokens.len - 1);
843 }
844
845 fn addToken(c: *Context, tag: TokenTag, bytes: []const u8) Allocator.Error!TokenIndex {
846 return c.addTokenFmt(tag, "{s}", .{bytes});
847 }
848
849 fn addIdentifier(c: *Context, bytes: []const u8) Allocator.Error!TokenIndex {
850 if (std.zig.primitives.isPrimitive(bytes))
851 return c.addTokenFmt(.identifier, "@\"{s}\"", .{bytes});
852 return c.addTokenFmt(.identifier, "{f}", .{std.zig.fmtIdFlags(bytes, .{ .allow_primitive = true })});
853 }
854
855 fn listToSpan(c: *Context, list: []const NodeIndex) Allocator.Error!NodeSubRange {
856 try c.extra_data.appendSlice(c.gpa, @ptrCast(list));
857 return NodeSubRange{
858 .start = @enumFromInt(c.extra_data.items.len - list.len),
859 .end = @enumFromInt(c.extra_data.items.len),
860 };
861 }
862
863 fn addNode(c: *Context, elem: std.zig.Ast.Node) Allocator.Error!NodeIndex {
864 const result: NodeIndex = @enumFromInt(c.nodes.len);
865 try c.nodes.append(c.gpa, elem);
866 return result;
867 }
868
869 fn addExtra(c: *Context, extra: anytype) Allocator.Error!std.zig.Ast.ExtraIndex {
870 const fields = std.meta.fields(@TypeOf(extra));
871 try c.extra_data.ensureUnusedCapacity(c.gpa, fields.len);
872 const result: ExtraIndex = @enumFromInt(c.extra_data.items.len);
873 inline for (fields) |field| {
874 switch (field.type) {
875 NodeIndex,
876 NodeOptionalIndex,
877 TokenIndex,
878 TokenOptionalIndex,
879 ExtraIndex,
880 => c.extra_data.appendAssumeCapacity(@intFromEnum(@field(extra, field.name))),
881 else => @compileError("unexpected field type"),
882 }
883 }
884 return result;
885 }
886};
887
888fn renderNodes(c: *Context, nodes: []const Node) Allocator.Error!NodeSubRange {
889 var result = std.array_list.Managed(NodeIndex).init(c.gpa);
890 defer result.deinit();
891
892 for (nodes) |node| {
893 const res = try renderNode(c, node);
894 if (node.tag() == .warning) continue;
895 try result.append(res);
896 }
897
898 return try c.listToSpan(result.items);
899}
900
901fn renderNode(c: *Context, node: Node) Allocator.Error!NodeIndex {
902 switch (node.tag()) {
903 .declaration => unreachable,
904 .warning => {
905 const payload = node.castTag(.warning).?.data;
906 try c.buf.append('\n');
907 try c.buf.appendSlice(payload);
908 try c.buf.append('\n');
909 return @enumFromInt(0);
910 },
911 .helpers_cast => {
912 const payload = node.castTag(.helpers_cast).?.data;
913 const import_node = try renderStdImport(c, &.{ "zig", "c_translation", "cast" });
914 return renderCall(c, import_node, &.{ payload.lhs, payload.rhs });
915 },
916 .helpers_promoteIntLiteral => {
917 const payload = node.castTag(.helpers_promoteIntLiteral).?.data;
918 const import_node = try renderStdImport(c, &.{ "zig", "c_translation", "promoteIntLiteral" });
919 return renderCall(c, import_node, &.{ payload.type, payload.value, payload.base });
920 },
921 .helpers_sizeof => {
922 const payload = node.castTag(.helpers_sizeof).?.data;
923 const import_node = try renderStdImport(c, &.{ "zig", "c_translation", "sizeof" });
924 return renderCall(c, import_node, &.{payload});
925 },
926 .std_mem_zeroes => {
927 const payload = node.castTag(.std_mem_zeroes).?.data;
928 const import_node = try renderStdImport(c, &.{ "mem", "zeroes" });
929 return renderCall(c, import_node, &.{payload});
930 },
931 .std_mem_zeroinit => {
932 const payload = node.castTag(.std_mem_zeroinit).?.data;
933 const import_node = try renderStdImport(c, &.{ "mem", "zeroInit" });
934 return renderCall(c, import_node, &.{ payload.lhs, payload.rhs });
935 },
936 .helpers_flexible_array_type => {
937 const payload = node.castTag(.helpers_flexible_array_type).?.data;
938 const import_node = try renderStdImport(c, &.{ "zig", "c_translation", "FlexibleArrayType" });
939 return renderCall(c, import_node, &.{ payload.lhs, payload.rhs });
940 },
941 .helpers_shuffle_vector_index => {
942 const payload = node.castTag(.helpers_shuffle_vector_index).?.data;
943 const import_node = try renderStdImport(c, &.{ "zig", "c_translation", "shuffleVectorIndex" });
944 return renderCall(c, import_node, &.{ payload.lhs, payload.rhs });
945 },
946 .vector => {
947 const payload = node.castTag(.vector).?.data;
948 return renderBuiltinCall(c, "@Vector", &.{ payload.lhs, payload.rhs });
949 },
950 .call => {
951 const payload = node.castTag(.call).?.data;
952 // Cosmetic: avoids an unnecesary address_of on most function calls.
953 const lhs = if (payload.lhs.tag() == .fn_identifier)
954 try c.addNode(.{
955 .tag = .identifier,
956 .main_token = try c.addIdentifier(payload.lhs.castTag(.fn_identifier).?.data),
957 .data = undefined,
958 })
959 else
960 try renderNodeGrouped(c, payload.lhs);
961 return renderCall(c, lhs, payload.args);
962 },
963 .null_literal => return c.addNode(.{
964 .tag = .identifier,
965 .main_token = try c.addToken(.identifier, "null"),
966 .data = undefined,
967 }),
968 .undefined_literal => return c.addNode(.{
969 .tag = .identifier,
970 .main_token = try c.addToken(.identifier, "undefined"),
971 .data = undefined,
972 }),
973 .true_literal => return c.addNode(.{
974 .tag = .identifier,
975 .main_token = try c.addToken(.identifier, "true"),
976 .data = undefined,
977 }),
978 .false_literal => return c.addNode(.{
979 .tag = .identifier,
980 .main_token = try c.addToken(.identifier, "false"),
981 .data = undefined,
982 }),
983 .zero_literal => return c.addNode(.{
984 .tag = .number_literal,
985 .main_token = try c.addToken(.number_literal, "0"),
986 .data = undefined,
987 }),
988 .one_literal => return c.addNode(.{
989 .tag = .number_literal,
990 .main_token = try c.addToken(.number_literal, "1"),
991 .data = undefined,
992 }),
993 .void_type => return c.addNode(.{
994 .tag = .identifier,
995 .main_token = try c.addToken(.identifier, "void"),
996 .data = undefined,
997 }),
998 .noreturn_type => return c.addNode(.{
999 .tag = .identifier,
1000 .main_token = try c.addToken(.identifier, "noreturn"),
1001 .data = undefined,
1002 }),
1003 .@"continue" => return c.addNode(.{
1004 .tag = .@"continue",
1005 .main_token = try c.addToken(.keyword_continue, "continue"),
1006 .data = .{ .opt_token_and_opt_node = .{ .none, .none } },
1007 }),
1008 .return_void => return c.addNode(.{
1009 .tag = .@"return",
1010 .main_token = try c.addToken(.keyword_return, "return"),
1011 .data = .{ .opt_node = .none },
1012 }),
1013 .@"break" => return c.addNode(.{
1014 .tag = .@"break",
1015 .main_token = try c.addToken(.keyword_break, "break"),
1016 .data = .{ .opt_token_and_opt_node = .{ .none, .none } },
1017 }),
1018 .break_val => {
1019 const payload = node.castTag(.break_val).?.data;
1020 const tok = try c.addToken(.keyword_break, "break");
1021 const break_label = if (payload.label) |some| blk: {
1022 _ = try c.addToken(.colon, ":");
1023 break :blk try c.addIdentifier(some);
1024 } else null;
1025 return c.addNode(.{
1026 .tag = .@"break",
1027 .main_token = tok,
1028 .data = .{ .opt_token_and_opt_node = .{
1029 .fromOptional(break_label),
1030 (try renderNode(c, payload.val)).toOptional(),
1031 } },
1032 });
1033 },
1034 .@"return" => {
1035 const payload = node.castTag(.@"return").?.data;
1036 return c.addNode(.{
1037 .tag = .@"return",
1038 .main_token = try c.addToken(.keyword_return, "return"),
1039 .data = .{ .opt_node = (try renderNode(c, payload)).toOptional() },
1040 });
1041 },
1042 .@"comptime" => {
1043 const payload = node.castTag(.@"comptime").?.data;
1044 return c.addNode(.{
1045 .tag = .@"comptime",
1046 .main_token = try c.addToken(.keyword_comptime, "comptime"),
1047 .data = .{ .node = try renderNode(c, payload) },
1048 });
1049 },
1050 .@"defer" => {
1051 const payload = node.castTag(.@"defer").?.data;
1052 return c.addNode(.{
1053 .tag = .@"defer",
1054 .main_token = try c.addToken(.keyword_defer, "defer"),
1055 .data = .{ .node = try renderNode(c, payload) },
1056 });
1057 },
1058 .asm_simple => {
1059 const payload = node.castTag(.asm_simple).?.data;
1060 const asm_token = try c.addToken(.keyword_asm, "asm");
1061 _ = try c.addToken(.l_paren, "(");
1062 return c.addNode(.{
1063 .tag = .asm_simple,
1064 .main_token = asm_token,
1065 .data = .{ .node_and_token = .{
1066 try renderNode(c, payload),
1067 try c.addToken(.r_paren, ")"),
1068 } },
1069 });
1070 },
1071 .type => {
1072 const payload = node.castTag(.type).?.data;
1073 return c.addNode(.{
1074 .tag = .identifier,
1075 .main_token = try c.addToken(.identifier, payload),
1076 .data = undefined,
1077 });
1078 },
1079 .identifier => {
1080 const payload = node.castTag(.identifier).?.data;
1081 return c.addNode(.{
1082 .tag = .identifier,
1083 .main_token = try c.addIdentifier(payload),
1084 .data = undefined,
1085 });
1086 },
1087 .fn_identifier => {
1088 // C semantics are that a function identifier has address
1089 // value (implicit in stage1, explicit in stage2), except in
1090 // the context of an address_of, which is handled there.
1091 const payload = node.castTag(.fn_identifier).?.data;
1092 const tok = try c.addToken(.ampersand, "&");
1093 const arg = try c.addNode(.{
1094 .tag = .identifier,
1095 .main_token = try c.addIdentifier(payload),
1096 .data = undefined,
1097 });
1098 return c.addNode(.{
1099 .tag = .address_of,
1100 .main_token = tok,
1101 .data = .{ .node = arg },
1102 });
1103 },
1104 .float_literal => {
1105 const payload = node.castTag(.float_literal).?.data;
1106 return c.addNode(.{
1107 .tag = .number_literal,
1108 .main_token = try c.addToken(.number_literal, payload),
1109 .data = undefined,
1110 });
1111 },
1112 .integer_literal => {
1113 const payload = node.castTag(.integer_literal).?.data;
1114 return c.addNode(.{
1115 .tag = .number_literal,
1116 .main_token = try c.addToken(.number_literal, payload),
1117 .data = undefined,
1118 });
1119 },
1120 .string_literal => {
1121 const payload = node.castTag(.string_literal).?.data;
1122 return c.addNode(.{
1123 .tag = .string_literal,
1124 .main_token = try c.addToken(.string_literal, payload),
1125 .data = undefined,
1126 });
1127 },
1128 .char_literal => {
1129 const payload = node.castTag(.char_literal).?.data;
1130 return c.addNode(.{
1131 .tag = .char_literal,
1132 .main_token = try c.addToken(.char_literal, payload),
1133 .data = undefined,
1134 });
1135 },
1136 .enum_literal => {
1137 const payload = node.castTag(.enum_literal).?.data;
1138 _ = try c.addToken(.period, ".");
1139 return c.addNode(.{
1140 .tag = .enum_literal,
1141 .main_token = try c.addToken(.identifier, payload),
1142 .data = undefined,
1143 });
1144 },
1145 .helpers_macro => {
1146 const payload = node.castTag(.helpers_macro).?.data;
1147 const chain = [_][]const u8{
1148 "zig",
1149 "c_translation",
1150 "Macros",
1151 payload,
1152 };
1153 return renderStdImport(c, &chain);
1154 },
1155 .import_c_builtin => {
1156 const payload = node.castTag(.import_c_builtin).?.data;
1157 const chain = [_][]const u8{
1158 "zig",
1159 "c_builtins",
1160 payload,
1161 };
1162 return renderStdImport(c, &chain);
1163 },
1164 .string_slice => {
1165 const payload = node.castTag(.string_slice).?.data;
1166
1167 const string = try renderNode(c, payload.string);
1168 const l_bracket = try c.addToken(.l_bracket, "[");
1169 const start = try c.addNode(.{
1170 .tag = .number_literal,
1171 .main_token = try c.addToken(.number_literal, "0"),
1172 .data = undefined,
1173 });
1174 _ = try c.addToken(.ellipsis2, "..");
1175 const end = try c.addNode(.{
1176 .tag = .number_literal,
1177 .main_token = try c.addTokenFmt(.number_literal, "{d}", .{payload.end}),
1178 .data = undefined,
1179 });
1180 _ = try c.addToken(.r_bracket, "]");
1181
1182 return c.addNode(.{
1183 .tag = .slice,
1184 .main_token = l_bracket,
1185 .data = .{ .node_and_extra = .{
1186 string,
1187 try c.addExtra(std.zig.Ast.Node.Slice{
1188 .start = start,
1189 .end = end,
1190 }),
1191 } },
1192 });
1193 },
1194 .fail_decl => {
1195 const payload = node.castTag(.fail_decl).?.data;
1196 // pub const name = @compileError(msg);
1197 _ = try c.addToken(.keyword_pub, "pub");
1198 const const_tok = try c.addToken(.keyword_const, "const");
1199 _ = try c.addIdentifier(payload.actual);
1200 _ = try c.addToken(.equal, "=");
1201
1202 const compile_error_tok = try c.addToken(.builtin, "@compileError");
1203 _ = try c.addToken(.l_paren, "(");
1204 const err_msg_tok = try c.addTokenFmt(.string_literal, "\"{f}\"", .{std.zig.fmtString(payload.mangled)});
1205 const err_msg = try c.addNode(.{
1206 .tag = .string_literal,
1207 .main_token = err_msg_tok,
1208 .data = undefined,
1209 });
1210 _ = try c.addToken(.r_paren, ")");
1211 const compile_error = try c.addNode(.{
1212 .tag = .builtin_call_two,
1213 .main_token = compile_error_tok,
1214 .data = .{ .opt_node_and_opt_node = .{ err_msg.toOptional(), .none } },
1215 });
1216 _ = try c.addToken(.semicolon, ";");
1217
1218 return c.addNode(.{
1219 .tag = .simple_var_decl,
1220 .main_token = const_tok,
1221 .data = .{ .opt_node_and_opt_node = .{
1222 .none,
1223 compile_error.toOptional(),
1224 } },
1225 });
1226 },
1227 .pub_var_simple, .var_simple => {
1228 const payload = @as(*Payload.SimpleVarDecl, @alignCast(@fieldParentPtr("base", node.ptr_otherwise))).data;
1229 if (node.tag() == .pub_var_simple) _ = try c.addToken(.keyword_pub, "pub");
1230 const const_tok = try c.addToken(.keyword_const, "const");
1231 _ = try c.addIdentifier(payload.name);
1232 _ = try c.addToken(.equal, "=");
1233
1234 const init = try renderNode(c, payload.init);
1235 _ = try c.addToken(.semicolon, ";");
1236
1237 return c.addNode(.{
1238 .tag = .simple_var_decl,
1239 .main_token = const_tok,
1240 .data = .{ .opt_node_and_opt_node = .{
1241 .none,
1242 init.toOptional(),
1243 } },
1244 });
1245 },
1246 .static_local_var => {
1247 const payload = node.castTag(.static_local_var).?.data;
1248
1249 const const_tok = try c.addToken(.keyword_const, "const");
1250 _ = try c.addIdentifier(payload.name);
1251 _ = try c.addToken(.equal, "=");
1252
1253 const kind_tok = try c.addToken(.keyword_struct, "struct");
1254 _ = try c.addToken(.l_brace, "{");
1255
1256 const container_def = try c.addNode(.{
1257 .tag = .container_decl_two_trailing,
1258 .main_token = kind_tok,
1259 .data = .{ .opt_node_and_opt_node = .{
1260 (try renderNode(c, payload.init)).toOptional(),
1261 .none,
1262 } },
1263 });
1264 _ = try c.addToken(.r_brace, "}");
1265 _ = try c.addToken(.semicolon, ";");
1266
1267 return c.addNode(.{
1268 .tag = .simple_var_decl,
1269 .main_token = const_tok,
1270 .data = .{ .opt_node_and_opt_node = .{
1271 .none,
1272 container_def.toOptional(),
1273 } },
1274 });
1275 },
1276 .extern_local_var, .extern_local_fn => {
1277 const payload = if (node.tag() == .extern_local_var)
1278 node.castTag(.extern_local_var).?.data
1279 else
1280 node.castTag(.extern_local_fn).?.data;
1281
1282 const const_tok = try c.addToken(.keyword_const, "const");
1283 _ = try c.addIdentifier(payload.name);
1284 _ = try c.addToken(.equal, "=");
1285
1286 const kind_tok = try c.addToken(.keyword_struct, "struct");
1287 _ = try c.addToken(.l_brace, "{");
1288
1289 const container_def = try c.addNode(.{
1290 .tag = .container_decl_two_trailing,
1291 .main_token = kind_tok,
1292 .data = .{ .opt_node_and_opt_node = .{
1293 (try renderNode(c, payload.init)).toOptional(),
1294 .none,
1295 } },
1296 });
1297 _ = try c.addToken(.r_brace, "}");
1298 _ = try c.addToken(.semicolon, ";");
1299
1300 return c.addNode(.{
1301 .tag = .simple_var_decl,
1302 .main_token = const_tok,
1303 .data = .{ .opt_node_and_opt_node = .{
1304 .none,
1305 container_def.toOptional(),
1306 } },
1307 });
1308 },
1309 .mut_str => {
1310 const payload = node.castTag(.mut_str).?.data;
1311
1312 const var_tok = try c.addToken(.keyword_var, "var");
1313 _ = try c.addIdentifier(payload.name);
1314 _ = try c.addToken(.equal, "=");
1315
1316 const deref = try c.addNode(.{
1317 .tag = .deref,
1318 .data = .{ .node = try renderNodeGrouped(c, payload.init) },
1319 .main_token = try c.addToken(.period_asterisk, ".*"),
1320 });
1321 _ = try c.addToken(.semicolon, ";");
1322
1323 return c.addNode(.{
1324 .tag = .simple_var_decl,
1325 .main_token = var_tok,
1326 .data = .{ .opt_node_and_opt_node = .{
1327 .none,
1328 deref.toOptional(),
1329 } },
1330 });
1331 },
1332 .var_decl => return renderVar(c, node),
1333 .arg_redecl, .alias => {
1334 const payload = @as(*Payload.ArgRedecl, @alignCast(@fieldParentPtr("base", node.ptr_otherwise))).data;
1335 if (node.tag() == .alias) _ = try c.addToken(.keyword_pub, "pub");
1336 const mut_tok = if (node.tag() == .alias)
1337 try c.addToken(.keyword_const, "const")
1338 else
1339 try c.addToken(.keyword_var, "var");
1340 _ = try c.addIdentifier(payload.actual);
1341 _ = try c.addToken(.equal, "=");
1342
1343 const init = try c.addNode(.{
1344 .tag = .identifier,
1345 .main_token = try c.addIdentifier(payload.mangled),
1346 .data = undefined,
1347 });
1348 _ = try c.addToken(.semicolon, ";");
1349
1350 return c.addNode(.{
1351 .tag = .simple_var_decl,
1352 .main_token = mut_tok,
1353 .data = .{ .opt_node_and_opt_node = .{
1354 .none,
1355 init.toOptional(),
1356 } },
1357 });
1358 },
1359 .int_cast => {
1360 const payload = node.castTag(.int_cast).?.data;
1361 return renderBuiltinCall(c, "@intCast", &.{payload});
1362 },
1363 .const_cast => {
1364 const payload = node.castTag(.const_cast).?.data;
1365 return renderBuiltinCall(c, "@constCast", &.{payload});
1366 },
1367 .volatile_cast => {
1368 const payload = node.castTag(.volatile_cast).?.data;
1369 return renderBuiltinCall(c, "@volatileCast", &.{payload});
1370 },
1371 .signed_remainder => {
1372 const payload = node.castTag(.signed_remainder).?.data;
1373 const import_node = try renderStdImport(c, &.{ "zig", "c_translation", "signedRemainder" });
1374 return renderCall(c, import_node, &.{ payload.lhs, payload.rhs });
1375 },
1376 .div_trunc => {
1377 const payload = node.castTag(.div_trunc).?.data;
1378 return renderBuiltinCall(c, "@divTrunc", &.{ payload.lhs, payload.rhs });
1379 },
1380 .int_from_bool => {
1381 const payload = node.castTag(.int_from_bool).?.data;
1382 return renderBuiltinCall(c, "@intFromBool", &.{payload});
1383 },
1384 .as => {
1385 const payload = node.castTag(.as).?.data;
1386 return renderBuiltinCall(c, "@as", &.{ payload.lhs, payload.rhs });
1387 },
1388 .truncate => {
1389 const payload = node.castTag(.truncate).?.data;
1390 return renderBuiltinCall(c, "@truncate", &.{payload});
1391 },
1392 .bit_cast => {
1393 const payload = node.castTag(.bit_cast).?.data;
1394 return renderBuiltinCall(c, "@bitCast", &.{payload});
1395 },
1396 .float_cast => {
1397 const payload = node.castTag(.float_cast).?.data;
1398 return renderBuiltinCall(c, "@floatCast", &.{payload});
1399 },
1400 .int_from_float => {
1401 const payload = node.castTag(.int_from_float).?.data;
1402 return renderBuiltinCall(c, "@intFromFloat", &.{payload});
1403 },
1404 .float_from_int => {
1405 const payload = node.castTag(.float_from_int).?.data;
1406 return renderBuiltinCall(c, "@floatFromInt", &.{payload});
1407 },
1408 .ptr_from_int => {
1409 const payload = node.castTag(.ptr_from_int).?.data;
1410 return renderBuiltinCall(c, "@ptrFromInt", &.{payload});
1411 },
1412 .int_from_ptr => {
1413 const payload = node.castTag(.int_from_ptr).?.data;
1414 return renderBuiltinCall(c, "@intFromPtr", &.{payload});
1415 },
1416 .align_cast => {
1417 const payload = node.castTag(.align_cast).?.data;
1418 return renderBuiltinCall(c, "@alignCast", &.{payload});
1419 },
1420 .ptr_cast => {
1421 const payload = node.castTag(.ptr_cast).?.data;
1422 return renderBuiltinCall(c, "@ptrCast", &.{payload});
1423 },
1424 .div_exact => {
1425 const payload = node.castTag(.div_exact).?.data;
1426 return renderBuiltinCall(c, "@divExact", &.{ payload.lhs, payload.rhs });
1427 },
1428 .offset_of => {
1429 const payload = node.castTag(.offset_of).?.data;
1430 return renderBuiltinCall(c, "@offsetOf", &.{ payload.lhs, payload.rhs });
1431 },
1432 .sizeof => {
1433 const payload = node.castTag(.sizeof).?.data;
1434 return renderBuiltinCall(c, "@sizeOf", &.{payload});
1435 },
1436 .shuffle => {
1437 const payload = node.castTag(.shuffle).?.data;
1438 return renderBuiltinCall(c, "@shuffle", &.{
1439 payload.element_type,
1440 payload.a,
1441 payload.b,
1442 payload.mask_vector,
1443 });
1444 },
1445 .builtin_extern => {
1446 const payload = node.castTag(.builtin_extern).?.data;
1447
1448 var info_inits: [1]Payload.ContainerInitDot.Initializer = .{
1449 .{ .name = "name", .value = payload.name },
1450 };
1451 var info_payload: Payload.ContainerInitDot = .{
1452 .base = .{ .tag = .container_init_dot },
1453 .data = &info_inits,
1454 };
1455
1456 return renderBuiltinCall(c, "@extern", &.{
1457 payload.type,
1458 .{ .ptr_otherwise = &info_payload.base },
1459 });
1460 },
1461 .macro_arithmetic => {
1462 const payload = node.castTag(.macro_arithmetic).?.data;
1463 const op = @tagName(payload.op);
1464 const import_node = try renderStdImport(c, &.{ "zig", "c_translation", "MacroArithmetic", op });
1465 return renderCall(c, import_node, &.{ payload.lhs, payload.rhs });
1466 },
1467 .alignof => {
1468 const payload = node.castTag(.alignof).?.data;
1469 return renderBuiltinCall(c, "@alignOf", &.{payload});
1470 },
1471 .typeof => {
1472 const payload = node.castTag(.typeof).?.data;
1473 return renderBuiltinCall(c, "@TypeOf", &.{payload});
1474 },
1475 .typeinfo => {
1476 const payload = node.castTag(.typeinfo).?.data;
1477 return renderBuiltinCall(c, "@typeInfo", &.{payload});
1478 },
1479 .negate => return renderPrefixOp(c, node, .negation, .minus, "-"),
1480 .negate_wrap => return renderPrefixOp(c, node, .negation_wrap, .minus_percent, "-%"),
1481 .bit_not => return renderPrefixOp(c, node, .bit_not, .tilde, "~"),
1482 .not => return renderPrefixOp(c, node, .bool_not, .bang, "!"),
1483 .optional_type => return renderPrefixOp(c, node, .optional_type, .question_mark, "?"),
1484 .address_of => {
1485 const payload = node.castTag(.address_of).?.data;
1486
1487 const ampersand = try c.addToken(.ampersand, "&");
1488 const base = if (payload.tag() == .fn_identifier)
1489 try c.addNode(.{
1490 .tag = .identifier,
1491 .main_token = try c.addIdentifier(payload.castTag(.fn_identifier).?.data),
1492 .data = undefined,
1493 })
1494 else
1495 try renderNodeGrouped(c, payload);
1496 return c.addNode(.{
1497 .tag = .address_of,
1498 .main_token = ampersand,
1499 .data = .{ .node = base },
1500 });
1501 },
1502 .deref => {
1503 const payload = node.castTag(.deref).?.data;
1504 const operand = try renderNodeGrouped(c, payload);
1505 const deref_tok = try c.addToken(.period_asterisk, ".*");
1506 return c.addNode(.{
1507 .tag = .deref,
1508 .main_token = deref_tok,
1509 .data = .{ .node = operand },
1510 });
1511 },
1512 .unwrap => {
1513 const payload = node.castTag(.unwrap).?.data;
1514 const operand = try renderNodeGrouped(c, payload);
1515 const period = try c.addToken(.period, ".");
1516 const question_mark = try c.addToken(.question_mark, "?");
1517 return c.addNode(.{
1518 .tag = .unwrap_optional,
1519 .main_token = period,
1520 .data = .{ .node_and_token = .{
1521 operand,
1522 question_mark,
1523 } },
1524 });
1525 },
1526 .c_pointer, .single_pointer => {
1527 const payload = @as(*Payload.Pointer, @alignCast(@fieldParentPtr("base", node.ptr_otherwise))).data;
1528
1529 const main_token = if (node.tag() == .single_pointer)
1530 try c.addToken(.asterisk, "*")
1531 else blk: {
1532 const res = try c.addToken(.l_bracket, "[");
1533 _ = try c.addToken(.asterisk, "*");
1534 _ = try c.addIdentifier("c");
1535 _ = try c.addToken(.r_bracket, "]");
1536 break :blk res;
1537 };
1538 if (payload.is_const) _ = try c.addToken(.keyword_const, "const");
1539 if (payload.is_volatile) _ = try c.addToken(.keyword_volatile, "volatile");
1540 const elem_type = try renderNodeGrouped(c, payload.elem_type);
1541
1542 return c.addNode(.{
1543 .tag = .ptr_type_aligned,
1544 .main_token = main_token,
1545 .data = .{ .opt_node_and_node = .{
1546 .none,
1547 elem_type,
1548 } },
1549 });
1550 },
1551 .add => return renderBinOpGrouped(c, node, .add, .plus, "+"),
1552 .add_assign => return renderBinOp(c, node, .assign_add, .plus_equal, "+="),
1553 .add_wrap => return renderBinOpGrouped(c, node, .add_wrap, .plus_percent, "+%"),
1554 .add_wrap_assign => return renderBinOp(c, node, .assign_add_wrap, .plus_percent_equal, "+%="),
1555 .sub => return renderBinOpGrouped(c, node, .sub, .minus, "-"),
1556 .sub_assign => return renderBinOp(c, node, .assign_sub, .minus_equal, "-="),
1557 .sub_wrap => return renderBinOpGrouped(c, node, .sub_wrap, .minus_percent, "-%"),
1558 .sub_wrap_assign => return renderBinOp(c, node, .assign_sub_wrap, .minus_percent_equal, "-%="),
1559 .mul => return renderBinOpGrouped(c, node, .mul, .asterisk, "*"),
1560 .mul_assign => return renderBinOp(c, node, .assign_mul, .asterisk_equal, "*="),
1561 .mul_wrap => return renderBinOpGrouped(c, node, .mul_wrap, .asterisk_percent, "*%"),
1562 .mul_wrap_assign => return renderBinOp(c, node, .assign_mul_wrap, .asterisk_percent_equal, "*%="),
1563 .div => return renderBinOpGrouped(c, node, .div, .slash, "/"),
1564 .div_assign => return renderBinOp(c, node, .assign_div, .slash_equal, "/="),
1565 .shl => return renderBinOpGrouped(c, node, .shl, .angle_bracket_angle_bracket_left, "<<"),
1566 .shl_assign => return renderBinOp(c, node, .assign_shl, .angle_bracket_angle_bracket_left_equal, "<<="),
1567 .shr => return renderBinOpGrouped(c, node, .shr, .angle_bracket_angle_bracket_right, ">>"),
1568 .shr_assign => return renderBinOp(c, node, .assign_shr, .angle_bracket_angle_bracket_right_equal, ">>="),
1569 .mod => return renderBinOpGrouped(c, node, .mod, .percent, "%"),
1570 .mod_assign => return renderBinOp(c, node, .assign_mod, .percent_equal, "%="),
1571 .@"and" => return renderBinOpGrouped(c, node, .bool_and, .keyword_and, "and"),
1572 .@"or" => return renderBinOpGrouped(c, node, .bool_or, .keyword_or, "or"),
1573 .less_than => return renderBinOpGrouped(c, node, .less_than, .angle_bracket_left, "<"),
1574 .less_than_equal => return renderBinOpGrouped(c, node, .less_or_equal, .angle_bracket_left_equal, "<="),
1575 .greater_than => return renderBinOpGrouped(c, node, .greater_than, .angle_bracket_right, ">="),
1576 .greater_than_equal => return renderBinOpGrouped(c, node, .greater_or_equal, .angle_bracket_right_equal, ">="),
1577 .equal => return renderBinOpGrouped(c, node, .equal_equal, .equal_equal, "=="),
1578 .not_equal => return renderBinOpGrouped(c, node, .bang_equal, .bang_equal, "!="),
1579 .bit_and => return renderBinOpGrouped(c, node, .bit_and, .ampersand, "&"),
1580 .bit_and_assign => return renderBinOp(c, node, .assign_bit_and, .ampersand_equal, "&="),
1581 .bit_or => return renderBinOpGrouped(c, node, .bit_or, .pipe, "|"),
1582 .bit_or_assign => return renderBinOp(c, node, .assign_bit_or, .pipe_equal, "|="),
1583 .bit_xor => return renderBinOpGrouped(c, node, .bit_xor, .caret, "^"),
1584 .bit_xor_assign => return renderBinOp(c, node, .assign_bit_xor, .caret_equal, "^="),
1585 .array_cat => return renderBinOp(c, node, .array_cat, .plus_plus, "++"),
1586 .ellipsis3 => return renderBinOpGrouped(c, node, .switch_range, .ellipsis3, "..."),
1587 .assign => return renderBinOp(c, node, .assign, .equal, "="),
1588 .empty_block => {
1589 const l_brace = try c.addToken(.l_brace, "{");
1590 _ = try c.addToken(.r_brace, "}");
1591 return c.addNode(.{
1592 .tag = .block_two,
1593 .main_token = l_brace,
1594 .data = .{ .opt_node_and_opt_node = .{
1595 .none,
1596 .none,
1597 } },
1598 });
1599 },
1600 .block_single => {
1601 const payload = node.castTag(.block_single).?.data;
1602 const l_brace = try c.addToken(.l_brace, "{");
1603
1604 const stmt = try renderNode(c, payload);
1605 try addSemicolonIfNeeded(c, payload);
1606
1607 _ = try c.addToken(.r_brace, "}");
1608 return c.addNode(.{
1609 .tag = .block_two_semicolon,
1610 .main_token = l_brace,
1611 .data = .{ .opt_node_and_opt_node = .{
1612 stmt.toOptional(),
1613 .none,
1614 } },
1615 });
1616 },
1617 .block => {
1618 const payload = node.castTag(.block).?.data;
1619 if (payload.label) |some| {
1620 _ = try c.addIdentifier(some);
1621 _ = try c.addToken(.colon, ":");
1622 }
1623 const l_brace = try c.addToken(.l_brace, "{");
1624
1625 var stmts = std.array_list.Managed(NodeIndex).init(c.gpa);
1626 defer stmts.deinit();
1627 for (payload.stmts) |stmt| {
1628 const res = try renderNode(c, stmt);
1629 if (@intFromEnum(res) == 0) continue;
1630 try addSemicolonIfNeeded(c, stmt);
1631 try stmts.append(res);
1632 }
1633 const span = try c.listToSpan(stmts.items);
1634 _ = try c.addToken(.r_brace, "}");
1635
1636 const semicolon = c.tokens.items(.tag)[c.tokens.len - 2] == .semicolon;
1637 return c.addNode(.{
1638 .tag = if (semicolon) .block_semicolon else .block,
1639 .main_token = l_brace,
1640 .data = .{ .extra_range = span },
1641 });
1642 },
1643 .func => return renderFunc(c, node),
1644 .pub_inline_fn => return renderMacroFunc(c, node),
1645 .discard => {
1646 const payload = node.castTag(.discard).?.data;
1647 if (payload.should_skip) return @enumFromInt(0);
1648
1649 const lhs = try c.addNode(.{
1650 .tag = .identifier,
1651 .main_token = try c.addToken(.identifier, "_"),
1652 .data = undefined,
1653 });
1654 const main_token = try c.addToken(.equal, "=");
1655 if (payload.value.tag() == .identifier) {
1656 // Render as `_ = &foo;` to avoid tripping "pointless discard" and "local variable never mutated" errors.
1657 var addr_of_pl: Payload.UnOp = .{
1658 .base = .{ .tag = .address_of },
1659 .data = payload.value,
1660 };
1661 const addr_of: Node = .{ .ptr_otherwise = &addr_of_pl.base };
1662 return c.addNode(.{
1663 .tag = .assign,
1664 .main_token = main_token,
1665 .data = .{ .node_and_node = .{
1666 lhs,
1667 try renderNode(c, addr_of),
1668 } },
1669 });
1670 } else {
1671 return c.addNode(.{
1672 .tag = .assign,
1673 .main_token = main_token,
1674 .data = .{ .node_and_node = .{
1675 lhs,
1676 try renderNode(c, payload.value),
1677 } },
1678 });
1679 }
1680 },
1681 .@"while" => {
1682 const payload = node.castTag(.@"while").?.data;
1683 const while_tok = try c.addToken(.keyword_while, "while");
1684 _ = try c.addToken(.l_paren, "(");
1685 const cond = try renderNode(c, payload.cond);
1686 _ = try c.addToken(.r_paren, ")");
1687
1688 const cont_expr = if (payload.cont_expr) |some| blk: {
1689 _ = try c.addToken(.colon, ":");
1690 _ = try c.addToken(.l_paren, "(");
1691 const res = try renderNode(c, some);
1692 _ = try c.addToken(.r_paren, ")");
1693 break :blk res;
1694 } else null;
1695 const body = try renderNode(c, payload.body);
1696
1697 if (cont_expr == null) {
1698 return c.addNode(.{
1699 .tag = .while_simple,
1700 .main_token = while_tok,
1701 .data = .{ .node_and_node = .{
1702 cond,
1703 body,
1704 } },
1705 });
1706 } else {
1707 return c.addNode(.{
1708 .tag = .while_cont,
1709 .main_token = while_tok,
1710 .data = .{ .node_and_extra = .{
1711 cond,
1712 try c.addExtra(std.zig.Ast.Node.WhileCont{
1713 .cont_expr = cont_expr.?,
1714 .then_expr = body,
1715 }),
1716 } },
1717 });
1718 }
1719 },
1720 .while_true => {
1721 const payload = node.castTag(.while_true).?.data;
1722 const while_tok = try c.addToken(.keyword_while, "while");
1723 _ = try c.addToken(.l_paren, "(");
1724 const cond = try c.addNode(.{
1725 .tag = .identifier,
1726 .main_token = try c.addToken(.identifier, "true"),
1727 .data = undefined,
1728 });
1729 _ = try c.addToken(.r_paren, ")");
1730 const body = try renderNode(c, payload);
1731
1732 return c.addNode(.{
1733 .tag = .while_simple,
1734 .main_token = while_tok,
1735 .data = .{ .node_and_node = .{
1736 cond,
1737 body,
1738 } },
1739 });
1740 },
1741 .@"if" => {
1742 const payload = node.castTag(.@"if").?.data;
1743 const if_tok = try c.addToken(.keyword_if, "if");
1744 _ = try c.addToken(.l_paren, "(");
1745 const cond = try renderNode(c, payload.cond);
1746 _ = try c.addToken(.r_paren, ")");
1747
1748 const then_expr = try renderNode(c, payload.then);
1749 const else_node = payload.@"else" orelse return c.addNode(.{
1750 .tag = .if_simple,
1751 .main_token = if_tok,
1752 .data = .{ .node_and_node = .{
1753 cond,
1754 then_expr,
1755 } },
1756 });
1757 _ = try c.addToken(.keyword_else, "else");
1758 const else_expr = try renderNode(c, else_node);
1759
1760 return c.addNode(.{
1761 .tag = .@"if",
1762 .main_token = if_tok,
1763 .data = .{ .node_and_extra = .{
1764 cond,
1765 try c.addExtra(std.zig.Ast.Node.If{
1766 .then_expr = then_expr,
1767 .else_expr = else_expr,
1768 }),
1769 } },
1770 });
1771 },
1772 .if_not_break => {
1773 const payload = node.castTag(.if_not_break).?.data;
1774 const if_tok = try c.addToken(.keyword_if, "if");
1775 _ = try c.addToken(.l_paren, "(");
1776 const cond = try c.addNode(.{
1777 .tag = .bool_not,
1778 .main_token = try c.addToken(.bang, "!"),
1779 .data = .{ .node = try renderNodeGrouped(c, payload) },
1780 });
1781 _ = try c.addToken(.r_paren, ")");
1782 const then_expr = try c.addNode(.{
1783 .tag = .@"break",
1784 .main_token = try c.addToken(.keyword_break, "break"),
1785 .data = .{ .opt_token_and_opt_node = .{
1786 .none,
1787 .none,
1788 } },
1789 });
1790
1791 return c.addNode(.{
1792 .tag = .if_simple,
1793 .main_token = if_tok,
1794 .data = .{ .node_and_node = .{
1795 cond,
1796 then_expr,
1797 } },
1798 });
1799 },
1800 .@"switch" => {
1801 const payload = node.castTag(.@"switch").?.data;
1802 const switch_tok = try c.addToken(.keyword_switch, "switch");
1803 _ = try c.addToken(.l_paren, "(");
1804 const cond = try renderNode(c, payload.cond);
1805 _ = try c.addToken(.r_paren, ")");
1806
1807 _ = try c.addToken(.l_brace, "{");
1808 var cases = try c.gpa.alloc(NodeIndex, payload.cases.len);
1809 defer c.gpa.free(cases);
1810 for (payload.cases, 0..) |case, i| {
1811 cases[i] = try renderNode(c, case);
1812 _ = try c.addToken(.comma, ",");
1813 }
1814 const span = try c.listToSpan(cases);
1815 _ = try c.addToken(.r_brace, "}");
1816 return c.addNode(.{
1817 .tag = .switch_comma,
1818 .main_token = switch_tok,
1819 .data = .{ .node_and_extra = .{
1820 cond, try c.addExtra(NodeSubRange{
1821 .start = span.start,
1822 .end = span.end,
1823 }),
1824 } },
1825 });
1826 },
1827 .switch_else => {
1828 const payload = node.castTag(.switch_else).?.data;
1829 _ = try c.addToken(.keyword_else, "else");
1830 return c.addNode(.{
1831 .tag = .switch_case_one,
1832 .main_token = try c.addToken(.equal_angle_bracket_right, "=>"),
1833 .data = .{ .opt_node_and_node = .{
1834 .none,
1835 try renderNode(c, payload),
1836 } },
1837 });
1838 },
1839 .switch_prong => {
1840 const payload = node.castTag(.switch_prong).?.data;
1841 var items = try c.gpa.alloc(NodeIndex, payload.cases.len);
1842 defer c.gpa.free(items);
1843 for (payload.cases, items, 0..) |case, *item, i| {
1844 if (i != 0) _ = try c.addToken(.comma, ",");
1845 item.* = try renderNode(c, case);
1846 }
1847 _ = try c.addToken(.r_brace, "}");
1848 if (items.len < 2) {
1849 return c.addNode(.{
1850 .tag = .switch_case_one,
1851 .main_token = try c.addToken(.equal_angle_bracket_right, "=>"),
1852 .data = .{ .opt_node_and_node = .{
1853 if (items.len == 0) .none else items[0].toOptional(),
1854 try renderNode(c, payload.cond),
1855 } },
1856 });
1857 } else {
1858 const span = try c.listToSpan(items);
1859 return c.addNode(.{
1860 .tag = .switch_case,
1861 .main_token = try c.addToken(.equal_angle_bracket_right, "=>"),
1862 .data = .{ .extra_and_node = .{
1863 try c.addExtra(NodeSubRange{
1864 .start = span.start,
1865 .end = span.end,
1866 }),
1867 try renderNode(c, payload.cond),
1868 } },
1869 });
1870 }
1871 },
1872 .opaque_literal => {
1873 const opaque_tok = try c.addToken(.keyword_opaque, "opaque");
1874 _ = try c.addToken(.l_brace, "{");
1875 _ = try c.addToken(.r_brace, "}");
1876
1877 return c.addNode(.{
1878 .tag = .container_decl_two,
1879 .main_token = opaque_tok,
1880 .data = .{ .opt_node_and_opt_node = .{
1881 .none,
1882 .none,
1883 } },
1884 });
1885 },
1886 .array_access => {
1887 const payload = node.castTag(.array_access).?.data;
1888 const lhs = try renderNodeGrouped(c, payload.lhs);
1889 const l_bracket = try c.addToken(.l_bracket, "[");
1890 const index_expr = try renderNode(c, payload.rhs);
1891 _ = try c.addToken(.r_bracket, "]");
1892 return c.addNode(.{
1893 .tag = .array_access,
1894 .main_token = l_bracket,
1895 .data = .{ .node_and_node = .{
1896 lhs,
1897 index_expr,
1898 } },
1899 });
1900 },
1901 .array_type => {
1902 const payload = node.castTag(.array_type).?.data;
1903 return renderArrayType(c, payload.len, payload.elem_type);
1904 },
1905 .null_sentinel_array_type => {
1906 const payload = node.castTag(.null_sentinel_array_type).?.data;
1907 return renderNullSentinelArrayType(c, payload.len, payload.elem_type);
1908 },
1909 .array_filler => {
1910 const payload = node.castTag(.array_filler).?.data;
1911
1912 const type_expr = try renderArrayType(c, 1, payload.type);
1913 const l_brace = try c.addToken(.l_brace, "{");
1914 const val = try renderNode(c, payload.filler);
1915 _ = try c.addToken(.r_brace, "}");
1916
1917 const init = try c.addNode(.{
1918 .tag = .array_init_one,
1919 .main_token = l_brace,
1920 .data = .{ .node_and_node = .{
1921 type_expr,
1922 val,
1923 } },
1924 });
1925 return c.addNode(.{
1926 .tag = .array_cat,
1927 .main_token = try c.addToken(.asterisk_asterisk, "**"),
1928 .data = .{ .node_and_node = .{
1929 init,
1930 try c.addNode(.{
1931 .tag = .number_literal,
1932 .main_token = try c.addTokenFmt(.number_literal, "{d}", .{payload.count}),
1933 .data = undefined,
1934 }),
1935 } },
1936 });
1937 },
1938 .empty_array => {
1939 const payload = node.castTag(.empty_array).?.data;
1940
1941 const type_expr = try renderArrayType(c, 0, payload);
1942 return renderArrayInit(c, type_expr, &.{});
1943 },
1944 .array_init => {
1945 const payload = node.castTag(.array_init).?.data;
1946 const type_expr = try renderNode(c, payload.cond);
1947 return renderArrayInit(c, type_expr, payload.cases);
1948 },
1949 .vector_zero_init => {
1950 const payload = node.castTag(.vector_zero_init).?.data;
1951 return renderBuiltinCall(c, "@splat", &.{payload});
1952 },
1953 .field_access => {
1954 const payload = node.castTag(.field_access).?.data;
1955 const lhs = try renderNodeGrouped(c, payload.lhs);
1956 return renderFieldAccess(c, lhs, payload.field_name);
1957 },
1958 .@"struct", .@"union" => return renderRecord(c, node),
1959 .enum_constant => {
1960 const payload = node.castTag(.enum_constant).?.data;
1961
1962 if (payload.is_public) _ = try c.addToken(.keyword_pub, "pub");
1963 const const_tok = try c.addToken(.keyword_const, "const");
1964 _ = try c.addIdentifier(payload.name);
1965
1966 const type_node = if (payload.type) |enum_const_type| blk: {
1967 _ = try c.addToken(.colon, ":");
1968 break :blk try renderNode(c, enum_const_type);
1969 } else null;
1970
1971 _ = try c.addToken(.equal, "=");
1972
1973 const init_node = try renderNode(c, payload.value);
1974 _ = try c.addToken(.semicolon, ";");
1975
1976 return c.addNode(.{
1977 .tag = .simple_var_decl,
1978 .main_token = const_tok,
1979 .data = .{ .opt_node_and_opt_node = .{
1980 .fromOptional(type_node),
1981 init_node.toOptional(),
1982 } },
1983 });
1984 },
1985 .tuple => {
1986 const payload = node.castTag(.tuple).?.data;
1987 _ = try c.addToken(.period, ".");
1988 const l_brace = try c.addToken(.l_brace, "{");
1989 var inits = try c.gpa.alloc(NodeIndex, payload.len);
1990 defer c.gpa.free(inits);
1991 for (payload, 0..) |init, i| {
1992 if (i != 0) _ = try c.addToken(.comma, ",");
1993 inits[i] = try renderNode(c, init);
1994 }
1995 _ = try c.addToken(.r_brace, "}");
1996 if (payload.len < 3) {
1997 return c.addNode(.{
1998 .tag = .array_init_dot_two,
1999 .main_token = l_brace,
2000 .data = .{ .opt_node_and_opt_node = .{
2001 if (inits.len < 1) .none else inits[0].toOptional(),
2002 if (inits.len < 2) .none else inits[1].toOptional(),
2003 } },
2004 });
2005 } else {
2006 const span = try c.listToSpan(inits);
2007 return c.addNode(.{
2008 .tag = .array_init_dot,
2009 .main_token = l_brace,
2010 .data = .{ .extra_range = span },
2011 });
2012 }
2013 },
2014 .container_init_dot => {
2015 const payload = node.castTag(.container_init_dot).?.data;
2016 _ = try c.addToken(.period, ".");
2017 const l_brace = try c.addToken(.l_brace, "{");
2018 var inits = try c.gpa.alloc(NodeIndex, payload.len);
2019 defer c.gpa.free(inits);
2020 for (payload, 0..) |init, i| {
2021 _ = try c.addToken(.period, ".");
2022 _ = try c.addIdentifier(init.name);
2023 _ = try c.addToken(.equal, "=");
2024 inits[i] = try renderNode(c, init.value);
2025 _ = try c.addToken(.comma, ",");
2026 }
2027 _ = try c.addToken(.r_brace, "}");
2028
2029 if (payload.len < 3) {
2030 return c.addNode(.{
2031 .tag = .struct_init_dot_two_comma,
2032 .main_token = l_brace,
2033 .data = .{ .opt_node_and_opt_node = .{
2034 if (inits.len < 1) .none else inits[0].toOptional(),
2035 if (inits.len < 2) .none else inits[1].toOptional(),
2036 } },
2037 });
2038 } else {
2039 const span = try c.listToSpan(inits);
2040 return c.addNode(.{
2041 .tag = .struct_init_dot_comma,
2042 .main_token = l_brace,
2043 .data = .{ .extra_range = span },
2044 });
2045 }
2046 },
2047 .container_init => {
2048 const payload = node.castTag(.container_init).?.data;
2049 const lhs = try renderNode(c, payload.lhs);
2050
2051 const l_brace = try c.addToken(.l_brace, "{");
2052 var inits = try c.gpa.alloc(NodeIndex, payload.inits.len);
2053 defer c.gpa.free(inits);
2054 for (payload.inits, 0..) |init, i| {
2055 _ = try c.addToken(.period, ".");
2056 _ = try c.addIdentifier(init.name);
2057 _ = try c.addToken(.equal, "=");
2058 inits[i] = try renderNode(c, init.value);
2059 _ = try c.addToken(.comma, ",");
2060 }
2061 _ = try c.addToken(.r_brace, "}");
2062
2063 return switch (payload.inits.len) {
2064 0 => c.addNode(.{
2065 .tag = .struct_init_one,
2066 .main_token = l_brace,
2067 .data = .{ .node_and_opt_node = .{
2068 lhs,
2069 .none,
2070 } },
2071 }),
2072 1 => c.addNode(.{
2073 .tag = .struct_init_one_comma,
2074 .main_token = l_brace,
2075 .data = .{ .node_and_opt_node = .{
2076 lhs,
2077 inits[0].toOptional(),
2078 } },
2079 }),
2080 else => blk: {
2081 const span = try c.listToSpan(inits);
2082 break :blk c.addNode(.{
2083 .tag = .struct_init_comma,
2084 .main_token = l_brace,
2085 .data = .{ .node_and_extra = .{
2086 lhs, try c.addExtra(NodeSubRange{
2087 .start = span.start,
2088 .end = span.end,
2089 }),
2090 } },
2091 });
2092 },
2093 };
2094 },
2095 .@"anytype" => unreachable, // Handled in renderParams
2096 }
2097}
2098
2099fn renderRecord(c: *Context, node: Node) !NodeIndex {
2100 const payload = @as(*Payload.Record, @alignCast(@fieldParentPtr("base", node.ptr_otherwise))).data;
2101 if (payload.layout == .@"packed")
2102 _ = try c.addToken(.keyword_packed, "packed")
2103 else if (payload.layout == .@"extern")
2104 _ = try c.addToken(.keyword_extern, "extern");
2105 const kind_tok = if (node.tag() == .@"struct")
2106 try c.addToken(.keyword_struct, "struct")
2107 else
2108 try c.addToken(.keyword_union, "union");
2109
2110 _ = try c.addToken(.l_brace, "{");
2111
2112 const num_vars = payload.variables.len;
2113 const num_funcs = payload.functions.len;
2114 const total_members = payload.fields.len + num_vars + num_funcs;
2115 const members = try c.gpa.alloc(NodeIndex, total_members);
2116 defer c.gpa.free(members);
2117
2118 for (payload.fields, 0..) |field, i| {
2119 const name_tok = try c.addTokenFmt(.identifier, "{f}", .{std.zig.fmtIdFlags(field.name, .{ .allow_primitive = true })});
2120 _ = try c.addToken(.colon, ":");
2121 const type_expr = try renderNode(c, field.type);
2122
2123 const align_expr = if (field.alignment) |alignment| blk: {
2124 _ = try c.addToken(.keyword_align, "align");
2125 _ = try c.addToken(.l_paren, "(");
2126 const align_expr = try c.addNode(.{
2127 .tag = .number_literal,
2128 .main_token = try c.addTokenFmt(.number_literal, "{d}", .{alignment}),
2129 .data = undefined,
2130 });
2131 _ = try c.addToken(.r_paren, ")");
2132 break :blk align_expr;
2133 } else null;
2134
2135 const value_expr = if (field.default_value) |value| blk: {
2136 _ = try c.addToken(.equal, "=");
2137 break :blk try renderNode(c, value);
2138 } else null;
2139
2140 members[i] = try c.addNode(if (align_expr == null) .{
2141 .tag = .container_field_init,
2142 .main_token = name_tok,
2143 .data = .{ .node_and_opt_node = .{
2144 type_expr,
2145 .fromOptional(value_expr),
2146 } },
2147 } else if (value_expr == null) .{
2148 .tag = .container_field_align,
2149 .main_token = name_tok,
2150 .data = .{ .node_and_node = .{
2151 type_expr,
2152 align_expr.?,
2153 } },
2154 } else .{
2155 .tag = .container_field,
2156 .main_token = name_tok,
2157 .data = .{ .node_and_extra = .{
2158 type_expr, try c.addExtra(std.zig.Ast.Node.ContainerField{
2159 .align_expr = align_expr.?,
2160 .value_expr = value_expr.?,
2161 }),
2162 } },
2163 });
2164 _ = try c.addToken(.comma, ",");
2165 }
2166 for (payload.variables, 0..) |variable, i| {
2167 members[payload.fields.len + i] = try renderNode(c, variable);
2168 }
2169 for (payload.functions, 0..) |function, i| {
2170 members[payload.fields.len + num_vars + i] = try renderNode(c, function);
2171 }
2172 _ = try c.addToken(.r_brace, "}");
2173
2174 if (total_members == 0) {
2175 return c.addNode(.{
2176 .tag = .container_decl_two,
2177 .main_token = kind_tok,
2178 .data = .{ .opt_node_and_opt_node = .{
2179 .none,
2180 .none,
2181 } },
2182 });
2183 } else if (total_members <= 2) {
2184 return c.addNode(.{
2185 .tag = if (num_funcs == 0) .container_decl_two_trailing else .container_decl_two,
2186 .main_token = kind_tok,
2187 .data = .{ .opt_node_and_opt_node = .{
2188 if (members.len < 1) .none else members[0].toOptional(),
2189 if (members.len < 2) .none else members[1].toOptional(),
2190 } },
2191 });
2192 } else {
2193 const span = try c.listToSpan(members);
2194 return c.addNode(.{
2195 .tag = if (num_funcs == 0) .container_decl_trailing else .container_decl,
2196 .main_token = kind_tok,
2197 .data = .{ .extra_range = span },
2198 });
2199 }
2200}
2201
2202fn renderFieldAccess(c: *Context, lhs: NodeIndex, field_name: []const u8) !NodeIndex {
2203 return c.addNode(.{
2204 .tag = .field_access,
2205 .main_token = try c.addToken(.period, "."),
2206 .data = .{ .node_and_token = .{
2207 lhs,
2208 try c.addTokenFmt(.identifier, "{f}", .{std.zig.fmtIdFlags(field_name, .{ .allow_primitive = true })}),
2209 } },
2210 });
2211}
2212
2213fn renderArrayInit(c: *Context, lhs: NodeIndex, inits: []const Node) !NodeIndex {
2214 const l_brace = try c.addToken(.l_brace, "{");
2215 var rendered = try c.gpa.alloc(NodeIndex, inits.len);
2216 defer c.gpa.free(rendered);
2217 for (inits, 0..) |init, i| {
2218 rendered[i] = try renderNode(c, init);
2219 _ = try c.addToken(.comma, ",");
2220 }
2221 _ = try c.addToken(.r_brace, "}");
2222 switch (inits.len) {
2223 0 => return c.addNode(.{
2224 .tag = .struct_init_one,
2225 .main_token = l_brace,
2226 .data = .{ .node_and_opt_node = .{
2227 lhs,
2228 .none,
2229 } },
2230 }),
2231 1 => return c.addNode(.{
2232 .tag = .array_init_one_comma,
2233 .main_token = l_brace,
2234 .data = .{ .node_and_node = .{
2235 lhs,
2236 rendered[0],
2237 } },
2238 }),
2239 else => {
2240 const span = try c.listToSpan(rendered);
2241 return c.addNode(.{
2242 .tag = .array_init_comma,
2243 .main_token = l_brace,
2244 .data = .{ .node_and_extra = .{
2245 lhs, try c.addExtra(NodeSubRange{
2246 .start = span.start,
2247 .end = span.end,
2248 }),
2249 } },
2250 });
2251 },
2252 }
2253}
2254
2255fn renderArrayType(c: *Context, len: usize, elem_type: Node) !NodeIndex {
2256 const l_bracket = try c.addToken(.l_bracket, "[");
2257 const len_expr = try c.addNode(.{
2258 .tag = .number_literal,
2259 .main_token = try c.addTokenFmt(.number_literal, "{d}", .{len}),
2260 .data = undefined,
2261 });
2262 _ = try c.addToken(.r_bracket, "]");
2263 const elem_type_expr = try renderNode(c, elem_type);
2264 return c.addNode(.{
2265 .tag = .array_type,
2266 .main_token = l_bracket,
2267 .data = .{ .node_and_node = .{
2268 len_expr,
2269 elem_type_expr,
2270 } },
2271 });
2272}
2273
2274fn renderNullSentinelArrayType(c: *Context, len: usize, elem_type: Node) !NodeIndex {
2275 const l_bracket = try c.addToken(.l_bracket, "[");
2276 const len_expr = try c.addNode(.{
2277 .tag = .number_literal,
2278 .main_token = try c.addTokenFmt(.number_literal, "{d}", .{len}),
2279 .data = undefined,
2280 });
2281 _ = try c.addToken(.colon, ":");
2282
2283 const sentinel_expr = try c.addNode(.{
2284 .tag = .number_literal,
2285 .main_token = try c.addToken(.number_literal, "0"),
2286 .data = undefined,
2287 });
2288
2289 _ = try c.addToken(.r_bracket, "]");
2290 const elem_type_expr = try renderNode(c, elem_type);
2291 return c.addNode(.{
2292 .tag = .array_type_sentinel,
2293 .main_token = l_bracket,
2294 .data = .{ .node_and_extra = .{
2295 len_expr,
2296 try c.addExtra(std.zig.Ast.Node.ArrayTypeSentinel{
2297 .sentinel = sentinel_expr,
2298 .elem_type = elem_type_expr,
2299 }),
2300 } },
2301 });
2302}
2303
2304fn addSemicolonIfNeeded(c: *Context, node: Node) !void {
2305 switch (node.tag()) {
2306 .warning => unreachable,
2307 .var_decl, .var_simple, .arg_redecl, .alias, .block, .empty_block, .block_single, .@"switch", .static_local_var, .extern_local_var, .extern_local_fn, .mut_str => {},
2308 .while_true => {
2309 const payload = node.castTag(.while_true).?.data;
2310 return addSemicolonIfNotBlock(c, payload);
2311 },
2312 .@"while" => {
2313 const payload = node.castTag(.@"while").?.data;
2314 return addSemicolonIfNotBlock(c, payload.body);
2315 },
2316 .@"if" => {
2317 const payload = node.castTag(.@"if").?.data;
2318 if (payload.@"else") |some|
2319 return addSemicolonIfNeeded(c, some);
2320 return addSemicolonIfNotBlock(c, payload.then);
2321 },
2322 else => _ = try c.addToken(.semicolon, ";"),
2323 }
2324}
2325
2326fn addSemicolonIfNotBlock(c: *Context, node: Node) !void {
2327 switch (node.tag()) {
2328 .block, .empty_block, .block_single => {},
2329 else => _ = try c.addToken(.semicolon, ";"),
2330 }
2331}
2332
2333fn renderNodeGrouped(c: *Context, node: Node) !NodeIndex {
2334 switch (node.tag()) {
2335 .declaration => unreachable,
2336 .null_literal,
2337 .undefined_literal,
2338 .true_literal,
2339 .false_literal,
2340 .return_void,
2341 .zero_literal,
2342 .one_literal,
2343 .void_type,
2344 .noreturn_type,
2345 .@"anytype",
2346 .div_trunc,
2347 .signed_remainder,
2348 .int_cast,
2349 .const_cast,
2350 .volatile_cast,
2351 .as,
2352 .truncate,
2353 .bit_cast,
2354 .float_cast,
2355 .int_from_float,
2356 .float_from_int,
2357 .ptr_from_int,
2358 .std_mem_zeroes,
2359 .int_from_ptr,
2360 .sizeof,
2361 .alignof,
2362 .typeof,
2363 .typeinfo,
2364 .vector,
2365 .helpers_sizeof,
2366 .helpers_cast,
2367 .helpers_promoteIntLiteral,
2368 .helpers_shuffle_vector_index,
2369 .helpers_flexible_array_type,
2370 .std_mem_zeroinit,
2371 .integer_literal,
2372 .float_literal,
2373 .string_literal,
2374 .string_slice,
2375 .char_literal,
2376 .enum_literal,
2377 .identifier,
2378 .fn_identifier,
2379 .field_access,
2380 .ptr_cast,
2381 .type,
2382 .array_access,
2383 .align_cast,
2384 .optional_type,
2385 .c_pointer,
2386 .single_pointer,
2387 .unwrap,
2388 .deref,
2389 .not,
2390 .negate,
2391 .negate_wrap,
2392 .bit_not,
2393 .func,
2394 .call,
2395 .array_type,
2396 .null_sentinel_array_type,
2397 .int_from_bool,
2398 .div_exact,
2399 .offset_of,
2400 .shuffle,
2401 .builtin_extern,
2402 .static_local_var,
2403 .extern_local_var,
2404 .extern_local_fn,
2405 .mut_str,
2406 .macro_arithmetic,
2407 => {
2408 // no grouping needed
2409 return renderNode(c, node);
2410 },
2411
2412 .opaque_literal,
2413 .empty_array,
2414 .block_single,
2415 .add,
2416 .add_wrap,
2417 .sub,
2418 .sub_wrap,
2419 .mul,
2420 .mul_wrap,
2421 .div,
2422 .shl,
2423 .shr,
2424 .mod,
2425 .@"and",
2426 .@"or",
2427 .less_than,
2428 .less_than_equal,
2429 .greater_than,
2430 .greater_than_equal,
2431 .equal,
2432 .not_equal,
2433 .bit_and,
2434 .bit_or,
2435 .bit_xor,
2436 .empty_block,
2437 .array_cat,
2438 .array_filler,
2439 .@"if",
2440 .@"struct",
2441 .@"union",
2442 .array_init,
2443 .vector_zero_init,
2444 .tuple,
2445 .container_init,
2446 .container_init_dot,
2447 .block,
2448 .address_of,
2449 => return c.addNode(.{
2450 .tag = .grouped_expression,
2451 .main_token = try c.addToken(.l_paren, "("),
2452 .data = .{ .node_and_token = .{
2453 try renderNode(c, node),
2454 try c.addToken(.r_paren, ")"),
2455 } },
2456 }),
2457 .ellipsis3,
2458 .switch_prong,
2459 .warning,
2460 .var_decl,
2461 .fail_decl,
2462 .arg_redecl,
2463 .alias,
2464 .var_simple,
2465 .pub_var_simple,
2466 .enum_constant,
2467 .@"while",
2468 .@"switch",
2469 .@"break",
2470 .break_val,
2471 .pub_inline_fn,
2472 .discard,
2473 .@"continue",
2474 .@"return",
2475 .@"comptime",
2476 .@"defer",
2477 .asm_simple,
2478 .while_true,
2479 .if_not_break,
2480 .switch_else,
2481 .add_assign,
2482 .add_wrap_assign,
2483 .sub_assign,
2484 .sub_wrap_assign,
2485 .mul_assign,
2486 .mul_wrap_assign,
2487 .div_assign,
2488 .shl_assign,
2489 .shr_assign,
2490 .mod_assign,
2491 .bit_and_assign,
2492 .bit_or_assign,
2493 .bit_xor_assign,
2494 .assign,
2495 .helpers_macro,
2496 .import_c_builtin,
2497 => {
2498 // these should never appear in places where grouping might be needed.
2499 unreachable;
2500 },
2501 }
2502}
2503
2504fn renderPrefixOp(c: *Context, node: Node, tag: std.zig.Ast.Node.Tag, tok_tag: TokenTag, bytes: []const u8) !NodeIndex {
2505 const payload = @as(*Payload.UnOp, @alignCast(@fieldParentPtr("base", node.ptr_otherwise))).data;
2506 return c.addNode(.{
2507 .tag = tag,
2508 .main_token = try c.addToken(tok_tag, bytes),
2509 .data = .{ .node = try renderNodeGrouped(c, payload) },
2510 });
2511}
2512
2513fn renderBinOpGrouped(c: *Context, node: Node, tag: std.zig.Ast.Node.Tag, tok_tag: TokenTag, bytes: []const u8) !NodeIndex {
2514 const payload = @as(*Payload.BinOp, @alignCast(@fieldParentPtr("base", node.ptr_otherwise))).data;
2515 const lhs = try renderNodeGrouped(c, payload.lhs);
2516 return c.addNode(.{
2517 .tag = tag,
2518 .main_token = try c.addToken(tok_tag, bytes),
2519 .data = .{ .node_and_node = .{
2520 lhs,
2521 try renderNodeGrouped(c, payload.rhs),
2522 } },
2523 });
2524}
2525
2526fn renderBinOp(c: *Context, node: Node, tag: std.zig.Ast.Node.Tag, tok_tag: TokenTag, bytes: []const u8) !NodeIndex {
2527 const payload = @as(*Payload.BinOp, @alignCast(@fieldParentPtr("base", node.ptr_otherwise))).data;
2528 const lhs = try renderNode(c, payload.lhs);
2529 return c.addNode(.{
2530 .tag = tag,
2531 .main_token = try c.addToken(tok_tag, bytes),
2532 .data = .{ .node_and_node = .{
2533 lhs,
2534 try renderNode(c, payload.rhs),
2535 } },
2536 });
2537}
2538
2539fn renderStdImport(c: *Context, parts: []const []const u8) !NodeIndex {
2540 const import_tok = try c.addToken(.builtin, "@import");
2541 _ = try c.addToken(.l_paren, "(");
2542 const std_tok = try c.addToken(.string_literal, "\"std\"");
2543 const std_node = try c.addNode(.{
2544 .tag = .string_literal,
2545 .main_token = std_tok,
2546 .data = undefined,
2547 });
2548 _ = try c.addToken(.r_paren, ")");
2549
2550 const import_node = try c.addNode(.{
2551 .tag = .builtin_call_two,
2552 .main_token = import_tok,
2553 .data = .{ .opt_node_and_opt_node = .{ std_node.toOptional(), .none } },
2554 });
2555
2556 var access_chain = import_node;
2557 for (parts) |part| {
2558 access_chain = try renderFieldAccess(c, access_chain, part);
2559 }
2560 return access_chain;
2561}
2562
2563fn renderCall(c: *Context, lhs: NodeIndex, args: []const Node) !NodeIndex {
2564 const lparen = try c.addToken(.l_paren, "(");
2565 const res = switch (args.len) {
2566 0 => try c.addNode(.{
2567 .tag = .call_one,
2568 .main_token = lparen,
2569 .data = .{ .node_and_opt_node = .{ lhs, .none } },
2570 }),
2571 1 => blk: {
2572 const arg = try renderNode(c, args[0]);
2573 break :blk try c.addNode(.{
2574 .tag = .call_one,
2575 .main_token = lparen,
2576 .data = .{ .node_and_opt_node = .{ lhs, arg.toOptional() } },
2577 });
2578 },
2579 else => blk: {
2580 var rendered = try c.gpa.alloc(NodeIndex, args.len);
2581 defer c.gpa.free(rendered);
2582
2583 for (args, 0..) |arg, i| {
2584 if (i != 0) _ = try c.addToken(.comma, ",");
2585 rendered[i] = try renderNode(c, arg);
2586 }
2587 const span = try c.listToSpan(rendered);
2588 break :blk try c.addNode(.{
2589 .tag = .call,
2590 .main_token = lparen,
2591 .data = .{ .node_and_extra = .{
2592 lhs,
2593 try c.addExtra(NodeSubRange{ .start = span.start, .end = span.end }),
2594 } },
2595 });
2596 },
2597 };
2598 _ = try c.addToken(.r_paren, ")");
2599 return res;
2600}
2601
2602fn renderBuiltinCall(c: *Context, builtin: []const u8, args: []const Node) !NodeIndex {
2603 const builtin_tok = try c.addToken(.builtin, builtin);
2604 _ = try c.addToken(.l_paren, "(");
2605 var arg_1: NodeIndex = undefined;
2606 var arg_2: NodeIndex = undefined;
2607 var arg_3: NodeIndex = undefined;
2608 var arg_4: NodeIndex = undefined;
2609 switch (args.len) {
2610 0 => {},
2611 1 => {
2612 arg_1 = try renderNode(c, args[0]);
2613 },
2614 2 => {
2615 arg_1 = try renderNode(c, args[0]);
2616 _ = try c.addToken(.comma, ",");
2617 arg_2 = try renderNode(c, args[1]);
2618 },
2619 4 => {
2620 arg_1 = try renderNode(c, args[0]);
2621 _ = try c.addToken(.comma, ",");
2622 arg_2 = try renderNode(c, args[1]);
2623 _ = try c.addToken(.comma, ",");
2624 arg_3 = try renderNode(c, args[2]);
2625 _ = try c.addToken(.comma, ",");
2626 arg_4 = try renderNode(c, args[3]);
2627 },
2628 else => unreachable, // expand this function as needed.
2629 }
2630
2631 _ = try c.addToken(.r_paren, ")");
2632 if (args.len <= 2) {
2633 return c.addNode(.{
2634 .tag = .builtin_call_two,
2635 .main_token = builtin_tok,
2636 .data = .{ .opt_node_and_opt_node = .{
2637 if (args.len < 1) .none else arg_1.toOptional(),
2638 if (args.len < 2) .none else arg_2.toOptional(),
2639 } },
2640 });
2641 } else {
2642 std.debug.assert(args.len == 4);
2643
2644 const params = try c.listToSpan(&.{ arg_1, arg_2, arg_3, arg_4 });
2645 return c.addNode(.{
2646 .tag = .builtin_call,
2647 .main_token = builtin_tok,
2648 .data = .{ .extra_range = params },
2649 });
2650 }
2651}
2652
2653fn renderVar(c: *Context, node: Node) !NodeIndex {
2654 const payload = node.castTag(.var_decl).?.data;
2655 if (payload.is_pub) _ = try c.addToken(.keyword_pub, "pub");
2656 if (payload.is_extern) _ = try c.addToken(.keyword_extern, "extern");
2657 if (payload.is_export) _ = try c.addToken(.keyword_export, "export");
2658 if (payload.is_threadlocal) _ = try c.addToken(.keyword_threadlocal, "threadlocal");
2659 const mut_tok = if (payload.is_const)
2660 try c.addToken(.keyword_const, "const")
2661 else
2662 try c.addToken(.keyword_var, "var");
2663 _ = try c.addIdentifier(payload.name);
2664 _ = try c.addToken(.colon, ":");
2665 const type_node = try renderNode(c, payload.type);
2666
2667 const align_node = if (payload.alignment) |some| blk: {
2668 _ = try c.addToken(.keyword_align, "align");
2669 _ = try c.addToken(.l_paren, "(");
2670 const res = try c.addNode(.{
2671 .tag = .number_literal,
2672 .main_token = try c.addTokenFmt(.number_literal, "{d}", .{some}),
2673 .data = undefined,
2674 });
2675 _ = try c.addToken(.r_paren, ")");
2676 break :blk res;
2677 } else null;
2678
2679 const section_node = if (payload.linksection_string) |some| blk: {
2680 _ = try c.addToken(.keyword_linksection, "linksection");
2681 _ = try c.addToken(.l_paren, "(");
2682 const res = try c.addNode(.{
2683 .tag = .string_literal,
2684 .main_token = try c.addTokenFmt(.string_literal, "\"{f}\"", .{std.zig.fmtString(some)}),
2685 .data = undefined,
2686 });
2687 _ = try c.addToken(.r_paren, ")");
2688 break :blk res;
2689 } else null;
2690
2691 const init_node = if (payload.init) |some| blk: {
2692 _ = try c.addToken(.equal, "=");
2693 break :blk try renderNode(c, some);
2694 } else null;
2695 _ = try c.addToken(.semicolon, ";");
2696
2697 if (section_node == null) {
2698 if (align_node == null) {
2699 return c.addNode(.{
2700 .tag = .simple_var_decl,
2701 .main_token = mut_tok,
2702 .data = .{ .opt_node_and_opt_node = .{
2703 type_node.toOptional(),
2704 .fromOptional(init_node),
2705 } },
2706 });
2707 } else {
2708 return c.addNode(.{
2709 .tag = .local_var_decl,
2710 .main_token = mut_tok,
2711 .data = .{ .extra_and_opt_node = .{
2712 try c.addExtra(std.zig.Ast.Node.LocalVarDecl{
2713 .type_node = type_node,
2714 .align_node = align_node.?,
2715 }),
2716 .fromOptional(init_node),
2717 } },
2718 });
2719 }
2720 } else {
2721 return c.addNode(.{
2722 .tag = .global_var_decl,
2723 .main_token = mut_tok,
2724 .data = .{ .extra_and_opt_node = .{
2725 try c.addExtra(std.zig.Ast.Node.GlobalVarDecl{
2726 .type_node = type_node.toOptional(),
2727 .align_node = .fromOptional(align_node),
2728 .section_node = .fromOptional(section_node),
2729 .addrspace_node = .none,
2730 }),
2731 .fromOptional(init_node),
2732 } },
2733 });
2734 }
2735}
2736
2737fn renderFunc(c: *Context, node: Node) !NodeIndex {
2738 const payload = node.castTag(.func).?.data;
2739 if (payload.is_pub) _ = try c.addToken(.keyword_pub, "pub");
2740 if (payload.is_extern) _ = try c.addToken(.keyword_extern, "extern");
2741 if (payload.is_export) _ = try c.addToken(.keyword_export, "export");
2742 if (payload.is_inline) _ = try c.addToken(.keyword_inline, "inline");
2743 const fn_token = try c.addToken(.keyword_fn, "fn");
2744 if (payload.name) |some| _ = try c.addIdentifier(some);
2745
2746 const params = try renderParams(c, payload.params, payload.is_var_args);
2747 defer params.deinit();
2748 var span: NodeSubRange = undefined;
2749 if (params.items.len > 1) span = try c.listToSpan(params.items);
2750
2751 const align_expr = if (payload.alignment) |some| blk: {
2752 _ = try c.addToken(.keyword_align, "align");
2753 _ = try c.addToken(.l_paren, "(");
2754 const res = try c.addNode(.{
2755 .tag = .number_literal,
2756 .main_token = try c.addTokenFmt(.number_literal, "{d}", .{some}),
2757 .data = undefined,
2758 });
2759 _ = try c.addToken(.r_paren, ")");
2760 break :blk res;
2761 } else null;
2762
2763 const section_expr = if (payload.linksection_string) |some| blk: {
2764 _ = try c.addToken(.keyword_linksection, "linksection");
2765 _ = try c.addToken(.l_paren, "(");
2766 const res = try c.addNode(.{
2767 .tag = .string_literal,
2768 .main_token = try c.addTokenFmt(.string_literal, "\"{f}\"", .{std.zig.fmtString(some)}),
2769 .data = undefined,
2770 });
2771 _ = try c.addToken(.r_paren, ")");
2772 break :blk res;
2773 } else null;
2774
2775 const callconv_expr = if (payload.explicit_callconv) |some| blk: {
2776 _ = try c.addToken(.keyword_callconv, "callconv");
2777 _ = try c.addToken(.l_paren, "(");
2778 const cc_node = switch (some) {
2779 .c => cc_node: {
2780 _ = try c.addToken(.period, ".");
2781 break :cc_node try c.addNode(.{
2782 .tag = .enum_literal,
2783 .main_token = try c.addToken(.identifier, "c"),
2784 .data = undefined,
2785 });
2786 },
2787 .x86_64_sysv,
2788 .x86_64_win,
2789 .x86_stdcall,
2790 .x86_fastcall,
2791 .x86_thiscall,
2792 .x86_vectorcall,
2793 .aarch64_vfabi,
2794 .arm_aapcs,
2795 .arm_aapcs_vfp,
2796 .m68k_rtd,
2797 => cc_node: {
2798 // .{ .foo = .{} }
2799 _ = try c.addToken(.period, ".");
2800 const outer_lbrace = try c.addToken(.l_brace, "{");
2801 _ = try c.addToken(.period, ".");
2802 _ = try c.addToken(.identifier, @tagName(some));
2803 _ = try c.addToken(.equal, "=");
2804 _ = try c.addToken(.period, ".");
2805 const inner_lbrace = try c.addToken(.l_brace, "{");
2806 _ = try c.addToken(.r_brace, "}");
2807 _ = try c.addToken(.r_brace, "}");
2808 const inner_node = try c.addNode(.{
2809 .tag = .struct_init_dot_two,
2810 .main_token = inner_lbrace,
2811 .data = .{ .opt_node_and_opt_node = .{
2812 .none,
2813 .none,
2814 } },
2815 });
2816 break :cc_node try c.addNode(.{
2817 .tag = .struct_init_dot_two,
2818 .main_token = outer_lbrace,
2819 .data = .{ .opt_node_and_opt_node = .{
2820 inner_node.toOptional(),
2821 .none,
2822 } },
2823 });
2824 },
2825 };
2826 _ = try c.addToken(.r_paren, ")");
2827 break :blk cc_node;
2828 } else null;
2829
2830 const return_type_expr = try renderNode(c, payload.return_type);
2831
2832 const fn_proto = try blk: {
2833 if (align_expr == null and section_expr == null and callconv_expr == null) {
2834 if (params.items.len < 2)
2835 break :blk c.addNode(.{
2836 .tag = .fn_proto_simple,
2837 .main_token = fn_token,
2838 .data = .{ .opt_node_and_opt_node = .{
2839 if (params.items.len == 0) .none else params.items[0].toOptional(),
2840 return_type_expr.toOptional(),
2841 } },
2842 })
2843 else
2844 break :blk c.addNode(.{
2845 .tag = .fn_proto_multi,
2846 .main_token = fn_token,
2847 .data = .{ .extra_and_opt_node = .{
2848 try c.addExtra(NodeSubRange{
2849 .start = span.start,
2850 .end = span.end,
2851 }),
2852 return_type_expr.toOptional(),
2853 } },
2854 });
2855 }
2856 if (params.items.len < 2)
2857 break :blk c.addNode(.{
2858 .tag = .fn_proto_one,
2859 .main_token = fn_token,
2860 .data = .{
2861 .extra_and_opt_node = .{
2862 try c.addExtra(std.zig.Ast.Node.FnProtoOne{
2863 .param = if (params.items.len == 0) .none else params.items[0].toOptional(),
2864 .align_expr = .fromOptional(align_expr),
2865 .addrspace_expr = .none, // TODO
2866 .section_expr = .fromOptional(section_expr),
2867 .callconv_expr = .fromOptional(callconv_expr),
2868 }),
2869 return_type_expr.toOptional(),
2870 },
2871 },
2872 })
2873 else
2874 break :blk c.addNode(.{
2875 .tag = .fn_proto,
2876 .main_token = fn_token,
2877 .data = .{
2878 .extra_and_opt_node = .{
2879 try c.addExtra(std.zig.Ast.Node.FnProto{
2880 .params_start = span.start,
2881 .params_end = span.end,
2882 .align_expr = .fromOptional(align_expr),
2883 .addrspace_expr = .none, // TODO
2884 .section_expr = .fromOptional(section_expr),
2885 .callconv_expr = .fromOptional(callconv_expr),
2886 }),
2887 return_type_expr.toOptional(),
2888 },
2889 },
2890 });
2891 };
2892
2893 const payload_body = payload.body orelse {
2894 if (payload.is_extern) {
2895 _ = try c.addToken(.semicolon, ";");
2896 }
2897 return fn_proto;
2898 };
2899 const body = try renderNode(c, payload_body);
2900 return c.addNode(.{
2901 .tag = .fn_decl,
2902 .main_token = fn_token,
2903 .data = .{ .node_and_node = .{
2904 fn_proto,
2905 body,
2906 } },
2907 });
2908}
2909
2910fn renderMacroFunc(c: *Context, node: Node) !NodeIndex {
2911 const payload = node.castTag(.pub_inline_fn).?.data;
2912 _ = try c.addToken(.keyword_pub, "pub");
2913 _ = try c.addToken(.keyword_inline, "inline");
2914 const fn_token = try c.addToken(.keyword_fn, "fn");
2915 _ = try c.addIdentifier(payload.name);
2916
2917 const params = try renderParams(c, payload.params, false);
2918 defer params.deinit();
2919
2920 const return_type_expr = try renderNodeGrouped(c, payload.return_type);
2921
2922 const fn_proto = blk: {
2923 if (params.items.len < 2) {
2924 break :blk try c.addNode(.{
2925 .tag = .fn_proto_simple,
2926 .main_token = fn_token,
2927 .data = .{ .opt_node_and_opt_node = .{
2928 if (params.items.len == 0) .none else params.items[0].toOptional(),
2929 return_type_expr.toOptional(),
2930 } },
2931 });
2932 } else {
2933 const span: NodeSubRange = try c.listToSpan(params.items);
2934 break :blk try c.addNode(.{
2935 .tag = .fn_proto_multi,
2936 .main_token = fn_token,
2937 .data = .{ .extra_and_opt_node = .{
2938 try c.addExtra(std.zig.Ast.Node.SubRange{
2939 .start = span.start,
2940 .end = span.end,
2941 }),
2942 return_type_expr.toOptional(),
2943 } },
2944 });
2945 }
2946 };
2947 return c.addNode(.{
2948 .tag = .fn_decl,
2949 .main_token = fn_token,
2950 .data = .{ .node_and_node = .{
2951 fn_proto,
2952 try renderNode(c, payload.body),
2953 } },
2954 });
2955}
2956
2957fn renderParams(c: *Context, params: []Payload.Param, is_var_args: bool) !std.array_list.Managed(NodeIndex) {
2958 _ = try c.addToken(.l_paren, "(");
2959 var rendered = try std.array_list.Managed(NodeIndex).initCapacity(c.gpa, params.len);
2960 errdefer rendered.deinit();
2961
2962 for (params, 0..) |param, i| {
2963 if (i != 0) _ = try c.addToken(.comma, ",");
2964 if (param.is_noalias) _ = try c.addToken(.keyword_noalias, "noalias");
2965 if (param.name) |some| {
2966 _ = try c.addIdentifier(some);
2967 _ = try c.addToken(.colon, ":");
2968 }
2969 if (param.type.tag() == .@"anytype") {
2970 _ = try c.addToken(.keyword_anytype, "anytype");
2971 continue;
2972 }
2973 rendered.appendAssumeCapacity(try renderNode(c, param.type));
2974 }
2975 if (is_var_args) {
2976 if (params.len != 0) _ = try c.addToken(.comma, ",");
2977 _ = try c.addToken(.ellipsis3, "...");
2978 }
2979 _ = try c.addToken(.r_paren, ")");
2980
2981 return rendered;
2982}
lib/compiler/translate-c/lib/c_builtins.zig created+301
......@@ -0,0 +1,301 @@
1const std = @import("std");
2
3/// Standard C Library bug: The absolute value of the most negative integer remains negative.
4pub inline fn abs(val: c_int) c_int {
5 return if (val == std.math.minInt(c_int)) val else @intCast(@abs(val));
6}
7
8pub inline fn assume(cond: bool) void {
9 if (!cond) unreachable;
10}
11
12pub inline fn bswap16(val: u16) u16 {
13 return @byteSwap(val);
14}
15
16pub inline fn bswap32(val: u32) u32 {
17 return @byteSwap(val);
18}
19
20pub inline fn bswap64(val: u64) u64 {
21 return @byteSwap(val);
22}
23
24pub inline fn ceilf(val: f32) f32 {
25 return @ceil(val);
26}
27
28pub inline fn ceil(val: f64) f64 {
29 return @ceil(val);
30}
31
32/// Returns the number of leading 0-bits in x, starting at the most significant bit position.
33/// In C if `val` is 0, the result is undefined; in zig it's the number of bits in a c_uint
34pub inline fn clz(val: c_uint) c_int {
35 @setRuntimeSafety(false);
36 return @as(c_int, @bitCast(@as(c_uint, @clz(val))));
37}
38
39pub inline fn constant_p(expr: anytype) c_int {
40 _ = expr;
41 return @intFromBool(false);
42}
43
44pub inline fn cosf(val: f32) f32 {
45 return @cos(val);
46}
47
48pub inline fn cos(val: f64) f64 {
49 return @cos(val);
50}
51
52/// Returns the number of trailing 0-bits in val, starting at the least significant bit position.
53/// In C if `val` is 0, the result is undefined; in zig it's the number of bits in a c_uint
54pub inline fn ctz(val: c_uint) c_int {
55 @setRuntimeSafety(false);
56 return @as(c_int, @bitCast(@as(c_uint, @ctz(val))));
57}
58
59pub inline fn exp2f(val: f32) f32 {
60 return @exp2(val);
61}
62
63pub inline fn exp2(val: f64) f64 {
64 return @exp2(val);
65}
66
67pub inline fn expf(val: f32) f32 {
68 return @exp(val);
69}
70
71pub inline fn exp(val: f64) f64 {
72 return @exp(val);
73}
74
75/// The return value of __builtin_expect is `expr`. `c` is the expected value
76/// of `expr` and is used as a hint to the compiler in C. Here it is unused.
77pub inline fn expect(expr: c_long, c: c_long) c_long {
78 _ = c;
79 return expr;
80}
81
82pub inline fn fabsf(val: f32) f32 {
83 return @abs(val);
84}
85
86pub inline fn fabs(val: f64) f64 {
87 return @abs(val);
88}
89
90pub inline fn floorf(val: f32) f32 {
91 return @floor(val);
92}
93
94pub inline fn floor(val: f64) f64 {
95 return @floor(val);
96}
97
98pub inline fn has_builtin(func: anytype) c_int {
99 _ = func;
100 return @intFromBool(true);
101}
102
103pub inline fn huge_valf() f32 {
104 return std.math.inf(f32);
105}
106
107pub inline fn inff() f32 {
108 return std.math.inf(f32);
109}
110
111/// Similar to isinf, except the return value is -1 for an argument of -Inf and 1 for an argument of +Inf.
112pub inline fn isinf_sign(x: anytype) c_int {
113 if (!std.math.isInf(x)) return 0;
114 return if (std.math.isPositiveInf(x)) 1 else -1;
115}
116
117pub inline fn isinf(x: anytype) c_int {
118 return @intFromBool(std.math.isInf(x));
119}
120
121pub inline fn isnan(x: anytype) c_int {
122 return @intFromBool(std.math.isNan(x));
123}
124
125/// Standard C Library bug: The absolute value of the most negative integer remains negative.
126pub inline fn labs(val: c_long) c_long {
127 return if (val == std.math.minInt(c_long)) val else @intCast(@abs(val));
128}
129
130/// Standard C Library bug: The absolute value of the most negative integer remains negative.
131pub inline fn llabs(val: c_longlong) c_longlong {
132 return if (val == std.math.minInt(c_longlong)) val else @intCast(@abs(val));
133}
134
135pub inline fn log10f(val: f32) f32 {
136 return @log10(val);
137}
138
139pub inline fn log10(val: f64) f64 {
140 return @log10(val);
141}
142
143pub inline fn log2f(val: f32) f32 {
144 return @log2(val);
145}
146
147pub inline fn log2(val: f64) f64 {
148 return @log2(val);
149}
150
151pub inline fn logf(val: f32) f32 {
152 return @log(val);
153}
154
155pub inline fn log(val: f64) f64 {
156 return @log(val);
157}
158
159pub inline fn memcpy_chk(
160 noalias dst: ?*anyopaque,
161 noalias src: ?*const anyopaque,
162 len: usize,
163 remaining: usize,
164) ?*anyopaque {
165 if (len > remaining) @panic("__builtin___memcpy_chk called with len > remaining");
166 if (len > 0) @memcpy(
167 @as([*]u8, @ptrCast(dst.?))[0..len],
168 @as([*]const u8, @ptrCast(src.?)),
169 );
170 return dst;
171}
172
173pub inline fn memcpy(
174 noalias dst: ?*anyopaque,
175 noalias src: ?*const anyopaque,
176 len: usize,
177) ?*anyopaque {
178 if (len > 0) @memcpy(
179 @as([*]u8, @ptrCast(dst.?))[0..len],
180 @as([*]const u8, @ptrCast(src.?)),
181 );
182 return dst;
183}
184
185pub inline fn memset_chk(
186 dst: ?*anyopaque,
187 val: c_int,
188 len: usize,
189 remaining: usize,
190) ?*anyopaque {
191 if (len > remaining) @panic("__builtin___memset_chk called with len > remaining");
192 const dst_cast = @as([*c]u8, @ptrCast(dst));
193 @memset(dst_cast[0..len], @as(u8, @bitCast(@as(i8, @truncate(val)))));
194 return dst;
195}
196
197pub inline fn memset(dst: ?*anyopaque, val: c_int, len: usize) ?*anyopaque {
198 const dst_cast = @as([*c]u8, @ptrCast(dst));
199 @memset(dst_cast[0..len], @as(u8, @bitCast(@as(i8, @truncate(val)))));
200 return dst;
201}
202
203pub fn mul_overflow(a: anytype, b: anytype, result: *@TypeOf(a, b)) c_int {
204 const res = @mulWithOverflow(a, b);
205 result.* = res[0];
206 return res[1];
207}
208
209/// returns a quiet NaN. Quiet NaNs have many representations; tagp is used to select one in an
210/// implementation-defined way.
211/// This implementation is based on the description for nan provided in the GCC docs at
212/// https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005fnan
213/// Comment is reproduced below:
214/// Since ISO C99 defines this function in terms of strtod, which we do not implement, a description
215/// of the parsing is in order.
216/// The string is parsed as by strtol; that is, the base is recognized by leading ‘0’ or ‘0x’ prefixes.
217/// The number parsed is placed in the significand such that the least significant bit of the number is
218/// at the least significant bit of the significand.
219/// The number is truncated to fit the significand field provided.
220/// The significand is forced to be a quiet NaN.
221///
222/// If tagp contains any non-numeric characters, the function returns a NaN whose significand is zero.
223/// If tagp is empty, the function returns a NaN whose significand is zero.
224pub inline fn nanf(tagp: []const u8) f32 {
225 const parsed = std.fmt.parseUnsigned(c_ulong, tagp, 0) catch 0;
226 const bits: u23 = @truncate(parsed); // single-precision float trailing significand is 23 bits
227 return @bitCast(@as(u32, bits) | @as(u32, @bitCast(std.math.nan(f32))));
228}
229
230pub inline fn object_size(ptr: ?*const anyopaque, ty: c_int) usize {
231 _ = ptr;
232 // clang semantics match gcc's: https://gcc.gnu.org/onlinedocs/gcc/Object-Size-Checking.html
233 // If it is not possible to determine which objects ptr points to at compile time,
234 // object_size should return (size_t) -1 for type 0 or 1 and (size_t) 0
235 // for type 2 or 3.
236 if (ty == 0 or ty == 1) return @as(usize, @bitCast(-@as(isize, 1)));
237 if (ty == 2 or ty == 3) return 0;
238 unreachable;
239}
240
241/// popcount of a c_uint will never exceed the capacity of a c_int
242pub inline fn popcount(val: c_uint) c_int {
243 @setRuntimeSafety(false);
244 return @as(c_int, @bitCast(@as(c_uint, @popCount(val))));
245}
246
247pub inline fn roundf(val: f32) f32 {
248 return @round(val);
249}
250
251pub inline fn round(val: f64) f64 {
252 return @round(val);
253}
254
255pub inline fn signbitf(val: f32) c_int {
256 return @intFromBool(std.math.signbit(val));
257}
258
259pub inline fn signbit(val: f64) c_int {
260 return @intFromBool(std.math.signbit(val));
261}
262
263pub inline fn sinf(val: f32) f32 {
264 return @sin(val);
265}
266
267pub inline fn sin(val: f64) f64 {
268 return @sin(val);
269}
270
271pub inline fn sqrtf(val: f32) f32 {
272 return @sqrt(val);
273}
274
275pub inline fn sqrt(val: f64) f64 {
276 return @sqrt(val);
277}
278
279pub inline fn strcmp(s1: [*c]const u8, s2: [*c]const u8) c_int {
280 return switch (std.mem.orderZ(u8, s1, s2)) {
281 .lt => -1,
282 .eq => 0,
283 .gt => 1,
284 };
285}
286
287pub inline fn strlen(s: [*c]const u8) usize {
288 return std.mem.sliceTo(s, 0).len;
289}
290
291pub inline fn truncf(val: f32) f32 {
292 return @trunc(val);
293}
294
295pub inline fn trunc(val: f64) f64 {
296 return @trunc(val);
297}
298
299pub inline fn @"unreachable"() noreturn {
300 unreachable;
301}
lib/compiler/translate-c/lib/helpers.zig created+413
......@@ -0,0 +1,413 @@
1const std = @import("std");
2
3/// "Usual arithmetic conversions" from C11 standard 6.3.1.8
4pub fn ArithmeticConversion(comptime A: type, comptime B: type) type {
5 if (A == c_longdouble or B == c_longdouble) return c_longdouble;
6 if (A == f80 or B == f80) return f80;
7 if (A == f64 or B == f64) return f64;
8 if (A == f32 or B == f32) return f32;
9
10 const A_Promoted = PromotedIntType(A);
11 const B_Promoted = PromotedIntType(B);
12 comptime {
13 std.debug.assert(integerRank(A_Promoted) >= integerRank(c_int));
14 std.debug.assert(integerRank(B_Promoted) >= integerRank(c_int));
15 }
16
17 if (A_Promoted == B_Promoted) return A_Promoted;
18
19 const a_signed = @typeInfo(A_Promoted).int.signedness == .signed;
20 const b_signed = @typeInfo(B_Promoted).int.signedness == .signed;
21
22 if (a_signed == b_signed) {
23 return if (integerRank(A_Promoted) > integerRank(B_Promoted)) A_Promoted else B_Promoted;
24 }
25
26 const SignedType = if (a_signed) A_Promoted else B_Promoted;
27 const UnsignedType = if (!a_signed) A_Promoted else B_Promoted;
28
29 if (integerRank(UnsignedType) >= integerRank(SignedType)) return UnsignedType;
30
31 if (std.math.maxInt(SignedType) >= std.math.maxInt(UnsignedType)) return SignedType;
32
33 return ToUnsigned(SignedType);
34}
35
36/// Integer promotion described in C11 6.3.1.1.2
37fn PromotedIntType(comptime T: type) type {
38 return switch (T) {
39 bool, c_short => c_int,
40 c_ushort => if (@sizeOf(c_ushort) == @sizeOf(c_int)) c_uint else c_int,
41 c_int, c_uint, c_long, c_ulong, c_longlong, c_ulonglong => T,
42 else => switch (@typeInfo(T)) {
43 .comptime_int => @compileError("Cannot promote `" ++ @typeName(T) ++ "`; a fixed-size number type is required"),
44 // promote to c_int if it can represent all values of T
45 .int => |int_info| if (int_info.bits < @bitSizeOf(c_int))
46 c_int
47 // otherwise, restore the original C type
48 else if (int_info.bits == @bitSizeOf(c_int))
49 if (int_info.signedness == .unsigned) c_uint else c_int
50 else if (int_info.bits <= @bitSizeOf(c_long))
51 if (int_info.signedness == .unsigned) c_ulong else c_long
52 else if (int_info.bits <= @bitSizeOf(c_longlong))
53 if (int_info.signedness == .unsigned) c_ulonglong else c_longlong
54 else
55 @compileError("Cannot promote `" ++ @typeName(T) ++ "`; a C ABI type is required"),
56 else => @compileError("Attempted to promote invalid type `" ++ @typeName(T) ++ "`"),
57 },
58 };
59}
60
61/// C11 6.3.1.1.1
62fn integerRank(comptime T: type) u8 {
63 return switch (T) {
64 bool => 0,
65 u8, i8 => 1,
66 c_short, c_ushort => 2,
67 c_int, c_uint => 3,
68 c_long, c_ulong => 4,
69 c_longlong, c_ulonglong => 5,
70 else => @compileError("integer rank not supported for `" ++ @typeName(T) ++ "`"),
71 };
72}
73
74fn ToUnsigned(comptime T: type) type {
75 return switch (T) {
76 c_int => c_uint,
77 c_long => c_ulong,
78 c_longlong => c_ulonglong,
79 else => @compileError("Cannot convert `" ++ @typeName(T) ++ "` to unsigned"),
80 };
81}
82
83/// Constructs a [*c] pointer with the const and volatile annotations
84/// from SelfType for pointing to a C flexible array of ElementType.
85pub fn FlexibleArrayType(comptime SelfType: type, comptime ElementType: type) type {
86 switch (@typeInfo(SelfType)) {
87 .pointer => |ptr| {
88 return @Type(.{ .pointer = .{
89 .size = .c,
90 .is_const = ptr.is_const,
91 .is_volatile = ptr.is_volatile,
92 .alignment = @alignOf(ElementType),
93 .address_space = .generic,
94 .child = ElementType,
95 .is_allowzero = true,
96 .sentinel_ptr = null,
97 } });
98 },
99 else => |info| @compileError("Invalid self type \"" ++ @tagName(info) ++ "\" for flexible array getter: " ++ @typeName(SelfType)),
100 }
101}
102
103/// Promote the type of an integer literal until it fits as C would.
104pub fn promoteIntLiteral(
105 comptime SuffixType: type,
106 comptime number: comptime_int,
107 comptime base: CIntLiteralBase,
108) PromoteIntLiteralReturnType(SuffixType, number, base) {
109 return number;
110}
111
112const CIntLiteralBase = enum { decimal, octal, hex };
113
114fn PromoteIntLiteralReturnType(comptime SuffixType: type, comptime number: comptime_int, comptime base: CIntLiteralBase) type {
115 const signed_decimal = [_]type{ c_int, c_long, c_longlong, c_ulonglong };
116 const signed_oct_hex = [_]type{ c_int, c_uint, c_long, c_ulong, c_longlong, c_ulonglong };
117 const unsigned = [_]type{ c_uint, c_ulong, c_ulonglong };
118
119 const list: []const type = if (@typeInfo(SuffixType).int.signedness == .unsigned)
120 &unsigned
121 else if (base == .decimal)
122 &signed_decimal
123 else
124 &signed_oct_hex;
125
126 var pos = std.mem.indexOfScalar(type, list, SuffixType).?;
127 while (pos < list.len) : (pos += 1) {
128 if (number >= std.math.minInt(list[pos]) and number <= std.math.maxInt(list[pos])) {
129 return list[pos];
130 }
131 }
132
133 @compileError("Integer literal is too large");
134}
135
136/// Convert from clang __builtin_shufflevector index to Zig @shuffle index
137/// clang requires __builtin_shufflevector index arguments to be integer constants.
138/// negative values for `this_index` indicate "don't care".
139/// clang enforces that `this_index` is less than the total number of vector elements
140/// See https://ziglang.org/documentation/master/#shuffle
141/// See https://clang.llvm.org/docs/LanguageExtensions.html#langext-builtin-shufflevector
142pub fn shuffleVectorIndex(comptime this_index: c_int, comptime source_vector_len: usize) i32 {
143 const positive_index = std.math.cast(usize, this_index) orelse return undefined;
144 if (positive_index < source_vector_len) return @as(i32, @intCast(this_index));
145 const b_index = positive_index - source_vector_len;
146 return ~@as(i32, @intCast(b_index));
147}
148
149/// C `%` operator for signed integers
150/// C standard states: "If the quotient a/b is representable, the expression (a/b)*b + a%b shall equal a"
151/// The quotient is not representable if denominator is zero, or if numerator is the minimum integer for
152/// the type and denominator is -1. C has undefined behavior for those two cases; this function has safety
153/// checked undefined behavior
154pub fn signedRemainder(numerator: anytype, denominator: anytype) @TypeOf(numerator, denominator) {
155 std.debug.assert(@typeInfo(@TypeOf(numerator, denominator)).int.signedness == .signed);
156 if (denominator > 0) return @rem(numerator, denominator);
157 return numerator - @divTrunc(numerator, denominator) * denominator;
158}
159
160/// Given a type and value, cast the value to the type as c would.
161pub fn cast(comptime DestType: type, target: anytype) DestType {
162 // this function should behave like transCCast in translate-c, except it's for macros
163 const SourceType = @TypeOf(target);
164 switch (@typeInfo(DestType)) {
165 .@"fn" => return castToPtr(*const DestType, SourceType, target),
166 .pointer => return castToPtr(DestType, SourceType, target),
167 .optional => |dest_opt| {
168 if (@typeInfo(dest_opt.child) == .pointer) {
169 return castToPtr(DestType, SourceType, target);
170 } else if (@typeInfo(dest_opt.child) == .@"fn") {
171 return castToPtr(?*const dest_opt.child, SourceType, target);
172 }
173 },
174 .int => {
175 switch (@typeInfo(SourceType)) {
176 .pointer => {
177 return castInt(DestType, @intFromPtr(target));
178 },
179 .optional => |opt| {
180 if (@typeInfo(opt.child) == .pointer) {
181 return castInt(DestType, @intFromPtr(target));
182 }
183 },
184 .int => {
185 return castInt(DestType, target);
186 },
187 .@"fn" => {
188 return castInt(DestType, @intFromPtr(&target));
189 },
190 .bool => {
191 return @intFromBool(target);
192 },
193 else => {},
194 }
195 },
196 .float => {
197 switch (@typeInfo(SourceType)) {
198 .int => return @as(DestType, @floatFromInt(target)),
199 .float => return @as(DestType, @floatCast(target)),
200 .bool => return @as(DestType, @floatFromInt(@intFromBool(target))),
201 else => {},
202 }
203 },
204 .@"union" => |info| {
205 inline for (info.fields) |field| {
206 if (field.type == SourceType) return @unionInit(DestType, field.name, target);
207 }
208
209 @compileError("cast to union type '" ++ @typeName(DestType) ++ "' from type '" ++ @typeName(SourceType) ++ "' which is not present in union");
210 },
211 .bool => return cast(usize, target) != 0,
212 else => {},
213 }
214
215 return @as(DestType, target);
216}
217
218fn castInt(comptime DestType: type, target: anytype) DestType {
219 const dest = @typeInfo(DestType).int;
220 const source = @typeInfo(@TypeOf(target)).int;
221
222 const Int = @Type(.{ .int = .{ .bits = dest.bits, .signedness = source.signedness } });
223
224 if (dest.bits < source.bits)
225 return @as(DestType, @bitCast(@as(Int, @truncate(target))))
226 else
227 return @as(DestType, @bitCast(@as(Int, target)));
228}
229
230fn castPtr(comptime DestType: type, target: anytype) DestType {
231 return @constCast(@volatileCast(@alignCast(@ptrCast(target))));
232}
233
234fn castToPtr(comptime DestType: type, comptime SourceType: type, target: anytype) DestType {
235 switch (@typeInfo(SourceType)) {
236 .int => {
237 return @as(DestType, @ptrFromInt(castInt(usize, target)));
238 },
239 .comptime_int => {
240 if (target < 0)
241 return @as(DestType, @ptrFromInt(@as(usize, @bitCast(@as(isize, @intCast(target))))))
242 else
243 return @as(DestType, @ptrFromInt(@as(usize, @intCast(target))));
244 },
245 .pointer => {
246 return castPtr(DestType, target);
247 },
248 .@"fn" => {
249 return castPtr(DestType, &target);
250 },
251 .optional => |target_opt| {
252 if (@typeInfo(target_opt.child) == .pointer) {
253 return castPtr(DestType, target);
254 }
255 },
256 else => {},
257 }
258
259 return @as(DestType, target);
260}
261
262/// Given a value returns its size as C's sizeof operator would.
263pub fn sizeof(target: anytype) usize {
264 const T: type = if (@TypeOf(target) == type) target else @TypeOf(target);
265 switch (@typeInfo(T)) {
266 .float, .int, .@"struct", .@"union", .array, .bool, .vector => return @sizeOf(T),
267 .@"fn" => {
268 // sizeof(main) in C returns 1
269 return 1;
270 },
271 .null => return @sizeOf(*anyopaque),
272 .void => {
273 // Note: sizeof(void) is 1 on clang/gcc and 0 on MSVC.
274 return 1;
275 },
276 .@"opaque" => {
277 if (T == anyopaque) {
278 // Note: sizeof(void) is 1 on clang/gcc and 0 on MSVC.
279 return 1;
280 } else {
281 @compileError("Cannot use C sizeof on opaque type " ++ @typeName(T));
282 }
283 },
284 .optional => |opt| {
285 if (@typeInfo(opt.child) == .pointer) {
286 return sizeof(opt.child);
287 } else {
288 @compileError("Cannot use C sizeof on non-pointer optional " ++ @typeName(T));
289 }
290 },
291 .pointer => |ptr| {
292 if (ptr.size == .slice) {
293 @compileError("Cannot use C sizeof on slice type " ++ @typeName(T));
294 }
295
296 // for strings, sizeof("a") returns 2.
297 // normal pointer decay scenarios from C are handled
298 // in the .array case above, but strings remain literals
299 // and are therefore always pointers, so they need to be
300 // specially handled here.
301 if (ptr.size == .one and ptr.is_const and @typeInfo(ptr.child) == .array) {
302 const array_info = @typeInfo(ptr.child).array;
303 if ((array_info.child == u8 or array_info.child == u16) and array_info.sentinel() == 0) {
304 // length of the string plus one for the null terminator.
305 return (array_info.len + 1) * @sizeOf(array_info.child);
306 }
307 }
308
309 // When zero sized pointers are removed, this case will no
310 // longer be reachable and can be deleted.
311 if (@sizeOf(T) == 0) {
312 return @sizeOf(*anyopaque);
313 }
314
315 return @sizeOf(T);
316 },
317 .comptime_float => return @sizeOf(f64), // TODO c_double #3999
318 .comptime_int => {
319 // TODO to get the correct result we have to translate
320 // `1073741824 * 4` as `int(1073741824) *% int(4)` since
321 // sizeof(1073741824 * 4) != sizeof(4294967296).
322
323 // TODO test if target fits in int, long or long long
324 return @sizeOf(c_int);
325 },
326 else => @compileError("__helpers.sizeof does not support type " ++ @typeName(T)),
327 }
328}
329
330pub fn div(a: anytype, b: anytype) ArithmeticConversion(@TypeOf(a), @TypeOf(b)) {
331 const ResType = ArithmeticConversion(@TypeOf(a), @TypeOf(b));
332 const a_casted = cast(ResType, a);
333 const b_casted = cast(ResType, b);
334 switch (@typeInfo(ResType)) {
335 .float => return a_casted / b_casted,
336 .int => return @divTrunc(a_casted, b_casted),
337 else => unreachable,
338 }
339}
340
341pub fn rem(a: anytype, b: anytype) ArithmeticConversion(@TypeOf(a), @TypeOf(b)) {
342 const ResType = ArithmeticConversion(@TypeOf(a), @TypeOf(b));
343 const a_casted = cast(ResType, a);
344 const b_casted = cast(ResType, b);
345 switch (@typeInfo(ResType)) {
346 .int => {
347 if (@typeInfo(ResType).int.signedness == .signed) {
348 return signedRemainder(a_casted, b_casted);
349 } else {
350 return a_casted % b_casted;
351 }
352 },
353 else => unreachable,
354 }
355}
356
357/// A 2-argument function-like macro defined as #define FOO(A, B) (A)(B)
358/// could be either: cast B to A, or call A with the value B.
359pub fn CAST_OR_CALL(a: anytype, b: anytype) switch (@typeInfo(@TypeOf(a))) {
360 .type => a,
361 .@"fn" => |fn_info| fn_info.return_type orelse void,
362 else => |info| @compileError("Unexpected argument type: " ++ @tagName(info)),
363} {
364 switch (@typeInfo(@TypeOf(a))) {
365 .type => return cast(a, b),
366 .@"fn" => return a(b),
367 else => unreachable, // return type will be a compile error otherwise
368 }
369}
370
371pub inline fn DISCARD(x: anytype) void {
372 _ = x;
373}
374
375pub fn F_SUFFIX(comptime f: comptime_float) f32 {
376 return @as(f32, f);
377}
378
379fn L_SUFFIX_ReturnType(comptime number: anytype) type {
380 switch (@typeInfo(@TypeOf(number))) {
381 .int, .comptime_int => return @TypeOf(promoteIntLiteral(c_long, number, .decimal)),
382 .float, .comptime_float => return c_longdouble,
383 else => @compileError("Invalid value for L suffix"),
384 }
385}
386
387pub fn L_SUFFIX(comptime number: anytype) L_SUFFIX_ReturnType(number) {
388 switch (@typeInfo(@TypeOf(number))) {
389 .int, .comptime_int => return promoteIntLiteral(c_long, number, .decimal),
390 .float, .comptime_float => @compileError("TODO: c_longdouble initialization from comptime_float not supported"),
391 else => @compileError("Invalid value for L suffix"),
392 }
393}
394
395pub fn LL_SUFFIX(comptime n: comptime_int) @TypeOf(promoteIntLiteral(c_longlong, n, .decimal)) {
396 return promoteIntLiteral(c_longlong, n, .decimal);
397}
398
399pub fn U_SUFFIX(comptime n: comptime_int) @TypeOf(promoteIntLiteral(c_uint, n, .decimal)) {
400 return promoteIntLiteral(c_uint, n, .decimal);
401}
402
403pub fn UL_SUFFIX(comptime n: comptime_int) @TypeOf(promoteIntLiteral(c_ulong, n, .decimal)) {
404 return promoteIntLiteral(c_ulong, n, .decimal);
405}
406
407pub fn ULL_SUFFIX(comptime n: comptime_int) @TypeOf(promoteIntLiteral(c_ulonglong, n, .decimal)) {
408 return promoteIntLiteral(c_ulonglong, n, .decimal);
409}
410
411pub fn WL_CONTAINER_OF(ptr: anytype, sample: anytype, comptime member: []const u8) @TypeOf(sample) {
412 return @fieldParentPtr(member, ptr);
413}
lib/compiler/translate-c/src/MacroTranslator.zig created+1307
......@@ -0,0 +1,1307 @@
1const std = @import("std");
2const math = std.math;
3const mem = std.mem;
4const assert = std.debug.assert;
5
6const aro = @import("aro");
7const CToken = aro.Tokenizer.Token;
8
9const ast = @import("ast.zig");
10const builtins = @import("builtins.zig");
11const ZigNode = ast.Node;
12const ZigTag = ZigNode.Tag;
13const Scope = @import("Scope.zig");
14const Translator = @import("Translator.zig");
15
16const Error = Translator.Error;
17pub const ParseError = Error || error{ParseError};
18
19const MacroTranslator = @This();
20
21t: *Translator,
22macro: aro.Preprocessor.Macro,
23name: []const u8,
24
25tokens: []const CToken,
26source: []const u8,
27i: usize = 0,
28/// If an object macro references a global var it needs to be converted into
29/// an inline function.
30refs_var_decl: bool = false,
31
32fn peek(mt: *MacroTranslator) CToken.Id {
33 if (mt.i >= mt.tokens.len) return .eof;
34 return mt.tokens[mt.i].id;
35}
36
37fn eat(mt: *MacroTranslator, expected_id: CToken.Id) bool {
38 if (mt.peek() == expected_id) {
39 mt.i += 1;
40 return true;
41 }
42 return false;
43}
44
45fn expect(mt: *MacroTranslator, expected_id: CToken.Id) ParseError!void {
46 const next_id = mt.peek();
47 if (next_id != expected_id and !(expected_id == .identifier and next_id == .extended_identifier)) {
48 try mt.fail(
49 "unable to translate C expr: expected '{s}' instead got '{s}'",
50 .{ expected_id.symbol(), next_id.symbol() },
51 );
52 return error.ParseError;
53 }
54 mt.i += 1;
55}
56
57fn fail(mt: *MacroTranslator, comptime fmt: []const u8, args: anytype) !void {
58 return mt.t.failDeclExtra(&mt.t.global_scope.base, mt.macro.loc, mt.name, fmt, args);
59}
60
61fn tokSlice(mt: *const MacroTranslator) []const u8 {
62 const tok = mt.tokens[mt.i];
63 return mt.source[tok.start..tok.end];
64}
65
66pub fn transFnMacro(mt: *MacroTranslator) ParseError!void {
67 var block_scope = try Scope.Block.init(mt.t, &mt.t.global_scope.base, false);
68 defer block_scope.deinit();
69 const scope = &block_scope.base;
70
71 const fn_params = try mt.t.arena.alloc(ast.Payload.Param, mt.macro.params.len);
72 for (fn_params, mt.macro.params) |*param, param_name| {
73 const mangled_name = try block_scope.makeMangledName(param_name);
74 param.* = .{
75 .is_noalias = false,
76 .name = mangled_name,
77 .type = ZigTag.@"anytype".init(),
78 };
79 try block_scope.discardVariable(mangled_name);
80 }
81
82 const expr = try mt.parseCExpr(scope);
83 const last = mt.peek();
84 if (last != .eof)
85 return mt.fail("unable to translate C expr: unexpected token '{s}'", .{last.symbol()});
86
87 const typeof_arg = if (expr.castTag(.block)) |some| blk: {
88 const stmts = some.data.stmts;
89 const blk_last = stmts[stmts.len - 1];
90 const br = blk_last.castTag(.break_val).?;
91 break :blk br.data.val;
92 } else expr;
93
94 const return_type = ret: {
95 if (typeof_arg.castTag(.helper_call)) |some| {
96 if (std.mem.eql(u8, some.data.name, "cast")) {
97 break :ret some.data.args[0];
98 }
99 }
100 if (typeof_arg.castTag(.std_mem_zeroinit)) |some| break :ret some.data.lhs;
101 if (typeof_arg.castTag(.std_mem_zeroes)) |some| break :ret some.data;
102 break :ret try ZigTag.typeof.create(mt.t.arena, typeof_arg);
103 };
104
105 const return_expr = try ZigTag.@"return".create(mt.t.arena, expr);
106 try block_scope.statements.append(mt.t.gpa, return_expr);
107
108 const fn_decl = try ZigTag.pub_inline_fn.create(mt.t.arena, .{
109 .name = mt.name,
110 .params = fn_params,
111 .return_type = return_type,
112 .body = try block_scope.complete(),
113 });
114 try mt.t.addTopLevelDecl(mt.name, fn_decl);
115}
116
117pub fn transMacro(mt: *MacroTranslator) ParseError!void {
118 const scope = &mt.t.global_scope.base;
119
120 // Check if the macro only uses other blank macros.
121 while (true) {
122 switch (mt.peek()) {
123 .identifier, .extended_identifier => {
124 if (mt.t.global_scope.blank_macros.contains(mt.tokSlice())) {
125 mt.i += 1;
126 continue;
127 }
128 },
129 .eof, .nl => {
130 try mt.t.global_scope.blank_macros.put(mt.t.gpa, mt.name, {});
131 const init_node = try ZigTag.string_literal.create(mt.t.arena, "\"\"");
132 const var_decl = try ZigTag.pub_var_simple.create(mt.t.arena, .{ .name = mt.name, .init = init_node });
133 try mt.t.addTopLevelDecl(mt.name, var_decl);
134 return;
135 },
136 else => {},
137 }
138 break;
139 }
140
141 const init_node = try mt.parseCExpr(scope);
142 const last = mt.peek();
143 if (last != .eof)
144 return mt.fail("unable to translate C expr: unexpected token '{s}'", .{last.symbol()});
145
146 const node = node: {
147 const var_decl = try ZigTag.pub_var_simple.create(mt.t.arena, .{ .name = mt.name, .init = init_node });
148
149 if (mt.t.getFnProto(var_decl)) |proto_node| {
150 // If a macro aliases a global variable which is a function pointer, we conclude that
151 // the macro is intended to represent a function that assumes the function pointer
152 // variable is non-null and calls it.
153 break :node try mt.createMacroFn(mt.name, var_decl, proto_node);
154 } else if (mt.refs_var_decl) {
155 const return_type = try ZigTag.typeof.create(mt.t.arena, init_node);
156 const return_expr = try ZigTag.@"return".create(mt.t.arena, init_node);
157 const block = try ZigTag.block_single.create(mt.t.arena, return_expr);
158
159 const loc_str = try mt.t.locStr(mt.macro.loc);
160 const value = try std.fmt.allocPrint(mt.t.arena, "\n// {s}: warning: macro '{s}' contains a runtime value, translated to function", .{ loc_str, mt.name });
161 try scope.appendNode(try ZigTag.warning.create(mt.t.arena, value));
162
163 break :node try ZigTag.pub_inline_fn.create(mt.t.arena, .{
164 .name = mt.name,
165 .params = &.{},
166 .return_type = return_type,
167 .body = block,
168 });
169 }
170
171 break :node var_decl;
172 };
173
174 try mt.t.addTopLevelDecl(mt.name, node);
175}
176
177fn createMacroFn(mt: *MacroTranslator, name: []const u8, ref: ZigNode, proto_alias: *ast.Payload.Func) !ZigNode {
178 var fn_params = std.ArrayList(ast.Payload.Param).init(mt.t.gpa);
179 defer fn_params.deinit();
180
181 var block_scope = try Scope.Block.init(mt.t, &mt.t.global_scope.base, false);
182 defer block_scope.deinit();
183
184 for (proto_alias.data.params) |param| {
185 const param_name = try block_scope.makeMangledName(param.name orelse "arg");
186
187 try fn_params.append(.{
188 .name = param_name,
189 .type = param.type,
190 .is_noalias = param.is_noalias,
191 });
192 }
193
194 const init = if (ref.castTag(.var_decl)) |v|
195 v.data.init.?
196 else if (ref.castTag(.var_simple) orelse ref.castTag(.pub_var_simple)) |v|
197 v.data.init
198 else
199 unreachable;
200
201 const unwrap_expr = try ZigTag.unwrap.create(mt.t.arena, init);
202 const args = try mt.t.arena.alloc(ZigNode, fn_params.items.len);
203 for (fn_params.items, 0..) |param, i| {
204 args[i] = try ZigTag.identifier.create(mt.t.arena, param.name.?);
205 }
206 const call_expr = try ZigTag.call.create(mt.t.arena, .{
207 .lhs = unwrap_expr,
208 .args = args,
209 });
210 const return_expr = try ZigTag.@"return".create(mt.t.arena, call_expr);
211 const block = try ZigTag.block_single.create(mt.t.arena, return_expr);
212
213 return ZigTag.pub_inline_fn.create(mt.t.arena, .{
214 .name = name,
215 .params = try mt.t.arena.dupe(ast.Payload.Param, fn_params.items),
216 .return_type = proto_alias.data.return_type,
217 .body = block,
218 });
219}
220
221fn parseCExpr(mt: *MacroTranslator, scope: *Scope) ParseError!ZigNode {
222 // TODO parseCAssignExpr here
223 var block_scope = try Scope.Block.init(mt.t, scope, true);
224 defer block_scope.deinit();
225
226 const node = try mt.parseCCondExpr(&block_scope.base);
227 if (!mt.eat(.comma)) return node;
228
229 var last = node;
230 while (true) {
231 // suppress result
232 const ignore = try ZigTag.discard.create(mt.t.arena, .{ .should_skip = false, .value = last });
233 try block_scope.statements.append(mt.t.gpa, ignore);
234
235 last = try mt.parseCCondExpr(&block_scope.base);
236 if (!mt.eat(.comma)) break;
237 }
238
239 const break_node = try ZigTag.break_val.create(mt.t.arena, .{
240 .label = block_scope.label,
241 .val = last,
242 });
243 try block_scope.statements.append(mt.t.gpa, break_node);
244 return try block_scope.complete();
245}
246
247fn parseCNumLit(mt: *MacroTranslator) ParseError!ZigNode {
248 const lit_bytes = mt.tokSlice();
249 mt.i += 1;
250
251 var bytes = try std.ArrayListUnmanaged(u8).initCapacity(mt.t.arena, lit_bytes.len + 3);
252
253 const prefix = aro.Tree.Token.NumberPrefix.fromString(lit_bytes);
254 switch (prefix) {
255 .binary => bytes.appendSliceAssumeCapacity("0b"),
256 .octal => bytes.appendSliceAssumeCapacity("0o"),
257 .hex => bytes.appendSliceAssumeCapacity("0x"),
258 .decimal => {},
259 }
260
261 const after_prefix = lit_bytes[prefix.stringLen()..];
262 const after_int = for (after_prefix, 0..) |c, i| switch (c) {
263 '.' => {
264 if (i == 0) {
265 bytes.appendAssumeCapacity('0');
266 }
267 break after_prefix[i..];
268 },
269 'e', 'E' => {
270 if (prefix != .hex) break after_prefix[i..];
271 bytes.appendAssumeCapacity(c);
272 },
273 'p', 'P' => break after_prefix[i..],
274 '0'...'9', 'a'...'d', 'A'...'D', 'f', 'F' => {
275 if (!prefix.digitAllowed(c)) break after_prefix[i..];
276 bytes.appendAssumeCapacity(c);
277 },
278 '\'' => {
279 bytes.appendAssumeCapacity('_');
280 },
281 else => break after_prefix[i..],
282 } else "";
283
284 const after_frac = frac: {
285 if (after_int.len == 0 or after_int[0] != '.') break :frac after_int;
286 bytes.appendAssumeCapacity('.');
287 for (after_int[1..], 1..) |c, i| {
288 if (c == '\'') {
289 bytes.appendAssumeCapacity('_');
290 continue;
291 }
292 if (!prefix.digitAllowed(c)) break :frac after_int[i..];
293 bytes.appendAssumeCapacity(c);
294 }
295 break :frac "";
296 };
297
298 const suffix_str = exponent: {
299 if (after_frac.len == 0) break :exponent after_frac;
300 switch (after_frac[0]) {
301 'e', 'E' => {},
302 'p', 'P' => if (prefix != .hex) break :exponent after_frac,
303 else => break :exponent after_frac,
304 }
305 bytes.appendAssumeCapacity(after_frac[0]);
306 for (after_frac[1..], 1..) |c, i| switch (c) {
307 '+', '-', '0'...'9' => {
308 bytes.appendAssumeCapacity(c);
309 },
310 '\'' => {
311 bytes.appendAssumeCapacity('_');
312 },
313 else => break :exponent after_frac[i..],
314 };
315 break :exponent "";
316 };
317
318 const is_float = after_int.len != suffix_str.len;
319 const suffix = aro.Tree.Token.NumberSuffix.fromString(suffix_str, if (is_float) .float else .int) orelse {
320 try mt.fail("invalid number suffix: '{s}'", .{suffix_str});
321 return error.ParseError;
322 };
323 if (suffix.isImaginary()) {
324 try mt.fail("TODO: imaginary literals", .{});
325 return error.ParseError;
326 }
327 if (suffix.isBitInt()) {
328 try mt.fail("TODO: _BitInt literals", .{});
329 return error.ParseError;
330 }
331
332 if (is_float) {
333 const type_node = try ZigTag.type.create(mt.t.arena, switch (suffix) {
334 .F16 => "f16",
335 .F => "f32",
336 .None => "f64",
337 .L => "c_longdouble",
338 .W => "f80",
339 .Q, .F128 => "f128",
340 else => unreachable,
341 });
342 const rhs = try ZigTag.float_literal.create(mt.t.arena, bytes.items);
343 return ZigTag.as.create(mt.t.arena, .{ .lhs = type_node, .rhs = rhs });
344 } else {
345 const type_node = try ZigTag.type.create(mt.t.arena, switch (suffix) {
346 .None => "c_int",
347 .U => "c_uint",
348 .L => "c_long",
349 .UL => "c_ulong",
350 .LL => "c_longlong",
351 .ULL => "c_ulonglong",
352 else => unreachable,
353 });
354 const value = std.fmt.parseInt(i128, bytes.items, 0) catch math.maxInt(i128);
355
356 // make the output less noisy by skipping promoteIntLiteral where
357 // it's guaranteed to not be required because of C standard type constraints
358 const guaranteed_to_fit = switch (suffix) {
359 .None => math.cast(i16, value) != null,
360 .U => math.cast(u16, value) != null,
361 .L => math.cast(i32, value) != null,
362 .UL => math.cast(u32, value) != null,
363 .LL => math.cast(i64, value) != null,
364 .ULL => math.cast(u64, value) != null,
365 else => unreachable,
366 };
367
368 const literal_node = try ZigTag.integer_literal.create(mt.t.arena, bytes.items);
369 if (guaranteed_to_fit) {
370 return ZigTag.as.create(mt.t.arena, .{ .lhs = type_node, .rhs = literal_node });
371 } else {
372 return mt.t.createHelperCallNode(.promoteIntLiteral, &.{ type_node, literal_node, try ZigTag.enum_literal.create(mt.t.arena, @tagName(prefix)) });
373 }
374 }
375}
376
377fn zigifyEscapeSequences(mt: *MacroTranslator, slice: []const u8) ![]const u8 {
378 var source = slice;
379 for (source, 0..) |c, i| {
380 if (c == '\"' or c == '\'') {
381 source = source[i..];
382 break;
383 }
384 }
385 for (source) |c| {
386 if (c == '\\' or c == '\t') {
387 break;
388 }
389 } else return source;
390 const bytes = try mt.t.arena.alloc(u8, source.len * 2);
391 var state: enum {
392 start,
393 escape,
394 hex,
395 octal,
396 } = .start;
397 var i: usize = 0;
398 var count: u8 = 0;
399 var num: u8 = 0;
400 for (source) |c| {
401 switch (state) {
402 .escape => {
403 switch (c) {
404 'n', 'r', 't', '\\', '\'', '\"' => {
405 bytes[i] = c;
406 },
407 '0'...'7' => {
408 count += 1;
409 num += c - '0';
410 state = .octal;
411 bytes[i] = 'x';
412 },
413 'x' => {
414 state = .hex;
415 bytes[i] = 'x';
416 },
417 'a' => {
418 bytes[i] = 'x';
419 i += 1;
420 bytes[i] = '0';
421 i += 1;
422 bytes[i] = '7';
423 },
424 'b' => {
425 bytes[i] = 'x';
426 i += 1;
427 bytes[i] = '0';
428 i += 1;
429 bytes[i] = '8';
430 },
431 'f' => {
432 bytes[i] = 'x';
433 i += 1;
434 bytes[i] = '0';
435 i += 1;
436 bytes[i] = 'C';
437 },
438 'v' => {
439 bytes[i] = 'x';
440 i += 1;
441 bytes[i] = '0';
442 i += 1;
443 bytes[i] = 'B';
444 },
445 '?' => {
446 i -= 1;
447 bytes[i] = '?';
448 },
449 'u', 'U' => {
450 try mt.fail("macro tokenizing failed: TODO unicode escape sequences", .{});
451 return error.ParseError;
452 },
453 else => {
454 try mt.fail("macro tokenizing failed: unknown escape sequence", .{});
455 return error.ParseError;
456 },
457 }
458 i += 1;
459 if (state == .escape)
460 state = .start;
461 },
462 .start => {
463 if (c == '\t') {
464 bytes[i] = '\\';
465 i += 1;
466 bytes[i] = 't';
467 i += 1;
468 continue;
469 }
470 if (c == '\\') {
471 state = .escape;
472 }
473 bytes[i] = c;
474 i += 1;
475 },
476 .hex => {
477 switch (c) {
478 '0'...'9' => {
479 num = std.math.mul(u8, num, 16) catch {
480 try mt.fail("macro tokenizing failed: hex literal overflowed", .{});
481 return error.ParseError;
482 };
483 num += c - '0';
484 },
485 'a'...'f' => {
486 num = std.math.mul(u8, num, 16) catch {
487 try mt.fail("macro tokenizing failed: hex literal overflowed", .{});
488 return error.ParseError;
489 };
490 num += c - 'a' + 10;
491 },
492 'A'...'F' => {
493 num = std.math.mul(u8, num, 16) catch {
494 try mt.fail("macro tokenizing failed: hex literal overflowed", .{});
495 return error.ParseError;
496 };
497 num += c - 'A' + 10;
498 },
499 else => {
500 i += std.fmt.printInt(bytes[i..], num, 16, .lower, .{ .fill = '0', .width = 2 });
501 num = 0;
502 if (c == '\\')
503 state = .escape
504 else
505 state = .start;
506 bytes[i] = c;
507 i += 1;
508 },
509 }
510 },
511 .octal => {
512 const accept_digit = switch (c) {
513 // The maximum length of a octal literal is 3 digits
514 '0'...'7' => count < 3,
515 else => false,
516 };
517
518 if (accept_digit) {
519 count += 1;
520 num = std.math.mul(u8, num, 8) catch {
521 try mt.fail("macro tokenizing failed: octal literal overflowed", .{});
522 return error.ParseError;
523 };
524 num += c - '0';
525 } else {
526 i += std.fmt.printInt(bytes[i..], num, 16, .lower, .{ .fill = '0', .width = 2 });
527 num = 0;
528 count = 0;
529 if (c == '\\')
530 state = .escape
531 else
532 state = .start;
533 bytes[i] = c;
534 i += 1;
535 }
536 },
537 }
538 }
539 if (state == .hex or state == .octal) {
540 i += std.fmt.printInt(bytes[i..], num, 16, .lower, .{ .fill = '0', .width = 2 });
541 }
542
543 return bytes[0..i];
544}
545
546/// non-ASCII characters (mt > 127) are also treated as non-printable by fmtSliceEscapeLower.
547/// If a C string literal or char literal in a macro is not valid UTF-8, we need to escape
548/// non-ASCII characters so that the Zig source we output will itself be UTF-8.
549fn escapeUnprintables(mt: *MacroTranslator) ![]const u8 {
550 const slice = mt.tokSlice();
551 mt.i += 1;
552
553 const zigified = try mt.zigifyEscapeSequences(slice);
554 if (std.unicode.utf8ValidateSlice(zigified)) return zigified;
555
556 const formatter = std.ascii.hexEscape(zigified, .lower);
557 const encoded_size = @as(usize, @intCast(std.fmt.count("{f}", .{formatter})));
558 const output = try mt.t.arena.alloc(u8, encoded_size);
559 return std.fmt.bufPrint(output, "{f}", .{formatter}) catch |err| switch (err) {
560 error.NoSpaceLeft => unreachable,
561 else => |e| return e,
562 };
563}
564
565fn parseCPrimaryExpr(mt: *MacroTranslator, scope: *Scope) ParseError!ZigNode {
566 const tok = mt.peek();
567 switch (tok) {
568 .char_literal,
569 .char_literal_utf_8,
570 .char_literal_utf_16,
571 .char_literal_utf_32,
572 .char_literal_wide,
573 => {
574 const slice = mt.tokSlice();
575 if (slice[0] != '\'' or slice[1] == '\\' or slice.len == 3) {
576 return ZigTag.char_literal.create(mt.t.arena, try mt.escapeUnprintables());
577 } else {
578 mt.i += 1;
579
580 const str = try std.fmt.allocPrint(mt.t.arena, "0x{x}", .{slice[1 .. slice.len - 1]});
581 return ZigTag.integer_literal.create(mt.t.arena, str);
582 }
583 },
584 .string_literal,
585 .string_literal_utf_16,
586 .string_literal_utf_8,
587 .string_literal_utf_32,
588 .string_literal_wide,
589 => return ZigTag.string_literal.create(mt.t.arena, try mt.escapeUnprintables()),
590 .pp_num => return mt.parseCNumLit(),
591 .l_paren => {
592 mt.i += 1;
593 const inner_node = try mt.parseCExpr(scope);
594
595 try mt.expect(.r_paren);
596 return inner_node;
597 },
598 .macro_param, .macro_param_no_expand => {
599 const param = mt.macro.params[mt.tokens[mt.i].end];
600 mt.i += 1;
601
602 const mangled_name = scope.getAlias(param) orelse param;
603 return try ZigTag.identifier.create(mt.t.arena, mangled_name);
604 },
605 .identifier, .extended_identifier => {
606 const slice = mt.tokSlice();
607 mt.i += 1;
608
609 const mangled_name = scope.getAlias(slice) orelse slice;
610 if (Translator.builtin_typedef_map.get(mangled_name)) |ty| {
611 return ZigTag.type.create(mt.t.arena, ty);
612 }
613 if (builtins.map.get(mangled_name)) |builtin| {
614 const builtin_identifier = try ZigTag.identifier.create(mt.t.arena, "__builtin");
615 return ZigTag.field_access.create(mt.t.arena, .{
616 .lhs = builtin_identifier,
617 .field_name = builtin.name,
618 });
619 }
620
621 const identifier = try ZigTag.identifier.create(mt.t.arena, mangled_name);
622 scope.skipVariableDiscard(mangled_name);
623 refs_var: {
624 const ident_node = mt.t.global_scope.sym_table.get(slice) orelse break :refs_var;
625 const var_decl_node = ident_node.castTag(.var_decl) orelse break :refs_var;
626 if (!var_decl_node.data.is_const) mt.refs_var_decl = true;
627 }
628 return identifier;
629 },
630 else => {},
631 }
632
633 // for handling type macros (EVIL)
634 // TODO maybe detect and treat type macros as typedefs in parseCSpecifierQualifierList?
635 if (try mt.parseCTypeName(scope, true)) |type_name| {
636 return type_name;
637 }
638
639 try mt.fail("unable to translate C expr: unexpected token '{s}'", .{tok.symbol()});
640 return error.ParseError;
641}
642
643fn macroIntFromBool(mt: *MacroTranslator, node: ZigNode) !ZigNode {
644 if (!node.isBoolRes()) return node;
645
646 return ZigTag.int_from_bool.create(mt.t.arena, node);
647}
648
649fn macroIntToBool(mt: *MacroTranslator, node: ZigNode) !ZigNode {
650 if (node.isBoolRes()) return node;
651
652 if (node.tag() == .string_literal) {
653 // @intFromPtr(node) != 0
654 const int_from_ptr = try ZigTag.int_from_ptr.create(mt.t.arena, node);
655 return ZigTag.not_equal.create(mt.t.arena, .{ .lhs = int_from_ptr, .rhs = ZigTag.zero_literal.init() });
656 }
657 // node != 0
658 return ZigTag.not_equal.create(mt.t.arena, .{ .lhs = node, .rhs = ZigTag.zero_literal.init() });
659}
660
661fn parseCCondExpr(mt: *MacroTranslator, scope: *Scope) ParseError!ZigNode {
662 const node = try mt.parseCOrExpr(scope);
663 if (!mt.eat(.question_mark)) return node;
664
665 const then_body = try mt.parseCOrExpr(scope);
666 try mt.expect(.colon);
667 const else_body = try mt.parseCCondExpr(scope);
668 return ZigTag.@"if".create(mt.t.arena, .{ .cond = node, .then = then_body, .@"else" = else_body });
669}
670
671fn parseCOrExpr(mt: *MacroTranslator, scope: *Scope) ParseError!ZigNode {
672 var node = try mt.parseCAndExpr(scope);
673 while (mt.eat(.pipe_pipe)) {
674 const lhs = try mt.macroIntToBool(node);
675 const rhs = try mt.macroIntToBool(try mt.parseCAndExpr(scope));
676 node = try ZigTag.@"or".create(mt.t.arena, .{ .lhs = lhs, .rhs = rhs });
677 }
678 return node;
679}
680
681fn parseCAndExpr(mt: *MacroTranslator, scope: *Scope) ParseError!ZigNode {
682 var node = try mt.parseCBitOrExpr(scope);
683 while (mt.eat(.ampersand_ampersand)) {
684 const lhs = try mt.macroIntToBool(node);
685 const rhs = try mt.macroIntToBool(try mt.parseCBitOrExpr(scope));
686 node = try ZigTag.@"and".create(mt.t.arena, .{ .lhs = lhs, .rhs = rhs });
687 }
688 return node;
689}
690
691fn parseCBitOrExpr(mt: *MacroTranslator, scope: *Scope) ParseError!ZigNode {
692 var node = try mt.parseCBitXorExpr(scope);
693 while (mt.eat(.pipe)) {
694 const lhs = try mt.macroIntFromBool(node);
695 const rhs = try mt.macroIntFromBool(try mt.parseCBitXorExpr(scope));
696 node = try ZigTag.bit_or.create(mt.t.arena, .{ .lhs = lhs, .rhs = rhs });
697 }
698 return node;
699}
700
701fn parseCBitXorExpr(mt: *MacroTranslator, scope: *Scope) ParseError!ZigNode {
702 var node = try mt.parseCBitAndExpr(scope);
703 while (mt.eat(.caret)) {
704 const lhs = try mt.macroIntFromBool(node);
705 const rhs = try mt.macroIntFromBool(try mt.parseCBitAndExpr(scope));
706 node = try ZigTag.bit_xor.create(mt.t.arena, .{ .lhs = lhs, .rhs = rhs });
707 }
708 return node;
709}
710
711fn parseCBitAndExpr(mt: *MacroTranslator, scope: *Scope) ParseError!ZigNode {
712 var node = try mt.parseCEqExpr(scope);
713 while (mt.eat(.ampersand)) {
714 const lhs = try mt.macroIntFromBool(node);
715 const rhs = try mt.macroIntFromBool(try mt.parseCEqExpr(scope));
716 node = try ZigTag.bit_and.create(mt.t.arena, .{ .lhs = lhs, .rhs = rhs });
717 }
718 return node;
719}
720
721fn parseCEqExpr(mt: *MacroTranslator, scope: *Scope) ParseError!ZigNode {
722 var node = try mt.parseCRelExpr(scope);
723 while (true) {
724 switch (mt.peek()) {
725 .bang_equal => {
726 mt.i += 1;
727 const lhs = try mt.macroIntFromBool(node);
728 const rhs = try mt.macroIntFromBool(try mt.parseCRelExpr(scope));
729 node = try ZigTag.not_equal.create(mt.t.arena, .{ .lhs = lhs, .rhs = rhs });
730 },
731 .equal_equal => {
732 mt.i += 1;
733 const lhs = try mt.macroIntFromBool(node);
734 const rhs = try mt.macroIntFromBool(try mt.parseCRelExpr(scope));
735 node = try ZigTag.equal.create(mt.t.arena, .{ .lhs = lhs, .rhs = rhs });
736 },
737 else => return node,
738 }
739 }
740}
741
742fn parseCRelExpr(mt: *MacroTranslator, scope: *Scope) ParseError!ZigNode {
743 var node = try mt.parseCShiftExpr(scope);
744 while (true) {
745 switch (mt.peek()) {
746 .angle_bracket_right => {
747 mt.i += 1;
748 const lhs = try mt.macroIntFromBool(node);
749 const rhs = try mt.macroIntFromBool(try mt.parseCShiftExpr(scope));
750 node = try ZigTag.greater_than.create(mt.t.arena, .{ .lhs = lhs, .rhs = rhs });
751 },
752 .angle_bracket_right_equal => {
753 mt.i += 1;
754 const lhs = try mt.macroIntFromBool(node);
755 const rhs = try mt.macroIntFromBool(try mt.parseCShiftExpr(scope));
756 node = try ZigTag.greater_than_equal.create(mt.t.arena, .{ .lhs = lhs, .rhs = rhs });
757 },
758 .angle_bracket_left => {
759 mt.i += 1;
760 const lhs = try mt.macroIntFromBool(node);
761 const rhs = try mt.macroIntFromBool(try mt.parseCShiftExpr(scope));
762 node = try ZigTag.less_than.create(mt.t.arena, .{ .lhs = lhs, .rhs = rhs });
763 },
764 .angle_bracket_left_equal => {
765 mt.i += 1;
766 const lhs = try mt.macroIntFromBool(node);
767 const rhs = try mt.macroIntFromBool(try mt.parseCShiftExpr(scope));
768 node = try ZigTag.less_than_equal.create(mt.t.arena, .{ .lhs = lhs, .rhs = rhs });
769 },
770 else => return node,
771 }
772 }
773}
774
775fn parseCShiftExpr(mt: *MacroTranslator, scope: *Scope) ParseError!ZigNode {
776 var node = try mt.parseCAddSubExpr(scope);
777 while (true) {
778 switch (mt.peek()) {
779 .angle_bracket_angle_bracket_left => {
780 mt.i += 1;
781 const lhs = try mt.macroIntFromBool(node);
782 const rhs = try mt.macroIntFromBool(try mt.parseCAddSubExpr(scope));
783 node = try ZigTag.shl.create(mt.t.arena, .{ .lhs = lhs, .rhs = rhs });
784 },
785 .angle_bracket_angle_bracket_right => {
786 mt.i += 1;
787 const lhs = try mt.macroIntFromBool(node);
788 const rhs = try mt.macroIntFromBool(try mt.parseCAddSubExpr(scope));
789 node = try ZigTag.shr.create(mt.t.arena, .{ .lhs = lhs, .rhs = rhs });
790 },
791 else => return node,
792 }
793 }
794}
795
796fn parseCAddSubExpr(mt: *MacroTranslator, scope: *Scope) ParseError!ZigNode {
797 var node = try mt.parseCMulExpr(scope);
798 while (true) {
799 switch (mt.peek()) {
800 .plus => {
801 mt.i += 1;
802 const lhs = try mt.macroIntFromBool(node);
803 const rhs = try mt.macroIntFromBool(try mt.parseCMulExpr(scope));
804 node = try ZigTag.add.create(mt.t.arena, .{ .lhs = lhs, .rhs = rhs });
805 },
806 .minus => {
807 mt.i += 1;
808 const lhs = try mt.macroIntFromBool(node);
809 const rhs = try mt.macroIntFromBool(try mt.parseCMulExpr(scope));
810 node = try ZigTag.sub.create(mt.t.arena, .{ .lhs = lhs, .rhs = rhs });
811 },
812 else => return node,
813 }
814 }
815}
816
817fn parseCMulExpr(mt: *MacroTranslator, scope: *Scope) ParseError!ZigNode {
818 var node = try mt.parseCCastExpr(scope);
819 while (true) {
820 switch (mt.peek()) {
821 .asterisk => {
822 mt.i += 1;
823 const lhs = try mt.macroIntFromBool(node);
824 const rhs = try mt.macroIntFromBool(try mt.parseCCastExpr(scope));
825 node = try ZigTag.mul.create(mt.t.arena, .{ .lhs = lhs, .rhs = rhs });
826 },
827 .slash => {
828 mt.i += 1;
829 const lhs = try mt.macroIntFromBool(node);
830 const rhs = try mt.macroIntFromBool(try mt.parseCCastExpr(scope));
831 node = try mt.t.createHelperCallNode(.div, &.{ lhs, rhs });
832 },
833 .percent => {
834 mt.i += 1;
835 const lhs = try mt.macroIntFromBool(node);
836 const rhs = try mt.macroIntFromBool(try mt.parseCCastExpr(scope));
837 node = try mt.t.createHelperCallNode(.rem, &.{ lhs, rhs });
838 },
839 else => return node,
840 }
841 }
842}
843
844fn parseCCastExpr(mt: *MacroTranslator, scope: *Scope) ParseError!ZigNode {
845 if (mt.eat(.l_paren)) {
846 if (try mt.parseCTypeName(scope, true)) |type_name| {
847 while (true) {
848 const next_tok = mt.peek();
849 if (next_tok == .r_paren) {
850 mt.i += 1;
851 break;
852 }
853 // Skip trailing blank defined before the RParen.
854 if ((next_tok == .identifier or next_tok == .extended_identifier) and
855 mt.t.global_scope.blank_macros.contains(mt.tokSlice()))
856 {
857 mt.i += 1;
858 continue;
859 }
860
861 try mt.fail(
862 "unable to translate C expr: expected ')' instead got '{s}'",
863 .{next_tok.symbol()},
864 );
865 return error.ParseError;
866 }
867 if (mt.peek() == .l_brace) {
868 // initializer list
869 return mt.parseCPostfixExpr(scope, type_name);
870 }
871 const node_to_cast = try mt.parseCCastExpr(scope);
872 return mt.t.createHelperCallNode(.cast, &.{ type_name, node_to_cast });
873 }
874 mt.i -= 1; // l_paren
875 }
876 return mt.parseCUnaryExpr(scope);
877}
878
879// allow_fail is set when unsure if we are parsing a type-name
880fn parseCTypeName(mt: *MacroTranslator, scope: *Scope, allow_fail: bool) ParseError!?ZigNode {
881 if (try mt.parseCSpecifierQualifierList(scope, allow_fail)) |node| {
882 return try mt.parseCAbstractDeclarator(node);
883 }
884 return null;
885}
886
887fn parseCSpecifierQualifierList(mt: *MacroTranslator, scope: *Scope, allow_fail: bool) ParseError!?ZigNode {
888 const tok = mt.peek();
889 switch (tok) {
890 .macro_param, .macro_param_no_expand => {
891 const param = mt.macro.params[mt.tokens[mt.i].end];
892
893 // Assume that this is only a cast if the next token is ')'
894 // e.g. param)identifier
895 if (allow_fail and (mt.macro.tokens.len < mt.i + 3 or
896 mt.macro.tokens[mt.i + 1].id != .r_paren or
897 mt.macro.tokens[mt.i + 2].id != .identifier))
898 return null;
899
900 mt.i += 1;
901 const mangled_name = scope.getAlias(param) orelse param;
902 return try ZigTag.identifier.create(mt.t.arena, mangled_name);
903 },
904 .identifier, .extended_identifier => {
905 const slice = mt.tokSlice();
906 const mangled_name = scope.getAlias(slice) orelse slice;
907
908 if (mt.t.global_scope.blank_macros.contains(slice)) {
909 mt.i += 1;
910 return try mt.parseCSpecifierQualifierList(scope, allow_fail);
911 }
912
913 if (!allow_fail or mt.t.typedefs.contains(mangled_name)) {
914 mt.i += 1;
915 if (Translator.builtin_typedef_map.get(mangled_name)) |ty| {
916 return try ZigTag.type.create(mt.t.arena, ty);
917 }
918 if (builtins.map.get(mangled_name)) |builtin| {
919 const builtin_identifier = try ZigTag.identifier.create(mt.t.arena, "__builtin");
920 return try ZigTag.field_access.create(mt.t.arena, .{
921 .lhs = builtin_identifier,
922 .field_name = builtin.name,
923 });
924 }
925
926 return try ZigTag.identifier.create(mt.t.arena, mangled_name);
927 }
928 },
929 .keyword_void => {
930 mt.i += 1;
931 return try ZigTag.type.create(mt.t.arena, "anyopaque");
932 },
933 .keyword_bool => {
934 mt.i += 1;
935 return try ZigTag.type.create(mt.t.arena, "bool");
936 },
937 .keyword_char,
938 .keyword_int,
939 .keyword_short,
940 .keyword_long,
941 .keyword_float,
942 .keyword_double,
943 .keyword_signed,
944 .keyword_unsigned,
945 .keyword_complex,
946 => return try mt.parseCNumericType(),
947 .keyword_enum, .keyword_struct, .keyword_union => {
948 const tag_name = mt.tokSlice();
949 mt.i += 1;
950
951 // struct Foo will be declared as struct_Foo by transRecordDecl
952 const identifier = mt.tokSlice();
953 try mt.expect(.identifier);
954
955 const name = try std.fmt.allocPrint(mt.t.arena, "{s}_{s}", .{ tag_name, identifier });
956 return try ZigTag.identifier.create(mt.t.arena, name);
957 },
958 else => {},
959 }
960
961 if (allow_fail) return null;
962
963 try mt.fail("unable to translate C expr: unexpected token '{s}'", .{tok.symbol()});
964 return error.ParseError;
965}
966
967fn parseCNumericType(mt: *MacroTranslator) ParseError!ZigNode {
968 const KwCounter = struct {
969 double: u8 = 0,
970 long: u8 = 0,
971 int: u8 = 0,
972 float: u8 = 0,
973 short: u8 = 0,
974 char: u8 = 0,
975 unsigned: u8 = 0,
976 signed: u8 = 0,
977 complex: u8 = 0,
978
979 fn eql(self: @This(), other: @This()) bool {
980 return std.meta.eql(self, other);
981 }
982 };
983
984 // Yes, these can be in *any* order
985 // This still doesn't cover cases where for example volatile is intermixed
986
987 var kw = KwCounter{};
988 // prevent overflow
989 var i: u8 = 0;
990 while (i < math.maxInt(u8)) : (i += 1) {
991 switch (mt.peek()) {
992 .keyword_double => kw.double += 1,
993 .keyword_long => kw.long += 1,
994 .keyword_int => kw.int += 1,
995 .keyword_float => kw.float += 1,
996 .keyword_short => kw.short += 1,
997 .keyword_char => kw.char += 1,
998 .keyword_unsigned => kw.unsigned += 1,
999 .keyword_signed => kw.signed += 1,
1000 .keyword_complex => kw.complex += 1,
1001 else => break,
1002 }
1003 mt.i += 1;
1004 }
1005
1006 if (kw.eql(.{ .int = 1 }) or kw.eql(.{ .signed = 1 }) or kw.eql(.{ .signed = 1, .int = 1 }))
1007 return ZigTag.type.create(mt.t.arena, "c_int");
1008
1009 if (kw.eql(.{ .unsigned = 1 }) or kw.eql(.{ .unsigned = 1, .int = 1 }))
1010 return ZigTag.type.create(mt.t.arena, "c_uint");
1011
1012 if (kw.eql(.{ .long = 1 }) or kw.eql(.{ .signed = 1, .long = 1 }) or kw.eql(.{ .long = 1, .int = 1 }) or kw.eql(.{ .signed = 1, .long = 1, .int = 1 }))
1013 return ZigTag.type.create(mt.t.arena, "c_long");
1014
1015 if (kw.eql(.{ .unsigned = 1, .long = 1 }) or kw.eql(.{ .unsigned = 1, .long = 1, .int = 1 }))
1016 return ZigTag.type.create(mt.t.arena, "c_ulong");
1017
1018 if (kw.eql(.{ .long = 2 }) or kw.eql(.{ .signed = 1, .long = 2 }) or kw.eql(.{ .long = 2, .int = 1 }) or kw.eql(.{ .signed = 1, .long = 2, .int = 1 }))
1019 return ZigTag.type.create(mt.t.arena, "c_longlong");
1020
1021 if (kw.eql(.{ .unsigned = 1, .long = 2 }) or kw.eql(.{ .unsigned = 1, .long = 2, .int = 1 }))
1022 return ZigTag.type.create(mt.t.arena, "c_ulonglong");
1023
1024 if (kw.eql(.{ .signed = 1, .char = 1 }))
1025 return ZigTag.type.create(mt.t.arena, "i8");
1026
1027 if (kw.eql(.{ .char = 1 }) or kw.eql(.{ .unsigned = 1, .char = 1 }))
1028 return ZigTag.type.create(mt.t.arena, "u8");
1029
1030 if (kw.eql(.{ .short = 1 }) or kw.eql(.{ .signed = 1, .short = 1 }) or kw.eql(.{ .short = 1, .int = 1 }) or kw.eql(.{ .signed = 1, .short = 1, .int = 1 }))
1031 return ZigTag.type.create(mt.t.arena, "c_short");
1032
1033 if (kw.eql(.{ .unsigned = 1, .short = 1 }) or kw.eql(.{ .unsigned = 1, .short = 1, .int = 1 }))
1034 return ZigTag.type.create(mt.t.arena, "c_ushort");
1035
1036 if (kw.eql(.{ .float = 1 }))
1037 return ZigTag.type.create(mt.t.arena, "f32");
1038
1039 if (kw.eql(.{ .double = 1 }))
1040 return ZigTag.type.create(mt.t.arena, "f64");
1041
1042 if (kw.eql(.{ .long = 1, .double = 1 })) {
1043 try mt.fail("unable to translate: TODO long double", .{});
1044 return error.ParseError;
1045 }
1046
1047 if (kw.eql(.{ .float = 1, .complex = 1 })) {
1048 try mt.fail("unable to translate: TODO _Complex", .{});
1049 return error.ParseError;
1050 }
1051
1052 if (kw.eql(.{ .double = 1, .complex = 1 })) {
1053 try mt.fail("unable to translate: TODO _Complex", .{});
1054 return error.ParseError;
1055 }
1056
1057 if (kw.eql(.{ .long = 1, .double = 1, .complex = 1 })) {
1058 try mt.fail("unable to translate: TODO _Complex", .{});
1059 return error.ParseError;
1060 }
1061
1062 try mt.fail("unable to translate: invalid numeric type", .{});
1063 return error.ParseError;
1064}
1065
1066fn parseCAbstractDeclarator(mt: *MacroTranslator, node: ZigNode) ParseError!ZigNode {
1067 if (mt.eat(.asterisk)) {
1068 if (node.castTag(.type)) |some| {
1069 if (std.mem.eql(u8, some.data, "anyopaque")) {
1070 const ptr = try ZigTag.single_pointer.create(mt.t.arena, .{
1071 .is_const = false,
1072 .is_volatile = false,
1073 .is_allowzero = false,
1074 .elem_type = node,
1075 });
1076 return ZigTag.optional_type.create(mt.t.arena, ptr);
1077 }
1078 }
1079 return ZigTag.c_pointer.create(mt.t.arena, .{
1080 .is_const = false,
1081 .is_volatile = false,
1082 .is_allowzero = false,
1083 .elem_type = node,
1084 });
1085 }
1086 return node;
1087}
1088
1089fn parseCPostfixExpr(mt: *MacroTranslator, scope: *Scope, type_name: ?ZigNode) ParseError!ZigNode {
1090 var node = try mt.parseCPostfixExprInner(scope, type_name);
1091 // In C the preprocessor would handle concatting strings while expanding macros.
1092 // This should do approximately the same by concatting any strings and identifiers
1093 // after a primary or postfix expression.
1094 while (true) {
1095 switch (mt.peek()) {
1096 .string_literal,
1097 .string_literal_utf_16,
1098 .string_literal_utf_8,
1099 .string_literal_utf_32,
1100 .string_literal_wide,
1101 => {},
1102 .identifier, .extended_identifier => {
1103 if (mt.t.global_scope.blank_macros.contains(mt.tokSlice())) {
1104 mt.i += 1;
1105 continue;
1106 }
1107 },
1108 else => break,
1109 }
1110 const rhs = try mt.parseCPostfixExprInner(scope, type_name);
1111 node = try ZigTag.array_cat.create(mt.t.arena, .{ .lhs = node, .rhs = rhs });
1112 }
1113 return node;
1114}
1115
1116fn parseCPostfixExprInner(mt: *MacroTranslator, scope: *Scope, type_name: ?ZigNode) ParseError!ZigNode {
1117 var node = type_name orelse try mt.parseCPrimaryExpr(scope);
1118 while (true) {
1119 switch (mt.peek()) {
1120 .period => {
1121 mt.i += 1;
1122 const field_name = mt.tokSlice();
1123 try mt.expect(.identifier);
1124
1125 node = try ZigTag.field_access.create(mt.t.arena, .{ .lhs = node, .field_name = field_name });
1126 },
1127 .arrow => {
1128 mt.i += 1;
1129 const field_name = mt.tokSlice();
1130 try mt.expect(.identifier);
1131
1132 const deref = try ZigTag.deref.create(mt.t.arena, node);
1133 node = try ZigTag.field_access.create(mt.t.arena, .{ .lhs = deref, .field_name = field_name });
1134 },
1135 .l_bracket => {
1136 mt.i += 1;
1137
1138 const index_val = try mt.macroIntFromBool(try mt.parseCExpr(scope));
1139 const index = try ZigTag.as.create(mt.t.arena, .{
1140 .lhs = try ZigTag.type.create(mt.t.arena, "usize"),
1141 .rhs = try ZigTag.int_cast.create(mt.t.arena, index_val),
1142 });
1143 node = try ZigTag.array_access.create(mt.t.arena, .{ .lhs = node, .rhs = index });
1144 try mt.expect(.r_bracket);
1145 },
1146 .l_paren => {
1147 mt.i += 1;
1148
1149 if (mt.eat(.r_paren)) {
1150 node = try ZigTag.call.create(mt.t.arena, .{ .lhs = node, .args = &.{} });
1151 } else {
1152 var args = std.ArrayList(ZigNode).init(mt.t.gpa);
1153 defer args.deinit();
1154
1155 while (true) {
1156 const arg = try mt.parseCCondExpr(scope);
1157 try args.append(arg);
1158
1159 const next_id = mt.peek();
1160 switch (next_id) {
1161 .comma => {
1162 mt.i += 1;
1163 },
1164 .r_paren => {
1165 mt.i += 1;
1166 break;
1167 },
1168 else => {
1169 try mt.fail("unable to translate C expr: expected ',' or ')' instead got '{s}'", .{next_id.symbol()});
1170 return error.ParseError;
1171 },
1172 }
1173 }
1174 node = try ZigTag.call.create(mt.t.arena, .{ .lhs = node, .args = try mt.t.arena.dupe(ZigNode, args.items) });
1175 }
1176 },
1177 .l_brace => {
1178 mt.i += 1;
1179
1180 // Check for designated field initializers
1181 if (mt.peek() == .period) {
1182 var init_vals = std.ArrayList(ast.Payload.ContainerInitDot.Initializer).init(mt.t.gpa);
1183 defer init_vals.deinit();
1184
1185 while (true) {
1186 try mt.expect(.period);
1187 const name = mt.tokSlice();
1188 try mt.expect(.identifier);
1189 try mt.expect(.equal);
1190
1191 const val = try mt.parseCCondExpr(scope);
1192 try init_vals.append(.{ .name = name, .value = val });
1193
1194 const next_id = mt.peek();
1195 switch (next_id) {
1196 .comma => {
1197 mt.i += 1;
1198 },
1199 .r_brace => {
1200 mt.i += 1;
1201 break;
1202 },
1203 else => {
1204 try mt.fail("unable to translate C expr: expected ',' or '}}' instead got '{s}'", .{next_id.symbol()});
1205 return error.ParseError;
1206 },
1207 }
1208 }
1209 const tuple_node = try ZigTag.container_init_dot.create(mt.t.arena, try mt.t.arena.dupe(ast.Payload.ContainerInitDot.Initializer, init_vals.items));
1210 node = try ZigTag.std_mem_zeroinit.create(mt.t.arena, .{ .lhs = node, .rhs = tuple_node });
1211 continue;
1212 }
1213
1214 var init_vals = std.ArrayList(ZigNode).init(mt.t.gpa);
1215 defer init_vals.deinit();
1216
1217 while (true) {
1218 const val = try mt.parseCCondExpr(scope);
1219 try init_vals.append(val);
1220
1221 const next_id = mt.peek();
1222 switch (next_id) {
1223 .comma => {
1224 mt.i += 1;
1225 },
1226 .r_brace => {
1227 mt.i += 1;
1228 break;
1229 },
1230 else => {
1231 try mt.fail("unable to translate C expr: expected ',' or '}}' instead got '{s}'", .{next_id.symbol()});
1232 return error.ParseError;
1233 },
1234 }
1235 }
1236 const tuple_node = try ZigTag.tuple.create(mt.t.arena, try mt.t.arena.dupe(ZigNode, init_vals.items));
1237 node = try ZigTag.std_mem_zeroinit.create(mt.t.arena, .{ .lhs = node, .rhs = tuple_node });
1238 },
1239 .plus_plus, .minus_minus => {
1240 try mt.fail("TODO postfix inc/dec expr", .{});
1241 return error.ParseError;
1242 },
1243 else => return node,
1244 }
1245 }
1246}
1247
1248fn parseCUnaryExpr(mt: *MacroTranslator, scope: *Scope) ParseError!ZigNode {
1249 switch (mt.peek()) {
1250 .bang => {
1251 mt.i += 1;
1252 const operand = try mt.macroIntToBool(try mt.parseCCastExpr(scope));
1253 return ZigTag.not.create(mt.t.arena, operand);
1254 },
1255 .minus => {
1256 mt.i += 1;
1257 const operand = try mt.macroIntFromBool(try mt.parseCCastExpr(scope));
1258 return ZigTag.negate.create(mt.t.arena, operand);
1259 },
1260 .plus => {
1261 mt.i += 1;
1262 return try mt.parseCCastExpr(scope);
1263 },
1264 .tilde => {
1265 mt.i += 1;
1266 const operand = try mt.macroIntFromBool(try mt.parseCCastExpr(scope));
1267 return ZigTag.bit_not.create(mt.t.arena, operand);
1268 },
1269 .asterisk => {
1270 mt.i += 1;
1271 const operand = try mt.parseCCastExpr(scope);
1272 return ZigTag.deref.create(mt.t.arena, operand);
1273 },
1274 .ampersand => {
1275 mt.i += 1;
1276 const operand = try mt.parseCCastExpr(scope);
1277 return ZigTag.address_of.create(mt.t.arena, operand);
1278 },
1279 .keyword_sizeof => {
1280 mt.i += 1;
1281 const operand = if (mt.eat(.l_paren)) blk: {
1282 const inner = (try mt.parseCTypeName(scope, false)).?;
1283 try mt.expect(.r_paren);
1284 break :blk inner;
1285 } else try mt.parseCUnaryExpr(scope);
1286
1287 return mt.t.createHelperCallNode(.sizeof, &.{operand});
1288 },
1289 .keyword_alignof => {
1290 mt.i += 1;
1291 // TODO this won't work if using <stdalign.h>'s
1292 // #define alignof _Alignof
1293 try mt.expect(.l_paren);
1294 const operand = (try mt.parseCTypeName(scope, false)).?;
1295 try mt.expect(.r_paren);
1296
1297 return ZigTag.alignof.create(mt.t.arena, operand);
1298 },
1299 .plus_plus, .minus_minus => {
1300 try mt.fail("TODO unary inc/dec expr", .{});
1301 return error.ParseError;
1302 },
1303 else => {},
1304 }
1305
1306 return try mt.parseCPostfixExpr(scope, null);
1307}
lib/compiler/translate-c/src/PatternList.zig created+288
......@@ -0,0 +1,288 @@
1const std = @import("std");
2const mem = std.mem;
3const assert = std.debug.assert;
4
5const aro = @import("aro");
6const CToken = aro.Tokenizer.Token;
7
8const helpers = @import("helpers.zig");
9const Translator = @import("Translator.zig");
10const Error = Translator.Error;
11pub const MacroProcessingError = Error || error{UnexpectedMacroToken};
12
13const Impl = std.meta.DeclEnum(@import("helpers"));
14const Template = struct { []const u8, Impl };
15
16/// Templates must be function-like macros
17/// first element is macro source, second element is the name of the function
18/// in __helpers which implements it
19const templates = [_]Template{
20 .{ "f_SUFFIX(X) (X ## f)", .F_SUFFIX },
21 .{ "F_SUFFIX(X) (X ## F)", .F_SUFFIX },
22
23 .{ "u_SUFFIX(X) (X ## u)", .U_SUFFIX },
24 .{ "U_SUFFIX(X) (X ## U)", .U_SUFFIX },
25
26 .{ "l_SUFFIX(X) (X ## l)", .L_SUFFIX },
27 .{ "L_SUFFIX(X) (X ## L)", .L_SUFFIX },
28
29 .{ "ul_SUFFIX(X) (X ## ul)", .UL_SUFFIX },
30 .{ "uL_SUFFIX(X) (X ## uL)", .UL_SUFFIX },
31 .{ "Ul_SUFFIX(X) (X ## Ul)", .UL_SUFFIX },
32 .{ "UL_SUFFIX(X) (X ## UL)", .UL_SUFFIX },
33
34 .{ "ll_SUFFIX(X) (X ## ll)", .LL_SUFFIX },
35 .{ "LL_SUFFIX(X) (X ## LL)", .LL_SUFFIX },
36
37 .{ "ull_SUFFIX(X) (X ## ull)", .ULL_SUFFIX },
38 .{ "uLL_SUFFIX(X) (X ## uLL)", .ULL_SUFFIX },
39 .{ "Ull_SUFFIX(X) (X ## Ull)", .ULL_SUFFIX },
40 .{ "ULL_SUFFIX(X) (X ## ULL)", .ULL_SUFFIX },
41
42 .{ "f_SUFFIX(X) X ## f", .F_SUFFIX },
43 .{ "F_SUFFIX(X) X ## F", .F_SUFFIX },
44
45 .{ "u_SUFFIX(X) X ## u", .U_SUFFIX },
46 .{ "U_SUFFIX(X) X ## U", .U_SUFFIX },
47
48 .{ "l_SUFFIX(X) X ## l", .L_SUFFIX },
49 .{ "L_SUFFIX(X) X ## L", .L_SUFFIX },
50
51 .{ "ul_SUFFIX(X) X ## ul", .UL_SUFFIX },
52 .{ "uL_SUFFIX(X) X ## uL", .UL_SUFFIX },
53 .{ "Ul_SUFFIX(X) X ## Ul", .UL_SUFFIX },
54 .{ "UL_SUFFIX(X) X ## UL", .UL_SUFFIX },
55
56 .{ "ll_SUFFIX(X) X ## ll", .LL_SUFFIX },
57 .{ "LL_SUFFIX(X) X ## LL", .LL_SUFFIX },
58
59 .{ "ull_SUFFIX(X) X ## ull", .ULL_SUFFIX },
60 .{ "uLL_SUFFIX(X) X ## uLL", .ULL_SUFFIX },
61 .{ "Ull_SUFFIX(X) X ## Ull", .ULL_SUFFIX },
62 .{ "ULL_SUFFIX(X) X ## ULL", .ULL_SUFFIX },
63
64 .{ "CAST_OR_CALL(X, Y) (X)(Y)", .CAST_OR_CALL },
65 .{ "CAST_OR_CALL(X, Y) ((X)(Y))", .CAST_OR_CALL },
66
67 .{
68 \\wl_container_of(ptr, sample, member) \
69 \\(__typeof__(sample))((char *)(ptr) - \
70 \\ offsetof(__typeof__(*sample), member))
71 ,
72 .WL_CONTAINER_OF,
73 },
74
75 .{ "IGNORE_ME(X) ((void)(X))", .DISCARD },
76 .{ "IGNORE_ME(X) (void)(X)", .DISCARD },
77 .{ "IGNORE_ME(X) ((const void)(X))", .DISCARD },
78 .{ "IGNORE_ME(X) (const void)(X)", .DISCARD },
79 .{ "IGNORE_ME(X) ((volatile void)(X))", .DISCARD },
80 .{ "IGNORE_ME(X) (volatile void)(X)", .DISCARD },
81 .{ "IGNORE_ME(X) ((const volatile void)(X))", .DISCARD },
82 .{ "IGNORE_ME(X) (const volatile void)(X)", .DISCARD },
83 .{ "IGNORE_ME(X) ((volatile const void)(X))", .DISCARD },
84 .{ "IGNORE_ME(X) (volatile const void)(X)", .DISCARD },
85};
86
87const Pattern = struct {
88 slicer: MacroSlicer,
89 impl: Impl,
90
91 fn init(pl: *Pattern, allocator: mem.Allocator, template: Template) Error!void {
92 const source = template[0];
93 const impl = template[1];
94 var tok_list = std.ArrayList(CToken).init(allocator);
95 defer tok_list.deinit();
96
97 pl.* = .{
98 .slicer = try tokenizeMacro(source, &tok_list),
99 .impl = impl,
100 };
101 }
102
103 fn deinit(pl: *Pattern, allocator: mem.Allocator) void {
104 allocator.free(pl.slicer.tokens);
105 pl.* = undefined;
106 }
107
108 /// This function assumes that `ms` has already been validated to contain a function-like
109 /// macro, and that the parsed template macro in `pl` also contains a function-like
110 /// macro. Please review this logic carefully if changing that assumption. Two
111 /// function-like macros are considered equivalent if and only if they contain the same
112 /// list of tokens, modulo parameter names.
113 fn matches(pat: Pattern, ms: MacroSlicer) bool {
114 if (ms.params != pat.slicer.params) return false;
115 if (ms.tokens.len != pat.slicer.tokens.len) return false;
116
117 for (ms.tokens, pat.slicer.tokens) |macro_tok, pat_tok| {
118 if (macro_tok.id != pat_tok.id) return false;
119 switch (macro_tok.id) {
120 .macro_param, .macro_param_no_expand => {
121 // `.end` is the parameter index.
122 if (macro_tok.end != pat_tok.end) return false;
123 },
124 .identifier, .extended_identifier, .string_literal, .char_literal, .pp_num => {
125 const macro_bytes = ms.slice(macro_tok);
126 const pattern_bytes = pat.slicer.slice(pat_tok);
127
128 if (!mem.eql(u8, pattern_bytes, macro_bytes)) return false;
129 },
130 else => {
131 // other tags correspond to keywords and operators that do not contain a "payload"
132 // that can vary
133 },
134 }
135 }
136 return true;
137 }
138};
139
140const PatternList = @This();
141
142patterns: []Pattern,
143
144pub const MacroSlicer = struct {
145 source: []const u8,
146 tokens: []const CToken,
147 params: u32,
148
149 fn slice(pl: MacroSlicer, token: CToken) []const u8 {
150 return pl.source[token.start..token.end];
151 }
152};
153
154pub fn init(allocator: mem.Allocator) Error!PatternList {
155 const patterns = try allocator.alloc(Pattern, templates.len);
156 for (patterns, templates) |*pattern, template| {
157 try pattern.init(allocator, template);
158 }
159 return .{ .patterns = patterns };
160}
161
162pub fn deinit(pl: *PatternList, allocator: mem.Allocator) void {
163 for (pl.patterns) |*pattern| pattern.deinit(allocator);
164 allocator.free(pl.patterns);
165 pl.* = undefined;
166}
167
168pub fn match(pl: PatternList, ms: MacroSlicer) Error!?Impl {
169 for (pl.patterns) |pattern| if (pattern.matches(ms)) return pattern.impl;
170 return null;
171}
172
173fn tokenizeMacro(source: []const u8, tok_list: *std.ArrayList(CToken)) Error!MacroSlicer {
174 var param_count: u32 = 0;
175 var param_buf: [8][]const u8 = undefined;
176
177 var tokenizer: aro.Tokenizer = .{
178 .buf = source,
179 .source = .unused,
180 .langopts = .{},
181 };
182 {
183 const name_tok = tokenizer.nextNoWS();
184 assert(name_tok.id == .identifier);
185 const l_paren = tokenizer.nextNoWS();
186 assert(l_paren.id == .l_paren);
187 }
188
189 while (true) {
190 const param = tokenizer.nextNoWS();
191 if (param.id == .r_paren) break;
192 assert(param.id == .identifier);
193 const slice = source[param.start..param.end];
194 param_buf[param_count] = slice;
195 param_count += 1;
196
197 const comma = tokenizer.nextNoWS();
198 if (comma.id == .r_paren) break;
199 assert(comma.id == .comma);
200 }
201
202 outer: while (true) {
203 const tok = tokenizer.next();
204 switch (tok.id) {
205 .whitespace, .comment => continue,
206 .identifier => {
207 const slice = source[tok.start..tok.end];
208 for (param_buf[0..param_count], 0..) |param, i| {
209 if (std.mem.eql(u8, param, slice)) {
210 try tok_list.append(.{
211 .id = .macro_param,
212 .source = .unused,
213 .end = @intCast(i),
214 });
215 continue :outer;
216 }
217 }
218 },
219 .hash_hash => {
220 if (tok_list.items[tok_list.items.len - 1].id == .macro_param) {
221 tok_list.items[tok_list.items.len - 1].id = .macro_param_no_expand;
222 }
223 },
224 .nl, .eof => break,
225 else => {},
226 }
227 try tok_list.append(tok);
228 }
229
230 return .{
231 .source = source,
232 .tokens = try tok_list.toOwnedSlice(),
233 .params = param_count,
234 };
235}
236
237test "Macro matching" {
238 const testing = std.testing;
239 const helper = struct {
240 fn checkMacro(
241 allocator: mem.Allocator,
242 pattern_list: PatternList,
243 source: []const u8,
244 comptime expected_match: ?Impl,
245 ) !void {
246 var tok_list = std.ArrayList(CToken).init(allocator);
247 defer tok_list.deinit();
248 const ms = try tokenizeMacro(source, &tok_list);
249 defer allocator.free(ms.tokens);
250
251 const matched = try pattern_list.match(ms);
252 if (expected_match) |expected| {
253 try testing.expectEqual(expected, matched);
254 } else {
255 try testing.expectEqual(@as(@TypeOf(matched), null), matched);
256 }
257 }
258 };
259 const allocator = std.testing.allocator;
260 var pattern_list = try PatternList.init(allocator);
261 defer pattern_list.deinit(allocator);
262
263 try helper.checkMacro(allocator, pattern_list, "BAR(Z) (Z ## F)", .F_SUFFIX);
264 try helper.checkMacro(allocator, pattern_list, "BAR(Z) (Z ## U)", .U_SUFFIX);
265 try helper.checkMacro(allocator, pattern_list, "BAR(Z) (Z ## L)", .L_SUFFIX);
266 try helper.checkMacro(allocator, pattern_list, "BAR(Z) (Z ## LL)", .LL_SUFFIX);
267 try helper.checkMacro(allocator, pattern_list, "BAR(Z) (Z ## UL)", .UL_SUFFIX);
268 try helper.checkMacro(allocator, pattern_list, "BAR(Z) (Z ## ULL)", .ULL_SUFFIX);
269 try helper.checkMacro(allocator, pattern_list,
270 \\container_of(a, b, c) \
271 \\(__typeof__(b))((char *)(a) - \
272 \\ offsetof(__typeof__(*b), c))
273 , .WL_CONTAINER_OF);
274
275 try helper.checkMacro(allocator, pattern_list, "NO_MATCH(X, Y) (X + Y)", null);
276 try helper.checkMacro(allocator, pattern_list, "CAST_OR_CALL(X, Y) (X)(Y)", .CAST_OR_CALL);
277 try helper.checkMacro(allocator, pattern_list, "CAST_OR_CALL(X, Y) ((X)(Y))", .CAST_OR_CALL);
278 try helper.checkMacro(allocator, pattern_list, "IGNORE_ME(X) (void)(X)", .DISCARD);
279 try helper.checkMacro(allocator, pattern_list, "IGNORE_ME(X) ((void)(X))", .DISCARD);
280 try helper.checkMacro(allocator, pattern_list, "IGNORE_ME(X) (const void)(X)", .DISCARD);
281 try helper.checkMacro(allocator, pattern_list, "IGNORE_ME(X) ((const void)(X))", .DISCARD);
282 try helper.checkMacro(allocator, pattern_list, "IGNORE_ME(X) (volatile void)(X)", .DISCARD);
283 try helper.checkMacro(allocator, pattern_list, "IGNORE_ME(X) ((volatile void)(X))", .DISCARD);
284 try helper.checkMacro(allocator, pattern_list, "IGNORE_ME(X) (const volatile void)(X)", .DISCARD);
285 try helper.checkMacro(allocator, pattern_list, "IGNORE_ME(X) ((const volatile void)(X))", .DISCARD);
286 try helper.checkMacro(allocator, pattern_list, "IGNORE_ME(X) (volatile const void)(X)", .DISCARD);
287 try helper.checkMacro(allocator, pattern_list, "IGNORE_ME(X) ((volatile const void)(X))", .DISCARD);
288}
lib/compiler/translate-c/src/Scope.zig created+399
......@@ -0,0 +1,399 @@
1const std = @import("std");
2
3const aro = @import("aro");
4
5const ast = @import("ast.zig");
6const Translator = @import("Translator.zig");
7
8const Scope = @This();
9
10pub const SymbolTable = std.StringArrayHashMapUnmanaged(ast.Node);
11pub const AliasList = std.ArrayListUnmanaged(struct {
12 alias: []const u8,
13 name: []const u8,
14});
15
16/// Associates a container (structure or union) with its relevant member functions.
17pub const ContainerMemberFns = struct {
18 container_decl_ptr: *ast.Node,
19 member_fns: std.ArrayListUnmanaged(*ast.Payload.Func) = .empty,
20};
21pub const ContainerMemberFnsHashMap = std.AutoArrayHashMapUnmanaged(aro.QualType, ContainerMemberFns);
22
23id: Id,
24parent: ?*Scope,
25
26pub const Id = enum {
27 block,
28 root,
29 condition,
30 loop,
31 do_loop,
32};
33
34/// Used for the scope of condition expressions, for example `if (cond)`.
35/// The block is lazily initialized because it is only needed for rare
36/// cases of comma operators being used.
37pub const Condition = struct {
38 base: Scope,
39 block: ?Block = null,
40
41 fn getBlockScope(cond: *Condition, t: *Translator) !*Block {
42 if (cond.block) |*b| return b;
43 cond.block = try Block.init(t, &cond.base, true);
44 return &cond.block.?;
45 }
46
47 pub fn deinit(cond: *Condition) void {
48 if (cond.block) |*b| b.deinit();
49 }
50};
51
52/// Represents an in-progress Node.Block. This struct is stack-allocated.
53/// When it is deinitialized, it produces an Node.Block which is allocated
54/// into the main arena.
55pub const Block = struct {
56 base: Scope,
57 translator: *Translator,
58 statements: std.ArrayListUnmanaged(ast.Node),
59 variables: AliasList,
60 mangle_count: u32 = 0,
61 label: ?[]const u8 = null,
62
63 /// By default all variables are discarded, since we do not know in advance if they
64 /// will be used. This maps the variable's name to the Discard payload, so that if
65 /// the variable is subsequently referenced we can indicate that the discard should
66 /// be skipped during the intermediate AST -> Zig AST render step.
67 variable_discards: std.StringArrayHashMapUnmanaged(*ast.Payload.Discard),
68
69 /// When the block corresponds to a function, keep track of the return type
70 /// so that the return expression can be cast, if necessary
71 return_type: ?aro.QualType = null,
72
73 /// C static local variables are wrapped in a block-local struct. The struct
74 /// is named `mangle(static_local_ + name)` and the Zig variable within the
75 /// struct keeps the name of the C variable.
76 pub const static_local_prefix = "static_local";
77
78 /// C extern local variables are wrapped in a block-local struct. The struct
79 /// is named `mangle(extern_local + name)` and the Zig variable within the
80 /// struct keeps the name of the C variable.
81 pub const extern_local_prefix = "extern_local";
82
83 pub fn init(t: *Translator, parent: *Scope, labeled: bool) !Block {
84 var blk: Block = .{
85 .base = .{
86 .id = .block,
87 .parent = parent,
88 },
89 .translator = t,
90 .statements = .empty,
91 .variables = .empty,
92 .variable_discards = .empty,
93 };
94 if (labeled) {
95 blk.label = try blk.makeMangledName("blk");
96 }
97 return blk;
98 }
99
100 pub fn deinit(block: *Block) void {
101 block.statements.deinit(block.translator.gpa);
102 block.variables.deinit(block.translator.gpa);
103 block.variable_discards.deinit(block.translator.gpa);
104 block.* = undefined;
105 }
106
107 pub fn complete(block: *Block) !ast.Node {
108 const arena = block.translator.arena;
109 if (block.base.parent.?.id == .do_loop) {
110 // We reserve 1 extra statement if the parent is a do_loop. This is in case of
111 // do while, we want to put `if (cond) break;` at the end.
112 const alloc_len = block.statements.items.len + @intFromBool(block.base.parent.?.id == .do_loop);
113 var stmts = try arena.alloc(ast.Node, alloc_len);
114 stmts.len = block.statements.items.len;
115 @memcpy(stmts[0..block.statements.items.len], block.statements.items);
116 return ast.Node.Tag.block.create(arena, .{
117 .label = block.label,
118 .stmts = stmts,
119 });
120 }
121 if (block.statements.items.len == 0) return ast.Node.Tag.empty_block.init();
122 return ast.Node.Tag.block.create(arena, .{
123 .label = block.label,
124 .stmts = try arena.dupe(ast.Node, block.statements.items),
125 });
126 }
127
128 /// Given the desired name, return a name that does not shadow anything from outer scopes.
129 /// Inserts the returned name into the scope.
130 /// The name will not be visible to callers of getAlias.
131 pub fn reserveMangledName(block: *Block, name: []const u8) ![]const u8 {
132 return block.createMangledName(name, true, null);
133 }
134
135 /// Same as reserveMangledName, but enables the alias immediately.
136 pub fn makeMangledName(block: *Block, name: []const u8) ![]const u8 {
137 return block.createMangledName(name, false, null);
138 }
139
140 pub fn createMangledName(block: *Block, name: []const u8, reservation: bool, prefix_opt: ?[]const u8) ![]const u8 {
141 const arena = block.translator.arena;
142 const name_copy = try arena.dupe(u8, name);
143 const alias_base = if (prefix_opt) |prefix|
144 try std.fmt.allocPrint(arena, "{s}_{s}", .{ prefix, name })
145 else
146 name;
147 var proposed_name = alias_base;
148 while (block.contains(proposed_name)) {
149 block.mangle_count += 1;
150 proposed_name = try std.fmt.allocPrint(arena, "{s}_{d}", .{ alias_base, block.mangle_count });
151 }
152 const new_mangle = try block.variables.addOne(block.translator.gpa);
153 if (reservation) {
154 new_mangle.* = .{ .name = name_copy, .alias = name_copy };
155 } else {
156 new_mangle.* = .{ .name = name_copy, .alias = proposed_name };
157 }
158 return proposed_name;
159 }
160
161 fn getAlias(block: *Block, name: []const u8) ?[]const u8 {
162 for (block.variables.items) |p| {
163 if (std.mem.eql(u8, p.name, name))
164 return p.alias;
165 }
166 return block.base.parent.?.getAlias(name);
167 }
168
169 fn localContains(block: *Block, name: []const u8) bool {
170 for (block.variables.items) |p| {
171 if (std.mem.eql(u8, p.alias, name))
172 return true;
173 }
174 return false;
175 }
176
177 fn contains(block: *Block, name: []const u8) bool {
178 if (block.localContains(name))
179 return true;
180 return block.base.parent.?.contains(name);
181 }
182
183 pub fn discardVariable(block: *Block, name: []const u8) Translator.Error!void {
184 const gpa = block.translator.gpa;
185 const arena = block.translator.arena;
186 const name_node = try ast.Node.Tag.identifier.create(arena, name);
187 const discard = try ast.Node.Tag.discard.create(arena, .{ .should_skip = false, .value = name_node });
188 try block.statements.append(gpa, discard);
189 try block.variable_discards.putNoClobber(gpa, name, discard.castTag(.discard).?);
190 }
191};
192
193pub const Root = struct {
194 base: Scope,
195 translator: *Translator,
196 sym_table: SymbolTable,
197 blank_macros: std.StringArrayHashMapUnmanaged(void),
198 nodes: std.ArrayListUnmanaged(ast.Node),
199 container_member_fns_map: ContainerMemberFnsHashMap,
200
201 pub fn init(t: *Translator) Root {
202 return .{
203 .base = .{
204 .id = .root,
205 .parent = null,
206 },
207 .translator = t,
208 .sym_table = .empty,
209 .blank_macros = .empty,
210 .nodes = .empty,
211 .container_member_fns_map = .empty,
212 };
213 }
214
215 pub fn deinit(root: *Root) void {
216 root.sym_table.deinit(root.translator.gpa);
217 root.blank_macros.deinit(root.translator.gpa);
218 root.nodes.deinit(root.translator.gpa);
219 for (root.container_member_fns_map.values()) |*members| {
220 members.member_fns.deinit(root.translator.gpa);
221 }
222 root.container_member_fns_map.deinit(root.translator.gpa);
223 }
224
225 /// Check if the global scope contains this name, without looking into the "future", e.g.
226 /// ignore the preprocessed decl and macro names.
227 pub fn containsNow(root: *Root, name: []const u8) bool {
228 return root.sym_table.contains(name);
229 }
230
231 /// Check if the global scope contains the name, includes all decls that haven't been translated yet.
232 pub fn contains(root: *Root, name: []const u8) bool {
233 return root.containsNow(name) or root.translator.global_names.contains(name) or root.translator.weak_global_names.contains(name);
234 }
235
236 pub fn addMemberFunction(root: *Root, func_ty: aro.Type.Func, func: *ast.Payload.Func) !void {
237 std.debug.assert(func.data.name != null);
238 if (func_ty.params.len == 0) return;
239
240 const param1_base = func_ty.params[0].qt.base(root.translator.comp);
241 const container_qt = if (param1_base.type == .pointer)
242 param1_base.type.pointer.child.base(root.translator.comp).qt
243 else
244 param1_base.qt;
245
246 if (root.container_member_fns_map.getPtr(container_qt)) |members| {
247 try members.member_fns.append(root.translator.gpa, func);
248 }
249 }
250
251 pub fn processContainerMemberFns(root: *Root) !void {
252 const gpa = root.translator.gpa;
253 const arena = root.translator.arena;
254
255 var member_names: std.StringArrayHashMapUnmanaged(u32) = .empty;
256 defer member_names.deinit(gpa);
257 for (root.container_member_fns_map.values()) |members| {
258 member_names.clearRetainingCapacity();
259 const decls_ptr = switch (members.container_decl_ptr.tag()) {
260 .@"struct", .@"union" => blk_record: {
261 const payload: *ast.Payload.Container = @alignCast(@fieldParentPtr("base", members.container_decl_ptr.ptr_otherwise));
262 // Avoid duplication with field names
263 for (payload.data.fields) |field| {
264 try member_names.put(gpa, field.name, 0);
265 }
266 break :blk_record &payload.data.decls;
267 },
268 .opaque_literal => blk_opaque: {
269 const container_decl = try ast.Node.Tag.@"opaque".create(arena, .{
270 .layout = .none,
271 .fields = &.{},
272 .decls = &.{},
273 });
274 members.container_decl_ptr.* = container_decl;
275 break :blk_opaque &container_decl.castTag(.@"opaque").?.data.decls;
276 },
277 else => return,
278 };
279
280 const old_decls = decls_ptr.*;
281 const new_decls = try arena.alloc(ast.Node, old_decls.len + members.member_fns.items.len);
282 @memcpy(new_decls[0..old_decls.len], old_decls);
283 // Assume the allocator of payload.data.decls is arena,
284 // so don't add arena.free(old_variables).
285 const func_ref_vars = new_decls[old_decls.len..];
286 var count: u32 = 0;
287 for (members.member_fns.items) |func| {
288 const func_name = func.data.name.?;
289
290 const last_index = std.mem.lastIndexOf(u8, func_name, "_");
291 const last_name = if (last_index) |index| func_name[index + 1 ..] else continue;
292 var same_count: u32 = 0;
293 const gop = try member_names.getOrPutValue(gpa, last_name, same_count);
294 if (gop.found_existing) {
295 gop.value_ptr.* += 1;
296 same_count = gop.value_ptr.*;
297 }
298 const var_name = if (same_count == 0)
299 last_name
300 else
301 try std.fmt.allocPrint(arena, "{s}{d}", .{ last_name, same_count });
302
303 func_ref_vars[count] = try ast.Node.Tag.pub_var_simple.create(arena, .{
304 .name = var_name,
305 .init = try ast.Node.Tag.identifier.create(arena, func_name),
306 });
307 count += 1;
308 }
309 decls_ptr.* = new_decls[0 .. old_decls.len + count];
310 }
311 }
312};
313
314pub fn findBlockScope(inner: *Scope, t: *Translator) !*Block {
315 var scope = inner;
316 while (true) {
317 switch (scope.id) {
318 .root => unreachable,
319 .block => return @fieldParentPtr("base", scope),
320 .condition => return @as(*Condition, @fieldParentPtr("base", scope)).getBlockScope(t),
321 else => scope = scope.parent.?,
322 }
323 }
324}
325
326pub fn findBlockReturnType(inner: *Scope) aro.QualType {
327 var scope = inner;
328 while (true) {
329 switch (scope.id) {
330 .root => unreachable,
331 .block => {
332 const block: *Block = @fieldParentPtr("base", scope);
333 if (block.return_type) |qt| return qt;
334 scope = scope.parent.?;
335 },
336 else => scope = scope.parent.?,
337 }
338 }
339}
340
341pub fn getAlias(scope: *Scope, name: []const u8) ?[]const u8 {
342 return switch (scope.id) {
343 .root => null,
344 .block => @as(*Block, @fieldParentPtr("base", scope)).getAlias(name),
345 .loop, .do_loop, .condition => scope.parent.?.getAlias(name),
346 };
347}
348
349fn contains(scope: *Scope, name: []const u8) bool {
350 return switch (scope.id) {
351 .root => @as(*Root, @fieldParentPtr("base", scope)).contains(name),
352 .block => @as(*Block, @fieldParentPtr("base", scope)).contains(name),
353 .loop, .do_loop, .condition => scope.parent.?.contains(name),
354 };
355}
356
357/// Appends a node to the first block scope if inside a function, or to the root tree if not.
358pub fn appendNode(inner: *Scope, node: ast.Node) !void {
359 var scope = inner;
360 while (true) {
361 switch (scope.id) {
362 .root => {
363 const root: *Root = @fieldParentPtr("base", scope);
364 return root.nodes.append(root.translator.gpa, node);
365 },
366 .block => {
367 const block: *Block = @fieldParentPtr("base", scope);
368 return block.statements.append(block.translator.gpa, node);
369 },
370 else => scope = scope.parent.?,
371 }
372 }
373}
374
375pub fn skipVariableDiscard(inner: *Scope, name: []const u8) void {
376 if (true) {
377 // TODO: due to 'local variable is never mutated' errors, we can
378 // only skip discards if a variable is used as an lvalue, which
379 // we don't currently have detection for in translate-c.
380 // Once #17584 is completed, perhaps we can do away with this
381 // logic entirely, and instead rely on render to fixup code.
382 return;
383 }
384 var scope = inner;
385 while (true) {
386 switch (scope.id) {
387 .root => return,
388 .block => {
389 const block: *Block = @fieldParentPtr("base", scope);
390 if (block.variable_discards.get(name)) |discard| {
391 discard.data.should_skip = true;
392 return;
393 }
394 },
395 else => {},
396 }
397 scope = scope.parent.?;
398 }
399}
lib/compiler/translate-c/src/Translator.zig created+4183
......@@ -0,0 +1,4183 @@
1const std = @import("std");
2const mem = std.mem;
3const assert = std.debug.assert;
4const CallingConvention = std.builtin.CallingConvention;
5
6const aro = @import("aro");
7const CToken = aro.Tokenizer.Token;
8const Tree = aro.Tree;
9const Node = Tree.Node;
10const TokenIndex = Tree.TokenIndex;
11const QualType = aro.QualType;
12
13const ast = @import("ast.zig");
14const ZigNode = ast.Node;
15const ZigTag = ZigNode.Tag;
16const builtins = @import("builtins.zig");
17const helpers = @import("helpers.zig");
18const MacroTranslator = @import("MacroTranslator.zig");
19const PatternList = @import("PatternList.zig");
20const Scope = @import("Scope.zig");
21
22pub const Error = std.mem.Allocator.Error;
23pub const MacroProcessingError = Error || error{UnexpectedMacroToken};
24pub const TypeError = Error || error{UnsupportedType};
25pub const TransError = TypeError || error{UnsupportedTranslation};
26
27const Translator = @This();
28
29/// The C AST to be translated.
30tree: *const Tree,
31/// The compilation corresponding to the AST.
32comp: *aro.Compilation,
33/// The Preprocessor that produced the source for `tree`.
34pp: *const aro.Preprocessor,
35
36gpa: mem.Allocator,
37arena: mem.Allocator,
38
39alias_list: Scope.AliasList,
40global_scope: *Scope.Root,
41/// Running number used for creating new unique identifiers.
42mangle_count: u32 = 0,
43
44/// Table of declarations for enum, struct, union and typedef types.
45type_decls: std.AutoArrayHashMapUnmanaged(Node.Index, []const u8) = .empty,
46/// Table of record decls that have been demoted to opaques.
47opaque_demotes: std.AutoHashMapUnmanaged(QualType, void) = .empty,
48/// Table of unnamed enums and records that are child types of typedefs.
49unnamed_typedefs: std.AutoHashMapUnmanaged(QualType, []const u8) = .empty,
50/// Table of anonymous record to generated field names.
51anonymous_record_field_names: std.AutoHashMapUnmanaged(struct {
52 parent: QualType,
53 field: QualType,
54}, []const u8) = .empty,
55
56/// This one is different than the root scope's name table. This contains
57/// a list of names that we found by visiting all the top level decls without
58/// translating them. The other maps are updated as we translate; this one is updated
59/// up front in a pre-processing step.
60global_names: std.StringArrayHashMapUnmanaged(void) = .empty,
61
62/// This is similar to `global_names`, but contains names which we would
63/// *like* to use, but do not strictly *have* to if they are unavailable.
64/// These are relevant to types, which ideally we would name like
65/// 'struct_foo' with an alias 'foo', but if either of those names is taken,
66/// may be mangled.
67/// This is distinct from `global_names` so we can detect at a type
68/// declaration whether or not the name is available.
69weak_global_names: std.StringArrayHashMapUnmanaged(void) = .empty,
70
71/// Set of identifiers known to refer to typedef declarations.
72/// Used when parsing macros.
73typedefs: std.StringArrayHashMapUnmanaged(void) = .empty,
74
75/// The lhs lval of a compound assignment expression.
76compound_assign_dummy: ?ZigNode = null,
77
78pub fn getMangle(t: *Translator) u32 {
79 t.mangle_count += 1;
80 return t.mangle_count;
81}
82
83/// Convert an `aro.Source.Location` to a 'file:line:column' string.
84pub fn locStr(t: *Translator, loc: aro.Source.Location) ![]const u8 {
85 const source = t.comp.getSource(loc.id);
86 const line_col = source.lineCol(loc);
87 const filename = source.path;
88
89 const line = source.physicalLine(loc);
90 const col = line_col.col;
91
92 return std.fmt.allocPrint(t.arena, "{s}:{d}:{d}", .{ filename, line, col });
93}
94
95fn maybeSuppressResult(t: *Translator, used: ResultUsed, result: ZigNode) TransError!ZigNode {
96 if (used == .used) return result;
97 return ZigTag.discard.create(t.arena, .{ .should_skip = false, .value = result });
98}
99
100pub fn addTopLevelDecl(t: *Translator, name: []const u8, decl_node: ZigNode) !void {
101 const gop = try t.global_scope.sym_table.getOrPut(t.gpa, name);
102 if (!gop.found_existing) {
103 gop.value_ptr.* = decl_node;
104 try t.global_scope.nodes.append(t.gpa, decl_node);
105 }
106}
107
108fn fail(
109 t: *Translator,
110 err: anytype,
111 source_loc: TokenIndex,
112 comptime format: []const u8,
113 args: anytype,
114) (@TypeOf(err) || error{OutOfMemory}) {
115 try t.warn(&t.global_scope.base, source_loc, format, args);
116 return err;
117}
118
119pub fn failDecl(
120 t: *Translator,
121 scope: *Scope,
122 tok_idx: TokenIndex,
123 name: []const u8,
124 comptime format: []const u8,
125 args: anytype,
126) Error!void {
127 const loc = t.tree.tokens.items(.loc)[tok_idx];
128 return t.failDeclExtra(scope, loc, name, format, args);
129}
130
131pub fn failDeclExtra(
132 t: *Translator,
133 scope: *Scope,
134 loc: aro.Source.Location,
135 name: []const u8,
136 comptime format: []const u8,
137 args: anytype,
138) Error!void {
139 // location
140 // pub const name = @compileError(msg);
141 const fail_msg = try std.fmt.allocPrint(t.arena, format, args);
142 const fail_decl = try ZigTag.fail_decl.create(t.arena, .{ .actual = name, .mangled = fail_msg });
143
144 const str = try t.locStr(loc);
145 const location_comment = try std.fmt.allocPrint(t.arena, "// {s}", .{str});
146 const loc_node = try ZigTag.warning.create(t.arena, location_comment);
147
148 if (scope.id == .root) {
149 try t.addTopLevelDecl(name, fail_decl);
150 try scope.appendNode(loc_node);
151 } else {
152 try scope.appendNode(fail_decl);
153 try scope.appendNode(loc_node);
154
155 const bs = try scope.findBlockScope(t);
156 try bs.discardVariable(name);
157 }
158}
159
160fn warn(t: *Translator, scope: *Scope, tok_idx: TokenIndex, comptime format: []const u8, args: anytype) !void {
161 const loc = t.tree.tokens.items(.loc)[tok_idx];
162 const str = try t.locStr(loc);
163 const value = try std.fmt.allocPrint(t.arena, "// {s}: warning: " ++ format, .{str} ++ args);
164 try scope.appendNode(try ZigTag.warning.create(t.arena, value));
165}
166
167pub const Options = struct {
168 gpa: mem.Allocator,
169 comp: *aro.Compilation,
170 pp: *const aro.Preprocessor,
171 tree: *const aro.Tree,
172 module_libs: bool,
173};
174
175pub fn translate(options: Options) ![]u8 {
176 const gpa = options.gpa;
177 var arena_allocator = std.heap.ArenaAllocator.init(gpa);
178 defer arena_allocator.deinit();
179 const arena = arena_allocator.allocator();
180
181 var translator: Translator = .{
182 .gpa = gpa,
183 .arena = arena,
184 .alias_list = .empty,
185 .global_scope = try arena.create(Scope.Root),
186 .comp = options.comp,
187 .pp = options.pp,
188 .tree = options.tree,
189 };
190 translator.global_scope.* = Scope.Root.init(&translator);
191 defer {
192 translator.type_decls.deinit(gpa);
193 translator.alias_list.deinit(gpa);
194 translator.global_names.deinit(gpa);
195 translator.weak_global_names.deinit(gpa);
196 translator.opaque_demotes.deinit(gpa);
197 translator.unnamed_typedefs.deinit(gpa);
198 translator.anonymous_record_field_names.deinit(gpa);
199 translator.typedefs.deinit(gpa);
200 translator.global_scope.deinit();
201 }
202
203 try translator.prepopulateGlobalNameTable();
204 try translator.transTopLevelDecls();
205
206 // Insert empty line before macros.
207 try translator.global_scope.nodes.append(gpa, try ZigTag.warning.create(arena, "\n"));
208
209 try translator.transMacros();
210
211 for (translator.alias_list.items) |alias| {
212 if (!translator.global_scope.sym_table.contains(alias.alias)) {
213 const node = try ZigTag.alias.create(arena, .{ .actual = alias.alias, .mangled = alias.name });
214 try translator.addTopLevelDecl(alias.alias, node);
215 }
216 }
217
218 try translator.global_scope.processContainerMemberFns();
219
220 var buf: std.ArrayList(u8) = .init(gpa);
221 defer buf.deinit();
222
223 if (options.module_libs) {
224 try buf.appendSlice(
225 \\pub const __builtin = @import("c_builtins");
226 \\pub const __helpers = @import("helpers");
227 \\
228 \\
229 );
230 } else {
231 try buf.appendSlice(
232 \\pub const __builtin = @import("c_builtins.zig");
233 \\pub const __helpers = @import("helpers.zig");
234 \\
235 \\
236 );
237 }
238
239 var zig_ast = try ast.render(gpa, translator.global_scope.nodes.items);
240 defer {
241 gpa.free(zig_ast.source);
242 zig_ast.deinit(gpa);
243 }
244 try zig_ast.renderToArrayList(&buf, .{});
245 return buf.toOwnedSlice();
246}
247
248fn prepopulateGlobalNameTable(t: *Translator) !void {
249 for (t.tree.root_decls.items) |decl| {
250 switch (decl.get(t.tree)) {
251 .typedef => |typedef_decl| {
252 const decl_name = t.tree.tokSlice(typedef_decl.name_tok);
253 try t.global_names.put(t.gpa, decl_name, {});
254
255 // Check for typedefs with unnamed enum/record child types.
256 const base = typedef_decl.qt.base(t.comp);
257 switch (base.type) {
258 .@"enum" => |enum_ty| {
259 if (enum_ty.name.lookup(t.comp)[0] != '(') continue;
260 },
261 .@"struct", .@"union" => |record_ty| {
262 if (record_ty.name.lookup(t.comp)[0] != '(') continue;
263 },
264 else => continue,
265 }
266
267 const gop = try t.unnamed_typedefs.getOrPut(t.gpa, base.qt);
268 if (gop.found_existing) {
269 // One typedef can declare multiple names.
270 // TODO Don't put this one in `decl_table` so it's processed later.
271 continue;
272 }
273 gop.value_ptr.* = decl_name;
274 },
275
276 .struct_decl,
277 .union_decl,
278 .struct_forward_decl,
279 .union_forward_decl,
280 .enum_decl,
281 .enum_forward_decl,
282 => {
283 const decl_qt = decl.qt(t.tree);
284 const prefix, const name = switch (decl_qt.base(t.comp).type) {
285 .@"struct" => |struct_ty| .{ "struct", struct_ty.name.lookup(t.comp) },
286 .@"union" => |union_ty| .{ "union", union_ty.name.lookup(t.comp) },
287 .@"enum" => |enum_ty| .{ "enum", enum_ty.name.lookup(t.comp) },
288 else => unreachable,
289 };
290 const prefixed_name = try std.fmt.allocPrint(t.arena, "{s}_{s}", .{ prefix, name });
291 // `name` and `prefixed_name` are the preferred names for this type.
292 // However, we can name it anything else if necessary, so these are "weak names".
293 try t.weak_global_names.ensureUnusedCapacity(t.gpa, 2);
294 t.weak_global_names.putAssumeCapacity(name, {});
295 t.weak_global_names.putAssumeCapacity(prefixed_name, {});
296 },
297
298 .function, .variable => {
299 const decl_name = t.tree.tokSlice(decl.tok(t.tree));
300 try t.global_names.put(t.gpa, decl_name, {});
301 },
302 .static_assert => {},
303 .empty_decl => {},
304 .global_asm => {},
305 else => unreachable,
306 }
307 }
308
309 for (t.pp.defines.keys(), t.pp.defines.values()) |name, macro| {
310 if (macro.is_builtin) continue;
311 if (!t.isSelfDefinedMacro(name, macro)) {
312 try t.global_names.put(t.gpa, name, {});
313 }
314 }
315}
316
317/// Determines whether macro is of the form: `#define FOO FOO` (Possibly with trailing tokens)
318/// Macros of this form will not be translated.
319fn isSelfDefinedMacro(t: *Translator, name: []const u8, macro: aro.Preprocessor.Macro) bool {
320 if (macro.is_func) return false;
321
322 if (macro.tokens.len < 1) return false;
323 const first_tok = macro.tokens[0];
324
325 const source = t.comp.getSource(macro.loc.id);
326 const slice = source.buf[first_tok.start..first_tok.end];
327
328 return std.mem.eql(u8, name, slice);
329}
330
331// =======================
332// Declaration translation
333// =======================
334
335fn transTopLevelDecls(t: *Translator) !void {
336 for (t.tree.root_decls.items) |decl| {
337 try t.transDecl(&t.global_scope.base, decl);
338 }
339}
340
341fn transDecl(t: *Translator, scope: *Scope, decl: Node.Index) !void {
342 switch (decl.get(t.tree)) {
343 .typedef => |typedef_decl| {
344 // Implicit typedefs are translated only if referenced.
345 if (typedef_decl.implicit) return;
346 try t.transTypeDef(scope, decl);
347 },
348
349 .struct_decl, .union_decl => |record_decl| {
350 try t.transRecordDecl(scope, record_decl.container_qt);
351 },
352
353 .enum_decl => |enum_decl| {
354 try t.transEnumDecl(scope, enum_decl.container_qt);
355 },
356
357 .enum_field,
358 .record_field,
359 .struct_forward_decl,
360 .union_forward_decl,
361 .enum_forward_decl,
362 => return,
363
364 .function => |function| {
365 if (function.definition) |definition| {
366 return t.transFnDecl(scope, definition.get(t.tree).function);
367 }
368 try t.transFnDecl(scope, function);
369 },
370
371 .variable => |variable| {
372 if (variable.definition != null) return;
373 try t.transVarDecl(scope, variable);
374 },
375 .static_assert => |static_assert| {
376 try t.transStaticAssert(&t.global_scope.base, static_assert);
377 },
378 .global_asm => |global_asm| {
379 try t.transGlobalAsm(&t.global_scope.base, global_asm);
380 },
381 .empty_decl => {},
382 else => unreachable,
383 }
384}
385
386pub const builtin_typedef_map = std.StaticStringMap([]const u8).initComptime(.{
387 .{ "uint8_t", "u8" },
388 .{ "int8_t", "i8" },
389 .{ "uint16_t", "u16" },
390 .{ "int16_t", "i16" },
391 .{ "uint32_t", "u32" },
392 .{ "int32_t", "i32" },
393 .{ "uint64_t", "u64" },
394 .{ "int64_t", "i64" },
395 .{ "intptr_t", "isize" },
396 .{ "uintptr_t", "usize" },
397 .{ "ssize_t", "isize" },
398 .{ "size_t", "usize" },
399});
400
401fn transTypeDef(t: *Translator, scope: *Scope, typedef_node: Node.Index) Error!void {
402 const typedef_decl = typedef_node.get(t.tree).typedef;
403 if (t.type_decls.get(typedef_node)) |_|
404 return; // Avoid processing this decl twice
405
406 const toplevel = scope.id == .root;
407 const bs: *Scope.Block = if (!toplevel) try scope.findBlockScope(t) else undefined;
408
409 var name: []const u8 = t.tree.tokSlice(typedef_decl.name_tok);
410 try t.typedefs.put(t.gpa, name, {});
411
412 if (builtin_typedef_map.get(name)) |builtin| {
413 return t.type_decls.putNoClobber(t.gpa, typedef_node, builtin);
414 }
415 if (!toplevel) name = try bs.makeMangledName(name);
416 try t.type_decls.putNoClobber(t.gpa, typedef_node, name);
417
418 const typedef_loc = typedef_decl.name_tok;
419 const init_node = t.transType(scope, typedef_decl.qt, typedef_loc) catch |err| switch (err) {
420 error.UnsupportedType => {
421 return t.failDecl(scope, typedef_loc, name, "unable to resolve typedef child type", .{});
422 },
423 error.OutOfMemory => |e| return e,
424 };
425
426 const payload = try t.arena.create(ast.Payload.SimpleVarDecl);
427 payload.* = .{
428 .base = .{ .tag = if (toplevel) .pub_var_simple else .var_simple },
429 .data = .{
430 .name = name,
431 .init = init_node,
432 },
433 };
434 const node = ZigNode.initPayload(&payload.base);
435
436 if (toplevel) {
437 try t.addTopLevelDecl(name, node);
438 } else {
439 try scope.appendNode(node);
440 try bs.discardVariable(name);
441 }
442}
443
444fn mangleWeakGlobalName(t: *Translator, want_name: []const u8) Error![]const u8 {
445 var cur_name = want_name;
446
447 if (!t.weak_global_names.contains(want_name)) {
448 // This type wasn't noticed by the name detection pass, so nothing has been treating this as
449 // a weak global name. We must mangle it to avoid conflicts with locals.
450 cur_name = try std.fmt.allocPrint(t.arena, "{s}_{d}", .{ want_name, t.getMangle() });
451 }
452
453 while (t.global_names.contains(cur_name)) {
454 cur_name = try std.fmt.allocPrint(t.arena, "{s}_{d}", .{ want_name, t.getMangle() });
455 }
456 return cur_name;
457}
458
459fn transRecordDecl(t: *Translator, scope: *Scope, record_qt: QualType) Error!void {
460 const base = record_qt.base(t.comp);
461 const record_ty = switch (base.type) {
462 .@"struct", .@"union" => |record_ty| record_ty,
463 else => unreachable,
464 };
465
466 if (t.type_decls.get(record_ty.decl_node)) |_|
467 return; // Avoid processing this decl twice
468
469 const toplevel = scope.id == .root;
470 const bs: *Scope.Block = if (!toplevel) try scope.findBlockScope(t) else undefined;
471
472 const container_kind: ZigTag = if (base.type == .@"union") .@"union" else .@"struct";
473 const container_kind_name = @tagName(container_kind);
474
475 var bare_name = record_ty.name.lookup(t.comp);
476 var is_unnamed = false;
477 var name = bare_name;
478
479 if (t.unnamed_typedefs.get(base.qt)) |typedef_name| {
480 bare_name = typedef_name;
481 name = typedef_name;
482 } else {
483 if (record_ty.isAnonymous(t.comp)) {
484 bare_name = try std.fmt.allocPrint(t.arena, "unnamed_{d}", .{t.getMangle()});
485 is_unnamed = true;
486 }
487 name = try std.fmt.allocPrint(t.arena, "{s}_{s}", .{ container_kind_name, bare_name });
488 if (toplevel and !is_unnamed) {
489 name = try t.mangleWeakGlobalName(name);
490 }
491 }
492 if (!toplevel) name = try bs.makeMangledName(name);
493 try t.type_decls.putNoClobber(t.gpa, record_ty.decl_node, name);
494
495 const is_pub = toplevel and !is_unnamed;
496 const init_node = init: {
497 if (record_ty.layout == null) {
498 try t.opaque_demotes.put(t.gpa, base.qt, {});
499 break :init ZigTag.opaque_literal.init();
500 }
501
502 var fields = try std.ArrayList(ast.Payload.Container.Field).initCapacity(t.gpa, record_ty.fields.len);
503 defer fields.deinit();
504
505 var functions = std.ArrayList(ZigNode).init(t.gpa);
506 defer functions.deinit();
507
508 var unnamed_field_count: u32 = 0;
509
510 // If a record doesn't have any attributes that would affect the alignment and
511 // layout, then we can just use a simple `extern` type. If it does have attributes,
512 // then we need to inspect the layout and assign an `align` value for each field.
513 const has_alignment_attributes = aligned: {
514 if (record_qt.hasAttribute(t.comp, .@"packed")) break :aligned true;
515 if (record_qt.hasAttribute(t.comp, .aligned)) break :aligned true;
516 for (record_ty.fields) |field| {
517 const field_attrs = field.attributes(t.comp);
518 for (field_attrs) |field_attr| {
519 switch (field_attr.tag) {
520 .@"packed", .aligned => break :aligned true,
521 else => {},
522 }
523 }
524 }
525 break :aligned false;
526 };
527 const head_field_alignment: ?c_uint = if (has_alignment_attributes) t.headFieldAlignment(record_ty) else null;
528
529 for (record_ty.fields, 0..) |field, field_index| {
530 const field_loc = field.name_tok;
531
532 // Demote record to opaque if it contains a bitfield
533 if (field.bit_width != .null) {
534 try t.opaque_demotes.put(t.gpa, base.qt, {});
535 try t.warn(scope, field_loc, "{s} demoted to opaque type - has bitfield", .{container_kind_name});
536 break :init ZigTag.opaque_literal.init();
537 }
538
539 var field_name = field.name.lookup(t.comp);
540 if (field.name_tok == 0) {
541 field_name = try std.fmt.allocPrint(t.arena, "unnamed_{d}", .{unnamed_field_count});
542 unnamed_field_count += 1;
543 try t.anonymous_record_field_names.put(t.gpa, .{
544 .parent = base.qt,
545 .field = field.qt,
546 }, field_name);
547 }
548
549 const field_alignment = if (has_alignment_attributes)
550 t.alignmentForField(record_ty, head_field_alignment, field_index)
551 else
552 null;
553
554 const field_type = field_type: {
555 // Check if this is a flexible array member.
556 flexible: {
557 if (field_index != record_ty.fields.len - 1 and container_kind != .@"union") break :flexible;
558 const array_ty = field.qt.get(t.comp, .array) orelse break :flexible;
559 if (array_ty.len != .incomplete and (array_ty.len != .fixed or array_ty.len.fixed != 0)) break :flexible;
560
561 const elem_type = t.transType(scope, array_ty.elem, field_loc) catch |err| switch (err) {
562 error.UnsupportedType => break :flexible,
563 else => |e| return e,
564 };
565 const zero_array = try ZigTag.array_type.create(t.arena, .{ .len = 0, .elem_type = elem_type });
566
567 const member_name = field_name;
568 field_name = try std.fmt.allocPrint(t.arena, "_{s}", .{field_name});
569
570 const member = try t.createFlexibleMemberFn(member_name, field_name);
571 try functions.append(member);
572
573 break :field_type zero_array;
574 }
575
576 break :field_type t.transType(scope, field.qt, field_loc) catch |err| switch (err) {
577 error.UnsupportedType => {
578 try t.opaque_demotes.put(t.gpa, base.qt, {});
579 try t.warn(scope, field.name_tok, "{s} demoted to opaque type - unable to translate type of field {s}", .{
580 container_kind_name,
581 field_name,
582 });
583 break :init ZigTag.opaque_literal.init();
584 },
585 else => |e| return e,
586 };
587 };
588
589 // C99 introduced designated initializers for structs. Omitted fields are implicitly
590 // initialized to zero. Some C APIs are designed with this in mind. Defaulting to zero
591 // values for translated struct fields permits Zig code to comfortably use such an API.
592 const default_value = if (container_kind == .@"struct")
593 try t.createZeroValueNode(field.qt, field_type, .no_as)
594 else
595 null;
596
597 fields.appendAssumeCapacity(.{
598 .name = field_name,
599 .type = field_type,
600 .alignment = field_alignment,
601 .default_value = default_value,
602 });
603 }
604
605 // A record is empty if it has no fields or only flexible array fields.
606 if (record_ty.fields.len == functions.items.len and
607 t.comp.target.os.tag == .windows and t.comp.target.abi == .msvc)
608 {
609 // In MSVC empty records have the same size as their alignment.
610 const padding_bits = record_ty.layout.?.size_bits;
611 const alignment_bits = record_ty.layout.?.field_alignment_bits;
612
613 try fields.append(.{
614 .name = "_padding",
615 .type = try ZigTag.type.create(t.arena, try std.fmt.allocPrint(t.arena, "u{d}", .{padding_bits})),
616 .alignment = @divExact(alignment_bits, 8),
617 .default_value = if (container_kind == .@"struct")
618 ZigTag.zero_literal.init()
619 else
620 null,
621 });
622 }
623
624 const container_payload = try t.arena.create(ast.Payload.Container);
625 container_payload.* = .{
626 .base = .{ .tag = container_kind },
627 .data = .{
628 .layout = .@"extern",
629 .fields = try t.arena.dupe(ast.Payload.Container.Field, fields.items),
630 .decls = try t.arena.dupe(ZigNode, functions.items),
631 },
632 };
633 break :init ZigNode.initPayload(&container_payload.base);
634 };
635
636 const payload = try t.arena.create(ast.Payload.SimpleVarDecl);
637 payload.* = .{
638 .base = .{ .tag = if (is_pub) .pub_var_simple else .var_simple },
639 .data = .{
640 .name = name,
641 .init = init_node,
642 },
643 };
644 const node = ZigNode.initPayload(&payload.base);
645 if (toplevel) {
646 try t.addTopLevelDecl(name, node);
647 // Only add the alias if the name is available *and* it was caught by
648 // name detection. Don't bother performing a weak mangle, since a
649 // mangled name is of no real use here.
650 if (!is_unnamed and !t.global_names.contains(bare_name) and t.weak_global_names.contains(bare_name))
651 try t.alias_list.append(t.gpa, .{ .alias = bare_name, .name = name });
652 try t.global_scope.container_member_fns_map.put(t.gpa, record_qt, .{
653 .container_decl_ptr = &payload.data.init,
654 });
655 } else {
656 try scope.appendNode(node);
657 try bs.discardVariable(name);
658 }
659}
660
661fn transFnDecl(t: *Translator, scope: *Scope, function: Node.Function) Error!void {
662 const func_ty = function.qt.get(t.comp, .func).?;
663
664 const is_pub = scope.id == .root;
665
666 const fn_name = t.tree.tokSlice(function.name_tok);
667 if (scope.getAlias(fn_name) != null or t.global_scope.containsNow(fn_name))
668 return; // Avoid processing this decl twice
669
670 const fn_decl_loc = function.name_tok;
671 const has_body = function.body != null and func_ty.kind != .variadic;
672 if (function.body != null and func_ty.kind == .variadic) {
673 try t.warn(scope, function.name_tok, "TODO unable to translate variadic function, demoted to extern", .{});
674 }
675
676 const is_always_inline = has_body and function.qt.getAttribute(t.comp, .always_inline) != null;
677 const proto_ctx: FnProtoContext = .{
678 .fn_name = fn_name,
679 .is_always_inline = is_always_inline,
680 .is_extern = !has_body,
681 .is_export = !function.static and has_body and !is_always_inline and !function.@"inline",
682 .is_pub = is_pub,
683 .has_body = has_body,
684 .cc = if (function.qt.getAttribute(t.comp, .calling_convention)) |some| switch (some.cc) {
685 .c => .c,
686 .stdcall => .x86_stdcall,
687 .thiscall => .x86_thiscall,
688 .fastcall => .x86_fastcall,
689 .regcall => .x86_regcall,
690 .riscv_vector => .riscv_vector,
691 .aarch64_sve_pcs => .aarch64_sve_pcs,
692 .aarch64_vector_pcs => .aarch64_vfabi,
693 .arm_aapcs => .arm_aapcs,
694 .arm_aapcs_vfp => .arm_aapcs_vfp,
695 .vectorcall => switch (t.comp.target.cpu.arch) {
696 .x86 => .x86_vectorcall,
697 .aarch64, .aarch64_be => .aarch64_vfabi,
698 else => .c,
699 },
700 .x86_64_sysv => .x86_64_sysv,
701 .x86_64_win => .x86_64_win,
702 } else .c,
703 };
704
705 const proto_node = t.transFnType(&t.global_scope.base, function.qt, func_ty, fn_decl_loc, proto_ctx) catch |err| switch (err) {
706 error.UnsupportedType => {
707 return t.failDecl(scope, fn_decl_loc, fn_name, "unable to resolve prototype of function", .{});
708 },
709 error.OutOfMemory => |e| return e,
710 };
711
712 const proto_payload = proto_node.castTag(.func).?;
713 if (!has_body) {
714 if (scope.id != .root) {
715 const bs: *Scope.Block = try scope.findBlockScope(t);
716 const mangled_name = try bs.createMangledName(fn_name, false, Scope.Block.extern_local_prefix);
717 const wrapped = try ZigTag.wrapped_local.create(t.arena, .{ .name = mangled_name, .init = proto_node });
718 try scope.appendNode(wrapped);
719 try bs.discardVariable(mangled_name);
720 return;
721 }
722 try t.global_scope.addMemberFunction(func_ty, proto_payload);
723 return t.addTopLevelDecl(fn_name, proto_node);
724 }
725
726 // actual function definition with body
727 const body_stmt = function.body.?.get(t.tree).compound_stmt;
728 var block_scope = try Scope.Block.init(t, &t.global_scope.base, false);
729 block_scope.return_type = func_ty.return_type;
730 defer block_scope.deinit();
731
732 var param_id: c_uint = 0;
733 for (proto_payload.data.params, func_ty.params) |*param, param_info| {
734 const param_name = param.name orelse {
735 proto_payload.data.is_extern = true;
736 proto_payload.data.is_export = false;
737 proto_payload.data.is_inline = false;
738 try t.warn(&t.global_scope.base, fn_decl_loc, "function {s} parameter has no name, demoted to extern", .{fn_name});
739 return t.addTopLevelDecl(fn_name, proto_node);
740 };
741
742 const is_const = param_info.qt.@"const";
743
744 const mangled_param_name = try block_scope.makeMangledName(param_name);
745 param.name = mangled_param_name;
746
747 if (!is_const) {
748 const bare_arg_name = try std.fmt.allocPrint(t.arena, "arg_{s}", .{mangled_param_name});
749 const arg_name = try block_scope.makeMangledName(bare_arg_name);
750 param.name = arg_name;
751
752 const redecl_node = try ZigTag.arg_redecl.create(t.arena, .{ .actual = mangled_param_name, .mangled = arg_name });
753 try block_scope.statements.append(t.gpa, redecl_node);
754 }
755 try block_scope.discardVariable(mangled_param_name);
756
757 param_id += 1;
758 }
759
760 t.transCompoundStmtInline(body_stmt, &block_scope) catch |err| switch (err) {
761 error.OutOfMemory => |e| return e,
762 error.UnsupportedTranslation,
763 error.UnsupportedType,
764 => {
765 proto_payload.data.is_extern = true;
766 proto_payload.data.is_export = false;
767 proto_payload.data.is_inline = false;
768 try t.warn(&t.global_scope.base, fn_decl_loc, "unable to translate function, demoted to extern", .{});
769 return t.addTopLevelDecl(fn_name, proto_node);
770 },
771 };
772
773 try t.global_scope.addMemberFunction(func_ty, proto_payload);
774 proto_payload.data.body = try block_scope.complete();
775 return t.addTopLevelDecl(fn_name, proto_node);
776}
777
778fn transVarDecl(t: *Translator, scope: *Scope, variable: Node.Variable) Error!void {
779 const base_name = t.tree.tokSlice(variable.name_tok);
780 const toplevel = scope.id == .root;
781 const bs: *Scope.Block = if (!toplevel) try scope.findBlockScope(t) else undefined;
782 const name, const use_base_name = blk: {
783 if (toplevel) break :blk .{ base_name, false };
784
785 // Local extern and static variables are wrapped in a struct.
786 const prefix: ?[]const u8 = switch (variable.storage_class) {
787 .@"extern" => Scope.Block.extern_local_prefix,
788 .static => Scope.Block.static_local_prefix,
789 else => null,
790 };
791 break :blk .{ try bs.createMangledName(base_name, false, prefix), prefix != null };
792 };
793
794 if (t.typeWasDemotedToOpaque(variable.qt)) {
795 if (variable.storage_class != .@"extern" and scope.id == .root) {
796 return t.failDecl(scope, variable.name_tok, name, "non-extern variable has opaque type", .{});
797 } else {
798 return t.failDecl(scope, variable.name_tok, name, "local variable has opaque type", .{});
799 }
800 }
801
802 const type_node = (if (variable.initializer) |init|
803 t.transTypeInit(scope, variable.qt, init, variable.name_tok)
804 else
805 t.transType(scope, variable.qt, variable.name_tok)) catch |err| switch (err) {
806 error.UnsupportedType => {
807 return t.failDecl(scope, variable.name_tok, name, "unable to translate variable declaration type", .{});
808 },
809 else => |e| return e,
810 };
811
812 const array_ty = variable.qt.get(t.comp, .array);
813 var is_const = variable.qt.@"const" or (array_ty != null and array_ty.?.elem.@"const");
814 var is_extern = variable.storage_class == .@"extern";
815
816 const init_node = init: {
817 if (variable.initializer) |init| {
818 const maybe_literal = init.get(t.tree);
819 const init_node = (if (maybe_literal == .string_literal_expr)
820 t.transStringLiteralInitializer(init, maybe_literal.string_literal_expr, type_node)
821 else
822 t.transExprCoercing(scope, init, .used)) catch |err| switch (err) {
823 error.UnsupportedTranslation, error.UnsupportedType => {
824 return t.failDecl(scope, variable.name_tok, name, "unable to resolve var init expr", .{});
825 },
826 else => |e| return e,
827 };
828
829 if (!variable.qt.is(t.comp, .bool) and init_node.isBoolRes()) {
830 break :init try ZigTag.int_from_bool.create(t.arena, init_node);
831 } else {
832 break :init init_node;
833 }
834 }
835 if (variable.storage_class == .@"extern") {
836 if (array_ty != null and array_ty.?.len == .incomplete) {
837 // Oh no, an extern array of unknown size! These are really fun because there's no
838 // direct equivalent in Zig. To translate correctly, we'll have to create a C-pointer
839 // to the data initialized via @extern.
840
841 // Since this is really a pointer to the underlying data, we tweak a few properties.
842 is_extern = false;
843 is_const = true;
844
845 const name_str = try std.fmt.allocPrint(t.arena, "\"{s}\"", .{base_name});
846 break :init try ZigTag.builtin_extern.create(t.arena, .{
847 .type = type_node,
848 .name = try ZigTag.string_literal.create(t.arena, name_str),
849 });
850 }
851 break :init null;
852 }
853 if (toplevel or variable.storage_class == .static or variable.thread_local) {
854 // The C language specification states that variables with static or threadlocal
855 // storage without an initializer are initialized to a zero value.
856 break :init try t.createZeroValueNode(variable.qt, type_node, .no_as);
857 }
858 break :init ZigTag.undefined_literal.init();
859 };
860
861 const linksection_string = blk: {
862 if (variable.qt.getAttribute(t.comp, .section)) |section| {
863 break :blk t.comp.interner.get(section.name.ref()).bytes;
864 }
865 break :blk null;
866 };
867
868 const alignment: ?c_uint = variable.qt.requestedAlignment(t.comp) orelse null;
869 var node = try ZigTag.var_decl.create(t.arena, .{
870 .is_pub = toplevel,
871 .is_const = is_const,
872 .is_extern = is_extern,
873 .is_export = toplevel and variable.storage_class == .auto,
874 .is_threadlocal = variable.thread_local,
875 .linksection_string = linksection_string,
876 .alignment = alignment,
877 .name = if (use_base_name) base_name else name,
878 .type = type_node,
879 .init = init_node,
880 });
881
882 if (toplevel) {
883 try t.addTopLevelDecl(name, node);
884 } else {
885 if (use_base_name) {
886 node = try ZigTag.wrapped_local.create(t.arena, .{ .name = name, .init = node });
887 }
888 try scope.appendNode(node);
889 try bs.discardVariable(name);
890
891 if (variable.qt.getAttribute(t.comp, .cleanup)) |cleanup_attr| {
892 const cleanup_fn_name = t.tree.tokSlice(cleanup_attr.function.tok);
893 const mangled_fn_name = scope.getAlias(cleanup_fn_name) orelse cleanup_fn_name;
894 const fn_id = try ZigTag.identifier.create(t.arena, mangled_fn_name);
895
896 const varname = try ZigTag.identifier.create(t.arena, name);
897 const args = try t.arena.alloc(ZigNode, 1);
898 args[0] = try ZigTag.address_of.create(t.arena, varname);
899
900 const cleanup_call = try ZigTag.call.create(t.arena, .{ .lhs = fn_id, .args = args });
901 const discard = try ZigTag.discard.create(t.arena, .{ .should_skip = false, .value = cleanup_call });
902 const deferred_cleanup = try ZigTag.@"defer".create(t.arena, discard);
903
904 try bs.statements.append(t.gpa, deferred_cleanup);
905 }
906 }
907}
908
909fn transEnumDecl(t: *Translator, scope: *Scope, enum_qt: QualType) Error!void {
910 const base = enum_qt.base(t.comp);
911 const enum_ty = base.type.@"enum";
912
913 if (t.type_decls.get(enum_ty.decl_node)) |_|
914 return; // Avoid processing this decl twice
915
916 const toplevel = scope.id == .root;
917 const bs: *Scope.Block = if (!toplevel) try scope.findBlockScope(t) else undefined;
918
919 var bare_name = enum_ty.name.lookup(t.comp);
920 var is_unnamed = false;
921 var name = bare_name;
922 if (t.unnamed_typedefs.get(base.qt)) |typedef_name| {
923 bare_name = typedef_name;
924 name = typedef_name;
925 } else {
926 if (enum_ty.isAnonymous(t.comp)) {
927 bare_name = try std.fmt.allocPrint(t.arena, "unnamed_{d}", .{t.getMangle()});
928 is_unnamed = true;
929 }
930 name = try std.fmt.allocPrint(t.arena, "enum_{s}", .{bare_name});
931 }
932 if (!toplevel) name = try bs.makeMangledName(name);
933 try t.type_decls.putNoClobber(t.gpa, enum_ty.decl_node, name);
934
935 const enum_type_node = if (!base.qt.hasIncompleteSize(t.comp)) blk: {
936 const enum_decl = enum_ty.decl_node.get(t.tree).enum_decl;
937 for (enum_ty.fields, enum_decl.fields) |field, field_node| {
938 var enum_val_name = field.name.lookup(t.comp);
939 if (!toplevel) {
940 enum_val_name = try bs.makeMangledName(enum_val_name);
941 }
942
943 const enum_const_type_node: ?ZigNode = t.transType(scope, field.qt, field.name_tok) catch |err| switch (err) {
944 error.UnsupportedType => null,
945 else => |e| return e,
946 };
947
948 const val = t.tree.value_map.get(field_node).?;
949 const enum_const_def = try ZigTag.enum_constant.create(t.arena, .{
950 .name = enum_val_name,
951 .is_public = toplevel,
952 .type = enum_const_type_node,
953 .value = try t.createIntNode(val),
954 });
955 if (toplevel)
956 try t.addTopLevelDecl(enum_val_name, enum_const_def)
957 else {
958 try scope.appendNode(enum_const_def);
959 try bs.discardVariable(enum_val_name);
960 }
961 }
962
963 break :blk t.transType(scope, enum_ty.tag.?, enum_decl.name_or_kind_tok) catch |err| switch (err) {
964 error.UnsupportedType => {
965 return t.failDecl(scope, enum_decl.name_or_kind_tok, name, "unable to translate enum integer type", .{});
966 },
967 else => |e| return e,
968 };
969 } else blk: {
970 try t.opaque_demotes.put(t.gpa, base.qt, {});
971 break :blk ZigTag.opaque_literal.init();
972 };
973
974 const is_pub = toplevel and !is_unnamed;
975 const payload = try t.arena.create(ast.Payload.SimpleVarDecl);
976 payload.* = .{
977 .base = .{ .tag = if (is_pub) .pub_var_simple else .var_simple },
978 .data = .{
979 .init = enum_type_node,
980 .name = name,
981 },
982 };
983 const node = ZigNode.initPayload(&payload.base);
984 if (toplevel) {
985 try t.addTopLevelDecl(name, node);
986 if (!is_unnamed)
987 try t.alias_list.append(t.gpa, .{ .alias = bare_name, .name = name });
988 } else {
989 try scope.appendNode(node);
990 try bs.discardVariable(name);
991 }
992}
993
994fn transStaticAssert(t: *Translator, scope: *Scope, static_assert: Node.StaticAssert) Error!void {
995 const condition = t.transExpr(scope, static_assert.cond, .used) catch |err| switch (err) {
996 error.UnsupportedTranslation, error.UnsupportedType => {
997 return try t.warn(&t.global_scope.base, static_assert.cond.tok(t.tree), "unable to translate _Static_assert condition", .{});
998 },
999 error.OutOfMemory => |e| return e,
1000 };
1001
1002 // generate @compileError message that matches C compiler output
1003 const diagnostic = if (static_assert.message) |message| str: {
1004 // Aro guarantees this to be a string literal.
1005 const str_val = t.tree.value_map.get(message).?;
1006 const str_qt = message.qt(t.tree);
1007
1008 const bytes = t.comp.interner.get(str_val.ref()).bytes;
1009 var allocating: std.Io.Writer.Allocating = .init(t.gpa);
1010 defer allocating.deinit();
1011
1012 allocating.writer.writeAll("\"static assertion failed \\") catch return error.OutOfMemory;
1013
1014 aro.Value.printString(bytes, str_qt, t.comp, &allocating.writer) catch return error.OutOfMemory;
1015 allocating.writer.end -= 1; // printString adds a terminating " so we need to remove it
1016 allocating.writer.writeAll("\\\"\"") catch return error.OutOfMemory;
1017
1018 break :str try ZigTag.string_literal.create(t.arena, try t.arena.dupe(u8, allocating.getWritten()));
1019 } else try ZigTag.string_literal.create(t.arena, "\"static assertion failed\"");
1020
1021 const assert_node = try ZigTag.static_assert.create(t.arena, .{ .lhs = condition, .rhs = diagnostic });
1022 try scope.appendNode(assert_node);
1023}
1024
1025fn transGlobalAsm(t: *Translator, scope: *Scope, global_asm: Node.SimpleAsm) Error!void {
1026 const asm_string = t.tree.value_map.get(global_asm.asm_str).?;
1027 const bytes = t.comp.interner.get(asm_string.ref()).bytes;
1028
1029 var allocating: std.Io.Writer.Allocating = try .initCapacity(t.gpa, bytes.len);
1030 defer allocating.deinit();
1031 aro.Value.printString(bytes, global_asm.asm_str.qt(t.tree), t.comp, &allocating.writer) catch return error.OutOfMemory;
1032
1033 const str_node = try ZigTag.string_literal.create(t.arena, try t.arena.dupe(u8, allocating.getWritten()));
1034
1035 const asm_node = try ZigTag.asm_simple.create(t.arena, str_node);
1036 const block = try ZigTag.block_single.create(t.arena, asm_node);
1037 const comptime_node = try ZigTag.@"comptime".create(t.arena, block);
1038
1039 try scope.appendNode(comptime_node);
1040}
1041
1042// ================
1043// Type translation
1044// ================
1045
1046fn getTypeStr(t: *Translator, qt: QualType) ![]const u8 {
1047 var allocating: std.Io.Writer.Allocating = .init(t.gpa);
1048 defer allocating.deinit();
1049 qt.print(t.comp, &allocating.writer) catch return error.OutOfMemory;
1050 return t.arena.dupe(u8, allocating.getWritten());
1051}
1052
1053fn transType(t: *Translator, scope: *Scope, qt: QualType, source_loc: TokenIndex) TypeError!ZigNode {
1054 loop: switch (qt.type(t.comp)) {
1055 .atomic => {
1056 const type_name = try t.getTypeStr(qt);
1057 return t.fail(error.UnsupportedType, source_loc, "TODO support atomic type: '{s}'", .{type_name});
1058 },
1059 .void => return ZigTag.type.create(t.arena, "anyopaque"),
1060 .bool => return ZigTag.type.create(t.arena, "bool"),
1061 .int => |int_ty| switch (int_ty) {
1062 //.char => return ZigTag.type.create(t.arena, "c_char"), // TODO: this is the preferred translation
1063 .char => return ZigTag.type.create(t.arena, "u8"),
1064 .schar => return ZigTag.type.create(t.arena, "i8"),
1065 .uchar => return ZigTag.type.create(t.arena, "u8"),
1066 .short => return ZigTag.type.create(t.arena, "c_short"),
1067 .ushort => return ZigTag.type.create(t.arena, "c_ushort"),
1068 .int => return ZigTag.type.create(t.arena, "c_int"),
1069 .uint => return ZigTag.type.create(t.arena, "c_uint"),
1070 .long => return ZigTag.type.create(t.arena, "c_long"),
1071 .ulong => return ZigTag.type.create(t.arena, "c_ulong"),
1072 .long_long => return ZigTag.type.create(t.arena, "c_longlong"),
1073 .ulong_long => return ZigTag.type.create(t.arena, "c_ulonglong"),
1074 .int128 => return ZigTag.type.create(t.arena, "i128"),
1075 .uint128 => return ZigTag.type.create(t.arena, "u128"),
1076 },
1077 .float => |float_ty| switch (float_ty) {
1078 .fp16, .float16 => return ZigTag.type.create(t.arena, "f16"),
1079 .float => return ZigTag.type.create(t.arena, "f32"),
1080 .double => return ZigTag.type.create(t.arena, "f64"),
1081 .long_double => return ZigTag.type.create(t.arena, "c_longdouble"),
1082 .float128 => return ZigTag.type.create(t.arena, "f128"),
1083 },
1084 .pointer => |pointer_ty| {
1085 const child_qt = pointer_ty.child;
1086
1087 const is_fn_proto = child_qt.is(t.comp, .func);
1088 const is_const = is_fn_proto or child_qt.@"const";
1089 const is_volatile = child_qt.@"volatile";
1090 const elem_type = try t.transType(scope, child_qt, source_loc);
1091 const ptr_info: @FieldType(ast.Payload.Pointer, "data") = .{
1092 .is_const = is_const,
1093 .is_volatile = is_volatile,
1094 .elem_type = elem_type,
1095 .is_allowzero = false,
1096 };
1097 if (is_fn_proto or
1098 t.typeIsOpaque(child_qt) or
1099 t.typeWasDemotedToOpaque(child_qt))
1100 {
1101 const ptr = try ZigTag.single_pointer.create(t.arena, ptr_info);
1102 return ZigTag.optional_type.create(t.arena, ptr);
1103 }
1104
1105 return ZigTag.c_pointer.create(t.arena, ptr_info);
1106 },
1107 .array => |array_ty| {
1108 const elem_qt = array_ty.elem;
1109 switch (array_ty.len) {
1110 .incomplete, .unspecified_variable => {
1111 const elem_type = try t.transType(scope, elem_qt, source_loc);
1112 return ZigTag.c_pointer.create(t.arena, .{
1113 .is_const = elem_qt.@"const",
1114 .is_volatile = elem_qt.@"volatile",
1115 .is_allowzero = false,
1116 .elem_type = elem_type,
1117 });
1118 },
1119 .fixed, .static => |len| {
1120 const elem_type = try t.transType(scope, elem_qt, source_loc);
1121 return ZigTag.array_type.create(t.arena, .{ .len = len, .elem_type = elem_type });
1122 },
1123 .variable => return t.fail(error.UnsupportedType, source_loc, "VLA unsupported '{s}'", .{try t.getTypeStr(qt)}),
1124 }
1125 },
1126 .func => |func_ty| return t.transFnType(scope, qt, func_ty, source_loc, .{}),
1127 .@"struct", .@"union" => |record_ty| {
1128 var trans_scope = scope;
1129 if (!record_ty.isAnonymous(t.comp)) {
1130 if (t.weak_global_names.contains(record_ty.name.lookup(t.comp))) trans_scope = &t.global_scope.base;
1131 }
1132 try t.transRecordDecl(trans_scope, qt);
1133 const name = t.type_decls.get(record_ty.decl_node).?;
1134 return ZigTag.identifier.create(t.arena, name);
1135 },
1136 .@"enum" => |enum_ty| {
1137 var trans_scope = scope;
1138 const is_anonymous = enum_ty.isAnonymous(t.comp);
1139 if (!is_anonymous) {
1140 if (t.weak_global_names.contains(enum_ty.name.lookup(t.comp))) trans_scope = &t.global_scope.base;
1141 }
1142 try t.transEnumDecl(trans_scope, qt);
1143 const name = t.type_decls.get(enum_ty.decl_node).?;
1144 return ZigTag.identifier.create(t.arena, name);
1145 },
1146 .typedef => |typedef_ty| {
1147 var trans_scope = scope;
1148 const typedef_name = typedef_ty.name.lookup(t.comp);
1149 if (builtin_typedef_map.get(typedef_name)) |builtin| return ZigTag.type.create(t.arena, builtin);
1150 if (t.global_names.contains(typedef_name)) trans_scope = &t.global_scope.base;
1151
1152 try t.transTypeDef(trans_scope, typedef_ty.decl_node);
1153 const name = t.type_decls.get(typedef_ty.decl_node).?;
1154 return ZigTag.identifier.create(t.arena, name);
1155 },
1156 .attributed => |attributed_ty| continue :loop attributed_ty.base.type(t.comp),
1157 .typeof => |typeof_ty| continue :loop typeof_ty.base.type(t.comp),
1158 .vector => |vector_ty| {
1159 const len = try t.createNumberNode(vector_ty.len, .int);
1160 const elem_type = try t.transType(scope, vector_ty.elem, source_loc);
1161 return ZigTag.vector.create(t.arena, .{ .lhs = len, .rhs = elem_type });
1162 },
1163 else => return t.fail(error.UnsupportedType, source_loc, "unsupported type: '{s}'", .{try t.getTypeStr(qt)}),
1164 }
1165}
1166
1167/// Look ahead through the fields of the record to determine what the alignment of the record
1168/// would be without any align/packed/etc. attributes. This helps us determine whether or not
1169/// the fields with 0 offset need an `align` qualifier. Strictly speaking, we could just
1170/// pedantically assign those fields the same alignment as the parent's pointer alignment,
1171/// but this helps the generated code to be a little less verbose.
1172fn headFieldAlignment(t: *Translator, record_decl: aro.Type.Record) ?c_uint {
1173 const bits_per_byte = 8;
1174 const parent_ptr_alignment_bits = record_decl.layout.?.pointer_alignment_bits;
1175 const parent_ptr_alignment = parent_ptr_alignment_bits / bits_per_byte;
1176 var max_field_alignment_bits: u64 = 0;
1177 for (record_decl.fields) |field| {
1178 if (field.qt.getRecord(t.comp)) |field_record_decl| {
1179 const child_record_alignment = field_record_decl.layout.?.field_alignment_bits;
1180 if (child_record_alignment > max_field_alignment_bits)
1181 max_field_alignment_bits = child_record_alignment;
1182 } else {
1183 const field_size = field.layout.size_bits;
1184 if (field_size > max_field_alignment_bits)
1185 max_field_alignment_bits = field_size;
1186 }
1187 }
1188 if (max_field_alignment_bits != parent_ptr_alignment_bits) {
1189 return parent_ptr_alignment;
1190 } else {
1191 return null;
1192 }
1193}
1194
1195/// This function inspects the generated layout of a record to determine the alignment for a
1196/// particular field. This approach is necessary because unlike Zig, a C compiler is not
1197/// required to fulfill the requested alignment, which means we'd risk generating different code
1198/// if we only look at the user-requested alignment.
1199///
1200/// Returns a ?c_uint to match Clang's behavior of using c_uint. The return type can be changed
1201/// after the Clang frontend for translate-c is removed. A null value indicates that a field is
1202/// 'naturally aligned'.
1203fn alignmentForField(
1204 t: *Translator,
1205 record_decl: aro.Type.Record,
1206 head_field_alignment: ?c_uint,
1207 field_index: usize,
1208) ?c_uint {
1209 const fields = record_decl.fields;
1210 assert(fields.len != 0);
1211 const field = fields[field_index];
1212
1213 const bits_per_byte = 8;
1214 const parent_ptr_alignment_bits = record_decl.layout.?.pointer_alignment_bits;
1215 const parent_ptr_alignment = parent_ptr_alignment_bits / bits_per_byte;
1216
1217 // bitfields aren't supported yet. Until support is added, records with bitfields
1218 // should be demoted to opaque, and this function shouldn't be called for them.
1219 if (field.bit_width != .null) {
1220 @panic("TODO: add bitfield support for records");
1221 }
1222
1223 const field_offset_bits: u64 = field.layout.offset_bits;
1224 const field_size_bits: u64 = field.layout.size_bits;
1225
1226 // Fields with zero width always have an alignment of 1
1227 if (field_size_bits == 0) {
1228 return 1;
1229 }
1230
1231 // Fields with 0 offset inherit the parent's pointer alignment.
1232 if (field_offset_bits == 0) {
1233 return head_field_alignment;
1234 }
1235
1236 // Records have a natural alignment when used as a field, and their size is
1237 // a multiple of this alignment value. For all other types, the natural alignment
1238 // is their size.
1239 const field_natural_alignment_bits: u64 = if (field.qt.getRecord(t.comp)) |record|
1240 record.layout.?.field_alignment_bits
1241 else
1242 field_size_bits;
1243 const rem_bits = field_offset_bits % field_natural_alignment_bits;
1244
1245 // If there's a remainder, then the alignment is smaller than the field's
1246 // natural alignment
1247 if (rem_bits > 0) {
1248 const rem_alignment = rem_bits / bits_per_byte;
1249 if (rem_alignment > 0 and std.math.isPowerOfTwo(rem_alignment)) {
1250 const actual_alignment = @min(rem_alignment, parent_ptr_alignment);
1251 return @as(c_uint, @truncate(actual_alignment));
1252 } else {
1253 return 1;
1254 }
1255 }
1256
1257 // A field may have an offset which positions it to be naturally aligned, but the
1258 // parent's pointer alignment determines if this is actually true, so we take the minimum
1259 // value.
1260 // For example, a float field (4 bytes wide) with a 4 byte offset is positioned to have natural
1261 // alignment, but if the parent pointer alignment is 2, then the actual alignment of the
1262 // float is 2.
1263 const field_natural_alignment: u64 = field_natural_alignment_bits / bits_per_byte;
1264 const offset_alignment = field_offset_bits / bits_per_byte;
1265 const possible_alignment = @min(parent_ptr_alignment, offset_alignment);
1266 if (possible_alignment == field_natural_alignment) {
1267 return null;
1268 } else if (possible_alignment < field_natural_alignment) {
1269 if (std.math.isPowerOfTwo(possible_alignment)) {
1270 return possible_alignment;
1271 } else {
1272 return 1;
1273 }
1274 } else { // possible_alignment > field_natural_alignment
1275 // Here, the field is positioned be at a higher alignment than it's natural alignment. This means we
1276 // need to determine whether it's a specified alignment. We can determine that from the padding preceding
1277 // the field.
1278 const padding_from_prev_field: u64 = blk: {
1279 if (field_offset_bits != 0) {
1280 const previous_field = fields[field_index - 1];
1281 break :blk (field_offset_bits - previous_field.layout.offset_bits) - previous_field.layout.size_bits;
1282 } else {
1283 break :blk 0;
1284 }
1285 };
1286 if (padding_from_prev_field < field_natural_alignment_bits) {
1287 return null;
1288 } else {
1289 return possible_alignment;
1290 }
1291 }
1292}
1293
1294const FnProtoContext = struct {
1295 is_pub: bool = false,
1296 is_export: bool = false,
1297 is_extern: bool = false,
1298 is_always_inline: bool = false,
1299 fn_name: ?[]const u8 = null,
1300 has_body: bool = false,
1301 cc: ast.Payload.Func.CallingConvention = .c,
1302};
1303
1304fn transFnType(
1305 t: *Translator,
1306 scope: *Scope,
1307 func_qt: QualType,
1308 func_ty: aro.Type.Func,
1309 source_loc: TokenIndex,
1310 ctx: FnProtoContext,
1311) !ZigNode {
1312 const param_count: usize = func_ty.params.len;
1313 const fn_params = try t.arena.alloc(ast.Payload.Param, param_count);
1314
1315 for (func_ty.params, fn_params) |param_info, *param_node| {
1316 const param_qt = param_info.qt;
1317 const is_noalias = param_qt.restrict;
1318
1319 const param_name: ?[]const u8 = if (param_info.name == .empty)
1320 null
1321 else
1322 param_info.name.lookup(t.comp);
1323
1324 const type_node = try t.transType(scope, param_qt, param_info.name_tok);
1325 param_node.* = .{
1326 .is_noalias = is_noalias,
1327 .name = param_name,
1328 .type = type_node,
1329 };
1330 }
1331
1332 const linksection_string = blk: {
1333 if (func_qt.getAttribute(t.comp, .section)) |section| {
1334 break :blk t.comp.interner.get(section.name.ref()).bytes;
1335 }
1336 break :blk null;
1337 };
1338
1339 const alignment: ?c_uint = func_qt.requestedAlignment(t.comp) orelse null;
1340
1341 const explicit_callconv = if ((ctx.is_always_inline or ctx.is_export or ctx.is_extern) and ctx.cc == .c) null else ctx.cc;
1342
1343 const return_type_node = blk: {
1344 if (func_qt.getAttribute(t.comp, .noreturn) != null) {
1345 break :blk ZigTag.noreturn_type.init();
1346 } else {
1347 const return_qt = func_ty.return_type;
1348 if (return_qt.is(t.comp, .void)) {
1349 // convert primitive anyopaque to actual void (only for return type)
1350 break :blk ZigTag.void_type.init();
1351 } else {
1352 break :blk t.transType(scope, return_qt, source_loc) catch |err| switch (err) {
1353 error.UnsupportedType => {
1354 try t.warn(scope, source_loc, "unsupported function proto return type", .{});
1355 return err;
1356 },
1357 error.OutOfMemory => |e| return e,
1358 };
1359 }
1360 }
1361 };
1362
1363 const payload = try t.arena.create(ast.Payload.Func);
1364 payload.* = .{
1365 .base = .{ .tag = .func },
1366 .data = .{
1367 .is_pub = ctx.is_pub,
1368 .is_extern = ctx.is_extern,
1369 .is_export = ctx.is_export,
1370 .is_inline = ctx.is_always_inline,
1371 .is_var_args = switch (func_ty.kind) {
1372 .normal => false,
1373 .variadic => true,
1374 .old_style => !ctx.is_export and !ctx.is_always_inline and !ctx.has_body,
1375 },
1376 .name = ctx.fn_name,
1377 .linksection_string = linksection_string,
1378 .explicit_callconv = explicit_callconv,
1379 .params = fn_params,
1380 .return_type = return_type_node,
1381 .body = null,
1382 .alignment = alignment,
1383 },
1384 };
1385 return ZigNode.initPayload(&payload.base);
1386}
1387
1388/// Produces a Zig AST node by translating a Type, respecting the width, but modifying the signed-ness.
1389/// Asserts the type is an integer.
1390fn transTypeIntWidthOf(t: *Translator, qt: QualType, is_signed: bool) TypeError!ZigNode {
1391 return ZigTag.type.create(t.arena, loop: switch (qt.base(t.comp).type) {
1392 .int => |int_ty| switch (int_ty) {
1393 .char, .schar, .uchar => if (is_signed) "i8" else "u8",
1394 .short, .ushort => if (is_signed) "c_short" else "c_ushort",
1395 .int, .uint => if (is_signed) "c_int" else "c_uint",
1396 .long, .ulong => if (is_signed) "c_long" else "c_ulong",
1397 .long_long, .ulong_long => if (is_signed) "c_longlong" else "c_ulonglong",
1398 .int128, .uint128 => if (is_signed) "i128" else "u128",
1399 },
1400 .bit_int => |bit_int_ty| try std.fmt.allocPrint(t.arena, "{s}{d}", .{
1401 if (is_signed) "i" else "u",
1402 bit_int_ty.bits,
1403 }),
1404 .@"enum" => |enum_ty| blk: {
1405 const tag_ty = enum_ty.tag orelse
1406 break :blk if (is_signed) "c_int" else "c_uint";
1407
1408 continue :loop tag_ty.base(t.comp).type;
1409 },
1410 else => unreachable, // only call this function when it has already been determined the type is int
1411 });
1412}
1413
1414fn transTypeInit(
1415 t: *Translator,
1416 scope: *Scope,
1417 qt: QualType,
1418 init: Node.Index,
1419 source_loc: TokenIndex,
1420) TypeError!ZigNode {
1421 switch (init.get(t.tree)) {
1422 .string_literal_expr => |literal| {
1423 const elem_ty = try t.transType(scope, qt.childType(t.comp), source_loc);
1424
1425 const string_lit_size = literal.qt.arrayLen(t.comp).?;
1426 const array_size = qt.arrayLen(t.comp).?;
1427
1428 if (array_size == string_lit_size) {
1429 return ZigTag.null_sentinel_array_type.create(t.arena, .{ .len = array_size - 1, .elem_type = elem_ty });
1430 } else {
1431 return ZigTag.array_type.create(t.arena, .{ .len = array_size, .elem_type = elem_ty });
1432 }
1433 },
1434 else => {},
1435 }
1436 return t.transType(scope, qt, source_loc);
1437}
1438
1439// ============
1440// Type helpers
1441// ============
1442
1443fn typeIsOpaque(t: *Translator, qt: QualType) bool {
1444 return switch (qt.base(t.comp).type) {
1445 .void => true,
1446 .@"struct", .@"union" => |record_ty| {
1447 if (record_ty.layout == null) return true;
1448 for (record_ty.fields) |field| {
1449 if (field.bit_width != .null) return true;
1450 }
1451 return false;
1452 },
1453 else => false,
1454 };
1455}
1456
1457fn typeWasDemotedToOpaque(t: *Translator, qt: QualType) bool {
1458 const base = qt.base(t.comp);
1459 switch (base.type) {
1460 .@"struct", .@"union" => |record_ty| {
1461 if (t.opaque_demotes.contains(base.qt)) return true;
1462 for (record_ty.fields) |field| {
1463 if (t.typeWasDemotedToOpaque(field.qt)) return true;
1464 }
1465 return false;
1466 },
1467 .@"enum" => return t.opaque_demotes.contains(base.qt),
1468 else => return false,
1469 }
1470}
1471
1472fn typeHasWrappingOverflow(t: *Translator, qt: QualType) bool {
1473 if (t.signedness(qt) == .unsigned) {
1474 // unsigned integer overflow wraps around.
1475 return true;
1476 } else {
1477 // float, signed integer, and pointer overflow is undefined behavior.
1478 return false;
1479 }
1480}
1481
1482/// Signedness of type when translated to Zig.
1483/// Different from `QualType.signedness()` for `char` and enums.
1484/// Returns null for non-int types.
1485fn signedness(t: *Translator, qt: QualType) ?std.builtin.Signedness {
1486 return loop: switch (qt.base(t.comp).type) {
1487 .bool => .unsigned,
1488 .bit_int => |bit_int| bit_int.signedness,
1489 .int => |int_ty| switch (int_ty) {
1490 .char => .unsigned, // Always translated as u8
1491 .schar, .short, .int, .long, .long_long, .int128 => .signed,
1492 .uchar, .ushort, .uint, .ulong, .ulong_long, .uint128 => .unsigned,
1493 },
1494 .@"enum" => |enum_ty| {
1495 const tag_qt = enum_ty.tag orelse return .signed;
1496 continue :loop tag_qt.base(t.comp).type;
1497 },
1498 else => return null,
1499 };
1500}
1501
1502// =====================
1503// Statement translation
1504// =====================
1505
1506fn transStmt(t: *Translator, scope: *Scope, stmt: Node.Index) TransError!ZigNode {
1507 switch (stmt.get(t.tree)) {
1508 .compound_stmt => |compound| {
1509 return t.transCompoundStmt(scope, compound);
1510 },
1511 .static_assert => |static_assert| {
1512 try t.transStaticAssert(scope, static_assert);
1513 return ZigTag.declaration.init();
1514 },
1515 .return_stmt => |return_stmt| return t.transReturnStmt(scope, return_stmt),
1516 .null_stmt => return ZigTag.empty_block.init(),
1517 .if_stmt => |if_stmt| return t.transIfStmt(scope, if_stmt),
1518 .while_stmt => |while_stmt| return t.transWhileStmt(scope, while_stmt),
1519 .do_while_stmt => |do_while_stmt| return t.transDoWhileStmt(scope, do_while_stmt),
1520 .for_stmt => |for_stmt| return t.transForStmt(scope, for_stmt),
1521 .continue_stmt => return ZigTag.@"continue".init(),
1522 .break_stmt => return ZigTag.@"break".init(),
1523 .typedef => |typedef_decl| {
1524 assert(!typedef_decl.implicit);
1525 try t.transTypeDef(scope, stmt);
1526 return ZigTag.declaration.init();
1527 },
1528 .struct_decl, .union_decl => |record_decl| {
1529 try t.transRecordDecl(scope, record_decl.container_qt);
1530 return ZigTag.declaration.init();
1531 },
1532 .enum_decl => |enum_decl| {
1533 try t.transEnumDecl(scope, enum_decl.container_qt);
1534 return ZigTag.declaration.init();
1535 },
1536 .function => |function| {
1537 try t.transFnDecl(scope, function);
1538 return ZigTag.declaration.init();
1539 },
1540 .variable => |variable| {
1541 try t.transVarDecl(scope, variable);
1542 return ZigTag.declaration.init();
1543 },
1544 .switch_stmt => |switch_stmt| return t.transSwitch(scope, switch_stmt),
1545 .case_stmt, .default_stmt => {
1546 return t.fail(error.UnsupportedTranslation, stmt.tok(t.tree), "TODO complex switch", .{});
1547 },
1548 .goto_stmt, .computed_goto_stmt, .labeled_stmt => {
1549 return t.fail(error.UnsupportedTranslation, stmt.tok(t.tree), "TODO goto", .{});
1550 },
1551 else => return t.transExprCoercing(scope, stmt, .unused),
1552 }
1553}
1554
1555fn transCompoundStmtInline(t: *Translator, compound: Node.CompoundStmt, block: *Scope.Block) TransError!void {
1556 for (compound.body) |stmt| {
1557 const result = try t.transStmt(&block.base, stmt);
1558 switch (result.tag()) {
1559 .declaration, .empty_block => {},
1560 else => try block.statements.append(t.gpa, result),
1561 }
1562 }
1563}
1564
1565fn transCompoundStmt(t: *Translator, scope: *Scope, compound: Node.CompoundStmt) TransError!ZigNode {
1566 var block_scope = try Scope.Block.init(t, scope, false);
1567 defer block_scope.deinit();
1568 try t.transCompoundStmtInline(compound, &block_scope);
1569 return try block_scope.complete();
1570}
1571
1572fn transReturnStmt(t: *Translator, scope: *Scope, return_stmt: Node.ReturnStmt) TransError!ZigNode {
1573 switch (return_stmt.operand) {
1574 .none => return ZigTag.return_void.init(),
1575 .expr => |operand| {
1576 var rhs = try t.transExprCoercing(scope, operand, .used);
1577 const return_qt = scope.findBlockReturnType();
1578 if (rhs.isBoolRes() and !return_qt.is(t.comp, .bool)) {
1579 rhs = try ZigTag.int_from_bool.create(t.arena, rhs);
1580 }
1581 return ZigTag.@"return".create(t.arena, rhs);
1582 },
1583 .implicit => |zero| {
1584 if (zero) return ZigTag.@"return".create(t.arena, ZigTag.zero_literal.init());
1585
1586 const return_qt = scope.findBlockReturnType();
1587 if (return_qt.is(t.comp, .void)) return ZigTag.empty_block.init();
1588
1589 return ZigTag.@"return".create(t.arena, ZigTag.undefined_literal.init());
1590 },
1591 }
1592}
1593
1594/// If a statement can possibly translate to a Zig assignment (either directly because it's
1595/// an assignment in C or indirectly via result assignment to `_`) AND it's the sole statement
1596/// in the body of an if statement or loop, then we need to put the statement into its own block.
1597/// The `else` case here corresponds to statements that could result in an assignment. If a statement
1598/// class never needs a block, add its enum to the top prong.
1599fn maybeBlockify(t: *Translator, scope: *Scope, stmt: Node.Index) TransError!ZigNode {
1600 switch (stmt.get(t.tree)) {
1601 .break_stmt,
1602 .continue_stmt,
1603 .compound_stmt,
1604 .decl_ref_expr,
1605 .enumeration_ref,
1606 .do_while_stmt,
1607 .for_stmt,
1608 .if_stmt,
1609 .return_stmt,
1610 .null_stmt,
1611 .while_stmt,
1612 => return t.transStmt(scope, stmt),
1613 else => return t.blockify(scope, stmt),
1614 }
1615}
1616
1617/// Translate statement and place it in its own block.
1618fn blockify(t: *Translator, scope: *Scope, stmt: Node.Index) TransError!ZigNode {
1619 var block_scope = try Scope.Block.init(t, scope, false);
1620 defer block_scope.deinit();
1621 const result = try t.transStmt(&block_scope.base, stmt);
1622 try block_scope.statements.append(t.gpa, result);
1623 return block_scope.complete();
1624}
1625
1626fn transIfStmt(t: *Translator, scope: *Scope, if_stmt: Node.IfStmt) TransError!ZigNode {
1627 var cond_scope: Scope.Condition = .{
1628 .base = .{
1629 .parent = scope,
1630 .id = .condition,
1631 },
1632 };
1633 defer cond_scope.deinit();
1634 const cond = try t.transBoolExpr(&cond_scope.base, if_stmt.cond);
1635
1636 // block needed to keep else statement from attaching to inner while
1637 const must_blockify = (if_stmt.else_body != null) and switch (if_stmt.then_body.get(t.tree)) {
1638 .while_stmt, .do_while_stmt, .for_stmt => true,
1639 else => false,
1640 };
1641
1642 const then_node = if (must_blockify)
1643 try t.blockify(scope, if_stmt.then_body)
1644 else
1645 try t.maybeBlockify(scope, if_stmt.then_body);
1646
1647 const else_node = if (if_stmt.else_body) |stmt|
1648 try t.maybeBlockify(scope, stmt)
1649 else
1650 null;
1651 return ZigTag.@"if".create(t.arena, .{ .cond = cond, .then = then_node, .@"else" = else_node });
1652}
1653
1654fn transWhileStmt(t: *Translator, scope: *Scope, while_stmt: Node.WhileStmt) TransError!ZigNode {
1655 var cond_scope: Scope.Condition = .{
1656 .base = .{
1657 .parent = scope,
1658 .id = .condition,
1659 },
1660 };
1661 defer cond_scope.deinit();
1662 const cond = try t.transBoolExpr(&cond_scope.base, while_stmt.cond);
1663
1664 var loop_scope: Scope = .{
1665 .parent = scope,
1666 .id = .loop,
1667 };
1668 const body = try t.maybeBlockify(&loop_scope, while_stmt.body);
1669 return ZigTag.@"while".create(t.arena, .{ .cond = cond, .body = body, .cont_expr = null });
1670}
1671
1672fn transDoWhileStmt(t: *Translator, scope: *Scope, do_stmt: Node.DoWhileStmt) TransError!ZigNode {
1673 var loop_scope: Scope = .{
1674 .parent = scope,
1675 .id = .do_loop,
1676 };
1677
1678 // if (!cond) break;
1679 var cond_scope: Scope.Condition = .{
1680 .base = .{
1681 .parent = scope,
1682 .id = .condition,
1683 },
1684 };
1685 defer cond_scope.deinit();
1686 const cond = try t.transBoolExpr(&cond_scope.base, do_stmt.cond);
1687 const if_not_break = switch (cond.tag()) {
1688 .true_literal => {
1689 const body_node = try t.maybeBlockify(scope, do_stmt.body);
1690 return ZigTag.while_true.create(t.arena, body_node);
1691 },
1692 else => try ZigTag.if_not_break.create(t.arena, cond),
1693 };
1694
1695 var body_node = try t.transStmt(&loop_scope, do_stmt.body);
1696 if (body_node.isNoreturn(true)) {
1697 // The body node ends in a noreturn statement. Simply put it in a while (true)
1698 // in case it contains breaks or continues.
1699 } else if (do_stmt.body.get(t.tree) == .compound_stmt) {
1700 // there's already a block in C, so we'll append our condition to it.
1701 // c: do {
1702 // c: a;
1703 // c: b;
1704 // c: } while(c);
1705 // zig: while (true) {
1706 // zig: a;
1707 // zig: b;
1708 // zig: if (!cond) break;
1709 // zig: }
1710 const block = body_node.castTag(.block).?;
1711 block.data.stmts.len += 1; // This is safe since we reserve one extra space in Scope.Block.complete.
1712 block.data.stmts[block.data.stmts.len - 1] = if_not_break;
1713 } else {
1714 // the C statement is without a block, so we need to create a block to contain it.
1715 // c: do
1716 // c: a;
1717 // c: while(c);
1718 // zig: while (true) {
1719 // zig: a;
1720 // zig: if (!cond) break;
1721 // zig: }
1722 const statements = try t.arena.alloc(ZigNode, 2);
1723 statements[0] = body_node;
1724 statements[1] = if_not_break;
1725 body_node = try ZigTag.block.create(t.arena, .{ .label = null, .stmts = statements });
1726 }
1727 return ZigTag.while_true.create(t.arena, body_node);
1728}
1729
1730fn transForStmt(t: *Translator, scope: *Scope, for_stmt: Node.ForStmt) TransError!ZigNode {
1731 var loop_scope: Scope = .{
1732 .parent = scope,
1733 .id = .loop,
1734 };
1735
1736 var block_scope: ?Scope.Block = null;
1737 defer if (block_scope) |*bs| bs.deinit();
1738
1739 switch (for_stmt.init) {
1740 .decls => |decls| {
1741 block_scope = try Scope.Block.init(t, scope, false);
1742 loop_scope.parent = &block_scope.?.base;
1743 for (decls) |decl| {
1744 try t.transDecl(&block_scope.?.base, decl);
1745 }
1746 },
1747 .expr => |maybe_init| if (maybe_init) |init| {
1748 block_scope = try Scope.Block.init(t, scope, false);
1749 loop_scope.parent = &block_scope.?.base;
1750 const init_node = try t.transStmt(&block_scope.?.base, init);
1751 try loop_scope.appendNode(init_node);
1752 },
1753 }
1754 var cond_scope: Scope.Condition = .{
1755 .base = .{
1756 .parent = &loop_scope,
1757 .id = .condition,
1758 },
1759 };
1760 defer cond_scope.deinit();
1761
1762 const cond = if (for_stmt.cond) |cond|
1763 try t.transBoolExpr(&cond_scope.base, cond)
1764 else
1765 ZigTag.true_literal.init();
1766
1767 const cont_expr = if (for_stmt.incr) |incr|
1768 try t.transExpr(&cond_scope.base, incr, .unused)
1769 else
1770 null;
1771
1772 const body = try t.maybeBlockify(&loop_scope, for_stmt.body);
1773 const while_node = try ZigTag.@"while".create(t.arena, .{ .cond = cond, .body = body, .cont_expr = cont_expr });
1774 if (block_scope) |*bs| {
1775 try bs.statements.append(t.gpa, while_node);
1776 return try bs.complete();
1777 } else {
1778 return while_node;
1779 }
1780}
1781
1782fn transSwitch(t: *Translator, scope: *Scope, switch_stmt: Node.SwitchStmt) TransError!ZigNode {
1783 var loop_scope: Scope = .{
1784 .parent = scope,
1785 .id = .loop,
1786 };
1787
1788 var block_scope = try Scope.Block.init(t, &loop_scope, false);
1789 defer block_scope.deinit();
1790
1791 const base_scope = &block_scope.base;
1792
1793 var cond_scope: Scope.Condition = .{
1794 .base = .{
1795 .parent = base_scope,
1796 .id = .condition,
1797 },
1798 };
1799 defer cond_scope.deinit();
1800 const switch_expr = try t.transExpr(&cond_scope.base, switch_stmt.cond, .used);
1801
1802 var cases = std.ArrayList(ZigNode).init(t.gpa);
1803 defer cases.deinit();
1804 var has_default = false;
1805
1806 const body_node = switch_stmt.body.get(t.tree);
1807 if (body_node != .compound_stmt) {
1808 return t.fail(error.UnsupportedTranslation, switch_stmt.switch_tok, "TODO complex switch", .{});
1809 }
1810 const body = body_node.compound_stmt.body;
1811 // Iterate over switch body and collect all cases.
1812 // Fallthrough is handled by duplicating statements.
1813 for (body, 0..) |stmt, i| {
1814 switch (stmt.get(t.tree)) {
1815 .case_stmt => {
1816 var items = std.ArrayList(ZigNode).init(t.gpa);
1817 defer items.deinit();
1818 const sub = try t.transCaseStmt(base_scope, stmt, &items);
1819 const res = try t.transSwitchProngStmt(base_scope, sub, body[i..]);
1820
1821 if (items.items.len == 0) {
1822 has_default = true;
1823 const switch_else = try ZigTag.switch_else.create(t.arena, res);
1824 try cases.append(switch_else);
1825 } else {
1826 const switch_prong = try ZigTag.switch_prong.create(t.arena, .{
1827 .cases = try t.arena.dupe(ZigNode, items.items),
1828 .cond = res,
1829 });
1830 try cases.append(switch_prong);
1831 }
1832 },
1833 .default_stmt => |default_stmt| {
1834 has_default = true;
1835
1836 var sub = default_stmt.body;
1837 while (true) switch (sub.get(t.tree)) {
1838 .case_stmt => |sub_case| sub = sub_case.body,
1839 .default_stmt => |sub_default| sub = sub_default.body,
1840 else => break,
1841 };
1842
1843 const res = try t.transSwitchProngStmt(base_scope, sub, body[i..]);
1844
1845 const switch_else = try ZigTag.switch_else.create(t.arena, res);
1846 try cases.append(switch_else);
1847 },
1848 else => {}, // collected in transSwitchProngStmt
1849 }
1850 }
1851
1852 if (!has_default) {
1853 const else_prong = try ZigTag.switch_else.create(t.arena, ZigTag.empty_block.init());
1854 try cases.append(else_prong);
1855 }
1856
1857 const switch_node = try ZigTag.@"switch".create(t.arena, .{
1858 .cond = switch_expr,
1859 .cases = try t.arena.dupe(ZigNode, cases.items),
1860 });
1861 try block_scope.statements.append(t.gpa, switch_node);
1862 try block_scope.statements.append(t.gpa, ZigTag.@"break".init());
1863 const while_body = try block_scope.complete();
1864
1865 return ZigTag.while_true.create(t.arena, while_body);
1866}
1867
1868/// Collects all items for this case, returns the first statement after the labels.
1869/// If items ends up empty, the prong should be translated as an else.
1870fn transCaseStmt(
1871 t: *Translator,
1872 scope: *Scope,
1873 stmt: Node.Index,
1874 items: *std.ArrayList(ZigNode),
1875) TransError!Node.Index {
1876 var sub = stmt;
1877 var seen_default = false;
1878 while (true) {
1879 switch (sub.get(t.tree)) {
1880 .default_stmt => |default_stmt| {
1881 seen_default = true;
1882 items.items.len = 0;
1883 sub = default_stmt.body;
1884 },
1885 .case_stmt => |case_stmt| {
1886 if (seen_default) {
1887 items.items.len = 0;
1888 sub = case_stmt.body;
1889 continue;
1890 }
1891
1892 const expr = if (case_stmt.end) |end| blk: {
1893 const start_node = try t.transExpr(scope, case_stmt.start, .used);
1894 const end_node = try t.transExpr(scope, end, .used);
1895
1896 break :blk try ZigTag.ellipsis3.create(t.arena, .{ .lhs = start_node, .rhs = end_node });
1897 } else try t.transExpr(scope, case_stmt.start, .used);
1898
1899 try items.append(expr);
1900 sub = case_stmt.body;
1901 },
1902 else => return sub,
1903 }
1904 }
1905}
1906
1907/// Collects all statements seen by this case into a block.
1908/// Avoids creating a block if the first statement is a break or return.
1909fn transSwitchProngStmt(
1910 t: *Translator,
1911 scope: *Scope,
1912 stmt: Node.Index,
1913 body: []const Node.Index,
1914) TransError!ZigNode {
1915 switch (stmt.get(t.tree)) {
1916 .break_stmt => return ZigTag.@"break".init(),
1917 .return_stmt => return t.transStmt(scope, stmt),
1918 .case_stmt, .default_stmt => unreachable,
1919 else => {
1920 var block_scope = try Scope.Block.init(t, scope, false);
1921 defer block_scope.deinit();
1922
1923 // we do not need to translate `stmt` since it is the first stmt of `body`
1924 try t.transSwitchProngStmtInline(&block_scope, body);
1925 return try block_scope.complete();
1926 },
1927 }
1928}
1929
1930/// Collects all statements seen by this case into a block.
1931fn transSwitchProngStmtInline(
1932 t: *Translator,
1933 block: *Scope.Block,
1934 body: []const Node.Index,
1935) TransError!void {
1936 for (body) |stmt| {
1937 switch (stmt.get(t.tree)) {
1938 .return_stmt => {
1939 const result = try t.transStmt(&block.base, stmt);
1940 try block.statements.append(t.gpa, result);
1941 return;
1942 },
1943 .break_stmt => {
1944 try block.statements.append(t.gpa, ZigTag.@"break".init());
1945 return;
1946 },
1947 .case_stmt => |case_stmt| {
1948 var sub = case_stmt.body;
1949 while (true) switch (sub.get(t.tree)) {
1950 .case_stmt => |sub_case| sub = sub_case.body,
1951 .default_stmt => |sub_default| sub = sub_default.body,
1952 else => break,
1953 };
1954 const result = try t.transStmt(&block.base, sub);
1955 assert(result.tag() != .declaration);
1956 try block.statements.append(t.gpa, result);
1957 if (result.isNoreturn(true)) return;
1958 },
1959 .default_stmt => |default_stmt| {
1960 var sub = default_stmt.body;
1961 while (true) switch (sub.get(t.tree)) {
1962 .case_stmt => |sub_case| sub = sub_case.body,
1963 .default_stmt => |sub_default| sub = sub_default.body,
1964 else => break,
1965 };
1966 const result = try t.transStmt(&block.base, sub);
1967 assert(result.tag() != .declaration);
1968 try block.statements.append(t.gpa, result);
1969 if (result.isNoreturn(true)) return;
1970 },
1971 .compound_stmt => |compound_stmt| {
1972 const result = try t.transCompoundStmt(&block.base, compound_stmt);
1973 try block.statements.append(t.gpa, result);
1974 if (result.isNoreturn(true)) return;
1975 },
1976 else => {
1977 const result = try t.transStmt(&block.base, stmt);
1978 switch (result.tag()) {
1979 .declaration, .empty_block => {},
1980 else => try block.statements.append(t.gpa, result),
1981 }
1982 },
1983 }
1984 }
1985}
1986
1987// ======================
1988// Expression translation
1989// ======================
1990
1991const ResultUsed = enum { used, unused };
1992
1993fn transExpr(t: *Translator, scope: *Scope, expr: Node.Index, used: ResultUsed) TransError!ZigNode {
1994 const qt = expr.qt(t.tree);
1995 return t.maybeSuppressResult(used, switch (expr.get(t.tree)) {
1996 .paren_expr => |paren_expr| {
1997 return t.transExpr(scope, paren_expr.operand, used);
1998 },
1999 .cast => |cast| return t.transCastExpr(scope, cast, cast.qt, used, .with_as),
2000 .decl_ref_expr => |decl_ref| try t.transDeclRefExpr(scope, decl_ref),
2001 .enumeration_ref => |enum_ref| try t.transDeclRefExpr(scope, enum_ref),
2002 .addr_of_expr => |addr_of_expr| try ZigTag.address_of.create(t.arena, try t.transExpr(scope, addr_of_expr.operand, .used)),
2003 .deref_expr => |deref_expr| res: {
2004 if (t.typeWasDemotedToOpaque(qt))
2005 return t.fail(error.UnsupportedTranslation, deref_expr.op_tok, "cannot dereference opaque type", .{});
2006
2007 // Dereferencing a function pointer is a no-op.
2008 if (qt.is(t.comp, .func)) return t.transExpr(scope, deref_expr.operand, used);
2009
2010 break :res try ZigTag.deref.create(t.arena, try t.transExpr(scope, deref_expr.operand, .used));
2011 },
2012 .bool_not_expr => |bool_not_expr| try ZigTag.not.create(t.arena, try t.transBoolExpr(scope, bool_not_expr.operand)),
2013 .bit_not_expr => |bit_not_expr| try ZigTag.bit_not.create(t.arena, try t.transExpr(scope, bit_not_expr.operand, .used)),
2014 .plus_expr => |plus_expr| return t.transExpr(scope, plus_expr.operand, used),
2015 .negate_expr => |negate_expr| res: {
2016 const operand_qt = negate_expr.operand.qt(t.tree);
2017 if (!t.typeHasWrappingOverflow(operand_qt)) {
2018 const sub_expr_node = try t.transExpr(scope, negate_expr.operand, .used);
2019 const to_negate = if (sub_expr_node.isBoolRes()) blk: {
2020 const ty_node = try ZigTag.type.create(t.arena, "c_int");
2021 const int_node = try ZigTag.int_from_bool.create(t.arena, sub_expr_node);
2022 break :blk try ZigTag.as.create(t.arena, .{ .lhs = ty_node, .rhs = int_node });
2023 } else sub_expr_node;
2024
2025 break :res try ZigTag.negate.create(t.arena, to_negate);
2026 } else if (t.signedness(operand_qt) == .unsigned) {
2027 // use -% x for unsigned integers
2028 break :res try ZigTag.negate_wrap.create(t.arena, try t.transExpr(scope, negate_expr.operand, .used));
2029 } else return t.fail(error.UnsupportedTranslation, negate_expr.op_tok, "C negation with non float non integer", .{});
2030 },
2031 .div_expr => |div_expr| res: {
2032 if (qt.isInt(t.comp) and t.signedness(qt) == .signed) {
2033 // signed integer division uses @divTrunc
2034 const lhs = try t.transExpr(scope, div_expr.lhs, .used);
2035 const rhs = try t.transExpr(scope, div_expr.rhs, .used);
2036 break :res try ZigTag.div_trunc.create(t.arena, .{ .lhs = lhs, .rhs = rhs });
2037 }
2038 // unsigned/float division uses the operator
2039 break :res try t.transBinExpr(scope, div_expr, .div);
2040 },
2041 .mod_expr => |mod_expr| res: {
2042 if (qt.isInt(t.comp) and t.signedness(qt) == .signed) {
2043 // signed integer remainder uses __helpers.signedRemainder
2044 const lhs = try t.transExpr(scope, mod_expr.lhs, .used);
2045 const rhs = try t.transExpr(scope, mod_expr.rhs, .used);
2046 break :res try t.createHelperCallNode(.signedRemainder, &.{ lhs, rhs });
2047 }
2048 // unsigned/float division uses the operator
2049 break :res try t.transBinExpr(scope, mod_expr, .mod);
2050 },
2051 .add_expr => |add_expr| res: {
2052 // `ptr + idx` and `idx + ptr` -> ptr + @as(usize, @bitCast(@as(isize, @intCast(idx))))
2053 const lhs_qt = add_expr.lhs.qt(t.tree);
2054 const rhs_qt = add_expr.rhs.qt(t.tree);
2055 if (qt.isPointer(t.comp) and (t.signedness(lhs_qt) == .signed or
2056 t.signedness(rhs_qt) == .signed))
2057 {
2058 break :res try t.transPointerArithmeticSignedOp(scope, add_expr, .add);
2059 }
2060
2061 if (t.signedness(qt) == .unsigned) {
2062 break :res try t.transBinExpr(scope, add_expr, .add_wrap);
2063 } else {
2064 break :res try t.transBinExpr(scope, add_expr, .add);
2065 }
2066 },
2067 .sub_expr => |sub_expr| res: {
2068 // `ptr - idx` -> ptr - @as(usize, @bitCast(@as(isize, @intCast(idx))))
2069 const lhs_qt = sub_expr.lhs.qt(t.tree);
2070 const rhs_qt = sub_expr.rhs.qt(t.tree);
2071 if (qt.isPointer(t.comp) and (t.signedness(lhs_qt) == .signed or
2072 t.signedness(rhs_qt) == .signed))
2073 {
2074 break :res try t.transPointerArithmeticSignedOp(scope, sub_expr, .sub);
2075 }
2076
2077 if (sub_expr.lhs.qt(t.tree).isPointer(t.comp) and sub_expr.rhs.qt(t.tree).isPointer(t.comp)) {
2078 break :res try t.transPtrDiffExpr(scope, sub_expr);
2079 } else if (t.signedness(qt) == .unsigned) {
2080 break :res try t.transBinExpr(scope, sub_expr, .sub_wrap);
2081 } else {
2082 break :res try t.transBinExpr(scope, sub_expr, .sub);
2083 }
2084 },
2085 .mul_expr => |mul_expr| if (t.signedness(qt) == .unsigned)
2086 try t.transBinExpr(scope, mul_expr, .mul_wrap)
2087 else
2088 try t.transBinExpr(scope, mul_expr, .mul),
2089
2090 .less_than_expr => |lt| try t.transBinExpr(scope, lt, .less_than),
2091 .greater_than_expr => |gt| try t.transBinExpr(scope, gt, .greater_than),
2092 .less_than_equal_expr => |lte| try t.transBinExpr(scope, lte, .less_than_equal),
2093 .greater_than_equal_expr => |gte| try t.transBinExpr(scope, gte, .greater_than_equal),
2094 .equal_expr => |equal_expr| try t.transBinExpr(scope, equal_expr, .equal),
2095 .not_equal_expr => |not_equal_expr| try t.transBinExpr(scope, not_equal_expr, .not_equal),
2096
2097 .bool_and_expr => |bool_and_expr| try t.transBoolBinExpr(scope, bool_and_expr, .@"and"),
2098 .bool_or_expr => |bool_or_expr| try t.transBoolBinExpr(scope, bool_or_expr, .@"or"),
2099
2100 .bit_and_expr => |bit_and_expr| try t.transBinExpr(scope, bit_and_expr, .bit_and),
2101 .bit_or_expr => |bit_or_expr| try t.transBinExpr(scope, bit_or_expr, .bit_or),
2102 .bit_xor_expr => |bit_xor_expr| try t.transBinExpr(scope, bit_xor_expr, .bit_xor),
2103
2104 .shl_expr => |shl_expr| try t.transShiftExpr(scope, shl_expr, .shl),
2105 .shr_expr => |shr_expr| try t.transShiftExpr(scope, shr_expr, .shr),
2106
2107 .member_access_expr => |member_access| try t.transMemberAccess(scope, .normal, member_access, null),
2108 .member_access_ptr_expr => |member_access| try t.transMemberAccess(scope, .ptr, member_access, null),
2109 .array_access_expr => |array_access| try t.transArrayAccess(scope, array_access, null),
2110
2111 .builtin_ref => unreachable,
2112 .builtin_call_expr => |call| return t.transBuiltinCall(scope, call, used),
2113 .call_expr => |call| return t.transCall(scope, call, used),
2114
2115 .builtin_types_compatible_p => |compatible| blk: {
2116 const lhs = try t.transType(scope, compatible.lhs, compatible.builtin_tok);
2117 const rhs = try t.transType(scope, compatible.rhs, compatible.builtin_tok);
2118
2119 break :blk try ZigTag.equal.create(t.arena, .{
2120 .lhs = lhs,
2121 .rhs = rhs,
2122 });
2123 },
2124 .builtin_choose_expr => |choose| return t.transCondExpr(scope, choose, used),
2125 .cond_expr => |cond_expr| return t.transCondExpr(scope, cond_expr, used),
2126 .binary_cond_expr => |conditional| return t.transBinaryCondExpr(scope, conditional, used),
2127 .cond_dummy_expr => unreachable,
2128
2129 .assign_expr => |assign| return t.transAssignExpr(scope, assign, used),
2130 .add_assign_expr => |assign| return t.transCompoundAssign(scope, assign, used),
2131 .sub_assign_expr => |assign| return t.transCompoundAssign(scope, assign, used),
2132 .mul_assign_expr => |assign| return t.transCompoundAssign(scope, assign, used),
2133 .div_assign_expr => |assign| return t.transCompoundAssign(scope, assign, used),
2134 .mod_assign_expr => |assign| return t.transCompoundAssign(scope, assign, used),
2135 .shl_assign_expr => |assign| return t.transCompoundAssign(scope, assign, used),
2136 .shr_assign_expr => |assign| return t.transCompoundAssign(scope, assign, used),
2137 .bit_and_assign_expr => |assign| return t.transCompoundAssign(scope, assign, used),
2138 .bit_xor_assign_expr => |assign| return t.transCompoundAssign(scope, assign, used),
2139 .bit_or_assign_expr => |assign| return t.transCompoundAssign(scope, assign, used),
2140 .compound_assign_dummy_expr => {
2141 assert(used == .used);
2142 return t.compound_assign_dummy.?;
2143 },
2144
2145 .comma_expr => |comma_expr| return t.transCommaExpr(scope, comma_expr, used),
2146 .pre_inc_expr => |un| return t.transIncDecExpr(scope, un, .pre, .inc, used),
2147 .pre_dec_expr => |un| return t.transIncDecExpr(scope, un, .pre, .dec, used),
2148 .post_inc_expr => |un| return t.transIncDecExpr(scope, un, .post, .inc, used),
2149 .post_dec_expr => |un| return t.transIncDecExpr(scope, un, .post, .dec, used),
2150
2151 .int_literal => return t.transIntLiteral(scope, expr, used, .with_as),
2152 .char_literal => return t.transCharLiteral(scope, expr, used, .with_as),
2153 .float_literal => return t.transFloatLiteral(scope, expr, used, .with_as),
2154 .string_literal_expr => |literal| try t.transStringLiteral(scope, expr, literal),
2155 .bool_literal => res: {
2156 const val = t.tree.value_map.get(expr).?;
2157 break :res if (val.toBool(t.comp))
2158 ZigTag.true_literal.init()
2159 else
2160 ZigTag.false_literal.init();
2161 },
2162 .nullptr_literal => ZigTag.null_literal.init(),
2163 .imaginary_literal => |literal| {
2164 return t.fail(error.UnsupportedTranslation, literal.op_tok, "TODO complex numbers", .{});
2165 },
2166 .compound_literal_expr => |literal| return t.transCompoundLiteral(scope, literal, used),
2167
2168 .default_init_expr => |default_init| return t.transDefaultInit(scope, default_init, used, .with_as),
2169 .array_init_expr => |array_init| return t.transArrayInit(scope, array_init, used),
2170 .union_init_expr => |union_init| return t.transUnionInit(scope, union_init, used),
2171 .struct_init_expr => |struct_init| return t.transStructInit(scope, struct_init, used),
2172 .array_filler_expr => unreachable,
2173
2174 .sizeof_expr => |sizeof| try t.transTypeInfo(scope, .sizeof, sizeof),
2175 .alignof_expr => |alignof| try t.transTypeInfo(scope, .alignof, alignof),
2176
2177 .imag_expr, .real_expr => |un| {
2178 return t.fail(error.UnsupportedTranslation, un.op_tok, "TODO complex numbers", .{});
2179 },
2180 .addr_of_label => |addr_of_label| {
2181 return t.fail(error.UnsupportedTranslation, addr_of_label.label_tok, "TODO computed goto", .{});
2182 },
2183
2184 .generic_expr => |generic| return t.transExpr(scope, generic.chosen, used),
2185 .generic_association_expr => |generic| return t.transExpr(scope, generic.expr, used),
2186 .generic_default_expr => |generic| return t.transExpr(scope, generic.expr, used),
2187
2188 .stmt_expr => |stmt_expr| return t.transStmtExpr(scope, stmt_expr, used),
2189
2190 .builtin_convertvector => |convertvector| try t.transConvertvectorExpr(scope, convertvector),
2191 .builtin_shufflevector => |shufflevector| try t.transShufflevectorExpr(scope, shufflevector),
2192
2193 .compound_stmt,
2194 .static_assert,
2195 .return_stmt,
2196 .null_stmt,
2197 .if_stmt,
2198 .while_stmt,
2199 .do_while_stmt,
2200 .for_stmt,
2201 .continue_stmt,
2202 .break_stmt,
2203 .labeled_stmt,
2204 .switch_stmt,
2205 .case_stmt,
2206 .default_stmt,
2207 .goto_stmt,
2208 .computed_goto_stmt,
2209 .gnu_asm_simple,
2210 .global_asm,
2211 .typedef,
2212 .struct_decl,
2213 .union_decl,
2214 .enum_decl,
2215 .function,
2216 .param,
2217 .variable,
2218 .enum_field,
2219 .record_field,
2220 .struct_forward_decl,
2221 .union_forward_decl,
2222 .enum_forward_decl,
2223 .empty_decl,
2224 => unreachable, // not an expression
2225 });
2226}
2227
2228/// Same as `transExpr` but with the knowledge that the operand will be type coerced, and therefore
2229/// an `@as` would be redundant. This is used to prevent redundant `@as` in integer literals.
2230fn transExprCoercing(t: *Translator, scope: *Scope, expr: Node.Index, used: ResultUsed) TransError!ZigNode {
2231 switch (expr.get(t.tree)) {
2232 .int_literal => return t.transIntLiteral(scope, expr, used, .no_as),
2233 .char_literal => return t.transCharLiteral(scope, expr, used, .no_as),
2234 .float_literal => return t.transFloatLiteral(scope, expr, used, .no_as),
2235 .cast => |cast| switch (cast.kind) {
2236 .no_op => {
2237 const operand = cast.operand.get(t.tree);
2238 if (operand == .cast) {
2239 return t.transCastExpr(scope, operand.cast, cast.qt, used, .no_as);
2240 }
2241 return t.transExprCoercing(scope, cast.operand, used);
2242 },
2243 .lval_to_rval => return t.transExprCoercing(scope, cast.operand, used),
2244 else => return t.transCastExpr(scope, cast, cast.qt, used, .no_as),
2245 },
2246 .default_init_expr => |default_init| return try t.transDefaultInit(scope, default_init, used, .no_as),
2247 .compound_literal_expr => |literal| {
2248 if (!literal.thread_local and literal.storage_class != .static) {
2249 return t.transExprCoercing(scope, literal.initializer, used);
2250 }
2251 },
2252 else => {},
2253 }
2254
2255 return t.transExpr(scope, expr, used);
2256}
2257
2258fn transBoolExpr(t: *Translator, scope: *Scope, expr: Node.Index) TransError!ZigNode {
2259 switch (expr.get(t.tree)) {
2260 .int_literal => {
2261 const int_val = t.tree.value_map.get(expr).?;
2262 return if (int_val.isZero(t.comp))
2263 ZigTag.false_literal.init()
2264 else
2265 ZigTag.true_literal.init();
2266 },
2267 .cast => |cast| switch (cast.kind) {
2268 .bool_to_int => return t.transExpr(scope, cast.operand, .used),
2269 .array_to_pointer => {
2270 const operand = cast.operand.get(t.tree);
2271 if (operand == .string_literal_expr) {
2272 // @intFromPtr("foo") != 0, always true
2273 const str = try t.transStringLiteral(scope, cast.operand, operand.string_literal_expr);
2274 const int_from_ptr = try ZigTag.int_from_ptr.create(t.arena, str);
2275 return ZigTag.not_equal.create(t.arena, .{ .lhs = int_from_ptr, .rhs = ZigTag.zero_literal.init() });
2276 }
2277 },
2278 else => {},
2279 },
2280 else => {},
2281 }
2282
2283 const maybe_bool_res = try t.transExpr(scope, expr, .used);
2284 if (maybe_bool_res.isBoolRes()) {
2285 return maybe_bool_res;
2286 }
2287
2288 return t.finishBoolExpr(expr.qt(t.tree), maybe_bool_res);
2289}
2290
2291fn finishBoolExpr(t: *Translator, qt: QualType, node: ZigNode) TransError!ZigNode {
2292 const sk = qt.scalarKind(t.comp);
2293 if (sk == .bool) return node;
2294 if (sk == .nullptr_t) {
2295 // node == null, always true
2296 return ZigTag.equal.create(t.arena, .{ .lhs = node, .rhs = ZigTag.null_literal.init() });
2297 }
2298 if (sk.isPointer()) {
2299 // node != null
2300 return ZigTag.not_equal.create(t.arena, .{ .lhs = node, .rhs = ZigTag.null_literal.init() });
2301 }
2302 if (sk != .none) {
2303 // node != 0
2304 return ZigTag.not_equal.create(t.arena, .{ .lhs = node, .rhs = ZigTag.zero_literal.init() });
2305 }
2306 unreachable; // Unexpected bool expression type
2307}
2308
2309fn transCastExpr(
2310 t: *Translator,
2311 scope: *Scope,
2312 cast: Node.Cast,
2313 dest_qt: QualType,
2314 used: ResultUsed,
2315 suppress_as: SuppressCast,
2316) TransError!ZigNode {
2317 const operand = switch (cast.kind) {
2318 .no_op => {
2319 const operand = cast.operand.get(t.tree);
2320 if (operand == .cast) {
2321 return t.transCastExpr(scope, operand.cast, cast.qt, used, suppress_as);
2322 }
2323 return t.transExpr(scope, cast.operand, used);
2324 },
2325 .lval_to_rval, .function_to_pointer => {
2326 return t.transExpr(scope, cast.operand, used);
2327 },
2328 .int_cast => int_cast: {
2329 const src_qt = cast.operand.qt(t.tree);
2330
2331 if (cast.implicit) {
2332 if (t.tree.value_map.get(cast.operand)) |val| {
2333 const max_int = try aro.Value.maxInt(dest_qt, t.comp);
2334 const min_int = try aro.Value.minInt(dest_qt, t.comp);
2335
2336 if (val.compare(.lte, max_int, t.comp) and val.compare(.gte, min_int, t.comp)) {
2337 break :int_cast try t.transExprCoercing(scope, cast.operand, .used);
2338 }
2339 }
2340 }
2341 const operand = try t.transExpr(scope, cast.operand, .used);
2342 break :int_cast try t.transIntCast(operand, src_qt, dest_qt);
2343 },
2344 .to_void => {
2345 assert(used == .unused);
2346 return try t.transExpr(scope, cast.operand, .unused);
2347 },
2348 .null_to_pointer => ZigTag.null_literal.init(),
2349 .array_to_pointer => array_to_pointer: {
2350 const child_qt = dest_qt.childType(t.comp);
2351
2352 loop: switch (cast.operand.get(t.tree)) {
2353 .string_literal_expr => |literal| {
2354 const sub_expr_node = try t.transExpr(scope, cast.operand, .used);
2355
2356 const ref = if (literal.kind == .utf8 or literal.kind == .ascii)
2357 sub_expr_node
2358 else
2359 try ZigTag.address_of.create(t.arena, sub_expr_node);
2360
2361 const casted = if (child_qt.@"const")
2362 ref
2363 else
2364 try ZigTag.const_cast.create(t.arena, sub_expr_node);
2365
2366 return t.maybeSuppressResult(used, casted);
2367 },
2368 .paren_expr => |paren_expr| {
2369 continue :loop paren_expr.operand.get(t.tree);
2370 },
2371 .generic_expr => |generic| {
2372 continue :loop generic.chosen.get(t.tree);
2373 },
2374 .generic_association_expr => |generic| {
2375 continue :loop generic.expr.get(t.tree);
2376 },
2377 .generic_default_expr => |generic| {
2378 continue :loop generic.expr.get(t.tree);
2379 },
2380 else => {},
2381 }
2382
2383 if (cast.operand.qt(t.tree).arrayLen(t.comp) == null) {
2384 return try t.transExpr(scope, cast.operand, used);
2385 }
2386
2387 const sub_expr_node = try t.transExpr(scope, cast.operand, .used);
2388 const ref = try ZigTag.address_of.create(t.arena, sub_expr_node);
2389 const align_cast = try ZigTag.align_cast.create(t.arena, ref);
2390 break :array_to_pointer try ZigTag.ptr_cast.create(t.arena, align_cast);
2391 },
2392 .int_to_pointer => int_to_pointer: {
2393 var sub_expr_node = try t.transExpr(scope, cast.operand, .used);
2394 const operand_qt = cast.operand.qt(t.tree);
2395 if (t.signedness(operand_qt) == .signed or operand_qt.bitSizeof(t.comp) > t.comp.target.ptrBitWidth()) {
2396 sub_expr_node = try ZigTag.as.create(t.arena, .{
2397 .lhs = try ZigTag.type.create(t.arena, "usize"),
2398 .rhs = try ZigTag.int_cast.create(t.arena, sub_expr_node),
2399 });
2400 }
2401 break :int_to_pointer try ZigTag.ptr_from_int.create(t.arena, sub_expr_node);
2402 },
2403 .int_to_bool => {
2404 const sub_expr_node = try t.transExpr(scope, cast.operand, .used);
2405 if (sub_expr_node.isBoolRes()) return sub_expr_node;
2406 if (cast.operand.qt(t.tree).is(t.comp, .bool)) return sub_expr_node;
2407 const cmp_node = try ZigTag.not_equal.create(t.arena, .{ .lhs = sub_expr_node, .rhs = ZigTag.zero_literal.init() });
2408 return t.maybeSuppressResult(used, cmp_node);
2409 },
2410 .float_to_bool => {
2411 const sub_expr_node = try t.transExpr(scope, cast.operand, .used);
2412 const cmp_node = try ZigTag.not_equal.create(t.arena, .{ .lhs = sub_expr_node, .rhs = ZigTag.zero_literal.init() });
2413 return t.maybeSuppressResult(used, cmp_node);
2414 },
2415 .pointer_to_bool => {
2416 const sub_expr_node = try t.transExpr(scope, cast.operand, .used);
2417
2418 // Special case function pointers as @intFromPtr(expr) != 0
2419 if (cast.operand.qt(t.tree).get(t.comp, .pointer)) |ptr_ty| if (ptr_ty.child.is(t.comp, .func)) {
2420 const ptr_node = if (sub_expr_node.tag() == .identifier)
2421 try ZigTag.address_of.create(t.arena, sub_expr_node)
2422 else
2423 sub_expr_node;
2424 const int_from_ptr = try ZigTag.int_from_ptr.create(t.arena, ptr_node);
2425 const cmp_node = try ZigTag.not_equal.create(t.arena, .{ .lhs = int_from_ptr, .rhs = ZigTag.zero_literal.init() });
2426 return t.maybeSuppressResult(used, cmp_node);
2427 };
2428
2429 const cmp_node = try ZigTag.not_equal.create(t.arena, .{ .lhs = sub_expr_node, .rhs = ZigTag.null_literal.init() });
2430 return t.maybeSuppressResult(used, cmp_node);
2431 },
2432 .bool_to_int => bool_to_int: {
2433 const sub_expr_node = try t.transExpr(scope, cast.operand, .used);
2434 break :bool_to_int try ZigTag.int_from_bool.create(t.arena, sub_expr_node);
2435 },
2436 .bool_to_float => bool_to_float: {
2437 const sub_expr_node = try t.transExpr(scope, cast.operand, .used);
2438 const int_from_bool = try ZigTag.int_from_bool.create(t.arena, sub_expr_node);
2439 break :bool_to_float try ZigTag.float_from_int.create(t.arena, int_from_bool);
2440 },
2441 .bool_to_pointer => bool_to_pointer: {
2442 const sub_expr_node = try t.transExpr(scope, cast.operand, .used);
2443 const int_from_bool = try ZigTag.int_from_bool.create(t.arena, sub_expr_node);
2444 break :bool_to_pointer try ZigTag.ptr_from_int.create(t.arena, int_from_bool);
2445 },
2446 .float_cast => float_cast: {
2447 const sub_expr_node = try t.transExpr(scope, cast.operand, .used);
2448 break :float_cast try ZigTag.float_cast.create(t.arena, sub_expr_node);
2449 },
2450 .int_to_float => int_to_float: {
2451 const sub_expr_node = try t.transExpr(scope, cast.operand, used);
2452 const int_node = if (sub_expr_node.isBoolRes())
2453 try ZigTag.int_from_bool.create(t.arena, sub_expr_node)
2454 else
2455 sub_expr_node;
2456 break :int_to_float try ZigTag.float_from_int.create(t.arena, int_node);
2457 },
2458 .float_to_int => float_to_int: {
2459 const sub_expr_node = try t.transExpr(scope, cast.operand, .used);
2460 break :float_to_int try ZigTag.int_from_float.create(t.arena, sub_expr_node);
2461 },
2462 .pointer_to_int => pointer_to_int: {
2463 const sub_expr_node = try t.transPointerCastExpr(scope, cast.operand);
2464 const ptr_node = try ZigTag.int_from_ptr.create(t.arena, sub_expr_node);
2465 break :pointer_to_int try ZigTag.int_cast.create(t.arena, ptr_node);
2466 },
2467 .bitcast => bitcast: {
2468 const sub_expr_node = try t.transPointerCastExpr(scope, cast.operand);
2469 const operand_qt = cast.operand.qt(t.tree);
2470 if (dest_qt.isPointer(t.comp) and operand_qt.isPointer(t.comp)) {
2471 var casted = try ZigTag.align_cast.create(t.arena, sub_expr_node);
2472 casted = try ZigTag.ptr_cast.create(t.arena, casted);
2473
2474 const src_elem = operand_qt.childType(t.comp);
2475 const dest_elem = dest_qt.childType(t.comp);
2476 if ((src_elem.@"const" or src_elem.is(t.comp, .func)) and !dest_elem.@"const") {
2477 casted = try ZigTag.const_cast.create(t.arena, casted);
2478 }
2479 if (src_elem.@"volatile" and !dest_elem.@"volatile") {
2480 casted = try ZigTag.volatile_cast.create(t.arena, casted);
2481 }
2482 break :bitcast casted;
2483 }
2484
2485 break :bitcast try ZigTag.bit_cast.create(t.arena, sub_expr_node);
2486 },
2487 .union_cast => union_cast: {
2488 const union_type = try t.transType(scope, dest_qt, cast.l_paren);
2489
2490 const operand_qt = cast.operand.qt(t.tree);
2491 const union_base = dest_qt.base(t.comp);
2492 const field = for (union_base.type.@"union".fields) |field| {
2493 if (field.qt.eql(operand_qt, t.comp)) break field;
2494 } else unreachable;
2495 const field_name = if (field.name_tok == 0) t.anonymous_record_field_names.get(.{
2496 .parent = union_base.qt,
2497 .field = field.qt,
2498 }).? else field.name.lookup(t.comp);
2499
2500 const field_init = try t.arena.create(ast.Payload.ContainerInit.Initializer);
2501 field_init.* = .{
2502 .name = field_name,
2503 .value = try t.transExpr(scope, cast.operand, .used),
2504 };
2505 break :union_cast try ZigTag.container_init.create(t.arena, .{
2506 .lhs = union_type,
2507 .inits = field_init[0..1],
2508 });
2509 },
2510 else => return t.fail(error.UnsupportedTranslation, cast.l_paren, "TODO translate {s} cast", .{@tagName(cast.kind)}),
2511 };
2512 if (suppress_as == .no_as) return t.maybeSuppressResult(used, operand);
2513 if (used == .unused) return t.maybeSuppressResult(used, operand);
2514 const as = try ZigTag.as.create(t.arena, .{
2515 .lhs = try t.transType(scope, dest_qt, cast.l_paren),
2516 .rhs = operand,
2517 });
2518 return as;
2519}
2520
2521fn transIntCast(t: *Translator, operand: ZigNode, src_qt: QualType, dest_qt: QualType) !ZigNode {
2522 const src_dest_order = src_qt.intRankOrder(dest_qt, t.comp);
2523 const different_sign = t.signedness(src_qt) != t.signedness(dest_qt);
2524 const needs_bitcast = different_sign and !(t.signedness(src_qt) == .unsigned and src_dest_order == .lt);
2525
2526 var casted = operand;
2527 if (casted.isBoolRes()) {
2528 casted = try ZigTag.int_from_bool.create(t.arena, casted);
2529 } else if (src_dest_order == .gt) {
2530 // No C type is smaller than the 1 bit from @intFromBool
2531 casted = try ZigTag.truncate.create(t.arena, casted);
2532 }
2533 if (needs_bitcast) {
2534 if (src_dest_order != .eq) {
2535 casted = try ZigTag.as.create(t.arena, .{
2536 .lhs = try t.transTypeIntWidthOf(dest_qt, t.signedness(src_qt) == .signed),
2537 .rhs = casted,
2538 });
2539 }
2540 return ZigTag.bit_cast.create(t.arena, casted);
2541 }
2542 return casted;
2543}
2544
2545/// Same as `transExpr` but adds a `&` if the expression is an identifier referencing a function type.
2546fn transPointerCastExpr(t: *Translator, scope: *Scope, expr: Node.Index) TransError!ZigNode {
2547 const sub_expr_node = try t.transExpr(scope, expr, .used);
2548 switch (expr.get(t.tree)) {
2549 .cast => |cast| if (cast.kind == .function_to_pointer and sub_expr_node.tag() == .identifier) {
2550 return ZigTag.address_of.create(t.arena, sub_expr_node);
2551 },
2552 else => {},
2553 }
2554 return sub_expr_node;
2555}
2556
2557fn transDeclRefExpr(t: *Translator, scope: *Scope, decl_ref: Node.DeclRef) TransError!ZigNode {
2558 const name = t.tree.tokSlice(decl_ref.name_tok);
2559 const maybe_alias = scope.getAlias(name);
2560 const mangled_name = maybe_alias orelse name;
2561
2562 switch (decl_ref.decl.get(t.tree)) {
2563 .function => |function| if (function.definition == null and function.body == null) {
2564 // Try translating the decl again in case of out of scope declaration.
2565 try t.transFnDecl(scope, function);
2566 },
2567 else => {},
2568 }
2569
2570 const decl = decl_ref.decl.get(t.tree);
2571 const ref_expr = blk: {
2572 const identifier = try ZigTag.identifier.create(t.arena, mangled_name);
2573 if (decl_ref.qt.is(t.comp, .func) and maybe_alias != null) {
2574 break :blk try ZigTag.field_access.create(t.arena, .{
2575 .lhs = identifier,
2576 .field_name = name,
2577 });
2578 }
2579 if (decl == .variable and maybe_alias != null) {
2580 switch (decl.variable.storage_class) {
2581 .@"extern", .static => {
2582 break :blk try ZigTag.field_access.create(t.arena, .{
2583 .lhs = identifier,
2584 .field_name = name,
2585 });
2586 },
2587 else => {},
2588 }
2589 }
2590 break :blk identifier;
2591 };
2592
2593 scope.skipVariableDiscard(mangled_name);
2594 return ref_expr;
2595}
2596
2597fn transBinExpr(t: *Translator, scope: *Scope, bin: Node.Binary, op_id: ZigTag) TransError!ZigNode {
2598 const lhs_uncasted = try t.transExpr(scope, bin.lhs, .used);
2599 const rhs_uncasted = try t.transExpr(scope, bin.rhs, .used);
2600
2601 const lhs = if (lhs_uncasted.isBoolRes())
2602 try ZigTag.int_from_bool.create(t.arena, lhs_uncasted)
2603 else
2604 lhs_uncasted;
2605
2606 const rhs = if (rhs_uncasted.isBoolRes())
2607 try ZigTag.int_from_bool.create(t.arena, rhs_uncasted)
2608 else
2609 rhs_uncasted;
2610
2611 return t.createBinOpNode(op_id, lhs, rhs);
2612}
2613
2614fn transBoolBinExpr(t: *Translator, scope: *Scope, bin: Node.Binary, op: ZigTag) !ZigNode {
2615 std.debug.assert(op == .@"and" or op == .@"or");
2616
2617 const lhs = try t.transBoolExpr(scope, bin.lhs);
2618 const rhs = try t.transBoolExpr(scope, bin.rhs);
2619
2620 return t.createBinOpNode(op, lhs, rhs);
2621}
2622
2623fn transShiftExpr(t: *Translator, scope: *Scope, bin: Node.Binary, op_id: ZigTag) !ZigNode {
2624 std.debug.assert(op_id == .shl or op_id == .shr);
2625
2626 // lhs >> @intCast(rh)
2627 const lhs = try t.transExpr(scope, bin.lhs, .used);
2628
2629 const rhs = try t.transExprCoercing(scope, bin.rhs, .used);
2630 const rhs_casted = try ZigTag.int_cast.create(t.arena, rhs);
2631
2632 return t.createBinOpNode(op_id, lhs, rhs_casted);
2633}
2634
2635fn transCondExpr(
2636 t: *Translator,
2637 scope: *Scope,
2638 conditional: Node.Conditional,
2639 used: ResultUsed,
2640) TransError!ZigNode {
2641 var cond_scope: Scope.Condition = .{
2642 .base = .{
2643 .parent = scope,
2644 .id = .condition,
2645 },
2646 };
2647 defer cond_scope.deinit();
2648
2649 const res_is_bool = conditional.qt.is(t.comp, .bool);
2650 const cond = try t.transBoolExpr(&cond_scope.base, conditional.cond);
2651
2652 var then_body = try t.transExpr(scope, conditional.then_expr, used);
2653 if (!res_is_bool and then_body.isBoolRes()) {
2654 then_body = try ZigTag.int_from_bool.create(t.arena, then_body);
2655 }
2656
2657 var else_body = try t.transExpr(scope, conditional.else_expr, used);
2658 if (!res_is_bool and else_body.isBoolRes()) {
2659 else_body = try ZigTag.int_from_bool.create(t.arena, else_body);
2660 }
2661
2662 // The `ResultUsed` is forwarded to both branches so no need to suppress the result here.
2663 return ZigTag.@"if".create(t.arena, .{ .cond = cond, .then = then_body, .@"else" = else_body });
2664}
2665
2666fn transBinaryCondExpr(
2667 t: *Translator,
2668 scope: *Scope,
2669 conditional: Node.Conditional,
2670 used: ResultUsed,
2671) TransError!ZigNode {
2672 // GNU extension of the ternary operator where the middle expression is
2673 // omitted, the condition itself is returned if it evaluates to true.
2674
2675 if (used == .unused) {
2676 // Result unused so this can be translated as
2677 // if (condition) else_expr;
2678 var cond_scope: Scope.Condition = .{
2679 .base = .{
2680 .parent = scope,
2681 .id = .condition,
2682 },
2683 };
2684 defer cond_scope.deinit();
2685
2686 return ZigTag.@"if".create(t.arena, .{
2687 .cond = try t.transBoolExpr(&cond_scope.base, conditional.cond),
2688 .then = try t.transExpr(scope, conditional.else_expr, .unused),
2689 .@"else" = null,
2690 });
2691 }
2692
2693 const res_is_bool = conditional.qt.is(t.comp, .bool);
2694 // c: (condition)?:(else_expr)
2695 // zig: (blk: {
2696 // const _cond_temp = (condition);
2697 // break :blk if (_cond_temp) _cond_temp else (else_expr);
2698 // })
2699 var block_scope = try Scope.Block.init(t, scope, true);
2700 defer block_scope.deinit();
2701
2702 const cond_temp = try block_scope.reserveMangledName("cond_temp");
2703 const init_node = try t.transExpr(&block_scope.base, conditional.cond, .used);
2704 const temp_decl = try ZigTag.var_simple.create(t.arena, .{ .name = cond_temp, .init = init_node });
2705 try block_scope.statements.append(t.gpa, temp_decl);
2706
2707 var cond_scope: Scope.Condition = .{
2708 .base = .{
2709 .parent = &block_scope.base,
2710 .id = .condition,
2711 },
2712 };
2713 defer cond_scope.deinit();
2714
2715 const cond_ident = try ZigTag.identifier.create(t.arena, cond_temp);
2716 const cond_node = try t.finishBoolExpr(conditional.cond.qt(t.tree), cond_ident);
2717 var then_body = cond_ident;
2718 if (!res_is_bool and init_node.isBoolRes()) {
2719 then_body = try ZigTag.int_from_bool.create(t.arena, then_body);
2720 }
2721
2722 var else_body = try t.transExpr(&block_scope.base, conditional.else_expr, .used);
2723 if (!res_is_bool and else_body.isBoolRes()) {
2724 else_body = try ZigTag.int_from_bool.create(t.arena, else_body);
2725 }
2726 const if_node = try ZigTag.@"if".create(t.arena, .{
2727 .cond = cond_node,
2728 .then = then_body,
2729 .@"else" = else_body,
2730 });
2731 const break_node = try ZigTag.break_val.create(t.arena, .{
2732 .label = block_scope.label,
2733 .val = if_node,
2734 });
2735 try block_scope.statements.append(t.gpa, break_node);
2736 return block_scope.complete();
2737}
2738
2739fn transCommaExpr(t: *Translator, scope: *Scope, bin: Node.Binary, used: ResultUsed) TransError!ZigNode {
2740 if (used == .unused) {
2741 const lhs = try t.transExprCoercing(scope, bin.lhs, .unused);
2742 try scope.appendNode(lhs);
2743 const rhs = try t.transExprCoercing(scope, bin.rhs, .unused);
2744 return rhs;
2745 }
2746
2747 var block_scope = try Scope.Block.init(t, scope, true);
2748 defer block_scope.deinit();
2749
2750 const lhs = try t.transExprCoercing(&block_scope.base, bin.lhs, .unused);
2751 try block_scope.statements.append(t.gpa, lhs);
2752
2753 const rhs = try t.transExprCoercing(&block_scope.base, bin.rhs, .used);
2754 const break_node = try ZigTag.break_val.create(t.arena, .{
2755 .label = block_scope.label,
2756 .val = rhs,
2757 });
2758 try block_scope.statements.append(t.gpa, break_node);
2759
2760 return try block_scope.complete();
2761}
2762
2763fn transAssignExpr(t: *Translator, scope: *Scope, bin: Node.Binary, used: ResultUsed) !ZigNode {
2764 if (used == .unused) {
2765 const lhs = try t.transExpr(scope, bin.lhs, .used);
2766 var rhs = try t.transExprCoercing(scope, bin.rhs, .used);
2767
2768 const lhs_qt = bin.lhs.qt(t.tree);
2769 if (rhs.isBoolRes() and !lhs_qt.is(t.comp, .bool)) {
2770 rhs = try ZigTag.int_from_bool.create(t.arena, rhs);
2771 }
2772
2773 return t.createBinOpNode(.assign, lhs, rhs);
2774 }
2775
2776 var block_scope = try Scope.Block.init(t, scope, true);
2777 defer block_scope.deinit();
2778
2779 const tmp = try block_scope.reserveMangledName("tmp");
2780
2781 var rhs = try t.transExpr(&block_scope.base, bin.rhs, .used);
2782 const lhs_qt = bin.lhs.qt(t.tree);
2783 if (rhs.isBoolRes() and !lhs_qt.is(t.comp, .bool)) {
2784 rhs = try ZigTag.int_from_bool.create(t.arena, rhs);
2785 }
2786
2787 const tmp_decl = try ZigTag.var_simple.create(t.arena, .{ .name = tmp, .init = rhs });
2788 try block_scope.statements.append(t.gpa, tmp_decl);
2789
2790 const lhs = try t.transExprCoercing(&block_scope.base, bin.lhs, .used);
2791 const tmp_ident = try ZigTag.identifier.create(t.arena, tmp);
2792
2793 const assign = try t.createBinOpNode(.assign, lhs, tmp_ident);
2794 try block_scope.statements.append(t.gpa, assign);
2795
2796 const break_node = try ZigTag.break_val.create(t.arena, .{
2797 .label = block_scope.label,
2798 .val = tmp_ident,
2799 });
2800 try block_scope.statements.append(t.gpa, break_node);
2801
2802 return try block_scope.complete();
2803}
2804
2805fn transCompoundAssign(
2806 t: *Translator,
2807 scope: *Scope,
2808 assign: Node.Binary,
2809 used: ResultUsed,
2810) !ZigNode {
2811 // If the result is unused we can try using the equivalent Zig operator
2812 // without a block
2813 if (used == .unused) {
2814 if (try t.transCompoundAssignSimple(scope, null, assign)) |some| {
2815 return some;
2816 }
2817 }
2818
2819 // Otherwise we need to wrap the the compound assignment in a block.
2820 var block_scope = try Scope.Block.init(t, scope, used == .used);
2821 defer block_scope.deinit();
2822 const ref = try block_scope.reserveMangledName("ref");
2823
2824 const lhs_expr = try t.transExpr(&block_scope.base, assign.lhs, .used);
2825 const addr_of = try ZigTag.address_of.create(t.arena, lhs_expr);
2826 const ref_decl = try ZigTag.var_simple.create(t.arena, .{ .name = ref, .init = addr_of });
2827 try block_scope.statements.append(t.gpa, ref_decl);
2828
2829 const lhs_node = try ZigTag.identifier.create(t.arena, ref);
2830 const ref_node = try ZigTag.deref.create(t.arena, lhs_node);
2831
2832 // Use the equivalent Zig operator if possible.
2833 if (try t.transCompoundAssignSimple(scope, ref_node, assign)) |some| {
2834 try block_scope.statements.append(t.gpa, some);
2835 } else {
2836 const old_dummy = t.compound_assign_dummy;
2837 defer t.compound_assign_dummy = old_dummy;
2838 t.compound_assign_dummy = ref_node;
2839
2840 // Otherwise do the operation and assignment separately.
2841 const rhs_node = try t.transExprCoercing(&block_scope.base, assign.rhs, .used);
2842 const assign_node = try t.createBinOpNode(.assign, ref_node, rhs_node);
2843 try block_scope.statements.append(t.gpa, assign_node);
2844 }
2845
2846 if (used == .used) {
2847 const break_node = try ZigTag.break_val.create(t.arena, .{
2848 .label = block_scope.label,
2849 .val = ref_node,
2850 });
2851 try block_scope.statements.append(t.gpa, break_node);
2852 }
2853 return block_scope.complete();
2854}
2855
2856/// Translates compound assignment using the equivalent Zig operator if possible.
2857fn transCompoundAssignSimple(t: *Translator, scope: *Scope, lhs_dummy_opt: ?ZigNode, assign: Node.Binary) TransError!?ZigNode {
2858 const assign_rhs = assign.rhs.get(t.tree);
2859 if (assign_rhs == .cast) return null;
2860
2861 const is_signed = t.signedness(assign.qt) == .signed;
2862 switch (assign_rhs) {
2863 .div_expr, .mod_expr => if (is_signed) return null,
2864 else => {},
2865 }
2866 const lhs_ptr = assign.qt.isPointer(t.comp);
2867
2868 const bin, const op: ZigTag, const cast: enum { none, shift, usize } = switch (assign_rhs) {
2869 .add_expr => |bin| .{
2870 bin,
2871 if (t.typeHasWrappingOverflow(bin.qt)) .add_wrap_assign else .add_assign,
2872 if (lhs_ptr and t.signedness(bin.rhs.qt(t.tree)) == .signed) .usize else .none,
2873 },
2874 .sub_expr => |bin| .{
2875 bin,
2876 if (t.typeHasWrappingOverflow(bin.qt)) .sub_wrap_assign else .sub_assign,
2877 if (lhs_ptr and t.signedness(bin.rhs.qt(t.tree)) == .signed) .usize else .none,
2878 },
2879 .mul_expr => |bin| .{
2880 bin,
2881 if (t.typeHasWrappingOverflow(bin.qt)) .mul_wrap_assign else .mul_assign,
2882 .none,
2883 },
2884 .mod_expr => |bin| .{ bin, .mod_assign, .none },
2885 .div_expr => |bin| .{ bin, .div_assign, .none },
2886 .shl_expr => |bin| .{ bin, .shl_assign, .shift },
2887 .shr_expr => |bin| .{ bin, .shr_assign, .shift },
2888 .bit_and_expr => |bin| .{ bin, .bit_and_assign, .none },
2889 .bit_xor_expr => |bin| .{ bin, .bit_xor_assign, .none },
2890 .bit_or_expr => |bin| .{ bin, .bit_or_assign, .none },
2891 else => unreachable,
2892 };
2893
2894 const lhs_node = blk: {
2895 const old_dummy = t.compound_assign_dummy;
2896 defer t.compound_assign_dummy = old_dummy;
2897 t.compound_assign_dummy = lhs_dummy_opt orelse try t.transExpr(scope, assign.lhs, .used);
2898
2899 break :blk try t.transExpr(scope, bin.lhs, .used);
2900 };
2901
2902 const rhs_node = try t.transExprCoercing(scope, bin.rhs, .used);
2903 const casted_rhs = switch (cast) {
2904 .none => rhs_node,
2905 .shift => try ZigTag.int_cast.create(t.arena, rhs_node),
2906 .usize => try t.usizeCastForWrappingPtrArithmetic(rhs_node),
2907 };
2908 return try t.createBinOpNode(op, lhs_node, casted_rhs);
2909}
2910
2911fn transIncDecExpr(
2912 t: *Translator,
2913 scope: *Scope,
2914 un: Node.Unary,
2915 position: enum { pre, post },
2916 kind: enum { inc, dec },
2917 used: ResultUsed,
2918) !ZigNode {
2919 const is_wrapping = t.typeHasWrappingOverflow(un.qt);
2920 const op: ZigTag = switch (kind) {
2921 .inc => if (is_wrapping) .add_wrap_assign else .add_assign,
2922 .dec => if (is_wrapping) .sub_wrap_assign else .sub_assign,
2923 };
2924
2925 const one_literal = ZigTag.one_literal.init();
2926 if (used == .unused) {
2927 const operand = try t.transExpr(scope, un.operand, .used);
2928 return try t.createBinOpNode(op, operand, one_literal);
2929 }
2930
2931 var block_scope = try Scope.Block.init(t, scope, true);
2932 defer block_scope.deinit();
2933
2934 const ref = try block_scope.reserveMangledName("ref");
2935 const operand = try t.transExprCoercing(&block_scope.base, un.operand, .used);
2936 const operand_ref = try ZigTag.address_of.create(t.arena, operand);
2937 const ref_decl = try ZigTag.var_simple.create(t.arena, .{ .name = ref, .init = operand_ref });
2938 try block_scope.statements.append(t.gpa, ref_decl);
2939
2940 const ref_ident = try ZigTag.identifier.create(t.arena, ref);
2941 const ref_deref = try ZigTag.deref.create(t.arena, ref_ident);
2942 const effect = try t.createBinOpNode(op, ref_deref, one_literal);
2943
2944 switch (position) {
2945 .pre => {
2946 try block_scope.statements.append(t.gpa, effect);
2947
2948 const break_node = try ZigTag.break_val.create(t.arena, .{
2949 .label = block_scope.label,
2950 .val = ref_deref,
2951 });
2952 try block_scope.statements.append(t.gpa, break_node);
2953 },
2954 .post => {
2955 const tmp = try block_scope.reserveMangledName("tmp");
2956 const tmp_decl = try ZigTag.var_simple.create(t.arena, .{ .name = tmp, .init = ref_deref });
2957 try block_scope.statements.append(t.gpa, tmp_decl);
2958
2959 try block_scope.statements.append(t.gpa, effect);
2960
2961 const tmp_ident = try ZigTag.identifier.create(t.arena, tmp);
2962 const break_node = try ZigTag.break_val.create(t.arena, .{
2963 .label = block_scope.label,
2964 .val = tmp_ident,
2965 });
2966 try block_scope.statements.append(t.gpa, break_node);
2967 },
2968 }
2969
2970 return try block_scope.complete();
2971}
2972
2973fn transPtrDiffExpr(t: *Translator, scope: *Scope, bin: Node.Binary) TransError!ZigNode {
2974 const lhs_uncasted = try t.transExpr(scope, bin.lhs, .used);
2975 const rhs_uncasted = try t.transExpr(scope, bin.rhs, .used);
2976
2977 const lhs = try ZigTag.int_from_ptr.create(t.arena, lhs_uncasted);
2978 const rhs = try ZigTag.int_from_ptr.create(t.arena, rhs_uncasted);
2979
2980 const sub_res = try t.createBinOpNode(.sub_wrap, lhs, rhs);
2981
2982 // @divExact(@as(<platform-ptrdiff_t>, @bitCast(@intFromPtr(lhs)) -% @intFromPtr(rhs)), @sizeOf(<lhs target type>))
2983 const ptrdiff_type = try t.transTypeIntWidthOf(bin.qt, true);
2984
2985 const bitcast = try ZigTag.as.create(t.arena, .{
2986 .lhs = ptrdiff_type,
2987 .rhs = try ZigTag.bit_cast.create(t.arena, sub_res),
2988 });
2989
2990 // C standard requires that pointer subtraction operands are of the same type,
2991 // otherwise it is undefined behavior. So we can assume the left and right
2992 // sides are the same Type and arbitrarily choose left.
2993 const lhs_ty = try t.transType(scope, bin.lhs.qt(t.tree), bin.lhs.tok(t.tree));
2994 const c_pointer = t.getContainer(lhs_ty).?;
2995
2996 if (c_pointer.castTag(.c_pointer)) |c_pointer_payload| {
2997 const sizeof = try ZigTag.sizeof.create(t.arena, c_pointer_payload.data.elem_type);
2998 return ZigTag.div_exact.create(t.arena, .{
2999 .lhs = bitcast,
3000 .rhs = sizeof,
3001 });
3002 } else {
3003 // This is an opaque/incomplete type. This subtraction exhibits Undefined Behavior by the C99 spec.
3004 // However, allowing subtraction on `void *` and function pointers is a commonly used extension.
3005 // So, just return the value in byte units, mirroring the behavior of this language extension as implemented by GCC and Clang.
3006 return bitcast;
3007 }
3008}
3009
3010/// Translate an arithmetic expression with a pointer operand and a signed-integer operand.
3011/// Zig requires a usize argument for pointer arithmetic, so we intCast to isize and then
3012/// bitcast to usize; pointer wraparound makes the math work.
3013/// Zig pointer addition is not commutative (unlike C); the pointer operand needs to be on the left.
3014/// The + operator in C is not a sequence point so it should be safe to switch the order if necessary.
3015fn transPointerArithmeticSignedOp(t: *Translator, scope: *Scope, bin: Node.Binary, op_id: ZigTag) TransError!ZigNode {
3016 std.debug.assert(op_id == .add or op_id == .sub);
3017
3018 const lhs_qt = bin.lhs.qt(t.tree);
3019 const swap_operands = op_id == .add and t.signedness(lhs_qt) == .signed;
3020
3021 const swizzled_lhs = if (swap_operands) bin.rhs else bin.lhs;
3022 const swizzled_rhs = if (swap_operands) bin.lhs else bin.rhs;
3023
3024 const lhs_node = try t.transExpr(scope, swizzled_lhs, .used);
3025 const rhs_node = try t.transExpr(scope, swizzled_rhs, .used);
3026
3027 const bitcast_node = try t.usizeCastForWrappingPtrArithmetic(rhs_node);
3028
3029 return t.createBinOpNode(op_id, lhs_node, bitcast_node);
3030}
3031
3032fn transMemberAccess(
3033 t: *Translator,
3034 scope: *Scope,
3035 kind: enum { normal, ptr },
3036 member_access: Node.MemberAccess,
3037 opt_base: ?ZigNode,
3038) TransError!ZigNode {
3039 const base_info = switch (kind) {
3040 .normal => member_access.base.qt(t.tree),
3041 .ptr => member_access.base.qt(t.tree).childType(t.comp),
3042 };
3043 const record = base_info.getRecord(t.comp).?;
3044 const field = record.fields[member_access.member_index];
3045 const field_name = if (field.name_tok == 0) t.anonymous_record_field_names.get(.{
3046 .parent = base_info.base(t.comp).qt,
3047 .field = field.qt,
3048 }).? else field.name.lookup(t.comp);
3049 const base_node = opt_base orelse try t.transExpr(scope, member_access.base, .used);
3050 const lhs = switch (kind) {
3051 .normal => base_node,
3052 .ptr => try ZigTag.deref.create(t.arena, base_node),
3053 };
3054 const field_access = try ZigTag.field_access.create(t.arena, .{
3055 .lhs = lhs,
3056 .field_name = field_name,
3057 });
3058
3059 // Flexible array members are translated as member functions.
3060 if (member_access.member_index == record.fields.len - 1 or base_info.base(t.comp).type == .@"union") {
3061 if (field.qt.get(t.comp, .array)) |array_ty| {
3062 if (array_ty.len == .incomplete or (array_ty.len == .fixed and array_ty.len.fixed == 0)) {
3063 return ZigTag.call.create(t.arena, .{ .lhs = field_access, .args = &.{} });
3064 }
3065 }
3066 }
3067
3068 return field_access;
3069}
3070
3071fn transArrayAccess(t: *Translator, scope: *Scope, array_access: Node.ArrayAccess, opt_base: ?ZigNode) TransError!ZigNode {
3072 // Unwrap the base statement if it's an array decayed to a bare pointer type
3073 // so that we index the array itself
3074 const base = base: {
3075 const base = array_access.base.get(t.tree);
3076 if (base != .cast) break :base array_access.base;
3077 if (base.cast.kind != .array_to_pointer) break :base array_access.base;
3078 break :base base.cast.operand;
3079 };
3080
3081 const base_node = opt_base orelse try t.transExpr(scope, base, .used);
3082 const index = index: {
3083 const index = try t.transExpr(scope, array_access.index, .used);
3084 const index_qt = array_access.index.qt(t.tree);
3085 const maybe_bigger_than_usize = switch (index_qt.base(t.comp).type) {
3086 .bool => {
3087 break :index try ZigTag.int_from_bool.create(t.arena, index);
3088 },
3089 .int => |int| switch (int) {
3090 .long_long, .ulong_long, .int128, .uint128 => true,
3091 else => false,
3092 },
3093 .bit_int => |bit_int| bit_int.bits > t.comp.target.ptrBitWidth(),
3094 else => unreachable,
3095 };
3096
3097 const is_nonnegative_int_literal = if (t.tree.value_map.get(array_access.index)) |val|
3098 val.compare(.gte, .zero, t.comp)
3099 else
3100 false;
3101 const is_signed = t.signedness(index_qt) == .signed;
3102
3103 if (is_signed and !is_nonnegative_int_literal) {
3104 // First cast to `isize` to get proper sign extension and
3105 // then @bitCast to `usize` to satisfy the compiler.
3106 const index_isize = try ZigTag.as.create(t.arena, .{
3107 .lhs = try ZigTag.type.create(t.arena, "isize"),
3108 .rhs = try ZigTag.int_cast.create(t.arena, index),
3109 });
3110 break :index try ZigTag.bit_cast.create(t.arena, index_isize);
3111 }
3112
3113 if (maybe_bigger_than_usize) {
3114 break :index try ZigTag.int_cast.create(t.arena, index);
3115 }
3116 break :index index;
3117 };
3118
3119 return ZigTag.array_access.create(t.arena, .{
3120 .lhs = base_node,
3121 .rhs = index,
3122 });
3123}
3124
3125fn transOffsetof(t: *Translator, scope: *Scope, arg: Node.Index) TransError!ZigNode {
3126 // Translate __builtin_offsetof(T, designator) as
3127 // @intFromPtr(&(@as(*allowzero T, @ptrFromInt(0)).designator))
3128 const member = try t.transMemberDesignator(scope, arg);
3129 const address = try ZigTag.address_of.create(t.arena, member);
3130 return ZigTag.int_from_ptr.create(t.arena, address);
3131}
3132
3133fn transMemberDesignator(t: *Translator, scope: *Scope, arg: Node.Index) TransError!ZigNode {
3134 switch (arg.get(t.tree)) {
3135 .default_init_expr => |default| {
3136 const elem_node = try t.transType(scope, default.qt, default.last_tok);
3137 const ptr_ty = try ZigTag.single_pointer.create(t.arena, .{
3138 .elem_type = elem_node,
3139 .is_allowzero = true,
3140 .is_const = false,
3141 .is_volatile = false,
3142 });
3143 const zero = try ZigTag.ptr_from_int.create(t.arena, ZigTag.zero_literal.init());
3144 return ZigTag.as.create(t.arena, .{ .lhs = ptr_ty, .rhs = zero });
3145 },
3146 .array_access_expr => |access| {
3147 const base = try t.transMemberDesignator(scope, access.base);
3148 return t.transArrayAccess(scope, access, base);
3149 },
3150 .member_access_expr => |access| {
3151 const base = try t.transMemberDesignator(scope, access.base);
3152 return t.transMemberAccess(scope, .normal, access, base);
3153 },
3154 .cast => |cast| {
3155 assert(cast.kind == .array_to_pointer);
3156 return t.transMemberDesignator(scope, cast.operand);
3157 },
3158 else => unreachable,
3159 }
3160}
3161
3162fn transBuiltinCall(
3163 t: *Translator,
3164 scope: *Scope,
3165 call: Node.BuiltinCall,
3166 used: ResultUsed,
3167) TransError!ZigNode {
3168 const builtin_name = t.tree.tokSlice(call.builtin_tok);
3169 if (std.mem.eql(u8, builtin_name, "__builtin_offsetof")) {
3170 const res = try t.transOffsetof(scope, call.args[0]);
3171 return t.maybeSuppressResult(used, res);
3172 }
3173
3174 const builtin = builtins.map.get(builtin_name) orelse
3175 return t.fail(error.UnsupportedTranslation, call.builtin_tok, "TODO implement function '{s}' in std.zig.c_builtins", .{builtin_name});
3176
3177 if (builtin.tag) |tag| switch (tag) {
3178 .byte_swap, .ceil, .cos, .sin, .exp, .exp2, .exp10, .abs, .log, .log2, .log10, .round, .sqrt, .trunc, .floor => {
3179 assert(call.args.len == 1);
3180 const arg = try t.transExprCoercing(scope, call.args[0], .used);
3181 const arg_ty = try t.transType(scope, call.args[0].qt(t.tree), call.args[0].tok(t.tree));
3182 const coerced = try ZigTag.as.create(t.arena, .{ .lhs = arg_ty, .rhs = arg });
3183
3184 const ptr = try t.arena.create(ast.Payload.UnOp);
3185 ptr.* = .{ .base = .{ .tag = tag }, .data = coerced };
3186 return t.maybeSuppressResult(used, ZigNode.initPayload(&ptr.base));
3187 },
3188 .@"unreachable" => return ZigTag.@"unreachable".init(),
3189 else => unreachable,
3190 };
3191
3192 const arg_nodes = try t.arena.alloc(ZigNode, call.args.len);
3193 for (call.args, arg_nodes) |c_arg, *zig_arg| {
3194 zig_arg.* = try t.transExprCoercing(scope, c_arg, .used);
3195 }
3196
3197 const builtin_identifier = try ZigTag.identifier.create(t.arena, "__builtin");
3198 const field_access = try ZigTag.field_access.create(t.arena, .{
3199 .lhs = builtin_identifier,
3200 .field_name = builtin.name,
3201 });
3202
3203 const res = try ZigTag.call.create(t.arena, .{
3204 .lhs = field_access,
3205 .args = arg_nodes,
3206 });
3207 if (call.qt.is(t.comp, .void)) return res;
3208 return t.maybeSuppressResult(used, res);
3209}
3210
3211fn transCall(
3212 t: *Translator,
3213 scope: *Scope,
3214 call: Node.Call,
3215 used: ResultUsed,
3216) TransError!ZigNode {
3217 const raw_fn_expr = try t.transExpr(scope, call.callee, .used);
3218 const fn_expr = blk: {
3219 loop: switch (call.callee.get(t.tree)) {
3220 .paren_expr => |paren_expr| {
3221 continue :loop paren_expr.operand.get(t.tree);
3222 },
3223 .decl_ref_expr => |decl_ref| {
3224 if (decl_ref.qt.is(t.comp, .func)) break :blk raw_fn_expr;
3225 },
3226 .cast => |cast| {
3227 if (cast.kind == .function_to_pointer) {
3228 continue :loop cast.operand.get(t.tree);
3229 }
3230 },
3231 .deref_expr, .addr_of_expr => |un| {
3232 continue :loop un.operand.get(t.tree);
3233 },
3234 .generic_expr => |generic| {
3235 continue :loop generic.chosen.get(t.tree);
3236 },
3237 .generic_association_expr => |generic| {
3238 continue :loop generic.expr.get(t.tree);
3239 },
3240 .generic_default_expr => |generic| {
3241 continue :loop generic.expr.get(t.tree);
3242 },
3243 else => {},
3244 }
3245 break :blk try ZigTag.unwrap.create(t.arena, raw_fn_expr);
3246 };
3247
3248 const callee_qt = call.callee.qt(t.tree);
3249 const maybe_ptr_ty = callee_qt.get(t.comp, .pointer);
3250 const func_qt = if (maybe_ptr_ty) |ptr| ptr.child else callee_qt;
3251 const func_ty = func_qt.get(t.comp, .func).?;
3252
3253 const arg_nodes = try t.arena.alloc(ZigNode, call.args.len);
3254 for (call.args, arg_nodes, 0..) |c_arg, *zig_arg, i| {
3255 if (i < func_ty.params.len) {
3256 zig_arg.* = try t.transExprCoercing(scope, c_arg, .used);
3257
3258 if (zig_arg.isBoolRes() and !func_ty.params[i].qt.is(t.comp, .bool)) {
3259 // In C the result type of a boolean expression is int. If this result is passed as
3260 // an argument to a function whose parameter is also int, there is no cast. Therefore
3261 // in Zig we'll need to cast it from bool to u1 (which will safely coerce to c_int).
3262 zig_arg.* = try ZigTag.int_from_bool.create(t.arena, zig_arg.*);
3263 }
3264 } else {
3265 zig_arg.* = try t.transExpr(scope, c_arg, .used);
3266
3267 if (zig_arg.isBoolRes()) {
3268 // Same as above but now we don't have a result type.
3269 const u1_node = try ZigTag.int_from_bool.create(t.arena, zig_arg.*);
3270 const c_int_node = try ZigTag.type.create(t.arena, "c_int");
3271 zig_arg.* = try ZigTag.as.create(t.arena, .{ .lhs = c_int_node, .rhs = u1_node });
3272 }
3273 }
3274 }
3275
3276 const res = try ZigTag.call.create(t.arena, .{
3277 .lhs = fn_expr,
3278 .args = arg_nodes,
3279 });
3280 if (call.qt.is(t.comp, .void)) return res;
3281 return t.maybeSuppressResult(used, res);
3282}
3283
3284const SuppressCast = enum { with_as, no_as };
3285
3286fn transIntLiteral(
3287 t: *Translator,
3288 scope: *Scope,
3289 literal_index: Node.Index,
3290 used: ResultUsed,
3291 suppress_as: SuppressCast,
3292) TransError!ZigNode {
3293 const val = t.tree.value_map.get(literal_index).?;
3294 const int_lit_node = try t.createIntNode(val);
3295 if (suppress_as == .no_as) {
3296 return t.maybeSuppressResult(used, int_lit_node);
3297 }
3298
3299 // Integer literals in C have types, and this can matter for several reasons.
3300 // For example, this is valid C:
3301 // unsigned char y = 256;
3302 // How this gets evaluated is the 256 is an integer, which gets truncated to signed char, then bit-casted
3303 // to unsigned char, resulting in 0. In order for this to work, we have to emit this zig code:
3304 // var y = @as(u8, @bitCast(@as(i8, @truncate(@as(c_int, 256)))));
3305
3306 // @as(T, x)
3307 const ty_node = try t.transType(scope, literal_index.qt(t.tree), literal_index.tok(t.tree));
3308 const as = try ZigTag.as.create(t.arena, .{ .lhs = ty_node, .rhs = int_lit_node });
3309 return t.maybeSuppressResult(used, as);
3310}
3311
3312fn transCharLiteral(
3313 t: *Translator,
3314 scope: *Scope,
3315 literal_index: Node.Index,
3316 used: ResultUsed,
3317 suppress_as: SuppressCast,
3318) TransError!ZigNode {
3319 const val = t.tree.value_map.get(literal_index).?;
3320 const char_literal = literal_index.get(t.tree).char_literal;
3321 const narrow = char_literal.kind == .ascii or char_literal.kind == .utf8;
3322
3323 // C has a somewhat obscure feature called multi-character character constant
3324 // e.g. 'abcd'
3325 const int_value = val.toInt(u32, t.comp).?;
3326 const int_lit_node = if (char_literal.kind == .ascii and int_value > 255)
3327 try t.createNumberNode(int_value, .int)
3328 else
3329 try t.createCharLiteralNode(narrow, int_value);
3330
3331 if (suppress_as == .no_as) {
3332 return t.maybeSuppressResult(used, int_lit_node);
3333 }
3334
3335 // See comment in `transIntLiteral` for why this code is here.
3336 // @as(T, x)
3337 const as_node = try ZigTag.as.create(t.arena, .{
3338 .lhs = try t.transType(scope, char_literal.qt, char_literal.literal_tok),
3339 .rhs = int_lit_node,
3340 });
3341 return t.maybeSuppressResult(used, as_node);
3342}
3343
3344fn transFloatLiteral(
3345 t: *Translator,
3346 scope: *Scope,
3347 literal_index: Node.Index,
3348 used: ResultUsed,
3349 suppress_as: SuppressCast,
3350) TransError!ZigNode {
3351 const val = t.tree.value_map.get(literal_index).?;
3352 const float_literal = literal_index.get(t.tree).float_literal;
3353
3354 var allocating: std.Io.Writer.Allocating = .init(t.gpa);
3355 defer allocating.deinit();
3356 _ = val.print(float_literal.qt, t.comp, &allocating.writer) catch return error.OutOfMemory;
3357
3358 const float_lit_node = try ZigTag.float_literal.create(t.arena, try t.arena.dupe(u8, allocating.getWritten()));
3359 if (suppress_as == .no_as) {
3360 return t.maybeSuppressResult(used, float_lit_node);
3361 }
3362
3363 const as_node = try ZigTag.as.create(t.arena, .{
3364 .lhs = try t.transType(scope, float_literal.qt, float_literal.literal_tok),
3365 .rhs = float_lit_node,
3366 });
3367 return t.maybeSuppressResult(used, as_node);
3368}
3369
3370fn transStringLiteral(
3371 t: *Translator,
3372 scope: *Scope,
3373 expr: Node.Index,
3374 literal: Node.CharLiteral,
3375) TransError!ZigNode {
3376 switch (literal.kind) {
3377 .ascii, .utf8 => return t.transNarrowStringLiteral(expr, literal),
3378 .utf16, .utf32, .wide => {
3379 const name = try std.fmt.allocPrint(t.arena, "{s}_string_{d}", .{ @tagName(literal.kind), t.getMangle() });
3380
3381 const array_type = try t.transTypeInit(scope, literal.qt, expr, literal.literal_tok);
3382 const lit_array = try t.transStringLiteralInitializer(expr, literal, array_type);
3383 const decl = try ZigTag.var_simple.create(t.arena, .{ .name = name, .init = lit_array });
3384 try scope.appendNode(decl);
3385 return ZigTag.identifier.create(t.arena, name);
3386 },
3387 }
3388}
3389
3390fn transNarrowStringLiteral(
3391 t: *Translator,
3392 expr: Node.Index,
3393 literal: Node.CharLiteral,
3394) TransError!ZigNode {
3395 const val = t.tree.value_map.get(expr).?;
3396
3397 const bytes = t.comp.interner.get(val.ref()).bytes;
3398 var allocating: std.Io.Writer.Allocating = try .initCapacity(t.gpa, bytes.len);
3399 defer allocating.deinit();
3400
3401 aro.Value.printString(bytes, literal.qt, t.comp, &allocating.writer) catch return error.OutOfMemory;
3402
3403 return ZigTag.string_literal.create(t.arena, try t.arena.dupe(u8, allocating.getWritten()));
3404}
3405
3406/// Translate a string literal that is initializing an array. In general narrow string
3407/// literals become `"<string>".*` or `"<string>"[0..<size>].*` if they need truncation.
3408/// Wide string literals become an array of integers. zero-fillers pad out the array to
3409/// the appropriate length, if necessary.
3410fn transStringLiteralInitializer(
3411 t: *Translator,
3412 expr: Node.Index,
3413 literal: Node.CharLiteral,
3414 array_type: ZigNode,
3415) TransError!ZigNode {
3416 assert(array_type.tag() == .array_type or array_type.tag() == .null_sentinel_array_type);
3417
3418 const is_narrow = literal.kind == .ascii or literal.kind == .utf8;
3419
3420 // The length of the string literal excluding the sentinel.
3421 const str_length = literal.qt.arrayLen(t.comp).? - 1;
3422
3423 const payload = (array_type.castTag(.array_type) orelse array_type.castTag(.null_sentinel_array_type).?).data;
3424 const array_size = payload.len;
3425 const elem_type = payload.elem_type;
3426
3427 if (array_size == 0) return ZigTag.empty_array.create(t.arena, array_type);
3428
3429 const num_inits = @min(str_length, array_size);
3430 if (num_inits == 0) {
3431 return ZigTag.array_filler.create(t.arena, .{
3432 .type = elem_type,
3433 .filler = ZigTag.zero_literal.init(),
3434 .count = array_size,
3435 });
3436 }
3437
3438 const init_node = if (is_narrow) blk: {
3439 // "string literal".* or string literal"[0..num_inits].*
3440 var str = try t.transNarrowStringLiteral(expr, literal);
3441 if (str_length != array_size) str = try ZigTag.string_slice.create(t.arena, .{ .string = str, .end = num_inits });
3442 break :blk try ZigTag.deref.create(t.arena, str);
3443 } else blk: {
3444 const size = literal.qt.childType(t.comp).sizeof(t.comp);
3445
3446 const val = t.tree.value_map.get(expr).?;
3447 const bytes = t.comp.interner.get(val.ref()).bytes;
3448
3449 const init_list = try t.arena.alloc(ZigNode, @intCast(num_inits));
3450 for (init_list, 0..) |*item, i| {
3451 const codepoint = switch (size) {
3452 2 => @as(*const u16, @alignCast(@ptrCast(bytes.ptr + i * 2))).*,
3453 4 => @as(*const u32, @alignCast(@ptrCast(bytes.ptr + i * 4))).*,
3454 else => unreachable,
3455 };
3456 item.* = try t.createCharLiteralNode(false, codepoint);
3457 }
3458 const init_args: ast.Payload.Array.ArrayTypeInfo = .{ .len = num_inits, .elem_type = elem_type };
3459 const init_array_type = if (array_type.tag() == .array_type)
3460 try ZigTag.array_type.create(t.arena, init_args)
3461 else
3462 try ZigTag.null_sentinel_array_type.create(t.arena, init_args);
3463 break :blk try ZigTag.array_init.create(t.arena, .{
3464 .cond = init_array_type,
3465 .cases = init_list,
3466 });
3467 };
3468
3469 if (num_inits == array_size) return init_node;
3470 assert(array_size > str_length); // If array_size <= str_length, `num_inits == array_size` and we've already returned.
3471
3472 const filler_node = try ZigTag.array_filler.create(t.arena, .{
3473 .type = elem_type,
3474 .filler = ZigTag.zero_literal.init(),
3475 .count = array_size - str_length,
3476 });
3477 return ZigTag.array_cat.create(t.arena, .{ .lhs = init_node, .rhs = filler_node });
3478}
3479
3480fn transCompoundLiteral(
3481 t: *Translator,
3482 scope: *Scope,
3483 literal: Node.CompoundLiteral,
3484 used: ResultUsed,
3485) TransError!ZigNode {
3486 if (used == .unused) {
3487 return t.transExpr(scope, literal.initializer, .unused);
3488 }
3489
3490 // TODO taking a reference to a compound literal should result in a mutable
3491 // pointer (unless the literal is const).
3492
3493 const initializer = try t.transExprCoercing(scope, literal.initializer, .used);
3494 const ty = try t.transType(scope, literal.qt, literal.l_paren_tok);
3495 if (!literal.thread_local and literal.storage_class != .static) {
3496 // In the simple case a compound literal can be translated
3497 // simply as `@as(type, initializer)`.
3498 return ZigTag.as.create(t.arena, .{ .lhs = ty, .rhs = initializer });
3499 }
3500
3501 // Otherwise static or thread local compound literals are translated as
3502 // a reference to a variable wrapped in a struct.
3503
3504 var block_scope = try Scope.Block.init(t, scope, true);
3505 defer block_scope.deinit();
3506
3507 const tmp = try block_scope.reserveMangledName("tmp");
3508 const wrapped_name = "compound_literal";
3509
3510 // const tmp = struct { var compound_literal = initializer };
3511 const temp_decl = try ZigTag.var_decl.create(t.arena, .{
3512 .is_pub = false,
3513 .is_const = literal.qt.@"const",
3514 .is_extern = false,
3515 .is_export = false,
3516 .is_threadlocal = literal.thread_local,
3517 .linksection_string = null,
3518 .alignment = null,
3519 .name = wrapped_name,
3520 .type = ty,
3521 .init = initializer,
3522 });
3523 const wrapped = try ZigTag.wrapped_local.create(t.arena, .{ .name = tmp, .init = temp_decl });
3524 try block_scope.statements.append(t.gpa, wrapped);
3525
3526 // break :blk tmp.compound_literal
3527 const static_tmp_ident = try ZigTag.identifier.create(t.arena, tmp);
3528 const field_access = try ZigTag.field_access.create(t.arena, .{
3529 .lhs = static_tmp_ident,
3530 .field_name = wrapped_name,
3531 });
3532 const break_node = try ZigTag.break_val.create(t.arena, .{
3533 .label = block_scope.label,
3534 .val = field_access,
3535 });
3536 try block_scope.statements.append(t.gpa, break_node);
3537
3538 return block_scope.complete();
3539}
3540
3541fn transDefaultInit(
3542 t: *Translator,
3543 scope: *Scope,
3544 default_init: Node.DefaultInit,
3545 used: ResultUsed,
3546 suppress_as: SuppressCast,
3547) TransError!ZigNode {
3548 assert(used == .used);
3549 const type_node = try t.transType(scope, default_init.qt, default_init.last_tok);
3550 return try t.createZeroValueNode(default_init.qt, type_node, suppress_as);
3551}
3552
3553fn transArrayInit(
3554 t: *Translator,
3555 scope: *Scope,
3556 array_init: Node.ContainerInit,
3557 used: ResultUsed,
3558) TransError!ZigNode {
3559 assert(used == .used);
3560 const array_item_qt = array_init.container_qt.childType(t.comp);
3561 const array_item_type = try t.transType(scope, array_item_qt, array_init.l_brace_tok);
3562 var maybe_lhs: ?ZigNode = null;
3563 var val_list: std.ArrayListUnmanaged(ZigNode) = .empty;
3564 defer val_list.deinit(t.gpa);
3565 var i: usize = 0;
3566 while (i < array_init.items.len) {
3567 const rhs = switch (array_init.items[i].get(t.tree)) {
3568 .array_filler_expr => |array_filler| blk: {
3569 const node = try ZigTag.array_filler.create(t.arena, .{
3570 .type = array_item_type,
3571 .filler = try t.createZeroValueNode(array_item_qt, array_item_type, .no_as),
3572 .count = @intCast(array_filler.count),
3573 });
3574 i += 1;
3575 break :blk node;
3576 },
3577 else => blk: {
3578 defer val_list.clearRetainingCapacity();
3579 while (i < array_init.items.len) : (i += 1) {
3580 if (array_init.items[i].get(t.tree) == .array_filler_expr) break;
3581 const expr = try t.transExprCoercing(scope, array_init.items[i], .used);
3582 try val_list.append(t.gpa, expr);
3583 }
3584 const array_type = try ZigTag.array_type.create(t.arena, .{
3585 .elem_type = array_item_type,
3586 .len = val_list.items.len,
3587 });
3588 const array_init_node = try ZigTag.array_init.create(t.arena, .{
3589 .cond = array_type,
3590 .cases = try t.arena.dupe(ZigNode, val_list.items),
3591 });
3592 break :blk array_init_node;
3593 },
3594 };
3595 maybe_lhs = if (maybe_lhs) |lhs| blk: {
3596 const cat = try ZigTag.array_cat.create(t.arena, .{
3597 .lhs = lhs,
3598 .rhs = rhs,
3599 });
3600 break :blk cat;
3601 } else rhs;
3602 }
3603 return maybe_lhs orelse try ZigTag.container_init_dot.create(t.arena, &.{});
3604}
3605
3606fn transUnionInit(
3607 t: *Translator,
3608 scope: *Scope,
3609 union_init: Node.UnionInit,
3610 used: ResultUsed,
3611) TransError!ZigNode {
3612 assert(used == .used);
3613 const init_expr = union_init.initializer orelse
3614 return ZigTag.undefined_literal.init();
3615
3616 if (init_expr.get(t.tree) == .default_init_expr) {
3617 return try t.transExpr(scope, init_expr, used);
3618 }
3619
3620 const union_type = try t.transType(scope, union_init.union_qt, union_init.l_brace_tok);
3621
3622 const union_base = union_init.union_qt.base(t.comp);
3623 const field = union_base.type.@"union".fields[union_init.field_index];
3624 const field_name = if (field.name_tok == 0) t.anonymous_record_field_names.get(.{
3625 .parent = union_base.qt,
3626 .field = field.qt,
3627 }).? else field.name.lookup(t.comp);
3628
3629 const field_init = try t.arena.create(ast.Payload.ContainerInit.Initializer);
3630 field_init.* = .{
3631 .name = field_name,
3632 .value = try t.transExprCoercing(scope, init_expr, .used),
3633 };
3634 const container_init = try ZigTag.container_init.create(t.arena, .{
3635 .lhs = union_type,
3636 .inits = field_init[0..1],
3637 });
3638 return container_init;
3639}
3640
3641fn transStructInit(
3642 t: *Translator,
3643 scope: *Scope,
3644 struct_init: Node.ContainerInit,
3645 used: ResultUsed,
3646) TransError!ZigNode {
3647 assert(used == .used);
3648 const struct_type = try t.transType(scope, struct_init.container_qt, struct_init.l_brace_tok);
3649 const field_inits = try t.arena.alloc(ast.Payload.ContainerInit.Initializer, struct_init.items.len);
3650
3651 const struct_base = struct_init.container_qt.base(t.comp);
3652 for (
3653 field_inits,
3654 struct_init.items,
3655 struct_base.type.@"struct".fields,
3656 ) |*init, field_expr, field| {
3657 const field_name = if (field.name_tok == 0) t.anonymous_record_field_names.get(.{
3658 .parent = struct_base.qt,
3659 .field = field.qt,
3660 }).? else field.name.lookup(t.comp);
3661 init.* = .{
3662 .name = field_name,
3663 .value = try t.transExprCoercing(scope, field_expr, .used),
3664 };
3665 }
3666
3667 const container_init = try ZigTag.container_init.create(t.arena, .{
3668 .lhs = struct_type,
3669 .inits = field_inits,
3670 });
3671 return container_init;
3672}
3673
3674fn transTypeInfo(
3675 t: *Translator,
3676 scope: *Scope,
3677 op: ZigTag,
3678 typeinfo: Node.TypeInfo,
3679) TransError!ZigNode {
3680 const operand = operand: {
3681 if (typeinfo.expr) |expr| {
3682 const operand = try t.transExpr(scope, expr, .used);
3683 break :operand try ZigTag.typeof.create(t.arena, operand);
3684 }
3685 break :operand try t.transType(scope, typeinfo.operand_qt, typeinfo.op_tok);
3686 };
3687
3688 const payload = try t.arena.create(ast.Payload.UnOp);
3689 payload.* = .{
3690 .base = .{ .tag = op },
3691 .data = operand,
3692 };
3693 return ZigNode.initPayload(&payload.base);
3694}
3695
3696fn transStmtExpr(
3697 t: *Translator,
3698 scope: *Scope,
3699 stmt_expr: Node.Unary,
3700 used: ResultUsed,
3701) TransError!ZigNode {
3702 const compound_stmt = stmt_expr.operand.get(t.tree).compound_stmt;
3703 if (used == .unused) {
3704 return t.transCompoundStmt(scope, compound_stmt);
3705 }
3706 var block_scope = try Scope.Block.init(t, scope, true);
3707 defer block_scope.deinit();
3708
3709 for (compound_stmt.body[0 .. compound_stmt.body.len - 1]) |stmt| {
3710 const result = try t.transStmt(&block_scope.base, stmt);
3711 switch (result.tag()) {
3712 .declaration, .empty_block => {},
3713 else => try block_scope.statements.append(t.gpa, result),
3714 }
3715 }
3716
3717 const last_result = try t.transExpr(&block_scope.base, compound_stmt.body[compound_stmt.body.len - 1], .used);
3718 switch (last_result.tag()) {
3719 .declaration, .empty_block => {},
3720 else => {
3721 const break_node = try ZigTag.break_val.create(t.arena, .{
3722 .label = block_scope.label,
3723 .val = last_result,
3724 });
3725 try block_scope.statements.append(t.gpa, break_node);
3726 },
3727 }
3728 return block_scope.complete();
3729}
3730
3731fn transConvertvectorExpr(
3732 t: *Translator,
3733 scope: *Scope,
3734 convertvector: Node.Convertvector,
3735) TransError!ZigNode {
3736 var block_scope = try Scope.Block.init(t, scope, true);
3737 defer block_scope.deinit();
3738
3739 const src_expr_node = try t.transExpr(&block_scope.base, convertvector.operand, .used);
3740 const tmp = try block_scope.reserveMangledName("tmp");
3741 const tmp_decl = try ZigTag.var_simple.create(t.arena, .{ .name = tmp, .init = src_expr_node });
3742 try block_scope.statements.append(t.gpa, tmp_decl);
3743 const tmp_ident = try ZigTag.identifier.create(t.arena, tmp);
3744
3745 const dest_type_node = try t.transType(&block_scope.base, convertvector.dest_qt, convertvector.builtin_tok);
3746 const dest_vec_ty = convertvector.dest_qt.get(t.comp, .vector).?;
3747 const src_vec_ty = convertvector.operand.qt(t.tree).get(t.comp, .vector).?;
3748
3749 const src_elem_sk = src_vec_ty.elem.scalarKind(t.comp);
3750 const dest_elem_sk = convertvector.dest_qt.childType(t.comp).scalarKind(t.comp);
3751
3752 const items = try t.arena.alloc(ZigNode, dest_vec_ty.len);
3753 for (items, 0..dest_vec_ty.len) |*item, i| {
3754 const value = try ZigTag.array_access.create(t.arena, .{
3755 .lhs = tmp_ident,
3756 .rhs = try t.createNumberNode(i, .int),
3757 });
3758
3759 if (src_elem_sk == .float and dest_elem_sk == .float) {
3760 item.* = try ZigTag.float_cast.create(t.arena, value);
3761 } else if (src_elem_sk == .float) {
3762 item.* = try ZigTag.int_from_float.create(t.arena, value);
3763 } else if (dest_elem_sk == .float) {
3764 item.* = try ZigTag.float_from_int.create(t.arena, value);
3765 } else {
3766 item.* = try t.transIntCast(value, src_vec_ty.elem, dest_vec_ty.elem);
3767 }
3768 }
3769
3770 const vec_init = try ZigTag.array_init.create(t.arena, .{
3771 .cond = dest_type_node,
3772 .cases = items,
3773 });
3774 const break_node = try ZigTag.break_val.create(t.arena, .{
3775 .label = block_scope.label,
3776 .val = vec_init,
3777 });
3778 try block_scope.statements.append(t.gpa, break_node);
3779
3780 return block_scope.complete();
3781}
3782
3783fn transShufflevectorExpr(
3784 t: *Translator,
3785 scope: *Scope,
3786 shufflevector: Node.Shufflevector,
3787) TransError!ZigNode {
3788 if (shufflevector.indexes.len == 0) {
3789 return t.fail(error.UnsupportedTranslation, shufflevector.builtin_tok, "@shuffle needs at least 1 index", .{});
3790 }
3791
3792 const a = try t.transExpr(scope, shufflevector.lhs, .used);
3793 const b = try t.transExpr(scope, shufflevector.rhs, .used);
3794
3795 // First two arguments to __builtin_shufflevector must be the same type
3796 const vector_child_type = try t.vectorTypeInfo(a, "child");
3797 const vector_len = try t.vectorTypeInfo(a, "len");
3798 const shuffle_mask = blk: {
3799 const mask_len = shufflevector.indexes.len;
3800
3801 const mask_type = try ZigTag.vector.create(t.arena, .{
3802 .lhs = try t.createNumberNode(mask_len, .int),
3803 .rhs = try ZigTag.type.create(t.arena, "i32"),
3804 });
3805
3806 const init_list = try t.arena.alloc(ZigNode, mask_len);
3807 for (init_list, shufflevector.indexes) |*init, index| {
3808 const index_expr = try t.transExprCoercing(scope, index, .used);
3809 const converted_index = try t.createHelperCallNode(.shuffleVectorIndex, &.{ index_expr, vector_len });
3810 init.* = converted_index;
3811 }
3812
3813 break :blk try ZigTag.array_init.create(t.arena, .{
3814 .cond = mask_type,
3815 .cases = init_list,
3816 });
3817 };
3818
3819 return ZigTag.shuffle.create(t.arena, .{
3820 .element_type = vector_child_type,
3821 .a = a,
3822 .b = b,
3823 .mask_vector = shuffle_mask,
3824 });
3825}
3826
3827// =====================
3828// Node creation helpers
3829// =====================
3830
3831fn createZeroValueNode(
3832 t: *Translator,
3833 qt: QualType,
3834 type_node: ZigNode,
3835 suppress_as: SuppressCast,
3836) !ZigNode {
3837 switch (qt.base(t.comp).type) {
3838 .bool => return ZigTag.false_literal.init(),
3839 .int, .bit_int, .float => {
3840 const zero_literal = ZigTag.zero_literal.init();
3841 return switch (suppress_as) {
3842 .with_as => try t.createBinOpNode(.as, type_node, zero_literal),
3843 .no_as => zero_literal,
3844 };
3845 },
3846 .pointer => {
3847 const null_literal = ZigTag.null_literal.init();
3848 return switch (suppress_as) {
3849 .with_as => try t.createBinOpNode(.as, type_node, null_literal),
3850 .no_as => null_literal,
3851 };
3852 },
3853 else => {},
3854 }
3855 return try ZigTag.std_mem_zeroes.create(t.arena, type_node);
3856}
3857
3858fn createIntNode(t: *Translator, int: aro.Value) !ZigNode {
3859 var space: aro.Interner.Tag.Int.BigIntSpace = undefined;
3860 var big = t.comp.interner.get(int.ref()).toBigInt(&space);
3861 const is_negative = !big.positive;
3862 big.positive = true;
3863
3864 const str = big.toStringAlloc(t.arena, 10, .lower) catch |err| switch (err) {
3865 error.OutOfMemory => return error.OutOfMemory,
3866 };
3867 const res = try ZigTag.integer_literal.create(t.arena, str);
3868 if (is_negative) return ZigTag.negate.create(t.arena, res);
3869 return res;
3870}
3871
3872fn createNumberNode(t: *Translator, num: anytype, num_kind: enum { int, float }) !ZigNode {
3873 const fmt_s = switch (@typeInfo(@TypeOf(num))) {
3874 .int, .comptime_int => "{d}",
3875 else => "{s}",
3876 };
3877 const str = try std.fmt.allocPrint(t.arena, fmt_s, .{num});
3878 if (num_kind == .float)
3879 return ZigTag.float_literal.create(t.arena, str)
3880 else
3881 return ZigTag.integer_literal.create(t.arena, str);
3882}
3883
3884fn createCharLiteralNode(t: *Translator, narrow: bool, val: u32) TransError!ZigNode {
3885 return ZigTag.char_literal.create(t.arena, if (narrow)
3886 try std.fmt.allocPrint(t.arena, "'{f}'", .{std.zig.fmtChar(&.{@as(u8, @intCast(val))})})
3887 else
3888 try std.fmt.allocPrint(t.arena, "'\\u{{{x}}}'", .{val}));
3889}
3890
3891fn createBinOpNode(
3892 t: *Translator,
3893 op: ZigTag,
3894 lhs: ZigNode,
3895 rhs: ZigNode,
3896) !ZigNode {
3897 const payload = try t.arena.create(ast.Payload.BinOp);
3898 payload.* = .{
3899 .base = .{ .tag = op },
3900 .data = .{
3901 .lhs = lhs,
3902 .rhs = rhs,
3903 },
3904 };
3905 return ZigNode.initPayload(&payload.base);
3906}
3907
3908pub fn createHelperCallNode(t: *Translator, name: std.meta.DeclEnum(@import("helpers")), args_opt: ?[]const ZigNode) !ZigNode {
3909 if (args_opt) |args| {
3910 return ZigTag.helper_call.create(t.arena, .{
3911 .name = @tagName(name),
3912 .args = try t.arena.dupe(ZigNode, args),
3913 });
3914 } else {
3915 return ZigTag.helper_ref.create(t.arena, @tagName(name));
3916 }
3917}
3918
3919/// Cast a signed integer node to a usize, for use in pointer arithmetic. Negative numbers
3920/// will become very large positive numbers but that is ok since we only use this in
3921/// pointer arithmetic expressions, where wraparound will ensure we get the correct value.
3922/// node -> @as(usize, @bitCast(@as(isize, @intCast(node))))
3923fn usizeCastForWrappingPtrArithmetic(t: *Translator, node: ZigNode) TransError!ZigNode {
3924 const intcast_node = try ZigTag.as.create(t.arena, .{
3925 .lhs = try ZigTag.type.create(t.arena, "isize"),
3926 .rhs = try ZigTag.int_cast.create(t.arena, node),
3927 });
3928
3929 return ZigTag.as.create(t.arena, .{
3930 .lhs = try ZigTag.type.create(t.arena, "usize"),
3931 .rhs = try ZigTag.bit_cast.create(t.arena, intcast_node),
3932 });
3933}
3934
3935/// @typeInfo(@TypeOf(vec_node)).vector.<field>
3936fn vectorTypeInfo(t: *Translator, vec_node: ZigNode, field: []const u8) TransError!ZigNode {
3937 const typeof_call = try ZigTag.typeof.create(t.arena, vec_node);
3938 const typeinfo_call = try ZigTag.typeinfo.create(t.arena, typeof_call);
3939 const vector_type_info = try ZigTag.field_access.create(t.arena, .{ .lhs = typeinfo_call, .field_name = "vector" });
3940 return ZigTag.field_access.create(t.arena, .{ .lhs = vector_type_info, .field_name = field });
3941}
3942
3943/// Build a getter function for a flexible array field in a C record
3944/// e.g. `T items[]` or `T items[0]`. The generated function returns a [*c] pointer
3945/// to the flexible array with the correct const and volatile qualifiers
3946fn createFlexibleMemberFn(
3947 t: *Translator,
3948 member_name: []const u8,
3949 field_name: []const u8,
3950) Error!ZigNode {
3951 const self_param_name = "self";
3952 const self_param = try ZigTag.identifier.create(t.arena, self_param_name);
3953 const self_type = try ZigTag.typeof.create(t.arena, self_param);
3954
3955 const fn_params = try t.arena.alloc(ast.Payload.Param, 1);
3956 fn_params[0] = .{
3957 .name = self_param_name,
3958 .type = ZigTag.@"anytype".init(),
3959 .is_noalias = false,
3960 };
3961
3962 // @typeInfo(@TypeOf(self.*.<field_name>)).pointer.child
3963 const dereffed = try ZigTag.deref.create(t.arena, self_param);
3964 const field_access = try ZigTag.field_access.create(t.arena, .{ .lhs = dereffed, .field_name = field_name });
3965 const type_of = try ZigTag.typeof.create(t.arena, field_access);
3966 const type_info = try ZigTag.typeinfo.create(t.arena, type_of);
3967 const array_info = try ZigTag.field_access.create(t.arena, .{ .lhs = type_info, .field_name = "array" });
3968 const child_info = try ZigTag.field_access.create(t.arena, .{ .lhs = array_info, .field_name = "child" });
3969
3970 const return_type = try t.createHelperCallNode(.FlexibleArrayType, &.{ self_type, child_info });
3971
3972 // return @ptrCast(&self.*.<field_name>);
3973 const address_of = try ZigTag.address_of.create(t.arena, field_access);
3974 const casted = try ZigTag.ptr_cast.create(t.arena, address_of);
3975 const return_stmt = try ZigTag.@"return".create(t.arena, casted);
3976 const body = try ZigTag.block_single.create(t.arena, return_stmt);
3977
3978 return ZigTag.func.create(t.arena, .{
3979 .is_pub = true,
3980 .is_extern = false,
3981 .is_export = false,
3982 .is_inline = false,
3983 .is_var_args = false,
3984 .name = member_name,
3985 .linksection_string = null,
3986 .explicit_callconv = null,
3987 .params = fn_params,
3988 .return_type = return_type,
3989 .body = body,
3990 .alignment = null,
3991 });
3992}
3993
3994// =================
3995// Macro translation
3996// =================
3997
3998fn transMacros(t: *Translator) !void {
3999 var tok_list = std.ArrayList(CToken).init(t.gpa);
4000 defer tok_list.deinit();
4001
4002 var pattern_list = try PatternList.init(t.gpa);
4003 defer pattern_list.deinit(t.gpa);
4004
4005 for (t.pp.defines.keys(), t.pp.defines.values()) |name, macro| {
4006 if (macro.is_builtin) continue;
4007 if (t.global_scope.containsNow(name)) {
4008 continue;
4009 }
4010
4011 tok_list.items.len = 0;
4012 try tok_list.ensureUnusedCapacity(macro.tokens.len);
4013 for (macro.tokens) |tok| {
4014 switch (tok.id) {
4015 .invalid => continue,
4016 .whitespace => continue,
4017 .comment => continue,
4018 .macro_ws => continue,
4019 else => {},
4020 }
4021 tok_list.appendAssumeCapacity(tok);
4022 }
4023
4024 if (macro.is_func) {
4025 const ms: PatternList.MacroSlicer = .{
4026 .tokens = tok_list.items,
4027 .source = t.comp.getSource(macro.loc.id).buf,
4028 .params = @intCast(macro.params.len),
4029 };
4030 if (try pattern_list.match(ms)) |impl| {
4031 const decl = try ZigTag.pub_var_simple.create(t.arena, .{
4032 .name = name,
4033 .init = try t.createHelperCallNode(impl, null),
4034 });
4035 try t.addTopLevelDecl(name, decl);
4036 continue;
4037 }
4038 }
4039
4040 if (t.checkTranslatableMacro(tok_list.items, macro.params)) |err| {
4041 switch (err) {
4042 .undefined_identifier => |ident| try t.failDeclExtra(&t.global_scope.base, macro.loc, name, "unable to translate macro: undefined identifier `{s}`", .{ident}),
4043 .invalid_arg_usage => |ident| try t.failDeclExtra(&t.global_scope.base, macro.loc, name, "unable to translate macro: untranslatable usage of arg `{s}`", .{ident}),
4044 }
4045 continue;
4046 }
4047
4048 var macro_translator: MacroTranslator = .{
4049 .t = t,
4050 .tokens = tok_list.items,
4051 .source = t.comp.getSource(macro.loc.id).buf,
4052 .name = name,
4053 .macro = macro,
4054 };
4055
4056 const res = if (macro.is_func)
4057 macro_translator.transFnMacro()
4058 else
4059 macro_translator.transMacro();
4060 res catch |err| switch (err) {
4061 error.ParseError => continue,
4062 error.OutOfMemory => |e| return e,
4063 };
4064 }
4065}
4066
4067const MacroTranslateError = union(enum) {
4068 undefined_identifier: []const u8,
4069 invalid_arg_usage: []const u8,
4070};
4071
4072fn checkTranslatableMacro(t: *Translator, tokens: []const CToken, params: []const []const u8) ?MacroTranslateError {
4073 var last_is_type_kw = false;
4074 var i: usize = 0;
4075 while (i < tokens.len) : (i += 1) {
4076 const token = tokens[i];
4077 switch (token.id) {
4078 .period, .arrow => i += 1, // skip next token since field identifiers can be unknown
4079 .keyword_struct, .keyword_union, .keyword_enum => if (!last_is_type_kw) {
4080 last_is_type_kw = true;
4081 continue;
4082 },
4083 .macro_param, .macro_param_no_expand => {
4084 if (last_is_type_kw) {
4085 return .{ .invalid_arg_usage = params[token.end] };
4086 }
4087 },
4088 .identifier, .extended_identifier => {
4089 const identifier = t.pp.tokSlice(token);
4090 if (!t.global_scope.contains(identifier) and !builtins.map.has(identifier)) {
4091 return .{ .undefined_identifier = identifier };
4092 }
4093 },
4094 else => {},
4095 }
4096 last_is_type_kw = false;
4097 }
4098 return null;
4099}
4100
4101fn getContainer(t: *Translator, node: ZigNode) ?ZigNode {
4102 switch (node.tag()) {
4103 .@"union",
4104 .@"struct",
4105 .address_of,
4106 .bit_not,
4107 .not,
4108 .optional_type,
4109 .negate,
4110 .negate_wrap,
4111 .array_type,
4112 .c_pointer,
4113 .single_pointer,
4114 => return node,
4115
4116 .identifier => {
4117 const ident = node.castTag(.identifier).?;
4118 if (t.global_scope.sym_table.get(ident.data)) |value| {
4119 if (value.castTag(.var_decl)) |var_decl|
4120 return t.getContainer(var_decl.data.init.?);
4121 if (value.castTag(.var_simple) orelse value.castTag(.pub_var_simple)) |var_decl|
4122 return t.getContainer(var_decl.data.init);
4123 }
4124 },
4125
4126 .field_access => {
4127 const field_access = node.castTag(.field_access).?;
4128
4129 if (t.getContainerTypeOf(field_access.data.lhs)) |ty_node| {
4130 if (ty_node.castTag(.@"struct") orelse ty_node.castTag(.@"union")) |container| {
4131 for (container.data.fields) |field| {
4132 if (mem.eql(u8, field.name, field_access.data.field_name)) {
4133 return t.getContainer(field.type);
4134 }
4135 }
4136 }
4137 }
4138 },
4139
4140 else => {},
4141 }
4142 return null;
4143}
4144
4145fn getContainerTypeOf(t: *Translator, ref: ZigNode) ?ZigNode {
4146 if (ref.castTag(.identifier)) |ident| {
4147 if (t.global_scope.sym_table.get(ident.data)) |value| {
4148 if (value.castTag(.var_decl)) |var_decl| {
4149 return t.getContainer(var_decl.data.type);
4150 }
4151 }
4152 } else if (ref.castTag(.field_access)) |field_access| {
4153 if (t.getContainerTypeOf(field_access.data.lhs)) |ty_node| {
4154 if (ty_node.castTag(.@"struct") orelse ty_node.castTag(.@"union")) |container| {
4155 for (container.data.fields) |field| {
4156 if (mem.eql(u8, field.name, field_access.data.field_name)) {
4157 return t.getContainer(field.type);
4158 }
4159 }
4160 } else return ty_node;
4161 }
4162 }
4163 return null;
4164}
4165
4166pub fn getFnProto(t: *Translator, ref: ZigNode) ?*ast.Payload.Func {
4167 const init = if (ref.castTag(.var_decl)) |v|
4168 v.data.init orelse return null
4169 else if (ref.castTag(.var_simple) orelse ref.castTag(.pub_var_simple)) |v|
4170 v.data.init
4171 else
4172 return null;
4173 if (t.getContainerTypeOf(init)) |ty_node| {
4174 if (ty_node.castTag(.optional_type)) |prefix| {
4175 if (prefix.data.castTag(.single_pointer)) |sp| {
4176 if (sp.data.elem_type.castTag(.func)) |fn_proto| {
4177 return fn_proto;
4178 }
4179 }
4180 }
4181 }
4182 return null;
4183}
lib/compiler/translate-c/src/ast.zig created+3063
......@@ -0,0 +1,3063 @@
1const std = @import("std");
2const Allocator = std.mem.Allocator;
3
4pub const Node = extern union {
5 /// If the tag value is less than Tag.no_payload_count, then no pointer
6 /// dereference is needed.
7 tag_if_small_enough: usize,
8 ptr_otherwise: *Payload,
9
10 pub const Tag = enum {
11 /// Declarations add themselves to the correct scopes and should not be emitted as this tag.
12 declaration,
13 null_literal,
14 undefined_literal,
15 /// opaque {}
16 opaque_literal,
17 true_literal,
18 false_literal,
19 empty_block,
20 return_void,
21 zero_literal,
22 one_literal,
23 @"unreachable",
24 void_type,
25 noreturn_type,
26 @"anytype",
27 @"continue",
28 @"break",
29 // After this, the tag requires a payload.
30
31 integer_literal,
32 float_literal,
33 string_literal,
34 char_literal,
35 enum_literal,
36 /// "string"[0..end]
37 string_slice,
38 identifier,
39 @"if",
40 /// if (!operand) break;
41 if_not_break,
42 @"while",
43 /// while (true) operand
44 while_true,
45 @"switch",
46 /// else => operand,
47 switch_else,
48 /// items => body,
49 switch_prong,
50 break_val,
51 @"return",
52 field_access,
53 array_access,
54 call,
55 var_decl,
56 /// const name = struct { init }
57 wrapped_local,
58 /// var name = init.*
59 mut_str,
60 func,
61 warning,
62 @"struct",
63 @"union",
64 @"opaque",
65 @"comptime",
66 @"defer",
67 array_init,
68 tuple,
69 container_init,
70 container_init_dot,
71 /// _ = operand;
72 discard,
73
74 // a + b
75 add,
76 // a = b
77 add_assign,
78 // c = (a = b)
79 add_wrap,
80 add_wrap_assign,
81 sub,
82 sub_assign,
83 sub_wrap,
84 sub_wrap_assign,
85 mul,
86 mul_assign,
87 mul_wrap,
88 mul_wrap_assign,
89 div,
90 div_assign,
91 shl,
92 shl_assign,
93 shr,
94 shr_assign,
95 mod,
96 mod_assign,
97 @"and",
98 @"or",
99 less_than,
100 less_than_equal,
101 greater_than,
102 greater_than_equal,
103 equal,
104 not_equal,
105 bit_and,
106 bit_and_assign,
107 bit_or,
108 bit_or_assign,
109 bit_xor,
110 bit_xor_assign,
111 array_cat,
112 ellipsis3,
113 assign,
114
115 /// @intCast(operand)
116 int_cast,
117 /// @constCast(operand)
118 const_cast,
119 /// @volatileCast(operand)
120 volatile_cast,
121 /// @divTrunc(lhs, rhs)
122 div_trunc,
123 /// @intFromBool(operand)
124 int_from_bool,
125 /// @as(lhs, rhs)
126 as,
127 /// @truncate(operand)
128 truncate,
129 /// @bitCast(operand)
130 bit_cast,
131 /// @floatCast(operand)
132 float_cast,
133 /// @intFromFloat(operand)
134 int_from_float,
135 /// @floatFromInt(operand)
136 float_from_int,
137 /// @ptrFromInt(operand)
138 ptr_from_int,
139 /// @intFromPtr(operand)
140 int_from_ptr,
141 /// @alignCast(operand)
142 align_cast,
143 /// @ptrCast(operand)
144 ptr_cast,
145 /// @divExact(lhs, rhs)
146 div_exact,
147 /// @offsetOf(lhs, rhs)
148 offset_of,
149 /// @splat(operand)
150 vector_zero_init,
151 /// @shuffle(type, a, b, mask)
152 shuffle,
153 /// @extern(ty, .{ .name = n })
154 builtin_extern,
155
156 /// @byteSwap(operand)
157 byte_swap,
158 /// @ceil(operand)
159 ceil,
160 /// @cos(operand)
161 cos,
162 /// @sin(operand)
163 sin,
164 /// @exp(operand)
165 exp,
166 /// @exp2(operand)
167 exp2,
168 /// @exp10(operand)
169 exp10,
170 /// @abs(operand)
171 abs,
172 /// @log(operand)
173 log,
174 /// @log2(operand)
175 log2,
176 /// @log10(operand)
177 log10,
178 /// @round(operand)
179 round,
180 /// @sqrt(operand)
181 sqrt,
182 /// @trunc(operand)
183 trunc,
184 /// @floor(operand)
185 floor,
186
187 /// __helpers.<name>(argshelper_call)
188 helper_call,
189 /// __helpers.<name>
190 helper_ref,
191
192 asm_simple,
193
194 negate,
195 negate_wrap,
196 bit_not,
197 not,
198 address_of,
199 /// .?
200 unwrap,
201 /// .*
202 deref,
203
204 block,
205 /// { operand }
206 block_single,
207
208 sizeof,
209 alignof,
210 typeof,
211 typeinfo,
212 type,
213
214 optional_type,
215 c_pointer,
216 single_pointer,
217 array_type,
218 null_sentinel_array_type,
219
220 /// @Vector(lhs, rhs)
221 vector,
222 /// @import("std").mem.zeroes(operand)
223 std_mem_zeroes,
224 /// @import("std").mem.zeroInit(lhs, rhs)
225 std_mem_zeroinit,
226 // pub const name = @compileError(msg);
227 fail_decl,
228 // var actual = mangled;
229 arg_redecl,
230 /// pub const alias = actual;
231 alias,
232 /// const name = init;
233 var_simple,
234 /// pub const name = init;
235 pub_var_simple,
236 /// pub? const name (: type)? = value
237 enum_constant,
238
239 /// pub inline fn name(params) return_type body
240 pub_inline_fn,
241
242 /// array_type{}
243 empty_array,
244 /// [1]type{val} ** count
245 array_filler,
246
247 /// comptime { if (!(lhs)) @compileError(rhs); }
248 static_assert,
249
250 pub const last_no_payload_tag = Tag.@"break";
251 pub const no_payload_count = @intFromEnum(last_no_payload_tag) + 1;
252
253 pub fn Type(comptime t: Tag) type {
254 return switch (t) {
255 .declaration,
256 .null_literal,
257 .undefined_literal,
258 .opaque_literal,
259 .true_literal,
260 .false_literal,
261 .empty_block,
262 .return_void,
263 .zero_literal,
264 .one_literal,
265 .void_type,
266 .noreturn_type,
267 .@"anytype",
268 .@"continue",
269 .@"break",
270 .@"unreachable",
271 => @compileError("Type Tag " ++ @tagName(t) ++ " has no payload"),
272
273 .std_mem_zeroes,
274 .@"return",
275 .@"comptime",
276 .@"defer",
277 .asm_simple,
278 .negate,
279 .negate_wrap,
280 .bit_not,
281 .not,
282 .optional_type,
283 .address_of,
284 .unwrap,
285 .deref,
286 .int_from_ptr,
287 .empty_array,
288 .while_true,
289 .if_not_break,
290 .switch_else,
291 .block_single,
292 .int_from_bool,
293 .sizeof,
294 .alignof,
295 .typeof,
296 .typeinfo,
297 .align_cast,
298 .truncate,
299 .bit_cast,
300 .float_cast,
301 .int_from_float,
302 .float_from_int,
303 .ptr_from_int,
304 .ptr_cast,
305 .int_cast,
306 .const_cast,
307 .volatile_cast,
308 .vector_zero_init,
309 .byte_swap,
310 .ceil,
311 .cos,
312 .sin,
313 .exp,
314 .exp2,
315 .exp10,
316 .abs,
317 .log,
318 .log2,
319 .log10,
320 .round,
321 .sqrt,
322 .trunc,
323 .floor,
324 => Payload.UnOp,
325
326 .add,
327 .add_assign,
328 .add_wrap,
329 .add_wrap_assign,
330 .sub,
331 .sub_assign,
332 .sub_wrap,
333 .sub_wrap_assign,
334 .mul,
335 .mul_assign,
336 .mul_wrap,
337 .mul_wrap_assign,
338 .div,
339 .div_assign,
340 .shl,
341 .shl_assign,
342 .shr,
343 .shr_assign,
344 .mod,
345 .mod_assign,
346 .@"and",
347 .@"or",
348 .less_than,
349 .less_than_equal,
350 .greater_than,
351 .greater_than_equal,
352 .equal,
353 .not_equal,
354 .bit_and,
355 .bit_and_assign,
356 .bit_or,
357 .bit_or_assign,
358 .bit_xor,
359 .bit_xor_assign,
360 .div_trunc,
361 .as,
362 .array_cat,
363 .ellipsis3,
364 .assign,
365 .array_access,
366 .std_mem_zeroinit,
367 .vector,
368 .div_exact,
369 .offset_of,
370 .static_assert,
371 => Payload.BinOp,
372
373 .integer_literal,
374 .float_literal,
375 .string_literal,
376 .char_literal,
377 .enum_literal,
378 .identifier,
379 .warning,
380 .type,
381 => Payload.Value,
382 .discard => Payload.Discard,
383 .@"if" => Payload.If,
384 .@"while" => Payload.While,
385 .@"switch", .array_init, .switch_prong => Payload.Switch,
386 .break_val => Payload.BreakVal,
387 .call => Payload.Call,
388 .var_decl => Payload.VarDecl,
389 .func => Payload.Func,
390 .@"struct", .@"union", .@"opaque" => Payload.Container,
391 .tuple => Payload.TupleInit,
392 .container_init => Payload.ContainerInit,
393 .container_init_dot => Payload.ContainerInitDot,
394 .block => Payload.Block,
395 .c_pointer, .single_pointer => Payload.Pointer,
396 .array_type, .null_sentinel_array_type => Payload.Array,
397 .arg_redecl, .alias, .fail_decl => Payload.ArgRedecl,
398 .var_simple, .pub_var_simple, .wrapped_local, .mut_str => Payload.SimpleVarDecl,
399 .enum_constant => Payload.EnumConstant,
400 .array_filler => Payload.ArrayFiller,
401 .pub_inline_fn => Payload.PubInlineFn,
402 .field_access => Payload.FieldAccess,
403 .string_slice => Payload.StringSlice,
404 .shuffle => Payload.Shuffle,
405 .builtin_extern => Payload.Extern,
406 .helper_call => Payload.HelperCall,
407 .helper_ref => Payload.HelperRef,
408 };
409 }
410
411 pub fn init(comptime t: Tag) Node {
412 comptime std.debug.assert(@intFromEnum(t) < Tag.no_payload_count);
413 return .{ .tag_if_small_enough = @intFromEnum(t) };
414 }
415
416 pub fn create(comptime t: Tag, ally: Allocator, data: Data(t)) error{OutOfMemory}!Node {
417 const ptr = try ally.create(t.Type());
418 ptr.* = .{
419 .base = .{ .tag = t },
420 .data = data,
421 };
422 return Node{ .ptr_otherwise = &ptr.base };
423 }
424
425 pub fn Data(comptime t: Tag) type {
426 return std.meta.fieldInfo(t.Type(), .data).type;
427 }
428 };
429
430 pub fn tag(self: Node) Tag {
431 if (self.tag_if_small_enough < Tag.no_payload_count) {
432 return @enumFromInt(@as(std.meta.Tag(Tag), @intCast(self.tag_if_small_enough)));
433 } else {
434 return self.ptr_otherwise.tag;
435 }
436 }
437
438 pub fn castTag(self: Node, comptime t: Tag) ?*t.Type() {
439 if (self.tag_if_small_enough < Tag.no_payload_count)
440 return null;
441
442 if (self.ptr_otherwise.tag == t)
443 return @alignCast(@fieldParentPtr("base", self.ptr_otherwise));
444
445 return null;
446 }
447
448 pub fn initPayload(payload: *Payload) Node {
449 std.debug.assert(@intFromEnum(payload.tag) >= Tag.no_payload_count);
450 return .{ .ptr_otherwise = payload };
451 }
452
453 pub fn isNoreturn(node: Node, break_counts: bool) bool {
454 switch (node.tag()) {
455 .block => {
456 const block_node = node.castTag(.block).?;
457 if (block_node.data.stmts.len == 0) return false;
458
459 const last = block_node.data.stmts[block_node.data.stmts.len - 1];
460 return last.isNoreturn(break_counts);
461 },
462 .@"switch" => {
463 const switch_node = node.castTag(.@"switch").?;
464
465 for (switch_node.data.cases) |case| {
466 const body = if (case.castTag(.switch_else)) |some|
467 some.data
468 else if (case.castTag(.switch_prong)) |some|
469 some.data.cond
470 else
471 unreachable;
472
473 if (!body.isNoreturn(break_counts)) return false;
474 }
475 return true;
476 },
477 .@"return", .return_void => return true,
478 .@"break" => if (break_counts) return true,
479 else => {},
480 }
481 return false;
482 }
483
484 pub fn isBoolRes(res: Node) bool {
485 switch (res.tag()) {
486 .@"or",
487 .@"and",
488 .equal,
489 .not_equal,
490 .less_than,
491 .less_than_equal,
492 .greater_than,
493 .greater_than_equal,
494 .not,
495 .false_literal,
496 .true_literal,
497 => return true,
498 else => return false,
499 }
500 }
501};
502
503pub const Payload = struct {
504 tag: Node.Tag,
505
506 pub const Value = struct {
507 base: Payload,
508 data: []const u8,
509 };
510
511 pub const UnOp = struct {
512 base: Payload,
513 data: Node,
514 };
515
516 pub const BinOp = struct {
517 base: Payload,
518 data: struct {
519 lhs: Node,
520 rhs: Node,
521 },
522 };
523
524 pub const Discard = struct {
525 base: Payload,
526 data: struct {
527 should_skip: bool,
528 value: Node,
529 },
530 };
531
532 pub const If = struct {
533 base: Payload,
534 data: struct {
535 cond: Node,
536 then: Node,
537 @"else": ?Node,
538 },
539 };
540
541 pub const While = struct {
542 base: Payload,
543 data: struct {
544 cond: Node,
545 body: Node,
546 cont_expr: ?Node,
547 },
548 };
549
550 pub const Switch = struct {
551 base: Payload,
552 data: struct {
553 cond: Node,
554 cases: []Node,
555 },
556 };
557
558 pub const BreakVal = struct {
559 base: Payload,
560 data: struct {
561 label: ?[]const u8,
562 val: Node,
563 },
564 };
565
566 pub const Call = struct {
567 base: Payload,
568 data: struct {
569 lhs: Node,
570 args: []Node,
571 },
572 };
573
574 pub const VarDecl = struct {
575 base: Payload,
576 data: struct {
577 is_pub: bool,
578 is_const: bool,
579 is_extern: bool,
580 is_export: bool,
581 is_threadlocal: bool,
582 alignment: ?c_uint,
583 linksection_string: ?[]const u8,
584 name: []const u8,
585 type: Node,
586 init: ?Node,
587 },
588 };
589
590 pub const Func = struct {
591 base: Payload,
592 data: struct {
593 is_pub: bool,
594 is_extern: bool,
595 is_export: bool,
596 is_inline: bool,
597 is_var_args: bool,
598 name: ?[]const u8,
599 linksection_string: ?[]const u8,
600 explicit_callconv: ?CallingConvention,
601 params: []Param,
602 return_type: Node,
603 body: ?Node,
604 alignment: ?c_uint,
605 },
606
607 pub const CallingConvention = enum {
608 c,
609 x86_64_sysv,
610 x86_64_win,
611 x86_stdcall,
612 x86_fastcall,
613 x86_thiscall,
614 x86_vectorcall,
615 x86_regcall,
616 aarch64_vfabi,
617 aarch64_sve_pcs,
618 arm_aapcs,
619 arm_aapcs_vfp,
620 m68k_rtd,
621 riscv_vector,
622 };
623 };
624
625 pub const Param = struct {
626 is_noalias: bool,
627 name: ?[]const u8,
628 type: Node,
629 };
630
631 pub const Container = struct {
632 base: Payload,
633 data: struct {
634 layout: enum { @"packed", @"extern", none },
635 fields: []Field,
636 decls: []Node,
637 },
638
639 pub const Field = struct {
640 name: []const u8,
641 type: Node,
642 alignment: ?c_uint,
643 default_value: ?Node,
644 };
645 };
646
647 pub const TupleInit = struct {
648 base: Payload,
649 data: []Node,
650 };
651
652 pub const ContainerInit = struct {
653 base: Payload,
654 data: struct {
655 lhs: Node,
656 inits: []Initializer,
657 },
658
659 pub const Initializer = struct {
660 name: []const u8,
661 value: Node,
662 };
663 };
664
665 pub const ContainerInitDot = struct {
666 base: Payload,
667 data: []Initializer,
668
669 pub const Initializer = struct {
670 name: []const u8,
671 value: Node,
672 };
673 };
674
675 pub const Block = struct {
676 base: Payload,
677 data: struct {
678 label: ?[]const u8,
679 stmts: []Node,
680 },
681 };
682
683 pub const Array = struct {
684 base: Payload,
685 data: ArrayTypeInfo,
686
687 pub const ArrayTypeInfo = struct {
688 elem_type: Node,
689 len: u64,
690 };
691 };
692
693 pub const Pointer = struct {
694 base: Payload,
695 data: struct {
696 elem_type: Node,
697 is_const: bool,
698 is_volatile: bool,
699 is_allowzero: bool,
700 },
701 };
702
703 pub const ArgRedecl = struct {
704 base: Payload,
705 data: struct {
706 actual: []const u8,
707 mangled: []const u8,
708 },
709 };
710
711 pub const SimpleVarDecl = struct {
712 base: Payload,
713 data: struct {
714 name: []const u8,
715 init: Node,
716 },
717 };
718
719 pub const EnumConstant = struct {
720 base: Payload,
721 data: struct {
722 name: []const u8,
723 is_public: bool,
724 type: ?Node,
725 value: Node,
726 },
727 };
728
729 pub const ArrayFiller = struct {
730 base: Payload,
731 data: struct {
732 type: Node,
733 filler: Node,
734 count: u64,
735 },
736 };
737
738 pub const PubInlineFn = struct {
739 base: Payload,
740 data: struct {
741 name: []const u8,
742 params: []Param,
743 return_type: Node,
744 body: Node,
745 },
746 };
747
748 pub const FieldAccess = struct {
749 base: Payload,
750 data: struct {
751 lhs: Node,
752 field_name: []const u8,
753 },
754 };
755
756 pub const StringSlice = struct {
757 base: Payload,
758 data: struct {
759 string: Node,
760 end: u64,
761 },
762 };
763
764 pub const Shuffle = struct {
765 base: Payload,
766 data: struct {
767 element_type: Node,
768 a: Node,
769 b: Node,
770 mask_vector: Node,
771 },
772 };
773
774 pub const Extern = struct {
775 base: Payload,
776 data: struct {
777 type: Node,
778 name: Node,
779 },
780 };
781
782 pub const HelperCall = struct {
783 base: Payload,
784 data: struct {
785 name: []const u8,
786 args: []const Node,
787 },
788 };
789
790 pub const HelperRef = struct {
791 base: Payload,
792 data: []const u8,
793 };
794};
795
796/// Converts the nodes into a Zig Ast.
797/// Caller must free the source slice.
798pub fn render(gpa: Allocator, nodes: []const Node) !std.zig.Ast {
799 var ctx: Context = .{
800 .gpa = gpa,
801 .buf = std.array_list.Managed(u8).init(gpa),
802 };
803 defer ctx.buf.deinit();
804 defer ctx.nodes.deinit(gpa);
805 defer ctx.extra_data.deinit(gpa);
806 defer ctx.tokens.deinit(gpa);
807
808 // Estimate that each top level node has 10 child nodes.
809 const estimated_node_count = nodes.len * 10 + 1; // +1 for the .root node
810 try ctx.nodes.ensureTotalCapacity(gpa, estimated_node_count);
811 // Estimate that each each node has 2 tokens.
812 const estimated_tokens_count = estimated_node_count * 2;
813 try ctx.tokens.ensureTotalCapacity(gpa, estimated_tokens_count);
814 // Estimate that each each token is 3 bytes long.
815 const estimated_buf_len = estimated_tokens_count * 3;
816 try ctx.buf.ensureTotalCapacity(estimated_buf_len);
817
818 ctx.nodes.appendAssumeCapacity(.{
819 .tag = .root,
820 .main_token = 0,
821 .data = undefined,
822 });
823
824 const root_members = blk: {
825 var result = std.array_list.Managed(NodeIndex).init(gpa);
826 defer result.deinit();
827
828 for (nodes) |node| {
829 const res = (try renderNodeOpt(&ctx, node)) orelse continue;
830 try result.append(res);
831 }
832 break :blk try ctx.listToSpan(result.items);
833 };
834
835 ctx.nodes.items(.data)[0] = .{ .extra_range = .{
836 .start = root_members.start,
837 .end = root_members.end,
838 } };
839
840 try ctx.tokens.append(gpa, .{
841 .tag = .eof,
842 .start = @as(u32, @intCast(ctx.buf.items.len)),
843 });
844
845 return .{
846 .source = try ctx.buf.toOwnedSliceSentinel(0),
847 .tokens = ctx.tokens.toOwnedSlice(),
848 .nodes = ctx.nodes.toOwnedSlice(),
849 .extra_data = try ctx.extra_data.toOwnedSlice(gpa),
850 .errors = &.{},
851 .mode = .zig,
852 };
853}
854
855const NodeIndex = std.zig.Ast.Node.Index;
856const NodeSubRange = std.zig.Ast.Node.SubRange;
857const TokenIndex = std.zig.Ast.TokenIndex;
858const TokenTag = std.zig.Token.Tag;
859
860const Context = struct {
861 gpa: Allocator,
862 buf: std.array_list.Managed(u8),
863 nodes: std.zig.Ast.NodeList = .{},
864 extra_data: std.ArrayListUnmanaged(u32) = .empty,
865 tokens: std.zig.Ast.TokenList = .{},
866
867 fn addTokenFmt(c: *Context, tag: TokenTag, comptime format: []const u8, args: anytype) Allocator.Error!TokenIndex {
868 const start_index = c.buf.items.len;
869 try c.buf.print(format ++ " ", args);
870
871 try c.tokens.append(c.gpa, .{
872 .tag = tag,
873 .start = @intCast(start_index),
874 });
875
876 return @intCast(c.tokens.len - 1);
877 }
878
879 fn addToken(c: *Context, tag: TokenTag, bytes: []const u8) Allocator.Error!TokenIndex {
880 return c.addTokenFmt(tag, "{s}", .{bytes});
881 }
882
883 fn addIdentifier(c: *Context, bytes: []const u8) Allocator.Error!TokenIndex {
884 if (std.zig.primitives.isPrimitive(bytes))
885 return c.addTokenFmt(.identifier, "@\"{s}\"", .{bytes});
886 return c.addTokenFmt(.identifier, "{f}", .{std.zig.fmtId(bytes)});
887 }
888
889 fn listToSpan(c: *Context, list: []const NodeIndex) Allocator.Error!NodeSubRange {
890 try c.extra_data.appendSlice(c.gpa, @ptrCast(list));
891 return .{
892 .start = @enumFromInt(c.extra_data.items.len - list.len),
893 .end = @enumFromInt(c.extra_data.items.len),
894 };
895 }
896
897 fn addNode(c: *Context, elem: std.zig.Ast.Node) Allocator.Error!NodeIndex {
898 const result: NodeIndex = @enumFromInt(c.nodes.len);
899 try c.nodes.append(c.gpa, elem);
900 return result;
901 }
902
903 fn addExtra(c: *Context, extra: anytype) Allocator.Error!std.zig.Ast.ExtraIndex {
904 const fields = std.meta.fields(@TypeOf(extra));
905 try c.extra_data.ensureUnusedCapacity(c.gpa, fields.len);
906 const result: std.zig.Ast.ExtraIndex = @enumFromInt(c.extra_data.items.len);
907 inline for (fields) |field| {
908 const data: u32 = switch (field.type) {
909 NodeIndex,
910 std.zig.Ast.Node.OptionalIndex,
911 std.zig.Ast.OptionalTokenIndex,
912 std.zig.Ast.ExtraIndex,
913 => @intFromEnum(@field(extra, field.name)),
914 TokenIndex,
915 => @field(extra, field.name),
916 else => @compileError("unexpected field type"),
917 };
918 c.extra_data.appendAssumeCapacity(data);
919 }
920 return result;
921 }
922};
923
924fn renderNodeOpt(c: *Context, node: Node) Allocator.Error!?NodeIndex {
925 switch (node.tag()) {
926 .warning => {
927 const payload = node.castTag(.warning).?.data;
928 try c.buf.appendSlice(payload);
929 try c.buf.append('\n');
930 return null;
931 },
932 .discard => {
933 const payload = node.castTag(.discard).?.data;
934 if (payload.should_skip) return null;
935
936 return try renderNode(c, node);
937 },
938 else => return try renderNode(c, node),
939 }
940}
941
942fn renderNode(c: *Context, node: Node) Allocator.Error!NodeIndex {
943 switch (node.tag()) {
944 .declaration => unreachable,
945 .warning => unreachable,
946 .discard => {
947 const payload = node.castTag(.discard).?.data;
948 std.debug.assert(!payload.should_skip);
949
950 const lhs = try c.addNode(.{
951 .tag = .identifier,
952 .main_token = try c.addToken(.identifier, "_"),
953 .data = undefined,
954 });
955 const main_token = try c.addToken(.equal, "=");
956 if (payload.value.tag() == .identifier) {
957 // Render as `_ = &foo;` to avoid tripping "pointless discard" and "local variable never mutated" errors.
958 var addr_of_pl: Payload.UnOp = .{
959 .base = .{ .tag = .address_of },
960 .data = payload.value,
961 };
962 const addr_of: Node = .{ .ptr_otherwise = &addr_of_pl.base };
963 return try c.addNode(.{
964 .tag = .assign,
965 .main_token = main_token,
966 .data = .{ .node_and_node = .{
967 lhs, try renderNode(c, addr_of),
968 } },
969 });
970 } else {
971 return try c.addNode(.{
972 .tag = .assign,
973 .main_token = main_token,
974 .data = .{ .node_and_node = .{
975 lhs, try renderNode(c, payload.value),
976 } },
977 });
978 }
979 },
980 .std_mem_zeroes => {
981 const payload = node.castTag(.std_mem_zeroes).?.data;
982 const import_node = try renderStdImport(c, &.{ "mem", "zeroes" });
983 return renderCall(c, import_node, &.{payload});
984 },
985 .std_mem_zeroinit => {
986 const payload = node.castTag(.std_mem_zeroinit).?.data;
987 const import_node = try renderStdImport(c, &.{ "mem", "zeroInit" });
988 return renderCall(c, import_node, &.{ payload.lhs, payload.rhs });
989 },
990 .vector => {
991 const payload = node.castTag(.vector).?.data;
992 return renderBuiltinCall(c, "@Vector", &.{ payload.lhs, payload.rhs });
993 },
994 .call => {
995 const payload = node.castTag(.call).?.data;
996 const lhs = try renderNodeGrouped(c, payload.lhs);
997 return renderCall(c, lhs, payload.args);
998 },
999 .null_literal => return c.addNode(.{
1000 .tag = .identifier,
1001 .main_token = try c.addToken(.identifier, "null"),
1002 .data = undefined,
1003 }),
1004 .undefined_literal => return c.addNode(.{
1005 .tag = .identifier,
1006 .main_token = try c.addToken(.identifier, "undefined"),
1007 .data = undefined,
1008 }),
1009 .true_literal => return c.addNode(.{
1010 .tag = .identifier,
1011 .main_token = try c.addToken(.identifier, "true"),
1012 .data = undefined,
1013 }),
1014 .false_literal => return c.addNode(.{
1015 .tag = .identifier,
1016 .main_token = try c.addToken(.identifier, "false"),
1017 .data = undefined,
1018 }),
1019 .zero_literal => return c.addNode(.{
1020 .tag = .number_literal,
1021 .main_token = try c.addToken(.number_literal, "0"),
1022 .data = undefined,
1023 }),
1024 .one_literal => return c.addNode(.{
1025 .tag = .number_literal,
1026 .main_token = try c.addToken(.number_literal, "1"),
1027 .data = undefined,
1028 }),
1029 .@"unreachable" => return c.addNode(.{
1030 .tag = .unreachable_literal,
1031 .main_token = try c.addToken(.keyword_unreachable, "unreachable"),
1032 .data = undefined,
1033 }),
1034 .void_type => return c.addNode(.{
1035 .tag = .identifier,
1036 .main_token = try c.addToken(.identifier, "void"),
1037 .data = undefined,
1038 }),
1039 .noreturn_type => return c.addNode(.{
1040 .tag = .identifier,
1041 .main_token = try c.addToken(.identifier, "noreturn"),
1042 .data = undefined,
1043 }),
1044 .@"continue" => return c.addNode(.{
1045 .tag = .@"continue",
1046 .main_token = try c.addToken(.keyword_continue, "continue"),
1047 .data = .{ .opt_token_and_opt_node = .{
1048 .none, .none,
1049 } },
1050 }),
1051 .return_void => return c.addNode(.{
1052 .tag = .@"return",
1053 .main_token = try c.addToken(.keyword_return, "return"),
1054 .data = .{ .opt_node = .none },
1055 }),
1056 .@"break" => return c.addNode(.{
1057 .tag = .@"break",
1058 .main_token = try c.addToken(.keyword_break, "break"),
1059 .data = .{ .opt_token_and_opt_node = .{
1060 .none, .none,
1061 } },
1062 }),
1063 .break_val => {
1064 const payload = node.castTag(.break_val).?.data;
1065 const tok = try c.addToken(.keyword_break, "break");
1066 const break_label = if (payload.label) |some| blk: {
1067 _ = try c.addToken(.colon, ":");
1068 break :blk try c.addIdentifier(some);
1069 } else 0;
1070 return c.addNode(.{
1071 .tag = .@"break",
1072 .main_token = tok,
1073 .data = .{ .opt_token_and_opt_node = .{
1074 .fromToken(break_label), (try renderNode(c, payload.val)).toOptional(),
1075 } },
1076 });
1077 },
1078 .@"return" => {
1079 const payload = node.castTag(.@"return").?.data;
1080 return c.addNode(.{
1081 .tag = .@"return",
1082 .main_token = try c.addToken(.keyword_return, "return"),
1083 .data = .{ .opt_node = (try renderNode(c, payload)).toOptional() },
1084 });
1085 },
1086 .@"comptime" => {
1087 const payload = node.castTag(.@"comptime").?.data;
1088 return c.addNode(.{
1089 .tag = .@"comptime",
1090 .main_token = try c.addToken(.keyword_comptime, "comptime"),
1091 .data = .{
1092 .node = try renderNode(c, payload),
1093 },
1094 });
1095 },
1096 .@"defer" => {
1097 const payload = node.castTag(.@"defer").?.data;
1098 return c.addNode(.{
1099 .tag = .@"defer",
1100 .main_token = try c.addToken(.keyword_defer, "defer"),
1101 .data = .{
1102 .node = try renderNode(c, payload),
1103 },
1104 });
1105 },
1106 .asm_simple => {
1107 const payload = node.castTag(.asm_simple).?.data;
1108 const asm_token = try c.addToken(.keyword_asm, "asm");
1109 _ = try c.addToken(.l_paren, "(");
1110 return c.addNode(.{
1111 .tag = .asm_simple,
1112 .main_token = asm_token,
1113 .data = .{ .node_and_token = .{
1114 try renderNode(c, payload),
1115 try c.addToken(.r_paren, ")"),
1116 } },
1117 });
1118 },
1119 .type => {
1120 const payload = node.castTag(.type).?.data;
1121 return c.addNode(.{
1122 .tag = .identifier,
1123 .main_token = try c.addToken(.identifier, payload),
1124 .data = undefined,
1125 });
1126 },
1127 .identifier => {
1128 const payload = node.castTag(.identifier).?.data;
1129 return c.addNode(.{
1130 .tag = .identifier,
1131 .main_token = try c.addIdentifier(payload),
1132 .data = undefined,
1133 });
1134 },
1135 .float_literal => {
1136 const payload = node.castTag(.float_literal).?.data;
1137 return c.addNode(.{
1138 .tag = .number_literal,
1139 .main_token = try c.addToken(.number_literal, payload),
1140 .data = undefined,
1141 });
1142 },
1143 .integer_literal => {
1144 const payload = node.castTag(.integer_literal).?.data;
1145 return c.addNode(.{
1146 .tag = .number_literal,
1147 .main_token = try c.addToken(.number_literal, payload),
1148 .data = undefined,
1149 });
1150 },
1151 .string_literal => {
1152 const payload = node.castTag(.string_literal).?.data;
1153 return c.addNode(.{
1154 .tag = .string_literal,
1155 .main_token = try c.addToken(.string_literal, payload),
1156 .data = undefined,
1157 });
1158 },
1159 .char_literal => {
1160 const payload = node.castTag(.char_literal).?.data;
1161 return c.addNode(.{
1162 .tag = .char_literal,
1163 .main_token = try c.addToken(.char_literal, payload),
1164 .data = undefined,
1165 });
1166 },
1167 .enum_literal => {
1168 const payload = node.castTag(.enum_literal).?.data;
1169 _ = try c.addToken(.period, ".");
1170 return c.addNode(.{
1171 .tag = .enum_literal,
1172 .main_token = try c.addToken(.identifier, payload),
1173 .data = undefined,
1174 });
1175 },
1176 .string_slice => {
1177 const payload = node.castTag(.string_slice).?.data;
1178
1179 const string = try renderNode(c, payload.string);
1180 const l_bracket = try c.addToken(.l_bracket, "[");
1181 const start = try c.addNode(.{
1182 .tag = .number_literal,
1183 .main_token = try c.addToken(.number_literal, "0"),
1184 .data = undefined,
1185 });
1186 _ = try c.addToken(.ellipsis2, "..");
1187 const end = try c.addNode(.{
1188 .tag = .number_literal,
1189 .main_token = try c.addTokenFmt(.number_literal, "{d}", .{payload.end}),
1190 .data = undefined,
1191 });
1192 _ = try c.addToken(.r_bracket, "]");
1193
1194 return c.addNode(.{
1195 .tag = .slice,
1196 .main_token = l_bracket,
1197 .data = .{ .node_and_extra = .{
1198 string, try c.addExtra(std.zig.Ast.Node.Slice{
1199 .start = start,
1200 .end = end,
1201 }),
1202 } },
1203 });
1204 },
1205 .fail_decl => {
1206 const payload = node.castTag(.fail_decl).?.data;
1207 // pub const name = @compileError(msg);
1208 _ = try c.addToken(.keyword_pub, "pub");
1209 const const_tok = try c.addToken(.keyword_const, "const");
1210 _ = try c.addIdentifier(payload.actual);
1211 _ = try c.addToken(.equal, "=");
1212
1213 const compile_error_tok = try c.addToken(.builtin, "@compileError");
1214 _ = try c.addToken(.l_paren, "(");
1215 const err_msg_tok = try c.addTokenFmt(.string_literal, "\"{f}\"", .{std.zig.fmtString(payload.mangled)});
1216 const err_msg = try c.addNode(.{
1217 .tag = .string_literal,
1218 .main_token = err_msg_tok,
1219 .data = undefined,
1220 });
1221 _ = try c.addToken(.r_paren, ")");
1222 const compile_error = try c.addNode(.{
1223 .tag = .builtin_call_two,
1224 .main_token = compile_error_tok,
1225 .data = .{ .opt_node_and_opt_node = .{
1226 err_msg.toOptional(), .none,
1227 } },
1228 });
1229 _ = try c.addToken(.semicolon, ";");
1230
1231 return c.addNode(.{
1232 .tag = .simple_var_decl,
1233 .main_token = const_tok,
1234 .data = .{
1235 .opt_node_and_opt_node = .{
1236 .none, // Type expression
1237 compile_error.toOptional(), // Init expression
1238 },
1239 },
1240 });
1241 },
1242 .pub_var_simple, .var_simple => {
1243 const payload = @as(*Payload.SimpleVarDecl, @alignCast(@fieldParentPtr("base", node.ptr_otherwise))).data;
1244 if (node.tag() == .pub_var_simple) _ = try c.addToken(.keyword_pub, "pub");
1245 const const_tok = try c.addToken(.keyword_const, "const");
1246 _ = try c.addIdentifier(payload.name);
1247 _ = try c.addToken(.equal, "=");
1248
1249 const init = try renderNode(c, payload.init);
1250 _ = try c.addToken(.semicolon, ";");
1251
1252 return c.addNode(.{
1253 .tag = .simple_var_decl,
1254 .main_token = const_tok,
1255 .data = .{
1256 .opt_node_and_opt_node = .{
1257 .none, // Type expression
1258 init.toOptional(), // Init expression
1259 },
1260 },
1261 });
1262 },
1263 .wrapped_local => {
1264 const payload = node.castTag(.wrapped_local).?.data;
1265
1266 const const_tok = try c.addToken(.keyword_const, "const");
1267 _ = try c.addIdentifier(payload.name);
1268 _ = try c.addToken(.equal, "=");
1269
1270 const kind_tok = try c.addToken(.keyword_struct, "struct");
1271 _ = try c.addToken(.l_brace, "{");
1272
1273 const container_def = try c.addNode(.{
1274 .tag = .container_decl_two_trailing,
1275 .main_token = kind_tok,
1276 .data = .{ .opt_node_and_opt_node = .{
1277 (try renderNode(c, payload.init)).toOptional(), .none,
1278 } },
1279 });
1280 _ = try c.addToken(.r_brace, "}");
1281 _ = try c.addToken(.semicolon, ";");
1282
1283 return c.addNode(.{
1284 .tag = .simple_var_decl,
1285 .main_token = const_tok,
1286 .data = .{
1287 .opt_node_and_opt_node = .{
1288 .none, // Type expression
1289 container_def.toOptional(), // Init expression
1290 },
1291 },
1292 });
1293 },
1294 .mut_str => {
1295 const payload = node.castTag(.mut_str).?.data;
1296
1297 const var_tok = try c.addToken(.keyword_var, "var");
1298 _ = try c.addIdentifier(payload.name);
1299 _ = try c.addToken(.equal, "=");
1300
1301 const deref = try c.addNode(.{
1302 .tag = .deref,
1303 .data = .{
1304 .node = try renderNodeGrouped(c, payload.init),
1305 },
1306 .main_token = try c.addToken(.period_asterisk, ".*"),
1307 });
1308 _ = try c.addToken(.semicolon, ";");
1309
1310 return c.addNode(.{
1311 .tag = .simple_var_decl,
1312 .main_token = var_tok,
1313 .data = .{
1314 .opt_node_and_opt_node = .{
1315 .none, // Type expression
1316 deref.toOptional(), // Init expression
1317 },
1318 },
1319 });
1320 },
1321 .var_decl => return renderVar(c, node),
1322 .arg_redecl, .alias => {
1323 const payload = @as(*Payload.ArgRedecl, @alignCast(@fieldParentPtr("base", node.ptr_otherwise))).data;
1324 if (node.tag() == .alias) _ = try c.addToken(.keyword_pub, "pub");
1325 const mut_tok = if (node.tag() == .alias)
1326 try c.addToken(.keyword_const, "const")
1327 else
1328 try c.addToken(.keyword_var, "var");
1329 _ = try c.addIdentifier(payload.actual);
1330 _ = try c.addToken(.equal, "=");
1331
1332 const init = try c.addNode(.{
1333 .tag = .identifier,
1334 .main_token = try c.addIdentifier(payload.mangled),
1335 .data = undefined,
1336 });
1337 _ = try c.addToken(.semicolon, ";");
1338
1339 return c.addNode(.{
1340 .tag = .simple_var_decl,
1341 .main_token = mut_tok,
1342 .data = .{
1343 .opt_node_and_opt_node = .{
1344 .none, // Type expression
1345 init.toOptional(), // Init expression
1346 },
1347 },
1348 });
1349 },
1350 .int_cast => {
1351 const payload = node.castTag(.int_cast).?.data;
1352 return renderBuiltinCall(c, "@intCast", &.{payload});
1353 },
1354 .const_cast => {
1355 const payload = node.castTag(.const_cast).?.data;
1356 return renderBuiltinCall(c, "@constCast", &.{payload});
1357 },
1358 .volatile_cast => {
1359 const payload = node.castTag(.volatile_cast).?.data;
1360 return renderBuiltinCall(c, "@volatileCast", &.{payload});
1361 },
1362 .div_trunc => {
1363 const payload = node.castTag(.div_trunc).?.data;
1364 return renderBuiltinCall(c, "@divTrunc", &.{ payload.lhs, payload.rhs });
1365 },
1366 .int_from_bool => {
1367 const payload = node.castTag(.int_from_bool).?.data;
1368 return renderBuiltinCall(c, "@intFromBool", &.{payload});
1369 },
1370 .as => {
1371 const payload = node.castTag(.as).?.data;
1372 return renderBuiltinCall(c, "@as", &.{ payload.lhs, payload.rhs });
1373 },
1374 .truncate => {
1375 const payload = node.castTag(.truncate).?.data;
1376 return renderBuiltinCall(c, "@truncate", &.{payload});
1377 },
1378 .bit_cast => {
1379 const payload = node.castTag(.bit_cast).?.data;
1380 return renderBuiltinCall(c, "@bitCast", &.{payload});
1381 },
1382 .float_cast => {
1383 const payload = node.castTag(.float_cast).?.data;
1384 return renderBuiltinCall(c, "@floatCast", &.{payload});
1385 },
1386 .int_from_float => {
1387 const payload = node.castTag(.int_from_float).?.data;
1388 return renderBuiltinCall(c, "@intFromFloat", &.{payload});
1389 },
1390 .float_from_int => {
1391 const payload = node.castTag(.float_from_int).?.data;
1392 return renderBuiltinCall(c, "@floatFromInt", &.{payload});
1393 },
1394 .ptr_from_int => {
1395 const payload = node.castTag(.ptr_from_int).?.data;
1396 return renderBuiltinCall(c, "@ptrFromInt", &.{payload});
1397 },
1398 .int_from_ptr => {
1399 const payload = node.castTag(.int_from_ptr).?.data;
1400 return renderBuiltinCall(c, "@intFromPtr", &.{payload});
1401 },
1402 .align_cast => {
1403 const payload = node.castTag(.align_cast).?.data;
1404 return renderBuiltinCall(c, "@alignCast", &.{payload});
1405 },
1406 .ptr_cast => {
1407 const payload = node.castTag(.ptr_cast).?.data;
1408 return renderBuiltinCall(c, "@ptrCast", &.{payload});
1409 },
1410 .div_exact => {
1411 const payload = node.castTag(.div_exact).?.data;
1412 return renderBuiltinCall(c, "@divExact", &.{ payload.lhs, payload.rhs });
1413 },
1414 .offset_of => {
1415 const payload = node.castTag(.offset_of).?.data;
1416 return renderBuiltinCall(c, "@offsetOf", &.{ payload.lhs, payload.rhs });
1417 },
1418 .sizeof => {
1419 const payload = node.castTag(.sizeof).?.data;
1420 return renderBuiltinCall(c, "@sizeOf", &.{payload});
1421 },
1422 .shuffle => {
1423 const payload = node.castTag(.shuffle).?.data;
1424 return renderBuiltinCall(c, "@shuffle", &.{
1425 payload.element_type,
1426 payload.a,
1427 payload.b,
1428 payload.mask_vector,
1429 });
1430 },
1431 .builtin_extern => {
1432 const payload = node.castTag(.builtin_extern).?.data;
1433
1434 var info_inits: [1]Payload.ContainerInitDot.Initializer = .{
1435 .{ .name = "name", .value = payload.name },
1436 };
1437 var info_payload: Payload.ContainerInitDot = .{
1438 .base = .{ .tag = .container_init_dot },
1439 .data = &info_inits,
1440 };
1441
1442 return renderBuiltinCall(c, "@extern", &.{
1443 payload.type,
1444 .{ .ptr_otherwise = &info_payload.base },
1445 });
1446 },
1447 .helper_call => {
1448 const payload = node.castTag(.helper_call).?.data;
1449 const helpers_tok = try c.addNode(.{
1450 .tag = .identifier,
1451 .main_token = try c.addIdentifier("__helpers"),
1452 .data = undefined,
1453 });
1454 const func = try renderFieldAccess(c, helpers_tok, payload.name);
1455 return renderCall(c, func, payload.args);
1456 },
1457 .helper_ref => {
1458 const payload = node.castTag(.helper_ref).?.data;
1459 const helpers_tok = try c.addNode(.{
1460 .tag = .identifier,
1461 .main_token = try c.addIdentifier("__helpers"),
1462 .data = undefined,
1463 });
1464 return renderFieldAccess(c, helpers_tok, payload);
1465 },
1466 .alignof => {
1467 const payload = node.castTag(.alignof).?.data;
1468 return renderBuiltinCall(c, "@alignOf", &.{payload});
1469 },
1470 .typeof => {
1471 const payload = node.castTag(.typeof).?.data;
1472 return renderBuiltinCall(c, "@TypeOf", &.{payload});
1473 },
1474 .typeinfo => {
1475 const payload = node.castTag(.typeinfo).?.data;
1476 return renderBuiltinCall(c, "@typeInfo", &.{payload});
1477 },
1478 .byte_swap => {
1479 const payload = node.castTag(.byte_swap).?.data;
1480 return renderBuiltinCall(c, "@byteSwap", &.{payload});
1481 },
1482 .ceil => {
1483 const payload = node.castTag(.ceil).?.data;
1484 return renderBuiltinCall(c, "@ceil", &.{payload});
1485 },
1486 .cos => {
1487 const payload = node.castTag(.cos).?.data;
1488 return renderBuiltinCall(c, "@cos", &.{payload});
1489 },
1490 .sin => {
1491 const payload = node.castTag(.sin).?.data;
1492 return renderBuiltinCall(c, "@sin", &.{payload});
1493 },
1494 .exp => {
1495 const payload = node.castTag(.exp).?.data;
1496 return renderBuiltinCall(c, "@exp", &.{payload});
1497 },
1498 .exp2 => {
1499 const payload = node.castTag(.exp2).?.data;
1500 return renderBuiltinCall(c, "@exp2", &.{payload});
1501 },
1502 .exp10 => {
1503 const payload = node.castTag(.exp10).?.data;
1504 return renderBuiltinCall(c, "@exp10", &.{payload});
1505 },
1506 .abs => {
1507 const payload = node.castTag(.abs).?.data;
1508 return renderBuiltinCall(c, "@abs", &.{payload});
1509 },
1510 .log => {
1511 const payload = node.castTag(.log).?.data;
1512 return renderBuiltinCall(c, "@log", &.{payload});
1513 },
1514 .log2 => {
1515 const payload = node.castTag(.log2).?.data;
1516 return renderBuiltinCall(c, "@log2", &.{payload});
1517 },
1518 .log10 => {
1519 const payload = node.castTag(.log10).?.data;
1520 return renderBuiltinCall(c, "@log10", &.{payload});
1521 },
1522 .round => {
1523 const payload = node.castTag(.round).?.data;
1524 return renderBuiltinCall(c, "@round", &.{payload});
1525 },
1526 .sqrt => {
1527 const payload = node.castTag(.sqrt).?.data;
1528 return renderBuiltinCall(c, "@sqrt", &.{payload});
1529 },
1530 .trunc => {
1531 const payload = node.castTag(.trunc).?.data;
1532 return renderBuiltinCall(c, "@trunc", &.{payload});
1533 },
1534 .floor => {
1535 const payload = node.castTag(.floor).?.data;
1536 return renderBuiltinCall(c, "@floor", &.{payload});
1537 },
1538 .negate => return renderPrefixOp(c, node, .negation, .minus, "-"),
1539 .negate_wrap => return renderPrefixOp(c, node, .negation_wrap, .minus_percent, "-%"),
1540 .bit_not => return renderPrefixOp(c, node, .bit_not, .tilde, "~"),
1541 .not => return renderPrefixOp(c, node, .bool_not, .bang, "!"),
1542 .optional_type => return renderPrefixOp(c, node, .optional_type, .question_mark, "?"),
1543 .address_of => {
1544 const payload = node.castTag(.address_of).?.data;
1545
1546 const ampersand = try c.addToken(.ampersand, "&");
1547 const base = try renderNodeGrouped(c, payload);
1548 return c.addNode(.{
1549 .tag = .address_of,
1550 .main_token = ampersand,
1551 .data = .{
1552 .node = base,
1553 },
1554 });
1555 },
1556 .deref => {
1557 const payload = node.castTag(.deref).?.data;
1558 const operand = try renderNodeGrouped(c, payload);
1559 const deref_tok = try c.addToken(.period_asterisk, ".*");
1560 return c.addNode(.{
1561 .tag = .deref,
1562 .main_token = deref_tok,
1563 .data = .{
1564 .node = operand,
1565 },
1566 });
1567 },
1568 .unwrap => {
1569 const payload = node.castTag(.unwrap).?.data;
1570 const operand = try renderNodeGrouped(c, payload);
1571 const period = try c.addToken(.period, ".");
1572 const question_mark = try c.addToken(.question_mark, "?");
1573 return c.addNode(.{
1574 .tag = .unwrap_optional,
1575 .main_token = period,
1576 .data = .{ .node_and_token = .{
1577 operand, question_mark,
1578 } },
1579 });
1580 },
1581 .c_pointer, .single_pointer => {
1582 const payload = @as(*Payload.Pointer, @alignCast(@fieldParentPtr("base", node.ptr_otherwise))).data;
1583
1584 const main_token = if (node.tag() == .single_pointer)
1585 try c.addToken(.asterisk, "*")
1586 else blk: {
1587 const res = try c.addToken(.l_bracket, "[");
1588 _ = try c.addToken(.asterisk, "*");
1589 _ = try c.addIdentifier("c");
1590 _ = try c.addToken(.r_bracket, "]");
1591 break :blk res;
1592 };
1593 if (payload.is_const) _ = try c.addToken(.keyword_const, "const");
1594 if (payload.is_volatile) _ = try c.addToken(.keyword_volatile, "volatile");
1595 if (payload.is_allowzero) _ = try c.addToken(.keyword_allowzero, "allowzero");
1596 const elem_type = try renderNodeGrouped(c, payload.elem_type);
1597
1598 return c.addNode(.{
1599 .tag = .ptr_type_aligned,
1600 .main_token = main_token,
1601 .data = .{
1602 .opt_node_and_node = .{
1603 .none, // Align node
1604 elem_type,
1605 },
1606 },
1607 });
1608 },
1609 .add => return renderBinOpGrouped(c, node, .add, .plus, "+"),
1610 .add_assign => return renderBinOp(c, node, .assign_add, .plus_equal, "+="),
1611 .add_wrap => return renderBinOpGrouped(c, node, .add_wrap, .plus_percent, "+%"),
1612 .add_wrap_assign => return renderBinOp(c, node, .assign_add_wrap, .plus_percent_equal, "+%="),
1613 .sub => return renderBinOpGrouped(c, node, .sub, .minus, "-"),
1614 .sub_assign => return renderBinOp(c, node, .assign_sub, .minus_equal, "-="),
1615 .sub_wrap => return renderBinOpGrouped(c, node, .sub_wrap, .minus_percent, "-%"),
1616 .sub_wrap_assign => return renderBinOp(c, node, .assign_sub_wrap, .minus_percent_equal, "-%="),
1617 .mul => return renderBinOpGrouped(c, node, .mul, .asterisk, "*"),
1618 .mul_assign => return renderBinOp(c, node, .assign_mul, .asterisk_equal, "*="),
1619 .mul_wrap => return renderBinOpGrouped(c, node, .mul_wrap, .asterisk_percent, "*%"),
1620 .mul_wrap_assign => return renderBinOp(c, node, .assign_mul_wrap, .asterisk_percent_equal, "*%="),
1621 .div => return renderBinOpGrouped(c, node, .div, .slash, "/"),
1622 .div_assign => return renderBinOp(c, node, .assign_div, .slash_equal, "/="),
1623 .shl => return renderBinOpGrouped(c, node, .shl, .angle_bracket_angle_bracket_left, "<<"),
1624 .shl_assign => return renderBinOp(c, node, .assign_shl, .angle_bracket_angle_bracket_left_equal, "<<="),
1625 .shr => return renderBinOpGrouped(c, node, .shr, .angle_bracket_angle_bracket_right, ">>"),
1626 .shr_assign => return renderBinOp(c, node, .assign_shr, .angle_bracket_angle_bracket_right_equal, ">>="),
1627 .mod => return renderBinOpGrouped(c, node, .mod, .percent, "%"),
1628 .mod_assign => return renderBinOp(c, node, .assign_mod, .percent_equal, "%="),
1629 .@"and" => return renderBinOpGrouped(c, node, .bool_and, .keyword_and, "and"),
1630 .@"or" => return renderBinOpGrouped(c, node, .bool_or, .keyword_or, "or"),
1631 .less_than => return renderBinOpGrouped(c, node, .less_than, .angle_bracket_left, "<"),
1632 .less_than_equal => return renderBinOpGrouped(c, node, .less_or_equal, .angle_bracket_left_equal, "<="),
1633 .greater_than => return renderBinOpGrouped(c, node, .greater_than, .angle_bracket_right, ">="),
1634 .greater_than_equal => return renderBinOpGrouped(c, node, .greater_or_equal, .angle_bracket_right_equal, ">="),
1635 .equal => return renderBinOpGrouped(c, node, .equal_equal, .equal_equal, "=="),
1636 .not_equal => return renderBinOpGrouped(c, node, .bang_equal, .bang_equal, "!="),
1637 .bit_and => return renderBinOpGrouped(c, node, .bit_and, .ampersand, "&"),
1638 .bit_and_assign => return renderBinOp(c, node, .assign_bit_and, .ampersand_equal, "&="),
1639 .bit_or => return renderBinOpGrouped(c, node, .bit_or, .pipe, "|"),
1640 .bit_or_assign => return renderBinOp(c, node, .assign_bit_or, .pipe_equal, "|="),
1641 .bit_xor => return renderBinOpGrouped(c, node, .bit_xor, .caret, "^"),
1642 .bit_xor_assign => return renderBinOp(c, node, .assign_bit_xor, .caret_equal, "^="),
1643 .array_cat => return renderBinOp(c, node, .array_cat, .plus_plus, "++"),
1644 .ellipsis3 => return renderBinOpGrouped(c, node, .switch_range, .ellipsis3, "..."),
1645 .assign => return renderBinOp(c, node, .assign, .equal, "="),
1646 .empty_block => {
1647 const l_brace = try c.addToken(.l_brace, "{");
1648 _ = try c.addToken(.r_brace, "}");
1649 return c.addNode(.{
1650 .tag = .block_two,
1651 .main_token = l_brace,
1652 .data = .{ .opt_node_and_opt_node = .{
1653 .none, .none,
1654 } },
1655 });
1656 },
1657 .block_single => {
1658 const payload = node.castTag(.block_single).?.data;
1659 const l_brace = try c.addToken(.l_brace, "{");
1660
1661 const stmt = (try renderNodeOpt(c, payload)) orelse {
1662 _ = try c.addToken(.r_brace, "}");
1663 return c.addNode(.{
1664 .tag = .block_two,
1665 .main_token = l_brace,
1666 .data = .{ .opt_node_and_opt_node = .{
1667 .none, .none,
1668 } },
1669 });
1670 };
1671 try addSemicolonIfNeeded(c, payload);
1672
1673 _ = try c.addToken(.r_brace, "}");
1674 return c.addNode(.{
1675 .tag = .block_two_semicolon,
1676 .main_token = l_brace,
1677 .data = .{ .opt_node_and_opt_node = .{
1678 stmt.toOptional(), .none,
1679 } },
1680 });
1681 },
1682 .block => {
1683 const payload = node.castTag(.block).?.data;
1684 if (payload.label) |some| {
1685 _ = try c.addIdentifier(some);
1686 _ = try c.addToken(.colon, ":");
1687 }
1688 const l_brace = try c.addToken(.l_brace, "{");
1689
1690 var stmts = std.array_list.Managed(NodeIndex).init(c.gpa);
1691 defer stmts.deinit();
1692 for (payload.stmts) |stmt| {
1693 const res = (try renderNodeOpt(c, stmt)) orelse continue;
1694 try addSemicolonIfNeeded(c, stmt);
1695 try stmts.append(res);
1696 }
1697 const span = try c.listToSpan(stmts.items);
1698 _ = try c.addToken(.r_brace, "}");
1699
1700 const semicolon = c.tokens.items(.tag)[c.tokens.len - 2] == .semicolon;
1701 return c.addNode(.{
1702 .tag = if (semicolon) .block_semicolon else .block,
1703 .main_token = l_brace,
1704 .data = .{ .extra_range = span },
1705 });
1706 },
1707 .func => return renderFunc(c, node),
1708 .pub_inline_fn => return renderMacroFunc(c, node),
1709 .@"while" => {
1710 const payload = node.castTag(.@"while").?.data;
1711 const while_tok = try c.addToken(.keyword_while, "while");
1712 _ = try c.addToken(.l_paren, "(");
1713 const cond = try renderNode(c, payload.cond);
1714 _ = try c.addToken(.r_paren, ")");
1715
1716 const cont_expr_opt = if (payload.cont_expr) |some| blk: {
1717 _ = try c.addToken(.colon, ":");
1718 _ = try c.addToken(.l_paren, "(");
1719 const res = try renderNode(c, some);
1720 _ = try c.addToken(.r_paren, ")");
1721 break :blk res;
1722 } else null;
1723 const body = try renderNode(c, payload.body);
1724
1725 if (cont_expr_opt) |cont_expr| {
1726 return c.addNode(.{
1727 .tag = .while_cont,
1728 .main_token = while_tok,
1729 .data = .{ .node_and_extra = .{
1730 cond,
1731 try c.addExtra(std.zig.Ast.Node.WhileCont{
1732 .cont_expr = cont_expr,
1733 .then_expr = body,
1734 }),
1735 } },
1736 });
1737 } else {
1738 return c.addNode(.{
1739 .tag = .while_simple,
1740 .main_token = while_tok,
1741 .data = .{ .node_and_node = .{
1742 cond, body,
1743 } },
1744 });
1745 }
1746 },
1747 .while_true => {
1748 const payload = node.castTag(.while_true).?.data;
1749 const while_tok = try c.addToken(.keyword_while, "while");
1750 _ = try c.addToken(.l_paren, "(");
1751 const cond = try c.addNode(.{
1752 .tag = .identifier,
1753 .main_token = try c.addToken(.identifier, "true"),
1754 .data = undefined,
1755 });
1756 _ = try c.addToken(.r_paren, ")");
1757 const body = try renderNode(c, payload);
1758
1759 return c.addNode(.{
1760 .tag = .while_simple,
1761 .main_token = while_tok,
1762 .data = .{ .node_and_node = .{
1763 cond, body,
1764 } },
1765 });
1766 },
1767 .@"if" => {
1768 const payload = node.castTag(.@"if").?.data;
1769 const if_tok = try c.addToken(.keyword_if, "if");
1770 _ = try c.addToken(.l_paren, "(");
1771 const cond = try renderNode(c, payload.cond);
1772 _ = try c.addToken(.r_paren, ")");
1773
1774 const then_expr = try renderNode(c, payload.then);
1775 const else_node = payload.@"else" orelse return c.addNode(.{
1776 .tag = .if_simple,
1777 .main_token = if_tok,
1778 .data = .{ .node_and_node = .{
1779 cond, then_expr,
1780 } },
1781 });
1782 _ = try c.addToken(.keyword_else, "else");
1783 const else_expr = try renderNode(c, else_node);
1784
1785 return c.addNode(.{
1786 .tag = .@"if",
1787 .main_token = if_tok,
1788 .data = .{ .node_and_extra = .{
1789 cond,
1790 try c.addExtra(std.zig.Ast.Node.If{
1791 .then_expr = then_expr,
1792 .else_expr = else_expr,
1793 }),
1794 } },
1795 });
1796 },
1797 .if_not_break => {
1798 const payload = node.castTag(.if_not_break).?.data;
1799 const if_tok = try c.addToken(.keyword_if, "if");
1800 _ = try c.addToken(.l_paren, "(");
1801 const cond = try c.addNode(.{
1802 .tag = .bool_not,
1803 .main_token = try c.addToken(.bang, "!"),
1804 .data = .{
1805 .node = try renderNodeGrouped(c, payload),
1806 },
1807 });
1808 _ = try c.addToken(.r_paren, ")");
1809 const then_expr = try c.addNode(.{
1810 .tag = .@"break",
1811 .main_token = try c.addToken(.keyword_break, "break"),
1812 .data = .{ .opt_token_and_opt_node = .{
1813 .none, .none,
1814 } },
1815 });
1816
1817 return c.addNode(.{
1818 .tag = .if_simple,
1819 .main_token = if_tok,
1820 .data = .{ .node_and_node = .{
1821 cond, then_expr,
1822 } },
1823 });
1824 },
1825 .@"switch" => {
1826 const payload = node.castTag(.@"switch").?.data;
1827 const switch_tok = try c.addToken(.keyword_switch, "switch");
1828 _ = try c.addToken(.l_paren, "(");
1829 const cond = try renderNode(c, payload.cond);
1830 _ = try c.addToken(.r_paren, ")");
1831
1832 _ = try c.addToken(.l_brace, "{");
1833 var cases = try c.gpa.alloc(NodeIndex, payload.cases.len);
1834 defer c.gpa.free(cases);
1835 for (payload.cases, 0..) |case, i| {
1836 cases[i] = try renderNode(c, case);
1837 _ = try c.addToken(.comma, ",");
1838 }
1839 const span = try c.listToSpan(cases);
1840 _ = try c.addToken(.r_brace, "}");
1841 return c.addNode(.{
1842 .tag = .switch_comma,
1843 .main_token = switch_tok,
1844 .data = .{ .node_and_extra = .{
1845 cond,
1846 try c.addExtra(NodeSubRange{
1847 .start = span.start,
1848 .end = span.end,
1849 }),
1850 } },
1851 });
1852 },
1853 .switch_else => {
1854 const payload = node.castTag(.switch_else).?.data;
1855 _ = try c.addToken(.keyword_else, "else");
1856 return c.addNode(.{
1857 .tag = .switch_case_one,
1858 .main_token = try c.addToken(.equal_angle_bracket_right, "=>"),
1859 .data = .{ .opt_node_and_node = .{
1860 .none, try renderNode(c, payload),
1861 } },
1862 });
1863 },
1864 .switch_prong => {
1865 const payload = node.castTag(.switch_prong).?.data;
1866 var items = try c.gpa.alloc(NodeIndex, payload.cases.len);
1867 defer c.gpa.free(items);
1868
1869 for (payload.cases, 0..) |item, i| {
1870 if (i != 0) _ = try c.addToken(.comma, ",");
1871 items[i] = try renderNode(c, item);
1872 }
1873 _ = try c.addToken(.r_brace, "}");
1874 if (items.len < 2) {
1875 return c.addNode(.{
1876 .tag = .switch_case_one,
1877 .main_token = try c.addToken(.equal_angle_bracket_right, "=>"),
1878 .data = .{ .opt_node_and_node = .{
1879 if (payload.cases.len == 1) items[0].toOptional() else .none,
1880 try renderNode(c, payload.cond),
1881 } },
1882 });
1883 } else {
1884 return c.addNode(.{
1885 .tag = .switch_case,
1886 .main_token = try c.addToken(.equal_angle_bracket_right, "=>"),
1887 .data = .{ .extra_and_node = .{
1888 try c.addExtra(try c.listToSpan(items)),
1889 try renderNode(c, payload.cond),
1890 } },
1891 });
1892 }
1893 },
1894 .opaque_literal => {
1895 const opaque_tok = try c.addToken(.keyword_opaque, "opaque");
1896 _ = try c.addToken(.l_brace, "{");
1897 _ = try c.addToken(.r_brace, "}");
1898
1899 return c.addNode(.{
1900 .tag = .container_decl_two,
1901 .main_token = opaque_tok,
1902 .data = .{ .opt_node_and_opt_node = .{
1903 .none, .none,
1904 } },
1905 });
1906 },
1907 .array_access => {
1908 const payload = node.castTag(.array_access).?.data;
1909 const lhs = try renderNodeGrouped(c, payload.lhs);
1910 const l_bracket = try c.addToken(.l_bracket, "[");
1911 const index_expr = try renderNode(c, payload.rhs);
1912 _ = try c.addToken(.r_bracket, "]");
1913 return c.addNode(.{
1914 .tag = .array_access,
1915 .main_token = l_bracket,
1916 .data = .{ .node_and_node = .{
1917 lhs, index_expr,
1918 } },
1919 });
1920 },
1921 .array_type => {
1922 const payload = node.castTag(.array_type).?.data;
1923 return renderArrayType(c, payload.len, payload.elem_type);
1924 },
1925 .null_sentinel_array_type => {
1926 const payload = node.castTag(.null_sentinel_array_type).?.data;
1927 return renderNullSentinelArrayType(c, payload.len, payload.elem_type);
1928 },
1929 .array_filler => {
1930 const payload = node.castTag(.array_filler).?.data;
1931
1932 const type_expr = try renderArrayType(c, 1, payload.type);
1933 const l_brace = try c.addToken(.l_brace, "{");
1934 const val = try renderNode(c, payload.filler);
1935 _ = try c.addToken(.r_brace, "}");
1936
1937 const init = try c.addNode(.{
1938 .tag = .array_init_one,
1939 .main_token = l_brace,
1940 .data = .{ .node_and_node = .{
1941 type_expr, val,
1942 } },
1943 });
1944 return c.addNode(.{
1945 .tag = .array_cat,
1946 .main_token = try c.addToken(.asterisk_asterisk, "**"),
1947 .data = .{ .node_and_node = .{
1948 init,
1949 try c.addNode(.{
1950 .tag = .number_literal,
1951 .main_token = try c.addTokenFmt(.number_literal, "{d}", .{payload.count}),
1952 .data = undefined,
1953 }),
1954 } },
1955 });
1956 },
1957 .empty_array => {
1958 const payload = node.castTag(.empty_array).?.data;
1959
1960 const type_expr = try renderNode(c, payload);
1961 return renderArrayInit(c, type_expr, &.{});
1962 },
1963 .array_init => {
1964 const payload = node.castTag(.array_init).?.data;
1965 const type_expr = try renderNode(c, payload.cond);
1966 return renderArrayInit(c, type_expr, payload.cases);
1967 },
1968 .vector_zero_init => {
1969 const payload = node.castTag(.vector_zero_init).?.data;
1970 return renderBuiltinCall(c, "@splat", &.{payload});
1971 },
1972 .field_access => {
1973 const payload = node.castTag(.field_access).?.data;
1974 const lhs = try renderNodeGrouped(c, payload.lhs);
1975 return renderFieldAccess(c, lhs, payload.field_name);
1976 },
1977 .@"struct", .@"union", .@"opaque" => return renderContainer(c, node),
1978 .enum_constant => {
1979 const payload = node.castTag(.enum_constant).?.data;
1980
1981 if (payload.is_public) _ = try c.addToken(.keyword_pub, "pub");
1982 const const_tok = try c.addToken(.keyword_const, "const");
1983 _ = try c.addIdentifier(payload.name);
1984
1985 const type_node_opt = if (payload.type) |enum_const_type| blk: {
1986 _ = try c.addToken(.colon, ":");
1987 break :blk try renderNode(c, enum_const_type);
1988 } else null;
1989
1990 _ = try c.addToken(.equal, "=");
1991
1992 const init_node = try renderNode(c, payload.value);
1993 _ = try c.addToken(.semicolon, ";");
1994
1995 return c.addNode(.{
1996 .tag = .simple_var_decl,
1997 .main_token = const_tok,
1998 .data = .{ .opt_node_and_opt_node = .{
1999 .fromOptional(type_node_opt),
2000 init_node.toOptional(),
2001 } },
2002 });
2003 },
2004 .tuple => {
2005 const payload = node.castTag(.tuple).?.data;
2006 _ = try c.addToken(.period, ".");
2007 const l_brace = try c.addToken(.l_brace, "{");
2008 var inits = try c.gpa.alloc(NodeIndex, payload.len);
2009 defer c.gpa.free(inits);
2010
2011 for (payload, 0..) |init, i| {
2012 if (i != 0) _ = try c.addToken(.comma, ",");
2013 inits[i] = try renderNode(c, init);
2014 }
2015 _ = try c.addToken(.r_brace, "}");
2016 if (payload.len < 3) {
2017 return c.addNode(.{
2018 .tag = .array_init_dot_two,
2019 .main_token = l_brace,
2020 .data = .{ .opt_node_and_opt_node = .{
2021 if (inits.len >= 1) inits[0].toOptional() else .none,
2022 if (inits.len >= 2) inits[1].toOptional() else .none,
2023 } },
2024 });
2025 } else {
2026 return c.addNode(.{
2027 .tag = .array_init_dot,
2028 .main_token = l_brace,
2029 .data = .{ .extra_range = try c.listToSpan(inits) },
2030 });
2031 }
2032 },
2033 .container_init_dot => {
2034 const payload = node.castTag(.container_init_dot).?.data;
2035 _ = try c.addToken(.period, ".");
2036 const l_brace = try c.addToken(.l_brace, "{");
2037 var inits = try c.gpa.alloc(NodeIndex, payload.len);
2038 defer c.gpa.free(inits);
2039
2040 for (payload, 0..) |init, i| {
2041 _ = try c.addToken(.period, ".");
2042 _ = try c.addIdentifier(init.name);
2043 _ = try c.addToken(.equal, "=");
2044 inits[i] = try renderNode(c, init.value);
2045 _ = try c.addToken(.comma, ",");
2046 }
2047 _ = try c.addToken(.r_brace, "}");
2048
2049 if (payload.len < 3) {
2050 return c.addNode(.{
2051 .tag = .struct_init_dot_two_comma,
2052 .main_token = l_brace,
2053 .data = .{ .opt_node_and_opt_node = .{
2054 if (inits.len >= 1) inits[0].toOptional() else .none,
2055 if (inits.len >= 2) inits[1].toOptional() else .none,
2056 } },
2057 });
2058 } else {
2059 return c.addNode(.{
2060 .tag = .struct_init_dot_comma,
2061 .main_token = l_brace,
2062 .data = .{ .extra_range = try c.listToSpan(inits) },
2063 });
2064 }
2065 },
2066 .container_init => {
2067 const payload = node.castTag(.container_init).?.data;
2068 const lhs = try renderNode(c, payload.lhs);
2069
2070 const l_brace = try c.addToken(.l_brace, "{");
2071 var inits = try c.gpa.alloc(NodeIndex, payload.inits.len);
2072 defer c.gpa.free(inits);
2073
2074 for (payload.inits, 0..) |init, i| {
2075 _ = try c.addToken(.period, ".");
2076 _ = try c.addIdentifier(init.name);
2077 _ = try c.addToken(.equal, "=");
2078 inits[i] = try renderNode(c, init.value);
2079 _ = try c.addToken(.comma, ",");
2080 }
2081 _ = try c.addToken(.r_brace, "}");
2082
2083 switch (inits.len) {
2084 0 => return c.addNode(.{
2085 .tag = .struct_init_one,
2086 .main_token = l_brace,
2087 .data = .{ .node_and_opt_node = .{
2088 lhs, .none,
2089 } },
2090 }),
2091 1 => return c.addNode(.{
2092 .tag = .struct_init_one_comma,
2093 .main_token = l_brace,
2094 .data = .{ .node_and_opt_node = .{
2095 lhs, inits[0].toOptional(),
2096 } },
2097 }),
2098 else => return c.addNode(.{
2099 .tag = .struct_init_comma,
2100 .main_token = l_brace,
2101 .data = .{ .node_and_extra = .{
2102 lhs,
2103 try c.addExtra(try c.listToSpan(inits)),
2104 } },
2105 }),
2106 }
2107 },
2108 .static_assert => {
2109 const payload = node.castTag(.static_assert).?.data;
2110 const comptime_tok = try c.addToken(.keyword_comptime, "comptime");
2111 const l_brace = try c.addToken(.l_brace, "{");
2112
2113 const if_tok = try c.addToken(.keyword_if, "if");
2114 _ = try c.addToken(.l_paren, "(");
2115 const cond = try c.addNode(.{
2116 .tag = .bool_not,
2117 .main_token = try c.addToken(.bang, "!"),
2118 .data = .{
2119 .node = try renderNodeGrouped(c, payload.lhs),
2120 },
2121 });
2122 _ = try c.addToken(.r_paren, ")");
2123
2124 const compile_error_tok = try c.addToken(.builtin, "@compileError");
2125 _ = try c.addToken(.l_paren, "(");
2126 const err_msg = try renderNode(c, payload.rhs);
2127 _ = try c.addToken(.r_paren, ")");
2128 const compile_error = try c.addNode(.{
2129 .tag = .builtin_call_two,
2130 .main_token = compile_error_tok,
2131 .data = .{ .opt_node_and_opt_node = .{
2132 err_msg.toOptional(), .none,
2133 } },
2134 });
2135
2136 const if_node = try c.addNode(.{
2137 .tag = .if_simple,
2138 .main_token = if_tok,
2139 .data = .{ .node_and_node = .{
2140 cond, compile_error,
2141 } },
2142 });
2143 _ = try c.addToken(.semicolon, ";");
2144 _ = try c.addToken(.r_brace, "}");
2145 const block_node = try c.addNode(.{
2146 .tag = .block_two_semicolon,
2147 .main_token = l_brace,
2148 .data = .{ .opt_node_and_opt_node = .{
2149 if_node.toOptional(), .none,
2150 } },
2151 });
2152
2153 return c.addNode(.{
2154 .tag = .@"comptime",
2155 .main_token = comptime_tok,
2156 .data = .{
2157 .node = block_node,
2158 },
2159 });
2160 },
2161 .@"anytype" => unreachable, // Handled in renderParams
2162 }
2163}
2164
2165fn renderContainer(c: *Context, node: Node) !NodeIndex {
2166 const payload = @as(*Payload.Container, @alignCast(@fieldParentPtr("base", node.ptr_otherwise))).data;
2167 if (payload.layout == .@"packed")
2168 _ = try c.addToken(.keyword_packed, "packed")
2169 else if (payload.layout == .@"extern")
2170 _ = try c.addToken(.keyword_extern, "extern");
2171 const kind_tok = if (node.tag() == .@"struct")
2172 try c.addToken(.keyword_struct, "struct")
2173 else if (node.tag() == .@"union")
2174 try c.addToken(.keyword_union, "union")
2175 else if (node.tag() == .@"opaque")
2176 try c.addToken(.keyword_opaque, "opaque")
2177 else
2178 unreachable;
2179
2180 _ = try c.addToken(.l_brace, "{");
2181
2182 const num_decls = payload.decls.len;
2183 const total_members = payload.fields.len + num_decls;
2184 const members = try c.gpa.alloc(NodeIndex, total_members);
2185 defer c.gpa.free(members);
2186
2187 for (payload.fields, 0..) |field, i| {
2188 const name_tok = try c.addTokenFmt(.identifier, "{f}", .{std.zig.fmtIdFlags(field.name, .{ .allow_primitive = true })});
2189 _ = try c.addToken(.colon, ":");
2190 const type_expr = try renderNode(c, field.type);
2191
2192 const align_expr_opt = if (field.alignment) |alignment| blk: {
2193 _ = try c.addToken(.keyword_align, "align");
2194 _ = try c.addToken(.l_paren, "(");
2195 const align_expr = try c.addNode(.{
2196 .tag = .number_literal,
2197 .main_token = try c.addTokenFmt(.number_literal, "{d}", .{alignment}),
2198 .data = undefined,
2199 });
2200 _ = try c.addToken(.r_paren, ")");
2201 break :blk align_expr;
2202 } else null;
2203
2204 const value_expr_opt = if (field.default_value) |value| blk: {
2205 _ = try c.addToken(.equal, "=");
2206 break :blk try renderNode(c, value);
2207 } else null;
2208
2209 if (align_expr_opt) |align_expr| {
2210 if (value_expr_opt) |value_expr| {
2211 members[i] = try c.addNode(.{
2212 .tag = .container_field,
2213 .main_token = name_tok,
2214 .data = .{ .node_and_extra = .{
2215 type_expr,
2216 try c.addExtra(std.zig.Ast.Node.ContainerField{
2217 .align_expr = align_expr,
2218 .value_expr = value_expr,
2219 }),
2220 } },
2221 });
2222 } else {
2223 members[i] = try c.addNode(.{
2224 .tag = .container_field_align,
2225 .main_token = name_tok,
2226 .data = .{ .node_and_node = .{
2227 type_expr,
2228 align_expr,
2229 } },
2230 });
2231 }
2232 } else {
2233 members[i] = try c.addNode(.{
2234 .tag = .container_field_init,
2235 .main_token = name_tok,
2236 .data = .{ .node_and_opt_node = .{
2237 type_expr,
2238 .fromOptional(value_expr_opt),
2239 } },
2240 });
2241 }
2242 _ = try c.addToken(.comma, ",");
2243 }
2244 for (members[payload.fields.len..], payload.decls) |*member, decl| {
2245 member.* = try renderNode(c, decl);
2246 }
2247 const trailing = switch (c.tokens.items(.tag)[c.tokens.len - 1]) {
2248 .comma, .semicolon => true,
2249 else => false,
2250 };
2251 _ = try c.addToken(.r_brace, "}");
2252
2253 if (total_members == 0) {
2254 return c.addNode(.{
2255 .tag = .container_decl_two,
2256 .main_token = kind_tok,
2257 .data = .{ .opt_node_and_opt_node = .{
2258 .none, .none,
2259 } },
2260 });
2261 } else if (total_members <= 2) {
2262 return c.addNode(.{
2263 .tag = if (trailing) .container_decl_two_trailing else .container_decl_two,
2264 .main_token = kind_tok,
2265 .data = .{ .opt_node_and_opt_node = .{
2266 if (members.len >= 1) members[0].toOptional() else .none,
2267 if (members.len >= 2) members[1].toOptional() else .none,
2268 } },
2269 });
2270 } else {
2271 const span = try c.listToSpan(members);
2272 return c.addNode(.{
2273 .tag = if (trailing) .container_decl_trailing else .container_decl,
2274 .main_token = kind_tok,
2275 .data = .{ .extra_range = span },
2276 });
2277 }
2278}
2279
2280fn renderFieldAccess(c: *Context, lhs: NodeIndex, field_name: []const u8) !NodeIndex {
2281 return c.addNode(.{
2282 .tag = .field_access,
2283 .main_token = try c.addToken(.period, "."),
2284 .data = .{ .node_and_token = .{
2285 lhs, try c.addTokenFmt(.identifier, "{f}", .{std.zig.fmtIdFlags(field_name, .{ .allow_primitive = true })}),
2286 } },
2287 });
2288}
2289
2290fn renderArrayInit(c: *Context, lhs: NodeIndex, inits: []const Node) !NodeIndex {
2291 const l_brace = try c.addToken(.l_brace, "{");
2292 var rendered = try c.gpa.alloc(NodeIndex, inits.len);
2293 defer c.gpa.free(rendered);
2294
2295 for (inits, 0..) |init, i| {
2296 rendered[i] = try renderNode(c, init);
2297 _ = try c.addToken(.comma, ",");
2298 }
2299 _ = try c.addToken(.r_brace, "}");
2300 switch (inits.len) {
2301 0 => return c.addNode(.{
2302 .tag = .struct_init_one,
2303 .main_token = l_brace,
2304 .data = .{ .node_and_opt_node = .{
2305 lhs, .none,
2306 } },
2307 }),
2308 1 => return c.addNode(.{
2309 .tag = .array_init_one_comma,
2310 .main_token = l_brace,
2311 .data = .{ .node_and_node = .{
2312 lhs, rendered[0],
2313 } },
2314 }),
2315 else => return c.addNode(.{
2316 .tag = .array_init_comma,
2317 .main_token = l_brace,
2318 .data = .{ .node_and_extra = .{
2319 lhs,
2320 try c.addExtra(try c.listToSpan(rendered)),
2321 } },
2322 }),
2323 }
2324}
2325
2326fn renderArrayType(c: *Context, len: u64, elem_type: Node) !NodeIndex {
2327 const l_bracket = try c.addToken(.l_bracket, "[");
2328 const len_expr = try c.addNode(.{
2329 .tag = .number_literal,
2330 .main_token = try c.addTokenFmt(.number_literal, "{d}", .{len}),
2331 .data = undefined,
2332 });
2333 _ = try c.addToken(.r_bracket, "]");
2334 const elem_type_expr = try renderNode(c, elem_type);
2335 return c.addNode(.{
2336 .tag = .array_type,
2337 .main_token = l_bracket,
2338 .data = .{ .node_and_node = .{
2339 len_expr, elem_type_expr,
2340 } },
2341 });
2342}
2343
2344fn renderNullSentinelArrayType(c: *Context, len: u64, elem_type: Node) !NodeIndex {
2345 const l_bracket = try c.addToken(.l_bracket, "[");
2346 const len_expr = try c.addNode(.{
2347 .tag = .number_literal,
2348 .main_token = try c.addTokenFmt(.number_literal, "{d}", .{len}),
2349 .data = undefined,
2350 });
2351 _ = try c.addToken(.colon, ":");
2352
2353 const sentinel_expr = try c.addNode(.{
2354 .tag = .number_literal,
2355 .main_token = try c.addToken(.number_literal, "0"),
2356 .data = undefined,
2357 });
2358
2359 _ = try c.addToken(.r_bracket, "]");
2360 const elem_type_expr = try renderNode(c, elem_type);
2361 return c.addNode(.{
2362 .tag = .array_type_sentinel,
2363 .main_token = l_bracket,
2364 .data = .{ .node_and_extra = .{
2365 len_expr,
2366 try c.addExtra(std.zig.Ast.Node.ArrayTypeSentinel{
2367 .sentinel = sentinel_expr,
2368 .elem_type = elem_type_expr,
2369 }),
2370 } },
2371 });
2372}
2373
2374fn addSemicolonIfNeeded(c: *Context, node: Node) !void {
2375 switch (node.tag()) {
2376 .warning => unreachable,
2377 .var_decl, .var_simple, .arg_redecl, .alias, .block, .empty_block, .block_single, .@"switch", .wrapped_local, .mut_str => {},
2378 .while_true => {
2379 const payload = node.castTag(.while_true).?.data;
2380 return addSemicolonIfNotBlock(c, payload);
2381 },
2382 .@"while" => {
2383 const payload = node.castTag(.@"while").?.data;
2384 return addSemicolonIfNotBlock(c, payload.body);
2385 },
2386 .@"if" => {
2387 const payload = node.castTag(.@"if").?.data;
2388 if (payload.@"else") |some|
2389 return addSemicolonIfNeeded(c, some);
2390 return addSemicolonIfNotBlock(c, payload.then);
2391 },
2392 else => _ = try c.addToken(.semicolon, ";"),
2393 }
2394}
2395
2396fn addSemicolonIfNotBlock(c: *Context, node: Node) !void {
2397 switch (node.tag()) {
2398 .block, .empty_block, .block_single => {},
2399 else => _ = try c.addToken(.semicolon, ";"),
2400 }
2401}
2402
2403fn renderNodeGrouped(c: *Context, node: Node) !NodeIndex {
2404 switch (node.tag()) {
2405 .declaration => unreachable,
2406 .null_literal,
2407 .undefined_literal,
2408 .true_literal,
2409 .false_literal,
2410 .return_void,
2411 .zero_literal,
2412 .one_literal,
2413 .void_type,
2414 .noreturn_type,
2415 .@"anytype",
2416 .div_trunc,
2417 .int_cast,
2418 .const_cast,
2419 .volatile_cast,
2420 .as,
2421 .truncate,
2422 .bit_cast,
2423 .float_cast,
2424 .int_from_float,
2425 .float_from_int,
2426 .ptr_from_int,
2427 .std_mem_zeroes,
2428 .int_from_ptr,
2429 .sizeof,
2430 .alignof,
2431 .typeof,
2432 .typeinfo,
2433 .vector,
2434 .std_mem_zeroinit,
2435 .integer_literal,
2436 .float_literal,
2437 .string_literal,
2438 .string_slice,
2439 .char_literal,
2440 .enum_literal,
2441 .identifier,
2442 .field_access,
2443 .ptr_cast,
2444 .type,
2445 .array_access,
2446 .align_cast,
2447 .optional_type,
2448 .c_pointer,
2449 .single_pointer,
2450 .unwrap,
2451 .deref,
2452 .not,
2453 .negate,
2454 .negate_wrap,
2455 .bit_not,
2456 .func,
2457 .call,
2458 .array_type,
2459 .null_sentinel_array_type,
2460 .int_from_bool,
2461 .div_exact,
2462 .offset_of,
2463 .shuffle,
2464 .builtin_extern,
2465 .wrapped_local,
2466 .mut_str,
2467 .helper_call,
2468 .helper_ref,
2469 .byte_swap,
2470 .ceil,
2471 .cos,
2472 .sin,
2473 .exp,
2474 .exp2,
2475 .exp10,
2476 .abs,
2477 .log,
2478 .log2,
2479 .log10,
2480 .round,
2481 .sqrt,
2482 .trunc,
2483 .floor,
2484 => {
2485 // no grouping needed
2486 return renderNode(c, node);
2487 },
2488
2489 .opaque_literal,
2490 .@"opaque",
2491 .empty_array,
2492 .block_single,
2493 .add,
2494 .add_wrap,
2495 .sub,
2496 .sub_wrap,
2497 .mul,
2498 .mul_wrap,
2499 .div,
2500 .shl,
2501 .shr,
2502 .mod,
2503 .@"and",
2504 .@"or",
2505 .less_than,
2506 .less_than_equal,
2507 .greater_than,
2508 .greater_than_equal,
2509 .equal,
2510 .not_equal,
2511 .bit_and,
2512 .bit_or,
2513 .bit_xor,
2514 .empty_block,
2515 .array_cat,
2516 .array_filler,
2517 .@"if",
2518 .@"struct",
2519 .@"union",
2520 .array_init,
2521 .vector_zero_init,
2522 .tuple,
2523 .container_init,
2524 .container_init_dot,
2525 .block,
2526 .address_of,
2527 => return c.addNode(.{
2528 .tag = .grouped_expression,
2529 .main_token = try c.addToken(.l_paren, "("),
2530 .data = .{ .node_and_token = .{
2531 try renderNode(c, node),
2532 try c.addToken(.r_paren, ")"),
2533 } },
2534 }),
2535 .ellipsis3,
2536 .switch_prong,
2537 .warning,
2538 .var_decl,
2539 .fail_decl,
2540 .arg_redecl,
2541 .alias,
2542 .var_simple,
2543 .pub_var_simple,
2544 .enum_constant,
2545 .@"while",
2546 .@"switch",
2547 .@"break",
2548 .break_val,
2549 .pub_inline_fn,
2550 .discard,
2551 .@"continue",
2552 .@"return",
2553 .@"comptime",
2554 .@"defer",
2555 .asm_simple,
2556 .while_true,
2557 .if_not_break,
2558 .switch_else,
2559 .add_assign,
2560 .add_wrap_assign,
2561 .sub_assign,
2562 .sub_wrap_assign,
2563 .mul_assign,
2564 .mul_wrap_assign,
2565 .div_assign,
2566 .shl_assign,
2567 .shr_assign,
2568 .mod_assign,
2569 .bit_and_assign,
2570 .bit_or_assign,
2571 .bit_xor_assign,
2572 .assign,
2573 .static_assert,
2574 .@"unreachable",
2575 => {
2576 // these should never appear in places where grouping might be needed.
2577 unreachable;
2578 },
2579 }
2580}
2581
2582fn renderPrefixOp(c: *Context, node: Node, tag: std.zig.Ast.Node.Tag, tok_tag: TokenTag, bytes: []const u8) !NodeIndex {
2583 const payload = @as(*Payload.UnOp, @alignCast(@fieldParentPtr("base", node.ptr_otherwise))).data;
2584 return c.addNode(.{
2585 .tag = tag,
2586 .main_token = try c.addToken(tok_tag, bytes),
2587 .data = .{
2588 .node = try renderNodeGrouped(c, payload),
2589 },
2590 });
2591}
2592
2593fn renderBinOpGrouped(c: *Context, node: Node, tag: std.zig.Ast.Node.Tag, tok_tag: TokenTag, bytes: []const u8) !NodeIndex {
2594 const payload = @as(*Payload.BinOp, @alignCast(@fieldParentPtr("base", node.ptr_otherwise))).data;
2595 const lhs = try renderNodeGrouped(c, payload.lhs);
2596 return c.addNode(.{
2597 .tag = tag,
2598 .main_token = try c.addToken(tok_tag, bytes),
2599 .data = .{ .node_and_node = .{
2600 lhs, try renderNodeGrouped(c, payload.rhs),
2601 } },
2602 });
2603}
2604
2605fn renderBinOp(c: *Context, node: Node, tag: std.zig.Ast.Node.Tag, tok_tag: TokenTag, bytes: []const u8) !NodeIndex {
2606 const payload = @as(*Payload.BinOp, @alignCast(@fieldParentPtr("base", node.ptr_otherwise))).data;
2607 const lhs = try renderNode(c, payload.lhs);
2608 return c.addNode(.{
2609 .tag = tag,
2610 .main_token = try c.addToken(tok_tag, bytes),
2611 .data = .{ .node_and_node = .{
2612 lhs, try renderNode(c, payload.rhs),
2613 } },
2614 });
2615}
2616
2617fn renderStdImport(c: *Context, parts: []const []const u8) !NodeIndex {
2618 const import_tok = try c.addToken(.builtin, "@import");
2619 _ = try c.addToken(.l_paren, "(");
2620 const std_tok = try c.addToken(.string_literal, "\"std\"");
2621 const std_node = try c.addNode(.{
2622 .tag = .string_literal,
2623 .main_token = std_tok,
2624 .data = undefined,
2625 });
2626 _ = try c.addToken(.r_paren, ")");
2627
2628 const import_node = try c.addNode(.{
2629 .tag = .builtin_call_two,
2630 .main_token = import_tok,
2631 .data = .{ .opt_node_and_opt_node = .{
2632 std_node.toOptional(), .none,
2633 } },
2634 });
2635
2636 var access_chain = import_node;
2637 for (parts) |part| {
2638 access_chain = try renderFieldAccess(c, access_chain, part);
2639 }
2640 return access_chain;
2641}
2642
2643fn renderCall(c: *Context, lhs: NodeIndex, args: []const Node) !NodeIndex {
2644 const lparen = try c.addToken(.l_paren, "(");
2645 const res = switch (args.len) {
2646 0 => try c.addNode(.{
2647 .tag = .call_one,
2648 .main_token = lparen,
2649 .data = .{ .node_and_opt_node = .{
2650 lhs, .none,
2651 } },
2652 }),
2653 1 => try c.addNode(.{
2654 .tag = .call_one,
2655 .main_token = lparen,
2656 .data = .{ .node_and_opt_node = .{
2657 lhs, (try renderNode(c, args[0])).toOptional(),
2658 } },
2659 }),
2660 else => blk: {
2661 var rendered = try c.gpa.alloc(NodeIndex, args.len);
2662 defer c.gpa.free(rendered);
2663
2664 for (args, 0..) |arg, i| {
2665 if (i != 0) _ = try c.addToken(.comma, ",");
2666 rendered[i] = try renderNode(c, arg);
2667 }
2668 const span = try c.listToSpan(rendered);
2669 break :blk try c.addNode(.{
2670 .tag = .call,
2671 .main_token = lparen,
2672 .data = .{ .node_and_extra = .{
2673 lhs, try c.addExtra(NodeSubRange{
2674 .start = span.start,
2675 .end = span.end,
2676 }),
2677 } },
2678 });
2679 },
2680 };
2681 _ = try c.addToken(.r_paren, ")");
2682 return res;
2683}
2684
2685fn renderBuiltinCall(c: *Context, builtin: []const u8, args: []const Node) !NodeIndex {
2686 const builtin_tok = try c.addToken(.builtin, builtin);
2687 _ = try c.addToken(.l_paren, "(");
2688 var arg_1: ?NodeIndex = null;
2689 var arg_2: ?NodeIndex = null;
2690 var arg_3: ?NodeIndex = null;
2691 var arg_4: ?NodeIndex = null;
2692 switch (args.len) {
2693 0 => {},
2694 1 => {
2695 arg_1 = try renderNode(c, args[0]);
2696 },
2697 2 => {
2698 arg_1 = try renderNode(c, args[0]);
2699 _ = try c.addToken(.comma, ",");
2700 arg_2 = try renderNode(c, args[1]);
2701 },
2702 4 => {
2703 arg_1 = try renderNode(c, args[0]);
2704 _ = try c.addToken(.comma, ",");
2705 arg_2 = try renderNode(c, args[1]);
2706 _ = try c.addToken(.comma, ",");
2707 arg_3 = try renderNode(c, args[2]);
2708 _ = try c.addToken(.comma, ",");
2709 arg_4 = try renderNode(c, args[3]);
2710 },
2711 else => unreachable, // expand this function as needed.
2712 }
2713
2714 _ = try c.addToken(.r_paren, ")");
2715 if (args.len <= 2) {
2716 return c.addNode(.{
2717 .tag = .builtin_call_two,
2718 .main_token = builtin_tok,
2719 .data = .{ .opt_node_and_opt_node = .{
2720 .fromOptional(arg_1), .fromOptional(arg_2),
2721 } },
2722 });
2723 } else {
2724 std.debug.assert(args.len == 4);
2725
2726 const params = try c.listToSpan(&.{ arg_1.?, arg_2.?, arg_3.?, arg_4.? });
2727 return c.addNode(.{
2728 .tag = .builtin_call,
2729 .main_token = builtin_tok,
2730 .data = .{ .extra_range = .{
2731 .start = params.start,
2732 .end = params.end,
2733 } },
2734 });
2735 }
2736}
2737
2738fn renderVar(c: *Context, node: Node) !NodeIndex {
2739 const payload = node.castTag(.var_decl).?.data;
2740 if (payload.is_pub) _ = try c.addToken(.keyword_pub, "pub");
2741 if (payload.is_extern) _ = try c.addToken(.keyword_extern, "extern");
2742 if (payload.is_export) _ = try c.addToken(.keyword_export, "export");
2743 if (payload.is_threadlocal) _ = try c.addToken(.keyword_threadlocal, "threadlocal");
2744 const mut_tok = if (payload.is_const)
2745 try c.addToken(.keyword_const, "const")
2746 else
2747 try c.addToken(.keyword_var, "var");
2748 _ = try c.addIdentifier(payload.name);
2749 _ = try c.addToken(.colon, ":");
2750 const type_node = try renderNode(c, payload.type);
2751
2752 const align_node_opt = if (payload.alignment) |some| blk: {
2753 _ = try c.addToken(.keyword_align, "align");
2754 _ = try c.addToken(.l_paren, "(");
2755 const res = try c.addNode(.{
2756 .tag = .number_literal,
2757 .main_token = try c.addTokenFmt(.number_literal, "{d}", .{some}),
2758 .data = undefined,
2759 });
2760 _ = try c.addToken(.r_paren, ")");
2761 break :blk res;
2762 } else null;
2763
2764 const section_node_opt = if (payload.linksection_string) |some| blk: {
2765 _ = try c.addToken(.keyword_linksection, "linksection");
2766 _ = try c.addToken(.l_paren, "(");
2767 const res = try c.addNode(.{
2768 .tag = .string_literal,
2769 .main_token = try c.addTokenFmt(.string_literal, "\"{f}\"", .{std.zig.fmtString(some)}),
2770 .data = undefined,
2771 });
2772 _ = try c.addToken(.r_paren, ")");
2773 break :blk res;
2774 } else null;
2775
2776 const init_node_opt = if (payload.init) |some| blk: {
2777 _ = try c.addToken(.equal, "=");
2778 break :blk try renderNode(c, some);
2779 } else null;
2780 _ = try c.addToken(.semicolon, ";");
2781
2782 if (section_node_opt) |section_node| {
2783 return c.addNode(.{
2784 .tag = .global_var_decl,
2785 .main_token = mut_tok,
2786 .data = .{ .extra_and_opt_node = .{
2787 try c.addExtra(std.zig.Ast.Node.GlobalVarDecl{
2788 .type_node = type_node.toOptional(),
2789 .align_node = .fromOptional(align_node_opt),
2790 .section_node = section_node.toOptional(),
2791 .addrspace_node = .none,
2792 }),
2793 .fromOptional(init_node_opt),
2794 } },
2795 });
2796 } else {
2797 if (align_node_opt) |align_node| {
2798 return c.addNode(.{
2799 .tag = .local_var_decl,
2800 .main_token = mut_tok,
2801 .data = .{ .extra_and_opt_node = .{
2802 try c.addExtra(std.zig.Ast.Node.LocalVarDecl{
2803 .type_node = type_node,
2804 .align_node = align_node,
2805 }),
2806 .fromOptional(init_node_opt),
2807 } },
2808 });
2809 } else {
2810 return c.addNode(.{
2811 .tag = .simple_var_decl,
2812 .main_token = mut_tok,
2813 .data = .{
2814 .opt_node_and_opt_node = .{
2815 type_node.toOptional(), // Type expression
2816 .fromOptional(init_node_opt), // Init expression
2817 },
2818 },
2819 });
2820 }
2821 }
2822}
2823
2824fn renderFunc(c: *Context, node: Node) !NodeIndex {
2825 const payload = node.castTag(.func).?.data;
2826 if (payload.is_pub) _ = try c.addToken(.keyword_pub, "pub");
2827 if (payload.is_extern) _ = try c.addToken(.keyword_extern, "extern");
2828 if (payload.is_export) _ = try c.addToken(.keyword_export, "export");
2829 if (payload.is_inline) _ = try c.addToken(.keyword_inline, "inline");
2830 const fn_token = try c.addToken(.keyword_fn, "fn");
2831 if (payload.name) |some| _ = try c.addIdentifier(some);
2832
2833 const params = try renderParams(c, payload.params, payload.is_var_args);
2834 defer params.deinit();
2835 var span: NodeSubRange = undefined;
2836 if (params.items.len > 1) span = try c.listToSpan(params.items);
2837
2838 const align_expr_opt = if (payload.alignment) |some| blk: {
2839 _ = try c.addToken(.keyword_align, "align");
2840 _ = try c.addToken(.l_paren, "(");
2841 const res = try c.addNode(.{
2842 .tag = .number_literal,
2843 .main_token = try c.addTokenFmt(.number_literal, "{d}", .{some}),
2844 .data = undefined,
2845 });
2846 _ = try c.addToken(.r_paren, ")");
2847 break :blk res;
2848 } else null;
2849
2850 const section_expr_opt = if (payload.linksection_string) |some| blk: {
2851 _ = try c.addToken(.keyword_linksection, "linksection");
2852 _ = try c.addToken(.l_paren, "(");
2853 const res = try c.addNode(.{
2854 .tag = .string_literal,
2855 .main_token = try c.addTokenFmt(.string_literal, "\"{f}\"", .{std.zig.fmtString(some)}),
2856 .data = undefined,
2857 });
2858 _ = try c.addToken(.r_paren, ")");
2859 break :blk res;
2860 } else null;
2861
2862 const callconv_expr_opt = if (payload.explicit_callconv) |some| blk: {
2863 _ = try c.addToken(.keyword_callconv, "callconv");
2864 _ = try c.addToken(.l_paren, "(");
2865 const cc_node = switch (some) {
2866 .c => cc_node: {
2867 _ = try c.addToken(.period, ".");
2868 break :cc_node try c.addNode(.{
2869 .tag = .enum_literal,
2870 .main_token = try c.addToken(.identifier, "c"),
2871 .data = undefined,
2872 });
2873 },
2874 .x86_64_sysv,
2875 .x86_64_win,
2876 .x86_stdcall,
2877 .x86_fastcall,
2878 .x86_thiscall,
2879 .x86_vectorcall,
2880 .x86_regcall,
2881 .aarch64_vfabi,
2882 .aarch64_sve_pcs,
2883 .arm_aapcs,
2884 .arm_aapcs_vfp,
2885 .m68k_rtd,
2886 .riscv_vector,
2887 => cc_node: {
2888 // .{ .foo = .{} }
2889 _ = try c.addToken(.period, ".");
2890 const outer_lbrace = try c.addToken(.l_brace, "{");
2891 _ = try c.addToken(.period, ".");
2892 _ = try c.addToken(.identifier, @tagName(some));
2893 _ = try c.addToken(.equal, "=");
2894 _ = try c.addToken(.period, ".");
2895 const inner_lbrace = try c.addToken(.l_brace, "{");
2896 _ = try c.addToken(.r_brace, "}");
2897 _ = try c.addToken(.r_brace, "}");
2898 break :cc_node try c.addNode(.{
2899 .tag = .struct_init_dot_two,
2900 .main_token = outer_lbrace,
2901 .data = .{ .opt_node_and_opt_node = .{
2902 (try c.addNode(.{
2903 .tag = .struct_init_dot_two,
2904 .main_token = inner_lbrace,
2905 .data = .{ .opt_node_and_opt_node = .{
2906 .none, .none,
2907 } },
2908 })).toOptional(),
2909 .none,
2910 } },
2911 });
2912 },
2913 };
2914 _ = try c.addToken(.r_paren, ")");
2915 break :blk cc_node;
2916 } else null;
2917
2918 const return_type_expr = try renderNode(c, payload.return_type);
2919
2920 const fn_proto = try blk: {
2921 if (align_expr_opt == null and section_expr_opt == null and callconv_expr_opt == null) {
2922 if (params.items.len < 2)
2923 break :blk c.addNode(.{
2924 .tag = .fn_proto_simple,
2925 .main_token = fn_token,
2926 .data = .{ .opt_node_and_opt_node = .{
2927 if (params.items.len == 1) params.items[0].toOptional() else .none,
2928 return_type_expr.toOptional(),
2929 } },
2930 })
2931 else
2932 break :blk c.addNode(.{
2933 .tag = .fn_proto_multi,
2934 .main_token = fn_token,
2935 .data = .{ .extra_and_opt_node = .{
2936 try c.addExtra(span),
2937 return_type_expr.toOptional(),
2938 } },
2939 });
2940 }
2941 if (params.items.len < 2)
2942 break :blk c.addNode(.{
2943 .tag = .fn_proto_one,
2944 .main_token = fn_token,
2945 .data = .{
2946 .extra_and_opt_node = .{
2947 try c.addExtra(std.zig.Ast.Node.FnProtoOne{
2948 .param = if (params.items.len == 1) params.items[0].toOptional() else .none,
2949 .align_expr = .fromOptional(align_expr_opt),
2950 .addrspace_expr = .none, // TODO
2951 .section_expr = .fromOptional(section_expr_opt),
2952 .callconv_expr = .fromOptional(callconv_expr_opt),
2953 }),
2954 return_type_expr.toOptional(),
2955 },
2956 },
2957 })
2958 else
2959 break :blk c.addNode(.{
2960 .tag = .fn_proto,
2961 .main_token = fn_token,
2962 .data = .{
2963 .extra_and_opt_node = .{
2964 try c.addExtra(std.zig.Ast.Node.FnProto{
2965 .params_start = span.start,
2966 .params_end = span.end,
2967 .align_expr = .fromOptional(align_expr_opt),
2968 .addrspace_expr = .none, // TODO
2969 .section_expr = .fromOptional(section_expr_opt),
2970 .callconv_expr = .fromOptional(callconv_expr_opt),
2971 }),
2972 return_type_expr.toOptional(),
2973 },
2974 },
2975 });
2976 };
2977
2978 const payload_body = payload.body orelse {
2979 if (payload.is_extern) {
2980 _ = try c.addToken(.semicolon, ";");
2981 }
2982 return fn_proto;
2983 };
2984 const body = try renderNode(c, payload_body);
2985 return c.addNode(.{
2986 .tag = .fn_decl,
2987 .main_token = fn_token,
2988 .data = .{ .node_and_node = .{
2989 fn_proto, body,
2990 } },
2991 });
2992}
2993
2994fn renderMacroFunc(c: *Context, node: Node) !NodeIndex {
2995 const payload = node.castTag(.pub_inline_fn).?.data;
2996 _ = try c.addToken(.keyword_pub, "pub");
2997 _ = try c.addToken(.keyword_inline, "inline");
2998 const fn_token = try c.addToken(.keyword_fn, "fn");
2999 _ = try c.addIdentifier(payload.name);
3000
3001 const params = try renderParams(c, payload.params, false);
3002 defer params.deinit();
3003 var span: NodeSubRange = undefined;
3004 if (params.items.len > 1) span = try c.listToSpan(params.items);
3005
3006 const return_type_expr = try renderNodeGrouped(c, payload.return_type);
3007
3008 const fn_proto = blk: {
3009 if (params.items.len < 2) {
3010 break :blk try c.addNode(.{
3011 .tag = .fn_proto_simple,
3012 .main_token = fn_token,
3013 .data = .{ .opt_node_and_opt_node = .{
3014 if (params.items.len == 1) params.items[0].toOptional() else .none,
3015 return_type_expr.toOptional(),
3016 } },
3017 });
3018 } else {
3019 break :blk try c.addNode(.{
3020 .tag = .fn_proto_multi,
3021 .main_token = fn_token,
3022 .data = .{ .extra_and_opt_node = .{
3023 try c.addExtra(span),
3024 return_type_expr.toOptional(),
3025 } },
3026 });
3027 }
3028 };
3029 return c.addNode(.{
3030 .tag = .fn_decl,
3031 .main_token = fn_token,
3032 .data = .{ .node_and_node = .{
3033 fn_proto, try renderNode(c, payload.body),
3034 } },
3035 });
3036}
3037
3038fn renderParams(c: *Context, params: []Payload.Param, is_var_args: bool) !std.array_list.Managed(NodeIndex) {
3039 _ = try c.addToken(.l_paren, "(");
3040 var rendered = try std.array_list.Managed(NodeIndex).initCapacity(c.gpa, @max(params.len, 1));
3041 errdefer rendered.deinit();
3042
3043 for (params, 0..) |param, i| {
3044 if (i != 0) _ = try c.addToken(.comma, ",");
3045 if (param.is_noalias) _ = try c.addToken(.keyword_noalias, "noalias");
3046 if (param.name) |some| {
3047 _ = try c.addIdentifier(some);
3048 _ = try c.addToken(.colon, ":");
3049 }
3050 if (param.type.tag() == .@"anytype") {
3051 _ = try c.addToken(.keyword_anytype, "anytype");
3052 continue;
3053 }
3054 rendered.appendAssumeCapacity(try renderNode(c, param.type));
3055 }
3056 if (is_var_args) {
3057 if (params.len != 0) _ = try c.addToken(.comma, ",");
3058 _ = try c.addToken(.ellipsis3, "...");
3059 }
3060 _ = try c.addToken(.r_paren, ")");
3061
3062 return rendered;
3063}
lib/compiler/translate-c/src/builtins.zig created+76
......@@ -0,0 +1,76 @@
1const std = @import("std");
2
3const ast = @import("ast.zig");
4
5/// All builtins need to have a source so that macros can reference them
6/// but for some it is possible to directly call an equivalent Zig builtin
7/// which is preferrable.
8pub const Builtin = struct {
9 /// The name of the builtin in `c_builtins.zig`.
10 name: []const u8,
11 tag: ?ast.Node.Tag = null,
12};
13
14pub const map = std.StaticStringMap(Builtin).initComptime([_]struct { []const u8, Builtin }{
15 .{ "__builtin_abs", .{ .name = "abs" } },
16 .{ "__builtin_assume", .{ .name = "assume" } },
17 .{ "__builtin_bswap16", .{ .name = "bswap16", .tag = .byte_swap } },
18 .{ "__builtin_bswap32", .{ .name = "bswap32", .tag = .byte_swap } },
19 .{ "__builtin_bswap64", .{ .name = "bswap64", .tag = .byte_swap } },
20 .{ "__builtin_ceilf", .{ .name = "ceilf", .tag = .ceil } },
21 .{ "__builtin_ceil", .{ .name = "ceil", .tag = .ceil } },
22 .{ "__builtin_clz", .{ .name = "clz" } },
23 .{ "__builtin_constant_p", .{ .name = "constant_p" } },
24 .{ "__builtin_cosf", .{ .name = "cosf", .tag = .cos } },
25 .{ "__builtin_cos", .{ .name = "cos", .tag = .cos } },
26 .{ "__builtin_ctz", .{ .name = "ctz" } },
27 .{ "__builtin_exp2f", .{ .name = "exp2f", .tag = .exp2 } },
28 .{ "__builtin_exp2", .{ .name = "exp2", .tag = .exp2 } },
29 .{ "__builtin_expf", .{ .name = "expf", .tag = .exp } },
30 .{ "__builtin_exp", .{ .name = "exp", .tag = .exp } },
31 .{ "__builtin_expect", .{ .name = "expect" } },
32 .{ "__builtin_fabsf", .{ .name = "fabsf", .tag = .abs } },
33 .{ "__builtin_fabs", .{ .name = "fabs", .tag = .abs } },
34 .{ "__builtin_floorf", .{ .name = "floorf", .tag = .floor } },
35 .{ "__builtin_floor", .{ .name = "floor", .tag = .floor } },
36 .{ "__builtin_huge_valf", .{ .name = "huge_valf" } },
37 .{ "__builtin_inff", .{ .name = "inff" } },
38 .{ "__builtin_isinf_sign", .{ .name = "isinf_sign" } },
39 .{ "__builtin_isinf", .{ .name = "isinf" } },
40 .{ "__builtin_isnan", .{ .name = "isnan" } },
41 .{ "__builtin_labs", .{ .name = "labs" } },
42 .{ "__builtin_llabs", .{ .name = "llabs" } },
43 .{ "__builtin_log10f", .{ .name = "log10f", .tag = .log10 } },
44 .{ "__builtin_log10", .{ .name = "log10", .tag = .log10 } },
45 .{ "__builtin_log2f", .{ .name = "log2f", .tag = .log2 } },
46 .{ "__builtin_log2", .{ .name = "log2", .tag = .log2 } },
47 .{ "__builtin_logf", .{ .name = "logf", .tag = .log } },
48 .{ "__builtin_log", .{ .name = "log", .tag = .log } },
49 .{ "__builtin___memcpy_chk", .{ .name = "memcpy_chk" } },
50 .{ "__builtin_memcpy", .{ .name = "memcpy" } },
51 .{ "__builtin___memset_chk", .{ .name = "memset_chk" } },
52 .{ "__builtin_memset", .{ .name = "memset" } },
53 .{ "__builtin_mul_overflow", .{ .name = "mul_overflow" } },
54 .{ "__builtin_nanf", .{ .name = "nanf" } },
55 .{ "__builtin_object_size", .{ .name = "object_size" } },
56 .{ "__builtin_popcount", .{ .name = "popcount" } },
57 .{ "__builtin_roundf", .{ .name = "roundf", .tag = .round } },
58 .{ "__builtin_round", .{ .name = "round", .tag = .round } },
59 .{ "__builtin_signbitf", .{ .name = "signbitf" } },
60 .{ "__builtin_signbit", .{ .name = "signbit" } },
61 .{ "__builtin_sinf", .{ .name = "sinf", .tag = .sin } },
62 .{ "__builtin_sin", .{ .name = "sin", .tag = .sin } },
63 .{ "__builtin_sqrtf", .{ .name = "sqrtf", .tag = .sqrt } },
64 .{ "__builtin_sqrt", .{ .name = "sqrt", .tag = .sqrt } },
65 .{ "__builtin_strcmp", .{ .name = "strcmp" } },
66 .{ "__builtin_strlen", .{ .name = "strlen" } },
67 .{ "__builtin_truncf", .{ .name = "truncf", .tag = .trunc } },
68 .{ "__builtin_trunc", .{ .name = "trunc", .tag = .trunc } },
69 .{ "__builtin_unreachable", .{ .name = "unreachable", .tag = .@"unreachable" } },
70 .{ "__has_builtin", .{ .name = "has_builtin" } },
71
72 // __builtin_alloca_with_align is not currently implemented.
73 // It is used in a run and a translate test to ensure that non-implemented
74 // builtins are correctly demoted. If you implement __builtin_alloca_with_align,
75 // please update the tests to use a different non-implemented builtin.
76});
lib/compiler/translate-c/src/helpers.zig created+327
......@@ -0,0 +1,327 @@
1const std = @import("std");
2const builtin = @import("builtin");
3const testing = std.testing;
4const math = std.math;
5
6const helpers = @import("helpers");
7
8const cast = helpers.cast;
9
10test cast {
11 var i = @as(i64, 10);
12
13 try testing.expect(cast(*u8, 16) == @as(*u8, @ptrFromInt(16)));
14 try testing.expect(cast(*u64, &i).* == @as(u64, 10));
15 try testing.expect(cast(*i64, @as(?*align(1) i64, &i)) == &i);
16
17 try testing.expect(cast(?*u8, 2) == @as(*u8, @ptrFromInt(2)));
18 try testing.expect(cast(?*i64, @as(*align(1) i64, &i)) == &i);
19 try testing.expect(cast(?*i64, @as(?*align(1) i64, &i)) == &i);
20
21 try testing.expectEqual(@as(u32, 4), cast(u32, @as(*u32, @ptrFromInt(4))));
22 try testing.expectEqual(@as(u32, 4), cast(u32, @as(?*u32, @ptrFromInt(4))));
23 try testing.expectEqual(@as(u32, 10), cast(u32, @as(u64, 10)));
24
25 try testing.expectEqual(@as(i32, @bitCast(@as(u32, 0x8000_0000))), cast(i32, @as(u32, 0x8000_0000)));
26
27 try testing.expectEqual(@as(*u8, @ptrFromInt(2)), cast(*u8, @as(*const u8, @ptrFromInt(2))));
28 try testing.expectEqual(@as(*u8, @ptrFromInt(2)), cast(*u8, @as(*volatile u8, @ptrFromInt(2))));
29
30 try testing.expectEqual(@as(?*anyopaque, @ptrFromInt(2)), cast(?*anyopaque, @as(*u8, @ptrFromInt(2))));
31
32 var foo: c_int = -1;
33 _ = &foo;
34 try testing.expect(cast(*anyopaque, -1) == @as(*anyopaque, @ptrFromInt(@as(usize, @bitCast(@as(isize, -1))))));
35 try testing.expect(cast(*anyopaque, foo) == @as(*anyopaque, @ptrFromInt(@as(usize, @bitCast(@as(isize, -1))))));
36 try testing.expect(cast(?*anyopaque, -1) == @as(?*anyopaque, @ptrFromInt(@as(usize, @bitCast(@as(isize, -1))))));
37 try testing.expect(cast(?*anyopaque, foo) == @as(?*anyopaque, @ptrFromInt(@as(usize, @bitCast(@as(isize, -1))))));
38
39 const FnPtr = ?*align(1) const fn (*anyopaque) void;
40 try testing.expect(cast(FnPtr, 0) == @as(FnPtr, @ptrFromInt(@as(usize, 0))));
41 try testing.expect(cast(FnPtr, foo) == @as(FnPtr, @ptrFromInt(@as(usize, @bitCast(@as(isize, -1))))));
42
43 const complexFunction = struct {
44 fn f(_: ?*anyopaque, _: c_uint, _: ?*const fn (?*anyopaque) callconv(.c) c_uint, _: ?*anyopaque, _: c_uint, _: [*c]c_uint) callconv(.c) usize {
45 return 0;
46 }
47 }.f;
48
49 const SDL_FunctionPointer = ?*const fn () callconv(.c) void;
50 const fn_ptr = cast(SDL_FunctionPointer, complexFunction);
51 try testing.expect(fn_ptr != null);
52}
53
54const sizeof = helpers.sizeof;
55
56test sizeof {
57 const S = extern struct { a: u32 };
58
59 const ptr_size = @sizeOf(*anyopaque);
60
61 try testing.expect(sizeof(u32) == 4);
62 try testing.expect(sizeof(@as(u32, 2)) == 4);
63 try testing.expect(sizeof(2) == @sizeOf(c_int));
64
65 try testing.expect(sizeof(2.0) == @sizeOf(f64));
66
67 try testing.expect(sizeof(S) == 4);
68
69 try testing.expect(sizeof([_]u32{ 4, 5, 6 }) == 12);
70 try testing.expect(sizeof([3]u32) == 12);
71 try testing.expect(sizeof([3:0]u32) == 16);
72 try testing.expect(sizeof(&[_]u32{ 4, 5, 6 }) == ptr_size);
73
74 try testing.expect(sizeof(*u32) == ptr_size);
75 try testing.expect(sizeof([*]u32) == ptr_size);
76 try testing.expect(sizeof([*c]u32) == ptr_size);
77 try testing.expect(sizeof(?*u32) == ptr_size);
78 try testing.expect(sizeof(?[*]u32) == ptr_size);
79 try testing.expect(sizeof(*anyopaque) == ptr_size);
80 try testing.expect(sizeof(*void) == ptr_size);
81 try testing.expect(sizeof(null) == ptr_size);
82
83 try testing.expect(sizeof("foobar") == 7);
84 try testing.expect(sizeof(&[_:0]u16{ 'f', 'o', 'o', 'b', 'a', 'r' }) == 14);
85 try testing.expect(sizeof(*const [4:0]u8) == 5);
86 try testing.expect(sizeof(*[4:0]u8) == ptr_size);
87 try testing.expect(sizeof([*]const [4:0]u8) == ptr_size);
88 try testing.expect(sizeof(*const *const [4:0]u8) == ptr_size);
89 try testing.expect(sizeof(*const [4]u8) == ptr_size);
90
91 if (false) { // TODO
92 try testing.expect(sizeof(&sizeof) == @sizeOf(@TypeOf(&sizeof)));
93 try testing.expect(sizeof(sizeof) == 1);
94 }
95
96 try testing.expect(sizeof(void) == 1);
97 try testing.expect(sizeof(anyopaque) == 1);
98}
99
100const promoteIntLiteral = helpers.promoteIntLiteral;
101
102test promoteIntLiteral {
103 const signed_hex = promoteIntLiteral(c_int, math.maxInt(c_int) + 1, .hex);
104 try testing.expectEqual(c_uint, @TypeOf(signed_hex));
105
106 if (math.maxInt(c_longlong) == math.maxInt(c_int)) return;
107
108 const signed_decimal = promoteIntLiteral(c_int, math.maxInt(c_int) + 1, .decimal);
109 const unsigned = promoteIntLiteral(c_uint, math.maxInt(c_uint) + 1, .hex);
110
111 if (math.maxInt(c_long) > math.maxInt(c_int)) {
112 try testing.expectEqual(c_long, @TypeOf(signed_decimal));
113 try testing.expectEqual(c_ulong, @TypeOf(unsigned));
114 } else {
115 try testing.expectEqual(c_longlong, @TypeOf(signed_decimal));
116 try testing.expectEqual(c_ulonglong, @TypeOf(unsigned));
117 }
118}
119
120const shuffleVectorIndex = helpers.shuffleVectorIndex;
121
122test shuffleVectorIndex {
123 const vector_len: usize = 4;
124
125 _ = shuffleVectorIndex(-1, vector_len);
126
127 try testing.expect(shuffleVectorIndex(0, vector_len) == 0);
128 try testing.expect(shuffleVectorIndex(1, vector_len) == 1);
129 try testing.expect(shuffleVectorIndex(2, vector_len) == 2);
130 try testing.expect(shuffleVectorIndex(3, vector_len) == 3);
131
132 try testing.expect(shuffleVectorIndex(4, vector_len) == -1);
133 try testing.expect(shuffleVectorIndex(5, vector_len) == -2);
134 try testing.expect(shuffleVectorIndex(6, vector_len) == -3);
135 try testing.expect(shuffleVectorIndex(7, vector_len) == -4);
136}
137
138const FlexibleArrayType = helpers.FlexibleArrayType;
139
140test FlexibleArrayType {
141 const Container = extern struct {
142 size: usize,
143 };
144
145 try testing.expectEqual(FlexibleArrayType(*Container, c_int), [*c]c_int);
146 try testing.expectEqual(FlexibleArrayType(*const Container, c_int), [*c]const c_int);
147 try testing.expectEqual(FlexibleArrayType(*volatile Container, c_int), [*c]volatile c_int);
148 try testing.expectEqual(FlexibleArrayType(*const volatile Container, c_int), [*c]const volatile c_int);
149}
150
151const signedRemainder = helpers.signedRemainder;
152
153test signedRemainder {
154 // TODO add test
155 return error.SkipZigTest;
156}
157
158const ArithmeticConversion = helpers.ArithmeticConversion;
159
160test ArithmeticConversion {
161 // Promotions not necessarily the same for other platforms
162 if (builtin.target.cpu.arch != .x86_64 or builtin.target.os.tag != .linux) return error.SkipZigTest;
163
164 const Test = struct {
165 /// Order of operands should not matter for arithmetic conversions
166 fn checkPromotion(comptime A: type, comptime B: type, comptime Expected: type) !void {
167 try std.testing.expect(ArithmeticConversion(A, B) == Expected);
168 try std.testing.expect(ArithmeticConversion(B, A) == Expected);
169 }
170 };
171
172 try Test.checkPromotion(c_longdouble, c_int, c_longdouble);
173 try Test.checkPromotion(c_int, f64, f64);
174 try Test.checkPromotion(f32, bool, f32);
175
176 try Test.checkPromotion(bool, c_short, c_int);
177 try Test.checkPromotion(c_int, c_int, c_int);
178 try Test.checkPromotion(c_short, c_int, c_int);
179
180 try Test.checkPromotion(c_int, c_long, c_long);
181
182 try Test.checkPromotion(c_ulonglong, c_uint, c_ulonglong);
183
184 try Test.checkPromotion(c_uint, c_int, c_uint);
185
186 try Test.checkPromotion(c_uint, c_long, c_long);
187
188 try Test.checkPromotion(c_ulong, c_longlong, c_ulonglong);
189
190 // stdint.h
191 try Test.checkPromotion(u8, i8, c_int);
192 try Test.checkPromotion(u16, i16, c_int);
193 try Test.checkPromotion(i32, c_int, c_int);
194 try Test.checkPromotion(u32, c_int, c_uint);
195 try Test.checkPromotion(i64, c_int, c_long);
196 try Test.checkPromotion(u64, c_int, c_ulong);
197 try Test.checkPromotion(isize, c_int, c_long);
198 try Test.checkPromotion(usize, c_int, c_ulong);
199}
200
201const F_SUFFIX = helpers.F_SUFFIX;
202
203test F_SUFFIX {
204 try testing.expect(@TypeOf(F_SUFFIX(1)) == f32);
205}
206
207const U_SUFFIX = helpers.U_SUFFIX;
208
209test U_SUFFIX {
210 try testing.expect(@TypeOf(U_SUFFIX(1)) == c_uint);
211 if (math.maxInt(c_ulong) > math.maxInt(c_uint)) {
212 try testing.expect(@TypeOf(U_SUFFIX(math.maxInt(c_uint) + 1)) == c_ulong);
213 }
214 if (math.maxInt(c_ulonglong) > math.maxInt(c_ulong)) {
215 try testing.expect(@TypeOf(U_SUFFIX(math.maxInt(c_ulong) + 1)) == c_ulonglong);
216 }
217}
218
219const L_SUFFIX = helpers.L_SUFFIX;
220
221test L_SUFFIX {
222 try testing.expect(@TypeOf(L_SUFFIX(1)) == c_long);
223 if (math.maxInt(c_long) > math.maxInt(c_int)) {
224 try testing.expect(@TypeOf(L_SUFFIX(math.maxInt(c_int) + 1)) == c_long);
225 }
226 if (math.maxInt(c_longlong) > math.maxInt(c_long)) {
227 try testing.expect(@TypeOf(L_SUFFIX(math.maxInt(c_long) + 1)) == c_longlong);
228 }
229}
230const UL_SUFFIX = helpers.UL_SUFFIX;
231
232test UL_SUFFIX {
233 try testing.expect(@TypeOf(UL_SUFFIX(1)) == c_ulong);
234 if (math.maxInt(c_ulonglong) > math.maxInt(c_ulong)) {
235 try testing.expect(@TypeOf(UL_SUFFIX(math.maxInt(c_ulong) + 1)) == c_ulonglong);
236 }
237}
238const LL_SUFFIX = helpers.LL_SUFFIX;
239
240test LL_SUFFIX {
241 try testing.expect(@TypeOf(LL_SUFFIX(1)) == c_longlong);
242}
243const ULL_SUFFIX = helpers.ULL_SUFFIX;
244
245test ULL_SUFFIX {
246 try testing.expect(@TypeOf(ULL_SUFFIX(1)) == c_ulonglong);
247}
248
249test "Extended C ABI casting" {
250 if (math.maxInt(c_long) > math.maxInt(c_char)) {
251 try testing.expect(@TypeOf(L_SUFFIX(@as(c_char, math.maxInt(c_char) - 1))) == c_long); // c_char
252 }
253 if (math.maxInt(c_long) > math.maxInt(c_short)) {
254 try testing.expect(@TypeOf(L_SUFFIX(@as(c_short, math.maxInt(c_short) - 1))) == c_long); // c_short
255 }
256
257 if (math.maxInt(c_long) > math.maxInt(c_ushort)) {
258 try testing.expect(@TypeOf(L_SUFFIX(@as(c_ushort, math.maxInt(c_ushort) - 1))) == c_long); //c_ushort
259 }
260
261 if (math.maxInt(c_long) > math.maxInt(c_int)) {
262 try testing.expect(@TypeOf(L_SUFFIX(@as(c_int, math.maxInt(c_int) - 1))) == c_long); // c_int
263 }
264
265 if (math.maxInt(c_long) > math.maxInt(c_uint)) {
266 try testing.expect(@TypeOf(L_SUFFIX(@as(c_uint, math.maxInt(c_uint) - 1))) == c_long); // c_uint
267 try testing.expect(@TypeOf(L_SUFFIX(math.maxInt(c_uint) + 1)) == c_long); // comptime_int -> c_long
268 }
269
270 if (math.maxInt(c_longlong) > math.maxInt(c_long)) {
271 try testing.expect(@TypeOf(L_SUFFIX(@as(c_long, math.maxInt(c_long) - 1))) == c_long); // c_long
272 try testing.expect(@TypeOf(L_SUFFIX(math.maxInt(c_long) + 1)) == c_longlong); // comptime_int -> c_longlong
273 }
274}
275
276const WL_CONTAINER_OF = helpers.WL_CONTAINER_OF;
277
278test WL_CONTAINER_OF {
279 const S = struct {
280 a: u32 = 0,
281 b: u32 = 0,
282 };
283 const x = S{};
284 const y = S{};
285 const ptr = WL_CONTAINER_OF(&x.b, &y, "b");
286 try testing.expectEqual(&x, ptr);
287}
288
289const CAST_OR_CALL = helpers.CAST_OR_CALL;
290
291test "CAST_OR_CALL casting" {
292 const arg: c_int = 1000;
293 const casted = CAST_OR_CALL(u8, arg);
294 try testing.expectEqual(cast(u8, arg), casted);
295
296 const S = struct {
297 x: u32 = 0,
298 };
299 var s: S = .{};
300 const casted_ptr = CAST_OR_CALL(*u8, &s);
301 try testing.expectEqual(cast(*u8, &s), casted_ptr);
302}
303
304test "CAST_OR_CALL calling" {
305 const Helper = struct {
306 var last_val: bool = false;
307 fn returnsVoid(val: bool) void {
308 last_val = val;
309 }
310 fn returnsBool(f: f32) bool {
311 return f > 0;
312 }
313 fn identity(self: c_uint) c_uint {
314 return self;
315 }
316 };
317
318 CAST_OR_CALL(Helper.returnsVoid, true);
319 try testing.expectEqual(true, Helper.last_val);
320 CAST_OR_CALL(Helper.returnsVoid, false);
321 try testing.expectEqual(false, Helper.last_val);
322
323 try testing.expectEqual(Helper.returnsBool(1), CAST_OR_CALL(Helper.returnsBool, @as(f32, 1)));
324 try testing.expectEqual(Helper.returnsBool(-1), CAST_OR_CALL(Helper.returnsBool, @as(f32, -1)));
325
326 try testing.expectEqual(Helper.identity(@as(c_uint, 100)), CAST_OR_CALL(Helper.identity, @as(c_uint, 100)));
327}
lib/compiler/translate-c/src/main.zig created+251
......@@ -0,0 +1,251 @@
1const std = @import("std");
2const assert = std.debug.assert;
3const mem = std.mem;
4const process = std.process;
5const aro = @import("aro");
6const Translator = @import("Translator.zig");
7
8const fast_exit = @import("builtin").mode != .Debug;
9
10var general_purpose_allocator: std.heap.GeneralPurposeAllocator(.{}) = .init;
11
12pub fn main() u8 {
13 const gpa = general_purpose_allocator.allocator();
14 defer _ = general_purpose_allocator.deinit();
15
16 var arena_instance = std.heap.ArenaAllocator.init(std.heap.page_allocator);
17 defer arena_instance.deinit();
18 const arena = arena_instance.allocator();
19
20 const args = process.argsAlloc(arena) catch {
21 std.debug.print("ran out of memory allocating arguments\n", .{});
22 if (fast_exit) process.exit(1);
23 return 1;
24 };
25
26 var stderr_buf: [1024]u8 = undefined;
27 var stderr = std.fs.File.stderr().writer(&stderr_buf);
28 var diagnostics: aro.Diagnostics = .{
29 .output = .{ .to_writer = .{
30 .color = .detect(stderr.file),
31 .writer = &stderr.interface,
32 } },
33 };
34
35 var comp = aro.Compilation.initDefault(gpa, arena, &diagnostics, std.fs.cwd()) catch |err| switch (err) {
36 error.OutOfMemory => {
37 std.debug.print("ran out of memory initializing C compilation\n", .{});
38 if (fast_exit) process.exit(1);
39 return 1;
40 },
41 };
42 defer comp.deinit();
43
44 const exe_name = std.fs.selfExePathAlloc(gpa) catch {
45 std.debug.print("unable to find translate-c executable path\n", .{});
46 if (fast_exit) process.exit(1);
47 return 1;
48 };
49 defer gpa.free(exe_name);
50
51 var driver: aro.Driver = .{ .comp = &comp, .diagnostics = &diagnostics, .aro_name = exe_name };
52 defer driver.deinit();
53
54 var toolchain: aro.Toolchain = .{ .driver = &driver, .filesystem = .{ .real = comp.cwd } };
55 defer toolchain.deinit();
56
57 translate(&driver, &toolchain, args) catch |err| switch (err) {
58 error.OutOfMemory => {
59 std.debug.print("ran out of memory translating\n", .{});
60 if (fast_exit) process.exit(1);
61 return 1;
62 },
63 error.FatalError => {
64 if (fast_exit) process.exit(1);
65 return 1;
66 },
67 error.WriteFailed => {
68 std.debug.print("unable to write to stdout\n", .{});
69 if (fast_exit) process.exit(1);
70 return 1;
71 },
72 };
73 if (fast_exit) process.exit(@intFromBool(comp.diagnostics.errors != 0));
74 return @intFromBool(comp.diagnostics.errors != 0);
75}
76
77pub const usage =
78 \\Usage {s}: [options] file [CC options]
79 \\
80 \\Options:
81 \\ --help Print this message
82 \\ --version Print translate-c version
83 \\ -fmodule-libs Import libraries as modules
84 \\ -fno-module-libs (default) Install libraries next to output file
85 \\
86 \\
87;
88
89fn translate(d: *aro.Driver, tc: *aro.Toolchain, args: [][:0]u8) !void {
90 const gpa = d.comp.gpa;
91
92 var module_libs = false;
93
94 const aro_args = args: {
95 var i: usize = 0;
96 for (args) |arg| {
97 args[i] = arg;
98 if (mem.eql(u8, arg, "--help")) {
99 var stdout_buf: [512]u8 = undefined;
100 var stdout = std.fs.File.stdout().writer(&stdout_buf);
101 try stdout.interface.print(usage, .{args[0]});
102 try stdout.interface.flush();
103 return;
104 } else if (mem.eql(u8, arg, "--version")) {
105 var stdout_buf: [512]u8 = undefined;
106 var stdout = std.fs.File.stdout().writer(&stdout_buf);
107 // TODO add version
108 try stdout.interface.writeAll("0.0.0-dev\n");
109 try stdout.interface.flush();
110 return;
111 } else if (mem.eql(u8, arg, "-fmodule-libs")) {
112 module_libs = true;
113 } else if (mem.eql(u8, arg, "-fno-module-libs")) {
114 module_libs = false;
115 } else {
116 i += 1;
117 }
118 }
119 break :args args[0..i];
120 };
121 const user_macros = macros: {
122 var macro_buf: std.ArrayListUnmanaged(u8) = .empty;
123 defer macro_buf.deinit(gpa);
124
125 try macro_buf.appendSlice(gpa, "#define __TRANSLATE_C__ 1\n");
126
127 var discard_buf: [256]u8 = undefined;
128 var discarding: std.io.Writer.Discarding = .init(&discard_buf);
129 assert(!try d.parseArgs(&discarding.writer, &macro_buf, aro_args));
130 if (macro_buf.items.len > std.math.maxInt(u32)) {
131 return d.fatal("user provided macro source exceeded max size", .{});
132 }
133
134 const content = try macro_buf.toOwnedSlice(gpa);
135 errdefer gpa.free(content);
136
137 break :macros try d.comp.addSourceFromOwnedBuffer("<command line>", content, .user);
138 };
139
140 if (d.inputs.items.len != 1) {
141 return d.fatal("expected exactly one input file", .{});
142 }
143 const source = d.inputs.items[0];
144
145 tc.discover() catch |er| switch (er) {
146 error.OutOfMemory => return error.OutOfMemory,
147 error.TooManyMultilibs => return d.fatal("found more than one multilib with the same priority", .{}),
148 };
149 tc.defineSystemIncludes() catch |er| switch (er) {
150 error.OutOfMemory => return error.OutOfMemory,
151 error.AroIncludeNotFound => return d.fatal("unable to find Aro builtin headers", .{}),
152 };
153
154 const builtin_macros = d.comp.generateBuiltinMacros(.include_system_defines) catch |err| switch (err) {
155 error.FileTooBig => return d.fatal("builtin macro source exceeded max size", .{}),
156 else => |e| return e,
157 };
158
159 var pp = try aro.Preprocessor.initDefault(d.comp);
160 defer pp.deinit();
161
162 try pp.preprocessSources(&.{ source, builtin_macros, user_macros });
163
164 var c_tree = try pp.parse();
165 defer c_tree.deinit();
166
167 if (d.diagnostics.errors != 0) {
168 if (fast_exit) process.exit(1);
169 return error.FatalError;
170 }
171
172 const rendered_zig = try Translator.translate(.{
173 .gpa = gpa,
174 .comp = d.comp,
175 .pp = &pp,
176 .tree = &c_tree,
177 .module_libs = module_libs,
178 });
179 defer gpa.free(rendered_zig);
180
181 var close_out_file = false;
182 var out_file_path: []const u8 = "<stdout>";
183 var out_file: std.fs.File = .stdout();
184 defer if (close_out_file) out_file.close();
185
186 if (d.output_name) |path| blk: {
187 if (std.mem.eql(u8, path, "-")) break :blk;
188 if (std.fs.path.dirname(path)) |dirname| {
189 std.fs.cwd().makePath(dirname) catch |err|
190 return d.fatal("failed to create path to '{s}': {s}", .{ path, aro.Driver.errorDescription(err) });
191 }
192 out_file = std.fs.cwd().createFile(path, .{}) catch |err| {
193 return d.fatal("failed to create output file '{s}': {s}", .{ path, aro.Driver.errorDescription(err) });
194 };
195 close_out_file = true;
196 out_file_path = path;
197 }
198
199 var out_buf: [4096]u8 = undefined;
200 var out_writer = out_file.writer(&out_buf);
201 out_writer.interface.writeAll(rendered_zig) catch
202 return d.fatal("failed to write result to '{s}': {s}", .{ out_file_path, aro.Driver.errorDescription(out_writer.err.?) });
203
204 if (!module_libs) {
205 const dest_path = if (d.output_name) |path| std.fs.path.dirname(path) else null;
206 installLibs(d, dest_path) catch |err|
207 return d.fatal("failed to install library files: {s}", .{aro.Driver.errorDescription(err)});
208 }
209
210 if (fast_exit) process.exit(0);
211}
212
213fn installLibs(d: *aro.Driver, dest_path: ?[]const u8) !void {
214 const gpa = d.comp.gpa;
215 const cwd = std.fs.cwd();
216
217 const self_exe_path = try std.fs.selfExePathAlloc(gpa);
218 defer gpa.free(self_exe_path);
219
220 var cur_dir: []const u8 = self_exe_path;
221 while (std.fs.path.dirname(cur_dir)) |dirname| : (cur_dir = dirname) {
222 var base_dir = cwd.openDir(dirname, .{}) catch continue;
223 defer base_dir.close();
224
225 var lib_dir = base_dir.openDir("lib", .{}) catch continue;
226 defer lib_dir.close();
227
228 lib_dir.access("c_builtins.zig", .{}) catch continue;
229
230 {
231 const install_path = try std.fs.path.join(gpa, &.{ dest_path orelse "", "c_builtins.zig" });
232 defer gpa.free(install_path);
233 try lib_dir.copyFile("c_builtins.zig", cwd, install_path, .{});
234 }
235 {
236 const install_path = try std.fs.path.join(gpa, &.{ dest_path orelse "", "helpers.zig" });
237 defer gpa.free(install_path);
238 try lib_dir.copyFile("helpers.zig", cwd, install_path, .{});
239 }
240 return;
241 }
242 return error.FileNotFound;
243}
244
245comptime {
246 if (@import("builtin").is_test) {
247 _ = Translator;
248 _ = @import("helpers.zig");
249 _ = @import("PatternList.zig");
250 }
251}
src/Compilation.zig+4-157
......@@ -5657,149 +5657,10 @@ pub const CImportResult = struct {
56575657/// Caller owns returned memory.
56585658pub fn cImport(comp: *Compilation, c_src: []const u8, owner_mod: *Package.Module) !CImportResult {
56595659 dev.check(.translate_c_command);
5660
5661 const tracy_trace = trace(@src());
5662 defer tracy_trace.end();
5663
5664 const cimport_zig_basename = "cimport.zig";
5665
5666 var man = comp.obtainCObjectCacheManifest(owner_mod);
5667 defer man.deinit();
5668
5669 man.hash.add(@as(u16, 0xb945)); // Random number to distinguish translate-c from compiling C objects
5670 man.hash.addBytes(c_src);
5671 man.hash.add(comp.config.c_frontend);
5672
5673 // If the previous invocation resulted in clang errors, we will see a hit
5674 // here with 0 files in the manifest, in which case it is actually a miss.
5675 // We need to "unhit" in this case, to keep the digests matching.
5676 const prev_hash_state = man.hash.peekBin();
5677 const actual_hit = hit: {
5678 _ = try man.hit();
5679 if (man.files.entries.len == 0) {
5680 man.unhit(prev_hash_state, 0);
5681 break :hit false;
5682 }
5683 break :hit true;
5684 };
5685 const digest = if (!actual_hit) digest: {
5686 var arena_allocator = std.heap.ArenaAllocator.init(comp.gpa);
5687 defer arena_allocator.deinit();
5688 const arena = arena_allocator.allocator();
5689
5690 const tmp_digest = man.hash.peek();
5691 const tmp_dir_sub_path = try fs.path.join(arena, &[_][]const u8{ "o", &tmp_digest });
5692 var zig_cache_tmp_dir = try comp.dirs.local_cache.handle.makeOpenPath(tmp_dir_sub_path, .{});
5693 defer zig_cache_tmp_dir.close();
5694 const cimport_basename = "cimport.h";
5695 const out_h_path = try comp.dirs.local_cache.join(arena, &[_][]const u8{
5696 tmp_dir_sub_path, cimport_basename,
5697 });
5698 const out_dep_path = try std.fmt.allocPrint(arena, "{s}.d", .{out_h_path});
5699
5700 try zig_cache_tmp_dir.writeFile(.{ .sub_path = cimport_basename, .data = c_src });
5701 if (comp.verbose_cimport) {
5702 log.info("C import source: {s}", .{out_h_path});
5703 }
5704
5705 var argv = std.array_list.Managed([]const u8).init(comp.gpa);
5706 defer argv.deinit();
5707
5708 try argv.append(@tagName(comp.config.c_frontend)); // argv[0] is program name, actual args start at [1]
5709 try comp.addTranslateCCArgs(arena, &argv, .c, out_dep_path, owner_mod);
5710
5711 try argv.append(out_h_path);
5712
5713 if (comp.verbose_cc) {
5714 dump_argv(argv.items);
5715 }
5716 var tree = switch (comp.config.c_frontend) {
5717 .aro => tree: {
5718 if (true) @panic("TODO");
5719 break :tree undefined;
5720 },
5721 .clang => tree: {
5722 if (!build_options.have_llvm) unreachable;
5723 const translate_c = @import("translate_c.zig");
5724
5725 // Convert to null terminated args.
5726 const new_argv_with_sentinel = try arena.alloc(?[*:0]const u8, argv.items.len + 1);
5727 new_argv_with_sentinel[argv.items.len] = null;
5728 const new_argv = new_argv_with_sentinel[0..argv.items.len :null];
5729 for (argv.items, 0..) |arg, i| {
5730 new_argv[i] = try arena.dupeZ(u8, arg);
5731 }
5732
5733 const c_headers_dir_path_z = try comp.dirs.zig_lib.joinZ(arena, &.{"include"});
5734 var errors = std.zig.ErrorBundle.empty;
5735 errdefer errors.deinit(comp.gpa);
5736 break :tree translate_c.translate(
5737 comp.gpa,
5738 new_argv.ptr,
5739 new_argv.ptr + new_argv.len,
5740 &errors,
5741 c_headers_dir_path_z,
5742 ) catch |err| switch (err) {
5743 error.OutOfMemory => return error.OutOfMemory,
5744 error.SemanticAnalyzeFail => {
5745 return CImportResult{
5746 .digest = undefined,
5747 .cache_hit = actual_hit,
5748 .errors = errors,
5749 };
5750 },
5751 };
5752 },
5753 };
5754 defer tree.deinit(comp.gpa);
5755
5756 if (comp.verbose_cimport) {
5757 log.info("C import .d file: {s}", .{out_dep_path});
5758 }
5759
5760 const dep_basename = fs.path.basename(out_dep_path);
5761 try man.addDepFilePost(zig_cache_tmp_dir, dep_basename);
5762 switch (comp.cache_use) {
5763 .whole => |whole| if (whole.cache_manifest) |whole_cache_manifest| {
5764 whole.cache_manifest_mutex.lock();
5765 defer whole.cache_manifest_mutex.unlock();
5766 try whole_cache_manifest.addDepFilePost(zig_cache_tmp_dir, dep_basename);
5767 },
5768 .incremental, .none => {},
5769 }
5770
5771 const bin_digest = man.finalBin();
5772 const hex_digest = Cache.binToHex(bin_digest);
5773 const o_sub_path = "o" ++ fs.path.sep_str ++ hex_digest;
5774 var o_dir = try comp.dirs.local_cache.handle.makeOpenPath(o_sub_path, .{});
5775 defer o_dir.close();
5776
5777 var out_zig_file = try o_dir.createFile(cimport_zig_basename, .{});
5778 defer out_zig_file.close();
5779
5780 const formatted = try tree.renderAlloc(comp.gpa);
5781 defer comp.gpa.free(formatted);
5782
5783 try out_zig_file.writeAll(formatted);
5784
5785 break :digest bin_digest;
5786 } else man.finalBin();
5787
5788 if (man.have_exclusive_lock) {
5789 // Write the updated manifest. This is a no-op if the manifest is not dirty. Note that it is
5790 // possible we had a hit and the manifest is dirty, for example if the file mtime changed but
5791 // the contents were the same, we hit the cache but the manifest is dirty and we need to update
5792 // it to prevent doing a full file content comparison the next time around.
5793 man.writeManifest() catch |err| {
5794 log.warn("failed to write cache manifest for C import: {s}", .{@errorName(err)});
5795 };
5796 }
5797
5798 return CImportResult{
5799 .digest = digest,
5800 .cache_hit = actual_hit,
5801 .errors = std.zig.ErrorBundle.empty,
5802 };
5660 _ = comp;
5661 _ = c_src;
5662 _ = owner_mod;
5663 @panic("TODO execute 'zig translate-c' as a sub process and use the results");
58035664}
58045665
58055666fn workerUpdateCObject(
......@@ -6739,20 +6600,6 @@ pub fn tmpFilePath(comp: Compilation, ally: Allocator, suffix: []const u8) error
67396600 }
67406601}
67416602
6742pub fn addTranslateCCArgs(
6743 comp: *Compilation,
6744 arena: Allocator,
6745 argv: *std.array_list.Managed([]const u8),
6746 ext: FileExt,
6747 out_dep_path: ?[]const u8,
6748 owner_mod: *Package.Module,
6749) !void {
6750 try argv.appendSlice(&.{ "-x", "c" });
6751 try comp.addCCArgs(arena, argv, ext, out_dep_path, owner_mod);
6752 // This gives us access to preprocessing entities, presumably at the cost of performance.
6753 try argv.appendSlice(&.{ "-Xclang", "-detailed-preprocessing-record" });
6754}
6755
67566603/// Add common C compiler args between translate-c and C object compilation.
67576604pub fn addCCArgs(
67586605 comp: *const Compilation,
src/Zcu.zig-1
......@@ -32,7 +32,6 @@ const Sema = @import("Sema.zig");
3232const target_util = @import("target.zig");
3333const build_options = @import("build_options");
3434const isUpDir = @import("introspect.zig").isUpDir;
35const clang = @import("clang.zig");
3635const InternPool = @import("InternPool.zig");
3736const Alignment = InternPool.Alignment;
3837const AnalUnit = InternPool.AnalUnit;
src/clang.zig deleted-2277
......@@ -1,2277 +0,0 @@
1const std = @import("std");
2pub const builtin = @import("builtin");
3
4pub const SourceLocation = extern struct {
5 ID: c_uint,
6
7 pub const eq = ZigClangSourceLocation_eq;
8 extern fn ZigClangSourceLocation_eq(a: SourceLocation, b: SourceLocation) bool;
9};
10
11pub const QualType = extern struct {
12 ptr: ?*anyopaque,
13
14 pub const getCanonicalType = ZigClangQualType_getCanonicalType;
15 extern fn ZigClangQualType_getCanonicalType(QualType) QualType;
16
17 pub const getTypePtr = ZigClangQualType_getTypePtr;
18 extern fn ZigClangQualType_getTypePtr(QualType) *const Type;
19
20 pub const getTypeClass = ZigClangQualType_getTypeClass;
21 extern fn ZigClangQualType_getTypeClass(QualType) TypeClass;
22
23 pub const addConst = ZigClangQualType_addConst;
24 extern fn ZigClangQualType_addConst(*QualType) void;
25
26 pub const eq = ZigClangQualType_eq;
27 extern fn ZigClangQualType_eq(QualType, arg1: QualType) bool;
28
29 pub const isConstQualified = ZigClangQualType_isConstQualified;
30 extern fn ZigClangQualType_isConstQualified(QualType) bool;
31
32 pub const isVolatileQualified = ZigClangQualType_isVolatileQualified;
33 extern fn ZigClangQualType_isVolatileQualified(QualType) bool;
34
35 pub const isRestrictQualified = ZigClangQualType_isRestrictQualified;
36 extern fn ZigClangQualType_isRestrictQualified(QualType) bool;
37};
38
39pub const APValueLValueBase = extern struct {
40 Ptr: ?*anyopaque align(@alignOf(u64)),
41 State: extern union {
42 Local: extern struct {
43 CallIndex: c_uint,
44 Version: c_uint,
45 },
46 TypeInfoType: ?*anyopaque,
47 DynamicAllocType: ?*anyopaque,
48 },
49
50 pub const dyn_cast_Expr = ZigClangAPValueLValueBase_dyn_cast_Expr;
51 extern fn ZigClangAPValueLValueBase_dyn_cast_Expr(APValueLValueBase) ?*const Expr;
52};
53
54pub const APValueKind = enum(c_int) {
55 None,
56 Indeterminate,
57 Int,
58 Float,
59 FixedPoint,
60 ComplexInt,
61 ComplexFloat,
62 LValue,
63 Vector,
64 Array,
65 Struct,
66 Union,
67 MemberPointer,
68 AddrLabelDiff,
69};
70
71pub const APValue = extern struct {
72 Kind: APValueKind align(if (builtin.cpu.arch == .x86 and builtin.os.tag != .windows) 4 else 8),
73 Data: if (builtin.cpu.arch == .x86 and builtin.os.tag != .windows) [44]u8 else [52]u8,
74
75 pub const getKind = ZigClangAPValue_getKind;
76 extern fn ZigClangAPValue_getKind(*const APValue) APValueKind;
77
78 pub const getInt = ZigClangAPValue_getInt;
79 extern fn ZigClangAPValue_getInt(*const APValue) *const APSInt;
80
81 pub const getArrayInitializedElts = ZigClangAPValue_getArrayInitializedElts;
82 extern fn ZigClangAPValue_getArrayInitializedElts(*const APValue) c_uint;
83
84 pub const getArraySize = ZigClangAPValue_getArraySize;
85 extern fn ZigClangAPValue_getArraySize(*const APValue) c_uint;
86
87 pub const getLValueBase = ZigClangAPValue_getLValueBase;
88 extern fn ZigClangAPValue_getLValueBase(*const APValue) APValueLValueBase;
89};
90
91pub const ExprEvalResult = extern struct {
92 HasSideEffects: bool,
93 HasUndefinedBehavior: bool,
94 SmallVectorImpl: ?*anyopaque,
95 Val: APValue,
96};
97
98pub const AbstractConditionalOperator = opaque {
99 pub const getCond = ZigClangAbstractConditionalOperator_getCond;
100 extern fn ZigClangAbstractConditionalOperator_getCond(*const AbstractConditionalOperator) *const Expr;
101
102 pub const getTrueExpr = ZigClangAbstractConditionalOperator_getTrueExpr;
103 extern fn ZigClangAbstractConditionalOperator_getTrueExpr(*const AbstractConditionalOperator) *const Expr;
104
105 pub const getFalseExpr = ZigClangAbstractConditionalOperator_getFalseExpr;
106 extern fn ZigClangAbstractConditionalOperator_getFalseExpr(*const AbstractConditionalOperator) *const Expr;
107};
108
109pub const APFloat = opaque {
110 pub const toString = ZigClangAPFloat_toString;
111 extern fn ZigClangAPFloat_toString(*const APFloat, precision: c_uint, maxPadding: c_uint, truncateZero: bool) [*:0]const u8;
112};
113
114pub const APFloatBaseSemantics = enum(c_int) {
115 IEEEhalf,
116 BFloat,
117 IEEEsingle,
118 IEEEdouble,
119 IEEEquad,
120 PPCDoubleDouble,
121 PPCDoubleDoubleLegacy,
122 Float8E5M2,
123 Float8E5M2FNUZ,
124 Float8E4M3,
125 Float8E4M3FN,
126 Float8E4M3FNUZ,
127 Float8E4M3B11FNUZ,
128 Float8E3M4,
129 FloatTF32,
130 Float8E8M0FNU,
131 Float6E3M2FN,
132 Float6E2M3FN,
133 Float4E2M1FN,
134 x87DoubleExtended,
135};
136
137pub const APInt = opaque {
138 pub const free = ZigClangAPInt_free;
139 extern fn ZigClangAPInt_free(*const APInt) void;
140
141 pub fn getLimitedValue(self: *const APInt, comptime T: type) T {
142 return @as(T, @truncate(ZigClangAPInt_getLimitedValue(self, std.math.maxInt(T))));
143 }
144 extern fn ZigClangAPInt_getLimitedValue(*const APInt, limit: u64) u64;
145};
146
147pub const APSInt = opaque {
148 pub const isSigned = ZigClangAPSInt_isSigned;
149 extern fn ZigClangAPSInt_isSigned(*const APSInt) bool;
150
151 pub const isNegative = ZigClangAPSInt_isNegative;
152 extern fn ZigClangAPSInt_isNegative(*const APSInt) bool;
153
154 pub const negate = ZigClangAPSInt_negate;
155 extern fn ZigClangAPSInt_negate(*const APSInt) *const APSInt;
156
157 pub const free = ZigClangAPSInt_free;
158 extern fn ZigClangAPSInt_free(*const APSInt) void;
159
160 pub const getRawData = ZigClangAPSInt_getRawData;
161 extern fn ZigClangAPSInt_getRawData(*const APSInt) [*:0]const u64;
162
163 pub const getNumWords = ZigClangAPSInt_getNumWords;
164 extern fn ZigClangAPSInt_getNumWords(*const APSInt) c_uint;
165
166 pub const lessThanEqual = ZigClangAPSInt_lessThanEqual;
167 extern fn ZigClangAPSInt_lessThanEqual(*const APSInt, rhs: u64) bool;
168};
169
170pub const ASTContext = opaque {
171 pub const getPointerType = ZigClangASTContext_getPointerType;
172 extern fn ZigClangASTContext_getPointerType(*const ASTContext, T: QualType) QualType;
173};
174
175pub const ASTUnit = opaque {
176 pub const delete = ZigClangASTUnit_delete;
177 extern fn ZigClangASTUnit_delete(*ASTUnit) void;
178
179 pub const getASTContext = ZigClangASTUnit_getASTContext;
180 extern fn ZigClangASTUnit_getASTContext(*ASTUnit) *ASTContext;
181
182 pub const getSourceManager = ZigClangASTUnit_getSourceManager;
183 extern fn ZigClangASTUnit_getSourceManager(*ASTUnit) *SourceManager;
184
185 pub const visitLocalTopLevelDecls = ZigClangASTUnit_visitLocalTopLevelDecls;
186 extern fn ZigClangASTUnit_visitLocalTopLevelDecls(
187 *ASTUnit,
188 context: ?*anyopaque,
189 Fn: ?*const fn (?*anyopaque, *const Decl) callconv(.c) bool,
190 ) bool;
191
192 pub const getLocalPreprocessingEntities_begin = ZigClangASTUnit_getLocalPreprocessingEntities_begin;
193 extern fn ZigClangASTUnit_getLocalPreprocessingEntities_begin(*ASTUnit) PreprocessingRecord.iterator;
194
195 pub const getLocalPreprocessingEntities_end = ZigClangASTUnit_getLocalPreprocessingEntities_end;
196 extern fn ZigClangASTUnit_getLocalPreprocessingEntities_end(*ASTUnit) PreprocessingRecord.iterator;
197};
198
199pub const ArraySubscriptExpr = opaque {
200 pub const getBase = ZigClangArraySubscriptExpr_getBase;
201 extern fn ZigClangArraySubscriptExpr_getBase(*const ArraySubscriptExpr) *const Expr;
202
203 pub const getIdx = ZigClangArraySubscriptExpr_getIdx;
204 extern fn ZigClangArraySubscriptExpr_getIdx(*const ArraySubscriptExpr) *const Expr;
205};
206
207pub const ArrayType = opaque {
208 pub const getElementType = ZigClangArrayType_getElementType;
209 extern fn ZigClangArrayType_getElementType(*const ArrayType) QualType;
210};
211
212pub const ASTRecordLayout = opaque {
213 pub const getFieldOffset = ZigClangASTRecordLayout_getFieldOffset;
214 extern fn ZigClangASTRecordLayout_getFieldOffset(*const ASTRecordLayout, c_uint) u64;
215
216 pub const getAlignment = ZigClangASTRecordLayout_getAlignment;
217 extern fn ZigClangASTRecordLayout_getAlignment(*const ASTRecordLayout) i64;
218};
219
220pub const AttributedType = opaque {
221 pub const getEquivalentType = ZigClangAttributedType_getEquivalentType;
222 extern fn ZigClangAttributedType_getEquivalentType(*const AttributedType) QualType;
223};
224
225pub const BinaryOperator = opaque {
226 pub const getOpcode = ZigClangBinaryOperator_getOpcode;
227 extern fn ZigClangBinaryOperator_getOpcode(*const BinaryOperator) BO;
228
229 pub const getBeginLoc = ZigClangBinaryOperator_getBeginLoc;
230 extern fn ZigClangBinaryOperator_getBeginLoc(*const BinaryOperator) SourceLocation;
231
232 pub const getLHS = ZigClangBinaryOperator_getLHS;
233 extern fn ZigClangBinaryOperator_getLHS(*const BinaryOperator) *const Expr;
234
235 pub const getRHS = ZigClangBinaryOperator_getRHS;
236 extern fn ZigClangBinaryOperator_getRHS(*const BinaryOperator) *const Expr;
237
238 pub const getType = ZigClangBinaryOperator_getType;
239 extern fn ZigClangBinaryOperator_getType(*const BinaryOperator) QualType;
240};
241
242pub const BinaryConditionalOperator = opaque {};
243
244pub const BreakStmt = opaque {};
245
246pub const BuiltinType = opaque {
247 pub const getKind = ZigClangBuiltinType_getKind;
248 extern fn ZigClangBuiltinType_getKind(*const BuiltinType) BuiltinTypeKind;
249};
250
251pub const CStyleCastExpr = opaque {
252 pub const getBeginLoc = ZigClangCStyleCastExpr_getBeginLoc;
253 extern fn ZigClangCStyleCastExpr_getBeginLoc(*const CStyleCastExpr) SourceLocation;
254
255 pub const getSubExpr = ZigClangCStyleCastExpr_getSubExpr;
256 extern fn ZigClangCStyleCastExpr_getSubExpr(*const CStyleCastExpr) *const Expr;
257
258 pub const getType = ZigClangCStyleCastExpr_getType;
259 extern fn ZigClangCStyleCastExpr_getType(*const CStyleCastExpr) QualType;
260};
261
262pub const CallExpr = opaque {
263 pub const getCallee = ZigClangCallExpr_getCallee;
264 extern fn ZigClangCallExpr_getCallee(*const CallExpr) *const Expr;
265
266 pub const getNumArgs = ZigClangCallExpr_getNumArgs;
267 extern fn ZigClangCallExpr_getNumArgs(*const CallExpr) c_uint;
268
269 pub const getArgs = ZigClangCallExpr_getArgs;
270 extern fn ZigClangCallExpr_getArgs(*const CallExpr) [*]const *const Expr;
271};
272
273pub const CaseStmt = opaque {
274 pub const getLHS = ZigClangCaseStmt_getLHS;
275 extern fn ZigClangCaseStmt_getLHS(*const CaseStmt) *const Expr;
276
277 pub const getRHS = ZigClangCaseStmt_getRHS;
278 extern fn ZigClangCaseStmt_getRHS(*const CaseStmt) ?*const Expr;
279
280 pub const getBeginLoc = ZigClangCaseStmt_getBeginLoc;
281 extern fn ZigClangCaseStmt_getBeginLoc(*const CaseStmt) SourceLocation;
282
283 pub const getSubStmt = ZigClangCaseStmt_getSubStmt;
284 extern fn ZigClangCaseStmt_getSubStmt(*const CaseStmt) *const Stmt;
285};
286
287pub const CastExpr = opaque {
288 pub const getCastKind = ZigClangCastExpr_getCastKind;
289 extern fn ZigClangCastExpr_getCastKind(*const CastExpr) CK;
290
291 pub const getTargetFieldForToUnionCast = ZigClangCastExpr_getTargetFieldForToUnionCast;
292 extern fn ZigClangCastExpr_getTargetFieldForToUnionCast(*const CastExpr, QualType, QualType) ?*const FieldDecl;
293};
294
295pub const CharacterLiteral = opaque {
296 pub const getBeginLoc = ZigClangCharacterLiteral_getBeginLoc;
297 extern fn ZigClangCharacterLiteral_getBeginLoc(*const CharacterLiteral) SourceLocation;
298
299 pub const getKind = ZigClangCharacterLiteral_getKind;
300 extern fn ZigClangCharacterLiteral_getKind(*const CharacterLiteral) CharacterLiteralKind;
301
302 pub const getValue = ZigClangCharacterLiteral_getValue;
303 extern fn ZigClangCharacterLiteral_getValue(*const CharacterLiteral) c_uint;
304};
305
306pub const ChooseExpr = opaque {
307 pub const getChosenSubExpr = ZigClangChooseExpr_getChosenSubExpr;
308 extern fn ZigClangChooseExpr_getChosenSubExpr(*const ChooseExpr) *const Expr;
309};
310
311pub const CompoundAssignOperator = opaque {
312 pub const getType = ZigClangCompoundAssignOperator_getType;
313 extern fn ZigClangCompoundAssignOperator_getType(*const CompoundAssignOperator) QualType;
314
315 pub const getComputationLHSType = ZigClangCompoundAssignOperator_getComputationLHSType;
316 extern fn ZigClangCompoundAssignOperator_getComputationLHSType(*const CompoundAssignOperator) QualType;
317
318 pub const getComputationResultType = ZigClangCompoundAssignOperator_getComputationResultType;
319 extern fn ZigClangCompoundAssignOperator_getComputationResultType(*const CompoundAssignOperator) QualType;
320
321 pub const getBeginLoc = ZigClangCompoundAssignOperator_getBeginLoc;
322 extern fn ZigClangCompoundAssignOperator_getBeginLoc(*const CompoundAssignOperator) SourceLocation;
323
324 pub const getOpcode = ZigClangCompoundAssignOperator_getOpcode;
325 extern fn ZigClangCompoundAssignOperator_getOpcode(*const CompoundAssignOperator) BO;
326
327 pub const getLHS = ZigClangCompoundAssignOperator_getLHS;
328 extern fn ZigClangCompoundAssignOperator_getLHS(*const CompoundAssignOperator) *const Expr;
329
330 pub const getRHS = ZigClangCompoundAssignOperator_getRHS;
331 extern fn ZigClangCompoundAssignOperator_getRHS(*const CompoundAssignOperator) *const Expr;
332};
333
334pub const CompoundLiteralExpr = opaque {
335 pub const getInitializer = ZigClangCompoundLiteralExpr_getInitializer;
336 extern fn ZigClangCompoundLiteralExpr_getInitializer(*const CompoundLiteralExpr) *const Expr;
337};
338
339pub const CompoundStmt = opaque {
340 pub const body_begin = ZigClangCompoundStmt_body_begin;
341 extern fn ZigClangCompoundStmt_body_begin(*const CompoundStmt) ConstBodyIterator;
342
343 pub const body_end = ZigClangCompoundStmt_body_end;
344 extern fn ZigClangCompoundStmt_body_end(*const CompoundStmt) ConstBodyIterator;
345
346 pub const ConstBodyIterator = [*]const *Stmt;
347};
348
349pub const ConditionalOperator = opaque {};
350
351pub const ConstantArrayType = opaque {
352 pub const getElementType = ZigClangConstantArrayType_getElementType;
353 extern fn ZigClangConstantArrayType_getElementType(*const ConstantArrayType) QualType;
354
355 pub const getSize = ZigClangConstantArrayType_getSize;
356 extern fn ZigClangConstantArrayType_getSize(*const ConstantArrayType, **const APInt) void;
357};
358
359pub const ConstantExpr = opaque {};
360
361pub const ContinueStmt = opaque {};
362
363pub const ConvertVectorExpr = opaque {
364 pub const getSrcExpr = ZigClangConvertVectorExpr_getSrcExpr;
365 extern fn ZigClangConvertVectorExpr_getSrcExpr(*const ConvertVectorExpr) *const Expr;
366
367 pub const getTypeSourceInfo_getType = ZigClangConvertVectorExpr_getTypeSourceInfo_getType;
368 extern fn ZigClangConvertVectorExpr_getTypeSourceInfo_getType(*const ConvertVectorExpr) QualType;
369};
370
371pub const DecayedType = opaque {
372 pub const getDecayedType = ZigClangDecayedType_getDecayedType;
373 extern fn ZigClangDecayedType_getDecayedType(*const DecayedType) QualType;
374};
375
376pub const Decl = opaque {
377 pub const getLocation = ZigClangDecl_getLocation;
378 extern fn ZigClangDecl_getLocation(*const Decl) SourceLocation;
379
380 pub const castToNamedDecl = ZigClangDecl_castToNamedDecl;
381 extern fn ZigClangDecl_castToNamedDecl(decl: *const Decl) ?*const NamedDecl;
382
383 pub const getKind = ZigClangDecl_getKind;
384 extern fn ZigClangDecl_getKind(decl: *const Decl) DeclKind;
385
386 pub const getDeclKindName = ZigClangDecl_getDeclKindName;
387 extern fn ZigClangDecl_getDeclKindName(decl: *const Decl) [*:0]const u8;
388};
389
390pub const DeclRefExpr = opaque {
391 pub const getDecl = ZigClangDeclRefExpr_getDecl;
392 extern fn ZigClangDeclRefExpr_getDecl(*const DeclRefExpr) *const ValueDecl;
393
394 pub const getFoundDecl = ZigClangDeclRefExpr_getFoundDecl;
395 extern fn ZigClangDeclRefExpr_getFoundDecl(*const DeclRefExpr) *const NamedDecl;
396};
397
398pub const DeclStmt = opaque {
399 pub const decl_begin = ZigClangDeclStmt_decl_begin;
400 extern fn ZigClangDeclStmt_decl_begin(*const DeclStmt) const_decl_iterator;
401
402 pub const decl_end = ZigClangDeclStmt_decl_end;
403 extern fn ZigClangDeclStmt_decl_end(*const DeclStmt) const_decl_iterator;
404
405 pub const const_decl_iterator = [*]const *Decl;
406};
407
408pub const DefaultStmt = opaque {
409 pub const getSubStmt = ZigClangDefaultStmt_getSubStmt;
410 extern fn ZigClangDefaultStmt_getSubStmt(*const DefaultStmt) *const Stmt;
411};
412
413pub const DiagnosticOptions = opaque {};
414
415pub const DiagnosticsEngine = opaque {};
416
417pub const DoStmt = opaque {
418 pub const getCond = ZigClangDoStmt_getCond;
419 extern fn ZigClangDoStmt_getCond(*const DoStmt) *const Expr;
420
421 pub const getBody = ZigClangDoStmt_getBody;
422 extern fn ZigClangDoStmt_getBody(*const DoStmt) *const Stmt;
423};
424
425pub const ElaboratedType = opaque {
426 pub const getNamedType = ZigClangElaboratedType_getNamedType;
427 extern fn ZigClangElaboratedType_getNamedType(*const ElaboratedType) QualType;
428};
429
430pub const EnumConstantDecl = opaque {
431 pub const getInitVal = ZigClangEnumConstantDecl_getInitVal;
432 extern fn ZigClangEnumConstantDecl_getInitVal(*const EnumConstantDecl) *const APSInt;
433};
434
435pub const EnumDecl = opaque {
436 pub const getCanonicalDecl = ZigClangEnumDecl_getCanonicalDecl;
437 extern fn ZigClangEnumDecl_getCanonicalDecl(*const EnumDecl) ?*const TagDecl;
438
439 pub const getIntegerType = ZigClangEnumDecl_getIntegerType;
440 extern fn ZigClangEnumDecl_getIntegerType(*const EnumDecl) QualType;
441
442 pub const getDefinition = ZigClangEnumDecl_getDefinition;
443 extern fn ZigClangEnumDecl_getDefinition(*const EnumDecl) ?*const EnumDecl;
444
445 pub const getLocation = ZigClangEnumDecl_getLocation;
446 extern fn ZigClangEnumDecl_getLocation(*const EnumDecl) SourceLocation;
447
448 pub const enumerator_begin = ZigClangEnumDecl_enumerator_begin;
449 extern fn ZigClangEnumDecl_enumerator_begin(*const EnumDecl) enumerator_iterator;
450
451 pub const enumerator_end = ZigClangEnumDecl_enumerator_end;
452 extern fn ZigClangEnumDecl_enumerator_end(*const EnumDecl) enumerator_iterator;
453
454 pub const enumerator_iterator = extern struct {
455 ptr: *anyopaque,
456
457 pub const next = ZigClangEnumDecl_enumerator_iterator_next;
458 extern fn ZigClangEnumDecl_enumerator_iterator_next(enumerator_iterator) enumerator_iterator;
459
460 pub const deref = ZigClangEnumDecl_enumerator_iterator_deref;
461 extern fn ZigClangEnumDecl_enumerator_iterator_deref(enumerator_iterator) *const EnumConstantDecl;
462
463 pub const neq = ZigClangEnumDecl_enumerator_iterator_neq;
464 extern fn ZigClangEnumDecl_enumerator_iterator_neq(enumerator_iterator, enumerator_iterator) bool;
465 };
466};
467
468pub const EnumType = opaque {
469 pub const getDecl = ZigClangEnumType_getDecl;
470 extern fn ZigClangEnumType_getDecl(*const EnumType) *const EnumDecl;
471};
472
473pub const Expr = opaque {
474 pub const getStmtClass = ZigClangExpr_getStmtClass;
475 extern fn ZigClangExpr_getStmtClass(*const Expr) StmtClass;
476
477 pub const getType = ZigClangExpr_getType;
478 extern fn ZigClangExpr_getType(*const Expr) QualType;
479
480 pub const getBeginLoc = ZigClangExpr_getBeginLoc;
481 extern fn ZigClangExpr_getBeginLoc(*const Expr) SourceLocation;
482
483 pub const evaluateAsConstantExpr = ZigClangExpr_EvaluateAsConstantExpr;
484 extern fn ZigClangExpr_EvaluateAsConstantExpr(*const Expr, *ExprEvalResult, Expr_ConstantExprKind, *const ASTContext) bool;
485
486 pub const castToStringLiteral = ZigClangExpr_castToStringLiteral;
487 extern fn ZigClangExpr_castToStringLiteral(*const Expr) ?*const StringLiteral;
488};
489
490pub const FieldDecl = opaque {
491 pub const getCanonicalDecl = ZigClangFieldDecl_getCanonicalDecl;
492 extern fn ZigClangFieldDecl_getCanonicalDecl(*const FieldDecl) ?*const FieldDecl;
493
494 pub const getAlignedAttribute = ZigClangFieldDecl_getAlignedAttribute;
495 extern fn ZigClangFieldDecl_getAlignedAttribute(*const FieldDecl, *const ASTContext) c_uint;
496
497 pub const getPackedAttribute = ZigClangFieldDecl_getPackedAttribute;
498 extern fn ZigClangFieldDecl_getPackedAttribute(*const FieldDecl) bool;
499
500 pub const isAnonymousStructOrUnion = ZigClangFieldDecl_isAnonymousStructOrUnion;
501 extern fn ZigClangFieldDecl_isAnonymousStructOrUnion(*const FieldDecl) bool;
502
503 pub const isBitField = ZigClangFieldDecl_isBitField;
504 extern fn ZigClangFieldDecl_isBitField(*const FieldDecl) bool;
505
506 pub const getType = ZigClangFieldDecl_getType;
507 extern fn ZigClangFieldDecl_getType(*const FieldDecl) QualType;
508
509 pub const getLocation = ZigClangFieldDecl_getLocation;
510 extern fn ZigClangFieldDecl_getLocation(*const FieldDecl) SourceLocation;
511
512 pub const getParent = ZigClangFieldDecl_getParent;
513 extern fn ZigClangFieldDecl_getParent(*const FieldDecl) ?*const RecordDecl;
514
515 pub const getFieldIndex = ZigClangFieldDecl_getFieldIndex;
516 extern fn ZigClangFieldDecl_getFieldIndex(*const FieldDecl) c_uint;
517};
518
519pub const FileID = opaque {};
520
521pub const FloatingLiteral = opaque {
522 pub const getValueAsApproximateDouble = ZigClangFloatingLiteral_getValueAsApproximateDouble;
523 extern fn ZigClangFloatingLiteral_getValueAsApproximateDouble(*const FloatingLiteral) f64;
524
525 pub const getValueAsApproximateQuadBits = ZigClangFloatingLiteral_getValueAsApproximateQuadBits;
526 extern fn ZigClangFloatingLiteral_getValueAsApproximateQuadBits(*const FloatingLiteral, low: *u64, high: *u64) void;
527
528 pub const getBeginLoc = ZigClangFloatingLiteral_getBeginLoc;
529 extern fn ZigClangFloatingLiteral_getBeginLoc(*const FloatingLiteral) SourceLocation;
530
531 pub const getRawSemantics = ZigClangFloatingLiteral_getRawSemantics;
532 extern fn ZigClangFloatingLiteral_getRawSemantics(*const FloatingLiteral) APFloatBaseSemantics;
533};
534
535pub const ForStmt = opaque {
536 pub const getInit = ZigClangForStmt_getInit;
537 extern fn ZigClangForStmt_getInit(*const ForStmt) ?*const Stmt;
538
539 pub const getCond = ZigClangForStmt_getCond;
540 extern fn ZigClangForStmt_getCond(*const ForStmt) ?*const Expr;
541
542 pub const getInc = ZigClangForStmt_getInc;
543 extern fn ZigClangForStmt_getInc(*const ForStmt) ?*const Expr;
544
545 pub const getBody = ZigClangForStmt_getBody;
546 extern fn ZigClangForStmt_getBody(*const ForStmt) *const Stmt;
547};
548
549pub const FullSourceLoc = opaque {};
550
551pub const FunctionDecl = opaque {
552 pub const getType = ZigClangFunctionDecl_getType;
553 extern fn ZigClangFunctionDecl_getType(*const FunctionDecl) QualType;
554
555 pub const getLocation = ZigClangFunctionDecl_getLocation;
556 extern fn ZigClangFunctionDecl_getLocation(*const FunctionDecl) SourceLocation;
557
558 pub const hasBody = ZigClangFunctionDecl_hasBody;
559 extern fn ZigClangFunctionDecl_hasBody(*const FunctionDecl) bool;
560
561 pub const getStorageClass = ZigClangFunctionDecl_getStorageClass;
562 extern fn ZigClangFunctionDecl_getStorageClass(*const FunctionDecl) StorageClass;
563
564 pub const getParamDecl = ZigClangFunctionDecl_getParamDecl;
565 extern fn ZigClangFunctionDecl_getParamDecl(*const FunctionDecl, i: c_uint) *const ParmVarDecl;
566
567 pub const getBody = ZigClangFunctionDecl_getBody;
568 extern fn ZigClangFunctionDecl_getBody(*const FunctionDecl) *const Stmt;
569
570 pub const doesDeclarationForceExternallyVisibleDefinition = ZigClangFunctionDecl_doesDeclarationForceExternallyVisibleDefinition;
571 extern fn ZigClangFunctionDecl_doesDeclarationForceExternallyVisibleDefinition(*const FunctionDecl) bool;
572
573 pub const isThisDeclarationADefinition = ZigClangFunctionDecl_isThisDeclarationADefinition;
574 extern fn ZigClangFunctionDecl_isThisDeclarationADefinition(*const FunctionDecl) bool;
575
576 pub const doesThisDeclarationHaveABody = ZigClangFunctionDecl_doesThisDeclarationHaveABody;
577 extern fn ZigClangFunctionDecl_doesThisDeclarationHaveABody(*const FunctionDecl) bool;
578
579 pub const isInlineSpecified = ZigClangFunctionDecl_isInlineSpecified;
580 extern fn ZigClangFunctionDecl_isInlineSpecified(*const FunctionDecl) bool;
581
582 pub const hasAlwaysInlineAttr = ZigClangFunctionDecl_hasAlwaysInlineAttr;
583 extern fn ZigClangFunctionDecl_hasAlwaysInlineAttr(*const FunctionDecl) bool;
584
585 pub const isDefined = ZigClangFunctionDecl_isDefined;
586 extern fn ZigClangFunctionDecl_isDefined(*const FunctionDecl) bool;
587
588 pub const getDefinition = ZigClangFunctionDecl_getDefinition;
589 extern fn ZigClangFunctionDecl_getDefinition(*const FunctionDecl) ?*const FunctionDecl;
590
591 pub const getSectionAttribute = ZigClangFunctionDecl_getSectionAttribute;
592 extern fn ZigClangFunctionDecl_getSectionAttribute(*const FunctionDecl, len: *usize) ?[*]const u8;
593
594 pub const getCanonicalDecl = ZigClangFunctionDecl_getCanonicalDecl;
595 extern fn ZigClangFunctionDecl_getCanonicalDecl(*const FunctionDecl) ?*const FunctionDecl;
596
597 pub const getAlignedAttribute = ZigClangFunctionDecl_getAlignedAttribute;
598 extern fn ZigClangFunctionDecl_getAlignedAttribute(*const FunctionDecl, *const ASTContext) c_uint;
599};
600
601pub const FunctionProtoType = opaque {
602 pub const isVariadic = ZigClangFunctionProtoType_isVariadic;
603 extern fn ZigClangFunctionProtoType_isVariadic(*const FunctionProtoType) bool;
604
605 pub const getNumParams = ZigClangFunctionProtoType_getNumParams;
606 extern fn ZigClangFunctionProtoType_getNumParams(*const FunctionProtoType) c_uint;
607
608 pub const getParamType = ZigClangFunctionProtoType_getParamType;
609 extern fn ZigClangFunctionProtoType_getParamType(*const FunctionProtoType, i: c_uint) QualType;
610
611 pub const getReturnType = ZigClangFunctionProtoType_getReturnType;
612 extern fn ZigClangFunctionProtoType_getReturnType(*const FunctionProtoType) QualType;
613};
614
615pub const FunctionType = opaque {
616 pub const getNoReturnAttr = ZigClangFunctionType_getNoReturnAttr;
617 extern fn ZigClangFunctionType_getNoReturnAttr(*const FunctionType) bool;
618
619 pub const getCallConv = ZigClangFunctionType_getCallConv;
620 extern fn ZigClangFunctionType_getCallConv(*const FunctionType) CallingConv;
621
622 pub const getReturnType = ZigClangFunctionType_getReturnType;
623 extern fn ZigClangFunctionType_getReturnType(*const FunctionType) QualType;
624};
625
626pub const GenericSelectionExpr = opaque {
627 pub const getResultExpr = ZigClangGenericSelectionExpr_getResultExpr;
628 extern fn ZigClangGenericSelectionExpr_getResultExpr(*const GenericSelectionExpr) *const Expr;
629};
630
631pub const IfStmt = opaque {
632 pub const getThen = ZigClangIfStmt_getThen;
633 extern fn ZigClangIfStmt_getThen(*const IfStmt) *const Stmt;
634
635 pub const getElse = ZigClangIfStmt_getElse;
636 extern fn ZigClangIfStmt_getElse(*const IfStmt) ?*const Stmt;
637
638 pub const getCond = ZigClangIfStmt_getCond;
639 extern fn ZigClangIfStmt_getCond(*const IfStmt) *const Stmt;
640};
641
642pub const ImplicitCastExpr = opaque {
643 pub const getBeginLoc = ZigClangImplicitCastExpr_getBeginLoc;
644 extern fn ZigClangImplicitCastExpr_getBeginLoc(*const ImplicitCastExpr) SourceLocation;
645
646 pub const getCastKind = ZigClangImplicitCastExpr_getCastKind;
647 extern fn ZigClangImplicitCastExpr_getCastKind(*const ImplicitCastExpr) CK;
648
649 pub const getSubExpr = ZigClangImplicitCastExpr_getSubExpr;
650 extern fn ZigClangImplicitCastExpr_getSubExpr(*const ImplicitCastExpr) *const Expr;
651};
652
653pub const IncompleteArrayType = opaque {
654 pub const getElementType = ZigClangIncompleteArrayType_getElementType;
655 extern fn ZigClangIncompleteArrayType_getElementType(*const IncompleteArrayType) QualType;
656};
657
658pub const IntegerLiteral = opaque {
659 pub const EvaluateAsInt = ZigClangIntegerLiteral_EvaluateAsInt;
660 extern fn ZigClangIntegerLiteral_EvaluateAsInt(*const IntegerLiteral, *ExprEvalResult, *const ASTContext) bool;
661
662 pub const getBeginLoc = ZigClangIntegerLiteral_getBeginLoc;
663 extern fn ZigClangIntegerLiteral_getBeginLoc(*const IntegerLiteral) SourceLocation;
664
665 pub const getSignum = ZigClangIntegerLiteral_getSignum;
666 extern fn ZigClangIntegerLiteral_getSignum(*const IntegerLiteral, *c_int, *const ASTContext) bool;
667};
668
669/// This is just used as a namespace for a static method on clang's Lexer class; we don't directly
670/// deal with Lexer objects
671pub const Lexer = struct {
672 pub const getLocForEndOfToken = ZigClangLexer_getLocForEndOfToken;
673 extern fn ZigClangLexer_getLocForEndOfToken(SourceLocation, *const SourceManager, *const ASTUnit) SourceLocation;
674};
675
676pub const MacroDefinitionRecord = opaque {
677 pub const getName_getNameStart = ZigClangMacroDefinitionRecord_getName_getNameStart;
678 extern fn ZigClangMacroDefinitionRecord_getName_getNameStart(*const MacroDefinitionRecord) [*:0]const u8;
679
680 pub const getSourceRange_getBegin = ZigClangMacroDefinitionRecord_getSourceRange_getBegin;
681 extern fn ZigClangMacroDefinitionRecord_getSourceRange_getBegin(*const MacroDefinitionRecord) SourceLocation;
682
683 pub const getSourceRange_getEnd = ZigClangMacroDefinitionRecord_getSourceRange_getEnd;
684 extern fn ZigClangMacroDefinitionRecord_getSourceRange_getEnd(*const MacroDefinitionRecord) SourceLocation;
685};
686
687pub const MacroQualifiedType = opaque {
688 pub const getModifiedType = ZigClangMacroQualifiedType_getModifiedType;
689 extern fn ZigClangMacroQualifiedType_getModifiedType(*const MacroQualifiedType) QualType;
690};
691
692pub const TypeOfType = opaque {
693 pub const getUnmodifiedType = ZigClangTypeOfType_getUnmodifiedType;
694 extern fn ZigClangTypeOfType_getUnmodifiedType(*const TypeOfType) QualType;
695};
696
697pub const TypeOfExprType = opaque {
698 pub const getUnderlyingExpr = ZigClangTypeOfExprType_getUnderlyingExpr;
699 extern fn ZigClangTypeOfExprType_getUnderlyingExpr(*const TypeOfExprType) *const Expr;
700};
701
702pub const OffsetOfNode = opaque {
703 pub const getKind = ZigClangOffsetOfNode_getKind;
704 extern fn ZigClangOffsetOfNode_getKind(*const OffsetOfNode) OffsetOfNode_Kind;
705
706 pub const getArrayExprIndex = ZigClangOffsetOfNode_getArrayExprIndex;
707 extern fn ZigClangOffsetOfNode_getArrayExprIndex(*const OffsetOfNode) c_uint;
708
709 pub const getField = ZigClangOffsetOfNode_getField;
710 extern fn ZigClangOffsetOfNode_getField(*const OffsetOfNode) *FieldDecl;
711};
712
713pub const OffsetOfExpr = opaque {
714 pub const getNumComponents = ZigClangOffsetOfExpr_getNumComponents;
715 extern fn ZigClangOffsetOfExpr_getNumComponents(*const OffsetOfExpr) c_uint;
716
717 pub const getNumExpressions = ZigClangOffsetOfExpr_getNumExpressions;
718 extern fn ZigClangOffsetOfExpr_getNumExpressions(*const OffsetOfExpr) c_uint;
719
720 pub const getIndexExpr = ZigClangOffsetOfExpr_getIndexExpr;
721 extern fn ZigClangOffsetOfExpr_getIndexExpr(*const OffsetOfExpr, idx: c_uint) *const Expr;
722
723 pub const getComponent = ZigClangOffsetOfExpr_getComponent;
724 extern fn ZigClangOffsetOfExpr_getComponent(*const OffsetOfExpr, idx: c_uint) *const OffsetOfNode;
725
726 pub const getBeginLoc = ZigClangOffsetOfExpr_getBeginLoc;
727 extern fn ZigClangOffsetOfExpr_getBeginLoc(*const OffsetOfExpr) SourceLocation;
728};
729
730pub const MemberExpr = opaque {
731 pub const getBase = ZigClangMemberExpr_getBase;
732 extern fn ZigClangMemberExpr_getBase(*const MemberExpr) *const Expr;
733
734 pub const isArrow = ZigClangMemberExpr_isArrow;
735 extern fn ZigClangMemberExpr_isArrow(*const MemberExpr) bool;
736
737 pub const getMemberDecl = ZigClangMemberExpr_getMemberDecl;
738 extern fn ZigClangMemberExpr_getMemberDecl(*const MemberExpr) *const ValueDecl;
739};
740
741pub const NamedDecl = opaque {
742 pub const getName_bytes_begin = ZigClangNamedDecl_getName_bytes_begin;
743 extern fn ZigClangNamedDecl_getName_bytes_begin(decl: *const NamedDecl) [*:0]const u8;
744};
745
746pub const None = opaque {};
747
748pub const OpaqueValueExpr = opaque {
749 pub const getSourceExpr = ZigClangOpaqueValueExpr_getSourceExpr;
750 extern fn ZigClangOpaqueValueExpr_getSourceExpr(*const OpaqueValueExpr) ?*const Expr;
751};
752
753pub const PCHContainerOperations = opaque {};
754
755pub const ParenExpr = opaque {
756 pub const getSubExpr = ZigClangParenExpr_getSubExpr;
757 extern fn ZigClangParenExpr_getSubExpr(*const ParenExpr) *const Expr;
758};
759
760pub const ParenType = opaque {
761 pub const getInnerType = ZigClangParenType_getInnerType;
762 extern fn ZigClangParenType_getInnerType(*const ParenType) QualType;
763};
764
765pub const ParmVarDecl = opaque {
766 pub const getOriginalType = ZigClangParmVarDecl_getOriginalType;
767 extern fn ZigClangParmVarDecl_getOriginalType(*const ParmVarDecl) QualType;
768};
769
770pub const PointerType = opaque {};
771
772pub const PredefinedExpr = opaque {
773 pub const getFunctionName = ZigClangPredefinedExpr_getFunctionName;
774 extern fn ZigClangPredefinedExpr_getFunctionName(*const PredefinedExpr) *const StringLiteral;
775};
776
777pub const PreprocessedEntity = opaque {
778 pub const getKind = ZigClangPreprocessedEntity_getKind;
779 extern fn ZigClangPreprocessedEntity_getKind(*const PreprocessedEntity) PreprocessedEntity_EntityKind;
780};
781
782pub const PreprocessingRecord = opaque {
783 pub const iterator = extern struct {
784 I: c_int,
785 Self: *PreprocessingRecord,
786
787 pub const deref = ZigClangPreprocessingRecord_iterator_deref;
788 extern fn ZigClangPreprocessingRecord_iterator_deref(iterator) *PreprocessedEntity;
789 };
790};
791
792pub const RecordDecl = opaque {
793 pub const getCanonicalDecl = ZigClangRecordDecl_getCanonicalDecl;
794 extern fn ZigClangRecordDecl_getCanonicalDecl(*const RecordDecl) ?*const TagDecl;
795
796 pub const isUnion = ZigClangRecordDecl_isUnion;
797 extern fn ZigClangRecordDecl_isUnion(*const RecordDecl) bool;
798
799 pub const isStruct = ZigClangRecordDecl_isStruct;
800 extern fn ZigClangRecordDecl_isStruct(*const RecordDecl) bool;
801
802 pub const isAnonymousStructOrUnion = ZigClangRecordDecl_isAnonymousStructOrUnion;
803 extern fn ZigClangRecordDecl_isAnonymousStructOrUnion(record_decl: ?*const RecordDecl) bool;
804
805 pub const getPackedAttribute = ZigClangRecordDecl_getPackedAttribute;
806 extern fn ZigClangRecordDecl_getPackedAttribute(*const RecordDecl) bool;
807
808 pub const getDefinition = ZigClangRecordDecl_getDefinition;
809 extern fn ZigClangRecordDecl_getDefinition(*const RecordDecl) ?*const RecordDecl;
810
811 pub const getLocation = ZigClangRecordDecl_getLocation;
812 extern fn ZigClangRecordDecl_getLocation(*const RecordDecl) SourceLocation;
813
814 pub const getASTRecordLayout = ZigClangRecordDecl_getASTRecordLayout;
815 extern fn ZigClangRecordDecl_getASTRecordLayout(*const RecordDecl, *const ASTContext) *const ASTRecordLayout;
816
817 pub const field_begin = ZigClangRecordDecl_field_begin;
818 extern fn ZigClangRecordDecl_field_begin(*const RecordDecl) field_iterator;
819
820 pub const field_end = ZigClangRecordDecl_field_end;
821 extern fn ZigClangRecordDecl_field_end(*const RecordDecl) field_iterator;
822
823 pub const field_iterator = extern struct {
824 ptr: *anyopaque,
825
826 pub const next = ZigClangRecordDecl_field_iterator_next;
827 extern fn ZigClangRecordDecl_field_iterator_next(field_iterator) field_iterator;
828
829 pub const deref = ZigClangRecordDecl_field_iterator_deref;
830 extern fn ZigClangRecordDecl_field_iterator_deref(field_iterator) *const FieldDecl;
831
832 pub const neq = ZigClangRecordDecl_field_iterator_neq;
833 extern fn ZigClangRecordDecl_field_iterator_neq(field_iterator, field_iterator) bool;
834 };
835};
836
837pub const RecordType = opaque {
838 pub const getDecl = ZigClangRecordType_getDecl;
839 extern fn ZigClangRecordType_getDecl(*const RecordType) *const RecordDecl;
840};
841
842pub const ReturnStmt = opaque {
843 pub const getRetValue = ZigClangReturnStmt_getRetValue;
844 extern fn ZigClangReturnStmt_getRetValue(*const ReturnStmt) ?*const Expr;
845};
846
847pub const ShuffleVectorExpr = opaque {
848 pub const getNumSubExprs = ZigClangShuffleVectorExpr_getNumSubExprs;
849 extern fn ZigClangShuffleVectorExpr_getNumSubExprs(*const ShuffleVectorExpr) c_uint;
850
851 pub const getExpr = ZigClangShuffleVectorExpr_getExpr;
852 extern fn ZigClangShuffleVectorExpr_getExpr(*const ShuffleVectorExpr, c_uint) *const Expr;
853};
854
855pub const SourceManager = opaque {
856 pub const getSpellingLoc = ZigClangSourceManager_getSpellingLoc;
857 extern fn ZigClangSourceManager_getSpellingLoc(*const SourceManager, Loc: SourceLocation) SourceLocation;
858
859 pub const getFilename = ZigClangSourceManager_getFilename;
860 extern fn ZigClangSourceManager_getFilename(*const SourceManager, SpellingLoc: SourceLocation) ?[*:0]const u8;
861
862 pub const getSpellingLineNumber = ZigClangSourceManager_getSpellingLineNumber;
863 extern fn ZigClangSourceManager_getSpellingLineNumber(*const SourceManager, Loc: SourceLocation) c_uint;
864
865 pub const getSpellingColumnNumber = ZigClangSourceManager_getSpellingColumnNumber;
866 extern fn ZigClangSourceManager_getSpellingColumnNumber(*const SourceManager, Loc: SourceLocation) c_uint;
867
868 pub const getCharacterData = ZigClangSourceManager_getCharacterData;
869 extern fn ZigClangSourceManager_getCharacterData(*const SourceManager, SL: SourceLocation) [*:0]const u8;
870};
871
872pub const SourceRange = opaque {};
873
874pub const Stmt = opaque {
875 pub const getBeginLoc = ZigClangStmt_getBeginLoc;
876 extern fn ZigClangStmt_getBeginLoc(*const Stmt) SourceLocation;
877
878 pub const getStmtClass = ZigClangStmt_getStmtClass;
879 extern fn ZigClangStmt_getStmtClass(*const Stmt) StmtClass;
880
881 pub const classof_Expr = ZigClangStmt_classof_Expr;
882 extern fn ZigClangStmt_classof_Expr(*const Stmt) bool;
883};
884
885pub const StmtExpr = opaque {
886 pub const getSubStmt = ZigClangStmtExpr_getSubStmt;
887 extern fn ZigClangStmtExpr_getSubStmt(*const StmtExpr) *const CompoundStmt;
888};
889
890pub const StringLiteral = opaque {
891 pub const getKind = ZigClangStringLiteral_getKind;
892 extern fn ZigClangStringLiteral_getKind(*const StringLiteral) CharacterLiteralKind;
893
894 pub const getCodeUnit = ZigClangStringLiteral_getCodeUnit;
895 extern fn ZigClangStringLiteral_getCodeUnit(*const StringLiteral, usize) u32;
896
897 pub const getLength = ZigClangStringLiteral_getLength;
898 extern fn ZigClangStringLiteral_getLength(*const StringLiteral) c_uint;
899
900 pub const getCharByteWidth = ZigClangStringLiteral_getCharByteWidth;
901 extern fn ZigClangStringLiteral_getCharByteWidth(*const StringLiteral) c_uint;
902
903 pub const getString_bytes_begin_size = ZigClangStringLiteral_getString_bytes_begin_size;
904 extern fn ZigClangStringLiteral_getString_bytes_begin_size(*const StringLiteral, *usize) [*]const u8;
905};
906
907pub const StringRef = opaque {};
908
909pub const SwitchStmt = opaque {
910 pub const getConditionVariableDeclStmt = ZigClangSwitchStmt_getConditionVariableDeclStmt;
911 extern fn ZigClangSwitchStmt_getConditionVariableDeclStmt(*const SwitchStmt) ?*const DeclStmt;
912
913 pub const getCond = ZigClangSwitchStmt_getCond;
914 extern fn ZigClangSwitchStmt_getCond(*const SwitchStmt) *const Expr;
915
916 pub const getBody = ZigClangSwitchStmt_getBody;
917 extern fn ZigClangSwitchStmt_getBody(*const SwitchStmt) *const Stmt;
918
919 pub const isAllEnumCasesCovered = ZigClangSwitchStmt_isAllEnumCasesCovered;
920 extern fn ZigClangSwitchStmt_isAllEnumCasesCovered(*const SwitchStmt) bool;
921};
922
923pub const TagDecl = opaque {
924 pub const isThisDeclarationADefinition = ZigClangTagDecl_isThisDeclarationADefinition;
925 extern fn ZigClangTagDecl_isThisDeclarationADefinition(*const TagDecl) bool;
926};
927
928pub const Type = opaque {
929 pub const getTypeClass = ZigClangType_getTypeClass;
930 extern fn ZigClangType_getTypeClass(*const Type) TypeClass;
931
932 pub const getPointeeType = ZigClangType_getPointeeType;
933 extern fn ZigClangType_getPointeeType(*const Type) QualType;
934
935 pub const isVoidType = ZigClangType_isVoidType;
936 extern fn ZigClangType_isVoidType(*const Type) bool;
937
938 pub const isConstantArrayType = ZigClangType_isConstantArrayType;
939 extern fn ZigClangType_isConstantArrayType(*const Type) bool;
940
941 pub const isRecordType = ZigClangType_isRecordType;
942 extern fn ZigClangType_isRecordType(*const Type) bool;
943
944 pub const isVectorType = ZigClangType_isVectorType;
945 extern fn ZigClangType_isVectorType(*const Type) bool;
946
947 pub const isIncompleteOrZeroLengthArrayType = ZigClangType_isIncompleteOrZeroLengthArrayType;
948 extern fn ZigClangType_isIncompleteOrZeroLengthArrayType(*const Type, *const ASTContext) bool;
949
950 pub const isArrayType = ZigClangType_isArrayType;
951 extern fn ZigClangType_isArrayType(*const Type) bool;
952
953 pub const isBooleanType = ZigClangType_isBooleanType;
954 extern fn ZigClangType_isBooleanType(*const Type) bool;
955
956 pub const getTypeClassName = ZigClangType_getTypeClassName;
957 extern fn ZigClangType_getTypeClassName(*const Type) [*:0]const u8;
958
959 pub const getAsArrayTypeUnsafe = ZigClangType_getAsArrayTypeUnsafe;
960 extern fn ZigClangType_getAsArrayTypeUnsafe(*const Type) *const ArrayType;
961
962 pub const getAsRecordType = ZigClangType_getAsRecordType;
963 extern fn ZigClangType_getAsRecordType(*const Type) ?*const RecordType;
964
965 pub const getAsUnionType = ZigClangType_getAsUnionType;
966 extern fn ZigClangType_getAsUnionType(*const Type) ?*const RecordType;
967};
968
969pub const TypedefNameDecl = opaque {
970 pub const getUnderlyingType = ZigClangTypedefNameDecl_getUnderlyingType;
971 extern fn ZigClangTypedefNameDecl_getUnderlyingType(*const TypedefNameDecl) QualType;
972
973 pub const getCanonicalDecl = ZigClangTypedefNameDecl_getCanonicalDecl;
974 extern fn ZigClangTypedefNameDecl_getCanonicalDecl(*const TypedefNameDecl) ?*const TypedefNameDecl;
975
976 pub const getLocation = ZigClangTypedefNameDecl_getLocation;
977 extern fn ZigClangTypedefNameDecl_getLocation(*const TypedefNameDecl) SourceLocation;
978};
979
980pub const FileScopeAsmDecl = opaque {
981 pub const getAsmString = ZigClangFileScopeAsmDecl_getAsmString;
982 extern fn ZigClangFileScopeAsmDecl_getAsmString(*const FileScopeAsmDecl) [*:0]const u8;
983
984 pub const freeAsmString = ZigClangFileScopeAsmDecl_freeAsmString;
985 extern fn ZigClangFileScopeAsmDecl_freeAsmString([*:0]const u8) void;
986};
987
988pub const TypedefType = opaque {
989 pub const getDecl = ZigClangTypedefType_getDecl;
990 extern fn ZigClangTypedefType_getDecl(*const TypedefType) *const TypedefNameDecl;
991};
992
993pub const UnaryExprOrTypeTraitExpr = opaque {
994 pub const getTypeOfArgument = ZigClangUnaryExprOrTypeTraitExpr_getTypeOfArgument;
995 extern fn ZigClangUnaryExprOrTypeTraitExpr_getTypeOfArgument(*const UnaryExprOrTypeTraitExpr) QualType;
996
997 pub const getBeginLoc = ZigClangUnaryExprOrTypeTraitExpr_getBeginLoc;
998 extern fn ZigClangUnaryExprOrTypeTraitExpr_getBeginLoc(*const UnaryExprOrTypeTraitExpr) SourceLocation;
999
1000 pub const getKind = ZigClangUnaryExprOrTypeTraitExpr_getKind;
1001 extern fn ZigClangUnaryExprOrTypeTraitExpr_getKind(*const UnaryExprOrTypeTraitExpr) UnaryExprOrTypeTrait_Kind;
1002};
1003
1004pub const UnaryOperator = opaque {
1005 pub const getOpcode = ZigClangUnaryOperator_getOpcode;
1006 extern fn ZigClangUnaryOperator_getOpcode(*const UnaryOperator) UO;
1007
1008 pub const getType = ZigClangUnaryOperator_getType;
1009 extern fn ZigClangUnaryOperator_getType(*const UnaryOperator) QualType;
1010
1011 pub const getSubExpr = ZigClangUnaryOperator_getSubExpr;
1012 extern fn ZigClangUnaryOperator_getSubExpr(*const UnaryOperator) *const Expr;
1013
1014 pub const getBeginLoc = ZigClangUnaryOperator_getBeginLoc;
1015 extern fn ZigClangUnaryOperator_getBeginLoc(*const UnaryOperator) SourceLocation;
1016};
1017
1018pub const ValueDecl = opaque {
1019 pub const getType = ZigClangValueDecl_getType;
1020 extern fn ZigClangValueDecl_getType(*const ValueDecl) QualType;
1021};
1022
1023pub const VarDecl = opaque {
1024 pub const getLocation = ZigClangVarDecl_getLocation;
1025 extern fn ZigClangVarDecl_getLocation(*const VarDecl) SourceLocation;
1026
1027 pub const hasInit = ZigClangVarDecl_hasInit;
1028 extern fn ZigClangVarDecl_hasInit(*const VarDecl) bool;
1029
1030 pub const getStorageClass = ZigClangVarDecl_getStorageClass;
1031 extern fn ZigClangVarDecl_getStorageClass(*const VarDecl) StorageClass;
1032
1033 pub const getType = ZigClangVarDecl_getType;
1034 extern fn ZigClangVarDecl_getType(*const VarDecl) QualType;
1035
1036 pub const getInit = ZigClangVarDecl_getInit;
1037 extern fn ZigClangVarDecl_getInit(*const VarDecl) ?*const Expr;
1038
1039 pub const getTLSKind = ZigClangVarDecl_getTLSKind;
1040 extern fn ZigClangVarDecl_getTLSKind(*const VarDecl) VarDecl_TLSKind;
1041
1042 pub const getCanonicalDecl = ZigClangVarDecl_getCanonicalDecl;
1043 extern fn ZigClangVarDecl_getCanonicalDecl(*const VarDecl) ?*const VarDecl;
1044
1045 pub const getSectionAttribute = ZigClangVarDecl_getSectionAttribute;
1046 extern fn ZigClangVarDecl_getSectionAttribute(*const VarDecl, len: *usize) ?[*]const u8;
1047
1048 pub const getAlignedAttribute = ZigClangVarDecl_getAlignedAttribute;
1049 extern fn ZigClangVarDecl_getAlignedAttribute(*const VarDecl, *const ASTContext) c_uint;
1050
1051 pub const getPackedAttribute = ZigClangVarDecl_getPackedAttribute;
1052 extern fn ZigClangVarDecl_getPackedAttribute(*const VarDecl) bool;
1053
1054 pub const getCleanupAttribute = ZigClangVarDecl_getCleanupAttribute;
1055 extern fn ZigClangVarDecl_getCleanupAttribute(*const VarDecl) ?*const FunctionDecl;
1056
1057 pub const getTypeSourceInfo_getType = ZigClangVarDecl_getTypeSourceInfo_getType;
1058 extern fn ZigClangVarDecl_getTypeSourceInfo_getType(*const VarDecl) QualType;
1059
1060 pub const isStaticLocal = ZigClangVarDecl_isStaticLocal;
1061 extern fn ZigClangVarDecl_isStaticLocal(*const VarDecl) bool;
1062};
1063
1064pub const VectorType = opaque {
1065 pub const getElementType = ZigClangVectorType_getElementType;
1066 extern fn ZigClangVectorType_getElementType(*const VectorType) QualType;
1067
1068 pub const getNumElements = ZigClangVectorType_getNumElements;
1069 extern fn ZigClangVectorType_getNumElements(*const VectorType) c_uint;
1070};
1071
1072pub const WhileStmt = opaque {
1073 pub const getCond = ZigClangWhileStmt_getCond;
1074 extern fn ZigClangWhileStmt_getCond(*const WhileStmt) *const Expr;
1075
1076 pub const getBody = ZigClangWhileStmt_getBody;
1077 extern fn ZigClangWhileStmt_getBody(*const WhileStmt) *const Stmt;
1078};
1079
1080pub const InitListExpr = opaque {
1081 pub const getInit = ZigClangInitListExpr_getInit;
1082 extern fn ZigClangInitListExpr_getInit(*const InitListExpr, i: c_uint) *const Expr;
1083
1084 pub const getArrayFiller = ZigClangInitListExpr_getArrayFiller;
1085 extern fn ZigClangInitListExpr_getArrayFiller(*const InitListExpr) *const Expr;
1086
1087 pub const hasArrayFiller = ZigClangInitListExpr_hasArrayFiller;
1088 extern fn ZigClangInitListExpr_hasArrayFiller(*const InitListExpr) bool;
1089
1090 pub const isStringLiteralInit = ZigClangInitListExpr_isStringLiteralInit;
1091 extern fn ZigClangInitListExpr_isStringLiteralInit(*const InitListExpr) bool;
1092
1093 pub const getNumInits = ZigClangInitListExpr_getNumInits;
1094 extern fn ZigClangInitListExpr_getNumInits(*const InitListExpr) c_uint;
1095
1096 pub const getInitializedFieldInUnion = ZigClangInitListExpr_getInitializedFieldInUnion;
1097 extern fn ZigClangInitListExpr_getInitializedFieldInUnion(*const InitListExpr) ?*FieldDecl;
1098};
1099
1100pub const BO = enum(c_int) {
1101 PtrMemD,
1102 PtrMemI,
1103 Mul,
1104 Div,
1105 Rem,
1106 Add,
1107 Sub,
1108 Shl,
1109 Shr,
1110 Cmp,
1111 LT,
1112 GT,
1113 LE,
1114 GE,
1115 EQ,
1116 NE,
1117 And,
1118 Xor,
1119 Or,
1120 LAnd,
1121 LOr,
1122 Assign,
1123 MulAssign,
1124 DivAssign,
1125 RemAssign,
1126 AddAssign,
1127 SubAssign,
1128 ShlAssign,
1129 ShrAssign,
1130 AndAssign,
1131 XorAssign,
1132 OrAssign,
1133 Comma,
1134};
1135
1136pub const UO = enum(c_int) {
1137 PostInc,
1138 PostDec,
1139 PreInc,
1140 PreDec,
1141 AddrOf,
1142 Deref,
1143 Plus,
1144 Minus,
1145 Not,
1146 LNot,
1147 Real,
1148 Imag,
1149 Extension,
1150 Coawait,
1151};
1152
1153pub const TypeClass = enum(c_int) {
1154 Adjusted,
1155 Decayed,
1156 ConstantArray,
1157 ArrayParameter,
1158 DependentSizedArray,
1159 IncompleteArray,
1160 VariableArray,
1161 Atomic,
1162 Attributed,
1163 BTFTagAttributed,
1164 BitInt,
1165 BlockPointer,
1166 CountAttributed,
1167 Builtin,
1168 Complex,
1169 Decltype,
1170 Auto,
1171 DeducedTemplateSpecialization,
1172 DependentAddressSpace,
1173 DependentBitInt,
1174 DependentName,
1175 DependentSizedExtVector,
1176 DependentTemplateSpecialization,
1177 DependentVector,
1178 Elaborated,
1179 FunctionNoProto,
1180 FunctionProto,
1181 HLSLAttributedResource,
1182 HLSLInlineSpirv,
1183 InjectedClassName,
1184 MacroQualified,
1185 ConstantMatrix,
1186 DependentSizedMatrix,
1187 MemberPointer,
1188 ObjCObjectPointer,
1189 ObjCObject,
1190 ObjCInterface,
1191 ObjCTypeParam,
1192 PackExpansion,
1193 PackIndexing,
1194 Paren,
1195 Pipe,
1196 Pointer,
1197 LValueReference,
1198 RValueReference,
1199 SubstTemplateTypeParmPack,
1200 SubstTemplateTypeParm,
1201 Enum,
1202 Record,
1203 TemplateSpecialization,
1204 TemplateTypeParm,
1205 TypeOfExpr,
1206 TypeOf,
1207 Typedef,
1208 UnaryTransform,
1209 UnresolvedUsing,
1210 Using,
1211 Vector,
1212 ExtVector,
1213};
1214
1215const StmtClass = enum(c_int) {
1216 NoStmtClass,
1217 WhileStmtClass,
1218 LabelStmtClass,
1219 VAArgExprClass,
1220 UnaryOperatorClass,
1221 UnaryExprOrTypeTraitExprClass,
1222 TypeTraitExprClass,
1223 SubstNonTypeTemplateParmPackExprClass,
1224 SubstNonTypeTemplateParmExprClass,
1225 StringLiteralClass,
1226 StmtExprClass,
1227 SourceLocExprClass,
1228 SizeOfPackExprClass,
1229 ShuffleVectorExprClass,
1230 SYCLUniqueStableNameExprClass,
1231 RequiresExprClass,
1232 RecoveryExprClass,
1233 PseudoObjectExprClass,
1234 PredefinedExprClass,
1235 ParenListExprClass,
1236 ParenExprClass,
1237 PackIndexingExprClass,
1238 PackExpansionExprClass,
1239 UnresolvedMemberExprClass,
1240 UnresolvedLookupExprClass,
1241 OpenACCAsteriskSizeExprClass,
1242 OpaqueValueExprClass,
1243 OffsetOfExprClass,
1244 ObjCSubscriptRefExprClass,
1245 ObjCStringLiteralClass,
1246 ObjCSelectorExprClass,
1247 ObjCProtocolExprClass,
1248 ObjCPropertyRefExprClass,
1249 ObjCMessageExprClass,
1250 ObjCIvarRefExprClass,
1251 ObjCIsaExprClass,
1252 ObjCIndirectCopyRestoreExprClass,
1253 ObjCEncodeExprClass,
1254 ObjCDictionaryLiteralClass,
1255 ObjCBoxedExprClass,
1256 ObjCBoolLiteralExprClass,
1257 ObjCAvailabilityCheckExprClass,
1258 ObjCArrayLiteralClass,
1259 OMPIteratorExprClass,
1260 OMPArrayShapingExprClass,
1261 NoInitExprClass,
1262 MemberExprClass,
1263 MatrixSubscriptExprClass,
1264 MaterializeTemporaryExprClass,
1265 MSPropertySubscriptExprClass,
1266 MSPropertyRefExprClass,
1267 LambdaExprClass,
1268 IntegerLiteralClass,
1269 InitListExprClass,
1270 ImplicitValueInitExprClass,
1271 ImaginaryLiteralClass,
1272 HLSLOutArgExprClass,
1273 GenericSelectionExprClass,
1274 GNUNullExprClass,
1275 FunctionParmPackExprClass,
1276 ExprWithCleanupsClass,
1277 ConstantExprClass,
1278 FloatingLiteralClass,
1279 FixedPointLiteralClass,
1280 ExtVectorElementExprClass,
1281 ExpressionTraitExprClass,
1282 EmbedExprClass,
1283 DesignatedInitUpdateExprClass,
1284 DesignatedInitExprClass,
1285 DependentScopeDeclRefExprClass,
1286 DependentCoawaitExprClass,
1287 DeclRefExprClass,
1288 CoyieldExprClass,
1289 CoawaitExprClass,
1290 ConvertVectorExprClass,
1291 ConceptSpecializationExprClass,
1292 CompoundLiteralExprClass,
1293 ChooseExprClass,
1294 CharacterLiteralClass,
1295 ImplicitCastExprClass,
1296 ObjCBridgedCastExprClass,
1297 CXXStaticCastExprClass,
1298 CXXReinterpretCastExprClass,
1299 CXXDynamicCastExprClass,
1300 CXXConstCastExprClass,
1301 CXXAddrspaceCastExprClass,
1302 CXXFunctionalCastExprClass,
1303 CStyleCastExprClass,
1304 BuiltinBitCastExprClass,
1305 CallExprClass,
1306 UserDefinedLiteralClass,
1307 CXXOperatorCallExprClass,
1308 CXXMemberCallExprClass,
1309 CUDAKernelCallExprClass,
1310 CXXUuidofExprClass,
1311 CXXUnresolvedConstructExprClass,
1312 CXXTypeidExprClass,
1313 CXXThrowExprClass,
1314 CXXThisExprClass,
1315 CXXStdInitializerListExprClass,
1316 CXXScalarValueInitExprClass,
1317 CXXRewrittenBinaryOperatorClass,
1318 CXXPseudoDestructorExprClass,
1319 CXXParenListInitExprClass,
1320 CXXNullPtrLiteralExprClass,
1321 CXXNoexceptExprClass,
1322 CXXNewExprClass,
1323 CXXInheritedCtorInitExprClass,
1324 CXXFoldExprClass,
1325 CXXDependentScopeMemberExprClass,
1326 CXXDeleteExprClass,
1327 CXXDefaultInitExprClass,
1328 CXXDefaultArgExprClass,
1329 CXXConstructExprClass,
1330 CXXTemporaryObjectExprClass,
1331 CXXBoolLiteralExprClass,
1332 CXXBindTemporaryExprClass,
1333 BlockExprClass,
1334 BinaryOperatorClass,
1335 CompoundAssignOperatorClass,
1336 AtomicExprClass,
1337 AsTypeExprClass,
1338 ArrayTypeTraitExprClass,
1339 ArraySubscriptExprClass,
1340 ArraySectionExprClass,
1341 ArrayInitLoopExprClass,
1342 ArrayInitIndexExprClass,
1343 AddrLabelExprClass,
1344 ConditionalOperatorClass,
1345 BinaryConditionalOperatorClass,
1346 AttributedStmtClass,
1347 SwitchStmtClass,
1348 DefaultStmtClass,
1349 CaseStmtClass,
1350 SYCLKernelCallStmtClass,
1351 SEHTryStmtClass,
1352 SEHLeaveStmtClass,
1353 SEHFinallyStmtClass,
1354 SEHExceptStmtClass,
1355 ReturnStmtClass,
1356 OpenACCWaitConstructClass,
1357 OpenACCUpdateConstructClass,
1358 OpenACCShutdownConstructClass,
1359 OpenACCSetConstructClass,
1360 OpenACCInitConstructClass,
1361 OpenACCExitDataConstructClass,
1362 OpenACCEnterDataConstructClass,
1363 OpenACCCacheConstructClass,
1364 OpenACCLoopConstructClass,
1365 OpenACCHostDataConstructClass,
1366 OpenACCDataConstructClass,
1367 OpenACCComputeConstructClass,
1368 OpenACCCombinedConstructClass,
1369 OpenACCAtomicConstructClass,
1370 ObjCForCollectionStmtClass,
1371 ObjCAutoreleasePoolStmtClass,
1372 ObjCAtTryStmtClass,
1373 ObjCAtThrowStmtClass,
1374 ObjCAtSynchronizedStmtClass,
1375 ObjCAtFinallyStmtClass,
1376 ObjCAtCatchStmtClass,
1377 OMPTeamsDirectiveClass,
1378 OMPTaskyieldDirectiveClass,
1379 OMPTaskwaitDirectiveClass,
1380 OMPTaskgroupDirectiveClass,
1381 OMPTaskDirectiveClass,
1382 OMPTargetUpdateDirectiveClass,
1383 OMPTargetTeamsDirectiveClass,
1384 OMPTargetParallelForDirectiveClass,
1385 OMPTargetParallelDirectiveClass,
1386 OMPTargetExitDataDirectiveClass,
1387 OMPTargetEnterDataDirectiveClass,
1388 OMPTargetDirectiveClass,
1389 OMPTargetDataDirectiveClass,
1390 OMPSingleDirectiveClass,
1391 OMPSectionsDirectiveClass,
1392 OMPSectionDirectiveClass,
1393 OMPScopeDirectiveClass,
1394 OMPScanDirectiveClass,
1395 OMPParallelSectionsDirectiveClass,
1396 OMPParallelMasterDirectiveClass,
1397 OMPParallelMaskedDirectiveClass,
1398 OMPParallelDirectiveClass,
1399 OMPOrderedDirectiveClass,
1400 OMPMetaDirectiveClass,
1401 OMPMasterDirectiveClass,
1402 OMPMaskedDirectiveClass,
1403 OMPUnrollDirectiveClass,
1404 OMPTileDirectiveClass,
1405 OMPStripeDirectiveClass,
1406 OMPReverseDirectiveClass,
1407 OMPInterchangeDirectiveClass,
1408 OMPTeamsGenericLoopDirectiveClass,
1409 OMPTeamsDistributeSimdDirectiveClass,
1410 OMPTeamsDistributeParallelForSimdDirectiveClass,
1411 OMPTeamsDistributeParallelForDirectiveClass,
1412 OMPTeamsDistributeDirectiveClass,
1413 OMPTaskLoopSimdDirectiveClass,
1414 OMPTaskLoopDirectiveClass,
1415 OMPTargetTeamsGenericLoopDirectiveClass,
1416 OMPTargetTeamsDistributeSimdDirectiveClass,
1417 OMPTargetTeamsDistributeParallelForSimdDirectiveClass,
1418 OMPTargetTeamsDistributeParallelForDirectiveClass,
1419 OMPTargetTeamsDistributeDirectiveClass,
1420 OMPTargetSimdDirectiveClass,
1421 OMPTargetParallelGenericLoopDirectiveClass,
1422 OMPTargetParallelForSimdDirectiveClass,
1423 OMPSimdDirectiveClass,
1424 OMPParallelMasterTaskLoopSimdDirectiveClass,
1425 OMPParallelMasterTaskLoopDirectiveClass,
1426 OMPParallelMaskedTaskLoopSimdDirectiveClass,
1427 OMPParallelMaskedTaskLoopDirectiveClass,
1428 OMPParallelGenericLoopDirectiveClass,
1429 OMPParallelForSimdDirectiveClass,
1430 OMPParallelForDirectiveClass,
1431 OMPMasterTaskLoopSimdDirectiveClass,
1432 OMPMasterTaskLoopDirectiveClass,
1433 OMPMaskedTaskLoopSimdDirectiveClass,
1434 OMPMaskedTaskLoopDirectiveClass,
1435 OMPGenericLoopDirectiveClass,
1436 OMPForSimdDirectiveClass,
1437 OMPForDirectiveClass,
1438 OMPDistributeSimdDirectiveClass,
1439 OMPDistributeParallelForSimdDirectiveClass,
1440 OMPDistributeParallelForDirectiveClass,
1441 OMPDistributeDirectiveClass,
1442 OMPInteropDirectiveClass,
1443 OMPFlushDirectiveClass,
1444 OMPErrorDirectiveClass,
1445 OMPDispatchDirectiveClass,
1446 OMPDepobjDirectiveClass,
1447 OMPCriticalDirectiveClass,
1448 OMPCancellationPointDirectiveClass,
1449 OMPCancelDirectiveClass,
1450 OMPBarrierDirectiveClass,
1451 OMPAtomicDirectiveClass,
1452 OMPAssumeDirectiveClass,
1453 OMPCanonicalLoopClass,
1454 NullStmtClass,
1455 MSDependentExistsStmtClass,
1456 IndirectGotoStmtClass,
1457 IfStmtClass,
1458 GotoStmtClass,
1459 ForStmtClass,
1460 DoStmtClass,
1461 DeclStmtClass,
1462 CoroutineBodyStmtClass,
1463 CoreturnStmtClass,
1464 ContinueStmtClass,
1465 CompoundStmtClass,
1466 CapturedStmtClass,
1467 CXXTryStmtClass,
1468 CXXForRangeStmtClass,
1469 CXXCatchStmtClass,
1470 BreakStmtClass,
1471 MSAsmStmtClass,
1472 GCCAsmStmtClass,
1473};
1474
1475pub const CK = enum(c_int) {
1476 Dependent,
1477 BitCast,
1478 LValueBitCast,
1479 LValueToRValueBitCast,
1480 LValueToRValue,
1481 NoOp,
1482 BaseToDerived,
1483 DerivedToBase,
1484 UncheckedDerivedToBase,
1485 Dynamic,
1486 ToUnion,
1487 ArrayToPointerDecay,
1488 FunctionToPointerDecay,
1489 NullToPointer,
1490 NullToMemberPointer,
1491 BaseToDerivedMemberPointer,
1492 DerivedToBaseMemberPointer,
1493 MemberPointerToBoolean,
1494 ReinterpretMemberPointer,
1495 UserDefinedConversion,
1496 ConstructorConversion,
1497 IntegralToPointer,
1498 PointerToIntegral,
1499 PointerToBoolean,
1500 ToVoid,
1501 MatrixCast,
1502 VectorSplat,
1503 IntegralCast,
1504 IntegralToBoolean,
1505 IntegralToFloating,
1506 FloatingToFixedPoint,
1507 FixedPofloatFromInting,
1508 FixedPointCast,
1509 FixedPointToIntegral,
1510 IntegralToFixedPoint,
1511 FixedPointToBoolean,
1512 FloatingToIntegral,
1513 FloatingToBoolean,
1514 BooleanToSignedIntegral,
1515 FloatingCast,
1516 CPointerToObjCPointerCast,
1517 BlockPointerToObjCPointerCast,
1518 AnyPointerToBlockPointerCast,
1519 ObjCObjectLValueCast,
1520 FloatingRealToComplex,
1521 FloatingComplexToReal,
1522 FloatingComplexToBoolean,
1523 FloatingComplexCast,
1524 FloatingComplexToIntegralComplex,
1525 IntegralRealToComplex,
1526 IntegralComplexToReal,
1527 IntegralComplexToBoolean,
1528 IntegralComplexCast,
1529 IntegralComplexToFloatingComplex,
1530 ARCProduceObject,
1531 ARCConsumeObject,
1532 ARCReclaimReturnedObject,
1533 ARCExtendBlockObject,
1534 AtomicToNonAtomic,
1535 NonAtomicToAtomic,
1536 CopyAndAutoreleaseBlockObject,
1537 BuiltinFnToFnPtr,
1538 ZeroToOCLOpaqueType,
1539 AddressSpaceConversion,
1540 IntToOCLSampler,
1541};
1542
1543pub const DeclKind = enum(c_int) {
1544 TranslationUnit,
1545 TopLevelStmt,
1546 RequiresExprBody,
1547 OutlinedFunction,
1548 LinkageSpec,
1549 ExternCContext,
1550 Export,
1551 Captured,
1552 Block,
1553 StaticAssert,
1554 PragmaDetectMismatch,
1555 PragmaComment,
1556 OpenACCRoutine,
1557 OpenACCDeclare,
1558 ObjCPropertyImpl,
1559 OMPThreadPrivate,
1560 OMPRequires,
1561 OMPAllocate,
1562 ObjCMethod,
1563 ObjCProtocol,
1564 ObjCInterface,
1565 ObjCImplementation,
1566 ObjCCategoryImpl,
1567 ObjCCategory,
1568 Namespace,
1569 HLSLBuffer,
1570 OMPDeclareReduction,
1571 OMPDeclareMapper,
1572 UnresolvedUsingValue,
1573 UnnamedGlobalConstant,
1574 TemplateParamObject,
1575 MSGuid,
1576 IndirectField,
1577 EnumConstant,
1578 Function,
1579 CXXMethod,
1580 CXXDestructor,
1581 CXXConversion,
1582 CXXConstructor,
1583 CXXDeductionGuide,
1584 Var,
1585 VarTemplateSpecialization,
1586 VarTemplatePartialSpecialization,
1587 ParmVar,
1588 OMPCapturedExpr,
1589 ImplicitParam,
1590 Decomposition,
1591 NonTypeTemplateParm,
1592 MSProperty,
1593 Field,
1594 ObjCIvar,
1595 ObjCAtDefsField,
1596 Binding,
1597 UsingShadow,
1598 ConstructorUsingShadow,
1599 UsingPack,
1600 UsingDirective,
1601 UnresolvedUsingIfExists,
1602 Record,
1603 CXXRecord,
1604 ClassTemplateSpecialization,
1605 ClassTemplatePartialSpecialization,
1606 Enum,
1607 UnresolvedUsingTypename,
1608 Typedef,
1609 TypeAlias,
1610 ObjCTypeParam,
1611 TemplateTypeParm,
1612 TemplateTemplateParm,
1613 VarTemplate,
1614 TypeAliasTemplate,
1615 FunctionTemplate,
1616 ClassTemplate,
1617 Concept,
1618 BuiltinTemplate,
1619 ObjCProperty,
1620 ObjCCompatibleAlias,
1621 NamespaceAlias,
1622 Label,
1623 HLSLRootSignature,
1624 UsingEnum,
1625 Using,
1626 LifetimeExtendedTemporary,
1627 Import,
1628 ImplicitConceptSpecialization,
1629 FriendTemplate,
1630 Friend,
1631 FileScopeAsm,
1632 Empty,
1633 AccessSpec,
1634};
1635
1636pub const BuiltinTypeKind = enum(c_int) {
1637 OCLImage1dRO,
1638 OCLImage1dArrayRO,
1639 OCLImage1dBufferRO,
1640 OCLImage2dRO,
1641 OCLImage2dArrayRO,
1642 OCLImage2dDepthRO,
1643 OCLImage2dArrayDepthRO,
1644 OCLImage2dMSAARO,
1645 OCLImage2dArrayMSAARO,
1646 OCLImage2dMSAADepthRO,
1647 OCLImage2dArrayMSAADepthRO,
1648 OCLImage3dRO,
1649 OCLImage1dWO,
1650 OCLImage1dArrayWO,
1651 OCLImage1dBufferWO,
1652 OCLImage2dWO,
1653 OCLImage2dArrayWO,
1654 OCLImage2dDepthWO,
1655 OCLImage2dArrayDepthWO,
1656 OCLImage2dMSAAWO,
1657 OCLImage2dArrayMSAAWO,
1658 OCLImage2dMSAADepthWO,
1659 OCLImage2dArrayMSAADepthWO,
1660 OCLImage3dWO,
1661 OCLImage1dRW,
1662 OCLImage1dArrayRW,
1663 OCLImage1dBufferRW,
1664 OCLImage2dRW,
1665 OCLImage2dArrayRW,
1666 OCLImage2dDepthRW,
1667 OCLImage2dArrayDepthRW,
1668 OCLImage2dMSAARW,
1669 OCLImage2dArrayMSAARW,
1670 OCLImage2dMSAADepthRW,
1671 OCLImage2dArrayMSAADepthRW,
1672 OCLImage3dRW,
1673 OCLIntelSubgroupAVCMcePayload,
1674 OCLIntelSubgroupAVCImePayload,
1675 OCLIntelSubgroupAVCRefPayload,
1676 OCLIntelSubgroupAVCSicPayload,
1677 OCLIntelSubgroupAVCMceResult,
1678 OCLIntelSubgroupAVCImeResult,
1679 OCLIntelSubgroupAVCRefResult,
1680 OCLIntelSubgroupAVCSicResult,
1681 OCLIntelSubgroupAVCImeResultSingleReferenceStreamout,
1682 OCLIntelSubgroupAVCImeResultDualReferenceStreamout,
1683 OCLIntelSubgroupAVCImeSingleReferenceStreamin,
1684 OCLIntelSubgroupAVCImeDualReferenceStreamin,
1685 SveInt8,
1686 SveInt16,
1687 SveInt32,
1688 SveInt64,
1689 SveUint8,
1690 SveUint16,
1691 SveUint32,
1692 SveUint64,
1693 SveFloat16,
1694 SveFloat32,
1695 SveFloat64,
1696 SveBFloat16,
1697 SveMFloat8,
1698 SveInt8x2,
1699 SveInt16x2,
1700 SveInt32x2,
1701 SveInt64x2,
1702 SveUint8x2,
1703 SveUint16x2,
1704 SveUint32x2,
1705 SveUint64x2,
1706 SveFloat16x2,
1707 SveFloat32x2,
1708 SveFloat64x2,
1709 SveBFloat16x2,
1710 SveMFloat8x2,
1711 SveInt8x3,
1712 SveInt16x3,
1713 SveInt32x3,
1714 SveInt64x3,
1715 SveUint8x3,
1716 SveUint16x3,
1717 SveUint32x3,
1718 SveUint64x3,
1719 SveFloat16x3,
1720 SveFloat32x3,
1721 SveFloat64x3,
1722 SveBFloat16x3,
1723 SveMFloat8x3,
1724 SveInt8x4,
1725 SveInt16x4,
1726 SveInt32x4,
1727 SveInt64x4,
1728 SveUint8x4,
1729 SveUint16x4,
1730 SveUint32x4,
1731 SveUint64x4,
1732 SveFloat16x4,
1733 SveFloat32x4,
1734 SveFloat64x4,
1735 SveBFloat16x4,
1736 SveMFloat8x4,
1737 SveBool,
1738 SveBoolx2,
1739 SveBoolx4,
1740 SveCount,
1741 MFloat8,
1742 DMR1024,
1743 VectorQuad,
1744 VectorPair,
1745 RvvInt8mf8,
1746 RvvInt8mf4,
1747 RvvInt8mf2,
1748 RvvInt8m1,
1749 RvvInt8m2,
1750 RvvInt8m4,
1751 RvvInt8m8,
1752 RvvUint8mf8,
1753 RvvUint8mf4,
1754 RvvUint8mf2,
1755 RvvUint8m1,
1756 RvvUint8m2,
1757 RvvUint8m4,
1758 RvvUint8m8,
1759 RvvInt16mf4,
1760 RvvInt16mf2,
1761 RvvInt16m1,
1762 RvvInt16m2,
1763 RvvInt16m4,
1764 RvvInt16m8,
1765 RvvUint16mf4,
1766 RvvUint16mf2,
1767 RvvUint16m1,
1768 RvvUint16m2,
1769 RvvUint16m4,
1770 RvvUint16m8,
1771 RvvInt32mf2,
1772 RvvInt32m1,
1773 RvvInt32m2,
1774 RvvInt32m4,
1775 RvvInt32m8,
1776 RvvUint32mf2,
1777 RvvUint32m1,
1778 RvvUint32m2,
1779 RvvUint32m4,
1780 RvvUint32m8,
1781 RvvInt64m1,
1782 RvvInt64m2,
1783 RvvInt64m4,
1784 RvvInt64m8,
1785 RvvUint64m1,
1786 RvvUint64m2,
1787 RvvUint64m4,
1788 RvvUint64m8,
1789 RvvFloat16mf4,
1790 RvvFloat16mf2,
1791 RvvFloat16m1,
1792 RvvFloat16m2,
1793 RvvFloat16m4,
1794 RvvFloat16m8,
1795 RvvBFloat16mf4,
1796 RvvBFloat16mf2,
1797 RvvBFloat16m1,
1798 RvvBFloat16m2,
1799 RvvBFloat16m4,
1800 RvvBFloat16m8,
1801 RvvFloat32mf2,
1802 RvvFloat32m1,
1803 RvvFloat32m2,
1804 RvvFloat32m4,
1805 RvvFloat32m8,
1806 RvvFloat64m1,
1807 RvvFloat64m2,
1808 RvvFloat64m4,
1809 RvvFloat64m8,
1810 RvvBool1,
1811 RvvBool2,
1812 RvvBool4,
1813 RvvBool8,
1814 RvvBool16,
1815 RvvBool32,
1816 RvvBool64,
1817 RvvInt8mf8x2,
1818 RvvInt8mf8x3,
1819 RvvInt8mf8x4,
1820 RvvInt8mf8x5,
1821 RvvInt8mf8x6,
1822 RvvInt8mf8x7,
1823 RvvInt8mf8x8,
1824 RvvInt8mf4x2,
1825 RvvInt8mf4x3,
1826 RvvInt8mf4x4,
1827 RvvInt8mf4x5,
1828 RvvInt8mf4x6,
1829 RvvInt8mf4x7,
1830 RvvInt8mf4x8,
1831 RvvInt8mf2x2,
1832 RvvInt8mf2x3,
1833 RvvInt8mf2x4,
1834 RvvInt8mf2x5,
1835 RvvInt8mf2x6,
1836 RvvInt8mf2x7,
1837 RvvInt8mf2x8,
1838 RvvInt8m1x2,
1839 RvvInt8m1x3,
1840 RvvInt8m1x4,
1841 RvvInt8m1x5,
1842 RvvInt8m1x6,
1843 RvvInt8m1x7,
1844 RvvInt8m1x8,
1845 RvvInt8m2x2,
1846 RvvInt8m2x3,
1847 RvvInt8m2x4,
1848 RvvInt8m4x2,
1849 RvvUint8mf8x2,
1850 RvvUint8mf8x3,
1851 RvvUint8mf8x4,
1852 RvvUint8mf8x5,
1853 RvvUint8mf8x6,
1854 RvvUint8mf8x7,
1855 RvvUint8mf8x8,
1856 RvvUint8mf4x2,
1857 RvvUint8mf4x3,
1858 RvvUint8mf4x4,
1859 RvvUint8mf4x5,
1860 RvvUint8mf4x6,
1861 RvvUint8mf4x7,
1862 RvvUint8mf4x8,
1863 RvvUint8mf2x2,
1864 RvvUint8mf2x3,
1865 RvvUint8mf2x4,
1866 RvvUint8mf2x5,
1867 RvvUint8mf2x6,
1868 RvvUint8mf2x7,
1869 RvvUint8mf2x8,
1870 RvvUint8m1x2,
1871 RvvUint8m1x3,
1872 RvvUint8m1x4,
1873 RvvUint8m1x5,
1874 RvvUint8m1x6,
1875 RvvUint8m1x7,
1876 RvvUint8m1x8,
1877 RvvUint8m2x2,
1878 RvvUint8m2x3,
1879 RvvUint8m2x4,
1880 RvvUint8m4x2,
1881 RvvInt16mf4x2,
1882 RvvInt16mf4x3,
1883 RvvInt16mf4x4,
1884 RvvInt16mf4x5,
1885 RvvInt16mf4x6,
1886 RvvInt16mf4x7,
1887 RvvInt16mf4x8,
1888 RvvInt16mf2x2,
1889 RvvInt16mf2x3,
1890 RvvInt16mf2x4,
1891 RvvInt16mf2x5,
1892 RvvInt16mf2x6,
1893 RvvInt16mf2x7,
1894 RvvInt16mf2x8,
1895 RvvInt16m1x2,
1896 RvvInt16m1x3,
1897 RvvInt16m1x4,
1898 RvvInt16m1x5,
1899 RvvInt16m1x6,
1900 RvvInt16m1x7,
1901 RvvInt16m1x8,
1902 RvvInt16m2x2,
1903 RvvInt16m2x3,
1904 RvvInt16m2x4,
1905 RvvInt16m4x2,
1906 RvvUint16mf4x2,
1907 RvvUint16mf4x3,
1908 RvvUint16mf4x4,
1909 RvvUint16mf4x5,
1910 RvvUint16mf4x6,
1911 RvvUint16mf4x7,
1912 RvvUint16mf4x8,
1913 RvvUint16mf2x2,
1914 RvvUint16mf2x3,
1915 RvvUint16mf2x4,
1916 RvvUint16mf2x5,
1917 RvvUint16mf2x6,
1918 RvvUint16mf2x7,
1919 RvvUint16mf2x8,
1920 RvvUint16m1x2,
1921 RvvUint16m1x3,
1922 RvvUint16m1x4,
1923 RvvUint16m1x5,
1924 RvvUint16m1x6,
1925 RvvUint16m1x7,
1926 RvvUint16m1x8,
1927 RvvUint16m2x2,
1928 RvvUint16m2x3,
1929 RvvUint16m2x4,
1930 RvvUint16m4x2,
1931 RvvInt32mf2x2,
1932 RvvInt32mf2x3,
1933 RvvInt32mf2x4,
1934 RvvInt32mf2x5,
1935 RvvInt32mf2x6,
1936 RvvInt32mf2x7,
1937 RvvInt32mf2x8,
1938 RvvInt32m1x2,
1939 RvvInt32m1x3,
1940 RvvInt32m1x4,
1941 RvvInt32m1x5,
1942 RvvInt32m1x6,
1943 RvvInt32m1x7,
1944 RvvInt32m1x8,
1945 RvvInt32m2x2,
1946 RvvInt32m2x3,
1947 RvvInt32m2x4,
1948 RvvInt32m4x2,
1949 RvvUint32mf2x2,
1950 RvvUint32mf2x3,
1951 RvvUint32mf2x4,
1952 RvvUint32mf2x5,
1953 RvvUint32mf2x6,
1954 RvvUint32mf2x7,
1955 RvvUint32mf2x8,
1956 RvvUint32m1x2,
1957 RvvUint32m1x3,
1958 RvvUint32m1x4,
1959 RvvUint32m1x5,
1960 RvvUint32m1x6,
1961 RvvUint32m1x7,
1962 RvvUint32m1x8,
1963 RvvUint32m2x2,
1964 RvvUint32m2x3,
1965 RvvUint32m2x4,
1966 RvvUint32m4x2,
1967 RvvInt64m1x2,
1968 RvvInt64m1x3,
1969 RvvInt64m1x4,
1970 RvvInt64m1x5,
1971 RvvInt64m1x6,
1972 RvvInt64m1x7,
1973 RvvInt64m1x8,
1974 RvvInt64m2x2,
1975 RvvInt64m2x3,
1976 RvvInt64m2x4,
1977 RvvInt64m4x2,
1978 RvvUint64m1x2,
1979 RvvUint64m1x3,
1980 RvvUint64m1x4,
1981 RvvUint64m1x5,
1982 RvvUint64m1x6,
1983 RvvUint64m1x7,
1984 RvvUint64m1x8,
1985 RvvUint64m2x2,
1986 RvvUint64m2x3,
1987 RvvUint64m2x4,
1988 RvvUint64m4x2,
1989 RvvFloat16mf4x2,
1990 RvvFloat16mf4x3,
1991 RvvFloat16mf4x4,
1992 RvvFloat16mf4x5,
1993 RvvFloat16mf4x6,
1994 RvvFloat16mf4x7,
1995 RvvFloat16mf4x8,
1996 RvvFloat16mf2x2,
1997 RvvFloat16mf2x3,
1998 RvvFloat16mf2x4,
1999 RvvFloat16mf2x5,
2000 RvvFloat16mf2x6,
2001 RvvFloat16mf2x7,
2002 RvvFloat16mf2x8,
2003 RvvFloat16m1x2,
2004 RvvFloat16m1x3,
2005 RvvFloat16m1x4,
2006 RvvFloat16m1x5,
2007 RvvFloat16m1x6,
2008 RvvFloat16m1x7,
2009 RvvFloat16m1x8,
2010 RvvFloat16m2x2,
2011 RvvFloat16m2x3,
2012 RvvFloat16m2x4,
2013 RvvFloat16m4x2,
2014 RvvFloat32mf2x2,
2015 RvvFloat32mf2x3,
2016 RvvFloat32mf2x4,
2017 RvvFloat32mf2x5,
2018 RvvFloat32mf2x6,
2019 RvvFloat32mf2x7,
2020 RvvFloat32mf2x8,
2021 RvvFloat32m1x2,
2022 RvvFloat32m1x3,
2023 RvvFloat32m1x4,
2024 RvvFloat32m1x5,
2025 RvvFloat32m1x6,
2026 RvvFloat32m1x7,
2027 RvvFloat32m1x8,
2028 RvvFloat32m2x2,
2029 RvvFloat32m2x3,
2030 RvvFloat32m2x4,
2031 RvvFloat32m4x2,
2032 RvvFloat64m1x2,
2033 RvvFloat64m1x3,
2034 RvvFloat64m1x4,
2035 RvvFloat64m1x5,
2036 RvvFloat64m1x6,
2037 RvvFloat64m1x7,
2038 RvvFloat64m1x8,
2039 RvvFloat64m2x2,
2040 RvvFloat64m2x3,
2041 RvvFloat64m2x4,
2042 RvvFloat64m4x2,
2043 RvvBFloat16mf4x2,
2044 RvvBFloat16mf4x3,
2045 RvvBFloat16mf4x4,
2046 RvvBFloat16mf4x5,
2047 RvvBFloat16mf4x6,
2048 RvvBFloat16mf4x7,
2049 RvvBFloat16mf4x8,
2050 RvvBFloat16mf2x2,
2051 RvvBFloat16mf2x3,
2052 RvvBFloat16mf2x4,
2053 RvvBFloat16mf2x5,
2054 RvvBFloat16mf2x6,
2055 RvvBFloat16mf2x7,
2056 RvvBFloat16mf2x8,
2057 RvvBFloat16m1x2,
2058 RvvBFloat16m1x3,
2059 RvvBFloat16m1x4,
2060 RvvBFloat16m1x5,
2061 RvvBFloat16m1x6,
2062 RvvBFloat16m1x7,
2063 RvvBFloat16m1x8,
2064 RvvBFloat16m2x2,
2065 RvvBFloat16m2x3,
2066 RvvBFloat16m2x4,
2067 RvvBFloat16m4x2,
2068 WasmExternRef,
2069 AMDGPUBufferRsrc,
2070 AMDGPUNamedWorkgroupBarrier,
2071 HLSLResource,
2072 Void,
2073 Bool,
2074 Char_U,
2075 UChar,
2076 WChar_U,
2077 Char8,
2078 Char16,
2079 Char32,
2080 UShort,
2081 UInt,
2082 ULong,
2083 ULongLong,
2084 UInt128,
2085 Char_S,
2086 SChar,
2087 WChar_S,
2088 Short,
2089 Int,
2090 Long,
2091 LongLong,
2092 Int128,
2093 ShortAccum,
2094 Accum,
2095 LongAccum,
2096 UShortAccum,
2097 UAccum,
2098 ULongAccum,
2099 ShortFract,
2100 Fract,
2101 LongFract,
2102 UShortFract,
2103 UFract,
2104 ULongFract,
2105 SatShortAccum,
2106 SatAccum,
2107 SatLongAccum,
2108 SatUShortAccum,
2109 SatUAccum,
2110 SatULongAccum,
2111 SatShortFract,
2112 SatFract,
2113 SatLongFract,
2114 SatUShortFract,
2115 SatUFract,
2116 SatULongFract,
2117 Half,
2118 Float,
2119 Double,
2120 LongDouble,
2121 Float16,
2122 BFloat16,
2123 Float128,
2124 Ibm128,
2125 NullPtr,
2126 ObjCId,
2127 ObjCClass,
2128 ObjCSel,
2129 OCLSampler,
2130 OCLEvent,
2131 OCLClkEvent,
2132 OCLQueue,
2133 OCLReserveID,
2134 Dependent,
2135 Overload,
2136 BoundMember,
2137 UnresolvedTemplate,
2138 PseudoObject,
2139 UnknownAny,
2140 BuiltinFn,
2141 ARCUnbridgedCast,
2142 IncompleteMatrixIdx,
2143 OMPArraySection,
2144 OMPArrayShaping,
2145 OMPIterator,
2146};
2147
2148pub const CallingConv = enum(c_int) {
2149 C,
2150 X86StdCall,
2151 X86FastCall,
2152 X86ThisCall,
2153 X86VectorCall,
2154 X86Pascal,
2155 Win64,
2156 X86_64SysV,
2157 X86RegCall,
2158 AAPCS,
2159 AAPCS_VFP,
2160 IntelOclBicc,
2161 SpirFunction,
2162 DeviceKernel,
2163 Swift,
2164 SwiftAsync,
2165 PreserveMost,
2166 PreserveAll,
2167 AArch64VectorCall,
2168 AArch64SVEPCS,
2169 M68kRTD,
2170 PreserveNone,
2171 RISCVVectorCall,
2172};
2173
2174pub const StorageClass = enum(c_int) {
2175 None,
2176 Extern,
2177 Static,
2178 PrivateExtern,
2179 Auto,
2180 Register,
2181};
2182
2183pub const APFloat_roundingMode = enum(i8) {
2184 TowardZero = 0,
2185 NearestTiesToEven = 1,
2186 TowardPositive = 2,
2187 TowardNegative = 3,
2188 NearestTiesToAway = 4,
2189 Dynamic = 7,
2190 Invalid = -1,
2191};
2192
2193pub const CharacterLiteralKind = enum(c_int) {
2194 Ascii,
2195 Wide,
2196 UTF8,
2197 UTF16,
2198 UTF32,
2199};
2200
2201pub const VarDecl_TLSKind = enum(c_int) {
2202 None,
2203 Static,
2204 Dynamic,
2205};
2206
2207pub const ElaboratedTypeKeyword = enum(c_int) {
2208 Struct,
2209 Interface,
2210 Union,
2211 Class,
2212 Enum,
2213 Typename,
2214 None,
2215};
2216
2217pub const PreprocessedEntity_EntityKind = enum(c_int) {
2218 InvalidKind,
2219 MacroExpansionKind,
2220 MacroDefinitionKind,
2221 InclusionDirectiveKind,
2222};
2223
2224pub const Expr_ConstantExprKind = enum(c_int) {
2225 Normal,
2226 NonClassTemplateArgument,
2227 ClassTemplateArgument,
2228 ImmediateInvocation,
2229};
2230
2231pub const UnaryExprOrTypeTrait_Kind = enum(c_int) {
2232 SizeOf,
2233 DataSizeOf,
2234 CountOf,
2235 AlignOf,
2236 PreferredAlignOf,
2237 PtrAuthTypeDiscriminator,
2238 VecStep,
2239 OpenMPRequiredSimdAlign,
2240};
2241
2242pub const OffsetOfNode_Kind = enum(c_int) {
2243 Array,
2244 Field,
2245 Identifier,
2246 Base,
2247};
2248
2249pub const ErrorMsg = extern struct {
2250 filename_ptr: ?[*]const u8,
2251 filename_len: usize,
2252 msg_ptr: [*]const u8,
2253 msg_len: usize,
2254 // valid until the ASTUnit is freed
2255 source: ?[*:0]const u8,
2256 // 0 based
2257 line: c_uint,
2258 // 0 based
2259 column: c_uint,
2260 // byte offset into source
2261 offset: c_uint,
2262
2263 pub const delete = ZigClangErrorMsg_delete;
2264 extern fn ZigClangErrorMsg_delete(ptr: [*]ErrorMsg, len: usize) void;
2265};
2266
2267pub const LoadFromCommandLine = ZigClangLoadFromCommandLine;
2268extern fn ZigClangLoadFromCommandLine(
2269 args_begin: [*]?[*:0]const u8,
2270 args_end: [*]?[*:0]const u8,
2271 errors_ptr: *[*]ErrorMsg,
2272 errors_len: *usize,
2273 resources_path: [*:0]const u8,
2274) ?*ASTUnit;
2275
2276pub const isLLVMUsingSeparateLibcxx = ZigClangIsLLVMUsingSeparateLibcxx;
2277extern fn ZigClangIsLLVMUsingSeparateLibcxx() bool;
src/libs/mingw.zig+18-9
......@@ -296,7 +296,11 @@ pub fn buildImportLib(comp: *Compilation, lib_name: []const u8) !void {
296296 });
297297
298298 const aro = @import("aro");
299 var aro_comp = aro.Compilation.init(gpa, std.fs.cwd());
299 var diagnostics: aro.Diagnostics = .{
300 .output = .{ .to_list = .{ .arena = .init(gpa) } },
301 };
302 defer diagnostics.deinit();
303 var aro_comp = aro.Compilation.init(gpa, arena, &diagnostics, std.fs.cwd());
300304 defer aro_comp.deinit();
301305
302306 aro_comp.target = target.*;
......@@ -316,17 +320,22 @@ pub fn buildImportLib(comp: *Compilation, lib_name: []const u8) !void {
316320 const builtin_macros = try aro_comp.generateBuiltinMacros(.include_system_defines);
317321 const def_file_source = try aro_comp.addSourceFromPath(def_file_path);
318322
319 var pp = aro.Preprocessor.init(&aro_comp);
323 var pp = aro.Preprocessor.init(&aro_comp, .{ .provided = 0 });
320324 defer pp.deinit();
321325 pp.linemarkers = .none;
322326 pp.preserve_whitespace = true;
323327
324328 try pp.preprocessSources(&.{ def_file_source, builtin_macros });
325329
326 for (aro_comp.diagnostics.list.items) |diagnostic| {
327 if (diagnostic.kind == .@"fatal error" or diagnostic.kind == .@"error") {
328 aro.Diagnostics.render(&aro_comp, std.Io.tty.detectConfig(std.fs.File.stderr()));
329 return error.AroPreprocessorFailed;
330 if (aro_comp.diagnostics.output.to_list.messages.items.len != 0) {
331 var buffer: [64]u8 = undefined;
332 const w = std.debug.lockStderrWriter(&buffer);
333 defer std.debug.unlockStderrWriter();
334 for (aro_comp.diagnostics.output.to_list.messages.items) |msg| {
335 if (msg.kind == .@"fatal error" or msg.kind == .@"error") {
336 aro.Diagnostics.writeToWriter(msg, w, std.io.tty.detectConfig(std.fs.File.stderr())) catch {};
337 return error.AroPreprocessorFailed;
338 }
330339 }
331340 }
332341
......@@ -335,9 +344,9 @@ pub fn buildImportLib(comp: *Compilation, lib_name: []const u8) !void {
335344 const def_final_file = try o_dir.createFile(final_def_basename, .{ .truncate = true });
336345 defer def_final_file.close();
337346 var buffer: [1024]u8 = undefined;
338 var def_final_file_writer = def_final_file.writer(&buffer);
339 try pp.prettyPrintTokens(&def_final_file_writer.interface, .result_only);
340 try def_final_file_writer.interface.flush();
347 var file_writer = def_final_file.writer(&buffer);
348 try pp.prettyPrintTokens(&file_writer.interface, .result_only);
349 try file_writer.interface.flush();
341350 }
342351
343352 const lib_final_path = try std.fs.path.join(gpa, &.{ "o", &digest, final_lib_basename });
src/main.zig+13-183
......@@ -204,17 +204,6 @@ pub fn main() anyerror!void {
204204 return mainArgs(gpa, arena, args);
205205}
206206
207/// Check that LLVM and Clang have been linked properly so that they are using the same
208/// libc++ and can safely share objects with pointers to static variables in libc++
209fn verifyLibcxxCorrectlyLinked() void {
210 if (build_options.have_llvm and ZigClangIsLLVMUsingSeparateLibcxx()) {
211 fatal(
212 \\Zig was built/linked incorrectly: LLVM and Clang have separate copies of libc++
213 \\ If you are dynamically linking LLVM, make sure you dynamically link libc++ too
214 , .{});
215 }
216}
217
218207fn mainArgs(gpa: Allocator, arena: Allocator, args: []const []const u8) !void {
219208 const tr = tracy.trace(@src());
220209 defer tr.end();
......@@ -350,13 +339,9 @@ fn mainArgs(gpa: Allocator, arena: Allocator, args: []const []const u8) !void {
350339 } else if (mem.eql(u8, cmd, "version")) {
351340 dev.check(.version_command);
352341 try fs.File.stdout().writeAll(build_options.version ++ "\n");
353 // Check libc++ linkage to make sure Zig was built correctly, but only
354 // for "env" and "version" to avoid affecting the startup time for
355 // build-critical commands (check takes about ~10 μs)
356 return verifyLibcxxCorrectlyLinked();
342 return;
357343 } else if (mem.eql(u8, cmd, "env")) {
358344 dev.check(.env_command);
359 verifyLibcxxCorrectlyLinked();
360345 var stdout_writer = fs.File.stdout().writer(&stdout_buffer);
361346 try @import("print_env.zig").cmdEnv(
362347 arena,
......@@ -4551,179 +4536,24 @@ fn cmdTranslateC(
45514536 prog_node: std.Progress.Node,
45524537) !void {
45534538 dev.check(.translate_c_command);
4539 _ = file_system_inputs;
4540 _ = fancy_output;
45544541
4555 const color: Color = .auto;
45564542 assert(comp.c_source_files.len == 1);
45574543 const c_source_file = comp.c_source_files[0];
45584544
4559 const translated_zig_basename = try std.fmt.allocPrint(arena, "{s}.zig", .{comp.root_name});
4560
4561 var man: Cache.Manifest = comp.obtainCObjectCacheManifest(comp.root_mod);
4562 man.want_shared_lock = false;
4563 defer man.deinit();
4564
4565 man.hash.add(@as(u16, 0xb945)); // Random number to distinguish translate-c from compiling C objects
4566 man.hash.add(comp.config.c_frontend);
4567 Compilation.cache_helpers.hashCSource(&man, c_source_file) catch |err| {
4568 fatal("unable to process '{s}': {s}", .{ c_source_file.src_path, @errorName(err) });
4569 };
4570
4571 if (fancy_output) |p| p.cache_hit = true;
4572 const bin_digest, const hex_digest = if (try man.hit()) digest: {
4573 if (file_system_inputs) |buf| try man.populateFileSystemInputs(buf);
4574 const bin_digest = man.finalBin();
4575 const hex_digest = Cache.binToHex(bin_digest);
4576 break :digest .{ bin_digest, hex_digest };
4577 } else digest: {
4578 if (fancy_output) |p| p.cache_hit = false;
4579 var argv = std.array_list.Managed([]const u8).init(arena);
4580 switch (comp.config.c_frontend) {
4581 .aro => {},
4582 .clang => {
4583 // argv[0] is program name, actual args start at [1]
4584 try argv.append(@tagName(comp.config.c_frontend));
4585 },
4586 }
4587
4588 var zig_cache_tmp_dir = try comp.dirs.local_cache.handle.makeOpenPath("tmp", .{});
4589 defer zig_cache_tmp_dir.close();
4590
4591 const ext = Compilation.classifyFileExt(c_source_file.src_path);
4592 const out_dep_path: ?[]const u8 = blk: {
4593 if (comp.config.c_frontend == .aro or comp.disable_c_depfile or !ext.clangSupportsDepFile())
4594 break :blk null;
4595
4596 const c_src_basename = fs.path.basename(c_source_file.src_path);
4597 const dep_basename = try std.fmt.allocPrint(arena, "{s}.d", .{c_src_basename});
4598 const out_dep_path = try comp.tmpFilePath(arena, dep_basename);
4599 break :blk out_dep_path;
4600 };
4601
4602 // TODO
4603 if (comp.config.c_frontend != .aro)
4604 try comp.addTranslateCCArgs(arena, &argv, ext, out_dep_path, comp.root_mod);
4605 try argv.append(c_source_file.src_path);
4606
4607 if (comp.verbose_cc) {
4608 Compilation.dump_argv(argv.items);
4609 }
4610
4611 const Result = union(enum) {
4612 success: []const u8,
4613 error_bundle: std.zig.ErrorBundle,
4614 };
4615
4616 const result: Result = switch (comp.config.c_frontend) {
4617 .aro => f: {
4618 var stdout: []u8 = undefined;
4619 try jitCmd(comp.gpa, arena, argv.items, .{
4620 .cmd_name = "aro_translate_c",
4621 .root_src_path = "aro_translate_c.zig",
4622 .depend_on_aro = true,
4623 .capture = &stdout,
4624 .progress_node = prog_node,
4625 });
4626 break :f .{ .success = stdout };
4627 },
4628 .clang => f: {
4629 if (!build_options.have_llvm) unreachable;
4630 const translate_c = @import("translate_c.zig");
4631
4632 // Convert to null terminated args.
4633 const clang_args_len = argv.items.len + c_source_file.extra_flags.len;
4634 const new_argv_with_sentinel = try arena.alloc(?[*:0]const u8, clang_args_len + 1);
4635 new_argv_with_sentinel[clang_args_len] = null;
4636 const new_argv = new_argv_with_sentinel[0..clang_args_len :null];
4637 for (argv.items, 0..) |arg, i| {
4638 new_argv[i] = try arena.dupeZ(u8, arg);
4639 }
4640 for (c_source_file.extra_flags, 0..) |arg, i| {
4641 new_argv[argv.items.len + i] = try arena.dupeZ(u8, arg);
4642 }
4545 var argv: std.ArrayListUnmanaged([]const u8) = .empty;
4546 try argv.append(arena, c_source_file.src_path);
46434547
4644 const c_headers_dir_path_z = try comp.dirs.zig_lib.joinZ(arena, &.{"include"});
4645 var errors = std.zig.ErrorBundle.empty;
4646 var tree = translate_c.translate(
4647 comp.gpa,
4648 new_argv.ptr,
4649 new_argv.ptr + new_argv.len,
4650 &errors,
4651 c_headers_dir_path_z,
4652 ) catch |err| switch (err) {
4653 error.OutOfMemory => return error.OutOfMemory,
4654 error.SemanticAnalyzeFail => break :f .{ .error_bundle = errors },
4655 };
4656 defer tree.deinit(comp.gpa);
4657 break :f .{ .success = try tree.renderAlloc(arena) };
4658 },
4659 };
4548 if (comp.verbose_cc) Compilation.dump_argv(argv.items);
46604549
4661 if (out_dep_path) |dep_file_path| add_deps: {
4662 const dep_basename = fs.path.basename(dep_file_path);
4663 // Add the files depended on to the cache system.
4664 man.addDepFilePost(zig_cache_tmp_dir, dep_basename) catch |err| switch (err) {
4665 error.FileNotFound => {
4666 // Clang didn't emit the dep file; nothing to add to the manifest.
4667 break :add_deps;
4668 },
4669 else => |e| return e,
4670 };
4671 // Just to save disk space, we delete the file because it is never needed again.
4672 zig_cache_tmp_dir.deleteFile(dep_basename) catch |err| {
4673 warn("failed to delete '{s}': {s}", .{ dep_file_path, @errorName(err) });
4674 };
4675 }
4676
4677 const formatted = switch (result) {
4678 .success => |formatted| formatted,
4679 .error_bundle => |eb| {
4680 if (file_system_inputs) |buf| try man.populateFileSystemInputs(buf);
4681 if (fancy_output) |p| {
4682 p.errors = eb;
4683 return;
4684 } else {
4685 eb.renderToStdErr(color.renderOptions());
4686 process.exit(1);
4687 }
4688 },
4689 };
4690
4691 const bin_digest = man.finalBin();
4692 const hex_digest = Cache.binToHex(bin_digest);
4693
4694 const o_sub_path = try fs.path.join(arena, &[_][]const u8{ "o", &hex_digest });
4695
4696 var o_dir = try comp.dirs.local_cache.handle.makeOpenPath(o_sub_path, .{});
4697 defer o_dir.close();
4698
4699 var zig_file = try o_dir.createFile(translated_zig_basename, .{});
4700 defer zig_file.close();
4701
4702 try zig_file.writeAll(formatted);
4703
4704 man.writeManifest() catch |err| warn("failed to write cache manifest: {t}", .{err});
4705
4706 if (file_system_inputs) |buf| try man.populateFileSystemInputs(buf);
4707
4708 break :digest .{ bin_digest, hex_digest };
4709 };
4710
4711 if (fancy_output) |p| {
4712 p.digest = bin_digest;
4713 p.errors = std.zig.ErrorBundle.empty;
4714 } else {
4715 const out_zig_path = try fs.path.join(arena, &.{ "o", &hex_digest, translated_zig_basename });
4716 const zig_file = comp.dirs.local_cache.handle.openFile(out_zig_path, .{}) catch |err| {
4717 const path = comp.dirs.local_cache.path orelse ".";
4718 fatal("unable to open cached translated zig file '{s}{s}{s}': {s}", .{ path, fs.path.sep_str, out_zig_path, @errorName(err) });
4719 };
4720 defer zig_file.close();
4721 var stdout_writer = fs.File.stdout().writer(&stdout_buffer);
4722 var file_reader = zig_file.reader(&.{});
4723 _ = try stdout_writer.interface.sendFileAll(&file_reader, .unlimited);
4724 try stdout_writer.interface.flush();
4725 return cleanExit();
4726 }
4550 try jitCmd(comp.gpa, arena, argv.items, .{
4551 .cmd_name = "translate-c",
4552 .root_src_path = "translate-c/src/main.zig",
4553 .depend_on_aro = true,
4554 .progress_node = prog_node,
4555 });
4556 return cleanExit();
47274557}
47284558
47294559const usage_init =
src/translate_c.zig deleted-6681
......@@ -1,6681 +0,0 @@
1const std = @import("std");
2const testing = std.testing;
3const assert = std.debug.assert;
4const mem = std.mem;
5const math = std.math;
6const meta = std.meta;
7const clang = @import("clang.zig");
8const aro = @import("aro");
9const CToken = aro.Tokenizer.Token;
10const Node = ast.Node;
11const Tag = Node.Tag;
12const common = @import("aro_translate_c");
13const ast = common.ast;
14const Error = common.Error;
15const MacroProcessingError = common.MacroProcessingError;
16const TypeError = common.TypeError;
17const TransError = common.TransError;
18const SymbolTable = common.SymbolTable;
19const AliasList = common.AliasList;
20const ResultUsed = common.ResultUsed;
21const Scope = common.ScopeExtra(Context, clang.QualType);
22const PatternList = common.PatternList;
23const MacroSlicer = common.MacroSlicer;
24
25pub const Context = struct {
26 gpa: mem.Allocator,
27 arena: mem.Allocator,
28 source_manager: *clang.SourceManager,
29 decl_table: std.AutoArrayHashMapUnmanaged(usize, []const u8) = .empty,
30 alias_list: AliasList,
31 global_scope: *Scope.Root,
32 clang_context: *clang.ASTContext,
33 mangle_count: u32 = 0,
34 /// Table of record decls that have been demoted to opaques.
35 opaque_demotes: std.AutoHashMapUnmanaged(usize, void) = .empty,
36 /// Table of unnamed enums and records that are child types of typedefs.
37 unnamed_typedefs: std.AutoHashMapUnmanaged(usize, []const u8) = .empty,
38 /// Needed to decide if we are parsing a typename
39 typedefs: std.StringArrayHashMapUnmanaged(void) = .empty,
40
41 /// This one is different than the root scope's name table. This contains
42 /// a list of names that we found by visiting all the top level decls without
43 /// translating them. The other maps are updated as we translate; this one is updated
44 /// up front in a pre-processing step.
45 global_names: std.StringArrayHashMapUnmanaged(void) = .empty,
46
47 /// This is similar to `global_names`, but contains names which we would
48 /// *like* to use, but do not strictly *have* to if they are unavailable.
49 /// These are relevant to types, which ideally we would name like
50 /// 'struct_foo' with an alias 'foo', but if either of those names is taken,
51 /// may be mangled.
52 /// This is distinct from `global_names` so we can detect at a type
53 /// declaration whether or not the name is available.
54 weak_global_names: std.StringArrayHashMapUnmanaged(void) = .empty,
55
56 pattern_list: PatternList,
57
58 fn getMangle(c: *Context) u32 {
59 c.mangle_count += 1;
60 return c.mangle_count;
61 }
62
63 /// Convert a null-terminated C string to a slice allocated in the arena
64 fn str(c: *Context, s: [*:0]const u8) ![]u8 {
65 return c.arena.dupe(u8, mem.sliceTo(s, 0));
66 }
67
68 /// Convert a clang source location to a file:line:column string
69 fn locStr(c: *Context, loc: clang.SourceLocation) ![]u8 {
70 const spelling_loc = c.source_manager.getSpellingLoc(loc);
71 const filename_c = c.source_manager.getFilename(spelling_loc);
72 const filename = if (filename_c) |s| try c.str(s) else @as([]const u8, "(no file)");
73
74 const line = c.source_manager.getSpellingLineNumber(spelling_loc);
75 const column = c.source_manager.getSpellingColumnNumber(spelling_loc);
76 return std.fmt.allocPrint(c.arena, "{s}:{d}:{d}", .{ filename, line, column });
77 }
78};
79
80pub fn translate(
81 gpa: mem.Allocator,
82 args_begin: [*]?[*:0]const u8,
83 args_end: [*]?[*:0]const u8,
84 errors: *std.zig.ErrorBundle,
85 resources_path: [*:0]const u8,
86) !std.zig.Ast {
87 var clang_errors: []clang.ErrorMsg = &.{};
88
89 const ast_unit = clang.LoadFromCommandLine(
90 args_begin,
91 args_end,
92 &clang_errors.ptr,
93 &clang_errors.len,
94 resources_path,
95 ) orelse {
96 defer clang.ErrorMsg.delete(clang_errors.ptr, clang_errors.len);
97
98 var bundle: std.zig.ErrorBundle.Wip = undefined;
99 try bundle.init(gpa);
100 defer bundle.deinit();
101
102 for (clang_errors) |c_error| {
103 const line = line: {
104 const source = c_error.source orelse break :line 0;
105 var start = c_error.offset;
106 while (start > 0) : (start -= 1) {
107 if (source[start - 1] == '\n') break;
108 }
109 var end = c_error.offset;
110 while (true) : (end += 1) {
111 if (source[end] == 0) break;
112 if (source[end] == '\n') break;
113 }
114 break :line try bundle.addString(source[start..end]);
115 };
116
117 try bundle.addRootErrorMessage(.{
118 .msg = try bundle.addString(c_error.msg_ptr[0..c_error.msg_len]),
119 .src_loc = if (c_error.filename_ptr) |filename_ptr| try bundle.addSourceLocation(.{
120 .src_path = try bundle.addString(filename_ptr[0..c_error.filename_len]),
121 .span_start = c_error.offset,
122 .span_main = c_error.offset,
123 .span_end = c_error.offset + 1,
124 .line = c_error.line,
125 .column = c_error.column,
126 .source_line = line,
127 }) else .none,
128 });
129 }
130 errors.* = try bundle.toOwnedBundle("");
131
132 return error.SemanticAnalyzeFail;
133 };
134 defer ast_unit.delete();
135
136 // For memory that has the same lifetime as the Ast that we return
137 // from this function.
138 var arena_allocator = std.heap.ArenaAllocator.init(gpa);
139 defer arena_allocator.deinit();
140 const arena = arena_allocator.allocator();
141
142 var context = Context{
143 .gpa = gpa,
144 .arena = arena,
145 .source_manager = ast_unit.getSourceManager(),
146 .alias_list = AliasList.init(gpa),
147 .global_scope = try arena.create(Scope.Root),
148 .clang_context = ast_unit.getASTContext(),
149 .pattern_list = try PatternList.init(gpa),
150 };
151 context.global_scope.* = Scope.Root.init(&context);
152 defer {
153 context.decl_table.deinit(gpa);
154 context.alias_list.deinit();
155 context.global_names.deinit(gpa);
156 context.opaque_demotes.deinit(gpa);
157 context.unnamed_typedefs.deinit(gpa);
158 context.typedefs.deinit(gpa);
159 context.global_scope.deinit();
160 context.pattern_list.deinit(gpa);
161 }
162
163 @setEvalBranchQuota(2000);
164 inline for (@typeInfo(std.zig.c_builtins).@"struct".decls) |decl| {
165 const builtin = try Tag.pub_var_simple.create(arena, .{
166 .name = decl.name,
167 .init = try Tag.import_c_builtin.create(arena, decl.name),
168 });
169 try addTopLevelDecl(&context, decl.name, builtin);
170 }
171
172 try prepopulateGlobalNameTable(ast_unit, &context);
173
174 if (!ast_unit.visitLocalTopLevelDecls(&context, declVisitorC)) {
175 return error.OutOfMemory;
176 }
177
178 try transPreprocessorEntities(&context, ast_unit);
179
180 for (context.alias_list.items) |alias| {
181 const node = try Tag.alias.create(arena, .{ .actual = alias.alias, .mangled = alias.name });
182 try addTopLevelDecl(&context, alias.alias, node);
183 }
184
185 return ast.render(gpa, context.global_scope.nodes.items);
186}
187
188/// Determines whether macro is of the form: `#define FOO FOO` (Possibly with trailing tokens)
189/// Macros of this form will not be translated.
190fn isSelfDefinedMacro(unit: *const clang.ASTUnit, c: *const Context, macro: *const clang.MacroDefinitionRecord) !bool {
191 const source = try getMacroText(unit, c, macro);
192 var tokenizer: aro.Tokenizer = .{
193 .buf = source,
194 .source = .unused,
195 .langopts = .{},
196 };
197 const name_tok = tokenizer.nextNoWS();
198 const name = source[name_tok.start..name_tok.end];
199
200 const first_tok = tokenizer.nextNoWS();
201 // We do not just check for `.Identifier` below because keyword tokens are preferentially matched first by
202 // the tokenizer.
203 // In other words we would miss `#define inline inline` (`inline` is a valid c89 identifier)
204 if (first_tok.id == .eof) return false;
205 return mem.eql(u8, name, source[first_tok.start..first_tok.end]);
206}
207
208fn prepopulateGlobalNameTable(ast_unit: *clang.ASTUnit, c: *Context) !void {
209 if (!ast_unit.visitLocalTopLevelDecls(c, declVisitorNamesOnlyC)) {
210 return error.OutOfMemory;
211 }
212
213 // TODO if we see #undef, delete it from the table
214 var it = ast_unit.getLocalPreprocessingEntities_begin();
215 const it_end = ast_unit.getLocalPreprocessingEntities_end();
216
217 while (it.I != it_end.I) : (it.I += 1) {
218 const entity = it.deref();
219 switch (entity.getKind()) {
220 .MacroDefinitionKind => {
221 const macro = @as(*clang.MacroDefinitionRecord, @ptrCast(entity));
222 const raw_name = macro.getName_getNameStart();
223 const name = try c.str(raw_name);
224
225 if (!try isSelfDefinedMacro(ast_unit, c, macro)) {
226 try c.global_names.put(c.gpa, name, {});
227 }
228 },
229 else => {},
230 }
231 }
232}
233
234fn declVisitorNamesOnlyC(context: ?*anyopaque, decl: *const clang.Decl) callconv(.c) bool {
235 const c: *Context = @ptrCast(@alignCast(context));
236 declVisitorNamesOnly(c, decl) catch return false;
237 return true;
238}
239
240fn declVisitorC(context: ?*anyopaque, decl: *const clang.Decl) callconv(.c) bool {
241 const c: *Context = @ptrCast(@alignCast(context));
242 declVisitor(c, decl) catch return false;
243 return true;
244}
245
246fn declVisitorNamesOnly(c: *Context, decl: *const clang.Decl) Error!void {
247 if (decl.castToNamedDecl()) |named_decl| {
248 const decl_name = try c.str(named_decl.getName_bytes_begin());
249
250 switch (decl.getKind()) {
251 .Record, .Enum => {
252 // These types are prefixed with the container kind.
253 const container_prefix = if (decl.getKind() == .Record) prefix: {
254 const record_decl: *const clang.RecordDecl = @ptrCast(decl);
255 if (record_decl.isUnion()) {
256 break :prefix "union";
257 } else {
258 break :prefix "struct";
259 }
260 } else "enum";
261 const prefixed_name = try std.fmt.allocPrint(c.arena, "{s}_{s}", .{ container_prefix, decl_name });
262 // `decl_name` and `prefixed_name` are the preferred names for this type.
263 // However, we can name it anything else if necessary, so these are "weak names".
264 try c.weak_global_names.ensureUnusedCapacity(c.gpa, 2);
265 c.weak_global_names.putAssumeCapacity(decl_name, {});
266 c.weak_global_names.putAssumeCapacity(prefixed_name, {});
267 },
268 else => {
269 try c.global_names.put(c.gpa, decl_name, {});
270 },
271 }
272
273 // Check for typedefs with unnamed enum/record child types.
274 if (decl.getKind() == .Typedef) {
275 const typedef_decl = @as(*const clang.TypedefNameDecl, @ptrCast(decl));
276 var child_ty = typedef_decl.getUnderlyingType().getTypePtr();
277 const addr: usize = while (true) switch (child_ty.getTypeClass()) {
278 .Enum => {
279 const enum_ty = @as(*const clang.EnumType, @ptrCast(child_ty));
280 const enum_decl = enum_ty.getDecl();
281 // check if this decl is unnamed
282 if (@as(*const clang.NamedDecl, @ptrCast(enum_decl)).getName_bytes_begin()[0] != 0) return;
283 break @intFromPtr(enum_decl.getCanonicalDecl());
284 },
285 .Record => {
286 const record_ty = @as(*const clang.RecordType, @ptrCast(child_ty));
287 const record_decl = record_ty.getDecl();
288 // check if this decl is unnamed
289 if (@as(*const clang.NamedDecl, @ptrCast(record_decl)).getName_bytes_begin()[0] != 0) return;
290 break @intFromPtr(record_decl.getCanonicalDecl());
291 },
292 .Elaborated => {
293 const elaborated_ty = @as(*const clang.ElaboratedType, @ptrCast(child_ty));
294 child_ty = elaborated_ty.getNamedType().getTypePtr();
295 },
296 .Decayed => {
297 const decayed_ty = @as(*const clang.DecayedType, @ptrCast(child_ty));
298 child_ty = decayed_ty.getDecayedType().getTypePtr();
299 },
300 .Attributed => {
301 const attributed_ty = @as(*const clang.AttributedType, @ptrCast(child_ty));
302 child_ty = attributed_ty.getEquivalentType().getTypePtr();
303 },
304 .MacroQualified => {
305 const macroqualified_ty = @as(*const clang.MacroQualifiedType, @ptrCast(child_ty));
306 child_ty = macroqualified_ty.getModifiedType().getTypePtr();
307 },
308 else => return,
309 };
310
311 const result = try c.unnamed_typedefs.getOrPut(c.gpa, addr);
312 if (result.found_existing) {
313 // One typedef can declare multiple names.
314 // Don't put this one in `decl_table` so it's processed later.
315 return;
316 }
317 result.value_ptr.* = decl_name;
318 // Put this typedef in the decl_table to avoid redefinitions.
319 try c.decl_table.putNoClobber(c.gpa, @intFromPtr(typedef_decl.getCanonicalDecl()), decl_name);
320 try c.typedefs.put(c.gpa, decl_name, {});
321 }
322 }
323}
324
325fn declVisitor(c: *Context, decl: *const clang.Decl) Error!void {
326 switch (decl.getKind()) {
327 .Function => {
328 return transFnDecl(c, &c.global_scope.base, @as(*const clang.FunctionDecl, @ptrCast(decl)));
329 },
330 .Typedef => {
331 try transTypeDef(c, &c.global_scope.base, @as(*const clang.TypedefNameDecl, @ptrCast(decl)));
332 },
333 .Enum => {
334 try transEnumDecl(c, &c.global_scope.base, @as(*const clang.EnumDecl, @ptrCast(decl)));
335 },
336 .Record => {
337 try transRecordDecl(c, &c.global_scope.base, @as(*const clang.RecordDecl, @ptrCast(decl)));
338 },
339 .Var => {
340 return visitVarDecl(c, @as(*const clang.VarDecl, @ptrCast(decl)), null);
341 },
342 .Empty => {
343 // Do nothing
344 },
345 .FileScopeAsm => {
346 try transFileScopeAsm(c, &c.global_scope.base, @as(*const clang.FileScopeAsmDecl, @ptrCast(decl)));
347 },
348 else => {
349 const decl_name = try c.str(decl.getDeclKindName());
350 try warn(c, &c.global_scope.base, decl.getLocation(), "ignoring {s} declaration", .{decl_name});
351 },
352 }
353}
354
355fn transFileScopeAsm(c: *Context, scope: *Scope, file_scope_asm: *const clang.FileScopeAsmDecl) Error!void {
356 const asm_string = std.mem.span(file_scope_asm.getAsmString());
357 defer clang.FileScopeAsmDecl.freeAsmString(asm_string.ptr);
358
359 const str = try std.fmt.allocPrint(c.arena, "\"{f}\"", .{std.zig.fmtString(asm_string)});
360 const str_node = try Tag.string_literal.create(c.arena, str);
361
362 const asm_node = try Tag.asm_simple.create(c.arena, str_node);
363 const block = try Tag.block_single.create(c.arena, asm_node);
364 const comptime_node = try Tag.@"comptime".create(c.arena, block);
365
366 try scope.appendNode(comptime_node);
367}
368
369fn transFnDecl(c: *Context, scope: *Scope, fn_decl: *const clang.FunctionDecl) Error!void {
370 const fn_name = try c.str(@as(*const clang.NamedDecl, @ptrCast(fn_decl)).getName_bytes_begin());
371 if (c.global_scope.sym_table.contains(fn_name))
372 return; // Avoid processing this decl twice
373
374 // Skip this declaration if a proper definition exists
375 if (!fn_decl.isThisDeclarationADefinition()) {
376 if (fn_decl.getDefinition()) |def|
377 return transFnDecl(c, scope, def);
378 }
379
380 const fn_decl_loc = fn_decl.getLocation();
381 const has_body = fn_decl.hasBody();
382 const storage_class = fn_decl.getStorageClass();
383 const is_always_inline = has_body and fn_decl.hasAlwaysInlineAttr();
384 var decl_ctx = FnDeclContext{
385 .fn_name = fn_name,
386 .has_body = has_body,
387 .storage_class = storage_class,
388 .is_always_inline = is_always_inline,
389 .is_export = switch (storage_class) {
390 .None => has_body and !is_always_inline and !fn_decl.isInlineSpecified(),
391 .Extern, .Static => false,
392 .PrivateExtern => return failDecl(c, fn_decl_loc, fn_name, "unsupported storage class: private extern", .{}),
393 .Auto => unreachable, // Not legal on functions
394 .Register => unreachable, // Not legal on functions
395 },
396 };
397
398 var fn_qt = fn_decl.getType();
399
400 const fn_type = while (true) {
401 const fn_type = fn_qt.getTypePtr();
402
403 switch (fn_type.getTypeClass()) {
404 .Attributed => {
405 const attr_type: *const clang.AttributedType = @ptrCast(fn_type);
406 fn_qt = attr_type.getEquivalentType();
407 },
408 .Paren => {
409 const paren_type: *const clang.ParenType = @ptrCast(fn_type);
410 fn_qt = paren_type.getInnerType();
411 },
412 .MacroQualified => {
413 const macroqualified_ty: *const clang.MacroQualifiedType = @ptrCast(fn_type);
414 fn_qt = macroqualified_ty.getModifiedType();
415 },
416 else => break fn_type,
417 }
418 };
419 const fn_ty: *const clang.FunctionType = @ptrCast(fn_type);
420 const return_qt = fn_ty.getReturnType();
421
422 const proto_node = switch (fn_type.getTypeClass()) {
423 .FunctionProto => blk: {
424 const fn_proto_type: *const clang.FunctionProtoType = @ptrCast(fn_type);
425 if (has_body and fn_proto_type.isVariadic()) {
426 decl_ctx.has_body = false;
427 decl_ctx.storage_class = .Extern;
428 decl_ctx.is_export = false;
429 decl_ctx.is_always_inline = false;
430 try warn(c, &c.global_scope.base, fn_decl_loc, "TODO unable to translate variadic function, demoted to extern", .{});
431 }
432 break :blk transFnProto(c, fn_decl, fn_proto_type, fn_decl_loc, decl_ctx, true) catch |err| switch (err) {
433 error.UnsupportedType => {
434 return failDecl(c, fn_decl_loc, fn_name, "unable to resolve prototype of function", .{});
435 },
436 error.OutOfMemory => |e| return e,
437 };
438 },
439 .FunctionNoProto => blk: {
440 const fn_no_proto_type: *const clang.FunctionType = @ptrCast(fn_type);
441 break :blk transFnNoProto(c, fn_no_proto_type, fn_decl_loc, decl_ctx, true) catch |err| switch (err) {
442 error.UnsupportedType => {
443 return failDecl(c, fn_decl_loc, fn_name, "unable to resolve prototype of function", .{});
444 },
445 error.OutOfMemory => |e| return e,
446 };
447 },
448 else => return failDecl(c, fn_decl_loc, fn_name, "unable to resolve function type {}", .{fn_type.getTypeClass()}),
449 };
450
451 if (!decl_ctx.has_body) {
452 if (scope.id != .root) {
453 return addLocalExternFnDecl(c, scope, fn_name, Node.initPayload(&proto_node.base));
454 }
455 return addTopLevelDecl(c, fn_name, Node.initPayload(&proto_node.base));
456 }
457
458 // actual function definition with body
459 const body_stmt = fn_decl.getBody();
460 var block_scope = try Scope.Block.init(c, &c.global_scope.base, false);
461 block_scope.return_type = return_qt;
462 defer block_scope.deinit();
463
464 const top_scope = &block_scope.base;
465
466 var param_id: c_uint = 0;
467 for (proto_node.data.params) |*param| {
468 const param_name = param.name orelse {
469 proto_node.data.is_extern = true;
470 proto_node.data.is_export = false;
471 proto_node.data.is_inline = false;
472 try warn(c, &c.global_scope.base, fn_decl_loc, "function {s} parameter has no name, demoted to extern", .{fn_name});
473 return addTopLevelDecl(c, fn_name, Node.initPayload(&proto_node.base));
474 };
475
476 const c_param = fn_decl.getParamDecl(param_id);
477 const qual_type = c_param.getOriginalType();
478 const is_const = qual_type.isConstQualified();
479
480 const mangled_param_name = try block_scope.makeMangledName(c, param_name);
481 param.name = mangled_param_name;
482
483 if (!is_const) {
484 const bare_arg_name = try std.fmt.allocPrint(c.arena, "arg_{s}", .{mangled_param_name});
485 const arg_name = try block_scope.makeMangledName(c, bare_arg_name);
486 param.name = arg_name;
487
488 const redecl_node = try Tag.arg_redecl.create(c.arena, .{ .actual = mangled_param_name, .mangled = arg_name });
489 try block_scope.statements.append(redecl_node);
490 }
491 try block_scope.discardVariable(c, mangled_param_name);
492
493 param_id += 1;
494 }
495
496 const casted_body: *const clang.CompoundStmt = @ptrCast(body_stmt);
497 transCompoundStmtInline(c, casted_body, &block_scope) catch |err| switch (err) {
498 error.OutOfMemory => |e| return e,
499 error.UnsupportedTranslation,
500 error.UnsupportedType,
501 => {
502 proto_node.data.is_extern = true;
503 proto_node.data.is_export = false;
504 proto_node.data.is_inline = false;
505 try warn(c, &c.global_scope.base, fn_decl_loc, "unable to translate function, demoted to extern", .{});
506 return addTopLevelDecl(c, fn_name, Node.initPayload(&proto_node.base));
507 },
508 };
509 // add return statement if the function didn't have one
510 blk: {
511 const maybe_body = try block_scope.complete(c);
512 if (fn_ty.getNoReturnAttr() or isAnyopaque(return_qt) or maybe_body.isNoreturn(false)) {
513 proto_node.data.body = maybe_body;
514 break :blk;
515 }
516
517 const rhs = transZeroInitExpr(c, top_scope, fn_decl_loc, return_qt.getTypePtr()) catch |err| switch (err) {
518 error.OutOfMemory => |e| return e,
519 error.UnsupportedTranslation,
520 error.UnsupportedType,
521 => {
522 proto_node.data.is_extern = true;
523 proto_node.data.is_export = false;
524 proto_node.data.is_inline = false;
525 try warn(c, &c.global_scope.base, fn_decl_loc, "unable to create a return value for function, demoted to extern", .{});
526 return addTopLevelDecl(c, fn_name, Node.initPayload(&proto_node.base));
527 },
528 };
529 const ret = try Tag.@"return".create(c.arena, rhs);
530 try block_scope.statements.append(ret);
531 proto_node.data.body = try block_scope.complete(c);
532 }
533
534 return addTopLevelDecl(c, fn_name, Node.initPayload(&proto_node.base));
535}
536
537fn transQualTypeMaybeInitialized(c: *Context, scope: *Scope, qt: clang.QualType, decl_init: ?*const clang.Expr, loc: clang.SourceLocation) TransError!Node {
538 return if (decl_init) |init_expr|
539 transQualTypeInitialized(c, scope, qt, init_expr, loc)
540 else
541 transQualType(c, scope, qt, loc);
542}
543
544/// This is used in global scope to convert a string literal `S` to [*c]u8:
545/// &(struct {
546/// var static = S.*;
547/// }).static;
548fn stringLiteralToCharStar(c: *Context, str: Node) Error!Node {
549 const var_name = Scope.Block.static_inner_name;
550
551 const variables = try c.arena.alloc(Node, 1);
552 variables[0] = try Tag.mut_str.create(c.arena, .{ .name = var_name, .init = str });
553
554 const anon_struct = try Tag.@"struct".create(c.arena, .{
555 .layout = .none,
556 .fields = &.{},
557 .functions = &.{},
558 .variables = variables,
559 });
560
561 const member_access = try Tag.field_access.create(c.arena, .{
562 .lhs = anon_struct,
563 .field_name = var_name,
564 });
565 return Tag.address_of.create(c.arena, member_access);
566}
567
568/// if mangled_name is not null, this var decl was declared in a block scope.
569fn visitVarDecl(c: *Context, var_decl: *const clang.VarDecl, mangled_name: ?[]const u8) Error!void {
570 const var_name = mangled_name orelse try c.str(@as(*const clang.NamedDecl, @ptrCast(var_decl)).getName_bytes_begin());
571 if (c.global_scope.sym_table.contains(var_name))
572 return; // Avoid processing this decl twice
573
574 const is_pub = mangled_name == null;
575 const is_threadlocal = var_decl.getTLSKind() != .None;
576 const scope = &c.global_scope.base;
577 const var_decl_loc = var_decl.getLocation();
578
579 const qual_type = var_decl.getTypeSourceInfo_getType();
580 const storage_class = var_decl.getStorageClass();
581 const has_init = var_decl.hasInit();
582 const decl_init = var_decl.getInit();
583 var is_const = qual_type.isConstQualified();
584
585 // In C extern variables with initializers behave like Zig exports.
586 // extern int foo = 2;
587 // does the same as:
588 // extern int foo;
589 // int foo = 2;
590 var is_extern = storage_class == .Extern and !has_init;
591 var is_export = !is_extern and storage_class != .Static;
592
593 if (!is_extern and qualTypeWasDemotedToOpaque(c, qual_type)) {
594 return failDecl(c, var_decl_loc, var_name, "non-extern variable has opaque type", .{});
595 }
596
597 const type_node = transQualTypeMaybeInitialized(c, scope, qual_type, decl_init, var_decl_loc) catch |err| switch (err) {
598 error.UnsupportedTranslation, error.UnsupportedType => {
599 return failDecl(c, var_decl_loc, var_name, "unable to resolve variable type", .{});
600 },
601 error.OutOfMemory => |e| return e,
602 };
603
604 var init_node: ?Node = null;
605
606 // If the initialization expression is not present, initialize with undefined.
607 // If it is an integer literal, we can skip the @as since it will be redundant
608 // with the variable type.
609 if (has_init) trans_init: {
610 if (decl_init) |expr| {
611 const node_or_error = if (expr.getStmtClass() == .StringLiteralClass)
612 transStringLiteralInitializer(c, @as(*const clang.StringLiteral, @ptrCast(expr)), type_node)
613 else
614 transExprCoercing(c, scope, expr, .used);
615 init_node = node_or_error catch |err| switch (err) {
616 error.UnsupportedTranslation,
617 error.UnsupportedType,
618 => {
619 is_extern = true;
620 is_export = false;
621 try warn(c, scope, var_decl_loc, "unable to translate variable initializer, demoted to extern", .{});
622 break :trans_init;
623 },
624 error.OutOfMemory => |e| return e,
625 };
626 if (!qualTypeIsBoolean(qual_type) and isBoolRes(init_node.?)) {
627 init_node = try Tag.int_from_bool.create(c.arena, init_node.?);
628 } else if (init_node.?.tag() == .string_literal and qualTypeIsCharStar(qual_type)) {
629 init_node = try stringLiteralToCharStar(c, init_node.?);
630 }
631 } else {
632 init_node = Tag.undefined_literal.init();
633 }
634 } else if (storage_class != .Extern) {
635 // The C language specification states that variables with static or threadlocal
636 // storage without an initializer are initialized to a zero value.
637
638 // std.mem.zeroes(T)
639 init_node = try Tag.std_mem_zeroes.create(c.arena, type_node);
640 } else if (qual_type.getTypeClass() == .IncompleteArray) {
641 // Oh no, an extern array of unknown size! These are really fun because there's no
642 // direct equivalent in Zig. To translate correctly, we'll have to create a C-pointer
643 // to the data initialized via @extern.
644
645 const name_str = try std.fmt.allocPrint(c.arena, "\"{s}\"", .{var_name});
646 init_node = try Tag.builtin_extern.create(c.arena, .{
647 .type = type_node,
648 .name = try Tag.string_literal.create(c.arena, name_str),
649 });
650
651 // Since this is really a pointer to the underlying data, we tweak a few properties.
652 is_extern = false;
653 is_const = true;
654 }
655
656 const linksection_string = blk: {
657 var str_len: usize = undefined;
658 if (var_decl.getSectionAttribute(&str_len)) |str_ptr| {
659 break :blk str_ptr[0..str_len];
660 }
661 break :blk null;
662 };
663
664 const node = try Tag.var_decl.create(c.arena, .{
665 .is_pub = is_pub,
666 .is_const = is_const,
667 .is_extern = is_extern,
668 .is_export = is_export,
669 .is_threadlocal = is_threadlocal,
670 .linksection_string = linksection_string,
671 .alignment = ClangAlignment.forVar(c, var_decl).zigAlignment(),
672 .name = var_name,
673 .type = type_node,
674 .init = init_node,
675 });
676 return addTopLevelDecl(c, var_name, node);
677}
678
679const builtin_typedef_map = std.StaticStringMap([]const u8).initComptime(.{
680 .{ "uint8_t", "u8" },
681 .{ "int8_t", "i8" },
682 .{ "uint16_t", "u16" },
683 .{ "int16_t", "i16" },
684 .{ "uint32_t", "u32" },
685 .{ "int32_t", "i32" },
686 .{ "uint64_t", "u64" },
687 .{ "int64_t", "i64" },
688 .{ "intptr_t", "isize" },
689 .{ "uintptr_t", "usize" },
690 .{ "ssize_t", "isize" },
691 .{ "size_t", "usize" },
692});
693
694fn transTypeDef(c: *Context, scope: *Scope, typedef_decl: *const clang.TypedefNameDecl) Error!void {
695 if (c.decl_table.get(@intFromPtr(typedef_decl.getCanonicalDecl()))) |_|
696 return; // Avoid processing this decl twice
697 const toplevel = scope.id == .root;
698 const bs: *Scope.Block = if (!toplevel) try scope.findBlockScope(c) else undefined;
699
700 var name: []const u8 = try c.str(@as(*const clang.NamedDecl, @ptrCast(typedef_decl)).getName_bytes_begin());
701 try c.typedefs.put(c.gpa, name, {});
702
703 if (builtin_typedef_map.get(name)) |builtin| {
704 return c.decl_table.putNoClobber(c.gpa, @intFromPtr(typedef_decl.getCanonicalDecl()), builtin);
705 }
706 if (!toplevel) name = try bs.makeMangledName(c, name);
707 try c.decl_table.putNoClobber(c.gpa, @intFromPtr(typedef_decl.getCanonicalDecl()), name);
708
709 const child_qt = typedef_decl.getUnderlyingType();
710 const typedef_loc = typedef_decl.getLocation();
711 const init_node = transQualType(c, scope, child_qt, typedef_loc) catch |err| switch (err) {
712 error.UnsupportedType => {
713 return failDecl(c, typedef_loc, name, "unable to resolve typedef child type", .{});
714 },
715 error.OutOfMemory => |e| return e,
716 };
717
718 const payload = try c.arena.create(ast.Payload.SimpleVarDecl);
719 payload.* = .{
720 .base = .{ .tag = ([2]Tag{ .var_simple, .pub_var_simple })[@intFromBool(toplevel)] },
721 .data = .{
722 .name = name,
723 .init = init_node,
724 },
725 };
726 const node = Node.initPayload(&payload.base);
727
728 if (toplevel) {
729 try addTopLevelDecl(c, name, node);
730 } else {
731 try scope.appendNode(node);
732 if (node.tag() != .pub_var_simple) {
733 try bs.discardVariable(c, name);
734 }
735 }
736}
737
738/// Build a getter function for a flexible array member at the end of a C struct
739/// e.g. `T items[]` or `T items[0]`. The generated function returns a [*c] pointer
740/// to the flexible array with the correct const and volatile qualifiers
741fn buildFlexibleArrayFn(
742 c: *Context,
743 scope: *Scope,
744 layout: *const clang.ASTRecordLayout,
745 field_name: []const u8,
746 field_decl: *const clang.FieldDecl,
747) TypeError!Node {
748 const field_qt = field_decl.getType();
749 const field_qt_canon = qualTypeCanon(field_qt);
750
751 const u8_type = try Tag.type.create(c.arena, "u8");
752 const self_param_name = "self";
753 const self_param = try Tag.identifier.create(c.arena, self_param_name);
754 const self_type = try Tag.typeof.create(c.arena, self_param);
755
756 const fn_params = try c.arena.alloc(ast.Payload.Param, 1);
757
758 fn_params[0] = .{
759 .name = self_param_name,
760 .type = Tag.@"anytype".init(),
761 .is_noalias = false,
762 };
763
764 const array_type = @as(*const clang.ArrayType, @ptrCast(field_qt_canon));
765 const element_qt = array_type.getElementType();
766 const element_type = try transQualType(c, scope, element_qt, field_decl.getLocation());
767
768 var block_scope = try Scope.Block.init(c, scope, false);
769 defer block_scope.deinit();
770
771 const intermediate_type_name = try block_scope.makeMangledName(c, "Intermediate");
772 const intermediate_type = try Tag.helpers_flexible_array_type.create(c.arena, .{ .lhs = self_type, .rhs = u8_type });
773 const intermediate_type_decl = try Tag.var_simple.create(c.arena, .{
774 .name = intermediate_type_name,
775 .init = intermediate_type,
776 });
777 try block_scope.statements.append(intermediate_type_decl);
778 const intermediate_type_ident = try Tag.identifier.create(c.arena, intermediate_type_name);
779
780 const return_type_name = try block_scope.makeMangledName(c, "ReturnType");
781 const return_type = try Tag.helpers_flexible_array_type.create(c.arena, .{ .lhs = self_type, .rhs = element_type });
782 const return_type_decl = try Tag.var_simple.create(c.arena, .{
783 .name = return_type_name,
784 .init = return_type,
785 });
786 try block_scope.statements.append(return_type_decl);
787 const return_type_ident = try Tag.identifier.create(c.arena, return_type_name);
788
789 const field_index = field_decl.getFieldIndex();
790 const bit_offset = layout.getFieldOffset(field_index); // this is a target-specific constant based on the struct layout
791 const byte_offset = bit_offset / 8;
792
793 const casted_self = try Tag.as.create(c.arena, .{
794 .lhs = intermediate_type_ident,
795 .rhs = try Tag.ptr_cast.create(c.arena, self_param),
796 });
797 const field_offset = try transCreateNodeNumber(c, byte_offset, .int);
798 const field_ptr = try Tag.add.create(c.arena, .{ .lhs = casted_self, .rhs = field_offset });
799
800 const ptr_cast = try Tag.as.create(c.arena, .{
801 .lhs = return_type_ident,
802 .rhs = try Tag.ptr_cast.create(
803 c.arena,
804 try Tag.align_cast.create(
805 c.arena,
806 field_ptr,
807 ),
808 ),
809 });
810 const return_stmt = try Tag.@"return".create(c.arena, ptr_cast);
811 try block_scope.statements.append(return_stmt);
812
813 const payload = try c.arena.create(ast.Payload.Func);
814 payload.* = .{
815 .base = .{ .tag = .func },
816 .data = .{
817 .is_pub = true,
818 .is_extern = false,
819 .is_export = false,
820 .is_inline = false,
821 .is_var_args = false,
822 .name = field_name,
823 .linksection_string = null,
824 .explicit_callconv = null,
825 .params = fn_params,
826 .return_type = return_type,
827 .body = try block_scope.complete(c),
828 .alignment = null,
829 },
830 };
831 return Node.initPayload(&payload.base);
832}
833
834/// Return true if `field_decl` is the flexible array field for its parent record
835fn isFlexibleArrayFieldDecl(c: *Context, field_decl: *const clang.FieldDecl) bool {
836 const record_decl = field_decl.getParent() orelse return false;
837 const record_flexible_field = flexibleArrayField(c, record_decl) orelse return false;
838 return field_decl == record_flexible_field;
839}
840
841/// Find the flexible array field for a record if any. A flexible array field is an
842/// incomplete or zero-length array that occurs as the last field of a record.
843/// clang's RecordDecl::hasFlexibleArrayMember is not suitable for determining
844/// this because it returns false for a record that ends with a zero-length
845/// array, but we consider those to be flexible arrays
846fn flexibleArrayField(c: *Context, record_def: *const clang.RecordDecl) ?*const clang.FieldDecl {
847 var it = record_def.field_begin();
848 const end_it = record_def.field_end();
849 var flexible_field: ?*const clang.FieldDecl = null;
850 while (it.neq(end_it)) : (it = it.next()) {
851 const field_decl = it.deref();
852 const ty = qualTypeCanon(field_decl.getType());
853 const incomplete_or_zero_size = ty.isIncompleteOrZeroLengthArrayType(c.clang_context);
854 if (incomplete_or_zero_size) {
855 flexible_field = field_decl;
856 } else {
857 flexible_field = null;
858 }
859 }
860 return flexible_field;
861}
862
863fn mangleWeakGlobalName(c: *Context, want_name: []const u8) ![]const u8 {
864 var cur_name = want_name;
865
866 if (!c.weak_global_names.contains(want_name)) {
867 // This type wasn't noticed by the name detection pass, so nothing has been treating this as
868 // a weak global name. We must mangle it to avoid conflicts with locals.
869 cur_name = try std.fmt.allocPrint(c.arena, "{s}_{d}", .{ want_name, c.getMangle() });
870 }
871
872 while (c.global_names.contains(cur_name)) {
873 cur_name = try std.fmt.allocPrint(c.arena, "{s}_{d}", .{ want_name, c.getMangle() });
874 }
875 return cur_name;
876}
877
878fn transRecordDecl(c: *Context, scope: *Scope, record_decl: *const clang.RecordDecl) Error!void {
879 if (c.decl_table.get(@intFromPtr(record_decl.getCanonicalDecl()))) |_|
880 return; // Avoid processing this decl twice
881 const record_loc = record_decl.getLocation();
882 const toplevel = scope.id == .root;
883 const bs: *Scope.Block = if (!toplevel) try scope.findBlockScope(c) else undefined;
884
885 var is_union = false;
886 var container_kind_name: []const u8 = undefined;
887 var bare_name: []const u8 = try c.str(@as(*const clang.NamedDecl, @ptrCast(record_decl)).getName_bytes_begin());
888
889 if (record_decl.isUnion()) {
890 container_kind_name = "union";
891 is_union = true;
892 } else if (record_decl.isStruct()) {
893 container_kind_name = "struct";
894 } else {
895 try c.decl_table.putNoClobber(c.gpa, @intFromPtr(record_decl.getCanonicalDecl()), bare_name);
896 return failDecl(c, record_loc, bare_name, "record {s} is not a struct or union", .{bare_name});
897 }
898
899 var is_unnamed = false;
900 var name = bare_name;
901 if (c.unnamed_typedefs.get(@intFromPtr(record_decl.getCanonicalDecl()))) |typedef_name| {
902 bare_name = typedef_name;
903 name = typedef_name;
904 } else {
905 // Record declarations such as `struct {...} x` have no name but they're not
906 // anonymous hence here isAnonymousStructOrUnion is not needed
907 if (bare_name.len == 0) {
908 bare_name = try std.fmt.allocPrint(c.arena, "unnamed_{d}", .{c.getMangle()});
909 is_unnamed = true;
910 }
911 name = try std.fmt.allocPrint(c.arena, "{s}_{s}", .{ container_kind_name, bare_name });
912 if (toplevel and !is_unnamed) {
913 name = try mangleWeakGlobalName(c, name);
914 }
915 }
916 if (!toplevel) name = try bs.makeMangledName(c, name);
917 try c.decl_table.putNoClobber(c.gpa, @intFromPtr(record_decl.getCanonicalDecl()), name);
918
919 const is_pub = toplevel and !is_unnamed;
920 const init_node = blk: {
921 const record_def = record_decl.getDefinition() orelse {
922 try c.opaque_demotes.put(c.gpa, @intFromPtr(record_decl.getCanonicalDecl()), {});
923 break :blk Tag.opaque_literal.init();
924 };
925
926 var fields = std.array_list.Managed(ast.Payload.Record.Field).init(c.gpa);
927 defer fields.deinit();
928
929 var functions = std.array_list.Managed(Node).init(c.gpa);
930 defer functions.deinit();
931
932 const flexible_field = flexibleArrayField(c, record_def);
933 var unnamed_field_count: u32 = 0;
934 var it = record_def.field_begin();
935 const end_it = record_def.field_end();
936 const layout = record_def.getASTRecordLayout(c.clang_context);
937 const record_alignment = layout.getAlignment();
938
939 while (it.neq(end_it)) : (it = it.next()) {
940 const field_decl = it.deref();
941 const field_loc = field_decl.getLocation();
942 const field_qt = field_decl.getType();
943
944 if (field_decl.isBitField()) {
945 try c.opaque_demotes.put(c.gpa, @intFromPtr(record_decl.getCanonicalDecl()), {});
946 try warn(c, scope, field_loc, "{s} demoted to opaque type - has bitfield", .{container_kind_name});
947 break :blk Tag.opaque_literal.init();
948 }
949
950 var is_anon = false;
951 var field_name = try c.str(@as(*const clang.NamedDecl, @ptrCast(field_decl)).getName_bytes_begin());
952 if (field_decl.isAnonymousStructOrUnion() or field_name.len == 0) {
953 // Context.getMangle() is not used here because doing so causes unpredictable field names for anonymous fields.
954 field_name = try std.fmt.allocPrint(c.arena, "unnamed_{d}", .{unnamed_field_count});
955 unnamed_field_count += 1;
956 is_anon = true;
957 }
958 if (flexible_field == field_decl) {
959 const flexible_array_fn = buildFlexibleArrayFn(c, scope, layout, field_name, field_decl) catch |err| switch (err) {
960 error.UnsupportedType => {
961 try c.opaque_demotes.put(c.gpa, @intFromPtr(record_decl.getCanonicalDecl()), {});
962 try warn(c, scope, record_loc, "{s} demoted to opaque type - unable to translate type of flexible array field {s}", .{ container_kind_name, field_name });
963 break :blk Tag.opaque_literal.init();
964 },
965 else => |e| return e,
966 };
967 try functions.append(flexible_array_fn);
968 continue;
969 }
970 const field_type = transQualType(c, scope, field_qt, field_loc) catch |err| switch (err) {
971 error.UnsupportedType => {
972 try c.opaque_demotes.put(c.gpa, @intFromPtr(record_decl.getCanonicalDecl()), {});
973 try warn(c, scope, record_loc, "{s} demoted to opaque type - unable to translate type of field {s}", .{ container_kind_name, field_name });
974 break :blk Tag.opaque_literal.init();
975 },
976 else => |e| return e,
977 };
978
979 const alignment = if (flexible_field != null and field_decl.getFieldIndex() == 0)
980 @as(c_uint, @intCast(record_alignment))
981 else
982 ClangAlignment.forField(c, field_decl, record_def).zigAlignment();
983
984 // C99 introduced designated initializers for structs. Omitted fields are implicitly
985 // initialized to zero. Some C APIs are designed with this in mind. Defaulting to zero
986 // values for translated struct fields permits Zig code to comfortably use such an API.
987 const default_value = if (record_decl.isStruct())
988 try Tag.std_mem_zeroes.create(c.arena, field_type)
989 else
990 null;
991
992 if (is_anon) {
993 try c.decl_table.putNoClobber(c.gpa, @intFromPtr(field_decl.getCanonicalDecl()), field_name);
994 }
995
996 try fields.append(.{
997 .name = field_name,
998 .type = field_type,
999 .alignment = alignment,
1000 .default_value = default_value,
1001 });
1002 }
1003
1004 const record_payload = try c.arena.create(ast.Payload.Record);
1005 record_payload.* = .{
1006 .base = .{ .tag = ([2]Tag{ .@"struct", .@"union" })[@intFromBool(is_union)] },
1007 .data = .{
1008 .layout = .@"extern",
1009 .fields = try c.arena.dupe(ast.Payload.Record.Field, fields.items),
1010 .functions = try c.arena.dupe(Node, functions.items),
1011 .variables = &.{},
1012 },
1013 };
1014 break :blk Node.initPayload(&record_payload.base);
1015 };
1016
1017 const payload = try c.arena.create(ast.Payload.SimpleVarDecl);
1018 payload.* = .{
1019 .base = .{ .tag = ([2]Tag{ .var_simple, .pub_var_simple })[@intFromBool(is_pub)] },
1020 .data = .{
1021 .name = name,
1022 .init = init_node,
1023 },
1024 };
1025 const node = Node.initPayload(&payload.base);
1026 if (toplevel) {
1027 try addTopLevelDecl(c, name, node);
1028 // Only add the alias if the name is available *and* it was caught by
1029 // name detection. Don't bother performing a weak mangle, since a
1030 // mangled name is of no real use here.
1031 if (!is_unnamed and !c.global_names.contains(bare_name) and c.weak_global_names.contains(bare_name))
1032 try c.alias_list.append(.{ .alias = bare_name, .name = name });
1033 } else {
1034 try scope.appendNode(node);
1035 if (node.tag() != .pub_var_simple) {
1036 try bs.discardVariable(c, name);
1037 }
1038 }
1039}
1040
1041fn transEnumDecl(c: *Context, scope: *Scope, enum_decl: *const clang.EnumDecl) Error!void {
1042 if (c.decl_table.get(@intFromPtr(enum_decl.getCanonicalDecl()))) |_|
1043 return; // Avoid processing this decl twice
1044 const enum_loc = enum_decl.getLocation();
1045 const toplevel = scope.id == .root;
1046 const bs: *Scope.Block = if (!toplevel) try scope.findBlockScope(c) else undefined;
1047
1048 var is_unnamed = false;
1049 var bare_name: []const u8 = try c.str(@as(*const clang.NamedDecl, @ptrCast(enum_decl)).getName_bytes_begin());
1050 var name = bare_name;
1051 if (c.unnamed_typedefs.get(@intFromPtr(enum_decl.getCanonicalDecl()))) |typedef_name| {
1052 bare_name = typedef_name;
1053 name = typedef_name;
1054 } else {
1055 if (bare_name.len == 0) {
1056 bare_name = try std.fmt.allocPrint(c.arena, "unnamed_{d}", .{c.getMangle()});
1057 is_unnamed = true;
1058 }
1059 name = try std.fmt.allocPrint(c.arena, "enum_{s}", .{bare_name});
1060 if (toplevel and !is_unnamed) {
1061 name = try mangleWeakGlobalName(c, name);
1062 }
1063 }
1064 if (!toplevel) name = try bs.makeMangledName(c, name);
1065 try c.decl_table.putNoClobber(c.gpa, @intFromPtr(enum_decl.getCanonicalDecl()), name);
1066
1067 const enum_type_node = if (enum_decl.getDefinition()) |enum_def| blk: {
1068 var it = enum_def.enumerator_begin();
1069 const end_it = enum_def.enumerator_end();
1070 while (it.neq(end_it)) : (it = it.next()) {
1071 const enum_const = it.deref();
1072 var enum_val_name: []const u8 = try c.str(@as(*const clang.NamedDecl, @ptrCast(enum_const)).getName_bytes_begin());
1073 if (!toplevel) {
1074 enum_val_name = try bs.makeMangledName(c, enum_val_name);
1075 }
1076
1077 const enum_const_qt = @as(*const clang.ValueDecl, @ptrCast(enum_const)).getType();
1078 const enum_const_loc = @as(*const clang.Decl, @ptrCast(enum_const)).getLocation();
1079 const enum_const_type_node: ?Node = transQualType(c, scope, enum_const_qt, enum_const_loc) catch |err| switch (err) {
1080 error.UnsupportedType => null,
1081 else => |e| return e,
1082 };
1083
1084 const enum_const_def = try Tag.enum_constant.create(c.arena, .{
1085 .name = enum_val_name,
1086 .is_public = toplevel,
1087 .type = enum_const_type_node,
1088 // TODO: as of LLVM 18, the return value from `enum_const.getInitVal` here needs
1089 // to be freed with a call to its free() method.
1090 .value = try transCreateNodeAPInt(c, enum_const.getInitVal()),
1091 });
1092 if (toplevel)
1093 try addTopLevelDecl(c, enum_val_name, enum_const_def)
1094 else {
1095 try scope.appendNode(enum_const_def);
1096 try bs.discardVariable(c, enum_val_name);
1097 }
1098 }
1099
1100 const int_type = enum_decl.getIntegerType();
1101 // The underlying type may be null in case of forward-declared enum
1102 // types, while that's not ISO-C compliant many compilers allow this and
1103 // default to the usual integer type used for all the enums.
1104
1105 // default to c_int since msvc and gcc default to different types
1106 break :blk if (int_type.ptr != null)
1107 transQualType(c, scope, int_type, enum_loc) catch |err| switch (err) {
1108 error.UnsupportedType => {
1109 return failDecl(c, enum_loc, name, "unable to translate enum integer type", .{});
1110 },
1111 else => |e| return e,
1112 }
1113 else
1114 try Tag.type.create(c.arena, "c_int");
1115 } else blk: {
1116 try c.opaque_demotes.put(c.gpa, @intFromPtr(enum_decl.getCanonicalDecl()), {});
1117 break :blk Tag.opaque_literal.init();
1118 };
1119
1120 const is_pub = toplevel and !is_unnamed;
1121 const payload = try c.arena.create(ast.Payload.SimpleVarDecl);
1122 payload.* = .{
1123 .base = .{ .tag = ([2]Tag{ .var_simple, .pub_var_simple })[@intFromBool(is_pub)] },
1124 .data = .{
1125 .init = enum_type_node,
1126 .name = name,
1127 },
1128 };
1129 const node = Node.initPayload(&payload.base);
1130 if (toplevel) {
1131 try addTopLevelDecl(c, name, node);
1132 // Only add the alias if the name is available *and* it was caught by
1133 // name detection. Don't bother performing a weak mangle, since a
1134 // mangled name is of no real use here.
1135 if (!is_unnamed and !c.global_names.contains(bare_name) and c.weak_global_names.contains(bare_name))
1136 try c.alias_list.append(.{ .alias = bare_name, .name = name });
1137 } else {
1138 try scope.appendNode(node);
1139 if (node.tag() != .pub_var_simple) {
1140 try bs.discardVariable(c, name);
1141 }
1142 }
1143}
1144
1145fn transStmt(
1146 c: *Context,
1147 scope: *Scope,
1148 stmt: *const clang.Stmt,
1149 result_used: ResultUsed,
1150) TransError!Node {
1151 const sc = stmt.getStmtClass();
1152 switch (sc) {
1153 .BinaryOperatorClass => return transBinaryOperator(c, scope, @as(*const clang.BinaryOperator, @ptrCast(stmt)), result_used),
1154 .CompoundStmtClass => return transCompoundStmt(c, scope, @as(*const clang.CompoundStmt, @ptrCast(stmt))),
1155 .CStyleCastExprClass => return transCStyleCastExprClass(c, scope, @as(*const clang.CStyleCastExpr, @ptrCast(stmt)), result_used),
1156 .DeclStmtClass => return transDeclStmt(c, scope, @as(*const clang.DeclStmt, @ptrCast(stmt))),
1157 .DeclRefExprClass => return transDeclRefExpr(c, scope, @as(*const clang.DeclRefExpr, @ptrCast(stmt))),
1158 .ImplicitCastExprClass => return transImplicitCastExpr(c, scope, @as(*const clang.ImplicitCastExpr, @ptrCast(stmt)), result_used),
1159 .IntegerLiteralClass => return transIntegerLiteral(c, scope, @as(*const clang.IntegerLiteral, @ptrCast(stmt)), result_used, .with_as),
1160 .ReturnStmtClass => return transReturnStmt(c, scope, @as(*const clang.ReturnStmt, @ptrCast(stmt))),
1161 .StringLiteralClass => return transStringLiteral(c, scope, @as(*const clang.StringLiteral, @ptrCast(stmt)), result_used),
1162 .ParenExprClass => {
1163 const expr = try transExpr(c, scope, @as(*const clang.ParenExpr, @ptrCast(stmt)).getSubExpr(), .used);
1164 return maybeSuppressResult(c, result_used, expr);
1165 },
1166 .InitListExprClass => return transInitListExpr(c, scope, @as(*const clang.InitListExpr, @ptrCast(stmt)), result_used),
1167 .ImplicitValueInitExprClass => return transImplicitValueInitExpr(c, scope, @as(*const clang.Expr, @ptrCast(stmt))),
1168 .IfStmtClass => return transIfStmt(c, scope, @as(*const clang.IfStmt, @ptrCast(stmt))),
1169 .WhileStmtClass => return transWhileLoop(c, scope, @as(*const clang.WhileStmt, @ptrCast(stmt))),
1170 .DoStmtClass => return transDoWhileLoop(c, scope, @as(*const clang.DoStmt, @ptrCast(stmt))),
1171 .NullStmtClass => {
1172 return Tag.empty_block.init();
1173 },
1174 .ContinueStmtClass => return Tag.@"continue".init(),
1175 .BreakStmtClass => return Tag.@"break".init(),
1176 .ForStmtClass => return transForLoop(c, scope, @as(*const clang.ForStmt, @ptrCast(stmt))),
1177 .FloatingLiteralClass => return transFloatingLiteral(c, @as(*const clang.FloatingLiteral, @ptrCast(stmt)), result_used),
1178 .ConditionalOperatorClass => {
1179 return transConditionalOperator(c, scope, @as(*const clang.ConditionalOperator, @ptrCast(stmt)), result_used);
1180 },
1181 .BinaryConditionalOperatorClass => {
1182 return transBinaryConditionalOperator(c, scope, @as(*const clang.BinaryConditionalOperator, @ptrCast(stmt)), result_used);
1183 },
1184 .SwitchStmtClass => return transSwitch(c, scope, @as(*const clang.SwitchStmt, @ptrCast(stmt))),
1185 .CaseStmtClass, .DefaultStmtClass => {
1186 return fail(c, error.UnsupportedTranslation, stmt.getBeginLoc(), "TODO complex switch", .{});
1187 },
1188 .ConstantExprClass => return transConstantExpr(c, scope, @as(*const clang.Expr, @ptrCast(stmt)), result_used),
1189 .PredefinedExprClass => return transPredefinedExpr(c, scope, @as(*const clang.PredefinedExpr, @ptrCast(stmt)), result_used),
1190 .CharacterLiteralClass => return transCharLiteral(c, scope, @as(*const clang.CharacterLiteral, @ptrCast(stmt)), result_used, .with_as),
1191 .StmtExprClass => return transStmtExpr(c, scope, @as(*const clang.StmtExpr, @ptrCast(stmt)), result_used),
1192 .MemberExprClass => return transMemberExpr(c, scope, @as(*const clang.MemberExpr, @ptrCast(stmt)), result_used),
1193 .ArraySubscriptExprClass => return transArrayAccess(c, scope, @as(*const clang.ArraySubscriptExpr, @ptrCast(stmt)), result_used),
1194 .CallExprClass => return transCallExpr(c, scope, @as(*const clang.CallExpr, @ptrCast(stmt)), result_used),
1195 .UnaryExprOrTypeTraitExprClass => return transUnaryExprOrTypeTraitExpr(c, scope, @as(*const clang.UnaryExprOrTypeTraitExpr, @ptrCast(stmt)), result_used),
1196 .UnaryOperatorClass => return transUnaryOperator(c, scope, @as(*const clang.UnaryOperator, @ptrCast(stmt)), result_used),
1197 .CompoundAssignOperatorClass => return transCompoundAssignOperator(c, scope, @as(*const clang.CompoundAssignOperator, @ptrCast(stmt)), result_used),
1198 .OpaqueValueExprClass => {
1199 const source_expr = @as(*const clang.OpaqueValueExpr, @ptrCast(stmt)).getSourceExpr().?;
1200 const expr = try transExpr(c, scope, source_expr, .used);
1201 return maybeSuppressResult(c, result_used, expr);
1202 },
1203 .OffsetOfExprClass => return transOffsetOfExpr(c, @as(*const clang.OffsetOfExpr, @ptrCast(stmt)), result_used),
1204 .CompoundLiteralExprClass => {
1205 const compound_literal = @as(*const clang.CompoundLiteralExpr, @ptrCast(stmt));
1206 return transExpr(c, scope, compound_literal.getInitializer(), result_used);
1207 },
1208 .GenericSelectionExprClass => {
1209 const gen_sel = @as(*const clang.GenericSelectionExpr, @ptrCast(stmt));
1210 return transExpr(c, scope, gen_sel.getResultExpr(), result_used);
1211 },
1212 .ConvertVectorExprClass => {
1213 const conv_vec = @as(*const clang.ConvertVectorExpr, @ptrCast(stmt));
1214 const conv_vec_node = try transConvertVectorExpr(c, scope, conv_vec);
1215 return maybeSuppressResult(c, result_used, conv_vec_node);
1216 },
1217 .ShuffleVectorExprClass => {
1218 const shuffle_vec_expr = @as(*const clang.ShuffleVectorExpr, @ptrCast(stmt));
1219 const shuffle_vec_node = try transShuffleVectorExpr(c, scope, shuffle_vec_expr);
1220 return maybeSuppressResult(c, result_used, shuffle_vec_node);
1221 },
1222 .ChooseExprClass => {
1223 const choose_expr = @as(*const clang.ChooseExpr, @ptrCast(stmt));
1224 return transExpr(c, scope, choose_expr.getChosenSubExpr(), result_used);
1225 },
1226 // When adding new cases here, see comment for maybeBlockify()
1227 .GCCAsmStmtClass,
1228 .GotoStmtClass,
1229 .IndirectGotoStmtClass,
1230 .AttributedStmtClass,
1231 .AddrLabelExprClass,
1232 .AtomicExprClass,
1233 .BlockExprClass,
1234 .UserDefinedLiteralClass,
1235 .BuiltinBitCastExprClass,
1236 .DesignatedInitExprClass,
1237 .LabelStmtClass,
1238 => return fail(c, error.UnsupportedTranslation, stmt.getBeginLoc(), "TODO implement translation of stmt class {s}", .{@tagName(sc)}),
1239 else => return fail(c, error.UnsupportedTranslation, stmt.getBeginLoc(), "unsupported stmt class {s}", .{@tagName(sc)}),
1240 }
1241}
1242
1243/// See https://clang.llvm.org/docs/LanguageExtensions.html#langext-builtin-convertvector
1244fn transConvertVectorExpr(
1245 c: *Context,
1246 scope: *Scope,
1247 expr: *const clang.ConvertVectorExpr,
1248) TransError!Node {
1249 const base_stmt = @as(*const clang.Stmt, @ptrCast(expr));
1250
1251 var block_scope = try Scope.Block.init(c, scope, true);
1252 defer block_scope.deinit();
1253
1254 const src_expr = expr.getSrcExpr();
1255 const src_type = qualTypeCanon(src_expr.getType());
1256 const src_vector_ty = @as(*const clang.VectorType, @ptrCast(src_type));
1257 const src_element_qt = src_vector_ty.getElementType();
1258
1259 const src_expr_node = try transExpr(c, &block_scope.base, src_expr, .used);
1260
1261 const dst_qt = expr.getTypeSourceInfo_getType();
1262 const dst_type_node = try transQualType(c, &block_scope.base, dst_qt, base_stmt.getBeginLoc());
1263 const dst_vector_ty = @as(*const clang.VectorType, @ptrCast(qualTypeCanon(dst_qt)));
1264 const num_elements = dst_vector_ty.getNumElements();
1265 const dst_element_qt = dst_vector_ty.getElementType();
1266
1267 // workaround for https://github.com/ziglang/zig/issues/8322
1268 // we store the casted results into temp variables and use those
1269 // to initialize the vector. Eventually we can just directly
1270 // construct the init_list from casted source members
1271 var i: usize = 0;
1272 while (i < num_elements) : (i += 1) {
1273 const mangled_name = try block_scope.makeMangledName(c, "tmp");
1274 const value = try Tag.array_access.create(c.arena, .{
1275 .lhs = src_expr_node,
1276 .rhs = try transCreateNodeNumber(c, i, .int),
1277 });
1278 const tmp_decl_node = try Tag.var_simple.create(c.arena, .{
1279 .name = mangled_name,
1280 .init = try transCCast(c, &block_scope.base, base_stmt.getBeginLoc(), dst_element_qt, src_element_qt, value),
1281 });
1282 try block_scope.statements.append(tmp_decl_node);
1283 }
1284
1285 const init_list = try c.arena.alloc(Node, num_elements);
1286 for (init_list, 0..) |*init, init_index| {
1287 const tmp_decl = block_scope.statements.items[init_index];
1288 const name = tmp_decl.castTag(.var_simple).?.data.name;
1289 init.* = try Tag.identifier.create(c.arena, name);
1290 }
1291
1292 const vec_init = try Tag.array_init.create(c.arena, .{
1293 .cond = dst_type_node,
1294 .cases = init_list,
1295 });
1296
1297 const break_node = try Tag.break_val.create(c.arena, .{
1298 .label = block_scope.label,
1299 .val = vec_init,
1300 });
1301 try block_scope.statements.append(break_node);
1302 return block_scope.complete(c);
1303}
1304
1305fn makeShuffleMask(c: *Context, scope: *Scope, expr: *const clang.ShuffleVectorExpr, vector_len: Node) TransError!Node {
1306 const num_subexprs = expr.getNumSubExprs();
1307 assert(num_subexprs >= 3); // two source vectors + at least 1 index expression
1308 const mask_len = num_subexprs - 2;
1309
1310 const mask_type = try Tag.vector.create(c.arena, .{
1311 .lhs = try transCreateNodeNumber(c, mask_len, .int),
1312 .rhs = try Tag.type.create(c.arena, "i32"),
1313 });
1314
1315 const init_list = try c.arena.alloc(Node, mask_len);
1316
1317 for (init_list, 0..) |*init, i| {
1318 const index_expr = try transExprCoercing(c, scope, expr.getExpr(@as(c_uint, @intCast(i + 2))), .used);
1319 const converted_index = try Tag.helpers_shuffle_vector_index.create(c.arena, .{ .lhs = index_expr, .rhs = vector_len });
1320 init.* = converted_index;
1321 }
1322
1323 return Tag.array_init.create(c.arena, .{
1324 .cond = mask_type,
1325 .cases = init_list,
1326 });
1327}
1328
1329/// @typeInfo(@TypeOf(vec_node)).Vector.<field>
1330fn vectorTypeInfo(arena: mem.Allocator, vec_node: Node, field: []const u8) TransError!Node {
1331 const typeof_call = try Tag.typeof.create(arena, vec_node);
1332 const typeinfo_call = try Tag.typeinfo.create(arena, typeof_call);
1333 const vector_type_info = try Tag.field_access.create(arena, .{ .lhs = typeinfo_call, .field_name = "vector" });
1334 return Tag.field_access.create(arena, .{ .lhs = vector_type_info, .field_name = field });
1335}
1336
1337fn transShuffleVectorExpr(
1338 c: *Context,
1339 scope: *Scope,
1340 expr: *const clang.ShuffleVectorExpr,
1341) TransError!Node {
1342 const base_expr = @as(*const clang.Expr, @ptrCast(expr));
1343 const num_subexprs = expr.getNumSubExprs();
1344 if (num_subexprs < 3) return fail(c, error.UnsupportedTranslation, base_expr.getBeginLoc(), "ShuffleVector needs at least 1 index", .{});
1345
1346 const a = try transExpr(c, scope, expr.getExpr(0), .used);
1347 const b = try transExpr(c, scope, expr.getExpr(1), .used);
1348
1349 // clang requires first two arguments to __builtin_shufflevector to be same type
1350 const vector_child_type = try vectorTypeInfo(c.arena, a, "child");
1351 const vector_len = try vectorTypeInfo(c.arena, a, "len");
1352 const shuffle_mask = try makeShuffleMask(c, scope, expr, vector_len);
1353
1354 return Tag.shuffle.create(c.arena, .{
1355 .element_type = vector_child_type,
1356 .a = a,
1357 .b = b,
1358 .mask_vector = shuffle_mask,
1359 });
1360}
1361
1362/// Translate a "simple" offsetof expression containing exactly one component,
1363/// when that component is of kind .Field - e.g. offsetof(mytype, myfield)
1364fn transSimpleOffsetOfExpr(c: *Context, expr: *const clang.OffsetOfExpr) TransError!Node {
1365 assert(expr.getNumComponents() == 1);
1366 const component = expr.getComponent(0);
1367 if (component.getKind() == .Field) {
1368 const field_decl = component.getField();
1369 if (field_decl.getParent()) |record_decl| {
1370 if (c.decl_table.get(@intFromPtr(record_decl.getCanonicalDecl()))) |type_name| {
1371 const type_node = try Tag.type.create(c.arena, type_name);
1372
1373 const raw_field_name = try c.str(@as(*const clang.NamedDecl, @ptrCast(field_decl)).getName_bytes_begin());
1374 const quoted_field_name = try std.fmt.allocPrint(c.arena, "\"{s}\"", .{raw_field_name});
1375 const field_name_node = try Tag.string_literal.create(c.arena, quoted_field_name);
1376
1377 return Tag.offset_of.create(c.arena, .{
1378 .lhs = type_node,
1379 .rhs = field_name_node,
1380 });
1381 }
1382 }
1383 }
1384 return fail(c, error.UnsupportedTranslation, expr.getBeginLoc(), "failed to translate simple OffsetOfExpr", .{});
1385}
1386
1387fn transOffsetOfExpr(
1388 c: *Context,
1389 expr: *const clang.OffsetOfExpr,
1390 result_used: ResultUsed,
1391) TransError!Node {
1392 if (expr.getNumComponents() == 1) {
1393 const offsetof_expr = try transSimpleOffsetOfExpr(c, expr);
1394 return maybeSuppressResult(c, result_used, offsetof_expr);
1395 }
1396
1397 // TODO implement OffsetOfExpr with more than 1 component
1398 // OffsetOfExpr API:
1399 // call expr.getComponent(idx) while idx < expr.getNumComponents()
1400 // component.getKind() will be either .Array or .Field (other kinds are C++-only)
1401 // if .Field, use component.getField() to retrieve *clang.FieldDecl
1402 // if .Array, use component.getArrayExprIndex() to get a c_uint which
1403 // can be passed to expr.getIndexExpr(expr_index) to get the *clang.Expr for the array index
1404
1405 return fail(c, error.UnsupportedTranslation, expr.getBeginLoc(), "TODO: implement complex OffsetOfExpr translation", .{});
1406}
1407
1408/// Cast a signed integer node to a usize, for use in pointer arithmetic. Negative numbers
1409/// will become very large positive numbers but that is ok since we only use this in
1410/// pointer arithmetic expressions, where wraparound will ensure we get the correct value.
1411/// node -> @bitCast(usize, @intCast(isize, node))
1412fn usizeCastForWrappingPtrArithmetic(gpa: mem.Allocator, node: Node) TransError!Node {
1413 const intcast_node = try Tag.as.create(gpa, .{
1414 .lhs = try Tag.type.create(gpa, "isize"),
1415 .rhs = try Tag.int_cast.create(gpa, node),
1416 });
1417
1418 return Tag.as.create(gpa, .{
1419 .lhs = try Tag.type.create(gpa, "usize"),
1420 .rhs = try Tag.bit_cast.create(gpa, intcast_node),
1421 });
1422}
1423
1424/// Translate an arithmetic expression with a pointer operand and a signed-integer operand.
1425/// Zig requires a usize argument for pointer arithmetic, so we intCast to isize and then
1426/// bitcast to usize; pointer wraparound make the math work.
1427/// Zig pointer addition is not commutative (unlike C); the pointer operand needs to be on the left.
1428/// The + operator in C is not a sequence point so it should be safe to switch the order if necessary.
1429fn transCreatePointerArithmeticSignedOp(
1430 c: *Context,
1431 scope: *Scope,
1432 stmt: *const clang.BinaryOperator,
1433 result_used: ResultUsed,
1434) TransError!Node {
1435 const is_add = stmt.getOpcode() == .Add;
1436 const lhs = stmt.getLHS();
1437 const rhs = stmt.getRHS();
1438 const swap_operands = is_add and cIsSignedInteger(getExprQualType(c, lhs));
1439
1440 const swizzled_lhs = if (swap_operands) rhs else lhs;
1441 const swizzled_rhs = if (swap_operands) lhs else rhs;
1442
1443 const lhs_node = try transExpr(c, scope, swizzled_lhs, .used);
1444 const rhs_node = try transExpr(c, scope, swizzled_rhs, .used);
1445
1446 const bitcast_node = try usizeCastForWrappingPtrArithmetic(c.arena, rhs_node);
1447
1448 return transCreateNodeInfixOp(
1449 c,
1450 if (is_add) .add else .sub,
1451 lhs_node,
1452 bitcast_node,
1453 result_used,
1454 );
1455}
1456
1457fn transBinaryOperator(
1458 c: *Context,
1459 scope: *Scope,
1460 stmt: *const clang.BinaryOperator,
1461 result_used: ResultUsed,
1462) TransError!Node {
1463 const op = stmt.getOpcode();
1464 const qt = stmt.getType();
1465 const isPointerDiffExpr = cIsPointerDiffExpr(stmt);
1466 switch (op) {
1467 .Assign => return try transCreateNodeAssign(c, scope, result_used, stmt.getLHS(), stmt.getRHS()),
1468 .Comma => {
1469 var block_scope = try Scope.Block.init(c, scope, true);
1470 defer block_scope.deinit();
1471
1472 const lhs = try transExpr(c, &block_scope.base, stmt.getLHS(), .unused);
1473 try block_scope.statements.append(lhs);
1474
1475 const rhs = try transExpr(c, &block_scope.base, stmt.getRHS(), .used);
1476 const break_node = try Tag.break_val.create(c.arena, .{
1477 .label = block_scope.label,
1478 .val = rhs,
1479 });
1480 try block_scope.statements.append(break_node);
1481 const block_node = try block_scope.complete(c);
1482 return maybeSuppressResult(c, result_used, block_node);
1483 },
1484 .Div => {
1485 if (cIsSignedInteger(qt)) {
1486 // signed integer division uses @divTrunc
1487 const lhs = try transExpr(c, scope, stmt.getLHS(), .used);
1488 const rhs = try transExpr(c, scope, stmt.getRHS(), .used);
1489 const div_trunc = try Tag.div_trunc.create(c.arena, .{ .lhs = lhs, .rhs = rhs });
1490 return maybeSuppressResult(c, result_used, div_trunc);
1491 }
1492 },
1493 .Rem => {
1494 if (cIsSignedInteger(qt)) {
1495 // signed integer remainder uses std.zig.c_translation.signedRemainder
1496 const lhs = try transExpr(c, scope, stmt.getLHS(), .used);
1497 const rhs = try transExpr(c, scope, stmt.getRHS(), .used);
1498 const rem = try Tag.signed_remainder.create(c.arena, .{ .lhs = lhs, .rhs = rhs });
1499 return maybeSuppressResult(c, result_used, rem);
1500 }
1501 },
1502 .Shl => {
1503 return transCreateNodeShiftOp(c, scope, stmt, .shl, result_used);
1504 },
1505 .Shr => {
1506 return transCreateNodeShiftOp(c, scope, stmt, .shr, result_used);
1507 },
1508 .LAnd => {
1509 return transCreateNodeBoolInfixOp(c, scope, stmt, .@"and", result_used);
1510 },
1511 .LOr => {
1512 return transCreateNodeBoolInfixOp(c, scope, stmt, .@"or", result_used);
1513 },
1514 .Add, .Sub => {
1515 // `ptr + idx` and `idx + ptr` -> ptr + @bitCast(usize, @intCast(isize, idx))
1516 // `ptr - idx` -> ptr - @bitCast(usize, @intCast(isize, idx))
1517 if (qualTypeIsPtr(qt) and (cIsSignedInteger(getExprQualType(c, stmt.getLHS())) or
1518 cIsSignedInteger(getExprQualType(c, stmt.getRHS())))) return transCreatePointerArithmeticSignedOp(c, scope, stmt, result_used);
1519 },
1520 else => {},
1521 }
1522 var op_id: Tag = undefined;
1523 switch (op) {
1524 .Add => {
1525 if (cIsUnsignedInteger(qt)) {
1526 op_id = .add_wrap;
1527 } else {
1528 op_id = .add;
1529 }
1530 },
1531 .Sub => {
1532 if (cIsUnsignedInteger(qt) or isPointerDiffExpr) {
1533 op_id = .sub_wrap;
1534 } else {
1535 op_id = .sub;
1536 }
1537 },
1538 .Mul => {
1539 if (cIsUnsignedInteger(qt)) {
1540 op_id = .mul_wrap;
1541 } else {
1542 op_id = .mul;
1543 }
1544 },
1545 .Div => {
1546 // unsigned/float division uses the operator
1547 op_id = .div;
1548 },
1549 .Rem => {
1550 // unsigned/float division uses the operator
1551 op_id = .mod;
1552 },
1553 .LT => {
1554 op_id = .less_than;
1555 },
1556 .GT => {
1557 op_id = .greater_than;
1558 },
1559 .LE => {
1560 op_id = .less_than_equal;
1561 },
1562 .GE => {
1563 op_id = .greater_than_equal;
1564 },
1565 .EQ => {
1566 op_id = .equal;
1567 },
1568 .NE => {
1569 op_id = .not_equal;
1570 },
1571 .And => {
1572 op_id = .bit_and;
1573 },
1574 .Xor => {
1575 op_id = .bit_xor;
1576 },
1577 .Or => {
1578 op_id = .bit_or;
1579 },
1580 else => unreachable,
1581 }
1582
1583 const lhs_uncasted = try transExpr(c, scope, stmt.getLHS(), .used);
1584 const rhs_uncasted = try transExpr(c, scope, stmt.getRHS(), .used);
1585
1586 const lhs = if (isBoolRes(lhs_uncasted))
1587 try Tag.int_from_bool.create(c.arena, lhs_uncasted)
1588 else if (isPointerDiffExpr)
1589 try Tag.int_from_ptr.create(c.arena, lhs_uncasted)
1590 else
1591 lhs_uncasted;
1592
1593 const rhs = if (isBoolRes(rhs_uncasted))
1594 try Tag.int_from_bool.create(c.arena, rhs_uncasted)
1595 else if (isPointerDiffExpr)
1596 try Tag.int_from_ptr.create(c.arena, rhs_uncasted)
1597 else
1598 rhs_uncasted;
1599
1600 const infixOpNode = try transCreateNodeInfixOp(c, op_id, lhs, rhs, result_used);
1601 if (isPointerDiffExpr) {
1602 // @divExact(@bitCast(<platform-ptrdiff_t>, @intFromPtr(lhs) -% @intFromPtr(rhs)), @sizeOf(<lhs target type>))
1603 const ptrdiff_type = try transQualTypeIntWidthOf(c, qt, true);
1604
1605 const bitcast = try Tag.as.create(c.arena, .{
1606 .lhs = ptrdiff_type,
1607 .rhs = try Tag.bit_cast.create(c.arena, infixOpNode),
1608 });
1609
1610 // C standard requires that pointer subtraction operands are of the same type,
1611 // otherwise it is undefined behavior. So we can assume the left and right
1612 // sides are the same QualType and arbitrarily choose left.
1613 const lhs_expr = stmt.getLHS();
1614 const lhs_qt = getExprQualType(c, lhs_expr);
1615 const lhs_qt_translated = try transQualType(c, scope, lhs_qt, lhs_expr.getBeginLoc());
1616 const c_pointer = getContainer(c, lhs_qt_translated).?;
1617
1618 if (c_pointer.castTag(.c_pointer)) |c_pointer_payload| {
1619 const sizeof = try Tag.sizeof.create(c.arena, c_pointer_payload.data.elem_type);
1620 return Tag.div_exact.create(c.arena, .{
1621 .lhs = bitcast,
1622 .rhs = sizeof,
1623 });
1624 } else {
1625 // This is an opaque/incomplete type. This subtraction exhibits Undefined Behavior by the C99 spec.
1626 // However, allowing subtraction on `void *` and function pointers is a commonly used extension.
1627 // So, just return the value in byte units, mirroring the behavior of this language extension as implemented by GCC and Clang.
1628 return bitcast;
1629 }
1630 }
1631 return infixOpNode;
1632}
1633
1634fn transCompoundStmtInline(
1635 c: *Context,
1636 stmt: *const clang.CompoundStmt,
1637 block: *Scope.Block,
1638) TransError!void {
1639 var it = stmt.body_begin();
1640 const end_it = stmt.body_end();
1641 while (it != end_it) : (it += 1) {
1642 const result = try transStmt(c, &block.base, it[0], .unused);
1643 switch (result.tag()) {
1644 .declaration, .empty_block => {},
1645 else => try block.statements.append(result),
1646 }
1647 }
1648}
1649
1650fn transCompoundStmt(c: *Context, scope: *Scope, stmt: *const clang.CompoundStmt) TransError!Node {
1651 var block_scope = try Scope.Block.init(c, scope, false);
1652 defer block_scope.deinit();
1653 try transCompoundStmtInline(c, stmt, &block_scope);
1654 return try block_scope.complete(c);
1655}
1656
1657fn transCStyleCastExprClass(
1658 c: *Context,
1659 scope: *Scope,
1660 stmt: *const clang.CStyleCastExpr,
1661 result_used: ResultUsed,
1662) TransError!Node {
1663 const cast_expr = @as(*const clang.CastExpr, @ptrCast(stmt));
1664 const sub_expr = stmt.getSubExpr();
1665 const dst_type = stmt.getType();
1666 const src_type = sub_expr.getType();
1667 const sub_expr_node = try transExpr(c, scope, sub_expr, .used);
1668 const loc = stmt.getBeginLoc();
1669
1670 const cast_node = if (cast_expr.getCastKind() == .ToUnion) blk: {
1671 const field_decl = cast_expr.getTargetFieldForToUnionCast(dst_type, src_type).?; // C syntax error if target field is null
1672 const field_name = try c.str(@as(*const clang.NamedDecl, @ptrCast(field_decl)).getName_bytes_begin());
1673
1674 const union_ty = try transQualType(c, scope, dst_type, loc);
1675
1676 const inits = [1]ast.Payload.ContainerInit.Initializer{.{ .name = field_name, .value = sub_expr_node }};
1677 break :blk try Tag.container_init.create(c.arena, .{
1678 .lhs = union_ty,
1679 .inits = try c.arena.dupe(ast.Payload.ContainerInit.Initializer, &inits),
1680 });
1681 } else (try transCCast(
1682 c,
1683 scope,
1684 loc,
1685 dst_type,
1686 src_type,
1687 sub_expr_node,
1688 ));
1689 return maybeSuppressResult(c, result_used, cast_node);
1690}
1691
1692/// The alignment of a variable or field
1693const ClangAlignment = struct {
1694 /// Clang reports the alignment in bits, we use bytes
1695 /// Clang uses 0 for "no alignment specified", we use null
1696 bit_alignment: c_uint,
1697 /// If the field or variable is marked as 'packed'
1698 ///
1699 /// According to the GCC variable attribute docs, this impacts alignment
1700 /// https://gcc.gnu.org/onlinedocs/gcc/Common-Variable-Attributes.html
1701 ///
1702 /// > The packed attribute specifies that a structure member
1703 /// > should have the smallest possible alignment
1704 ///
1705 /// Note also that specifying the 'packed' attribute on a structure
1706 /// implicitly packs all its fields (making their alignment 1).
1707 ///
1708 /// This will be null if the AST node doesn't support packing (functions)
1709 is_packed: ?bool,
1710
1711 /// Get the alignment for a field, optionally taking into account the parent record
1712 pub fn forField(c: *const Context, field: *const clang.FieldDecl, parent: ?*const clang.RecordDecl) ClangAlignment {
1713 const parent_packed = if (parent) |record| record.getPackedAttribute() else false;
1714 // NOTE: According to GCC docs, parent attribute packed implies child attribute packed
1715 return ClangAlignment{
1716 .bit_alignment = field.getAlignedAttribute(c.clang_context),
1717 .is_packed = field.getPackedAttribute() or parent_packed,
1718 };
1719 }
1720
1721 pub fn forVar(c: *const Context, var_decl: *const clang.VarDecl) ClangAlignment {
1722 return ClangAlignment{
1723 .bit_alignment = var_decl.getAlignedAttribute(c.clang_context),
1724 .is_packed = var_decl.getPackedAttribute(),
1725 };
1726 }
1727
1728 pub fn forFunc(c: *const Context, fun: *const clang.FunctionDecl) ClangAlignment {
1729 return ClangAlignment{
1730 .bit_alignment = fun.getAlignedAttribute(c.clang_context),
1731 .is_packed = null, // not supported by GCC/clang (or meaningful),
1732 };
1733 }
1734
1735 /// Translate the clang alignment info into a zig alignment
1736 ///
1737 /// Returns null if there is no special alignment info
1738 pub fn zigAlignment(self: ClangAlignment) ?c_uint {
1739 if (self.bit_alignment != 0) {
1740 return self.bit_alignment / 8;
1741 } else if (self.is_packed orelse false) {
1742 return 1;
1743 } else {
1744 return null;
1745 }
1746 }
1747};
1748
1749/// Translate an "extern" variable that's been declared within a scoped block.
1750/// Similar to static local variables, this will be wrapped in a struct to work with Zig's syntax requirements.
1751///
1752/// Assumptions made:
1753/// - No need to mangle the actual NamedDecl, as by definition this MUST be the same name as the external symbol it's referencing
1754/// - It's not valid C to have an initializer with this type of declaration, so we can safely operate assuming no initializer
1755/// - No need to look for any cleanup attributes with getCleanupAttribute(), not relevant for this type of decl
1756fn transLocalExternStmt(c: *Context, scope: *Scope, var_decl: *const clang.VarDecl, block_scope: *Scope.Block) TransError!void {
1757 const extern_var_name = try c.str(@as(*const clang.NamedDecl, @ptrCast(var_decl)).getName_bytes_begin());
1758
1759 // Special naming convention for local extern variable wrapper struct
1760 const name = try std.fmt.allocPrint(c.arena, "{s}_{s}", .{ Scope.Block.extern_inner_prepend, extern_var_name });
1761
1762 // On the off chance there's already a variable in scope named "ExternLocal_[extern_var_name]"
1763 const mangled_name = try block_scope.makeMangledName(c, name);
1764
1765 const qual_type = var_decl.getTypeSourceInfo_getType();
1766 const is_const = qual_type.isConstQualified();
1767 const loc = var_decl.getLocation();
1768 const type_node = try transQualType(c, scope, qual_type, loc);
1769
1770 // Inner Node for the extern variable declaration
1771 var node = try Tag.var_decl.create(c.arena, .{
1772 .is_pub = false,
1773 .is_const = is_const,
1774 .is_extern = true,
1775 .is_export = false,
1776 .is_threadlocal = var_decl.getTLSKind() != .None, // TODO: Neccessary?
1777 .linksection_string = null, // TODO: Neccessary?
1778 .alignment = ClangAlignment.forVar(c, var_decl).zigAlignment(),
1779 .name = extern_var_name,
1780 .type = type_node,
1781 .init = null,
1782 });
1783
1784 // Outer Node for the wrapper struct
1785 node = try Tag.extern_local_var.create(c.arena, .{ .name = mangled_name, .init = node });
1786
1787 try block_scope.statements.append(node);
1788 try block_scope.discardVariable(c, mangled_name);
1789}
1790
1791fn transDeclStmtOne(
1792 c: *Context,
1793 scope: *Scope,
1794 decl: *const clang.Decl,
1795 block_scope: *Scope.Block,
1796) TransError!void {
1797 switch (decl.getKind()) {
1798 .Var => {
1799 const var_decl = @as(*const clang.VarDecl, @ptrCast(decl));
1800
1801 // Translation behavior for a block scope declared "extern" variable
1802 // is enough of an outlier that it needs it's own function
1803 if (var_decl.getStorageClass() == .Extern) {
1804 return transLocalExternStmt(c, scope, var_decl, block_scope);
1805 }
1806
1807 const decl_init = var_decl.getInit();
1808 const loc = decl.getLocation();
1809
1810 const qual_type = var_decl.getTypeSourceInfo_getType();
1811 const name = try c.str(@as(*const clang.NamedDecl, @ptrCast(var_decl)).getName_bytes_begin());
1812 const mangled_name = try block_scope.makeMangledName(c, name);
1813
1814 if (qualTypeWasDemotedToOpaque(c, qual_type)) {
1815 return fail(c, error.UnsupportedTranslation, loc, "local variable has opaque type", .{});
1816 }
1817
1818 const is_static_local = var_decl.isStaticLocal();
1819 const is_const = qual_type.isConstQualified();
1820 const type_node = try transQualTypeMaybeInitialized(c, scope, qual_type, decl_init, loc);
1821
1822 var init_node = if (decl_init) |expr|
1823 if (expr.getStmtClass() == .StringLiteralClass)
1824 try transStringLiteralInitializer(c, @as(*const clang.StringLiteral, @ptrCast(expr)), type_node)
1825 else
1826 try transExprCoercing(c, scope, expr, .used)
1827 else if (is_static_local)
1828 try Tag.std_mem_zeroes.create(c.arena, type_node)
1829 else
1830 Tag.undefined_literal.init();
1831 if (!qualTypeIsBoolean(qual_type) and isBoolRes(init_node)) {
1832 init_node = try Tag.int_from_bool.create(c.arena, init_node);
1833 } else if (init_node.tag() == .string_literal and qualTypeIsCharStar(qual_type)) {
1834 const dst_type_node = try transQualType(c, scope, qual_type, loc);
1835 init_node = try removeCVQualifiers(c, dst_type_node, init_node);
1836 }
1837
1838 const var_name: []const u8 = if (is_static_local) Scope.Block.static_inner_name else mangled_name;
1839 var node = try Tag.var_decl.create(c.arena, .{
1840 .is_pub = false,
1841 .is_const = is_const,
1842 .is_extern = false,
1843 .is_export = false,
1844 .is_threadlocal = var_decl.getTLSKind() != .None,
1845 .linksection_string = null,
1846 .alignment = ClangAlignment.forVar(c, var_decl).zigAlignment(),
1847 .name = var_name,
1848 .type = type_node,
1849 .init = init_node,
1850 });
1851 if (is_static_local) {
1852 node = try Tag.static_local_var.create(c.arena, .{ .name = mangled_name, .init = node });
1853 }
1854 try block_scope.statements.append(node);
1855 try block_scope.discardVariable(c, mangled_name);
1856
1857 const cleanup_attr = var_decl.getCleanupAttribute();
1858 if (cleanup_attr) |fn_decl| {
1859 const cleanup_fn_name = try c.str(@as(*const clang.NamedDecl, @ptrCast(fn_decl)).getName_bytes_begin());
1860 const fn_id = try Tag.identifier.create(c.arena, cleanup_fn_name);
1861
1862 const varname = try Tag.identifier.create(c.arena, mangled_name);
1863 const args = try c.arena.alloc(Node, 1);
1864 args[0] = try Tag.address_of.create(c.arena, varname);
1865
1866 const cleanup_call = try Tag.call.create(c.arena, .{ .lhs = fn_id, .args = args });
1867 const discard = try Tag.discard.create(c.arena, .{ .should_skip = false, .value = cleanup_call });
1868 const deferred_cleanup = try Tag.@"defer".create(c.arena, discard);
1869
1870 try block_scope.statements.append(deferred_cleanup);
1871 }
1872 },
1873 .Typedef => {
1874 try transTypeDef(c, scope, @as(*const clang.TypedefNameDecl, @ptrCast(decl)));
1875 },
1876 .Record => {
1877 try transRecordDecl(c, scope, @as(*const clang.RecordDecl, @ptrCast(decl)));
1878 },
1879 .Enum => {
1880 try transEnumDecl(c, scope, @as(*const clang.EnumDecl, @ptrCast(decl)));
1881 },
1882 .Function => {
1883 try transFnDecl(c, scope, @as(*const clang.FunctionDecl, @ptrCast(decl)));
1884 },
1885 else => {
1886 const decl_name = try c.str(decl.getDeclKindName());
1887 try warn(c, &c.global_scope.base, decl.getLocation(), "ignoring {s} declaration", .{decl_name});
1888 },
1889 }
1890}
1891
1892fn transDeclStmt(c: *Context, scope: *Scope, stmt: *const clang.DeclStmt) TransError!Node {
1893 const block_scope = try scope.findBlockScope(c);
1894
1895 var it = stmt.decl_begin();
1896 const end_it = stmt.decl_end();
1897 while (it != end_it) : (it += 1) {
1898 try transDeclStmtOne(c, scope, it[0], block_scope);
1899 }
1900 return Tag.declaration.init();
1901}
1902
1903fn transDeclRefExpr(
1904 c: *Context,
1905 scope: *Scope,
1906 expr: *const clang.DeclRefExpr,
1907) TransError!Node {
1908 const value_decl = expr.getDecl();
1909 const name = try c.str(@as(*const clang.NamedDecl, @ptrCast(value_decl)).getName_bytes_begin());
1910 const mangled_name = scope.getAlias(name);
1911 const decl_is_var = @as(*const clang.Decl, @ptrCast(value_decl)).getKind() == .Var;
1912 const storage_class = @as(*const clang.VarDecl, @ptrCast(value_decl)).getStorageClass();
1913 const potential_local_extern = if (decl_is_var) ((storage_class == .Extern) and (scope.id != .root)) else false;
1914
1915 var confirmed_local_extern = false;
1916 var confirmed_local_extern_fn = false;
1917 var ref_expr = val: {
1918 if (cIsFunctionDeclRef(@as(*const clang.Expr, @ptrCast(expr)))) {
1919 if (scope.id != .root) {
1920 if (scope.getLocalExternAlias(name)) |v| {
1921 confirmed_local_extern_fn = true;
1922 break :val try Tag.identifier.create(c.arena, v);
1923 }
1924 }
1925 break :val try Tag.fn_identifier.create(c.arena, mangled_name);
1926 } else if (potential_local_extern) {
1927 if (scope.getLocalExternAlias(name)) |v| {
1928 confirmed_local_extern = true;
1929 break :val try Tag.identifier.create(c.arena, v);
1930 } else {
1931 break :val try Tag.identifier.create(c.arena, mangled_name);
1932 }
1933 } else {
1934 break :val try Tag.identifier.create(c.arena, mangled_name);
1935 }
1936 };
1937
1938 if (decl_is_var) {
1939 const var_decl = @as(*const clang.VarDecl, @ptrCast(value_decl));
1940 if (var_decl.isStaticLocal()) {
1941 ref_expr = try Tag.field_access.create(c.arena, .{
1942 .lhs = ref_expr,
1943 .field_name = Scope.Block.static_inner_name,
1944 });
1945 } else if (confirmed_local_extern) {
1946 ref_expr = try Tag.field_access.create(c.arena, .{
1947 .lhs = ref_expr,
1948 .field_name = name, // by necessity, name will always == mangled_name
1949 });
1950 }
1951 } else if (confirmed_local_extern_fn) {
1952 ref_expr = try Tag.field_access.create(c.arena, .{
1953 .lhs = ref_expr,
1954 .field_name = name, // by necessity, name will always == mangled_name
1955 });
1956 }
1957 scope.skipVariableDiscard(mangled_name);
1958 return ref_expr;
1959}
1960
1961fn transImplicitCastExpr(
1962 c: *Context,
1963 scope: *Scope,
1964 expr: *const clang.ImplicitCastExpr,
1965 result_used: ResultUsed,
1966) TransError!Node {
1967 const sub_expr = expr.getSubExpr();
1968 const dest_type = getExprQualType(c, @as(*const clang.Expr, @ptrCast(expr)));
1969 const src_type = getExprQualType(c, sub_expr);
1970 switch (expr.getCastKind()) {
1971 .BitCast, .FloatingCast, .FloatingToIntegral, .IntegralToFloating, .IntegralCast, .PointerToIntegral, .IntegralToPointer => {
1972 const sub_expr_node = try transExpr(c, scope, sub_expr, .used);
1973 const casted = try transCCast(c, scope, expr.getBeginLoc(), dest_type, src_type, sub_expr_node);
1974 return maybeSuppressResult(c, result_used, casted);
1975 },
1976 .LValueToRValue, .NoOp, .FunctionToPointerDecay => {
1977 const sub_expr_node = try transExpr(c, scope, sub_expr, .used);
1978 return maybeSuppressResult(c, result_used, sub_expr_node);
1979 },
1980 .ArrayToPointerDecay => {
1981 const sub_expr_node = try transExpr(c, scope, sub_expr, .used);
1982 if (exprIsNarrowStringLiteral(sub_expr) or exprIsFlexibleArrayRef(c, sub_expr)) {
1983 return maybeSuppressResult(c, result_used, sub_expr_node);
1984 }
1985
1986 const index_val = try Tag.integer_literal.create(c.arena, "0");
1987 const index = try Tag.as.create(c.arena, .{
1988 .lhs = try Tag.type.create(c.arena, "usize"),
1989 .rhs = try Tag.int_cast.create(c.arena, index_val),
1990 });
1991 const array0_node = try Tag.array_access.create(c.arena, .{ .lhs = sub_expr_node, .rhs = index });
1992 // Convert array to pointer by expression: addr = &sub_expr[0]
1993 const addr = try Tag.address_of.create(c.arena, array0_node);
1994 const casted = try transCPtrCast(c, scope, expr.getBeginLoc(), dest_type, src_type, addr);
1995 return maybeSuppressResult(c, result_used, casted);
1996 },
1997 .NullToPointer => {
1998 return Tag.null_literal.init();
1999 },
2000 .PointerToBoolean => {
2001 // @intFromPtr(val) != 0
2002 const ptr_node = try transExpr(c, scope, sub_expr, .used);
2003 const int_from_ptr = try Tag.int_from_ptr.create(c.arena, ptr_node);
2004
2005 const ne = try Tag.not_equal.create(c.arena, .{ .lhs = int_from_ptr, .rhs = Tag.zero_literal.init() });
2006 return maybeSuppressResult(c, result_used, ne);
2007 },
2008 .IntegralToBoolean, .FloatingToBoolean => {
2009 const sub_expr_node = try transExpr(c, scope, sub_expr, .used);
2010
2011 // The expression is already a boolean one, return it as-is
2012 if (isBoolRes(sub_expr_node))
2013 return maybeSuppressResult(c, result_used, sub_expr_node);
2014
2015 // val != 0
2016 const ne = try Tag.not_equal.create(c.arena, .{ .lhs = sub_expr_node, .rhs = Tag.zero_literal.init() });
2017 return maybeSuppressResult(c, result_used, ne);
2018 },
2019 .BuiltinFnToFnPtr => {
2020 return transBuiltinFnExpr(c, scope, sub_expr, result_used);
2021 },
2022 .ToVoid => {
2023 // Should only appear in the rhs and lhs of a ConditionalOperator
2024 return transExpr(c, scope, sub_expr, .unused);
2025 },
2026 else => |kind| return fail(
2027 c,
2028 error.UnsupportedTranslation,
2029 @as(*const clang.Stmt, @ptrCast(expr)).getBeginLoc(),
2030 "unsupported CastKind {s}",
2031 .{@tagName(kind)},
2032 ),
2033 }
2034}
2035
2036fn isBuiltinDefined(name: []const u8) bool {
2037 inline for (@typeInfo(std.zig.c_builtins).@"struct".decls) |decl| {
2038 if (std.mem.eql(u8, name, decl.name)) return true;
2039 }
2040 return false;
2041}
2042
2043fn transBuiltinFnExpr(c: *Context, scope: *Scope, expr: *const clang.Expr, used: ResultUsed) TransError!Node {
2044 const node = try transExpr(c, scope, expr, used);
2045 if (node.castTag(.fn_identifier)) |ident| {
2046 const name = ident.data;
2047 if (!isBuiltinDefined(name)) return fail(c, error.UnsupportedTranslation, expr.getBeginLoc(), "TODO implement function '{s}' in std.zig.c_builtins", .{name});
2048 }
2049 return node;
2050}
2051
2052fn transBoolExpr(
2053 c: *Context,
2054 scope: *Scope,
2055 expr: *const clang.Expr,
2056 used: ResultUsed,
2057) TransError!Node {
2058 if (@as(*const clang.Stmt, @ptrCast(expr)).getStmtClass() == .IntegerLiteralClass) {
2059 var signum: c_int = undefined;
2060 if (!(@as(*const clang.IntegerLiteral, @ptrCast(expr)).getSignum(&signum, c.clang_context))) {
2061 return fail(c, error.UnsupportedTranslation, expr.getBeginLoc(), "invalid integer literal", .{});
2062 }
2063 const is_zero = signum == 0;
2064 return Node{ .tag_if_small_enough = @intFromEnum(([2]Tag{ .true_literal, .false_literal })[@intFromBool(is_zero)]) };
2065 }
2066
2067 const res = try transExpr(c, scope, expr, used);
2068 if (isBoolRes(res)) {
2069 return maybeSuppressResult(c, used, res);
2070 }
2071
2072 const ty = getExprQualType(c, expr).getTypePtr();
2073 const node = try finishBoolExpr(c, scope, expr.getBeginLoc(), ty, res, used);
2074
2075 return maybeSuppressResult(c, used, node);
2076}
2077
2078fn exprIsBooleanType(expr: *const clang.Expr) bool {
2079 return qualTypeIsBoolean(expr.getType());
2080}
2081
2082fn exprIsNarrowStringLiteral(expr: *const clang.Expr) bool {
2083 switch (expr.getStmtClass()) {
2084 .StringLiteralClass => {
2085 const string_lit = @as(*const clang.StringLiteral, @ptrCast(expr));
2086 return string_lit.getCharByteWidth() == 1;
2087 },
2088 .PredefinedExprClass => return true,
2089 .UnaryOperatorClass => {
2090 const op_expr = @as(*const clang.UnaryOperator, @ptrCast(expr)).getSubExpr();
2091 return exprIsNarrowStringLiteral(op_expr);
2092 },
2093 .ParenExprClass => {
2094 const op_expr = @as(*const clang.ParenExpr, @ptrCast(expr)).getSubExpr();
2095 return exprIsNarrowStringLiteral(op_expr);
2096 },
2097 .GenericSelectionExprClass => {
2098 const gen_sel = @as(*const clang.GenericSelectionExpr, @ptrCast(expr));
2099 return exprIsNarrowStringLiteral(gen_sel.getResultExpr());
2100 },
2101 else => return false,
2102 }
2103}
2104
2105fn exprIsFlexibleArrayRef(c: *Context, expr: *const clang.Expr) bool {
2106 if (expr.getStmtClass() == .MemberExprClass) {
2107 const member_expr = @as(*const clang.MemberExpr, @ptrCast(expr));
2108 const member_decl = member_expr.getMemberDecl();
2109 const decl_kind = @as(*const clang.Decl, @ptrCast(member_decl)).getKind();
2110 if (decl_kind == .Field) {
2111 const field_decl = @as(*const clang.FieldDecl, @ptrCast(member_decl));
2112 return isFlexibleArrayFieldDecl(c, field_decl);
2113 }
2114 }
2115 return false;
2116}
2117
2118fn isBoolRes(res: Node) bool {
2119 switch (res.tag()) {
2120 .@"or",
2121 .@"and",
2122 .equal,
2123 .not_equal,
2124 .less_than,
2125 .less_than_equal,
2126 .greater_than,
2127 .greater_than_equal,
2128 .not,
2129 .false_literal,
2130 .true_literal,
2131 => return true,
2132 else => return false,
2133 }
2134}
2135
2136fn finishBoolExpr(
2137 c: *Context,
2138 scope: *Scope,
2139 loc: clang.SourceLocation,
2140 ty: *const clang.Type,
2141 node: Node,
2142 used: ResultUsed,
2143) TransError!Node {
2144 switch (ty.getTypeClass()) {
2145 .Builtin => {
2146 const builtin_ty = @as(*const clang.BuiltinType, @ptrCast(ty));
2147
2148 switch (builtin_ty.getKind()) {
2149 .Bool => return node,
2150 .Char_U,
2151 .UChar,
2152 .Char_S,
2153 .SChar,
2154 .UShort,
2155 .UInt,
2156 .ULong,
2157 .ULongLong,
2158 .Short,
2159 .Int,
2160 .Long,
2161 .LongLong,
2162 .UInt128,
2163 .Int128,
2164 .Float,
2165 .Double,
2166 .Float128,
2167 .LongDouble,
2168 .WChar_U,
2169 .Char8,
2170 .Char16,
2171 .Char32,
2172 .WChar_S,
2173 .Float16,
2174 => {
2175 // node != 0
2176 return Tag.not_equal.create(c.arena, .{ .lhs = node, .rhs = Tag.zero_literal.init() });
2177 },
2178 .NullPtr => {
2179 // node == null
2180 return Tag.equal.create(c.arena, .{ .lhs = node, .rhs = Tag.null_literal.init() });
2181 },
2182 else => {},
2183 }
2184 },
2185 .Pointer => {
2186 if (node.tag() == .string_literal) {
2187 // @intFromPtr(node) != 0
2188 const int_from_ptr = try Tag.int_from_ptr.create(c.arena, node);
2189 return Tag.not_equal.create(c.arena, .{ .lhs = int_from_ptr, .rhs = Tag.zero_literal.init() });
2190 }
2191 // node != null
2192 return Tag.not_equal.create(c.arena, .{ .lhs = node, .rhs = Tag.null_literal.init() });
2193 },
2194 .Typedef => {
2195 const typedef_ty = @as(*const clang.TypedefType, @ptrCast(ty));
2196 const typedef_decl = typedef_ty.getDecl();
2197 const underlying_type = typedef_decl.getUnderlyingType();
2198 return finishBoolExpr(c, scope, loc, underlying_type.getTypePtr(), node, used);
2199 },
2200 .Enum => {
2201 // node != 0
2202 return Tag.not_equal.create(c.arena, .{ .lhs = node, .rhs = Tag.zero_literal.init() });
2203 },
2204 .Elaborated => {
2205 const elaborated_ty = @as(*const clang.ElaboratedType, @ptrCast(ty));
2206 const named_type = elaborated_ty.getNamedType();
2207 return finishBoolExpr(c, scope, loc, named_type.getTypePtr(), node, used);
2208 },
2209 else => {},
2210 }
2211 return fail(c, error.UnsupportedType, loc, "unsupported bool expression type", .{});
2212}
2213
2214const SuppressCast = enum {
2215 with_as,
2216 no_as,
2217};
2218fn transIntegerLiteral(
2219 c: *Context,
2220 scope: *Scope,
2221 expr: *const clang.IntegerLiteral,
2222 result_used: ResultUsed,
2223 suppress_as: SuppressCast,
2224) TransError!Node {
2225 var eval_result: clang.ExprEvalResult = undefined;
2226 if (!expr.EvaluateAsInt(&eval_result, c.clang_context)) {
2227 const loc = expr.getBeginLoc();
2228 return fail(c, error.UnsupportedTranslation, loc, "invalid integer literal", .{});
2229 }
2230
2231 if (suppress_as == .no_as) {
2232 const int_lit_node = try transCreateNodeAPInt(c, eval_result.Val.getInt());
2233 return maybeSuppressResult(c, result_used, int_lit_node);
2234 }
2235
2236 // Integer literals in C have types, and this can matter for several reasons.
2237 // For example, this is valid C:
2238 // unsigned char y = 256;
2239 // How this gets evaluated is the 256 is an integer, which gets truncated to signed char, then bit-casted
2240 // to unsigned char, resulting in 0. In order for this to work, we have to emit this zig code:
2241 // var y = @as(u8, @bitCast(@as(i8, @truncate(@as(c_int, 256)))));
2242 // Ideally in translate-c we could flatten this out to simply:
2243 // var y: u8 = 0;
2244 // But the first step is to be correct, and the next step is to make the output more elegant.
2245
2246 // @as(T, x)
2247 const expr_base = @as(*const clang.Expr, @ptrCast(expr));
2248 const ty_node = try transQualType(c, scope, expr_base.getType(), expr_base.getBeginLoc());
2249 const rhs = try transCreateNodeAPInt(c, eval_result.Val.getInt());
2250 const as = try Tag.as.create(c.arena, .{ .lhs = ty_node, .rhs = rhs });
2251 return maybeSuppressResult(c, result_used, as);
2252}
2253
2254fn transReturnStmt(
2255 c: *Context,
2256 scope: *Scope,
2257 expr: *const clang.ReturnStmt,
2258) TransError!Node {
2259 const val_expr = expr.getRetValue() orelse
2260 return Tag.return_void.init();
2261
2262 var rhs = try transExprCoercing(c, scope, val_expr, .used);
2263 const return_qt = scope.findBlockReturnType();
2264 if (isBoolRes(rhs) and !qualTypeIsBoolean(return_qt)) {
2265 rhs = try Tag.int_from_bool.create(c.arena, rhs);
2266 }
2267 return Tag.@"return".create(c.arena, rhs);
2268}
2269
2270fn transNarrowStringLiteral(
2271 c: *Context,
2272 stmt: *const clang.StringLiteral,
2273 result_used: ResultUsed,
2274) TransError!Node {
2275 var len: usize = undefined;
2276 const bytes_ptr = stmt.getString_bytes_begin_size(&len);
2277
2278 const str = try std.fmt.allocPrint(c.arena, "\"{f}\"", .{std.zig.fmtString(bytes_ptr[0..len])});
2279 const node = try Tag.string_literal.create(c.arena, str);
2280 return maybeSuppressResult(c, result_used, node);
2281}
2282
2283fn transStringLiteral(
2284 c: *Context,
2285 scope: *Scope,
2286 stmt: *const clang.StringLiteral,
2287 result_used: ResultUsed,
2288) TransError!Node {
2289 const kind = stmt.getKind();
2290 switch (kind) {
2291 .Ascii, .UTF8 => return transNarrowStringLiteral(c, stmt, result_used),
2292 .UTF16, .UTF32, .Wide => {
2293 const str_type = @tagName(stmt.getKind());
2294 const name = try std.fmt.allocPrint(c.arena, "zig.{s}_string_{d}", .{ str_type, c.getMangle() });
2295
2296 const expr_base = @as(*const clang.Expr, @ptrCast(stmt));
2297 const array_type = try transQualTypeInitialized(c, scope, expr_base.getType(), expr_base, expr_base.getBeginLoc());
2298 const lit_array = try transStringLiteralInitializer(c, stmt, array_type);
2299 const decl = try Tag.var_simple.create(c.arena, .{ .name = name, .init = lit_array });
2300 try scope.appendNode(decl);
2301 const node = try Tag.identifier.create(c.arena, name);
2302 return maybeSuppressResult(c, result_used, node);
2303 },
2304 }
2305}
2306
2307fn getArrayPayload(array_type: Node) ast.Payload.Array.ArrayTypeInfo {
2308 return (array_type.castTag(.array_type) orelse array_type.castTag(.null_sentinel_array_type).?).data;
2309}
2310
2311/// Translate a string literal that is initializing an array. In general narrow string
2312/// literals become `"<string>".*` or `"<string>"[0..<size>].*` if they need truncation.
2313/// Wide string literals become an array of integers. zero-fillers pad out the array to
2314/// the appropriate length, if necessary.
2315fn transStringLiteralInitializer(
2316 c: *Context,
2317 stmt: *const clang.StringLiteral,
2318 array_type: Node,
2319) TransError!Node {
2320 assert(array_type.tag() == .array_type or array_type.tag() == .null_sentinel_array_type);
2321
2322 const is_narrow = stmt.getKind() == .Ascii or stmt.getKind() == .UTF8;
2323
2324 const str_length = stmt.getLength();
2325 const payload = getArrayPayload(array_type);
2326 const array_size = payload.len;
2327 const elem_type = payload.elem_type;
2328
2329 if (array_size == 0) return Tag.empty_array.create(c.arena, elem_type);
2330
2331 const num_inits = @min(str_length, array_size);
2332 const init_node = if (num_inits > 0) blk: {
2333 if (is_narrow) {
2334 // "string literal".* or string literal"[0..num_inits].*
2335 var str = try transNarrowStringLiteral(c, stmt, .used);
2336 if (str_length != array_size) str = try Tag.string_slice.create(c.arena, .{ .string = str, .end = num_inits });
2337 break :blk try Tag.deref.create(c.arena, str);
2338 } else {
2339 const init_list = try c.arena.alloc(Node, num_inits);
2340 var i: c_uint = 0;
2341 while (i < num_inits) : (i += 1) {
2342 init_list[i] = try transCreateCharLitNode(c, false, stmt.getCodeUnit(i));
2343 }
2344 const init_args: ast.Payload.Array.ArrayTypeInfo = .{ .len = num_inits, .elem_type = elem_type };
2345 const init_array_type = if (array_type.tag() == .array_type)
2346 try Tag.array_type.create(c.arena, init_args)
2347 else
2348 try Tag.null_sentinel_array_type.create(c.arena, init_args);
2349 break :blk try Tag.array_init.create(c.arena, .{
2350 .cond = init_array_type,
2351 .cases = init_list,
2352 });
2353 }
2354 } else null;
2355
2356 if (num_inits == array_size) return init_node.?; // init_node is only null if num_inits == 0; but if num_inits == array_size == 0 we've already returned
2357 assert(array_size > str_length); // If array_size <= str_length, `num_inits == array_size` and we've already returned.
2358
2359 const filler_node = try Tag.array_filler.create(c.arena, .{
2360 .type = elem_type,
2361 .filler = Tag.zero_literal.init(),
2362 .count = array_size - str_length,
2363 });
2364
2365 if (init_node) |some| {
2366 return Tag.array_cat.create(c.arena, .{ .lhs = some, .rhs = filler_node });
2367 } else {
2368 return filler_node;
2369 }
2370}
2371
2372/// determine whether `stmt` is a "pointer subtraction expression" - a subtraction where
2373/// both operands resolve to addresses. The C standard requires that both operands
2374/// point to elements of the same array object, but we do not verify that here.
2375fn cIsPointerDiffExpr(stmt: *const clang.BinaryOperator) bool {
2376 const lhs = @as(*const clang.Stmt, @ptrCast(stmt.getLHS()));
2377 const rhs = @as(*const clang.Stmt, @ptrCast(stmt.getRHS()));
2378 return stmt.getOpcode() == .Sub and
2379 qualTypeIsPtr(@as(*const clang.Expr, @ptrCast(lhs)).getType()) and
2380 qualTypeIsPtr(@as(*const clang.Expr, @ptrCast(rhs)).getType());
2381}
2382
2383fn cIsEnum(qt: clang.QualType) bool {
2384 return qt.getCanonicalType().getTypeClass() == .Enum;
2385}
2386
2387fn cIsVector(qt: clang.QualType) bool {
2388 return qt.getCanonicalType().getTypeClass() == .Vector;
2389}
2390
2391/// Get the underlying int type of an enum. The C compiler chooses a signed int
2392/// type that is large enough to hold all of the enum's values. It is not required
2393/// to be the smallest possible type that can hold all the values.
2394fn cIntTypeForEnum(enum_qt: clang.QualType) clang.QualType {
2395 assert(cIsEnum(enum_qt));
2396 const ty = enum_qt.getCanonicalType().getTypePtr();
2397 const enum_ty = @as(*const clang.EnumType, @ptrCast(ty));
2398 const enum_decl = enum_ty.getDecl();
2399 return enum_decl.getIntegerType();
2400}
2401
2402// when modifying this function, make sure to also update std.zig.c_translation.cast
2403fn transCCast(
2404 c: *Context,
2405 scope: *Scope,
2406 loc: clang.SourceLocation,
2407 dst_type: clang.QualType,
2408 src_type: clang.QualType,
2409 expr: Node,
2410) !Node {
2411 if (qualTypeCanon(dst_type).isVoidType()) return expr;
2412 if (dst_type.eq(src_type)) return expr;
2413 if (qualTypeIsPtr(dst_type) and qualTypeIsPtr(src_type))
2414 return transCPtrCast(c, scope, loc, dst_type, src_type, expr);
2415 if (cIsEnum(dst_type)) return transCCast(c, scope, loc, cIntTypeForEnum(dst_type), src_type, expr);
2416 if (cIsEnum(src_type)) return transCCast(c, scope, loc, dst_type, cIntTypeForEnum(src_type), expr);
2417
2418 const dst_node = try transQualType(c, scope, dst_type, loc);
2419 if (cIsInteger(dst_type) and cIsInteger(src_type)) {
2420 // 1. If src_type is an enum, determine the underlying signed int type
2421 // 2. Extend or truncate without changing signed-ness.
2422 // 3. Bit-cast to correct signed-ness
2423 const src_type_is_signed = cIsSignedInteger(src_type);
2424 var src_int_expr = expr;
2425
2426 if (isBoolRes(src_int_expr)) {
2427 src_int_expr = try Tag.int_from_bool.create(c.arena, src_int_expr);
2428 return Tag.as.create(c.arena, .{ .lhs = dst_node, .rhs = src_int_expr });
2429 }
2430
2431 switch (cIntTypeCmp(dst_type, src_type)) {
2432 .lt => {
2433 // @truncate(SameSignSmallerInt, src_int_expr)
2434 const ty_node = try transQualTypeIntWidthOf(c, dst_type, src_type_is_signed);
2435 src_int_expr = try Tag.as.create(c.arena, .{
2436 .lhs = ty_node,
2437 .rhs = try Tag.truncate.create(c.arena, src_int_expr),
2438 });
2439 },
2440 .gt => {
2441 // @as(SameSignBiggerInt, src_int_expr)
2442 const ty_node = try transQualTypeIntWidthOf(c, dst_type, src_type_is_signed);
2443 src_int_expr = try Tag.as.create(c.arena, .{ .lhs = ty_node, .rhs = src_int_expr });
2444 },
2445 .eq => {
2446 // src_int_expr = src_int_expr
2447 },
2448 }
2449 // @as(dest_type, @bitCast(intermediate_value))
2450 return Tag.as.create(c.arena, .{
2451 .lhs = dst_node,
2452 .rhs = try Tag.bit_cast.create(c.arena, src_int_expr),
2453 });
2454 }
2455 if (cIsVector(src_type) or cIsVector(dst_type)) {
2456 // C cast where at least 1 operand is a vector requires them to be same size
2457 // @as(dest_type, @bitCast(val))
2458 return Tag.as.create(c.arena, .{
2459 .lhs = dst_node,
2460 .rhs = try Tag.bit_cast.create(c.arena, expr),
2461 });
2462 }
2463 if (cIsInteger(dst_type) and qualTypeIsPtr(src_type)) {
2464 // @intCast(dest_type, @intFromPtr(val))
2465 const int_from_ptr = try Tag.int_from_ptr.create(c.arena, expr);
2466 return Tag.as.create(c.arena, .{
2467 .lhs = dst_node,
2468 .rhs = try Tag.int_cast.create(c.arena, int_from_ptr),
2469 });
2470 }
2471 if (cIsInteger(src_type) and qualTypeIsPtr(dst_type)) {
2472 // @as(dest_type, @ptrFromInt(val))
2473 return Tag.as.create(c.arena, .{
2474 .lhs = dst_node,
2475 .rhs = try Tag.ptr_from_int.create(c.arena, expr),
2476 });
2477 }
2478 if (cIsFloating(src_type) and cIsFloating(dst_type)) {
2479 // @as(dest_type, @floatCast(val))
2480 return Tag.as.create(c.arena, .{
2481 .lhs = dst_node,
2482 .rhs = try Tag.float_cast.create(c.arena, expr),
2483 });
2484 }
2485 if (cIsFloating(src_type) and !cIsFloating(dst_type)) {
2486 // bool expression: floating val != 0
2487 if (qualTypeIsBoolean(dst_type)) {
2488 return Tag.not_equal.create(c.arena, .{
2489 .lhs = expr,
2490 .rhs = Tag.zero_literal.init(),
2491 });
2492 }
2493
2494 // @as(dest_type, @intFromFloat(val))
2495 return Tag.as.create(c.arena, .{
2496 .lhs = dst_node,
2497 .rhs = try Tag.int_from_float.create(c.arena, expr),
2498 });
2499 }
2500 if (!cIsFloating(src_type) and cIsFloating(dst_type)) {
2501 var rhs = expr;
2502 if (qualTypeIsBoolean(src_type) or isBoolRes(rhs)) rhs = try Tag.int_from_bool.create(c.arena, expr);
2503 // @as(dest_type, @floatFromInt(val))
2504 return Tag.as.create(c.arena, .{
2505 .lhs = dst_node,
2506 .rhs = try Tag.float_from_int.create(c.arena, rhs),
2507 });
2508 }
2509 if (qualTypeIsBoolean(src_type) and !qualTypeIsBoolean(dst_type)) {
2510 // @intFromBool returns a u1
2511 // TODO: if dst_type is 1 bit & signed (bitfield) we need @bitCast
2512 // instead of @as
2513 const int_from_bool = try Tag.int_from_bool.create(c.arena, expr);
2514 return Tag.as.create(c.arena, .{ .lhs = dst_node, .rhs = int_from_bool });
2515 }
2516 // @as(dest_type, val)
2517 return Tag.as.create(c.arena, .{ .lhs = dst_node, .rhs = expr });
2518}
2519
2520fn transExpr(c: *Context, scope: *Scope, expr: *const clang.Expr, used: ResultUsed) TransError!Node {
2521 return transStmt(c, scope, @as(*const clang.Stmt, @ptrCast(expr)), used);
2522}
2523
2524/// Same as `transExpr` but with the knowledge that the operand will be type coerced, and therefore
2525/// an `@as` would be redundant. This is used to prevent redundant `@as` in integer literals.
2526fn transExprCoercing(c: *Context, scope: *Scope, expr: *const clang.Expr, used: ResultUsed) TransError!Node {
2527 switch (@as(*const clang.Stmt, @ptrCast(expr)).getStmtClass()) {
2528 .IntegerLiteralClass => {
2529 return transIntegerLiteral(c, scope, @as(*const clang.IntegerLiteral, @ptrCast(expr)), .used, .no_as);
2530 },
2531 .CharacterLiteralClass => {
2532 return transCharLiteral(c, scope, @as(*const clang.CharacterLiteral, @ptrCast(expr)), .used, .no_as);
2533 },
2534 .UnaryOperatorClass => {
2535 const un_expr = @as(*const clang.UnaryOperator, @ptrCast(expr));
2536 if (un_expr.getOpcode() == .Extension) {
2537 return transExprCoercing(c, scope, un_expr.getSubExpr(), used);
2538 }
2539 },
2540 .ImplicitCastExprClass => {
2541 const cast_expr = @as(*const clang.ImplicitCastExpr, @ptrCast(expr));
2542 const sub_expr = cast_expr.getSubExpr();
2543 switch (@as(*const clang.Stmt, @ptrCast(sub_expr)).getStmtClass()) {
2544 .IntegerLiteralClass, .CharacterLiteralClass => switch (cast_expr.getCastKind()) {
2545 .IntegralToFloating => return transExprCoercing(c, scope, sub_expr, used),
2546 .IntegralCast => {
2547 const dest_type = getExprQualType(c, expr);
2548 if (literalFitsInType(c, sub_expr, dest_type))
2549 return transExprCoercing(c, scope, sub_expr, used);
2550 },
2551 else => {},
2552 },
2553 else => {},
2554 }
2555 },
2556 else => {},
2557 }
2558 return transExpr(c, scope, expr, .used);
2559}
2560
2561fn literalFitsInType(c: *Context, expr: *const clang.Expr, qt: clang.QualType) bool {
2562 var width = qualTypeIntBitWidth(c, qt) catch 8;
2563 if (width == 0) width = 8; // Byte is the smallest type.
2564 const is_signed = cIsSignedInteger(qt);
2565 const width_max_int = (@as(u64, 1) << math.lossyCast(u6, width - @intFromBool(is_signed))) - 1;
2566
2567 switch (@as(*const clang.Stmt, @ptrCast(expr)).getStmtClass()) {
2568 .CharacterLiteralClass => {
2569 const char_lit = @as(*const clang.CharacterLiteral, @ptrCast(expr));
2570 const val = char_lit.getValue();
2571 // If the val is less than the max int then it fits.
2572 return val <= width_max_int;
2573 },
2574 .IntegerLiteralClass => {
2575 const int_lit = @as(*const clang.IntegerLiteral, @ptrCast(expr));
2576 var eval_result: clang.ExprEvalResult = undefined;
2577 if (!int_lit.EvaluateAsInt(&eval_result, c.clang_context)) {
2578 return false;
2579 }
2580
2581 const int = eval_result.Val.getInt();
2582 return int.lessThanEqual(width_max_int);
2583 },
2584 else => unreachable,
2585 }
2586}
2587
2588fn transInitListExprRecord(
2589 c: *Context,
2590 scope: *Scope,
2591 loc: clang.SourceLocation,
2592 expr: *const clang.InitListExpr,
2593 ty: *const clang.Type,
2594) TransError!Node {
2595 var is_union_type = false;
2596 // Unions and Structs are both represented as RecordDecl
2597 const record_ty = ty.getAsRecordType() orelse
2598 blk: {
2599 is_union_type = true;
2600 break :blk ty.getAsUnionType();
2601 } orelse unreachable;
2602 const record_decl = record_ty.getDecl();
2603 const record_def = record_decl.getDefinition() orelse
2604 unreachable;
2605
2606 const ty_node = try transType(c, scope, ty, loc);
2607 const init_count = expr.getNumInits();
2608 var field_inits = std.array_list.Managed(ast.Payload.ContainerInit.Initializer).init(c.gpa);
2609 defer field_inits.deinit();
2610
2611 if (init_count == 0) {
2612 const source_loc = @as(*const clang.Expr, @ptrCast(expr)).getBeginLoc();
2613 return transZeroInitExpr(c, scope, source_loc, ty);
2614 }
2615
2616 var init_i: c_uint = 0;
2617 var it = record_def.field_begin();
2618 const end_it = record_def.field_end();
2619 while (it.neq(end_it)) : (it = it.next()) {
2620 const field_decl = it.deref();
2621
2622 // The initializer for a union type has a single entry only
2623 if (is_union_type and field_decl != expr.getInitializedFieldInUnion()) {
2624 continue;
2625 }
2626
2627 assert(init_i < init_count);
2628 const elem_expr = expr.getInit(init_i);
2629 init_i += 1;
2630
2631 // Generate the field assignment expression:
2632 // .field_name = expr
2633 var raw_name = try c.str(@as(*const clang.NamedDecl, @ptrCast(field_decl)).getName_bytes_begin());
2634 if (field_decl.isAnonymousStructOrUnion()) {
2635 const name = c.decl_table.get(@intFromPtr(field_decl.getCanonicalDecl())).?;
2636 raw_name = try c.arena.dupe(u8, name);
2637 }
2638
2639 var init_expr = try transExpr(c, scope, elem_expr, .used);
2640 const field_qt = field_decl.getType();
2641 if (init_expr.tag() == .string_literal and qualTypeIsCharStar(field_qt)) {
2642 if (scope.id == .root) {
2643 init_expr = try stringLiteralToCharStar(c, init_expr);
2644 } else {
2645 const dst_type_node = try transQualType(c, scope, field_qt, loc);
2646 init_expr = try removeCVQualifiers(c, dst_type_node, init_expr);
2647 }
2648 }
2649 try field_inits.append(.{
2650 .name = raw_name,
2651 .value = init_expr,
2652 });
2653 }
2654 if (ty_node.castTag(.identifier)) |ident_node| {
2655 scope.skipVariableDiscard(ident_node.data);
2656 }
2657 return Tag.container_init.create(c.arena, .{
2658 .lhs = ty_node,
2659 .inits = try c.arena.dupe(ast.Payload.ContainerInit.Initializer, field_inits.items),
2660 });
2661}
2662
2663fn transInitListExprArray(
2664 c: *Context,
2665 scope: *Scope,
2666 loc: clang.SourceLocation,
2667 expr: *const clang.InitListExpr,
2668 ty: *const clang.Type,
2669) TransError!Node {
2670 const arr_type = ty.getAsArrayTypeUnsafe();
2671 const child_qt = arr_type.getElementType();
2672 const child_type = try transQualType(c, scope, child_qt, loc);
2673 const init_count = expr.getNumInits();
2674 assert(@as(*const clang.Type, @ptrCast(arr_type)).isConstantArrayType());
2675 const const_arr_ty = @as(*const clang.ConstantArrayType, @ptrCast(arr_type));
2676 var size_ap_int: *const clang.APInt = undefined;
2677 const_arr_ty.getSize(&size_ap_int);
2678 defer size_ap_int.free();
2679 const all_count = size_ap_int.getLimitedValue(usize);
2680 const leftover_count = all_count - init_count;
2681
2682 if (all_count == 0) {
2683 return Tag.empty_array.create(c.arena, child_type);
2684 }
2685
2686 if (expr.isStringLiteralInit()) {
2687 assert(init_count == 1);
2688 const init_expr = expr.getInit(0);
2689 const string_literal = init_expr.castToStringLiteral().?;
2690 return try transStringLiteral(c, scope, string_literal, .used);
2691 }
2692
2693 const init_node = if (init_count != 0) blk: {
2694 const init_list = try c.arena.alloc(Node, init_count);
2695
2696 for (init_list, 0..) |*init, i| {
2697 const elem_expr = expr.getInit(@as(c_uint, @intCast(i)));
2698 init.* = try transExprCoercing(c, scope, elem_expr, .used);
2699 }
2700 const init_node = try Tag.array_init.create(c.arena, .{
2701 .cond = try Tag.array_type.create(c.arena, .{ .len = init_count, .elem_type = child_type }),
2702 .cases = init_list,
2703 });
2704 if (leftover_count == 0) {
2705 return init_node;
2706 }
2707 break :blk init_node;
2708 } else null;
2709
2710 assert(expr.hasArrayFiller());
2711 const filler_val_expr = expr.getArrayFiller();
2712 const filler_node = try Tag.array_filler.create(c.arena, .{
2713 .type = child_type,
2714 .filler = try transExprCoercing(c, scope, filler_val_expr, .used),
2715 .count = leftover_count,
2716 });
2717
2718 if (init_node) |some| {
2719 return Tag.array_cat.create(c.arena, .{ .lhs = some, .rhs = filler_node });
2720 } else {
2721 return filler_node;
2722 }
2723}
2724
2725fn transInitListExprVector(
2726 c: *Context,
2727 scope: *Scope,
2728 loc: clang.SourceLocation,
2729 expr: *const clang.InitListExpr,
2730) TransError!Node {
2731 const qt = getExprQualType(c, @as(*const clang.Expr, @ptrCast(expr)));
2732 const vector_ty = @as(*const clang.VectorType, @ptrCast(qualTypeCanon(qt)));
2733
2734 const init_count = expr.getNumInits();
2735 const num_elements = vector_ty.getNumElements();
2736 const element_qt = vector_ty.getElementType();
2737
2738 if (init_count == 0) {
2739 const vec_node = try Tag.vector.create(c.arena, .{
2740 .lhs = try transCreateNodeNumber(c, num_elements, .int),
2741 .rhs = try transQualType(c, scope, element_qt, loc),
2742 });
2743
2744 return Tag.as.create(c.arena, .{
2745 .lhs = vec_node,
2746 .rhs = try Tag.vector_zero_init.create(c.arena, Tag.zero_literal.init()),
2747 });
2748 }
2749
2750 const vector_type = try transQualType(c, scope, qt, loc);
2751
2752 var block_scope = try Scope.Block.init(c, scope, true);
2753 defer block_scope.deinit();
2754
2755 // workaround for https://github.com/ziglang/zig/issues/8322
2756 // we store the initializers in temp variables and use those
2757 // to initialize the vector. Eventually we can just directly
2758 // construct the init_list from casted source members
2759 var i: usize = 0;
2760 while (i < init_count) : (i += 1) {
2761 const mangled_name = try block_scope.makeMangledName(c, "tmp");
2762 const init_expr = expr.getInit(@as(c_uint, @intCast(i)));
2763 const tmp_decl_node = try Tag.var_simple.create(c.arena, .{
2764 .name = mangled_name,
2765 .init = try transExpr(c, &block_scope.base, init_expr, .used),
2766 });
2767 try block_scope.statements.append(tmp_decl_node);
2768 }
2769
2770 const init_list = try c.arena.alloc(Node, num_elements);
2771 for (init_list, 0..) |*init, init_index| {
2772 if (init_index < init_count) {
2773 const tmp_decl = block_scope.statements.items[init_index];
2774 const name = tmp_decl.castTag(.var_simple).?.data.name;
2775 init.* = try Tag.identifier.create(c.arena, name);
2776 } else {
2777 init.* = Tag.undefined_literal.init();
2778 }
2779 }
2780
2781 const array_init = try Tag.array_init.create(c.arena, .{
2782 .cond = vector_type,
2783 .cases = init_list,
2784 });
2785 const break_node = try Tag.break_val.create(c.arena, .{
2786 .label = block_scope.label,
2787 .val = array_init,
2788 });
2789 try block_scope.statements.append(break_node);
2790
2791 return block_scope.complete(c);
2792}
2793
2794fn transInitListExpr(
2795 c: *Context,
2796 scope: *Scope,
2797 expr: *const clang.InitListExpr,
2798 used: ResultUsed,
2799) TransError!Node {
2800 const qt = getExprQualType(c, @as(*const clang.Expr, @ptrCast(expr)));
2801 var qual_type = qt.getTypePtr();
2802 const source_loc = @as(*const clang.Expr, @ptrCast(expr)).getBeginLoc();
2803
2804 if (qualTypeWasDemotedToOpaque(c, qt)) {
2805 return fail(c, error.UnsupportedTranslation, source_loc, "cannot initialize opaque type", .{});
2806 }
2807
2808 if (qual_type.isRecordType()) {
2809 return maybeSuppressResult(c, used, try transInitListExprRecord(
2810 c,
2811 scope,
2812 source_loc,
2813 expr,
2814 qual_type,
2815 ));
2816 } else if (qual_type.isArrayType()) {
2817 return maybeSuppressResult(c, used, try transInitListExprArray(
2818 c,
2819 scope,
2820 source_loc,
2821 expr,
2822 qual_type,
2823 ));
2824 } else if (qual_type.isVectorType()) {
2825 return maybeSuppressResult(c, used, try transInitListExprVector(c, scope, source_loc, expr));
2826 } else {
2827 const type_name = try c.str(qual_type.getTypeClassName());
2828 return fail(c, error.UnsupportedType, source_loc, "unsupported initlist type: '{s}'", .{type_name});
2829 }
2830}
2831
2832fn transZeroInitExpr(
2833 c: *Context,
2834 scope: *Scope,
2835 source_loc: clang.SourceLocation,
2836 ty: *const clang.Type,
2837) TransError!Node {
2838 switch (ty.getTypeClass()) {
2839 .Builtin => {
2840 const builtin_ty = @as(*const clang.BuiltinType, @ptrCast(ty));
2841 switch (builtin_ty.getKind()) {
2842 .Bool => return Tag.false_literal.init(),
2843 .Char_U,
2844 .UChar,
2845 .Char_S,
2846 .Char8,
2847 .SChar,
2848 .UShort,
2849 .UInt,
2850 .ULong,
2851 .ULongLong,
2852 .Short,
2853 .Int,
2854 .Long,
2855 .LongLong,
2856 .UInt128,
2857 .Int128,
2858 .Float,
2859 .Double,
2860 .Float128,
2861 .Float16,
2862 .LongDouble,
2863 => return Tag.zero_literal.init(),
2864 else => return fail(c, error.UnsupportedType, source_loc, "unsupported builtin type", .{}),
2865 }
2866 },
2867 .Pointer => return Tag.null_literal.init(),
2868 .Typedef => {
2869 const typedef_ty = @as(*const clang.TypedefType, @ptrCast(ty));
2870 const typedef_decl = typedef_ty.getDecl();
2871 return transZeroInitExpr(
2872 c,
2873 scope,
2874 source_loc,
2875 typedef_decl.getUnderlyingType().getTypePtr(),
2876 );
2877 },
2878 else => return Tag.std_mem_zeroes.create(c.arena, try transType(c, scope, ty, source_loc)),
2879 }
2880}
2881
2882fn transImplicitValueInitExpr(
2883 c: *Context,
2884 scope: *Scope,
2885 expr: *const clang.Expr,
2886) TransError!Node {
2887 const source_loc = expr.getBeginLoc();
2888 const qt = getExprQualType(c, expr);
2889 const ty = qt.getTypePtr();
2890 return transZeroInitExpr(c, scope, source_loc, ty);
2891}
2892
2893/// If a statement can possibly translate to a Zig assignment (either directly because it's
2894/// an assignment in C or indirectly via result assignment to `_`) AND it's the sole statement
2895/// in the body of an if statement or loop, then we need to put the statement into its own block.
2896/// The `else` case here corresponds to statements that could result in an assignment. If a statement
2897/// class never needs a block, add its enum to the top prong.
2898fn maybeBlockify(c: *Context, scope: *Scope, stmt: *const clang.Stmt) TransError!Node {
2899 switch (stmt.getStmtClass()) {
2900 .BreakStmtClass,
2901 .CompoundStmtClass,
2902 .ContinueStmtClass,
2903 .DeclRefExprClass,
2904 .DeclStmtClass,
2905 .DoStmtClass,
2906 .ForStmtClass,
2907 .IfStmtClass,
2908 .ReturnStmtClass,
2909 .NullStmtClass,
2910 .WhileStmtClass,
2911 => return transStmt(c, scope, stmt, .unused),
2912 else => return blockify(c, scope, stmt),
2913 }
2914}
2915
2916fn blockify(c: *Context, scope: *Scope, stmt: *const clang.Stmt) TransError!Node {
2917 var block_scope = try Scope.Block.init(c, scope, false);
2918 defer block_scope.deinit();
2919 const result = try transStmt(c, &block_scope.base, stmt, .unused);
2920 try block_scope.statements.append(result);
2921 return block_scope.complete(c);
2922}
2923
2924fn transIfStmt(
2925 c: *Context,
2926 scope: *Scope,
2927 stmt: *const clang.IfStmt,
2928) TransError!Node {
2929 // if (c) t
2930 // if (c) t else e
2931 var cond_scope = Scope.Condition{
2932 .base = .{
2933 .parent = scope,
2934 .id = .condition,
2935 },
2936 };
2937 defer cond_scope.deinit();
2938 const cond_expr = @as(*const clang.Expr, @ptrCast(stmt.getCond()));
2939 const cond = try transBoolExpr(c, &cond_scope.base, cond_expr, .used);
2940
2941 const then_stmt = stmt.getThen();
2942 const else_stmt = stmt.getElse();
2943 const then_class = then_stmt.getStmtClass();
2944 // block needed to keep else statement from attaching to inner while
2945 const must_blockify = (else_stmt != null) and switch (then_class) {
2946 .DoStmtClass, .ForStmtClass, .WhileStmtClass => true,
2947 else => false,
2948 };
2949
2950 const then_body = if (must_blockify)
2951 try blockify(c, scope, then_stmt)
2952 else
2953 try maybeBlockify(c, scope, then_stmt);
2954
2955 const else_body = if (else_stmt) |expr|
2956 try maybeBlockify(c, scope, expr)
2957 else
2958 null;
2959 return Tag.@"if".create(c.arena, .{ .cond = cond, .then = then_body, .@"else" = else_body });
2960}
2961
2962fn transWhileLoop(
2963 c: *Context,
2964 scope: *Scope,
2965 stmt: *const clang.WhileStmt,
2966) TransError!Node {
2967 var cond_scope = Scope.Condition{
2968 .base = .{
2969 .parent = scope,
2970 .id = .condition,
2971 },
2972 };
2973 defer cond_scope.deinit();
2974 const cond_expr = @as(*const clang.Expr, @ptrCast(stmt.getCond()));
2975 const cond = try transBoolExpr(c, &cond_scope.base, cond_expr, .used);
2976
2977 var loop_scope = Scope{
2978 .parent = scope,
2979 .id = .loop,
2980 };
2981 const body = try maybeBlockify(c, &loop_scope, stmt.getBody());
2982 return Tag.@"while".create(c.arena, .{ .cond = cond, .body = body, .cont_expr = null });
2983}
2984
2985fn transDoWhileLoop(
2986 c: *Context,
2987 scope: *Scope,
2988 stmt: *const clang.DoStmt,
2989) TransError!Node {
2990 var loop_scope = Scope{
2991 .parent = scope,
2992 .id = .do_loop,
2993 };
2994
2995 // if (!cond) break;
2996 var cond_scope = Scope.Condition{
2997 .base = .{
2998 .parent = scope,
2999 .id = .condition,
3000 },
3001 };
3002 defer cond_scope.deinit();
3003 const cond = try transBoolExpr(c, &cond_scope.base, @as(*const clang.Expr, @ptrCast(stmt.getCond())), .used);
3004 const if_not_break = switch (cond.tag()) {
3005 .true_literal => {
3006 const body_node = try maybeBlockify(c, scope, stmt.getBody());
3007 return Tag.while_true.create(c.arena, body_node);
3008 },
3009 else => try Tag.if_not_break.create(c.arena, cond),
3010 };
3011
3012 var body_node = try transStmt(c, &loop_scope, stmt.getBody(), .unused);
3013 if (body_node.isNoreturn(true)) {
3014 // The body node ends in a noreturn statement. Simply put it in a while (true)
3015 // in case it contains breaks or continues.
3016 } else if (stmt.getBody().getStmtClass() == .CompoundStmtClass) {
3017 // there's already a block in C, so we'll append our condition to it.
3018 // c: do {
3019 // c: a;
3020 // c: b;
3021 // c: } while(c);
3022 // zig: while (true) {
3023 // zig: a;
3024 // zig: b;
3025 // zig: if (!cond) break;
3026 // zig: }
3027 const block = body_node.castTag(.block).?;
3028 block.data.stmts.len += 1; // This is safe since we reserve one extra space in Scope.Block.complete.
3029 block.data.stmts[block.data.stmts.len - 1] = if_not_break;
3030 } else {
3031 // the C statement is without a block, so we need to create a block to contain it.
3032 // c: do
3033 // c: a;
3034 // c: while(c);
3035 // zig: while (true) {
3036 // zig: a;
3037 // zig: if (!cond) break;
3038 // zig: }
3039 const statements = try c.arena.alloc(Node, 2);
3040 statements[0] = body_node;
3041 statements[1] = if_not_break;
3042 body_node = try Tag.block.create(c.arena, .{ .label = null, .stmts = statements });
3043 }
3044 return Tag.while_true.create(c.arena, body_node);
3045}
3046
3047fn transForLoop(
3048 c: *Context,
3049 scope: *Scope,
3050 stmt: *const clang.ForStmt,
3051) TransError!Node {
3052 var loop_scope = Scope{
3053 .parent = scope,
3054 .id = .loop,
3055 };
3056
3057 var block_scope: ?Scope.Block = null;
3058 defer if (block_scope) |*bs| bs.deinit();
3059
3060 if (stmt.getInit()) |init| {
3061 block_scope = try Scope.Block.init(c, scope, false);
3062 loop_scope.parent = &block_scope.?.base;
3063 const init_node = try transStmt(c, &block_scope.?.base, init, .unused);
3064 if (init_node.tag() != .declaration) try block_scope.?.statements.append(init_node);
3065 }
3066 var cond_scope = Scope.Condition{
3067 .base = .{
3068 .parent = &loop_scope,
3069 .id = .condition,
3070 },
3071 };
3072 defer cond_scope.deinit();
3073
3074 const cond = if (stmt.getCond()) |cond|
3075 try transBoolExpr(c, &cond_scope.base, cond, .used)
3076 else
3077 Tag.true_literal.init();
3078
3079 const cont_expr = if (stmt.getInc()) |incr|
3080 try transExpr(c, &cond_scope.base, incr, .unused)
3081 else
3082 null;
3083
3084 const body = try maybeBlockify(c, &loop_scope, stmt.getBody());
3085 const while_node = try Tag.@"while".create(c.arena, .{ .cond = cond, .body = body, .cont_expr = cont_expr });
3086 if (block_scope) |*bs| {
3087 try bs.statements.append(while_node);
3088 return try bs.complete(c);
3089 } else {
3090 return while_node;
3091 }
3092}
3093
3094fn transSwitch(
3095 c: *Context,
3096 scope: *Scope,
3097 stmt: *const clang.SwitchStmt,
3098) TransError!Node {
3099 var loop_scope = Scope{
3100 .parent = scope,
3101 .id = .loop,
3102 };
3103
3104 var block_scope = try Scope.Block.init(c, &loop_scope, false);
3105 defer block_scope.deinit();
3106
3107 const base_scope = &block_scope.base;
3108
3109 var cond_scope = Scope.Condition{
3110 .base = .{
3111 .parent = base_scope,
3112 .id = .condition,
3113 },
3114 };
3115 defer cond_scope.deinit();
3116 const switch_expr = try transExpr(c, &cond_scope.base, stmt.getCond(), .used);
3117
3118 var cases = std.array_list.Managed(Node).init(c.gpa);
3119 defer cases.deinit();
3120 var has_default = false;
3121
3122 const body = stmt.getBody();
3123 assert(body.getStmtClass() == .CompoundStmtClass);
3124 const compound_stmt = @as(*const clang.CompoundStmt, @ptrCast(body));
3125 var it = compound_stmt.body_begin();
3126 const end_it = compound_stmt.body_end();
3127 // Iterate over switch body and collect all cases.
3128 // Fallthrough is handled by duplicating statements.
3129 while (it != end_it) : (it += 1) {
3130 switch (it[0].getStmtClass()) {
3131 .CaseStmtClass => {
3132 var items = std.array_list.Managed(Node).init(c.gpa);
3133 defer items.deinit();
3134 const sub = try transCaseStmt(c, base_scope, it[0], &items);
3135 const res = try transSwitchProngStmt(c, base_scope, sub, it, end_it);
3136
3137 if (items.items.len == 0) {
3138 has_default = true;
3139 const switch_else = try Tag.switch_else.create(c.arena, res);
3140 try cases.append(switch_else);
3141 } else {
3142 const switch_prong = try Tag.switch_prong.create(c.arena, .{
3143 .cases = try c.arena.dupe(Node, items.items),
3144 .cond = res,
3145 });
3146 try cases.append(switch_prong);
3147 }
3148 },
3149 .DefaultStmtClass => {
3150 has_default = true;
3151 const default_stmt = @as(*const clang.DefaultStmt, @ptrCast(it[0]));
3152
3153 var sub = default_stmt.getSubStmt();
3154 while (true) switch (sub.getStmtClass()) {
3155 .CaseStmtClass => sub = @as(*const clang.CaseStmt, @ptrCast(sub)).getSubStmt(),
3156 .DefaultStmtClass => sub = @as(*const clang.DefaultStmt, @ptrCast(sub)).getSubStmt(),
3157 else => break,
3158 };
3159
3160 const res = try transSwitchProngStmt(c, base_scope, sub, it, end_it);
3161
3162 const switch_else = try Tag.switch_else.create(c.arena, res);
3163 try cases.append(switch_else);
3164 },
3165 else => {}, // collected in transSwitchProngStmt
3166 }
3167 }
3168
3169 if (!has_default) {
3170 const else_prong = try Tag.switch_else.create(c.arena, Tag.empty_block.init());
3171 try cases.append(else_prong);
3172 }
3173
3174 const switch_node = try Tag.@"switch".create(c.arena, .{
3175 .cond = switch_expr,
3176 .cases = try c.arena.dupe(Node, cases.items),
3177 });
3178 try block_scope.statements.append(switch_node);
3179 try block_scope.statements.append(Tag.@"break".init());
3180 const while_body = try block_scope.complete(c);
3181
3182 return Tag.while_true.create(c.arena, while_body);
3183}
3184
3185/// Collects all items for this case, returns the first statement after the labels.
3186/// If items ends up empty, the prong should be translated as an else.
3187fn transCaseStmt(c: *Context, scope: *Scope, stmt: *const clang.Stmt, items: *std.array_list.Managed(Node)) TransError!*const clang.Stmt {
3188 var sub = stmt;
3189 var seen_default = false;
3190 while (true) {
3191 switch (sub.getStmtClass()) {
3192 .DefaultStmtClass => {
3193 seen_default = true;
3194 items.items.len = 0;
3195 const default_stmt = @as(*const clang.DefaultStmt, @ptrCast(sub));
3196 sub = default_stmt.getSubStmt();
3197 },
3198 .CaseStmtClass => {
3199 const case_stmt = @as(*const clang.CaseStmt, @ptrCast(sub));
3200
3201 if (seen_default) {
3202 items.items.len = 0;
3203 sub = case_stmt.getSubStmt();
3204 continue;
3205 }
3206
3207 const expr = if (case_stmt.getRHS()) |rhs| blk: {
3208 const lhs_node = try transExprCoercing(c, scope, case_stmt.getLHS(), .used);
3209 const rhs_node = try transExprCoercing(c, scope, rhs, .used);
3210
3211 break :blk try Tag.ellipsis3.create(c.arena, .{ .lhs = lhs_node, .rhs = rhs_node });
3212 } else try transExprCoercing(c, scope, case_stmt.getLHS(), .used);
3213
3214 try items.append(expr);
3215 sub = case_stmt.getSubStmt();
3216 },
3217 else => return sub,
3218 }
3219 }
3220}
3221
3222/// Collects all statements seen by this case into a block.
3223/// Avoids creating a block if the first statement is a break or return.
3224fn transSwitchProngStmt(
3225 c: *Context,
3226 scope: *Scope,
3227 stmt: *const clang.Stmt,
3228 parent_it: clang.CompoundStmt.ConstBodyIterator,
3229 parent_end_it: clang.CompoundStmt.ConstBodyIterator,
3230) TransError!Node {
3231 switch (stmt.getStmtClass()) {
3232 .BreakStmtClass => return Tag.@"break".init(),
3233 .ReturnStmtClass => return transStmt(c, scope, stmt, .unused),
3234 .CaseStmtClass, .DefaultStmtClass => unreachable,
3235 else => {
3236 var block_scope = try Scope.Block.init(c, scope, false);
3237 defer block_scope.deinit();
3238
3239 // we do not need to translate `stmt` since it is the first stmt of `parent_it`
3240 try transSwitchProngStmtInline(c, &block_scope, parent_it, parent_end_it);
3241 return try block_scope.complete(c);
3242 },
3243 }
3244}
3245
3246/// Collects all statements seen by this case into a block.
3247fn transSwitchProngStmtInline(
3248 c: *Context,
3249 block: *Scope.Block,
3250 start_it: clang.CompoundStmt.ConstBodyIterator,
3251 end_it: clang.CompoundStmt.ConstBodyIterator,
3252) TransError!void {
3253 var it = start_it;
3254 while (it != end_it) : (it += 1) {
3255 switch (it[0].getStmtClass()) {
3256 .ReturnStmtClass => {
3257 const result = try transStmt(c, &block.base, it[0], .unused);
3258 try block.statements.append(result);
3259 return;
3260 },
3261 .BreakStmtClass => {
3262 try block.statements.append(Tag.@"break".init());
3263 return;
3264 },
3265 .CaseStmtClass => {
3266 var sub = @as(*const clang.CaseStmt, @ptrCast(it[0])).getSubStmt();
3267 while (true) switch (sub.getStmtClass()) {
3268 .CaseStmtClass => sub = @as(*const clang.CaseStmt, @ptrCast(sub)).getSubStmt(),
3269 .DefaultStmtClass => sub = @as(*const clang.DefaultStmt, @ptrCast(sub)).getSubStmt(),
3270 else => break,
3271 };
3272 const result = try transStmt(c, &block.base, sub, .unused);
3273 assert(result.tag() != .declaration);
3274 try block.statements.append(result);
3275 if (result.isNoreturn(true)) {
3276 return;
3277 }
3278 },
3279 .DefaultStmtClass => {
3280 var sub = @as(*const clang.DefaultStmt, @ptrCast(it[0])).getSubStmt();
3281 while (true) switch (sub.getStmtClass()) {
3282 .CaseStmtClass => sub = @as(*const clang.CaseStmt, @ptrCast(sub)).getSubStmt(),
3283 .DefaultStmtClass => sub = @as(*const clang.DefaultStmt, @ptrCast(sub)).getSubStmt(),
3284 else => break,
3285 };
3286 const result = try transStmt(c, &block.base, sub, .unused);
3287 assert(result.tag() != .declaration);
3288 try block.statements.append(result);
3289 if (result.isNoreturn(true)) {
3290 return;
3291 }
3292 },
3293 .CompoundStmtClass => {
3294 const result = try transCompoundStmt(c, &block.base, @as(*const clang.CompoundStmt, @ptrCast(it[0])));
3295 try block.statements.append(result);
3296 if (result.isNoreturn(true)) {
3297 return;
3298 }
3299 },
3300 else => {
3301 const result = try transStmt(c, &block.base, it[0], .unused);
3302 switch (result.tag()) {
3303 .declaration, .empty_block => {},
3304 else => try block.statements.append(result),
3305 }
3306 },
3307 }
3308 }
3309 return;
3310}
3311
3312fn transConstantExpr(c: *Context, scope: *Scope, expr: *const clang.Expr, used: ResultUsed) TransError!Node {
3313 var result: clang.ExprEvalResult = undefined;
3314 if (!expr.evaluateAsConstantExpr(&result, .Normal, c.clang_context))
3315 return fail(c, error.UnsupportedTranslation, expr.getBeginLoc(), "invalid constant expression", .{});
3316
3317 switch (result.Val.getKind()) {
3318 .Int => {
3319 // See comment in `transIntegerLiteral` for why this code is here.
3320 // @as(T, x)
3321 const expr_base = @as(*const clang.Expr, @ptrCast(expr));
3322 const as_node = try Tag.as.create(c.arena, .{
3323 .lhs = try transQualType(c, scope, expr_base.getType(), expr_base.getBeginLoc()),
3324 .rhs = try transCreateNodeAPInt(c, result.Val.getInt()),
3325 });
3326 return maybeSuppressResult(c, used, as_node);
3327 },
3328 else => |kind| {
3329 return fail(c, error.UnsupportedTranslation, expr.getBeginLoc(), "unsupported constant expression kind '{}'", .{kind});
3330 },
3331 }
3332}
3333
3334fn transPredefinedExpr(c: *Context, scope: *Scope, expr: *const clang.PredefinedExpr, used: ResultUsed) TransError!Node {
3335 return transStringLiteral(c, scope, expr.getFunctionName(), used);
3336}
3337
3338fn transCreateCharLitNode(c: *Context, narrow: bool, val: u32) TransError!Node {
3339 return Tag.char_literal.create(c.arena, if (narrow)
3340 try std.fmt.allocPrint(c.arena, "'{f}'", .{std.zig.fmtChar(@intCast(val))})
3341 else
3342 try std.fmt.allocPrint(c.arena, "'\\u{{{x}}}'", .{val}));
3343}
3344
3345fn transCharLiteral(
3346 c: *Context,
3347 scope: *Scope,
3348 stmt: *const clang.CharacterLiteral,
3349 result_used: ResultUsed,
3350 suppress_as: SuppressCast,
3351) TransError!Node {
3352 const kind = stmt.getKind();
3353 const val = stmt.getValue();
3354 const narrow = kind == .Ascii or kind == .UTF8;
3355 // C has a somewhat obscure feature called multi-character character constant
3356 // e.g. 'abcd'
3357 const int_lit_node = if (kind == .Ascii and val > 255)
3358 try transCreateNodeNumber(c, val, .int)
3359 else
3360 try transCreateCharLitNode(c, narrow, val);
3361
3362 if (suppress_as == .no_as) {
3363 return maybeSuppressResult(c, result_used, int_lit_node);
3364 }
3365 // See comment in `transIntegerLiteral` for why this code is here.
3366 // @as(T, x)
3367 const expr_base = @as(*const clang.Expr, @ptrCast(stmt));
3368 const as_node = try Tag.as.create(c.arena, .{
3369 .lhs = try transQualType(c, scope, expr_base.getType(), expr_base.getBeginLoc()),
3370 .rhs = int_lit_node,
3371 });
3372 return maybeSuppressResult(c, result_used, as_node);
3373}
3374
3375fn transStmtExpr(c: *Context, scope: *Scope, stmt: *const clang.StmtExpr, used: ResultUsed) TransError!Node {
3376 const comp = stmt.getSubStmt();
3377 if (used == .unused) {
3378 return transCompoundStmt(c, scope, comp);
3379 }
3380 var block_scope = try Scope.Block.init(c, scope, true);
3381 defer block_scope.deinit();
3382
3383 var it = comp.body_begin();
3384 const end_it = comp.body_end();
3385 while (it != end_it - 1) : (it += 1) {
3386 const result = try transStmt(c, &block_scope.base, it[0], .unused);
3387 switch (result.tag()) {
3388 .declaration, .empty_block => {},
3389 else => try block_scope.statements.append(result),
3390 }
3391 }
3392
3393 const last_result = try transStmt(c, &block_scope.base, it[0], .used);
3394 switch (last_result.tag()) {
3395 .declaration, .empty_block => {},
3396 else => {
3397 const break_node = try Tag.break_val.create(c.arena, .{
3398 .label = block_scope.label,
3399 .val = last_result,
3400 });
3401 try block_scope.statements.append(break_node);
3402 },
3403 }
3404 const res = try block_scope.complete(c);
3405 return maybeSuppressResult(c, used, res);
3406}
3407
3408fn transMemberExpr(c: *Context, scope: *Scope, stmt: *const clang.MemberExpr, result_used: ResultUsed) TransError!Node {
3409 var container_node = try transExpr(c, scope, stmt.getBase(), .used);
3410 if (stmt.isArrow()) {
3411 container_node = try Tag.deref.create(c.arena, container_node);
3412 }
3413
3414 const member_decl = stmt.getMemberDecl();
3415 const name = blk: {
3416 const decl_kind = @as(*const clang.Decl, @ptrCast(member_decl)).getKind();
3417 // If we're referring to a anonymous struct/enum find the bogus name
3418 // we've assigned to it during the RecordDecl translation
3419 if (decl_kind == .Field) {
3420 const field_decl = @as(*const clang.FieldDecl, @ptrCast(member_decl));
3421 if (field_decl.isAnonymousStructOrUnion()) {
3422 const name = c.decl_table.get(@intFromPtr(field_decl.getCanonicalDecl())).?;
3423 break :blk try c.arena.dupe(u8, name);
3424 }
3425 }
3426 const decl = @as(*const clang.NamedDecl, @ptrCast(member_decl));
3427 break :blk try c.str(decl.getName_bytes_begin());
3428 };
3429
3430 var node = try Tag.field_access.create(c.arena, .{ .lhs = container_node, .field_name = name });
3431 if (exprIsFlexibleArrayRef(c, @as(*const clang.Expr, @ptrCast(stmt)))) {
3432 node = try Tag.call.create(c.arena, .{ .lhs = node, .args = &.{} });
3433 }
3434 return maybeSuppressResult(c, result_used, node);
3435}
3436
3437/// ptr[subscr] (`subscr` is a signed integer expression, `ptr` a pointer) becomes:
3438/// (blk: {
3439/// const tmp = subscr;
3440/// if (tmp >= 0) break :blk ptr + @intCast(usize, tmp) else break :blk ptr - ~@bitCast(usize, @intCast(isize, tmp) +% -1);
3441/// }).*
3442/// Todo: rip this out once `[*]T + isize` becomes valid.
3443fn transSignedArrayAccess(
3444 c: *Context,
3445 scope: *Scope,
3446 container_expr: *const clang.Expr,
3447 subscr_expr: *const clang.Expr,
3448 result_used: ResultUsed,
3449) TransError!Node {
3450 var block_scope = try Scope.Block.init(c, scope, true);
3451 defer block_scope.deinit();
3452
3453 const tmp = try block_scope.makeMangledName(c, "tmp");
3454
3455 const subscr_node = try transExpr(c, &block_scope.base, subscr_expr, .used);
3456 const subscr_decl = try Tag.var_simple.create(c.arena, .{ .name = tmp, .init = subscr_node });
3457 try block_scope.statements.append(subscr_decl);
3458
3459 const tmp_ref = try Tag.identifier.create(c.arena, tmp);
3460
3461 const container_node = try transExpr(c, &block_scope.base, container_expr, .used);
3462
3463 const cond_node = try Tag.greater_than_equal.create(c.arena, .{ .lhs = tmp_ref, .rhs = Tag.zero_literal.init() });
3464
3465 const then_value = try Tag.add.create(c.arena, .{
3466 .lhs = container_node,
3467 .rhs = try Tag.as.create(c.arena, .{
3468 .lhs = try Tag.type.create(c.arena, "usize"),
3469 .rhs = try Tag.int_cast.create(c.arena, tmp_ref),
3470 }),
3471 });
3472
3473 const then_body = try Tag.break_val.create(c.arena, .{
3474 .label = block_scope.label,
3475 .val = then_value,
3476 });
3477
3478 const minuend = container_node;
3479 const signed_size = try Tag.as.create(c.arena, .{
3480 .lhs = try Tag.type.create(c.arena, "isize"),
3481 .rhs = try Tag.int_cast.create(c.arena, tmp_ref),
3482 });
3483 const to_cast = try Tag.add_wrap.create(c.arena, .{
3484 .lhs = signed_size,
3485 .rhs = try Tag.negate.create(c.arena, Tag.one_literal.init()),
3486 });
3487 const bitcast_node = try Tag.as.create(c.arena, .{
3488 .lhs = try Tag.type.create(c.arena, "usize"),
3489 .rhs = try Tag.bit_cast.create(c.arena, to_cast),
3490 });
3491 const subtrahend = try Tag.bit_not.create(c.arena, bitcast_node);
3492 const difference = try Tag.sub.create(c.arena, .{
3493 .lhs = minuend,
3494 .rhs = subtrahend,
3495 });
3496 const else_body = try Tag.break_val.create(c.arena, .{
3497 .label = block_scope.label,
3498 .val = difference,
3499 });
3500
3501 const if_node = try Tag.@"if".create(c.arena, .{
3502 .cond = cond_node,
3503 .then = then_body,
3504 .@"else" = else_body,
3505 });
3506
3507 try block_scope.statements.append(if_node);
3508 const block_node = try block_scope.complete(c);
3509
3510 const derefed = try Tag.deref.create(c.arena, block_node);
3511
3512 return maybeSuppressResult(c, result_used, derefed);
3513}
3514
3515fn transArrayAccess(c: *Context, scope: *Scope, stmt: *const clang.ArraySubscriptExpr, result_used: ResultUsed) TransError!Node {
3516 const base_stmt = stmt.getBase();
3517 const base_qt = getExprQualType(c, base_stmt);
3518 const is_vector = cIsVector(base_qt);
3519
3520 const subscr_expr = stmt.getIdx();
3521 const subscr_qt = getExprQualType(c, subscr_expr);
3522 const is_longlong = cIsLongLongInteger(subscr_qt);
3523 const is_signed = cIsSignedInteger(subscr_qt);
3524 const is_nonnegative_int_literal = cIsNonNegativeIntLiteral(c, subscr_expr);
3525
3526 // Unwrap the base statement if it's an array decayed to a bare pointer type
3527 // so that we index the array itself
3528 var unwrapped_base = base_stmt;
3529 if (@as(*const clang.Stmt, @ptrCast(base_stmt)).getStmtClass() == .ImplicitCastExprClass) {
3530 const implicit_cast = @as(*const clang.ImplicitCastExpr, @ptrCast(base_stmt));
3531
3532 if (implicit_cast.getCastKind() == .ArrayToPointerDecay) {
3533 unwrapped_base = implicit_cast.getSubExpr();
3534 }
3535 }
3536
3537 // Special case: actual pointer (not decayed array) and signed integer subscript
3538 // See discussion at https://github.com/ziglang/zig/pull/8589
3539 if (is_signed and (base_stmt == unwrapped_base) and !is_vector and !is_nonnegative_int_literal)
3540 return transSignedArrayAccess(c, scope, base_stmt, subscr_expr, result_used);
3541
3542 const container_node = try transExpr(c, scope, unwrapped_base, .used);
3543 const rhs = if (is_longlong or is_signed) blk: {
3544 // check if long long first so that signed long long doesn't just become unsigned long long
3545 const typeid_node = if (is_longlong) try Tag.type.create(c.arena, "usize") else try transQualTypeIntWidthOf(c, subscr_qt, false);
3546 break :blk try Tag.as.create(c.arena, .{
3547 .lhs = typeid_node,
3548 .rhs = try Tag.int_cast.create(
3549 c.arena,
3550 try transExpr(c, scope, subscr_expr, .used),
3551 ),
3552 });
3553 } else try transExpr(c, scope, subscr_expr, .used);
3554
3555 const node = try Tag.array_access.create(c.arena, .{
3556 .lhs = container_node,
3557 .rhs = rhs,
3558 });
3559 return maybeSuppressResult(c, result_used, node);
3560}
3561
3562/// Check if an expression is ultimately a reference to a function declaration
3563/// (which means it should not be unwrapped with `.?` in translated code)
3564fn cIsFunctionDeclRef(expr: *const clang.Expr) bool {
3565 switch (expr.getStmtClass()) {
3566 .ParenExprClass => {
3567 const op_expr = @as(*const clang.ParenExpr, @ptrCast(expr)).getSubExpr();
3568 return cIsFunctionDeclRef(op_expr);
3569 },
3570 .DeclRefExprClass => {
3571 const decl_ref = @as(*const clang.DeclRefExpr, @ptrCast(expr));
3572 const value_decl = decl_ref.getDecl();
3573 const qt = value_decl.getType();
3574 return qualTypeChildIsFnProto(qt);
3575 },
3576 .ImplicitCastExprClass => {
3577 const implicit_cast = @as(*const clang.ImplicitCastExpr, @ptrCast(expr));
3578 const cast_kind = implicit_cast.getCastKind();
3579 if (cast_kind == .BuiltinFnToFnPtr) return true;
3580 if (cast_kind == .FunctionToPointerDecay) {
3581 return cIsFunctionDeclRef(implicit_cast.getSubExpr());
3582 }
3583 return false;
3584 },
3585 .UnaryOperatorClass => {
3586 const un_op = @as(*const clang.UnaryOperator, @ptrCast(expr));
3587 const opcode = un_op.getOpcode();
3588 return (opcode == .AddrOf or opcode == .Deref) and cIsFunctionDeclRef(un_op.getSubExpr());
3589 },
3590 .GenericSelectionExprClass => {
3591 const gen_sel = @as(*const clang.GenericSelectionExpr, @ptrCast(expr));
3592 return cIsFunctionDeclRef(gen_sel.getResultExpr());
3593 },
3594 else => return false,
3595 }
3596}
3597
3598fn transCallExpr(c: *Context, scope: *Scope, stmt: *const clang.CallExpr, result_used: ResultUsed) TransError!Node {
3599 const callee = stmt.getCallee();
3600 const raw_fn_expr = try transExpr(c, scope, callee, .used);
3601
3602 var is_ptr = false;
3603 const fn_ty = qualTypeGetFnProto(callee.getType(), &is_ptr);
3604
3605 const fn_expr = if (is_ptr and fn_ty != null and !cIsFunctionDeclRef(callee))
3606 try Tag.unwrap.create(c.arena, raw_fn_expr)
3607 else
3608 raw_fn_expr;
3609
3610 const num_args = stmt.getNumArgs();
3611 const args = try c.arena.alloc(Node, num_args);
3612
3613 const c_args = stmt.getArgs();
3614 var i: usize = 0;
3615 while (i < num_args) : (i += 1) {
3616 var arg = try transExpr(c, scope, c_args[i], .used);
3617
3618 // In C the result type of a boolean expression is int. If this result is passed as
3619 // an argument to a function whose parameter is also int, there is no cast. Therefore
3620 // in Zig we'll need to cast it from bool to u1 (which will safely coerce to c_int).
3621 if (fn_ty) |ty| {
3622 switch (ty) {
3623 .Proto => |fn_proto| {
3624 const param_count = fn_proto.getNumParams();
3625 if (i < param_count) {
3626 const param_qt = fn_proto.getParamType(@as(c_uint, @intCast(i)));
3627 if (isBoolRes(arg) and cIsNativeInt(param_qt)) {
3628 arg = try Tag.int_from_bool.create(c.arena, arg);
3629 } else if (arg.tag() == .string_literal and qualTypeIsCharStar(param_qt)) {
3630 const loc = @as(*const clang.Stmt, @ptrCast(stmt)).getBeginLoc();
3631 const dst_type_node = try transQualType(c, scope, param_qt, loc);
3632 arg = try removeCVQualifiers(c, dst_type_node, arg);
3633 }
3634 }
3635 },
3636 else => {},
3637 }
3638 }
3639 args[i] = arg;
3640 }
3641 const node = try Tag.call.create(c.arena, .{ .lhs = fn_expr, .args = args });
3642 if (fn_ty) |ty| {
3643 const canon = ty.getReturnType().getCanonicalType();
3644 const ret_ty = canon.getTypePtr();
3645 if (ret_ty.isVoidType()) {
3646 return node;
3647 }
3648 }
3649
3650 return maybeSuppressResult(c, result_used, node);
3651}
3652
3653const ClangFunctionType = union(enum) {
3654 Proto: *const clang.FunctionProtoType,
3655 NoProto: *const clang.FunctionType,
3656
3657 fn getReturnType(self: @This()) clang.QualType {
3658 switch (@as(meta.Tag(@This()), self)) {
3659 .Proto => return self.Proto.getReturnType(),
3660 .NoProto => return self.NoProto.getReturnType(),
3661 }
3662 }
3663};
3664
3665fn qualTypeGetFnProto(qt: clang.QualType, is_ptr: *bool) ?ClangFunctionType {
3666 const canon = qt.getCanonicalType();
3667 var ty = canon.getTypePtr();
3668 is_ptr.* = false;
3669
3670 if (ty.getTypeClass() == .Pointer) {
3671 is_ptr.* = true;
3672 const child_qt = ty.getPointeeType();
3673 ty = child_qt.getTypePtr();
3674 }
3675 if (ty.getTypeClass() == .FunctionProto) {
3676 return ClangFunctionType{ .Proto = @as(*const clang.FunctionProtoType, @ptrCast(ty)) };
3677 }
3678 if (ty.getTypeClass() == .FunctionNoProto) {
3679 return ClangFunctionType{ .NoProto = @as(*const clang.FunctionType, @ptrCast(ty)) };
3680 }
3681 return null;
3682}
3683
3684fn transUnaryExprOrTypeTraitExpr(
3685 c: *Context,
3686 scope: *Scope,
3687 stmt: *const clang.UnaryExprOrTypeTraitExpr,
3688 result_used: ResultUsed,
3689) TransError!Node {
3690 const loc = stmt.getBeginLoc();
3691 const type_node = try transQualType(c, scope, stmt.getTypeOfArgument(), loc);
3692
3693 const kind = stmt.getKind();
3694 const node = switch (kind) {
3695 .SizeOf => try Tag.sizeof.create(c.arena, type_node),
3696 .AlignOf => try Tag.alignof.create(c.arena, type_node),
3697 .DataSizeOf,
3698 .CountOf,
3699 .PreferredAlignOf,
3700 .PtrAuthTypeDiscriminator,
3701 .VecStep,
3702 .OpenMPRequiredSimdAlign,
3703 => return fail(
3704 c,
3705 error.UnsupportedTranslation,
3706 loc,
3707 "unsupported type trait kind {}",
3708 .{kind},
3709 ),
3710 };
3711 return maybeSuppressResult(c, result_used, node);
3712}
3713
3714fn qualTypeHasWrappingOverflow(qt: clang.QualType) bool {
3715 if (cIsUnsignedInteger(qt)) {
3716 // unsigned integer overflow wraps around.
3717 return true;
3718 } else {
3719 // float, signed integer, and pointer overflow is undefined behavior.
3720 return false;
3721 }
3722}
3723
3724fn transUnaryOperator(c: *Context, scope: *Scope, stmt: *const clang.UnaryOperator, used: ResultUsed) TransError!Node {
3725 const op_expr = stmt.getSubExpr();
3726 switch (stmt.getOpcode()) {
3727 .PostInc => if (qualTypeHasWrappingOverflow(stmt.getType()))
3728 return transCreatePostCrement(c, scope, stmt, .add_wrap_assign, used)
3729 else
3730 return transCreatePostCrement(c, scope, stmt, .add_assign, used),
3731 .PostDec => if (qualTypeHasWrappingOverflow(stmt.getType()))
3732 return transCreatePostCrement(c, scope, stmt, .sub_wrap_assign, used)
3733 else
3734 return transCreatePostCrement(c, scope, stmt, .sub_assign, used),
3735 .PreInc => if (qualTypeHasWrappingOverflow(stmt.getType()))
3736 return transCreatePreCrement(c, scope, stmt, .add_wrap_assign, used)
3737 else
3738 return transCreatePreCrement(c, scope, stmt, .add_assign, used),
3739 .PreDec => if (qualTypeHasWrappingOverflow(stmt.getType()))
3740 return transCreatePreCrement(c, scope, stmt, .sub_wrap_assign, used)
3741 else
3742 return transCreatePreCrement(c, scope, stmt, .sub_assign, used),
3743 .AddrOf => {
3744 return Tag.address_of.create(c.arena, try transExpr(c, scope, op_expr, used));
3745 },
3746 .Deref => {
3747 if (qualTypeWasDemotedToOpaque(c, stmt.getType()))
3748 return fail(c, error.UnsupportedTranslation, stmt.getBeginLoc(), "cannot dereference opaque type", .{});
3749
3750 const node = try transExpr(c, scope, op_expr, used);
3751 var is_ptr = false;
3752 const fn_ty = qualTypeGetFnProto(op_expr.getType(), &is_ptr);
3753 if (fn_ty != null and is_ptr)
3754 return node;
3755 return Tag.deref.create(c.arena, node);
3756 },
3757 .Plus => return transExpr(c, scope, op_expr, used),
3758 .Minus => {
3759 if (!qualTypeHasWrappingOverflow(op_expr.getType())) {
3760 const sub_expr_node = try transExpr(c, scope, op_expr, .used);
3761 const to_negate = if (isBoolRes(sub_expr_node)) blk: {
3762 const ty_node = try Tag.type.create(c.arena, "c_int");
3763 const int_node = try Tag.int_from_bool.create(c.arena, sub_expr_node);
3764 break :blk try Tag.as.create(c.arena, .{ .lhs = ty_node, .rhs = int_node });
3765 } else sub_expr_node;
3766 return Tag.negate.create(c.arena, to_negate);
3767 } else if (cIsUnsignedInteger(op_expr.getType())) {
3768 // use -% x for unsigned integers
3769 return Tag.negate_wrap.create(c.arena, try transExpr(c, scope, op_expr, .used));
3770 } else return fail(c, error.UnsupportedTranslation, stmt.getBeginLoc(), "C negation with non float non integer", .{});
3771 },
3772 .Not => {
3773 return Tag.bit_not.create(c.arena, try transExpr(c, scope, op_expr, .used));
3774 },
3775 .LNot => {
3776 return Tag.not.create(c.arena, try transBoolExpr(c, scope, op_expr, .used));
3777 },
3778 .Extension => {
3779 return transExpr(c, scope, stmt.getSubExpr(), used);
3780 },
3781 else => return fail(c, error.UnsupportedTranslation, stmt.getBeginLoc(), "unsupported C translation {}", .{stmt.getOpcode()}),
3782 }
3783}
3784
3785fn transCreatePreCrement(
3786 c: *Context,
3787 scope: *Scope,
3788 stmt: *const clang.UnaryOperator,
3789 op: Tag,
3790 used: ResultUsed,
3791) TransError!Node {
3792 const op_expr = stmt.getSubExpr();
3793
3794 if (used == .unused) {
3795 // common case
3796 // c: ++expr
3797 // zig: expr += 1
3798 const lhs = try transExpr(c, scope, op_expr, .used);
3799 const rhs = Tag.one_literal.init();
3800 return transCreateNodeInfixOp(c, op, lhs, rhs, .used);
3801 }
3802 // worst case
3803 // c: ++expr
3804 // zig: (blk: {
3805 // zig: const _ref = &expr;
3806 // zig: _ref.* += 1;
3807 // zig: break :blk _ref.*
3808 // zig: })
3809 var block_scope = try Scope.Block.init(c, scope, true);
3810 defer block_scope.deinit();
3811
3812 const ref = try block_scope.reserveMangledName(c, "ref");
3813 const expr = try transExpr(c, &block_scope.base, op_expr, .used);
3814 const addr_of = try Tag.address_of.create(c.arena, expr);
3815 const ref_decl = try Tag.var_simple.create(c.arena, .{ .name = ref, .init = addr_of });
3816 try block_scope.statements.append(ref_decl);
3817
3818 const lhs_node = try Tag.identifier.create(c.arena, ref);
3819 const ref_node = try Tag.deref.create(c.arena, lhs_node);
3820 const node = try transCreateNodeInfixOp(c, op, ref_node, Tag.one_literal.init(), .used);
3821 try block_scope.statements.append(node);
3822
3823 const break_node = try Tag.break_val.create(c.arena, .{
3824 .label = block_scope.label,
3825 .val = ref_node,
3826 });
3827 try block_scope.statements.append(break_node);
3828 return block_scope.complete(c);
3829}
3830
3831fn transCreatePostCrement(
3832 c: *Context,
3833 scope: *Scope,
3834 stmt: *const clang.UnaryOperator,
3835 op: Tag,
3836 used: ResultUsed,
3837) TransError!Node {
3838 const op_expr = stmt.getSubExpr();
3839
3840 if (used == .unused) {
3841 // common case
3842 // c: expr++
3843 // zig: expr += 1
3844 const lhs = try transExpr(c, scope, op_expr, .used);
3845 const rhs = Tag.one_literal.init();
3846 return transCreateNodeInfixOp(c, op, lhs, rhs, .used);
3847 }
3848 // worst case
3849 // c: expr++
3850 // zig: (blk: {
3851 // zig: const _ref = &expr;
3852 // zig: const _tmp = _ref.*;
3853 // zig: _ref.* += 1;
3854 // zig: break :blk _tmp
3855 // zig: })
3856 var block_scope = try Scope.Block.init(c, scope, true);
3857 defer block_scope.deinit();
3858 const ref = try block_scope.reserveMangledName(c, "ref");
3859 const tmp = try block_scope.reserveMangledName(c, "tmp");
3860
3861 const expr = try transExpr(c, &block_scope.base, op_expr, .used);
3862 const addr_of = try Tag.address_of.create(c.arena, expr);
3863 const ref_decl = try Tag.var_simple.create(c.arena, .{ .name = ref, .init = addr_of });
3864 try block_scope.statements.append(ref_decl);
3865
3866 const lhs_node = try Tag.identifier.create(c.arena, ref);
3867 const ref_node = try Tag.deref.create(c.arena, lhs_node);
3868
3869 const tmp_decl = try Tag.var_simple.create(c.arena, .{ .name = tmp, .init = ref_node });
3870 try block_scope.statements.append(tmp_decl);
3871
3872 const node = try transCreateNodeInfixOp(c, op, ref_node, Tag.one_literal.init(), .used);
3873 try block_scope.statements.append(node);
3874
3875 const break_node = try Tag.break_val.create(c.arena, .{
3876 .label = block_scope.label,
3877 .val = try Tag.identifier.create(c.arena, tmp),
3878 });
3879 try block_scope.statements.append(break_node);
3880 return block_scope.complete(c);
3881}
3882
3883fn transCompoundAssignOperator(c: *Context, scope: *Scope, stmt: *const clang.CompoundAssignOperator, used: ResultUsed) TransError!Node {
3884 switch (stmt.getOpcode()) {
3885 .MulAssign => if (qualTypeHasWrappingOverflow(stmt.getType()))
3886 return transCreateCompoundAssign(c, scope, stmt, .mul_wrap_assign, used)
3887 else
3888 return transCreateCompoundAssign(c, scope, stmt, .mul_assign, used),
3889 .AddAssign => if (qualTypeHasWrappingOverflow(stmt.getType()))
3890 return transCreateCompoundAssign(c, scope, stmt, .add_wrap_assign, used)
3891 else
3892 return transCreateCompoundAssign(c, scope, stmt, .add_assign, used),
3893 .SubAssign => if (qualTypeHasWrappingOverflow(stmt.getType()))
3894 return transCreateCompoundAssign(c, scope, stmt, .sub_wrap_assign, used)
3895 else
3896 return transCreateCompoundAssign(c, scope, stmt, .sub_assign, used),
3897 .DivAssign => return transCreateCompoundAssign(c, scope, stmt, .div_assign, used),
3898 .RemAssign => return transCreateCompoundAssign(c, scope, stmt, .mod_assign, used),
3899 .ShlAssign => return transCreateCompoundAssign(c, scope, stmt, .shl_assign, used),
3900 .ShrAssign => return transCreateCompoundAssign(c, scope, stmt, .shr_assign, used),
3901 .AndAssign => return transCreateCompoundAssign(c, scope, stmt, .bit_and_assign, used),
3902 .XorAssign => return transCreateCompoundAssign(c, scope, stmt, .bit_xor_assign, used),
3903 .OrAssign => return transCreateCompoundAssign(c, scope, stmt, .bit_or_assign, used),
3904 else => return fail(
3905 c,
3906 error.UnsupportedTranslation,
3907 stmt.getBeginLoc(),
3908 "unsupported C translation {}",
3909 .{stmt.getOpcode()},
3910 ),
3911 }
3912}
3913
3914fn transCreateCompoundAssign(
3915 c: *Context,
3916 scope: *Scope,
3917 stmt: *const clang.CompoundAssignOperator,
3918 op: Tag,
3919 used: ResultUsed,
3920) TransError!Node {
3921 const is_shift = op == .shl_assign or op == .shr_assign;
3922 const is_div = op == .div_assign;
3923 const is_mod = op == .mod_assign;
3924 const lhs = stmt.getLHS();
3925 const rhs = stmt.getRHS();
3926 const loc = stmt.getBeginLoc();
3927 const lhs_qt = getExprQualType(c, lhs);
3928 const rhs_qt = getExprQualType(c, rhs);
3929 const is_signed = cIsSignedInteger(lhs_qt);
3930 const is_ptr_arithmetic = qualTypeIsPtr(lhs_qt) and cIsInteger(rhs_qt);
3931 const is_ptr_op_signed = qualTypeIsPtr(lhs_qt) and cIsSignedInteger(rhs_qt);
3932 const requires_cast = !lhs_qt.eq(rhs_qt) and !is_ptr_arithmetic;
3933
3934 if (used == .unused) {
3935 // common case
3936 // c: lhs += rhs
3937 // zig: lhs += rhs
3938 const lhs_node = try transExpr(c, scope, lhs, .used);
3939 var rhs_node = try transExpr(c, scope, rhs, .used);
3940 if (is_ptr_op_signed) rhs_node = try usizeCastForWrappingPtrArithmetic(c.arena, rhs_node);
3941
3942 if ((is_mod or is_div) and is_signed) {
3943 if (requires_cast) rhs_node = try transCCast(c, scope, loc, lhs_qt, rhs_qt, rhs_node);
3944 const operands: @FieldType(ast.Payload.BinOp, "data") = .{ .lhs = lhs_node, .rhs = rhs_node };
3945 const builtin = if (is_mod)
3946 try Tag.signed_remainder.create(c.arena, operands)
3947 else
3948 try Tag.div_trunc.create(c.arena, operands);
3949
3950 return transCreateNodeInfixOp(c, .assign, lhs_node, builtin, .used);
3951 }
3952
3953 if (is_shift) {
3954 rhs_node = try Tag.int_cast.create(c.arena, rhs_node);
3955 } else if (requires_cast) {
3956 rhs_node = try transCCast(c, scope, loc, lhs_qt, rhs_qt, rhs_node);
3957 }
3958 return transCreateNodeInfixOp(c, op, lhs_node, rhs_node, .used);
3959 }
3960 // worst case
3961 // c: lhs += rhs
3962 // zig: (blk: {
3963 // zig: const _ref = &lhs;
3964 // zig: _ref.* += rhs;
3965 // zig: break :blk _ref.*
3966 // zig: })
3967 var block_scope = try Scope.Block.init(c, scope, true);
3968 defer block_scope.deinit();
3969 const ref = try block_scope.reserveMangledName(c, "ref");
3970
3971 const expr = try transExpr(c, &block_scope.base, lhs, .used);
3972 const addr_of = try Tag.address_of.create(c.arena, expr);
3973 const ref_decl = try Tag.var_simple.create(c.arena, .{ .name = ref, .init = addr_of });
3974 try block_scope.statements.append(ref_decl);
3975
3976 const lhs_node = try Tag.identifier.create(c.arena, ref);
3977 const ref_node = try Tag.deref.create(c.arena, lhs_node);
3978
3979 var rhs_node = try transExpr(c, &block_scope.base, rhs, .used);
3980 if (is_ptr_op_signed) rhs_node = try usizeCastForWrappingPtrArithmetic(c.arena, rhs_node);
3981 if ((is_mod or is_div) and is_signed) {
3982 if (requires_cast) rhs_node = try transCCast(c, scope, loc, lhs_qt, rhs_qt, rhs_node);
3983 const operands: @FieldType(ast.Payload.BinOp, "data") = .{ .lhs = ref_node, .rhs = rhs_node };
3984 const builtin = if (is_mod)
3985 try Tag.signed_remainder.create(c.arena, operands)
3986 else
3987 try Tag.div_trunc.create(c.arena, operands);
3988
3989 const assign = try transCreateNodeInfixOp(c, .assign, ref_node, builtin, .used);
3990 try block_scope.statements.append(assign);
3991 } else {
3992 if (is_shift) {
3993 rhs_node = try Tag.int_cast.create(c.arena, rhs_node);
3994 } else if (requires_cast) {
3995 rhs_node = try transCCast(c, &block_scope.base, loc, lhs_qt, rhs_qt, rhs_node);
3996 }
3997
3998 const assign = try transCreateNodeInfixOp(c, op, ref_node, rhs_node, .used);
3999 try block_scope.statements.append(assign);
4000 }
4001
4002 const break_node = try Tag.break_val.create(c.arena, .{
4003 .label = block_scope.label,
4004 .val = ref_node,
4005 });
4006 try block_scope.statements.append(break_node);
4007 return block_scope.complete(c);
4008}
4009
4010fn removeCVQualifiers(c: *Context, dst_type_node: Node, expr: Node) Error!Node {
4011 const volatile_casted = try Tag.volatile_cast.create(c.arena, expr);
4012 const const_casted = try Tag.const_cast.create(c.arena, volatile_casted);
4013 return Tag.as.create(c.arena, .{
4014 .lhs = dst_type_node,
4015 .rhs = try Tag.ptr_cast.create(c.arena, const_casted),
4016 });
4017}
4018
4019fn transCPtrCast(
4020 c: *Context,
4021 scope: *Scope,
4022 loc: clang.SourceLocation,
4023 dst_type: clang.QualType,
4024 src_type: clang.QualType,
4025 expr: Node,
4026) !Node {
4027 const ty = dst_type.getTypePtr();
4028 const child_type = ty.getPointeeType();
4029 const src_ty = src_type.getTypePtr();
4030 const src_child_type = src_ty.getPointeeType();
4031 const dst_type_node = try transType(c, scope, ty, loc);
4032
4033 if (!src_ty.isArrayType() and ((src_child_type.isConstQualified() and
4034 !child_type.isConstQualified()) or
4035 (src_child_type.isVolatileQualified() and
4036 !child_type.isVolatileQualified())))
4037 {
4038 return removeCVQualifiers(c, dst_type_node, expr);
4039 } else {
4040 // Implicit downcasting from higher to lower alignment values is forbidden,
4041 // use @alignCast to side-step this problem
4042 const rhs = if (qualTypeCanon(child_type).isVoidType())
4043 // void has 1-byte alignment, so @alignCast is not needed
4044 expr
4045 else if (typeIsOpaque(c, qualTypeCanon(child_type), loc))
4046 // For opaque types a ptrCast is enough
4047 expr
4048 else blk: {
4049 break :blk try Tag.align_cast.create(c.arena, expr);
4050 };
4051 return Tag.as.create(c.arena, .{
4052 .lhs = dst_type_node,
4053 .rhs = try Tag.ptr_cast.create(c.arena, rhs),
4054 });
4055 }
4056}
4057
4058fn transFloatingLiteral(c: *Context, expr: *const clang.FloatingLiteral, used: ResultUsed) TransError!Node {
4059 // TODO use something more accurate than widening to a larger float type and printing that result
4060 switch (expr.getRawSemantics()) {
4061 .IEEEhalf, // f16
4062 .IEEEsingle, // f32
4063 .IEEEdouble, // f64
4064 => {
4065 var dbl = expr.getValueAsApproximateDouble();
4066 const is_negative = dbl < 0; // -0.0 is considered non-negative
4067 if (is_negative) dbl = -dbl;
4068 const str = if (dbl == @floor(dbl))
4069 try std.fmt.allocPrint(c.arena, "{d}.0", .{dbl})
4070 else
4071 try std.fmt.allocPrint(c.arena, "{d}", .{dbl});
4072 var node = try Tag.float_literal.create(c.arena, str);
4073 if (is_negative) node = try Tag.negate.create(c.arena, node);
4074 return maybeSuppressResult(c, used, node);
4075 },
4076 .x87DoubleExtended, // f80
4077 .IEEEquad, // f128
4078 => return transFloatingLiteralQuad(c, expr, used),
4079 else => |format| return fail(
4080 c,
4081 error.UnsupportedTranslation,
4082 expr.getBeginLoc(),
4083 "unsupported floating point constant format {}",
4084 .{format},
4085 ),
4086 }
4087}
4088
4089fn transFloatingLiteralQuad(c: *Context, expr: *const clang.FloatingLiteral, used: ResultUsed) TransError!Node {
4090 assert(switch (expr.getRawSemantics()) {
4091 .x87DoubleExtended, .IEEEquad => true,
4092 else => false,
4093 });
4094
4095 var low: u64 = undefined;
4096 var high: u64 = undefined;
4097 expr.getValueAsApproximateQuadBits(&low, &high);
4098 var quad: f128 = @bitCast(low | @as(u128, high) << 64);
4099 const is_negative = quad < 0; // -0.0 is considered non-negative
4100 if (is_negative) quad = -quad;
4101
4102 // TODO implement decimal format for f128 <https://github.com/ziglang/zig/issues/1181>
4103 // in the meantime, if the value can be roundtripped by casting it to f64, serializing it to
4104 // the decimal format and parsing it back as the exact same f128 value, then use that serialized form
4105 const str = fmt_decimal: {
4106 var buf: [512]u8 = undefined; // should be large enough to print any f64 in decimal form
4107 const dbl: f64 = @floatCast(quad);
4108 const temp_str = if (dbl == @floor(dbl))
4109 std.fmt.bufPrint(&buf, "{d}.0", .{dbl}) catch |err| switch (err) {
4110 error.NoSpaceLeft => unreachable,
4111 }
4112 else
4113 std.fmt.bufPrint(&buf, "{d}", .{dbl}) catch |err| switch (err) {
4114 error.NoSpaceLeft => unreachable,
4115 };
4116 const could_roundtrip = if (std.fmt.parseFloat(f128, temp_str)) |parsed_quad|
4117 quad == parsed_quad
4118 else |_|
4119 false;
4120 break :fmt_decimal if (could_roundtrip) try c.arena.dupe(u8, temp_str) else null;
4121 }
4122 // otherwise, fall back to the hexadecimal format
4123 orelse try std.fmt.allocPrint(c.arena, "{x}", .{quad});
4124
4125 var node = try Tag.float_literal.create(c.arena, str);
4126 if (is_negative) node = try Tag.negate.create(c.arena, node);
4127 return maybeSuppressResult(c, used, node);
4128}
4129
4130fn transBinaryConditionalOperator(c: *Context, scope: *Scope, stmt: *const clang.BinaryConditionalOperator, used: ResultUsed) TransError!Node {
4131 // GNU extension of the ternary operator where the middle expression is
4132 // omitted, the condition itself is returned if it evaluates to true
4133 const qt = @as(*const clang.Expr, @ptrCast(stmt)).getType();
4134 const res_is_bool = qualTypeIsBoolean(qt);
4135 const casted_stmt = @as(*const clang.AbstractConditionalOperator, @ptrCast(stmt));
4136 const cond_expr = casted_stmt.getCond();
4137 const false_expr = casted_stmt.getFalseExpr();
4138
4139 // c: (cond_expr)?:(false_expr)
4140 // zig: (blk: {
4141 // const _cond_temp = (cond_expr);
4142 // break :blk if (_cond_temp) _cond_temp else (false_expr);
4143 // })
4144 var block_scope = try Scope.Block.init(c, scope, true);
4145 defer block_scope.deinit();
4146
4147 const cond_temp = try block_scope.reserveMangledName(c, "cond_temp");
4148 const init_node = try transExpr(c, &block_scope.base, cond_expr, .used);
4149 const ref_decl = try Tag.var_simple.create(c.arena, .{ .name = cond_temp, .init = init_node });
4150 try block_scope.statements.append(ref_decl);
4151
4152 var cond_scope = Scope.Condition{
4153 .base = .{
4154 .parent = &block_scope.base,
4155 .id = .condition,
4156 },
4157 };
4158 defer cond_scope.deinit();
4159
4160 const cond_ident = try Tag.identifier.create(c.arena, cond_temp);
4161 const ty = getExprQualType(c, cond_expr).getTypePtr();
4162 const cond_node = try finishBoolExpr(c, &cond_scope.base, cond_expr.getBeginLoc(), ty, cond_ident, .used);
4163 var then_body = cond_ident;
4164 if (!res_is_bool and isBoolRes(init_node)) {
4165 then_body = try Tag.int_from_bool.create(c.arena, then_body);
4166 }
4167
4168 var else_body = try transExpr(c, &block_scope.base, false_expr, .used);
4169 if (!res_is_bool and isBoolRes(else_body)) {
4170 else_body = try Tag.int_from_bool.create(c.arena, else_body);
4171 }
4172 const if_node = try Tag.@"if".create(c.arena, .{
4173 .cond = cond_node,
4174 .then = then_body,
4175 .@"else" = else_body,
4176 });
4177 const break_node = try Tag.break_val.create(c.arena, .{
4178 .label = block_scope.label,
4179 .val = if_node,
4180 });
4181 try block_scope.statements.append(break_node);
4182 const res = try block_scope.complete(c);
4183 return maybeSuppressResult(c, used, res);
4184}
4185
4186fn transConditionalOperator(c: *Context, scope: *Scope, stmt: *const clang.ConditionalOperator, used: ResultUsed) TransError!Node {
4187 var cond_scope = Scope.Condition{
4188 .base = .{
4189 .parent = scope,
4190 .id = .condition,
4191 },
4192 };
4193 defer cond_scope.deinit();
4194
4195 const qt = @as(*const clang.Expr, @ptrCast(stmt)).getType();
4196 const res_is_bool = qualTypeIsBoolean(qt);
4197 const casted_stmt = @as(*const clang.AbstractConditionalOperator, @ptrCast(stmt));
4198 const cond_expr = casted_stmt.getCond();
4199 const true_expr = casted_stmt.getTrueExpr();
4200 const false_expr = casted_stmt.getFalseExpr();
4201
4202 const cond = try transBoolExpr(c, &cond_scope.base, cond_expr, .used);
4203
4204 var then_body = try transExpr(c, scope, true_expr, used);
4205 if (!res_is_bool and isBoolRes(then_body)) {
4206 then_body = try Tag.int_from_bool.create(c.arena, then_body);
4207 }
4208
4209 var else_body = try transExpr(c, scope, false_expr, used);
4210 if (!res_is_bool and isBoolRes(else_body)) {
4211 else_body = try Tag.int_from_bool.create(c.arena, else_body);
4212 }
4213
4214 const if_node = try Tag.@"if".create(c.arena, .{
4215 .cond = cond,
4216 .then = then_body,
4217 .@"else" = else_body,
4218 });
4219 // Clang inserts ImplicitCast(ToVoid)'s to both rhs and lhs so we don't need to suppress the result here.
4220 return if_node;
4221}
4222
4223fn maybeSuppressResult(c: *Context, used: ResultUsed, result: Node) TransError!Node {
4224 if (used == .used) return result;
4225 return Tag.discard.create(c.arena, .{ .should_skip = false, .value = result });
4226}
4227
4228fn addTopLevelDecl(c: *Context, name: []const u8, decl_node: Node) !void {
4229 const gop = try c.global_scope.sym_table.getOrPut(name);
4230 if (!gop.found_existing) {
4231 gop.value_ptr.* = decl_node;
4232 try c.global_scope.nodes.append(decl_node);
4233 }
4234}
4235
4236/// Add an "extern" function prototype declaration that's been declared within a scoped block.
4237/// Similar to static local variables, this will be wrapped in a struct to work with Zig's syntax requirements.
4238///
4239fn addLocalExternFnDecl(c: *Context, scope: *Scope, name: []const u8, decl_node: Node) !void {
4240 const bs: *Scope.Block = try scope.findBlockScope(c);
4241
4242 // Special naming convention for local extern function wrapper struct,
4243 // this named "ExternLocal_[name]".
4244 const struct_name = try std.fmt.allocPrint(c.arena, "{s}_{s}", .{ Scope.Block.extern_inner_prepend, name });
4245
4246 // Outer Node for the wrapper struct
4247 const node = try Tag.extern_local_fn.create(c.arena, .{ .name = struct_name, .init = decl_node });
4248
4249 try bs.statements.append(node);
4250 try bs.discardVariable(c, struct_name);
4251}
4252
4253fn transQualTypeInitializedStringLiteral(c: *Context, elem_ty: Node, string_lit: *const clang.StringLiteral) TypeError!Node {
4254 const string_lit_size = string_lit.getLength();
4255 const array_size = @as(usize, @intCast(string_lit_size));
4256
4257 // incomplete array initialized with empty string, will be translated as [1]T{0}
4258 // see https://github.com/ziglang/zig/issues/8256
4259 if (array_size == 0) return Tag.array_type.create(c.arena, .{ .len = 1, .elem_type = elem_ty });
4260
4261 return Tag.null_sentinel_array_type.create(c.arena, .{ .len = array_size, .elem_type = elem_ty });
4262}
4263
4264/// Translate a qualtype for a variable with an initializer. This only matters
4265/// for incomplete arrays, since the initializer determines the size of the array.
4266fn transQualTypeInitialized(
4267 c: *Context,
4268 scope: *Scope,
4269 qt: clang.QualType,
4270 decl_init: *const clang.Expr,
4271 source_loc: clang.SourceLocation,
4272) TypeError!Node {
4273 const ty = qt.getTypePtr();
4274 if (ty.getTypeClass() == .IncompleteArray) {
4275 const incomplete_array_ty = @as(*const clang.IncompleteArrayType, @ptrCast(ty));
4276 const elem_ty = try transType(c, scope, incomplete_array_ty.getElementType().getTypePtr(), source_loc);
4277
4278 switch (decl_init.getStmtClass()) {
4279 .StringLiteralClass => {
4280 const string_lit = @as(*const clang.StringLiteral, @ptrCast(decl_init));
4281 return transQualTypeInitializedStringLiteral(c, elem_ty, string_lit);
4282 },
4283 .InitListExprClass => {
4284 const init_expr = @as(*const clang.InitListExpr, @ptrCast(decl_init));
4285 const size = init_expr.getNumInits();
4286
4287 if (init_expr.isStringLiteralInit()) {
4288 assert(size == 1);
4289 const string_lit = init_expr.getInit(0).castToStringLiteral().?;
4290 return transQualTypeInitializedStringLiteral(c, elem_ty, string_lit);
4291 }
4292
4293 return Tag.array_type.create(c.arena, .{ .len = size, .elem_type = elem_ty });
4294 },
4295 else => {},
4296 }
4297 }
4298 return transQualType(c, scope, qt, source_loc);
4299}
4300
4301fn transQualType(c: *Context, scope: *Scope, qt: clang.QualType, source_loc: clang.SourceLocation) TypeError!Node {
4302 return transType(c, scope, qt.getTypePtr(), source_loc);
4303}
4304
4305/// Produces a Zig AST node by translating a Clang QualType, respecting the width, but modifying the signed-ness.
4306/// Asserts the type is an integer.
4307fn transQualTypeIntWidthOf(c: *Context, ty: clang.QualType, is_signed: bool) TypeError!Node {
4308 return transTypeIntWidthOf(c, qualTypeCanon(ty), is_signed);
4309}
4310
4311/// Produces a Zig AST node by translating a Clang Type, respecting the width, but modifying the signed-ness.
4312/// Asserts the type is an integer.
4313fn transTypeIntWidthOf(c: *Context, ty: *const clang.Type, is_signed: bool) TypeError!Node {
4314 assert(ty.getTypeClass() == .Builtin);
4315 const builtin_ty = @as(*const clang.BuiltinType, @ptrCast(ty));
4316 return Tag.type.create(c.arena, switch (builtin_ty.getKind()) {
4317 .Char_U, .Char_S, .UChar, .SChar, .Char8 => if (is_signed) "i8" else "u8",
4318 .UShort, .Short => if (is_signed) "c_short" else "c_ushort",
4319 .UInt, .Int => if (is_signed) "c_int" else "c_uint",
4320 .ULong, .Long => if (is_signed) "c_long" else "c_ulong",
4321 .ULongLong, .LongLong => if (is_signed) "c_longlong" else "c_ulonglong",
4322 .UInt128, .Int128 => if (is_signed) "i128" else "u128",
4323 .Char16 => if (is_signed) "i16" else "u16",
4324 .Char32 => if (is_signed) "i32" else "u32",
4325 else => unreachable, // only call this function when it has already been determined the type is int
4326 });
4327}
4328
4329fn isCBuiltinType(qt: clang.QualType, kind: clang.BuiltinTypeKind) bool {
4330 const c_type = qualTypeCanon(qt);
4331 if (c_type.getTypeClass() != .Builtin)
4332 return false;
4333 const builtin_ty = @as(*const clang.BuiltinType, @ptrCast(c_type));
4334 return builtin_ty.getKind() == kind;
4335}
4336
4337fn qualTypeIsPtr(qt: clang.QualType) bool {
4338 return qualTypeCanon(qt).getTypeClass() == .Pointer;
4339}
4340
4341fn qualTypeIsBoolean(qt: clang.QualType) bool {
4342 return qualTypeCanon(qt).isBooleanType();
4343}
4344
4345fn qualTypeIntBitWidth(c: *Context, qt: clang.QualType) !u32 {
4346 const ty = qt.getTypePtr();
4347
4348 switch (ty.getTypeClass()) {
4349 .Builtin => {
4350 const builtin_ty = @as(*const clang.BuiltinType, @ptrCast(ty));
4351
4352 switch (builtin_ty.getKind()) {
4353 .Char_U,
4354 .UChar,
4355 .Char_S,
4356 .SChar,
4357 => return 8,
4358 .UInt128,
4359 .Int128,
4360 => return 128,
4361 else => return 0,
4362 }
4363
4364 unreachable;
4365 },
4366 .Typedef => {
4367 const typedef_ty = @as(*const clang.TypedefType, @ptrCast(ty));
4368 const typedef_decl = typedef_ty.getDecl();
4369 const type_name = try c.str(@as(*const clang.NamedDecl, @ptrCast(typedef_decl)).getName_bytes_begin());
4370
4371 if (mem.eql(u8, type_name, "uint8_t") or mem.eql(u8, type_name, "int8_t")) {
4372 return 8;
4373 } else if (mem.eql(u8, type_name, "uint16_t") or mem.eql(u8, type_name, "int16_t")) {
4374 return 16;
4375 } else if (mem.eql(u8, type_name, "uint32_t") or mem.eql(u8, type_name, "int32_t")) {
4376 return 32;
4377 } else if (mem.eql(u8, type_name, "uint64_t") or mem.eql(u8, type_name, "int64_t")) {
4378 return 64;
4379 } else {
4380 return 0;
4381 }
4382 },
4383 else => return 0,
4384 }
4385}
4386
4387fn qualTypeChildIsFnProto(qt: clang.QualType) bool {
4388 const ty = qualTypeCanon(qt);
4389
4390 switch (ty.getTypeClass()) {
4391 .FunctionProto, .FunctionNoProto => return true,
4392 else => return false,
4393 }
4394}
4395
4396fn qualTypeCanon(qt: clang.QualType) *const clang.Type {
4397 const canon = qt.getCanonicalType();
4398 return canon.getTypePtr();
4399}
4400
4401fn getExprQualType(c: *Context, expr: *const clang.Expr) clang.QualType {
4402 blk: {
4403 // If this is a C `char *`, turn it into a `const char *`
4404 if (expr.getStmtClass() != .ImplicitCastExprClass) break :blk;
4405 const cast_expr = @as(*const clang.ImplicitCastExpr, @ptrCast(expr));
4406 if (cast_expr.getCastKind() != .ArrayToPointerDecay) break :blk;
4407 const sub_expr = cast_expr.getSubExpr();
4408 if (sub_expr.getStmtClass() != .StringLiteralClass) break :blk;
4409 const array_qt = sub_expr.getType();
4410 const array_type = @as(*const clang.ArrayType, @ptrCast(array_qt.getTypePtr()));
4411 var pointee_qt = array_type.getElementType();
4412 pointee_qt.addConst();
4413 return c.clang_context.getPointerType(pointee_qt);
4414 }
4415 return expr.getType();
4416}
4417
4418fn typeIsOpaque(c: *Context, ty: *const clang.Type, loc: clang.SourceLocation) bool {
4419 switch (ty.getTypeClass()) {
4420 .Builtin => {
4421 const builtin_ty = @as(*const clang.BuiltinType, @ptrCast(ty));
4422 return builtin_ty.getKind() == .Void;
4423 },
4424 .Record => {
4425 const record_ty = @as(*const clang.RecordType, @ptrCast(ty));
4426 const record_decl = record_ty.getDecl();
4427 const record_def = record_decl.getDefinition() orelse
4428 return true;
4429 var it = record_def.field_begin();
4430 const end_it = record_def.field_end();
4431 while (it.neq(end_it)) : (it = it.next()) {
4432 const field_decl = it.deref();
4433
4434 if (field_decl.isBitField()) {
4435 return true;
4436 }
4437 }
4438 return false;
4439 },
4440 .Elaborated => {
4441 const elaborated_ty = @as(*const clang.ElaboratedType, @ptrCast(ty));
4442 const qt = elaborated_ty.getNamedType();
4443 return typeIsOpaque(c, qt.getTypePtr(), loc);
4444 },
4445 .Typedef => {
4446 const typedef_ty = @as(*const clang.TypedefType, @ptrCast(ty));
4447 const typedef_decl = typedef_ty.getDecl();
4448 const underlying_type = typedef_decl.getUnderlyingType();
4449 return typeIsOpaque(c, underlying_type.getTypePtr(), loc);
4450 },
4451 else => return false,
4452 }
4453}
4454
4455/// plain `char *` (not const; not explicitly signed or unsigned)
4456fn qualTypeIsCharStar(qt: clang.QualType) bool {
4457 if (qualTypeIsPtr(qt)) {
4458 const child_qt = qualTypeCanon(qt).getPointeeType();
4459 return cIsUnqualifiedChar(child_qt) and !child_qt.isConstQualified();
4460 }
4461 return false;
4462}
4463
4464/// C `char` without explicit signed or unsigned qualifier
4465fn cIsUnqualifiedChar(qt: clang.QualType) bool {
4466 const c_type = qualTypeCanon(qt);
4467 if (c_type.getTypeClass() != .Builtin) return false;
4468 const builtin_ty = @as(*const clang.BuiltinType, @ptrCast(c_type));
4469 return switch (builtin_ty.getKind()) {
4470 .Char_S, .Char_U => true,
4471 else => false,
4472 };
4473}
4474
4475fn cIsInteger(qt: clang.QualType) bool {
4476 return cIsSignedInteger(qt) or cIsUnsignedInteger(qt);
4477}
4478
4479fn cIsUnsignedInteger(qt: clang.QualType) bool {
4480 const c_type = qualTypeCanon(qt);
4481 if (c_type.getTypeClass() != .Builtin) return false;
4482 const builtin_ty = @as(*const clang.BuiltinType, @ptrCast(c_type));
4483 return switch (builtin_ty.getKind()) {
4484 .Char_U,
4485 .UChar,
4486 .Char_S,
4487 .UShort,
4488 .UInt,
4489 .ULong,
4490 .ULongLong,
4491 .UInt128,
4492 .WChar_U,
4493 => true,
4494 else => false,
4495 };
4496}
4497
4498fn cIntTypeToIndex(qt: clang.QualType) u8 {
4499 const c_type = qualTypeCanon(qt);
4500 assert(c_type.getTypeClass() == .Builtin);
4501 const builtin_ty = @as(*const clang.BuiltinType, @ptrCast(c_type));
4502 return switch (builtin_ty.getKind()) {
4503 .Bool, .Char_U, .Char_S, .UChar, .SChar, .Char8 => 1,
4504 .WChar_U, .WChar_S => 2,
4505 .UShort, .Short, .Char16 => 3,
4506 .UInt, .Int, .Char32 => 4,
4507 .ULong, .Long => 5,
4508 .ULongLong, .LongLong => 6,
4509 .UInt128, .Int128 => 7,
4510 else => unreachable,
4511 };
4512}
4513
4514fn cIntTypeCmp(a: clang.QualType, b: clang.QualType) math.Order {
4515 const a_index = cIntTypeToIndex(a);
4516 const b_index = cIntTypeToIndex(b);
4517 return math.order(a_index, b_index);
4518}
4519
4520/// Checks if expr is an integer literal >= 0
4521fn cIsNonNegativeIntLiteral(c: *Context, expr: *const clang.Expr) bool {
4522 if (@as(*const clang.Stmt, @ptrCast(expr)).getStmtClass() == .IntegerLiteralClass) {
4523 var signum: c_int = undefined;
4524 if (!(@as(*const clang.IntegerLiteral, @ptrCast(expr)).getSignum(&signum, c.clang_context))) {
4525 return false;
4526 }
4527 return signum >= 0;
4528 }
4529 return false;
4530}
4531
4532fn cIsSignedInteger(qt: clang.QualType) bool {
4533 const c_type = qualTypeCanon(qt);
4534 if (c_type.getTypeClass() != .Builtin) return false;
4535 const builtin_ty = @as(*const clang.BuiltinType, @ptrCast(c_type));
4536 return switch (builtin_ty.getKind()) {
4537 .SChar,
4538 .Short,
4539 .Int,
4540 .Long,
4541 .LongLong,
4542 .Int128,
4543 .WChar_S,
4544 => true,
4545 else => false,
4546 };
4547}
4548
4549fn cIsNativeInt(qt: clang.QualType) bool {
4550 const c_type = qualTypeCanon(qt);
4551 if (c_type.getTypeClass() != .Builtin) return false;
4552 const builtin_ty = @as(*const clang.BuiltinType, @ptrCast(c_type));
4553 return builtin_ty.getKind() == .Int;
4554}
4555
4556fn cIsFloating(qt: clang.QualType) bool {
4557 const c_type = qualTypeCanon(qt);
4558 if (c_type.getTypeClass() != .Builtin) return false;
4559 const builtin_ty = @as(*const clang.BuiltinType, @ptrCast(c_type));
4560 return switch (builtin_ty.getKind()) {
4561 .Float,
4562 .Double,
4563 .Float128,
4564 .LongDouble,
4565 => true,
4566 else => false,
4567 };
4568}
4569
4570fn cIsLongLongInteger(qt: clang.QualType) bool {
4571 const c_type = qualTypeCanon(qt);
4572 if (c_type.getTypeClass() != .Builtin) return false;
4573 const builtin_ty = @as(*const clang.BuiltinType, @ptrCast(c_type));
4574 return switch (builtin_ty.getKind()) {
4575 .LongLong, .ULongLong, .Int128, .UInt128 => true,
4576 else => false,
4577 };
4578}
4579fn transCreateNodeAssign(
4580 c: *Context,
4581 scope: *Scope,
4582 result_used: ResultUsed,
4583 lhs: *const clang.Expr,
4584 rhs: *const clang.Expr,
4585) !Node {
4586 // common case
4587 // c: lhs = rhs
4588 // zig: lhs = rhs
4589 if (result_used == .unused) {
4590 const lhs_node = try transExpr(c, scope, lhs, .used);
4591 var rhs_node = try transExprCoercing(c, scope, rhs, .used);
4592 if (!exprIsBooleanType(lhs) and isBoolRes(rhs_node)) {
4593 rhs_node = try Tag.int_from_bool.create(c.arena, rhs_node);
4594 }
4595 return transCreateNodeInfixOp(c, .assign, lhs_node, rhs_node, .used);
4596 }
4597
4598 // worst case
4599 // c: lhs = rhs
4600 // zig: (blk: {
4601 // zig: const _tmp = rhs;
4602 // zig: lhs = _tmp;
4603 // zig: break :blk _tmp
4604 // zig: })
4605 var block_scope = try Scope.Block.init(c, scope, true);
4606 defer block_scope.deinit();
4607
4608 const tmp = try block_scope.reserveMangledName(c, "tmp");
4609 var rhs_node = try transExpr(c, &block_scope.base, rhs, .used);
4610 if (!exprIsBooleanType(lhs) and isBoolRes(rhs_node)) {
4611 rhs_node = try Tag.int_from_bool.create(c.arena, rhs_node);
4612 }
4613
4614 const tmp_decl = try Tag.var_simple.create(c.arena, .{ .name = tmp, .init = rhs_node });
4615 try block_scope.statements.append(tmp_decl);
4616
4617 const lhs_node = try transExpr(c, &block_scope.base, lhs, .used);
4618 const tmp_ident = try Tag.identifier.create(c.arena, tmp);
4619 const assign = try transCreateNodeInfixOp(c, .assign, lhs_node, tmp_ident, .used);
4620 try block_scope.statements.append(assign);
4621
4622 const break_node = try Tag.break_val.create(c.arena, .{
4623 .label = block_scope.label,
4624 .val = tmp_ident,
4625 });
4626 try block_scope.statements.append(break_node);
4627 return block_scope.complete(c);
4628}
4629
4630fn transCreateNodeInfixOp(
4631 c: *Context,
4632 op: Tag,
4633 lhs: Node,
4634 rhs: Node,
4635 used: ResultUsed,
4636) !Node {
4637 const payload = try c.arena.create(ast.Payload.BinOp);
4638 payload.* = .{
4639 .base = .{ .tag = op },
4640 .data = .{
4641 .lhs = lhs,
4642 .rhs = rhs,
4643 },
4644 };
4645 return maybeSuppressResult(c, used, Node.initPayload(&payload.base));
4646}
4647
4648fn transCreateNodeBoolInfixOp(
4649 c: *Context,
4650 scope: *Scope,
4651 stmt: *const clang.BinaryOperator,
4652 op: Tag,
4653 used: ResultUsed,
4654) !Node {
4655 std.debug.assert(op == .@"and" or op == .@"or");
4656
4657 const lhs = try transBoolExpr(c, scope, stmt.getLHS(), .used);
4658 const rhs = try transBoolExpr(c, scope, stmt.getRHS(), .used);
4659
4660 return transCreateNodeInfixOp(c, op, lhs, rhs, used);
4661}
4662
4663fn transCreateNodeAPInt(c: *Context, int: *const clang.APSInt) !Node {
4664 const num_limbs = math.cast(usize, int.getNumWords()) orelse return error.OutOfMemory;
4665 var aps_int = int;
4666 const is_negative = int.isSigned() and int.isNegative();
4667 if (is_negative) aps_int = aps_int.negate();
4668 defer if (is_negative) {
4669 aps_int.free();
4670 };
4671
4672 const limbs = try c.arena.alloc(math.big.Limb, num_limbs);
4673 defer c.arena.free(limbs);
4674
4675 const data = aps_int.getRawData();
4676 switch (@sizeOf(math.big.Limb)) {
4677 8 => {
4678 var i: usize = 0;
4679 while (i < num_limbs) : (i += 1) {
4680 limbs[i] = data[i];
4681 }
4682 },
4683 4 => {
4684 var limb_i: usize = 0;
4685 var data_i: usize = 0;
4686 while (limb_i < num_limbs) : ({
4687 limb_i += 2;
4688 data_i += 1;
4689 }) {
4690 limbs[limb_i] = @as(u32, @truncate(data[data_i]));
4691 limbs[limb_i + 1] = @as(u32, @truncate(data[data_i] >> 32));
4692 }
4693 },
4694 else => @compileError("unimplemented"),
4695 }
4696
4697 const big: math.big.int.Const = .{ .limbs = limbs, .positive = true };
4698 const str = big.toStringAlloc(c.arena, 10, .lower) catch |err| switch (err) {
4699 error.OutOfMemory => return error.OutOfMemory,
4700 };
4701 const res = try Tag.integer_literal.create(c.arena, str);
4702 if (is_negative) return Tag.negate.create(c.arena, res);
4703 return res;
4704}
4705
4706fn transCreateNodeNumber(c: *Context, num: anytype, num_kind: enum { int, float }) !Node {
4707 const fmt_s = switch (@typeInfo(@TypeOf(num))) {
4708 .int, .comptime_int => "{d}",
4709 else => "{s}",
4710 };
4711 const str = try std.fmt.allocPrint(c.arena, fmt_s, .{num});
4712 if (num_kind == .float)
4713 return Tag.float_literal.create(c.arena, str)
4714 else
4715 return Tag.integer_literal.create(c.arena, str);
4716}
4717
4718fn transCreateNodeMacroFn(c: *Context, name: []const u8, ref: Node, proto_alias: *ast.Payload.Func) !Node {
4719 var fn_params = std.array_list.Managed(ast.Payload.Param).init(c.gpa);
4720 defer fn_params.deinit();
4721
4722 for (proto_alias.data.params) |param| {
4723 const param_name = param.name orelse
4724 try std.fmt.allocPrint(c.arena, "arg_{d}", .{c.getMangle()});
4725
4726 try fn_params.append(.{
4727 .name = param_name,
4728 .type = param.type,
4729 .is_noalias = param.is_noalias,
4730 });
4731 }
4732
4733 const init = if (ref.castTag(.var_decl)) |v|
4734 v.data.init.?
4735 else if (ref.castTag(.var_simple) orelse ref.castTag(.pub_var_simple)) |v|
4736 v.data.init
4737 else
4738 unreachable;
4739
4740 const unwrap_expr = try Tag.unwrap.create(c.arena, init);
4741 const args = try c.arena.alloc(Node, fn_params.items.len);
4742 for (fn_params.items, 0..) |param, i| {
4743 args[i] = try Tag.identifier.create(c.arena, param.name.?);
4744 }
4745 const call_expr = try Tag.call.create(c.arena, .{
4746 .lhs = unwrap_expr,
4747 .args = args,
4748 });
4749 const return_expr = try Tag.@"return".create(c.arena, call_expr);
4750 const block = try Tag.block_single.create(c.arena, return_expr);
4751
4752 return Tag.pub_inline_fn.create(c.arena, .{
4753 .name = name,
4754 .params = try c.arena.dupe(ast.Payload.Param, fn_params.items),
4755 .return_type = proto_alias.data.return_type,
4756 .body = block,
4757 });
4758}
4759
4760fn transCreateNodeShiftOp(
4761 c: *Context,
4762 scope: *Scope,
4763 stmt: *const clang.BinaryOperator,
4764 op: Tag,
4765 used: ResultUsed,
4766) !Node {
4767 std.debug.assert(op == .shl or op == .shr);
4768
4769 const lhs_expr = stmt.getLHS();
4770 const rhs_expr = stmt.getRHS();
4771 // lhs >> @as(u5, rh)
4772
4773 const lhs = try transExpr(c, scope, lhs_expr, .used);
4774
4775 const rhs = try transExprCoercing(c, scope, rhs_expr, .used);
4776 const rhs_casted = try Tag.int_cast.create(c.arena, rhs);
4777
4778 return transCreateNodeInfixOp(c, op, lhs, rhs_casted, used);
4779}
4780
4781fn transType(c: *Context, scope: *Scope, ty: *const clang.Type, source_loc: clang.SourceLocation) TypeError!Node {
4782 switch (ty.getTypeClass()) {
4783 .Builtin => {
4784 const builtin_ty = @as(*const clang.BuiltinType, @ptrCast(ty));
4785 return Tag.type.create(c.arena, switch (builtin_ty.getKind()) {
4786 .Void => "anyopaque",
4787 .Bool => "bool",
4788 .Char_U, .UChar, .Char_S, .Char8 => "u8",
4789 .SChar => "i8",
4790 .UShort => "c_ushort",
4791 .UInt => "c_uint",
4792 .ULong => "c_ulong",
4793 .ULongLong => "c_ulonglong",
4794 .Short => "c_short",
4795 .Int => "c_int",
4796 .Long => "c_long",
4797 .LongLong => "c_longlong",
4798 .UInt128 => "u128",
4799 .Int128 => "i128",
4800 .Float => "f32",
4801 .Double => "f64",
4802 .Float128 => "f128",
4803 .Float16 => "f16",
4804 .LongDouble => "c_longdouble",
4805 else => return fail(c, error.UnsupportedType, source_loc, "unsupported builtin type", .{}),
4806 });
4807 },
4808 .FunctionProto => {
4809 const fn_proto_ty = @as(*const clang.FunctionProtoType, @ptrCast(ty));
4810 const fn_proto = try transFnProto(c, null, fn_proto_ty, source_loc, null, false);
4811 return Node.initPayload(&fn_proto.base);
4812 },
4813 .FunctionNoProto => {
4814 const fn_no_proto_ty = @as(*const clang.FunctionType, @ptrCast(ty));
4815 const fn_proto = try transFnNoProto(c, fn_no_proto_ty, source_loc, null, false);
4816 return Node.initPayload(&fn_proto.base);
4817 },
4818 .Paren => {
4819 const paren_ty = @as(*const clang.ParenType, @ptrCast(ty));
4820 return transQualType(c, scope, paren_ty.getInnerType(), source_loc);
4821 },
4822 .Pointer => {
4823 const child_qt = ty.getPointeeType();
4824 const is_fn_proto = qualTypeChildIsFnProto(child_qt);
4825 const is_const = is_fn_proto or child_qt.isConstQualified();
4826 const is_volatile = child_qt.isVolatileQualified();
4827 const elem_type = try transQualType(c, scope, child_qt, source_loc);
4828 const ptr_info: @FieldType(ast.Payload.Pointer, "data") = .{
4829 .is_const = is_const,
4830 .is_volatile = is_volatile,
4831 .elem_type = elem_type,
4832 };
4833 if (is_fn_proto or
4834 typeIsOpaque(c, child_qt.getTypePtr(), source_loc) or
4835 qualTypeWasDemotedToOpaque(c, child_qt))
4836 {
4837 const ptr = try Tag.single_pointer.create(c.arena, ptr_info);
4838 return Tag.optional_type.create(c.arena, ptr);
4839 }
4840
4841 return Tag.c_pointer.create(c.arena, ptr_info);
4842 },
4843 .ConstantArray => {
4844 const const_arr_ty = @as(*const clang.ConstantArrayType, @ptrCast(ty));
4845
4846 var size_ap_int: *const clang.APInt = undefined;
4847 const_arr_ty.getSize(&size_ap_int);
4848 defer size_ap_int.free();
4849 const size = size_ap_int.getLimitedValue(usize);
4850 const elem_type = try transType(c, scope, const_arr_ty.getElementType().getTypePtr(), source_loc);
4851
4852 return Tag.array_type.create(c.arena, .{ .len = size, .elem_type = elem_type });
4853 },
4854 .IncompleteArray => {
4855 const incomplete_array_ty = @as(*const clang.IncompleteArrayType, @ptrCast(ty));
4856
4857 const child_qt = incomplete_array_ty.getElementType();
4858 const is_const = child_qt.isConstQualified();
4859 const is_volatile = child_qt.isVolatileQualified();
4860 const elem_type = try transQualType(c, scope, child_qt, source_loc);
4861
4862 return Tag.c_pointer.create(c.arena, .{ .is_const = is_const, .is_volatile = is_volatile, .elem_type = elem_type });
4863 },
4864 .Typedef => {
4865 const typedef_ty = @as(*const clang.TypedefType, @ptrCast(ty));
4866
4867 const typedef_decl = typedef_ty.getDecl();
4868 var trans_scope = scope;
4869 if (@as(*const clang.Decl, @ptrCast(typedef_decl)).castToNamedDecl()) |named_decl| {
4870 const decl_name = try c.str(named_decl.getName_bytes_begin());
4871 if (c.global_names.get(decl_name)) |_| trans_scope = &c.global_scope.base;
4872 if (builtin_typedef_map.get(decl_name)) |builtin| return Tag.type.create(c.arena, builtin);
4873 }
4874 try transTypeDef(c, trans_scope, typedef_decl);
4875 const name = c.decl_table.get(@intFromPtr(typedef_decl.getCanonicalDecl())).?;
4876 return Tag.identifier.create(c.arena, name);
4877 },
4878 .Record => {
4879 const record_ty = @as(*const clang.RecordType, @ptrCast(ty));
4880
4881 const record_decl = record_ty.getDecl();
4882 var trans_scope = scope;
4883 if (@as(*const clang.Decl, @ptrCast(record_decl)).castToNamedDecl()) |named_decl| {
4884 const decl_name = try c.str(named_decl.getName_bytes_begin());
4885 if (c.weak_global_names.contains(decl_name)) trans_scope = &c.global_scope.base;
4886 }
4887 try transRecordDecl(c, trans_scope, record_decl);
4888 const name = c.decl_table.get(@intFromPtr(record_decl.getCanonicalDecl())).?;
4889 return Tag.identifier.create(c.arena, name);
4890 },
4891 .Enum => {
4892 const enum_ty = @as(*const clang.EnumType, @ptrCast(ty));
4893
4894 const enum_decl = enum_ty.getDecl();
4895 var trans_scope = scope;
4896 if (@as(*const clang.Decl, @ptrCast(enum_decl)).castToNamedDecl()) |named_decl| {
4897 const decl_name = try c.str(named_decl.getName_bytes_begin());
4898 if (c.weak_global_names.contains(decl_name)) trans_scope = &c.global_scope.base;
4899 }
4900 try transEnumDecl(c, trans_scope, enum_decl);
4901 const name = c.decl_table.get(@intFromPtr(enum_decl.getCanonicalDecl())).?;
4902 return Tag.identifier.create(c.arena, name);
4903 },
4904 .Elaborated => {
4905 const elaborated_ty = @as(*const clang.ElaboratedType, @ptrCast(ty));
4906 return transQualType(c, scope, elaborated_ty.getNamedType(), source_loc);
4907 },
4908 .Decayed => {
4909 const decayed_ty = @as(*const clang.DecayedType, @ptrCast(ty));
4910 return transQualType(c, scope, decayed_ty.getDecayedType(), source_loc);
4911 },
4912 .Attributed => {
4913 const attributed_ty = @as(*const clang.AttributedType, @ptrCast(ty));
4914 return transQualType(c, scope, attributed_ty.getEquivalentType(), source_loc);
4915 },
4916 .MacroQualified => {
4917 const macroqualified_ty = @as(*const clang.MacroQualifiedType, @ptrCast(ty));
4918 return transQualType(c, scope, macroqualified_ty.getModifiedType(), source_loc);
4919 },
4920 .TypeOf => {
4921 const typeof_ty = @as(*const clang.TypeOfType, @ptrCast(ty));
4922 return transQualType(c, scope, typeof_ty.getUnmodifiedType(), source_loc);
4923 },
4924 .TypeOfExpr => {
4925 const typeofexpr_ty = @as(*const clang.TypeOfExprType, @ptrCast(ty));
4926 const underlying_expr = transExpr(c, scope, typeofexpr_ty.getUnderlyingExpr(), .used) catch |err| switch (err) {
4927 error.UnsupportedTranslation => {
4928 return fail(c, error.UnsupportedType, source_loc, "unsupported underlying expression for TypeOfExpr", .{});
4929 },
4930 else => |e| return e,
4931 };
4932 return Tag.typeof.create(c.arena, underlying_expr);
4933 },
4934 .Vector => {
4935 const vector_ty = @as(*const clang.VectorType, @ptrCast(ty));
4936 const num_elements = vector_ty.getNumElements();
4937 const element_qt = vector_ty.getElementType();
4938 return Tag.vector.create(c.arena, .{
4939 .lhs = try transCreateNodeNumber(c, num_elements, .int),
4940 .rhs = try transQualType(c, scope, element_qt, source_loc),
4941 });
4942 },
4943 .BitInt, .ExtVector => {
4944 const type_name = try c.str(ty.getTypeClassName());
4945 return fail(c, error.UnsupportedType, source_loc, "TODO implement translation of type: '{s}'", .{type_name});
4946 },
4947 else => {
4948 const type_name = try c.str(ty.getTypeClassName());
4949 return fail(c, error.UnsupportedType, source_loc, "unsupported type: '{s}'", .{type_name});
4950 },
4951 }
4952}
4953
4954fn qualTypeWasDemotedToOpaque(c: *Context, qt: clang.QualType) bool {
4955 const ty = qt.getTypePtr();
4956 switch (qt.getTypeClass()) {
4957 .Typedef => {
4958 const typedef_ty = @as(*const clang.TypedefType, @ptrCast(ty));
4959
4960 const typedef_decl = typedef_ty.getDecl();
4961 const underlying_type = typedef_decl.getUnderlyingType();
4962 return qualTypeWasDemotedToOpaque(c, underlying_type);
4963 },
4964 .Record => {
4965 const record_ty = @as(*const clang.RecordType, @ptrCast(ty));
4966
4967 const record_decl = record_ty.getDecl();
4968 const canonical = @intFromPtr(record_decl.getCanonicalDecl());
4969 if (c.opaque_demotes.contains(canonical)) return true;
4970
4971 // check all childern for opaque types.
4972 var it = record_decl.field_begin();
4973 const end_it = record_decl.field_end();
4974 while (it.neq(end_it)) : (it = it.next()) {
4975 const field_decl = it.deref();
4976 if (qualTypeWasDemotedToOpaque(c, field_decl.getType())) return true;
4977 }
4978 return false;
4979 },
4980 .Enum => {
4981 const enum_ty = @as(*const clang.EnumType, @ptrCast(ty));
4982
4983 const enum_decl = enum_ty.getDecl();
4984 const canonical = @intFromPtr(enum_decl.getCanonicalDecl());
4985 return c.opaque_demotes.contains(canonical);
4986 },
4987 .Elaborated => {
4988 const elaborated_ty = @as(*const clang.ElaboratedType, @ptrCast(ty));
4989 return qualTypeWasDemotedToOpaque(c, elaborated_ty.getNamedType());
4990 },
4991 .Decayed => {
4992 const decayed_ty = @as(*const clang.DecayedType, @ptrCast(ty));
4993 return qualTypeWasDemotedToOpaque(c, decayed_ty.getDecayedType());
4994 },
4995 .Attributed => {
4996 const attributed_ty = @as(*const clang.AttributedType, @ptrCast(ty));
4997 return qualTypeWasDemotedToOpaque(c, attributed_ty.getEquivalentType());
4998 },
4999 .MacroQualified => {
5000 const macroqualified_ty = @as(*const clang.MacroQualifiedType, @ptrCast(ty));
5001 return qualTypeWasDemotedToOpaque(c, macroqualified_ty.getModifiedType());
5002 },
5003 else => return false,
5004 }
5005}
5006
5007fn isAnyopaque(qt: clang.QualType) bool {
5008 const ty = qt.getTypePtr();
5009 switch (ty.getTypeClass()) {
5010 .Builtin => {
5011 const builtin_ty = @as(*const clang.BuiltinType, @ptrCast(ty));
5012 return builtin_ty.getKind() == .Void;
5013 },
5014 .Typedef => {
5015 const typedef_ty = @as(*const clang.TypedefType, @ptrCast(ty));
5016 const typedef_decl = typedef_ty.getDecl();
5017 return isAnyopaque(typedef_decl.getUnderlyingType());
5018 },
5019 .Elaborated => {
5020 const elaborated_ty = @as(*const clang.ElaboratedType, @ptrCast(ty));
5021 return isAnyopaque(elaborated_ty.getNamedType().getCanonicalType());
5022 },
5023 .Decayed => {
5024 const decayed_ty = @as(*const clang.DecayedType, @ptrCast(ty));
5025 return isAnyopaque(decayed_ty.getDecayedType().getCanonicalType());
5026 },
5027 .Attributed => {
5028 const attributed_ty = @as(*const clang.AttributedType, @ptrCast(ty));
5029 return isAnyopaque(attributed_ty.getEquivalentType().getCanonicalType());
5030 },
5031 .MacroQualified => {
5032 const macroqualified_ty = @as(*const clang.MacroQualifiedType, @ptrCast(ty));
5033 return isAnyopaque(macroqualified_ty.getModifiedType().getCanonicalType());
5034 },
5035 else => return false,
5036 }
5037}
5038
5039const FnDeclContext = struct {
5040 fn_name: []const u8,
5041 has_body: bool,
5042 storage_class: clang.StorageClass,
5043 is_always_inline: bool,
5044 is_export: bool,
5045};
5046
5047fn transCC(
5048 c: *Context,
5049 fn_ty: *const clang.FunctionType,
5050 source_loc: clang.SourceLocation,
5051) !ast.Payload.Func.CallingConvention {
5052 const clang_cc = fn_ty.getCallConv();
5053 return switch (clang_cc) {
5054 .C => .c,
5055 .X86_64SysV => .x86_64_sysv,
5056 .Win64 => .x86_64_win,
5057 .X86StdCall => .x86_stdcall,
5058 .X86FastCall => .x86_fastcall,
5059 .X86ThisCall => .x86_thiscall,
5060 .X86VectorCall => .x86_vectorcall,
5061 .AArch64VectorCall => .aarch64_vfabi,
5062 .AAPCS => .arm_aapcs,
5063 .AAPCS_VFP => .arm_aapcs_vfp,
5064 .M68kRTD => .m68k_rtd,
5065 else => return fail(
5066 c,
5067 error.UnsupportedType,
5068 source_loc,
5069 "unsupported calling convention: {s}",
5070 .{@tagName(clang_cc)},
5071 ),
5072 };
5073}
5074
5075fn transFnProto(
5076 c: *Context,
5077 fn_decl: ?*const clang.FunctionDecl,
5078 fn_proto_ty: *const clang.FunctionProtoType,
5079 source_loc: clang.SourceLocation,
5080 fn_decl_context: ?FnDeclContext,
5081 is_pub: bool,
5082) !*ast.Payload.Func {
5083 const fn_ty = @as(*const clang.FunctionType, @ptrCast(fn_proto_ty));
5084 const cc = try transCC(c, fn_ty, source_loc);
5085 const is_var_args = fn_proto_ty.isVariadic();
5086 return finishTransFnProto(c, fn_decl, fn_proto_ty, fn_ty, source_loc, fn_decl_context, is_var_args, cc, is_pub);
5087}
5088
5089fn transFnNoProto(
5090 c: *Context,
5091 fn_ty: *const clang.FunctionType,
5092 source_loc: clang.SourceLocation,
5093 fn_decl_context: ?FnDeclContext,
5094 is_pub: bool,
5095) !*ast.Payload.Func {
5096 const cc = try transCC(c, fn_ty, source_loc);
5097 const is_var_args = if (fn_decl_context) |ctx| (!ctx.is_export and ctx.storage_class != .Static and !ctx.is_always_inline) else true;
5098 return finishTransFnProto(c, null, null, fn_ty, source_loc, fn_decl_context, is_var_args, cc, is_pub);
5099}
5100
5101fn finishTransFnProto(
5102 c: *Context,
5103 fn_decl: ?*const clang.FunctionDecl,
5104 fn_proto_ty: ?*const clang.FunctionProtoType,
5105 fn_ty: *const clang.FunctionType,
5106 source_loc: clang.SourceLocation,
5107 fn_decl_context: ?FnDeclContext,
5108 is_var_args: bool,
5109 cc: ast.Payload.Func.CallingConvention,
5110 is_pub: bool,
5111) !*ast.Payload.Func {
5112 const is_export = if (fn_decl_context) |ctx| ctx.is_export else false;
5113 const is_extern = if (fn_decl_context) |ctx| !ctx.has_body else false;
5114 const is_inline = if (fn_decl_context) |ctx| ctx.is_always_inline else false;
5115 const scope = &c.global_scope.base;
5116
5117 const param_count: usize = if (fn_proto_ty != null) fn_proto_ty.?.getNumParams() else 0;
5118 var fn_params = try std.array_list.Managed(ast.Payload.Param).initCapacity(c.gpa, param_count);
5119 defer fn_params.deinit();
5120
5121 var i: usize = 0;
5122 while (i < param_count) : (i += 1) {
5123 const param_qt = fn_proto_ty.?.getParamType(@as(c_uint, @intCast(i)));
5124 const is_noalias = param_qt.isRestrictQualified();
5125
5126 const param_name: ?[]const u8 =
5127 if (fn_decl) |decl| blk: {
5128 const param = decl.getParamDecl(@as(c_uint, @intCast(i)));
5129 const param_name: []const u8 = try c.str(@as(*const clang.NamedDecl, @ptrCast(param)).getName_bytes_begin());
5130 if (param_name.len < 1)
5131 break :blk null;
5132
5133 break :blk param_name;
5134 } else null;
5135 const type_node = try transQualType(c, scope, param_qt, source_loc);
5136
5137 fn_params.addOneAssumeCapacity().* = .{
5138 .is_noalias = is_noalias,
5139 .name = param_name,
5140 .type = type_node,
5141 };
5142 }
5143
5144 const linksection_string = blk: {
5145 if (fn_decl) |decl| {
5146 var str_len: usize = undefined;
5147 if (decl.getSectionAttribute(&str_len)) |str_ptr| {
5148 break :blk str_ptr[0..str_len];
5149 }
5150 }
5151 break :blk null;
5152 };
5153
5154 const alignment = if (fn_decl) |decl| ClangAlignment.forFunc(c, decl).zigAlignment() else null;
5155
5156 const explicit_callconv = if ((is_inline or is_export or is_extern) and cc == .c) null else cc;
5157
5158 const return_type_node = blk: {
5159 if (fn_ty.getNoReturnAttr()) {
5160 break :blk Tag.noreturn_type.init();
5161 } else {
5162 const return_qt = fn_ty.getReturnType();
5163 if (isAnyopaque(return_qt)) {
5164 // convert primitive anyopaque to actual void (only for return type)
5165 break :blk Tag.void_type.init();
5166 } else {
5167 break :blk transQualType(c, scope, return_qt, source_loc) catch |err| switch (err) {
5168 error.UnsupportedType => {
5169 try warn(c, scope, source_loc, "unsupported function proto return type", .{});
5170 return err;
5171 },
5172 error.OutOfMemory => |e| return e,
5173 };
5174 }
5175 }
5176 };
5177 const name: ?[]const u8 = if (fn_decl_context) |ctx| ctx.fn_name else null;
5178 const payload = try c.arena.create(ast.Payload.Func);
5179 payload.* = .{
5180 .base = .{ .tag = .func },
5181 .data = .{
5182 .is_pub = is_pub,
5183 .is_extern = is_extern,
5184 .is_export = is_export,
5185 .is_inline = is_inline,
5186 .is_var_args = is_var_args,
5187 .name = name,
5188 .linksection_string = linksection_string,
5189 .explicit_callconv = explicit_callconv,
5190 .params = try c.arena.dupe(ast.Payload.Param, fn_params.items),
5191 .return_type = return_type_node,
5192 .body = null,
5193 .alignment = alignment,
5194 },
5195 };
5196 return payload;
5197}
5198
5199fn warn(c: *Context, scope: *Scope, loc: clang.SourceLocation, comptime format: []const u8, args: anytype) !void {
5200 const str = try c.locStr(loc);
5201 const value = try std.fmt.allocPrint(c.arena, "// {s}: warning: " ++ format, .{str} ++ args);
5202 try scope.appendNode(try Tag.warning.create(c.arena, value));
5203}
5204
5205fn fail(
5206 c: *Context,
5207 err: anytype,
5208 source_loc: clang.SourceLocation,
5209 comptime format: []const u8,
5210 args: anytype,
5211) (@TypeOf(err) || error{OutOfMemory}) {
5212 try warn(c, &c.global_scope.base, source_loc, format, args);
5213 return err;
5214}
5215
5216pub fn failDecl(c: *Context, loc: clang.SourceLocation, name: []const u8, comptime format: []const u8, args: anytype) Error!void {
5217 // location
5218 // pub const name = @compileError(msg);
5219 const fail_msg = try std.fmt.allocPrint(c.arena, format, args);
5220 try addTopLevelDecl(c, name, try Tag.fail_decl.create(c.arena, .{ .actual = name, .mangled = fail_msg }));
5221 const str = try c.locStr(loc);
5222 const location_comment = try std.fmt.allocPrint(c.arena, "// {s}", .{str});
5223 try c.global_scope.nodes.append(try Tag.warning.create(c.arena, location_comment));
5224}
5225
5226const MacroCtx = struct {
5227 source: []const u8,
5228 list: []const CToken,
5229 i: usize = 0,
5230 loc: clang.SourceLocation,
5231 name: []const u8,
5232 refs_var_decl: bool = false,
5233 fn_params: ?[]const ast.Payload.Param = null,
5234
5235 fn peek(self: *MacroCtx) ?CToken.Id {
5236 if (self.i >= self.list.len) return null;
5237 return self.list[self.i + 1].id;
5238 }
5239
5240 fn next(self: *MacroCtx) ?CToken.Id {
5241 if (self.i >= self.list.len) return null;
5242 self.i += 1;
5243 return self.list[self.i].id;
5244 }
5245
5246 fn skip(self: *MacroCtx, c: *Context, expected_id: CToken.Id) ParseError!void {
5247 const next_id = self.next().?;
5248 if (next_id != expected_id and !(expected_id == .identifier and next_id == .extended_identifier)) {
5249 try self.fail(
5250 c,
5251 "unable to translate C expr: expected '{s}' instead got '{s}'",
5252 .{ expected_id.symbol(), next_id.symbol() },
5253 );
5254 return error.ParseError;
5255 }
5256 }
5257
5258 fn slice(self: *MacroCtx) []const u8 {
5259 const tok = self.list[self.i];
5260 return self.source[tok.start..tok.end];
5261 }
5262
5263 fn fail(self: *MacroCtx, c: *Context, comptime fmt: []const u8, args: anytype) !void {
5264 return failDecl(c, self.loc, self.name, fmt, args);
5265 }
5266
5267 fn makeSlicer(self: *const MacroCtx) MacroSlicer {
5268 return .{ .source = self.source, .tokens = self.list };
5269 }
5270
5271 const MacroTranslateError = union(enum) {
5272 undefined_identifier: []const u8,
5273 invalid_arg_usage: []const u8,
5274 };
5275
5276 fn checkTranslatableMacro(self: *MacroCtx, scope: *Scope, params: []const ast.Payload.Param) ?MacroTranslateError {
5277 const slicer = self.makeSlicer();
5278 var last_is_type_kw = false;
5279 var i: usize = 1; // index 0 is the macro name
5280 while (i < self.list.len) : (i += 1) {
5281 const token = self.list[i];
5282 switch (token.id) {
5283 .period, .arrow => i += 1, // skip next token since field identifiers can be unknown
5284 .keyword_struct, .keyword_union, .keyword_enum => if (!last_is_type_kw) {
5285 last_is_type_kw = true;
5286 continue;
5287 },
5288 .identifier, .extended_identifier => {
5289 const identifier = slicer.slice(token);
5290 const is_param = for (params) |param| {
5291 if (param.name != null and mem.eql(u8, identifier, param.name.?)) break true;
5292 } else false;
5293 if (is_param and last_is_type_kw) {
5294 return .{ .invalid_arg_usage = identifier };
5295 }
5296 if (!scope.contains(identifier) and !isBuiltinDefined(identifier) and !is_param) {
5297 return .{ .undefined_identifier = identifier };
5298 }
5299 },
5300 else => {},
5301 }
5302 last_is_type_kw = false;
5303 }
5304 return null;
5305 }
5306
5307 fn checkFnParam(self: *MacroCtx, str: []const u8) bool {
5308 if (self.fn_params == null) return false;
5309
5310 for (self.fn_params.?) |param| {
5311 if (mem.eql(u8, param.name.?, str)) return true;
5312 }
5313 return false;
5314 }
5315};
5316
5317fn getMacroText(unit: *const clang.ASTUnit, c: *const Context, macro: *const clang.MacroDefinitionRecord) ![]const u8 {
5318 const begin_loc = macro.getSourceRange_getBegin();
5319 const end_loc = clang.Lexer.getLocForEndOfToken(macro.getSourceRange_getEnd(), c.source_manager, unit);
5320
5321 const begin_c = c.source_manager.getCharacterData(begin_loc);
5322 const end_c = c.source_manager.getCharacterData(end_loc);
5323 const slice_len = @intFromPtr(end_c) - @intFromPtr(begin_c);
5324
5325 var comp = aro.Compilation.init(c.gpa, std.fs.cwd());
5326 defer comp.deinit();
5327 const result = comp.addSourceFromBuffer("", begin_c[0..slice_len]) catch return error.OutOfMemory;
5328
5329 return c.arena.dupe(u8, result.buf);
5330}
5331
5332fn transPreprocessorEntities(c: *Context, unit: *clang.ASTUnit) Error!void {
5333 // TODO if we see #undef, delete it from the table
5334 var it = unit.getLocalPreprocessingEntities_begin();
5335 const it_end = unit.getLocalPreprocessingEntities_end();
5336 var tok_list = std.array_list.Managed(CToken).init(c.gpa);
5337 defer tok_list.deinit();
5338 const scope = c.global_scope;
5339
5340 while (it.I != it_end.I) : (it.I += 1) {
5341 const entity = it.deref();
5342 tok_list.items.len = 0;
5343 switch (entity.getKind()) {
5344 .MacroDefinitionKind => {
5345 const macro = @as(*clang.MacroDefinitionRecord, @ptrCast(entity));
5346 const raw_name = macro.getName_getNameStart();
5347 const begin_loc = macro.getSourceRange_getBegin();
5348
5349 const name = try c.str(raw_name);
5350 if (scope.containsNow(name)) {
5351 continue;
5352 }
5353
5354 const source = try getMacroText(unit, c, macro);
5355
5356 try common.tokenizeMacro(source, &tok_list);
5357
5358 var macro_ctx = MacroCtx{
5359 .source = source,
5360 .list = tok_list.items,
5361 .name = name,
5362 .loc = begin_loc,
5363 };
5364 assert(mem.eql(u8, macro_ctx.slice(), name));
5365
5366 var macro_fn = false;
5367 switch (macro_ctx.peek().?) {
5368 .identifier, .extended_identifier => {
5369 // if it equals itself, ignore. for example, from stdio.h:
5370 // #define stdin stdin
5371 const tok = macro_ctx.list[1];
5372 if (mem.eql(u8, name, source[tok.start..tok.end])) {
5373 assert(!c.global_names.contains(source[tok.start..tok.end]));
5374 continue;
5375 }
5376 },
5377 .nl, .eof => {
5378 // this means it is a macro without a value
5379 // We define it as an empty string so that it can still be used with ++
5380 const str_node = try Tag.string_literal.create(c.arena, "\"\"");
5381 const var_decl = try Tag.pub_var_simple.create(c.arena, .{ .name = name, .init = str_node });
5382 try addTopLevelDecl(c, name, var_decl);
5383 try c.global_scope.blank_macros.put(name, {});
5384 continue;
5385 },
5386 .l_paren => {
5387 // if the name is immediately followed by a '(' then it is a function
5388 macro_fn = macro_ctx.list[0].end == macro_ctx.list[1].start;
5389 },
5390 else => {},
5391 }
5392
5393 (if (macro_fn)
5394 transMacroFnDefine(c, &macro_ctx)
5395 else
5396 transMacroDefine(c, &macro_ctx)) catch |err| switch (err) {
5397 error.ParseError => continue,
5398 error.OutOfMemory => |e| return e,
5399 };
5400 },
5401 else => {},
5402 }
5403 }
5404}
5405
5406fn transMacroDefine(c: *Context, m: *MacroCtx) ParseError!void {
5407 const scope = &c.global_scope.base;
5408
5409 if (m.checkTranslatableMacro(scope, &.{})) |err| switch (err) {
5410 .undefined_identifier => |ident| return m.fail(c, "unable to translate macro: undefined identifier `{s}`", .{ident}),
5411 .invalid_arg_usage => unreachable, // no args
5412 };
5413
5414 // Check if the macro only uses other blank macros.
5415 while (true) {
5416 switch (m.peek().?) {
5417 .identifier, .extended_identifier => {
5418 const tok = m.list[m.i + 1];
5419 const slice = m.source[tok.start..tok.end];
5420 if (c.global_scope.blank_macros.contains(slice)) {
5421 m.i += 1;
5422 continue;
5423 }
5424 },
5425 .eof, .nl => {
5426 try c.global_scope.blank_macros.put(m.name, {});
5427 const init_node = try Tag.string_literal.create(c.arena, "\"\"");
5428 const var_decl = try Tag.pub_var_simple.create(c.arena, .{ .name = m.name, .init = init_node });
5429 try addTopLevelDecl(c, m.name, var_decl);
5430 return;
5431 },
5432 else => {},
5433 }
5434 break;
5435 }
5436
5437 const init_node = try parseCExpr(c, m, scope);
5438 const last = m.next().?;
5439 if (last != .eof and last != .nl)
5440 return m.fail(c, "unable to translate C expr: unexpected token '{s}'", .{last.symbol()});
5441
5442 const node = node: {
5443 const var_decl = try Tag.pub_var_simple.create(c.arena, .{ .name = m.name, .init = init_node });
5444
5445 if (getFnProto(c, var_decl)) |proto_node| {
5446 // If a macro aliases a global variable which is a function pointer, we conclude that
5447 // the macro is intended to represent a function that assumes the function pointer
5448 // variable is non-null and calls it.
5449 break :node try transCreateNodeMacroFn(c, m.name, var_decl, proto_node);
5450 } else if (m.refs_var_decl) {
5451 const return_type = try Tag.typeof.create(c.arena, init_node);
5452 const return_expr = try Tag.@"return".create(c.arena, init_node);
5453 const block = try Tag.block_single.create(c.arena, return_expr);
5454 try warn(c, scope, m.loc, "macro '{s}' contains a runtime value, translated to function", .{m.name});
5455
5456 break :node try Tag.pub_inline_fn.create(c.arena, .{
5457 .name = m.name,
5458 .params = &.{},
5459 .return_type = return_type,
5460 .body = block,
5461 });
5462 }
5463
5464 break :node var_decl;
5465 };
5466
5467 try addTopLevelDecl(c, m.name, node);
5468}
5469
5470fn transMacroFnDefine(c: *Context, m: *MacroCtx) ParseError!void {
5471 const macro_slicer = m.makeSlicer();
5472 if (try c.pattern_list.match(c.gpa, macro_slicer)) |pattern| {
5473 const decl = try Tag.pub_var_simple.create(c.arena, .{
5474 .name = m.name,
5475 .init = try Tag.helpers_macro.create(c.arena, pattern.impl),
5476 });
5477 try addTopLevelDecl(c, m.name, decl);
5478 return;
5479 }
5480
5481 var block_scope = try Scope.Block.init(c, &c.global_scope.base, false);
5482 defer block_scope.deinit();
5483 const scope = &block_scope.base;
5484
5485 try m.skip(c, .l_paren);
5486
5487 var fn_params = std.array_list.Managed(ast.Payload.Param).init(c.gpa);
5488 defer fn_params.deinit();
5489
5490 while (true) {
5491 if (!m.peek().?.isMacroIdentifier()) break;
5492
5493 _ = m.next();
5494
5495 const mangled_name = try block_scope.makeMangledName(c, m.slice());
5496 try fn_params.append(.{
5497 .is_noalias = false,
5498 .name = mangled_name,
5499 .type = Tag.@"anytype".init(),
5500 });
5501 try block_scope.discardVariable(c, mangled_name);
5502 if (m.peek().? != .comma) break;
5503 _ = m.next();
5504 }
5505
5506 m.fn_params = fn_params.items;
5507
5508 try m.skip(c, .r_paren);
5509
5510 if (m.checkTranslatableMacro(scope, fn_params.items)) |err| switch (err) {
5511 .undefined_identifier => |ident| return m.fail(c, "unable to translate macro: undefined identifier `{s}`", .{ident}),
5512 .invalid_arg_usage => |ident| return m.fail(c, "unable to translate macro: untranslatable usage of arg `{s}`", .{ident}),
5513 };
5514
5515 const expr = try parseCExpr(c, m, scope);
5516 const last = m.next().?;
5517 if (last != .eof and last != .nl)
5518 return m.fail(c, "unable to translate C expr: unexpected token '{s}'", .{last.symbol()});
5519
5520 const typeof_arg = if (expr.castTag(.block)) |some| blk: {
5521 const stmts = some.data.stmts;
5522 const blk_last = stmts[stmts.len - 1];
5523 const br = blk_last.castTag(.break_val).?;
5524 break :blk br.data.val;
5525 } else expr;
5526
5527 const return_type = if (typeof_arg.castTag(.helpers_cast) orelse typeof_arg.castTag(.std_mem_zeroinit)) |some|
5528 some.data.lhs
5529 else if (typeof_arg.castTag(.std_mem_zeroes)) |some|
5530 some.data
5531 else
5532 try Tag.typeof.create(c.arena, typeof_arg);
5533
5534 const return_expr = try Tag.@"return".create(c.arena, expr);
5535 try block_scope.statements.append(return_expr);
5536
5537 const fn_decl = try Tag.pub_inline_fn.create(c.arena, .{
5538 .name = m.name,
5539 .params = try c.arena.dupe(ast.Payload.Param, fn_params.items),
5540 .return_type = return_type,
5541 .body = try block_scope.complete(c),
5542 });
5543 try addTopLevelDecl(c, m.name, fn_decl);
5544}
5545
5546const ParseError = Error || error{ParseError};
5547
5548fn parseCExpr(c: *Context, m: *MacroCtx, scope: *Scope) ParseError!Node {
5549 // TODO parseCAssignExpr here
5550 var block_scope = try Scope.Block.init(c, scope, true);
5551 defer block_scope.deinit();
5552
5553 const node = try parseCCondExpr(c, m, &block_scope.base);
5554 if (m.next().? != .comma) {
5555 m.i -= 1;
5556 return node;
5557 }
5558
5559 var last = node;
5560 while (true) {
5561 // suppress result
5562 const ignore = try Tag.discard.create(c.arena, .{ .should_skip = false, .value = last });
5563 try block_scope.statements.append(ignore);
5564
5565 last = try parseCCondExpr(c, m, &block_scope.base);
5566 if (m.next().? != .comma) {
5567 m.i -= 1;
5568 break;
5569 }
5570 }
5571
5572 const break_node = try Tag.break_val.create(c.arena, .{
5573 .label = block_scope.label,
5574 .val = last,
5575 });
5576 try block_scope.statements.append(break_node);
5577 return try block_scope.complete(c);
5578}
5579
5580fn parseCNumLit(ctx: *Context, m: *MacroCtx) ParseError!Node {
5581 const lit_bytes = m.slice();
5582 var bytes = try std.ArrayListUnmanaged(u8).initCapacity(ctx.arena, lit_bytes.len + 3);
5583
5584 const prefix = aro.Tree.Token.NumberPrefix.fromString(lit_bytes);
5585 switch (prefix) {
5586 .binary => bytes.appendSliceAssumeCapacity("0b"),
5587 .octal => bytes.appendSliceAssumeCapacity("0o"),
5588 .hex => bytes.appendSliceAssumeCapacity("0x"),
5589 .decimal => {},
5590 }
5591
5592 const after_prefix = lit_bytes[prefix.stringLen()..];
5593 const after_int = for (after_prefix, 0..) |c, i| switch (c) {
5594 '.' => {
5595 if (i == 0) {
5596 bytes.appendAssumeCapacity('0');
5597 }
5598 break after_prefix[i..];
5599 },
5600 'e', 'E' => {
5601 if (prefix != .hex) break after_prefix[i..];
5602 bytes.appendAssumeCapacity(c);
5603 },
5604 'p', 'P' => break after_prefix[i..],
5605 '0'...'9', 'a'...'d', 'A'...'D', 'f', 'F' => {
5606 if (!prefix.digitAllowed(c)) break after_prefix[i..];
5607 bytes.appendAssumeCapacity(c);
5608 },
5609 '\'' => {
5610 bytes.appendAssumeCapacity('_');
5611 },
5612 else => break after_prefix[i..],
5613 } else "";
5614
5615 const after_frac = frac: {
5616 if (after_int.len == 0 or after_int[0] != '.') break :frac after_int;
5617 bytes.appendAssumeCapacity('.');
5618 for (after_int[1..], 1..) |c, i| {
5619 if (c == '\'') {
5620 bytes.appendAssumeCapacity('_');
5621 continue;
5622 }
5623 if (!prefix.digitAllowed(c)) break :frac after_int[i..];
5624 bytes.appendAssumeCapacity(c);
5625 }
5626 break :frac "";
5627 };
5628
5629 const suffix_str = exponent: {
5630 if (after_frac.len == 0) break :exponent after_frac;
5631 switch (after_frac[0]) {
5632 'e', 'E' => {},
5633 'p', 'P' => if (prefix != .hex) break :exponent after_frac,
5634 else => break :exponent after_frac,
5635 }
5636 bytes.appendAssumeCapacity(after_frac[0]);
5637 for (after_frac[1..], 1..) |c, i| switch (c) {
5638 '+', '-', '0'...'9' => {
5639 bytes.appendAssumeCapacity(c);
5640 },
5641 '\'' => {
5642 bytes.appendAssumeCapacity('_');
5643 },
5644 else => break :exponent after_frac[i..],
5645 };
5646 break :exponent "";
5647 };
5648
5649 const is_float = after_int.len != suffix_str.len;
5650 const suffix = aro.Tree.Token.NumberSuffix.fromString(suffix_str, if (is_float) .float else .int) orelse {
5651 try m.fail(ctx, "invalid number suffix: '{s}'", .{suffix_str});
5652 return error.ParseError;
5653 };
5654 if (suffix.isImaginary()) {
5655 try m.fail(ctx, "TODO: imaginary literals", .{});
5656 return error.ParseError;
5657 }
5658 if (suffix.isBitInt()) {
5659 try m.fail(ctx, "TODO: _BitInt literals", .{});
5660 return error.ParseError;
5661 }
5662
5663 if (is_float) {
5664 const type_node = try Tag.type.create(ctx.arena, switch (suffix) {
5665 .F16 => "f16",
5666 .F => "f32",
5667 .None => "f64",
5668 .L => "c_longdouble",
5669 .W => "f80",
5670 .Q, .F128 => "f128",
5671 else => unreachable,
5672 });
5673 const rhs = try Tag.float_literal.create(ctx.arena, bytes.items);
5674 return Tag.as.create(ctx.arena, .{ .lhs = type_node, .rhs = rhs });
5675 } else {
5676 const type_node = try Tag.type.create(ctx.arena, switch (suffix) {
5677 .None => "c_int",
5678 .U => "c_uint",
5679 .L => "c_long",
5680 .UL => "c_ulong",
5681 .LL => "c_longlong",
5682 .ULL => "c_ulonglong",
5683 else => unreachable,
5684 });
5685 const value = std.fmt.parseInt(i128, bytes.items, 0) catch math.maxInt(i128);
5686
5687 // make the output less noisy by skipping promoteIntLiteral where
5688 // it's guaranteed to not be required because of C standard type constraints
5689 const guaranteed_to_fit = switch (suffix) {
5690 .None => math.cast(i16, value) != null,
5691 .U => math.cast(u16, value) != null,
5692 .L => math.cast(i32, value) != null,
5693 .UL => math.cast(u32, value) != null,
5694 .LL => math.cast(i64, value) != null,
5695 .ULL => math.cast(u64, value) != null,
5696 else => unreachable,
5697 };
5698
5699 const literal_node = try Tag.integer_literal.create(ctx.arena, bytes.items);
5700 if (guaranteed_to_fit) {
5701 return Tag.as.create(ctx.arena, .{ .lhs = type_node, .rhs = literal_node });
5702 } else {
5703 return Tag.helpers_promoteIntLiteral.create(ctx.arena, .{
5704 .type = type_node,
5705 .value = literal_node,
5706 .base = try Tag.enum_literal.create(ctx.arena, @tagName(prefix)),
5707 });
5708 }
5709 }
5710}
5711
5712fn zigifyEscapeSequences(ctx: *Context, m: *MacroCtx) ![]const u8 {
5713 var source = m.slice();
5714 for (source, 0..) |c, i| {
5715 if (c == '\"' or c == '\'') {
5716 source = source[i..];
5717 break;
5718 }
5719 }
5720 for (source) |c| {
5721 if (c == '\\' or c == '\t') {
5722 break;
5723 }
5724 } else return source;
5725 var bytes = try ctx.arena.alloc(u8, source.len * 2);
5726 var state: enum {
5727 start,
5728 escape,
5729 hex,
5730 octal,
5731 } = .start;
5732 var i: usize = 0;
5733 var count: u8 = 0;
5734 var num: u8 = 0;
5735 for (source) |c| {
5736 switch (state) {
5737 .escape => {
5738 switch (c) {
5739 'n', 'r', 't', '\\', '\'', '\"' => {
5740 bytes[i] = c;
5741 },
5742 '0'...'7' => {
5743 count += 1;
5744 num += c - '0';
5745 state = .octal;
5746 bytes[i] = 'x';
5747 },
5748 'x' => {
5749 state = .hex;
5750 bytes[i] = 'x';
5751 },
5752 'a' => {
5753 bytes[i] = 'x';
5754 i += 1;
5755 bytes[i] = '0';
5756 i += 1;
5757 bytes[i] = '7';
5758 },
5759 'b' => {
5760 bytes[i] = 'x';
5761 i += 1;
5762 bytes[i] = '0';
5763 i += 1;
5764 bytes[i] = '8';
5765 },
5766 'f' => {
5767 bytes[i] = 'x';
5768 i += 1;
5769 bytes[i] = '0';
5770 i += 1;
5771 bytes[i] = 'C';
5772 },
5773 'v' => {
5774 bytes[i] = 'x';
5775 i += 1;
5776 bytes[i] = '0';
5777 i += 1;
5778 bytes[i] = 'B';
5779 },
5780 '?' => {
5781 i -= 1;
5782 bytes[i] = '?';
5783 },
5784 'u', 'U' => {
5785 try m.fail(ctx, "macro tokenizing failed: TODO unicode escape sequences", .{});
5786 return error.ParseError;
5787 },
5788 else => {
5789 try m.fail(ctx, "macro tokenizing failed: unknown escape sequence", .{});
5790 return error.ParseError;
5791 },
5792 }
5793 i += 1;
5794 if (state == .escape)
5795 state = .start;
5796 },
5797 .start => {
5798 if (c == '\t') {
5799 bytes[i] = '\\';
5800 i += 1;
5801 bytes[i] = 't';
5802 i += 1;
5803 continue;
5804 }
5805 if (c == '\\') {
5806 state = .escape;
5807 }
5808 bytes[i] = c;
5809 i += 1;
5810 },
5811 .hex => {
5812 switch (c) {
5813 '0'...'9' => {
5814 num = std.math.mul(u8, num, 16) catch {
5815 try m.fail(ctx, "macro tokenizing failed: hex literal overflowed", .{});
5816 return error.ParseError;
5817 };
5818 num += c - '0';
5819 },
5820 'a'...'f' => {
5821 num = std.math.mul(u8, num, 16) catch {
5822 try m.fail(ctx, "macro tokenizing failed: hex literal overflowed", .{});
5823 return error.ParseError;
5824 };
5825 num += c - 'a' + 10;
5826 },
5827 'A'...'F' => {
5828 num = std.math.mul(u8, num, 16) catch {
5829 try m.fail(ctx, "macro tokenizing failed: hex literal overflowed", .{});
5830 return error.ParseError;
5831 };
5832 num += c - 'A' + 10;
5833 },
5834 else => {
5835 i += std.fmt.printInt(bytes[i..], num, 16, .lower, .{ .fill = '0', .width = 2 });
5836 num = 0;
5837 if (c == '\\')
5838 state = .escape
5839 else
5840 state = .start;
5841 bytes[i] = c;
5842 i += 1;
5843 },
5844 }
5845 },
5846 .octal => {
5847 const accept_digit = switch (c) {
5848 // The maximum length of a octal literal is 3 digits
5849 '0'...'7' => count < 3,
5850 else => false,
5851 };
5852
5853 if (accept_digit) {
5854 count += 1;
5855 num = std.math.mul(u8, num, 8) catch {
5856 try m.fail(ctx, "macro tokenizing failed: octal literal overflowed", .{});
5857 return error.ParseError;
5858 };
5859 num += c - '0';
5860 } else {
5861 i += std.fmt.printInt(bytes[i..], num, 16, .lower, .{ .fill = '0', .width = 2 });
5862 num = 0;
5863 count = 0;
5864 if (c == '\\')
5865 state = .escape
5866 else
5867 state = .start;
5868 bytes[i] = c;
5869 i += 1;
5870 }
5871 },
5872 }
5873 }
5874 if (state == .hex or state == .octal)
5875 i += std.fmt.printInt(bytes[i..], num, 16, .lower, .{ .fill = '0', .width = 2 });
5876 return bytes[0..i];
5877}
5878
5879/// non-ASCII characters (c > 127) are also treated as non-printable by ascii.hexEscape.
5880/// If a C string literal or char literal in a macro is not valid UTF-8, we need to escape
5881/// non-ASCII characters so that the Zig source we output will itself be UTF-8.
5882fn escapeUnprintables(ctx: *Context, m: *MacroCtx) ![]const u8 {
5883 const zigified = try zigifyEscapeSequences(ctx, m);
5884 if (std.unicode.utf8ValidateSlice(zigified)) return zigified;
5885
5886 const formatter = std.ascii.hexEscape(zigified, .lower);
5887 const encoded_size: usize = @intCast(std.fmt.count("{f}", .{formatter}));
5888 const output = try ctx.arena.alloc(u8, encoded_size);
5889 return std.fmt.bufPrint(output, "{f}", .{formatter}) catch |err| switch (err) {
5890 error.NoSpaceLeft => unreachable,
5891 else => |e| return e,
5892 };
5893}
5894
5895fn parseCPrimaryExpr(c: *Context, m: *MacroCtx, scope: *Scope) ParseError!Node {
5896 const tok = m.next().?;
5897 const slice = m.slice();
5898 switch (tok) {
5899 .char_literal,
5900 .char_literal_utf_8,
5901 .char_literal_utf_16,
5902 .char_literal_utf_32,
5903 .char_literal_wide,
5904 => {
5905 if (slice[0] != '\'' or slice[1] == '\\' or slice.len == 3) {
5906 return Tag.char_literal.create(c.arena, try escapeUnprintables(c, m));
5907 } else {
5908 const str = try std.fmt.allocPrint(c.arena, "0x{x}", .{slice[1 .. slice.len - 1]});
5909 return Tag.integer_literal.create(c.arena, str);
5910 }
5911 },
5912 .string_literal,
5913 .string_literal_utf_16,
5914 .string_literal_utf_8,
5915 .string_literal_utf_32,
5916 .string_literal_wide,
5917 => {
5918 return Tag.string_literal.create(c.arena, try escapeUnprintables(c, m));
5919 },
5920 .pp_num => {
5921 return parseCNumLit(c, m);
5922 },
5923 .l_paren => {
5924 const inner_node = try parseCExpr(c, m, scope);
5925
5926 try m.skip(c, .r_paren);
5927 return inner_node;
5928 },
5929 else => {},
5930 }
5931
5932 // The C preprocessor has no knowledge of C, so C keywords aren't special in macros.
5933 // Thus the current token should be treated like an identifier if its name matches a parameter.
5934 if (tok == .identifier or tok == .extended_identifier or m.checkFnParam(slice)) {
5935 if (c.global_scope.blank_macros.contains(slice)) {
5936 return parseCPrimaryExpr(c, m, scope);
5937 }
5938 const mangled_name = scope.getAlias(slice);
5939 if (builtin_typedef_map.get(mangled_name)) |ty| return Tag.type.create(c.arena, ty);
5940 const identifier = try Tag.identifier.create(c.arena, mangled_name);
5941 scope.skipVariableDiscard(identifier.castTag(.identifier).?.data);
5942 refs_var: {
5943 const ident_node = c.global_scope.sym_table.get(slice) orelse break :refs_var;
5944 const var_decl_node = ident_node.castTag(.var_decl) orelse break :refs_var;
5945 if (!var_decl_node.data.is_const) m.refs_var_decl = true;
5946 }
5947 return identifier;
5948 }
5949
5950 // for handling type macros (EVIL)
5951 // TODO maybe detect and treat type macros as typedefs in parseCSpecifierQualifierList?
5952 m.i -= 1;
5953 if (try parseCTypeName(c, m, scope, true)) |type_name| {
5954 return type_name;
5955 }
5956 try m.fail(c, "unable to translate C expr: unexpected token '{s}'", .{tok.symbol()});
5957 return error.ParseError;
5958}
5959
5960fn macroIntFromBool(c: *Context, node: Node) !Node {
5961 if (!isBoolRes(node)) {
5962 return node;
5963 }
5964
5965 return Tag.int_from_bool.create(c.arena, node);
5966}
5967
5968fn macroIntToBool(c: *Context, node: Node) !Node {
5969 if (isBoolRes(node)) {
5970 return node;
5971 }
5972 if (node.tag() == .string_literal) {
5973 // @intFromPtr(node) != 0
5974 const int_from_ptr = try Tag.int_from_ptr.create(c.arena, node);
5975 return Tag.not_equal.create(c.arena, .{ .lhs = int_from_ptr, .rhs = Tag.zero_literal.init() });
5976 }
5977 // node != 0
5978 return Tag.not_equal.create(c.arena, .{ .lhs = node, .rhs = Tag.zero_literal.init() });
5979}
5980
5981fn parseCCondExpr(c: *Context, m: *MacroCtx, scope: *Scope) ParseError!Node {
5982 const node = try parseCOrExpr(c, m, scope);
5983 if (m.peek().? != .question_mark) {
5984 return node;
5985 }
5986 _ = m.next();
5987
5988 const then_body = try parseCOrExpr(c, m, scope);
5989 try m.skip(c, .colon);
5990 const else_body = try parseCCondExpr(c, m, scope);
5991 return Tag.@"if".create(c.arena, .{ .cond = node, .then = then_body, .@"else" = else_body });
5992}
5993
5994fn parseCOrExpr(c: *Context, m: *MacroCtx, scope: *Scope) ParseError!Node {
5995 var node = try parseCAndExpr(c, m, scope);
5996 while (m.next().? == .pipe_pipe) {
5997 const lhs = try macroIntToBool(c, node);
5998 const rhs = try macroIntToBool(c, try parseCAndExpr(c, m, scope));
5999 node = try Tag.@"or".create(c.arena, .{ .lhs = lhs, .rhs = rhs });
6000 }
6001 m.i -= 1;
6002 return node;
6003}
6004
6005fn parseCAndExpr(c: *Context, m: *MacroCtx, scope: *Scope) ParseError!Node {
6006 var node = try parseCBitOrExpr(c, m, scope);
6007 while (m.next().? == .ampersand_ampersand) {
6008 const lhs = try macroIntToBool(c, node);
6009 const rhs = try macroIntToBool(c, try parseCBitOrExpr(c, m, scope));
6010 node = try Tag.@"and".create(c.arena, .{ .lhs = lhs, .rhs = rhs });
6011 }
6012 m.i -= 1;
6013 return node;
6014}
6015
6016fn parseCBitOrExpr(c: *Context, m: *MacroCtx, scope: *Scope) ParseError!Node {
6017 var node = try parseCBitXorExpr(c, m, scope);
6018 while (m.next().? == .pipe) {
6019 const lhs = try macroIntFromBool(c, node);
6020 const rhs = try macroIntFromBool(c, try parseCBitXorExpr(c, m, scope));
6021 node = try Tag.bit_or.create(c.arena, .{ .lhs = lhs, .rhs = rhs });
6022 }
6023 m.i -= 1;
6024 return node;
6025}
6026
6027fn parseCBitXorExpr(c: *Context, m: *MacroCtx, scope: *Scope) ParseError!Node {
6028 var node = try parseCBitAndExpr(c, m, scope);
6029 while (m.next().? == .caret) {
6030 const lhs = try macroIntFromBool(c, node);
6031 const rhs = try macroIntFromBool(c, try parseCBitAndExpr(c, m, scope));
6032 node = try Tag.bit_xor.create(c.arena, .{ .lhs = lhs, .rhs = rhs });
6033 }
6034 m.i -= 1;
6035 return node;
6036}
6037
6038fn parseCBitAndExpr(c: *Context, m: *MacroCtx, scope: *Scope) ParseError!Node {
6039 var node = try parseCEqExpr(c, m, scope);
6040 while (m.next().? == .ampersand) {
6041 const lhs = try macroIntFromBool(c, node);
6042 const rhs = try macroIntFromBool(c, try parseCEqExpr(c, m, scope));
6043 node = try Tag.bit_and.create(c.arena, .{ .lhs = lhs, .rhs = rhs });
6044 }
6045 m.i -= 1;
6046 return node;
6047}
6048
6049fn parseCEqExpr(c: *Context, m: *MacroCtx, scope: *Scope) ParseError!Node {
6050 var node = try parseCRelExpr(c, m, scope);
6051 while (true) {
6052 switch (m.peek().?) {
6053 .bang_equal => {
6054 _ = m.next();
6055 const lhs = try macroIntFromBool(c, node);
6056 const rhs = try macroIntFromBool(c, try parseCRelExpr(c, m, scope));
6057 node = try Tag.not_equal.create(c.arena, .{ .lhs = lhs, .rhs = rhs });
6058 },
6059 .equal_equal => {
6060 _ = m.next();
6061 const lhs = try macroIntFromBool(c, node);
6062 const rhs = try macroIntFromBool(c, try parseCRelExpr(c, m, scope));
6063 node = try Tag.equal.create(c.arena, .{ .lhs = lhs, .rhs = rhs });
6064 },
6065 else => return node,
6066 }
6067 }
6068}
6069
6070fn parseCRelExpr(c: *Context, m: *MacroCtx, scope: *Scope) ParseError!Node {
6071 var node = try parseCShiftExpr(c, m, scope);
6072 while (true) {
6073 switch (m.peek().?) {
6074 .angle_bracket_right => {
6075 _ = m.next();
6076 const lhs = try macroIntFromBool(c, node);
6077 const rhs = try macroIntFromBool(c, try parseCShiftExpr(c, m, scope));
6078 node = try Tag.greater_than.create(c.arena, .{ .lhs = lhs, .rhs = rhs });
6079 },
6080 .angle_bracket_right_equal => {
6081 _ = m.next();
6082 const lhs = try macroIntFromBool(c, node);
6083 const rhs = try macroIntFromBool(c, try parseCShiftExpr(c, m, scope));
6084 node = try Tag.greater_than_equal.create(c.arena, .{ .lhs = lhs, .rhs = rhs });
6085 },
6086 .angle_bracket_left => {
6087 _ = m.next();
6088 const lhs = try macroIntFromBool(c, node);
6089 const rhs = try macroIntFromBool(c, try parseCShiftExpr(c, m, scope));
6090 node = try Tag.less_than.create(c.arena, .{ .lhs = lhs, .rhs = rhs });
6091 },
6092 .angle_bracket_left_equal => {
6093 _ = m.next();
6094 const lhs = try macroIntFromBool(c, node);
6095 const rhs = try macroIntFromBool(c, try parseCShiftExpr(c, m, scope));
6096 node = try Tag.less_than_equal.create(c.arena, .{ .lhs = lhs, .rhs = rhs });
6097 },
6098 else => return node,
6099 }
6100 }
6101}
6102
6103fn parseCShiftExpr(c: *Context, m: *MacroCtx, scope: *Scope) ParseError!Node {
6104 var node = try parseCAddSubExpr(c, m, scope);
6105 while (true) {
6106 switch (m.peek().?) {
6107 .angle_bracket_angle_bracket_left => {
6108 _ = m.next();
6109 const lhs = try macroIntFromBool(c, node);
6110 const rhs = try macroIntFromBool(c, try parseCAddSubExpr(c, m, scope));
6111 node = try Tag.shl.create(c.arena, .{ .lhs = lhs, .rhs = rhs });
6112 },
6113 .angle_bracket_angle_bracket_right => {
6114 _ = m.next();
6115 const lhs = try macroIntFromBool(c, node);
6116 const rhs = try macroIntFromBool(c, try parseCAddSubExpr(c, m, scope));
6117 node = try Tag.shr.create(c.arena, .{ .lhs = lhs, .rhs = rhs });
6118 },
6119 else => return node,
6120 }
6121 }
6122}
6123
6124fn parseCAddSubExpr(c: *Context, m: *MacroCtx, scope: *Scope) ParseError!Node {
6125 var node = try parseCMulExpr(c, m, scope);
6126 while (true) {
6127 switch (m.peek().?) {
6128 .plus => {
6129 _ = m.next();
6130 const lhs = try macroIntFromBool(c, node);
6131 const rhs = try macroIntFromBool(c, try parseCMulExpr(c, m, scope));
6132 node = try Tag.add.create(c.arena, .{ .lhs = lhs, .rhs = rhs });
6133 },
6134 .minus => {
6135 _ = m.next();
6136 const lhs = try macroIntFromBool(c, node);
6137 const rhs = try macroIntFromBool(c, try parseCMulExpr(c, m, scope));
6138 node = try Tag.sub.create(c.arena, .{ .lhs = lhs, .rhs = rhs });
6139 },
6140 else => return node,
6141 }
6142 }
6143}
6144
6145fn parseCMulExpr(c: *Context, m: *MacroCtx, scope: *Scope) ParseError!Node {
6146 var node = try parseCCastExpr(c, m, scope);
6147 while (true) {
6148 switch (m.next().?) {
6149 .asterisk => {
6150 const lhs = try macroIntFromBool(c, node);
6151 const rhs = try macroIntFromBool(c, try parseCCastExpr(c, m, scope));
6152 node = try Tag.mul.create(c.arena, .{ .lhs = lhs, .rhs = rhs });
6153 },
6154 .slash => {
6155 const lhs = try macroIntFromBool(c, node);
6156 const rhs = try macroIntFromBool(c, try parseCCastExpr(c, m, scope));
6157 node = try Tag.macro_arithmetic.create(c.arena, .{ .op = .div, .lhs = lhs, .rhs = rhs });
6158 },
6159 .percent => {
6160 const lhs = try macroIntFromBool(c, node);
6161 const rhs = try macroIntFromBool(c, try parseCCastExpr(c, m, scope));
6162 node = try Tag.macro_arithmetic.create(c.arena, .{ .op = .rem, .lhs = lhs, .rhs = rhs });
6163 },
6164 else => {
6165 m.i -= 1;
6166 return node;
6167 },
6168 }
6169 }
6170}
6171
6172fn parseCCastExpr(c: *Context, m: *MacroCtx, scope: *Scope) ParseError!Node {
6173 switch (m.next().?) {
6174 .l_paren => {
6175 if (try parseCTypeName(c, m, scope, true)) |type_name| {
6176 while (true) {
6177 const next_token = m.next().?;
6178 switch (next_token) {
6179 .r_paren => break,
6180 else => |next_tag| {
6181 // Skip trailing blank defined before the RParen.
6182 if ((next_tag == .identifier or next_tag == .extended_identifier) and
6183 c.global_scope.blank_macros.contains(m.slice()))
6184 continue;
6185
6186 try m.fail(
6187 c,
6188 "unable to translate C expr: expected ')' instead got '{s}'",
6189 .{next_token.symbol()},
6190 );
6191 return error.ParseError;
6192 },
6193 }
6194 }
6195 if (m.peek().? == .l_brace) {
6196 // initializer list
6197 return parseCPostfixExpr(c, m, scope, type_name);
6198 }
6199 const node_to_cast = try parseCCastExpr(c, m, scope);
6200 return Tag.helpers_cast.create(c.arena, .{ .lhs = type_name, .rhs = node_to_cast });
6201 }
6202 },
6203 else => {},
6204 }
6205 m.i -= 1;
6206 return parseCUnaryExpr(c, m, scope);
6207}
6208
6209// allow_fail is set when unsure if we are parsing a type-name
6210fn parseCTypeName(c: *Context, m: *MacroCtx, scope: *Scope, allow_fail: bool) ParseError!?Node {
6211 if (try parseCSpecifierQualifierList(c, m, scope, allow_fail)) |node| {
6212 return try parseCAbstractDeclarator(c, m, node);
6213 } else {
6214 return null;
6215 }
6216}
6217
6218fn parseCSpecifierQualifierList(c: *Context, m: *MacroCtx, scope: *Scope, allow_fail: bool) ParseError!?Node {
6219 const tok = m.next().?;
6220 const slice = m.slice();
6221 const mangled_name = scope.getAlias(slice);
6222 if (!m.checkFnParam(mangled_name)) {
6223 switch (tok) {
6224 .identifier, .extended_identifier => {
6225 if (c.global_scope.blank_macros.contains(m.slice())) {
6226 return try parseCSpecifierQualifierList(c, m, scope, allow_fail);
6227 }
6228 if (!allow_fail or c.typedefs.contains(mangled_name)) {
6229 if (builtin_typedef_map.get(mangled_name)) |ty| return try Tag.type.create(c.arena, ty);
6230 return try Tag.identifier.create(c.arena, mangled_name);
6231 }
6232 },
6233 .keyword_void => return try Tag.type.create(c.arena, "anyopaque"),
6234 .keyword_bool => return try Tag.type.create(c.arena, "bool"),
6235 .keyword_char,
6236 .keyword_int,
6237 .keyword_short,
6238 .keyword_long,
6239 .keyword_float,
6240 .keyword_double,
6241 .keyword_signed,
6242 .keyword_unsigned,
6243 .keyword_complex,
6244 => {
6245 m.i -= 1;
6246 return try parseCNumericType(c, m);
6247 },
6248 .keyword_enum, .keyword_struct, .keyword_union => {
6249 // struct Foo will be declared as struct_Foo by transRecordDecl
6250 try m.skip(c, .identifier);
6251
6252 const name = try std.fmt.allocPrint(c.arena, "{s}_{s}", .{ slice, m.slice() });
6253 return try Tag.identifier.create(c.arena, name);
6254 },
6255 else => {},
6256 }
6257 } else {
6258 if (allow_fail) {
6259 m.i -= 1;
6260 return null;
6261 } else {
6262 return try Tag.identifier.create(c.arena, mangled_name);
6263 }
6264 }
6265
6266 if (allow_fail) {
6267 m.i -= 1;
6268 return null;
6269 } else {
6270 try m.fail(c, "unable to translate C expr: unexpected token '{s}'", .{tok.symbol()});
6271 return error.ParseError;
6272 }
6273}
6274
6275fn parseCNumericType(c: *Context, m: *MacroCtx) ParseError!Node {
6276 const KwCounter = struct {
6277 double: u8 = 0,
6278 long: u8 = 0,
6279 int: u8 = 0,
6280 float: u8 = 0,
6281 short: u8 = 0,
6282 char: u8 = 0,
6283 unsigned: u8 = 0,
6284 signed: u8 = 0,
6285 complex: u8 = 0,
6286
6287 fn eql(self: @This(), other: @This()) bool {
6288 return meta.eql(self, other);
6289 }
6290 };
6291
6292 // Yes, these can be in *any* order
6293 // This still doesn't cover cases where for example volatile is intermixed
6294
6295 var kw = KwCounter{};
6296 // prevent overflow
6297 var i: u8 = 0;
6298 while (i < math.maxInt(u8)) : (i += 1) {
6299 switch (m.next().?) {
6300 .keyword_double => kw.double += 1,
6301 .keyword_long => kw.long += 1,
6302 .keyword_int => kw.int += 1,
6303 .keyword_float => kw.float += 1,
6304 .keyword_short => kw.short += 1,
6305 .keyword_char => kw.char += 1,
6306 .keyword_unsigned => kw.unsigned += 1,
6307 .keyword_signed => kw.signed += 1,
6308 .keyword_complex => kw.complex += 1,
6309 else => {
6310 m.i -= 1;
6311 break;
6312 },
6313 }
6314 }
6315
6316 if (kw.eql(.{ .int = 1 }) or kw.eql(.{ .signed = 1 }) or kw.eql(.{ .signed = 1, .int = 1 }))
6317 return Tag.type.create(c.arena, "c_int");
6318
6319 if (kw.eql(.{ .unsigned = 1 }) or kw.eql(.{ .unsigned = 1, .int = 1 }))
6320 return Tag.type.create(c.arena, "c_uint");
6321
6322 if (kw.eql(.{ .long = 1 }) or kw.eql(.{ .signed = 1, .long = 1 }) or kw.eql(.{ .long = 1, .int = 1 }) or kw.eql(.{ .signed = 1, .long = 1, .int = 1 }))
6323 return Tag.type.create(c.arena, "c_long");
6324
6325 if (kw.eql(.{ .unsigned = 1, .long = 1 }) or kw.eql(.{ .unsigned = 1, .long = 1, .int = 1 }))
6326 return Tag.type.create(c.arena, "c_ulong");
6327
6328 if (kw.eql(.{ .long = 2 }) or kw.eql(.{ .signed = 1, .long = 2 }) or kw.eql(.{ .long = 2, .int = 1 }) or kw.eql(.{ .signed = 1, .long = 2, .int = 1 }))
6329 return Tag.type.create(c.arena, "c_longlong");
6330
6331 if (kw.eql(.{ .unsigned = 1, .long = 2 }) or kw.eql(.{ .unsigned = 1, .long = 2, .int = 1 }))
6332 return Tag.type.create(c.arena, "c_ulonglong");
6333
6334 if (kw.eql(.{ .signed = 1, .char = 1 }))
6335 return Tag.type.create(c.arena, "i8");
6336
6337 if (kw.eql(.{ .char = 1 }) or kw.eql(.{ .unsigned = 1, .char = 1 }))
6338 return Tag.type.create(c.arena, "u8");
6339
6340 if (kw.eql(.{ .short = 1 }) or kw.eql(.{ .signed = 1, .short = 1 }) or kw.eql(.{ .short = 1, .int = 1 }) or kw.eql(.{ .signed = 1, .short = 1, .int = 1 }))
6341 return Tag.type.create(c.arena, "c_short");
6342
6343 if (kw.eql(.{ .unsigned = 1, .short = 1 }) or kw.eql(.{ .unsigned = 1, .short = 1, .int = 1 }))
6344 return Tag.type.create(c.arena, "c_ushort");
6345
6346 if (kw.eql(.{ .float = 1 }))
6347 return Tag.type.create(c.arena, "f32");
6348
6349 if (kw.eql(.{ .double = 1 }))
6350 return Tag.type.create(c.arena, "f64");
6351
6352 if (kw.eql(.{ .long = 1, .double = 1 })) {
6353 try m.fail(c, "unable to translate: TODO long double", .{});
6354 return error.ParseError;
6355 }
6356
6357 if (kw.eql(.{ .float = 1, .complex = 1 })) {
6358 try m.fail(c, "unable to translate: TODO _Complex", .{});
6359 return error.ParseError;
6360 }
6361
6362 if (kw.eql(.{ .double = 1, .complex = 1 })) {
6363 try m.fail(c, "unable to translate: TODO _Complex", .{});
6364 return error.ParseError;
6365 }
6366
6367 if (kw.eql(.{ .long = 1, .double = 1, .complex = 1 })) {
6368 try m.fail(c, "unable to translate: TODO _Complex", .{});
6369 return error.ParseError;
6370 }
6371
6372 try m.fail(c, "unable to translate: invalid numeric type", .{});
6373 return error.ParseError;
6374}
6375
6376fn parseCAbstractDeclarator(c: *Context, m: *MacroCtx, node: Node) ParseError!Node {
6377 switch (m.next().?) {
6378 .asterisk => {
6379 // last token of `node`
6380 const prev_id = m.list[m.i - 1].id;
6381
6382 if (prev_id == .keyword_void) {
6383 const ptr = try Tag.single_pointer.create(c.arena, .{
6384 .is_const = false,
6385 .is_volatile = false,
6386 .elem_type = node,
6387 });
6388 return Tag.optional_type.create(c.arena, ptr);
6389 } else {
6390 return Tag.c_pointer.create(c.arena, .{
6391 .is_const = false,
6392 .is_volatile = false,
6393 .elem_type = node,
6394 });
6395 }
6396 },
6397 else => {
6398 m.i -= 1;
6399 return node;
6400 },
6401 }
6402}
6403
6404fn parseCPostfixExpr(c: *Context, m: *MacroCtx, scope: *Scope, type_name: ?Node) ParseError!Node {
6405 var node = try parseCPostfixExprInner(c, m, scope, type_name);
6406 // In C the preprocessor would handle concatting strings while expanding macros.
6407 // This should do approximately the same by concatting any strings and identifiers
6408 // after a primary or postfix expression.
6409 while (true) {
6410 switch (m.peek().?) {
6411 .string_literal,
6412 .string_literal_utf_16,
6413 .string_literal_utf_8,
6414 .string_literal_utf_32,
6415 .string_literal_wide,
6416 => {},
6417 .identifier, .extended_identifier => {
6418 const tok = m.list[m.i + 1];
6419 const slice = m.source[tok.start..tok.end];
6420 if (c.global_scope.blank_macros.contains(slice)) {
6421 m.i += 1;
6422 continue;
6423 }
6424 },
6425 else => break,
6426 }
6427 const rhs = try parseCPostfixExprInner(c, m, scope, type_name);
6428 node = try Tag.array_cat.create(c.arena, .{ .lhs = node, .rhs = rhs });
6429 }
6430 return node;
6431}
6432
6433fn parseCPostfixExprInner(c: *Context, m: *MacroCtx, scope: *Scope, type_name: ?Node) ParseError!Node {
6434 var node = type_name orelse try parseCPrimaryExpr(c, m, scope);
6435 while (true) {
6436 switch (m.next().?) {
6437 .period => {
6438 try m.skip(c, .identifier);
6439
6440 node = try Tag.field_access.create(c.arena, .{ .lhs = node, .field_name = m.slice() });
6441 },
6442 .arrow => {
6443 try m.skip(c, .identifier);
6444
6445 const deref = try Tag.deref.create(c.arena, node);
6446 node = try Tag.field_access.create(c.arena, .{ .lhs = deref, .field_name = m.slice() });
6447 },
6448 .l_bracket => {
6449 const index_val = try macroIntFromBool(c, try parseCExpr(c, m, scope));
6450 const index = try Tag.as.create(c.arena, .{
6451 .lhs = try Tag.type.create(c.arena, "usize"),
6452 .rhs = try Tag.int_cast.create(c.arena, index_val),
6453 });
6454 node = try Tag.array_access.create(c.arena, .{ .lhs = node, .rhs = index });
6455 try m.skip(c, .r_bracket);
6456 },
6457 .l_paren => {
6458 if (m.peek().? == .r_paren) {
6459 m.i += 1;
6460 node = try Tag.call.create(c.arena, .{ .lhs = node, .args = &[0]Node{} });
6461 } else {
6462 var args = std.array_list.Managed(Node).init(c.gpa);
6463 defer args.deinit();
6464 while (true) {
6465 const arg = try parseCCondExpr(c, m, scope);
6466 try args.append(arg);
6467 const next_id = m.next().?;
6468 switch (next_id) {
6469 .comma => {},
6470 .r_paren => break,
6471 else => {
6472 try m.fail(c, "unable to translate C expr: expected ',' or ')' instead got '{s}'", .{next_id.symbol()});
6473 return error.ParseError;
6474 },
6475 }
6476 }
6477 node = try Tag.call.create(c.arena, .{ .lhs = node, .args = try c.arena.dupe(Node, args.items) });
6478 }
6479 },
6480 .l_brace => {
6481 // Check for designated field initializers
6482 if (m.peek().? == .period) {
6483 var init_vals = std.array_list.Managed(ast.Payload.ContainerInitDot.Initializer).init(c.gpa);
6484 defer init_vals.deinit();
6485
6486 while (true) {
6487 try m.skip(c, .period);
6488 try m.skip(c, .identifier);
6489 const name = m.slice();
6490 try m.skip(c, .equal);
6491
6492 const val = try parseCCondExpr(c, m, scope);
6493 try init_vals.append(.{ .name = name, .value = val });
6494 const next_id = m.next().?;
6495 switch (next_id) {
6496 .comma => {},
6497 .r_brace => break,
6498 else => {
6499 try m.fail(c, "unable to translate C expr: expected ',' or '}}' instead got '{s}'", .{next_id.symbol()});
6500 return error.ParseError;
6501 },
6502 }
6503 }
6504 const tuple_node = try Tag.container_init_dot.create(c.arena, try c.arena.dupe(ast.Payload.ContainerInitDot.Initializer, init_vals.items));
6505 node = try Tag.std_mem_zeroinit.create(c.arena, .{ .lhs = node, .rhs = tuple_node });
6506 continue;
6507 }
6508
6509 var init_vals = std.array_list.Managed(Node).init(c.gpa);
6510 defer init_vals.deinit();
6511
6512 while (true) {
6513 const val = try parseCCondExpr(c, m, scope);
6514 try init_vals.append(val);
6515 const next_id = m.next().?;
6516 switch (next_id) {
6517 .comma => {},
6518 .r_brace => break,
6519 else => {
6520 try m.fail(c, "unable to translate C expr: expected ',' or '}}' instead got '{s}'", .{next_id.symbol()});
6521 return error.ParseError;
6522 },
6523 }
6524 }
6525 const tuple_node = try Tag.tuple.create(c.arena, try c.arena.dupe(Node, init_vals.items));
6526 node = try Tag.std_mem_zeroinit.create(c.arena, .{ .lhs = node, .rhs = tuple_node });
6527 },
6528 .plus_plus, .minus_minus => {
6529 try m.fail(c, "TODO postfix inc/dec expr", .{});
6530 return error.ParseError;
6531 },
6532 else => {
6533 m.i -= 1;
6534 return node;
6535 },
6536 }
6537 }
6538}
6539
6540fn parseCUnaryExpr(c: *Context, m: *MacroCtx, scope: *Scope) ParseError!Node {
6541 sw: switch (m.next().?) {
6542 .bang => {
6543 const operand = try macroIntToBool(c, try parseCCastExpr(c, m, scope));
6544 return Tag.not.create(c.arena, operand);
6545 },
6546 .minus => {
6547 const operand = try macroIntFromBool(c, try parseCCastExpr(c, m, scope));
6548 return Tag.negate.create(c.arena, operand);
6549 },
6550 .plus => return try parseCCastExpr(c, m, scope),
6551 .tilde => {
6552 const operand = try macroIntFromBool(c, try parseCCastExpr(c, m, scope));
6553 return Tag.bit_not.create(c.arena, operand);
6554 },
6555 .asterisk => {
6556 const operand = try parseCCastExpr(c, m, scope);
6557 return Tag.deref.create(c.arena, operand);
6558 },
6559 .ampersand => {
6560 const operand = try parseCCastExpr(c, m, scope);
6561 return Tag.address_of.create(c.arena, operand);
6562 },
6563 .keyword_sizeof => {
6564 // 'sizeof' could be used as a parameter to a macro function.
6565 if (m.checkFnParam(m.slice())) break :sw;
6566
6567 const operand = if (m.peek().? == .l_paren) blk: {
6568 _ = m.next();
6569 const inner = (try parseCTypeName(c, m, scope, false)).?;
6570 try m.skip(c, .r_paren);
6571 break :blk inner;
6572 } else try parseCUnaryExpr(c, m, scope);
6573
6574 return Tag.helpers_sizeof.create(c.arena, operand);
6575 },
6576 .keyword_alignof => {
6577 // 'alignof' could be used as a parameter to a macro function.
6578 if (m.checkFnParam(m.slice())) break :sw;
6579
6580 // TODO this won't work if using <stdalign.h>'s
6581 // #define alignof _Alignof
6582 try m.skip(c, .l_paren);
6583 const operand = (try parseCTypeName(c, m, scope, false)).?;
6584 try m.skip(c, .r_paren);
6585
6586 return Tag.alignof.create(c.arena, operand);
6587 },
6588 .plus_plus, .minus_minus => {
6589 try m.fail(c, "TODO unary inc/dec expr", .{});
6590 return error.ParseError;
6591 },
6592 else => {},
6593 }
6594
6595 m.i -= 1;
6596 return try parseCPostfixExpr(c, m, scope, null);
6597}
6598
6599fn getContainer(c: *Context, node: Node) ?Node {
6600 switch (node.tag()) {
6601 .@"union",
6602 .@"struct",
6603 .address_of,
6604 .bit_not,
6605 .not,
6606 .optional_type,
6607 .negate,
6608 .negate_wrap,
6609 .array_type,
6610 .c_pointer,
6611 .single_pointer,
6612 => return node,
6613
6614 .identifier => {
6615 const ident = node.castTag(.identifier).?;
6616 if (c.global_scope.sym_table.get(ident.data)) |value| {
6617 if (value.castTag(.var_decl)) |var_decl|
6618 return getContainer(c, var_decl.data.init.?);
6619 if (value.castTag(.var_simple) orelse value.castTag(.pub_var_simple)) |var_decl|
6620 return getContainer(c, var_decl.data.init);
6621 }
6622 },
6623
6624 .field_access => {
6625 const field_access = node.castTag(.field_access).?;
6626
6627 if (getContainerTypeOf(c, field_access.data.lhs)) |ty_node| {
6628 if (ty_node.castTag(.@"struct") orelse ty_node.castTag(.@"union")) |container| {
6629 for (container.data.fields) |field| {
6630 if (mem.eql(u8, field.name, field_access.data.field_name)) {
6631 return getContainer(c, field.type);
6632 }
6633 }
6634 }
6635 }
6636 },
6637
6638 else => {},
6639 }
6640 return null;
6641}
6642
6643fn getContainerTypeOf(c: *Context, ref: Node) ?Node {
6644 if (ref.castTag(.identifier)) |ident| {
6645 if (c.global_scope.sym_table.get(ident.data)) |value| {
6646 if (value.castTag(.var_decl)) |var_decl| {
6647 return getContainer(c, var_decl.data.type);
6648 }
6649 }
6650 } else if (ref.castTag(.field_access)) |field_access| {
6651 if (getContainerTypeOf(c, field_access.data.lhs)) |ty_node| {
6652 if (ty_node.castTag(.@"struct") orelse ty_node.castTag(.@"union")) |container| {
6653 for (container.data.fields) |field| {
6654 if (mem.eql(u8, field.name, field_access.data.field_name)) {
6655 return getContainer(c, field.type);
6656 }
6657 }
6658 } else return ty_node;
6659 }
6660 }
6661 return null;
6662}
6663
6664fn getFnProto(c: *Context, ref: Node) ?*ast.Payload.Func {
6665 const init = if (ref.castTag(.var_decl)) |v|
6666 v.data.init orelse return null
6667 else if (ref.castTag(.var_simple) orelse ref.castTag(.pub_var_simple)) |v|
6668 v.data.init
6669 else
6670 return null;
6671 if (getContainerTypeOf(c, init)) |ty_node| {
6672 if (ty_node.castTag(.optional_type)) |prefix| {
6673 if (prefix.data.castTag(.single_pointer)) |sp| {
6674 if (sp.data.elem_type.castTag(.func)) |fn_proto| {
6675 return fn_proto;
6676 }
6677 }
6678 }
6679 }
6680 return null;
6681}
src/zig_clang.cpp deleted-4197
......@@ -1,4197 +0,0 @@
1/*
2 * Copyright (c) 2019 Andrew Kelley
3 *
4 * This file is part of zig, which is MIT licensed.
5 * See http://opensource.org/licenses/MIT
6 */
7
8
9/*
10 * The point of this file is to contain all the Clang C++ API interaction so that:
11 * 1. The compile time of other files is kept under control.
12 * 2. Provide a C interface to the Clang functions we need for self-hosting purposes.
13 * 3. Prevent C++ from infecting the rest of the project.
14 */
15#include "zig_clang.h"
16
17#if __GNUC__ >= 8
18#pragma GCC diagnostic push
19#pragma GCC diagnostic ignored "-Wclass-memaccess"
20#endif
21
22#include <clang/Frontend/ASTUnit.h>
23#include <clang/Frontend/CompilerInstance.h>
24#include <clang/AST/APValue.h>
25#include <clang/AST/Attr.h>
26#include <clang/AST/Expr.h>
27#include <clang/AST/RecordLayout.h>
28
29#if __GNUC__ >= 8
30#pragma GCC diagnostic pop
31#endif
32
33// Detect additions to the enum
34void ZigClang_detect_enum_BO(clang::BinaryOperatorKind op) {
35 switch (op) {
36 case clang::BO_PtrMemD:
37 case clang::BO_PtrMemI:
38 case clang::BO_Cmp:
39 case clang::BO_Mul:
40 case clang::BO_Div:
41 case clang::BO_Rem:
42 case clang::BO_Add:
43 case clang::BO_Sub:
44 case clang::BO_Shl:
45 case clang::BO_Shr:
46 case clang::BO_LT:
47 case clang::BO_GT:
48 case clang::BO_LE:
49 case clang::BO_GE:
50 case clang::BO_EQ:
51 case clang::BO_NE:
52 case clang::BO_And:
53 case clang::BO_Xor:
54 case clang::BO_Or:
55 case clang::BO_LAnd:
56 case clang::BO_LOr:
57 case clang::BO_Assign:
58 case clang::BO_Comma:
59 case clang::BO_MulAssign:
60 case clang::BO_DivAssign:
61 case clang::BO_RemAssign:
62 case clang::BO_AddAssign:
63 case clang::BO_SubAssign:
64 case clang::BO_ShlAssign:
65 case clang::BO_ShrAssign:
66 case clang::BO_AndAssign:
67 case clang::BO_XorAssign:
68 case clang::BO_OrAssign:
69 break;
70 }
71}
72
73static_assert((clang::BinaryOperatorKind)ZigClangBO_Add == clang::BO_Add, "");
74static_assert((clang::BinaryOperatorKind)ZigClangBO_AddAssign == clang::BO_AddAssign, "");
75static_assert((clang::BinaryOperatorKind)ZigClangBO_And == clang::BO_And, "");
76static_assert((clang::BinaryOperatorKind)ZigClangBO_AndAssign == clang::BO_AndAssign, "");
77static_assert((clang::BinaryOperatorKind)ZigClangBO_Assign == clang::BO_Assign, "");
78static_assert((clang::BinaryOperatorKind)ZigClangBO_Cmp == clang::BO_Cmp, "");
79static_assert((clang::BinaryOperatorKind)ZigClangBO_Comma == clang::BO_Comma, "");
80static_assert((clang::BinaryOperatorKind)ZigClangBO_Div == clang::BO_Div, "");
81static_assert((clang::BinaryOperatorKind)ZigClangBO_DivAssign == clang::BO_DivAssign, "");
82static_assert((clang::BinaryOperatorKind)ZigClangBO_EQ == clang::BO_EQ, "");
83static_assert((clang::BinaryOperatorKind)ZigClangBO_GE == clang::BO_GE, "");
84static_assert((clang::BinaryOperatorKind)ZigClangBO_GT == clang::BO_GT, "");
85static_assert((clang::BinaryOperatorKind)ZigClangBO_LAnd == clang::BO_LAnd, "");
86static_assert((clang::BinaryOperatorKind)ZigClangBO_LE == clang::BO_LE, "");
87static_assert((clang::BinaryOperatorKind)ZigClangBO_LOr == clang::BO_LOr, "");
88static_assert((clang::BinaryOperatorKind)ZigClangBO_LT == clang::BO_LT, "");
89static_assert((clang::BinaryOperatorKind)ZigClangBO_Mul == clang::BO_Mul, "");
90static_assert((clang::BinaryOperatorKind)ZigClangBO_MulAssign == clang::BO_MulAssign, "");
91static_assert((clang::BinaryOperatorKind)ZigClangBO_NE == clang::BO_NE, "");
92static_assert((clang::BinaryOperatorKind)ZigClangBO_Or == clang::BO_Or, "");
93static_assert((clang::BinaryOperatorKind)ZigClangBO_OrAssign == clang::BO_OrAssign, "");
94static_assert((clang::BinaryOperatorKind)ZigClangBO_PtrMemD == clang::BO_PtrMemD, "");
95static_assert((clang::BinaryOperatorKind)ZigClangBO_PtrMemI == clang::BO_PtrMemI, "");
96static_assert((clang::BinaryOperatorKind)ZigClangBO_Rem == clang::BO_Rem, "");
97static_assert((clang::BinaryOperatorKind)ZigClangBO_RemAssign == clang::BO_RemAssign, "");
98static_assert((clang::BinaryOperatorKind)ZigClangBO_Shl == clang::BO_Shl, "");
99static_assert((clang::BinaryOperatorKind)ZigClangBO_ShlAssign == clang::BO_ShlAssign, "");
100static_assert((clang::BinaryOperatorKind)ZigClangBO_Shr == clang::BO_Shr, "");
101static_assert((clang::BinaryOperatorKind)ZigClangBO_ShrAssign == clang::BO_ShrAssign, "");
102static_assert((clang::BinaryOperatorKind)ZigClangBO_Sub == clang::BO_Sub, "");
103static_assert((clang::BinaryOperatorKind)ZigClangBO_SubAssign == clang::BO_SubAssign, "");
104static_assert((clang::BinaryOperatorKind)ZigClangBO_Xor == clang::BO_Xor, "");
105static_assert((clang::BinaryOperatorKind)ZigClangBO_XorAssign == clang::BO_XorAssign, "");
106
107// Detect additions to the enum
108void ZigClang_detect_enum_UO(clang::UnaryOperatorKind op) {
109 switch (op) {
110 case clang::UO_AddrOf:
111 case clang::UO_Coawait:
112 case clang::UO_Deref:
113 case clang::UO_Extension:
114 case clang::UO_Imag:
115 case clang::UO_LNot:
116 case clang::UO_Minus:
117 case clang::UO_Not:
118 case clang::UO_Plus:
119 case clang::UO_PostDec:
120 case clang::UO_PostInc:
121 case clang::UO_PreDec:
122 case clang::UO_PreInc:
123 case clang::UO_Real:
124 break;
125 }
126}
127
128static_assert((clang::UnaryOperatorKind)ZigClangUO_AddrOf == clang::UO_AddrOf, "");
129static_assert((clang::UnaryOperatorKind)ZigClangUO_Coawait == clang::UO_Coawait, "");
130static_assert((clang::UnaryOperatorKind)ZigClangUO_Deref == clang::UO_Deref, "");
131static_assert((clang::UnaryOperatorKind)ZigClangUO_Extension == clang::UO_Extension, "");
132static_assert((clang::UnaryOperatorKind)ZigClangUO_Imag == clang::UO_Imag, "");
133static_assert((clang::UnaryOperatorKind)ZigClangUO_LNot == clang::UO_LNot, "");
134static_assert((clang::UnaryOperatorKind)ZigClangUO_Minus == clang::UO_Minus, "");
135static_assert((clang::UnaryOperatorKind)ZigClangUO_Not == clang::UO_Not, "");
136static_assert((clang::UnaryOperatorKind)ZigClangUO_Plus == clang::UO_Plus, "");
137static_assert((clang::UnaryOperatorKind)ZigClangUO_PostDec == clang::UO_PostDec, "");
138static_assert((clang::UnaryOperatorKind)ZigClangUO_PostInc == clang::UO_PostInc, "");
139static_assert((clang::UnaryOperatorKind)ZigClangUO_PreDec == clang::UO_PreDec, "");
140static_assert((clang::UnaryOperatorKind)ZigClangUO_PreInc == clang::UO_PreInc, "");
141static_assert((clang::UnaryOperatorKind)ZigClangUO_Real == clang::UO_Real, "");
142
143// Detect additions to the enum
144void ZigClang_detect_enum_CK(clang::CastKind x) {
145 switch (x) {
146 case clang::CK_ARCConsumeObject:
147 case clang::CK_ARCExtendBlockObject:
148 case clang::CK_ARCProduceObject:
149 case clang::CK_ARCReclaimReturnedObject:
150 case clang::CK_AddressSpaceConversion:
151 case clang::CK_AnyPointerToBlockPointerCast:
152 case clang::CK_ArrayToPointerDecay:
153 case clang::CK_AtomicToNonAtomic:
154 case clang::CK_BaseToDerived:
155 case clang::CK_BaseToDerivedMemberPointer:
156 case clang::CK_BitCast:
157 case clang::CK_BlockPointerToObjCPointerCast:
158 case clang::CK_BooleanToSignedIntegral:
159 case clang::CK_BuiltinFnToFnPtr:
160 case clang::CK_CPointerToObjCPointerCast:
161 case clang::CK_ConstructorConversion:
162 case clang::CK_CopyAndAutoreleaseBlockObject:
163 case clang::CK_Dependent:
164 case clang::CK_DerivedToBase:
165 case clang::CK_DerivedToBaseMemberPointer:
166 case clang::CK_Dynamic:
167 case clang::CK_FixedPointCast:
168 case clang::CK_FixedPointToBoolean:
169 case clang::CK_FixedPointToFloating:
170 case clang::CK_FixedPointToIntegral:
171 case clang::CK_FloatingCast:
172 case clang::CK_FloatingComplexCast:
173 case clang::CK_FloatingComplexToBoolean:
174 case clang::CK_FloatingComplexToIntegralComplex:
175 case clang::CK_FloatingComplexToReal:
176 case clang::CK_FloatingRealToComplex:
177 case clang::CK_FloatingToBoolean:
178 case clang::CK_FloatingToFixedPoint:
179 case clang::CK_FloatingToIntegral:
180 case clang::CK_FunctionToPointerDecay:
181 case clang::CK_IntToOCLSampler:
182 case clang::CK_IntegralCast:
183 case clang::CK_IntegralComplexCast:
184 case clang::CK_IntegralComplexToBoolean:
185 case clang::CK_IntegralComplexToFloatingComplex:
186 case clang::CK_IntegralComplexToReal:
187 case clang::CK_IntegralRealToComplex:
188 case clang::CK_IntegralToBoolean:
189 case clang::CK_IntegralToFixedPoint:
190 case clang::CK_IntegralToFloating:
191 case clang::CK_IntegralToPointer:
192 case clang::CK_LValueBitCast:
193 case clang::CK_LValueToRValue:
194 case clang::CK_LValueToRValueBitCast:
195 case clang::CK_MatrixCast:
196 case clang::CK_MemberPointerToBoolean:
197 case clang::CK_NoOp:
198 case clang::CK_NonAtomicToAtomic:
199 case clang::CK_NullToMemberPointer:
200 case clang::CK_NullToPointer:
201 case clang::CK_ObjCObjectLValueCast:
202 case clang::CK_PointerToBoolean:
203 case clang::CK_PointerToIntegral:
204 case clang::CK_ReinterpretMemberPointer:
205 case clang::CK_ToUnion:
206 case clang::CK_ToVoid:
207 case clang::CK_UncheckedDerivedToBase:
208 case clang::CK_UserDefinedConversion:
209 case clang::CK_VectorSplat:
210 case clang::CK_ZeroToOCLOpaqueType:
211 case clang::CK_HLSLVectorTruncation:
212 case clang::CK_HLSLArrayRValue:
213 break;
214 }
215};
216
217static_assert((clang::CastKind)ZigClangCK_Dependent == clang::CK_Dependent, "");
218static_assert((clang::CastKind)ZigClangCK_BitCast == clang::CK_BitCast, "");
219static_assert((clang::CastKind)ZigClangCK_LValueBitCast == clang::CK_LValueBitCast, "");
220static_assert((clang::CastKind)ZigClangCK_LValueToRValueBitCast == clang::CK_LValueToRValueBitCast, "");
221static_assert((clang::CastKind)ZigClangCK_LValueToRValue == clang::CK_LValueToRValue, "");
222static_assert((clang::CastKind)ZigClangCK_NoOp == clang::CK_NoOp, "");
223static_assert((clang::CastKind)ZigClangCK_BaseToDerived == clang::CK_BaseToDerived, "");
224static_assert((clang::CastKind)ZigClangCK_DerivedToBase == clang::CK_DerivedToBase, "");
225static_assert((clang::CastKind)ZigClangCK_UncheckedDerivedToBase == clang::CK_UncheckedDerivedToBase, "");
226static_assert((clang::CastKind)ZigClangCK_Dynamic == clang::CK_Dynamic, "");
227static_assert((clang::CastKind)ZigClangCK_ToUnion == clang::CK_ToUnion, "");
228static_assert((clang::CastKind)ZigClangCK_ArrayToPointerDecay == clang::CK_ArrayToPointerDecay, "");
229static_assert((clang::CastKind)ZigClangCK_FunctionToPointerDecay == clang::CK_FunctionToPointerDecay, "");
230static_assert((clang::CastKind)ZigClangCK_NullToPointer == clang::CK_NullToPointer, "");
231static_assert((clang::CastKind)ZigClangCK_NullToMemberPointer == clang::CK_NullToMemberPointer, "");
232static_assert((clang::CastKind)ZigClangCK_BaseToDerivedMemberPointer == clang::CK_BaseToDerivedMemberPointer, "");
233static_assert((clang::CastKind)ZigClangCK_DerivedToBaseMemberPointer == clang::CK_DerivedToBaseMemberPointer, "");
234static_assert((clang::CastKind)ZigClangCK_MemberPointerToBoolean == clang::CK_MemberPointerToBoolean, "");
235static_assert((clang::CastKind)ZigClangCK_ReinterpretMemberPointer == clang::CK_ReinterpretMemberPointer, "");
236static_assert((clang::CastKind)ZigClangCK_UserDefinedConversion == clang::CK_UserDefinedConversion, "");
237static_assert((clang::CastKind)ZigClangCK_ConstructorConversion == clang::CK_ConstructorConversion, "");
238static_assert((clang::CastKind)ZigClangCK_IntegralToPointer == clang::CK_IntegralToPointer, "");
239static_assert((clang::CastKind)ZigClangCK_PointerToIntegral == clang::CK_PointerToIntegral, "");
240static_assert((clang::CastKind)ZigClangCK_PointerToBoolean == clang::CK_PointerToBoolean, "");
241static_assert((clang::CastKind)ZigClangCK_ToVoid == clang::CK_ToVoid, "");
242static_assert((clang::CastKind)ZigClangCK_MatrixCast == clang::CK_MatrixCast, "");
243static_assert((clang::CastKind)ZigClangCK_VectorSplat == clang::CK_VectorSplat, "");
244static_assert((clang::CastKind)ZigClangCK_IntegralCast == clang::CK_IntegralCast, "");
245static_assert((clang::CastKind)ZigClangCK_IntegralToBoolean == clang::CK_IntegralToBoolean, "");
246static_assert((clang::CastKind)ZigClangCK_IntegralToFloating == clang::CK_IntegralToFloating, "");
247static_assert((clang::CastKind)ZigClangCK_FloatingToFixedPoint == clang::CK_FloatingToFixedPoint, "");
248static_assert((clang::CastKind)ZigClangCK_FixedPointToFloating == clang::CK_FixedPointToFloating, "");
249static_assert((clang::CastKind)ZigClangCK_FixedPointCast == clang::CK_FixedPointCast, "");
250static_assert((clang::CastKind)ZigClangCK_FixedPointToIntegral == clang::CK_FixedPointToIntegral, "");
251static_assert((clang::CastKind)ZigClangCK_IntegralToFixedPoint == clang::CK_IntegralToFixedPoint, "");
252static_assert((clang::CastKind)ZigClangCK_FixedPointToBoolean == clang::CK_FixedPointToBoolean, "");
253static_assert((clang::CastKind)ZigClangCK_FloatingToIntegral == clang::CK_FloatingToIntegral, "");
254static_assert((clang::CastKind)ZigClangCK_FloatingToBoolean == clang::CK_FloatingToBoolean, "");
255static_assert((clang::CastKind)ZigClangCK_BooleanToSignedIntegral == clang::CK_BooleanToSignedIntegral, "");
256static_assert((clang::CastKind)ZigClangCK_FloatingCast == clang::CK_FloatingCast, "");
257static_assert((clang::CastKind)ZigClangCK_CPointerToObjCPointerCast == clang::CK_CPointerToObjCPointerCast, "");
258static_assert((clang::CastKind)ZigClangCK_BlockPointerToObjCPointerCast == clang::CK_BlockPointerToObjCPointerCast, "");
259static_assert((clang::CastKind)ZigClangCK_AnyPointerToBlockPointerCast == clang::CK_AnyPointerToBlockPointerCast, "");
260static_assert((clang::CastKind)ZigClangCK_ObjCObjectLValueCast == clang::CK_ObjCObjectLValueCast, "");
261static_assert((clang::CastKind)ZigClangCK_FloatingRealToComplex == clang::CK_FloatingRealToComplex, "");
262static_assert((clang::CastKind)ZigClangCK_FloatingComplexToReal == clang::CK_FloatingComplexToReal, "");
263static_assert((clang::CastKind)ZigClangCK_FloatingComplexToBoolean == clang::CK_FloatingComplexToBoolean, "");
264static_assert((clang::CastKind)ZigClangCK_FloatingComplexCast == clang::CK_FloatingComplexCast, "");
265static_assert((clang::CastKind)ZigClangCK_FloatingComplexToIntegralComplex == clang::CK_FloatingComplexToIntegralComplex, "");
266static_assert((clang::CastKind)ZigClangCK_IntegralRealToComplex == clang::CK_IntegralRealToComplex, "");
267static_assert((clang::CastKind)ZigClangCK_IntegralComplexToReal == clang::CK_IntegralComplexToReal, "");
268static_assert((clang::CastKind)ZigClangCK_IntegralComplexToBoolean == clang::CK_IntegralComplexToBoolean, "");
269static_assert((clang::CastKind)ZigClangCK_IntegralComplexCast == clang::CK_IntegralComplexCast, "");
270static_assert((clang::CastKind)ZigClangCK_IntegralComplexToFloatingComplex == clang::CK_IntegralComplexToFloatingComplex, "");
271static_assert((clang::CastKind)ZigClangCK_ARCProduceObject == clang::CK_ARCProduceObject, "");
272static_assert((clang::CastKind)ZigClangCK_ARCConsumeObject == clang::CK_ARCConsumeObject, "");
273static_assert((clang::CastKind)ZigClangCK_ARCReclaimReturnedObject == clang::CK_ARCReclaimReturnedObject, "");
274static_assert((clang::CastKind)ZigClangCK_ARCExtendBlockObject == clang::CK_ARCExtendBlockObject, "");
275static_assert((clang::CastKind)ZigClangCK_AtomicToNonAtomic == clang::CK_AtomicToNonAtomic, "");
276static_assert((clang::CastKind)ZigClangCK_NonAtomicToAtomic == clang::CK_NonAtomicToAtomic, "");
277static_assert((clang::CastKind)ZigClangCK_CopyAndAutoreleaseBlockObject == clang::CK_CopyAndAutoreleaseBlockObject, "");
278static_assert((clang::CastKind)ZigClangCK_BuiltinFnToFnPtr == clang::CK_BuiltinFnToFnPtr, "");
279static_assert((clang::CastKind)ZigClangCK_ZeroToOCLOpaqueType == clang::CK_ZeroToOCLOpaqueType, "");
280static_assert((clang::CastKind)ZigClangCK_AddressSpaceConversion == clang::CK_AddressSpaceConversion, "");
281static_assert((clang::CastKind)ZigClangCK_IntToOCLSampler == clang::CK_IntToOCLSampler, "");
282
283// Detect additions to the enum
284void ZigClang_detect_enum_TypeClass(clang::Type::TypeClass ty) {
285 switch (ty) {
286 case clang::Type::Builtin:
287 case clang::Type::Complex:
288 case clang::Type::Pointer:
289 case clang::Type::BlockPointer:
290 case clang::Type::CountAttributed:
291 case clang::Type::LValueReference:
292 case clang::Type::RValueReference:
293 case clang::Type::MemberPointer:
294 case clang::Type::ConstantArray:
295 case clang::Type::ArrayParameter:
296 case clang::Type::IncompleteArray:
297 case clang::Type::VariableArray:
298 case clang::Type::DependentSizedArray:
299 case clang::Type::DependentSizedExtVector:
300 case clang::Type::DependentAddressSpace:
301 case clang::Type::DependentBitInt:
302 case clang::Type::Vector:
303 case clang::Type::DependentVector:
304 case clang::Type::ExtVector:
305 case clang::Type::FunctionProto:
306 case clang::Type::FunctionNoProto:
307 case clang::Type::UnresolvedUsing:
308 case clang::Type::Using:
309 case clang::Type::Paren:
310 case clang::Type::Typedef:
311 case clang::Type::MacroQualified:
312 case clang::Type::ConstantMatrix:
313 case clang::Type::DependentSizedMatrix:
314 case clang::Type::Adjusted:
315 case clang::Type::Decayed:
316 case clang::Type::TypeOfExpr:
317 case clang::Type::TypeOf:
318 case clang::Type::Decltype:
319 case clang::Type::UnaryTransform:
320 case clang::Type::Record:
321 case clang::Type::Enum:
322 case clang::Type::Elaborated:
323 case clang::Type::Attributed:
324 case clang::Type::BTFTagAttributed:
325 case clang::Type::BitInt:
326 case clang::Type::TemplateTypeParm:
327 case clang::Type::SubstTemplateTypeParm:
328 case clang::Type::SubstTemplateTypeParmPack:
329 case clang::Type::TemplateSpecialization:
330 case clang::Type::Auto:
331 case clang::Type::DeducedTemplateSpecialization:
332 case clang::Type::HLSLAttributedResource:
333 case clang::Type::HLSLInlineSpirv:
334 case clang::Type::InjectedClassName:
335 case clang::Type::DependentName:
336 case clang::Type::DependentTemplateSpecialization:
337 case clang::Type::PackExpansion:
338 case clang::Type::PackIndexing:
339 case clang::Type::ObjCTypeParam:
340 case clang::Type::ObjCObject:
341 case clang::Type::ObjCInterface:
342 case clang::Type::ObjCObjectPointer:
343 case clang::Type::Pipe:
344 case clang::Type::Atomic:
345 break;
346 }
347}
348
349static_assert((clang::Type::TypeClass)ZigClangType_Adjusted == clang::Type::Adjusted, "");
350static_assert((clang::Type::TypeClass)ZigClangType_Decayed == clang::Type::Decayed, "");
351static_assert((clang::Type::TypeClass)ZigClangType_ConstantArray == clang::Type::ConstantArray, "");
352static_assert((clang::Type::TypeClass)ZigClangType_ArrayParameter == clang::Type::ArrayParameter, "");
353static_assert((clang::Type::TypeClass)ZigClangType_DependentSizedArray == clang::Type::DependentSizedArray, "");
354static_assert((clang::Type::TypeClass)ZigClangType_IncompleteArray == clang::Type::IncompleteArray, "");
355static_assert((clang::Type::TypeClass)ZigClangType_VariableArray == clang::Type::VariableArray, "");
356static_assert((clang::Type::TypeClass)ZigClangType_Atomic == clang::Type::Atomic, "");
357static_assert((clang::Type::TypeClass)ZigClangType_Attributed == clang::Type::Attributed, "");
358static_assert((clang::Type::TypeClass)ZigClangType_BTFTagAttributed == clang::Type::BTFTagAttributed, "");
359static_assert((clang::Type::TypeClass)ZigClangType_BitInt == clang::Type::BitInt, "");
360static_assert((clang::Type::TypeClass)ZigClangType_BlockPointer == clang::Type::BlockPointer, "");
361static_assert((clang::Type::TypeClass)ZigClangType_CountAttributed == clang::Type::CountAttributed, "");
362static_assert((clang::Type::TypeClass)ZigClangType_Builtin == clang::Type::Builtin, "");
363static_assert((clang::Type::TypeClass)ZigClangType_Complex == clang::Type::Complex, "");
364static_assert((clang::Type::TypeClass)ZigClangType_Decltype == clang::Type::Decltype, "");
365static_assert((clang::Type::TypeClass)ZigClangType_Auto == clang::Type::Auto, "");
366static_assert((clang::Type::TypeClass)ZigClangType_DeducedTemplateSpecialization == clang::Type::DeducedTemplateSpecialization, "");
367static_assert((clang::Type::TypeClass)ZigClangType_DependentAddressSpace == clang::Type::DependentAddressSpace, "");
368static_assert((clang::Type::TypeClass)ZigClangType_DependentBitInt == clang::Type::DependentBitInt, "");
369static_assert((clang::Type::TypeClass)ZigClangType_DependentName == clang::Type::DependentName, "");
370static_assert((clang::Type::TypeClass)ZigClangType_DependentSizedExtVector == clang::Type::DependentSizedExtVector, "");
371static_assert((clang::Type::TypeClass)ZigClangType_DependentTemplateSpecialization == clang::Type::DependentTemplateSpecialization, "");
372static_assert((clang::Type::TypeClass)ZigClangType_DependentVector == clang::Type::DependentVector, "");
373static_assert((clang::Type::TypeClass)ZigClangType_Elaborated == clang::Type::Elaborated, "");
374static_assert((clang::Type::TypeClass)ZigClangType_FunctionNoProto == clang::Type::FunctionNoProto, "");
375static_assert((clang::Type::TypeClass)ZigClangType_FunctionProto == clang::Type::FunctionProto, "");
376static_assert((clang::Type::TypeClass)ZigClangType_HLSLAttributedResource == clang::Type::HLSLAttributedResource, "");
377static_assert((clang::Type::TypeClass)ZigClangType_HLSLInlineSpirv == clang::Type::HLSLInlineSpirv, "");
378static_assert((clang::Type::TypeClass)ZigClangType_InjectedClassName == clang::Type::InjectedClassName, "");
379static_assert((clang::Type::TypeClass)ZigClangType_MacroQualified == clang::Type::MacroQualified, "");
380static_assert((clang::Type::TypeClass)ZigClangType_ConstantMatrix == clang::Type::ConstantMatrix, "");
381static_assert((clang::Type::TypeClass)ZigClangType_DependentSizedMatrix == clang::Type::DependentSizedMatrix, "");
382static_assert((clang::Type::TypeClass)ZigClangType_MemberPointer == clang::Type::MemberPointer, "");
383static_assert((clang::Type::TypeClass)ZigClangType_ObjCObjectPointer == clang::Type::ObjCObjectPointer, "");
384static_assert((clang::Type::TypeClass)ZigClangType_ObjCObject == clang::Type::ObjCObject, "");
385static_assert((clang::Type::TypeClass)ZigClangType_ObjCInterface == clang::Type::ObjCInterface, "");
386static_assert((clang::Type::TypeClass)ZigClangType_ObjCTypeParam == clang::Type::ObjCTypeParam, "");
387static_assert((clang::Type::TypeClass)ZigClangType_PackExpansion == clang::Type::PackExpansion, "");
388static_assert((clang::Type::TypeClass)ZigClangType_PackIndexing == clang::Type::PackIndexing, "");
389static_assert((clang::Type::TypeClass)ZigClangType_Paren == clang::Type::Paren, "");
390static_assert((clang::Type::TypeClass)ZigClangType_Pipe == clang::Type::Pipe, "");
391static_assert((clang::Type::TypeClass)ZigClangType_Pointer == clang::Type::Pointer, "");
392static_assert((clang::Type::TypeClass)ZigClangType_LValueReference == clang::Type::LValueReference, "");
393static_assert((clang::Type::TypeClass)ZigClangType_RValueReference == clang::Type::RValueReference, "");
394static_assert((clang::Type::TypeClass)ZigClangType_SubstTemplateTypeParmPack == clang::Type::SubstTemplateTypeParmPack, "");
395static_assert((clang::Type::TypeClass)ZigClangType_SubstTemplateTypeParm == clang::Type::SubstTemplateTypeParm, "");
396static_assert((clang::Type::TypeClass)ZigClangType_Enum == clang::Type::Enum, "");
397static_assert((clang::Type::TypeClass)ZigClangType_Record == clang::Type::Record, "");
398static_assert((clang::Type::TypeClass)ZigClangType_TemplateSpecialization == clang::Type::TemplateSpecialization, "");
399static_assert((clang::Type::TypeClass)ZigClangType_TemplateTypeParm == clang::Type::TemplateTypeParm, "");
400static_assert((clang::Type::TypeClass)ZigClangType_TypeOfExpr == clang::Type::TypeOfExpr, "");
401static_assert((clang::Type::TypeClass)ZigClangType_TypeOf == clang::Type::TypeOf, "");
402static_assert((clang::Type::TypeClass)ZigClangType_Typedef == clang::Type::Typedef, "");
403static_assert((clang::Type::TypeClass)ZigClangType_UnaryTransform == clang::Type::UnaryTransform, "");
404static_assert((clang::Type::TypeClass)ZigClangType_UnresolvedUsing == clang::Type::UnresolvedUsing, "");
405static_assert((clang::Type::TypeClass)ZigClangType_Using == clang::Type::Using, "");
406static_assert((clang::Type::TypeClass)ZigClangType_Vector == clang::Type::Vector, "");
407static_assert((clang::Type::TypeClass)ZigClangType_ExtVector == clang::Type::ExtVector, "");
408
409// Detect additions to the enum
410void ZigClang_detect_enum_StmtClass(clang::Stmt::StmtClass x) {
411 switch (x) {
412 case clang::Stmt::NoStmtClass:
413 case clang::Stmt::WhileStmtClass:
414 case clang::Stmt::LabelStmtClass:
415 case clang::Stmt::VAArgExprClass:
416 case clang::Stmt::UnaryOperatorClass:
417 case clang::Stmt::UnaryExprOrTypeTraitExprClass:
418 case clang::Stmt::TypeTraitExprClass:
419 case clang::Stmt::SubstNonTypeTemplateParmPackExprClass:
420 case clang::Stmt::SubstNonTypeTemplateParmExprClass:
421 case clang::Stmt::StringLiteralClass:
422 case clang::Stmt::StmtExprClass:
423 case clang::Stmt::SourceLocExprClass:
424 case clang::Stmt::SizeOfPackExprClass:
425 case clang::Stmt::ShuffleVectorExprClass:
426 case clang::Stmt::SYCLUniqueStableNameExprClass:
427 case clang::Stmt::RequiresExprClass:
428 case clang::Stmt::RecoveryExprClass:
429 case clang::Stmt::PseudoObjectExprClass:
430 case clang::Stmt::PredefinedExprClass:
431 case clang::Stmt::ParenListExprClass:
432 case clang::Stmt::ParenExprClass:
433 case clang::Stmt::PackIndexingExprClass:
434 case clang::Stmt::PackExpansionExprClass:
435 case clang::Stmt::UnresolvedMemberExprClass:
436 case clang::Stmt::UnresolvedLookupExprClass:
437 case clang::Stmt::OpenACCAsteriskSizeExprClass:
438 case clang::Stmt::OpaqueValueExprClass:
439 case clang::Stmt::OffsetOfExprClass:
440 case clang::Stmt::ObjCSubscriptRefExprClass:
441 case clang::Stmt::ObjCStringLiteralClass:
442 case clang::Stmt::ObjCSelectorExprClass:
443 case clang::Stmt::ObjCProtocolExprClass:
444 case clang::Stmt::ObjCPropertyRefExprClass:
445 case clang::Stmt::ObjCMessageExprClass:
446 case clang::Stmt::ObjCIvarRefExprClass:
447 case clang::Stmt::ObjCIsaExprClass:
448 case clang::Stmt::ObjCIndirectCopyRestoreExprClass:
449 case clang::Stmt::ObjCEncodeExprClass:
450 case clang::Stmt::ObjCDictionaryLiteralClass:
451 case clang::Stmt::ObjCBoxedExprClass:
452 case clang::Stmt::ObjCBoolLiteralExprClass:
453 case clang::Stmt::ObjCAvailabilityCheckExprClass:
454 case clang::Stmt::ObjCArrayLiteralClass:
455 case clang::Stmt::OMPIteratorExprClass:
456 case clang::Stmt::OMPArrayShapingExprClass:
457 case clang::Stmt::NoInitExprClass:
458 case clang::Stmt::MemberExprClass:
459 case clang::Stmt::MatrixSubscriptExprClass:
460 case clang::Stmt::MaterializeTemporaryExprClass:
461 case clang::Stmt::MSPropertySubscriptExprClass:
462 case clang::Stmt::MSPropertyRefExprClass:
463 case clang::Stmt::LambdaExprClass:
464 case clang::Stmt::IntegerLiteralClass:
465 case clang::Stmt::InitListExprClass:
466 case clang::Stmt::ImplicitValueInitExprClass:
467 case clang::Stmt::ImaginaryLiteralClass:
468 case clang::Stmt::HLSLOutArgExprClass:
469 case clang::Stmt::GenericSelectionExprClass:
470 case clang::Stmt::GNUNullExprClass:
471 case clang::Stmt::FunctionParmPackExprClass:
472 case clang::Stmt::ExprWithCleanupsClass:
473 case clang::Stmt::ConstantExprClass:
474 case clang::Stmt::FloatingLiteralClass:
475 case clang::Stmt::FixedPointLiteralClass:
476 case clang::Stmt::ExtVectorElementExprClass:
477 case clang::Stmt::ExpressionTraitExprClass:
478 case clang::Stmt::EmbedExprClass:
479 case clang::Stmt::DesignatedInitUpdateExprClass:
480 case clang::Stmt::DesignatedInitExprClass:
481 case clang::Stmt::DependentScopeDeclRefExprClass:
482 case clang::Stmt::DependentCoawaitExprClass:
483 case clang::Stmt::DeclRefExprClass:
484 case clang::Stmt::CoyieldExprClass:
485 case clang::Stmt::CoawaitExprClass:
486 case clang::Stmt::ConvertVectorExprClass:
487 case clang::Stmt::ConceptSpecializationExprClass:
488 case clang::Stmt::CompoundLiteralExprClass:
489 case clang::Stmt::ChooseExprClass:
490 case clang::Stmt::CharacterLiteralClass:
491 case clang::Stmt::ImplicitCastExprClass:
492 case clang::Stmt::ObjCBridgedCastExprClass:
493 case clang::Stmt::CXXStaticCastExprClass:
494 case clang::Stmt::CXXReinterpretCastExprClass:
495 case clang::Stmt::CXXDynamicCastExprClass:
496 case clang::Stmt::CXXConstCastExprClass:
497 case clang::Stmt::CXXAddrspaceCastExprClass:
498 case clang::Stmt::CXXFunctionalCastExprClass:
499 case clang::Stmt::CStyleCastExprClass:
500 case clang::Stmt::BuiltinBitCastExprClass:
501 case clang::Stmt::CallExprClass:
502 case clang::Stmt::UserDefinedLiteralClass:
503 case clang::Stmt::CXXOperatorCallExprClass:
504 case clang::Stmt::CXXMemberCallExprClass:
505 case clang::Stmt::CUDAKernelCallExprClass:
506 case clang::Stmt::CXXUuidofExprClass:
507 case clang::Stmt::CXXUnresolvedConstructExprClass:
508 case clang::Stmt::CXXTypeidExprClass:
509 case clang::Stmt::CXXThrowExprClass:
510 case clang::Stmt::CXXThisExprClass:
511 case clang::Stmt::CXXStdInitializerListExprClass:
512 case clang::Stmt::CXXScalarValueInitExprClass:
513 case clang::Stmt::CXXRewrittenBinaryOperatorClass:
514 case clang::Stmt::CXXPseudoDestructorExprClass:
515 case clang::Stmt::CXXParenListInitExprClass:
516 case clang::Stmt::CXXNullPtrLiteralExprClass:
517 case clang::Stmt::CXXNoexceptExprClass:
518 case clang::Stmt::CXXNewExprClass:
519 case clang::Stmt::CXXInheritedCtorInitExprClass:
520 case clang::Stmt::CXXFoldExprClass:
521 case clang::Stmt::CXXDependentScopeMemberExprClass:
522 case clang::Stmt::CXXDeleteExprClass:
523 case clang::Stmt::CXXDefaultInitExprClass:
524 case clang::Stmt::CXXDefaultArgExprClass:
525 case clang::Stmt::CXXConstructExprClass:
526 case clang::Stmt::CXXTemporaryObjectExprClass:
527 case clang::Stmt::CXXBoolLiteralExprClass:
528 case clang::Stmt::CXXBindTemporaryExprClass:
529 case clang::Stmt::BlockExprClass:
530 case clang::Stmt::BinaryOperatorClass:
531 case clang::Stmt::CompoundAssignOperatorClass:
532 case clang::Stmt::AtomicExprClass:
533 case clang::Stmt::AsTypeExprClass:
534 case clang::Stmt::ArrayTypeTraitExprClass:
535 case clang::Stmt::ArraySubscriptExprClass:
536 case clang::Stmt::ArraySectionExprClass:
537 case clang::Stmt::ArrayInitLoopExprClass:
538 case clang::Stmt::ArrayInitIndexExprClass:
539 case clang::Stmt::AddrLabelExprClass:
540 case clang::Stmt::ConditionalOperatorClass:
541 case clang::Stmt::BinaryConditionalOperatorClass:
542 case clang::Stmt::AttributedStmtClass:
543 case clang::Stmt::SwitchStmtClass:
544 case clang::Stmt::DefaultStmtClass:
545 case clang::Stmt::CaseStmtClass:
546 case clang::Stmt::SYCLKernelCallStmtClass:
547 case clang::Stmt::SEHTryStmtClass:
548 case clang::Stmt::SEHLeaveStmtClass:
549 case clang::Stmt::SEHFinallyStmtClass:
550 case clang::Stmt::SEHExceptStmtClass:
551 case clang::Stmt::ReturnStmtClass:
552 case clang::Stmt::OpenACCWaitConstructClass:
553 case clang::Stmt::OpenACCUpdateConstructClass:
554 case clang::Stmt::OpenACCShutdownConstructClass:
555 case clang::Stmt::OpenACCSetConstructClass:
556 case clang::Stmt::OpenACCInitConstructClass:
557 case clang::Stmt::OpenACCExitDataConstructClass:
558 case clang::Stmt::OpenACCEnterDataConstructClass:
559 case clang::Stmt::OpenACCCacheConstructClass:
560 case clang::Stmt::OpenACCLoopConstructClass:
561 case clang::Stmt::OpenACCHostDataConstructClass:
562 case clang::Stmt::OpenACCDataConstructClass:
563 case clang::Stmt::OpenACCComputeConstructClass:
564 case clang::Stmt::OpenACCCombinedConstructClass:
565 case clang::Stmt::OpenACCAtomicConstructClass:
566 case clang::Stmt::ObjCForCollectionStmtClass:
567 case clang::Stmt::ObjCAutoreleasePoolStmtClass:
568 case clang::Stmt::ObjCAtTryStmtClass:
569 case clang::Stmt::ObjCAtThrowStmtClass:
570 case clang::Stmt::ObjCAtSynchronizedStmtClass:
571 case clang::Stmt::ObjCAtFinallyStmtClass:
572 case clang::Stmt::ObjCAtCatchStmtClass:
573 case clang::Stmt::OMPTeamsDirectiveClass:
574 case clang::Stmt::OMPTaskyieldDirectiveClass:
575 case clang::Stmt::OMPTaskwaitDirectiveClass:
576 case clang::Stmt::OMPTaskgroupDirectiveClass:
577 case clang::Stmt::OMPTaskDirectiveClass:
578 case clang::Stmt::OMPTargetUpdateDirectiveClass:
579 case clang::Stmt::OMPTargetTeamsDirectiveClass:
580 case clang::Stmt::OMPTargetParallelForDirectiveClass:
581 case clang::Stmt::OMPTargetParallelDirectiveClass:
582 case clang::Stmt::OMPTargetExitDataDirectiveClass:
583 case clang::Stmt::OMPTargetEnterDataDirectiveClass:
584 case clang::Stmt::OMPTargetDirectiveClass:
585 case clang::Stmt::OMPTargetDataDirectiveClass:
586 case clang::Stmt::OMPSingleDirectiveClass:
587 case clang::Stmt::OMPSectionsDirectiveClass:
588 case clang::Stmt::OMPSectionDirectiveClass:
589 case clang::Stmt::OMPScopeDirectiveClass:
590 case clang::Stmt::OMPScanDirectiveClass:
591 case clang::Stmt::OMPParallelSectionsDirectiveClass:
592 case clang::Stmt::OMPParallelMasterDirectiveClass:
593 case clang::Stmt::OMPParallelMaskedDirectiveClass:
594 case clang::Stmt::OMPParallelDirectiveClass:
595 case clang::Stmt::OMPOrderedDirectiveClass:
596 case clang::Stmt::OMPMetaDirectiveClass:
597 case clang::Stmt::OMPMasterDirectiveClass:
598 case clang::Stmt::OMPMaskedDirectiveClass:
599 case clang::Stmt::OMPUnrollDirectiveClass:
600 case clang::Stmt::OMPTileDirectiveClass:
601 case clang::Stmt::OMPStripeDirectiveClass:
602 case clang::Stmt::OMPReverseDirectiveClass:
603 case clang::Stmt::OMPInterchangeDirectiveClass:
604 case clang::Stmt::OMPTeamsGenericLoopDirectiveClass:
605 case clang::Stmt::OMPTeamsDistributeSimdDirectiveClass:
606 case clang::Stmt::OMPTeamsDistributeParallelForSimdDirectiveClass:
607 case clang::Stmt::OMPTeamsDistributeParallelForDirectiveClass:
608 case clang::Stmt::OMPTeamsDistributeDirectiveClass:
609 case clang::Stmt::OMPTaskLoopSimdDirectiveClass:
610 case clang::Stmt::OMPTaskLoopDirectiveClass:
611 case clang::Stmt::OMPTargetTeamsGenericLoopDirectiveClass:
612 case clang::Stmt::OMPTargetTeamsDistributeSimdDirectiveClass:
613 case clang::Stmt::OMPTargetTeamsDistributeParallelForSimdDirectiveClass:
614 case clang::Stmt::OMPTargetTeamsDistributeParallelForDirectiveClass:
615 case clang::Stmt::OMPTargetTeamsDistributeDirectiveClass:
616 case clang::Stmt::OMPTargetSimdDirectiveClass:
617 case clang::Stmt::OMPTargetParallelGenericLoopDirectiveClass:
618 case clang::Stmt::OMPTargetParallelForSimdDirectiveClass:
619 case clang::Stmt::OMPSimdDirectiveClass:
620 case clang::Stmt::OMPParallelMasterTaskLoopSimdDirectiveClass:
621 case clang::Stmt::OMPParallelMasterTaskLoopDirectiveClass:
622 case clang::Stmt::OMPParallelMaskedTaskLoopSimdDirectiveClass:
623 case clang::Stmt::OMPParallelMaskedTaskLoopDirectiveClass:
624 case clang::Stmt::OMPParallelGenericLoopDirectiveClass:
625 case clang::Stmt::OMPParallelForSimdDirectiveClass:
626 case clang::Stmt::OMPParallelForDirectiveClass:
627 case clang::Stmt::OMPMasterTaskLoopSimdDirectiveClass:
628 case clang::Stmt::OMPMasterTaskLoopDirectiveClass:
629 case clang::Stmt::OMPMaskedTaskLoopSimdDirectiveClass:
630 case clang::Stmt::OMPMaskedTaskLoopDirectiveClass:
631 case clang::Stmt::OMPGenericLoopDirectiveClass:
632 case clang::Stmt::OMPForSimdDirectiveClass:
633 case clang::Stmt::OMPForDirectiveClass:
634 case clang::Stmt::OMPDistributeSimdDirectiveClass:
635 case clang::Stmt::OMPDistributeParallelForSimdDirectiveClass:
636 case clang::Stmt::OMPDistributeParallelForDirectiveClass:
637 case clang::Stmt::OMPDistributeDirectiveClass:
638 case clang::Stmt::OMPInteropDirectiveClass:
639 case clang::Stmt::OMPFlushDirectiveClass:
640 case clang::Stmt::OMPErrorDirectiveClass:
641 case clang::Stmt::OMPDispatchDirectiveClass:
642 case clang::Stmt::OMPDepobjDirectiveClass:
643 case clang::Stmt::OMPCriticalDirectiveClass:
644 case clang::Stmt::OMPCancellationPointDirectiveClass:
645 case clang::Stmt::OMPCancelDirectiveClass:
646 case clang::Stmt::OMPBarrierDirectiveClass:
647 case clang::Stmt::OMPAtomicDirectiveClass:
648 case clang::Stmt::OMPAssumeDirectiveClass:
649 case clang::Stmt::OMPCanonicalLoopClass:
650 case clang::Stmt::NullStmtClass:
651 case clang::Stmt::MSDependentExistsStmtClass:
652 case clang::Stmt::IndirectGotoStmtClass:
653 case clang::Stmt::IfStmtClass:
654 case clang::Stmt::GotoStmtClass:
655 case clang::Stmt::ForStmtClass:
656 case clang::Stmt::DoStmtClass:
657 case clang::Stmt::DeclStmtClass:
658 case clang::Stmt::CoroutineBodyStmtClass:
659 case clang::Stmt::CoreturnStmtClass:
660 case clang::Stmt::ContinueStmtClass:
661 case clang::Stmt::CompoundStmtClass:
662 case clang::Stmt::CapturedStmtClass:
663 case clang::Stmt::CXXTryStmtClass:
664 case clang::Stmt::CXXForRangeStmtClass:
665 case clang::Stmt::CXXCatchStmtClass:
666 case clang::Stmt::BreakStmtClass:
667 case clang::Stmt::MSAsmStmtClass:
668 case clang::Stmt::GCCAsmStmtClass:
669 break;
670 }
671}
672
673static_assert((clang::Stmt::StmtClass)ZigClangStmt_NoStmtClass == clang::Stmt::NoStmtClass, "");
674static_assert((clang::Stmt::StmtClass)ZigClangStmt_WhileStmtClass == clang::Stmt::WhileStmtClass, "");
675static_assert((clang::Stmt::StmtClass)ZigClangStmt_LabelStmtClass == clang::Stmt::LabelStmtClass, "");
676static_assert((clang::Stmt::StmtClass)ZigClangStmt_VAArgExprClass == clang::Stmt::VAArgExprClass, "");
677static_assert((clang::Stmt::StmtClass)ZigClangStmt_UnaryOperatorClass == clang::Stmt::UnaryOperatorClass, "");
678static_assert((clang::Stmt::StmtClass)ZigClangStmt_UnaryExprOrTypeTraitExprClass == clang::Stmt::UnaryExprOrTypeTraitExprClass, "");
679static_assert((clang::Stmt::StmtClass)ZigClangStmt_TypeTraitExprClass == clang::Stmt::TypeTraitExprClass, "");
680static_assert((clang::Stmt::StmtClass)ZigClangStmt_SubstNonTypeTemplateParmPackExprClass == clang::Stmt::SubstNonTypeTemplateParmPackExprClass, "");
681static_assert((clang::Stmt::StmtClass)ZigClangStmt_SubstNonTypeTemplateParmExprClass == clang::Stmt::SubstNonTypeTemplateParmExprClass, "");
682static_assert((clang::Stmt::StmtClass)ZigClangStmt_StringLiteralClass == clang::Stmt::StringLiteralClass, "");
683static_assert((clang::Stmt::StmtClass)ZigClangStmt_StmtExprClass == clang::Stmt::StmtExprClass, "");
684static_assert((clang::Stmt::StmtClass)ZigClangStmt_SourceLocExprClass == clang::Stmt::SourceLocExprClass, "");
685static_assert((clang::Stmt::StmtClass)ZigClangStmt_SizeOfPackExprClass == clang::Stmt::SizeOfPackExprClass, "");
686static_assert((clang::Stmt::StmtClass)ZigClangStmt_ShuffleVectorExprClass == clang::Stmt::ShuffleVectorExprClass, "");
687static_assert((clang::Stmt::StmtClass)ZigClangStmt_SYCLUniqueStableNameExprClass == clang::Stmt::SYCLUniqueStableNameExprClass, "");
688static_assert((clang::Stmt::StmtClass)ZigClangStmt_RequiresExprClass == clang::Stmt::RequiresExprClass, "");
689static_assert((clang::Stmt::StmtClass)ZigClangStmt_RecoveryExprClass == clang::Stmt::RecoveryExprClass, "");
690static_assert((clang::Stmt::StmtClass)ZigClangStmt_PseudoObjectExprClass == clang::Stmt::PseudoObjectExprClass, "");
691static_assert((clang::Stmt::StmtClass)ZigClangStmt_PredefinedExprClass == clang::Stmt::PredefinedExprClass, "");
692static_assert((clang::Stmt::StmtClass)ZigClangStmt_ParenListExprClass == clang::Stmt::ParenListExprClass, "");
693static_assert((clang::Stmt::StmtClass)ZigClangStmt_ParenExprClass == clang::Stmt::ParenExprClass, "");
694static_assert((clang::Stmt::StmtClass)ZigClangStmt_PackIndexingExprClass == clang::Stmt::PackIndexingExprClass, "");
695static_assert((clang::Stmt::StmtClass)ZigClangStmt_PackExpansionExprClass == clang::Stmt::PackExpansionExprClass, "");
696static_assert((clang::Stmt::StmtClass)ZigClangStmt_UnresolvedMemberExprClass == clang::Stmt::UnresolvedMemberExprClass, "");
697static_assert((clang::Stmt::StmtClass)ZigClangStmt_UnresolvedLookupExprClass == clang::Stmt::UnresolvedLookupExprClass, "");
698static_assert((clang::Stmt::StmtClass)ZigClangStmt_OpenACCAsteriskSizeExprClass == clang::Stmt::OpenACCAsteriskSizeExprClass, "");
699static_assert((clang::Stmt::StmtClass)ZigClangStmt_OpaqueValueExprClass == clang::Stmt::OpaqueValueExprClass, "");
700static_assert((clang::Stmt::StmtClass)ZigClangStmt_OffsetOfExprClass == clang::Stmt::OffsetOfExprClass, "");
701static_assert((clang::Stmt::StmtClass)ZigClangStmt_ObjCSubscriptRefExprClass == clang::Stmt::ObjCSubscriptRefExprClass, "");
702static_assert((clang::Stmt::StmtClass)ZigClangStmt_ObjCStringLiteralClass == clang::Stmt::ObjCStringLiteralClass, "");
703static_assert((clang::Stmt::StmtClass)ZigClangStmt_ObjCSelectorExprClass == clang::Stmt::ObjCSelectorExprClass, "");
704static_assert((clang::Stmt::StmtClass)ZigClangStmt_ObjCProtocolExprClass == clang::Stmt::ObjCProtocolExprClass, "");
705static_assert((clang::Stmt::StmtClass)ZigClangStmt_ObjCPropertyRefExprClass == clang::Stmt::ObjCPropertyRefExprClass, "");
706static_assert((clang::Stmt::StmtClass)ZigClangStmt_ObjCMessageExprClass == clang::Stmt::ObjCMessageExprClass, "");
707static_assert((clang::Stmt::StmtClass)ZigClangStmt_ObjCIvarRefExprClass == clang::Stmt::ObjCIvarRefExprClass, "");
708static_assert((clang::Stmt::StmtClass)ZigClangStmt_ObjCIsaExprClass == clang::Stmt::ObjCIsaExprClass, "");
709static_assert((clang::Stmt::StmtClass)ZigClangStmt_ObjCIndirectCopyRestoreExprClass == clang::Stmt::ObjCIndirectCopyRestoreExprClass, "");
710static_assert((clang::Stmt::StmtClass)ZigClangStmt_ObjCEncodeExprClass == clang::Stmt::ObjCEncodeExprClass, "");
711static_assert((clang::Stmt::StmtClass)ZigClangStmt_ObjCDictionaryLiteralClass == clang::Stmt::ObjCDictionaryLiteralClass, "");
712static_assert((clang::Stmt::StmtClass)ZigClangStmt_ObjCBoxedExprClass == clang::Stmt::ObjCBoxedExprClass, "");
713static_assert((clang::Stmt::StmtClass)ZigClangStmt_ObjCBoolLiteralExprClass == clang::Stmt::ObjCBoolLiteralExprClass, "");
714static_assert((clang::Stmt::StmtClass)ZigClangStmt_ObjCAvailabilityCheckExprClass == clang::Stmt::ObjCAvailabilityCheckExprClass, "");
715static_assert((clang::Stmt::StmtClass)ZigClangStmt_ObjCArrayLiteralClass == clang::Stmt::ObjCArrayLiteralClass, "");
716static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPIteratorExprClass == clang::Stmt::OMPIteratorExprClass, "");
717static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPArrayShapingExprClass == clang::Stmt::OMPArrayShapingExprClass, "");
718static_assert((clang::Stmt::StmtClass)ZigClangStmt_NoInitExprClass == clang::Stmt::NoInitExprClass, "");
719static_assert((clang::Stmt::StmtClass)ZigClangStmt_MemberExprClass == clang::Stmt::MemberExprClass, "");
720static_assert((clang::Stmt::StmtClass)ZigClangStmt_MatrixSubscriptExprClass == clang::Stmt::MatrixSubscriptExprClass, "");
721static_assert((clang::Stmt::StmtClass)ZigClangStmt_MaterializeTemporaryExprClass == clang::Stmt::MaterializeTemporaryExprClass, "");
722static_assert((clang::Stmt::StmtClass)ZigClangStmt_MSPropertySubscriptExprClass == clang::Stmt::MSPropertySubscriptExprClass, "");
723static_assert((clang::Stmt::StmtClass)ZigClangStmt_MSPropertyRefExprClass == clang::Stmt::MSPropertyRefExprClass, "");
724static_assert((clang::Stmt::StmtClass)ZigClangStmt_LambdaExprClass == clang::Stmt::LambdaExprClass, "");
725static_assert((clang::Stmt::StmtClass)ZigClangStmt_IntegerLiteralClass == clang::Stmt::IntegerLiteralClass, "");
726static_assert((clang::Stmt::StmtClass)ZigClangStmt_InitListExprClass == clang::Stmt::InitListExprClass, "");
727static_assert((clang::Stmt::StmtClass)ZigClangStmt_ImplicitValueInitExprClass == clang::Stmt::ImplicitValueInitExprClass, "");
728static_assert((clang::Stmt::StmtClass)ZigClangStmt_ImaginaryLiteralClass == clang::Stmt::ImaginaryLiteralClass, "");
729static_assert((clang::Stmt::StmtClass)ZigClangStmt_HLSLOutArgExprClass == clang::Stmt::HLSLOutArgExprClass, "");
730static_assert((clang::Stmt::StmtClass)ZigClangStmt_GenericSelectionExprClass == clang::Stmt::GenericSelectionExprClass, "");
731static_assert((clang::Stmt::StmtClass)ZigClangStmt_GNUNullExprClass == clang::Stmt::GNUNullExprClass, "");
732static_assert((clang::Stmt::StmtClass)ZigClangStmt_FunctionParmPackExprClass == clang::Stmt::FunctionParmPackExprClass, "");
733static_assert((clang::Stmt::StmtClass)ZigClangStmt_ExprWithCleanupsClass == clang::Stmt::ExprWithCleanupsClass, "");
734static_assert((clang::Stmt::StmtClass)ZigClangStmt_ConstantExprClass == clang::Stmt::ConstantExprClass, "");
735static_assert((clang::Stmt::StmtClass)ZigClangStmt_FloatingLiteralClass == clang::Stmt::FloatingLiteralClass, "");
736static_assert((clang::Stmt::StmtClass)ZigClangStmt_FixedPointLiteralClass == clang::Stmt::FixedPointLiteralClass, "");
737static_assert((clang::Stmt::StmtClass)ZigClangStmt_ExtVectorElementExprClass == clang::Stmt::ExtVectorElementExprClass, "");
738static_assert((clang::Stmt::StmtClass)ZigClangStmt_ExpressionTraitExprClass == clang::Stmt::ExpressionTraitExprClass, "");
739static_assert((clang::Stmt::StmtClass)ZigClangStmt_EmbedExprClass == clang::Stmt::EmbedExprClass, "");
740static_assert((clang::Stmt::StmtClass)ZigClangStmt_DesignatedInitUpdateExprClass == clang::Stmt::DesignatedInitUpdateExprClass, "");
741static_assert((clang::Stmt::StmtClass)ZigClangStmt_DesignatedInitExprClass == clang::Stmt::DesignatedInitExprClass, "");
742static_assert((clang::Stmt::StmtClass)ZigClangStmt_DependentScopeDeclRefExprClass == clang::Stmt::DependentScopeDeclRefExprClass, "");
743static_assert((clang::Stmt::StmtClass)ZigClangStmt_DependentCoawaitExprClass == clang::Stmt::DependentCoawaitExprClass, "");
744static_assert((clang::Stmt::StmtClass)ZigClangStmt_DeclRefExprClass == clang::Stmt::DeclRefExprClass, "");
745static_assert((clang::Stmt::StmtClass)ZigClangStmt_CoyieldExprClass == clang::Stmt::CoyieldExprClass, "");
746static_assert((clang::Stmt::StmtClass)ZigClangStmt_CoawaitExprClass == clang::Stmt::CoawaitExprClass, "");
747static_assert((clang::Stmt::StmtClass)ZigClangStmt_ConvertVectorExprClass == clang::Stmt::ConvertVectorExprClass, "");
748static_assert((clang::Stmt::StmtClass)ZigClangStmt_ConceptSpecializationExprClass == clang::Stmt::ConceptSpecializationExprClass, "");
749static_assert((clang::Stmt::StmtClass)ZigClangStmt_CompoundLiteralExprClass == clang::Stmt::CompoundLiteralExprClass, "");
750static_assert((clang::Stmt::StmtClass)ZigClangStmt_ChooseExprClass == clang::Stmt::ChooseExprClass, "");
751static_assert((clang::Stmt::StmtClass)ZigClangStmt_CharacterLiteralClass == clang::Stmt::CharacterLiteralClass, "");
752static_assert((clang::Stmt::StmtClass)ZigClangStmt_ImplicitCastExprClass == clang::Stmt::ImplicitCastExprClass, "");
753static_assert((clang::Stmt::StmtClass)ZigClangStmt_ObjCBridgedCastExprClass == clang::Stmt::ObjCBridgedCastExprClass, "");
754static_assert((clang::Stmt::StmtClass)ZigClangStmt_CXXStaticCastExprClass == clang::Stmt::CXXStaticCastExprClass, "");
755static_assert((clang::Stmt::StmtClass)ZigClangStmt_CXXReinterpretCastExprClass == clang::Stmt::CXXReinterpretCastExprClass, "");
756static_assert((clang::Stmt::StmtClass)ZigClangStmt_CXXDynamicCastExprClass == clang::Stmt::CXXDynamicCastExprClass, "");
757static_assert((clang::Stmt::StmtClass)ZigClangStmt_CXXConstCastExprClass == clang::Stmt::CXXConstCastExprClass, "");
758static_assert((clang::Stmt::StmtClass)ZigClangStmt_CXXAddrspaceCastExprClass == clang::Stmt::CXXAddrspaceCastExprClass, "");
759static_assert((clang::Stmt::StmtClass)ZigClangStmt_CXXFunctionalCastExprClass == clang::Stmt::CXXFunctionalCastExprClass, "");
760static_assert((clang::Stmt::StmtClass)ZigClangStmt_CStyleCastExprClass == clang::Stmt::CStyleCastExprClass, "");
761static_assert((clang::Stmt::StmtClass)ZigClangStmt_BuiltinBitCastExprClass == clang::Stmt::BuiltinBitCastExprClass, "");
762static_assert((clang::Stmt::StmtClass)ZigClangStmt_CallExprClass == clang::Stmt::CallExprClass, "");
763static_assert((clang::Stmt::StmtClass)ZigClangStmt_UserDefinedLiteralClass == clang::Stmt::UserDefinedLiteralClass, "");
764static_assert((clang::Stmt::StmtClass)ZigClangStmt_CXXOperatorCallExprClass == clang::Stmt::CXXOperatorCallExprClass, "");
765static_assert((clang::Stmt::StmtClass)ZigClangStmt_CXXMemberCallExprClass == clang::Stmt::CXXMemberCallExprClass, "");
766static_assert((clang::Stmt::StmtClass)ZigClangStmt_CUDAKernelCallExprClass == clang::Stmt::CUDAKernelCallExprClass, "");
767static_assert((clang::Stmt::StmtClass)ZigClangStmt_CXXUuidofExprClass == clang::Stmt::CXXUuidofExprClass, "");
768static_assert((clang::Stmt::StmtClass)ZigClangStmt_CXXUnresolvedConstructExprClass == clang::Stmt::CXXUnresolvedConstructExprClass, "");
769static_assert((clang::Stmt::StmtClass)ZigClangStmt_CXXTypeidExprClass == clang::Stmt::CXXTypeidExprClass, "");
770static_assert((clang::Stmt::StmtClass)ZigClangStmt_CXXThrowExprClass == clang::Stmt::CXXThrowExprClass, "");
771static_assert((clang::Stmt::StmtClass)ZigClangStmt_CXXThisExprClass == clang::Stmt::CXXThisExprClass, "");
772static_assert((clang::Stmt::StmtClass)ZigClangStmt_CXXStdInitializerListExprClass == clang::Stmt::CXXStdInitializerListExprClass, "");
773static_assert((clang::Stmt::StmtClass)ZigClangStmt_CXXScalarValueInitExprClass == clang::Stmt::CXXScalarValueInitExprClass, "");
774static_assert((clang::Stmt::StmtClass)ZigClangStmt_CXXRewrittenBinaryOperatorClass == clang::Stmt::CXXRewrittenBinaryOperatorClass, "");
775static_assert((clang::Stmt::StmtClass)ZigClangStmt_CXXPseudoDestructorExprClass == clang::Stmt::CXXPseudoDestructorExprClass, "");
776static_assert((clang::Stmt::StmtClass)ZigClangStmt_CXXParenListInitExprClass == clang::Stmt::CXXParenListInitExprClass, "");
777static_assert((clang::Stmt::StmtClass)ZigClangStmt_CXXNullPtrLiteralExprClass == clang::Stmt::CXXNullPtrLiteralExprClass, "");
778static_assert((clang::Stmt::StmtClass)ZigClangStmt_CXXNoexceptExprClass == clang::Stmt::CXXNoexceptExprClass, "");
779static_assert((clang::Stmt::StmtClass)ZigClangStmt_CXXNewExprClass == clang::Stmt::CXXNewExprClass, "");
780static_assert((clang::Stmt::StmtClass)ZigClangStmt_CXXInheritedCtorInitExprClass == clang::Stmt::CXXInheritedCtorInitExprClass, "");
781static_assert((clang::Stmt::StmtClass)ZigClangStmt_CXXFoldExprClass == clang::Stmt::CXXFoldExprClass, "");
782static_assert((clang::Stmt::StmtClass)ZigClangStmt_CXXDependentScopeMemberExprClass == clang::Stmt::CXXDependentScopeMemberExprClass, "");
783static_assert((clang::Stmt::StmtClass)ZigClangStmt_CXXDeleteExprClass == clang::Stmt::CXXDeleteExprClass, "");
784static_assert((clang::Stmt::StmtClass)ZigClangStmt_CXXDefaultInitExprClass == clang::Stmt::CXXDefaultInitExprClass, "");
785static_assert((clang::Stmt::StmtClass)ZigClangStmt_CXXDefaultArgExprClass == clang::Stmt::CXXDefaultArgExprClass, "");
786static_assert((clang::Stmt::StmtClass)ZigClangStmt_CXXConstructExprClass == clang::Stmt::CXXConstructExprClass, "");
787static_assert((clang::Stmt::StmtClass)ZigClangStmt_CXXTemporaryObjectExprClass == clang::Stmt::CXXTemporaryObjectExprClass, "");
788static_assert((clang::Stmt::StmtClass)ZigClangStmt_CXXBoolLiteralExprClass == clang::Stmt::CXXBoolLiteralExprClass, "");
789static_assert((clang::Stmt::StmtClass)ZigClangStmt_CXXBindTemporaryExprClass == clang::Stmt::CXXBindTemporaryExprClass, "");
790static_assert((clang::Stmt::StmtClass)ZigClangStmt_BlockExprClass == clang::Stmt::BlockExprClass, "");
791static_assert((clang::Stmt::StmtClass)ZigClangStmt_BinaryOperatorClass == clang::Stmt::BinaryOperatorClass, "");
792static_assert((clang::Stmt::StmtClass)ZigClangStmt_CompoundAssignOperatorClass == clang::Stmt::CompoundAssignOperatorClass, "");
793static_assert((clang::Stmt::StmtClass)ZigClangStmt_AtomicExprClass == clang::Stmt::AtomicExprClass, "");
794static_assert((clang::Stmt::StmtClass)ZigClangStmt_AsTypeExprClass == clang::Stmt::AsTypeExprClass, "");
795static_assert((clang::Stmt::StmtClass)ZigClangStmt_ArrayTypeTraitExprClass == clang::Stmt::ArrayTypeTraitExprClass, "");
796static_assert((clang::Stmt::StmtClass)ZigClangStmt_ArraySubscriptExprClass == clang::Stmt::ArraySubscriptExprClass, "");
797static_assert((clang::Stmt::StmtClass)ZigClangStmt_ArraySectionExprClass == clang::Stmt::ArraySectionExprClass, "");
798static_assert((clang::Stmt::StmtClass)ZigClangStmt_ArrayInitLoopExprClass == clang::Stmt::ArrayInitLoopExprClass, "");
799static_assert((clang::Stmt::StmtClass)ZigClangStmt_ArrayInitIndexExprClass == clang::Stmt::ArrayInitIndexExprClass, "");
800static_assert((clang::Stmt::StmtClass)ZigClangStmt_AddrLabelExprClass == clang::Stmt::AddrLabelExprClass, "");
801static_assert((clang::Stmt::StmtClass)ZigClangStmt_ConditionalOperatorClass == clang::Stmt::ConditionalOperatorClass, "");
802static_assert((clang::Stmt::StmtClass)ZigClangStmt_BinaryConditionalOperatorClass == clang::Stmt::BinaryConditionalOperatorClass, "");
803static_assert((clang::Stmt::StmtClass)ZigClangStmt_AttributedStmtClass == clang::Stmt::AttributedStmtClass, "");
804static_assert((clang::Stmt::StmtClass)ZigClangStmt_SwitchStmtClass == clang::Stmt::SwitchStmtClass, "");
805static_assert((clang::Stmt::StmtClass)ZigClangStmt_DefaultStmtClass == clang::Stmt::DefaultStmtClass, "");
806static_assert((clang::Stmt::StmtClass)ZigClangStmt_CaseStmtClass == clang::Stmt::CaseStmtClass, "");
807static_assert((clang::Stmt::StmtClass)ZigClangStmt_SYCLKernelCallStmtClass == clang::Stmt::SYCLKernelCallStmtClass, "");
808static_assert((clang::Stmt::StmtClass)ZigClangStmt_SEHTryStmtClass == clang::Stmt::SEHTryStmtClass, "");
809static_assert((clang::Stmt::StmtClass)ZigClangStmt_SEHLeaveStmtClass == clang::Stmt::SEHLeaveStmtClass, "");
810static_assert((clang::Stmt::StmtClass)ZigClangStmt_SEHFinallyStmtClass == clang::Stmt::SEHFinallyStmtClass, "");
811static_assert((clang::Stmt::StmtClass)ZigClangStmt_SEHExceptStmtClass == clang::Stmt::SEHExceptStmtClass, "");
812static_assert((clang::Stmt::StmtClass)ZigClangStmt_ReturnStmtClass == clang::Stmt::ReturnStmtClass, "");
813static_assert((clang::Stmt::StmtClass)ZigClangStmt_OpenACCWaitConstructClass == clang::Stmt::OpenACCWaitConstructClass, "");
814static_assert((clang::Stmt::StmtClass)ZigClangStmt_OpenACCUpdateConstructClass == clang::Stmt::OpenACCUpdateConstructClass, "");
815static_assert((clang::Stmt::StmtClass)ZigClangStmt_OpenACCShutdownConstructClass == clang::Stmt::OpenACCShutdownConstructClass, "");
816static_assert((clang::Stmt::StmtClass)ZigClangStmt_OpenACCSetConstructClass == clang::Stmt::OpenACCSetConstructClass, "");
817static_assert((clang::Stmt::StmtClass)ZigClangStmt_OpenACCInitConstructClass == clang::Stmt::OpenACCInitConstructClass, "");
818static_assert((clang::Stmt::StmtClass)ZigClangStmt_OpenACCExitDataConstructClass == clang::Stmt::OpenACCExitDataConstructClass, "");
819static_assert((clang::Stmt::StmtClass)ZigClangStmt_OpenACCEnterDataConstructClass == clang::Stmt::OpenACCEnterDataConstructClass, "");
820static_assert((clang::Stmt::StmtClass)ZigClangStmt_OpenACCCacheConstructClass == clang::Stmt::OpenACCCacheConstructClass, "");
821static_assert((clang::Stmt::StmtClass)ZigClangStmt_OpenACCLoopConstructClass == clang::Stmt::OpenACCLoopConstructClass, "");
822static_assert((clang::Stmt::StmtClass)ZigClangStmt_OpenACCHostDataConstructClass == clang::Stmt::OpenACCHostDataConstructClass, "");
823static_assert((clang::Stmt::StmtClass)ZigClangStmt_OpenACCDataConstructClass == clang::Stmt::OpenACCDataConstructClass, "");
824static_assert((clang::Stmt::StmtClass)ZigClangStmt_OpenACCComputeConstructClass == clang::Stmt::OpenACCComputeConstructClass, "");
825static_assert((clang::Stmt::StmtClass)ZigClangStmt_OpenACCCombinedConstructClass == clang::Stmt::OpenACCCombinedConstructClass, "");
826static_assert((clang::Stmt::StmtClass)ZigClangStmt_OpenACCAtomicConstructClass == clang::Stmt::OpenACCAtomicConstructClass, "");
827static_assert((clang::Stmt::StmtClass)ZigClangStmt_ObjCForCollectionStmtClass == clang::Stmt::ObjCForCollectionStmtClass, "");
828static_assert((clang::Stmt::StmtClass)ZigClangStmt_ObjCAutoreleasePoolStmtClass == clang::Stmt::ObjCAutoreleasePoolStmtClass, "");
829static_assert((clang::Stmt::StmtClass)ZigClangStmt_ObjCAtTryStmtClass == clang::Stmt::ObjCAtTryStmtClass, "");
830static_assert((clang::Stmt::StmtClass)ZigClangStmt_ObjCAtThrowStmtClass == clang::Stmt::ObjCAtThrowStmtClass, "");
831static_assert((clang::Stmt::StmtClass)ZigClangStmt_ObjCAtSynchronizedStmtClass == clang::Stmt::ObjCAtSynchronizedStmtClass, "");
832static_assert((clang::Stmt::StmtClass)ZigClangStmt_ObjCAtFinallyStmtClass == clang::Stmt::ObjCAtFinallyStmtClass, "");
833static_assert((clang::Stmt::StmtClass)ZigClangStmt_ObjCAtCatchStmtClass == clang::Stmt::ObjCAtCatchStmtClass, "");
834static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTeamsDirectiveClass == clang::Stmt::OMPTeamsDirectiveClass, "");
835static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTaskyieldDirectiveClass == clang::Stmt::OMPTaskyieldDirectiveClass, "");
836static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTaskwaitDirectiveClass == clang::Stmt::OMPTaskwaitDirectiveClass, "");
837static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTaskgroupDirectiveClass == clang::Stmt::OMPTaskgroupDirectiveClass, "");
838static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTaskDirectiveClass == clang::Stmt::OMPTaskDirectiveClass, "");
839static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTargetUpdateDirectiveClass == clang::Stmt::OMPTargetUpdateDirectiveClass, "");
840static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTargetTeamsDirectiveClass == clang::Stmt::OMPTargetTeamsDirectiveClass, "");
841static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTargetParallelForDirectiveClass == clang::Stmt::OMPTargetParallelForDirectiveClass, "");
842static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTargetParallelDirectiveClass == clang::Stmt::OMPTargetParallelDirectiveClass, "");
843static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTargetExitDataDirectiveClass == clang::Stmt::OMPTargetExitDataDirectiveClass, "");
844static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTargetEnterDataDirectiveClass == clang::Stmt::OMPTargetEnterDataDirectiveClass, "");
845static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTargetDirectiveClass == clang::Stmt::OMPTargetDirectiveClass, "");
846static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTargetDataDirectiveClass == clang::Stmt::OMPTargetDataDirectiveClass, "");
847static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPSingleDirectiveClass == clang::Stmt::OMPSingleDirectiveClass, "");
848static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPSectionsDirectiveClass == clang::Stmt::OMPSectionsDirectiveClass, "");
849static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPSectionDirectiveClass == clang::Stmt::OMPSectionDirectiveClass, "");
850static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPScopeDirectiveClass == clang::Stmt::OMPScopeDirectiveClass, "");
851static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPScanDirectiveClass == clang::Stmt::OMPScanDirectiveClass, "");
852static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPParallelSectionsDirectiveClass == clang::Stmt::OMPParallelSectionsDirectiveClass, "");
853static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPParallelMasterDirectiveClass == clang::Stmt::OMPParallelMasterDirectiveClass, "");
854static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPParallelMaskedDirectiveClass == clang::Stmt::OMPParallelMaskedDirectiveClass, "");
855static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPParallelDirectiveClass == clang::Stmt::OMPParallelDirectiveClass, "");
856static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPOrderedDirectiveClass == clang::Stmt::OMPOrderedDirectiveClass, "");
857static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPMetaDirectiveClass == clang::Stmt::OMPMetaDirectiveClass, "");
858static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPMasterDirectiveClass == clang::Stmt::OMPMasterDirectiveClass, "");
859static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPMaskedDirectiveClass == clang::Stmt::OMPMaskedDirectiveClass, "");
860static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPUnrollDirectiveClass == clang::Stmt::OMPUnrollDirectiveClass, "");
861static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTileDirectiveClass == clang::Stmt::OMPTileDirectiveClass, "");
862static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPStripeDirectiveClass == clang::Stmt::OMPStripeDirectiveClass, "");
863static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPReverseDirectiveClass == clang::Stmt::OMPReverseDirectiveClass, "");
864static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPInterchangeDirectiveClass == clang::Stmt::OMPInterchangeDirectiveClass, "");
865static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTeamsGenericLoopDirectiveClass == clang::Stmt::OMPTeamsGenericLoopDirectiveClass, "");
866static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTeamsDistributeSimdDirectiveClass == clang::Stmt::OMPTeamsDistributeSimdDirectiveClass, "");
867static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTeamsDistributeParallelForSimdDirectiveClass == clang::Stmt::OMPTeamsDistributeParallelForSimdDirectiveClass, "");
868static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTeamsDistributeParallelForDirectiveClass == clang::Stmt::OMPTeamsDistributeParallelForDirectiveClass, "");
869static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTeamsDistributeDirectiveClass == clang::Stmt::OMPTeamsDistributeDirectiveClass, "");
870static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTaskLoopSimdDirectiveClass == clang::Stmt::OMPTaskLoopSimdDirectiveClass, "");
871static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTaskLoopDirectiveClass == clang::Stmt::OMPTaskLoopDirectiveClass, "");
872static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTargetTeamsGenericLoopDirectiveClass == clang::Stmt::OMPTargetTeamsGenericLoopDirectiveClass, "");
873static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTargetTeamsDistributeSimdDirectiveClass == clang::Stmt::OMPTargetTeamsDistributeSimdDirectiveClass, "");
874static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTargetTeamsDistributeParallelForSimdDirectiveClass == clang::Stmt::OMPTargetTeamsDistributeParallelForSimdDirectiveClass, "");
875static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTargetTeamsDistributeParallelForDirectiveClass == clang::Stmt::OMPTargetTeamsDistributeParallelForDirectiveClass, "");
876static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTargetTeamsDistributeDirectiveClass == clang::Stmt::OMPTargetTeamsDistributeDirectiveClass, "");
877static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTargetSimdDirectiveClass == clang::Stmt::OMPTargetSimdDirectiveClass, "");
878static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTargetParallelGenericLoopDirectiveClass == clang::Stmt::OMPTargetParallelGenericLoopDirectiveClass, "");
879static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPTargetParallelForSimdDirectiveClass == clang::Stmt::OMPTargetParallelForSimdDirectiveClass, "");
880static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPSimdDirectiveClass == clang::Stmt::OMPSimdDirectiveClass, "");
881static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPParallelMasterTaskLoopSimdDirectiveClass == clang::Stmt::OMPParallelMasterTaskLoopSimdDirectiveClass, "");
882static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPParallelMasterTaskLoopDirectiveClass == clang::Stmt::OMPParallelMasterTaskLoopDirectiveClass, "");
883static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPParallelMaskedTaskLoopSimdDirectiveClass == clang::Stmt::OMPParallelMaskedTaskLoopSimdDirectiveClass, "");
884static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPParallelMaskedTaskLoopDirectiveClass == clang::Stmt::OMPParallelMaskedTaskLoopDirectiveClass, "");
885static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPParallelGenericLoopDirectiveClass == clang::Stmt::OMPParallelGenericLoopDirectiveClass, "");
886static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPParallelForSimdDirectiveClass == clang::Stmt::OMPParallelForSimdDirectiveClass, "");
887static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPParallelForDirectiveClass == clang::Stmt::OMPParallelForDirectiveClass, "");
888static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPMasterTaskLoopSimdDirectiveClass == clang::Stmt::OMPMasterTaskLoopSimdDirectiveClass, "");
889static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPMasterTaskLoopDirectiveClass == clang::Stmt::OMPMasterTaskLoopDirectiveClass, "");
890static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPMaskedTaskLoopSimdDirectiveClass == clang::Stmt::OMPMaskedTaskLoopSimdDirectiveClass, "");
891static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPMaskedTaskLoopDirectiveClass == clang::Stmt::OMPMaskedTaskLoopDirectiveClass, "");
892static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPGenericLoopDirectiveClass == clang::Stmt::OMPGenericLoopDirectiveClass, "");
893static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPForSimdDirectiveClass == clang::Stmt::OMPForSimdDirectiveClass, "");
894static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPForDirectiveClass == clang::Stmt::OMPForDirectiveClass, "");
895static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPDistributeSimdDirectiveClass == clang::Stmt::OMPDistributeSimdDirectiveClass, "");
896static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPDistributeParallelForSimdDirectiveClass == clang::Stmt::OMPDistributeParallelForSimdDirectiveClass, "");
897static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPDistributeParallelForDirectiveClass == clang::Stmt::OMPDistributeParallelForDirectiveClass, "");
898static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPDistributeDirectiveClass == clang::Stmt::OMPDistributeDirectiveClass, "");
899static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPInteropDirectiveClass == clang::Stmt::OMPInteropDirectiveClass, "");
900static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPFlushDirectiveClass == clang::Stmt::OMPFlushDirectiveClass, "");
901static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPErrorDirectiveClass == clang::Stmt::OMPErrorDirectiveClass, "");
902static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPDispatchDirectiveClass == clang::Stmt::OMPDispatchDirectiveClass, "");
903static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPDepobjDirectiveClass == clang::Stmt::OMPDepobjDirectiveClass, "");
904static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPCriticalDirectiveClass == clang::Stmt::OMPCriticalDirectiveClass, "");
905static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPCancellationPointDirectiveClass == clang::Stmt::OMPCancellationPointDirectiveClass, "");
906static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPCancelDirectiveClass == clang::Stmt::OMPCancelDirectiveClass, "");
907static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPBarrierDirectiveClass == clang::Stmt::OMPBarrierDirectiveClass, "");
908static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPAtomicDirectiveClass == clang::Stmt::OMPAtomicDirectiveClass, "");
909static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPAssumeDirectiveClass == clang::Stmt::OMPAssumeDirectiveClass, "");
910static_assert((clang::Stmt::StmtClass)ZigClangStmt_OMPCanonicalLoopClass == clang::Stmt::OMPCanonicalLoopClass, "");
911static_assert((clang::Stmt::StmtClass)ZigClangStmt_NullStmtClass == clang::Stmt::NullStmtClass, "");
912static_assert((clang::Stmt::StmtClass)ZigClangStmt_MSDependentExistsStmtClass == clang::Stmt::MSDependentExistsStmtClass, "");
913static_assert((clang::Stmt::StmtClass)ZigClangStmt_IndirectGotoStmtClass == clang::Stmt::IndirectGotoStmtClass, "");
914static_assert((clang::Stmt::StmtClass)ZigClangStmt_IfStmtClass == clang::Stmt::IfStmtClass, "");
915static_assert((clang::Stmt::StmtClass)ZigClangStmt_GotoStmtClass == clang::Stmt::GotoStmtClass, "");
916static_assert((clang::Stmt::StmtClass)ZigClangStmt_ForStmtClass == clang::Stmt::ForStmtClass, "");
917static_assert((clang::Stmt::StmtClass)ZigClangStmt_DoStmtClass == clang::Stmt::DoStmtClass, "");
918static_assert((clang::Stmt::StmtClass)ZigClangStmt_DeclStmtClass == clang::Stmt::DeclStmtClass, "");
919static_assert((clang::Stmt::StmtClass)ZigClangStmt_CoroutineBodyStmtClass == clang::Stmt::CoroutineBodyStmtClass, "");
920static_assert((clang::Stmt::StmtClass)ZigClangStmt_CoreturnStmtClass == clang::Stmt::CoreturnStmtClass, "");
921static_assert((clang::Stmt::StmtClass)ZigClangStmt_ContinueStmtClass == clang::Stmt::ContinueStmtClass, "");
922static_assert((clang::Stmt::StmtClass)ZigClangStmt_CompoundStmtClass == clang::Stmt::CompoundStmtClass, "");
923static_assert((clang::Stmt::StmtClass)ZigClangStmt_CapturedStmtClass == clang::Stmt::CapturedStmtClass, "");
924static_assert((clang::Stmt::StmtClass)ZigClangStmt_CXXTryStmtClass == clang::Stmt::CXXTryStmtClass, "");
925static_assert((clang::Stmt::StmtClass)ZigClangStmt_CXXForRangeStmtClass == clang::Stmt::CXXForRangeStmtClass, "");
926static_assert((clang::Stmt::StmtClass)ZigClangStmt_CXXCatchStmtClass == clang::Stmt::CXXCatchStmtClass, "");
927static_assert((clang::Stmt::StmtClass)ZigClangStmt_BreakStmtClass == clang::Stmt::BreakStmtClass, "");
928static_assert((clang::Stmt::StmtClass)ZigClangStmt_MSAsmStmtClass == clang::Stmt::MSAsmStmtClass, "");
929static_assert((clang::Stmt::StmtClass)ZigClangStmt_GCCAsmStmtClass == clang::Stmt::GCCAsmStmtClass, "");
930
931void ZigClang_detect_enum_APValueKind(clang::APValue::ValueKind x) {
932 switch (x) {
933 case clang::APValue::None:
934 case clang::APValue::Indeterminate:
935 case clang::APValue::Int:
936 case clang::APValue::Float:
937 case clang::APValue::FixedPoint:
938 case clang::APValue::ComplexInt:
939 case clang::APValue::ComplexFloat:
940 case clang::APValue::LValue:
941 case clang::APValue::Vector:
942 case clang::APValue::Array:
943 case clang::APValue::Struct:
944 case clang::APValue::Union:
945 case clang::APValue::MemberPointer:
946 case clang::APValue::AddrLabelDiff:
947 break;
948 }
949}
950
951static_assert((clang::APValue::ValueKind)ZigClangAPValueNone == clang::APValue::None, "");
952static_assert((clang::APValue::ValueKind)ZigClangAPValueIndeterminate == clang::APValue::Indeterminate, "");
953static_assert((clang::APValue::ValueKind)ZigClangAPValueInt == clang::APValue::Int, "");
954static_assert((clang::APValue::ValueKind)ZigClangAPValueFloat == clang::APValue::Float, "");
955static_assert((clang::APValue::ValueKind)ZigClangAPValueFixedPoint == clang::APValue::FixedPoint, "");
956static_assert((clang::APValue::ValueKind)ZigClangAPValueComplexInt == clang::APValue::ComplexInt, "");
957static_assert((clang::APValue::ValueKind)ZigClangAPValueComplexFloat == clang::APValue::ComplexFloat, "");
958static_assert((clang::APValue::ValueKind)ZigClangAPValueLValue == clang::APValue::LValue, "");
959static_assert((clang::APValue::ValueKind)ZigClangAPValueVector == clang::APValue::Vector, "");
960static_assert((clang::APValue::ValueKind)ZigClangAPValueArray == clang::APValue::Array, "");
961static_assert((clang::APValue::ValueKind)ZigClangAPValueStruct == clang::APValue::Struct, "");
962static_assert((clang::APValue::ValueKind)ZigClangAPValueUnion == clang::APValue::Union, "");
963static_assert((clang::APValue::ValueKind)ZigClangAPValueMemberPointer == clang::APValue::MemberPointer, "");
964static_assert((clang::APValue::ValueKind)ZigClangAPValueAddrLabelDiff == clang::APValue::AddrLabelDiff, "");
965
966
967void ZigClang_detect_enum_DeclKind(clang::Decl::Kind x) {
968 switch (x) {
969 case clang::Decl::TranslationUnit:
970 case clang::Decl::RequiresExprBody:
971 case clang::Decl::OutlinedFunction:
972 case clang::Decl::LinkageSpec:
973 case clang::Decl::ExternCContext:
974 case clang::Decl::Export:
975 case clang::Decl::Captured:
976 case clang::Decl::Block:
977 case clang::Decl::TopLevelStmt:
978 case clang::Decl::StaticAssert:
979 case clang::Decl::PragmaDetectMismatch:
980 case clang::Decl::PragmaComment:
981 case clang::Decl::OpenACCRoutine:
982 case clang::Decl::OpenACCDeclare:
983 case clang::Decl::ObjCPropertyImpl:
984 case clang::Decl::OMPThreadPrivate:
985 case clang::Decl::OMPRequires:
986 case clang::Decl::OMPAllocate:
987 case clang::Decl::ObjCMethod:
988 case clang::Decl::ObjCProtocol:
989 case clang::Decl::ObjCInterface:
990 case clang::Decl::ObjCImplementation:
991 case clang::Decl::ObjCCategoryImpl:
992 case clang::Decl::ObjCCategory:
993 case clang::Decl::Namespace:
994 case clang::Decl::HLSLBuffer:
995 case clang::Decl::OMPDeclareReduction:
996 case clang::Decl::OMPDeclareMapper:
997 case clang::Decl::UnresolvedUsingValue:
998 case clang::Decl::UnnamedGlobalConstant:
999 case clang::Decl::TemplateParamObject:
1000 case clang::Decl::MSGuid:
1001 case clang::Decl::IndirectField:
1002 case clang::Decl::EnumConstant:
1003 case clang::Decl::Function:
1004 case clang::Decl::CXXMethod:
1005 case clang::Decl::CXXDestructor:
1006 case clang::Decl::CXXConversion:
1007 case clang::Decl::CXXConstructor:
1008 case clang::Decl::CXXDeductionGuide:
1009 case clang::Decl::Var:
1010 case clang::Decl::VarTemplateSpecialization:
1011 case clang::Decl::VarTemplatePartialSpecialization:
1012 case clang::Decl::ParmVar:
1013 case clang::Decl::OMPCapturedExpr:
1014 case clang::Decl::ImplicitParam:
1015 case clang::Decl::Decomposition:
1016 case clang::Decl::NonTypeTemplateParm:
1017 case clang::Decl::MSProperty:
1018 case clang::Decl::Field:
1019 case clang::Decl::ObjCIvar:
1020 case clang::Decl::ObjCAtDefsField:
1021 case clang::Decl::Binding:
1022 case clang::Decl::UsingShadow:
1023 case clang::Decl::ConstructorUsingShadow:
1024 case clang::Decl::UsingPack:
1025 case clang::Decl::UsingDirective:
1026 case clang::Decl::UnresolvedUsingIfExists:
1027 case clang::Decl::Record:
1028 case clang::Decl::CXXRecord:
1029 case clang::Decl::ClassTemplateSpecialization:
1030 case clang::Decl::ClassTemplatePartialSpecialization:
1031 case clang::Decl::Enum:
1032 case clang::Decl::UnresolvedUsingTypename:
1033 case clang::Decl::Typedef:
1034 case clang::Decl::TypeAlias:
1035 case clang::Decl::ObjCTypeParam:
1036 case clang::Decl::TemplateTypeParm:
1037 case clang::Decl::TemplateTemplateParm:
1038 case clang::Decl::VarTemplate:
1039 case clang::Decl::TypeAliasTemplate:
1040 case clang::Decl::FunctionTemplate:
1041 case clang::Decl::ClassTemplate:
1042 case clang::Decl::Concept:
1043 case clang::Decl::BuiltinTemplate:
1044 case clang::Decl::ObjCProperty:
1045 case clang::Decl::ObjCCompatibleAlias:
1046 case clang::Decl::NamespaceAlias:
1047 case clang::Decl::Label:
1048 case clang::Decl::HLSLRootSignature:
1049 case clang::Decl::UsingEnum:
1050 case clang::Decl::Using:
1051 case clang::Decl::LifetimeExtendedTemporary:
1052 case clang::Decl::Import:
1053 case clang::Decl::ImplicitConceptSpecialization:
1054 case clang::Decl::FriendTemplate:
1055 case clang::Decl::Friend:
1056 case clang::Decl::FileScopeAsm:
1057 case clang::Decl::Empty:
1058 case clang::Decl::AccessSpec:
1059 break;
1060 }
1061}
1062
1063static_assert((clang::Decl::Kind)ZigClangDeclTranslationUnit == clang::Decl::TranslationUnit, "");
1064static_assert((clang::Decl::Kind)ZigClangDeclTopLevelStmt == clang::Decl::TopLevelStmt, "");
1065static_assert((clang::Decl::Kind)ZigClangDeclRequiresExprBody == clang::Decl::RequiresExprBody, "");
1066static_assert((clang::Decl::Kind)ZigClangDeclOutlinedFunction == clang::Decl::OutlinedFunction, "");
1067static_assert((clang::Decl::Kind)ZigClangDeclLinkageSpec == clang::Decl::LinkageSpec, "");
1068static_assert((clang::Decl::Kind)ZigClangDeclExternCContext == clang::Decl::ExternCContext, "");
1069static_assert((clang::Decl::Kind)ZigClangDeclExport == clang::Decl::Export, "");
1070static_assert((clang::Decl::Kind)ZigClangDeclCaptured == clang::Decl::Captured, "");
1071static_assert((clang::Decl::Kind)ZigClangDeclBlock == clang::Decl::Block, "");
1072static_assert((clang::Decl::Kind)ZigClangDeclStaticAssert == clang::Decl::StaticAssert, "");
1073static_assert((clang::Decl::Kind)ZigClangDeclPragmaDetectMismatch == clang::Decl::PragmaDetectMismatch, "");
1074static_assert((clang::Decl::Kind)ZigClangDeclPragmaComment == clang::Decl::PragmaComment, "");
1075static_assert((clang::Decl::Kind)ZigClangDeclOpenACCRoutine == clang::Decl::OpenACCRoutine, "");
1076static_assert((clang::Decl::Kind)ZigClangDeclOpenACCDeclare == clang::Decl::OpenACCDeclare, "");
1077static_assert((clang::Decl::Kind)ZigClangDeclObjCPropertyImpl == clang::Decl::ObjCPropertyImpl, "");
1078static_assert((clang::Decl::Kind)ZigClangDeclOMPThreadPrivate == clang::Decl::OMPThreadPrivate, "");
1079static_assert((clang::Decl::Kind)ZigClangDeclOMPRequires == clang::Decl::OMPRequires, "");
1080static_assert((clang::Decl::Kind)ZigClangDeclOMPAllocate == clang::Decl::OMPAllocate, "");
1081static_assert((clang::Decl::Kind)ZigClangDeclObjCMethod == clang::Decl::ObjCMethod, "");
1082static_assert((clang::Decl::Kind)ZigClangDeclObjCProtocol == clang::Decl::ObjCProtocol, "");
1083static_assert((clang::Decl::Kind)ZigClangDeclObjCInterface == clang::Decl::ObjCInterface, "");
1084static_assert((clang::Decl::Kind)ZigClangDeclObjCImplementation == clang::Decl::ObjCImplementation, "");
1085static_assert((clang::Decl::Kind)ZigClangDeclObjCCategoryImpl == clang::Decl::ObjCCategoryImpl, "");
1086static_assert((clang::Decl::Kind)ZigClangDeclObjCCategory == clang::Decl::ObjCCategory, "");
1087static_assert((clang::Decl::Kind)ZigClangDeclNamespace == clang::Decl::Namespace, "");
1088static_assert((clang::Decl::Kind)ZigClangDeclHLSLBuffer == clang::Decl::HLSLBuffer, "");
1089static_assert((clang::Decl::Kind)ZigClangDeclOMPDeclareReduction == clang::Decl::OMPDeclareReduction, "");
1090static_assert((clang::Decl::Kind)ZigClangDeclOMPDeclareMapper == clang::Decl::OMPDeclareMapper, "");
1091static_assert((clang::Decl::Kind)ZigClangDeclUnresolvedUsingValue == clang::Decl::UnresolvedUsingValue, "");
1092static_assert((clang::Decl::Kind)ZigClangDeclUnnamedGlobalConstant == clang::Decl::UnnamedGlobalConstant, "");
1093static_assert((clang::Decl::Kind)ZigClangDeclTemplateParamObject == clang::Decl::TemplateParamObject, "");
1094static_assert((clang::Decl::Kind)ZigClangDeclMSGuid == clang::Decl::MSGuid, "");
1095static_assert((clang::Decl::Kind)ZigClangDeclIndirectField == clang::Decl::IndirectField, "");
1096static_assert((clang::Decl::Kind)ZigClangDeclEnumConstant == clang::Decl::EnumConstant, "");
1097static_assert((clang::Decl::Kind)ZigClangDeclFunction == clang::Decl::Function, "");
1098static_assert((clang::Decl::Kind)ZigClangDeclCXXMethod == clang::Decl::CXXMethod, "");
1099static_assert((clang::Decl::Kind)ZigClangDeclCXXDestructor == clang::Decl::CXXDestructor, "");
1100static_assert((clang::Decl::Kind)ZigClangDeclCXXConversion == clang::Decl::CXXConversion, "");
1101static_assert((clang::Decl::Kind)ZigClangDeclCXXConstructor == clang::Decl::CXXConstructor, "");
1102static_assert((clang::Decl::Kind)ZigClangDeclCXXDeductionGuide == clang::Decl::CXXDeductionGuide, "");
1103static_assert((clang::Decl::Kind)ZigClangDeclVar == clang::Decl::Var, "");
1104static_assert((clang::Decl::Kind)ZigClangDeclVarTemplateSpecialization == clang::Decl::VarTemplateSpecialization, "");
1105static_assert((clang::Decl::Kind)ZigClangDeclVarTemplatePartialSpecialization == clang::Decl::VarTemplatePartialSpecialization, "");
1106static_assert((clang::Decl::Kind)ZigClangDeclParmVar == clang::Decl::ParmVar, "");
1107static_assert((clang::Decl::Kind)ZigClangDeclOMPCapturedExpr == clang::Decl::OMPCapturedExpr, "");
1108static_assert((clang::Decl::Kind)ZigClangDeclImplicitParam == clang::Decl::ImplicitParam, "");
1109static_assert((clang::Decl::Kind)ZigClangDeclDecomposition == clang::Decl::Decomposition, "");
1110static_assert((clang::Decl::Kind)ZigClangDeclNonTypeTemplateParm == clang::Decl::NonTypeTemplateParm, "");
1111static_assert((clang::Decl::Kind)ZigClangDeclMSProperty == clang::Decl::MSProperty, "");
1112static_assert((clang::Decl::Kind)ZigClangDeclField == clang::Decl::Field, "");
1113static_assert((clang::Decl::Kind)ZigClangDeclObjCIvar == clang::Decl::ObjCIvar, "");
1114static_assert((clang::Decl::Kind)ZigClangDeclObjCAtDefsField == clang::Decl::ObjCAtDefsField, "");
1115static_assert((clang::Decl::Kind)ZigClangDeclBinding == clang::Decl::Binding, "");
1116static_assert((clang::Decl::Kind)ZigClangDeclUsingShadow == clang::Decl::UsingShadow, "");
1117static_assert((clang::Decl::Kind)ZigClangDeclConstructorUsingShadow == clang::Decl::ConstructorUsingShadow, "");
1118static_assert((clang::Decl::Kind)ZigClangDeclUsingPack == clang::Decl::UsingPack, "");
1119static_assert((clang::Decl::Kind)ZigClangDeclUsingDirective == clang::Decl::UsingDirective, "");
1120static_assert((clang::Decl::Kind)ZigClangDeclUnresolvedUsingIfExists == clang::Decl::UnresolvedUsingIfExists, "");
1121static_assert((clang::Decl::Kind)ZigClangDeclRecord == clang::Decl::Record, "");
1122static_assert((clang::Decl::Kind)ZigClangDeclCXXRecord == clang::Decl::CXXRecord, "");
1123static_assert((clang::Decl::Kind)ZigClangDeclClassTemplateSpecialization == clang::Decl::ClassTemplateSpecialization, "");
1124static_assert((clang::Decl::Kind)ZigClangDeclClassTemplatePartialSpecialization == clang::Decl::ClassTemplatePartialSpecialization, "");
1125static_assert((clang::Decl::Kind)ZigClangDeclEnum == clang::Decl::Enum, "");
1126static_assert((clang::Decl::Kind)ZigClangDeclUnresolvedUsingTypename == clang::Decl::UnresolvedUsingTypename, "");
1127static_assert((clang::Decl::Kind)ZigClangDeclTypedef == clang::Decl::Typedef, "");
1128static_assert((clang::Decl::Kind)ZigClangDeclTypeAlias == clang::Decl::TypeAlias, "");
1129static_assert((clang::Decl::Kind)ZigClangDeclObjCTypeParam == clang::Decl::ObjCTypeParam, "");
1130static_assert((clang::Decl::Kind)ZigClangDeclTemplateTypeParm == clang::Decl::TemplateTypeParm, "");
1131static_assert((clang::Decl::Kind)ZigClangDeclTemplateTemplateParm == clang::Decl::TemplateTemplateParm, "");
1132static_assert((clang::Decl::Kind)ZigClangDeclVarTemplate == clang::Decl::VarTemplate, "");
1133static_assert((clang::Decl::Kind)ZigClangDeclTypeAliasTemplate == clang::Decl::TypeAliasTemplate, "");
1134static_assert((clang::Decl::Kind)ZigClangDeclFunctionTemplate == clang::Decl::FunctionTemplate, "");
1135static_assert((clang::Decl::Kind)ZigClangDeclClassTemplate == clang::Decl::ClassTemplate, "");
1136static_assert((clang::Decl::Kind)ZigClangDeclConcept == clang::Decl::Concept, "");
1137static_assert((clang::Decl::Kind)ZigClangDeclBuiltinTemplate == clang::Decl::BuiltinTemplate, "");
1138static_assert((clang::Decl::Kind)ZigClangDeclObjCProperty == clang::Decl::ObjCProperty, "");
1139static_assert((clang::Decl::Kind)ZigClangDeclObjCCompatibleAlias == clang::Decl::ObjCCompatibleAlias, "");
1140static_assert((clang::Decl::Kind)ZigClangDeclNamespaceAlias == clang::Decl::NamespaceAlias, "");
1141static_assert((clang::Decl::Kind)ZigClangDeclLabel == clang::Decl::Label, "");
1142static_assert((clang::Decl::Kind)ZigClangDeclHLSLRootSignature == clang::Decl::HLSLRootSignature, "");
1143static_assert((clang::Decl::Kind)ZigClangDeclUsingEnum == clang::Decl::UsingEnum, "");
1144static_assert((clang::Decl::Kind)ZigClangDeclUsing == clang::Decl::Using, "");
1145static_assert((clang::Decl::Kind)ZigClangDeclLifetimeExtendedTemporary == clang::Decl::LifetimeExtendedTemporary, "");
1146static_assert((clang::Decl::Kind)ZigClangDeclImport == clang::Decl::Import, "");
1147static_assert((clang::Decl::Kind)ZigClangDeclImplicitConceptSpecialization == clang::Decl::ImplicitConceptSpecialization, "");
1148static_assert((clang::Decl::Kind)ZigClangDeclFriendTemplate == clang::Decl::FriendTemplate, "");
1149static_assert((clang::Decl::Kind)ZigClangDeclFriend == clang::Decl::Friend, "");
1150static_assert((clang::Decl::Kind)ZigClangDeclFileScopeAsm == clang::Decl::FileScopeAsm, "");
1151static_assert((clang::Decl::Kind)ZigClangDeclEmpty == clang::Decl::Empty, "");
1152static_assert((clang::Decl::Kind)ZigClangDeclAccessSpec == clang::Decl::AccessSpec, "");
1153
1154void ZigClang_detect_enum_BuiltinTypeKind(clang::BuiltinType::Kind x) {
1155 switch (x) {
1156 case clang::BuiltinType::OCLImage1dRO:
1157 case clang::BuiltinType::OCLImage1dArrayRO:
1158 case clang::BuiltinType::OCLImage1dBufferRO:
1159 case clang::BuiltinType::OCLImage2dRO:
1160 case clang::BuiltinType::OCLImage2dArrayRO:
1161 case clang::BuiltinType::OCLImage2dDepthRO:
1162 case clang::BuiltinType::OCLImage2dArrayDepthRO:
1163 case clang::BuiltinType::OCLImage2dMSAARO:
1164 case clang::BuiltinType::OCLImage2dArrayMSAARO:
1165 case clang::BuiltinType::OCLImage2dMSAADepthRO:
1166 case clang::BuiltinType::OCLImage2dArrayMSAADepthRO:
1167 case clang::BuiltinType::OCLImage3dRO:
1168 case clang::BuiltinType::OCLImage1dWO:
1169 case clang::BuiltinType::OCLImage1dArrayWO:
1170 case clang::BuiltinType::OCLImage1dBufferWO:
1171 case clang::BuiltinType::OCLImage2dWO:
1172 case clang::BuiltinType::OCLImage2dArrayWO:
1173 case clang::BuiltinType::OCLImage2dDepthWO:
1174 case clang::BuiltinType::OCLImage2dArrayDepthWO:
1175 case clang::BuiltinType::OCLImage2dMSAAWO:
1176 case clang::BuiltinType::OCLImage2dArrayMSAAWO:
1177 case clang::BuiltinType::OCLImage2dMSAADepthWO:
1178 case clang::BuiltinType::OCLImage2dArrayMSAADepthWO:
1179 case clang::BuiltinType::OCLImage3dWO:
1180 case clang::BuiltinType::OCLImage1dRW:
1181 case clang::BuiltinType::OCLImage1dArrayRW:
1182 case clang::BuiltinType::OCLImage1dBufferRW:
1183 case clang::BuiltinType::OCLImage2dRW:
1184 case clang::BuiltinType::OCLImage2dArrayRW:
1185 case clang::BuiltinType::OCLImage2dDepthRW:
1186 case clang::BuiltinType::OCLImage2dArrayDepthRW:
1187 case clang::BuiltinType::OCLImage2dMSAARW:
1188 case clang::BuiltinType::OCLImage2dArrayMSAARW:
1189 case clang::BuiltinType::OCLImage2dMSAADepthRW:
1190 case clang::BuiltinType::OCLImage2dArrayMSAADepthRW:
1191 case clang::BuiltinType::OCLImage3dRW:
1192 case clang::BuiltinType::OCLIntelSubgroupAVCMcePayload:
1193 case clang::BuiltinType::OCLIntelSubgroupAVCImePayload:
1194 case clang::BuiltinType::OCLIntelSubgroupAVCRefPayload:
1195 case clang::BuiltinType::OCLIntelSubgroupAVCSicPayload:
1196 case clang::BuiltinType::OCLIntelSubgroupAVCMceResult:
1197 case clang::BuiltinType::OCLIntelSubgroupAVCImeResult:
1198 case clang::BuiltinType::OCLIntelSubgroupAVCRefResult:
1199 case clang::BuiltinType::OCLIntelSubgroupAVCSicResult:
1200 case clang::BuiltinType::OCLIntelSubgroupAVCImeResultSingleReferenceStreamout:
1201 case clang::BuiltinType::OCLIntelSubgroupAVCImeResultDualReferenceStreamout:
1202 case clang::BuiltinType::OCLIntelSubgroupAVCImeSingleReferenceStreamin:
1203 case clang::BuiltinType::OCLIntelSubgroupAVCImeDualReferenceStreamin:
1204 case clang::BuiltinType::SveInt8:
1205 case clang::BuiltinType::SveInt16:
1206 case clang::BuiltinType::SveInt32:
1207 case clang::BuiltinType::SveInt64:
1208 case clang::BuiltinType::SveUint8:
1209 case clang::BuiltinType::SveUint16:
1210 case clang::BuiltinType::SveUint32:
1211 case clang::BuiltinType::SveUint64:
1212 case clang::BuiltinType::SveFloat16:
1213 case clang::BuiltinType::SveFloat32:
1214 case clang::BuiltinType::SveFloat64:
1215 case clang::BuiltinType::SveBFloat16:
1216 case clang::BuiltinType::SveMFloat8:
1217 case clang::BuiltinType::SveInt8x2:
1218 case clang::BuiltinType::SveInt16x2:
1219 case clang::BuiltinType::SveInt32x2:
1220 case clang::BuiltinType::SveInt64x2:
1221 case clang::BuiltinType::SveUint8x2:
1222 case clang::BuiltinType::SveUint16x2:
1223 case clang::BuiltinType::SveUint32x2:
1224 case clang::BuiltinType::SveUint64x2:
1225 case clang::BuiltinType::SveFloat16x2:
1226 case clang::BuiltinType::SveFloat32x2:
1227 case clang::BuiltinType::SveFloat64x2:
1228 case clang::BuiltinType::SveBFloat16x2:
1229 case clang::BuiltinType::SveMFloat8x2:
1230 case clang::BuiltinType::SveInt8x3:
1231 case clang::BuiltinType::SveInt16x3:
1232 case clang::BuiltinType::SveInt32x3:
1233 case clang::BuiltinType::SveInt64x3:
1234 case clang::BuiltinType::SveUint8x3:
1235 case clang::BuiltinType::SveUint16x3:
1236 case clang::BuiltinType::SveUint32x3:
1237 case clang::BuiltinType::SveUint64x3:
1238 case clang::BuiltinType::SveFloat16x3:
1239 case clang::BuiltinType::SveFloat32x3:
1240 case clang::BuiltinType::SveFloat64x3:
1241 case clang::BuiltinType::SveBFloat16x3:
1242 case clang::BuiltinType::SveMFloat8x3:
1243 case clang::BuiltinType::SveInt8x4:
1244 case clang::BuiltinType::SveInt16x4:
1245 case clang::BuiltinType::SveInt32x4:
1246 case clang::BuiltinType::SveInt64x4:
1247 case clang::BuiltinType::SveUint8x4:
1248 case clang::BuiltinType::SveUint16x4:
1249 case clang::BuiltinType::SveUint32x4:
1250 case clang::BuiltinType::SveUint64x4:
1251 case clang::BuiltinType::SveFloat16x4:
1252 case clang::BuiltinType::SveFloat32x4:
1253 case clang::BuiltinType::SveFloat64x4:
1254 case clang::BuiltinType::SveBFloat16x4:
1255 case clang::BuiltinType::SveMFloat8x4:
1256 case clang::BuiltinType::SveBool:
1257 case clang::BuiltinType::SveBoolx2:
1258 case clang::BuiltinType::SveBoolx4:
1259 case clang::BuiltinType::SveCount:
1260 case clang::BuiltinType::MFloat8:
1261 case clang::BuiltinType::DMR1024:
1262 case clang::BuiltinType::VectorQuad:
1263 case clang::BuiltinType::VectorPair:
1264 case clang::BuiltinType::RvvInt8mf8:
1265 case clang::BuiltinType::RvvInt8mf4:
1266 case clang::BuiltinType::RvvInt8mf2:
1267 case clang::BuiltinType::RvvInt8m1:
1268 case clang::BuiltinType::RvvInt8m2:
1269 case clang::BuiltinType::RvvInt8m4:
1270 case clang::BuiltinType::RvvInt8m8:
1271 case clang::BuiltinType::RvvUint8mf8:
1272 case clang::BuiltinType::RvvUint8mf4:
1273 case clang::BuiltinType::RvvUint8mf2:
1274 case clang::BuiltinType::RvvUint8m1:
1275 case clang::BuiltinType::RvvUint8m2:
1276 case clang::BuiltinType::RvvUint8m4:
1277 case clang::BuiltinType::RvvUint8m8:
1278 case clang::BuiltinType::RvvInt16mf4:
1279 case clang::BuiltinType::RvvInt16mf2:
1280 case clang::BuiltinType::RvvInt16m1:
1281 case clang::BuiltinType::RvvInt16m2:
1282 case clang::BuiltinType::RvvInt16m4:
1283 case clang::BuiltinType::RvvInt16m8:
1284 case clang::BuiltinType::RvvUint16mf4:
1285 case clang::BuiltinType::RvvUint16mf2:
1286 case clang::BuiltinType::RvvUint16m1:
1287 case clang::BuiltinType::RvvUint16m2:
1288 case clang::BuiltinType::RvvUint16m4:
1289 case clang::BuiltinType::RvvUint16m8:
1290 case clang::BuiltinType::RvvInt32mf2:
1291 case clang::BuiltinType::RvvInt32m1:
1292 case clang::BuiltinType::RvvInt32m2:
1293 case clang::BuiltinType::RvvInt32m4:
1294 case clang::BuiltinType::RvvInt32m8:
1295 case clang::BuiltinType::RvvUint32mf2:
1296 case clang::BuiltinType::RvvUint32m1:
1297 case clang::BuiltinType::RvvUint32m2:
1298 case clang::BuiltinType::RvvUint32m4:
1299 case clang::BuiltinType::RvvUint32m8:
1300 case clang::BuiltinType::RvvInt64m1:
1301 case clang::BuiltinType::RvvInt64m2:
1302 case clang::BuiltinType::RvvInt64m4:
1303 case clang::BuiltinType::RvvInt64m8:
1304 case clang::BuiltinType::RvvUint64m1:
1305 case clang::BuiltinType::RvvUint64m2:
1306 case clang::BuiltinType::RvvUint64m4:
1307 case clang::BuiltinType::RvvUint64m8:
1308 case clang::BuiltinType::RvvFloat16mf4:
1309 case clang::BuiltinType::RvvFloat16mf2:
1310 case clang::BuiltinType::RvvFloat16m1:
1311 case clang::BuiltinType::RvvFloat16m2:
1312 case clang::BuiltinType::RvvFloat16m4:
1313 case clang::BuiltinType::RvvFloat16m8:
1314 case clang::BuiltinType::RvvBFloat16mf4:
1315 case clang::BuiltinType::RvvBFloat16mf2:
1316 case clang::BuiltinType::RvvBFloat16m1:
1317 case clang::BuiltinType::RvvBFloat16m2:
1318 case clang::BuiltinType::RvvBFloat16m4:
1319 case clang::BuiltinType::RvvBFloat16m8:
1320 case clang::BuiltinType::RvvFloat32mf2:
1321 case clang::BuiltinType::RvvFloat32m1:
1322 case clang::BuiltinType::RvvFloat32m2:
1323 case clang::BuiltinType::RvvFloat32m4:
1324 case clang::BuiltinType::RvvFloat32m8:
1325 case clang::BuiltinType::RvvFloat64m1:
1326 case clang::BuiltinType::RvvFloat64m2:
1327 case clang::BuiltinType::RvvFloat64m4:
1328 case clang::BuiltinType::RvvFloat64m8:
1329 case clang::BuiltinType::RvvBool1:
1330 case clang::BuiltinType::RvvBool2:
1331 case clang::BuiltinType::RvvBool4:
1332 case clang::BuiltinType::RvvBool8:
1333 case clang::BuiltinType::RvvBool16:
1334 case clang::BuiltinType::RvvBool32:
1335 case clang::BuiltinType::RvvBool64:
1336 case clang::BuiltinType::RvvInt8mf8x2:
1337 case clang::BuiltinType::RvvInt8mf8x3:
1338 case clang::BuiltinType::RvvInt8mf8x4:
1339 case clang::BuiltinType::RvvInt8mf8x5:
1340 case clang::BuiltinType::RvvInt8mf8x6:
1341 case clang::BuiltinType::RvvInt8mf8x7:
1342 case clang::BuiltinType::RvvInt8mf8x8:
1343 case clang::BuiltinType::RvvInt8mf4x2:
1344 case clang::BuiltinType::RvvInt8mf4x3:
1345 case clang::BuiltinType::RvvInt8mf4x4:
1346 case clang::BuiltinType::RvvInt8mf4x5:
1347 case clang::BuiltinType::RvvInt8mf4x6:
1348 case clang::BuiltinType::RvvInt8mf4x7:
1349 case clang::BuiltinType::RvvInt8mf4x8:
1350 case clang::BuiltinType::RvvInt8mf2x2:
1351 case clang::BuiltinType::RvvInt8mf2x3:
1352 case clang::BuiltinType::RvvInt8mf2x4:
1353 case clang::BuiltinType::RvvInt8mf2x5:
1354 case clang::BuiltinType::RvvInt8mf2x6:
1355 case clang::BuiltinType::RvvInt8mf2x7:
1356 case clang::BuiltinType::RvvInt8mf2x8:
1357 case clang::BuiltinType::RvvInt8m1x2:
1358 case clang::BuiltinType::RvvInt8m1x3:
1359 case clang::BuiltinType::RvvInt8m1x4:
1360 case clang::BuiltinType::RvvInt8m1x5:
1361 case clang::BuiltinType::RvvInt8m1x6:
1362 case clang::BuiltinType::RvvInt8m1x7:
1363 case clang::BuiltinType::RvvInt8m1x8:
1364 case clang::BuiltinType::RvvInt8m2x2:
1365 case clang::BuiltinType::RvvInt8m2x3:
1366 case clang::BuiltinType::RvvInt8m2x4:
1367 case clang::BuiltinType::RvvInt8m4x2:
1368 case clang::BuiltinType::RvvUint8mf8x2:
1369 case clang::BuiltinType::RvvUint8mf8x3:
1370 case clang::BuiltinType::RvvUint8mf8x4:
1371 case clang::BuiltinType::RvvUint8mf8x5:
1372 case clang::BuiltinType::RvvUint8mf8x6:
1373 case clang::BuiltinType::RvvUint8mf8x7:
1374 case clang::BuiltinType::RvvUint8mf8x8:
1375 case clang::BuiltinType::RvvUint8mf4x2:
1376 case clang::BuiltinType::RvvUint8mf4x3:
1377 case clang::BuiltinType::RvvUint8mf4x4:
1378 case clang::BuiltinType::RvvUint8mf4x5:
1379 case clang::BuiltinType::RvvUint8mf4x6:
1380 case clang::BuiltinType::RvvUint8mf4x7:
1381 case clang::BuiltinType::RvvUint8mf4x8:
1382 case clang::BuiltinType::RvvUint8mf2x2:
1383 case clang::BuiltinType::RvvUint8mf2x3:
1384 case clang::BuiltinType::RvvUint8mf2x4:
1385 case clang::BuiltinType::RvvUint8mf2x5:
1386 case clang::BuiltinType::RvvUint8mf2x6:
1387 case clang::BuiltinType::RvvUint8mf2x7:
1388 case clang::BuiltinType::RvvUint8mf2x8:
1389 case clang::BuiltinType::RvvUint8m1x2:
1390 case clang::BuiltinType::RvvUint8m1x3:
1391 case clang::BuiltinType::RvvUint8m1x4:
1392 case clang::BuiltinType::RvvUint8m1x5:
1393 case clang::BuiltinType::RvvUint8m1x6:
1394 case clang::BuiltinType::RvvUint8m1x7:
1395 case clang::BuiltinType::RvvUint8m1x8:
1396 case clang::BuiltinType::RvvUint8m2x2:
1397 case clang::BuiltinType::RvvUint8m2x3:
1398 case clang::BuiltinType::RvvUint8m2x4:
1399 case clang::BuiltinType::RvvUint8m4x2:
1400 case clang::BuiltinType::RvvInt16mf4x2:
1401 case clang::BuiltinType::RvvInt16mf4x3:
1402 case clang::BuiltinType::RvvInt16mf4x4:
1403 case clang::BuiltinType::RvvInt16mf4x5:
1404 case clang::BuiltinType::RvvInt16mf4x6:
1405 case clang::BuiltinType::RvvInt16mf4x7:
1406 case clang::BuiltinType::RvvInt16mf4x8:
1407 case clang::BuiltinType::RvvInt16mf2x2:
1408 case clang::BuiltinType::RvvInt16mf2x3:
1409 case clang::BuiltinType::RvvInt16mf2x4:
1410 case clang::BuiltinType::RvvInt16mf2x5:
1411 case clang::BuiltinType::RvvInt16mf2x6:
1412 case clang::BuiltinType::RvvInt16mf2x7:
1413 case clang::BuiltinType::RvvInt16mf2x8:
1414 case clang::BuiltinType::RvvInt16m1x2:
1415 case clang::BuiltinType::RvvInt16m1x3:
1416 case clang::BuiltinType::RvvInt16m1x4:
1417 case clang::BuiltinType::RvvInt16m1x5:
1418 case clang::BuiltinType::RvvInt16m1x6:
1419 case clang::BuiltinType::RvvInt16m1x7:
1420 case clang::BuiltinType::RvvInt16m1x8:
1421 case clang::BuiltinType::RvvInt16m2x2:
1422 case clang::BuiltinType::RvvInt16m2x3:
1423 case clang::BuiltinType::RvvInt16m2x4:
1424 case clang::BuiltinType::RvvInt16m4x2:
1425 case clang::BuiltinType::RvvUint16mf4x2:
1426 case clang::BuiltinType::RvvUint16mf4x3:
1427 case clang::BuiltinType::RvvUint16mf4x4:
1428 case clang::BuiltinType::RvvUint16mf4x5:
1429 case clang::BuiltinType::RvvUint16mf4x6:
1430 case clang::BuiltinType::RvvUint16mf4x7:
1431 case clang::BuiltinType::RvvUint16mf4x8:
1432 case clang::BuiltinType::RvvUint16mf2x2:
1433 case clang::BuiltinType::RvvUint16mf2x3:
1434 case clang::BuiltinType::RvvUint16mf2x4:
1435 case clang::BuiltinType::RvvUint16mf2x5:
1436 case clang::BuiltinType::RvvUint16mf2x6:
1437 case clang::BuiltinType::RvvUint16mf2x7:
1438 case clang::BuiltinType::RvvUint16mf2x8:
1439 case clang::BuiltinType::RvvUint16m1x2:
1440 case clang::BuiltinType::RvvUint16m1x3:
1441 case clang::BuiltinType::RvvUint16m1x4:
1442 case clang::BuiltinType::RvvUint16m1x5:
1443 case clang::BuiltinType::RvvUint16m1x6:
1444 case clang::BuiltinType::RvvUint16m1x7:
1445 case clang::BuiltinType::RvvUint16m1x8:
1446 case clang::BuiltinType::RvvUint16m2x2:
1447 case clang::BuiltinType::RvvUint16m2x3:
1448 case clang::BuiltinType::RvvUint16m2x4:
1449 case clang::BuiltinType::RvvUint16m4x2:
1450 case clang::BuiltinType::RvvInt32mf2x2:
1451 case clang::BuiltinType::RvvInt32mf2x3:
1452 case clang::BuiltinType::RvvInt32mf2x4:
1453 case clang::BuiltinType::RvvInt32mf2x5:
1454 case clang::BuiltinType::RvvInt32mf2x6:
1455 case clang::BuiltinType::RvvInt32mf2x7:
1456 case clang::BuiltinType::RvvInt32mf2x8:
1457 case clang::BuiltinType::RvvInt32m1x2:
1458 case clang::BuiltinType::RvvInt32m1x3:
1459 case clang::BuiltinType::RvvInt32m1x4:
1460 case clang::BuiltinType::RvvInt32m1x5:
1461 case clang::BuiltinType::RvvInt32m1x6:
1462 case clang::BuiltinType::RvvInt32m1x7:
1463 case clang::BuiltinType::RvvInt32m1x8:
1464 case clang::BuiltinType::RvvInt32m2x2:
1465 case clang::BuiltinType::RvvInt32m2x3:
1466 case clang::BuiltinType::RvvInt32m2x4:
1467 case clang::BuiltinType::RvvInt32m4x2:
1468 case clang::BuiltinType::RvvUint32mf2x2:
1469 case clang::BuiltinType::RvvUint32mf2x3:
1470 case clang::BuiltinType::RvvUint32mf2x4:
1471 case clang::BuiltinType::RvvUint32mf2x5:
1472 case clang::BuiltinType::RvvUint32mf2x6:
1473 case clang::BuiltinType::RvvUint32mf2x7:
1474 case clang::BuiltinType::RvvUint32mf2x8:
1475 case clang::BuiltinType::RvvUint32m1x2:
1476 case clang::BuiltinType::RvvUint32m1x3:
1477 case clang::BuiltinType::RvvUint32m1x4:
1478 case clang::BuiltinType::RvvUint32m1x5:
1479 case clang::BuiltinType::RvvUint32m1x6:
1480 case clang::BuiltinType::RvvUint32m1x7:
1481 case clang::BuiltinType::RvvUint32m1x8:
1482 case clang::BuiltinType::RvvUint32m2x2:
1483 case clang::BuiltinType::RvvUint32m2x3:
1484 case clang::BuiltinType::RvvUint32m2x4:
1485 case clang::BuiltinType::RvvUint32m4x2:
1486 case clang::BuiltinType::RvvInt64m1x2:
1487 case clang::BuiltinType::RvvInt64m1x3:
1488 case clang::BuiltinType::RvvInt64m1x4:
1489 case clang::BuiltinType::RvvInt64m1x5:
1490 case clang::BuiltinType::RvvInt64m1x6:
1491 case clang::BuiltinType::RvvInt64m1x7:
1492 case clang::BuiltinType::RvvInt64m1x8:
1493 case clang::BuiltinType::RvvInt64m2x2:
1494 case clang::BuiltinType::RvvInt64m2x3:
1495 case clang::BuiltinType::RvvInt64m2x4:
1496 case clang::BuiltinType::RvvInt64m4x2:
1497 case clang::BuiltinType::RvvUint64m1x2:
1498 case clang::BuiltinType::RvvUint64m1x3:
1499 case clang::BuiltinType::RvvUint64m1x4:
1500 case clang::BuiltinType::RvvUint64m1x5:
1501 case clang::BuiltinType::RvvUint64m1x6:
1502 case clang::BuiltinType::RvvUint64m1x7:
1503 case clang::BuiltinType::RvvUint64m1x8:
1504 case clang::BuiltinType::RvvUint64m2x2:
1505 case clang::BuiltinType::RvvUint64m2x3:
1506 case clang::BuiltinType::RvvUint64m2x4:
1507 case clang::BuiltinType::RvvUint64m4x2:
1508 case clang::BuiltinType::RvvFloat16mf4x2:
1509 case clang::BuiltinType::RvvFloat16mf4x3:
1510 case clang::BuiltinType::RvvFloat16mf4x4:
1511 case clang::BuiltinType::RvvFloat16mf4x5:
1512 case clang::BuiltinType::RvvFloat16mf4x6:
1513 case clang::BuiltinType::RvvFloat16mf4x7:
1514 case clang::BuiltinType::RvvFloat16mf4x8:
1515 case clang::BuiltinType::RvvFloat16mf2x2:
1516 case clang::BuiltinType::RvvFloat16mf2x3:
1517 case clang::BuiltinType::RvvFloat16mf2x4:
1518 case clang::BuiltinType::RvvFloat16mf2x5:
1519 case clang::BuiltinType::RvvFloat16mf2x6:
1520 case clang::BuiltinType::RvvFloat16mf2x7:
1521 case clang::BuiltinType::RvvFloat16mf2x8:
1522 case clang::BuiltinType::RvvFloat16m1x2:
1523 case clang::BuiltinType::RvvFloat16m1x3:
1524 case clang::BuiltinType::RvvFloat16m1x4:
1525 case clang::BuiltinType::RvvFloat16m1x5:
1526 case clang::BuiltinType::RvvFloat16m1x6:
1527 case clang::BuiltinType::RvvFloat16m1x7:
1528 case clang::BuiltinType::RvvFloat16m1x8:
1529 case clang::BuiltinType::RvvFloat16m2x2:
1530 case clang::BuiltinType::RvvFloat16m2x3:
1531 case clang::BuiltinType::RvvFloat16m2x4:
1532 case clang::BuiltinType::RvvFloat16m4x2:
1533 case clang::BuiltinType::RvvFloat32mf2x2:
1534 case clang::BuiltinType::RvvFloat32mf2x3:
1535 case clang::BuiltinType::RvvFloat32mf2x4:
1536 case clang::BuiltinType::RvvFloat32mf2x5:
1537 case clang::BuiltinType::RvvFloat32mf2x6:
1538 case clang::BuiltinType::RvvFloat32mf2x7:
1539 case clang::BuiltinType::RvvFloat32mf2x8:
1540 case clang::BuiltinType::RvvFloat32m1x2:
1541 case clang::BuiltinType::RvvFloat32m1x3:
1542 case clang::BuiltinType::RvvFloat32m1x4:
1543 case clang::BuiltinType::RvvFloat32m1x5:
1544 case clang::BuiltinType::RvvFloat32m1x6:
1545 case clang::BuiltinType::RvvFloat32m1x7:
1546 case clang::BuiltinType::RvvFloat32m1x8:
1547 case clang::BuiltinType::RvvFloat32m2x2:
1548 case clang::BuiltinType::RvvFloat32m2x3:
1549 case clang::BuiltinType::RvvFloat32m2x4:
1550 case clang::BuiltinType::RvvFloat32m4x2:
1551 case clang::BuiltinType::RvvFloat64m1x2:
1552 case clang::BuiltinType::RvvFloat64m1x3:
1553 case clang::BuiltinType::RvvFloat64m1x4:
1554 case clang::BuiltinType::RvvFloat64m1x5:
1555 case clang::BuiltinType::RvvFloat64m1x6:
1556 case clang::BuiltinType::RvvFloat64m1x7:
1557 case clang::BuiltinType::RvvFloat64m1x8:
1558 case clang::BuiltinType::RvvFloat64m2x2:
1559 case clang::BuiltinType::RvvFloat64m2x3:
1560 case clang::BuiltinType::RvvFloat64m2x4:
1561 case clang::BuiltinType::RvvFloat64m4x2:
1562 case clang::BuiltinType::RvvBFloat16mf4x2:
1563 case clang::BuiltinType::RvvBFloat16mf4x3:
1564 case clang::BuiltinType::RvvBFloat16mf4x4:
1565 case clang::BuiltinType::RvvBFloat16mf4x5:
1566 case clang::BuiltinType::RvvBFloat16mf4x6:
1567 case clang::BuiltinType::RvvBFloat16mf4x7:
1568 case clang::BuiltinType::RvvBFloat16mf4x8:
1569 case clang::BuiltinType::RvvBFloat16mf2x2:
1570 case clang::BuiltinType::RvvBFloat16mf2x3:
1571 case clang::BuiltinType::RvvBFloat16mf2x4:
1572 case clang::BuiltinType::RvvBFloat16mf2x5:
1573 case clang::BuiltinType::RvvBFloat16mf2x6:
1574 case clang::BuiltinType::RvvBFloat16mf2x7:
1575 case clang::BuiltinType::RvvBFloat16mf2x8:
1576 case clang::BuiltinType::RvvBFloat16m1x2:
1577 case clang::BuiltinType::RvvBFloat16m1x3:
1578 case clang::BuiltinType::RvvBFloat16m1x4:
1579 case clang::BuiltinType::RvvBFloat16m1x5:
1580 case clang::BuiltinType::RvvBFloat16m1x6:
1581 case clang::BuiltinType::RvvBFloat16m1x7:
1582 case clang::BuiltinType::RvvBFloat16m1x8:
1583 case clang::BuiltinType::RvvBFloat16m2x2:
1584 case clang::BuiltinType::RvvBFloat16m2x3:
1585 case clang::BuiltinType::RvvBFloat16m2x4:
1586 case clang::BuiltinType::RvvBFloat16m4x2:
1587 case clang::BuiltinType::WasmExternRef:
1588 case clang::BuiltinType::AMDGPUBufferRsrc:
1589 case clang::BuiltinType::AMDGPUNamedWorkgroupBarrier:
1590 case clang::BuiltinType::HLSLResource:
1591 case clang::BuiltinType::Void:
1592 case clang::BuiltinType::Bool:
1593 case clang::BuiltinType::Char_U:
1594 case clang::BuiltinType::UChar:
1595 case clang::BuiltinType::WChar_U:
1596 case clang::BuiltinType::Char8:
1597 case clang::BuiltinType::Char16:
1598 case clang::BuiltinType::Char32:
1599 case clang::BuiltinType::UShort:
1600 case clang::BuiltinType::UInt:
1601 case clang::BuiltinType::ULong:
1602 case clang::BuiltinType::ULongLong:
1603 case clang::BuiltinType::UInt128:
1604 case clang::BuiltinType::Char_S:
1605 case clang::BuiltinType::SChar:
1606 case clang::BuiltinType::WChar_S:
1607 case clang::BuiltinType::Short:
1608 case clang::BuiltinType::Int:
1609 case clang::BuiltinType::Long:
1610 case clang::BuiltinType::LongLong:
1611 case clang::BuiltinType::Int128:
1612 case clang::BuiltinType::ShortAccum:
1613 case clang::BuiltinType::Accum:
1614 case clang::BuiltinType::LongAccum:
1615 case clang::BuiltinType::UShortAccum:
1616 case clang::BuiltinType::UAccum:
1617 case clang::BuiltinType::ULongAccum:
1618 case clang::BuiltinType::ShortFract:
1619 case clang::BuiltinType::Fract:
1620 case clang::BuiltinType::LongFract:
1621 case clang::BuiltinType::UShortFract:
1622 case clang::BuiltinType::UFract:
1623 case clang::BuiltinType::ULongFract:
1624 case clang::BuiltinType::SatShortAccum:
1625 case clang::BuiltinType::SatAccum:
1626 case clang::BuiltinType::SatLongAccum:
1627 case clang::BuiltinType::SatUShortAccum:
1628 case clang::BuiltinType::SatUAccum:
1629 case clang::BuiltinType::SatULongAccum:
1630 case clang::BuiltinType::SatShortFract:
1631 case clang::BuiltinType::SatFract:
1632 case clang::BuiltinType::SatLongFract:
1633 case clang::BuiltinType::SatUShortFract:
1634 case clang::BuiltinType::SatUFract:
1635 case clang::BuiltinType::SatULongFract:
1636 case clang::BuiltinType::Half:
1637 case clang::BuiltinType::Float:
1638 case clang::BuiltinType::Double:
1639 case clang::BuiltinType::LongDouble:
1640 case clang::BuiltinType::Float16:
1641 case clang::BuiltinType::BFloat16:
1642 case clang::BuiltinType::Float128:
1643 case clang::BuiltinType::Ibm128:
1644 case clang::BuiltinType::NullPtr:
1645 case clang::BuiltinType::ObjCId:
1646 case clang::BuiltinType::ObjCClass:
1647 case clang::BuiltinType::ObjCSel:
1648 case clang::BuiltinType::OCLSampler:
1649 case clang::BuiltinType::OCLEvent:
1650 case clang::BuiltinType::OCLClkEvent:
1651 case clang::BuiltinType::OCLQueue:
1652 case clang::BuiltinType::OCLReserveID:
1653 case clang::BuiltinType::Dependent:
1654 case clang::BuiltinType::Overload:
1655 case clang::BuiltinType::BoundMember:
1656 case clang::BuiltinType::UnresolvedTemplate:
1657 case clang::BuiltinType::PseudoObject:
1658 case clang::BuiltinType::UnknownAny:
1659 case clang::BuiltinType::BuiltinFn:
1660 case clang::BuiltinType::ARCUnbridgedCast:
1661 case clang::BuiltinType::IncompleteMatrixIdx:
1662 case clang::BuiltinType::OMPArrayShaping:
1663 case clang::BuiltinType::OMPIterator:
1664 case clang::BuiltinType::ArraySection:
1665 break;
1666 }
1667}
1668
1669static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLImage1dRO == clang::BuiltinType::OCLImage1dRO, "");
1670static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLImage1dArrayRO == clang::BuiltinType::OCLImage1dArrayRO, "");
1671static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLImage1dBufferRO == clang::BuiltinType::OCLImage1dBufferRO, "");
1672static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLImage2dRO == clang::BuiltinType::OCLImage2dRO, "");
1673static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLImage2dArrayRO == clang::BuiltinType::OCLImage2dArrayRO, "");
1674static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLImage2dDepthRO == clang::BuiltinType::OCLImage2dDepthRO, "");
1675static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLImage2dArrayDepthRO == clang::BuiltinType::OCLImage2dArrayDepthRO, "");
1676static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLImage2dMSAARO == clang::BuiltinType::OCLImage2dMSAARO, "");
1677static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLImage2dArrayMSAARO == clang::BuiltinType::OCLImage2dArrayMSAARO, "");
1678static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLImage2dMSAADepthRO == clang::BuiltinType::OCLImage2dMSAADepthRO, "");
1679static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLImage2dArrayMSAADepthRO == clang::BuiltinType::OCLImage2dArrayMSAADepthRO, "");
1680static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLImage3dRO == clang::BuiltinType::OCLImage3dRO, "");
1681static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLImage1dWO == clang::BuiltinType::OCLImage1dWO, "");
1682static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLImage1dArrayWO == clang::BuiltinType::OCLImage1dArrayWO, "");
1683static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLImage1dBufferWO == clang::BuiltinType::OCLImage1dBufferWO, "");
1684static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLImage2dWO == clang::BuiltinType::OCLImage2dWO, "");
1685static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLImage2dArrayWO == clang::BuiltinType::OCLImage2dArrayWO, "");
1686static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLImage2dDepthWO == clang::BuiltinType::OCLImage2dDepthWO, "");
1687static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLImage2dArrayDepthWO == clang::BuiltinType::OCLImage2dArrayDepthWO, "");
1688static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLImage2dMSAAWO == clang::BuiltinType::OCLImage2dMSAAWO, "");
1689static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLImage2dArrayMSAAWO == clang::BuiltinType::OCLImage2dArrayMSAAWO, "");
1690static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLImage2dMSAADepthWO == clang::BuiltinType::OCLImage2dMSAADepthWO, "");
1691static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLImage2dArrayMSAADepthWO == clang::BuiltinType::OCLImage2dArrayMSAADepthWO, "");
1692static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLImage3dWO == clang::BuiltinType::OCLImage3dWO, "");
1693static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLImage1dRW == clang::BuiltinType::OCLImage1dRW, "");
1694static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLImage1dArrayRW == clang::BuiltinType::OCLImage1dArrayRW, "");
1695static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLImage1dBufferRW == clang::BuiltinType::OCLImage1dBufferRW, "");
1696static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLImage2dRW == clang::BuiltinType::OCLImage2dRW, "");
1697static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLImage2dArrayRW == clang::BuiltinType::OCLImage2dArrayRW, "");
1698static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLImage2dDepthRW == clang::BuiltinType::OCLImage2dDepthRW, "");
1699static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLImage2dArrayDepthRW == clang::BuiltinType::OCLImage2dArrayDepthRW, "");
1700static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLImage2dMSAARW == clang::BuiltinType::OCLImage2dMSAARW, "");
1701static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLImage2dArrayMSAARW == clang::BuiltinType::OCLImage2dArrayMSAARW, "");
1702static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLImage2dMSAADepthRW == clang::BuiltinType::OCLImage2dMSAADepthRW, "");
1703static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLImage2dArrayMSAADepthRW == clang::BuiltinType::OCLImage2dArrayMSAADepthRW, "");
1704static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLImage3dRW == clang::BuiltinType::OCLImage3dRW, "");
1705static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLIntelSubgroupAVCMcePayload == clang::BuiltinType::OCLIntelSubgroupAVCMcePayload, "");
1706static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLIntelSubgroupAVCImePayload == clang::BuiltinType::OCLIntelSubgroupAVCImePayload, "");
1707static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLIntelSubgroupAVCRefPayload == clang::BuiltinType::OCLIntelSubgroupAVCRefPayload, "");
1708static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLIntelSubgroupAVCSicPayload == clang::BuiltinType::OCLIntelSubgroupAVCSicPayload, "");
1709static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLIntelSubgroupAVCMceResult == clang::BuiltinType::OCLIntelSubgroupAVCMceResult, "");
1710static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLIntelSubgroupAVCImeResult == clang::BuiltinType::OCLIntelSubgroupAVCImeResult, "");
1711static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLIntelSubgroupAVCRefResult == clang::BuiltinType::OCLIntelSubgroupAVCRefResult, "");
1712static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLIntelSubgroupAVCSicResult == clang::BuiltinType::OCLIntelSubgroupAVCSicResult, "");
1713static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLIntelSubgroupAVCImeResultSingleReferenceStreamout == clang::BuiltinType::OCLIntelSubgroupAVCImeResultSingleReferenceStreamout, "");
1714static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLIntelSubgroupAVCImeResultDualReferenceStreamout == clang::BuiltinType::OCLIntelSubgroupAVCImeResultDualReferenceStreamout, "");
1715static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLIntelSubgroupAVCImeSingleReferenceStreamin == clang::BuiltinType::OCLIntelSubgroupAVCImeSingleReferenceStreamin, "");
1716static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLIntelSubgroupAVCImeDualReferenceStreamin == clang::BuiltinType::OCLIntelSubgroupAVCImeDualReferenceStreamin, "");
1717static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveInt8 == clang::BuiltinType::SveInt8, "");
1718static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveInt16 == clang::BuiltinType::SveInt16, "");
1719static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveInt32 == clang::BuiltinType::SveInt32, "");
1720static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveInt64 == clang::BuiltinType::SveInt64, "");
1721static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveUint8 == clang::BuiltinType::SveUint8, "");
1722static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveUint16 == clang::BuiltinType::SveUint16, "");
1723static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveUint32 == clang::BuiltinType::SveUint32, "");
1724static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveUint64 == clang::BuiltinType::SveUint64, "");
1725static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveFloat16 == clang::BuiltinType::SveFloat16, "");
1726static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveFloat32 == clang::BuiltinType::SveFloat32, "");
1727static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveFloat64 == clang::BuiltinType::SveFloat64, "");
1728static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveBFloat16 == clang::BuiltinType::SveBFloat16, "");
1729static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveMFloat8 == clang::BuiltinType::SveMFloat8, "");
1730static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveInt8x2 == clang::BuiltinType::SveInt8x2, "");
1731static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveInt16x2 == clang::BuiltinType::SveInt16x2, "");
1732static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveInt32x2 == clang::BuiltinType::SveInt32x2, "");
1733static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveInt64x2 == clang::BuiltinType::SveInt64x2, "");
1734static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveUint8x2 == clang::BuiltinType::SveUint8x2, "");
1735static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveUint16x2 == clang::BuiltinType::SveUint16x2, "");
1736static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveUint32x2 == clang::BuiltinType::SveUint32x2, "");
1737static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveUint64x2 == clang::BuiltinType::SveUint64x2, "");
1738static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveFloat16x2 == clang::BuiltinType::SveFloat16x2, "");
1739static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveFloat32x2 == clang::BuiltinType::SveFloat32x2, "");
1740static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveFloat64x2 == clang::BuiltinType::SveFloat64x2, "");
1741static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveBFloat16x2 == clang::BuiltinType::SveBFloat16x2, "");
1742static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveMFloat8x2 == clang::BuiltinType::SveMFloat8x2, "");
1743static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveInt8x3 == clang::BuiltinType::SveInt8x3, "");
1744static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveInt16x3 == clang::BuiltinType::SveInt16x3, "");
1745static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveInt32x3 == clang::BuiltinType::SveInt32x3, "");
1746static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveInt64x3 == clang::BuiltinType::SveInt64x3, "");
1747static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveUint8x3 == clang::BuiltinType::SveUint8x3, "");
1748static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveUint16x3 == clang::BuiltinType::SveUint16x3, "");
1749static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveUint32x3 == clang::BuiltinType::SveUint32x3, "");
1750static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveUint64x3 == clang::BuiltinType::SveUint64x3, "");
1751static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveFloat16x3 == clang::BuiltinType::SveFloat16x3, "");
1752static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveFloat32x3 == clang::BuiltinType::SveFloat32x3, "");
1753static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveFloat64x3 == clang::BuiltinType::SveFloat64x3, "");
1754static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveBFloat16x3 == clang::BuiltinType::SveBFloat16x3, "");
1755static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveMFloat8x3 == clang::BuiltinType::SveMFloat8x3, "");
1756static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveInt8x4 == clang::BuiltinType::SveInt8x4, "");
1757static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveInt16x4 == clang::BuiltinType::SveInt16x4, "");
1758static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveInt32x4 == clang::BuiltinType::SveInt32x4, "");
1759static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveInt64x4 == clang::BuiltinType::SveInt64x4, "");
1760static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveUint8x4 == clang::BuiltinType::SveUint8x4, "");
1761static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveUint16x4 == clang::BuiltinType::SveUint16x4, "");
1762static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveUint32x4 == clang::BuiltinType::SveUint32x4, "");
1763static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveUint64x4 == clang::BuiltinType::SveUint64x4, "");
1764static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveFloat16x4 == clang::BuiltinType::SveFloat16x4, "");
1765static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveFloat32x4 == clang::BuiltinType::SveFloat32x4, "");
1766static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveFloat64x4 == clang::BuiltinType::SveFloat64x4, "");
1767static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveBFloat16x4 == clang::BuiltinType::SveBFloat16x4, "");
1768static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveMFloat8x4 == clang::BuiltinType::SveMFloat8x4, "");
1769static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveBool == clang::BuiltinType::SveBool, "");
1770static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveBoolx2 == clang::BuiltinType::SveBoolx2, "");
1771static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveBoolx4 == clang::BuiltinType::SveBoolx4, "");
1772static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSveCount == clang::BuiltinType::SveCount, "");
1773static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeMFloat8 == clang::BuiltinType::MFloat8, "");
1774static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeDMR1024 == clang::BuiltinType::DMR1024, "");
1775static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeVectorQuad == clang::BuiltinType::VectorQuad, "");
1776static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeVectorPair == clang::BuiltinType::VectorPair, "");
1777static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt8mf8 == clang::BuiltinType::RvvInt8mf8, "");
1778static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt8mf4 == clang::BuiltinType::RvvInt8mf4, "");
1779static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt8mf2 == clang::BuiltinType::RvvInt8mf2, "");
1780static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt8m1 == clang::BuiltinType::RvvInt8m1, "");
1781static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt8m2 == clang::BuiltinType::RvvInt8m2, "");
1782static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt8m4 == clang::BuiltinType::RvvInt8m4, "");
1783static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt8m8 == clang::BuiltinType::RvvInt8m8, "");
1784static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint8mf8 == clang::BuiltinType::RvvUint8mf8, "");
1785static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint8mf4 == clang::BuiltinType::RvvUint8mf4, "");
1786static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint8mf2 == clang::BuiltinType::RvvUint8mf2, "");
1787static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint8m1 == clang::BuiltinType::RvvUint8m1, "");
1788static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint8m2 == clang::BuiltinType::RvvUint8m2, "");
1789static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint8m4 == clang::BuiltinType::RvvUint8m4, "");
1790static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint8m8 == clang::BuiltinType::RvvUint8m8, "");
1791static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt16mf4 == clang::BuiltinType::RvvInt16mf4, "");
1792static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt16mf2 == clang::BuiltinType::RvvInt16mf2, "");
1793static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt16m1 == clang::BuiltinType::RvvInt16m1, "");
1794static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt16m2 == clang::BuiltinType::RvvInt16m2, "");
1795static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt16m4 == clang::BuiltinType::RvvInt16m4, "");
1796static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt16m8 == clang::BuiltinType::RvvInt16m8, "");
1797static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint16mf4 == clang::BuiltinType::RvvUint16mf4, "");
1798static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint16mf2 == clang::BuiltinType::RvvUint16mf2, "");
1799static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint16m1 == clang::BuiltinType::RvvUint16m1, "");
1800static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint16m2 == clang::BuiltinType::RvvUint16m2, "");
1801static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint16m4 == clang::BuiltinType::RvvUint16m4, "");
1802static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint16m8 == clang::BuiltinType::RvvUint16m8, "");
1803static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt32mf2 == clang::BuiltinType::RvvInt32mf2, "");
1804static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt32m1 == clang::BuiltinType::RvvInt32m1, "");
1805static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt32m2 == clang::BuiltinType::RvvInt32m2, "");
1806static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt32m4 == clang::BuiltinType::RvvInt32m4, "");
1807static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt32m8 == clang::BuiltinType::RvvInt32m8, "");
1808static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint32mf2 == clang::BuiltinType::RvvUint32mf2, "");
1809static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint32m1 == clang::BuiltinType::RvvUint32m1, "");
1810static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint32m2 == clang::BuiltinType::RvvUint32m2, "");
1811static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint32m4 == clang::BuiltinType::RvvUint32m4, "");
1812static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint32m8 == clang::BuiltinType::RvvUint32m8, "");
1813static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt64m1 == clang::BuiltinType::RvvInt64m1, "");
1814static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt64m2 == clang::BuiltinType::RvvInt64m2, "");
1815static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt64m4 == clang::BuiltinType::RvvInt64m4, "");
1816static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt64m8 == clang::BuiltinType::RvvInt64m8, "");
1817static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint64m1 == clang::BuiltinType::RvvUint64m1, "");
1818static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint64m2 == clang::BuiltinType::RvvUint64m2, "");
1819static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint64m4 == clang::BuiltinType::RvvUint64m4, "");
1820static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint64m8 == clang::BuiltinType::RvvUint64m8, "");
1821static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat16mf4 == clang::BuiltinType::RvvFloat16mf4, "");
1822static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat16mf2 == clang::BuiltinType::RvvFloat16mf2, "");
1823static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat16m1 == clang::BuiltinType::RvvFloat16m1, "");
1824static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat16m2 == clang::BuiltinType::RvvFloat16m2, "");
1825static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat16m4 == clang::BuiltinType::RvvFloat16m4, "");
1826static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat16m8 == clang::BuiltinType::RvvFloat16m8, "");
1827static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvBFloat16mf4 == clang::BuiltinType::RvvBFloat16mf4, "");
1828static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvBFloat16mf2 == clang::BuiltinType::RvvBFloat16mf2, "");
1829static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvBFloat16m1 == clang::BuiltinType::RvvBFloat16m1, "");
1830static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvBFloat16m2 == clang::BuiltinType::RvvBFloat16m2, "");
1831static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvBFloat16m4 == clang::BuiltinType::RvvBFloat16m4, "");
1832static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvBFloat16m8 == clang::BuiltinType::RvvBFloat16m8, "");
1833static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat32mf2 == clang::BuiltinType::RvvFloat32mf2, "");
1834static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat32m1 == clang::BuiltinType::RvvFloat32m1, "");
1835static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat32m2 == clang::BuiltinType::RvvFloat32m2, "");
1836static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat32m4 == clang::BuiltinType::RvvFloat32m4, "");
1837static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat32m8 == clang::BuiltinType::RvvFloat32m8, "");
1838static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat64m1 == clang::BuiltinType::RvvFloat64m1, "");
1839static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat64m2 == clang::BuiltinType::RvvFloat64m2, "");
1840static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat64m4 == clang::BuiltinType::RvvFloat64m4, "");
1841static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat64m8 == clang::BuiltinType::RvvFloat64m8, "");
1842static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvBool1 == clang::BuiltinType::RvvBool1, "");
1843static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvBool2 == clang::BuiltinType::RvvBool2, "");
1844static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvBool4 == clang::BuiltinType::RvvBool4, "");
1845static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvBool8 == clang::BuiltinType::RvvBool8, "");
1846static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvBool16 == clang::BuiltinType::RvvBool16, "");
1847static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvBool32 == clang::BuiltinType::RvvBool32, "");
1848static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvBool64 == clang::BuiltinType::RvvBool64, "");
1849static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt8mf8x2 == clang::BuiltinType::RvvInt8mf8x2, "");
1850static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt8mf8x3 == clang::BuiltinType::RvvInt8mf8x3, "");
1851static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt8mf8x4 == clang::BuiltinType::RvvInt8mf8x4, "");
1852static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt8mf8x5 == clang::BuiltinType::RvvInt8mf8x5, "");
1853static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt8mf8x6 == clang::BuiltinType::RvvInt8mf8x6, "");
1854static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt8mf8x7 == clang::BuiltinType::RvvInt8mf8x7, "");
1855static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt8mf8x8 == clang::BuiltinType::RvvInt8mf8x8, "");
1856static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt8mf4x2 == clang::BuiltinType::RvvInt8mf4x2, "");
1857static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt8mf4x3 == clang::BuiltinType::RvvInt8mf4x3, "");
1858static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt8mf4x4 == clang::BuiltinType::RvvInt8mf4x4, "");
1859static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt8mf4x5 == clang::BuiltinType::RvvInt8mf4x5, "");
1860static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt8mf4x6 == clang::BuiltinType::RvvInt8mf4x6, "");
1861static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt8mf4x7 == clang::BuiltinType::RvvInt8mf4x7, "");
1862static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt8mf4x8 == clang::BuiltinType::RvvInt8mf4x8, "");
1863static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt8mf2x2 == clang::BuiltinType::RvvInt8mf2x2, "");
1864static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt8mf2x3 == clang::BuiltinType::RvvInt8mf2x3, "");
1865static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt8mf2x4 == clang::BuiltinType::RvvInt8mf2x4, "");
1866static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt8mf2x5 == clang::BuiltinType::RvvInt8mf2x5, "");
1867static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt8mf2x6 == clang::BuiltinType::RvvInt8mf2x6, "");
1868static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt8mf2x7 == clang::BuiltinType::RvvInt8mf2x7, "");
1869static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt8mf2x8 == clang::BuiltinType::RvvInt8mf2x8, "");
1870static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt8m1x2 == clang::BuiltinType::RvvInt8m1x2, "");
1871static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt8m1x3 == clang::BuiltinType::RvvInt8m1x3, "");
1872static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt8m1x4 == clang::BuiltinType::RvvInt8m1x4, "");
1873static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt8m1x5 == clang::BuiltinType::RvvInt8m1x5, "");
1874static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt8m1x6 == clang::BuiltinType::RvvInt8m1x6, "");
1875static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt8m1x7 == clang::BuiltinType::RvvInt8m1x7, "");
1876static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt8m1x8 == clang::BuiltinType::RvvInt8m1x8, "");
1877static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt8m2x2 == clang::BuiltinType::RvvInt8m2x2, "");
1878static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt8m2x3 == clang::BuiltinType::RvvInt8m2x3, "");
1879static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt8m2x4 == clang::BuiltinType::RvvInt8m2x4, "");
1880static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt8m4x2 == clang::BuiltinType::RvvInt8m4x2, "");
1881static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint8mf8x2 == clang::BuiltinType::RvvUint8mf8x2, "");
1882static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint8mf8x3 == clang::BuiltinType::RvvUint8mf8x3, "");
1883static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint8mf8x4 == clang::BuiltinType::RvvUint8mf8x4, "");
1884static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint8mf8x5 == clang::BuiltinType::RvvUint8mf8x5, "");
1885static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint8mf8x6 == clang::BuiltinType::RvvUint8mf8x6, "");
1886static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint8mf8x7 == clang::BuiltinType::RvvUint8mf8x7, "");
1887static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint8mf8x8 == clang::BuiltinType::RvvUint8mf8x8, "");
1888static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint8mf4x2 == clang::BuiltinType::RvvUint8mf4x2, "");
1889static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint8mf4x3 == clang::BuiltinType::RvvUint8mf4x3, "");
1890static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint8mf4x4 == clang::BuiltinType::RvvUint8mf4x4, "");
1891static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint8mf4x5 == clang::BuiltinType::RvvUint8mf4x5, "");
1892static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint8mf4x6 == clang::BuiltinType::RvvUint8mf4x6, "");
1893static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint8mf4x7 == clang::BuiltinType::RvvUint8mf4x7, "");
1894static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint8mf4x8 == clang::BuiltinType::RvvUint8mf4x8, "");
1895static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint8mf2x2 == clang::BuiltinType::RvvUint8mf2x2, "");
1896static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint8mf2x3 == clang::BuiltinType::RvvUint8mf2x3, "");
1897static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint8mf2x4 == clang::BuiltinType::RvvUint8mf2x4, "");
1898static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint8mf2x5 == clang::BuiltinType::RvvUint8mf2x5, "");
1899static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint8mf2x6 == clang::BuiltinType::RvvUint8mf2x6, "");
1900static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint8mf2x7 == clang::BuiltinType::RvvUint8mf2x7, "");
1901static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint8mf2x8 == clang::BuiltinType::RvvUint8mf2x8, "");
1902static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint8m1x2 == clang::BuiltinType::RvvUint8m1x2, "");
1903static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint8m1x3 == clang::BuiltinType::RvvUint8m1x3, "");
1904static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint8m1x4 == clang::BuiltinType::RvvUint8m1x4, "");
1905static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint8m1x5 == clang::BuiltinType::RvvUint8m1x5, "");
1906static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint8m1x6 == clang::BuiltinType::RvvUint8m1x6, "");
1907static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint8m1x7 == clang::BuiltinType::RvvUint8m1x7, "");
1908static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint8m1x8 == clang::BuiltinType::RvvUint8m1x8, "");
1909static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint8m2x2 == clang::BuiltinType::RvvUint8m2x2, "");
1910static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint8m2x3 == clang::BuiltinType::RvvUint8m2x3, "");
1911static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint8m2x4 == clang::BuiltinType::RvvUint8m2x4, "");
1912static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint8m4x2 == clang::BuiltinType::RvvUint8m4x2, "");
1913static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt16mf4x2 == clang::BuiltinType::RvvInt16mf4x2, "");
1914static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt16mf4x3 == clang::BuiltinType::RvvInt16mf4x3, "");
1915static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt16mf4x4 == clang::BuiltinType::RvvInt16mf4x4, "");
1916static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt16mf4x5 == clang::BuiltinType::RvvInt16mf4x5, "");
1917static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt16mf4x6 == clang::BuiltinType::RvvInt16mf4x6, "");
1918static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt16mf4x7 == clang::BuiltinType::RvvInt16mf4x7, "");
1919static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt16mf4x8 == clang::BuiltinType::RvvInt16mf4x8, "");
1920static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt16mf2x2 == clang::BuiltinType::RvvInt16mf2x2, "");
1921static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt16mf2x3 == clang::BuiltinType::RvvInt16mf2x3, "");
1922static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt16mf2x4 == clang::BuiltinType::RvvInt16mf2x4, "");
1923static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt16mf2x5 == clang::BuiltinType::RvvInt16mf2x5, "");
1924static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt16mf2x6 == clang::BuiltinType::RvvInt16mf2x6, "");
1925static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt16mf2x7 == clang::BuiltinType::RvvInt16mf2x7, "");
1926static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt16mf2x8 == clang::BuiltinType::RvvInt16mf2x8, "");
1927static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt16m1x2 == clang::BuiltinType::RvvInt16m1x2, "");
1928static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt16m1x3 == clang::BuiltinType::RvvInt16m1x3, "");
1929static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt16m1x4 == clang::BuiltinType::RvvInt16m1x4, "");
1930static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt16m1x5 == clang::BuiltinType::RvvInt16m1x5, "");
1931static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt16m1x6 == clang::BuiltinType::RvvInt16m1x6, "");
1932static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt16m1x7 == clang::BuiltinType::RvvInt16m1x7, "");
1933static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt16m1x8 == clang::BuiltinType::RvvInt16m1x8, "");
1934static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt16m2x2 == clang::BuiltinType::RvvInt16m2x2, "");
1935static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt16m2x3 == clang::BuiltinType::RvvInt16m2x3, "");
1936static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt16m2x4 == clang::BuiltinType::RvvInt16m2x4, "");
1937static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt16m4x2 == clang::BuiltinType::RvvInt16m4x2, "");
1938static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint16mf4x2 == clang::BuiltinType::RvvUint16mf4x2, "");
1939static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint16mf4x3 == clang::BuiltinType::RvvUint16mf4x3, "");
1940static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint16mf4x4 == clang::BuiltinType::RvvUint16mf4x4, "");
1941static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint16mf4x5 == clang::BuiltinType::RvvUint16mf4x5, "");
1942static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint16mf4x6 == clang::BuiltinType::RvvUint16mf4x6, "");
1943static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint16mf4x7 == clang::BuiltinType::RvvUint16mf4x7, "");
1944static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint16mf4x8 == clang::BuiltinType::RvvUint16mf4x8, "");
1945static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint16mf2x2 == clang::BuiltinType::RvvUint16mf2x2, "");
1946static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint16mf2x3 == clang::BuiltinType::RvvUint16mf2x3, "");
1947static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint16mf2x4 == clang::BuiltinType::RvvUint16mf2x4, "");
1948static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint16mf2x5 == clang::BuiltinType::RvvUint16mf2x5, "");
1949static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint16mf2x6 == clang::BuiltinType::RvvUint16mf2x6, "");
1950static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint16mf2x7 == clang::BuiltinType::RvvUint16mf2x7, "");
1951static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint16mf2x8 == clang::BuiltinType::RvvUint16mf2x8, "");
1952static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint16m1x2 == clang::BuiltinType::RvvUint16m1x2, "");
1953static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint16m1x3 == clang::BuiltinType::RvvUint16m1x3, "");
1954static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint16m1x4 == clang::BuiltinType::RvvUint16m1x4, "");
1955static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint16m1x5 == clang::BuiltinType::RvvUint16m1x5, "");
1956static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint16m1x6 == clang::BuiltinType::RvvUint16m1x6, "");
1957static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint16m1x7 == clang::BuiltinType::RvvUint16m1x7, "");
1958static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint16m1x8 == clang::BuiltinType::RvvUint16m1x8, "");
1959static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint16m2x2 == clang::BuiltinType::RvvUint16m2x2, "");
1960static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint16m2x3 == clang::BuiltinType::RvvUint16m2x3, "");
1961static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint16m2x4 == clang::BuiltinType::RvvUint16m2x4, "");
1962static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint16m4x2 == clang::BuiltinType::RvvUint16m4x2, "");
1963static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt32mf2x2 == clang::BuiltinType::RvvInt32mf2x2, "");
1964static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt32mf2x3 == clang::BuiltinType::RvvInt32mf2x3, "");
1965static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt32mf2x4 == clang::BuiltinType::RvvInt32mf2x4, "");
1966static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt32mf2x5 == clang::BuiltinType::RvvInt32mf2x5, "");
1967static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt32mf2x6 == clang::BuiltinType::RvvInt32mf2x6, "");
1968static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt32mf2x7 == clang::BuiltinType::RvvInt32mf2x7, "");
1969static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt32mf2x8 == clang::BuiltinType::RvvInt32mf2x8, "");
1970static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt32m1x2 == clang::BuiltinType::RvvInt32m1x2, "");
1971static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt32m1x3 == clang::BuiltinType::RvvInt32m1x3, "");
1972static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt32m1x4 == clang::BuiltinType::RvvInt32m1x4, "");
1973static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt32m1x5 == clang::BuiltinType::RvvInt32m1x5, "");
1974static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt32m1x6 == clang::BuiltinType::RvvInt32m1x6, "");
1975static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt32m1x7 == clang::BuiltinType::RvvInt32m1x7, "");
1976static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt32m1x8 == clang::BuiltinType::RvvInt32m1x8, "");
1977static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt32m2x2 == clang::BuiltinType::RvvInt32m2x2, "");
1978static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt32m2x3 == clang::BuiltinType::RvvInt32m2x3, "");
1979static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt32m2x4 == clang::BuiltinType::RvvInt32m2x4, "");
1980static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt32m4x2 == clang::BuiltinType::RvvInt32m4x2, "");
1981static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint32mf2x2 == clang::BuiltinType::RvvUint32mf2x2, "");
1982static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint32mf2x3 == clang::BuiltinType::RvvUint32mf2x3, "");
1983static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint32mf2x4 == clang::BuiltinType::RvvUint32mf2x4, "");
1984static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint32mf2x5 == clang::BuiltinType::RvvUint32mf2x5, "");
1985static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint32mf2x6 == clang::BuiltinType::RvvUint32mf2x6, "");
1986static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint32mf2x7 == clang::BuiltinType::RvvUint32mf2x7, "");
1987static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint32mf2x8 == clang::BuiltinType::RvvUint32mf2x8, "");
1988static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint32m1x2 == clang::BuiltinType::RvvUint32m1x2, "");
1989static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint32m1x3 == clang::BuiltinType::RvvUint32m1x3, "");
1990static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint32m1x4 == clang::BuiltinType::RvvUint32m1x4, "");
1991static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint32m1x5 == clang::BuiltinType::RvvUint32m1x5, "");
1992static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint32m1x6 == clang::BuiltinType::RvvUint32m1x6, "");
1993static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint32m1x7 == clang::BuiltinType::RvvUint32m1x7, "");
1994static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint32m1x8 == clang::BuiltinType::RvvUint32m1x8, "");
1995static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint32m2x2 == clang::BuiltinType::RvvUint32m2x2, "");
1996static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint32m2x3 == clang::BuiltinType::RvvUint32m2x3, "");
1997static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint32m2x4 == clang::BuiltinType::RvvUint32m2x4, "");
1998static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint32m4x2 == clang::BuiltinType::RvvUint32m4x2, "");
1999static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt64m1x2 == clang::BuiltinType::RvvInt64m1x2, "");
2000static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt64m1x3 == clang::BuiltinType::RvvInt64m1x3, "");
2001static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt64m1x4 == clang::BuiltinType::RvvInt64m1x4, "");
2002static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt64m1x5 == clang::BuiltinType::RvvInt64m1x5, "");
2003static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt64m1x6 == clang::BuiltinType::RvvInt64m1x6, "");
2004static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt64m1x7 == clang::BuiltinType::RvvInt64m1x7, "");
2005static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt64m1x8 == clang::BuiltinType::RvvInt64m1x8, "");
2006static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt64m2x2 == clang::BuiltinType::RvvInt64m2x2, "");
2007static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt64m2x3 == clang::BuiltinType::RvvInt64m2x3, "");
2008static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt64m2x4 == clang::BuiltinType::RvvInt64m2x4, "");
2009static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvInt64m4x2 == clang::BuiltinType::RvvInt64m4x2, "");
2010static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint64m1x2 == clang::BuiltinType::RvvUint64m1x2, "");
2011static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint64m1x3 == clang::BuiltinType::RvvUint64m1x3, "");
2012static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint64m1x4 == clang::BuiltinType::RvvUint64m1x4, "");
2013static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint64m1x5 == clang::BuiltinType::RvvUint64m1x5, "");
2014static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint64m1x6 == clang::BuiltinType::RvvUint64m1x6, "");
2015static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint64m1x7 == clang::BuiltinType::RvvUint64m1x7, "");
2016static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint64m1x8 == clang::BuiltinType::RvvUint64m1x8, "");
2017static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint64m2x2 == clang::BuiltinType::RvvUint64m2x2, "");
2018static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint64m2x3 == clang::BuiltinType::RvvUint64m2x3, "");
2019static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint64m2x4 == clang::BuiltinType::RvvUint64m2x4, "");
2020static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvUint64m4x2 == clang::BuiltinType::RvvUint64m4x2, "");
2021static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat16mf4x2 == clang::BuiltinType::RvvFloat16mf4x2, "");
2022static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat16mf4x3 == clang::BuiltinType::RvvFloat16mf4x3, "");
2023static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat16mf4x4 == clang::BuiltinType::RvvFloat16mf4x4, "");
2024static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat16mf4x5 == clang::BuiltinType::RvvFloat16mf4x5, "");
2025static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat16mf4x6 == clang::BuiltinType::RvvFloat16mf4x6, "");
2026static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat16mf4x7 == clang::BuiltinType::RvvFloat16mf4x7, "");
2027static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat16mf4x8 == clang::BuiltinType::RvvFloat16mf4x8, "");
2028static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat16mf2x2 == clang::BuiltinType::RvvFloat16mf2x2, "");
2029static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat16mf2x3 == clang::BuiltinType::RvvFloat16mf2x3, "");
2030static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat16mf2x4 == clang::BuiltinType::RvvFloat16mf2x4, "");
2031static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat16mf2x5 == clang::BuiltinType::RvvFloat16mf2x5, "");
2032static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat16mf2x6 == clang::BuiltinType::RvvFloat16mf2x6, "");
2033static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat16mf2x7 == clang::BuiltinType::RvvFloat16mf2x7, "");
2034static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat16mf2x8 == clang::BuiltinType::RvvFloat16mf2x8, "");
2035static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat16m1x2 == clang::BuiltinType::RvvFloat16m1x2, "");
2036static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat16m1x3 == clang::BuiltinType::RvvFloat16m1x3, "");
2037static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat16m1x4 == clang::BuiltinType::RvvFloat16m1x4, "");
2038static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat16m1x5 == clang::BuiltinType::RvvFloat16m1x5, "");
2039static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat16m1x6 == clang::BuiltinType::RvvFloat16m1x6, "");
2040static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat16m1x7 == clang::BuiltinType::RvvFloat16m1x7, "");
2041static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat16m1x8 == clang::BuiltinType::RvvFloat16m1x8, "");
2042static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat16m2x2 == clang::BuiltinType::RvvFloat16m2x2, "");
2043static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat16m2x3 == clang::BuiltinType::RvvFloat16m2x3, "");
2044static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat16m2x4 == clang::BuiltinType::RvvFloat16m2x4, "");
2045static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat16m4x2 == clang::BuiltinType::RvvFloat16m4x2, "");
2046static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat32mf2x2 == clang::BuiltinType::RvvFloat32mf2x2, "");
2047static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat32mf2x3 == clang::BuiltinType::RvvFloat32mf2x3, "");
2048static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat32mf2x4 == clang::BuiltinType::RvvFloat32mf2x4, "");
2049static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat32mf2x5 == clang::BuiltinType::RvvFloat32mf2x5, "");
2050static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat32mf2x6 == clang::BuiltinType::RvvFloat32mf2x6, "");
2051static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat32mf2x7 == clang::BuiltinType::RvvFloat32mf2x7, "");
2052static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat32mf2x8 == clang::BuiltinType::RvvFloat32mf2x8, "");
2053static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat32m1x2 == clang::BuiltinType::RvvFloat32m1x2, "");
2054static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat32m1x3 == clang::BuiltinType::RvvFloat32m1x3, "");
2055static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat32m1x4 == clang::BuiltinType::RvvFloat32m1x4, "");
2056static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat32m1x5 == clang::BuiltinType::RvvFloat32m1x5, "");
2057static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat32m1x6 == clang::BuiltinType::RvvFloat32m1x6, "");
2058static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat32m1x7 == clang::BuiltinType::RvvFloat32m1x7, "");
2059static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat32m1x8 == clang::BuiltinType::RvvFloat32m1x8, "");
2060static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat32m2x2 == clang::BuiltinType::RvvFloat32m2x2, "");
2061static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat32m2x3 == clang::BuiltinType::RvvFloat32m2x3, "");
2062static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat32m2x4 == clang::BuiltinType::RvvFloat32m2x4, "");
2063static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat32m4x2 == clang::BuiltinType::RvvFloat32m4x2, "");
2064static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat64m1x2 == clang::BuiltinType::RvvFloat64m1x2, "");
2065static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat64m1x3 == clang::BuiltinType::RvvFloat64m1x3, "");
2066static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat64m1x4 == clang::BuiltinType::RvvFloat64m1x4, "");
2067static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat64m1x5 == clang::BuiltinType::RvvFloat64m1x5, "");
2068static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat64m1x6 == clang::BuiltinType::RvvFloat64m1x6, "");
2069static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat64m1x7 == clang::BuiltinType::RvvFloat64m1x7, "");
2070static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat64m1x8 == clang::BuiltinType::RvvFloat64m1x8, "");
2071static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat64m2x2 == clang::BuiltinType::RvvFloat64m2x2, "");
2072static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat64m2x3 == clang::BuiltinType::RvvFloat64m2x3, "");
2073static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat64m2x4 == clang::BuiltinType::RvvFloat64m2x4, "");
2074static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvFloat64m4x2 == clang::BuiltinType::RvvFloat64m4x2, "");
2075static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvBFloat16mf4x2 == clang::BuiltinType::RvvBFloat16mf4x2, "");
2076static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvBFloat16mf4x3 == clang::BuiltinType::RvvBFloat16mf4x3, "");
2077static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvBFloat16mf4x4 == clang::BuiltinType::RvvBFloat16mf4x4, "");
2078static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvBFloat16mf4x5 == clang::BuiltinType::RvvBFloat16mf4x5, "");
2079static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvBFloat16mf4x6 == clang::BuiltinType::RvvBFloat16mf4x6, "");
2080static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvBFloat16mf4x7 == clang::BuiltinType::RvvBFloat16mf4x7, "");
2081static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvBFloat16mf4x8 == clang::BuiltinType::RvvBFloat16mf4x8, "");
2082static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvBFloat16mf2x2 == clang::BuiltinType::RvvBFloat16mf2x2, "");
2083static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvBFloat16mf2x3 == clang::BuiltinType::RvvBFloat16mf2x3, "");
2084static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvBFloat16mf2x4 == clang::BuiltinType::RvvBFloat16mf2x4, "");
2085static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvBFloat16mf2x5 == clang::BuiltinType::RvvBFloat16mf2x5, "");
2086static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvBFloat16mf2x6 == clang::BuiltinType::RvvBFloat16mf2x6, "");
2087static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvBFloat16mf2x7 == clang::BuiltinType::RvvBFloat16mf2x7, "");
2088static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvBFloat16mf2x8 == clang::BuiltinType::RvvBFloat16mf2x8, "");
2089static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvBFloat16m1x2 == clang::BuiltinType::RvvBFloat16m1x2, "");
2090static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvBFloat16m1x3 == clang::BuiltinType::RvvBFloat16m1x3, "");
2091static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvBFloat16m1x4 == clang::BuiltinType::RvvBFloat16m1x4, "");
2092static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvBFloat16m1x5 == clang::BuiltinType::RvvBFloat16m1x5, "");
2093static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvBFloat16m1x6 == clang::BuiltinType::RvvBFloat16m1x6, "");
2094static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvBFloat16m1x7 == clang::BuiltinType::RvvBFloat16m1x7, "");
2095static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvBFloat16m1x8 == clang::BuiltinType::RvvBFloat16m1x8, "");
2096static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvBFloat16m2x2 == clang::BuiltinType::RvvBFloat16m2x2, "");
2097static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvBFloat16m2x3 == clang::BuiltinType::RvvBFloat16m2x3, "");
2098static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvBFloat16m2x4 == clang::BuiltinType::RvvBFloat16m2x4, "");
2099static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeRvvBFloat16m4x2 == clang::BuiltinType::RvvBFloat16m4x2, "");
2100static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeWasmExternRef == clang::BuiltinType::WasmExternRef, "");
2101static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeAMDGPUBufferRsrc == clang::BuiltinType::AMDGPUBufferRsrc, "");
2102static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeAMDGPUNamedWorkgroupBarrier == clang::BuiltinType::AMDGPUNamedWorkgroupBarrier, "");
2103static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeHLSLResource == clang::BuiltinType::HLSLResource, "");
2104static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeVoid == clang::BuiltinType::Void, "");
2105static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeBool == clang::BuiltinType::Bool, "");
2106static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeChar_U == clang::BuiltinType::Char_U, "");
2107static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeUChar == clang::BuiltinType::UChar, "");
2108static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeWChar_U == clang::BuiltinType::WChar_U, "");
2109static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeChar8 == clang::BuiltinType::Char8, "");
2110static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeChar16 == clang::BuiltinType::Char16, "");
2111static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeChar32 == clang::BuiltinType::Char32, "");
2112static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeUShort == clang::BuiltinType::UShort, "");
2113static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeUInt == clang::BuiltinType::UInt, "");
2114static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeULong == clang::BuiltinType::ULong, "");
2115static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeULongLong == clang::BuiltinType::ULongLong, "");
2116static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeUInt128 == clang::BuiltinType::UInt128, "");
2117static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeChar_S == clang::BuiltinType::Char_S, "");
2118static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSChar == clang::BuiltinType::SChar, "");
2119static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeWChar_S == clang::BuiltinType::WChar_S, "");
2120static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeShort == clang::BuiltinType::Short, "");
2121static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeInt == clang::BuiltinType::Int, "");
2122static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeLong == clang::BuiltinType::Long, "");
2123static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeLongLong == clang::BuiltinType::LongLong, "");
2124static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeInt128 == clang::BuiltinType::Int128, "");
2125static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeShortAccum == clang::BuiltinType::ShortAccum, "");
2126static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeAccum == clang::BuiltinType::Accum, "");
2127static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeLongAccum == clang::BuiltinType::LongAccum, "");
2128static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeUShortAccum == clang::BuiltinType::UShortAccum, "");
2129static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeUAccum == clang::BuiltinType::UAccum, "");
2130static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeULongAccum == clang::BuiltinType::ULongAccum, "");
2131static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeShortFract == clang::BuiltinType::ShortFract, "");
2132static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeFract == clang::BuiltinType::Fract, "");
2133static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeLongFract == clang::BuiltinType::LongFract, "");
2134static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeUShortFract == clang::BuiltinType::UShortFract, "");
2135static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeUFract == clang::BuiltinType::UFract, "");
2136static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeULongFract == clang::BuiltinType::ULongFract, "");
2137static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSatShortAccum == clang::BuiltinType::SatShortAccum, "");
2138static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSatAccum == clang::BuiltinType::SatAccum, "");
2139static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSatLongAccum == clang::BuiltinType::SatLongAccum, "");
2140static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSatUShortAccum == clang::BuiltinType::SatUShortAccum, "");
2141static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSatUAccum == clang::BuiltinType::SatUAccum, "");
2142static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSatULongAccum == clang::BuiltinType::SatULongAccum, "");
2143static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSatShortFract == clang::BuiltinType::SatShortFract, "");
2144static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSatFract == clang::BuiltinType::SatFract, "");
2145static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSatLongFract == clang::BuiltinType::SatLongFract, "");
2146static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSatUShortFract == clang::BuiltinType::SatUShortFract, "");
2147static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSatUFract == clang::BuiltinType::SatUFract, "");
2148static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeSatULongFract == clang::BuiltinType::SatULongFract, "");
2149static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeHalf == clang::BuiltinType::Half, "");
2150static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeFloat == clang::BuiltinType::Float, "");
2151static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeDouble == clang::BuiltinType::Double, "");
2152static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeLongDouble == clang::BuiltinType::LongDouble, "");
2153static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeFloat16 == clang::BuiltinType::Float16, "");
2154static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeBFloat16 == clang::BuiltinType::BFloat16, "");
2155static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeFloat128 == clang::BuiltinType::Float128, "");
2156static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeIbm128 == clang::BuiltinType::Ibm128, "");
2157static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeNullPtr == clang::BuiltinType::NullPtr, "");
2158static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeObjCId == clang::BuiltinType::ObjCId, "");
2159static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeObjCClass == clang::BuiltinType::ObjCClass, "");
2160static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeObjCSel == clang::BuiltinType::ObjCSel, "");
2161static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLSampler == clang::BuiltinType::OCLSampler, "");
2162static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLEvent == clang::BuiltinType::OCLEvent, "");
2163static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLClkEvent == clang::BuiltinType::OCLClkEvent, "");
2164static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLQueue == clang::BuiltinType::OCLQueue, "");
2165static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOCLReserveID == clang::BuiltinType::OCLReserveID, "");
2166static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeDependent == clang::BuiltinType::Dependent, "");
2167static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOverload == clang::BuiltinType::Overload, "");
2168static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeBoundMember == clang::BuiltinType::BoundMember, "");
2169static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeUnresolvedTemplate == clang::BuiltinType::UnresolvedTemplate, "");
2170static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypePseudoObject == clang::BuiltinType::PseudoObject, "");
2171static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeUnknownAny == clang::BuiltinType::UnknownAny, "");
2172static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeBuiltinFn == clang::BuiltinType::BuiltinFn, "");
2173static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeARCUnbridgedCast == clang::BuiltinType::ARCUnbridgedCast, "");
2174static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeIncompleteMatrixIdx == clang::BuiltinType::IncompleteMatrixIdx, "");
2175static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOMPArrayShaping == clang::BuiltinType::OMPArrayShaping, "");
2176static_assert((clang::BuiltinType::Kind)ZigClangBuiltinTypeOMPIterator == clang::BuiltinType::OMPIterator, "");
2177
2178void ZigClang_detect_enum_CallingConv(clang::CallingConv x) {
2179 switch (x) {
2180 case clang::CC_C:
2181 case clang::CC_X86StdCall:
2182 case clang::CC_X86FastCall:
2183 case clang::CC_X86ThisCall:
2184 case clang::CC_X86VectorCall:
2185 case clang::CC_X86Pascal:
2186 case clang::CC_Win64:
2187 case clang::CC_X86_64SysV:
2188 case clang::CC_X86RegCall:
2189 case clang::CC_AAPCS:
2190 case clang::CC_AAPCS_VFP:
2191 case clang::CC_IntelOclBicc:
2192 case clang::CC_SpirFunction:
2193 case clang::CC_DeviceKernel:
2194 case clang::CC_Swift:
2195 case clang::CC_SwiftAsync:
2196 case clang::CC_PreserveMost:
2197 case clang::CC_PreserveAll:
2198 case clang::CC_AArch64VectorCall:
2199 case clang::CC_AArch64SVEPCS:
2200 case clang::CC_M68kRTD:
2201 case clang::CC_PreserveNone:
2202 case clang::CC_RISCVVectorCall:
2203 break;
2204 }
2205}
2206
2207static_assert((clang::CallingConv)ZigClangCallingConv_C == clang::CC_C, "");
2208static_assert((clang::CallingConv)ZigClangCallingConv_X86StdCall == clang::CC_X86StdCall, "");
2209static_assert((clang::CallingConv)ZigClangCallingConv_X86FastCall == clang::CC_X86FastCall, "");
2210static_assert((clang::CallingConv)ZigClangCallingConv_X86ThisCall == clang::CC_X86ThisCall, "");
2211static_assert((clang::CallingConv)ZigClangCallingConv_X86VectorCall == clang::CC_X86VectorCall, "");
2212static_assert((clang::CallingConv)ZigClangCallingConv_X86Pascal == clang::CC_X86Pascal, "");
2213static_assert((clang::CallingConv)ZigClangCallingConv_Win64 == clang::CC_Win64, "");
2214static_assert((clang::CallingConv)ZigClangCallingConv_X86_64SysV == clang::CC_X86_64SysV, "");
2215static_assert((clang::CallingConv)ZigClangCallingConv_X86RegCall == clang::CC_X86RegCall, "");
2216static_assert((clang::CallingConv)ZigClangCallingConv_AAPCS == clang::CC_AAPCS, "");
2217static_assert((clang::CallingConv)ZigClangCallingConv_AAPCS_VFP == clang::CC_AAPCS_VFP, "");
2218static_assert((clang::CallingConv)ZigClangCallingConv_IntelOclBicc == clang::CC_IntelOclBicc, "");
2219static_assert((clang::CallingConv)ZigClangCallingConv_SpirFunction == clang::CC_SpirFunction, "");
2220static_assert((clang::CallingConv)ZigClangCallingConv_DeviceKernel == clang::CC_DeviceKernel, "");
2221static_assert((clang::CallingConv)ZigClangCallingConv_Swift == clang::CC_Swift, "");
2222static_assert((clang::CallingConv)ZigClangCallingConv_SwiftAsync == clang::CC_SwiftAsync, "");
2223static_assert((clang::CallingConv)ZigClangCallingConv_PreserveMost == clang::CC_PreserveMost, "");
2224static_assert((clang::CallingConv)ZigClangCallingConv_PreserveAll == clang::CC_PreserveAll, "");
2225static_assert((clang::CallingConv)ZigClangCallingConv_AArch64VectorCall == clang::CC_AArch64VectorCall, "");
2226static_assert((clang::CallingConv)ZigClangCallingConv_AArch64SVEPCS == clang::CC_AArch64SVEPCS, "");
2227static_assert((clang::CallingConv)ZigClangCallingConv_M68kRTD == clang::CC_M68kRTD, "");
2228static_assert((clang::CallingConv)ZigClangCallingConv_PreserveNone == clang::CC_PreserveNone, "");
2229static_assert((clang::CallingConv)ZigClangCallingConv_RISCVVectorCall == clang::CC_RISCVVectorCall, "");
2230
2231void ZigClang_detect_enum_StorageClass(clang::StorageClass x) {
2232 switch (x) {
2233 case clang::SC_None:
2234 case clang::SC_Extern:
2235 case clang::SC_Static:
2236 case clang::SC_PrivateExtern:
2237 case clang::SC_Auto:
2238 case clang::SC_Register:
2239 break;
2240 }
2241}
2242
2243static_assert((clang::StorageClass)ZigClangStorageClass_None == clang::SC_None, "");
2244static_assert((clang::StorageClass)ZigClangStorageClass_Extern == clang::SC_Extern, "");
2245static_assert((clang::StorageClass)ZigClangStorageClass_Static == clang::SC_Static, "");
2246static_assert((clang::StorageClass)ZigClangStorageClass_PrivateExtern == clang::SC_PrivateExtern, "");
2247static_assert((clang::StorageClass)ZigClangStorageClass_Auto == clang::SC_Auto, "");
2248static_assert((clang::StorageClass)ZigClangStorageClass_Register == clang::SC_Register, "");
2249
2250void ZigClang_detect_enum_RoundingMode(llvm::RoundingMode x) {
2251 switch (x) {
2252 case llvm::RoundingMode::TowardZero:
2253 case llvm::RoundingMode::NearestTiesToEven:
2254 case llvm::RoundingMode::TowardPositive:
2255 case llvm::RoundingMode::TowardNegative:
2256 case llvm::RoundingMode::NearestTiesToAway:
2257 case llvm::RoundingMode::Dynamic:
2258 case llvm::RoundingMode::Invalid:
2259 break;
2260 }
2261}
2262static_assert((llvm::RoundingMode)ZigClangAPFloat_roundingMode_NearestTiesToEven == llvm::RoundingMode::NearestTiesToEven, "");
2263static_assert((llvm::RoundingMode)ZigClangAPFloat_roundingMode_TowardPositive == llvm::RoundingMode::TowardPositive, "");
2264static_assert((llvm::RoundingMode)ZigClangAPFloat_roundingMode_TowardNegative == llvm::RoundingMode::TowardNegative, "");
2265static_assert((llvm::RoundingMode)ZigClangAPFloat_roundingMode_TowardZero == llvm::RoundingMode::TowardZero, "");
2266static_assert((llvm::RoundingMode)ZigClangAPFloat_roundingMode_NearestTiesToAway == llvm::RoundingMode::NearestTiesToAway, "");
2267static_assert((llvm::RoundingMode)ZigClangAPFloat_roundingMode_Dynamic == llvm::RoundingMode::Dynamic, "");
2268static_assert((llvm::RoundingMode)ZigClangAPFloat_roundingMode_Invalid == llvm::RoundingMode::Invalid, "");
2269
2270void ZigClang_detect_enum_CharacterLiteralKind(clang::CharacterLiteralKind x) {
2271 switch (x) {
2272 case clang::CharacterLiteralKind::Ascii:
2273 case clang::CharacterLiteralKind::Wide:
2274 case clang::CharacterLiteralKind::UTF8:
2275 case clang::CharacterLiteralKind::UTF16:
2276 case clang::CharacterLiteralKind::UTF32:
2277 break;
2278 }
2279}
2280static_assert((clang::CharacterLiteralKind)ZigClangCharacterLiteralKind_Ascii == clang::CharacterLiteralKind::Ascii, "");
2281static_assert((clang::CharacterLiteralKind)ZigClangCharacterLiteralKind_Wide == clang::CharacterLiteralKind::Wide, "");
2282static_assert((clang::CharacterLiteralKind)ZigClangCharacterLiteralKind_UTF8 == clang::CharacterLiteralKind::UTF8, "");
2283static_assert((clang::CharacterLiteralKind)ZigClangCharacterLiteralKind_UTF16 == clang::CharacterLiteralKind::UTF16, "");
2284static_assert((clang::CharacterLiteralKind)ZigClangCharacterLiteralKind_UTF32 == clang::CharacterLiteralKind::UTF32, "");
2285
2286void ZigClang_detect_enum_ElaboratedTypeKeyword(clang::ElaboratedTypeKeyword x) {
2287 switch (x) {
2288 case clang::ElaboratedTypeKeyword::Struct:
2289 case clang::ElaboratedTypeKeyword::Interface:
2290 case clang::ElaboratedTypeKeyword::Union:
2291 case clang::ElaboratedTypeKeyword::Class:
2292 case clang::ElaboratedTypeKeyword::Enum:
2293 case clang::ElaboratedTypeKeyword::Typename:
2294 case clang::ElaboratedTypeKeyword::None:
2295 break;
2296 }
2297}
2298static_assert((clang::ElaboratedTypeKeyword)ZigClangElaboratedTypeKeyword_Struct == clang::ElaboratedTypeKeyword::Struct, "");
2299static_assert((clang::ElaboratedTypeKeyword)ZigClangElaboratedTypeKeyword_Interface == clang::ElaboratedTypeKeyword::Interface, "");
2300static_assert((clang::ElaboratedTypeKeyword)ZigClangElaboratedTypeKeyword_Union == clang::ElaboratedTypeKeyword::Union, "");
2301static_assert((clang::ElaboratedTypeKeyword)ZigClangElaboratedTypeKeyword_Class == clang::ElaboratedTypeKeyword::Class, "");
2302static_assert((clang::ElaboratedTypeKeyword)ZigClangElaboratedTypeKeyword_Enum == clang::ElaboratedTypeKeyword::Enum, "");
2303static_assert((clang::ElaboratedTypeKeyword)ZigClangElaboratedTypeKeyword_Typename == clang::ElaboratedTypeKeyword::Typename, "");
2304static_assert((clang::ElaboratedTypeKeyword)ZigClangElaboratedTypeKeyword_None == clang::ElaboratedTypeKeyword::None, "");
2305
2306void ZigClang_detect_enum_EntityKind(clang::PreprocessedEntity::EntityKind x) {
2307 switch (x) {
2308 case clang::PreprocessedEntity::InvalidKind:
2309 case clang::PreprocessedEntity::MacroExpansionKind:
2310 case clang::PreprocessedEntity::MacroDefinitionKind:
2311 case clang::PreprocessedEntity::InclusionDirectiveKind:
2312 break;
2313 }
2314}
2315static_assert((clang::PreprocessedEntity::EntityKind)ZigClangPreprocessedEntity_InvalidKind == clang::PreprocessedEntity::InvalidKind, "");
2316static_assert((clang::PreprocessedEntity::EntityKind)ZigClangPreprocessedEntity_MacroExpansionKind == clang::PreprocessedEntity::MacroExpansionKind, "");
2317static_assert((clang::PreprocessedEntity::EntityKind)ZigClangPreprocessedEntity_MacroDefinitionKind == clang::PreprocessedEntity::MacroDefinitionKind, "");
2318static_assert((clang::PreprocessedEntity::EntityKind)ZigClangPreprocessedEntity_InclusionDirectiveKind == clang::PreprocessedEntity::InclusionDirectiveKind, "");
2319
2320
2321void ZigClang_detect_enum_ConstantExprKind(clang::Expr::ConstantExprKind x) {
2322 switch (x) {
2323 case clang::Expr::ConstantExprKind::Normal:
2324 case clang::Expr::ConstantExprKind::NonClassTemplateArgument:
2325 case clang::Expr::ConstantExprKind::ClassTemplateArgument:
2326 case clang::Expr::ConstantExprKind::ImmediateInvocation:
2327 break;
2328 }
2329}
2330static_assert((clang::Expr::ConstantExprKind)ZigClangExpr_ConstantExprKind_Normal == clang::Expr::ConstantExprKind::Normal, "");
2331static_assert((clang::Expr::ConstantExprKind)ZigClangExpr_ConstantExprKind_NonClassTemplateArgument == clang::Expr::ConstantExprKind::NonClassTemplateArgument, "");
2332static_assert((clang::Expr::ConstantExprKind)ZigClangExpr_ConstantExprKind_ClassTemplateArgument == clang::Expr::ConstantExprKind::ClassTemplateArgument, "");
2333static_assert((clang::Expr::ConstantExprKind)ZigClangExpr_ConstantExprKind_ImmediateInvocation == clang::Expr::ConstantExprKind::ImmediateInvocation, "");
2334
2335static_assert((clang::UnaryExprOrTypeTrait)ZigClangUnaryExprOrTypeTrait_Kind::ZigClangUnaryExprOrTypeTrait_KindSizeOf == clang::UnaryExprOrTypeTrait::UETT_SizeOf, "");
2336static_assert((clang::UnaryExprOrTypeTrait)ZigClangUnaryExprOrTypeTrait_Kind::ZigClangUnaryExprOrTypeTrait_KindDataSizeOf == clang::UnaryExprOrTypeTrait::UETT_DataSizeOf, "");
2337static_assert((clang::UnaryExprOrTypeTrait)ZigClangUnaryExprOrTypeTrait_Kind::ZigClangUnaryExprOrTypeTrait_KindCountOf == clang::UnaryExprOrTypeTrait::UETT_CountOf, "");
2338static_assert((clang::UnaryExprOrTypeTrait)ZigClangUnaryExprOrTypeTrait_Kind::ZigClangUnaryExprOrTypeTrait_KindAlignOf == clang::UnaryExprOrTypeTrait::UETT_AlignOf, "");
2339static_assert((clang::UnaryExprOrTypeTrait)ZigClangUnaryExprOrTypeTrait_Kind::ZigClangUnaryExprOrTypeTrait_KindPreferredAlignOf == clang::UnaryExprOrTypeTrait::UETT_PreferredAlignOf, "");
2340static_assert((clang::UnaryExprOrTypeTrait)ZigClangUnaryExprOrTypeTrait_Kind::ZigClangUnaryExprOrTypeTrait_KindPtrAuthTypeDiscriminator == clang::UnaryExprOrTypeTrait::UETT_PtrAuthTypeDiscriminator, "");
2341static_assert((clang::UnaryExprOrTypeTrait)ZigClangUnaryExprOrTypeTrait_Kind::ZigClangUnaryExprOrTypeTrait_KindVecStep == clang::UnaryExprOrTypeTrait::UETT_VecStep, "");
2342static_assert((clang::UnaryExprOrTypeTrait)ZigClangUnaryExprOrTypeTrait_Kind::ZigClangUnaryExprOrTypeTrait_KindOpenMPRequiredSimdAlign == clang::UnaryExprOrTypeTrait::UETT_OpenMPRequiredSimdAlign, "");
2343
2344static_assert(sizeof(ZigClangAPValue) == sizeof(clang::APValue), "");
2345static_assert(alignof(ZigClangAPValue) == alignof(clang::APValue), "");
2346
2347static_assert(sizeof(ZigClangSourceLocation) == sizeof(clang::SourceLocation), "");
2348static ZigClangSourceLocation bitcast(clang::SourceLocation src) {
2349 ZigClangSourceLocation dest;
2350 memcpy(&dest, static_cast<void *>(&src), sizeof(ZigClangSourceLocation));
2351 return dest;
2352}
2353static clang::SourceLocation bitcast(ZigClangSourceLocation src) {
2354 clang::SourceLocation dest;
2355 memcpy(&dest, static_cast<void *>(&src), sizeof(ZigClangSourceLocation));
2356 return dest;
2357}
2358
2359static_assert(sizeof(ZigClangQualType) == sizeof(clang::QualType), "");
2360static ZigClangQualType bitcast(clang::QualType src) {
2361 ZigClangQualType dest;
2362 memcpy(&dest, static_cast<void *>(&src), sizeof(ZigClangQualType));
2363 return dest;
2364}
2365static clang::QualType bitcast(ZigClangQualType src) {
2366 clang::QualType dest;
2367 memcpy(&dest, static_cast<void *>(&src), sizeof(ZigClangQualType));
2368 return dest;
2369}
2370
2371static_assert(sizeof(ZigClangExprEvalResult) == sizeof(clang::Expr::EvalResult), "");
2372static ZigClangExprEvalResult bitcast(clang::Expr::EvalResult src) {
2373 ZigClangExprEvalResult dest;
2374 memcpy(&dest, static_cast<void *>(&src), sizeof(ZigClangExprEvalResult));
2375 return dest;
2376}
2377
2378static_assert(sizeof(ZigClangAPValueLValueBase) == sizeof(clang::APValue::LValueBase), "");
2379static ZigClangAPValueLValueBase bitcast(clang::APValue::LValueBase src) {
2380 ZigClangAPValueLValueBase dest;
2381 memcpy(&dest, static_cast<void *>(&src), sizeof(ZigClangAPValueLValueBase));
2382 return dest;
2383}
2384static clang::APValue::LValueBase bitcast(ZigClangAPValueLValueBase src) {
2385 clang::APValue::LValueBase dest;
2386 memcpy(&dest, static_cast<void *>(&src), sizeof(ZigClangAPValueLValueBase));
2387 return dest;
2388}
2389
2390static_assert(sizeof(ZigClangCompoundStmt_const_body_iterator) == sizeof(clang::CompoundStmt::const_body_iterator), "");
2391static ZigClangCompoundStmt_const_body_iterator bitcast(clang::CompoundStmt::const_body_iterator src) {
2392 ZigClangCompoundStmt_const_body_iterator dest;
2393 memcpy(&dest, static_cast<void *>(&src), sizeof(ZigClangCompoundStmt_const_body_iterator));
2394 return dest;
2395}
2396
2397static_assert(sizeof(ZigClangDeclStmt_const_decl_iterator) == sizeof(clang::DeclStmt::const_decl_iterator), "");
2398static ZigClangDeclStmt_const_decl_iterator bitcast(clang::DeclStmt::const_decl_iterator src) {
2399 ZigClangDeclStmt_const_decl_iterator dest;
2400 memcpy(&dest, static_cast<void *>(&src), sizeof(ZigClangDeclStmt_const_decl_iterator));
2401 return dest;
2402}
2403
2404static_assert(sizeof(ZigClangPreprocessingRecord_iterator) == sizeof(clang::PreprocessingRecord::iterator), "");
2405static ZigClangPreprocessingRecord_iterator bitcast(clang::PreprocessingRecord::iterator src) {
2406 ZigClangPreprocessingRecord_iterator dest;
2407 memcpy(&dest, static_cast<void *>(&src), sizeof(ZigClangPreprocessingRecord_iterator));
2408 return dest;
2409}
2410static clang::PreprocessingRecord::iterator bitcast(ZigClangPreprocessingRecord_iterator src) {
2411 clang::PreprocessingRecord::iterator dest;
2412 memcpy(&dest, static_cast<void *>(&src), sizeof(ZigClangPreprocessingRecord_iterator));
2413 return dest;
2414}
2415
2416static_assert(sizeof(ZigClangRecordDecl_field_iterator) == sizeof(clang::RecordDecl::field_iterator), "");
2417static ZigClangRecordDecl_field_iterator bitcast(clang::RecordDecl::field_iterator src) {
2418 ZigClangRecordDecl_field_iterator dest;
2419 memcpy(&dest, static_cast<void *>(&src), sizeof(ZigClangRecordDecl_field_iterator));
2420 return dest;
2421}
2422static clang::RecordDecl::field_iterator bitcast(ZigClangRecordDecl_field_iterator src) {
2423 clang::RecordDecl::field_iterator dest;
2424 memcpy(&dest, static_cast<void *>(&src), sizeof(ZigClangRecordDecl_field_iterator));
2425 return dest;
2426}
2427
2428static_assert(sizeof(ZigClangEnumDecl_enumerator_iterator) == sizeof(clang::EnumDecl::enumerator_iterator), "");
2429static ZigClangEnumDecl_enumerator_iterator bitcast(clang::EnumDecl::enumerator_iterator src) {
2430 ZigClangEnumDecl_enumerator_iterator dest;
2431 memcpy(&dest, static_cast<void *>(&src), sizeof(ZigClangEnumDecl_enumerator_iterator));
2432 return dest;
2433}
2434static clang::EnumDecl::enumerator_iterator bitcast(ZigClangEnumDecl_enumerator_iterator src) {
2435 clang::EnumDecl::enumerator_iterator dest;
2436 memcpy(&dest, static_cast<void *>(&src), sizeof(ZigClangEnumDecl_enumerator_iterator));
2437 return dest;
2438}
2439
2440
2441ZigClangSourceLocation ZigClangSourceManager_getSpellingLoc(const ZigClangSourceManager *self,
2442 ZigClangSourceLocation Loc)
2443{
2444 return bitcast(reinterpret_cast<const clang::SourceManager *>(self)->getSpellingLoc(bitcast(Loc)));
2445}
2446
2447const char *ZigClangSourceManager_getFilename(const ZigClangSourceManager *self,
2448 ZigClangSourceLocation SpellingLoc)
2449{
2450 llvm::StringRef s = reinterpret_cast<const clang::SourceManager *>(self)->getFilename(bitcast(SpellingLoc));
2451 return (const char *)s.bytes_begin();
2452}
2453
2454unsigned ZigClangSourceManager_getSpellingLineNumber(const ZigClangSourceManager *self,
2455 ZigClangSourceLocation Loc)
2456{
2457 return reinterpret_cast<const clang::SourceManager *>(self)->getSpellingLineNumber(bitcast(Loc));
2458}
2459
2460unsigned ZigClangSourceManager_getSpellingColumnNumber(const ZigClangSourceManager *self,
2461 ZigClangSourceLocation Loc)
2462{
2463 return reinterpret_cast<const clang::SourceManager *>(self)->getSpellingColumnNumber(bitcast(Loc));
2464}
2465
2466const char* ZigClangSourceManager_getCharacterData(const ZigClangSourceManager *self,
2467 ZigClangSourceLocation SL)
2468{
2469 return reinterpret_cast<const clang::SourceManager *>(self)->getCharacterData(bitcast(SL));
2470}
2471
2472ZigClangQualType ZigClangASTContext_getPointerType(const ZigClangASTContext* self, ZigClangQualType T) {
2473 return bitcast(reinterpret_cast<const clang::ASTContext *>(self)->getPointerType(bitcast(T)));
2474}
2475
2476unsigned ZigClangASTContext_getTypeAlign(const ZigClangASTContext* self, ZigClangQualType T) {
2477 return reinterpret_cast<const clang::ASTContext *>(self)->getTypeAlign(bitcast(T));
2478}
2479
2480ZigClangASTContext *ZigClangASTUnit_getASTContext(ZigClangASTUnit *self) {
2481 clang::ASTContext *result = &reinterpret_cast<clang::ASTUnit *>(self)->getASTContext();
2482 return reinterpret_cast<ZigClangASTContext *>(result);
2483}
2484
2485ZigClangSourceManager *ZigClangASTUnit_getSourceManager(ZigClangASTUnit *self) {
2486 clang::SourceManager *result = &reinterpret_cast<clang::ASTUnit *>(self)->getSourceManager();
2487 return reinterpret_cast<ZigClangSourceManager *>(result);
2488}
2489
2490bool ZigClangASTUnit_visitLocalTopLevelDecls(ZigClangASTUnit *self, void *context,
2491 bool (*Fn)(void *context, const ZigClangDecl *decl))
2492{
2493 return reinterpret_cast<clang::ASTUnit *>(self)->visitLocalTopLevelDecls(context,
2494 reinterpret_cast<bool (*)(void *, const clang::Decl *)>(Fn));
2495}
2496
2497struct ZigClangPreprocessingRecord_iterator ZigClangASTUnit_getLocalPreprocessingEntities_begin(
2498 struct ZigClangASTUnit *self)
2499{
2500 auto casted = reinterpret_cast<const clang::ASTUnit *>(self);
2501 return bitcast(casted->getLocalPreprocessingEntities().begin());
2502}
2503
2504struct ZigClangPreprocessingRecord_iterator ZigClangASTUnit_getLocalPreprocessingEntities_end(
2505 struct ZigClangASTUnit *self)
2506{
2507 auto casted = reinterpret_cast<const clang::ASTUnit *>(self);
2508 return bitcast(casted->getLocalPreprocessingEntities().end());
2509}
2510
2511struct ZigClangPreprocessedEntity *ZigClangPreprocessingRecord_iterator_deref(
2512 struct ZigClangPreprocessingRecord_iterator self)
2513{
2514 clang::PreprocessingRecord::iterator casted = bitcast(self);
2515 clang::PreprocessedEntity *result = *casted;
2516 return reinterpret_cast<ZigClangPreprocessedEntity *>(result);
2517}
2518
2519const ZigClangRecordDecl *ZigClangRecordType_getDecl(const ZigClangRecordType *record_ty) {
2520 const clang::RecordDecl *record_decl = reinterpret_cast<const clang::RecordType *>(record_ty)->getDecl();
2521 return reinterpret_cast<const ZigClangRecordDecl *>(record_decl);
2522}
2523
2524const ZigClangEnumDecl *ZigClangEnumType_getDecl(const ZigClangEnumType *enum_ty) {
2525 const clang::EnumDecl *enum_decl = reinterpret_cast<const clang::EnumType *>(enum_ty)->getDecl();
2526 return reinterpret_cast<const ZigClangEnumDecl *>(enum_decl);
2527}
2528
2529const ZigClangTagDecl *ZigClangRecordDecl_getCanonicalDecl(const ZigClangRecordDecl *record_decl) {
2530 const clang::TagDecl *tag_decl = reinterpret_cast<const clang::RecordDecl*>(record_decl)->getCanonicalDecl();
2531 return reinterpret_cast<const ZigClangTagDecl *>(tag_decl);
2532}
2533
2534const ZigClangFieldDecl *ZigClangFieldDecl_getCanonicalDecl(const ZigClangFieldDecl *field_decl) {
2535 const clang::FieldDecl *canon_decl = reinterpret_cast<const clang::FieldDecl*>(field_decl)->getCanonicalDecl();
2536 return reinterpret_cast<const ZigClangFieldDecl *>(canon_decl);
2537}
2538
2539const ZigClangTagDecl *ZigClangEnumDecl_getCanonicalDecl(const ZigClangEnumDecl *enum_decl) {
2540 const clang::TagDecl *tag_decl = reinterpret_cast<const clang::EnumDecl*>(enum_decl)->getCanonicalDecl();
2541 return reinterpret_cast<const ZigClangTagDecl *>(tag_decl);
2542}
2543
2544const ZigClangTypedefNameDecl *ZigClangTypedefNameDecl_getCanonicalDecl(const ZigClangTypedefNameDecl *self) {
2545 const clang::TypedefNameDecl *decl = reinterpret_cast<const clang::TypedefNameDecl*>(self)->getCanonicalDecl();
2546 return reinterpret_cast<const ZigClangTypedefNameDecl *>(decl);
2547}
2548
2549const ZigClangFunctionDecl *ZigClangFunctionDecl_getCanonicalDecl(const ZigClangFunctionDecl *self) {
2550 const clang::FunctionDecl *decl = reinterpret_cast<const clang::FunctionDecl*>(self)->getCanonicalDecl();
2551 return reinterpret_cast<const ZigClangFunctionDecl *>(decl);
2552}
2553
2554const ZigClangVarDecl *ZigClangVarDecl_getCanonicalDecl(const ZigClangVarDecl *self) {
2555 const clang::VarDecl *decl = reinterpret_cast<const clang::VarDecl*>(self)->getCanonicalDecl();
2556 return reinterpret_cast<const ZigClangVarDecl *>(decl);
2557}
2558
2559const char* ZigClangVarDecl_getSectionAttribute(const struct ZigClangVarDecl *self, size_t *len) {
2560 auto casted = reinterpret_cast<const clang::VarDecl *>(self);
2561 if (const clang::SectionAttr *SA = casted->getAttr<clang::SectionAttr>()) {
2562 llvm::StringRef str_ref = SA->getName();
2563 *len = str_ref.size();
2564 return (const char *)str_ref.bytes_begin();
2565 }
2566 return nullptr;
2567}
2568
2569bool ZigClangRecordDecl_getPackedAttribute(const ZigClangRecordDecl *zig_record_decl) {
2570 const clang::RecordDecl *record_decl = reinterpret_cast<const clang::RecordDecl *>(zig_record_decl);
2571 return record_decl->hasAttr<clang::PackedAttr>();
2572}
2573
2574unsigned ZigClangVarDecl_getAlignedAttribute(const struct ZigClangVarDecl *self, const ZigClangASTContext* ctx) {
2575 auto casted_self = reinterpret_cast<const clang::VarDecl *>(self);
2576 auto casted_ctx = const_cast<clang::ASTContext *>(reinterpret_cast<const clang::ASTContext *>(ctx));
2577 if (const clang::AlignedAttr *AA = casted_self->getAttr<clang::AlignedAttr>()) {
2578 return AA->getAlignment(*casted_ctx);
2579 }
2580 // Zero means no explicit alignment factor was specified
2581 return 0;
2582}
2583
2584const struct ZigClangFunctionDecl *ZigClangVarDecl_getCleanupAttribute(const struct ZigClangVarDecl *self) {
2585 auto casted_self = reinterpret_cast<const clang::VarDecl *>(self);
2586 if (const clang::CleanupAttr *CA = casted_self->getAttr<clang::CleanupAttr>()) {
2587 return reinterpret_cast<const ZigClangFunctionDecl *>(CA->getFunctionDecl());
2588 }
2589 return nullptr;
2590}
2591
2592unsigned ZigClangFieldDecl_getAlignedAttribute(const struct ZigClangFieldDecl *self, const ZigClangASTContext* ctx) {
2593 auto casted_self = reinterpret_cast<const clang::FieldDecl *>(self);
2594 auto casted_ctx = const_cast<clang::ASTContext *>(reinterpret_cast<const clang::ASTContext *>(ctx));
2595 if (const clang::AlignedAttr *AA = casted_self->getAttr<clang::AlignedAttr>()) {
2596 return AA->getAlignment(*casted_ctx);
2597 }
2598 // Zero means no explicit alignment factor was specified
2599 return 0;
2600}
2601
2602unsigned ZigClangFunctionDecl_getAlignedAttribute(const struct ZigClangFunctionDecl *self, const ZigClangASTContext* ctx) {
2603 auto casted_self = reinterpret_cast<const clang::FunctionDecl *>(self);
2604 auto casted_ctx = const_cast<clang::ASTContext *>(reinterpret_cast<const clang::ASTContext *>(ctx));
2605 if (const clang::AlignedAttr *AA = casted_self->getAttr<clang::AlignedAttr>()) {
2606 return AA->getAlignment(*casted_ctx);
2607 }
2608 // Zero means no explicit alignment factor was specified
2609 return 0;
2610}
2611
2612bool ZigClangVarDecl_getPackedAttribute(const struct ZigClangVarDecl *self) {
2613 auto casted_self = reinterpret_cast<const clang::VarDecl *>(self);
2614 return casted_self->hasAttr<clang::PackedAttr>();
2615}
2616
2617bool ZigClangFieldDecl_getPackedAttribute(const struct ZigClangFieldDecl *self) {
2618 auto casted_self = reinterpret_cast<const clang::FieldDecl *>(self);
2619 return casted_self->hasAttr<clang::PackedAttr>();
2620}
2621
2622ZigClangQualType ZigClangParmVarDecl_getOriginalType(const struct ZigClangParmVarDecl *self) {
2623 return bitcast(reinterpret_cast<const clang::ParmVarDecl *>(self)->getOriginalType());
2624}
2625
2626const ZigClangRecordDecl *ZigClangRecordDecl_getDefinition(const ZigClangRecordDecl *zig_record_decl) {
2627 const clang::RecordDecl *record_decl = reinterpret_cast<const clang::RecordDecl *>(zig_record_decl);
2628 const clang::RecordDecl *definition = record_decl->getDefinition();
2629 return reinterpret_cast<const ZigClangRecordDecl *>(definition);
2630}
2631
2632const ZigClangEnumDecl *ZigClangEnumDecl_getDefinition(const ZigClangEnumDecl *zig_enum_decl) {
2633 const clang::EnumDecl *enum_decl = reinterpret_cast<const clang::EnumDecl *>(zig_enum_decl);
2634 const clang::EnumDecl *definition = enum_decl->getDefinition();
2635 return reinterpret_cast<const ZigClangEnumDecl *>(definition);
2636}
2637
2638const char *ZigClangFileScopeAsmDecl_getAsmString(const ZigClangFileScopeAsmDecl *self) {
2639 std::string str = reinterpret_cast<const clang::FileScopeAsmDecl*>(self)->getAsmString();
2640 char *result = new char[str.size() + 1];
2641 strcpy(result, str.c_str());
2642 return result;
2643}
2644
2645void ZigClangFileScopeAsmDecl_freeAsmString(const char *str) {
2646 delete[] str;
2647}
2648
2649bool ZigClangRecordDecl_isUnion(const ZigClangRecordDecl *record_decl) {
2650 return reinterpret_cast<const clang::RecordDecl*>(record_decl)->isUnion();
2651}
2652
2653bool ZigClangRecordDecl_isStruct(const ZigClangRecordDecl *record_decl) {
2654 return reinterpret_cast<const clang::RecordDecl*>(record_decl)->isStruct();
2655}
2656
2657bool ZigClangRecordDecl_isAnonymousStructOrUnion(const ZigClangRecordDecl *record_decl) {
2658 return reinterpret_cast<const clang::RecordDecl*>(record_decl)->isAnonymousStructOrUnion();
2659}
2660
2661const ZigClangNamedDecl* ZigClangDecl_castToNamedDecl(const ZigClangDecl *self) {
2662 auto casted = reinterpret_cast<const clang::Decl *>(self);
2663 auto cast = clang::dyn_cast<const clang::NamedDecl>(casted);
2664 return reinterpret_cast<const ZigClangNamedDecl *>(cast);
2665}
2666
2667const char *ZigClangNamedDecl_getName_bytes_begin(const ZigClangNamedDecl *self) {
2668 auto casted = reinterpret_cast<const clang::NamedDecl *>(self);
2669 return (const char *)casted->getName().bytes_begin();
2670}
2671
2672ZigClangDeclKind ZigClangDecl_getKind(const struct ZigClangDecl *self) {
2673 auto casted = reinterpret_cast<const clang::Decl *>(self);
2674 return (ZigClangDeclKind)casted->getKind();
2675}
2676
2677const char *ZigClangDecl_getDeclKindName(const struct ZigClangDecl *self) {
2678 auto casted = reinterpret_cast<const clang::Decl *>(self);
2679 return casted->getDeclKindName();
2680}
2681
2682ZigClangSourceLocation ZigClangRecordDecl_getLocation(const ZigClangRecordDecl *zig_record_decl) {
2683 const clang::RecordDecl *record_decl = reinterpret_cast<const clang::RecordDecl *>(zig_record_decl);
2684 return bitcast(record_decl->getLocation());
2685}
2686
2687ZigClangSourceLocation ZigClangEnumDecl_getLocation(const ZigClangEnumDecl *self) {
2688 auto casted = reinterpret_cast<const clang::EnumDecl *>(self);
2689 return bitcast(casted->getLocation());
2690}
2691
2692ZigClangSourceLocation ZigClangTypedefNameDecl_getLocation(const ZigClangTypedefNameDecl *self) {
2693 auto casted = reinterpret_cast<const clang::TypedefNameDecl *>(self);
2694 return bitcast(casted->getLocation());
2695}
2696
2697ZigClangSourceLocation ZigClangDecl_getLocation(const ZigClangDecl *self) {
2698 auto casted = reinterpret_cast<const clang::Decl *>(self);
2699 return bitcast(casted->getLocation());
2700}
2701
2702bool ZigClangSourceLocation_eq(ZigClangSourceLocation zig_a, ZigClangSourceLocation zig_b) {
2703 clang::SourceLocation a = bitcast(zig_a);
2704 clang::SourceLocation b = bitcast(zig_b);
2705 return a == b;
2706}
2707
2708ZigClangQualType ZigClangEnumDecl_getIntegerType(const ZigClangEnumDecl *self) {
2709 return bitcast(reinterpret_cast<const clang::EnumDecl *>(self)->getIntegerType());
2710}
2711
2712struct ZigClangQualType ZigClangFunctionDecl_getType(const struct ZigClangFunctionDecl *self) {
2713 auto casted = reinterpret_cast<const clang::FunctionDecl *>(self);
2714 return bitcast(casted->getType());
2715}
2716
2717struct ZigClangSourceLocation ZigClangFunctionDecl_getLocation(const struct ZigClangFunctionDecl *self) {
2718 auto casted = reinterpret_cast<const clang::FunctionDecl *>(self);
2719 return bitcast(casted->getLocation());
2720}
2721
2722bool ZigClangFunctionDecl_hasBody(const struct ZigClangFunctionDecl *self) {
2723 auto casted = reinterpret_cast<const clang::FunctionDecl *>(self);
2724 return casted->hasBody();
2725}
2726
2727enum ZigClangStorageClass ZigClangFunctionDecl_getStorageClass(const struct ZigClangFunctionDecl *self) {
2728 auto casted = reinterpret_cast<const clang::FunctionDecl *>(self);
2729 return (ZigClangStorageClass)casted->getStorageClass();
2730}
2731
2732const struct ZigClangParmVarDecl *ZigClangFunctionDecl_getParamDecl(const struct ZigClangFunctionDecl *self,
2733 unsigned i)
2734{
2735 auto casted = reinterpret_cast<const clang::FunctionDecl *>(self);
2736 const clang::ParmVarDecl *parm_var_decl = casted->getParamDecl(i);
2737 return reinterpret_cast<const ZigClangParmVarDecl *>(parm_var_decl);
2738}
2739
2740const struct ZigClangStmt *ZigClangFunctionDecl_getBody(const struct ZigClangFunctionDecl *self) {
2741 auto casted = reinterpret_cast<const clang::FunctionDecl *>(self);
2742 const clang::Stmt *stmt = casted->getBody();
2743 return reinterpret_cast<const ZigClangStmt *>(stmt);
2744}
2745
2746bool ZigClangFunctionDecl_doesDeclarationForceExternallyVisibleDefinition(const struct ZigClangFunctionDecl *self) {
2747 auto casted = reinterpret_cast<const clang::FunctionDecl *>(self);
2748 return casted->doesDeclarationForceExternallyVisibleDefinition();
2749}
2750
2751bool ZigClangFunctionDecl_isThisDeclarationADefinition(const struct ZigClangFunctionDecl *self) {
2752 auto casted = reinterpret_cast<const clang::FunctionDecl *>(self);
2753 return casted->isThisDeclarationADefinition();
2754}
2755
2756bool ZigClangFunctionDecl_doesThisDeclarationHaveABody(const struct ZigClangFunctionDecl *self) {
2757 auto casted = reinterpret_cast<const clang::FunctionDecl *>(self);
2758 return casted->doesThisDeclarationHaveABody();
2759}
2760
2761bool ZigClangFunctionDecl_isDefined(const struct ZigClangFunctionDecl *self) {
2762 auto casted = reinterpret_cast<const clang::FunctionDecl *>(self);
2763 return casted->isDefined();
2764}
2765
2766const ZigClangFunctionDecl* ZigClangFunctionDecl_getDefinition(const struct ZigClangFunctionDecl *self) {
2767 auto casted = reinterpret_cast<const clang::FunctionDecl *>(self);
2768 return reinterpret_cast<const ZigClangFunctionDecl *>(casted->getDefinition());
2769}
2770
2771bool ZigClangTagDecl_isThisDeclarationADefinition(const struct ZigClangTagDecl *self) {
2772 auto casted = reinterpret_cast<const clang::TagDecl *>(self);
2773 return casted->isThisDeclarationADefinition();
2774}
2775
2776bool ZigClangFunctionDecl_isInlineSpecified(const struct ZigClangFunctionDecl *self) {
2777 auto casted = reinterpret_cast<const clang::FunctionDecl *>(self);
2778 return casted->isInlineSpecified();
2779}
2780
2781bool ZigClangFunctionDecl_hasAlwaysInlineAttr(const struct ZigClangFunctionDecl *self) {
2782 auto casted = reinterpret_cast<const clang::FunctionDecl *>(self);
2783 return casted->hasAttr<clang::AlwaysInlineAttr>();
2784}
2785
2786const char* ZigClangFunctionDecl_getSectionAttribute(const struct ZigClangFunctionDecl *self, size_t *len) {
2787 auto casted = reinterpret_cast<const clang::FunctionDecl *>(self);
2788 if (const clang::SectionAttr *SA = casted->getAttr<clang::SectionAttr>()) {
2789 llvm::StringRef str_ref = SA->getName();
2790 *len = str_ref.size();
2791 return (const char *)str_ref.bytes_begin();
2792 }
2793 return nullptr;
2794}
2795
2796const ZigClangExpr *ZigClangOpaqueValueExpr_getSourceExpr(const ZigClangOpaqueValueExpr *self) {
2797 auto casted = reinterpret_cast<const clang::OpaqueValueExpr *>(self);
2798 return reinterpret_cast<const ZigClangExpr *>(casted->getSourceExpr());
2799}
2800
2801const ZigClangTypedefNameDecl *ZigClangTypedefType_getDecl(const ZigClangTypedefType *self) {
2802 auto casted = reinterpret_cast<const clang::TypedefType *>(self);
2803 const clang::TypedefNameDecl *name_decl = casted->getDecl();
2804 return reinterpret_cast<const ZigClangTypedefNameDecl *>(name_decl);
2805}
2806
2807ZigClangQualType ZigClangTypedefNameDecl_getUnderlyingType(const ZigClangTypedefNameDecl *self) {
2808 auto casted = reinterpret_cast<const clang::TypedefNameDecl *>(self);
2809 clang::QualType ty = casted->getUnderlyingType();
2810 return bitcast(ty);
2811}
2812
2813ZigClangQualType ZigClangQualType_getCanonicalType(ZigClangQualType self) {
2814 clang::QualType qt = bitcast(self);
2815 return bitcast(qt.getCanonicalType());
2816}
2817
2818const ZigClangType *ZigClangQualType_getTypePtr(ZigClangQualType self) {
2819 clang::QualType qt = bitcast(self);
2820 const clang::Type *ty = qt.getTypePtr();
2821 return reinterpret_cast<const ZigClangType *>(ty);
2822}
2823
2824ZigClangTypeClass ZigClangQualType_getTypeClass(ZigClangQualType self) {
2825 clang::QualType ty = bitcast(self);
2826 return (ZigClangTypeClass)(ty->getTypeClass());
2827}
2828
2829void ZigClangQualType_addConst(ZigClangQualType *self) {
2830 reinterpret_cast<clang::QualType *>(self)->addConst();
2831}
2832
2833bool ZigClangQualType_eq(ZigClangQualType zig_t1, ZigClangQualType zig_t2) {
2834 clang::QualType t1 = bitcast(zig_t1);
2835 clang::QualType t2 = bitcast(zig_t2);
2836 if (t1.isConstQualified() != t2.isConstQualified()) {
2837 return false;
2838 }
2839 if (t1.isVolatileQualified() != t2.isVolatileQualified()) {
2840 return false;
2841 }
2842 if (t1.isRestrictQualified() != t2.isRestrictQualified()) {
2843 return false;
2844 }
2845 return t1.getTypePtr() == t2.getTypePtr();
2846}
2847
2848bool ZigClangQualType_isConstQualified(ZigClangQualType self) {
2849 clang::QualType qt = bitcast(self);
2850 return qt.isConstQualified();
2851}
2852
2853bool ZigClangQualType_isVolatileQualified(ZigClangQualType self) {
2854 clang::QualType qt = bitcast(self);
2855 return qt.isVolatileQualified();
2856}
2857
2858bool ZigClangQualType_isRestrictQualified(ZigClangQualType self) {
2859 clang::QualType qt = bitcast(self);
2860 return qt.isRestrictQualified();
2861}
2862
2863ZigClangTypeClass ZigClangType_getTypeClass(const ZigClangType *self) {
2864 auto casted = reinterpret_cast<const clang::Type *>(self);
2865 clang::Type::TypeClass tc = casted->getTypeClass();
2866 return (ZigClangTypeClass)tc;
2867}
2868
2869ZigClangQualType ZigClangType_getPointeeType(const ZigClangType *self) {
2870 auto casted = reinterpret_cast<const clang::Type *>(self);
2871 return bitcast(casted->getPointeeType());
2872}
2873
2874bool ZigClangType_isBooleanType(const ZigClangType *self) {
2875 auto casted = reinterpret_cast<const clang::Type *>(self);
2876 return casted->isBooleanType();
2877}
2878
2879bool ZigClangType_isVoidType(const ZigClangType *self) {
2880 auto casted = reinterpret_cast<const clang::Type *>(self);
2881 return casted->isVoidType();
2882}
2883
2884bool ZigClangType_isArrayType(const ZigClangType *self) {
2885 auto casted = reinterpret_cast<const clang::Type *>(self);
2886 return casted->isArrayType();
2887}
2888
2889bool ZigClangType_isRecordType(const ZigClangType *self) {
2890 auto casted = reinterpret_cast<const clang::Type *>(self);
2891 return casted->isRecordType();
2892}
2893
2894bool ZigClangType_isVectorType(const ZigClangType *self) {
2895 auto casted = reinterpret_cast<const clang::Type *>(self);
2896 return casted->isVectorType();
2897}
2898
2899bool ZigClangType_isIncompleteOrZeroLengthArrayType(const ZigClangQualType *self,
2900 const struct ZigClangASTContext *ctx)
2901{
2902 auto casted_ctx = reinterpret_cast<const clang::ASTContext *>(ctx);
2903 auto casted = reinterpret_cast<const clang::QualType *>(self);
2904 auto casted_type = reinterpret_cast<const clang::Type *>(self);
2905 if (casted_type->isIncompleteArrayType())
2906 return true;
2907
2908 clang::QualType elem_type = *casted;
2909 while (const clang::ConstantArrayType *ArrayT = casted_ctx->getAsConstantArrayType(elem_type)) {
2910 if (ArrayT->getSize() == 0)
2911 return true;
2912
2913 elem_type = ArrayT->getElementType();
2914 }
2915
2916 return false;
2917}
2918
2919bool ZigClangType_isConstantArrayType(const ZigClangType *self) {
2920 auto casted = reinterpret_cast<const clang::Type *>(self);
2921 return casted->isConstantArrayType();
2922}
2923
2924const char *ZigClangType_getTypeClassName(const ZigClangType *self) {
2925 auto casted = reinterpret_cast<const clang::Type *>(self);
2926 return casted->getTypeClassName();
2927}
2928
2929const ZigClangArrayType *ZigClangType_getAsArrayTypeUnsafe(const ZigClangType *self) {
2930 auto casted = reinterpret_cast<const clang::Type *>(self);
2931 const clang::ArrayType *result = casted->getAsArrayTypeUnsafe();
2932 return reinterpret_cast<const ZigClangArrayType *>(result);
2933}
2934
2935const ZigClangRecordType *ZigClangType_getAsRecordType(const ZigClangType *self) {
2936 auto casted = reinterpret_cast<const clang::Type *>(self);
2937 const clang::RecordType *result = casted->getAsStructureType();
2938 return reinterpret_cast<const ZigClangRecordType *>(result);
2939}
2940
2941const ZigClangRecordType *ZigClangType_getAsUnionType(const ZigClangType *self) {
2942 auto casted = reinterpret_cast<const clang::Type *>(self);
2943 const clang::RecordType *result = casted->getAsUnionType();
2944 return reinterpret_cast<const ZigClangRecordType *>(result);
2945}
2946
2947ZigClangSourceLocation ZigClangStmt_getBeginLoc(const ZigClangStmt *self) {
2948 auto casted = reinterpret_cast<const clang::Stmt *>(self);
2949 return bitcast(casted->getBeginLoc());
2950}
2951
2952bool ZigClangStmt_classof_Expr(const ZigClangStmt *self) {
2953 auto casted = reinterpret_cast<const clang::Stmt *>(self);
2954 return clang::Expr::classof(casted);
2955}
2956
2957ZigClangStmtClass ZigClangStmt_getStmtClass(const ZigClangStmt *self) {
2958 auto casted = reinterpret_cast<const clang::Stmt *>(self);
2959 return (ZigClangStmtClass)casted->getStmtClass();
2960}
2961
2962ZigClangStmtClass ZigClangExpr_getStmtClass(const ZigClangExpr *self) {
2963 auto casted = reinterpret_cast<const clang::Expr *>(self);
2964 return (ZigClangStmtClass)casted->getStmtClass();
2965}
2966
2967ZigClangQualType ZigClangExpr_getType(const ZigClangExpr *self) {
2968 auto casted = reinterpret_cast<const clang::Expr *>(self);
2969 return bitcast(casted->getType());
2970}
2971
2972ZigClangSourceLocation ZigClangExpr_getBeginLoc(const ZigClangExpr *self) {
2973 auto casted = reinterpret_cast<const clang::Expr *>(self);
2974 return bitcast(casted->getBeginLoc());
2975}
2976
2977bool ZigClangExpr_EvaluateAsBooleanCondition(const ZigClangExpr *self, bool *result,
2978 const struct ZigClangASTContext *ctx, bool in_constant_context)
2979{
2980 auto casted = reinterpret_cast<const clang::Expr *>(self);
2981 auto casted_ctx = reinterpret_cast<const clang::ASTContext *>(ctx);
2982 return casted->EvaluateAsBooleanCondition(*result, *casted_ctx, in_constant_context);
2983}
2984
2985bool ZigClangExpr_EvaluateAsFloat(const ZigClangExpr *self, ZigClangAPFloat **result,
2986 const struct ZigClangASTContext *ctx)
2987{
2988 llvm::APFloat *ap_float = new llvm::APFloat(0.0f);
2989 *result = reinterpret_cast<ZigClangAPFloat *>(ap_float);
2990 auto casted = reinterpret_cast<const clang::Expr *>(self);
2991 auto casted_ctx = reinterpret_cast<const clang::ASTContext *>(ctx);
2992 return casted->EvaluateAsFloat(*ap_float, *casted_ctx);
2993}
2994
2995bool ZigClangExpr_EvaluateAsConstantExpr(const ZigClangExpr *self, ZigClangExprEvalResult *result,
2996 ZigClangExpr_ConstantExprKind kind, const struct ZigClangASTContext *ctx)
2997{
2998 auto casted_self = reinterpret_cast<const clang::Expr *>(self);
2999 auto casted_ctx = reinterpret_cast<const clang::ASTContext *>(ctx);
3000 clang::Expr::EvalResult eval_result;
3001 if (!casted_self->EvaluateAsConstantExpr(eval_result, *casted_ctx, (clang::Expr::ConstantExprKind)kind)) {
3002 return false;
3003 }
3004 *result = bitcast(eval_result);
3005 return true;
3006}
3007
3008const ZigClangStringLiteral *ZigClangExpr_castToStringLiteral(const struct ZigClangExpr *self) {
3009 auto casted_self = reinterpret_cast<const clang::Expr *>(self);
3010 auto cast = clang::dyn_cast<const clang::StringLiteral>(casted_self);
3011 return reinterpret_cast<const ZigClangStringLiteral *>(cast);
3012}
3013
3014const ZigClangExpr *ZigClangInitListExpr_getInit(const ZigClangInitListExpr *self, unsigned i) {
3015 auto casted = reinterpret_cast<const clang::InitListExpr *>(self);
3016 const clang::Expr *result = casted->getInit(i);
3017 return reinterpret_cast<const ZigClangExpr *>(result);
3018}
3019
3020const ZigClangExpr *ZigClangInitListExpr_getArrayFiller(const ZigClangInitListExpr *self) {
3021 auto casted = reinterpret_cast<const clang::InitListExpr *>(self);
3022 const clang::Expr *result = casted->getArrayFiller();
3023 return reinterpret_cast<const ZigClangExpr *>(result);
3024}
3025
3026bool ZigClangInitListExpr_hasArrayFiller(const ZigClangInitListExpr *self) {
3027 auto casted = reinterpret_cast<const clang::InitListExpr *>(self);
3028 return casted->hasArrayFiller();
3029}
3030
3031bool ZigClangInitListExpr_isStringLiteralInit(const ZigClangInitListExpr *self) {
3032 auto casted = reinterpret_cast<const clang::InitListExpr *>(self);
3033 return casted->isStringLiteralInit();
3034}
3035
3036const ZigClangFieldDecl *ZigClangInitListExpr_getInitializedFieldInUnion(const ZigClangInitListExpr *self) {
3037 auto casted = reinterpret_cast<const clang::InitListExpr *>(self);
3038 const clang::FieldDecl *result = casted->getInitializedFieldInUnion();
3039 return reinterpret_cast<const ZigClangFieldDecl *>(result);
3040}
3041
3042unsigned ZigClangInitListExpr_getNumInits(const ZigClangInitListExpr *self) {
3043 auto casted = reinterpret_cast<const clang::InitListExpr *>(self);
3044 return casted->getNumInits();
3045}
3046
3047ZigClangAPValueKind ZigClangAPValue_getKind(const ZigClangAPValue *self) {
3048 auto casted = reinterpret_cast<const clang::APValue *>(self);
3049 return (ZigClangAPValueKind)casted->getKind();
3050}
3051
3052const ZigClangAPSInt *ZigClangAPValue_getInt(const ZigClangAPValue *self) {
3053 auto casted = reinterpret_cast<const clang::APValue *>(self);
3054 const llvm::APSInt *result = &casted->getInt();
3055 return reinterpret_cast<const ZigClangAPSInt *>(result);
3056}
3057
3058unsigned ZigClangAPValue_getArrayInitializedElts(const ZigClangAPValue *self) {
3059 auto casted = reinterpret_cast<const clang::APValue *>(self);
3060 return casted->getArrayInitializedElts();
3061}
3062
3063const ZigClangAPValue *ZigClangAPValue_getArrayInitializedElt(const ZigClangAPValue *self, unsigned i) {
3064 auto casted = reinterpret_cast<const clang::APValue *>(self);
3065 const clang::APValue *result = &casted->getArrayInitializedElt(i);
3066 return reinterpret_cast<const ZigClangAPValue *>(result);
3067}
3068
3069const ZigClangAPValue *ZigClangAPValue_getArrayFiller(const ZigClangAPValue *self) {
3070 auto casted = reinterpret_cast<const clang::APValue *>(self);
3071 const clang::APValue *result = &casted->getArrayFiller();
3072 return reinterpret_cast<const ZigClangAPValue *>(result);
3073}
3074
3075unsigned ZigClangAPValue_getArraySize(const ZigClangAPValue *self) {
3076 auto casted = reinterpret_cast<const clang::APValue *>(self);
3077 return casted->getArraySize();
3078}
3079
3080const ZigClangAPSInt *ZigClangAPSInt_negate(const ZigClangAPSInt *self) {
3081 auto casted = reinterpret_cast<const llvm::APSInt *>(self);
3082 llvm::APSInt *result = new llvm::APSInt();
3083 *result = *casted;
3084 *result = -*result;
3085 return reinterpret_cast<const ZigClangAPSInt *>(result);
3086}
3087
3088void ZigClangAPSInt_free(const ZigClangAPSInt *self) {
3089 auto casted = reinterpret_cast<const llvm::APSInt *>(self);
3090 delete casted;
3091}
3092
3093bool ZigClangAPSInt_isSigned(const ZigClangAPSInt *self) {
3094 auto casted = reinterpret_cast<const llvm::APSInt *>(self);
3095 return casted->isSigned();
3096}
3097
3098bool ZigClangAPSInt_isNegative(const ZigClangAPSInt *self) {
3099 auto casted = reinterpret_cast<const llvm::APSInt *>(self);
3100 return casted->isNegative();
3101}
3102
3103const uint64_t *ZigClangAPSInt_getRawData(const ZigClangAPSInt *self) {
3104 auto casted = reinterpret_cast<const llvm::APSInt *>(self);
3105 return casted->getRawData();
3106}
3107
3108unsigned ZigClangAPSInt_getNumWords(const ZigClangAPSInt *self) {
3109 auto casted = reinterpret_cast<const llvm::APSInt *>(self);
3110 return casted->getNumWords();
3111}
3112
3113bool ZigClangAPSInt_lessThanEqual(const ZigClangAPSInt *self, uint64_t rhs) {
3114 auto casted = reinterpret_cast<const llvm::APSInt *>(self);
3115 return casted->ule(rhs);
3116}
3117
3118void ZigClangAPInt_free(const ZigClangAPInt *self) {
3119 auto casted = reinterpret_cast<const llvm::APInt *>(self);
3120 delete casted;
3121}
3122
3123uint64_t ZigClangAPInt_getLimitedValue(const ZigClangAPInt *self, uint64_t limit) {
3124 auto casted = reinterpret_cast<const llvm::APInt *>(self);
3125 return casted->getLimitedValue(limit);
3126}
3127
3128const ZigClangExpr *ZigClangAPValueLValueBase_dyn_cast_Expr(ZigClangAPValueLValueBase self) {
3129 clang::APValue::LValueBase casted = bitcast(self);
3130 const clang::Expr *expr = casted.dyn_cast<const clang::Expr *>();
3131 return reinterpret_cast<const ZigClangExpr *>(expr);
3132}
3133
3134ZigClangAPValueLValueBase ZigClangAPValue_getLValueBase(const ZigClangAPValue *self) {
3135 auto casted = reinterpret_cast<const clang::APValue *>(self);
3136 clang::APValue::LValueBase lval_base = casted->getLValueBase();
3137 return bitcast(lval_base);
3138}
3139
3140ZigClangASTUnit *ZigClangLoadFromCommandLine(const char **args_begin, const char **args_end,
3141 struct Stage2ErrorMsg **errors_ptr, size_t *errors_len, const char *resources_path)
3142{
3143 llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS = llvm::vfs::getRealFileSystem();
3144 auto diag_opts = std::make_shared<clang::DiagnosticOptions>();
3145 clang::IntrusiveRefCntPtr<clang::DiagnosticsEngine> diags(clang::CompilerInstance::createDiagnostics(*VFS, *diag_opts));
3146
3147 std::shared_ptr<clang::PCHContainerOperations> pch_container_ops = std::make_shared<clang::PCHContainerOperations>();
3148
3149 bool only_local_decls = true;
3150 bool user_files_are_volatile = true;
3151 bool allow_pch_with_compiler_errors = false;
3152 bool single_file_parse = false;
3153 bool for_serialization = false;
3154 bool retain_excluded_conditional_blocks = false;
3155 bool store_preambles_in_memory = false;
3156 llvm::StringRef preamble_storage_path = llvm::StringRef();
3157 clang::ArrayRef<clang::ASTUnit::RemappedFile> remapped_files = {};
3158 std::unique_ptr<clang::ASTUnit> err_unit;
3159 std::optional<llvm::StringRef> ModuleFormat = std::nullopt;
3160 std::unique_ptr<clang::ASTUnit> ast_unit_unique_ptr = clang::ASTUnit::LoadFromCommandLine(
3161 args_begin, args_end,
3162 pch_container_ops,
3163 diag_opts,
3164 diags,
3165 resources_path,
3166 store_preambles_in_memory,
3167 preamble_storage_path,
3168 only_local_decls,
3169 clang::CaptureDiagsKind::All,
3170 remapped_files,
3171 true, // remapped files keep original name
3172 0, // precompiled preable after n parses
3173 clang::TU_Complete,
3174 false, // cache code completion results
3175 false, // include brief comments in code completion
3176 allow_pch_with_compiler_errors,
3177 clang::SkipFunctionBodiesScope::None,
3178 single_file_parse,
3179 user_files_are_volatile,
3180 for_serialization,
3181 retain_excluded_conditional_blocks,
3182 ModuleFormat,
3183 &err_unit,
3184 VFS);
3185 clang::ASTUnit * ast_unit = ast_unit_unique_ptr.release();
3186
3187 *errors_len = 0;
3188
3189 // Early failures in LoadFromCommandLine may return with ErrUnit unset.
3190 if (!ast_unit && !err_unit) {
3191 return nullptr;
3192 }
3193
3194 if (diags->hasErrorOccurred()) {
3195 // Take ownership of the err_unit ASTUnit object so that it won't be
3196 // free'd when we return, invalidating the error message pointers
3197 clang::ASTUnit *unit = ast_unit ? ast_unit : err_unit.release();
3198 Stage2ErrorMsg *errors = nullptr;
3199
3200 for (clang::ASTUnit::stored_diag_iterator it = unit->stored_diag_begin(),
3201 it_end = unit->stored_diag_end(); it != it_end; ++it)
3202 {
3203 switch (it->getLevel()) {
3204 case clang::DiagnosticsEngine::Ignored:
3205 case clang::DiagnosticsEngine::Note:
3206 case clang::DiagnosticsEngine::Remark:
3207 case clang::DiagnosticsEngine::Warning:
3208 continue;
3209 case clang::DiagnosticsEngine::Error:
3210 case clang::DiagnosticsEngine::Fatal:
3211 break;
3212 }
3213
3214 llvm::StringRef msg_str_ref = it->getMessage();
3215
3216 *errors_len += 1;
3217 errors = reinterpret_cast<Stage2ErrorMsg*>(realloc(errors, sizeof(Stage2ErrorMsg) * *errors_len));
3218 if (errors == nullptr) abort();
3219 Stage2ErrorMsg *msg = &errors[*errors_len - 1];
3220 memset(msg, 0, sizeof(*msg));
3221
3222 msg->msg_ptr = (const char *)msg_str_ref.bytes_begin();
3223 msg->msg_len = msg_str_ref.size();
3224
3225 clang::FullSourceLoc fsl = it->getLocation();
3226
3227 // Ensure the source location is valid before expanding it
3228 if (fsl.isInvalid()) {
3229 continue;
3230 }
3231 // Expand the location if possible
3232 fsl = fsl.getFileLoc();
3233
3234 // The only known way to obtain a Loc without a manager associated
3235 // to it is if you have a lot of errors clang emits "too many errors
3236 // emitted, stopping now"
3237 if (fsl.hasManager()) {
3238 const clang::SourceManager &SM = fsl.getManager();
3239
3240 clang::PresumedLoc presumed_loc = SM.getPresumedLoc(fsl);
3241 assert(!presumed_loc.isInvalid());
3242
3243 msg->line = presumed_loc.getLine() - 1;
3244 msg->column = presumed_loc.getColumn() - 1;
3245
3246 clang::StringRef filename = presumed_loc.getFilename();
3247 if (!filename.empty()) {
3248 msg->filename_ptr = (const char *)filename.bytes_begin();
3249 msg->filename_len = filename.size();
3250 }
3251
3252 bool invalid;
3253 clang::StringRef buffer = fsl.getBufferData(&invalid);
3254
3255 if (!invalid) {
3256 msg->source = (const char *)buffer.bytes_begin();
3257 msg->offset = SM.getFileOffset(fsl);
3258 }
3259 }
3260 }
3261
3262 *errors_ptr = errors;
3263
3264 return nullptr;
3265 }
3266
3267 return reinterpret_cast<ZigClangASTUnit *>(ast_unit);
3268}
3269
3270void ZigClangErrorMsg_delete(Stage2ErrorMsg *ptr, size_t len) {
3271 free(ptr);
3272}
3273
3274void ZigClangASTUnit_delete(struct ZigClangASTUnit *self) {
3275 delete reinterpret_cast<clang::ASTUnit *>(self);
3276}
3277
3278struct ZigClangQualType ZigClangVarDecl_getType(const struct ZigClangVarDecl *self) {
3279 auto casted = reinterpret_cast<const clang::VarDecl *>(self);
3280 return bitcast(casted->getType());
3281}
3282
3283struct ZigClangQualType ZigClangVarDecl_getTypeSourceInfo_getType(const struct ZigClangVarDecl *self) {
3284 auto casted = reinterpret_cast<const clang::VarDecl *>(self);
3285 return bitcast(casted->getTypeSourceInfo()->getType());
3286}
3287
3288const struct ZigClangExpr *ZigClangVarDecl_getInit(const struct ZigClangVarDecl *self) {
3289 auto casted = reinterpret_cast<const clang::VarDecl *>(self);
3290 return reinterpret_cast<const ZigClangExpr *>(casted->getInit());
3291}
3292
3293enum ZigClangVarDecl_TLSKind ZigClangVarDecl_getTLSKind(const ZigClangVarDecl *self) {
3294 auto casted = reinterpret_cast<const clang::VarDecl *>(self);
3295 return (ZigClangVarDecl_TLSKind)casted->getTLSKind();
3296}
3297
3298struct ZigClangSourceLocation ZigClangVarDecl_getLocation(const struct ZigClangVarDecl *self) {
3299 auto casted = reinterpret_cast<const clang::VarDecl *>(self);
3300 return bitcast(casted->getLocation());
3301}
3302
3303bool ZigClangVarDecl_hasExternalStorage(const struct ZigClangVarDecl *self) {
3304 auto casted = reinterpret_cast<const clang::VarDecl *>(self);
3305 return casted->hasExternalStorage();
3306}
3307
3308bool ZigClangVarDecl_isFileVarDecl(const struct ZigClangVarDecl *self) {
3309 auto casted = reinterpret_cast<const clang::VarDecl *>(self);
3310 return casted->isFileVarDecl();
3311}
3312
3313bool ZigClangVarDecl_hasInit(const struct ZigClangVarDecl *self) {
3314 auto casted = reinterpret_cast<const clang::VarDecl *>(self);
3315 return casted->hasInit();
3316}
3317
3318const ZigClangAPValue * ZigClangVarDecl_evaluateValue(const struct ZigClangVarDecl *self) {
3319 auto casted = reinterpret_cast<const clang::VarDecl *>(self);
3320 const clang::APValue *result = casted->evaluateValue();
3321 return reinterpret_cast<const ZigClangAPValue *>(result);
3322}
3323
3324enum ZigClangStorageClass ZigClangVarDecl_getStorageClass(const struct ZigClangVarDecl *self) {
3325 auto casted = reinterpret_cast<const clang::VarDecl *>(self);
3326 return (ZigClangStorageClass)casted->getStorageClass();
3327}
3328
3329bool ZigClangVarDecl_isStaticLocal(const struct ZigClangVarDecl *self) {
3330 auto casted = reinterpret_cast<const clang::VarDecl *>(self);
3331 return casted->isStaticLocal();
3332}
3333
3334enum ZigClangBuiltinTypeKind ZigClangBuiltinType_getKind(const struct ZigClangBuiltinType *self) {
3335 auto casted = reinterpret_cast<const clang::BuiltinType *>(self);
3336 return (ZigClangBuiltinTypeKind)casted->getKind();
3337}
3338
3339bool ZigClangFunctionType_getNoReturnAttr(const struct ZigClangFunctionType *self) {
3340 auto casted = reinterpret_cast<const clang::FunctionType *>(self);
3341 return casted->getNoReturnAttr();
3342}
3343
3344enum ZigClangCallingConv ZigClangFunctionType_getCallConv(const struct ZigClangFunctionType *self) {
3345 auto casted = reinterpret_cast<const clang::FunctionType *>(self);
3346 return (ZigClangCallingConv)casted->getCallConv();
3347}
3348
3349struct ZigClangQualType ZigClangFunctionType_getReturnType(const struct ZigClangFunctionType *self) {
3350 auto casted = reinterpret_cast<const clang::FunctionType *>(self);
3351 return bitcast(casted->getReturnType());
3352}
3353
3354const struct ZigClangExpr *ZigClangGenericSelectionExpr_getResultExpr(const struct ZigClangGenericSelectionExpr *self) {
3355 auto casted = reinterpret_cast<const clang::GenericSelectionExpr *>(self);
3356 return reinterpret_cast<const struct ZigClangExpr *>(casted->getResultExpr());
3357}
3358
3359bool ZigClangFunctionProtoType_isVariadic(const struct ZigClangFunctionProtoType *self) {
3360 auto casted = reinterpret_cast<const clang::FunctionProtoType *>(self);
3361 return casted->isVariadic();
3362}
3363
3364unsigned ZigClangFunctionProtoType_getNumParams(const struct ZigClangFunctionProtoType *self) {
3365 auto casted = reinterpret_cast<const clang::FunctionProtoType *>(self);
3366 return casted->getNumParams();
3367}
3368
3369struct ZigClangQualType ZigClangFunctionProtoType_getParamType(const struct ZigClangFunctionProtoType *self,
3370 unsigned index)
3371{
3372 auto casted = reinterpret_cast<const clang::FunctionProtoType *>(self);
3373 return bitcast(casted->getParamType(index));
3374}
3375
3376struct ZigClangQualType ZigClangFunctionProtoType_getReturnType(const struct ZigClangFunctionProtoType *self) {
3377 auto casted = reinterpret_cast<const clang::FunctionProtoType *>(self);
3378 return bitcast(casted->getReturnType());
3379}
3380
3381ZigClangCompoundStmt_const_body_iterator ZigClangCompoundStmt_body_begin(const struct ZigClangCompoundStmt *self) {
3382 auto casted = reinterpret_cast<const clang::CompoundStmt *>(self);
3383 return bitcast(casted->body_begin());
3384}
3385
3386ZigClangCompoundStmt_const_body_iterator ZigClangCompoundStmt_body_end(const struct ZigClangCompoundStmt *self) {
3387 auto casted = reinterpret_cast<const clang::CompoundStmt *>(self);
3388 return bitcast(casted->body_end());
3389}
3390
3391ZigClangDeclStmt_const_decl_iterator ZigClangDeclStmt_decl_begin(const struct ZigClangDeclStmt *self) {
3392 auto casted = reinterpret_cast<const clang::DeclStmt *>(self);
3393 return bitcast(casted->decl_begin());
3394}
3395
3396ZigClangDeclStmt_const_decl_iterator ZigClangDeclStmt_decl_end(const struct ZigClangDeclStmt *self) {
3397 auto casted = reinterpret_cast<const clang::DeclStmt *>(self);
3398 return bitcast(casted->decl_end());
3399}
3400
3401ZigClangSourceLocation ZigClangDeclStmt_getBeginLoc(const struct ZigClangDeclStmt *self) {
3402 auto casted = reinterpret_cast<const clang::DeclStmt *>(self);
3403 return bitcast(casted->getBeginLoc());
3404}
3405
3406unsigned ZigClangAPFloat_convertToHexString(const ZigClangAPFloat *self, char *DST,
3407 unsigned HexDigits, bool UpperCase, enum ZigClangAPFloat_roundingMode RM)
3408{
3409 auto casted = reinterpret_cast<const llvm::APFloat *>(self);
3410 return casted->convertToHexString(DST, HexDigits, UpperCase, (llvm::APFloat::roundingMode)RM);
3411}
3412
3413double ZigClangFloatingLiteral_getValueAsApproximateDouble(const ZigClangFloatingLiteral *self) {
3414 auto casted = reinterpret_cast<const clang::FloatingLiteral *>(self);
3415 return casted->getValueAsApproximateDouble();
3416}
3417
3418void ZigClangFloatingLiteral_getValueAsApproximateQuadBits(const ZigClangFloatingLiteral *self, uint64_t *low, uint64_t *high) {
3419 auto casted = reinterpret_cast<const clang::FloatingLiteral *>(self);
3420 llvm::APFloat apf = casted->getValue();
3421 bool ignored;
3422 apf.convert(llvm::APFloat::IEEEquad(), llvm::APFloat::rmNearestTiesToEven, &ignored);
3423 const llvm::APInt api = apf.bitcastToAPInt();
3424 const uint64_t *api_data = api.getRawData();
3425 *low = api_data[0];
3426 *high = api_data[1];
3427}
3428
3429struct ZigClangSourceLocation ZigClangFloatingLiteral_getBeginLoc(const struct ZigClangFloatingLiteral *self) {
3430 auto casted = reinterpret_cast<const clang::FloatingLiteral *>(self);
3431 return bitcast(casted->getBeginLoc());
3432}
3433
3434ZigClangAPFloatBase_Semantics ZigClangFloatingLiteral_getRawSemantics(const ZigClangFloatingLiteral *self) {
3435 auto casted = reinterpret_cast<const clang::FloatingLiteral *>(self);
3436 return static_cast<ZigClangAPFloatBase_Semantics>(casted->getRawSemantics());
3437}
3438
3439enum ZigClangCharacterLiteralKind ZigClangStringLiteral_getKind(const struct ZigClangStringLiteral *self) {
3440 auto casted = reinterpret_cast<const clang::StringLiteral *>(self);
3441 return (ZigClangCharacterLiteralKind)casted->getKind();
3442}
3443
3444uint32_t ZigClangStringLiteral_getCodeUnit(const struct ZigClangStringLiteral *self, size_t i) {
3445 auto casted = reinterpret_cast<const clang::StringLiteral *>(self);
3446 return casted->getCodeUnit(i);
3447}
3448
3449unsigned ZigClangStringLiteral_getLength(const struct ZigClangStringLiteral *self) {
3450 auto casted = reinterpret_cast<const clang::StringLiteral *>(self);
3451 return casted->getLength();
3452}
3453
3454unsigned ZigClangStringLiteral_getCharByteWidth(const struct ZigClangStringLiteral *self) {
3455 auto casted = reinterpret_cast<const clang::StringLiteral *>(self);
3456 return casted->getCharByteWidth();
3457}
3458
3459const char *ZigClangStringLiteral_getString_bytes_begin_size(const struct ZigClangStringLiteral *self, size_t *len) {
3460 auto casted = reinterpret_cast<const clang::StringLiteral *>(self);
3461 llvm::StringRef str_ref = casted->getString();
3462 *len = str_ref.size();
3463 return (const char *)str_ref.bytes_begin();
3464}
3465
3466const struct ZigClangStringLiteral *ZigClangPredefinedExpr_getFunctionName(
3467 const struct ZigClangPredefinedExpr *self)
3468{
3469 auto casted = reinterpret_cast<const clang::PredefinedExpr *>(self);
3470 const clang::StringLiteral *result = casted->getFunctionName();
3471 return reinterpret_cast<const struct ZigClangStringLiteral *>(result);
3472}
3473
3474ZigClangSourceLocation ZigClangImplicitCastExpr_getBeginLoc(const struct ZigClangImplicitCastExpr *self) {
3475 auto casted = reinterpret_cast<const clang::ImplicitCastExpr *>(self);
3476 return bitcast(casted->getBeginLoc());
3477}
3478
3479enum ZigClangCK ZigClangImplicitCastExpr_getCastKind(const struct ZigClangImplicitCastExpr *self) {
3480 auto casted = reinterpret_cast<const clang::ImplicitCastExpr *>(self);
3481 return (ZigClangCK)casted->getCastKind();
3482}
3483
3484const struct ZigClangExpr *ZigClangImplicitCastExpr_getSubExpr(const struct ZigClangImplicitCastExpr *self) {
3485 auto casted = reinterpret_cast<const clang::ImplicitCastExpr *>(self);
3486 return reinterpret_cast<const struct ZigClangExpr *>(casted->getSubExpr());
3487}
3488
3489struct ZigClangQualType ZigClangArrayType_getElementType(const struct ZigClangArrayType *self) {
3490 auto casted = reinterpret_cast<const clang::ArrayType *>(self);
3491 return bitcast(casted->getElementType());
3492}
3493
3494struct ZigClangQualType ZigClangIncompleteArrayType_getElementType(const struct ZigClangIncompleteArrayType *self) {
3495 auto casted = reinterpret_cast<const clang::IncompleteArrayType *>(self);
3496 return bitcast(casted->getElementType());
3497}
3498
3499struct ZigClangQualType ZigClangConstantArrayType_getElementType(const struct ZigClangConstantArrayType *self) {
3500 auto casted = reinterpret_cast<const clang::ConstantArrayType *>(self);
3501 return bitcast(casted->getElementType());
3502}
3503
3504void ZigClangConstantArrayType_getSize(const struct ZigClangConstantArrayType *self, const struct ZigClangAPInt **result) {
3505 auto casted = reinterpret_cast<const clang::ConstantArrayType *>(self);
3506 llvm::APInt *ap_int = new llvm::APInt(casted->getSize());
3507 *result = reinterpret_cast<const ZigClangAPInt *>(ap_int);
3508}
3509
3510const struct ZigClangValueDecl *ZigClangDeclRefExpr_getDecl(const struct ZigClangDeclRefExpr *self) {
3511 auto casted = reinterpret_cast<const clang::DeclRefExpr *>(self);
3512 return reinterpret_cast<const struct ZigClangValueDecl *>(casted->getDecl());
3513}
3514
3515const struct ZigClangNamedDecl *ZigClangDeclRefExpr_getFoundDecl(const struct ZigClangDeclRefExpr *self) {
3516 auto casted = reinterpret_cast<const clang::DeclRefExpr *>(self);
3517 return reinterpret_cast<const struct ZigClangNamedDecl *>(casted->getFoundDecl());
3518}
3519
3520struct ZigClangQualType ZigClangParenType_getInnerType(const struct ZigClangParenType *self) {
3521 auto casted = reinterpret_cast<const clang::ParenType *>(self);
3522 return bitcast(casted->getInnerType());
3523}
3524
3525struct ZigClangQualType ZigClangAttributedType_getEquivalentType(const struct ZigClangAttributedType *self) {
3526 auto casted = reinterpret_cast<const clang::AttributedType *>(self);
3527 return bitcast(casted->getEquivalentType());
3528}
3529
3530struct ZigClangQualType ZigClangMacroQualifiedType_getModifiedType(const struct ZigClangMacroQualifiedType *self) {
3531 auto casted = reinterpret_cast<const clang::MacroQualifiedType *>(self);
3532 return bitcast(casted->getModifiedType());
3533}
3534
3535struct ZigClangQualType ZigClangTypeOfType_getUnmodifiedType(const struct ZigClangTypeOfType *self) {
3536 auto casted = reinterpret_cast<const clang::TypeOfType *>(self);
3537 return bitcast(casted->getUnmodifiedType());
3538}
3539
3540const struct ZigClangExpr *ZigClangTypeOfExprType_getUnderlyingExpr(const struct ZigClangTypeOfExprType *self) {
3541 auto casted = reinterpret_cast<const clang::TypeOfExprType *>(self);
3542 return reinterpret_cast<const struct ZigClangExpr *>(casted->getUnderlyingExpr());
3543}
3544
3545enum ZigClangOffsetOfNode_Kind ZigClangOffsetOfNode_getKind(const struct ZigClangOffsetOfNode *self) {
3546 auto casted = reinterpret_cast<const clang::OffsetOfNode *>(self);
3547 return (ZigClangOffsetOfNode_Kind)casted->getKind();
3548}
3549
3550unsigned ZigClangOffsetOfNode_getArrayExprIndex(const struct ZigClangOffsetOfNode *self) {
3551 auto casted = reinterpret_cast<const clang::OffsetOfNode *>(self);
3552 return casted->getArrayExprIndex();
3553}
3554
3555struct ZigClangFieldDecl *ZigClangOffsetOfNode_getField(const struct ZigClangOffsetOfNode *self) {
3556 auto casted = reinterpret_cast<const clang::OffsetOfNode *>(self);
3557 return reinterpret_cast<ZigClangFieldDecl *>(casted->getField());
3558}
3559
3560unsigned ZigClangOffsetOfExpr_getNumComponents(const struct ZigClangOffsetOfExpr *self) {
3561 auto casted = reinterpret_cast<const clang::OffsetOfExpr *>(self);
3562 return casted->getNumComponents();
3563}
3564
3565unsigned ZigClangOffsetOfExpr_getNumExpressions(const struct ZigClangOffsetOfExpr *self) {
3566 auto casted = reinterpret_cast<const clang::OffsetOfExpr *>(self);
3567 return casted->getNumExpressions();
3568}
3569
3570const struct ZigClangExpr *ZigClangOffsetOfExpr_getIndexExpr(const struct ZigClangOffsetOfExpr *self, unsigned idx) {
3571 auto casted = reinterpret_cast<const clang::OffsetOfExpr *>(self);
3572 return reinterpret_cast<const struct ZigClangExpr *>(casted->getIndexExpr(idx));
3573}
3574
3575const struct ZigClangOffsetOfNode *ZigClangOffsetOfExpr_getComponent(const struct ZigClangOffsetOfExpr *self, unsigned idx) {
3576 auto casted = reinterpret_cast<const clang::OffsetOfExpr *>(self);
3577 return reinterpret_cast<const struct ZigClangOffsetOfNode *>(&casted->getComponent(idx));
3578}
3579
3580ZigClangSourceLocation ZigClangOffsetOfExpr_getBeginLoc(const ZigClangOffsetOfExpr *self) {
3581 auto casted = reinterpret_cast<const clang::OffsetOfExpr *>(self);
3582 return bitcast(casted->getBeginLoc());
3583}
3584
3585struct ZigClangQualType ZigClangElaboratedType_getNamedType(const struct ZigClangElaboratedType *self) {
3586 auto casted = reinterpret_cast<const clang::ElaboratedType *>(self);
3587 return bitcast(casted->getNamedType());
3588}
3589
3590enum ZigClangElaboratedTypeKeyword ZigClangElaboratedType_getKeyword(const struct ZigClangElaboratedType *self) {
3591 auto casted = reinterpret_cast<const clang::ElaboratedType *>(self);
3592 return (ZigClangElaboratedTypeKeyword)casted->getKeyword();
3593}
3594
3595struct ZigClangSourceLocation ZigClangCStyleCastExpr_getBeginLoc(const struct ZigClangCStyleCastExpr *self) {
3596 auto casted = reinterpret_cast<const clang::CStyleCastExpr *>(self);
3597 return bitcast(casted->getBeginLoc());
3598}
3599
3600const struct ZigClangExpr *ZigClangCStyleCastExpr_getSubExpr(const struct ZigClangCStyleCastExpr *self) {
3601 auto casted = reinterpret_cast<const clang::CStyleCastExpr *>(self);
3602 return reinterpret_cast<const struct ZigClangExpr *>(casted->getSubExpr());
3603}
3604
3605struct ZigClangQualType ZigClangCStyleCastExpr_getType(const struct ZigClangCStyleCastExpr *self) {
3606 auto casted = reinterpret_cast<const clang::CStyleCastExpr *>(self);
3607 return bitcast(casted->getType());
3608}
3609
3610const struct ZigClangASTRecordLayout *ZigClangRecordDecl_getASTRecordLayout(const struct ZigClangRecordDecl *self, const struct ZigClangASTContext *ctx) {
3611 auto casted_self = reinterpret_cast<const clang::RecordDecl *>(self);
3612 auto casted_ctx = reinterpret_cast<const clang::ASTContext *>(ctx);
3613 const clang::ASTRecordLayout &layout = casted_ctx->getASTRecordLayout(casted_self);
3614 return reinterpret_cast<const struct ZigClangASTRecordLayout *>(&layout);
3615}
3616
3617uint64_t ZigClangASTRecordLayout_getFieldOffset(const struct ZigClangASTRecordLayout *self, unsigned field_no) {
3618 return reinterpret_cast<const clang::ASTRecordLayout *>(self)->getFieldOffset(field_no);
3619}
3620
3621int64_t ZigClangASTRecordLayout_getAlignment(const struct ZigClangASTRecordLayout *self) {
3622 auto casted_self = reinterpret_cast<const clang::ASTRecordLayout *>(self);
3623 return casted_self->getAlignment().getQuantity();
3624}
3625
3626bool ZigClangIntegerLiteral_EvaluateAsInt(const struct ZigClangIntegerLiteral *self, struct ZigClangExprEvalResult *result, const struct ZigClangASTContext *ctx) {
3627 auto casted_self = reinterpret_cast<const clang::IntegerLiteral *>(self);
3628 auto casted_ctx = reinterpret_cast<const clang::ASTContext *>(ctx);
3629 clang::Expr::EvalResult eval_result;
3630 if (!casted_self->EvaluateAsInt(eval_result, *casted_ctx)) {
3631 return false;
3632 }
3633 *result = bitcast(eval_result);
3634 return true;
3635}
3636
3637struct ZigClangSourceLocation ZigClangIntegerLiteral_getBeginLoc(const struct ZigClangIntegerLiteral *self) {
3638 auto casted = reinterpret_cast<const clang::IntegerLiteral *>(self);
3639 return bitcast(casted->getBeginLoc());
3640}
3641
3642bool ZigClangIntegerLiteral_getSignum(const struct ZigClangIntegerLiteral *self, int *result, const struct ZigClangASTContext *ctx) {
3643 auto casted_self = reinterpret_cast<const clang::IntegerLiteral *>(self);
3644 auto casted_ctx = reinterpret_cast<const clang::ASTContext *>(ctx);
3645 clang::Expr::EvalResult eval_result;
3646 if (!casted_self->EvaluateAsInt(eval_result, *casted_ctx)) {
3647 return false;
3648 }
3649 const llvm::APSInt result_int = eval_result.Val.getInt();
3650 const llvm::APSInt zero(result_int.getBitWidth(), result_int.isUnsigned());
3651
3652 if (zero == result_int) {
3653 *result = 0;
3654 } else if (result_int < zero) {
3655 *result = -1;
3656 } else if (result_int > zero) {
3657 *result = 1;
3658 } else {
3659 return false;
3660 }
3661
3662 return true;
3663}
3664
3665const struct ZigClangExpr *ZigClangReturnStmt_getRetValue(const struct ZigClangReturnStmt *self) {
3666 auto casted = reinterpret_cast<const clang::ReturnStmt *>(self);
3667 return reinterpret_cast<const struct ZigClangExpr *>(casted->getRetValue());
3668}
3669
3670enum ZigClangBO ZigClangBinaryOperator_getOpcode(const struct ZigClangBinaryOperator *self) {
3671 auto casted = reinterpret_cast<const clang::BinaryOperator *>(self);
3672 return (ZigClangBO)casted->getOpcode();
3673}
3674
3675struct ZigClangSourceLocation ZigClangBinaryOperator_getBeginLoc(const struct ZigClangBinaryOperator *self) {
3676 auto casted = reinterpret_cast<const clang::BinaryOperator *>(self);
3677 return bitcast(casted->getBeginLoc());
3678}
3679
3680const struct ZigClangExpr *ZigClangBinaryOperator_getLHS(const struct ZigClangBinaryOperator *self) {
3681 auto casted = reinterpret_cast<const clang::BinaryOperator *>(self);
3682 return reinterpret_cast<const struct ZigClangExpr *>(casted->getLHS());
3683}
3684
3685const struct ZigClangExpr *ZigClangBinaryOperator_getRHS(const struct ZigClangBinaryOperator *self) {
3686 auto casted = reinterpret_cast<const clang::BinaryOperator *>(self);
3687 return reinterpret_cast<const struct ZigClangExpr *>(casted->getRHS());
3688}
3689
3690struct ZigClangQualType ZigClangBinaryOperator_getType(const struct ZigClangBinaryOperator *self) {
3691 auto casted = reinterpret_cast<const clang::BinaryOperator *>(self);
3692 return bitcast(casted->getType());
3693}
3694
3695const struct ZigClangExpr *ZigClangConvertVectorExpr_getSrcExpr(const struct ZigClangConvertVectorExpr *self) {
3696 auto casted = reinterpret_cast<const clang::ConvertVectorExpr *>(self);
3697 return reinterpret_cast<const struct ZigClangExpr *>(casted->getSrcExpr());
3698}
3699
3700struct ZigClangQualType ZigClangConvertVectorExpr_getTypeSourceInfo_getType(const struct ZigClangConvertVectorExpr *self) {
3701 auto casted = reinterpret_cast<const clang::ConvertVectorExpr *>(self);
3702 return bitcast(casted->getTypeSourceInfo()->getType());
3703}
3704
3705struct ZigClangQualType ZigClangDecayedType_getDecayedType(const struct ZigClangDecayedType *self) {
3706 auto casted = reinterpret_cast<const clang::DecayedType *>(self);
3707 return bitcast(casted->getDecayedType());
3708}
3709
3710const struct ZigClangCompoundStmt *ZigClangStmtExpr_getSubStmt(const struct ZigClangStmtExpr *self) {
3711 auto casted = reinterpret_cast<const clang::StmtExpr *>(self);
3712 return reinterpret_cast<const ZigClangCompoundStmt *>(casted->getSubStmt());
3713}
3714
3715enum ZigClangCK ZigClangCastExpr_getCastKind(const struct ZigClangCastExpr *self) {
3716 auto casted = reinterpret_cast<const clang::CastExpr *>(self);
3717 return (ZigClangCK)casted->getCastKind();
3718}
3719
3720const struct ZigClangFieldDecl *ZigClangCastExpr_getTargetFieldForToUnionCast(const struct ZigClangCastExpr *self, ZigClangQualType union_type, ZigClangQualType op_type) {
3721 clang::QualType union_qt = bitcast(union_type);
3722 clang::QualType op_qt = bitcast(op_type);
3723 auto casted = reinterpret_cast<const clang::CastExpr *>(self);
3724 return reinterpret_cast<const ZigClangFieldDecl *>(casted->getTargetFieldForToUnionCast(union_qt, op_qt));
3725}
3726
3727struct ZigClangSourceLocation ZigClangCharacterLiteral_getBeginLoc(const struct ZigClangCharacterLiteral *self) {
3728 auto casted = reinterpret_cast<const clang::CharacterLiteral *>(self);
3729 return bitcast(casted->getBeginLoc());
3730}
3731
3732enum ZigClangCharacterLiteralKind ZigClangCharacterLiteral_getKind(const struct ZigClangCharacterLiteral *self) {
3733 auto casted = reinterpret_cast<const clang::CharacterLiteral *>(self);
3734 return (ZigClangCharacterLiteralKind)casted->getKind();
3735}
3736
3737unsigned ZigClangCharacterLiteral_getValue(const struct ZigClangCharacterLiteral *self) {
3738 auto casted = reinterpret_cast<const clang::CharacterLiteral *>(self);
3739 return casted->getValue();
3740}
3741
3742const struct ZigClangExpr *ZigClangChooseExpr_getChosenSubExpr(const struct ZigClangChooseExpr *self) {
3743 auto casted = reinterpret_cast<const clang::ChooseExpr *>(self);
3744 return reinterpret_cast<const ZigClangExpr *>(casted->getChosenSubExpr());
3745}
3746
3747const struct ZigClangExpr *ZigClangAbstractConditionalOperator_getCond(const struct ZigClangAbstractConditionalOperator *self) {
3748 auto casted = reinterpret_cast<const clang::AbstractConditionalOperator *>(self);
3749 return reinterpret_cast<const struct ZigClangExpr *>(casted->getCond());
3750}
3751
3752const struct ZigClangExpr *ZigClangAbstractConditionalOperator_getTrueExpr(const struct ZigClangAbstractConditionalOperator *self) {
3753 auto casted = reinterpret_cast<const clang::AbstractConditionalOperator *>(self);
3754 return reinterpret_cast<const struct ZigClangExpr *>(casted->getTrueExpr());
3755}
3756
3757const struct ZigClangExpr *ZigClangAbstractConditionalOperator_getFalseExpr(const struct ZigClangAbstractConditionalOperator *self) {
3758 auto casted = reinterpret_cast<const clang::AbstractConditionalOperator *>(self);
3759 return reinterpret_cast<const struct ZigClangExpr *>(casted->getFalseExpr());
3760}
3761
3762struct ZigClangQualType ZigClangCompoundAssignOperator_getType(const struct ZigClangCompoundAssignOperator *self) {
3763 auto casted = reinterpret_cast<const clang::CompoundAssignOperator *>(self);
3764 return bitcast(casted->getType());
3765}
3766
3767struct ZigClangQualType ZigClangCompoundAssignOperator_getComputationLHSType(const struct ZigClangCompoundAssignOperator *self) {
3768 auto casted = reinterpret_cast<const clang::CompoundAssignOperator *>(self);
3769 return bitcast(casted->getComputationLHSType());
3770}
3771
3772struct ZigClangQualType ZigClangCompoundAssignOperator_getComputationResultType(const struct ZigClangCompoundAssignOperator *self) {
3773 auto casted = reinterpret_cast<const clang::CompoundAssignOperator *>(self);
3774 return bitcast(casted->getComputationResultType());
3775}
3776
3777struct ZigClangSourceLocation ZigClangCompoundAssignOperator_getBeginLoc(const struct ZigClangCompoundAssignOperator *self) {
3778 auto casted = reinterpret_cast<const clang::CompoundAssignOperator *>(self);
3779 return bitcast(casted->getBeginLoc());
3780}
3781
3782enum ZigClangBO ZigClangCompoundAssignOperator_getOpcode(const struct ZigClangCompoundAssignOperator *self) {
3783 auto casted = reinterpret_cast<const clang::CompoundAssignOperator *>(self);
3784 return (ZigClangBO)casted->getOpcode();
3785}
3786
3787const struct ZigClangExpr *ZigClangCompoundAssignOperator_getLHS(const struct ZigClangCompoundAssignOperator *self) {
3788 auto casted = reinterpret_cast<const clang::CompoundAssignOperator *>(self);
3789 return reinterpret_cast<const struct ZigClangExpr *>(casted->getLHS());
3790}
3791
3792const struct ZigClangExpr *ZigClangCompoundAssignOperator_getRHS(const struct ZigClangCompoundAssignOperator *self) {
3793 auto casted = reinterpret_cast<const clang::CompoundAssignOperator *>(self);
3794 return reinterpret_cast<const struct ZigClangExpr *>(casted->getRHS());
3795}
3796
3797const struct ZigClangExpr *ZigClangCompoundLiteralExpr_getInitializer(const ZigClangCompoundLiteralExpr *self) {
3798 auto casted = reinterpret_cast<const clang::CompoundLiteralExpr *>(self);
3799 return reinterpret_cast<const ZigClangExpr *>(casted->getInitializer());
3800}
3801
3802enum ZigClangUO ZigClangUnaryOperator_getOpcode(const struct ZigClangUnaryOperator *self) {
3803 auto casted = reinterpret_cast<const clang::UnaryOperator *>(self);
3804 return (ZigClangUO)casted->getOpcode();
3805}
3806
3807struct ZigClangQualType ZigClangUnaryOperator_getType(const struct ZigClangUnaryOperator *self) {
3808 auto casted = reinterpret_cast<const clang::UnaryOperator *>(self);
3809 return bitcast(casted->getType());
3810}
3811
3812const struct ZigClangExpr *ZigClangUnaryOperator_getSubExpr(const struct ZigClangUnaryOperator *self) {
3813 auto casted = reinterpret_cast<const clang::UnaryOperator *>(self);
3814 return reinterpret_cast<const struct ZigClangExpr *>(casted->getSubExpr());
3815}
3816
3817struct ZigClangSourceLocation ZigClangUnaryOperator_getBeginLoc(const struct ZigClangUnaryOperator *self) {
3818 auto casted = reinterpret_cast<const clang::UnaryOperator *>(self);
3819 return bitcast(casted->getBeginLoc());
3820}
3821
3822struct ZigClangQualType ZigClangValueDecl_getType(const struct ZigClangValueDecl *self) {
3823 auto casted = reinterpret_cast<const clang::ValueDecl *>(self);
3824 return bitcast(casted->getType());
3825}
3826
3827struct ZigClangQualType ZigClangVectorType_getElementType(const struct ZigClangVectorType *self) {
3828 auto casted = reinterpret_cast<const clang::VectorType *>(self);
3829 return bitcast(casted->getElementType());
3830}
3831
3832unsigned ZigClangVectorType_getNumElements(const struct ZigClangVectorType *self) {
3833 auto casted = reinterpret_cast<const clang::VectorType *>(self);
3834 return casted->getNumElements();
3835}
3836
3837const struct ZigClangExpr *ZigClangWhileStmt_getCond(const struct ZigClangWhileStmt *self) {
3838 auto casted = reinterpret_cast<const clang::WhileStmt *>(self);
3839 return reinterpret_cast<const struct ZigClangExpr *>(casted->getCond());
3840}
3841
3842const struct ZigClangStmt *ZigClangWhileStmt_getBody(const struct ZigClangWhileStmt *self) {
3843 auto casted = reinterpret_cast<const clang::WhileStmt *>(self);
3844 return reinterpret_cast<const struct ZigClangStmt *>(casted->getBody());
3845}
3846
3847const struct ZigClangStmt *ZigClangIfStmt_getThen(const struct ZigClangIfStmt *self) {
3848 auto casted = reinterpret_cast<const clang::IfStmt *>(self);
3849 return reinterpret_cast<const struct ZigClangStmt *>(casted->getThen());
3850}
3851
3852const struct ZigClangStmt *ZigClangIfStmt_getElse(const struct ZigClangIfStmt *self) {
3853 auto casted = reinterpret_cast<const clang::IfStmt *>(self);
3854 return reinterpret_cast<const struct ZigClangStmt *>(casted->getElse());
3855}
3856
3857const struct ZigClangExpr *ZigClangIfStmt_getCond(const struct ZigClangIfStmt *self) {
3858 auto casted = reinterpret_cast<const clang::IfStmt *>(self);
3859 return reinterpret_cast<const struct ZigClangExpr *>(casted->getCond());
3860}
3861
3862const struct ZigClangExpr *ZigClangCallExpr_getCallee(const struct ZigClangCallExpr *self) {
3863 auto casted = reinterpret_cast<const clang::CallExpr *>(self);
3864 return reinterpret_cast<const struct ZigClangExpr *>(casted->getCallee());
3865}
3866
3867unsigned ZigClangCallExpr_getNumArgs(const struct ZigClangCallExpr *self) {
3868 auto casted = reinterpret_cast<const clang::CallExpr *>(self);
3869 return casted->getNumArgs();
3870}
3871
3872const struct ZigClangExpr * const * ZigClangCallExpr_getArgs(const struct ZigClangCallExpr *self) {
3873 auto casted = reinterpret_cast<const clang::CallExpr *>(self);
3874 return reinterpret_cast<const struct ZigClangExpr * const*>(casted->getArgs());
3875}
3876
3877const struct ZigClangExpr * ZigClangMemberExpr_getBase(const struct ZigClangMemberExpr *self) {
3878 auto casted = reinterpret_cast<const clang::MemberExpr *>(self);
3879 return reinterpret_cast<const struct ZigClangExpr *>(casted->getBase());
3880}
3881
3882bool ZigClangMemberExpr_isArrow(const struct ZigClangMemberExpr *self) {
3883 auto casted = reinterpret_cast<const clang::MemberExpr *>(self);
3884 return casted->isArrow();
3885}
3886
3887const struct ZigClangValueDecl * ZigClangMemberExpr_getMemberDecl(const struct ZigClangMemberExpr *self) {
3888 auto casted = reinterpret_cast<const clang::MemberExpr *>(self);
3889 return reinterpret_cast<const struct ZigClangValueDecl *>(casted->getMemberDecl());
3890}
3891
3892const struct ZigClangExpr *ZigClangArraySubscriptExpr_getBase(const struct ZigClangArraySubscriptExpr *self) {
3893 auto casted = reinterpret_cast<const clang::ArraySubscriptExpr *>(self);
3894 return reinterpret_cast<const struct ZigClangExpr *>(casted->getBase());
3895}
3896
3897const struct ZigClangExpr *ZigClangArraySubscriptExpr_getIdx(const struct ZigClangArraySubscriptExpr *self) {
3898 auto casted = reinterpret_cast<const clang::ArraySubscriptExpr *>(self);
3899 return reinterpret_cast<const struct ZigClangExpr *>(casted->getIdx());
3900}
3901
3902struct ZigClangQualType ZigClangUnaryExprOrTypeTraitExpr_getTypeOfArgument(
3903 const struct ZigClangUnaryExprOrTypeTraitExpr *self)
3904{
3905 auto casted = reinterpret_cast<const clang::UnaryExprOrTypeTraitExpr *>(self);
3906 return bitcast(casted->getTypeOfArgument());
3907}
3908
3909struct ZigClangSourceLocation ZigClangUnaryExprOrTypeTraitExpr_getBeginLoc(
3910 const struct ZigClangUnaryExprOrTypeTraitExpr *self)
3911{
3912 auto casted = reinterpret_cast<const clang::UnaryExprOrTypeTraitExpr *>(self);
3913 return bitcast(casted->getBeginLoc());
3914}
3915
3916unsigned ZigClangShuffleVectorExpr_getNumSubExprs(const ZigClangShuffleVectorExpr *self) {
3917 auto casted = reinterpret_cast<const clang::ShuffleVectorExpr *>(self);
3918 return casted->getNumSubExprs();
3919}
3920
3921const struct ZigClangExpr *ZigClangShuffleVectorExpr_getExpr(const struct ZigClangShuffleVectorExpr *self, unsigned idx) {
3922 auto casted = reinterpret_cast<const clang::ShuffleVectorExpr *>(self);
3923 return reinterpret_cast<const struct ZigClangExpr *>(casted->getExpr(idx));
3924}
3925
3926enum ZigClangUnaryExprOrTypeTrait_Kind ZigClangUnaryExprOrTypeTraitExpr_getKind(
3927 const struct ZigClangUnaryExprOrTypeTraitExpr *self)
3928{
3929 auto casted = reinterpret_cast<const clang::UnaryExprOrTypeTraitExpr *>(self);
3930 return (ZigClangUnaryExprOrTypeTrait_Kind)casted->getKind();
3931}
3932
3933const struct ZigClangStmt *ZigClangDoStmt_getBody(const struct ZigClangDoStmt *self) {
3934 auto casted = reinterpret_cast<const clang::DoStmt *>(self);
3935 return reinterpret_cast<const struct ZigClangStmt *>(casted->getBody());
3936}
3937
3938const struct ZigClangExpr *ZigClangDoStmt_getCond(const struct ZigClangDoStmt *self) {
3939 auto casted = reinterpret_cast<const clang::DoStmt *>(self);
3940 return reinterpret_cast<const struct ZigClangExpr *>(casted->getCond());
3941}
3942
3943const struct ZigClangStmt *ZigClangForStmt_getInit(const struct ZigClangForStmt *self) {
3944 auto casted = reinterpret_cast<const clang::ForStmt *>(self);
3945 return reinterpret_cast<const struct ZigClangStmt *>(casted->getInit());
3946}
3947
3948const struct ZigClangExpr *ZigClangForStmt_getCond(const struct ZigClangForStmt *self) {
3949 auto casted = reinterpret_cast<const clang::ForStmt *>(self);
3950 return reinterpret_cast<const struct ZigClangExpr *>(casted->getCond());
3951}
3952
3953const struct ZigClangExpr *ZigClangForStmt_getInc(const struct ZigClangForStmt *self) {
3954 auto casted = reinterpret_cast<const clang::ForStmt *>(self);
3955 return reinterpret_cast<const struct ZigClangExpr *>(casted->getInc());
3956}
3957
3958const struct ZigClangStmt *ZigClangForStmt_getBody(const struct ZigClangForStmt *self) {
3959 auto casted = reinterpret_cast<const clang::ForStmt *>(self);
3960 return reinterpret_cast<const struct ZigClangStmt *>(casted->getBody());
3961}
3962
3963const struct ZigClangDeclStmt *ZigClangSwitchStmt_getConditionVariableDeclStmt(
3964 const struct ZigClangSwitchStmt *self)
3965{
3966 auto casted = reinterpret_cast<const clang::SwitchStmt *>(self);
3967 return reinterpret_cast<const struct ZigClangDeclStmt *>(casted->getConditionVariableDeclStmt());
3968}
3969
3970const struct ZigClangExpr *ZigClangSwitchStmt_getCond(const struct ZigClangSwitchStmt *self) {
3971 auto casted = reinterpret_cast<const clang::SwitchStmt *>(self);
3972 return reinterpret_cast<const struct ZigClangExpr *>(casted->getCond());
3973}
3974
3975const struct ZigClangStmt *ZigClangSwitchStmt_getBody(const struct ZigClangSwitchStmt *self) {
3976 auto casted = reinterpret_cast<const clang::SwitchStmt *>(self);
3977 return reinterpret_cast<const struct ZigClangStmt *>(casted->getBody());
3978}
3979
3980bool ZigClangSwitchStmt_isAllEnumCasesCovered(const struct ZigClangSwitchStmt *self) {
3981 auto casted = reinterpret_cast<const clang::SwitchStmt *>(self);
3982 return casted->isAllEnumCasesCovered();
3983}
3984
3985const struct ZigClangExpr *ZigClangCaseStmt_getLHS(const struct ZigClangCaseStmt *self) {
3986 auto casted = reinterpret_cast<const clang::CaseStmt *>(self);
3987 return reinterpret_cast<const struct ZigClangExpr *>(casted->getLHS());
3988}
3989
3990const struct ZigClangExpr *ZigClangCaseStmt_getRHS(const struct ZigClangCaseStmt *self) {
3991 auto casted = reinterpret_cast<const clang::CaseStmt *>(self);
3992 return reinterpret_cast<const struct ZigClangExpr *>(casted->getRHS());
3993}
3994
3995struct ZigClangSourceLocation ZigClangCaseStmt_getBeginLoc(const struct ZigClangCaseStmt *self) {
3996 auto casted = reinterpret_cast<const clang::CaseStmt *>(self);
3997 return bitcast(casted->getBeginLoc());
3998}
3999
4000const struct ZigClangStmt *ZigClangCaseStmt_getSubStmt(const struct ZigClangCaseStmt *self) {
4001 auto casted = reinterpret_cast<const clang::CaseStmt *>(self);
4002 return reinterpret_cast<const struct ZigClangStmt *>(casted->getSubStmt());
4003}
4004
4005const struct ZigClangStmt *ZigClangDefaultStmt_getSubStmt(const struct ZigClangDefaultStmt *self) {
4006 auto casted = reinterpret_cast<const clang::DefaultStmt *>(self);
4007 return reinterpret_cast<const struct ZigClangStmt *>(casted->getSubStmt());
4008}
4009
4010const struct ZigClangExpr *ZigClangParenExpr_getSubExpr(const struct ZigClangParenExpr *self) {
4011 auto casted = reinterpret_cast<const clang::ParenExpr *>(self);
4012 return reinterpret_cast<const struct ZigClangExpr *>(casted->getSubExpr());
4013}
4014
4015enum ZigClangPreprocessedEntity_EntityKind ZigClangPreprocessedEntity_getKind(
4016 const struct ZigClangPreprocessedEntity *self)
4017{
4018 auto casted = reinterpret_cast<const clang::PreprocessedEntity *>(self);
4019 return (ZigClangPreprocessedEntity_EntityKind)casted->getKind();
4020}
4021
4022const char *ZigClangMacroDefinitionRecord_getName_getNameStart(const struct ZigClangMacroDefinitionRecord *self) {
4023 auto casted = reinterpret_cast<const clang::MacroDefinitionRecord *>(self);
4024 return casted->getName()->getNameStart();
4025}
4026
4027struct ZigClangSourceLocation ZigClangMacroDefinitionRecord_getSourceRange_getBegin(const struct ZigClangMacroDefinitionRecord *self) {
4028 auto casted = reinterpret_cast<const clang::MacroDefinitionRecord *>(self);
4029 return bitcast(casted->getSourceRange().getBegin());
4030}
4031
4032struct ZigClangSourceLocation ZigClangMacroDefinitionRecord_getSourceRange_getEnd(const struct ZigClangMacroDefinitionRecord *self) {
4033 auto casted = reinterpret_cast<const clang::MacroDefinitionRecord *>(self);
4034 return bitcast(casted->getSourceRange().getEnd());
4035}
4036
4037struct ZigClangSourceLocation ZigClangLexer_getLocForEndOfToken(ZigClangSourceLocation loc, const ZigClangSourceManager *sm, const ZigClangASTUnit *unit) {
4038 const clang::SourceManager *casted_sm = reinterpret_cast<const clang::SourceManager *>(sm);
4039 const clang::ASTUnit *casted_unit = reinterpret_cast<const clang::ASTUnit *>(unit);
4040 clang::SourceLocation endloc = clang::Lexer::getLocForEndOfToken(bitcast(loc), 0, *casted_sm, casted_unit->getLangOpts());
4041 return bitcast(endloc);
4042}
4043
4044ZigClangRecordDecl_field_iterator ZigClangRecordDecl_field_begin(const struct ZigClangRecordDecl *self) {
4045 auto casted = reinterpret_cast<const clang::RecordDecl *>(self);
4046 return bitcast(casted->field_begin());
4047}
4048
4049ZigClangRecordDecl_field_iterator ZigClangRecordDecl_field_end(const struct ZigClangRecordDecl *self) {
4050 auto casted = reinterpret_cast<const clang::RecordDecl *>(self);
4051 return bitcast(casted->field_end());
4052}
4053
4054bool ZigClangFieldDecl_isBitField(const struct ZigClangFieldDecl *self) {
4055 auto casted = reinterpret_cast<const clang::FieldDecl *>(self);
4056 return casted->isBitField();
4057}
4058
4059bool ZigClangFieldDecl_isAnonymousStructOrUnion(const ZigClangFieldDecl *field_decl) {
4060 return reinterpret_cast<const clang::FieldDecl*>(field_decl)->isAnonymousStructOrUnion();
4061}
4062
4063ZigClangSourceLocation ZigClangFieldDecl_getLocation(const struct ZigClangFieldDecl *self) {
4064 auto casted = reinterpret_cast<const clang::FieldDecl *>(self);
4065 return bitcast(casted->getLocation());
4066}
4067
4068const struct ZigClangRecordDecl *ZigClangFieldDecl_getParent(const struct ZigClangFieldDecl *self) {
4069 auto casted = reinterpret_cast<const clang::FieldDecl *>(self);
4070 return reinterpret_cast<const ZigClangRecordDecl *>(casted->getParent());
4071}
4072
4073unsigned ZigClangFieldDecl_getFieldIndex(const struct ZigClangFieldDecl *self) {
4074 auto casted = reinterpret_cast<const clang::FieldDecl *>(self);
4075 return casted->getFieldIndex();
4076}
4077
4078ZigClangQualType ZigClangFieldDecl_getType(const struct ZigClangFieldDecl *self) {
4079 auto casted = reinterpret_cast<const clang::FieldDecl *>(self);
4080 return bitcast(casted->getType());
4081}
4082
4083ZigClangRecordDecl_field_iterator ZigClangRecordDecl_field_iterator_next(
4084 struct ZigClangRecordDecl_field_iterator self)
4085{
4086 clang::RecordDecl::field_iterator casted = bitcast(self);
4087 ++casted;
4088 return bitcast(casted);
4089}
4090
4091const struct ZigClangFieldDecl * ZigClangRecordDecl_field_iterator_deref(
4092 struct ZigClangRecordDecl_field_iterator self)
4093{
4094 clang::RecordDecl::field_iterator casted = bitcast(self);
4095 const clang::FieldDecl *result = *casted;
4096 return reinterpret_cast<const ZigClangFieldDecl *>(result);
4097}
4098
4099bool ZigClangRecordDecl_field_iterator_neq(
4100 struct ZigClangRecordDecl_field_iterator a,
4101 struct ZigClangRecordDecl_field_iterator b)
4102{
4103 clang::RecordDecl::field_iterator casted_a = bitcast(a);
4104 clang::RecordDecl::field_iterator casted_b = bitcast(b);
4105 return casted_a != casted_b;
4106}
4107
4108ZigClangEnumDecl_enumerator_iterator ZigClangEnumDecl_enumerator_begin(const struct ZigClangEnumDecl *self) {
4109 auto casted = reinterpret_cast<const clang::EnumDecl *>(self);
4110 return bitcast(casted->enumerator_begin());
4111}
4112
4113ZigClangEnumDecl_enumerator_iterator ZigClangEnumDecl_enumerator_end(const struct ZigClangEnumDecl *self) {
4114 auto casted = reinterpret_cast<const clang::EnumDecl *>(self);
4115 return bitcast(casted->enumerator_end());
4116}
4117
4118ZigClangEnumDecl_enumerator_iterator ZigClangEnumDecl_enumerator_iterator_next(
4119 struct ZigClangEnumDecl_enumerator_iterator self)
4120{
4121 clang::EnumDecl::enumerator_iterator casted = bitcast(self);
4122 ++casted;
4123 return bitcast(casted);
4124}
4125
4126const struct ZigClangEnumConstantDecl * ZigClangEnumDecl_enumerator_iterator_deref(
4127 struct ZigClangEnumDecl_enumerator_iterator self)
4128{
4129 clang::EnumDecl::enumerator_iterator casted = bitcast(self);
4130 const clang::EnumConstantDecl *result = *casted;
4131 return reinterpret_cast<const ZigClangEnumConstantDecl *>(result);
4132}
4133
4134bool ZigClangEnumDecl_enumerator_iterator_neq(
4135 struct ZigClangEnumDecl_enumerator_iterator a,
4136 struct ZigClangEnumDecl_enumerator_iterator b)
4137{
4138 clang::EnumDecl::enumerator_iterator casted_a = bitcast(a);
4139 clang::EnumDecl::enumerator_iterator casted_b = bitcast(b);
4140 return casted_a != casted_b;
4141}
4142
4143const struct ZigClangAPSInt *ZigClangEnumConstantDecl_getInitVal(const struct ZigClangEnumConstantDecl *self) {
4144 auto casted = reinterpret_cast<const clang::EnumConstantDecl *>(self);
4145 llvm::APSInt *result = new llvm::APSInt();
4146 *result = casted->getInitVal();
4147 return reinterpret_cast<const ZigClangAPSInt *>(result);
4148}
4149
4150// Get a pointer to a static variable in libc++ from LLVM and make sure that
4151// it matches our own.
4152//
4153// This check is needed because if static/dynamic linking is mixed incorrectly,
4154// it's possible for Clang and LLVM to end up with duplicate "copies" of libc++.
4155//
4156// This is not benign: Static variables are not shared, so equality comparisons
4157// that depend on pointers to static variables will fail. One such failure is
4158// std::generic_category(), which causes POSIX error codes to compare as unequal
4159// when passed between LLVM and Clang.
4160//
4161// See also: https://github.com/ziglang/zig/issues/11168
4162bool ZigClangIsLLVMUsingSeparateLibcxx() {
4163
4164 // Temporarily create an InMemoryFileSystem, so that we can perform a file
4165 // lookup that is guaranteed to fail.
4166 auto FS = new llvm::vfs::InMemoryFileSystem(true);
4167 auto StatusOrErr = FS->status("foo.txt");
4168 delete FS;
4169
4170 // This should return a POSIX (generic_category) error code, but if LLVM has
4171 // its own copy of libc++ this will actually be a separate category instance.
4172 assert(!StatusOrErr);
4173 auto EC = StatusOrErr.getError();
4174 return EC.category() != std::generic_category();
4175}
4176
4177static_assert((llvm::APFloatBase::Semantics)ZigClangAPFloatBase_Semantics_IEEEhalf == llvm::APFloatBase::S_IEEEhalf, "");
4178static_assert((llvm::APFloatBase::Semantics)ZigClangAPFloatBase_Semantics_BFloat == llvm::APFloatBase::S_BFloat);
4179static_assert((llvm::APFloatBase::Semantics)ZigClangAPFloatBase_Semantics_IEEEsingle == llvm::APFloatBase::S_IEEEsingle);
4180static_assert((llvm::APFloatBase::Semantics)ZigClangAPFloatBase_Semantics_IEEEdouble == llvm::APFloatBase::S_IEEEdouble);
4181static_assert((llvm::APFloatBase::Semantics)ZigClangAPFloatBase_Semantics_IEEEquad == llvm::APFloatBase::S_IEEEquad);
4182static_assert((llvm::APFloatBase::Semantics)ZigClangAPFloatBase_Semantics_PPCDoubleDouble == llvm::APFloatBase::S_PPCDoubleDouble);
4183static_assert((llvm::APFloatBase::Semantics)ZigClangAPFloatBase_Semantics_PPCDoubleDoubleLegacy == llvm::APFloatBase::S_PPCDoubleDoubleLegacy);
4184static_assert((llvm::APFloatBase::Semantics)ZigClangAPFloatBase_Semantics_Float8E5M2 == llvm::APFloatBase::S_Float8E5M2);
4185static_assert((llvm::APFloatBase::Semantics)ZigClangAPFloatBase_Semantics_Float8E5M2FNUZ == llvm::APFloatBase::S_Float8E5M2FNUZ);
4186static_assert((llvm::APFloatBase::Semantics)ZigClangAPFloatBase_Semantics_Float8E4M3 == llvm::APFloatBase::S_Float8E4M3);
4187static_assert((llvm::APFloatBase::Semantics)ZigClangAPFloatBase_Semantics_Float8E4M3FN == llvm::APFloatBase::S_Float8E4M3FN);
4188static_assert((llvm::APFloatBase::Semantics)ZigClangAPFloatBase_Semantics_Float8E4M3FNUZ == llvm::APFloatBase::S_Float8E4M3FNUZ);
4189static_assert((llvm::APFloatBase::Semantics)ZigClangAPFloatBase_Semantics_Float8E4M3B11FNUZ == llvm::APFloatBase::S_Float8E4M3B11FNUZ);
4190static_assert((llvm::APFloatBase::Semantics)ZigClangAPFloatBase_Semantics_Float8E3M4 == llvm::APFloatBase::S_Float8E3M4);
4191static_assert((llvm::APFloatBase::Semantics)ZigClangAPFloatBase_Semantics_FloatTF32 == llvm::APFloatBase::S_FloatTF32);
4192static_assert((llvm::APFloatBase::Semantics)ZigClangAPFloatBase_Semantics_Float8E8M0FNU == llvm::APFloatBase::S_Float8E8M0FNU);
4193static_assert((llvm::APFloatBase::Semantics)ZigClangAPFloatBase_Semantics_Float6E3M2FN == llvm::APFloatBase::S_Float6E3M2FN);
4194static_assert((llvm::APFloatBase::Semantics)ZigClangAPFloatBase_Semantics_Float6E2M3FN == llvm::APFloatBase::S_Float6E2M3FN);
4195static_assert((llvm::APFloatBase::Semantics)ZigClangAPFloatBase_Semantics_Float4E2M1FN == llvm::APFloatBase::S_Float4E2M1FN);
4196static_assert((llvm::APFloatBase::Semantics)ZigClangAPFloatBase_Semantics_x87DoubleExtended == llvm::APFloatBase::S_x87DoubleExtended);
4197static_assert((llvm::APFloatBase::Semantics)ZigClangAPFloatBase_Semantics_MaxSemantics == llvm::APFloatBase::S_MaxSemantics);
src/zig_clang.h deleted-1778
......@@ -1,1778 +0,0 @@
1/*
2 * Copyright (c) 2019 Andrew Kelley
3 *
4 * This file is part of zig, which is MIT licensed.
5 * See http://opensource.org/licenses/MIT
6 */
7
8#ifndef ZIG_ZIG_CLANG_H
9#define ZIG_ZIG_CLANG_H
10
11#include <inttypes.h>
12#include <stdalign.h>
13#include <stdbool.h>
14#include <stddef.h>
15
16#ifdef __cplusplus
17#define ZIG_EXTERN_C extern "C"
18#else
19#define ZIG_EXTERN_C
20#endif
21
22// ATTENTION: If you modify this file, be sure to update the corresponding
23// extern function declarations in the self-hosted compiler file
24// src/clang.zig.
25
26// ABI warning
27struct Stage2ErrorMsg {
28 const char *filename_ptr; // can be null
29 size_t filename_len;
30 const char *msg_ptr;
31 size_t msg_len;
32 const char *source; // valid until the ASTUnit is freed. can be null
33 unsigned line; // 0 based
34 unsigned column; // 0 based
35 unsigned offset; // byte offset into source
36};
37
38struct ZigClangSourceLocation {
39 unsigned ID;
40};
41
42struct ZigClangQualType {
43 void *ptr;
44};
45
46struct alignas(uint64_t) ZigClangAPValueLValueBase {
47 void* Ptr;
48 union {
49 struct {
50 unsigned CallIndex;
51 unsigned Version;
52 } Local;
53 void* TypeInfoType;
54 void* DynamicAllocType;
55 };
56};
57
58enum ZigClangAPValueKind {
59 ZigClangAPValueNone,
60 ZigClangAPValueIndeterminate,
61 ZigClangAPValueInt,
62 ZigClangAPValueFloat,
63 ZigClangAPValueFixedPoint,
64 ZigClangAPValueComplexInt,
65 ZigClangAPValueComplexFloat,
66 ZigClangAPValueLValue,
67 ZigClangAPValueVector,
68 ZigClangAPValueArray,
69 ZigClangAPValueStruct,
70 ZigClangAPValueUnion,
71 ZigClangAPValueMemberPointer,
72 ZigClangAPValueAddrLabelDiff,
73};
74
75#if defined(__i386__) && !defined(_WIN32)
76# define ZIG_CLANG_APVALUE_SIZE 44
77# define ZIG_CLANG_APVALUE_ALIGN 4
78#else
79# define ZIG_CLANG_APVALUE_SIZE 52
80# define ZIG_CLANG_APVALUE_ALIGN 8
81#endif
82
83struct alignas(ZIG_CLANG_APVALUE_ALIGN) ZigClangAPValue {
84 enum ZigClangAPValueKind Kind;
85 // experimentally-derived size of clang::APValue::DataType
86 char Data[ZIG_CLANG_APVALUE_SIZE];
87};
88
89struct ZigClangExprEvalResult {
90 bool HasSideEffects;
91 bool HasUndefinedBehavior;
92 void *SmallVectorImpl;
93 ZigClangAPValue Val;
94};
95
96struct ZigClangAbstractConditionalOperator;
97struct ZigClangAPFloat;
98struct ZigClangAPInt;
99struct ZigClangAPSInt;
100struct ZigClangASTContext;
101struct ZigClangASTRecordLayout;
102struct ZigClangASTUnit;
103struct ZigClangArraySubscriptExpr;
104struct ZigClangArrayType;
105struct ZigClangAttributedType;
106struct ZigClangBinaryOperator;
107struct ZigClangBinaryConditionalOperator;
108struct ZigClangBreakStmt;
109struct ZigClangBuiltinType;
110struct ZigClangCStyleCastExpr;
111struct ZigClangCallExpr;
112struct ZigClangCaseStmt;
113struct ZigClangCastExpr;
114struct ZigClangCharacterLiteral;
115struct ZigClangChooseExpr;
116struct ZigClangCompoundAssignOperator;
117struct ZigClangCompoundStmt;
118struct ZigClangConditionalOperator;
119struct ZigClangConstantArrayType;
120struct ZigClangConstantExpr;
121struct ZigClangContinueStmt;
122struct ZigClangDecayedType;
123struct ZigClangDecl;
124struct ZigClangDeclRefExpr;
125struct ZigClangDeclStmt;
126struct ZigClangDefaultStmt;
127struct ZigClangDiagnosticOptions;
128struct ZigClangDiagnosticsEngine;
129struct ZigClangDoStmt;
130struct ZigClangElaboratedType;
131struct ZigClangEnumConstantDecl;
132struct ZigClangEnumDecl;
133struct ZigClangEnumType;
134struct ZigClangExpr;
135struct ZigClangFieldDecl;
136struct ZigClangFileID;
137struct ZigClangFileScopeAsmDecl;
138struct ZigClangFloatingLiteral;
139struct ZigClangForStmt;
140struct ZigClangFullSourceLoc;
141struct ZigClangFunctionDecl;
142struct ZigClangFunctionProtoType;
143struct ZigClangFunctionType;
144struct ZigClangIfStmt;
145struct ZigClangImplicitCastExpr;
146struct ZigClangIncompleteArrayType;
147struct ZigClangIntegerLiteral;
148struct ZigClangMacroDefinitionRecord;
149struct ZigClangMacroQualifiedType;
150struct ZigClangMemberExpr;
151struct ZigClangNamedDecl;
152struct ZigClangNone;
153struct ZigClangOpaqueValueExpr;
154struct ZigClangPCHContainerOperations;
155struct ZigClangParenExpr;
156struct ZigClangParenType;
157struct ZigClangParmVarDecl;
158struct ZigClangPointerType;
159struct ZigClangPredefinedExpr;
160struct ZigClangPreprocessedEntity;
161struct ZigClangPreprocessingRecord;
162struct ZigClangRecordDecl;
163struct ZigClangRecordType;
164struct ZigClangReturnStmt;
165struct ZigClangSkipFunctionBodiesScope;
166struct ZigClangSourceManager;
167struct ZigClangSourceRange;
168struct ZigClangStmt;
169struct ZigClangStmtExpr;
170struct ZigClangStringLiteral;
171struct ZigClangStringRef;
172struct ZigClangSwitchStmt;
173struct ZigClangTagDecl;
174struct ZigClangType;
175struct ZigClangTypedefNameDecl;
176struct ZigClangTypedefType;
177struct ZigClangUnaryExprOrTypeTraitExpr;
178struct ZigClangUnaryOperator;
179struct ZigClangValueDecl;
180struct ZigClangVarDecl;
181struct ZigClangWhileStmt;
182struct ZigClangInitListExpr;
183
184typedef struct ZigClangStmt *const * ZigClangCompoundStmt_const_body_iterator;
185typedef struct ZigClangDecl *const * ZigClangDeclStmt_const_decl_iterator;
186
187struct ZigClangRecordDecl_field_iterator {
188 void *opaque;
189};
190
191struct ZigClangEnumDecl_enumerator_iterator {
192 void *opaque;
193};
194
195struct ZigClangPreprocessingRecord_iterator {
196 int I;
197 struct ZigClangPreprocessingRecord *Self;
198};
199
200enum ZigClangBO {
201 ZigClangBO_PtrMemD,
202 ZigClangBO_PtrMemI,
203 ZigClangBO_Mul,
204 ZigClangBO_Div,
205 ZigClangBO_Rem,
206 ZigClangBO_Add,
207 ZigClangBO_Sub,
208 ZigClangBO_Shl,
209 ZigClangBO_Shr,
210 ZigClangBO_Cmp,
211 ZigClangBO_LT,
212 ZigClangBO_GT,
213 ZigClangBO_LE,
214 ZigClangBO_GE,
215 ZigClangBO_EQ,
216 ZigClangBO_NE,
217 ZigClangBO_And,
218 ZigClangBO_Xor,
219 ZigClangBO_Or,
220 ZigClangBO_LAnd,
221 ZigClangBO_LOr,
222 ZigClangBO_Assign,
223 ZigClangBO_MulAssign,
224 ZigClangBO_DivAssign,
225 ZigClangBO_RemAssign,
226 ZigClangBO_AddAssign,
227 ZigClangBO_SubAssign,
228 ZigClangBO_ShlAssign,
229 ZigClangBO_ShrAssign,
230 ZigClangBO_AndAssign,
231 ZigClangBO_XorAssign,
232 ZigClangBO_OrAssign,
233 ZigClangBO_Comma,
234};
235
236enum ZigClangUO {
237 ZigClangUO_PostInc,
238 ZigClangUO_PostDec,
239 ZigClangUO_PreInc,
240 ZigClangUO_PreDec,
241 ZigClangUO_AddrOf,
242 ZigClangUO_Deref,
243 ZigClangUO_Plus,
244 ZigClangUO_Minus,
245 ZigClangUO_Not,
246 ZigClangUO_LNot,
247 ZigClangUO_Real,
248 ZigClangUO_Imag,
249 ZigClangUO_Extension,
250 ZigClangUO_Coawait,
251};
252
253enum ZigClangTypeClass {
254 ZigClangType_Adjusted,
255 ZigClangType_Decayed,
256 ZigClangType_ConstantArray,
257 ZigClangType_ArrayParameter,
258 ZigClangType_DependentSizedArray,
259 ZigClangType_IncompleteArray,
260 ZigClangType_VariableArray,
261 ZigClangType_Atomic,
262 ZigClangType_Attributed,
263 ZigClangType_BTFTagAttributed,
264 ZigClangType_BitInt,
265 ZigClangType_BlockPointer,
266 ZigClangType_CountAttributed,
267 ZigClangType_Builtin,
268 ZigClangType_Complex,
269 ZigClangType_Decltype,
270 ZigClangType_Auto,
271 ZigClangType_DeducedTemplateSpecialization,
272 ZigClangType_DependentAddressSpace,
273 ZigClangType_DependentBitInt,
274 ZigClangType_DependentName,
275 ZigClangType_DependentSizedExtVector,
276 ZigClangType_DependentTemplateSpecialization,
277 ZigClangType_DependentVector,
278 ZigClangType_Elaborated,
279 ZigClangType_FunctionNoProto,
280 ZigClangType_FunctionProto,
281 ZigClangType_HLSLAttributedResource,
282 ZigClangType_HLSLInlineSpirv,
283 ZigClangType_InjectedClassName,
284 ZigClangType_MacroQualified,
285 ZigClangType_ConstantMatrix,
286 ZigClangType_DependentSizedMatrix,
287 ZigClangType_MemberPointer,
288 ZigClangType_ObjCObjectPointer,
289 ZigClangType_ObjCObject,
290 ZigClangType_ObjCInterface,
291 ZigClangType_ObjCTypeParam,
292 ZigClangType_PackExpansion,
293 ZigClangType_PackIndexing,
294 ZigClangType_Paren,
295 ZigClangType_Pipe,
296 ZigClangType_Pointer,
297 ZigClangType_LValueReference,
298 ZigClangType_RValueReference,
299 ZigClangType_SubstTemplateTypeParmPack,
300 ZigClangType_SubstTemplateTypeParm,
301 ZigClangType_Enum,
302 ZigClangType_Record,
303 ZigClangType_TemplateSpecialization,
304 ZigClangType_TemplateTypeParm,
305 ZigClangType_TypeOfExpr,
306 ZigClangType_TypeOf,
307 ZigClangType_Typedef,
308 ZigClangType_UnaryTransform,
309 ZigClangType_UnresolvedUsing,
310 ZigClangType_Using,
311 ZigClangType_Vector,
312 ZigClangType_ExtVector,
313};
314
315enum ZigClangStmtClass {
316 ZigClangStmt_NoStmtClass,
317 ZigClangStmt_WhileStmtClass,
318 ZigClangStmt_LabelStmtClass,
319 ZigClangStmt_VAArgExprClass,
320 ZigClangStmt_UnaryOperatorClass,
321 ZigClangStmt_UnaryExprOrTypeTraitExprClass,
322 ZigClangStmt_TypeTraitExprClass,
323 ZigClangStmt_SubstNonTypeTemplateParmPackExprClass,
324 ZigClangStmt_SubstNonTypeTemplateParmExprClass,
325 ZigClangStmt_StringLiteralClass,
326 ZigClangStmt_StmtExprClass,
327 ZigClangStmt_SourceLocExprClass,
328 ZigClangStmt_SizeOfPackExprClass,
329 ZigClangStmt_ShuffleVectorExprClass,
330 ZigClangStmt_SYCLUniqueStableNameExprClass,
331 ZigClangStmt_RequiresExprClass,
332 ZigClangStmt_RecoveryExprClass,
333 ZigClangStmt_PseudoObjectExprClass,
334 ZigClangStmt_PredefinedExprClass,
335 ZigClangStmt_ParenListExprClass,
336 ZigClangStmt_ParenExprClass,
337 ZigClangStmt_PackIndexingExprClass,
338 ZigClangStmt_PackExpansionExprClass,
339 ZigClangStmt_UnresolvedMemberExprClass,
340 ZigClangStmt_UnresolvedLookupExprClass,
341 ZigClangStmt_OpenACCAsteriskSizeExprClass,
342 ZigClangStmt_OpaqueValueExprClass,
343 ZigClangStmt_OffsetOfExprClass,
344 ZigClangStmt_ObjCSubscriptRefExprClass,
345 ZigClangStmt_ObjCStringLiteralClass,
346 ZigClangStmt_ObjCSelectorExprClass,
347 ZigClangStmt_ObjCProtocolExprClass,
348 ZigClangStmt_ObjCPropertyRefExprClass,
349 ZigClangStmt_ObjCMessageExprClass,
350 ZigClangStmt_ObjCIvarRefExprClass,
351 ZigClangStmt_ObjCIsaExprClass,
352 ZigClangStmt_ObjCIndirectCopyRestoreExprClass,
353 ZigClangStmt_ObjCEncodeExprClass,
354 ZigClangStmt_ObjCDictionaryLiteralClass,
355 ZigClangStmt_ObjCBoxedExprClass,
356 ZigClangStmt_ObjCBoolLiteralExprClass,
357 ZigClangStmt_ObjCAvailabilityCheckExprClass,
358 ZigClangStmt_ObjCArrayLiteralClass,
359 ZigClangStmt_OMPIteratorExprClass,
360 ZigClangStmt_OMPArrayShapingExprClass,
361 ZigClangStmt_NoInitExprClass,
362 ZigClangStmt_MemberExprClass,
363 ZigClangStmt_MatrixSubscriptExprClass,
364 ZigClangStmt_MaterializeTemporaryExprClass,
365 ZigClangStmt_MSPropertySubscriptExprClass,
366 ZigClangStmt_MSPropertyRefExprClass,
367 ZigClangStmt_LambdaExprClass,
368 ZigClangStmt_IntegerLiteralClass,
369 ZigClangStmt_InitListExprClass,
370 ZigClangStmt_ImplicitValueInitExprClass,
371 ZigClangStmt_ImaginaryLiteralClass,
372 ZigClangStmt_HLSLOutArgExprClass,
373 ZigClangStmt_GenericSelectionExprClass,
374 ZigClangStmt_GNUNullExprClass,
375 ZigClangStmt_FunctionParmPackExprClass,
376 ZigClangStmt_ExprWithCleanupsClass,
377 ZigClangStmt_ConstantExprClass,
378 ZigClangStmt_FloatingLiteralClass,
379 ZigClangStmt_FixedPointLiteralClass,
380 ZigClangStmt_ExtVectorElementExprClass,
381 ZigClangStmt_ExpressionTraitExprClass,
382 ZigClangStmt_EmbedExprClass,
383 ZigClangStmt_DesignatedInitUpdateExprClass,
384 ZigClangStmt_DesignatedInitExprClass,
385 ZigClangStmt_DependentScopeDeclRefExprClass,
386 ZigClangStmt_DependentCoawaitExprClass,
387 ZigClangStmt_DeclRefExprClass,
388 ZigClangStmt_CoyieldExprClass,
389 ZigClangStmt_CoawaitExprClass,
390 ZigClangStmt_ConvertVectorExprClass,
391 ZigClangStmt_ConceptSpecializationExprClass,
392 ZigClangStmt_CompoundLiteralExprClass,
393 ZigClangStmt_ChooseExprClass,
394 ZigClangStmt_CharacterLiteralClass,
395 ZigClangStmt_ImplicitCastExprClass,
396 ZigClangStmt_ObjCBridgedCastExprClass,
397 ZigClangStmt_CXXStaticCastExprClass,
398 ZigClangStmt_CXXReinterpretCastExprClass,
399 ZigClangStmt_CXXDynamicCastExprClass,
400 ZigClangStmt_CXXConstCastExprClass,
401 ZigClangStmt_CXXAddrspaceCastExprClass,
402 ZigClangStmt_CXXFunctionalCastExprClass,
403 ZigClangStmt_CStyleCastExprClass,
404 ZigClangStmt_BuiltinBitCastExprClass,
405 ZigClangStmt_CallExprClass,
406 ZigClangStmt_UserDefinedLiteralClass,
407 ZigClangStmt_CXXOperatorCallExprClass,
408 ZigClangStmt_CXXMemberCallExprClass,
409 ZigClangStmt_CUDAKernelCallExprClass,
410 ZigClangStmt_CXXUuidofExprClass,
411 ZigClangStmt_CXXUnresolvedConstructExprClass,
412 ZigClangStmt_CXXTypeidExprClass,
413 ZigClangStmt_CXXThrowExprClass,
414 ZigClangStmt_CXXThisExprClass,
415 ZigClangStmt_CXXStdInitializerListExprClass,
416 ZigClangStmt_CXXScalarValueInitExprClass,
417 ZigClangStmt_CXXRewrittenBinaryOperatorClass,
418 ZigClangStmt_CXXPseudoDestructorExprClass,
419 ZigClangStmt_CXXParenListInitExprClass,
420 ZigClangStmt_CXXNullPtrLiteralExprClass,
421 ZigClangStmt_CXXNoexceptExprClass,
422 ZigClangStmt_CXXNewExprClass,
423 ZigClangStmt_CXXInheritedCtorInitExprClass,
424 ZigClangStmt_CXXFoldExprClass,
425 ZigClangStmt_CXXDependentScopeMemberExprClass,
426 ZigClangStmt_CXXDeleteExprClass,
427 ZigClangStmt_CXXDefaultInitExprClass,
428 ZigClangStmt_CXXDefaultArgExprClass,
429 ZigClangStmt_CXXConstructExprClass,
430 ZigClangStmt_CXXTemporaryObjectExprClass,
431 ZigClangStmt_CXXBoolLiteralExprClass,
432 ZigClangStmt_CXXBindTemporaryExprClass,
433 ZigClangStmt_BlockExprClass,
434 ZigClangStmt_BinaryOperatorClass,
435 ZigClangStmt_CompoundAssignOperatorClass,
436 ZigClangStmt_AtomicExprClass,
437 ZigClangStmt_AsTypeExprClass,
438 ZigClangStmt_ArrayTypeTraitExprClass,
439 ZigClangStmt_ArraySubscriptExprClass,
440 ZigClangStmt_ArraySectionExprClass,
441 ZigClangStmt_ArrayInitLoopExprClass,
442 ZigClangStmt_ArrayInitIndexExprClass,
443 ZigClangStmt_AddrLabelExprClass,
444 ZigClangStmt_ConditionalOperatorClass,
445 ZigClangStmt_BinaryConditionalOperatorClass,
446 ZigClangStmt_AttributedStmtClass,
447 ZigClangStmt_SwitchStmtClass,
448 ZigClangStmt_DefaultStmtClass,
449 ZigClangStmt_CaseStmtClass,
450 ZigClangStmt_SYCLKernelCallStmtClass,
451 ZigClangStmt_SEHTryStmtClass,
452 ZigClangStmt_SEHLeaveStmtClass,
453 ZigClangStmt_SEHFinallyStmtClass,
454 ZigClangStmt_SEHExceptStmtClass,
455 ZigClangStmt_ReturnStmtClass,
456 ZigClangStmt_OpenACCWaitConstructClass,
457 ZigClangStmt_OpenACCUpdateConstructClass,
458 ZigClangStmt_OpenACCShutdownConstructClass,
459 ZigClangStmt_OpenACCSetConstructClass,
460 ZigClangStmt_OpenACCInitConstructClass,
461 ZigClangStmt_OpenACCExitDataConstructClass,
462 ZigClangStmt_OpenACCEnterDataConstructClass,
463 ZigClangStmt_OpenACCCacheConstructClass,
464 ZigClangStmt_OpenACCLoopConstructClass,
465 ZigClangStmt_OpenACCHostDataConstructClass,
466 ZigClangStmt_OpenACCDataConstructClass,
467 ZigClangStmt_OpenACCComputeConstructClass,
468 ZigClangStmt_OpenACCCombinedConstructClass,
469 ZigClangStmt_OpenACCAtomicConstructClass,
470 ZigClangStmt_ObjCForCollectionStmtClass,
471 ZigClangStmt_ObjCAutoreleasePoolStmtClass,
472 ZigClangStmt_ObjCAtTryStmtClass,
473 ZigClangStmt_ObjCAtThrowStmtClass,
474 ZigClangStmt_ObjCAtSynchronizedStmtClass,
475 ZigClangStmt_ObjCAtFinallyStmtClass,
476 ZigClangStmt_ObjCAtCatchStmtClass,
477 ZigClangStmt_OMPTeamsDirectiveClass,
478 ZigClangStmt_OMPTaskyieldDirectiveClass,
479 ZigClangStmt_OMPTaskwaitDirectiveClass,
480 ZigClangStmt_OMPTaskgroupDirectiveClass,
481 ZigClangStmt_OMPTaskDirectiveClass,
482 ZigClangStmt_OMPTargetUpdateDirectiveClass,
483 ZigClangStmt_OMPTargetTeamsDirectiveClass,
484 ZigClangStmt_OMPTargetParallelForDirectiveClass,
485 ZigClangStmt_OMPTargetParallelDirectiveClass,
486 ZigClangStmt_OMPTargetExitDataDirectiveClass,
487 ZigClangStmt_OMPTargetEnterDataDirectiveClass,
488 ZigClangStmt_OMPTargetDirectiveClass,
489 ZigClangStmt_OMPTargetDataDirectiveClass,
490 ZigClangStmt_OMPSingleDirectiveClass,
491 ZigClangStmt_OMPSectionsDirectiveClass,
492 ZigClangStmt_OMPSectionDirectiveClass,
493 ZigClangStmt_OMPScopeDirectiveClass,
494 ZigClangStmt_OMPScanDirectiveClass,
495 ZigClangStmt_OMPParallelSectionsDirectiveClass,
496 ZigClangStmt_OMPParallelMasterDirectiveClass,
497 ZigClangStmt_OMPParallelMaskedDirectiveClass,
498 ZigClangStmt_OMPParallelDirectiveClass,
499 ZigClangStmt_OMPOrderedDirectiveClass,
500 ZigClangStmt_OMPMetaDirectiveClass,
501 ZigClangStmt_OMPMasterDirectiveClass,
502 ZigClangStmt_OMPMaskedDirectiveClass,
503 ZigClangStmt_OMPUnrollDirectiveClass,
504 ZigClangStmt_OMPTileDirectiveClass,
505 ZigClangStmt_OMPStripeDirectiveClass,
506 ZigClangStmt_OMPReverseDirectiveClass,
507 ZigClangStmt_OMPInterchangeDirectiveClass,
508 ZigClangStmt_OMPTeamsGenericLoopDirectiveClass,
509 ZigClangStmt_OMPTeamsDistributeSimdDirectiveClass,
510 ZigClangStmt_OMPTeamsDistributeParallelForSimdDirectiveClass,
511 ZigClangStmt_OMPTeamsDistributeParallelForDirectiveClass,
512 ZigClangStmt_OMPTeamsDistributeDirectiveClass,
513 ZigClangStmt_OMPTaskLoopSimdDirectiveClass,
514 ZigClangStmt_OMPTaskLoopDirectiveClass,
515 ZigClangStmt_OMPTargetTeamsGenericLoopDirectiveClass,
516 ZigClangStmt_OMPTargetTeamsDistributeSimdDirectiveClass,
517 ZigClangStmt_OMPTargetTeamsDistributeParallelForSimdDirectiveClass,
518 ZigClangStmt_OMPTargetTeamsDistributeParallelForDirectiveClass,
519 ZigClangStmt_OMPTargetTeamsDistributeDirectiveClass,
520 ZigClangStmt_OMPTargetSimdDirectiveClass,
521 ZigClangStmt_OMPTargetParallelGenericLoopDirectiveClass,
522 ZigClangStmt_OMPTargetParallelForSimdDirectiveClass,
523 ZigClangStmt_OMPSimdDirectiveClass,
524 ZigClangStmt_OMPParallelMasterTaskLoopSimdDirectiveClass,
525 ZigClangStmt_OMPParallelMasterTaskLoopDirectiveClass,
526 ZigClangStmt_OMPParallelMaskedTaskLoopSimdDirectiveClass,
527 ZigClangStmt_OMPParallelMaskedTaskLoopDirectiveClass,
528 ZigClangStmt_OMPParallelGenericLoopDirectiveClass,
529 ZigClangStmt_OMPParallelForSimdDirectiveClass,
530 ZigClangStmt_OMPParallelForDirectiveClass,
531 ZigClangStmt_OMPMasterTaskLoopSimdDirectiveClass,
532 ZigClangStmt_OMPMasterTaskLoopDirectiveClass,
533 ZigClangStmt_OMPMaskedTaskLoopSimdDirectiveClass,
534 ZigClangStmt_OMPMaskedTaskLoopDirectiveClass,
535 ZigClangStmt_OMPGenericLoopDirectiveClass,
536 ZigClangStmt_OMPForSimdDirectiveClass,
537 ZigClangStmt_OMPForDirectiveClass,
538 ZigClangStmt_OMPDistributeSimdDirectiveClass,
539 ZigClangStmt_OMPDistributeParallelForSimdDirectiveClass,
540 ZigClangStmt_OMPDistributeParallelForDirectiveClass,
541 ZigClangStmt_OMPDistributeDirectiveClass,
542 ZigClangStmt_OMPInteropDirectiveClass,
543 ZigClangStmt_OMPFlushDirectiveClass,
544 ZigClangStmt_OMPErrorDirectiveClass,
545 ZigClangStmt_OMPDispatchDirectiveClass,
546 ZigClangStmt_OMPDepobjDirectiveClass,
547 ZigClangStmt_OMPCriticalDirectiveClass,
548 ZigClangStmt_OMPCancellationPointDirectiveClass,
549 ZigClangStmt_OMPCancelDirectiveClass,
550 ZigClangStmt_OMPBarrierDirectiveClass,
551 ZigClangStmt_OMPAtomicDirectiveClass,
552 ZigClangStmt_OMPAssumeDirectiveClass,
553 ZigClangStmt_OMPCanonicalLoopClass,
554 ZigClangStmt_NullStmtClass,
555 ZigClangStmt_MSDependentExistsStmtClass,
556 ZigClangStmt_IndirectGotoStmtClass,
557 ZigClangStmt_IfStmtClass,
558 ZigClangStmt_GotoStmtClass,
559 ZigClangStmt_ForStmtClass,
560 ZigClangStmt_DoStmtClass,
561 ZigClangStmt_DeclStmtClass,
562 ZigClangStmt_CoroutineBodyStmtClass,
563 ZigClangStmt_CoreturnStmtClass,
564 ZigClangStmt_ContinueStmtClass,
565 ZigClangStmt_CompoundStmtClass,
566 ZigClangStmt_CapturedStmtClass,
567 ZigClangStmt_CXXTryStmtClass,
568 ZigClangStmt_CXXForRangeStmtClass,
569 ZigClangStmt_CXXCatchStmtClass,
570 ZigClangStmt_BreakStmtClass,
571 ZigClangStmt_MSAsmStmtClass,
572 ZigClangStmt_GCCAsmStmtClass,
573};
574
575enum ZigClangCK {
576 ZigClangCK_Dependent,
577 ZigClangCK_BitCast,
578 ZigClangCK_LValueBitCast,
579 ZigClangCK_LValueToRValueBitCast,
580 ZigClangCK_LValueToRValue,
581 ZigClangCK_NoOp,
582 ZigClangCK_BaseToDerived,
583 ZigClangCK_DerivedToBase,
584 ZigClangCK_UncheckedDerivedToBase,
585 ZigClangCK_Dynamic,
586 ZigClangCK_ToUnion,
587 ZigClangCK_ArrayToPointerDecay,
588 ZigClangCK_FunctionToPointerDecay,
589 ZigClangCK_NullToPointer,
590 ZigClangCK_NullToMemberPointer,
591 ZigClangCK_BaseToDerivedMemberPointer,
592 ZigClangCK_DerivedToBaseMemberPointer,
593 ZigClangCK_MemberPointerToBoolean,
594 ZigClangCK_ReinterpretMemberPointer,
595 ZigClangCK_UserDefinedConversion,
596 ZigClangCK_ConstructorConversion,
597 ZigClangCK_IntegralToPointer,
598 ZigClangCK_PointerToIntegral,
599 ZigClangCK_PointerToBoolean,
600 ZigClangCK_ToVoid,
601 ZigClangCK_MatrixCast,
602 ZigClangCK_VectorSplat,
603 ZigClangCK_IntegralCast,
604 ZigClangCK_IntegralToBoolean,
605 ZigClangCK_IntegralToFloating,
606 ZigClangCK_FloatingToFixedPoint,
607 ZigClangCK_FixedPointToFloating,
608 ZigClangCK_FixedPointCast,
609 ZigClangCK_FixedPointToIntegral,
610 ZigClangCK_IntegralToFixedPoint,
611 ZigClangCK_FixedPointToBoolean,
612 ZigClangCK_FloatingToIntegral,
613 ZigClangCK_FloatingToBoolean,
614 ZigClangCK_BooleanToSignedIntegral,
615 ZigClangCK_FloatingCast,
616 ZigClangCK_CPointerToObjCPointerCast,
617 ZigClangCK_BlockPointerToObjCPointerCast,
618 ZigClangCK_AnyPointerToBlockPointerCast,
619 ZigClangCK_ObjCObjectLValueCast,
620 ZigClangCK_FloatingRealToComplex,
621 ZigClangCK_FloatingComplexToReal,
622 ZigClangCK_FloatingComplexToBoolean,
623 ZigClangCK_FloatingComplexCast,
624 ZigClangCK_FloatingComplexToIntegralComplex,
625 ZigClangCK_IntegralRealToComplex,
626 ZigClangCK_IntegralComplexToReal,
627 ZigClangCK_IntegralComplexToBoolean,
628 ZigClangCK_IntegralComplexCast,
629 ZigClangCK_IntegralComplexToFloatingComplex,
630 ZigClangCK_ARCProduceObject,
631 ZigClangCK_ARCConsumeObject,
632 ZigClangCK_ARCReclaimReturnedObject,
633 ZigClangCK_ARCExtendBlockObject,
634 ZigClangCK_AtomicToNonAtomic,
635 ZigClangCK_NonAtomicToAtomic,
636 ZigClangCK_CopyAndAutoreleaseBlockObject,
637 ZigClangCK_BuiltinFnToFnPtr,
638 ZigClangCK_ZeroToOCLOpaqueType,
639 ZigClangCK_AddressSpaceConversion,
640 ZigClangCK_IntToOCLSampler,
641};
642
643enum ZigClangDeclKind {
644 ZigClangDeclTranslationUnit,
645 ZigClangDeclTopLevelStmt,
646 ZigClangDeclRequiresExprBody,
647 ZigClangDeclOutlinedFunction,
648 ZigClangDeclLinkageSpec,
649 ZigClangDeclExternCContext,
650 ZigClangDeclExport,
651 ZigClangDeclCaptured,
652 ZigClangDeclBlock,
653 ZigClangDeclStaticAssert,
654 ZigClangDeclPragmaDetectMismatch,
655 ZigClangDeclPragmaComment,
656 ZigClangDeclOpenACCRoutine,
657 ZigClangDeclOpenACCDeclare,
658 ZigClangDeclObjCPropertyImpl,
659 ZigClangDeclOMPThreadPrivate,
660 ZigClangDeclOMPRequires,
661 ZigClangDeclOMPAllocate,
662 ZigClangDeclObjCMethod,
663 ZigClangDeclObjCProtocol,
664 ZigClangDeclObjCInterface,
665 ZigClangDeclObjCImplementation,
666 ZigClangDeclObjCCategoryImpl,
667 ZigClangDeclObjCCategory,
668 ZigClangDeclNamespace,
669 ZigClangDeclHLSLBuffer,
670 ZigClangDeclOMPDeclareReduction,
671 ZigClangDeclOMPDeclareMapper,
672 ZigClangDeclUnresolvedUsingValue,
673 ZigClangDeclUnnamedGlobalConstant,
674 ZigClangDeclTemplateParamObject,
675 ZigClangDeclMSGuid,
676 ZigClangDeclIndirectField,
677 ZigClangDeclEnumConstant,
678 ZigClangDeclFunction,
679 ZigClangDeclCXXMethod,
680 ZigClangDeclCXXDestructor,
681 ZigClangDeclCXXConversion,
682 ZigClangDeclCXXConstructor,
683 ZigClangDeclCXXDeductionGuide,
684 ZigClangDeclVar,
685 ZigClangDeclVarTemplateSpecialization,
686 ZigClangDeclVarTemplatePartialSpecialization,
687 ZigClangDeclParmVar,
688 ZigClangDeclOMPCapturedExpr,
689 ZigClangDeclImplicitParam,
690 ZigClangDeclDecomposition,
691 ZigClangDeclNonTypeTemplateParm,
692 ZigClangDeclMSProperty,
693 ZigClangDeclField,
694 ZigClangDeclObjCIvar,
695 ZigClangDeclObjCAtDefsField,
696 ZigClangDeclBinding,
697 ZigClangDeclUsingShadow,
698 ZigClangDeclConstructorUsingShadow,
699 ZigClangDeclUsingPack,
700 ZigClangDeclUsingDirective,
701 ZigClangDeclUnresolvedUsingIfExists,
702 ZigClangDeclRecord,
703 ZigClangDeclCXXRecord,
704 ZigClangDeclClassTemplateSpecialization,
705 ZigClangDeclClassTemplatePartialSpecialization,
706 ZigClangDeclEnum,
707 ZigClangDeclUnresolvedUsingTypename,
708 ZigClangDeclTypedef,
709 ZigClangDeclTypeAlias,
710 ZigClangDeclObjCTypeParam,
711 ZigClangDeclTemplateTypeParm,
712 ZigClangDeclTemplateTemplateParm,
713 ZigClangDeclVarTemplate,
714 ZigClangDeclTypeAliasTemplate,
715 ZigClangDeclFunctionTemplate,
716 ZigClangDeclClassTemplate,
717 ZigClangDeclConcept,
718 ZigClangDeclBuiltinTemplate,
719 ZigClangDeclObjCProperty,
720 ZigClangDeclObjCCompatibleAlias,
721 ZigClangDeclNamespaceAlias,
722 ZigClangDeclLabel,
723 ZigClangDeclHLSLRootSignature,
724 ZigClangDeclUsingEnum,
725 ZigClangDeclUsing,
726 ZigClangDeclLifetimeExtendedTemporary,
727 ZigClangDeclImport,
728 ZigClangDeclImplicitConceptSpecialization,
729 ZigClangDeclFriendTemplate,
730 ZigClangDeclFriend,
731 ZigClangDeclFileScopeAsm,
732 ZigClangDeclEmpty,
733 ZigClangDeclAccessSpec,
734};
735
736enum ZigClangBuiltinTypeKind {
737 ZigClangBuiltinTypeOCLImage1dRO,
738 ZigClangBuiltinTypeOCLImage1dArrayRO,
739 ZigClangBuiltinTypeOCLImage1dBufferRO,
740 ZigClangBuiltinTypeOCLImage2dRO,
741 ZigClangBuiltinTypeOCLImage2dArrayRO,
742 ZigClangBuiltinTypeOCLImage2dDepthRO,
743 ZigClangBuiltinTypeOCLImage2dArrayDepthRO,
744 ZigClangBuiltinTypeOCLImage2dMSAARO,
745 ZigClangBuiltinTypeOCLImage2dArrayMSAARO,
746 ZigClangBuiltinTypeOCLImage2dMSAADepthRO,
747 ZigClangBuiltinTypeOCLImage2dArrayMSAADepthRO,
748 ZigClangBuiltinTypeOCLImage3dRO,
749 ZigClangBuiltinTypeOCLImage1dWO,
750 ZigClangBuiltinTypeOCLImage1dArrayWO,
751 ZigClangBuiltinTypeOCLImage1dBufferWO,
752 ZigClangBuiltinTypeOCLImage2dWO,
753 ZigClangBuiltinTypeOCLImage2dArrayWO,
754 ZigClangBuiltinTypeOCLImage2dDepthWO,
755 ZigClangBuiltinTypeOCLImage2dArrayDepthWO,
756 ZigClangBuiltinTypeOCLImage2dMSAAWO,
757 ZigClangBuiltinTypeOCLImage2dArrayMSAAWO,
758 ZigClangBuiltinTypeOCLImage2dMSAADepthWO,
759 ZigClangBuiltinTypeOCLImage2dArrayMSAADepthWO,
760 ZigClangBuiltinTypeOCLImage3dWO,
761 ZigClangBuiltinTypeOCLImage1dRW,
762 ZigClangBuiltinTypeOCLImage1dArrayRW,
763 ZigClangBuiltinTypeOCLImage1dBufferRW,
764 ZigClangBuiltinTypeOCLImage2dRW,
765 ZigClangBuiltinTypeOCLImage2dArrayRW,
766 ZigClangBuiltinTypeOCLImage2dDepthRW,
767 ZigClangBuiltinTypeOCLImage2dArrayDepthRW,
768 ZigClangBuiltinTypeOCLImage2dMSAARW,
769 ZigClangBuiltinTypeOCLImage2dArrayMSAARW,
770 ZigClangBuiltinTypeOCLImage2dMSAADepthRW,
771 ZigClangBuiltinTypeOCLImage2dArrayMSAADepthRW,
772 ZigClangBuiltinTypeOCLImage3dRW,
773 ZigClangBuiltinTypeOCLIntelSubgroupAVCMcePayload,
774 ZigClangBuiltinTypeOCLIntelSubgroupAVCImePayload,
775 ZigClangBuiltinTypeOCLIntelSubgroupAVCRefPayload,
776 ZigClangBuiltinTypeOCLIntelSubgroupAVCSicPayload,
777 ZigClangBuiltinTypeOCLIntelSubgroupAVCMceResult,
778 ZigClangBuiltinTypeOCLIntelSubgroupAVCImeResult,
779 ZigClangBuiltinTypeOCLIntelSubgroupAVCRefResult,
780 ZigClangBuiltinTypeOCLIntelSubgroupAVCSicResult,
781 ZigClangBuiltinTypeOCLIntelSubgroupAVCImeResultSingleReferenceStreamout,
782 ZigClangBuiltinTypeOCLIntelSubgroupAVCImeResultDualReferenceStreamout,
783 ZigClangBuiltinTypeOCLIntelSubgroupAVCImeSingleReferenceStreamin,
784 ZigClangBuiltinTypeOCLIntelSubgroupAVCImeDualReferenceStreamin,
785 ZigClangBuiltinTypeSveInt8,
786 ZigClangBuiltinTypeSveInt16,
787 ZigClangBuiltinTypeSveInt32,
788 ZigClangBuiltinTypeSveInt64,
789 ZigClangBuiltinTypeSveUint8,
790 ZigClangBuiltinTypeSveUint16,
791 ZigClangBuiltinTypeSveUint32,
792 ZigClangBuiltinTypeSveUint64,
793 ZigClangBuiltinTypeSveFloat16,
794 ZigClangBuiltinTypeSveFloat32,
795 ZigClangBuiltinTypeSveFloat64,
796 ZigClangBuiltinTypeSveBFloat16,
797 ZigClangBuiltinTypeSveMFloat8,
798 ZigClangBuiltinTypeSveInt8x2,
799 ZigClangBuiltinTypeSveInt16x2,
800 ZigClangBuiltinTypeSveInt32x2,
801 ZigClangBuiltinTypeSveInt64x2,
802 ZigClangBuiltinTypeSveUint8x2,
803 ZigClangBuiltinTypeSveUint16x2,
804 ZigClangBuiltinTypeSveUint32x2,
805 ZigClangBuiltinTypeSveUint64x2,
806 ZigClangBuiltinTypeSveFloat16x2,
807 ZigClangBuiltinTypeSveFloat32x2,
808 ZigClangBuiltinTypeSveFloat64x2,
809 ZigClangBuiltinTypeSveBFloat16x2,
810 ZigClangBuiltinTypeSveMFloat8x2,
811 ZigClangBuiltinTypeSveInt8x3,
812 ZigClangBuiltinTypeSveInt16x3,
813 ZigClangBuiltinTypeSveInt32x3,
814 ZigClangBuiltinTypeSveInt64x3,
815 ZigClangBuiltinTypeSveUint8x3,
816 ZigClangBuiltinTypeSveUint16x3,
817 ZigClangBuiltinTypeSveUint32x3,
818 ZigClangBuiltinTypeSveUint64x3,
819 ZigClangBuiltinTypeSveFloat16x3,
820 ZigClangBuiltinTypeSveFloat32x3,
821 ZigClangBuiltinTypeSveFloat64x3,
822 ZigClangBuiltinTypeSveBFloat16x3,
823 ZigClangBuiltinTypeSveMFloat8x3,
824 ZigClangBuiltinTypeSveInt8x4,
825 ZigClangBuiltinTypeSveInt16x4,
826 ZigClangBuiltinTypeSveInt32x4,
827 ZigClangBuiltinTypeSveInt64x4,
828 ZigClangBuiltinTypeSveUint8x4,
829 ZigClangBuiltinTypeSveUint16x4,
830 ZigClangBuiltinTypeSveUint32x4,
831 ZigClangBuiltinTypeSveUint64x4,
832 ZigClangBuiltinTypeSveFloat16x4,
833 ZigClangBuiltinTypeSveFloat32x4,
834 ZigClangBuiltinTypeSveFloat64x4,
835 ZigClangBuiltinTypeSveBFloat16x4,
836 ZigClangBuiltinTypeSveMFloat8x4,
837 ZigClangBuiltinTypeSveBool,
838 ZigClangBuiltinTypeSveBoolx2,
839 ZigClangBuiltinTypeSveBoolx4,
840 ZigClangBuiltinTypeSveCount,
841 ZigClangBuiltinTypeMFloat8,
842 ZigClangBuiltinTypeDMR1024,
843 ZigClangBuiltinTypeVectorQuad,
844 ZigClangBuiltinTypeVectorPair,
845 ZigClangBuiltinTypeRvvInt8mf8,
846 ZigClangBuiltinTypeRvvInt8mf4,
847 ZigClangBuiltinTypeRvvInt8mf2,
848 ZigClangBuiltinTypeRvvInt8m1,
849 ZigClangBuiltinTypeRvvInt8m2,
850 ZigClangBuiltinTypeRvvInt8m4,
851 ZigClangBuiltinTypeRvvInt8m8,
852 ZigClangBuiltinTypeRvvUint8mf8,
853 ZigClangBuiltinTypeRvvUint8mf4,
854 ZigClangBuiltinTypeRvvUint8mf2,
855 ZigClangBuiltinTypeRvvUint8m1,
856 ZigClangBuiltinTypeRvvUint8m2,
857 ZigClangBuiltinTypeRvvUint8m4,
858 ZigClangBuiltinTypeRvvUint8m8,
859 ZigClangBuiltinTypeRvvInt16mf4,
860 ZigClangBuiltinTypeRvvInt16mf2,
861 ZigClangBuiltinTypeRvvInt16m1,
862 ZigClangBuiltinTypeRvvInt16m2,
863 ZigClangBuiltinTypeRvvInt16m4,
864 ZigClangBuiltinTypeRvvInt16m8,
865 ZigClangBuiltinTypeRvvUint16mf4,
866 ZigClangBuiltinTypeRvvUint16mf2,
867 ZigClangBuiltinTypeRvvUint16m1,
868 ZigClangBuiltinTypeRvvUint16m2,
869 ZigClangBuiltinTypeRvvUint16m4,
870 ZigClangBuiltinTypeRvvUint16m8,
871 ZigClangBuiltinTypeRvvInt32mf2,
872 ZigClangBuiltinTypeRvvInt32m1,
873 ZigClangBuiltinTypeRvvInt32m2,
874 ZigClangBuiltinTypeRvvInt32m4,
875 ZigClangBuiltinTypeRvvInt32m8,
876 ZigClangBuiltinTypeRvvUint32mf2,
877 ZigClangBuiltinTypeRvvUint32m1,
878 ZigClangBuiltinTypeRvvUint32m2,
879 ZigClangBuiltinTypeRvvUint32m4,
880 ZigClangBuiltinTypeRvvUint32m8,
881 ZigClangBuiltinTypeRvvInt64m1,
882 ZigClangBuiltinTypeRvvInt64m2,
883 ZigClangBuiltinTypeRvvInt64m4,
884 ZigClangBuiltinTypeRvvInt64m8,
885 ZigClangBuiltinTypeRvvUint64m1,
886 ZigClangBuiltinTypeRvvUint64m2,
887 ZigClangBuiltinTypeRvvUint64m4,
888 ZigClangBuiltinTypeRvvUint64m8,
889 ZigClangBuiltinTypeRvvFloat16mf4,
890 ZigClangBuiltinTypeRvvFloat16mf2,
891 ZigClangBuiltinTypeRvvFloat16m1,
892 ZigClangBuiltinTypeRvvFloat16m2,
893 ZigClangBuiltinTypeRvvFloat16m4,
894 ZigClangBuiltinTypeRvvFloat16m8,
895 ZigClangBuiltinTypeRvvBFloat16mf4,
896 ZigClangBuiltinTypeRvvBFloat16mf2,
897 ZigClangBuiltinTypeRvvBFloat16m1,
898 ZigClangBuiltinTypeRvvBFloat16m2,
899 ZigClangBuiltinTypeRvvBFloat16m4,
900 ZigClangBuiltinTypeRvvBFloat16m8,
901 ZigClangBuiltinTypeRvvFloat32mf2,
902 ZigClangBuiltinTypeRvvFloat32m1,
903 ZigClangBuiltinTypeRvvFloat32m2,
904 ZigClangBuiltinTypeRvvFloat32m4,
905 ZigClangBuiltinTypeRvvFloat32m8,
906 ZigClangBuiltinTypeRvvFloat64m1,
907 ZigClangBuiltinTypeRvvFloat64m2,
908 ZigClangBuiltinTypeRvvFloat64m4,
909 ZigClangBuiltinTypeRvvFloat64m8,
910 ZigClangBuiltinTypeRvvBool1,
911 ZigClangBuiltinTypeRvvBool2,
912 ZigClangBuiltinTypeRvvBool4,
913 ZigClangBuiltinTypeRvvBool8,
914 ZigClangBuiltinTypeRvvBool16,
915 ZigClangBuiltinTypeRvvBool32,
916 ZigClangBuiltinTypeRvvBool64,
917 ZigClangBuiltinTypeRvvInt8mf8x2,
918 ZigClangBuiltinTypeRvvInt8mf8x3,
919 ZigClangBuiltinTypeRvvInt8mf8x4,
920 ZigClangBuiltinTypeRvvInt8mf8x5,
921 ZigClangBuiltinTypeRvvInt8mf8x6,
922 ZigClangBuiltinTypeRvvInt8mf8x7,
923 ZigClangBuiltinTypeRvvInt8mf8x8,
924 ZigClangBuiltinTypeRvvInt8mf4x2,
925 ZigClangBuiltinTypeRvvInt8mf4x3,
926 ZigClangBuiltinTypeRvvInt8mf4x4,
927 ZigClangBuiltinTypeRvvInt8mf4x5,
928 ZigClangBuiltinTypeRvvInt8mf4x6,
929 ZigClangBuiltinTypeRvvInt8mf4x7,
930 ZigClangBuiltinTypeRvvInt8mf4x8,
931 ZigClangBuiltinTypeRvvInt8mf2x2,
932 ZigClangBuiltinTypeRvvInt8mf2x3,
933 ZigClangBuiltinTypeRvvInt8mf2x4,
934 ZigClangBuiltinTypeRvvInt8mf2x5,
935 ZigClangBuiltinTypeRvvInt8mf2x6,
936 ZigClangBuiltinTypeRvvInt8mf2x7,
937 ZigClangBuiltinTypeRvvInt8mf2x8,
938 ZigClangBuiltinTypeRvvInt8m1x2,
939 ZigClangBuiltinTypeRvvInt8m1x3,
940 ZigClangBuiltinTypeRvvInt8m1x4,
941 ZigClangBuiltinTypeRvvInt8m1x5,
942 ZigClangBuiltinTypeRvvInt8m1x6,
943 ZigClangBuiltinTypeRvvInt8m1x7,
944 ZigClangBuiltinTypeRvvInt8m1x8,
945 ZigClangBuiltinTypeRvvInt8m2x2,
946 ZigClangBuiltinTypeRvvInt8m2x3,
947 ZigClangBuiltinTypeRvvInt8m2x4,
948 ZigClangBuiltinTypeRvvInt8m4x2,
949 ZigClangBuiltinTypeRvvUint8mf8x2,
950 ZigClangBuiltinTypeRvvUint8mf8x3,
951 ZigClangBuiltinTypeRvvUint8mf8x4,
952 ZigClangBuiltinTypeRvvUint8mf8x5,
953 ZigClangBuiltinTypeRvvUint8mf8x6,
954 ZigClangBuiltinTypeRvvUint8mf8x7,
955 ZigClangBuiltinTypeRvvUint8mf8x8,
956 ZigClangBuiltinTypeRvvUint8mf4x2,
957 ZigClangBuiltinTypeRvvUint8mf4x3,
958 ZigClangBuiltinTypeRvvUint8mf4x4,
959 ZigClangBuiltinTypeRvvUint8mf4x5,
960 ZigClangBuiltinTypeRvvUint8mf4x6,
961 ZigClangBuiltinTypeRvvUint8mf4x7,
962 ZigClangBuiltinTypeRvvUint8mf4x8,
963 ZigClangBuiltinTypeRvvUint8mf2x2,
964 ZigClangBuiltinTypeRvvUint8mf2x3,
965 ZigClangBuiltinTypeRvvUint8mf2x4,
966 ZigClangBuiltinTypeRvvUint8mf2x5,
967 ZigClangBuiltinTypeRvvUint8mf2x6,
968 ZigClangBuiltinTypeRvvUint8mf2x7,
969 ZigClangBuiltinTypeRvvUint8mf2x8,
970 ZigClangBuiltinTypeRvvUint8m1x2,
971 ZigClangBuiltinTypeRvvUint8m1x3,
972 ZigClangBuiltinTypeRvvUint8m1x4,
973 ZigClangBuiltinTypeRvvUint8m1x5,
974 ZigClangBuiltinTypeRvvUint8m1x6,
975 ZigClangBuiltinTypeRvvUint8m1x7,
976 ZigClangBuiltinTypeRvvUint8m1x8,
977 ZigClangBuiltinTypeRvvUint8m2x2,
978 ZigClangBuiltinTypeRvvUint8m2x3,
979 ZigClangBuiltinTypeRvvUint8m2x4,
980 ZigClangBuiltinTypeRvvUint8m4x2,
981 ZigClangBuiltinTypeRvvInt16mf4x2,
982 ZigClangBuiltinTypeRvvInt16mf4x3,
983 ZigClangBuiltinTypeRvvInt16mf4x4,
984 ZigClangBuiltinTypeRvvInt16mf4x5,
985 ZigClangBuiltinTypeRvvInt16mf4x6,
986 ZigClangBuiltinTypeRvvInt16mf4x7,
987 ZigClangBuiltinTypeRvvInt16mf4x8,
988 ZigClangBuiltinTypeRvvInt16mf2x2,
989 ZigClangBuiltinTypeRvvInt16mf2x3,
990 ZigClangBuiltinTypeRvvInt16mf2x4,
991 ZigClangBuiltinTypeRvvInt16mf2x5,
992 ZigClangBuiltinTypeRvvInt16mf2x6,
993 ZigClangBuiltinTypeRvvInt16mf2x7,
994 ZigClangBuiltinTypeRvvInt16mf2x8,
995 ZigClangBuiltinTypeRvvInt16m1x2,
996 ZigClangBuiltinTypeRvvInt16m1x3,
997 ZigClangBuiltinTypeRvvInt16m1x4,
998 ZigClangBuiltinTypeRvvInt16m1x5,
999 ZigClangBuiltinTypeRvvInt16m1x6,
1000 ZigClangBuiltinTypeRvvInt16m1x7,
1001 ZigClangBuiltinTypeRvvInt16m1x8,
1002 ZigClangBuiltinTypeRvvInt16m2x2,
1003 ZigClangBuiltinTypeRvvInt16m2x3,
1004 ZigClangBuiltinTypeRvvInt16m2x4,
1005 ZigClangBuiltinTypeRvvInt16m4x2,
1006 ZigClangBuiltinTypeRvvUint16mf4x2,
1007 ZigClangBuiltinTypeRvvUint16mf4x3,
1008 ZigClangBuiltinTypeRvvUint16mf4x4,
1009 ZigClangBuiltinTypeRvvUint16mf4x5,
1010 ZigClangBuiltinTypeRvvUint16mf4x6,
1011 ZigClangBuiltinTypeRvvUint16mf4x7,
1012 ZigClangBuiltinTypeRvvUint16mf4x8,
1013 ZigClangBuiltinTypeRvvUint16mf2x2,
1014 ZigClangBuiltinTypeRvvUint16mf2x3,
1015 ZigClangBuiltinTypeRvvUint16mf2x4,
1016 ZigClangBuiltinTypeRvvUint16mf2x5,
1017 ZigClangBuiltinTypeRvvUint16mf2x6,
1018 ZigClangBuiltinTypeRvvUint16mf2x7,
1019 ZigClangBuiltinTypeRvvUint16mf2x8,
1020 ZigClangBuiltinTypeRvvUint16m1x2,
1021 ZigClangBuiltinTypeRvvUint16m1x3,
1022 ZigClangBuiltinTypeRvvUint16m1x4,
1023 ZigClangBuiltinTypeRvvUint16m1x5,
1024 ZigClangBuiltinTypeRvvUint16m1x6,
1025 ZigClangBuiltinTypeRvvUint16m1x7,
1026 ZigClangBuiltinTypeRvvUint16m1x8,
1027 ZigClangBuiltinTypeRvvUint16m2x2,
1028 ZigClangBuiltinTypeRvvUint16m2x3,
1029 ZigClangBuiltinTypeRvvUint16m2x4,
1030 ZigClangBuiltinTypeRvvUint16m4x2,
1031 ZigClangBuiltinTypeRvvInt32mf2x2,
1032 ZigClangBuiltinTypeRvvInt32mf2x3,
1033 ZigClangBuiltinTypeRvvInt32mf2x4,
1034 ZigClangBuiltinTypeRvvInt32mf2x5,
1035 ZigClangBuiltinTypeRvvInt32mf2x6,
1036 ZigClangBuiltinTypeRvvInt32mf2x7,
1037 ZigClangBuiltinTypeRvvInt32mf2x8,
1038 ZigClangBuiltinTypeRvvInt32m1x2,
1039 ZigClangBuiltinTypeRvvInt32m1x3,
1040 ZigClangBuiltinTypeRvvInt32m1x4,
1041 ZigClangBuiltinTypeRvvInt32m1x5,
1042 ZigClangBuiltinTypeRvvInt32m1x6,
1043 ZigClangBuiltinTypeRvvInt32m1x7,
1044 ZigClangBuiltinTypeRvvInt32m1x8,
1045 ZigClangBuiltinTypeRvvInt32m2x2,
1046 ZigClangBuiltinTypeRvvInt32m2x3,
1047 ZigClangBuiltinTypeRvvInt32m2x4,
1048 ZigClangBuiltinTypeRvvInt32m4x2,
1049 ZigClangBuiltinTypeRvvUint32mf2x2,
1050 ZigClangBuiltinTypeRvvUint32mf2x3,
1051 ZigClangBuiltinTypeRvvUint32mf2x4,
1052 ZigClangBuiltinTypeRvvUint32mf2x5,
1053 ZigClangBuiltinTypeRvvUint32mf2x6,
1054 ZigClangBuiltinTypeRvvUint32mf2x7,
1055 ZigClangBuiltinTypeRvvUint32mf2x8,
1056 ZigClangBuiltinTypeRvvUint32m1x2,
1057 ZigClangBuiltinTypeRvvUint32m1x3,
1058 ZigClangBuiltinTypeRvvUint32m1x4,
1059 ZigClangBuiltinTypeRvvUint32m1x5,
1060 ZigClangBuiltinTypeRvvUint32m1x6,
1061 ZigClangBuiltinTypeRvvUint32m1x7,
1062 ZigClangBuiltinTypeRvvUint32m1x8,
1063 ZigClangBuiltinTypeRvvUint32m2x2,
1064 ZigClangBuiltinTypeRvvUint32m2x3,
1065 ZigClangBuiltinTypeRvvUint32m2x4,
1066 ZigClangBuiltinTypeRvvUint32m4x2,
1067 ZigClangBuiltinTypeRvvInt64m1x2,
1068 ZigClangBuiltinTypeRvvInt64m1x3,
1069 ZigClangBuiltinTypeRvvInt64m1x4,
1070 ZigClangBuiltinTypeRvvInt64m1x5,
1071 ZigClangBuiltinTypeRvvInt64m1x6,
1072 ZigClangBuiltinTypeRvvInt64m1x7,
1073 ZigClangBuiltinTypeRvvInt64m1x8,
1074 ZigClangBuiltinTypeRvvInt64m2x2,
1075 ZigClangBuiltinTypeRvvInt64m2x3,
1076 ZigClangBuiltinTypeRvvInt64m2x4,
1077 ZigClangBuiltinTypeRvvInt64m4x2,
1078 ZigClangBuiltinTypeRvvUint64m1x2,
1079 ZigClangBuiltinTypeRvvUint64m1x3,
1080 ZigClangBuiltinTypeRvvUint64m1x4,
1081 ZigClangBuiltinTypeRvvUint64m1x5,
1082 ZigClangBuiltinTypeRvvUint64m1x6,
1083 ZigClangBuiltinTypeRvvUint64m1x7,
1084 ZigClangBuiltinTypeRvvUint64m1x8,
1085 ZigClangBuiltinTypeRvvUint64m2x2,
1086 ZigClangBuiltinTypeRvvUint64m2x3,
1087 ZigClangBuiltinTypeRvvUint64m2x4,
1088 ZigClangBuiltinTypeRvvUint64m4x2,
1089 ZigClangBuiltinTypeRvvFloat16mf4x2,
1090 ZigClangBuiltinTypeRvvFloat16mf4x3,
1091 ZigClangBuiltinTypeRvvFloat16mf4x4,
1092 ZigClangBuiltinTypeRvvFloat16mf4x5,
1093 ZigClangBuiltinTypeRvvFloat16mf4x6,
1094 ZigClangBuiltinTypeRvvFloat16mf4x7,
1095 ZigClangBuiltinTypeRvvFloat16mf4x8,
1096 ZigClangBuiltinTypeRvvFloat16mf2x2,
1097 ZigClangBuiltinTypeRvvFloat16mf2x3,
1098 ZigClangBuiltinTypeRvvFloat16mf2x4,
1099 ZigClangBuiltinTypeRvvFloat16mf2x5,
1100 ZigClangBuiltinTypeRvvFloat16mf2x6,
1101 ZigClangBuiltinTypeRvvFloat16mf2x7,
1102 ZigClangBuiltinTypeRvvFloat16mf2x8,
1103 ZigClangBuiltinTypeRvvFloat16m1x2,
1104 ZigClangBuiltinTypeRvvFloat16m1x3,
1105 ZigClangBuiltinTypeRvvFloat16m1x4,
1106 ZigClangBuiltinTypeRvvFloat16m1x5,
1107 ZigClangBuiltinTypeRvvFloat16m1x6,
1108 ZigClangBuiltinTypeRvvFloat16m1x7,
1109 ZigClangBuiltinTypeRvvFloat16m1x8,
1110 ZigClangBuiltinTypeRvvFloat16m2x2,
1111 ZigClangBuiltinTypeRvvFloat16m2x3,
1112 ZigClangBuiltinTypeRvvFloat16m2x4,
1113 ZigClangBuiltinTypeRvvFloat16m4x2,
1114 ZigClangBuiltinTypeRvvFloat32mf2x2,
1115 ZigClangBuiltinTypeRvvFloat32mf2x3,
1116 ZigClangBuiltinTypeRvvFloat32mf2x4,
1117 ZigClangBuiltinTypeRvvFloat32mf2x5,
1118 ZigClangBuiltinTypeRvvFloat32mf2x6,
1119 ZigClangBuiltinTypeRvvFloat32mf2x7,
1120 ZigClangBuiltinTypeRvvFloat32mf2x8,
1121 ZigClangBuiltinTypeRvvFloat32m1x2,
1122 ZigClangBuiltinTypeRvvFloat32m1x3,
1123 ZigClangBuiltinTypeRvvFloat32m1x4,
1124 ZigClangBuiltinTypeRvvFloat32m1x5,
1125 ZigClangBuiltinTypeRvvFloat32m1x6,
1126 ZigClangBuiltinTypeRvvFloat32m1x7,
1127 ZigClangBuiltinTypeRvvFloat32m1x8,
1128 ZigClangBuiltinTypeRvvFloat32m2x2,
1129 ZigClangBuiltinTypeRvvFloat32m2x3,
1130 ZigClangBuiltinTypeRvvFloat32m2x4,
1131 ZigClangBuiltinTypeRvvFloat32m4x2,
1132 ZigClangBuiltinTypeRvvFloat64m1x2,
1133 ZigClangBuiltinTypeRvvFloat64m1x3,
1134 ZigClangBuiltinTypeRvvFloat64m1x4,
1135 ZigClangBuiltinTypeRvvFloat64m1x5,
1136 ZigClangBuiltinTypeRvvFloat64m1x6,
1137 ZigClangBuiltinTypeRvvFloat64m1x7,
1138 ZigClangBuiltinTypeRvvFloat64m1x8,
1139 ZigClangBuiltinTypeRvvFloat64m2x2,
1140 ZigClangBuiltinTypeRvvFloat64m2x3,
1141 ZigClangBuiltinTypeRvvFloat64m2x4,
1142 ZigClangBuiltinTypeRvvFloat64m4x2,
1143 ZigClangBuiltinTypeRvvBFloat16mf4x2,
1144 ZigClangBuiltinTypeRvvBFloat16mf4x3,
1145 ZigClangBuiltinTypeRvvBFloat16mf4x4,
1146 ZigClangBuiltinTypeRvvBFloat16mf4x5,
1147 ZigClangBuiltinTypeRvvBFloat16mf4x6,
1148 ZigClangBuiltinTypeRvvBFloat16mf4x7,
1149 ZigClangBuiltinTypeRvvBFloat16mf4x8,
1150 ZigClangBuiltinTypeRvvBFloat16mf2x2,
1151 ZigClangBuiltinTypeRvvBFloat16mf2x3,
1152 ZigClangBuiltinTypeRvvBFloat16mf2x4,
1153 ZigClangBuiltinTypeRvvBFloat16mf2x5,
1154 ZigClangBuiltinTypeRvvBFloat16mf2x6,
1155 ZigClangBuiltinTypeRvvBFloat16mf2x7,
1156 ZigClangBuiltinTypeRvvBFloat16mf2x8,
1157 ZigClangBuiltinTypeRvvBFloat16m1x2,
1158 ZigClangBuiltinTypeRvvBFloat16m1x3,
1159 ZigClangBuiltinTypeRvvBFloat16m1x4,
1160 ZigClangBuiltinTypeRvvBFloat16m1x5,
1161 ZigClangBuiltinTypeRvvBFloat16m1x6,
1162 ZigClangBuiltinTypeRvvBFloat16m1x7,
1163 ZigClangBuiltinTypeRvvBFloat16m1x8,
1164 ZigClangBuiltinTypeRvvBFloat16m2x2,
1165 ZigClangBuiltinTypeRvvBFloat16m2x3,
1166 ZigClangBuiltinTypeRvvBFloat16m2x4,
1167 ZigClangBuiltinTypeRvvBFloat16m4x2,
1168 ZigClangBuiltinTypeWasmExternRef,
1169 ZigClangBuiltinTypeAMDGPUBufferRsrc,
1170 ZigClangBuiltinTypeAMDGPUNamedWorkgroupBarrier,
1171 ZigClangBuiltinTypeHLSLResource,
1172 ZigClangBuiltinTypeVoid,
1173 ZigClangBuiltinTypeBool,
1174 ZigClangBuiltinTypeChar_U,
1175 ZigClangBuiltinTypeUChar,
1176 ZigClangBuiltinTypeWChar_U,
1177 ZigClangBuiltinTypeChar8,
1178 ZigClangBuiltinTypeChar16,
1179 ZigClangBuiltinTypeChar32,
1180 ZigClangBuiltinTypeUShort,
1181 ZigClangBuiltinTypeUInt,
1182 ZigClangBuiltinTypeULong,
1183 ZigClangBuiltinTypeULongLong,
1184 ZigClangBuiltinTypeUInt128,
1185 ZigClangBuiltinTypeChar_S,
1186 ZigClangBuiltinTypeSChar,
1187 ZigClangBuiltinTypeWChar_S,
1188 ZigClangBuiltinTypeShort,
1189 ZigClangBuiltinTypeInt,
1190 ZigClangBuiltinTypeLong,
1191 ZigClangBuiltinTypeLongLong,
1192 ZigClangBuiltinTypeInt128,
1193 ZigClangBuiltinTypeShortAccum,
1194 ZigClangBuiltinTypeAccum,
1195 ZigClangBuiltinTypeLongAccum,
1196 ZigClangBuiltinTypeUShortAccum,
1197 ZigClangBuiltinTypeUAccum,
1198 ZigClangBuiltinTypeULongAccum,
1199 ZigClangBuiltinTypeShortFract,
1200 ZigClangBuiltinTypeFract,
1201 ZigClangBuiltinTypeLongFract,
1202 ZigClangBuiltinTypeUShortFract,
1203 ZigClangBuiltinTypeUFract,
1204 ZigClangBuiltinTypeULongFract,
1205 ZigClangBuiltinTypeSatShortAccum,
1206 ZigClangBuiltinTypeSatAccum,
1207 ZigClangBuiltinTypeSatLongAccum,
1208 ZigClangBuiltinTypeSatUShortAccum,
1209 ZigClangBuiltinTypeSatUAccum,
1210 ZigClangBuiltinTypeSatULongAccum,
1211 ZigClangBuiltinTypeSatShortFract,
1212 ZigClangBuiltinTypeSatFract,
1213 ZigClangBuiltinTypeSatLongFract,
1214 ZigClangBuiltinTypeSatUShortFract,
1215 ZigClangBuiltinTypeSatUFract,
1216 ZigClangBuiltinTypeSatULongFract,
1217 ZigClangBuiltinTypeHalf,
1218 ZigClangBuiltinTypeFloat,
1219 ZigClangBuiltinTypeDouble,
1220 ZigClangBuiltinTypeLongDouble,
1221 ZigClangBuiltinTypeFloat16,
1222 ZigClangBuiltinTypeBFloat16,
1223 ZigClangBuiltinTypeFloat128,
1224 ZigClangBuiltinTypeIbm128,
1225 ZigClangBuiltinTypeNullPtr,
1226 ZigClangBuiltinTypeObjCId,
1227 ZigClangBuiltinTypeObjCClass,
1228 ZigClangBuiltinTypeObjCSel,
1229 ZigClangBuiltinTypeOCLSampler,
1230 ZigClangBuiltinTypeOCLEvent,
1231 ZigClangBuiltinTypeOCLClkEvent,
1232 ZigClangBuiltinTypeOCLQueue,
1233 ZigClangBuiltinTypeOCLReserveID,
1234 ZigClangBuiltinTypeDependent,
1235 ZigClangBuiltinTypeOverload,
1236 ZigClangBuiltinTypeBoundMember,
1237 ZigClangBuiltinTypeUnresolvedTemplate,
1238 ZigClangBuiltinTypePseudoObject,
1239 ZigClangBuiltinTypeUnknownAny,
1240 ZigClangBuiltinTypeBuiltinFn,
1241 ZigClangBuiltinTypeARCUnbridgedCast,
1242 ZigClangBuiltinTypeIncompleteMatrixIdx,
1243 ZigClangBuiltinTypeOMPArraySection,
1244 ZigClangBuiltinTypeOMPArrayShaping,
1245 ZigClangBuiltinTypeOMPIterator,
1246};
1247
1248enum ZigClangCallingConv {
1249 ZigClangCallingConv_C,
1250 ZigClangCallingConv_X86StdCall,
1251 ZigClangCallingConv_X86FastCall,
1252 ZigClangCallingConv_X86ThisCall,
1253 ZigClangCallingConv_X86VectorCall,
1254 ZigClangCallingConv_X86Pascal,
1255 ZigClangCallingConv_Win64,
1256 ZigClangCallingConv_X86_64SysV,
1257 ZigClangCallingConv_X86RegCall,
1258 ZigClangCallingConv_AAPCS,
1259 ZigClangCallingConv_AAPCS_VFP,
1260 ZigClangCallingConv_IntelOclBicc,
1261 ZigClangCallingConv_SpirFunction,
1262 ZigClangCallingConv_DeviceKernel,
1263 ZigClangCallingConv_Swift,
1264 ZigClangCallingConv_SwiftAsync,
1265 ZigClangCallingConv_PreserveMost,
1266 ZigClangCallingConv_PreserveAll,
1267 ZigClangCallingConv_AArch64VectorCall,
1268 ZigClangCallingConv_AArch64SVEPCS,
1269 ZigClangCallingConv_M68kRTD,
1270 ZigClangCallingConv_PreserveNone,
1271 ZigClangCallingConv_RISCVVectorCall,
1272};
1273
1274enum ZigClangStorageClass {
1275 // These are legal on both functions and variables.
1276 ZigClangStorageClass_None,
1277 ZigClangStorageClass_Extern,
1278 ZigClangStorageClass_Static,
1279 ZigClangStorageClass_PrivateExtern,
1280
1281 // These are only legal on variables.
1282 ZigClangStorageClass_Auto,
1283 ZigClangStorageClass_Register,
1284};
1285
1286/// IEEE-754R 4.3: Rounding-direction attributes.
1287enum ZigClangAPFloat_roundingMode {
1288 ZigClangAPFloat_roundingMode_TowardZero = 0,
1289 ZigClangAPFloat_roundingMode_NearestTiesToEven = 1,
1290 ZigClangAPFloat_roundingMode_TowardPositive = 2,
1291 ZigClangAPFloat_roundingMode_TowardNegative = 3,
1292 ZigClangAPFloat_roundingMode_NearestTiesToAway = 4,
1293
1294 ZigClangAPFloat_roundingMode_Dynamic = 7,
1295 ZigClangAPFloat_roundingMode_Invalid = -1,
1296};
1297
1298enum ZigClangAPFloatBase_Semantics {
1299 ZigClangAPFloatBase_Semantics_IEEEhalf,
1300 ZigClangAPFloatBase_Semantics_BFloat,
1301 ZigClangAPFloatBase_Semantics_IEEEsingle,
1302 ZigClangAPFloatBase_Semantics_IEEEdouble,
1303 ZigClangAPFloatBase_Semantics_IEEEquad,
1304 ZigClangAPFloatBase_Semantics_PPCDoubleDouble,
1305 ZigClangAPFloatBase_Semantics_PPCDoubleDoubleLegacy,
1306 ZigClangAPFloatBase_Semantics_Float8E5M2,
1307 ZigClangAPFloatBase_Semantics_Float8E5M2FNUZ,
1308 ZigClangAPFloatBase_Semantics_Float8E4M3,
1309 ZigClangAPFloatBase_Semantics_Float8E4M3FN,
1310 ZigClangAPFloatBase_Semantics_Float8E4M3FNUZ,
1311 ZigClangAPFloatBase_Semantics_Float8E4M3B11FNUZ,
1312 ZigClangAPFloatBase_Semantics_Float8E3M4,
1313 ZigClangAPFloatBase_Semantics_FloatTF32,
1314 ZigClangAPFloatBase_Semantics_Float8E8M0FNU,
1315 ZigClangAPFloatBase_Semantics_Float6E3M2FN,
1316 ZigClangAPFloatBase_Semantics_Float6E2M3FN,
1317 ZigClangAPFloatBase_Semantics_Float4E2M1FN,
1318 ZigClangAPFloatBase_Semantics_x87DoubleExtended,
1319 ZigClangAPFloatBase_Semantics_MaxSemantics = ZigClangAPFloatBase_Semantics_x87DoubleExtended,
1320};
1321
1322enum ZigClangStringLiteral_StringKind {
1323 ZigClangStringLiteral_StringKind_Ascii,
1324 ZigClangStringLiteral_StringKind_Wide,
1325 ZigClangStringLiteral_StringKind_UTF8,
1326 ZigClangStringLiteral_StringKind_UTF16,
1327 ZigClangStringLiteral_StringKind_UTF32,
1328};
1329
1330enum ZigClangCharacterLiteralKind {
1331 ZigClangCharacterLiteralKind_Ascii,
1332 ZigClangCharacterLiteralKind_Wide,
1333 ZigClangCharacterLiteralKind_UTF8,
1334 ZigClangCharacterLiteralKind_UTF16,
1335 ZigClangCharacterLiteralKind_UTF32,
1336};
1337
1338enum ZigClangVarDecl_TLSKind {
1339 ZigClangVarDecl_TLSKind_None,
1340 ZigClangVarDecl_TLSKind_Static,
1341 ZigClangVarDecl_TLSKind_Dynamic,
1342};
1343
1344enum ZigClangElaboratedTypeKeyword {
1345 ZigClangElaboratedTypeKeyword_Struct,
1346 ZigClangElaboratedTypeKeyword_Interface,
1347 ZigClangElaboratedTypeKeyword_Union,
1348 ZigClangElaboratedTypeKeyword_Class,
1349 ZigClangElaboratedTypeKeyword_Enum,
1350 ZigClangElaboratedTypeKeyword_Typename,
1351 ZigClangElaboratedTypeKeyword_None,
1352};
1353
1354enum ZigClangPreprocessedEntity_EntityKind {
1355 ZigClangPreprocessedEntity_InvalidKind,
1356 ZigClangPreprocessedEntity_MacroExpansionKind,
1357 ZigClangPreprocessedEntity_MacroDefinitionKind,
1358 ZigClangPreprocessedEntity_InclusionDirectiveKind,
1359};
1360
1361enum ZigClangExpr_ConstantExprKind {
1362 ZigClangExpr_ConstantExprKind_Normal,
1363 ZigClangExpr_ConstantExprKind_NonClassTemplateArgument,
1364 ZigClangExpr_ConstantExprKind_ClassTemplateArgument,
1365 ZigClangExpr_ConstantExprKind_ImmediateInvocation,
1366};
1367
1368enum ZigClangUnaryExprOrTypeTrait_Kind {
1369 ZigClangUnaryExprOrTypeTrait_KindSizeOf,
1370 ZigClangUnaryExprOrTypeTrait_KindDataSizeOf,
1371 ZigClangUnaryExprOrTypeTrait_KindCountOf,
1372 ZigClangUnaryExprOrTypeTrait_KindAlignOf,
1373 ZigClangUnaryExprOrTypeTrait_KindPreferredAlignOf,
1374 ZigClangUnaryExprOrTypeTrait_KindPtrAuthTypeDiscriminator,
1375 ZigClangUnaryExprOrTypeTrait_KindVecStep,
1376 ZigClangUnaryExprOrTypeTrait_KindOpenMPRequiredSimdAlign,
1377};
1378
1379enum ZigClangOffsetOfNode_Kind {
1380 ZigClangOffsetOfNode_KindArray,
1381 ZigClangOffsetOfNode_KindField,
1382 ZigClangOffsetOfNode_KindIdentifier,
1383 ZigClangOffsetOfNode_KindBase,
1384};
1385
1386ZIG_EXTERN_C struct ZigClangSourceLocation ZigClangSourceManager_getSpellingLoc(const struct ZigClangSourceManager *,
1387 struct ZigClangSourceLocation Loc);
1388ZIG_EXTERN_C const char *ZigClangSourceManager_getFilename(const struct ZigClangSourceManager *,
1389 struct ZigClangSourceLocation SpellingLoc);
1390ZIG_EXTERN_C unsigned ZigClangSourceManager_getSpellingLineNumber(const struct ZigClangSourceManager *,
1391 struct ZigClangSourceLocation Loc);
1392ZIG_EXTERN_C unsigned ZigClangSourceManager_getSpellingColumnNumber(const struct ZigClangSourceManager *,
1393 struct ZigClangSourceLocation Loc);
1394ZIG_EXTERN_C const char* ZigClangSourceManager_getCharacterData(const struct ZigClangSourceManager *,
1395 struct ZigClangSourceLocation SL);
1396
1397ZIG_EXTERN_C struct ZigClangQualType ZigClangASTContext_getPointerType(const struct ZigClangASTContext*, struct ZigClangQualType T);
1398
1399ZIG_EXTERN_C struct ZigClangSourceLocation ZigClangLexer_getLocForEndOfToken(struct ZigClangSourceLocation,
1400 const ZigClangSourceManager *, const ZigClangASTUnit *);
1401
1402// Can return null.
1403ZIG_EXTERN_C struct ZigClangASTUnit *ZigClangLoadFromCommandLine(
1404 const char **args_begin, const char **args_end,
1405 struct Stage2ErrorMsg **errors_ptr, size_t *errors_len, const char *resources_path);
1406ZIG_EXTERN_C void ZigClangASTUnit_delete(struct ZigClangASTUnit *);
1407ZIG_EXTERN_C void ZigClangErrorMsg_delete(struct Stage2ErrorMsg *ptr, size_t len);
1408
1409ZIG_EXTERN_C struct ZigClangASTContext *ZigClangASTUnit_getASTContext(struct ZigClangASTUnit *);
1410ZIG_EXTERN_C struct ZigClangSourceManager *ZigClangASTUnit_getSourceManager(struct ZigClangASTUnit *);
1411ZIG_EXTERN_C bool ZigClangASTUnit_visitLocalTopLevelDecls(struct ZigClangASTUnit *, void *context,
1412 bool (*Fn)(void *context, const struct ZigClangDecl *decl));
1413ZIG_EXTERN_C struct ZigClangPreprocessingRecord_iterator ZigClangASTUnit_getLocalPreprocessingEntities_begin(struct ZigClangASTUnit *);
1414ZIG_EXTERN_C struct ZigClangPreprocessingRecord_iterator ZigClangASTUnit_getLocalPreprocessingEntities_end(struct ZigClangASTUnit *);
1415
1416ZIG_EXTERN_C struct ZigClangPreprocessedEntity *ZigClangPreprocessingRecord_iterator_deref(
1417 struct ZigClangPreprocessingRecord_iterator);
1418
1419ZIG_EXTERN_C enum ZigClangPreprocessedEntity_EntityKind ZigClangPreprocessedEntity_getKind(const struct ZigClangPreprocessedEntity *);
1420
1421ZIG_EXTERN_C const struct ZigClangRecordDecl *ZigClangRecordType_getDecl(const struct ZigClangRecordType *record_ty);
1422ZIG_EXTERN_C const struct ZigClangEnumDecl *ZigClangEnumType_getDecl(const struct ZigClangEnumType *record_ty);
1423
1424ZIG_EXTERN_C bool ZigClangTagDecl_isThisDeclarationADefinition(const struct ZigClangTagDecl *);
1425
1426ZIG_EXTERN_C const struct ZigClangTagDecl *ZigClangRecordDecl_getCanonicalDecl(const struct ZigClangRecordDecl *record_decl);
1427ZIG_EXTERN_C const struct ZigClangTagDecl *ZigClangEnumDecl_getCanonicalDecl(const struct ZigClangEnumDecl *);
1428ZIG_EXTERN_C const struct ZigClangFieldDecl *ZigClangFieldDecl_getCanonicalDecl(const ZigClangFieldDecl *);
1429ZIG_EXTERN_C const struct ZigClangTypedefNameDecl *ZigClangTypedefNameDecl_getCanonicalDecl(const struct ZigClangTypedefNameDecl *);
1430ZIG_EXTERN_C const struct ZigClangFunctionDecl *ZigClangFunctionDecl_getCanonicalDecl(const ZigClangFunctionDecl *self);
1431ZIG_EXTERN_C const struct ZigClangVarDecl *ZigClangVarDecl_getCanonicalDecl(const ZigClangVarDecl *self);
1432ZIG_EXTERN_C const char* ZigClangVarDecl_getSectionAttribute(const struct ZigClangVarDecl *self, size_t *len);
1433ZIG_EXTERN_C const struct ZigClangFunctionDecl *ZigClangVarDecl_getCleanupAttribute(const struct ZigClangVarDecl *self);
1434ZIG_EXTERN_C unsigned ZigClangVarDecl_getAlignedAttribute(const struct ZigClangVarDecl *self, const ZigClangASTContext* ctx);
1435ZIG_EXTERN_C unsigned ZigClangFunctionDecl_getAlignedAttribute(const struct ZigClangFunctionDecl *self, const ZigClangASTContext* ctx);
1436ZIG_EXTERN_C unsigned ZigClangFieldDecl_getAlignedAttribute(const struct ZigClangFieldDecl *self, const ZigClangASTContext* ctx);
1437ZIG_EXTERN_C bool ZigClangVarDecl_getPackedAttribute(const struct ZigClangVarDecl *self);
1438ZIG_EXTERN_C bool ZigClangFieldDecl_getPackedAttribute(const struct ZigClangFieldDecl *self);
1439
1440ZIG_EXTERN_C const char *ZigClangFileScopeAsmDecl_getAsmString(const struct ZigClangFileScopeAsmDecl *self);
1441ZIG_EXTERN_C void ZigClangFileScopeAsmDecl_freeAsmString(const char *str);
1442
1443ZIG_EXTERN_C struct ZigClangQualType ZigClangParmVarDecl_getOriginalType(const struct ZigClangParmVarDecl *self);
1444
1445ZIG_EXTERN_C bool ZigClangRecordDecl_getPackedAttribute(const struct ZigClangRecordDecl *);
1446ZIG_EXTERN_C const struct ZigClangRecordDecl *ZigClangRecordDecl_getDefinition(const struct ZigClangRecordDecl *);
1447ZIG_EXTERN_C const struct ZigClangEnumDecl *ZigClangEnumDecl_getDefinition(const struct ZigClangEnumDecl *);
1448
1449ZIG_EXTERN_C struct ZigClangSourceLocation ZigClangRecordDecl_getLocation(const struct ZigClangRecordDecl *);
1450ZIG_EXTERN_C struct ZigClangSourceLocation ZigClangEnumDecl_getLocation(const struct ZigClangEnumDecl *);
1451ZIG_EXTERN_C struct ZigClangSourceLocation ZigClangTypedefNameDecl_getLocation(const struct ZigClangTypedefNameDecl *);
1452ZIG_EXTERN_C struct ZigClangSourceLocation ZigClangDecl_getLocation(const struct ZigClangDecl *);
1453
1454ZIG_EXTERN_C const struct ZigClangASTRecordLayout *ZigClangRecordDecl_getASTRecordLayout(const struct ZigClangRecordDecl *, const struct ZigClangASTContext *);
1455
1456ZIG_EXTERN_C uint64_t ZigClangASTRecordLayout_getFieldOffset(const struct ZigClangASTRecordLayout *, unsigned);
1457ZIG_EXTERN_C int64_t ZigClangASTRecordLayout_getAlignment(const struct ZigClangASTRecordLayout *);
1458
1459ZIG_EXTERN_C struct ZigClangQualType ZigClangFunctionDecl_getType(const struct ZigClangFunctionDecl *);
1460ZIG_EXTERN_C struct ZigClangSourceLocation ZigClangFunctionDecl_getLocation(const struct ZigClangFunctionDecl *);
1461ZIG_EXTERN_C bool ZigClangFunctionDecl_hasBody(const struct ZigClangFunctionDecl *);
1462ZIG_EXTERN_C enum ZigClangStorageClass ZigClangFunctionDecl_getStorageClass(const struct ZigClangFunctionDecl *);
1463ZIG_EXTERN_C const struct ZigClangParmVarDecl *ZigClangFunctionDecl_getParamDecl(const struct ZigClangFunctionDecl *, unsigned i);
1464ZIG_EXTERN_C const struct ZigClangStmt *ZigClangFunctionDecl_getBody(const struct ZigClangFunctionDecl *);
1465ZIG_EXTERN_C bool ZigClangFunctionDecl_doesDeclarationForceExternallyVisibleDefinition(const struct ZigClangFunctionDecl *);
1466ZIG_EXTERN_C bool ZigClangFunctionDecl_isThisDeclarationADefinition(const struct ZigClangFunctionDecl *);
1467ZIG_EXTERN_C bool ZigClangFunctionDecl_doesThisDeclarationHaveABody(const struct ZigClangFunctionDecl *);
1468ZIG_EXTERN_C bool ZigClangFunctionDecl_isInlineSpecified(const struct ZigClangFunctionDecl *);
1469ZIG_EXTERN_C bool ZigClangFunctionDecl_hasAlwaysInlineAttr(const struct ZigClangFunctionDecl *);
1470ZIG_EXTERN_C bool ZigClangFunctionDecl_isDefined(const struct ZigClangFunctionDecl *);
1471ZIG_EXTERN_C const struct ZigClangFunctionDecl* ZigClangFunctionDecl_getDefinition(const struct ZigClangFunctionDecl *);
1472ZIG_EXTERN_C const char* ZigClangFunctionDecl_getSectionAttribute(const struct ZigClangFunctionDecl *, size_t *);
1473
1474ZIG_EXTERN_C bool ZigClangRecordDecl_isUnion(const struct ZigClangRecordDecl *record_decl);
1475ZIG_EXTERN_C bool ZigClangRecordDecl_isStruct(const struct ZigClangRecordDecl *record_decl);
1476ZIG_EXTERN_C bool ZigClangRecordDecl_isAnonymousStructOrUnion(const struct ZigClangRecordDecl *record_decl);
1477ZIG_EXTERN_C ZigClangRecordDecl_field_iterator ZigClangRecordDecl_field_begin(const struct ZigClangRecordDecl *);
1478ZIG_EXTERN_C ZigClangRecordDecl_field_iterator ZigClangRecordDecl_field_end(const struct ZigClangRecordDecl *);
1479ZIG_EXTERN_C ZigClangRecordDecl_field_iterator ZigClangRecordDecl_field_iterator_next(struct ZigClangRecordDecl_field_iterator);
1480ZIG_EXTERN_C const struct ZigClangFieldDecl * ZigClangRecordDecl_field_iterator_deref(struct ZigClangRecordDecl_field_iterator);
1481ZIG_EXTERN_C bool ZigClangRecordDecl_field_iterator_neq(
1482 struct ZigClangRecordDecl_field_iterator a,
1483 struct ZigClangRecordDecl_field_iterator b);
1484
1485ZIG_EXTERN_C struct ZigClangQualType ZigClangEnumDecl_getIntegerType(const struct ZigClangEnumDecl *);
1486ZIG_EXTERN_C ZigClangEnumDecl_enumerator_iterator ZigClangEnumDecl_enumerator_begin(const struct ZigClangEnumDecl *);
1487ZIG_EXTERN_C ZigClangEnumDecl_enumerator_iterator ZigClangEnumDecl_enumerator_end(const struct ZigClangEnumDecl *);
1488ZIG_EXTERN_C ZigClangEnumDecl_enumerator_iterator ZigClangEnumDecl_enumerator_iterator_next(struct ZigClangEnumDecl_enumerator_iterator);
1489ZIG_EXTERN_C const struct ZigClangEnumConstantDecl * ZigClangEnumDecl_enumerator_iterator_deref(struct ZigClangEnumDecl_enumerator_iterator);
1490ZIG_EXTERN_C bool ZigClangEnumDecl_enumerator_iterator_neq(
1491 struct ZigClangEnumDecl_enumerator_iterator a,
1492 struct ZigClangEnumDecl_enumerator_iterator b);
1493
1494ZIG_EXTERN_C const ZigClangNamedDecl* ZigClangDecl_castToNamedDecl(const ZigClangDecl *self);
1495ZIG_EXTERN_C const char *ZigClangNamedDecl_getName_bytes_begin(const struct ZigClangNamedDecl *self);
1496ZIG_EXTERN_C enum ZigClangDeclKind ZigClangDecl_getKind(const struct ZigClangDecl *decl);
1497ZIG_EXTERN_C const char *ZigClangDecl_getDeclKindName(const struct ZigClangDecl *decl);
1498
1499ZIG_EXTERN_C struct ZigClangQualType ZigClangVarDecl_getType(const struct ZigClangVarDecl *);
1500ZIG_EXTERN_C const struct ZigClangExpr *ZigClangVarDecl_getInit(const struct ZigClangVarDecl *var_decl);
1501ZIG_EXTERN_C enum ZigClangVarDecl_TLSKind ZigClangVarDecl_getTLSKind(const struct ZigClangVarDecl *var_decl);
1502ZIG_EXTERN_C struct ZigClangSourceLocation ZigClangVarDecl_getLocation(const struct ZigClangVarDecl *);
1503ZIG_EXTERN_C bool ZigClangVarDecl_hasExternalStorage(const struct ZigClangVarDecl *);
1504ZIG_EXTERN_C bool ZigClangVarDecl_isFileVarDecl(const struct ZigClangVarDecl *);
1505ZIG_EXTERN_C bool ZigClangVarDecl_hasInit(const struct ZigClangVarDecl *);
1506ZIG_EXTERN_C const struct ZigClangAPValue *ZigClangVarDecl_evaluateValue(const struct ZigClangVarDecl *);
1507ZIG_EXTERN_C struct ZigClangQualType ZigClangVarDecl_getTypeSourceInfo_getType(const struct ZigClangVarDecl *);
1508ZIG_EXTERN_C enum ZigClangStorageClass ZigClangVarDecl_getStorageClass(const struct ZigClangVarDecl *self);
1509ZIG_EXTERN_C bool ZigClangVarDecl_isStaticLocal(const struct ZigClangVarDecl *self);
1510
1511ZIG_EXTERN_C bool ZigClangSourceLocation_eq(struct ZigClangSourceLocation a, struct ZigClangSourceLocation b);
1512
1513ZIG_EXTERN_C const struct ZigClangTypedefNameDecl *ZigClangTypedefType_getDecl(const struct ZigClangTypedefType *);
1514ZIG_EXTERN_C struct ZigClangQualType ZigClangTypedefNameDecl_getUnderlyingType(const struct ZigClangTypedefNameDecl *);
1515
1516ZIG_EXTERN_C struct ZigClangQualType ZigClangQualType_getCanonicalType(struct ZigClangQualType);
1517ZIG_EXTERN_C const struct ZigClangType *ZigClangQualType_getTypePtr(struct ZigClangQualType);
1518ZIG_EXTERN_C enum ZigClangTypeClass ZigClangQualType_getTypeClass(struct ZigClangQualType);
1519ZIG_EXTERN_C void ZigClangQualType_addConst(struct ZigClangQualType *);
1520ZIG_EXTERN_C bool ZigClangQualType_eq(struct ZigClangQualType, struct ZigClangQualType);
1521ZIG_EXTERN_C bool ZigClangQualType_isConstQualified(struct ZigClangQualType);
1522ZIG_EXTERN_C bool ZigClangQualType_isVolatileQualified(struct ZigClangQualType);
1523ZIG_EXTERN_C bool ZigClangQualType_isRestrictQualified(struct ZigClangQualType);
1524
1525ZIG_EXTERN_C enum ZigClangTypeClass ZigClangType_getTypeClass(const struct ZigClangType *self);
1526ZIG_EXTERN_C struct ZigClangQualType ZigClangType_getPointeeType(const struct ZigClangType *self);
1527ZIG_EXTERN_C bool ZigClangType_isBooleanType(const struct ZigClangType *self);
1528ZIG_EXTERN_C bool ZigClangType_isVoidType(const struct ZigClangType *self);
1529ZIG_EXTERN_C bool ZigClangType_isArrayType(const struct ZigClangType *self);
1530ZIG_EXTERN_C bool ZigClangType_isRecordType(const struct ZigClangType *self);
1531ZIG_EXTERN_C bool ZigClangType_isVectorType(const struct ZigClangType *self);
1532ZIG_EXTERN_C bool ZigClangType_isIncompleteOrZeroLengthArrayType(const ZigClangQualType *self, const struct ZigClangASTContext *ctx);
1533ZIG_EXTERN_C bool ZigClangType_isConstantArrayType(const ZigClangType *self);
1534ZIG_EXTERN_C const char *ZigClangType_getTypeClassName(const struct ZigClangType *self);
1535ZIG_EXTERN_C const struct ZigClangArrayType *ZigClangType_getAsArrayTypeUnsafe(const struct ZigClangType *self);
1536ZIG_EXTERN_C const ZigClangRecordType *ZigClangType_getAsRecordType(const ZigClangType *self);
1537ZIG_EXTERN_C const ZigClangRecordType *ZigClangType_getAsUnionType(const ZigClangType *self);
1538
1539ZIG_EXTERN_C struct ZigClangSourceLocation ZigClangStmt_getBeginLoc(const struct ZigClangStmt *self);
1540ZIG_EXTERN_C enum ZigClangStmtClass ZigClangStmt_getStmtClass(const struct ZigClangStmt *self);
1541ZIG_EXTERN_C bool ZigClangStmt_classof_Expr(const struct ZigClangStmt *self);
1542
1543ZIG_EXTERN_C enum ZigClangStmtClass ZigClangExpr_getStmtClass(const struct ZigClangExpr *self);
1544ZIG_EXTERN_C struct ZigClangQualType ZigClangExpr_getType(const struct ZigClangExpr *self);
1545ZIG_EXTERN_C struct ZigClangSourceLocation ZigClangExpr_getBeginLoc(const struct ZigClangExpr *self);
1546ZIG_EXTERN_C bool ZigClangExpr_EvaluateAsBooleanCondition(const struct ZigClangExpr *self,
1547 bool *result, const struct ZigClangASTContext *ctx, bool in_constant_context);
1548ZIG_EXTERN_C bool ZigClangExpr_EvaluateAsFloat(const struct ZigClangExpr *self,
1549 ZigClangAPFloat **result, const struct ZigClangASTContext *ctx);
1550ZIG_EXTERN_C bool ZigClangExpr_EvaluateAsConstantExpr(const struct ZigClangExpr *,
1551 struct ZigClangExprEvalResult *, ZigClangExpr_ConstantExprKind, const struct ZigClangASTContext *);
1552ZIG_EXTERN_C const struct ZigClangStringLiteral *ZigClangExpr_castToStringLiteral(const struct ZigClangExpr *self);
1553
1554ZIG_EXTERN_C const ZigClangExpr *ZigClangInitListExpr_getInit(const ZigClangInitListExpr *, unsigned);
1555ZIG_EXTERN_C const ZigClangExpr *ZigClangInitListExpr_getArrayFiller(const ZigClangInitListExpr *);
1556ZIG_EXTERN_C bool ZigClangInitListExpr_hasArrayFiller(const ZigClangInitListExpr *);
1557ZIG_EXTERN_C bool ZigClangInitListExpr_isStringLiteralInit(const ZigClangInitListExpr *);
1558ZIG_EXTERN_C unsigned ZigClangInitListExpr_getNumInits(const ZigClangInitListExpr *);
1559ZIG_EXTERN_C const ZigClangFieldDecl *ZigClangInitListExpr_getInitializedFieldInUnion(const ZigClangInitListExpr *self);
1560
1561ZIG_EXTERN_C enum ZigClangAPValueKind ZigClangAPValue_getKind(const struct ZigClangAPValue *self);
1562ZIG_EXTERN_C const struct ZigClangAPSInt *ZigClangAPValue_getInt(const struct ZigClangAPValue *self);
1563ZIG_EXTERN_C unsigned ZigClangAPValue_getArrayInitializedElts(const struct ZigClangAPValue *self);
1564ZIG_EXTERN_C const struct ZigClangAPValue *ZigClangAPValue_getArrayInitializedElt(const struct ZigClangAPValue *self, unsigned i);
1565ZIG_EXTERN_C const struct ZigClangAPValue *ZigClangAPValue_getArrayFiller(const struct ZigClangAPValue *self);
1566ZIG_EXTERN_C unsigned ZigClangAPValue_getArraySize(const struct ZigClangAPValue *self);
1567ZIG_EXTERN_C struct ZigClangAPValueLValueBase ZigClangAPValue_getLValueBase(const struct ZigClangAPValue *self);
1568
1569ZIG_EXTERN_C bool ZigClangAPSInt_isSigned(const struct ZigClangAPSInt *self);
1570ZIG_EXTERN_C bool ZigClangAPSInt_isNegative(const struct ZigClangAPSInt *self);
1571ZIG_EXTERN_C const struct ZigClangAPSInt *ZigClangAPSInt_negate(const struct ZigClangAPSInt *self);
1572ZIG_EXTERN_C void ZigClangAPSInt_free(const struct ZigClangAPSInt *self);
1573ZIG_EXTERN_C const uint64_t *ZigClangAPSInt_getRawData(const struct ZigClangAPSInt *self);
1574ZIG_EXTERN_C unsigned ZigClangAPSInt_getNumWords(const struct ZigClangAPSInt *self);
1575ZIG_EXTERN_C bool ZigClangAPSInt_lessThanEqual(const struct ZigClangAPSInt *self, uint64_t rhs);
1576
1577ZIG_EXTERN_C void ZigClangAPInt_free(const struct ZigClangAPInt *self);
1578ZIG_EXTERN_C uint64_t ZigClangAPInt_getLimitedValue(const struct ZigClangAPInt *self, uint64_t limit);
1579
1580ZIG_EXTERN_C const struct ZigClangExpr *ZigClangAPValueLValueBase_dyn_cast_Expr(struct ZigClangAPValueLValueBase self);
1581
1582ZIG_EXTERN_C enum ZigClangBuiltinTypeKind ZigClangBuiltinType_getKind(const struct ZigClangBuiltinType *self);
1583
1584ZIG_EXTERN_C bool ZigClangFunctionType_getNoReturnAttr(const struct ZigClangFunctionType *self);
1585ZIG_EXTERN_C enum ZigClangCallingConv ZigClangFunctionType_getCallConv(const struct ZigClangFunctionType *self);
1586ZIG_EXTERN_C struct ZigClangQualType ZigClangFunctionType_getReturnType(const struct ZigClangFunctionType *self);
1587
1588ZIG_EXTERN_C const struct ZigClangExpr *ZigClangGenericSelectionExpr_getResultExpr(const struct ZigClangGenericSelectionExpr *self);
1589
1590ZIG_EXTERN_C bool ZigClangFunctionProtoType_isVariadic(const struct ZigClangFunctionProtoType *self);
1591ZIG_EXTERN_C unsigned ZigClangFunctionProtoType_getNumParams(const struct ZigClangFunctionProtoType *self);
1592ZIG_EXTERN_C struct ZigClangQualType ZigClangFunctionProtoType_getParamType(const struct ZigClangFunctionProtoType *self, unsigned i);
1593ZIG_EXTERN_C struct ZigClangQualType ZigClangFunctionProtoType_getReturnType(const struct ZigClangFunctionProtoType *self);
1594
1595
1596ZIG_EXTERN_C ZigClangCompoundStmt_const_body_iterator ZigClangCompoundStmt_body_begin(const struct ZigClangCompoundStmt *self);
1597ZIG_EXTERN_C ZigClangCompoundStmt_const_body_iterator ZigClangCompoundStmt_body_end(const struct ZigClangCompoundStmt *self);
1598
1599ZIG_EXTERN_C ZigClangDeclStmt_const_decl_iterator ZigClangDeclStmt_decl_begin(const struct ZigClangDeclStmt *self);
1600ZIG_EXTERN_C ZigClangDeclStmt_const_decl_iterator ZigClangDeclStmt_decl_end(const struct ZigClangDeclStmt *self);
1601ZIG_EXTERN_C struct ZigClangSourceLocation ZigClangDeclStmt_getBeginLoc(const struct ZigClangDeclStmt *self);
1602
1603ZIG_EXTERN_C unsigned ZigClangAPFloat_convertToHexString(const struct ZigClangAPFloat *self, char *DST,
1604 unsigned HexDigits, bool UpperCase, enum ZigClangAPFloat_roundingMode RM);
1605ZIG_EXTERN_C double ZigClangFloatingLiteral_getValueAsApproximateDouble(const ZigClangFloatingLiteral *self);
1606ZIG_EXTERN_C void ZigClangFloatingLiteral_getValueAsApproximateQuadBits(const ZigClangFloatingLiteral *self, uint64_t *low, uint64_t *high);
1607ZIG_EXTERN_C struct ZigClangSourceLocation ZigClangFloatingLiteral_getBeginLoc(const struct ZigClangFloatingLiteral *);
1608ZIG_EXTERN_C ZigClangAPFloatBase_Semantics ZigClangFloatingLiteral_getRawSemantics(const ZigClangFloatingLiteral *self);
1609
1610
1611ZIG_EXTERN_C enum ZigClangCharacterLiteralKind ZigClangStringLiteral_getKind(
1612 const struct ZigClangStringLiteral *self);
1613ZIG_EXTERN_C uint32_t ZigClangStringLiteral_getCodeUnit(const struct ZigClangStringLiteral *self, size_t i);
1614ZIG_EXTERN_C unsigned ZigClangStringLiteral_getLength(const struct ZigClangStringLiteral *self);
1615ZIG_EXTERN_C unsigned ZigClangStringLiteral_getCharByteWidth(const struct ZigClangStringLiteral *self);
1616
1617ZIG_EXTERN_C const char *ZigClangStringLiteral_getString_bytes_begin_size(const struct ZigClangStringLiteral *self,
1618 size_t *len);
1619
1620ZIG_EXTERN_C const struct ZigClangStringLiteral *ZigClangPredefinedExpr_getFunctionName(
1621 const struct ZigClangPredefinedExpr *self);
1622
1623ZIG_EXTERN_C struct ZigClangSourceLocation ZigClangImplicitCastExpr_getBeginLoc(const struct ZigClangImplicitCastExpr *);
1624ZIG_EXTERN_C enum ZigClangCK ZigClangImplicitCastExpr_getCastKind(const struct ZigClangImplicitCastExpr *);
1625ZIG_EXTERN_C const struct ZigClangExpr *ZigClangImplicitCastExpr_getSubExpr(const struct ZigClangImplicitCastExpr *);
1626
1627ZIG_EXTERN_C struct ZigClangQualType ZigClangArrayType_getElementType(const struct ZigClangArrayType *);
1628
1629ZIG_EXTERN_C struct ZigClangQualType ZigClangIncompleteArrayType_getElementType(const struct ZigClangIncompleteArrayType *);
1630
1631ZIG_EXTERN_C struct ZigClangQualType ZigClangConstantArrayType_getElementType(const struct ZigClangConstantArrayType *);
1632ZIG_EXTERN_C void ZigClangConstantArrayType_getSize(const struct ZigClangConstantArrayType *, const struct ZigClangAPInt **result);
1633
1634ZIG_EXTERN_C const struct ZigClangValueDecl *ZigClangDeclRefExpr_getDecl(const struct ZigClangDeclRefExpr *);
1635ZIG_EXTERN_C const struct ZigClangNamedDecl *ZigClangDeclRefExpr_getFoundDecl(const struct ZigClangDeclRefExpr *);
1636
1637ZIG_EXTERN_C struct ZigClangQualType ZigClangParenType_getInnerType(const struct ZigClangParenType *);
1638
1639ZIG_EXTERN_C struct ZigClangQualType ZigClangAttributedType_getEquivalentType(const struct ZigClangAttributedType *);
1640
1641ZIG_EXTERN_C struct ZigClangQualType ZigClangMacroQualifiedType_getModifiedType(const struct ZigClangMacroQualifiedType *);
1642
1643ZIG_EXTERN_C struct ZigClangQualType ZigClangTypeOfType_getUnmodifiedType(const struct ZigClangTypeOfType *);
1644
1645ZIG_EXTERN_C const struct ZigClangExpr *ZigClangTypeOfExprType_getUnderlyingExpr(const struct ZigClangTypeOfExprType *);
1646
1647ZIG_EXTERN_C enum ZigClangOffsetOfNode_Kind ZigClangOffsetOfNode_getKind(const struct ZigClangOffsetOfNode *);
1648ZIG_EXTERN_C unsigned ZigClangOffsetOfNode_getArrayExprIndex(const struct ZigClangOffsetOfNode *);
1649ZIG_EXTERN_C struct ZigClangFieldDecl * ZigClangOffsetOfNode_getField(const struct ZigClangOffsetOfNode *);
1650
1651ZIG_EXTERN_C unsigned ZigClangOffsetOfExpr_getNumComponents(const struct ZigClangOffsetOfExpr *);
1652ZIG_EXTERN_C unsigned ZigClangOffsetOfExpr_getNumExpressions(const struct ZigClangOffsetOfExpr *);
1653ZIG_EXTERN_C const struct ZigClangExpr *ZigClangOffsetOfExpr_getIndexExpr(const struct ZigClangOffsetOfExpr *, unsigned idx);
1654ZIG_EXTERN_C const struct ZigClangOffsetOfNode *ZigClangOffsetOfExpr_getComponent(const struct ZigClangOffsetOfExpr *, unsigned idx);
1655ZIG_EXTERN_C struct ZigClangSourceLocation ZigClangOffsetOfExpr_getBeginLoc(const struct ZigClangOffsetOfExpr *);
1656
1657ZIG_EXTERN_C struct ZigClangQualType ZigClangElaboratedType_getNamedType(const struct ZigClangElaboratedType *);
1658ZIG_EXTERN_C enum ZigClangElaboratedTypeKeyword ZigClangElaboratedType_getKeyword(const struct ZigClangElaboratedType *);
1659
1660ZIG_EXTERN_C struct ZigClangSourceLocation ZigClangCStyleCastExpr_getBeginLoc(const struct ZigClangCStyleCastExpr *);
1661ZIG_EXTERN_C const struct ZigClangExpr *ZigClangCStyleCastExpr_getSubExpr(const struct ZigClangCStyleCastExpr *);
1662ZIG_EXTERN_C struct ZigClangQualType ZigClangCStyleCastExpr_getType(const struct ZigClangCStyleCastExpr *);
1663
1664ZIG_EXTERN_C bool ZigClangIntegerLiteral_EvaluateAsInt(const struct ZigClangIntegerLiteral *, struct ZigClangExprEvalResult *, const struct ZigClangASTContext *);
1665ZIG_EXTERN_C struct ZigClangSourceLocation ZigClangIntegerLiteral_getBeginLoc(const struct ZigClangIntegerLiteral *);
1666ZIG_EXTERN_C bool ZigClangIntegerLiteral_getSignum(const struct ZigClangIntegerLiteral *, int *, const struct ZigClangASTContext *);
1667
1668ZIG_EXTERN_C const struct ZigClangExpr *ZigClangReturnStmt_getRetValue(const struct ZigClangReturnStmt *);
1669
1670ZIG_EXTERN_C enum ZigClangBO ZigClangBinaryOperator_getOpcode(const struct ZigClangBinaryOperator *);
1671ZIG_EXTERN_C struct ZigClangSourceLocation ZigClangBinaryOperator_getBeginLoc(const struct ZigClangBinaryOperator *);
1672ZIG_EXTERN_C const struct ZigClangExpr *ZigClangBinaryOperator_getLHS(const struct ZigClangBinaryOperator *);
1673ZIG_EXTERN_C const struct ZigClangExpr *ZigClangBinaryOperator_getRHS(const struct ZigClangBinaryOperator *);
1674ZIG_EXTERN_C struct ZigClangQualType ZigClangBinaryOperator_getType(const struct ZigClangBinaryOperator *);
1675
1676ZIG_EXTERN_C const struct ZigClangExpr *ZigClangConvertVectorExpr_getSrcExpr(const struct ZigClangConvertVectorExpr *);
1677ZIG_EXTERN_C struct ZigClangQualType ZigClangConvertVectorExpr_getTypeSourceInfo_getType(const struct ZigClangConvertVectorExpr *);
1678
1679ZIG_EXTERN_C struct ZigClangQualType ZigClangDecayedType_getDecayedType(const struct ZigClangDecayedType *);
1680
1681ZIG_EXTERN_C const struct ZigClangCompoundStmt *ZigClangStmtExpr_getSubStmt(const struct ZigClangStmtExpr *);
1682
1683ZIG_EXTERN_C enum ZigClangCK ZigClangCastExpr_getCastKind(const struct ZigClangCastExpr *);
1684ZIG_EXTERN_C const struct ZigClangFieldDecl *ZigClangCastExpr_getTargetFieldForToUnionCast(const struct ZigClangCastExpr *, struct ZigClangQualType, struct ZigClangQualType);
1685
1686ZIG_EXTERN_C struct ZigClangSourceLocation ZigClangCharacterLiteral_getBeginLoc(const struct ZigClangCharacterLiteral *);
1687ZIG_EXTERN_C enum ZigClangCharacterLiteralKind ZigClangCharacterLiteral_getKind(const struct ZigClangCharacterLiteral *);
1688ZIG_EXTERN_C unsigned ZigClangCharacterLiteral_getValue(const struct ZigClangCharacterLiteral *);
1689
1690ZIG_EXTERN_C const struct ZigClangExpr *ZigClangChooseExpr_getChosenSubExpr(const struct ZigClangChooseExpr *);
1691
1692ZIG_EXTERN_C const struct ZigClangExpr *ZigClangAbstractConditionalOperator_getCond(const struct ZigClangAbstractConditionalOperator *);
1693ZIG_EXTERN_C const struct ZigClangExpr *ZigClangAbstractConditionalOperator_getTrueExpr(const struct ZigClangAbstractConditionalOperator *);
1694ZIG_EXTERN_C const struct ZigClangExpr *ZigClangAbstractConditionalOperator_getFalseExpr(const struct ZigClangAbstractConditionalOperator *);
1695
1696ZIG_EXTERN_C struct ZigClangQualType ZigClangCompoundAssignOperator_getType(const struct ZigClangCompoundAssignOperator *);
1697ZIG_EXTERN_C struct ZigClangQualType ZigClangCompoundAssignOperator_getComputationLHSType(const struct ZigClangCompoundAssignOperator *);
1698ZIG_EXTERN_C struct ZigClangQualType ZigClangCompoundAssignOperator_getComputationResultType(const struct ZigClangCompoundAssignOperator *);
1699ZIG_EXTERN_C struct ZigClangSourceLocation ZigClangCompoundAssignOperator_getBeginLoc(const struct ZigClangCompoundAssignOperator *);
1700ZIG_EXTERN_C enum ZigClangBO ZigClangCompoundAssignOperator_getOpcode(const struct ZigClangCompoundAssignOperator *);
1701ZIG_EXTERN_C const struct ZigClangExpr *ZigClangCompoundAssignOperator_getLHS(const struct ZigClangCompoundAssignOperator *);
1702ZIG_EXTERN_C const struct ZigClangExpr *ZigClangCompoundAssignOperator_getRHS(const struct ZigClangCompoundAssignOperator *);
1703
1704ZIG_EXTERN_C const struct ZigClangExpr *ZigClangCompoundLiteralExpr_getInitializer(const struct ZigClangCompoundLiteralExpr *);
1705
1706ZIG_EXTERN_C enum ZigClangUO ZigClangUnaryOperator_getOpcode(const struct ZigClangUnaryOperator *);
1707ZIG_EXTERN_C struct ZigClangQualType ZigClangUnaryOperator_getType(const struct ZigClangUnaryOperator *);
1708ZIG_EXTERN_C const struct ZigClangExpr *ZigClangUnaryOperator_getSubExpr(const struct ZigClangUnaryOperator *);
1709ZIG_EXTERN_C struct ZigClangSourceLocation ZigClangUnaryOperator_getBeginLoc(const struct ZigClangUnaryOperator *);
1710
1711ZIG_EXTERN_C struct ZigClangQualType ZigClangValueDecl_getType(const struct ZigClangValueDecl *);
1712
1713ZIG_EXTERN_C struct ZigClangQualType ZigClangVectorType_getElementType(const struct ZigClangVectorType *);
1714ZIG_EXTERN_C unsigned ZigClangVectorType_getNumElements(const struct ZigClangVectorType *);
1715
1716ZIG_EXTERN_C const struct ZigClangExpr *ZigClangWhileStmt_getCond(const struct ZigClangWhileStmt *);
1717ZIG_EXTERN_C const struct ZigClangStmt *ZigClangWhileStmt_getBody(const struct ZigClangWhileStmt *);
1718
1719ZIG_EXTERN_C const struct ZigClangStmt *ZigClangIfStmt_getThen(const struct ZigClangIfStmt *);
1720ZIG_EXTERN_C const struct ZigClangStmt *ZigClangIfStmt_getElse(const struct ZigClangIfStmt *);
1721ZIG_EXTERN_C const struct ZigClangExpr *ZigClangIfStmt_getCond(const struct ZigClangIfStmt *);
1722
1723ZIG_EXTERN_C const struct ZigClangExpr *ZigClangCallExpr_getCallee(const struct ZigClangCallExpr *);
1724ZIG_EXTERN_C unsigned ZigClangCallExpr_getNumArgs(const struct ZigClangCallExpr *);
1725ZIG_EXTERN_C const struct ZigClangExpr * const * ZigClangCallExpr_getArgs(const struct ZigClangCallExpr *);
1726
1727ZIG_EXTERN_C const struct ZigClangExpr *ZigClangMemberExpr_getBase(const struct ZigClangMemberExpr *);
1728ZIG_EXTERN_C bool ZigClangMemberExpr_isArrow(const struct ZigClangMemberExpr *);
1729ZIG_EXTERN_C const struct ZigClangValueDecl * ZigClangMemberExpr_getMemberDecl(const struct ZigClangMemberExpr *);
1730
1731ZIG_EXTERN_C const ZigClangExpr *ZigClangOpaqueValueExpr_getSourceExpr(const struct ZigClangOpaqueValueExpr *);
1732
1733ZIG_EXTERN_C const struct ZigClangExpr *ZigClangArraySubscriptExpr_getBase(const struct ZigClangArraySubscriptExpr *);
1734ZIG_EXTERN_C const struct ZigClangExpr *ZigClangArraySubscriptExpr_getIdx(const struct ZigClangArraySubscriptExpr *);
1735
1736ZIG_EXTERN_C struct ZigClangQualType ZigClangUnaryExprOrTypeTraitExpr_getTypeOfArgument(const struct ZigClangUnaryExprOrTypeTraitExpr *);
1737ZIG_EXTERN_C struct ZigClangSourceLocation ZigClangUnaryExprOrTypeTraitExpr_getBeginLoc(const struct ZigClangUnaryExprOrTypeTraitExpr *);
1738ZIG_EXTERN_C enum ZigClangUnaryExprOrTypeTrait_Kind ZigClangUnaryExprOrTypeTraitExpr_getKind(const struct ZigClangUnaryExprOrTypeTraitExpr *);
1739
1740ZIG_EXTERN_C unsigned ZigClangShuffleVectorExpr_getNumSubExprs(const struct ZigClangShuffleVectorExpr *);
1741ZIG_EXTERN_C const struct ZigClangExpr *ZigClangShuffleVectorExpr_getExpr(const struct ZigClangShuffleVectorExpr *, unsigned);
1742
1743ZIG_EXTERN_C const struct ZigClangStmt *ZigClangDoStmt_getBody(const struct ZigClangDoStmt *);
1744ZIG_EXTERN_C const struct ZigClangExpr *ZigClangDoStmt_getCond(const struct ZigClangDoStmt *);
1745
1746ZIG_EXTERN_C const struct ZigClangStmt *ZigClangForStmt_getInit(const struct ZigClangForStmt *);
1747ZIG_EXTERN_C const struct ZigClangExpr *ZigClangForStmt_getCond(const struct ZigClangForStmt *);
1748ZIG_EXTERN_C const struct ZigClangExpr *ZigClangForStmt_getInc(const struct ZigClangForStmt *);
1749ZIG_EXTERN_C const struct ZigClangStmt *ZigClangForStmt_getBody(const struct ZigClangForStmt *);
1750
1751ZIG_EXTERN_C const struct ZigClangDeclStmt *ZigClangSwitchStmt_getConditionVariableDeclStmt(const struct ZigClangSwitchStmt *);
1752ZIG_EXTERN_C const struct ZigClangExpr *ZigClangSwitchStmt_getCond(const struct ZigClangSwitchStmt *);
1753ZIG_EXTERN_C const struct ZigClangStmt *ZigClangSwitchStmt_getBody(const struct ZigClangSwitchStmt *);
1754ZIG_EXTERN_C bool ZigClangSwitchStmt_isAllEnumCasesCovered(const struct ZigClangSwitchStmt *);
1755
1756ZIG_EXTERN_C const struct ZigClangExpr *ZigClangCaseStmt_getLHS(const struct ZigClangCaseStmt *);
1757ZIG_EXTERN_C const struct ZigClangExpr *ZigClangCaseStmt_getRHS(const struct ZigClangCaseStmt *);
1758ZIG_EXTERN_C struct ZigClangSourceLocation ZigClangCaseStmt_getBeginLoc(const struct ZigClangCaseStmt *);
1759ZIG_EXTERN_C const struct ZigClangStmt *ZigClangCaseStmt_getSubStmt(const struct ZigClangCaseStmt *);
1760
1761ZIG_EXTERN_C const struct ZigClangStmt *ZigClangDefaultStmt_getSubStmt(const struct ZigClangDefaultStmt *);
1762
1763ZIG_EXTERN_C const struct ZigClangExpr *ZigClangParenExpr_getSubExpr(const struct ZigClangParenExpr *);
1764
1765ZIG_EXTERN_C const char *ZigClangMacroDefinitionRecord_getName_getNameStart(const struct ZigClangMacroDefinitionRecord *);
1766ZIG_EXTERN_C struct ZigClangSourceLocation ZigClangMacroDefinitionRecord_getSourceRange_getBegin(const struct ZigClangMacroDefinitionRecord *);
1767ZIG_EXTERN_C struct ZigClangSourceLocation ZigClangMacroDefinitionRecord_getSourceRange_getEnd(const struct ZigClangMacroDefinitionRecord *);
1768
1769ZIG_EXTERN_C bool ZigClangFieldDecl_isBitField(const struct ZigClangFieldDecl *);
1770ZIG_EXTERN_C bool ZigClangFieldDecl_isAnonymousStructOrUnion(const ZigClangFieldDecl *);
1771ZIG_EXTERN_C struct ZigClangQualType ZigClangFieldDecl_getType(const struct ZigClangFieldDecl *);
1772ZIG_EXTERN_C struct ZigClangSourceLocation ZigClangFieldDecl_getLocation(const struct ZigClangFieldDecl *);
1773ZIG_EXTERN_C const struct ZigClangRecordDecl *ZigClangFieldDecl_getParent(const struct ZigClangFieldDecl *);
1774ZIG_EXTERN_C unsigned ZigClangFieldDecl_getFieldIndex(const struct ZigClangFieldDecl *);
1775
1776ZIG_EXTERN_C const struct ZigClangAPSInt *ZigClangEnumConstantDecl_getInitVal(const struct ZigClangEnumConstantDecl *);
1777ZIG_EXTERN_C bool ZigClangIsLLVMUsingSeparateLibcxx();
1778#endif