aboutsummaryrefslogtreecommitdiff
path: root/include/program.h
blob: e16e5c079d7d66d22415edaab3afe63e393b901c (plain) (blame)
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
/*
 * *****************************************************************************
 *
 * SPDX-License-Identifier: BSD-2-Clause
 *
 * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * * Redistributions of source code must retain the above copyright notice, this
 *   list of conditions and the following disclaimer.
 *
 * * Redistributions in binary form must reproduce the above copyright notice,
 *   this list of conditions and the following disclaimer in the documentation
 *   and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 *
 * *****************************************************************************
 *
 * Definitions for bc programs.
 *
 */

#ifndef BC_PROGRAM_H
#define BC_PROGRAM_H

#include <assert.h>
#include <stddef.h>

#include <status.h>
#include <parse.h>
#include <lang.h>
#include <num.h>
#include <rand.h>

/// The index of ibase in the globals array.
#define BC_PROG_GLOBALS_IBASE (0)

/// The index of obase in the globals array.
#define BC_PROG_GLOBALS_OBASE (1)

/// The index of scale in the globals array.
#define BC_PROG_GLOBALS_SCALE (2)

#if BC_ENABLE_EXTRA_MATH

/// The index of the rand max in the maxes array.
#define BC_PROG_MAX_RAND (3)

#endif // BC_ENABLE_EXTRA_MATH

/// The length of the globals array.
#define BC_PROG_GLOBALS_LEN (3 + BC_ENABLE_EXTRA_MATH)

typedef struct BcProgram
{
	/// The array of globals values.
	BcBigDig globals[BC_PROG_GLOBALS_LEN];

#if BC_ENABLED
	/// The array of globals stacks.
	BcVec globals_v[BC_PROG_GLOBALS_LEN];
#endif // BC_ENABLED

#if BC_ENABLE_EXTRA_MATH

	/// The pseudo-random number generator.
	BcRNG rng;

#endif // BC_ENABLE_EXTRA_MATH

	/// The results stack.
	BcVec results;

	/// The execution stack.
	BcVec stack;

	/// The constants encountered in the program. They are global to the program
	/// to prevent bad accesses when functions that used non-auto variables are
	/// replaced.
	BcVec consts;

	/// The map of constants to go with consts.
	BcVec const_map;

	/// The strings encountered in the program. They are global to the program
	/// to prevent bad accesses when functions that used non-auto variables are
	/// replaced.
	BcVec strs;

	/// The map of strings to go with strs.
	BcVec str_map;

	/// The array of functions.
	BcVec fns;

	/// The map of functions to go with fns.
	BcVec fn_map;

	/// The array of variables.
	BcVec vars;

	/// The map of variables to go with vars.
	BcVec var_map;

	/// The array of arrays.
	BcVec arrs;

	/// The map of arrays to go with arrs.
	BcVec arr_map;

#if DC_ENABLED

	/// A vector of tail calls. These are just integers, which are the number of
	/// tail calls that have been executed for each function (string) on the
	/// stack for dc. This is to prevent dc from constantly growing memory use
	/// because of pushing more and more string executions on the stack.
	BcVec tail_calls;

#endif // DC_ENABLED

	/// A BcNum that has the proper base for asciify.
	BcNum strmb;

	// A BcNum to run asciify. This is to prevent GCC longjmp() clobbering
	// warnings.
	BcNum asciify;

#if BC_ENABLED

	/// The last printed value for bc.
	BcNum last;

#endif // BC_ENABLED

	// The BcDig array for strmb. This uses BC_NUM_LONG_LOG10 because it is used
	// in bc_num_ulong2num(), which attempts to realloc, unless it is big
	// enough. This is big enough.
	BcDig strmb_num[BC_NUM_BIGDIG_LOG10];

} BcProgram;

/**
 * Returns true if the stack @a s has at least @a n items, false otherwise.
 * @param s  The stack to check.
 * @param n  The number of items the stack must have.
 * @return   True if @a s has at least @a n items, false otherwise.
 */
#define BC_PROG_STACK(s, n) ((s)->len >= ((size_t) (n)))

/**
 * Get a pointer to the top value in a global value stack.
 * @param v  The global value stack.
 * @return   A pointer to the top value in @a v.
 */
#define BC_PROG_GLOBAL_PTR(v) (bc_vec_top(v))

/**
 * Get the top value in a global value stack.
 * @param v  The global value stack.
 * @return   The top value in @a v.
 */
#define BC_PROG_GLOBAL(v) (*((BcBigDig*) BC_PROG_GLOBAL_PTR(v)))

/**
 * Returns the current value of ibase.
 * @param p  The program.
 * @return   The current ibase.
 */
#define BC_PROG_IBASE(p) ((p)->globals[BC_PROG_GLOBALS_IBASE])

/**
 * Returns the current value of obase.
 * @param p  The program.
 * @return   The current obase.
 */
#define BC_PROG_OBASE(p) ((p)->globals[BC_PROG_GLOBALS_OBASE])

/**
 * Returns the current value of scale.
 * @param p  The program.
 * @return   The current scale.
 */
#define BC_PROG_SCALE(p) ((p)->globals[BC_PROG_GLOBALS_SCALE])

/// The index for the main function in the functions array.//
#define BC_PROG_MAIN (0)

/// The index for the read function in the functions array.
#define BC_PROG_READ (1)

/**
 * Retires (completes the execution of) an instruction. Some instructions
 * require special retirement, but most can use this. This basically pops the
 * operands while preserving the result (which we assumed was pushed before the
 * actual operation).
 * @param p     The program.
 * @param nres  The number of results returned by the instruction.
 * @param nops  The number of operands used by the instruction.
 */
