6 data_root<object> owner;
7 growable_byte_array code;
8 growable_byte_array relocation;
9 growable_array parameters;
10 growable_array literals;
11 bool computing_offset_p;
16 explicit jit(code_block_type type, cell owner, factor_vm *parent);
17 void compute_position(cell offset);
19 void emit_relocation(cell code_template);
20 void emit(cell code_template);
22 void parameter(cell parameter) { parameters.add(parameter); }
23 void emit_with_parameter(cell code_template_, cell parameter_);
25 void literal(cell literal) { literals.add(literal); }
26 void emit_with_literal(cell code_template_, cell literal_);
28 void push(cell literal)
30 emit_with_literal(parent->special_objects[JIT_PUSH_IMMEDIATE],literal);
33 void word_jump(cell word_)
35 data_root<word> word(word_,parent);
37 literal(tag_fixnum(xt_tail_pic_offset));
39 literal(word.value());
40 emit(parent->special_objects[JIT_WORD_JUMP]);
43 void word_call(cell word)
45 emit_with_literal(parent->special_objects[JIT_WORD_CALL],word);
48 bool emit_subprimitive(cell word_, bool tail_call_p, bool stack_frame_p);
50 void emit_class_lookup(fixnum index, cell type);
54 if(computing_offset_p)
56 /* If this is still on, emit() didn't clear it,
57 so the offset was out of bounds */
64 void set_position(fixnum position_)
66 if(computing_offset_p)
71 code_block *to_code_block();