1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-19 11:10:25 +02:00
Commit graph

11212 commits

Author SHA1 Message Date
Dirk Herrmann
d339981a5a * test-suite/tests/sort.test: Added. Both tests in that file did
fail (one even with a segfault) with CVS guile before the recent
	changes to libguile/sort.c.

	* libguile/sort.c: Replaced hand-made trampline code by the new
	official mechanism from eval.c.  This fixes a segfault in the new
	test file test-suite/tests/sort.test.

	(quicksort, compare_function, scm_restricted_vector_sort_x,
	scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
	scm_merge_list_step, scm_sort_x, scm_sort, scm_merge_vector_x,
	scm_merge_vector_step, scm_stable_sort_x, scm_stable_sort,
	scm_sort_list_x, scm_sort_list): Use trampoline mechanism from
	eval.c.

	(subr2less, lsubrless, closureless, applyless, scm_cmp_function,
	cmp_fun_t): Removed.

	(compare_function): Added.

	* libguile/sort.c (quicksort, SWAP, stack_node): Replaced pointer
	arithmetics with index arithmetics.  Changed quicksort to work on
	an array of SCM values instead of an array of characters.  Avoid
	bytewise copying of SCM elements.  Avoid allocating memory on the
	stack with alloca.  Fixed some comments.
2003-04-22 23:32:40 +00:00
Marius Vollmer
2d2f76fc5f *** empty log message *** 2003-04-22 22:41:39 +00:00
Marius Vollmer
2a3264974b Removed stray "o" from exports list. 2003-04-22 22:41:19 +00:00
Dirk Herrmann
821f18a442 * eval.c (EXTEND_ENV): Eliminated.
(unmemocopy, SCM_CEVAL, SCM_APPLY): Use SCM_EXTEND_ENV instead of
	EXTEND_ENV.
2003-04-21 19:20:13 +00:00
Rob Browning
86d43b9bd2 *** empty log message *** 2003-04-21 18:47:40 +00:00
Rob Browning
9e31322c0c *** empty log message *** 2003-04-21 18:14:17 +00:00
Dirk Herrmann
94fb5a6e31 * __scm.h (SCM_DEBUG_DEBUGGER_SUPPORT): New compile-time option.
* gc.card.c (scm_gc_marked_p): Fixed compiler warning when
	compiling with SCM_DEBUG==1 by moving definition behind prototype.

	* gc.card.c (scm_dbg_t_list_cell, scm_dbg_t_double_cell,
	scm_dbg_gc_marked_p, scm_dbg_gc_get_card, scm_dbg_gc_get_bvec,
	scm_t_list_cell_struct, scm_t_list_cell, scm_t_double_cell,
	scm_gc_marked_p, scm_gc_get_card, scm_gc_get_bvec): Fixed
	functions such that they check if the object is a non-immediate.
	Further, renamed identifiers to use the scm_dbg_ prefix and made
	their inclusion into the lib dependent of the
	SCM_DEBUG_DEBUGGER_SUPPORT compile time option.
2003-04-21 14:39:37 +00:00
Dirk Herrmann
fce0b22d94 * __scm.h: Fixed comment about the SCM_DEBUG_TYPING_STRICTNESS
debug option.
2003-04-21 13:33:48 +00:00
Dirk Herrmann
1685446c0d * srfi/srfi-1.c (srfi1_ilength), libguile/list.c (scm_ilength,
scm_last_pair), libguile/unif.c (l2ra): Prefer !SCM_CONSP over
	SCM_NCONSP.

	* libguile/unif.c (l2ra): Eliminate redundant check.

	Now, guile itself does not include any calls to SCM_NCONSP any
	more.
2003-04-21 01:59:57 +00:00
Dirk Herrmann
9ff1720f85 * list.c (scm_cons_star), ramap.c (scm_ra_sum, scm_ra_product,
scm_array_map_x), unif.c (l2ra): Prefer !SCM_NULLP over
	SCM_NNULLP.  Now, guile itself does not include any calls to
	SCM_NNULLP any more.
2003-04-21 01:35:33 +00:00
Dirk Herrmann
05b1536228 * eval.c (unmemocopy, SCM_APPLY, scm_map, scm_for_each,
scm_copy_tree): Place assignment expressions which are part of
	other expressions into an expression of their own.
