summaryrefslogtreecommitdiff
path: root/libguile/hash.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2009-12-04 16:39:34 +0100
committerAndy Wingo <wingo@pobox.com>2009-12-04 16:39:34 +0100
commitf36878ba2d04427e76b85a9e91fce71f56ba7c7f (patch)
tree85419d043601b4ab673269a208b840aa216f5ae0 /libguile/hash.c
parent8a1f4f98e121c4ba90eb992203713cf493d45c71 (diff)
downloadguile-f36878ba2d04427e76b85a9e91fce71f56ba7c7f.tar.gz
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.
Diffstat (limited to 'libguile/hash.c')
-rw-r--r--libguile/hash.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libguile/hash.c b/libguile/hash.c
index e6e38ba50..e352b1c25 100644
--- a/libguile/hash.c
+++ b/libguile/hash.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995,1996,1997, 2000, 2001, 2003, 2004, 2006, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1997, 2000, 2001, 2003, 2004, 2006, 2008, 2009 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -170,7 +170,7 @@ scm_hasher(SCM obj, unsigned long n, size_t d)
case scm_tc7_port:
return ((SCM_RDNG & SCM_CELL_WORD_0 (obj)) ? 260 : 261) % n;
case scm_tcs_closures:
- case scm_tcs_subrs:
+ case scm_tc7_gsubr:
return 262 % n;
}
}