3 struct quotation_jit : public jit {
4 data_root<array> elements;
5 bool compiling, relocate;
8 quotation_jit(cell owner, bool compiling, bool relocate, factor_vm* vm)
10 elements(false_object, vm),
16 void init_quotation(cell quot);
18 bool primitive_call_p(cell i, cell length);
19 bool fast_if_p(cell i, cell length);
20 bool fast_dip_p(cell i, cell length);
21 bool fast_2dip_p(cell i, cell length);
22 bool fast_3dip_p(cell i, cell length);
23 bool mega_lookup_p(cell i, cell length);
24 bool declare_p(cell i, cell length);
25 bool special_subprimitive_p(cell obj);
27 void emit_mega_cache_lookup(cell methods, fixnum index, cell cache);
28 void emit_quotation(cell quot);
29 void emit_epilog(bool needed);
31 cell word_stack_frame_size(cell obj);
33 void iterate_quotation();
36 void word_call(cell word) {
37 emit_with_literal(parent->special_objects[JIT_WORD_CALL], word);
40 // Allocates memory (literal(), emit())
41 void word_jump(cell word_) {
42 data_root<word> word(word_, parent);
44 literal(tag_fixnum(xt_tail_pic_offset));
46 literal(word.value());
47 emit(parent->special_objects[JIT_WORD_JUMP]);
51 VM_C_API cell lazy_jit_compile(cell quot, factor_vm* parent);