summaryrefslogtreecommitdiff
path: root/libguile/memoize.h
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2010-02-19 22:44:24 +0100
committerAndy Wingo <wingo@pobox.com>2010-02-19 22:44:24 +0100
commit747022e4cb5faef6e0a2c73f046bacd93bb99ab8 (patch)
treeb37adc0822d4dafd24f6d8ee4ce1ac340ac56d45 /libguile/memoize.h
parent0bc8874c0461d532ca0251cf20af9bc5193b3cfa (diff)
downloadguile-747022e4cb5faef6e0a2c73f046bacd93bb99ab8.tar.gz
prompt as part of guile's primitive language
* libguile/control.h: * libguile/control.c: Remove scm_atcontrol and scm_atprompt. (scm_c_make_prompt): Remove handler arg, as the handler is inline. (scm_abort): New primitive, exported to Scheme as `abort'. The compiler will also recognize calls to `abort', but this is the base case. (scm_init_control): Remove scm_register_control, just have this function, which adds `abort' to the `(guile)' module. * libguile/eval.c (eval): Add SCM_M_PROMPT case. * libguile/init.c (scm_i_init_guile): Change scm_register_control call into a nice orderly scm_init_control call. * libguile/memoize.h: (scm_sym_at_prompt, SCM_M_PROMPT): * libguile/memoize.c (MAKMEMO_PROMPT, scm_m_at_prompt, unmemoize): Add prompt support to the memoizer. * libguile/vm-i-system.c (prompt): Fix to not expect a handler on the stack. * module/ice-9/boot-9.scm (prompt): Add definition in terms of @prompt. * module/ice-9/control.scm: Simplify, and don't play with the compiler here, now that prompt and abort are primitive. * module/ice-9/eval.scm (primitive-eval): Add a prompt case. * module/language/tree-il/primitives.scm (*interesting-primitive-names*): Add @prompt and prompt.
Diffstat (limited to 'libguile/memoize.h')
-rw-r--r--libguile/memoize.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/libguile/memoize.h b/libguile/memoize.h
index 818cdbd83..26bd5b1c1 100644
--- a/libguile/memoize.h
+++ b/libguile/memoize.h
@@ -51,6 +51,7 @@ SCM_API SCM scm_sym_atat;
SCM_API SCM scm_sym_atapply;
SCM_API SCM scm_sym_atcall_cc;
SCM_API SCM scm_sym_at_call_with_values;
+SCM_API SCM scm_sym_at_prompt;
SCM_API SCM scm_sym_delay;
SCM_API SCM scm_sym_at_dynamic_wind;
SCM_API SCM scm_sym_eval_when;
@@ -88,7 +89,8 @@ enum
SCM_M_TOPLEVEL_REF,
SCM_M_TOPLEVEL_SET,
SCM_M_MODULE_REF,
- SCM_M_MODULE_SET
+ SCM_M_MODULE_SET,
+ SCM_M_PROMPT
};