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

2833 commits

Author SHA1 Message Date
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
Dirk Herrmann
85db4a2c8e * Initialize symbols using SCM_(GLOBAL_)?SYMBOL instead of scm_sysintern...
* Use scm_str2symbol instead of scm_sysintern0.
* Garbage collection initialization code now within gc.c only.
2000-12-11 14:48:23 +00:00
Mikael Djurfeldt
24737ba02a *** empty log message *** 2000-12-10 20:34:12 +00:00
Mikael Djurfeldt
e325b23886 * threads.h (SCM_MUTEXP): Typo: removed extra parenthesis. 2000-12-10 20:34:01 +00:00
Keisuke Nishida
e841c3e0c0 Smob-related creanup. 2000-12-08 17:32:56 +00:00
Dirk Herrmann
38ae064c6e * Use scm_mem2symbol or scm_str2symbol to create symbol objects. 2000-12-08 17:08:34 +00:00
Dirk Herrmann
23ade5e759 * New functions: scm_str2symbol, scm_mem2symbol 2000-12-08 16:32:36 +00:00
Dirk Herrmann
93d40df216 * Guile does not assume a hash table size of scm_symhash_dim any more. 2000-12-08 13:41:56 +00:00
Dirk Herrmann
23670993da * Undid my last patch and added a comment why it was unnecessary. 2000-12-07 13:46:33 +00:00
Keisuke Nishida
7c58e21b08 Deprecated scm_make_smob_type_mfpe and scm_set_smob_mfpe.
Some optimization on applicable smobs.  (Thanks to Dirk Herrmann)
2000-12-07 12:04:48 +00:00
Keisuke Nishida
68b069240f Some cleanup on smob calls. 2000-12-07 07:10:26 +00:00
Keisuke Nishida
cb1c46c57e Improved smob calls. 2000-12-07 00:55:12 +00:00
Dirk Herrmann
73369d6744 * Fixed: gc_async must be protected from gc. 2000-12-06 17:11:46 +00:00
Dirk Herrmann
78573619d0 * No binding is created for %gc-thunk any more. 2000-12-06 16:42:16 +00:00
Dirk Herrmann
a4bb4e6d09 * Various minor cleanups. 2000-12-06 16:24:00 +00:00
Dirk Herrmann
fd3363659b * eval.c: remove commented code, remove #ifdef CCLO conditionals
* remove uses of older GC marking and cell accessing macros
2000-12-06 15:16:59 +00:00
Dirk Herrmann
e34f941a3a * Use scm_tc3_* codes instead of hardcoded values. 2000-12-05 14:07:03 +00:00
Dirk Herrmann
01449aa511 * Changed guardian representation to applicable smob.
* Improved error reporting for dynamic loading.
2000-12-05 03:04:20 +00:00
Dirk Herrmann
362306b956 * Minor cleanup/optimization for char=?.
* Cleanup CCLO handling.
2000-12-04 17:19:35 +00:00
Dirk Herrmann
8c921d5c8d * Eliminate hard-coded value of scm_tc7_smob. 2000-12-04 16:31:03 +00:00
Dirk Herrmann
79a3dafe67 * Added scm_c_memq as a fast C level alternative for scm_memq. 2000-12-01 17:57:42 +00:00
Dirk Herrmann
23437298cc * Started goops cleanup. 2000-12-01 16:05:33 +00:00
Dirk Herrmann
21e8f468cf * coop-threads.c: Don't join finished threads. Thanks to Julian Satchell.
* coop.c: Removed old non-working code.
2000-11-30 10:26:44 +00:00
Dirk Herrmann
2b7b76d505 * Removed outdated comment. 2000-11-28 18:22:23 +00:00
Dirk Herrmann
e51fe79c72 * Removed SCM_SYMBOL_UCHARS. 2000-11-28 16:37:40 +00:00
Gary Houston
ce21243418 * reimplementation of values, call-with-values as primitives:
* values.c, values.h: new files.  use a struct to contain multiple
	values, similar to the previous Scheme-level implementation.
	* Makefile.am: add values.c, values.h, values.x.
	* continuations.c (continuation_apply): support R5RS multiple value
	continuations.
	* init.c: call scm_init_values.
	* struct.h: define SCM_SET_STRUCT_PRINTER.
2000-11-26 18:27:49 +00:00
Gary Houston
5f144b105d * use an applicable SMOB to represent continuations, instead of a
custom tc7 type.  This will make it easier to support R5RS
	multiple value continuations, without the use of a Scheme-level
	wrapper.

	* continuations.c (scm_tc16_continuation, continuation_mark,
	continuation_free, continuation_print, continuation_apply):
	new SMOB support.
	(scm_make_continuation): new procedure, replaces scm_make_cont
	with a different interface.
	(copy_stack_and_call, scm_dynthrow, scm_init_continuations): rewritten.
	(CHEAP_CONTINUATIONS): removed non-working code completely.
	(scm_call_continuation): removed.
	* continuations.h (struct scm_contregs): add num_stack_items and
	stack fields.  previously stack was stored following this struct:
	use a tail array instead.
	(SCM_CONTINUATIONP): new macro.
	(SCM_CONTINUATION_LENGTH, SCM_SET_CONTINUATION_LENGTH):
	rewritten.
	(SCM_SET_CONTREGS): removed.
	* tags.h: removed scm_tc7_contin (was tag 61).
	* debug.c, gc.c, hash.c, print.c, procprop.c, procs.c:
	removed scm_tc7_contin support.
	* eval.c: use scm_make_continuation instead of scm_make_cont.
	don't set jump buffers here.  remove scm_tc7_contin support.
	* init.c, root.c: create SMOB continuation for rootcont instead
	of scm_tc7_contin.  call scm_init_continuations before
	scm_init_root.
	* root.c: remove support for static jmpbuf.  It's not used by
	default and I broke it.  create SMOB continuation for rootcont.
	* stacks.c: use SCM_CONTINUATIONP.
2000-11-25 16:58:25 +00:00