2003-04-21 01:07:09 +00:00
Dirk Herrmann
0c88d7dfae * goops.c (TEST_CHANGE_CLASS, scm_sys_initialize_object): Don't
compare SCM values with !=.
2003-04-20 23:38:18 +00:00
Dirk Herrmann
5cb22e9606 * eval.c, eval.h, evalext.c, evalext.h (scm_sym_setter,
scm_m_generalized_set_x, scm_init_evalext): Move the declaration
	and definition of the memoizer for the generalized set! macro from
	evalext.[ch] to eval.[ch].  Use the SCM_SYNTAX snarfer macro to
	define the macro object.

	* eval.c, eval.h (s_set_x, scm_s_set_x, scm_m_set_x,
	scm_m_generalized_set_x): Since now scm_s_set_x is only used in
	eval.c, it is made static and renamed to s_set_x.

	* evalext.c (scm_defined_p, scm_m_undefine): Prefer !SCM_<foo>
	over SCM_N<foo>.
2003-04-20 19:18:43 +00:00
Dirk Herrmann
a44a9715eb * eval.c, root.h (scm_undefineds, SCM_NUM_PROTECTS, undefineds,
scm_init_eval): Made scm_undefineds static in eval.c, renamed it
	to undefineds and registered the object as a permanent object.

	* eval.c, eval.h (scm_f_apply, scm_init_eval): Made scm_f_apply
	static in eval.c, renamed it to f_apply and registered the object
	as a permanent object.
2003-04-20 18:08:07 +00:00
Mikael Djurfeldt
05a6b2d3cc * goops.scm (compute-getters-n-setters): Allow for primitive
procedure thunks.  (Thanks to Neil W. Van Dyke.)
2003-04-20 17:35:41 +00:00
Mikael Djurfeldt
3bf465263c * goops.scm (compute-getters-n-setters): Allow for primitive
procedure thunks.  (Thanks to Neil W. Van Dyke.)
2003-04-20 17:33:08 +00:00
Mikael Djurfeldt
624b0da1ca *** empty log message *** 2003-04-20 11:44:12 +00:00
Dirk Herrmann
1b43d24c36 * eval.c (SCM_BIT8, SCM_BIT8, unmemocopy, SCM_CEVAL): Renamed
file-local macro SCM_BIT8 to SCM_BIT7, which is more appropriate.
2003-04-20 11:01:33 +00:00
Dirk Herrmann
aec16f9972 * numbers.c (scm_logtest): Fixed argument bug in the call to
mpz_and, which showed up when compiling with SCM_DEBUG defined.
2003-04-20 08:55:50 +00:00
Dirk Herrmann
f96460ce84 * gc-card.c (scm_i_sweep_card, scm_i_init_card_freelist): Fixed
type errors that showed up when compiling with SCM_DEBUG defined.
2003-04-20 08:39:38 +00:00
Dirk Herrmann
d0f6ceb84f * Removed uses of DEBUG_EXTENSIONS and DYNAMIC_LINKING to
fix compile errors with --disable-deprecated.
2003-04-20 07:19:38 +00:00
Mikael Djurfeldt
1ac61c2b50 * goops/dispatch.scm (cache-hashval): Corrected termination
condition for hashval computation.  (Previously, it made erroneous
assumptions about the representation of environments; Thanks to
Andreas Rottmann.)
2003-04-19 17:26:05 +00:00
Mikael Djurfeldt
a980f465e9 *** empty log message *** 2003-04-19 17:23:50 +00:00
Mikael Djurfeldt
3d167db8a9 * goops/dispatch.scm (cache-hashval): Corrected termination
condition for hashval computation.  (Previously, it made erroneous
assumptions about the representation of environments; Thanks to
Andreas Rottmann.)
2003-04-19 17:15:38 +00:00
Marius Vollmer
842d510f73 *** empty log message *** 2003-04-19 11:18:10 +00:00
Marius Vollmer
dea8a73c42 (SCM_MTRIGGER_HYSTERESIS): Removed.
(scm_i_minyield_malloc, check_mtrigger): New.
(scm_must_malloc, scm_must_realloc, scm_done_malloc): Use it
instead of explicit code.  Thanks to Han-Wen Nienhuys!
2003-04-19 11:17:23 +00:00
Mikael Djurfeldt
0fd7dcd398 goops.c (TEST_CHANGE_CLASS): Update variable class after class change. 2003-04-18 08:19:03 +00:00
Marius Vollmer
eff2965e58 *** empty log message *** 2003-04-17 22:47:53 +00:00
Rob Browning
19a7a0897b *** empty log message *** 2003-04-17 22:15:46 +00:00
Rob Browning
1c35cb199f * numbers.c (scm_integer_expt): fix case where we were declaring
vars in the middle of a statement block.  Thanks to Thamer
Al-Harbash.
2003-04-17 22:15:37 +00:00
Mikael Djurfeldt
f721dc1de1 * goops.c (TEST_CHANGE_CLASS): Update variable class after class
change.
2003-04-17 20:45:00 +00:00
Mikael Djurfeldt
89aab6f1ac *** empty log message *** 2003-04-17 19:51:04 +00:00
Mikael Djurfeldt
b3a9e3d58f *** empty log message *** 2003-04-17 19:40:49 +00:00
Mikael Djurfeldt
a75d54876c *** empty log message *** 2003-04-17 19:33:00 +00:00
Mikael Djurfeldt
47cd67db2f * tests/goops.test: Added tests for correctness of class
precedence list in all basic classes and tests for eqv? and
equal?.