#define bc_program_retire(p, nres, nops) \
	(bc_vec_npopAt(&(p)->results, (nops), (p)->results.len - (nres + nops)))

#if DC_ENABLED

/// A constant that tells how many functions are required in dc.
#define BC_PROG_REQ_FUNCS (2)

#if !BC_ENABLED

/// Returns true if the calculator should pop after printing.
#define BC_PROGRAM_POP(pop) (pop)

#else // !BC_ENABLED

/// Returns true if the calculator should pop after printing.
#define BC_PROGRAM_POP(pop) (BC_IS_BC || (pop))

#endif // !BC_ENABLED

// This is here to satisfy a clang warning about recursive macros.
#define bc_program_pushVar(p, code, bgn, pop, copy) \
	bc_program_pushVar_impl(p, code, bgn, pop, copy)

#else // DC_ENABLED

// This define disappears pop and copy because for bc, 'pop' and 'copy' are
// always false.
#define bc_program_pushVar(p, code, bgn, pop, copy) \
	bc_program_pushVar_impl(p, code, bgn)

/// Returns true if the calculator should pop after printing.
#define BC_PROGRAM_POP(pop) (BC_IS_BC)

// In debug mode, we want bc to check the stack, but otherwise, we don't because
// the bc language implicitly mandates that the stack should always have enough
// items.
#ifdef BC_DEBUG
#define BC_PROG_NO_STACK_CHECK
#endif // BC_DEBUG

#endif // DC_ENABLED

/**
 * Returns true if the BcNum @a n is acting as a string.
 * @param n  The BcNum to test.
 * @return   True if @a n is acting as a string, false otherwise.
 */
#define BC_PROG_STR(n) ((n)->num == NULL && !(n)->cap)

#if BC_ENABLED

/**
 * Returns true if the result @a r and @a n is a number.
 * @param r  The result.
 * @param n  The number corresponding to the result.
 * @return   True if the result holds a number, false otherwise.
 */
#define BC_PROG_NUM(r, n) \
	((r)->t != BC_RESULT_ARRAY && (r)->t != BC_RESULT_STR && !BC_PROG_STR(n))

#else // BC_ENABLED

/**
 * Returns true if the result @a r and @a n is a number.
 * @param r  The result.
 * @param n  The number corresponding to the result.
 * @return   True if the result holds a number, false otherwise.
 */
#define BC_PROG_NUM(r, n) ((r)->t != BC_RESULT_STR && !BC_PROG_STR(n))

#endif // BC_ENABLED

/**
 * This is a function type for unary operations. Currently, these include
 * boolean not, negation, and truncation with extra math.
 * @param r  The BcResult to store the result into.
 * @param n  The parameter to the unary operation.
 */
typedef void (*BcProgramUnary)(BcResult* r, BcNum* n);

/**
 * Initializes the BcProgram.
 * @param p  The program to initialize.
 */
void
bc_program_init(BcProgram* p);

#if BC_DEBUG

/**
 * Frees a BcProgram. This is only used in debug builds because a BcProgram is
 * only freed on program exit, and we don't care about freeing resources on
 * exit.
 * @param p  The program to initialize.
 */
void
bc_program_free(BcProgram* p);

#endif // BC_DEBUG

/**
 * Prints a stack trace of the bc functions or dc strings currently executing.
 * @param p  The program.
 */
void
bc_program_printStackTrace(BcProgram* p);

#if BC_DEBUG_CODE
#if BC_ENABLED && DC_ENABLED

/**
 * Prints the bytecode in a function. This is a debug-only function.
 * @param p  The program.
 */
void
bc_program_code(const BcProgram* p);

/**
 * Prints an instruction. This is a debug-only function.
 * @param p  The program.
 * @param code  The bytecode array.
 * @param bgn   A pointer to the current index. It is also updated to the next
 *              index.
 */
void
bc_program_printInst(const BcProgram* p, const char* code,
                     size_t* restrict bgn);

/**
 * Prints the stack. This is a debug-only function.
 * @param p  The program.
 */
void
bc_program_printStackDebug(BcProgram* p);

#endif // BC_ENABLED && DC_ENABLED
#endif // BC_DEBUG_CODE

/**
 * Returns the index of the variable or array in their respective arrays.
 * @param p     The program.
 * @param name  The name of the variable or array.
 * @param var   True if the search should be for a variable, false for an array.
 * @return      The index of the variable or array in the correct array.
 */
size_t
bc_program_search(BcProgram* p, const char* name, bool var);

/**
 * Adds a string to the program and returns the string's index in the program.
 * @param p    The program.
 * @param str  The string to add.
 * @return     The string's index in the program.
 */
size_t
bc_program_addString(BcProgram* p, const char* str);

/**
 * Inserts a function into the program and returns the index of the function in
 * the fns array.
 * @param p     The program.
 * @param name  The name of the function.
 * @return      The index of the function after insertion.
 */
size_t
bc_program_insertFunc(BcProgram* p, const char* name);

/**
 * Resets a program, usually because of resetting after an error.
 * @param p  The program to reset.
 */
void
bc_program_reset(BcProgram* p);

/**
 * Executes bc or dc code in the BcProgram.
 * @param p  The program.
 */
void
bc_program_exec(BcProgram* p);

/**
 * Negates a copy of a BcNum. This is a BcProgramUnary function.
 * @param r  The BcResult to store the result into.
 * @param n  The parameter to the unary operation.
 */
void
bc_program_negate(BcResult* r, BcNum* n);

/**
 * Returns a boolean not of a BcNum. This is a BcProgramUnary function.
 * @param r  The BcResult to store the result into.
 * @param n  The parameter to the unary operation.
 */
void
bc_program_not(BcResult* r, BcNum* n);

#if BC_ENABLE_EXTRA_MATH

