2004-07-16 02:26:21 -04:00
|
|
|
#ifndef __FACTOR_H__
|
|
|
|
#define __FACTOR_H__
|
|
|
|
|
2004-11-08 22:36:51 -05:00
|
|
|
#if defined(i386) || defined(__i386) || defined(__i386__)
|
|
|
|
#define FACTOR_X86
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* CELL must be 32 bits and your system must have 32-bit pointers */
|
|
|
|
typedef unsigned long int CELL;
|
|
|
|
#define CELLS ((signed)sizeof(CELL))
|
|
|
|
|
|
|
|
/* raw pointer to datastack bottom */
|
|
|
|
CELL ds_bot;
|
|
|
|
|
|
|
|
/* raw pointer to datastack top */
|
|
|
|
#ifdef FACTOR_X86
|
|
|
|
register CELL ds asm("%esi");
|
|
|
|
#else
|
|
|
|
CELL ds;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* raw pointer to callstack bottom */
|
|
|
|
CELL cs_bot;
|
|
|
|
|
|
|
|
/* raw pointer to callstack top */
|
|
|
|
CELL cs;
|
|
|
|
|
2004-08-30 00:36:44 -04:00
|
|
|
#include <dirent.h>
|
2004-07-18 22:14:36 -04:00
|
|
|
#include <errno.h>
|
2004-07-24 00:54:57 -04:00
|
|
|
#include <fcntl.h>
|
2004-07-27 22:52:35 -04:00
|
|
|
#include <limits.h>
|
2004-08-06 18:40:44 -04:00
|
|
|
#include <math.h>
|
2004-07-16 02:26:21 -04:00
|
|
|
#include <setjmp.h>
|
2004-08-16 21:05:38 -04:00
|
|
|
#include <signal.h>
|
2004-07-16 02:26:21 -04:00
|
|
|
#include <stdbool.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
2004-08-12 01:07:22 -04:00
|
|
|
#include <sys/mman.h>
|
2004-07-23 18:52:08 -04:00
|
|
|
#include <sys/param.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/socket.h>
|
2004-08-29 23:30:54 -04:00
|
|
|
#include <sys/stat.h>
|
2004-07-23 18:52:08 -04:00
|
|
|
#include <netinet/in.h>
|
2004-07-24 17:37:42 -04:00
|
|
|
#include <arpa/inet.h>
|
2004-07-24 00:54:57 -04:00
|
|
|
#include <unistd.h>
|
2004-08-04 03:12:55 -04:00
|
|
|
#include <sys/time.h>
|
2004-08-18 15:23:42 -04:00
|
|
|
#include <netdb.h>
|
2004-07-16 02:26:21 -04:00
|
|
|
|
2004-09-18 18:15:01 -04:00
|
|
|
#ifdef FFI
|
|
|
|
#include <dlfcn.h>
|
|
|
|
#endif /* FFI */
|
|
|
|
|
2004-07-16 02:26:21 -04:00
|
|
|
#define INLINE inline static
|
|
|
|
|
2004-10-12 23:49:43 -04:00
|
|
|
#define FIXNUM_MAX (LONG_MAX >> TAG_BITS)
|
|
|
|
#define FIXNUM_MIN (LONG_MIN >> TAG_BITS)
|
|
|
|
|
|
|
|
#define FIXNUM long int /* unboxed */
|
|
|
|
|
2004-09-03 16:54:58 -04:00
|
|
|
#define WORD_SIZE (CELLS*8)
|
2004-09-03 18:37:25 -04:00
|
|
|
#define HALF_WORD_SIZE (CELLS*4)
|
|
|
|
#define HALF_WORD_MASK (((unsigned long)1<<HALF_WORD_SIZE)-1)
|
2004-09-03 16:54:58 -04:00
|
|
|
|
2004-07-16 02:26:21 -04:00
|
|
|
/* must always be 16 bits */
|
2004-07-27 21:12:22 -04:00
|
|
|
typedef unsigned short CHAR;
|
2004-08-26 22:21:17 -04:00
|
|
|
#define CHARS ((signed)sizeof(CHAR))
|
2004-07-16 02:26:21 -04:00
|
|
|
|
2004-09-02 22:53:50 -04:00
|
|
|
/* must always be 8 bits */
|
|
|
|
typedef unsigned char BYTE;
|
|
|
|
|
2004-10-17 19:01:16 -04:00
|
|
|
/* Memory areas */
|
2004-10-11 21:40:12 -04:00
|
|
|
#define DEFAULT_ARENA (64 * 1024 * 1024)
|
2004-10-17 19:01:16 -04:00
|
|
|
#define COMPILE_ZONE_SIZE (64 * 1024 * 1024)
|
|
|
|
#define STACK_SIZE (2 * 1024 * 1024)
|
2004-07-16 02:26:21 -04:00
|
|
|
|
|
|
|
#include "memory.h"
|
2004-08-23 02:15:10 -04:00
|
|
|
#include "error.h"
|
2004-07-16 02:26:21 -04:00
|
|
|
#include "types.h"
|
2004-11-28 19:07:24 -05:00
|
|
|
#include "gc.h"
|
2004-11-08 22:36:51 -05:00
|
|
|
#include "boolean.h"
|
2004-08-05 15:18:31 -04:00
|
|
|
#include "word.h"
|
|
|
|
#include "run.h"
|
2004-10-17 19:01:16 -04:00
|
|
|
#include "signal.h"
|
2004-07-24 15:11:55 -04:00
|
|
|
#include "fixnum.h"
|
2004-08-27 02:09:24 -04:00
|
|
|
#include "array.h"
|
2004-08-24 23:46:55 -04:00
|
|
|
#include "s48_bignumint.h"
|
|
|
|
#include "s48_bignum.h"
|
2004-07-27 21:12:22 -04:00
|
|
|
#include "bignum.h"
|
2004-08-04 22:43:58 -04:00
|
|
|
#include "ratio.h"
|
2004-08-05 16:49:55 -04:00
|
|
|
#include "float.h"
|
2004-08-05 20:29:52 -04:00
|
|
|
#include "complex.h"
|
2004-07-28 19:02:24 -04:00
|
|
|
#include "arithmetic.h"
|
2004-08-04 03:12:55 -04:00
|
|
|
#include "misc.h"
|
2004-08-12 23:40:28 -04:00
|
|
|
#include "relocate.h"
|
2004-07-24 15:11:55 -04:00
|
|
|
#include "string.h"
|
2004-08-12 23:40:28 -04:00
|
|
|
#include "sbuf.h"
|
2004-08-12 17:36:36 -04:00
|
|
|
#include "port.h"
|
2004-08-20 01:50:59 -04:00
|
|
|
#include "io.h"
|
2004-08-20 01:49:14 -04:00
|
|
|
#include "read.h"
|
|
|
|
#include "write.h"
|
2004-07-24 00:54:57 -04:00
|
|
|
#include "file.h"
|
2004-08-12 17:36:36 -04:00
|
|
|
#include "socket.h"
|
2004-07-16 02:26:21 -04:00
|
|
|
#include "cons.h"
|
|
|
|
#include "image.h"
|
|
|
|
#include "primitives.h"
|
|
|
|
#include "vector.h"
|
|
|
|
#include "stack.h"
|
2004-09-06 02:32:04 -04:00
|
|
|
#include "compiler.h"
|
2004-09-18 18:15:01 -04:00
|
|
|
#include "ffi.h"
|
2004-07-16 02:26:21 -04:00
|
|
|
|
|
|
|
#endif /* __FACTOR_H__ */
|