// scan offset. In all other cases -1 is returned.
// Allocates memory (quot_code_offset_to_scan)
cell code_block::scan(factor_vm* vm, cell addr) const {
- if (type() != code_block_unoptimized) {
+ if (type() != CODE_BLOCK_UNOPTIMIZED) {
return tag_fixnum(-1);
}
header = ((header & ~0x7) | (type << 1));
}
- bool pic_p() const { return type() == code_block_pic; }
+ bool pic_p() const { return type() == CODE_BLOCK_PIC; }
- bool optimized_p() const { return type() == code_block_optimized; }
+ bool optimized_p() const { return type() == CODE_BLOCK_OPTIMIZED; }
cell size() const {
cell size;
cell frame_size = untag_fixnum(array_nth(compiled_data, 5));
code_block* compiled =
- add_code_block(code_block_optimized, code, labels, word.value(),
+ add_code_block(CODE_BLOCK_OPTIMIZED, code, labels, word.value(),
relocation, parameters, literals, frame_size);
word->entry_point = compiled->entry_point();
struct inline_cache_jit : public jit {
inline_cache_jit(cell generic_word, factor_vm* vm)
- : jit(code_block_pic, generic_word, vm) {}
+ : jit(CODE_BLOCK_PIC, generic_word, vm) {}
void emit_check_and_jump(cell ic_type, cell i, cell klass, cell method);
void emit_inline_cache(fixnum index, cell generic_word_, cell methods_,
}
enum code_block_type {
- code_block_unoptimized,
- code_block_optimized,
- code_block_pic
+ CODE_BLOCK_UNOPTIMIZED,
+ CODE_BLOCK_OPTIMIZED,
+ CODE_BLOCK_PIC
};
// Constants used when floating-point trap exceptions are thrown
// Allocates memory
quotation_jit(cell owner, bool compiling, bool relocate, factor_vm* vm)
- : jit(code_block_unoptimized, owner, vm),
+ : jit(CODE_BLOCK_UNOPTIMIZED, owner, vm),
elements(false_object, vm),
compiling(compiling),
relocate(relocate) {}