diff options
author | Andy Wingo <wingo@pobox.com> | 2009-09-03 11:57:29 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2009-12-03 15:22:07 +0100 |
commit | df338a22646fa6a783d72d67f3e6c4d4aee65c72 (patch) | |
tree | df8dc86dade6e55d70d33fb8fdd624d4c5006d47 /libguile/vm.c | |
parent | df9ca8d8b2f48e7042298a9a788b749b46fc5efc (diff) | |
download | guile-df338a22646fa6a783d72d67f3e6c4d4aee65c72.tar.gz |
remove tc7_subr_* and tc7_lsubr_*
* libguile/tags.h: Remove tc7 #defines for subrs, replacing them with
placeholders. These were public, but hopfully unused. I don't see how
to usefully deprecate them.
* libguile/array-map.c (scm_array_map_x): Remove special cases for
certain subr types. This might make things slower for the moment,
otoh, native compilation should moot that question.
* libguile/eval.i.c:
* libguile/eval.c: Remove subr-handling cases. To regain this speed and
more won't have to wait for native compilation, though -- this change
smooths the way for subr dispatch in the VM.
* libguile/gsubr.c (scm_i_gsubr_apply): Fix a bug in which we didn't
detect too-many-arguments. This would only show up when using ceval,
as only ceval called this function.
* test-suite/tests/ramap.test ("array-map!"): Change the expected
exception if passed a procedure of the wrong arity. It now gives
wrong-num-args.
more won't have to wait for native compilation, though -- this change
smooths the way for subr dispatch in the VM.
* libguile/goops.c (scm_class_of): Remove subr cases. No speed
implication.
* libguile/objects.c (scm_valid_object_procedure_p): Remove this public
but undocumented, and useless, function. I do not think this will
affect anyone at all.
(scm_set_object_procedure_x): Replace a call to
scm_valid_object_procedure_p with scm_procedure_p, and actually wrap
with a scm_is_true.
* module/oop/goops.scm (initialize-object-procedure): Don't call
valid-object-procedure?.
Diffstat (limited to 'libguile/vm.c')
-rw-r--r-- | libguile/vm.c | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/libguile/vm.c b/libguile/vm.c index 51426a5a4..a05494f5b 100644 --- a/libguile/vm.c +++ b/libguile/vm.c @@ -296,21 +296,6 @@ apply_foreign (SCM proc, SCM *args, int nargs, int headroom) arglist = scm_cons (args[nargs], arglist); return scm_closure_apply (proc, arglist); } - case scm_tc7_subr_2o: - if (nargs > 2 || nargs < 1) scm_wrong_num_args (proc); - return SCM_SUBRF (proc) (arg1, arg2); - case scm_tc7_subr_2: - if (nargs != 2) scm_wrong_num_args (proc); - return SCM_SUBRF (proc) (arg1, arg2); - case scm_tc7_subr_0: - if (nargs != 0) scm_wrong_num_args (proc); - return SCM_SUBRF (proc) (); - case scm_tc7_subr_1: - if (nargs != 1) scm_wrong_num_args (proc); - return SCM_SUBRF (proc) (arg1); - case scm_tc7_subr_1o: - if (nargs > 1) scm_wrong_num_args (proc); - return SCM_SUBRF (proc) (arg1); case scm_tc7_dsubr: if (nargs != 1) scm_wrong_num_args (proc); if (SCM_I_INUMP (arg1)) @@ -326,24 +311,6 @@ apply_foreign (SCM proc, SCM *args, int nargs, int headroom) case scm_tc7_cxr: if (nargs != 1) scm_wrong_num_args (proc); return scm_i_chase_pairs (arg1, (scm_t_bits) SCM_SUBRF (proc)); - case scm_tc7_subr_3: - if (nargs != 3) scm_wrong_num_args (proc); - return SCM_SUBRF (proc) (arg1, arg2, arg3); - case scm_tc7_lsubr: - { - SCM arglist = SCM_EOL; - while (nargs--) - arglist = scm_cons (args[nargs], arglist); - return SCM_SUBRF (proc) (arglist); - } - case scm_tc7_lsubr_2: - if (nargs < 2) scm_wrong_num_args (proc); - { - SCM arglist = SCM_EOL; - while (nargs-- > 2) - arglist = scm_cons (args[nargs], arglist); - return SCM_SUBRF (proc) (arg1, arg2, arglist); - } case scm_tc7_asubr: if (nargs < 2) return SCM_SUBRF (proc) (arg1, SCM_UNDEFINED); |