/**
 * Truncates a copy of a BcNum. This is a BcProgramUnary function.
 * @param r  The BcResult to store the result into.
 * @param n  The parameter to the unary operation.
 */
void
bc_program_trunc(BcResult* r, BcNum* n);

/**
 * Assigns a value to the seed builtin variable.
 * @param p    The program.
 * @param val  The value to assign to the seed.
 */
void
bc_program_assignSeed(BcProgram* p, BcNum* val);

#endif // BC_ENABLE_EXTRA_MATH

/**
 * Assigns a value to a builtin value that is not seed.
 * @param p      The program.
 * @param scale  True if the builtin is scale.
 * @param obase  True if the builtin is obase. This cannot be true at the same
 *               time @a scale is.
 * @param val    The value to assign to the builtin.
 */
void
bc_program_assignBuiltin(BcProgram* p, bool scale, bool obase, BcBigDig val);

/// A reference to an array of binary operator functions.
extern const BcNumBinaryOp bc_program_ops[];

/// A reference to an array of binary operator allocation request functions.
extern const BcNumBinaryOpReq bc_program_opReqs[];

/// A reference to an array of unary operator functions.
extern const BcProgramUnary bc_program_unarys[];

/// A reference to a filename for command-line expressions.
extern const char bc_program_exprs_name[];

/// A reference to a filename for stdin.
extern const char bc_program_stdin_name[];

/// A reference to the ready message printed on SIGINT.
extern const char bc_program_ready_msg[];

/// A reference to the length of the ready message.
extern const size_t bc_program_ready_msg_len;

/// A reference to an array of escape characters for the print statement.
extern const char bc_program_esc_chars[];

/// A reference to an array of the characters corresponding to the escape
/// characters in bc_program_esc_chars.
extern const char bc_program_esc_seqs[];

#if BC_HAS_COMPUTED_GOTO

#if BC_DEBUG_CODE

// clang-format off
#define BC_PROG_JUMP(inst, code, ip)                                  \
	do                                                                \
	{                                                                 \
		inst = (uchar) (code)[(ip)->idx++];                           \
		bc_file_printf(&vm->ferr, "inst: %s\n", bc_inst_names[inst]); \
		bc_file_flush(&vm->ferr, bc_flush_none);                      \
		goto *bc_program_inst_lbls[inst];                             \
	}                                                                 \
	while (0)
// clang-format on

#else // BC_DEBUG_CODE

// clang-format off
#define BC_PROG_JUMP(inst, code, ip)        \
	do                                      \
	{                                       \
		inst = (uchar) (code)[(ip)->idx++]; \
		goto *bc_program_inst_lbls[inst];   \
	}                                       \
	while (0)
// clang-format on

#endif // BC_DEBUG_CODE

#define BC_PROG_DIRECT_JUMP(l) goto lbl_##l;
#define BC_PROG_LBL(l) lbl_##l
#define BC_PROG_FALLTHROUGH

#if BC_C11

#define BC_PROG_LBLS_SIZE (sizeof(bc_program_inst_lbls) / sizeof(void*))
#define BC_PROG_LBLS_ASSERT                                  \
	_Static_assert(BC_PROG_LBLS_SIZE == BC_INST_INVALID + 1, \
	               "bc_program_inst_lbls[] mismatches the instructions")

#else // BC_C11

#define BC_PROG_LBLS_ASSERT

#endif // BC_C11

#if BC_ENABLED

#if DC_ENABLED

#if BC_ENABLE_EXTRA_MATH

