2009-05-04 02:46:13 -04:00
|
|
|
namespace factor
|
|
|
|
{
|
|
|
|
|
2009-05-02 05:04:19 -04:00
|
|
|
/* compiled code */
|
2009-05-04 05:50:24 -04:00
|
|
|
extern heap code;
|
2009-05-02 05:04:19 -04:00
|
|
|
|
2009-05-04 05:50:24 -04:00
|
|
|
void init_code_heap(cell size);
|
2009-05-02 05:04:19 -04:00
|
|
|
|
2009-05-04 05:50:24 -04:00
|
|
|
bool in_code_heap_p(cell ptr);
|
2009-05-02 05:04:19 -04:00
|
|
|
|
2009-05-04 05:50:24 -04:00
|
|
|
void jit_compile_word(cell word, cell def, bool relocate);
|
2009-05-02 05:04:19 -04:00
|
|
|
|
2009-05-04 05:50:24 -04:00
|
|
|
typedef void (*code_heap_iterator)(code_block *compiled);
|
2009-05-02 05:04:19 -04:00
|
|
|
|
2009-05-04 05:50:24 -04:00
|
|
|
void iterate_code_heap(code_heap_iterator iter);
|
2009-05-02 05:04:19 -04:00
|
|
|
|
2009-05-05 12:33:35 -04:00
|
|
|
void copy_code_heap_roots();
|
2009-05-02 05:04:19 -04:00
|
|
|
|
2009-05-04 02:00:30 -04:00
|
|
|
PRIMITIVE(modify_code_heap);
|
2009-05-02 05:04:19 -04:00
|
|
|
|
2009-05-04 02:00:30 -04:00
|
|
|
PRIMITIVE(code_room);
|
2009-05-02 05:04:19 -04:00
|
|
|
|
2009-05-05 12:33:35 -04:00
|
|
|
void compact_code_heap();
|
2009-05-02 05:04:19 -04:00
|
|
|
|
2009-05-04 05:50:24 -04:00
|
|
|
inline static void check_code_pointer(cell ptr)
|
2009-05-02 05:04:19 -04:00
|
|
|
{
|
|
|
|
#ifdef FACTOR_DEBUG
|
2009-05-04 05:50:24 -04:00
|
|
|
assert(in_code_heap_p(ptr));
|
2009-05-02 05:04:19 -04:00
|
|
|
#endif
|
|
|
|
}
|
2009-05-04 02:46:13 -04:00
|
|
|
|
|
|
|
}
|