VM: changing case of code_block_type
parent
f147bd4404
commit
453eca66c4
|
@ -47,7 +47,7 @@ cell code_block::owner_quot() const {
|
|||
// 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);
|
||||
}
|
||||
|
||||
|
|
|
@ -25,9 +25,9 @@ struct code_block {
|
|||
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;
|
||||
|
|
|
@ -151,7 +151,7 @@ void factor_vm::primitive_modify_code_heap() {
|
|||
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();
|
||||
|
|
|
@ -33,7 +33,7 @@ void factor_vm::update_pic_count(cell type) {
|
|||
|
||||
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_,
|
||||
|
|
|
@ -76,9 +76,9 @@ static inline const char* type_name(cell type) {
|
|||
}
|
||||
|
||||
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
|
||||
|
|
|
@ -6,7 +6,7 @@ struct quotation_jit : public jit {
|
|||
|
||||
// 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) {}
|
||||
|
|
Loading…
Reference in New Issue