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

8264 commits

Author SHA1 Message Date
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
Kevin Ryde
88a7ae1f68 *** empty log message *** 2004-03-25 22:46:04 +00:00
Kevin Ryde
11e1db06ce (scm_getcwd, scm_readlink): Avoid memory leak on errors. 2004-03-25 22:26:17 +00:00
Kevin Ryde
3cd232146f *** empty log message *** 2004-03-25 21:57:25 +00:00
Kevin Ryde
1fff961089 (scm_modulo): For inum/big and big/big, remove test of
big==0 since that never occurs.
2004-03-25 21:56:27 +00:00
Kevin Ryde
d885e204fd (scm_modulo_expt): Renamed from
scm_modular_expt, matching scheme level name `modulo-expt'.
2004-03-25 21:55:20 +00:00
Kevin Ryde
b7b8c57576 (scm_modular_expt): Return a negative remainder for a
negative divisor, the same as `modulo' does.
2004-03-25 21:51:39 +00:00
Kevin Ryde
d6628681cd *** empty log message *** 2004-03-25 21:49:28 +00:00
Kevin Ryde
24360e11b0 2004-03-26 Eric Hanchrow <offby1@blarg.net>
* tests/numbers.test (modulo-expt): New tests.
2004-03-25 21:46:35 +00:00
Kevin Ryde
23d77957a4 (min, max): Check inexactness of big/real and
real/big combinations, collect up tests under arg types for clarity.
2004-03-25 21:45:11 +00:00
Kevin Ryde
32c9168774 Add copyright years based on ChangeLog entries. 2004-03-25 21:38:59 +00:00
Kevin Ryde
518b750845 2004-03-26 Eric Hanchrow <offby1@blarg.net>
* numbers.c, numbers.h (scm_modular_expt): New function.
2004-03-25 21:35:53 +00:00
Kevin Ryde
682fb084e5 *** empty log message *** 2004-03-24 23:29:22 +00:00
Kevin Ryde
253b60cc92 (SLIB): Amend `require' cross reference node name, is
called "Require" in slib 3a1.
2004-03-24 23:28:54 +00:00
Kevin Ryde
2926035a17 *** empty log message *** 2004-03-24 22:16:50 +00:00
Kevin Ryde
2a06f79117 (scm_min, scm_max): Correction to big/real and real/big,
return inexact as required by r5rs.
2004-03-24 21:53:31 +00:00
Dirk Herrmann
62360b8975 * libguile/eval.c: Separated some definitions relevant for execution
from the memoization part of the file.

	(copy_tree): New static function

	(scm_copy_tree): Rewritten to fix two kinds or bugs: First, cyclic
	structures are detected now and will lead to an exception instead
	of forcing guile to run in an endless loop, using up all the
	system's memory.  Second, arrays in the cdr of an improper list
	are now copied.  See the new test cases in eval.test.

	* test-suite/tests/eval.test: Added tests which reflect the recent
	fixes to copy-tree.
2004-03-24 01:21:50 +00:00
Dirk Herrmann
b28f5b3cb2 * posix.c (scm_gethostname): Make sure len is initialised before
it is used.  Restructured to (hopefully) represent possible
	configurations more clearly in the code.  Added unwind handler.
2004-03-24 00:49:07 +00:00
Kevin Ryde
3bd3bae820 *** empty log message *** 2004-03-23 00:23:54 +00:00
Kevin Ryde
51ebeed145 *** empty log message *** 2004-03-22 23:48:52 +00:00
Kevin Ryde
6b01eac947 (AC_CHECK_FUNCS): Add sysconf.
(AC_CHECK_HEADERS): Add netdb.h and sys/param.h.
2004-03-22 23:45:35 +00:00
Kevin Ryde
0eaf105588 (scm_gethostname): Use sysconf(_SC_HOST_NAME_MAX) and/or
MAXHOSTNAMELEN when available.
2004-03-22 23:41:30 +00:00
Kevin Ryde
238f1919b6 *** empty log message *** 2004-03-22 23:31:30 +00:00
Kevin Ryde
c344fddd82 *** empty log message *** 2004-03-22 23:30:49 +00:00
Kevin Ryde
1ccbc436c1 (Reals and Rationals): Typo in `rationalize'. 2004-03-22 23:30:08 +00:00
Kevin Ryde
2d411b0506 (circular-list): Rewrite using set-cdr!, no need to copy parameter list. 2004-03-22 23:27:46 +00:00
Marius Vollmer
77895d89cf Don't ignore .cvsigore 2004-03-21 02:12:49 +00:00
Marius Vollmer
254bf78d53 *** empty log message *** 2004-03-21 02:03:02 +00:00
Marius Vollmer
1988130220 (skip_scsh_block_comment): Also recognize '\r' as a line terminator.
Rewritten the logic as a state machine, I must have been doing too
much VHDL lately...
2004-03-21 02:02:08 +00:00
Marius Vollmer
fc22b297fc (scm_ceval, scm_deval): Explicitely evaluate ports to themselves.
Thanks to Han-Wen Nienhuys!
2004-03-21 00:30:12 +00:00
Marius Vollmer
71a896390e Changed docstrings so that they no longer talk about returning
'pointers' to something.
2004-03-20 23:55:03 +00:00
Han-Wen Nienhuys
009c34a2da * gc.c: remove set_debug_cell_accesses! when
SCM_DEBUG_CELL_ACCESSES is not defined. Scheme source code should
use (if (defined? 'set-debug-cell-accesses!) .. ) to switch on
debugging conditionally.
2004-03-20 23:37:52 +00:00
Kevin Ryde
54733c952d *** empty log message *** 2004-03-20 23:22:17 +00:00
Kevin Ryde
45198ffbfe (scm_gmtime): Use gmtime_r when available, for thread safety. 2004-03-20 23:18:06 +00:00
Kevin Ryde
fa525c8a68 *** empty log message *** 2004-03-20 23:14:35 +00:00
Kevin Ryde
c9d1dcc03b (AC_CHECK_FUNCS): Add gmtime_r. 2004-03-20 23:13:48 +00:00