mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-24 20:30:28 +02:00
Refactor continuation capture in VM
* libguile/continuations.h: * libguile/continuations.c (scm_i_make_continuation): Refactor to expect registers to already be captured. * libguile/scm.h (scm_i_thread): Add forward decl. * libguile/threads.h (struct scm_i_thread): Just fill in the struct type. * libguile/vm-engine.c (call/cc); Use the registers already captured before entering the VM.
This commit is contained in:
parent
185d19dfb1
commit
51e35158ba
5 changed files with 19 additions and 49 deletions
|
@ -48,7 +48,7 @@ SCM_API scm_t_bits scm_tc16_condvar;
|
|||
|
||||
struct scm_thread_wake_data;
|
||||
|
||||
typedef struct scm_i_thread {
|
||||
struct scm_i_thread {
|
||||
struct scm_i_thread *next_thread;
|
||||
|
||||
SCM handle;
|
||||
|
@ -105,7 +105,7 @@ typedef struct scm_i_thread {
|
|||
struct scm_vm vm;
|
||||
SCM_STACKITEM *base;
|
||||
jmp_buf regs;
|
||||
} scm_i_thread;
|
||||
};
|
||||
|
||||
#define SCM_I_IS_THREAD(x) SCM_SMOB_PREDICATE (scm_tc16_thread, x)
|
||||
#define SCM_I_THREAD_DATA(x) ((scm_i_thread *) SCM_SMOB_DATA (x))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue