VM: code_block::optimized_p() method isn't needed

char-rename
Björn Lindqvist 2016-10-31 14:18:15 +01:00
parent b31c0b8857
commit ffab2bb7e0
3 changed files with 3 additions and 4 deletions

View File

@ -38,7 +38,7 @@ static cell compute_here_address(cell arg, cell offset, code_block* compiled) {
} }
cell code_block::owner_quot() const { cell code_block::owner_quot() const {
if (!optimized_p() && TAG(owner) == WORD_TYPE) if (type() != CODE_BLOCK_OPTIMIZED && TAG(owner) == WORD_TYPE)
return untag<word>(owner)->def; return untag<word>(owner)->def;
return owner; return owner;
} }

View File

@ -27,8 +27,6 @@ struct code_block {
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; }
cell size() const { cell size() const {
cell size; cell size;
if (free_p()) if (free_p())

View File

@ -67,7 +67,8 @@ void factor_vm::primitive_word_code() {
void factor_vm::primitive_word_optimized_p() { void factor_vm::primitive_word_optimized_p() {
word* w = untag_check<word>(ctx->peek()); word* w = untag_check<word>(ctx->peek());
ctx->replace(tag_boolean(w->code()->optimized_p())); cell t = w->code()->type();
ctx->replace(tag_boolean(t == CODE_BLOCK_OPTIMIZED));
} }
// Allocates memory // Allocates memory