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