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