removed some stub functions from contexts
parent
d093ff766f
commit
2e81b174a7
|
@ -11,21 +11,11 @@ void factorvm::reset_datastack()
|
|||
ds = ds_bot - sizeof(cell);
|
||||
}
|
||||
|
||||
void reset_datastack()
|
||||
{
|
||||
return vm->reset_datastack();
|
||||
}
|
||||
|
||||
void factorvm::reset_retainstack()
|
||||
{
|
||||
rs = rs_bot - sizeof(cell);
|
||||
}
|
||||
|
||||
void reset_retainstack()
|
||||
{
|
||||
return vm->reset_retainstack();
|
||||
}
|
||||
|
||||
static const cell stack_reserved = (64 * sizeof(cell));
|
||||
|
||||
void factorvm::fix_stacks()
|
||||
|
@ -34,11 +24,6 @@ void factorvm::fix_stacks()
|
|||
if(rs + sizeof(cell) < rs_bot || rs + stack_reserved >= rs_top) reset_retainstack();
|
||||
}
|
||||
|
||||
void fix_stacks()
|
||||
{
|
||||
return vm->fix_stacks();
|
||||
}
|
||||
|
||||
/* called before entry into foreign C code. Note that ds and rs might
|
||||
be stored in registers, so callbacks must save and restore the correct values */
|
||||
void factorvm::save_stacks()
|
||||
|
@ -74,22 +59,12 @@ context *factorvm::alloc_context()
|
|||
return new_context;
|
||||
}
|
||||
|
||||
context *alloc_context()
|
||||
{
|
||||
return vm->alloc_context();
|
||||
}
|
||||
|
||||
void factorvm::dealloc_context(context *old_context)
|
||||
{
|
||||
old_context->next = unused_contexts;
|
||||
unused_contexts = old_context;
|
||||
}
|
||||
|
||||
void dealloc_context(context *old_context)
|
||||
{
|
||||
return vm->dealloc_context(old_context);
|
||||
}
|
||||
|
||||
/* called on entry into a compiled callback */
|
||||
void factorvm::nest_stacks()
|
||||
{
|
||||
|
@ -156,11 +131,6 @@ void factorvm::init_stacks(cell ds_size_, cell rs_size_)
|
|||
unused_contexts = NULL;
|
||||
}
|
||||
|
||||
void init_stacks(cell ds_size_, cell rs_size_)
|
||||
{
|
||||
return vm->init_stacks(ds_size_,rs_size_);
|
||||
}
|
||||
|
||||
bool factorvm::stack_to_array(cell bottom, cell top)
|
||||
{
|
||||
fixnum depth = (fixnum)(top - bottom + sizeof(cell));
|
||||
|
@ -176,11 +146,6 @@ bool factorvm::stack_to_array(cell bottom, cell top)
|
|||
}
|
||||
}
|
||||
|
||||
bool stack_to_array(cell bottom, cell top)
|
||||
{
|
||||
return vm->stack_to_array(bottom,top);
|
||||
}
|
||||
|
||||
inline void factorvm::vmprim_datastack()
|
||||
{
|
||||
if(!stack_to_array(ds_bot,ds))
|
||||
|
@ -211,11 +176,6 @@ cell factorvm::array_to_stack(array *array, cell bottom)
|
|||
return bottom + depth - sizeof(cell);
|
||||
}
|
||||
|
||||
cell array_to_stack(array *array, cell bottom)
|
||||
{
|
||||
return vm->array_to_stack(array,bottom);
|
||||
}
|
||||
|
||||
inline void factorvm::vmprim_set_datastack()
|
||||
{
|
||||
ds = array_to_stack(untag_check<array>(dpop()),ds_bot);
|
||||
|
|
|
@ -44,11 +44,6 @@ struct context {
|
|||
DEFPUSHPOP(d,ds)
|
||||
DEFPUSHPOP(r,rs)
|
||||
|
||||
void reset_datastack();
|
||||
void reset_retainstack();
|
||||
void fix_stacks();
|
||||
void init_stacks(cell ds_size, cell rs_size);
|
||||
|
||||
PRIMITIVE(datastack);
|
||||
PRIMITIVE(retainstack);
|
||||
PRIMITIVE(set_datastack);
|
||||
|
|
Loading…
Reference in New Issue