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

4519 commits

Author SHA1 Message Date
Dirk Herrmann
df5af69a91 * smob.h (scm_make_smob_type): Made the declaration match the
definition.
2003-10-07 22:03:26 +00:00
Marius Vollmer
da0e6c2baf Make type names char const * instead of char *. Thanks to Paul Jarc! 2003-10-07 15:58:19 +00:00
Kevin Ryde
591924eb4c *** empty log message *** 2003-10-02 00:11:12 +00:00
Kevin Ryde
184b85a394 (s_scm_call_with_output_string): scm_get_output_string
rather than scm_strport_to_string, so as to guard against the port
having been closed by the called procedure.  Reported by Nic Ferrier.
2003-10-02 00:04:26 +00:00
Dirk Herrmann
f03314f920 * numbers.h (SCM_INEXACTP): Removed uses of SCM_TYP16S.
* tags.h, deprecated.h (SCM_TYP16S): Deprecated and moved from
	tags.h to deprecated.h.
2003-09-21 07:54:23 +00:00
Dirk Herrmann
534c55a97d This set of patches introduces a new tc7 code scm_tc7_number for
numbers.  Bignums, reals and complex numbers are turned from smobs
	into subtypes of scm_tc7_number.

	* tags.h (scm_tc7_number): New.

	* eq.c (scm_equal_p), eval.c (SCM_CEVAL), evalext.c
	(scm_self_evaluating_p), gc-card.c (scm_i_sweep_card), gc-mark.c
	(scm_gc_mark_dependencies), goops.c (create_smob_classes), hash.c
	(scm_hasher), numbers.c, numbers.h (SCM_NUMP), objects.c
	(scm_class_of), print.c (scm_iprin1), smob.c
	(scm_smob_prehistory): Don't handle bignums, reals and complex
	numbers as subtypes of scm_tc7_smob any more.

	* numbers.h, tags.h (scm_tc16_big, scm_tc16_real,
	scm_tc16_complex): Moved definitions from tags.h to numbers.h.
2003-09-18 20:55:40 +00:00
Dirk Herrmann
29c4382afd * numbers.c (scm_make_complex), gc-card.c (scm_i_sweep_card): Use
sizeof (scm_t_complex) to determine the memory size of the
	malloc'd area for complex numbers.
2003-09-18 20:18:17 +00:00
Dirk Herrmann
47ae1f0eca * libguile/numbers.c (scm_bigequal): Fixed.
* test-suite/tests/numbers.test (equal?): Added tests.

	* test-suite/tests/numbers.test (=): Fixed and added some bignum
        related tests.
2003-09-17 21:03:26 +00:00
Marius Vollmer
859b6b2fff *** empty log message *** 2003-09-16 21:21:28 +00:00
Marius Vollmer
2d99b584ac (scm_current_time): 'time' does not set errno so don't use
SCM_SYSERROR for reporting errors.
2003-09-16 21:18:26 +00:00
Dirk Herrmann
e17d318faa This set of patches eliminates the dependency between the
implementation of evaluator specific memoization codes and special
	constants like #f, '() etc. ('flags'), which are not evaluator
	specific.  The goal is to remove definitions of evaluator
	memoization codes completely from the public interface.  This will
	make it possible to experiment more freely with optimizations of
	guile's internal representation of memoized code.

	* objects.c (scm_class_of): Eliminate dependency on SCM_ISYMNUM.

	* print.c (iflagnames): New array, holding the printed names of
	guile's special constants ('flags').

	(scm_isymnames): Now holds only the printed names of the
	memoization codes.

	(scm_iprin1): Separate the handling of memoization codes and
	guile's special constants.

	* tags.h (scm_tc9_flag, SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA,
	SCM_IFLAGNUM): new

	(scm_tc8_char, scm_tc8_iloc, SCM_BOOL_F, SCM_BOOL_T,
	SCM_UNDEFINED, SCM_EOF_VAL, SCM_EOL, SCM_UNSPECIFIED, SCM_UNBOUND,
	SCM_ELISP_NIL, SCM_IM_DISPATCH, SCM_IM_SLOT_REF,
	SCM_IM_SLOT_SET_X, SCM_IM_DELAY, SCM_IM_FUTURE,
	SCM_IM_CALL_WITH_VALUES, SCM_IM_NIL_COND, SCM_IM_BIND): Changed
	values.

	(SCM_IFLAGP): SCM_IFLAGP now only tests for flags.

	(SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Generalized to use the
	tc9 macros and scm_tc9_flag.
2003-09-16 17:37:56 +00:00
Marius Vollmer
eecac80630 *** empty log message *** 2003-09-15 12:37:16 +00:00
Marius Vollmer
2eb78d0670 (scm_setgroups): Check that the gid list is not too long. Thanks to
Paul Jarc!
2003-09-15 12:36:57 +00:00
Dirk Herrmann
22f2cf2d9a * tags.h: Reduced the number of short instructions from 14 to 13.
The typecode of the former 14th short instruction is now used to
	represent long instructions.  Changed some comments to reflect
	this fact.

	(SCM_MAKISYM): ISYMs get a new tc7 code, namely the one that was
	previously used by SCM_IM_DEFINE.

	(SCM_IM_DEFINE): Turned into a long instruction.

	* eval.c (unmemocopy, SCM_CEVAL): Treat SCM_IM_DEFINE as a long
	instruction.

	* eval.c (SCM_CEVAL): Since characters and iflags have now a tc7
	code that is separate from all instructions, one level of dispatch
	for long instructions can be eliminated.

	* print.c (scm_isymnames): Removed some commented code.
2003-09-14 08:07:10 +00:00
Marius Vollmer
97a61c5f91 *** empty log message *** 2003-09-12 15:43:04 +00:00
Marius Vollmer
189b66ba87 (SCM_FENCE): Use __memory_barrier with the Intel compiler on IA64. 2003-09-12 15:42:29 +00:00
Marius Vollmer
50e0ba57da *** empty log message *** 2003-09-12 15:16:56 +00:00
Marius Vollmer
cdc5f67652 (scm_tc16_hashtable): Added "extern" declaration. 2003-09-12 15:11:59 +00:00
Marius Vollmer
6dc1cd1eec (scm_module_reverse_lookup): Check that the obarray really is a
hashtable and do nothing if not.
2003-09-12 15:11:09 +00:00
Marius Vollmer
62f548e16c *** empty log message *** 2003-09-12 14:14:05 +00:00
Marius Vollmer
2b2c6fca20 Use "extern inline" only with GCC. Use "static
inline" else.
2003-09-12 14:13:48 +00:00
Dirk Herrmann
0d5e348022 * numbers.h (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Removed uses
of SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.

	* numbers.h, deprecated.h (SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP,
	SCM_SLOPPY_COMPLEXP): Deprecated and moved from numbers.h to
	deprecated.h.
2003-09-06 09:17:29 +00:00
Dirk Herrmann
6b412e9171 * eq.c (scm_eqv_p, scm_equal_p): Removed uses of
SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.

	* eq.c (scm_eqv_p, scm_equal_p): Reordered comparisons from
	0.0==some_expression to some_expression==0.0.  The latter is
	better readable.  The former is preferred by some people, since it
	leads to a compiler error when confusing == with =.  However, when
	using gcc, a warning will be issued if in an if-statement an
	assigment appears.  Since many Guile developers are using gcc,
	such errors will not remain unnoticed anyway.  We can therefore
	focus on better readability.
2003-09-06 08:50:26 +00:00
Dirk Herrmann
7e3b25bf51 * tags.h: Added description of Guile's type system. Removed some
old and misleading comments.
2003-09-04 20:47:41 +00:00
Dirk Herrmann
3ea39242b8 * unit.c (scm_cvref): Eliminate unnecessary uses of SCM_NIMP,
SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
2003-09-04 20:14:02 +00:00
Dirk Herrmann
5d7d39ff5d * numbers.h (SCM_MAKINUM): Define in terms of scm_tc2_int.
(SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Define in terms of the
	respective SLOPPY macro.
2003-09-04 20:04:30 +00:00
Dirk Herrmann
baa84a205c * eq.c (scm_equal_p): Use SCM_TYP7 to check if an object is of
type string, not SCM_TYP7S.
2003-09-04 19:21:21 +00:00
Kevin Ryde
53bb87824d *** empty log message *** 2003-09-03 00:03:20 +00:00
Kevin Ryde
03b79aa32a (scm_strptime): Add comment about glibc strptime %s and
current timezone requiring SCM_DEFER_INTS.
2003-09-03 00:01:17 +00:00
Kevin Ryde
ba15f500e3 *** empty log message *** 2003-09-02 23:03:34 +00:00
Kevin Ryde
4d814788fc (scm_lognot): Correction to docstring, ones-complement not 2s-complement. 2003-09-02 23:00:28 +00:00
Neil Jerram
defdc4b4ee Make -s switch optional. 2003-08-30 21:22:45 +00:00
Kevin Ryde
0f008a157a *** empty log message *** 2003-08-30 00:07:49 +00:00
Kevin Ryde
f9811f9f2e (scm_lognot): Rewrite using ~ and mpz_com, for directness
and to have non-integer types rejected as per other logical funcs.
2003-08-30 00:04:42 +00:00
Kevin Ryde
438a3ba10d *** empty log message *** 2003-08-28 00:13:06 +00:00
Kevin Ryde
c1ffdc6a42 (scm_remember_upto_here_1): Revise comments on the asm form. 2003-08-27 23:34:53 +00:00
Kevin Ryde
98dceb376e *** empty log message *** 2003-08-22 23:26:07 +00:00
Kevin Ryde
f94e3e6e4b (scm_system): Remove SCM_DEFER_INTS, system() should be
thread safe, and could take a long time too.
2003-08-22 23:25:02 +00:00
Kevin Ryde
c072c40c8b Add a copyright year. 2003-08-22 23:23:17 +00:00
Kevin Ryde
1fa79a3839 *** empty log message *** 2003-08-22 01:19:24 +00:00
Kevin Ryde
708f22c6af (scm_difference): Correction to bignum - negative inum. 2003-08-22 01:17:48 +00:00
Kevin Ryde
d97f9b4230 *** empty log message *** 2003-08-12 21:43:34 +00:00
Kevin Ryde
9e1569bd0d (scm_remember_upto_here_1, scm_remember_upto_here_2): Undefine
macros while defining functions.
2003-08-12 21:09:10 +00:00
Kevin Ryde
aca3618f81 (scm_remember_upto_here_1, scm_remember_upto_here_2) [__GNUC__]:
Use volatile asm macros rather than a function call.
2003-08-12 21:08:34 +00:00
Kevin Ryde
34b6177b15 (scm_system): In docstring, refer to status:exit-val rather than
"functions above".
2003-08-12 20:24:52 +00:00
Kevin Ryde
6a4d17af96 (getenv): Use <stdlib.h> for prototype. 2003-08-12 20:23:35 +00:00
Kevin Ryde
b9052fcc32 *** empty log message *** 2003-08-08 22:58:24 +00:00
Kevin Ryde
f5003c13b6 (scm_source_properties): Return plist from hash if it's a
list set by source-properties! rather than an SRCPROPS object,
2003-08-08 22:57:28 +00:00
Kevin Ryde
8e5b4b9e34 *** empty log message *** 2003-07-28 23:59:47 +00:00
Kevin Ryde
93acf7cb2b (scm_primitive_property_ref): In docstring, note
parameters to not-found-proc, use hyphens rather than underscores for
that parameter name.
(scm_primitive_property_set_x): In docstring, VAL is the value
parameter not CODE.
2003-07-28 23:29:17 +00:00