mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-14 07:30:32 +02:00
remove cxrs
* libguile/pairs.h: * libguile/pairs.c: Previously scm_cdadr et al were implemented as #defines that called scm_i_chase_pairs, and the Scheme-exposed functions themselves were cxr subrs, which got special help in the interpreter. Since now the special help is unnecessary (because the compiler inlines and expands calls to car, cdadr, etc), the complexity is a loss. So just implement cdadr etc using normal functions. There's an advantage too, in that the compiler can unroll the cxring, reducing branches. * libguile/tags.h (scm_tc7_cxr): Remove this tag. (scm_tcs_subrs): Now there's only one kind of subr, yay! * libguile/debug.c (scm_procedure_name) * libguile/evalext.c (scm_self_evaluating_p) * libguile/gc.c (scm_i_tag_name) * libguile/goops.c (scm_class_of) * libguile/hash.c (scm_hasher) * libguile/print.c (iprin1) * libguile/procprop.c (scm_i_procedure_arity) * libguile/procs.c (scm_procedure_p, scm_subr_p) (scm_make_procedure_with_setter) * libguile/vm.c (apply_foreign): Remove cxr cases. Replace uses of scm_tcs_subrs with scm_tc7_gsubr.
This commit is contained in:
parent
8a1f4f98e1
commit
f36878ba2d
12 changed files with 171 additions and 155 deletions
|
@ -101,7 +101,7 @@ SCM_DEFINE (scm_procedure_p, "procedure?", 1, 0, 0,
|
|||
|| SCM_STRUCT_APPLICABLE_P (obj)))
|
||||
break;
|
||||
case scm_tcs_closures:
|
||||
case scm_tcs_subrs:
|
||||
case scm_tc7_gsubr:
|
||||
case scm_tc7_pws:
|
||||
case scm_tc7_program:
|
||||
return SCM_BOOL_T;
|
||||
|
@ -163,7 +163,7 @@ scm_subr_p (SCM obj)
|
|||
if (SCM_NIMP (obj))
|
||||
switch (SCM_TYP7 (obj))
|
||||
{
|
||||
case scm_tcs_subrs:
|
||||
case scm_tc7_gsubr:
|
||||
return 1;
|
||||
default:
|
||||
;
|
||||
|
@ -232,7 +232,7 @@ SCM_DEFINE (scm_make_procedure_with_setter, "make-procedure-with-setter", 2, 0,
|
|||
/* don't use procedure_name, because don't care enough to do a reverse
|
||||
lookup */
|
||||
switch (SCM_TYP7 (procedure)) {
|
||||
case scm_tcs_subrs:
|
||||
case scm_tc7_gsubr:
|
||||
name = SCM_SUBR_NAME (procedure);
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue