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

3521 commits

Author SHA1 Message Date
Dirk Herrmann
37c56aecf8 * debug.c (scm_make_iloc): Prefer !SCM_<foo> over SCM_N<foo>.
(scm_memcons, scm_mem_to_proc):  When building lists, prefer
scm_list_<n> over scm_cons[2]?.

(scm_mem_to_proc):  Prefer SCM_CONSP over SCM_NIMP.

(scm_procedure_name):  Use SCM_CADR instead of explicit form.

(debugobj_print):  Coerce scm_intprint arg 1 to long, not int.
Thanks to Rob Browning for the patch (see log entry 2001-09-21) -
for some reason his patch didn't make it into the cvs.
2001-10-11 22:26:25 +00:00
Dirk Herrmann
79d34f68e7 * numbers.c (mem2decimal_from_point): Cleaned up the parsing a
little bit - should even be somewhat more accurate now.
2001-10-09 20:56:36 +00:00
Rob Browning
d918965272 * gc.c: support ia64 register backing store.
(SCM_MARK_BACKING_STORE): new macro.
2001-10-09 03:33:16 +00:00
Rob Browning
766c5eaf49 * continuations.h: support ia64 register backing store.
(struct scm_t_contregs): add ia64 register backing store.
2001-10-09 03:33:06 +00:00
Rob Browning
193297d8b5 * continuations.c: support ia64 register backing store.
(continuation_mark): mark ia64 register backing store.
(continuation_free): free ia64 register backing store.
(scm_make_continuation): capture ia64 register backing store.
(copy_stack_and_call): copy ia64 register backing store.
2001-10-09 03:32:20 +00:00
Rob Browning
5e137c657b *** empty log message *** 2001-10-09 03:32:12 +00:00
Dirk Herrmann
ee083ac29f * hashtab.c (scm_hash_fn_create_handle_x): The result of assoc_fn
is known to be #f if no entry is found.  Thus, use !SCM_FALSEP
instead of SCM_NIMP to test for that case.

* strings.h (SCM_SET_STRING_LENGTH):  Cast the length to
scm_t_bits instead of long.
2001-10-08 21:23:00 +00:00
Marius Vollmer
ce191a26e6 Correct cut and paste error: use SCM_POSFIXABLE for unsigned types. 2001-10-06 20:49:10 +00:00
Marius Vollmer
c0060c9589 Corrected definition of SCM_MOST_POSITIVE_FIXNUM. Boy was I confused. 2001-10-06 20:48:27 +00:00
Marius Vollmer
71dcdbf9a0 *** empty log message *** 2001-10-06 20:01:36 +00:00
Marius Vollmer
801ba33101 (INTEGRAL2NUM): Let the preprocessor test
whether the integral type fits in a fixnum, not the compiler.
This removes a spurious compiler warning.  Also, honor the
NO_PREPRO_MAGIC flag to suppress any preprocessor tests.  This is
needed for `long long's.
2001-10-06 20:00:43 +00:00
Marius Vollmer
dcb6a296dc Define NO_PREPRO_MAGOC when including
num2integral.c.i for `long long' and `signed long long'.
2001-10-06 19:58:24 +00:00
Marius Vollmer
004c0902ff * tags.h (SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
SCM_T_SIGNED_BITS_MIN): New.
* numbers.h (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM):
Use them to make these macros computable by the preprocessor.
2001-10-06 19:58:02 +00:00
Mikael Djurfeldt
152812c057 * coop.c (mother_awake_p): New variable.
(coop_create): Set mother_awake_p before creating or signalling
mother; wait until mother is going to sleep before returning.
(mother): Reset mother_awake_p before going to sleep.
2001-10-06 16:30:20 +00:00
Dirk Herrmann
11d49f5489 * options.c (protected_objects, scm_init_options): The content of
protected_objects is now protected from garbage collection using
scm_gc_register_root instead of scm_permanent_object.

(get_option_setting):  New static function that	computes an option
setting as it was formerly done in the function scm_options.

(get_documented_option_setting):  New static function that
returns option documentation as it was formerly done in the
function scm_options.  Note that documentation C strings are no
longer precomputed into SCM objects.  Instead, they are converted
into SCM strings every time get_documented_option_setting is
called.

(change_option_setting):  New static functions that modifies the
option setting as it was formerly done in the function
scm_options.  The function is now exception safe, i. e. won't
cause a memory leak when interrupted.  Further, only non-immediate
option values are added to the protection list.

(scm_options):  This function now has only the purpose to dispatch
to to get_option_setting, get_documented_option_setting or
change_option_setting, depending on the arguments given to
scm_options.

(scm_init_opts):  Don't convert documentation C strings into SCM
strings.  Further, don't protect any object values:  They _must_
be immediate values, otherwise there is no guarantee that they
have not been collected before anyway.

* options.[ch] (scm_t_option):  Made type unsigned, name into a
constant char* and val into a scm_t_bits type.

(scm_options, scm_init_opts):  The number of options is guaranteed
to be larger or equal to zero.  Thus, the type is changed to
unsigned.
2001-10-05 20:18:30 +00:00
Dirk Herrmann
3dbacabc55 * num2integral.i.c (NUM2INTEGRAL): Eliminated some warnings about
testing an unsigned value for being >= 0.
2001-10-05 18:26:46 +00:00
Dirk Herrmann
14282d0f5c * numbers.h: Removed old comment about using SCM_CAR to access
non-pair cells.

(SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM):  Make sure
the return value is signed.  Thanks to Brian Crowder for the bug
report.

(SCM_SRS):  Avoid unnecessary casting and don't unpack input
values.  With this patch, SCM_SRS can be safely used for other
types than scm_t_signed_bits.  However, it should still better be
an internal macro and thus be renamed to SCM_I_SRS.

(SCM_MAKINUM, SCM_INUM):  Use proper casting.
2001-10-05 17:43:49 +00:00
Gary Houston
2dbec7b5fc * continuations.h, unif.h: in the descriptions of the bit patterns
of the heap cells, make bit 0 the least significant.
2001-10-03 20:45:44 +00:00
Thien-Thi Nguyen
cf4ee84106 *** empty log message *** 2001-09-26 03:15:44 +00:00
Thien-Thi Nguyen
f5dd4f5419 (SCM_MAKE_CHAR): Use scm_t_bits' instead of intptr_t'.
Thanks to Golubev I. N.
2001-09-26 03:14:15 +00:00
Gary Houston
4a151b3da9 * ports.c (scm_drain_input): extended the docstring. thanks to
Alex Schroeder and Thien-Thi Nguyen.
2001-09-25 22:46:13 +00:00
Mikael Djurfeldt
581ded70a3 * validate.h (SCM_NUM2FLOAT, SCM_NUM2DOUBLE,
SCM_VALIDATE_FLOAT_COPY, SCM_VALIDATE_DOUBLE_COPY): New
macros. (The NUM names might soon change.)

* numbers.h: Added missing declarations.
2001-09-23 21:25:26 +00:00
Mikael Djurfeldt
5437598b36 * Makefile.am: Distribute num2float.i.c.
* num2float.i.c: New file, multiply included by numbers.c, used
to "templatize" the float <-> num conversion routines.

