2009-01-24 21:13:17 -05:00
|
|
|
/* compiled code */
|
|
|
|
F_HEAP code_heap;
|
2007-09-20 18:09:08 -04:00
|
|
|
|
2009-01-24 21:13:17 -05:00
|
|
|
INLINE F_BLOCK *compiled_to_block(F_CODE_BLOCK *compiled)
|
|
|
|
{
|
|
|
|
return (F_BLOCK *)compiled - 1;
|
|
|
|
}
|
2007-09-20 18:09:08 -04:00
|
|
|
|
2009-01-24 21:13:17 -05:00
|
|
|
INLINE F_CODE_BLOCK *block_to_compiled(F_BLOCK *block)
|
|
|
|
{
|
|
|
|
return (F_CODE_BLOCK *)(block + 1);
|
|
|
|
}
|
2007-09-20 18:09:08 -04:00
|
|
|
|
2009-01-24 21:13:17 -05:00
|
|
|
void init_code_heap(CELL size);
|
2007-09-20 18:09:08 -04:00
|
|
|
|
2009-01-24 21:13:17 -05:00
|
|
|
bool in_code_heap_p(CELL ptr);
|
2007-09-20 18:09:08 -04:00
|
|
|
|
2008-01-09 01:33:40 -05:00
|
|
|
void default_word_code(F_WORD *word, bool relocate);
|
2008-01-02 19:36:36 -05:00
|
|
|
|
2009-01-24 21:13:17 -05:00
|
|
|
void set_word_code(F_WORD *word, F_CODE_BLOCK *compiled);
|
2007-10-28 04:33:36 -04:00
|
|
|
|
2009-01-24 21:13:17 -05:00
|
|
|
typedef void (*CODE_HEAP_ITERATOR)(F_CODE_BLOCK *compiled);
|
2007-09-20 18:09:08 -04:00
|
|
|
|
2009-01-24 21:13:17 -05:00
|
|
|
void iterate_code_heap(CODE_HEAP_ITERATOR iter);
|
2009-01-24 18:01:01 -05:00
|
|
|
|
2009-01-24 21:13:17 -05:00
|
|
|
void copy_code_heap_roots(void);
|
2007-09-20 18:09:08 -04:00
|
|
|
|
2009-01-24 21:13:17 -05:00
|
|
|
void update_code_heap_roots(void);
|
2009-01-24 18:01:01 -05:00
|
|
|
|
2009-01-24 21:13:17 -05:00
|
|
|
void primitive_modify_code_heap(void);
|
2009-01-24 18:42:28 -05:00
|
|
|
|
2009-01-24 21:13:17 -05:00
|
|
|
void primitive_code_room(void);
|
2009-01-24 18:42:28 -05:00
|
|
|
|
2009-01-24 21:13:17 -05:00
|
|
|
void compact_code_heap(void);
|