VM: refactoring which removes two not useful short methods
parent
58e18ad668
commit
da4812ba21
|
@ -18,10 +18,6 @@ callback_heap::~callback_heap() {
|
|||
seg = NULL;
|
||||
}
|
||||
|
||||
void factor_vm::init_callbacks(cell size) {
|
||||
callbacks = new callback_heap(size, this);
|
||||
}
|
||||
|
||||
bool callback_heap::return_takes_param_p() {
|
||||
#if defined(FACTOR_X86) || defined(FACTOR_AMD64)
|
||||
return true;
|
||||
|
|
|
@ -2,11 +2,6 @@
|
|||
|
||||
namespace factor {
|
||||
|
||||
void factor_vm::init_card_decks() {
|
||||
cards_offset = (cell)data->cards - addr_to_card(data->start);
|
||||
decks_offset = (cell)data->decks - addr_to_deck(data->start);
|
||||
}
|
||||
|
||||
data_heap::data_heap(bump_allocator* vm_nursery,
|
||||
cell young_size_,
|
||||
cell aging_size_,
|
||||
|
@ -108,7 +103,8 @@ void data_heap::mark_all_cards() {
|
|||
|
||||
void factor_vm::set_data_heap(data_heap* data_) {
|
||||
data = data_;
|
||||
init_card_decks();
|
||||
cards_offset = (cell)data->cards - addr_to_card(data->start);
|
||||
decks_offset = (cell)data->decks - addr_to_deck(data->start);
|
||||
}
|
||||
|
||||
void factor_vm::init_data_heap(cell young_size, cell aging_size,
|
||||
|
|
|
@ -42,8 +42,8 @@ bool factor_vm::factor_arg(const vm_char* str, const vm_char* arg,
|
|||
if (SSCANF(str, arg, &val) > 0) {
|
||||
*value = val;
|
||||
return true;
|
||||
} else
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void factor_vm::init_parameters_from_args(vm_parameters* p, int argc,
|
||||
|
@ -158,7 +158,7 @@ void factor_vm::init_factor(vm_parameters* p) {
|
|||
srand((unsigned int)nano_count());
|
||||
init_ffi();
|
||||
init_contexts(p->datastack_size, p->retainstack_size, p->callstack_size);
|
||||
init_callbacks(p->callback_size);
|
||||
callbacks = new callback_heap(p->callback_size, this);
|
||||
load_image(p);
|
||||
init_c_io();
|
||||
init_inline_caching((int)p->max_pic_size);
|
||||
|
|
|
@ -288,14 +288,11 @@ struct factor_vm {
|
|||
bignum* bignum_gcd(bignum* a_, bignum* b_);
|
||||
|
||||
//data heap
|
||||
void init_card_decks();
|
||||
void set_data_heap(data_heap* data_);
|
||||
void init_data_heap(cell young_size, cell aging_size, cell tenured_size);
|
||||
void primitive_size();
|
||||
data_heap_room data_room();
|
||||
void primitive_data_room();
|
||||
void begin_scan();
|
||||
void end_scan();
|
||||
cell instances(cell type);
|
||||
void primitive_all_instances();
|
||||
|
||||
|
@ -599,7 +596,6 @@ struct factor_vm {
|
|||
void primitive_code_blocks();
|
||||
|
||||
// callbacks
|
||||
void init_callbacks(cell size);
|
||||
void primitive_free_callback();
|
||||
void primitive_callback();
|
||||
void primitive_callback_room();
|
||||
|
|
Loading…
Reference in New Issue