method returns, except when compiling words with the non-optimizing
compiler at the beginning of bootstrap */
this->code->uninitialized_blocks.insert(std::make_pair(compiled,literals.value()));
- this->code->all_blocks.insert(compiled);
+ this->code->all_blocks.insert((cell)compiled);
/* next time we do a minor GC, we have to trace this code block, since
the fields of the code_block struct might point into nursery or aging */
FACTOR_ASSERT(!uninitialized_p(compiled));
points_to_nursery.erase(compiled);
points_to_aging.erase(compiled);
- all_blocks.erase(compiled);
+ all_blocks.erase((cell)compiled);
allocator->free(compiled);
}
}
struct all_blocks_set_verifier {
- std::set<code_block*> *all_blocks;
+ std::set<cell> *all_blocks;
- all_blocks_set_verifier(std::set<code_block*> *all_blocks) : all_blocks(all_blocks) {}
+ all_blocks_set_verifier(std::set<cell> *all_blocks) : all_blocks(all_blocks) {}
void operator()(code_block *block, cell size)
{
- FACTOR_ASSERT(all_blocks->find(block) != all_blocks->end());
- all_blocks->erase(block);
+ FACTOR_ASSERT(all_blocks->find((cell)block) != all_blocks->end());
}
};
code_block *code_heap::code_block_for_address(cell address)
{
- std::set<code_block*>::const_iterator blocki =
+ std::set<cell>::const_iterator blocki =
all_blocks.upper_bound((code_block*)address);
FACTOR_ASSERT(blocki != all_blocks.begin());
--blocki;
- code_block* found_block = *blocki;
+ code_block* found_block = (code_block*)*blocki;
#ifdef FACTOR_DEBUG
if (!((cell)found_block->entry_point() <= address
&& address - (cell)found_block->entry_point() < found_block->size()))
void operator()(code_block *block, cell size)
{
- code->all_blocks.insert(block);
+ code->all_blocks.insert((cell)block);
}
};
/* Memory allocator */
free_list_allocator<code_block> *allocator;
- std::set<code_block *> all_blocks;
+ std::set<cell> all_blocks;
/* Keys are blocks which need to be initialized by initialize_code_block().
Values are literal tables. Literal table arrays are GC roots until the