#define BC_PROG_LBLS                                    \
	static const void* const bc_program_inst_lbls[] = { \
		&&lbl_BC_INST_INC,                              \
		&&lbl_BC_INST_DEC,                              \
		&&lbl_BC_INST_NEG,                              \
		&&lbl_BC_INST_BOOL_NOT,                         \
		&&lbl_BC_INST_TRUNC,                            \
		&&lbl_BC_INST_POWER,                            \
		&&lbl_BC_INST_MULTIPLY,                         \
		&&lbl_BC_INST_DIVIDE,                           \
		&&lbl_BC_INST_MODULUS,                          \
		&&lbl_BC_INST_PLUS,                             \
		&&lbl_BC_INST_MINUS,                            \
		&&lbl_BC_INST_PLACES,                           \
		&&lbl_BC_INST_LSHIFT,                           \
		&&lbl_BC_INST_RSHIFT,                           \
		&&lbl_BC_INST_REL_EQ,                           \
		&&lbl_BC_INST_REL_LE,                           \
		&&lbl_BC_INST_REL_GE,                           \
		&&lbl_BC_INST_REL_NE,                           \
		&&lbl_BC_INST_REL_LT,                           \
		&&lbl_BC_INST_REL_GT,                           \
		&&lbl_BC_INST_BOOL_OR,                          \
		&&lbl_BC_INST_BOOL_AND,                         \
		&&lbl_BC_INST_ASSIGN_POWER,                     \
		&&lbl_BC_INST_ASSIGN_MULTIPLY,                  \
		&&lbl_BC_INST_ASSIGN_DIVIDE,                    \
		&&lbl_BC_INST_ASSIGN_MODULUS,                   \
		&&lbl_BC_INST_ASSIGN_PLUS,                      \
		&&lbl_BC_INST_ASSIGN_MINUS,                     \
		&&lbl_BC_INST_ASSIGN_PLACES,                    \
		&&lbl_BC_INST_ASSIGN_LSHIFT,                    \
		&&lbl_BC_INST_ASSIGN_RSHIFT,                    \
		&&lbl_BC_INST_ASSIGN,                           \
		&&lbl_BC_INST_ASSIGN_POWER_NO_VAL,              \
		&&lbl_BC_INST_ASSIGN_MULTIPLY_NO_VAL,           \
		&&lbl_BC_INST_ASSIGN_DIVIDE_NO_VAL,             \
		&&lbl_BC_INST_ASSIGN_MODULUS_NO_VAL,            \
		&&lbl_BC_INST_ASSIGN_PLUS_NO_VAL,               \
		&&lbl_BC_INST_ASSIGN_MINUS_NO_VAL,              \
		&&lbl_BC_INST_ASSIGN_PLACES_NO_VAL,             \
		&&lbl_BC_INST_ASSIGN_LSHIFT_NO_VAL,             \
		&&lbl_BC_INST_ASSIGN_RSHIFT_NO_VAL,             \
		&&lbl_BC_INST_ASSIGN_NO_VAL,                    \
		&&lbl_BC_INST_NUM,                              \
		&&lbl_BC_INST_VAR,                              \
		&&lbl_BC_INST_ARRAY_ELEM,                       \
		&&lbl_BC_INST_ARRAY,                            \
		&&lbl_BC_INST_ZERO,                             \
		&&lbl_BC_INST_ONE,                              \
		&&lbl_BC_INST_LAST,                             \
		&&lbl_BC_INST_IBASE,                            \
		&&lbl_BC_INST_OBASE,                            \
		&&lbl_BC_INST_SCALE,                            \
		&&lbl_BC_INST_SEED,                             \
		&&lbl_BC_INST_LENGTH,                           \
		&&lbl_BC_INST_SCALE_FUNC,                       \
		&&lbl_BC_INST_SQRT,                             \
		&&lbl_BC_INST_ABS,                              \
		&&lbl_BC_INST_IS_NUMBER,                        \
		&&lbl_BC_INST_IS_STRING,                        \
		&&lbl_BC_INST_IRAND,                            \
		&&lbl_BC_INST_ASCIIFY,                          \
		&&lbl_BC_INST_READ,                             \
		&&lbl_BC_INST_RAND,                             \
		&&lbl_BC_INST_MAXIBASE,                         \
		&&lbl_BC_INST_MAXOBASE,                         \
		&&lbl_BC_INST_MAXSCALE,                         \
		&&lbl_BC_INST_MAXRAND,                          \
		&&lbl_BC_INST_LINE_LENGTH,                      \
		&&lbl_BC_INST_GLOBAL_STACKS,                    \
		&&lbl_BC_INST_LEADING_ZERO,                     \
		&&lbl_BC_INST_PRINT,                            \
		&&lbl_BC_INST_PRINT_POP,                        \
		&&lbl_BC_INST_STR,                              \
		&&lbl_BC_INST_PRINT_STR,                        \
		&&lbl_BC_INST_JUMP,                             \
		&&lbl_BC_INST_JUMP_ZERO,                        \
		&&lbl_BC_INST_CALL,                             \
		&&lbl_BC_INST_RET,                              \
		&&lbl_BC_INST_RET0,                             \
		&&lbl_BC_INST_RET_VOID,                         \
		&&lbl_BC_INST_HALT,                             \
		&&lbl_BC_INST_POP,                              \
		&&lbl_BC_INST_SWAP,                             \
		&&lbl_BC_INST_MODEXP,                           \
		&&lbl_BC_INST_DIVMOD,                           \
		&&lbl_BC_INST_PRINT_STREAM,                     \
		&&lbl_BC_INST_EXTENDED_REGISTERS,               \
		&&lbl_BC_INST_POP_EXEC,                         \
		&&lbl_BC_INST_EXECUTE,                          \
		&&lbl_BC_INST_EXEC_COND,                        \
		&&lbl_BC_INST_PRINT_STACK,                      \
		&&lbl_BC_INST_CLEAR_STACK,                      \
		&&lbl_BC_INST_REG_STACK_LEN,                    \
		&&lbl_BC_INST_STACK_LEN,                        \
		&&lbl_BC_INST_DUPLICATE,                        \
		&&lbl_BC_INST_LOAD,                             \
		&&lbl_BC_INST_PUSH_VAR,                         \
		&&lbl_BC_INST_PUSH_TO_VAR,                      \
		&&lbl_BC_INST_QUIT,                             \
		&&lbl_BC_INST_NQUIT,                            \
		&&lbl_BC_INST_EXEC_STACK_LEN,                   \
		&&lbl_BC_INST_INVALID,                          \
	}

#else // BC_ENABLE_EXTRA_MATH

