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.
 | // scan offset. In all other cases -1 is returned.
 | ||||||
| // Allocates memory (quot_code_offset_to_scan)
 | // Allocates memory (quot_code_offset_to_scan)
 | ||||||
| cell code_block::scan(factor_vm* vm, cell addr) const { | cell code_block::scan(factor_vm* vm, cell addr) const { | ||||||
|   if (type() != code_block_unoptimized) { |   if (type() != CODE_BLOCK_UNOPTIMIZED) { | ||||||
|     return tag_fixnum(-1); |     return tag_fixnum(-1); | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -25,9 +25,9 @@ struct code_block { | ||||||
|     header = ((header & ~0x7) | (type << 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() const { | ||||||
|     cell size; |     cell size; | ||||||
|  |  | ||||||
|  | @ -151,7 +151,7 @@ void factor_vm::primitive_modify_code_heap() { | ||||||
|         cell frame_size = untag_fixnum(array_nth(compiled_data, 5)); |         cell frame_size = untag_fixnum(array_nth(compiled_data, 5)); | ||||||
| 
 | 
 | ||||||
|         code_block* compiled = |         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); |                            relocation, parameters, literals, frame_size); | ||||||
| 
 | 
 | ||||||
|         word->entry_point = compiled->entry_point(); |         word->entry_point = compiled->entry_point(); | ||||||
|  |  | ||||||
|  | @ -33,7 +33,7 @@ void factor_vm::update_pic_count(cell type) { | ||||||
| 
 | 
 | ||||||
| struct inline_cache_jit : public jit { | struct inline_cache_jit : public jit { | ||||||
|   inline_cache_jit(cell generic_word, factor_vm* vm) |   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_check_and_jump(cell ic_type, cell i, cell klass, cell method); | ||||||
|   void emit_inline_cache(fixnum index, cell generic_word_, cell methods_, |   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 { | enum code_block_type { | ||||||
|   code_block_unoptimized, |   CODE_BLOCK_UNOPTIMIZED, | ||||||
|   code_block_optimized, |   CODE_BLOCK_OPTIMIZED, | ||||||
|   code_block_pic |   CODE_BLOCK_PIC | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| // Constants used when floating-point trap exceptions are thrown
 | // Constants used when floating-point trap exceptions are thrown
 | ||||||
|  |  | ||||||
|  | @ -6,7 +6,7 @@ struct quotation_jit : public jit { | ||||||
| 
 | 
 | ||||||
|   // Allocates memory
 |   // Allocates memory
 | ||||||
|   quotation_jit(cell owner, bool compiling, bool relocate, factor_vm* vm) |   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), |         elements(false_object, vm), | ||||||
|         compiling(compiling), |         compiling(compiling), | ||||||
|         relocate(relocate) {} |         relocate(relocate) {} | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue