VM: moving initialize_code_blocks() into primitive_modify_code_heap()
parent
f8b94c2679
commit
764a604467
|
@ -120,16 +120,6 @@ void factor_vm::update_code_heap_words(bool reset_inline_caches) {
|
||||||
each_code_block(word_updater);
|
each_code_block(word_updater);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fix up new words only.
|
|
||||||
// Fast path for compilation units that only define new words.
|
|
||||||
void factor_vm::initialize_code_blocks() {
|
|
||||||
|
|
||||||
FACTOR_FOR_EACH(code->uninitialized_blocks) {
|
|
||||||
initialize_code_block(iter->first, iter->second);
|
|
||||||
}
|
|
||||||
code->uninitialized_blocks.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Allocates memory
|
// Allocates memory
|
||||||
void factor_vm::primitive_modify_code_heap() {
|
void factor_vm::primitive_modify_code_heap() {
|
||||||
bool reset_inline_caches = to_boolean(ctx->pop());
|
bool reset_inline_caches = to_boolean(ctx->pop());
|
||||||
|
@ -174,8 +164,14 @@ void factor_vm::primitive_modify_code_heap() {
|
||||||
|
|
||||||
if (update_existing_words)
|
if (update_existing_words)
|
||||||
update_code_heap_words(reset_inline_caches);
|
update_code_heap_words(reset_inline_caches);
|
||||||
else
|
else {
|
||||||
initialize_code_blocks();
|
// Fast path for compilation units that only define new words.
|
||||||
|
FACTOR_FOR_EACH(code->uninitialized_blocks) {
|
||||||
|
initialize_code_block(iter->first, iter->second);
|
||||||
|
}
|
||||||
|
code->uninitialized_blocks.clear();
|
||||||
|
}
|
||||||
|
FACTOR_ASSERT(code->uninitialized_blocks.size() == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Allocates memory
|
// Allocates memory
|
||||||
|
|
|
@ -575,7 +575,6 @@ struct factor_vm {
|
||||||
}
|
}
|
||||||
|
|
||||||
void update_code_heap_words(bool reset_inline_caches);
|
void update_code_heap_words(bool reset_inline_caches);
|
||||||
void initialize_code_blocks();
|
|
||||||
void primitive_modify_code_heap();
|
void primitive_modify_code_heap();
|
||||||
void primitive_code_room();
|
void primitive_code_room();
|
||||||
void primitive_strip_stack_traces();
|
void primitive_strip_stack_traces();
|
||||||
|
|
Loading…
Reference in New Issue