* goops.scm (compute-getters-n-setters): Check for bad init-thunk.
(eqv?): Added default method.
(equal?): New default method which uses eqv?.

* eq.c (scm_eqv_p): Turned into a primitive generic.
2003-04-17 19:23:52 +00:00
Mikael Djurfeldt
3ad4ed2c8b Updated tests 2003-04-17 19:16:27 +00:00
Mikael Djurfeldt
95f2bb326c * goops.scm (eqv?, equal?): Provide default methods for `eqv?' and
`equal?'.
(compute-getters-n-setters): Check for bad init-thunks.
(update-direct-method!): Use eq? instead of eqv?.
2003-04-17 18:52:21 +00:00
Mikael Djurfeldt
61951a9a9a *** empty log message *** 2003-04-17 18:48:27 +00:00
Mikael Djurfeldt
e672dd0208 * goops.scm (equal?): Provide default method for `equal?'.
(compute-getters-n-setters): Check for bad init-thunks.

* eq.c (scm_eqv_p, scm_equal_p): Turned into a primitive generics.

* goops.texi (Object Comparisons): Removed object-eqv? and
object-equal? and added eqv?, equal? and =.
2003-04-17 18:47:18 +00:00
Mikael Djurfeldt
071d6b0ecc * tests/goops.test: New tests.
* goops.scm (equal?): Provide default method for `equal?'.
(compute-getters-n-setters): Check for bad init-thunks.

* eq.c (scm_equal_p): Turned into a primitive generic.

* snarf.h (SCM_PRIMITIVE_GENERIC, SCM_PRIMITIVE_GENERIC_1): New
macros.
2003-04-17 17:50:57 +00:00
Mikael Djurfeldt
266f3a23d7 * goops.scm (compute-getters-n-setters): Check for bad init-thunk. 2003-04-17 17:37:11 +00:00
Mikael Djurfeldt
57b1d51841 * tests/goops.test: Added tests for correctness of class
precedence list in all basic classes and tests for equal?.
2003-04-17 15:25:15 +00:00
Mikael Djurfeldt
466dd85969 Comment 2003-04-17 15:24:53 +00:00
Rob Browning
95a0ecc3c7 *** empty log message *** 2003-04-16 20:17:52 +00:00
Rob Browning
ff83b88d17 * gc_os_dep.c: Added patch for UnixWare and OpenUNIX support.
Thanks to Boyd Gerber.
Added check for __arm__ in addition to arm for LINUX and copied
__s390__ defines from upstream libgc. Thanks to James Treacy for
reporting the problems.
2003-04-16 20:17:44 +00:00
Rob Browning
312006bbb2 *** empty log message *** 2003-04-16 20:15:48 +00:00
Rob Browning
683a2f9a4c * gc_os_dep.c: Added patch for UnixWare and OpenUNIX support.
Thanks to Boyd Gerber.
Added check for __arm__ in addition to arm for LINUX and copied
__s390__ defines from upstream libgc. Thanks to James Treacy for
reporting the problems.
2003-04-16 20:15:37 +00:00
Rob Browning
ecc5974ba6 *** empty log message *** 2003-04-16 20:02:31 +00:00
Rob Browning
eb2f70b61d * gc_os_dep.c Added patch for UnixWare and OpenUNIX support.
Thanks to Boyd Gerber.
Added check for __arm__ in addition to arm for LINUX.  Thanks to
James Treacy for reporting the problem.
2003-04-16 20:02:22 +00:00
Rob Browning
c7ef2ea133 *** empty log message *** 2003-04-16 19:59:27 +00:00