summaryrefslogtreecommitdiff
path: root/libguile/eval.h
diff options
context:
space:
mode:
authorMikael Djurfeldt <djurfeldt@nada.kth.se>2002-12-01 13:09:26 +0000
committerMikael Djurfeldt <djurfeldt@nada.kth.se>2002-12-01 13:09:26 +0000
commit504d99c5f8e72c5640810eac181755a331a53c15 (patch)
treee422c776a60707bec56f4e4e691264d2edd6ff9e /libguile/eval.h
parent0359fc922c62c4ee45b504a970e2763c2b180a4c (diff)
downloadguile-504d99c5f8e72c5640810eac181755a331a53c15.tar.gz
* eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types.
* eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions. * eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions; (map, for-each): Handle also application on two args as a special case; Use trampolines. * sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o; (subr2oless): Removed. (scm_restricted_vector_sort_x): Use scm_return_first to keep the vector GC protected. * eval.c (check_map_args): Use scm_out_of_range_pos instead of scm_out_of_range.
Diffstat (limited to 'libguile/eval.h')
-rw-r--r--libguile/eval.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/libguile/eval.h b/libguile/eval.h
index 43d967ab3..ec4dc476f 100644
--- a/libguile/eval.h
+++ b/libguile/eval.h
@@ -3,7 +3,7 @@
#ifndef SCM_EVAL_H
#define SCM_EVAL_H
-/* Copyright (C) 1995,1996,1998,1999,2000,2001 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1998,1999,2000,2001,2002 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -130,6 +130,9 @@ SCM_API SCM scm_eval_options_interface (SCM setting);
#define SCM_XEVALCAR(x, env) EVALCAR (x, env)
#endif /* DEBUG_EXTENSIONS */
+typedef SCM (*scm_t_trampoline_1) (SCM proc, SCM arg1);
+typedef SCM (*scm_t_trampoline_2) (SCM proc, SCM arg1, SCM arg2);
+
#define SCM_EXTEND_ENV scm_acons
@@ -224,6 +227,8 @@ SCM_API SCM scm_apply_0 (SCM proc, SCM args);
SCM_API SCM scm_apply_1 (SCM proc, SCM arg1, SCM args);
SCM_API SCM scm_apply_2 (SCM proc, SCM arg1, SCM arg2, SCM args);
SCM_API SCM scm_apply_3 (SCM proc, SCM arg1, SCM arg2, SCM arg3, SCM args);
+SCM_API scm_t_trampoline_1 scm_trampoline_1 (SCM proc);
+SCM_API scm_t_trampoline_2 scm_trampoline_2 (SCM proc);
SCM_API SCM scm_nconc2last (SCM lst);
SCM_API SCM scm_apply (SCM proc, SCM arg1, SCM args);
SCM_API SCM scm_dapply (SCM proc, SCM arg1, SCM args);