2009-05-02 05:04:19 -04:00
|
|
|
#ifndef __FACTOR_MASTER_H__
|
|
|
|
#define __FACTOR_MASTER_H__
|
|
|
|
|
2009-08-28 15:23:01 -04:00
|
|
|
#define _THREAD_SAFE
|
|
|
|
#define _REENTRANT
|
|
|
|
|
2009-05-02 05:04:19 -04:00
|
|
|
#ifndef WINCE
|
|
|
|
#include <errno.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef FACTOR_DEBUG
|
|
|
|
#include <assert.h>
|
|
|
|
#endif
|
|
|
|
|
2009-05-05 12:07:20 -04:00
|
|
|
/* C headers */
|
2009-05-02 05:04:19 -04:00
|
|
|
#include <fcntl.h>
|
|
|
|
#include <limits.h>
|
|
|
|
#include <math.h>
|
|
|
|
#include <setjmp.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <time.h>
|
|
|
|
|
2009-05-05 12:07:20 -04:00
|
|
|
/* C++ headers */
|
2009-10-06 03:39:12 -04:00
|
|
|
#include <algorithm>
|
2009-10-19 03:21:11 -04:00
|
|
|
#include <map>
|
2009-10-03 09:47:05 -04:00
|
|
|
#include <set>
|
2009-10-06 03:39:12 -04:00
|
|
|
#include <vector>
|
2009-10-21 21:12:57 -04:00
|
|
|
#include <iostream>
|
2009-09-08 15:21:09 -04:00
|
|
|
|
2010-01-13 08:18:49 -05:00
|
|
|
/* Detect target CPU type */
|
|
|
|
#if defined(__arm__)
|
|
|
|
#define FACTOR_ARM
|
|
|
|
#elif defined(__amd64__) || defined(__x86_64__)
|
|
|
|
#define FACTOR_AMD64
|
|
|
|
#define FACTOR_64
|
2010-01-16 09:43:22 -05:00
|
|
|
#elif defined(i386) || defined(__i386) || defined(__i386__) || defined(WIN32) || defined(_MSC_VER)
|
2010-01-13 08:18:49 -05:00
|
|
|
#define FACTOR_X86
|
|
|
|
#elif defined(__POWERPC__) || defined(__ppc__) || defined(_ARCH_PPC)
|
|
|
|
#define FACTOR_PPC
|
|
|
|
#else
|
|
|
|
#error "Unsupported architecture"
|
|
|
|
#endif
|
|
|
|
|
2010-01-16 09:43:22 -05:00
|
|
|
#if defined(_MSC_VER)
|
2010-01-13 08:18:49 -05:00
|
|
|
#define WINDOWS
|
2010-01-16 09:43:22 -05:00
|
|
|
#define WINNT
|
|
|
|
#elif defined(WIN32)
|
|
|
|
#define WINDOWS
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef _MSC_VER
|
|
|
|
#include <stdbool.h>
|
2010-01-13 08:18:49 -05:00
|
|
|
#endif
|
|
|
|
|
2009-10-03 09:47:05 -04:00
|
|
|
/* Forward-declare this since it comes up in function prototypes */
|
|
|
|
namespace factor
|
|
|
|
{
|
|
|
|
struct factor_vm;
|
|
|
|
}
|
|
|
|
|
2009-05-05 12:07:20 -04:00
|
|
|
/* Factor headers */
|
2009-05-02 05:04:19 -04:00
|
|
|
#include "layouts.hpp"
|
2009-08-18 15:40:26 -04:00
|
|
|
#include "platform.hpp"
|
2009-08-18 15:49:22 -04:00
|
|
|
#include "primitives.hpp"
|
2009-05-04 02:00:30 -04:00
|
|
|
#include "segments.hpp"
|
|
|
|
#include "contexts.hpp"
|
2009-05-02 05:04:19 -04:00
|
|
|
#include "run.hpp"
|
2009-11-05 20:03:51 -05:00
|
|
|
#include "objects.hpp"
|
2009-05-02 05:04:19 -04:00
|
|
|
#include "profiler.hpp"
|
|
|
|
#include "errors.hpp"
|
|
|
|
#include "bignumint.hpp"
|
|
|
|
#include "bignum.hpp"
|
2009-12-02 01:48:41 -05:00
|
|
|
#include "booleans.hpp"
|
2009-11-23 19:51:08 -05:00
|
|
|
#include "instruction_operands.hpp"
|
2009-11-07 17:16:09 -05:00
|
|
|
#include "code_blocks.hpp"
|
2009-10-20 16:15:05 -04:00
|
|
|
#include "bump_allocator.hpp"
|
2009-11-01 21:15:42 -05:00
|
|
|
#include "bitwise_hacks.hpp"
|
2009-10-20 16:15:05 -04:00
|
|
|
#include "mark_bits.hpp"
|
2009-10-26 23:08:35 -04:00
|
|
|
#include "free_list.hpp"
|
2009-10-20 16:15:05 -04:00
|
|
|
#include "free_list_allocator.hpp"
|
2009-05-04 05:50:24 -04:00
|
|
|
#include "write_barrier.hpp"
|
2009-10-20 16:15:05 -04:00
|
|
|
#include "object_start_map.hpp"
|
2009-10-20 23:20:49 -04:00
|
|
|
#include "nursery_space.hpp"
|
2009-10-07 16:48:09 -04:00
|
|
|
#include "aging_space.hpp"
|
|
|
|
#include "tenured_space.hpp"
|
2009-10-07 15:05:09 -04:00
|
|
|
#include "data_heap.hpp"
|
2009-10-27 22:31:28 -04:00
|
|
|
#include "code_heap.hpp"
|
2009-10-08 03:11:29 -04:00
|
|
|
#include "gc.hpp"
|
2009-05-02 05:04:19 -04:00
|
|
|
#include "debug.hpp"
|
|
|
|
#include "strings.hpp"
|
|
|
|
#include "tuples.hpp"
|
|
|
|
#include "words.hpp"
|
|
|
|
#include "float_bits.hpp"
|
|
|
|
#include "io.hpp"
|
|
|
|
#include "image.hpp"
|
|
|
|
#include "alien.hpp"
|
2009-10-16 12:39:22 -04:00
|
|
|
#include "callbacks.hpp"
|
2009-11-05 02:07:59 -05:00
|
|
|
#include "dispatch.hpp"
|
2010-01-05 21:47:36 -05:00
|
|
|
#include "entry_points.hpp"
|
2009-08-17 16:37:12 -04:00
|
|
|
#include "vm.hpp"
|
2009-10-31 03:30:48 -04:00
|
|
|
#include "allot.hpp"
|
2009-08-17 16:37:15 -04:00
|
|
|
#include "tagged.hpp"
|
2009-11-02 19:10:34 -05:00
|
|
|
#include "data_roots.hpp"
|
|
|
|
#include "code_roots.hpp"
|
2009-11-22 14:37:39 -05:00
|
|
|
#include "generic_arrays.hpp"
|
2009-10-24 04:54:53 -04:00
|
|
|
#include "slot_visitor.hpp"
|
2009-10-07 16:48:09 -04:00
|
|
|
#include "collector.hpp"
|
|
|
|
#include "copying_collector.hpp"
|
|
|
|
#include "nursery_collector.hpp"
|
|
|
|
#include "aging_collector.hpp"
|
|
|
|
#include "to_tenured_collector.hpp"
|
2009-10-24 04:54:53 -04:00
|
|
|
#include "code_block_visitor.hpp"
|
2009-10-24 05:18:33 -04:00
|
|
|
#include "compaction.hpp"
|
2009-10-07 16:48:09 -04:00
|
|
|
#include "full_collector.hpp"
|
2009-09-29 14:53:10 -04:00
|
|
|
#include "callstack.hpp"
|
|
|
|
#include "arrays.hpp"
|
|
|
|
#include "math.hpp"
|
|
|
|
#include "byte_arrays.hpp"
|
2009-05-02 05:04:19 -04:00
|
|
|
#include "jit.hpp"
|
2009-05-02 10:19:09 -04:00
|
|
|
#include "quotations.hpp"
|
2009-05-02 05:04:19 -04:00
|
|
|
#include "inline_cache.hpp"
|
|
|
|
#include "factor.hpp"
|
|
|
|
#include "utilities.hpp"
|
|
|
|
|
|
|
|
#endif /* __FACTOR_MASTER_H__ */
|