]> gitweb.factorcode.org Git - factor.git/blob - vm/master.hpp
Put brackets around ipv6 addresses in `inet6 present`
[factor.git] / vm / master.hpp
1 #ifndef __FACTOR_MASTER_H__
2 #define __FACTOR_MASTER_H__
3
4 #ifndef _THREAD_SAFE
5 #define _THREAD_SAFE
6 #endif
7
8 #ifndef _REENTRANT
9 #define _REENTRANT
10 #endif
11
12 #include <errno.h>
13
14 // C headers
15 #include <fcntl.h>
16 #include <limits.h>
17 #include <math.h>
18 #include <stdio.h>
19 #include <stdlib.h>
20 #include <string.h>
21 #include <time.h>
22 #include <wchar.h>
23 #include <stdint.h>
24
25 // C++ headers
26 #include <algorithm>
27 #include <list>
28 #include <map>
29 #include <set>
30 #include <vector>
31 #include <iostream>
32 #include <iomanip>
33 #include <limits>
34 #include <sstream>
35 #include <string>
36
37 #define FACTOR_STRINGIZE_I(x) #x
38 #define FACTOR_STRINGIZE(x) FACTOR_STRINGIZE_I(x)
39
40 // Record compiler version
41 #if defined(__clang__)
42 #define FACTOR_COMPILER_VERSION "Clang (GCC " __VERSION__ ")"
43 #elif defined(__INTEL_COMPILER)
44 #define FACTOR_COMPILER_VERSION \
45   "Intel C Compiler " FACTOR_STRINGIZE(__INTEL_COMPILER)
46 #elif defined(__MINGW32__)
47 #define FACTOR_COMPILER_VERSION "MinGW (GCC " __VERSION__ ")"
48 #elif defined(__GNUC__)
49 #define FACTOR_COMPILER_VERSION "GCC " __VERSION__
50 #elif defined(_MSC_FULL_VER)
51 #define FACTOR_COMPILER_VERSION \
52   "Microsoft Visual C++ " FACTOR_STRINGIZE(_MSC_FULL_VER)
53 #else
54 #define FACTOR_COMPILER_VERSION "unknown"
55 #endif
56
57 #if defined(FACTOR_REPRODUCIBLE)
58   #define FACTOR_COMPILE_TIME "[reproducible]"
59 #else
60   // Record compilation time
61   #define FACTOR_COMPILE_TIME  __DATE__ " " __TIME__
62 #endif
63
64 // Detect target CPU type
65 #if defined(__arm__)
66 #define FACTOR_ARM
67 #elif defined(__aarch64__)
68 #define FACTOR_ARM64
69 #define FACTOR_64
70 #elif defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64)
71 #define FACTOR_AMD64
72 #define FACTOR_64
73 #elif defined(i386) || defined(__i386) || defined(__i386__) || defined(_M_IX86)
74 #define FACTOR_X86
75 #elif(defined(__POWERPC__) || defined(__ppc__) || defined(_ARCH_PPC)) && \
76     (defined(__PPC64__) || defined(__64BIT__))
77 #define FACTOR_PPC64
78 #define FACTOR_PPC
79 #define FACTOR_64
80 #elif defined(__POWERPC__) || defined(__ppc__) || defined(_ARCH_PPC)
81 #define FACTOR_PPC32
82 #define FACTOR_PPC
83 #else
84 #error "Unsupported architecture"
85 #endif
86
87 #if defined(_MSC_VER) || defined (__MINGW32__)
88 #define WINDOWS
89 #define WINNT
90 #elif defined(WIN32)
91 #define WINDOWS
92 #endif
93
94 // Forward-declare this since it comes up in function prototypes
95 namespace factor { struct factor_vm; }
96
97 // Factor headers
98 #include "assert.hpp"
99 #include "debug.hpp"
100 #include "layouts.hpp"
101 #include "platform.hpp"
102 #include "utilities.hpp"
103 #include "primitives.hpp"
104 #include "errors.hpp"
105 #include "segments.hpp"
106 #include "gc_info.hpp"
107 #include "contexts.hpp"
108 #include "run.hpp"
109 #include "objects.hpp"
110 #include "sampling_profiler.hpp"
111 #include "bignumint.hpp"
112 #include "bignum.hpp"
113 #include "booleans.hpp"
114 #include "instruction_operands.hpp"
115 #include "tagged.hpp"
116 #include "code_blocks.hpp"
117 #include "bump_allocator.hpp"
118 #include "bitwise_hacks.hpp"
119 #include "mark_bits.hpp"
120 #include "fixup.hpp"
121 #include "free_list.hpp"
122 #include "write_barrier.hpp"
123 #include "object_start_map.hpp"
124 #include "aging_space.hpp"
125 #include "tenured_space.hpp"
126 #include "data_heap.hpp"
127 #include "code_heap.hpp"
128 #include "gc.hpp"
129 #include "float_bits.hpp"
130 #include "io.hpp"
131 #include "image.hpp"
132 #include "callbacks.hpp"
133 #include "dispatch.hpp"
134 #include "vm.hpp"
135 #include "allot.hpp"
136 #include "data_roots.hpp"
137 #include "code_roots.hpp"
138 #include "generic_arrays.hpp"
139 #include "callstack.hpp"
140 #include "slot_visitor.hpp"
141 #include "to_tenured_collector.hpp"
142 #include "arrays.hpp"
143 #include "math.hpp"
144 #include "byte_arrays.hpp"
145 #include "jit.hpp"
146 #include "quotations.hpp"
147 #include "inline_cache.hpp"
148 #include "mvm.hpp"
149 #include "factor.hpp"
150
151 #endif // __FACTOR_MASTER_H__