]> gitweb.factorcode.org Git - factor.git/blob - vm/quotations.hpp
vm: eliminating register variables work in progress. Works on x86-32 with non-optimiz...
[factor.git] / vm / quotations.hpp
1 namespace factor
2 {
3
4 struct quotation_jit : public jit {
5         data_root<array> elements;
6         bool compiling, relocate;
7
8         explicit quotation_jit(cell owner, bool compiling_, bool relocate_, factor_vm *vm)
9                 : jit(code_block_unoptimized,owner,vm),
10                   elements(false_object,vm),
11                   compiling(compiling_),
12                   relocate(relocate_){};
13
14         void init_quotation(cell quot);
15         void emit_mega_cache_lookup(cell methods, fixnum index, cell cache);
16         bool primitive_call_p(cell i, cell length);
17         bool trivial_quotation_p(array *elements);
18         void emit_quot(cell quot);
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 word_stack_frame_p(cell obj);
26         bool stack_frame_p();
27         void iterate_quotation();
28 };
29
30 VM_C_API cell lazy_jit_compile_impl(cell quot, factor_vm *parent);
31
32 }