-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathgenerated_types.h
7195 lines (6790 loc) · 274 KB
/
generated_types.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#ifndef GENERATED_TYPES_H
#define GENERATED_TYPES_H
#include "prelude.h"
_Pragma("warning (push)") _Pragma("warning (default: 4820)")
typedef void(*fn_type_opaque)();
typedef struct { u8 bits; } i8;
typedef struct { u16 bits; } i16;
typedef struct { u32 bits; } i32;
typedef struct { u64 bits; } i64;
// Forward declarations
typedef struct Bits Bits;
typedef dyn_array_type(Bits *) Array_Bits_Ptr;
typedef dyn_array_type(const Bits *) Array_Const_Bits_Ptr;
typedef struct Source_Position Source_Position;
typedef dyn_array_type(Source_Position *) Array_Source_Position_Ptr;
typedef dyn_array_type(const Source_Position *) Array_Const_Source_Position_Ptr;
typedef struct Source_File Source_File;
typedef dyn_array_type(Source_File *) Array_Source_File_Ptr;
typedef dyn_array_type(const Source_File *) Array_Const_Source_File_Ptr;
typedef struct Source_Range Source_Range;
typedef dyn_array_type(Source_Range *) Array_Source_Range_Ptr;
typedef dyn_array_type(const Source_Range *) Array_Const_Source_Range_Ptr;
typedef struct Mass_While Mass_While;
typedef dyn_array_type(Mass_While *) Array_Mass_While_Ptr;
typedef dyn_array_type(const Mass_While *) Array_Const_Mass_While_Ptr;
typedef struct Assignment Assignment;
typedef dyn_array_type(Assignment *) Array_Assignment_Ptr;
typedef dyn_array_type(const Assignment *) Array_Const_Assignment_Ptr;
typedef struct Module_Exports Module_Exports;
typedef struct Module_Exports_Selective Module_Exports_Selective;
typedef dyn_array_type(Module_Exports *) Array_Module_Exports_Ptr;
typedef dyn_array_type(const Module_Exports *) Array_Const_Module_Exports_Ptr;
typedef struct Module Module;
typedef dyn_array_type(Module *) Array_Module_Ptr;
typedef dyn_array_type(const Module *) Array_Const_Module_Ptr;
typedef struct Parse_Error Parse_Error;
typedef dyn_array_type(Parse_Error *) Array_Parse_Error_Ptr;
typedef dyn_array_type(const Parse_Error *) Array_Const_Parse_Error_Ptr;
typedef struct Value_View Value_View;
typedef dyn_array_type(Value_View *) Array_Value_View_Ptr;
typedef dyn_array_type(const Value_View *) Array_Const_Value_View_Ptr;
typedef struct Symbol Symbol;
typedef dyn_array_type(Symbol *) Array_Symbol_Ptr;
typedef dyn_array_type(const Symbol *) Array_Const_Symbol_Ptr;
typedef struct Group_Paren Group_Paren;
typedef dyn_array_type(Group_Paren *) Array_Group_Paren_Ptr;
typedef dyn_array_type(const Group_Paren *) Array_Const_Group_Paren_Ptr;
typedef struct Ast_Return Ast_Return;
typedef dyn_array_type(Ast_Return *) Array_Ast_Return_Ptr;
typedef dyn_array_type(const Ast_Return *) Array_Const_Ast_Return_Ptr;
typedef struct Ast_Statement Ast_Statement;
typedef dyn_array_type(Ast_Statement *) Array_Ast_Statement_Ptr;
typedef dyn_array_type(const Ast_Statement *) Array_Const_Ast_Statement_Ptr;
typedef struct Ast_Block Ast_Block;
typedef dyn_array_type(Ast_Block *) Array_Ast_Block_Ptr;
typedef dyn_array_type(const Ast_Block *) Array_Const_Ast_Block_Ptr;
typedef struct Group_Square Group_Square;
typedef dyn_array_type(Group_Square *) Array_Group_Square_Ptr;
typedef dyn_array_type(const Group_Square *) Array_Const_Group_Square_Ptr;
typedef struct Ast_Using Ast_Using;
typedef dyn_array_type(Ast_Using *) Array_Ast_Using_Ptr;
typedef dyn_array_type(const Ast_Using *) Array_Const_Ast_Using_Ptr;
typedef enum Section_Permissions {
Section_Permissions_Read = 1,
Section_Permissions_Write = 2,
Section_Permissions_Execute = 4,
} Section_Permissions;
const char *section_permissions_name(Section_Permissions value) {
if (value == 1) return "Section_Permissions_Read";
if (value == 2) return "Section_Permissions_Write";
if (value == 4) return "Section_Permissions_Execute";
assert(!"Unexpected value for enum Section_Permissions");
return 0;
};
typedef dyn_array_type(Section_Permissions *) Array_Section_Permissions_Ptr;
typedef dyn_array_type(const Section_Permissions *) Array_Const_Section_Permissions_Ptr;
typedef struct Section Section;
typedef dyn_array_type(Section *) Array_Section_Ptr;
typedef dyn_array_type(const Section *) Array_Const_Section_Ptr;
typedef struct Program_Memory Program_Memory;
typedef dyn_array_type(Program_Memory *) Array_Program_Memory_Ptr;
typedef dyn_array_type(const Program_Memory *) Array_Const_Program_Memory_Ptr;
typedef enum Register {
Register_A = 0,
Register_C = 1,
Register_D = 2,
Register_B = 3,
Register_SP = 4,
Register_BP = 5,
Register_SI = 6,
Register_DI = 7,
Register_R8 = 8,
Register_R9 = 9,
Register_R10 = 10,
Register_R11 = 11,
Register_R12 = 12,
Register_R13 = 13,
Register_R14 = 14,
Register_R15 = 15,
Register_Xmm0 = 16,
Register_Xmm1 = 17,
Register_Xmm2 = 18,
Register_Xmm3 = 19,
Register_Xmm4 = 20,
Register_Xmm5 = 21,
Register_Xmm6 = 22,
Register_Xmm7 = 23,
Register_Xmm8 = 24,
Register_Xmm9 = 25,
Register_Xmm10 = 26,
Register_Xmm11 = 27,
Register_Xmm12 = 28,
Register_Xmm13 = 29,
Register_Xmm14 = 30,
Register_Xmm15 = 31,
} Register;
const char *register_name(Register value) {
if (value == 0) return "Register_A";
if (value == 1) return "Register_C";
if (value == 2) return "Register_D";
if (value == 3) return "Register_B";
if (value == 4) return "Register_SP";
if (value == 5) return "Register_BP";
if (value == 6) return "Register_SI";
if (value == 7) return "Register_DI";
if (value == 8) return "Register_R8";
if (value == 9) return "Register_R9";
if (value == 10) return "Register_R10";
if (value == 11) return "Register_R11";
if (value == 12) return "Register_R12";
if (value == 13) return "Register_R13";
if (value == 14) return "Register_R14";
if (value == 15) return "Register_R15";
if (value == 16) return "Register_Xmm0";
if (value == 17) return "Register_Xmm1";
if (value == 18) return "Register_Xmm2";
if (value == 19) return "Register_Xmm3";
if (value == 20) return "Register_Xmm4";
if (value == 21) return "Register_Xmm5";
if (value == 22) return "Register_Xmm6";
if (value == 23) return "Register_Xmm7";
if (value == 24) return "Register_Xmm8";
if (value == 25) return "Register_Xmm9";
if (value == 26) return "Register_Xmm10";
if (value == 27) return "Register_Xmm11";
if (value == 28) return "Register_Xmm12";
if (value == 29) return "Register_Xmm13";
if (value == 30) return "Register_Xmm14";
if (value == 31) return "Register_Xmm15";
assert(!"Unexpected value for enum Register");
return 0;
};
typedef dyn_array_type(Register *) Array_Register_Ptr;
typedef dyn_array_type(const Register *) Array_Const_Register_Ptr;
typedef struct Label Label;
typedef dyn_array_type(Label *) Array_Label_Ptr;
typedef dyn_array_type(const Label *) Array_Const_Label_Ptr;
typedef struct Label_Location_Diff_Patch_Info Label_Location_Diff_Patch_Info;
typedef dyn_array_type(Label_Location_Diff_Patch_Info *) Array_Label_Location_Diff_Patch_Info_Ptr;
typedef dyn_array_type(const Label_Location_Diff_Patch_Info *) Array_Const_Label_Location_Diff_Patch_Info_Ptr;
typedef enum Number_Base {
Number_Base_2 = 2,
Number_Base_10 = 10,
Number_Base_16 = 16,
} Number_Base;
const char *number_base_name(Number_Base value) {
if (value == 2) return "Number_Base_2";
if (value == 10) return "Number_Base_10";
if (value == 16) return "Number_Base_16";
assert(!"Unexpected value for enum Number_Base");
return 0;
};
typedef dyn_array_type(Number_Base *) Array_Number_Base_Ptr;
typedef dyn_array_type(const Number_Base *) Array_Const_Number_Base_Ptr;
typedef struct Quoted Quoted;
typedef dyn_array_type(Quoted *) Array_Quoted_Ptr;
typedef dyn_array_type(const Quoted *) Array_Const_Quoted_Ptr;
typedef struct Spread Spread;
typedef dyn_array_type(Spread *) Array_Spread_Ptr;
typedef dyn_array_type(const Spread *) Array_Const_Spread_Ptr;
typedef struct Named_Accessor Named_Accessor;
typedef dyn_array_type(Named_Accessor *) Array_Named_Accessor_Ptr;
typedef dyn_array_type(const Named_Accessor *) Array_Const_Named_Accessor_Ptr;
typedef struct External_Symbol External_Symbol;
typedef dyn_array_type(External_Symbol *) Array_External_Symbol_Ptr;
typedef dyn_array_type(const External_Symbol *) Array_Const_External_Symbol_Ptr;
typedef struct Import_Symbol Import_Symbol;
typedef dyn_array_type(Import_Symbol *) Array_Import_Symbol_Ptr;
typedef dyn_array_type(const Import_Symbol *) Array_Const_Import_Symbol_Ptr;
typedef struct Import_Library Import_Library;
typedef dyn_array_type(Import_Library *) Array_Import_Library_Ptr;
typedef dyn_array_type(const Import_Library *) Array_Const_Import_Library_Ptr;
typedef enum Compare_Type {
Compare_Type_Equal = 1,
Compare_Type_Not_Equal = 2,
Compare_Type_Unsigned_Below = 3,
Compare_Type_Unsigned_Below_Equal = 4,
Compare_Type_Unsigned_Above = 5,
Compare_Type_Unsigned_Above_Equal = 6,
Compare_Type_Signed_Less = 7,
Compare_Type_Signed_Less_Equal = 8,
Compare_Type_Signed_Greater = 9,
Compare_Type_Signed_Greater_Equal = 10,
} Compare_Type;
const char *compare_type_name(Compare_Type value) {
if (value == 1) return "Compare_Type_Equal";
if (value == 2) return "Compare_Type_Not_Equal";
if (value == 3) return "Compare_Type_Unsigned_Below";
if (value == 4) return "Compare_Type_Unsigned_Below_Equal";
if (value == 5) return "Compare_Type_Unsigned_Above";
if (value == 6) return "Compare_Type_Unsigned_Above_Equal";
if (value == 7) return "Compare_Type_Signed_Less";
if (value == 8) return "Compare_Type_Signed_Less_Equal";
if (value == 9) return "Compare_Type_Signed_Greater";
if (value == 10) return "Compare_Type_Signed_Greater_Equal";
assert(!"Unexpected value for enum Compare_Type");
return 0;
};
typedef dyn_array_type(Compare_Type *) Array_Compare_Type_Ptr;
typedef dyn_array_type(const Compare_Type *) Array_Const_Compare_Type_Ptr;
typedef enum Stack_Area {
Stack_Area_Local = 0,
Stack_Area_Received_Argument = 1,
Stack_Area_Call_Target_Argument = 2,
} Stack_Area;
const char *stack_area_name(Stack_Area value) {
if (value == 0) return "Stack_Area_Local";
if (value == 1) return "Stack_Area_Received_Argument";
if (value == 2) return "Stack_Area_Call_Target_Argument";
assert(!"Unexpected value for enum Stack_Area");
return 0;
};
typedef dyn_array_type(Stack_Area *) Array_Stack_Area_Ptr;
typedef dyn_array_type(const Stack_Area *) Array_Const_Stack_Area_Ptr;
typedef struct Memory_Location Memory_Location;
typedef struct Memory_Location_Instruction_Pointer_Relative Memory_Location_Instruction_Pointer_Relative;
typedef struct Memory_Location_Indirect Memory_Location_Indirect;
typedef struct Memory_Location_Stack Memory_Location_Stack;
typedef dyn_array_type(Memory_Location *) Array_Memory_Location_Ptr;
typedef dyn_array_type(const Memory_Location *) Array_Const_Memory_Location_Ptr;
typedef enum Storage_Flags {
Storage_Flags_None = 0,
Storage_Flags_Temporary = 1,
} Storage_Flags;
const char *storage_flags_name(Storage_Flags value) {
if (value == 0) return "Storage_Flags_None";
if (value == 1) return "Storage_Flags_Temporary";
assert(!"Unexpected value for enum Storage_Flags");
return 0;
};
typedef dyn_array_type(Storage_Flags *) Array_Storage_Flags_Ptr;
typedef dyn_array_type(const Storage_Flags *) Array_Const_Storage_Flags_Ptr;
typedef struct Storage Storage;
typedef struct Storage_Immediate Storage_Immediate;
typedef struct Storage_Eflags Storage_Eflags;
typedef struct Storage_Register Storage_Register;
typedef struct Storage_Xmm Storage_Xmm;
typedef struct Storage_Static Storage_Static;
typedef struct Storage_Memory Storage_Memory;
typedef struct Storage_Disjoint Storage_Disjoint;
typedef dyn_array_type(Storage *) Array_Storage_Ptr;
typedef dyn_array_type(const Storage *) Array_Const_Storage_Ptr;
typedef struct Relocation Relocation;
typedef dyn_array_type(Relocation *) Array_Relocation_Ptr;
typedef dyn_array_type(const Relocation *) Array_Const_Relocation_Ptr;
typedef struct Instruction_Assembly Instruction_Assembly;
typedef dyn_array_type(Instruction_Assembly *) Array_Instruction_Assembly_Ptr;
typedef dyn_array_type(const Instruction_Assembly *) Array_Const_Instruction_Assembly_Ptr;
typedef struct Instruction Instruction;
typedef struct Instruction_Label Instruction_Label;
typedef struct Instruction_Bytes Instruction_Bytes;
typedef struct Instruction_Label_Patch Instruction_Label_Patch;
typedef struct Instruction_Stack_Patch Instruction_Stack_Patch;
typedef struct Instruction_Location Instruction_Location;
typedef dyn_array_type(Instruction *) Array_Instruction_Ptr;
typedef dyn_array_type(const Instruction *) Array_Const_Instruction_Ptr;
typedef struct Instruction_Bucket Instruction_Bucket;
typedef dyn_array_type(Instruction_Bucket *) Array_Instruction_Bucket_Ptr;
typedef dyn_array_type(const Instruction_Bucket *) Array_Const_Instruction_Bucket_Ptr;
typedef struct Code_Block Code_Block;
typedef dyn_array_type(Code_Block *) Array_Code_Block_Ptr;
typedef dyn_array_type(const Code_Block *) Array_Const_Code_Block_Ptr;
typedef struct Epoch Epoch;
typedef dyn_array_type(Epoch *) Array_Epoch_Ptr;
typedef dyn_array_type(const Epoch *) Array_Const_Epoch_Ptr;
typedef struct Function_Layout Function_Layout;
typedef dyn_array_type(Function_Layout *) Array_Function_Layout_Ptr;
typedef dyn_array_type(const Function_Layout *) Array_Const_Function_Layout_Ptr;
typedef struct Mass_Context Mass_Context;
typedef dyn_array_type(Mass_Context *) Array_Mass_Context_Ptr;
typedef dyn_array_type(const Mass_Context *) Array_Const_Mass_Context_Ptr;
typedef enum Parser_Flags {
Parser_Flags_None = 0,
Parser_Flags_Global = 1,
Parser_Flags_Type_Only = 2,
} Parser_Flags;
const char *parser_flags_name(Parser_Flags value) {
if (value == 0) return "Parser_Flags_None";
if (value == 1) return "Parser_Flags_Global";
if (value == 2) return "Parser_Flags_Type_Only";
assert(!"Unexpected value for enum Parser_Flags");
return 0;
};
typedef dyn_array_type(Parser_Flags *) Array_Parser_Flags_Ptr;
typedef dyn_array_type(const Parser_Flags *) Array_Const_Parser_Flags_Ptr;
typedef struct Parser Parser;
typedef dyn_array_type(Parser *) Array_Parser_Ptr;
typedef dyn_array_type(const Parser *) Array_Const_Parser_Ptr;
typedef enum Operator_Fixity {
Operator_Fixity_Infix = 1,
Operator_Fixity_Prefix = 2,
Operator_Fixity_Postfix = 4,
} Operator_Fixity;
const char *operator_fixity_name(Operator_Fixity value) {
if (value == 1) return "Operator_Fixity_Infix";
if (value == 2) return "Operator_Fixity_Prefix";
if (value == 4) return "Operator_Fixity_Postfix";
assert(!"Unexpected value for enum Operator_Fixity");
return 0;
};
typedef dyn_array_type(Operator_Fixity *) Array_Operator_Fixity_Ptr;
typedef dyn_array_type(const Operator_Fixity *) Array_Const_Operator_Fixity_Ptr;
typedef enum Operator_Associativity {
Operator_Associativity_Left = 0,
Operator_Associativity_Right = 1,
} Operator_Associativity;
const char *operator_associativity_name(Operator_Associativity value) {
if (value == 0) return "Operator_Associativity_Left";
if (value == 1) return "Operator_Associativity_Right";
assert(!"Unexpected value for enum Operator_Associativity");
return 0;
};
typedef dyn_array_type(Operator_Associativity *) Array_Operator_Associativity_Ptr;
typedef dyn_array_type(const Operator_Associativity *) Array_Const_Operator_Associativity_Ptr;
typedef enum Operator_Flags {
Operator_Flags_None = 0,
Operator_Flags_Optional_Rhs = 1,
} Operator_Flags;
const char *operator_flags_name(Operator_Flags value) {
if (value == 0) return "Operator_Flags_None";
if (value == 1) return "Operator_Flags_Optional_Rhs";
assert(!"Unexpected value for enum Operator_Flags");
return 0;
};
typedef dyn_array_type(Operator_Flags *) Array_Operator_Flags_Ptr;
typedef dyn_array_type(const Operator_Flags *) Array_Const_Operator_Flags_Ptr;
typedef struct Operator Operator;
typedef struct Operator_Alias Operator_Alias;
typedef struct Operator_Intrinsic Operator_Intrinsic;
typedef dyn_array_type(Operator *) Array_Operator_Ptr;
typedef dyn_array_type(const Operator *) Array_Const_Operator_Ptr;
typedef struct Scope_Entry Scope_Entry;
typedef dyn_array_type(Scope_Entry *) Array_Scope_Entry_Ptr;
typedef dyn_array_type(const Scope_Entry *) Array_Const_Scope_Entry_Ptr;
typedef struct Operator_Map Operator_Map;
typedef struct Operator_Symbol_Map Operator_Symbol_Map;
typedef struct Scope Scope;
typedef struct Scope_Imperative Scope_Imperative;
typedef struct Scope_Declarative Scope_Declarative;
typedef dyn_array_type(Scope *) Array_Scope_Ptr;
typedef dyn_array_type(const Scope *) Array_Const_Scope_Ptr;
typedef struct Overload Overload;
typedef dyn_array_type(Overload *) Array_Overload_Ptr;
typedef dyn_array_type(const Overload *) Array_Const_Overload_Ptr;
typedef struct Undecidable_Match Undecidable_Match;
typedef dyn_array_type(Undecidable_Match *) Array_Undecidable_Match_Ptr;
typedef dyn_array_type(const Undecidable_Match *) Array_Const_Undecidable_Match_Ptr;
typedef struct Overload_Match Overload_Match;
typedef struct Overload_Match_Undecidable Overload_Match_Undecidable;
typedef struct Overload_Match_Found Overload_Match_Found;
typedef dyn_array_type(Overload_Match *) Array_Overload_Match_Ptr;
typedef dyn_array_type(const Overload_Match *) Array_Const_Overload_Match_Ptr;
typedef struct Overload_Match_Summary Overload_Match_Summary;
typedef dyn_array_type(Overload_Match_Summary *) Array_Overload_Match_Summary_Ptr;
typedef dyn_array_type(const Overload_Match_Summary *) Array_Const_Overload_Match_Summary_Ptr;
typedef struct Overload_Match_State Overload_Match_State;
typedef dyn_array_type(Overload_Match_State *) Array_Overload_Match_State_Ptr;
typedef dyn_array_type(const Overload_Match_State *) Array_Const_Overload_Match_State_Ptr;
typedef enum Value_Flags {
Value_Flags_None = 0,
Value_Flags_Constant = 1,
} Value_Flags;
const char *value_flags_name(Value_Flags value) {
if (value == 0) return "Value_Flags_None";
if (value == 1) return "Value_Flags_Constant";
assert(!"Unexpected value for enum Value_Flags");
return 0;
};
typedef dyn_array_type(Value_Flags *) Array_Value_Flags_Ptr;
typedef dyn_array_type(const Value_Flags *) Array_Const_Value_Flags_Ptr;
typedef struct Value Value;
typedef struct Value_Lazy Value_Lazy;
typedef struct Value_Forced Value_Forced;
typedef dyn_array_type(Value *) Array_Value_Ptr;
typedef dyn_array_type(const Value *) Array_Const_Value_Ptr;
typedef struct Register_Bitset Register_Bitset;
typedef dyn_array_type(Register_Bitset *) Array_Register_Bitset_Ptr;
typedef dyn_array_type(const Register_Bitset *) Array_Const_Register_Bitset_Ptr;
typedef struct Function_Builder Function_Builder;
typedef dyn_array_type(Function_Builder *) Array_Function_Builder_Ptr;
typedef dyn_array_type(const Function_Builder *) Array_Const_Function_Builder_Ptr;
typedef struct Expected_Result Expected_Result;
typedef struct Expected_Result_Exact Expected_Result_Exact;
typedef struct Expected_Result_Flexible Expected_Result_Flexible;
typedef dyn_array_type(Expected_Result *) Array_Expected_Result_Ptr;
typedef dyn_array_type(const Expected_Result *) Array_Const_Expected_Result_Ptr;
typedef struct Lazy_Static_Value Lazy_Static_Value;
typedef dyn_array_type(Lazy_Static_Value *) Array_Lazy_Static_Value_Ptr;
typedef dyn_array_type(const Lazy_Static_Value *) Array_Const_Lazy_Static_Value_Ptr;
typedef Value * (*Mass_Intrinsic_Proc)
(Mass_Context * context, Parser * parser, Value_View view);
typedef struct Function_Parameter Function_Parameter;
typedef struct Function_Parameter_Generic Function_Parameter_Generic;
typedef struct Function_Parameter_Exact_Static Function_Parameter_Exact_Static;
typedef dyn_array_type(Function_Parameter *) Array_Function_Parameter_Ptr;
typedef dyn_array_type(const Function_Parameter *) Array_Const_Function_Parameter_Ptr;
typedef struct Resolved_Function_Parameter Resolved_Function_Parameter;
typedef struct Resolved_Function_Parameter_Known Resolved_Function_Parameter_Known;
typedef dyn_array_type(Resolved_Function_Parameter *) Array_Resolved_Function_Parameter_Ptr;
typedef dyn_array_type(const Resolved_Function_Parameter *) Array_Const_Resolved_Function_Parameter_Ptr;
typedef enum Function_Info_Flags {
Function_Info_Flags_None = 0,
Function_Info_Flags_Compile_Time = 2,
Function_Info_Flags_Intrinsic = 4,
} Function_Info_Flags;
const char *function_info_flags_name(Function_Info_Flags value) {
if (value == 0) return "Function_Info_Flags_None";
if (value == 2) return "Function_Info_Flags_Compile_Time";
if (value == 4) return "Function_Info_Flags_Intrinsic";
assert(!"Unexpected value for enum Function_Info_Flags");
return 0;
};
typedef dyn_array_type(Function_Info_Flags *) Array_Function_Info_Flags_Ptr;
typedef dyn_array_type(const Function_Info_Flags *) Array_Const_Function_Info_Flags_Ptr;
typedef struct Function_Return Function_Return;
typedef struct Function_Return_Generic Function_Return_Generic;
typedef struct Function_Return_Exact Function_Return_Exact;
typedef dyn_array_type(Function_Return *) Array_Function_Return_Ptr;
typedef dyn_array_type(const Function_Return *) Array_Const_Function_Return_Ptr;
typedef struct Function_Info Function_Info;
typedef dyn_array_type(Function_Info *) Array_Function_Info_Ptr;
typedef dyn_array_type(const Function_Info *) Array_Const_Function_Info_Ptr;
typedef enum Function_Header_Flags {
Function_Header_Flags_None = 0,
Function_Header_Flags_Intrinsic = 2,
Function_Header_Flags_Compile_Time = 4,
} Function_Header_Flags;
const char *function_header_flags_name(Function_Header_Flags value) {
if (value == 0) return "Function_Header_Flags_None";
if (value == 2) return "Function_Header_Flags_Intrinsic";
if (value == 4) return "Function_Header_Flags_Compile_Time";
assert(!"Unexpected value for enum Function_Header_Flags");
return 0;
};
typedef dyn_array_type(Function_Header_Flags *) Array_Function_Header_Flags_Ptr;
typedef dyn_array_type(const Function_Header_Flags *) Array_Const_Function_Header_Flags_Ptr;
typedef struct Function_Specialization Function_Specialization;
typedef dyn_array_type(Function_Specialization *) Array_Function_Specialization_Ptr;
typedef dyn_array_type(const Function_Specialization *) Array_Const_Function_Specialization_Ptr;
typedef struct Function_Header Function_Header;
typedef dyn_array_type(Function_Header *) Array_Function_Header_Ptr;
typedef dyn_array_type(const Function_Header *) Array_Const_Function_Header_Ptr;
typedef struct Function_Literal Function_Literal;
typedef dyn_array_type(Function_Literal *) Array_Function_Literal_Ptr;
typedef dyn_array_type(const Function_Literal *) Array_Const_Function_Literal_Ptr;
typedef enum Function_Call_Parameter_Flags {
Function_Call_Parameter_Flags_None = 0,
Function_Call_Parameter_Flags_Uninitialized = 1,
Function_Call_Parameter_Flags_Implicit_Pointer = 2,
} Function_Call_Parameter_Flags;
const char *function_call_parameter_flags_name(Function_Call_Parameter_Flags value) {
if (value == 0) return "Function_Call_Parameter_Flags_None";
if (value == 1) return "Function_Call_Parameter_Flags_Uninitialized";
if (value == 2) return "Function_Call_Parameter_Flags_Implicit_Pointer";
assert(!"Unexpected value for enum Function_Call_Parameter_Flags");
return 0;
};
typedef dyn_array_type(Function_Call_Parameter_Flags *) Array_Function_Call_Parameter_Flags_Ptr;
typedef dyn_array_type(const Function_Call_Parameter_Flags *) Array_Const_Function_Call_Parameter_Flags_Ptr;
typedef struct Function_Call_Parameter Function_Call_Parameter;
typedef dyn_array_type(Function_Call_Parameter *) Array_Function_Call_Parameter_Ptr;
typedef dyn_array_type(const Function_Call_Parameter *) Array_Const_Function_Call_Parameter_Ptr;
typedef void (*Mass_Call_Encode_Proc)
(Function_Builder * builder, Storage address_storage, const Source_Range * source_range, const Scope * scope);
typedef struct Function_Call_Setup Function_Call_Setup;
typedef dyn_array_type(Function_Call_Setup *) Array_Function_Call_Setup_Ptr;
typedef dyn_array_type(const Function_Call_Setup *) Array_Const_Function_Call_Setup_Ptr;
typedef enum SYSTEM_V_ARGUMENT_CLASS {
SYSTEM_V_ARGUMENT_CLASS_NO_CLASS = 0,
SYSTEM_V_ARGUMENT_CLASS_INTEGER = 1,
SYSTEM_V_ARGUMENT_CLASS_SSE = 2,
SYSTEM_V_ARGUMENT_CLASS_SSEUP = 3,
SYSTEM_V_ARGUMENT_CLASS_X87 = 4,
SYSTEM_V_ARGUMENT_CLASS_X87UP = 5,
SYSTEM_V_ARGUMENT_CLASS_COMPLEX_X87 = 6,
SYSTEM_V_ARGUMENT_CLASS_MEMORY = 7,
} SYSTEM_V_ARGUMENT_CLASS;
const char *system_v_argument_class_name(SYSTEM_V_ARGUMENT_CLASS value) {
if (value == 0) return "SYSTEM_V_ARGUMENT_CLASS_NO_CLASS";
if (value == 1) return "SYSTEM_V_ARGUMENT_CLASS_INTEGER";
if (value == 2) return "SYSTEM_V_ARGUMENT_CLASS_SSE";
if (value == 3) return "SYSTEM_V_ARGUMENT_CLASS_SSEUP";
if (value == 4) return "SYSTEM_V_ARGUMENT_CLASS_X87";
if (value == 5) return "SYSTEM_V_ARGUMENT_CLASS_X87UP";
if (value == 6) return "SYSTEM_V_ARGUMENT_CLASS_COMPLEX_X87";
if (value == 7) return "SYSTEM_V_ARGUMENT_CLASS_MEMORY";
assert(!"Unexpected value for enum SYSTEM_V_ARGUMENT_CLASS");
return 0;
};
typedef dyn_array_type(SYSTEM_V_ARGUMENT_CLASS *) Array_SYSTEM_V_ARGUMENT_CLASS_Ptr;
typedef dyn_array_type(const SYSTEM_V_ARGUMENT_CLASS *) Array_Const_SYSTEM_V_ARGUMENT_CLASS_Ptr;
typedef struct System_V_Classification System_V_Classification;
typedef dyn_array_type(System_V_Classification *) Array_System_V_Classification_Ptr;
typedef dyn_array_type(const System_V_Classification *) Array_Const_System_V_Classification_Ptr;
typedef struct System_V_Registers System_V_Registers;
typedef dyn_array_type(System_V_Registers *) Array_System_V_Registers_Ptr;
typedef dyn_array_type(const System_V_Registers *) Array_Const_System_V_Registers_Ptr;
typedef struct System_V_Register_State System_V_Register_State;
typedef dyn_array_type(System_V_Register_State *) Array_System_V_Register_State_Ptr;
typedef dyn_array_type(const System_V_Register_State *) Array_Const_System_V_Register_State_Ptr;
typedef struct System_V_Eightbyte_Array System_V_Eightbyte_Array;
typedef dyn_array_type(System_V_Eightbyte_Array *) Array_System_V_Eightbyte_Array_Ptr;
typedef dyn_array_type(const System_V_Eightbyte_Array *) Array_Const_System_V_Eightbyte_Array_Ptr;
typedef struct Mass_Function_Call_Lazy_Payload Mass_Function_Call_Lazy_Payload;
typedef dyn_array_type(Mass_Function_Call_Lazy_Payload *) Array_Mass_Function_Call_Lazy_Payload_Ptr;
typedef dyn_array_type(const Mass_Function_Call_Lazy_Payload *) Array_Const_Mass_Function_Call_Lazy_Payload_Ptr;
typedef struct Tuple Tuple;
typedef dyn_array_type(Tuple *) Array_Tuple_Ptr;
typedef dyn_array_type(const Tuple *) Array_Const_Tuple_Ptr;
typedef struct List_Node List_Node;
typedef dyn_array_type(List_Node *) Array_List_Node_Ptr;
typedef dyn_array_type(const List_Node *) Array_Const_List_Node_Ptr;
typedef struct Typed_Symbol Typed_Symbol;
typedef dyn_array_type(Typed_Symbol *) Array_Typed_Symbol_Ptr;
typedef dyn_array_type(const Typed_Symbol *) Array_Const_Typed_Symbol_Ptr;
typedef struct Struct_Field Struct_Field;
typedef dyn_array_type(Struct_Field *) Array_Struct_Field_Ptr;
typedef dyn_array_type(const Struct_Field *) Array_Const_Struct_Field_Ptr;
typedef struct Descriptor Descriptor;
typedef struct Descriptor_Integer Descriptor_Integer;
typedef struct Descriptor_Function_Instance Descriptor_Function_Instance;
typedef struct Descriptor_Fixed_Array Descriptor_Fixed_Array;
typedef struct Descriptor_Struct Descriptor_Struct;
typedef struct Descriptor_Pointer_To Descriptor_Pointer_To;
typedef dyn_array_type(Descriptor *) Array_Descriptor_Ptr;
typedef dyn_array_type(const Descriptor *) Array_Const_Descriptor_Ptr;
typedef struct Type Type;
typedef dyn_array_type(Type *) Array_Type_Ptr;
typedef dyn_array_type(const Type *) Array_Const_Type_Ptr;
typedef _Bool (*Mass_Type_Constraint_Proc)
(Type type);
typedef struct Mass_Error Mass_Error;
typedef struct Mass_Error_User_Defined Mass_Error_User_Defined;
typedef struct Mass_Error_Circular_Dependency Mass_Error_Circular_Dependency;
typedef struct Mass_Error_Integer_Range Mass_Error_Integer_Range;
typedef struct Mass_Error_File_Open Mass_Error_File_Open;
typedef struct Mass_Error_File_Too_Large Mass_Error_File_Too_Large;
typedef struct Mass_Error_Dynamic_Library_Load Mass_Error_Dynamic_Library_Load;
typedef struct Mass_Error_Dynamic_Library_Symbol_Not_Found Mass_Error_Dynamic_Library_Symbol_Not_Found;
typedef struct Mass_Error_Operator_Fixity_Conflict Mass_Error_Operator_Fixity_Conflict;
typedef struct Mass_Error_Undefined_Variable Mass_Error_Undefined_Variable;
typedef struct Mass_Error_Redefinition Mass_Error_Redefinition;
typedef struct Mass_Error_Unknown_Field Mass_Error_Unknown_Field;
typedef struct Mass_Error_Invalid_Identifier Mass_Error_Invalid_Identifier;
typedef struct Mass_Error_Type_Mismatch Mass_Error_Type_Mismatch;
typedef struct Mass_Error_No_Matching_Overload Mass_Error_No_Matching_Overload;
typedef struct Mass_Error_Undecidable_Overload Mass_Error_Undecidable_Overload;
typedef dyn_array_type(Mass_Error *) Array_Mass_Error_Ptr;
typedef dyn_array_type(const Mass_Error *) Array_Const_Mass_Error_Ptr;
typedef struct Mass_Result Mass_Result;
typedef struct Mass_Result_Error Mass_Result_Error;
typedef dyn_array_type(Mass_Result *) Array_Mass_Result_Ptr;
typedef dyn_array_type(const Mass_Result *) Array_Const_Mass_Result_Ptr;
typedef enum Os {
Os_Windows = 1,
Os_Linux = 2,
Os_Mac = 3,
} Os;
const char *os_name(Os value) {
if (value == 1) return "Os_Windows";
if (value == 2) return "Os_Linux";
if (value == 3) return "Os_Mac";
assert(!"Unexpected value for enum Os");
return 0;
};
typedef dyn_array_type(Os *) Array_Os_Ptr;
typedef dyn_array_type(const Os *) Array_Const_Os_Ptr;
typedef struct Program Program;
typedef dyn_array_type(Program *) Array_Program_Ptr;
typedef dyn_array_type(const Program *) Array_Const_Program_Ptr;
typedef Function_Call_Setup (*Calling_Convention_Call_Setup_Proc)
(const Allocator * allocator, const Function_Info * function_info);
typedef struct Calling_Convention Calling_Convention;
typedef dyn_array_type(Calling_Convention *) Array_Calling_Convention_Ptr;
typedef dyn_array_type(const Calling_Convention *) Array_Const_Calling_Convention_Ptr;
typedef void (*Mass_Trampoline_Proc)
(void * returns, void * args);
typedef struct Mass_Trampoline Mass_Trampoline;
typedef dyn_array_type(Mass_Trampoline *) Array_Mass_Trampoline_Ptr;
typedef dyn_array_type(const Mass_Trampoline *) Array_Const_Mass_Trampoline_Ptr;
typedef struct Struct_Field_Set Struct_Field_Set;
typedef struct Slice_Set Slice_Set;
typedef struct Symbol_Map Symbol_Map;
typedef struct Trampoline_Map Trampoline_Map;
typedef struct Scope_Map Scope_Map;
typedef struct Macro_Replacement_Map Macro_Replacement_Map;
typedef struct Jit_Import_Library_Handle_Map Jit_Import_Library_Handle_Map;
typedef struct Imported_Module_Map Imported_Module_Map;
typedef struct Jit_Counters Jit_Counters;
typedef dyn_array_type(Jit_Counters *) Array_Jit_Counters_Ptr;
typedef dyn_array_type(const Jit_Counters *) Array_Const_Jit_Counters_Ptr;
typedef struct Jit Jit;
typedef dyn_array_type(Jit *) Array_Jit_Ptr;
typedef dyn_array_type(const Jit *) Array_Const_Jit_Ptr;
typedef struct Static_Pointer_Length_Map Static_Pointer_Length_Map;
typedef struct Descriptor_Pointer_To_Cache_Map Descriptor_Pointer_To_Cache_Map;
typedef struct Intrinsic_Proc_Cache_Map Intrinsic_Proc_Cache_Map;
typedef struct Common_Symbols Common_Symbols;
typedef dyn_array_type(Common_Symbols *) Array_Common_Symbols_Ptr;
typedef dyn_array_type(const Common_Symbols *) Array_Const_Common_Symbols_Ptr;
typedef struct Compilation Compilation;
typedef dyn_array_type(Compilation *) Array_Compilation_Ptr;
typedef dyn_array_type(const Compilation *) Array_Const_Compilation_Ptr;
typedef Value * (*Lazy_Value_Proc)
(Mass_Context * context, Function_Builder * builder, const Expected_Result * expected_result, const Scope * scope, const Source_Range * source_range, const void * payload);
typedef enum Instruction_Extension_Type {
Instruction_Extension_Type_None = 0,
Instruction_Extension_Type_Register = 1,
Instruction_Extension_Type_Op_Code = 2,
Instruction_Extension_Type_Plus_Register = 3,
} Instruction_Extension_Type;
const char *instruction_extension_type_name(Instruction_Extension_Type value) {
if (value == 0) return "Instruction_Extension_Type_None";
if (value == 1) return "Instruction_Extension_Type_Register";
if (value == 2) return "Instruction_Extension_Type_Op_Code";
if (value == 3) return "Instruction_Extension_Type_Plus_Register";
assert(!"Unexpected value for enum Instruction_Extension_Type");
return 0;
};
typedef dyn_array_type(Instruction_Extension_Type *) Array_Instruction_Extension_Type_Ptr;
typedef dyn_array_type(const Instruction_Extension_Type *) Array_Const_Instruction_Extension_Type_Ptr;
typedef enum Operand_Encoding_Type {
Operand_Encoding_Type_None = 0,
Operand_Encoding_Type_Register = 2,
Operand_Encoding_Type_Register_A = 3,
Operand_Encoding_Type_Register_Or_Memory = 4,
Operand_Encoding_Type_Xmm = 5,
Operand_Encoding_Type_Memory = 7,
Operand_Encoding_Type_Immediate = 8,
} Operand_Encoding_Type;
const char *operand_encoding_type_name(Operand_Encoding_Type value) {
if (value == 0) return "Operand_Encoding_Type_None";
if (value == 2) return "Operand_Encoding_Type_Register";
if (value == 3) return "Operand_Encoding_Type_Register_A";
if (value == 4) return "Operand_Encoding_Type_Register_Or_Memory";
if (value == 5) return "Operand_Encoding_Type_Xmm";
if (value == 7) return "Operand_Encoding_Type_Memory";
if (value == 8) return "Operand_Encoding_Type_Immediate";
assert(!"Unexpected value for enum Operand_Encoding_Type");
return 0;
};
typedef dyn_array_type(Operand_Encoding_Type *) Array_Operand_Encoding_Type_Ptr;
typedef dyn_array_type(const Operand_Encoding_Type *) Array_Const_Operand_Encoding_Type_Ptr;
typedef struct Operand_Encoding Operand_Encoding;
typedef dyn_array_type(Operand_Encoding *) Array_Operand_Encoding_Ptr;
typedef dyn_array_type(const Operand_Encoding *) Array_Const_Operand_Encoding_Ptr;
typedef struct Instruction_Encoding Instruction_Encoding;
typedef dyn_array_type(Instruction_Encoding *) Array_Instruction_Encoding_Ptr;
typedef dyn_array_type(const Instruction_Encoding *) Array_Const_Instruction_Encoding_Ptr;
typedef struct X64_Mnemonic X64_Mnemonic;
typedef dyn_array_type(X64_Mnemonic *) Array_X64_Mnemonic_Ptr;
typedef dyn_array_type(const X64_Mnemonic *) Array_Const_X64_Mnemonic_Ptr;
static System_V_Classification x86_64_system_v_classify
(const Descriptor * descriptor);
static Function_Call_Parameter x86_64_system_v_parameter_for_classification
(const Allocator * allocator, System_V_Register_State * registers, const System_V_Classification * classification, u64 * stack_offset);
static void call_setup_fill_parameter_register_bitset
(Function_Call_Setup * setup);
static void push_instruction
(Code_Block * code_block, Instruction instruction);
static Value * mass_get
(Mass_Context * context, Parser * parser, Value_View args);
static Value * mass_get_from_descriptor_module
(Mass_Context * context, Parser * parser, Value_View args);
static Value * mass_import
(Mass_Context * context, Parser * parser, Value_View args);
static Value * mass_intrinsic
(Mass_Context * context, Parser * parser, Value_View args);
static Value * mass_apply
(Mass_Context * context, Parser * parser, Value_View args);
static Value * mass_call
(Mass_Context * context, Parser * parser, Value_View args);
static Value * mass_using
(Mass_Context * context, Parser * parser, Value_View args);
static Value * mass_return
(Mass_Context * context, Parser * parser, Value_View args);
static Value * mass_operator_assignment
(Mass_Context * context, Parser * parser, Value_View args);
static Value * mass_define_inferred
(Mass_Context * context, Parser * parser, Value_View args);
static Value * mass_comma
(Mass_Context * context, Parser * parser, Value_View args);
static Value * mass_function_literal
(Mass_Context * context, Parser * parser, Value_View args);
static Value * mass_dereference
(Mass_Context * context, Parser * parser, Value_View args);
static Value * mass_array_like_get
(Mass_Context * context, Parser * parser, Value_View args);
static Value * mass_struct_get
(Mass_Context * context, Parser * parser, Value_View args);
static Value * mass_named_accessor
(Mass_Context * context, Parser * parser, Value_View args);
static Value * mass_spread
(Mass_Context * context, Parser * parser, Value_View args);
static Value * mass_typed_symbol
(Mass_Context * context, Parser * parser, Value_View args);
static Value * mass_pointer_to
(Mass_Context * context, Parser * parser, Value_View args);
static Value * mass_pointer_to_type
(Mass_Context * context, Parser * parser, Value_View args);
static Value * mass_eval
(Mass_Context * context, Parser * parser, Value_View args);
static Value * mass_inline_module
(Mass_Context * context, Parser * parser, Value_View args);
static Value * mass_c_struct
(Mass_Context * context, Parser * parser, Value_View args);
static Value * mass_exports
(Mass_Context * context, Parser * parser, Value_View args);
static Value * mass_cast
(Mass_Context * context, Parser * parser, Value_View args);
static Value * mass_zero_extend
(Mass_Context * context, Parser * parser, Value_View args);
static Value * mass_parse_type
(Mass_Context * context, Parser * parser, Value_View args);
static Value * mass_type_of
(Mass_Context * context, Parser * parser, Value_View args);
static Value * mass_size_of
(Mass_Context * context, Parser * parser, Value_View args);
static Value * mass_static_assert
(Mass_Context * context, Parser * parser, Value_View args);
static void * allocator_allocate_bytes
(const Allocator * allocator, u64 byte_size, u64 byte_alignment);
static _Bool mass_constraint_integer_type
(Type type);
static _Bool mass_constraint_float_type
(Type type);
static _Bool mass_constraint_pointer_type
(Type type);
static _Bool mass_constraint_struct_type
(Type type);
static _Bool mass_constraint_fixed_array_type
(Type type);
static _Bool mass_constraint_function_instance_type
(Type type);
static u64 mass_tuple_length
(const Tuple * tuple);
static Value * mass_tuple_get
(const Tuple * tuple, u64 index);
static const Descriptor * descriptor_pointer_to
(Compilation * compilation, const Descriptor * descriptor);
static Scope * scope_make_imperative
(const Allocator * allocator, const Scope * parent, const Scope_Entry * entry);
static Scope * scope_make_declarative
(const Allocator * allocator, const Scope * parent);
static const Symbol * mass_ensure_symbol
(Compilation * compilation, Slice name);
static void scope_define_value
(Scope * scope, Epoch epoch, Source_Range source_range, const Symbol * symbol, Value * value);
static _Bool same_type
(const Descriptor * a, const Descriptor * b);
static Register register_acquire
(Function_Builder * builder, Register reg);
static Register register_acquire_temp
(Function_Builder * builder);
static void register_release
(Function_Builder * builder, Register reg);
static Storage storage_register
(Register reg, Bits bit_size);
static Storage storage_register_temp
(Function_Builder * builder, Bits bit_size);
static void storage_release_if_temporary
(Function_Builder * builder, const Storage * storage);
static Expected_Result mass_expected_result_exact