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

9141 commits

Author SHA1 Message Date
Mikael Djurfeldt
de1bc44946 The following change to init.c is only enabled if Guile was
configured with --enable-guile-debug.

* init.c (scm_i_getenv_int): New function.
(scm_boot_guile_1): Use the environment variables
GUILE_INIT_HEAP_SIZE, GUILE_INIT_HEAP_SIZE2 to select heap size if
they exist.  (This may be replaced by a Scheme level mechanism in
the future.)
2000-03-14 22:15:12 +00:00
Mikael Djurfeldt
2b260c0f2e *** empty log message *** 2000-03-14 18:03:27 +00:00
Mikael Djurfeldt
3d8d1283c6 *** empty log message *** 2000-03-14 17:24:57 +00:00
Mikael Djurfeldt
e869585c10 * objprop.c (s_scm_set_object_property_x): Use scm_assq instead of
scm_assoc.  (Thanks to Dirk Herrmann.)
2000-03-14 17:24:48 +00:00
Mikael Djurfeldt
b0e37c83f0 *** empty log message *** 2000-03-14 16:41:17 +00:00
Mikael Djurfeldt
43a912cfa6 * eval.c, lang.c, lang.h (scm_lisp_nil, scm_lisp_t): Renamed from
scm_nil, scm_t.  (Thanks to Dirk Herrmann.)
2000-03-14 16:41:03 +00:00
Mikael Djurfeldt
5ebf0091ec *** empty log message *** 2000-03-14 15:12:23 +00:00
Mikael Djurfeldt
069fe4257c * init.c (scm_boot_guile_1): Use same initial segment size for
1-word and 2-word segments.  Having the smaller size causes Guile
to GC too often.  Obviously something needs to be done to allow
for a smaller 2-word segment without this to happen.  (The amount
of heap for each type should be automatically adapted to the
application somehow.)
2000-03-14 15:12:12 +00:00
Mikael Djurfeldt
b20108743b *** empty log message *** 2000-03-14 12:36:05 +00:00
Mikael Djurfeldt
cf2c741398 *** empty log message *** 2000-03-14 09:03:56 +00:00
Mikael Djurfeldt
1201a982fa * pairs.h (SCM_NEWCELL, SCM_NEWCELL2): Use new style freelists. 2000-03-14 09:03:32 +00:00
Mikael Djurfeldt
5322a65563 * init.c (scm_boot_guile_1): Make 2-word segment 8K (512 cells). 2000-03-14 09:03:20 +00:00
Mikael Djurfeldt
bb6df2eec3 * gc.h (scm_freelist_t): New type. 2000-03-14 09:03:08 +00:00
Mikael Djurfeldt
945fec6004 * gc.c (SCM_INIT_HEAP_SIZE): Changed from 32768 --> 40000 so that
all of Guile basics fits into one segment and there suitable room
for work.
(SCM_EXPHEAP): Now takes an argument.  Grow by a factor of 1.5
instead of 2.
(scm_freelist, scm_freelist2): Now of type scm_freelist_t.
Freelists now contains information about object span, cells
collected and amount of cells in heap segments belonging to the
list.
(scm_heap_size, scm_gc_cells_collected): Removed.
2000-03-14 09:02:51 +00:00
Mikael Djurfeldt
31ed4cff09 *** empty log message *** 2000-03-14 07:06:21 +00:00
Mikael Djurfeldt
16d35552c4 *** empty log message *** 2000-03-14 06:43:57 +00:00
Mikael Djurfeldt
950cc72b8f * __scm.h eq.c, eval.c, gc.c, hc.h, gh_data, hash.c, numbers.c,
numbers.h, objects.c, ramap.c, random.c, unif.c, unif.h: Extensive
rewrite of handling of real and complex numbers.
(SCM_FLOATS, SCM_SINGLES): These #ifdef conditionals have been
removed along with the support for floats.  (Float vectors are
still supported.)
2000-03-14 06:43:03 +00:00
Mikael Djurfeldt
bc86da5de2 * __scm.h eq.c, eval.c, gc.c, hc.h, gh_data, hash.c, numbers.c,
numbers.h, objects.c, ramap.c, random.c, unif.c, unif.h: Extensive
rewrite of handling of real and complex numbers.
(SCM_FLOATS, SCM_SINGLES): These #ifdef conditionals have been
removed along with the support for floats.  (Float vectors are
still supported.)

* unif.c (scm_makflo): Removed.
2000-03-14 06:42:56 +00:00
Mikael Djurfeldt
1b88bf8a84 * tags.h (scm_tcs_bignums): Removed.
(scm_tc16_bigpos, scm_tc16_bigneg): Replaced by scm_tc16_big.
Use SCM_BIGSIGN(x) to test for sign!
(scm_tc16_big): The new bignum type.
(SCM_REAL_PART, SCM_IMAG_PART): Removed.
2000-03-14 06:42:48 +00:00
Mikael Djurfeldt
87621a14e0 * smob.h (SCM_SMOB_PREDICATE): New macro.
(SCM_NEWSMOB2, SCM_RETURN_NEWSMOB2, SCM_NEWSMOB3,
SCM_RETURN_NEWSMOB3): New macros.
2000-03-14 06:42:40 +00:00
Mikael Djurfeldt
e1f8eb2bdd * procs.c, procs.h: changed the procedure-with-setter representation
to double cell.
2000-03-14 06:41:56 +00:00
Mikael Djurfeldt
742dd4b21b * pairs.h (SCM_NEWCELL2): double-cell variants of SCM_NEWCELL.
(SCM_CELL_WORD, SCM_CELL_WORDLOC, SCM_SET_CELL_WORD): primitive
multi-cell access macros (used by the ones below).
(SCM_CELL_WORD[0-3], SCM_SET_CELL_WORD[0-3]): multi-cell access
macros.
2000-03-14 06:41:42 +00:00
Mikael Djurfeldt
88eb68523a * __scm.h eq.c, eval.c, gc.c, hc.h, gh_data, hash.c, numbers.c,
numbers.h, objects.c, ramap.c, random.c, unif.c, unif.h: Extensive
rewrite of handling of real and complex numbers.
(SCM_FLOATS, SCM_SINGLES): These #ifdef conditionals have been
removed along with the support for floats.  (Float vectors are
still supported.)

* numbers.h (SCM_BIGSIGN): Sign moved to bit 16.
(scm_makdbl): Deprecated.
(SCM_NEWREAL, SCM_NEWCOMPLEX): New macros.
(SCM_SINGP): Deprecated.
(SCM_FLO): Removed.
(SCM_INEXP, SCM_CPLXP): Deprecated.
(SCM_INEXACTP, SCM_COMPLEXP): New macros.
(SCM_COMPLEX_REAL, SCM_COMPLEX_IMAG): Renamed from
SCM_REAL, SCM_IMAG (and now only valid for complex numbers).
(SCM_REAL, SCM_IMAG): New, *deprecated*, selectors which work both
for doubles and complex numbers.
(SCM_REAL_VALUE): New selector for doubles.
(scm_double_t, scm_complex_t): New types.
(scm_dbl): Removed.

* numbers.h (struct scm_dbl): changed to represent a double cell,
with the number in the second half.
(struct scm_cplx): new, represents a complex number as a triple
cell.
2000-03-14 06:41:25 +00:00
Mikael Djurfeldt
f3ae5d6080 * __scm.h eq.c, eval.c, gc.c, hc.h, gh_data, hash.c, numbers.c,
numbers.h, objects.c, ramap.c, random.c, unif.c, unif.h: Extensive
rewrite of handling of real and complex numbers.
(SCM_FLOATS, SCM_SINGLES): These #ifdef conditionals have been
removed along with the support for floats.  (Float vectors are
still supported.)

* numbers.c (scm_floprint, scm_floequal): Removed.
(scm_print_real, scm_print_complex, scm_real_equalp,
scm_complex_equalp): New functions.

* numbers.c (scm_makdbl): no malloc'ing needed, so the
{DEFER,ALLOW}_INTS thing removed.
2000-03-14 06:41:12 +00:00
Mikael Djurfeldt
acb0a19c65 * __scm.h eq.c, eval.c, gc.c, hc.h, gh_data, hash.c, numbers.c,
numbers.h, objects.c, ramap.c, random.c, unif.c, unif.h: Extensive
rewrite of handling of real and complex numbers.
(SCM_FLOATS, SCM_SINGLES): These #ifdef conditionals have been
removed along with the support for floats.  (Float vectors are
still supported.)

* gc.c (scm_freelist2): multi-cell freelists.
(inner_map_free_list): map_free_list, parameterized on ncells.
"nn cells in segment mm" was misleading for ncells > 1; changed to
"objects".  still print cells too, though.
(scm_map_free_list): rewritten using inner_map_free_list.
(scm_check_freelist): get freelist as parameter, since now we have
more than one.
(scm_debug_newcell2): multi-cell variants of
scm_debug_newcell.
(scm_gc_for_newcell): take ncells and freelist pointer as
parameters.
(scm_gc_mark): add case for tc7_pws (procedures with setters are
now double cells).
(scm_gc_sweep): don't free the float data, since it's not malloced
anymore.
(init_heap_seg): didn't understand what n_new_objects stood for,
so changed to n_new_cells.
(make_initial_segment): new function, makes an initial segment
according to given ncells.
(scm_init_storage): call make_initial_segment, for ncells={1,2,3}.
2000-03-14 06:40:09 +00:00
Mikael Djurfeldt
bd47429edb * dynwind.c: changed the wind-guards representation to double
cell.
2000-03-14 06:39:44 +00:00
Mikael Djurfeldt
7cf1a27e9c * dynl.c: made dynamic_obj representation a double cell. 2000-03-14 06:39:37 +00:00
Mikael Djurfeldt
273b7b9490 * async.c, async.h: made async representation a double cell. 2000-03-14 06:39:28 +00:00
Mikael Djurfeldt
f862488f8a * Makefile.am (libguile_la_LDFLAGS): Bumped library version
number.
2000-03-14 06:37:16 +00:00
Gary Houston
b70ecbd05c *** empty log message *** 2000-03-13 22:22:02 +00:00
Gary Houston
70df8af662 * ports.c (flush_void_port): renamed to flush_port_default.
(end_input_void_port): renamed to end_input_default.

	* init.c (scm_standard_stream_to_port): create a void port instead
	of opening /dev/null if the standard file descriptors are bad.
	advantages: no portability problems, doesn't waste a file descriptor,
	simplifies the code (thanks to Marius for the idea).

	* vports.c (s_scm_make_soft_port): call scm_port_non_buffer.

	* void ports: make reading from a void port give EOF instead of
	segv:
	* ports.c (s_scm_sys_make_void_port): modified docstring.
	(fill_input_void_port): new proc.
	(scm_init_ports): set up fill_input_void_port.
	* ports.c (scm_port_non_buffer): new proc.
	(scm_void_port): call scm_port_non_buffer.

	* fports.c (scm_setvbuf): docstring: remove the fcntl documentation
	which was incorrectly appended.
2000-03-13 22:21:21 +00:00
Mikael Djurfeldt
26fba92291 *** empty log message *** 2000-03-13 12:07:47 +00:00
Mikael Djurfeldt
fdc7ea2deb *** empty log message *** 2000-03-13 11:10:28 +00:00
Mikael Djurfeldt
a1bfef7f94 * guile-doc-snarf.in: Don't use absolute path for `sed'. (Note
that we can't use autoconf for this.  Autoconf itself relies on
the existence of `sed' somewhere on your path.  (Thanks to Dirk
Herrman.)
2000-03-13 11:04:41 +00:00
Mikael Djurfeldt
b44a555abf *** empty log message *** 2000-03-13 10:47:45 +00:00
Mikael Djurfeldt
bde6987150 * Makefile.am (libguile_la_SOURCES): Moved iselect.c here from
EXTRA_libguile_la_SOURCES.
2000-03-13 10:47:36 +00:00
Mikael Djurfeldt
87b21c0955 * iselect.h: Always declare scm_internal_select. 2000-03-13 10:47:24 +00:00
Mikael Djurfeldt
1cbf4dea5b * iselect.c (scm_internal_select): Added SCM_ASYNC_TICK at the
end.  Also let scm_internal_select be a real function also when
not using threads.
2000-03-13 10:47:14 +00:00
Mikael Djurfeldt
68933ba3a4 *** empty log message *** 2000-03-13 10:14:32 +00:00
Mikael Djurfeldt
cd91156565 * __scm.h (SCM_TICK): Oops! Forgot to put SCM_ASYNC_TICK here... 2000-03-13 10:14:24 +00:00
Mikael Djurfeldt
c7f6ea118f *** empty log message *** 2000-03-13 10:02:20 +00:00
Mikael Djurfeldt
f7acb3985e * __scm.h (SCM_ALLOW_INTS, SCM_REALLOW_INTS): Removed call to
SCM_ASYNC_TICK.  (This is a preparation for POSIX threads support,
and kind of an experiment: Will this cause problems?)
2000-03-13 10:02:12 +00:00
Greg J. Badros
62dbc24451 *** empty log message *** 2000-03-12 21:33:01 +00:00
Greg J. Badros
2baca9748b * Makefile.am: Added *.doc to DISTCLEANFILES. 2000-03-12 21:26:42 +00:00
Gary Houston
4f2f645d2e *** empty log message *** 2000-03-12 19:59:13 +00:00
Gary Houston
19b27fa236 * fports.c (scm_fdes_to_port): call fcntl F_GETFL to test that
the fdes is valid before doing anything else.  check that
	the file descriptor supports the modes required.
	(scm_fport_buffer_add): don't throw an error if fstat doesn't
	work: just use the default buffer size.

	* throw.c: change an outdated comment about scm_internal_catch
	BODY: it doesn't take a jumpbuf arg.

	* init.c (scm_standard_stream_to_port): install a handler in case
	scm_fdes_to_port throws an error.  don't check here whether the
	file descriptor is valid, since scm_fdes_to_port will do that.
	set the revealed count depending on whether the port got the
	standard file descriptor.
	(stream_body_data): new type.
	(stream_body, stream_handler): new procs.
2000-03-12 19:58:56 +00:00
Mikael Djurfeldt
f12677062e *** empty log message *** 2000-03-12 18:30:33 +00:00
Mikael Djurfeldt
67673f7594 *** empty log message *** 2000-03-12 17:52:45 +00:00
Mikael Djurfeldt
4d45e7b69a * stacks.c, stacks.h, struct.c, tags.h, unif.c (scm_bits_t):
Renamed from SCMWORD.
2000-03-12 17:52:18 +00:00
Mikael Djurfeldt
0bc908e7c4 * arbiters.c (SCM_ARB_LOCKED): Use SCM_CARBITS. 2000-03-12 17:51:49 +00:00