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/procs.h | |
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/procs.h')
-rw-r--r-- | libguile/procs.h | 34 |
1 files changed, 1 insertions, 33 deletions
diff --git a/libguile/procs.h b/libguile/procs.h index dc764edf8..e993c8f09 100644 --- a/libguile/procs.h +++ b/libguile/procs.h @@ -44,39 +44,7 @@ OPT optional arguments, and REST (0 or 1) arguments. This has to be in sync with `create_gsubr ()'. */ #define SCM_SUBR_ARITY_TO_TYPE(req, opt, rest) \ - ((rest) == 0 \ - ? ((opt) == 0 \ - ? ((req) == 0 \ - ? scm_tc7_subr_0 \ - : ((req) == 1 \ - ? scm_tc7_subr_1 \ - : ((req) == 2 \ - ? scm_tc7_subr_2 \ - : ((req) == 3 \ - ? scm_tc7_subr_3 \ - : scm_tc7_gsubr \ - | (SCM_GSUBR_MAKTYPE (req, opt, rest) << 8U))))) \ - : ((opt) == 1 \ - ? ((req) == 0 \ - ? scm_tc7_subr_1o \ - : ((req) == 1 \ - ? scm_tc7_subr_2o \ - : scm_tc7_gsubr | \ - (SCM_GSUBR_MAKTYPE (req, opt, rest) << 8U))) \ - : scm_tc7_gsubr | \ - (SCM_GSUBR_MAKTYPE (req, opt, rest) << 8U))) \ - : ((rest) == 1 \ - ? ((opt) == 0 \ - ? ((req) == 0 \ - ? scm_tc7_lsubr \ - : ((req) == 2 \ - ? scm_tc7_lsubr_2 \ - : scm_tc7_gsubr \ - | (SCM_GSUBR_MAKTYPE (req, opt, rest) << 8U))) \ - : scm_tc7_gsubr \ - | (SCM_GSUBR_MAKTYPE (req, opt, rest) << 8U)) \ - : scm_tc7_gsubr \ - | (SCM_GSUBR_MAKTYPE (req, opt, rest) << 8U))) + (scm_tc7_gsubr | (SCM_GSUBR_MAKTYPE (req, opt, rest) << 8U)) |