-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommon.h
executable file
·60 lines (47 loc) · 1.26 KB
/
common.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
#ifndef common_h_hammer
#define common_h_hammer
#include <stddef.h>
#include <stdint.h>
typedef enum { false, true } bool;
typedef struct Compiler Compiler;
typedef struct VM VM;
typedef enum {
MEM_BLACK,
MEM_GREY,
MEM_WHITE,
} Colour;
#define FRAME_MAX 384
#define STACK_SIZE 256 * FRAME_MAX
// DEBUGGING ------------------->
/* Compilation info */
//#define DEBUG_DISPLAY_TOKENS
//#define DEBUG_DISPLAY_AST
//#define DEBUG_COMPILER_PROGRESS
/* Runtime info */
#define DEBUG_DISPLAY_PROGRAM
//#define DEBUG_DISPLAY_INSTRUCTIONS
//#define DEBUG_DISPLAY_STACK
//#define DEBUG_DISPLAY_TABLES
//#define DEBUG_DISPLAY_STRINGS
/* Memory and Garbage Collector debug options & info */
//#define DEBUG_LOG_MEMORY
//#define DEBUG_LOG_GC
#define DEBUG_STRESS_GC
/* Miscellaneous info */
//#define DEBUG_SCOPE_UPDATES
//#define DEBUG_CHUNK_UPDATES
//#define DEBUG_STRING_DETAILS
// <------------------- DEBUGGING
// USER OPTIONS ---------------->
/* Character sets/formats */
#define OPTION_ASCII_ONLY
#define OPTION_STRICT_ASCII
/* Performance/appearance */
#define OPTION_DETAILED_PRINTING
//#define OPTION_RECURSIVE_TRUTHINESS
#define OPTION_RECURSIVE_PRINTING
/* Lists/maps */
#define OPTION_ONE_INDEXED
// <---------------- USER OPTIONS
#define simple static inline
#endif