summaryrefslogtreecommitdiff
path: root/libguile/gsubr.h
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2009-12-01 21:59:42 +0100
committerAndy Wingo <wingo@pobox.com>2009-12-01 21:59:42 +0100
commit23f276dea70668b7291589de1c7d7ea7ebd9026f (patch)
tree9efe3687daed1e4d3d09d9c9b26c919dffc9890d /libguile/gsubr.h
parent5161a3c0d7ec59e32a637bd093644a1a5b7b8dcf (diff)
downloadguile-23f276dea70668b7291589de1c7d7ea7ebd9026f.tar.gz
first step to make the vm stop calling the interpreter
* libguile/eval.h: * libguile/eval.c (scm_closure_apply): New function, applies a closure. Won't be necessary in the future, but for now here it is, with internal linkage. * libguile/gsubr.h: * libguile/gsubr.c (scm_i_gsubr_apply_array): New function, applies a gsubr to an array of values, potentially extending that array for optional arguments and rest arguments and such. * libguile/vm.c (apply_foreign): New function, applies a foreign function to arguments on the stack, in place. * libguile/vm-i-system.c (call): Add a case for procedures-with-setters (will go away when they are applicable structs). Instead of calling the evaluator for foreign functions, call apply_foreign.
Diffstat (limited to 'libguile/gsubr.h')
-rw-r--r--libguile/gsubr.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libguile/gsubr.h b/libguile/gsubr.h
index 298181b15..e75658d1c 100644
--- a/libguile/gsubr.h
+++ b/libguile/gsubr.h
@@ -51,6 +51,8 @@ SCM_API SCM scm_c_define_gsubr_with_generic (const char *name,
SCM_INTERNAL SCM scm_i_gsubr_apply (SCM proc, SCM arg, ...);
SCM_INTERNAL SCM scm_i_gsubr_apply_list (SCM proc, SCM args);
+SCM_INTERNAL SCM scm_i_gsubr_apply_array (SCM proc, SCM *args, int nargs,
+ int headroom);
SCM_INTERNAL void scm_init_gsubr (void);
#endif /* SCM_GSUBR_H */