diff options
author | Andy Wingo <wingo@pobox.com> | 2010-02-02 22:59:55 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2010-02-08 12:38:18 +0100 |
commit | adaf86ec49959f6df55947cf69ac98d6bf1074f7 (patch) | |
tree | 18de5748a636632c57d9c9cb434e9855d165b9d5 /libguile/vm-i-system.c | |
parent | 69f90b0b051e77257a753f1ee7ae6a18a1147c78 (diff) | |
download | guile-adaf86ec49959f6df55947cf69ac98d6bf1074f7.tar.gz |
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.
Diffstat (limited to 'libguile/vm-i-system.c')
-rw-r--r-- | libguile/vm-i-system.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libguile/vm-i-system.c b/libguile/vm-i-system.c index 0d54fa51a..04fee4e35 100644 --- a/libguile/vm-i-system.c +++ b/libguile/vm-i-system.c @@ -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 |