#define BC_PROG_LBLS                                    \
	static const void* const bc_program_inst_lbls[] = { \
		&&lbl_BC_INST_INC,                              \
		&&lbl_BC_INST_DEC,                              \
		&&lbl_BC_INST_NEG,                              \
		&&lbl_BC_INST_BOOL_NOT,                         \
		&&lbl_BC_INST_POWER,                            \
		&&lbl_BC_INST_MULTIPLY,                         \
		&&lbl_BC_INST_DIVIDE,                           \
		&&lbl_BC_INST_MODULUS,                          \
		&&lbl_BC_INST_PLUS,                             \
		&&lbl_BC_INST_MINUS,                            \
		&&lbl_BC_INST_REL_EQ,                           \
		&&lbl_BC_INST_REL_LE,                           \
		&&lbl_BC_INST_REL_GE,                           \
		&&lbl_BC_INST_REL_NE,                           \
		&&lbl_BC_INST_REL_LT,                           \
		&&lbl_BC_INST_REL_GT,                           \
		&&lbl_BC_INST_BOOL_OR,                          \
		&&lbl_BC_INST_BOOL_AND,                         \
		&&lbl_BC_INST_ASSIGN_POWER,                     \
		&&lbl_BC_INST_ASSIGN_MULTIPLY,                  \
		&&lbl_BC_INST_ASSIGN_DIVIDE,                    \
		&&lbl_BC_INST_ASSIGN_MODULUS,                   \
		&&lbl_BC_INST_ASSIGN_PLUS,                      \
		&&lbl_BC_INST_ASSIGN_MINUS,                     \
		&&lbl_BC_INST_ASSIGN,                           \
		&&lbl_BC_INST_ASSIGN_POWER_NO_VAL,              \
		&&lbl_BC_INST_ASSIGN_MULTIPLY_NO_VAL,           \
		&&lbl_BC_INST_ASSIGN_DIVIDE_NO_VAL,             \
		&&lbl_BC_INST_ASSIGN_MODULUS_NO_VAL,            \
		&&lbl_BC_INST_ASSIGN_PLUS_NO_VAL,               \
		&&lbl_BC_INST_ASSIGN_MINUS_NO_VAL,              \
		&&lbl_BC_INST_ASSIGN_NO_VAL,                    \
		&&lbl_BC_INST_NUM,                              \
		&&lbl_BC_INST_VAR,                              \
		&&lbl_BC_INST_ARRAY_ELEM,                       \
		&&lbl_BC_INST_ARRAY,                            \
		&&lbl_BC_INST_ZERO,                             \
		&&lbl_BC_INST_ONE,                              \
		&&lbl_BC_INST_LAST,                             \
		&&lbl_BC_INST_IBASE,                            \
		&&lbl_BC_INST_OBASE,                            \
		&&lbl_BC_INST_SCALE,                            \
		&&lbl_BC_INST_LENGTH,                           \
		&&lbl_BC_INST_SCALE_FUNC,                       \
		&&lbl_BC_INST_SQRT,                             \
		&&lbl_BC_INST_ABS,                              \
		&&lbl_BC_INST_IS_NUMBER,                        \
		&&lbl_BC_INST_IS_STRING,                        \
		&&lbl_BC_INST_ASCIIFY,                          \
		&&lbl_BC_INST_READ,                             \
		&&lbl_BC_INST_MAXIBASE,                         \
		&&lbl_BC_INST_MAXOBASE,                         \
		&&lbl_BC_INST_MAXSCALE,                         \
		&&lbl_BC_INST_LINE_LENGTH,                      \
		&&lbl_BC_INST_GLOBAL_STACKS,                    \
		&&lbl_BC_INST_LEADING_ZERO,                     \
		&&lbl_BC_INST_PRINT,                            \
		&&lbl_BC_INST_PRINT_POP,                        \
		&&lbl_BC_INST_STR,                              \
		&&lbl_BC_INST_PRINT_STR,                        \
		&&lbl_BC_INST_JUMP,                             \
		&&lbl_BC_INST_JUMP_ZERO,                        \
		&&lbl_BC_INST_CALL,                             \
		&&lbl_BC_INST_RET,                              \
		&&lbl_BC_INST_RET0,                             \
		&&lbl_BC_INST_RET_VOID,                         \
		&&lbl_BC_INST_HALT,                             \
		&&lbl_BC_INST_POP,                              \
		&&lbl_BC_INST_SWAP,                             \
		&&lbl_BC_INST_MODEXP,                           \
		&&lbl_BC_INST_DIVMOD,                           \
		&&lbl_BC_INST_PRINT_STREAM,                     \
		&&lbl_BC_INST_EXTENDED_REGISTERS,               \
		&&lbl_BC_INST_POP_EXEC,                         \
		&&lbl_BC_INST_EXECUTE,                          \
		&&lbl_BC_INST_EXEC_COND,                        \
		&&lbl_BC_INST_PRINT_STACK,                      \
		&&lbl_BC_INST_CLEAR_STACK,                      \
		&&lbl_BC_INST_REG_STACK_LEN,                    \
		&&lbl_BC_INST_STACK_LEN,                        \
		&&lbl_BC_INST_DUPLICATE,                        \
		&&lbl_BC_INST_LOAD,                             \
		&&lbl_BC_INST_PUSH_VAR,                         \
		&&lbl_BC_INST_PUSH_TO_VAR,                      \
		&&lbl_BC_INST_QUIT,                             \
		&&lbl_BC_INST_NQUIT,                            \
		&&lbl_BC_INST_EXEC_STACK_LEN,                   \
		&&lbl_BC_INST_INVALID,                          \
	}

#endif // BC_ENABLE_EXTRA_MATH

#else // DC_ENABLED

#if BC_ENABLE_EXTRA_MATH

#define BC_PROG_LBLS                                    \
	static const void* const bc_program_inst_lbls[] = { \
		&&lbl_BC_INST_INC,                              \
		&&lbl_BC_INST_DEC,                              \
		&&lbl_BC_INST_NEG,                              \
		&&lbl_BC_INST_BOOL_NOT,                         \
		&&lbl_BC_INST_TRUNC,                            \
		&&lbl_BC_INST_POWER,                            \
		&&lbl_BC_INST_MULTIPLY,                         \
		&&lbl_BC_INST_DIVIDE,                           \
		&&lbl_BC_INST_MODULUS,                          \
		&&lbl_BC_INST_PLUS,                             \
		&&lbl_BC_INST_MINUS,                            \
		&&lbl_BC_INST_PLACES,                           \
		&&lbl_BC_INST_LSHIFT,                           \
		&&lbl_BC_INST_RSHIFT,                           \
		&&lbl_BC_INST_REL_EQ,                           \
		&&lbl_BC_INST_REL_LE,                           \
		&&lbl_BC_INST_REL_GE,                           \
		&&lbl_BC_INST_REL_NE,                           \
		&&lbl_BC_INST_REL_LT,                           \
		&&lbl_BC_INST_REL_GT,                           \
		&&lbl_BC_INST_BOOL_OR,                          \
		&&lbl_BC_INST_BOOL_AND,                         \
		&&lbl_BC_INST_ASSIGN_POWER,                     \
		&&lbl_BC_INST_ASSIGN_MULTIPLY,                  \
		&&lbl_BC_INST_ASSIGN_DIVIDE,                    \
		&&lbl_BC_INST_ASSIGN_MODULUS,                   \
		&&lbl_BC_INST_ASSIGN_PLUS,                      \
		&&lbl_BC_INST_ASSIGN_MINUS,                     \
		&&lbl_BC_INST_ASSIGN_PLACES,                    \
		&&lbl_BC_INST_ASSIGN_LSHIFT,                    \
		&&lbl_BC_INST_ASSIGN_RSHIFT,                    \
		&&lbl_BC_INST_ASSIGN,                           \
		&&lbl_BC_INST_ASSIGN_POWER_NO_VAL,              \
		&&lbl_BC_INST_ASSIGN_MULTIPLY_NO_VAL,           \
		&&lbl_BC_INST_ASSIGN_DIVIDE_NO_VAL,             \
		&&lbl_BC_INST_ASSIGN_MODULUS_NO_VAL,            \
		&&lbl_BC_INST_ASSIGN_PLUS_NO_VAL,               \
		&&lbl_BC_INST_ASSIGN_MINUS_NO_VAL,              \
		&&lbl_BC_INST_ASSIGN_PLACES_NO_VAL,             \
		&&lbl_BC_INST_ASSIGN_LSHIFT_NO_VAL,             \
		&&lbl_BC_INST_ASSIGN_RSHIFT_NO_VAL,             \
		&&lbl_BC_INST_ASSIGN_NO_VAL,                    \
		&&lbl_BC_INST_NUM,                              \
		&&lbl_BC_INST_VAR,                              \
		&&lbl_BC_INST_ARRAY_ELEM,                       \
		&&lbl_BC_INST_ARRAY,                            \
		&&lbl_BC_INST_ZERO,                             \
		&&lbl_BC_INST_ONE,                              \
		&&lbl_BC_INST_LAST,                             \
		&&lbl_BC_INST_IBASE,                            \
		&&lbl_BC_INST_OBASE,                            \
		&&lbl_BC_INST_SCALE,                            \
		&&lbl_BC_INST_SEED,                             \
		&&lbl_BC_INST_LENGTH,                           \
		&&lbl_BC_INST_SCALE_FUNC,                       \
		&&lbl_BC_INST_SQRT,                             \
		&&lbl_BC_INST_ABS,                              \
		&&lbl_BC_INST_IS_NUMBER,                        \
		&&lbl_BC_INST_IS_STRING,                        \
		&&lbl_BC_INST_IRAND,                            \
		&&lbl_BC_INST_ASCIIFY,                          \
		&&lbl_BC_INST_READ,                             \
		&&lbl_BC_INST_RAND,                             \
		&&lbl_BC_INST_MAXIBASE,                         \
		&&lbl_BC_INST_MAXOBASE,                         \
		&&lbl_BC_INST_MAXSCALE,                         \
		&&lbl_BC_INST_MAXRAND,                          \
		&&lbl_BC_INST_LINE_LENGTH,                      \
		&&lbl_BC_INST_GLOBAL_STACKS,                    \
		&&lbl_BC_INST_LEADING_ZERO,                     \
		&&lbl_BC_INST_PRINT,                            \
		&&lbl_BC_INST_PRINT_POP,                        \
		&&lbl_BC_INST_STR,                              \
		&&lbl_BC_INST_PRINT_STR,                        \
		&&lbl_BC_INST_JUMP,                             \
		&&lbl_BC_INST_JUMP_ZERO,                        \
		&&lbl_BC_INST_CALL,                             \
		&&lbl_BC_INST_RET,                              \
		&&lbl_BC_INST_RET0,                             \
		&&lbl_BC_INST_RET_VOID,                         \
		&&lbl_BC_INST_HALT,                             \
		&&lbl_BC_INST_POP,                              \
		&&lbl_BC_INST_SWAP,                             \
		&&lbl_BC_INST_MODEXP,                           \
		&&lbl_BC_INST_DIVMOD,                           \
		&&lbl_BC_INST_PRINT_STREAM,                     \
		&&lbl_BC_INST_INVALID,                          \
	}

#else // BC_ENABLE_EXTRA_MATH

#define BC_PROG_LBLS                                    \
	static const void* const bc_program_inst_lbls[] = { \
		&&lbl_BC_INST_INC,                              \
		&&lbl_BC_INST_DEC,                              \
		&&lbl_BC_INST_NEG,                              \
		&&lbl_BC_INST_BOOL_NOT,                         \
		&&lbl_BC_INST_POWER,                            \
		&&lbl_BC_INST_MULTIPLY,                         \
		&&lbl_BC_INST_DIVIDE,                           \
		&&lbl_BC_INST_MODULUS,                          \
		&&lbl_BC_INST_PLUS,                             \
		&&lbl_BC_INST_MINUS,                            \
		&&lbl_BC_INST_REL_EQ,                           \
		&&lbl_BC_INST_REL_LE,                           \
		&&lbl_BC_INST_REL_GE,                           \
		&&lbl_BC_INST_REL_NE,                           \
		&&lbl_BC_INST_REL_LT,                           \
		&&lbl_BC_INST_REL_GT,                           \
		&&lbl_BC_INST_BOOL_OR,                          \
		&&lbl_BC_INST_BOOL_AND,                         \
		&&lbl_BC_INST_ASSIGN_POWER,                     \
		&&lbl_BC_INST_ASSIGN_MULTIPLY,                  \
		&&lbl_BC_INST_ASSIGN_DIVIDE,                    \
		&&lbl_BC_INST_ASSIGN_MODULUS,                   \
		&&lbl_BC_INST_ASSIGN_PLUS,                      \
		&&lbl_BC_INST_ASSIGN_MINUS,                     \
		&&lbl_BC_INST_ASSIGN,                           \
		&&lbl_BC_INST_ASSIGN_POWER_NO_VAL,              \
		&&lbl_BC_INST_ASSIGN_MULTIPLY_NO_VAL,           \
		&&lbl_BC_INST_ASSIGN_DIVIDE_NO_VAL,             \
		&&lbl_BC_INST_ASSIGN_MODULUS_NO_VAL,            \
		&&lbl_BC_INST_ASSIGN_PLUS_NO_VAL,               \
		&&lbl_BC_INST_ASSIGN_MINUS_NO_VAL,              \
		&&lbl_BC_INST_ASSIGN_NO_VAL,                    \
		&&lbl_BC_INST_NUM,                              \
		&&lbl_BC_INST_VAR,                              \
		&&lbl_BC_INST_ARRAY_ELEM,                       \
		&&lbl_BC_INST_ARRAY,                            \
		&&lbl_BC_INST_ZERO,                             \
		&&lbl_BC_INST_ONE,                              \
		&&lbl_BC_INST_LAST,                             \
		&&lbl_BC_INST_IBASE,                            \
		&&lbl_BC_INST_OBASE,                            \
		&&lbl_BC_INST_SCALE,                            \
		&&lbl_BC_INST_LENGTH,                           \
		&&lbl_BC_INST_SCALE_FUNC,                       \
		&&lbl_BC_INST_SQRT,                             \
		&&lbl_BC_INST_ABS,                              \
		&&lbl_BC_INST_IS_NUMBER,                        \
		&&lbl_BC_INST_IS_STRING,                        \
		&&lbl_BC_INST_ASCIIFY,                          \
		&&lbl_BC_INST_READ,                             \
		&&lbl_BC_INST_MAXIBASE,                         \
		&&lbl_BC_INST_MAXOBASE,                         \
		&&lbl_BC_INST_MAXSCALE,                         \
		&&lbl_BC_INST_LINE_LENGTH,                      \
		&&lbl_BC_INST_GLOBAL_STACKS,                    \
		&&lbl_BC_INST_LEADING_ZERO,                     \
		&&lbl_BC_INST_PRINT,                            \
		&&lbl_BC_INST_PRINT_POP,                        \
		&&lbl_BC_INST_STR,                              \
		&&lbl_BC_INST_PRINT_STR,                        \
		&&lbl_BC_INST_JUMP,                             \
		&&lbl_BC_INST_JUMP_ZERO,                        \
		&&lbl_BC_INST_CALL,                             \
		&&lbl_BC_INST_RET,                              \
		&&lbl_BC_INST_RET0,                             \
		&&lbl_BC_INST_RET_VOID,                         \
		&&lbl_BC_INST_HALT,                             \
		&&lbl_BC_INST_POP,                              \
		&&lbl_BC_INST_SWAP,                             \
		&&lbl_BC_INST_MODEXP,                           \
		&&lbl_BC_INST_DIVMOD,                           \
		&&lbl_BC_INST_PRINT_STREAM,                     \
		&&lbl_BC_INST_INVALID,                          \
	}

#endif // BC_ENABLE_EXTRA_MATH

#endif // DC_ENABLED

#else // BC_ENABLED

#if BC_ENABLE_EXTRA_MATH

#define BC_PROG_LBLS                                                   \
	static const void* const bc_program_inst_lbls[] = {                \
		&&lbl_BC_INST_NEG,           &&lbl_BC_INST_BOOL_NOT,           \
		&&lbl_BC_INST_TRUNC,         &&lbl_BC_INST_POWER,              \
		&&lbl_BC_INST_MULTIPLY,      &&lbl_BC_INST_DIVIDE,             \
		&&lbl_BC_INST_MODULUS,       &&lbl_BC_INST_PLUS,               \
		&&lbl_BC_INST_MINUS,         &&lbl_BC_INST_PLACES,             \
		&&lbl_BC_INST_LSHIFT,        &&lbl_BC_INST_RSHIFT,             \
		&&lbl_BC_INST_REL_EQ,        &&lbl_BC_INST_REL_LE,             \
		&&lbl_BC_INST_REL_GE,        &&lbl_BC_INST_REL_NE,             \
		&&lbl_BC_INST_REL_LT,        &&lbl_BC_INST_REL_GT,             \
		&&lbl_BC_INST_BOOL_OR,       &&lbl_BC_INST_BOOL_AND,           \
		&&lbl_BC_INST_ASSIGN_NO_VAL, &&lbl_BC_INST_NUM,                \
		&&lbl_BC_INST_VAR,           &&lbl_BC_INST_ARRAY_ELEM,         \
		&&lbl_BC_INST_ARRAY,         &&lbl_BC_INST_ZERO,               \
		&&lbl_BC_INST_ONE,           &&lbl_BC_INST_IBASE,              \
		&&lbl_BC_INST_OBASE,         &&lbl_BC_INST_SCALE,              \
		&&lbl_BC_INST_SEED,          &&lbl_BC_INST_LENGTH,             \
		&&lbl_BC_INST_SCALE_FUNC,    &&lbl_BC_INST_SQRT,               \
		&&lbl_BC_INST_ABS,           &&lbl_BC_INST_IS_NUMBER,          \
		&&lbl_BC_INST_IS_STRING,     &&lbl_BC_INST_IRAND,              \
		&&lbl_BC_INST_ASCIIFY,       &&lbl_BC_INST_READ,               \
		&&lbl_BC_INST_RAND,          &&lbl_BC_INST_MAXIBASE,           \
		&&lbl_BC_INST_MAXOBASE,      &&lbl_BC_INST_MAXSCALE,           \
		&&lbl_BC_INST_MAXRAND,       &&lbl_BC_INST_LINE_LENGTH,        \
		&&lbl_BC_INST_LEADING_ZERO,  &&lbl_BC_INST_PRINT,              \
		&&lbl_BC_INST_PRINT_POP,     &&lbl_BC_INST_STR,                \
		&&lbl_BC_INST_POP,           &&lbl_BC_INST_SWAP,               \
		&&lbl_BC_INST_MODEXP,        &&lbl_BC_INST_DIVMOD,             \
		&&lbl_BC_INST_PRINT_STREAM,  &&lbl_BC_INST_EXTENDED_REGISTERS, \
		&&lbl_BC_INST_POP_EXEC,      &&lbl_BC_INST_EXECUTE,            \
		&&lbl_BC_INST_EXEC_COND,     &&lbl_BC_INST_PRINT_STACK,        \
		&&lbl_BC_INST_CLEAR_STACK,   &&lbl_BC_INST_REG_STACK_LEN,      \
		&&lbl_BC_INST_STACK_LEN,     &&lbl_BC_INST_DUPLICATE,          \
		&&lbl_BC_INST_LOAD,          &&lbl_BC_INST_PUSH_VAR,           \
		&&lbl_BC_INST_PUSH_TO_VAR,   &&lbl_BC_INST_QUIT,               \
		&&lbl_BC_INST_NQUIT,         &&lbl_BC_INST_EXEC_STACK_LEN,     \
		&&lbl_BC_INST_INVALID,                                         \
	}

