2005-03-14 11:25:41 -05:00
|
|
|
/* The compiled code heap is structured into blocks. */
|
2004-12-25 02:55:03 -05:00
|
|
|
typedef struct
|
|
|
|
{
|
2005-03-14 11:25:41 -05:00
|
|
|
CELL header; /* = COMPILED_HEADER */
|
2004-12-25 02:55:03 -05:00
|
|
|
CELL code_length;
|
2005-03-14 11:25:41 -05:00
|
|
|
CELL reloc_length; /* see relocate.h */
|
2004-12-25 02:55:03 -05:00
|
|
|
} F_COMPILED;
|
|
|
|
|
|
|
|
#define COMPILED_HEADER 0x01c3babe
|
|
|
|
|
2004-09-06 02:32:04 -04:00
|
|
|
ZONE compiling;
|
2004-12-25 02:55:03 -05:00
|
|
|
|
|
|
|
#define LITERAL_TABLE 4096
|
|
|
|
|
2004-09-06 22:39:12 -04:00
|
|
|
CELL literal_top;
|
2004-12-25 02:55:03 -05:00
|
|
|
CELL literal_max;
|
2004-09-06 02:32:04 -04:00
|
|
|
|
2005-03-14 11:25:41 -05:00
|
|
|
void init_compiler(CELL size);
|
2004-09-06 22:39:12 -04:00
|
|
|
void primitive_compiled_offset(void);
|
|
|
|
void primitive_set_compiled_offset(void);
|
|
|
|
void primitive_literal_top(void);
|
|
|
|
void primitive_set_literal_top(void);
|
|
|
|
void collect_literals(void);
|
2005-03-14 11:25:41 -05:00
|
|
|
|
|
|
|
#ifdef FACTOR_PPC
|
2005-03-14 13:20:57 -05:00
|
|
|
void flush_icache(void *start, int len);
|
2005-03-14 11:25:41 -05:00
|
|
|
#else
|
|
|
|
INLINE void flush_icache(void *start, int len) {}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
CELL last_flush;
|
|
|
|
|
|
|
|
void primitive_flush_icache(void);
|