* It is up to the caller to fill in the object's fields in a meaningful
* fashion!
*/
+/* Allocates memory */
inline object *factor_vm::allot_object(cell type, cell size)
{
#ifdef FACTOR_DEBUG
}
/* can allocate if not in nursery or size is larger */
+/* Allocates memory conditionally */
#define BIGNUM_REDUCE_LENGTH(source, length) \
source = reallot_array(source,length + 1)
}
/* Might GC */
+/* Allocates memory */
code_block *factor_vm::allot_code_block(cell size, code_block_type type)
{
code_block *block = code->allocator->allot(size + sizeof(code_block));
}
/* Might GC */
+/* Allocates memory */
code_block *factor_vm::add_code_block(code_block_type type, cell code_, cell labels_,
cell owner_, cell relocation_, cell parameters_, cell literals_,
cell frame_size_untagged)
code->uninitialized_blocks.clear();
}
+/* Allocates memory */
void factor_vm::primitive_modify_code_heap()
{
bool reset_inline_caches = to_boolean(ctx->pop());
}
};
+/* Allocates memory */
cell factor_vm::code_blocks()
{
code_block_accumulator accum;
return std_vector_to_array(accum.objects);
}
+/* Allocates memory */
void factor_vm::primitive_code_blocks()
{
ctx->push(code_blocks());
return room;
}
+/* Allocates memory */
void factor_vm::primitive_data_room()
{
data_heap_room room = data_room();
memset(&dispatch_stats,0,sizeof(dispatch_statistics));
}
+/* Allocates memory */
void factor_vm::primitive_dispatch_stats()
{
ctx->push(tag<byte_array>(byte_array_from_value(&dispatch_stats)));
gc_events = new std::vector<gc_event>();
}
+/* Allocates memory */
void factor_vm::primitive_disable_gc_events()
{
if(gc_events)
object *allot_object(cell type, cell size);
object *allot_large_object(cell type, cell size);
+ /* Allocates memory */
template<typename Type> Type *allot(cell size)
{
return (Type *)allot_object(Type::type_number,size);