]> gitweb.factorcode.org Git - factor.git/blob - vm/master.hpp
bb1fb6247ba37f51f52c9403cdc0fe575fdece0b
[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 <string>
35
36 #define FACTOR_STRINGIZE_I(x) #x
37 #define FACTOR_STRINGIZE(x) FACTOR_STRINGIZE_I(x)
38
39 /* Record compiler version */
40 #if defined(__clang__)
41 #define FACTOR_COMPILER_VERSION "Clang (GCC " __VERSION__ ")"
42 #elif defined(__INTEL_COMPILER)
43 #define FACTOR_COMPILER_VERSION \
44   "Intel C Compiler " FACTOR_STRINGIZE(__INTEL_COMPILER)
45 #elif defined(__GNUC__)
46 #define FACTOR_COMPILER_VERSION "GCC " __VERSION__
47 #elif defined(_MSC_FULL_VER)
48 #define FACTOR_COMPILER_VERSION \
49   "Microsoft Visual C++ " FACTOR_STRINGIZE(_MSC_FULL_VER)
50 #else
51 #define FACTOR_COMPILER_VERSION "unknown"
52 #endif
53
54 /* Detect target CPU type */
55 #if defined(__arm__)
56 #define FACTOR_ARM
57 #elif defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64)
58 #define FACTOR_AMD64
59 #define FACTOR_64
60 #elif defined(i386) || defined(__i386) || defined(__i386__) || defined(_M_IX86)
61 #define FACTOR_X86
62 #elif(defined(__POWERPC__) || defined(__ppc__) || defined(_ARCH_PPC)) && \
63     (defined(__PPC64__) || defined(__64BIT__))
64 #define FACTOR_PPC64
65 #define FACTOR_PPC
66 #define FACTOR_64
67 #elif defined(__POWERPC__) || defined(__ppc__) || defined(_ARCH_PPC)
68 #define FACTOR_PPC32
69 #define FACTOR_PPC
70 #else
71 #error "Unsupported architecture"
72 #endif
73
74 #if defined(_MSC_VER)
75 #define WINDOWS
76 #define WINNT
77 #elif defined(WIN32)
78 #define WINDOWS
79 #endif
80
81 /* Forward-declare this since it comes up in function prototypes */
82 namespace factor { struct factor_vm; }
83
84 /* Factor headers */
85 #include "assert.hpp"
86 #include "layouts.hpp"
87 #include "platform.hpp"
88 #include "primitives.hpp"
89 #include "segments.hpp"
90 #include "gc_info.hpp"
91 #include "contexts.hpp"
92 #include "run.hpp"
93 #include "objects.hpp"
94 #include "sampling_profiler.hpp"
95 #include "errors.hpp"
96 #include "bignumint.hpp"
97 #include "bignum.hpp"
98 #include "booleans.hpp"
99 #include "instruction_operands.hpp"
100 #include "code_blocks.hpp"
101 #include "bump_allocator.hpp"
102 #include "bitwise_hacks.hpp"
103 #include "mark_bits.hpp"
104 #include "free_list.hpp"
105 #include "fixup.hpp"
106 #include "tuples.hpp"
107 #include "free_list_allocator.hpp"
108 #include "write_barrier.hpp"
109 #include "object_start_map.hpp"
110 #include "nursery_space.hpp"
111 #include "aging_space.hpp"
112 #include "tenured_space.hpp"
113 #include "data_heap.hpp"
114 #include "code_heap.hpp"
115 #include "gc.hpp"
116 #include "strings.hpp"
117 #include "float_bits.hpp"
118 #include "io.hpp"
119 #include "image.hpp"
120 #include "callbacks.hpp"
121 #include "dispatch.hpp"
122 #include "entry_points.hpp"
123 #include "safepoints.hpp"
124 #include "vm.hpp"
125 #include "allot.hpp"
126 #include "tagged.hpp"
127 #include "data_roots.hpp"
128 #include "code_roots.hpp"
129 #include "generic_arrays.hpp"
130 #include "callstack.hpp"
131 #include "slot_visitor.hpp"
132 #include "collector.hpp"
133 #include "copying_collector.hpp"
134 #include "nursery_collector.hpp"
135 #include "aging_collector.hpp"
136 #include "to_tenured_collector.hpp"
137 #include "code_block_visitor.hpp"
138 #include "full_collector.hpp"
139 #include "arrays.hpp"
140 #include "math.hpp"
141 #include "byte_arrays.hpp"
142 #include "jit.hpp"
143 #include "quotations.hpp"
144 #include "inline_cache.hpp"
145 #include "mvm.hpp"
146 #include "factor.hpp"
147 #include "utilities.hpp"
148
149 #endif /* __FACTOR_MASTER_H__ */