mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-14 15:40:19 +02:00
connect a few more wires to promptenstein
* libguile/tags.h (scm_tc7_prompt): Allocate a tc7 for prompt objects. * libguile/control.h (SCM_F_PROMPT_INLINE, SCM_F_PROMPT_ESCAPE) (SCM_PROMPT_P, SCM_PROMPT_FLAGS, SCM_PROMPT_INLINE_P) (SCM_PROMPT_ESCAPE_P, SCM_PROMPT_TAG, SCM_PROMPT_REGISTERS) (SCM_PROMPT_DYNENV, SCM_PROMPT_HANDLER) (SCM_PROMPT_PRE_UNWIND_HANDLER, SCM_PROMPT_SETJMP) (struct scm_prompt_registers): * libguile/control.c (scm_c_make_prompt): Flesh out a simple prompts implementation. * libguile/vm-i-system.c (prompt): Wire up the implementation. * libguile/vm.c: Add a needed #include.
This commit is contained in:
parent
69f90b0b05
commit
adaf86ec49
5 changed files with 67 additions and 13 deletions
|
@ -1446,7 +1446,7 @@ VM_DEFINE_INSTRUCTION (83, prompt, "prompt", 5, 3, 0)
|
|||
{
|
||||
scm_t_int32 offset;
|
||||
scm_t_uint8 inline_handler_p, escape_only_p;
|
||||
SCM k, handler, pre_unwind, jmpbuf;
|
||||
SCM k, handler, pre_unwind, prompt;
|
||||
|
||||
inline_handler_p = FETCH ();
|
||||
escape_only_p = FETCH ();
|
||||
|
@ -1458,9 +1458,11 @@ VM_DEFINE_INSTRUCTION (83, prompt, "prompt", 5, 3, 0)
|
|||
SYNC_REGISTER ();
|
||||
/* Push the prompt onto the dynamic stack. The setjmp itself has to be local
|
||||
to this procedure. */
|
||||
jmpbuf = vm_prepare_prompt_jmpbuf (vm, k, handler, pre_unwind,
|
||||
inline_handler_p, escape_only_p);
|
||||
if (VM_SETJMP (jmpbuf))
|
||||
/* FIXME: do more error checking */
|
||||
prompt = scm_c_make_prompt (vm, k, handler, pre_unwind,
|
||||
inline_handler_p, escape_only_p);
|
||||
scm_i_set_dynwinds (scm_cons (prompt, scm_i_dynwinds ()));
|
||||
if (SCM_PROMPT_SETJMP (prompt))
|
||||
{
|
||||
/* The prompt exited nonlocally. Cache the regs back from the vp, and go
|
||||
to the handler or post-handler label. (The meaning of the label differs
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue