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

8299 commits

Author SHA1 Message Date
Kevin Ryde
d77ad56065 (scm_bit_extract): Use SCM_SRS for signed right shift. 2004-04-22 01:21:39 +00:00
Kevin Ryde
10cc8b0197 *** empty log message *** 2004-04-22 00:01:48 +00:00
Kevin Ryde
be4381fade * standalone/test-round.c: New file, exercising scm_round.
* standalone/Makefile.am: Add it.
2004-04-21 23:59:04 +00:00
Kevin Ryde
370b8399a8 New file, exercising scm_round. 2004-04-21 23:53:23 +00:00
Kevin Ryde
6dfc9f1f8f *** empty log message *** 2004-04-21 23:48:47 +00:00
Kevin Ryde
63177e464e (AC_CHECK_HEADERS): Add fenv.h.
(AC_CHECK_FUNCS): Add fesetround.
2004-04-21 23:37:22 +00:00
Kevin Ryde
caab294f82 *** empty log message *** 2004-04-21 23:30:39 +00:00
Kevin Ryde
6187f48b1a (scm_round): Test for x already an integer, to avoid bad
rounding in x+0.5 when x is a big value already an integer.  In
certain hardware rounding cases x+0.5 can give an adjacent integer,
leading to that as the result, when we really just wanted x itself.
2004-04-21 23:15:55 +00:00
Marius Vollmer
3229f68b5a Big reorganization of the whole manual to give it a simpler structure. 2004-04-21 14:33:05 +00:00
Dirk Herrmann
b1cb24ff0a * eval.c (scm_unmemocopy): Fixed unmemoization of let*.
(deval_args, CEVAL): Minor improvements: Reduced variable scopes,
	added const qualifiers, cast intentionally unused expressions to
	void for emphasis, improved comment.
2004-04-19 16:49:56 +00:00
Dirk Herrmann
5065b40d60 * tags.h (scm_tags, scm_tc8_tags, scm_tc9_flag, scm_tc8_flag,
scm_tc8_isym): Renamed scm_tags to scm_tc8_tags.  Renamed
	scm_tc9_flag to scm_tc8_flag.  Introduced new identifier
	scm_tc8_isym.  Defined tc8-tags relative to scm_tc3_imm24.
	Defined the tc8-tag for flags to be 0x04, which will mean that
	SCM_BOOL_F will also have the value 0x04 instead of 0x013c.  Due
	to the reduced number of bits and the simpler bit pattern for
	SCM_BOOL_F, certain machines may be able to use more efficient
	processor instructions to deal with SCM_BOOL_F.

	(SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA): Removed.  These have
	never been defined in a released version, thus no need to
	deprecate them.

	(SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Flags now use tc8
	instead of tc9 tags.

	(SCM_ISYMP, SCM_MAKISYM, SCM_ISYMNUM): Isyms now use tc8 instead
	of tc9 tags.

	(SCM_MAKSPCSYM): Removed.  It is almost impossible that user code
	could have used this definition.

	(SCM_IM_AND, SCM_IM_BEGIN, SCM_IM_CASE, SCM_IM_COND, SCM_IM_DO,
	SCM_IM_IF, SCM_IM_LAMBDA, SCM_IM_LET, SCM_IM_LETSTAR,
	SCM_IM_LETREC, SCM_IM_OR, SCM_IM_QUOTE, SCM_IM_SET_X): Now encoded
	as isyms, as special isyms don't exist any more.
2004-04-18 08:56:27 +00:00
Kevin Ryde
e08d2eee17 *** empty log message *** 2004-04-18 00:54:29 +00:00
Kevin Ryde
66ec83c926 (AC_CHECK_FUNCS): Add readdir_r. 2004-04-18 00:53:36 +00:00
Kevin Ryde
9be808d8c9 (scm_readdir): Use readdir_r when available, for thread safety. 2004-04-18 00:39:16 +00:00
Kevin Ryde
9fa6c11903 *** empty log message *** 2004-04-17 22:58:34 +00:00
Kevin Ryde
b6f8f763db (scm_max, scm_min): For big/real, use SCM_SWAP rather than
explicit swapping code.
2004-04-17 21:58:23 +00:00
Kevin Ryde
83ac9c59df *** empty log message *** 2004-04-15 01:53:31 +00:00
Kevin Ryde
0bff4dce95 (scm_gcd): For inum/big, use mpz_gcd_ui by sharing code with big/inum. 2004-04-15 01:45:12 +00:00
Kevin Ryde
84a4be9afb *** empty log message *** 2004-04-15 01:37:31 +00:00
Kevin Ryde
a98ce90708 (xisinf): Add a comment about solaris 7 lacking isinf. 2004-04-15 01:24:00 +00:00
Kevin Ryde
c9cdd3966e *** empty log message *** 2004-04-15 00:53:30 +00:00
Kevin Ryde
7f703e0d21 (min): Correction, test "documented? min" not "documented? max". 2004-04-15 00:52:48 +00:00
Kevin Ryde
2530518ea9 (max, min): Exercise some inum/frac, frac/inum,
big/frac, frac/big and frac/frac cases.
2004-04-15 00:50:49 +00:00
Kevin Ryde
a4ecff2d36 Add SIGSYS. 2004-04-15 00:47:02 +00:00
Kevin Ryde
e4bc5d6ca7 (scm_max, scm_min): For inum/frac, frac/inum, big/frac,
frac/big and frac/frac, use scm_less_p for exact comparison.
2004-04-15 00:44:19 +00:00
Kevin Ryde
05fa9121e9 *** empty log message *** 2004-04-15 00:38:30 +00:00
Kevin Ryde
597e2cbd13 (scm_string_trim, scm_string_trim_right, scm_string_trim_both):
Cast to unsigned char for isspace.
2004-04-15 00:29:03 +00:00
Kevin Ryde
d46410989e (scm_append_x): Use iterative style, to avoid non-tail recursion. 2004-04-15 00:23:57 +00:00
Han-Wen Nienhuys
6b69393dcc (scm_cell): use SCM_GC_CELL_WORD for checking tag. 2004-04-06 21:49:43 +00:00
Han-Wen Nienhuys
84fad13058 * srfi-13.c (s_scm_string_map): convert character to unsigned char
before converting to unsigned int. This prevents hi-bit ascii as
being converted large integers.
(string_upcase_x): change caller for scm_{up,down}case to
scm_c_{up,down}case

* chars.h (scm_init_chars): change scm_{upcase,downcase} to
scm_c_{up,down}case.
(SCM_MAKE_CHAR): add (unsigned char) cast. This prevents havoc
when hi-bit ASCII is subjected to SCM_MAKE_CHAR().
2004-04-06 21:48:02 +00:00
Kevin Ryde
0b288f368a *** empty log message *** 2004-04-06 00:30:25 +00:00
Kevin Ryde
e7644cb292 (scm_ash): Remove stray "}" in docstring. 2004-04-06 00:17:41 +00:00
Kevin Ryde
57f6654745 *** empty log message *** 2004-04-06 00:08:18 +00:00
Kevin Ryde
ea2508c840 *** empty log message *** 2004-04-05 23:54:28 +00:00
Kevin Ryde
3271a325c8 (scm_make_ratio): For inum/bignum integer detection, use
x==SCM_MOST_NEGATIVE_FIXNUM explicitly, for clarity and to avoid
calling mpz_cmp_ui in most cases.
2004-04-05 23:31:20 +00:00
Kevin Ryde
f1c6bec637 Tweak a few words from:
(Continuations): Rewrite with more detail.
2004-04-05 23:14:55 +00:00
Kevin Ryde
ad22fe7cf8 (quotient, remainder): Exercise inum/big at and
near special case inum == fixnum-min, big == -fixnum-min.
2004-04-05 23:05:37 +00:00
Kevin Ryde
c3110a3045 *** empty log message *** 2004-04-05 22:58:28 +00:00
Kevin Ryde
4dc09ee4ff (scm_quotient, scm_remainder): In inum/big, use mpz_cmp_ui
for big == abs(most-negative-fixnum) special case.
(abs_most_negative_fixnum): Remove, no longer used.
2004-04-05 22:48:05 +00:00
Kevin Ryde
2e1fc2e8e3 (scm_sigaction_for_thread): Correction to signum range
test, avoids SCM_VECTOR_REF outside bounds of signal_handlers on
calling (sigaction NSIG).
2004-04-05 22:46:29 +00:00
Kevin Ryde
eac8e0ef86 (scm_system_star): Fix execargv memory leak, merge parent
and fork error cases to do this.
2004-04-05 22:45:17 +00:00
Dirk Herrmann
dec40cd262 * eval.c (CEVAL): Don't distinguish between short and long
instructions when dispatching - just always dispatch on the
	instruction code, which is common for short and long instructions.
	Further, removed unnecessary goto statements and added comment.
2004-04-03 16:38:56 +00:00
Dirk Herrmann
0e7bb79594 * eval.c (scm_unmemocopy): Don't distinguish between short and
long instructions when dispatching - just always dispatch on the
	instruction code, which is common for short and long instructions.
	Further, removed unnecessary goto statements, fixed indentation
	and replaced SCM_IMP predicates by SCM_NULLP.
2004-04-03 15:45:36 +00:00
Dirk Herrmann
f998676709 * eval.c (scm_lookupcar1, CEVAL): Use SCM_ILOCP instead of
comparison with SCM_ILOC00.  In CEVAL, eliminate goto-label
	'checkmacro'.
2004-04-03 14:24:17 +00:00
Kevin Ryde
fbc4223176 *** empty log message *** 2004-03-31 02:00:01 +00:00
Kevin Ryde
bb94a503ca Include <signal.h> for SIG_IGN and friends. 2004-03-31 01:59:02 +00:00
Dirk Herrmann
434f2f7a91 Introduce scm_debug_mode_p as a replacement for scm_debug_mode and
SCM_DEBUGGINGP:

	* debug.h (scm_debug_mode_p, scm_debug_mode, SCM_DEBUGGINGP),
	eval.c (scm_debug_mode_p): Deprecated scm_debug_mode and
	SCM_DEBUGGINGP.  Provided scm_debug_mode_p instead, to have one
	single interface that also matches the naming conventions.
	Probably scm_debug_mode_p should be part of the private interface
	anyway.

	* debug.h (scm_debug_mode_p), backtrace.c (display_error_body),
	eval.c (SCM_APPLY, scm_trampoline_0, scm_trampoline_1,
	scm_trampoline_2): Change uses of scm_debug_mode or SCM_DEBUGGINGP
	to scm_debug_mode_p.


	Deprecate direct access to scm_ceval, scm_deval and scm_ceval_ptr:

	* eval.h (scm_ceval, scm_deval, scm_ceval_ptr), debug.h
	(scm_ceval_ptr): Deprecated.  Moved declaration of scm_ceval_ptr
	from debug.h to eval.h.

	* debug.h (SCM_RESET_DEBUG_MODE): Don't access scm_ceval_ptr any
	more, just leave it with setting scm_debug_mode_p, which is
	equivalent for practical purposes.

	* deprecated.h (SCM_XEVAL, SCM_XEVALCAR): Call scm_i_eval_x
	instead of *scm_ceval_ptr.  Leave all evaluating to scm_i_eval_x.

	* gdbint.c (gdb_eval): Call scm_i_eval_x instead of scm_ceval.

	* eval.c (ceval, deval, scm_ceval, scm_deval): Made scm_ceval
	static and renamed it to ceval throughout.  Provide a new exported
	but deprecated function scm_ceval as a wrapper for backwards
	compatibility.  The same is done for the deval/scm_deval pair of
	functions.

	* eval.c (CEVAL, SCM_CEVAL): Renamed SCM_CEVAL to CEVAL
	throughout.  Defined CEVAL to ceval or deval, based on compilation
	phase.

	* eval.c (SCM_XEVAL, SCM_XEVALCAR): Dispatch on scm_debug_mode_p
	to ceval and deval instead of calling *scm_ceval_ptr.

	* eval.c (dispatching_eval): New deprecated static function.

	* eval.c (scm_ceval_ptr): Initialized to dispatching_eval in order
	to emulate its old behaviour as closely as possible.


	Change the evaluator such that only expressions for which pair? is
	true are passed to CEVAL, and such that all other expressions are
	evaluated outside of CEVAL:

	* eval.c (EVAL): New, provided in analogy to EVALCAR.  Evaluate an
	expression that is assumed to be memoized already.  All but
	expressions of the form '(<form> <form> ...)' are evaluated inline
	without calling an evaluator.

	* eval.c (SCM_XEVAL, SCM_XEVALCAR, EVALCAR): Evaluate all but
	expressions of the form '(<form> <form> ...)' inline without
	calling an evaluator.

	* eval.c (scm_i_eval_x, scm_i_eval, scm_ceval, scm_deval): Handle
	the special case of unmemoized symbols passed on the top level.

	* eval.c (CEVAL): Change calls to CEVAL to EVAL, except where it
	is known that the expression passed to CEVAL is of the form
	'(<form> <form> ...)'.  Remove handling of the tc7-objects, since
	now it is known that the input expression of CEVAL is a pair.
2004-03-29 19:59:43 +00:00
Dirk Herrmann
5fb6438380 * eval.c (is_self_quoting_p): New static function.
(scm_m_quote): Use is_self_quoting_p.

	(copy_tree): Corrected typo in comment.
2004-03-29 08:24:57 +00:00
Han-Wen Nienhuys
bfefbf18db * eval.c (s_scm_copy_tree): idem.
* list.c (s_scm_filter): remove "pointer" from doc string.
2004-03-28 13:57:19 +00:00
Han-Wen Nienhuys
702551e6cc * gc.h (SCM_GC_CELL_TYPE): SCM_GC_CELL_TYPE uses SCM_GC_CELL_OBJECT.
* goops.h (SCM_NUMBER_OF_SLOTS): don't SCM_UNPACK the result.

* backtrace.c ("display_backtrace_body"): SCM_PACK before SCM_EQ_P
(display_frame): idem.
(display_backtrace_file_and_line): idem.

* tags.h (SCM_UNPACK): stricter typechecking on SCM_UNPACK
arguments.
2004-03-28 13:55:03 +00:00