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

2859 commits

Author SHA1 Message Date
Dirk Herrmann
0419a52877 * Fix handling of (set-source-property! <obj> 'copy <datum>). 2001-01-25 11:09:21 +00:00
Gary Houston
fd937ecb02 *** empty log message *** 2001-01-24 21:47:23 +00:00
Gary Houston
6d36532c1c * boot-9.scm: don't import (ice-9 rdelim) here. it's done
in C for now.
	* rdelim.scm: export the C primitives too.
	* documentation.scm: use (ice-9 rdelim).

	* filesys.c (scm_link): docstring fix.
	* fports.h (scm_setfileno): obsolete declaration removed.
	* posix.c: bogus popen declaration removed.

	* rdelim.c: new file, split from ioext.c with new proc
	scm_init_rdelim.
	* rdelim.h: new file.
	* Makefile.am: add rdelim.c and related files.
	* init.c: call scm_init_rdelim.  include rdelim.h.
2001-01-24 21:45:09 +00:00
Dirk Herrmann
3ba5a6c2f2 * Make sure that parameter errors are reported correctly.
Thanks to Martin Grabmueller for sending this patch.
2001-01-24 18:07:29 +00:00
Dirk Herrmann
ed6a2db9d7 * Ooops: Forgot to credit Neil for the bug report. 2001-01-24 16:06:20 +00:00
Dirk Herrmann
e40a4095d6 * Make sure that scm_display_error validates its port argument. 2001-01-24 15:58:46 +00:00
Mikael Djurfeldt
f1e06a96a2 * eval.c (SCM_APPLY): Added # args check for application of
procedures with arity 3.  (Thanks to Anders Holst.)
2001-01-24 01:26:44 +00:00
Dirk Herrmann
30ea841d0c * Separate the handling of OPEN flags between ports and directories. 2001-01-24 00:02:43 +00:00
Dirk Herrmann
312ae976ad * Move all real functionality from scm_eval into inner_eval.
* Avoid to copy the evaluated expression twice.
2001-01-22 13:32:08 +00:00
Dirk Herrmann
4567ed787c * Applied Martin Grabmueller's fix of case's handling of 'else. 2001-01-19 17:16:52 +00:00
Gary Houston
10288a0948 * ioext.c: further simplify scm_read_string_x_partial by defining
a macro	SCM_EBLOCK.
2001-01-18 22:54:54 +00:00
Dirk Herrmann
8f379a8f61 * Simplified gh_ints2scm by using SCM_FIXABLE. 2001-01-18 15:12:51 +00:00
Dirk Herrmann
5c75b29f1d * Cleaned up some limits-definitions. 2001-01-18 13:35:45 +00:00
Dirk Herrmann
ac0c002c62 * Fixed a couple of bugs with quotient, remainder, bit-extract and logand. 2001-01-17 18:15:30 +00:00
Dirk Herrmann
debe0dc24f * Comment fixed. 2001-01-16 11:19:36 +00:00
Dirk Herrmann
8a39e3fc79 * Return type of scm_make_smob_type is scm_bits_t now. 2001-01-15 17:15:13 +00:00
Michael Livshin
322ec19d3c * objects.h (SCM_SET_ENTITY_SETTER): new macro. SCM_ENTITY_SETTER
casts its result, so doesn't yield an lvalue per ANSI C.

* goops.c (s_scm_sys_set_object_setter_x): use
SCM_SET_ENTITY_SETTER.
(clear_method_cache): use SCM_SET_ENTITY_PROCEDURE.

* gc.h (SCM_GC_SET_CARD_BVEC): new macro.  SCM_GC_CARD_BVEC casts
its result, so doesn't yield an lvalue per ANSI C.
(SCM_GC_SET_CARD_FLAGS): ditto for SCM_GC_GET_CARD_FLAGS.
(SCM_GC_CLR_CARD_FLAGS): redefined in terms of
SCM_GC_SET_CARD_FLAGS.
(SCM_GC_SET_CARD_FLAG, SCM_GC_CLR_CARD_FLAGS): ditto.

* gc.c (INIT_CARD): use the explicit setter macro to set the bvec.
2001-01-11 21:03:18 +00:00
Gary Houston
60d02d0914 * validate.h (SCM_VALIDATE_SUBSTRING_SPEC_COPY): new macro.
* ioext.c (scm_read_string_x_partial, scm_read_delimited_x),
	socket.c (scm_recvfrom): use the new macro, plus minor docstring
	changes.
	* ioext.c (scm_read_string_x_partial): don't crash if -1 is supplied
	for fdes.  if current input port is used, check that it's a file
	port.
2001-01-08 23:10:06 +00:00
Gary Houston
c2da26487a * ioext.c (scm_read_string_x_partial): new procedure, implements
read-string!/partial.
	* ports.c (scm_take_from_input_buffers): new procedure used by
	scm_read_string_x_partial.
	(scm_drain_input): use scm_take_from_input_buffers.
2001-01-06 22:03:07 +00:00
Marius Vollmer
4651d663fa *** empty log message *** 2001-01-06 18:47:12 +00:00
Marius Vollmer
e8a46ba8c3 * validate.h (SCM_VALIDATE_NUMBER): New. 2001-01-06 18:46:48 +00:00
Michael Livshin
c0a5d88835 * guardians.c (F_GREEDY, F_LISTED, F_DESTROYED, GREEDY_P,
SET_GREEDY, LISTED_P, SET_LISTED, CLR_LISTED, DESTROYED_P,
 	SET_DESTROYED): new defines/macros.
	(GUARDIAN_LIVE, GUARDIAN_ZOMBIES, GUARDIAN_NEXT): deleted.
	(add_to_live_list): takes a `guardian_t *' now, not SCM.
	(guardian_print): print more info.
	(guardian_apply): check if the guardian is destroyed, and throw an
 	error if so.  take one more optional argument `throw_p'.
	(scm_guard): depending on the value of `throw_p', return a boolean
 	result.
	(scm_get_one_zombie): remove redundant property test.
	(guardian_t): represent the various (currently 3, I hope nothing
 	more gets added) boolean fields as bit flags.
	(scm_guardian_destroyed_p, scm_guardian_greedy_p): new predicates.
	(scm_destroy_guardian_x): new procedure.

	* guardians.h: added prototypes for `scm_guardian_greedy_p' and
	`scm_guardian_destroyed_p'.  changed prototype for `scm_guard'.
2001-01-04 13:00:31 +00:00
Gary Houston
0c6d2191ef * fports.c (fport_write): bugfix: handle short writes for
unbuffered ports too.  optimize the buffered case by minimizing
	the number of write/flush calls.
	(write_all): new helper procedure.
2001-01-02 00:38:41 +00:00
Michael Livshin
75bc0690c8 * guardians.c (guardian_print): for sharing guardians, print that
they are sharing.
(scm_guard, scm_get_one_zombie): place the critical section
barriers more correctly.
2000-12-30 19:26:37 +00:00
Michael Livshin
d9dcd93362 * weaks.c (scm_scan_weak_vectors): move the calculation of the
`weak_keys' and `weak_values' flags out of the inner loop.

	* guardians.c: (greedily_guarded_prop): deleted.
	(greedily_guarded_whash): new variable.  a doubly-weak hash table
	used to keep the "greedily hashed" object property.  the previous
	implementation (via primitive object properties) was incorrect due
	to its only-the-key-is-weak semantics.
	(scm_guard, get_one_zombie, scm_init_guardians): use/init
	`greedily_guarded_whash'.
2000-12-29 22:18:06 +00:00
Dirk Herrmann
5d2b97cd07 * Fixed the changelog entry regarding re-introduction of struct member
properties (I continuously talked of member 'documentation' instead)
* Replace calls to scm_remember with calls to scm_remember_upto_here_1.
2000-12-28 16:49:09 +00:00
Dirk Herrmann
fcba9b58c6 * Get rid of the annoying variable-gets-clobbered-by-longjmp warning. 2000-12-28 16:06:56 +00:00
Dirk Herrmann
23a62df4fe * Re-introduces the unused member "documentation" of struct scm_subr_entry. 2000-12-28 15:09:56 +00:00
Michael Livshin
c275ccf59e * guardians.c (mark_dependencies_in_tconc): new function.
(mark_dependencies): bug fix.  mark the dependencies of the known
zombies, too.  duh.
2000-12-28 14:26:12 +00:00
Michael Livshin
0209177b77 * gc.c: (scm_gc_mark_dependencies): use SCM_EQ_P for SCMs, not
'=='.  also, return after calling `scm_gc_mark'.
2000-12-24 09:54:24 +00:00
Michael Livshin
3405cffa63 *** empty log message *** 2000-12-24 00:41:14 +00:00
Michael Livshin
56495472c2 * gc.c: (scm_gc_mark_dependencies): new function. like
`scm_gc_mark', but doesn't mark the argument itself.  defined
using an arrangement similar to that in eval.c: `scm_gc_mark' and
`scm_gc_mark_dependencies' are derived from the same "template"
by ugly preprocessor magic.

* gc.h: added prototype for `scm_gc_mark_dependencies'.

* init.c (scm_init_guile_1): call the renamed
`scm_init_guardians'.

* guardians.h: changed prototypes for `scm_make_guardian' and
`scm_init_guardians'.

* guardians.c (guardian_t): added new fields `greedy_p' and
`listed_p'.
(GUARDIAN_P): predicate that says whether its argument is a
guardian.
(GUARDIAN_GREEDY_P, GUARDIAN_LISTED_P): new predicates.
(greedy_guardians, sharing_guardians): new variables.  hold the
greedy and sharing live guardian lists, respectively.
(first_live_guardian, current_link_field): removed.
(greedily_guarded_prop): new variable.  holds the "is greedily
guarded" object property.
(self_centered_zombies): new variable.  stores guarded objects
that are parts of cycles.
(add_to_live_list): new function, introduced to decouple marking a
guardian and adding it to the live list.
(guardian_mark): call `add_to_live_list'.
(guardian_print): print whether the guardian is greedy or not.
also change "live" and "zombie" to "reachable" and "unreachable"
respectively, to be less confusing.
(scm_guard): if the guardian is greedy, test whether the object is
already greedily marked.  throw an error if so.
(scm_get_one_zombie): if the guardian is greedy, remove the
"greedily guarded" property from the object.
(scm_make_guardian): add a new optional boolean argument which
says whether the guardian is greedy or sharing.
(guardian_gc_init): init the new live lists.
(mark_dependencies): new function.
(mark_and_zombify): new function.
(guardian_zombify): reworked to support the new guardian
semantics.  move some logic to `mark_dependencies' and
`mark_and_zombify'.
(whine_about_self_centered_zombies): new function.  installed in
the `after-gc-hook' to complain about guarded objects which are
parts of cycles.
(scm_init_guardians): init the new stuff.  renamed from
`scm_init_guardian'.
2000-12-23 23:00:23 +00:00
Dirk Herrmann
54a33a61d9 * Removed unused member "properties" from struct scm_subr_entry. 2000-12-23 11:38:06 +00:00
Dirk Herrmann
c9c01b1125 * Removed unused member "documentation" from struct scm_subr_entry.
* Eliminate use of scm_intern0/scm_sysintern0 in procs.c.
2000-12-22 16:46:17 +00:00
Dirk Herrmann
2e9c835db9 * Make sure, re-entering the dynamic scope of an eval statement will
restore the latest selected module.
2000-12-21 17:51:55 +00:00
Dirk Herrmann
25ba37dffa * Simplify the use of SCM_PUREGENERICP. 2000-12-21 17:07:38 +00:00
Gary Houston
5bd44fc9ce * continuations.c (continuation_apply): subtract the length of
continuation->dynenv, not the dynenv itself.  I broke it last
	time I changed this file.  thanks to Bernard Urban.
2000-12-20 22:27:09 +00:00
Dirk Herrmann
c312aca735 * Remove some redundant SCM_N?IMP tests. 2000-12-18 17:36:44 +00:00
Keisuke Nishida
398d8ee17e Some GOOPS cleanup. 2000-12-16 20:25:08 +00:00
Keisuke Nishida
b8d3f9a8ee Ignore guile.texi. 2000-12-16 19:58:28 +00:00
Keisuke Nishida
0c8549d8d8 Added prototype. 2000-12-16 18:27:40 +00:00
Dirk Herrmann
de42a0ee0f * New environment variable scm_system_environment to replace scm_symhash. 2000-12-15 23:21:06 +00:00
Dirk Herrmann
09074dbf9c * Fix a bug in scm_eval. 2000-12-15 14:00:18 +00:00
Dirk Herrmann
a261c0e933 * Re-introduced most-positive-fixnum and most-negative-fixnum. 2000-12-14 00:08:56 +00:00
Dirk Herrmann
0f979f3fb6 * Renamed scm_symbols to symbols and made it static in symbols.c. 2000-12-13 11:38:30 +00:00
Dirk Herrmann
b52e071bc5 * The creation of symbols and bindings are two separate issues now. 2000-12-12 18:36:35 +00:00
Dirk Herrmann
a3fc3be99d * Make the creation of bindings more straightforward. 2000-12-12 14:07:06 +00:00
Dirk Herrmann
ba3932579c * Moved function scm_string_hash to hash.c. 2000-12-12 13:57:26 +00:00
Marius Vollmer
30eaf3ccd8 *** empty log message *** 2000-12-11 18:09:35 +00:00
Marius Vollmer
70f9533342 * gc_os_dep.c (scm_get_stack_base) [MSWIN32]: Added detection of
page size on the w32 architecture.  Updated from Boehms gc5.2.
Thanks to Lars J. Aas!
2000-12-11 18:09:07 +00:00