#else // BC_ENABLE_EXTRA_MATH

#define BC_PROG_LBLS                                                   \
	static const void* const bc_program_inst_lbls[] = {                \
		&&lbl_BC_INST_NEG,           &&lbl_BC_INST_BOOL_NOT,           \
		&&lbl_BC_INST_POWER,         &&lbl_BC_INST_MULTIPLY,           \
		&&lbl_BC_INST_DIVIDE,        &&lbl_BC_INST_MODULUS,            \
		&&lbl_BC_INST_PLUS,          &&lbl_BC_INST_MINUS,              \
		&&lbl_BC_INST_REL_EQ,        &&lbl_BC_INST_REL_LE,             \
		&&lbl_BC_INST_REL_GE,        &&lbl_BC_INST_REL_NE,             \
		&&lbl_BC_INST_REL_LT,        &&lbl_BC_INST_REL_GT,             \
		&&lbl_BC_INST_BOOL_OR,       &&lbl_BC_INST_BOOL_AND,           \
		&&lbl_BC_INST_ASSIGN_NO_VAL, &&lbl_BC_INST_NUM,                \
		&&lbl_BC_INST_VAR,           &&lbl_BC_INST_ARRAY_ELEM,         \
		&&lbl_BC_INST_ARRAY,         &&lbl_BC_INST_ZERO,               \
		&&lbl_BC_INST_ONE,           &&lbl_BC_INST_IBASE,              \
		&&lbl_BC_INST_OBASE,         &&lbl_BC_INST_SCALE,              \
		&&lbl_BC_INST_LENGTH,        &&lbl_BC_INST_SCALE_FUNC,         \
		&&lbl_BC_INST_SQRT,          &&lbl_BC_INST_ABS,                \
		&&lbl_BC_INST_IS_NUMBER,     &&lbl_BC_INST_IS_STRING,          \
		&&lbl_BC_INST_ASCIIFY,       &&lbl_BC_INST_READ,               \
		&&lbl_BC_INST_MAXIBASE,      &&lbl_BC_INST_MAXOBASE,           \
		&&lbl_BC_INST_MAXSCALE,      &&lbl_BC_INST_LINE_LENGTH,        \
		&&lbl_BC_INST_LEADING_ZERO,  &&lbl_BC_INST_PRINT,              \
		&&lbl_BC_INST_PRINT_POP,     &&lbl_BC_INST_STR,                \
		&&lbl_BC_INST_POP,           &&lbl_BC_INST_SWAP,               \
		&&lbl_BC_INST_MODEXP,        &&lbl_BC_INST_DIVMOD,             \
		&&lbl_BC_INST_PRINT_STREAM,  &&lbl_BC_INST_EXTENDED_REGISTERS, \
		&&lbl_BC_INST_POP_EXEC,      &&lbl_BC_INST_EXECUTE,            \
		&&lbl_BC_INST_EXEC_COND,     &&lbl_BC_INST_PRINT_STACK,        \
		&&lbl_BC_INST_CLEAR_STACK,   &&lbl_BC_INST_REG_STACK_LEN,      \
		&&lbl_BC_INST_STACK_LEN,     &&lbl_BC_INST_DUPLICATE,          \
		&&lbl_BC_INST_LOAD,          &&lbl_BC_INST_PUSH_VAR,           \
		&&lbl_BC_INST_PUSH_TO_VAR,   &&lbl_BC_INST_QUIT,               \
		&&lbl_BC_INST_NQUIT,         &&lbl_BC_INST_EXEC_STACK_LEN,     \
		&&lbl_BC_INST_INVALID,                                         \
	}

#endif // BC_ENABLE_EXTRA_MATH

#endif // BC_ENABLED

#else // BC_HAS_COMPUTED_GOTO

#define BC_PROG_JUMP(inst, code, ip) break
#define BC_PROG_DIRECT_JUMP(l)
#define BC_PROG_LBL(l) case l
#define BC_PROG_FALLTHROUGH BC_FALLTHROUGH

#define BC_PROG_LBLS

#endif // BC_HAS_COMPUTED_GOTO

#endif // BC_PROGRAM_H