mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 14:00:21 +02:00
Remove last use of SCM vm
* libguile/threads.h (scm_i_thread): Hold a struct scm_vm*, not a SCM vm. * libguile/threads.c (guilify_self_2): * libguile/vm.c (make_vm): Adapt.
This commit is contained in:
parent
e7f9ababe0
commit
3506b1521e
3 changed files with 8 additions and 7 deletions
|
@ -614,7 +614,7 @@ guilify_self_2 (SCM parent)
|
|||
|
||||
t->continuation_root = scm_cons (t->handle, SCM_EOL);
|
||||
t->continuation_base = t->base;
|
||||
t->vm = SCM_BOOL_F;
|
||||
t->vp = NULL;
|
||||
|
||||
if (scm_is_true (parent))
|
||||
t->dynamic_state = scm_make_dynamic_state (parent);
|
||||
|
|
|
@ -110,7 +110,7 @@ typedef struct scm_i_thread {
|
|||
SCM_STACKITEM *continuation_base;
|
||||
|
||||
/* For keeping track of the stack and registers. */
|
||||
SCM vm;
|
||||
struct scm_vm *vp;
|
||||
SCM_STACKITEM *base;
|
||||
scm_i_jmp_buf regs;
|
||||
#ifdef __ia64__
|
||||
|
|
|
@ -748,7 +748,7 @@ static int vm_stack_gc_kind;
|
|||
|
||||
#endif
|
||||
|
||||
static SCM
|
||||
static struct scm_vm *
|
||||
make_vm (void)
|
||||
#define FUNC_NAME "make_vm"
|
||||
{
|
||||
|
@ -781,7 +781,8 @@ make_vm (void)
|
|||
vp->trace_level = 0;
|
||||
for (i = 0; i < SCM_VM_NUM_HOOKS; i++)
|
||||
vp->hooks[i] = SCM_BOOL_F;
|
||||
return scm_cell (scm_tc7_vm, (scm_t_bits)vp);
|
||||
|
||||
return vp;
|
||||
}
|
||||
#undef FUNC_NAME
|
||||
|
||||
|
@ -829,10 +830,10 @@ scm_the_vm (void)
|
|||
{
|
||||
scm_i_thread *t = SCM_I_CURRENT_THREAD;
|
||||
|
||||
if (SCM_UNLIKELY (scm_is_false (t->vm)))
|
||||
t->vm = make_vm ();
|
||||
if (SCM_UNLIKELY (!t->vp))
|
||||
t->vp = make_vm ();
|
||||
|
||||
return SCM_VM_DATA (t->vm);
|
||||
return t->vp;
|
||||
}
|
||||
|
||||
/* Scheme interface */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue