diff options
-rw-r--r-- | libguile/continuations.c | 10 | ||||
-rw-r--r-- | libguile/continuations.h | 8 | ||||
-rw-r--r-- | libguile/vm-engine.c | 4 | ||||
-rw-r--r-- | libguile/vm.c | 6 |
4 files changed, 14 insertions, 14 deletions
diff --git a/libguile/continuations.c b/libguile/continuations.c index ff118df24..1d677610b 100644 --- a/libguile/continuations.c +++ b/libguile/continuations.c @@ -116,7 +116,7 @@ continuation_print (SCM obj, SCM port, scm_print_state *state SCM_UNUSED) placed on the VM stack). */ #define FUNC_NAME "scm_i_make_continuation" SCM -scm_i_make_continuation (int *first, SCM vm, SCM vm_cont) +scm_i_make_continuation (int *first, struct scm_vm *vp, SCM vm_cont) { scm_i_thread *thread = SCM_I_CURRENT_THREAD; SCM cont; @@ -137,7 +137,7 @@ scm_i_make_continuation (int *first, SCM vm, SCM vm_cont) #endif continuation->offset = continuation->stack - src; memcpy (continuation->stack, src, sizeof (SCM_STACKITEM) * stack_size); - continuation->vm = vm; + continuation->vp = vp; continuation->vm_cont = vm_cont; SCM_NEWSMOB (cont, tc16_continuation, continuation); @@ -186,10 +186,10 @@ scm_i_continuation_to_frame (SCM continuation) return SCM_BOOL_F; } -SCM -scm_i_contregs_vm (SCM contregs) +struct scm_vm * +scm_i_contregs_vp (SCM contregs) { - return SCM_CONTREGS (contregs)->vm; + return SCM_CONTREGS (contregs)->vp; } SCM diff --git a/libguile/continuations.h b/libguile/continuations.h index 868a2560b..7d5e0dbc5 100644 --- a/libguile/continuations.h +++ b/libguile/continuations.h @@ -51,7 +51,7 @@ typedef struct #endif /* __ia64__ */ size_t num_stack_items; /* size of the saved stack. */ SCM root; /* continuation root identifier. */ - SCM vm; /* vm */ + struct scm_vm *vp; /* vm */ SCM vm_cont; /* vm's stack and regs */ /* The offset from the live stack location to this copy. This is @@ -70,12 +70,14 @@ typedef struct -SCM_INTERNAL SCM scm_i_make_continuation (int *first, SCM vm, SCM vm_cont); +SCM_INTERNAL SCM scm_i_make_continuation (int *first, + struct scm_vm *vp, + SCM vm_cont); SCM_INTERNAL void scm_i_check_continuation (SCM cont); SCM_INTERNAL void scm_i_reinstate_continuation (SCM cont); SCM_INTERNAL SCM scm_i_continuation_to_frame (SCM cont); -SCM_INTERNAL SCM scm_i_contregs_vm (SCM contregs); +SCM_INTERNAL struct scm_vm* scm_i_contregs_vp (SCM contregs); SCM_INTERNAL SCM scm_i_contregs_vm_cont (SCM contregs); SCM_API void *scm_c_with_continuation_barrier (void *(*func)(void*), void *); diff --git a/libguile/vm-engine.c b/libguile/vm-engine.c index 113669fe5..2461b1469 100644 --- a/libguile/vm-engine.c +++ b/libguile/vm-engine.c @@ -894,7 +894,7 @@ VM_NAME (SCM vm, SCM program, SCM *argv, size_t nargs_) SYNC_IP (); scm_i_check_continuation (contregs); - vm_return_to_continuation (scm_i_contregs_vm (contregs), + vm_return_to_continuation (scm_i_contregs_vp (contregs), scm_i_contregs_vm_cont (contregs), FRAME_LOCALS_COUNT_FROM (1), LOCAL_ADDRESS (1)); @@ -1003,7 +1003,7 @@ VM_NAME (SCM vm, SCM program, SCM *argv, size_t nargs_) copying out to the heap; and likewise, the setjmp(®isters) code already has the non-local return handler. But oh well! */ - cont = scm_i_make_continuation (&first, vm, vm_cont); + cont = scm_i_make_continuation (&first, vp, vm_cont); if (first) { diff --git a/libguile/vm.c b/libguile/vm.c index fe0a64dda..27990f934 100644 --- a/libguile/vm.c +++ b/libguile/vm.c @@ -112,21 +112,19 @@ scm_i_vm_capture_stack (SCM *stack_base, SCM *fp, SCM *sp, scm_t_uint32 *ra, } static void -vm_return_to_continuation (SCM vm, SCM cont, size_t n, SCM *argv) +vm_return_to_continuation (struct scm_vm *vp, SCM cont, size_t n, SCM *argv) { - struct scm_vm *vp; struct scm_vm_cont *cp; SCM *argv_copy; argv_copy = alloca (n * sizeof(SCM)); memcpy (argv_copy, argv, n * sizeof(SCM)); - vp = SCM_VM_DATA (vm); cp = SCM_VM_CONT_DATA (cont); if (vp->stack_size < cp->stack_size + n + 3) scm_misc_error ("vm-engine", "not enough space to reinstate continuation", - scm_list_2 (vm, cont)); + scm_list_1 (cont)); vp->sp = cp->sp; vp->fp = cp->fp; |