* numbers.c: New functions: scm_num2float, scm_float2num,
scm_num2double, scm_double2num.
2001-09-22 21:39:42 +00:00
Rob Browning
0b073f0f14 *** empty log message *** 2001-09-21 17:58:04 +00:00
Rob Browning
b469bd68a6 * .cvsignore: really add version.h 2001-09-21 17:57:07 +00:00
Rob Browning
f6b115d97e * chars.h (SCM_MAKE_CHAR): coerce value to intptr_t. 2001-09-21 17:56:39 +00:00
Rob Browning
1aaa208e93 * numbers.c (scm_gcd): change "k" to a long from an int.
Otherwise it fails on the alpha.  However, we might rather choose
this size conditionally.
2001-09-21 17:56:31 +00:00
Rob Browning
27070f900d * strings.h (SCM_SET_STRING_LENGTH): coerce "l" to a long.
Otherwise it fails on the alpha.  However, we might rather choose
this size conditionally.
2001-09-21 17:56:17 +00:00
Mikael Djurfeldt
2830fd91c6 * numbers.c (scm_integer_expt): Accept inexact integer in second
argument.  (Thanks to Bill Schottstaedt.)
2001-09-20 18:53:32 +00:00
Rob Browning
c13f0a90f4 *** empty log message *** 2001-09-20 16:48:02 +00:00
Rob Browning
3143f1093d * version.c
(scm_major_version): support integer *_VERSION macros.
(scm_minor_version): support integer *_VERSION macros.
(scm_micro_version): support integer *_VERSION macros.
(scm_version): support integer *_VERSION macros.
2001-09-20 16:47:01 +00:00
Rob Browning
c8333bc59d * version.h: renamed to version.h.in. 2001-09-20 16:46:52 +00:00
Rob Browning
d2836a7db6 * version.h.in: renamed from version.h.
(SCM_GUILE_MAJOR_VERSION): new public macro.
(SCM_GUILE_MINOR_VERSION): new public macro.
(SCM_GUILE_MICRO_VERSION): new public macro.
2001-09-20 16:46:37 +00:00
Rob Browning
b1bdf8ec8a * versiondat.h.in: removed (obsolete). 2001-09-20 16:46:25 +00:00
Mikael Djurfeldt
a7f54aed6a * error.c, error.h: Made error keys globally accessible.
Applications might want to test for these or use them in a direct
call to scm_error.
2001-09-20 08:18:26 +00:00
Mikael Djurfeldt
147c18a0e4 * num2integral.i.c (NUM2INTEGRAL): Report an error when these
routines are passed an inexact.  This change in behavior is
motivated by concordance with R5RS: It is more common that a
primitive doesn't want to accept an inexact for an exact.
2001-09-20 08:17:25 +00:00
Dirk Herrmann
662c553964 * Removed function scm_gc_mark_cell_conservatively. 2001-09-17 20:32:53 +00:00
Gary Houston
6c1b762870 * root.h (scm_root_state): removed the continuation_stack and
continuation_stack_ptr members, which have no apparent purpose.
	(scm_continuation_stack, scm_continuation_stack_ptr): #defines
	removed.
	* root.c (root_mark), init.c (restart_stack, start_stack), gc
	(scm_igc): remove all references to contination_stack and
	continuation_stack_ptr, avoiding allocation of a vector and
	useless processing during gc.
2001-09-15 21:56:52 +00:00
Dirk Herrmann
455c0ac82b * Some renamings and minor fixes. 2001-09-13 22:29:44 +00:00
Dirk Herrmann
22ba637b12 * Simplified handling of static glocal SCM variable. 2001-09-13 21:58:15 +00:00
Dirk Herrmann
c3c4d80154 * Fixed some typing bugs. Thanks to Rob Browning. 2001-09-13 21:22:37 +00:00
Dirk Herrmann
b00418df09 * Added function scm_str2string. Thanks to Martin Baulig. 2001-09-12 19:53:57 +00:00
Marius Vollmer
a0d34a0be1 *** empty log message *** 2001-09-06 11:13:27 +00:00
Marius Vollmer
5e7248f272 (scm_done_free): Always subtract size from scm_mallocated
when computing nm, even if it's negative.
(scm_must_malloc): Abort on overflow of scm_mtrigger.
(scm_must_realloc): Likewise.
2001-09-06 11:11:31 +00:00
Michael Livshin
b10586f098 * numbers.c (scm_sys_check_number_conversions): new function,
defined if Guile is compiled in debugging mode.  currently checks
`scm_num2ulong', should check much much more.

* num2integral.i.c (NUM2INTEGRAL): when converting a bignum to
unsigned, ensure that it's positive.  thanks to Martin Baulig!
2001-09-01 17:17:50 +00:00
Dirk Herrmann
8c494e9973 * Removed lots of deprecated stuff. 2001-08-31 14:42:31 +00:00
Dirk Herrmann
dee01b012c * Removed deprecated stuff.
* Some more renamings to SCM_<filename>_H.
2001-08-31 12:13:50 +00:00
Dirk Herrmann
b29058ffee * Remove deprecated macros and typenames.
* Rename header macros to SCM_<filename>_H.
* Prefer !SCM_<foo> over SCM_N<foo>.
2001-08-31 11:17:06 +00:00
Dirk Herrmann
0527e68763 * Renamed header macros to the SCM_<filename>_H format. 2001-08-31 10:42:19 +00:00
Marius Vollmer
fada26b27e *** empty log message *** 2001-08-26 21:54:33 +00:00