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