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

475 commits

Author SHA1 Message Date
Dirk Herrmann
b5c2579a34 * Removed further calls to SCM_LENGTH. 2000-10-10 09:22:31 +00:00
Dirk Herrmann
3db4adfced * Removed some more references to SCM_CHARS.
* Provided SCM_U?VECTOR_BASE as replacements for SCM_VELTS.
2000-09-26 19:20:39 +00:00
Dirk Herrmann
f151f91293 * Eliminated some more calls to SCM_CHARS. 2000-09-22 17:43:57 +00:00
Dirk Herrmann
28b06554ca * Unified ssymbols and msymbols to a single symbol type 'scm_tc7_symbol'.
* Added scm_string_hash and deprecated scm_strhash.
2000-09-12 12:30:36 +00:00
Keisuke Nishida
afa38f6e60 * eval.c (SCM_APPLY): Fixed bugs in the applicable-smob calls. 2000-09-10 13:41:18 +00:00
Neil Jerram
11768c044a * Docstring updates. 2000-09-02 23:23:16 +00:00
Keisuke Nishida
0717dfd871 * smob.h (scm_smob_descriptor): Added apply\' and gsubr_type\'.
* smob.c (scm_make_smob_type): Initialize `apply\' and `gsubr_type\'.
(scm_set_smob_apply): New function.
(scm_smob_apply_0, scm_smob_apply_1, scm_smob_apply_2,
scm_smob_apply_3): New functions.
* eval.c (SCM_CEVAL, SCM_APPLY): Added dispatch for applicable smobs.
* procs.c (s_scm_procedure_p): Check applicable smobs.
2000-08-25 02:26:22 +00:00
Mikael Djurfeldt
68d8be66ce * eval.c (scm_eval): Backward incompatible change: Now takes an
environment specifier as second arg.  `eval' hereby becomes R5RS
compatible.
(scm_i_eval_x, scm_i_eval): New functions (replace
scm_eval_3).
(scm_eval2, scm_eval_3): Deprecated.
(scm_top_level_lookup_closure_var): Deprecated.
2000-08-11 08:42:50 +00:00
Marius Vollmer
1bd07992b6 * eval.c (unmemocopy): Don't rely on V being a list of at least
one element.  Thanks to Bill Schottstaedt!
2000-07-17 19:59:57 +00:00
Mikael Djurfeldt
549e6ec69d * eval.c, eval.h (scm_top_level_lookup_closure_var): Added.
#include "libguile/fluids.h".
2000-06-21 02:42:03 +00:00
Mikael Djurfeldt
8878f04033 * eval.c: Updated comment above scm_map. 2000-06-14 22:02:13 +00:00
Mikael Djurfeldt
002f1a5dba * eval.c (scm_badformalsp): New static function.
(SCM_CEVAL): Check arguments for procedure-with-setter closures.
(Thanks to Keisuke Nishida.)
2000-06-04 17:27:27 +00:00
Mikael Djurfeldt
790071cdc8 * eval.c (scm_lookupcar): Test for !SCM_CONSP (SCM_CAR (env))
instead of SCM_TRUE (scm_procedurep (SCM_CAR (env))).
2000-06-04 01:29:54 +00:00
Dirk Herrmann
445f675cf4 * Replace SCM_UNPACK_CAR with SCM_CELL_TYPE or SCM_CELL_WORD_0.
* Only access cons cells via SCM_{SET}?C[AD]R.
* Added documentation for scm_force.
2000-05-23 17:18:37 +00:00
Dirk Herrmann
af45e3b06a * Unified some rest argument checking and handling. 2000-05-18 08:47:52 +00:00
Dirk Herrmann
c8a54c4b87 * __scm.h: Added SCM_DEBUG as default debug option.
* __scm.h: Added debug option SCM_DEBUG_REST_ARGUMENTS.
* eval.c:  Make sure all parameter lists for map and for-each have the
  same length.  Also, removed redundant parameter checks.
2000-05-17 08:35:30 +00:00
Dirk Herrmann
eb42e2f03a More distinguished handling of real and complex values. 2000-05-10 12:34:43 +00:00
Dirk Herrmann
ab66ae47f2 * eval.c: Removed ASRTSYNTAX macro. Removed function 'bodycheck'.
* stacks.c:  Removed unused calculations, minimized variable scopes.
2000-05-08 09:57:29 +00:00
Dirk Herrmann
44d3cb0d1b * eval.c: Eliminated redundant SCM_IMP tests.
* hashtab.c, weaks.c: Fixed critical sections.  Thanks to Keisuke Nishida.
2000-05-05 11:10:57 +00:00
Dirk Herrmann
f8de44c154 * numbers.c (scm_logtest, scm_division): Reordered dispatch sequence.
* removed calls to deprecated scm_makdbl.
2000-05-02 16:41:20 +00:00
Dirk Herrmann
09e4d06400 Made undef_object into a local static variable. 2000-04-25 12:06:51 +00:00
Mikael Djurfeldt
a059974535 * Makefile.am (DEFS): Added. automake adds -I options to DEFS,
and we don't want that.
(INCLUDES): Removed all -I options except for the root source
directory and the root build directory.

* *.*: Change includes so that they always use the "prefixes"
libguile/, qt/, guile-readline/, or libltdl/.
(Thanks to Tim Mooney.)
2000-04-21 14:16:44 +00:00
Dirk Herrmann
3201d76356 * Another couple of SCM/scm_bits_t cleanups.
* eval.c:  replaced undef_cell by undef_object.
* eval.c:  made some struct vcell accesses explicit.
2000-04-19 09:37:48 +00:00
Dirk Herrmann
b0c545678a * eval.c (scm_unmemocar): Use macros to test for gloc cell.
* eval.h (SCM_IFRAME, SCM_IDIST), weaks.h (SCM_IS_WHVEC_ANY):  Added missing
  call to SCM_UNPACK.
2000-04-17 15:05:20 +00:00
Dirk Herrmann
d8c40b9f49 The struct data is now an array of scm_bits_t variables. 2000-04-12 01:19:49 +00:00
Dirk Herrmann
cf49832683 Some fixes for strict typing. 2000-04-01 21:23:09 +00:00
Mikael Djurfeldt
a963f78704 * eval.c (SCM_CEVAL, scm_unmemocar): SCM_PACK/UNPACK corrections. 2000-03-22 02:12:13 +00:00
Michael Livshin
89e00824a0 * *.[hc]: add Emacs magic at the end of file, to ensure GNU
indentation style.
2000-03-19 19:01:16 +00:00
Dirk Herrmann
28b3236d36 Only include async.h where it is actually needed. 2000-03-18 09:16:48 +00:00
Dirk Herrmann
ba11fd4cb6 Only include root.h where it is actually needed. 2000-03-18 08:44:04 +00:00
Dirk Herrmann
f04d8caf82 Only include ports.h where it is actually needed. 2000-03-17 16:10:13 +00:00
Dirk Herrmann
003d1fd046 Only include vectors.h in those files, where it is actually needed. 2000-03-17 15:23:03 +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
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
f12677062e *** empty log message *** 2000-03-12 18:30:33 +00:00
Mikael Djurfeldt
413cb56ff4 * async.c, boolean.h, debug.c, dynl.c, dynwind.c, eval.c, eval.h,
feature.h, filesys.h, fluids.h, fports.c, fports.h, gc.c, gc.h,
  hash.c, keywords.h, macros.c, numbers.c, numbers.h, objects.c,
  objects.h, options.c, pairs.h, ports.c, ports.h, print.c,
  procs.h, ramap.c, read.c, smob.c, smob.h, srcprop.h, stacks.c,
  stacks.h, strports.c, struct.c, struct.h, tag.c, tags.h,
  throw.c, unif.c, unif.h, variable.h, vectors.h, weaks.c,
  weaks.h (SCM_SCM, SCM_BITS, SCM_CARBITS): Renamed from
  SCM_ASSCM, SCM_ASWORD, SCM_CARW).
2000-03-12 17:00:58 +00:00
Mikael Djurfeldt
e282f286eb * alist.c, eval.c, net_db.c, posix.c, print.c, snarf.h, struct.c,
tags.h: Fixed copyright notices.
2000-03-12 16:08:24 +00:00
Mikael Djurfeldt
9374451b7e * eval.c (scm_lookupcar1): Inserted SCM_ASWORD in expressions
dealing with ilocs.
2000-03-11 15:09:33 +00:00
Greg J. Badros
c209c88e54 *.[ch]: make a distinction between SCM as a generic
name for a Scheme object (now a void*), and SCM as 32 bit word for
storing tags and immediates (now a long int).  Introduced
SCM_ASWORD and SCM_ASSCM for conversion. Fixed various dubious
code in the process: arbiter.c (use macros), unif.c (scm_array_p),
2000-03-09 18:58:58 +00:00
Greg J. Badros
b6791b2e94 * error.h, error.c: Added `scm_wrong_type_arg_msg' to support
displaying the expected type.  Use SCM_LISTn in a couple places
instead of scm_cons-ing by hand.

* __scm.h: Added SCM_ASSERT_TYPE macro.

* validate.h, scm_validate.h: Added the former, as a renamed
version of the latter with SCM_ASSERT_TYPE used in
SCM_MAKE_VALIDATE (instead of just SCM_ASSERT)

* Makefile.am: Rename scm_validate.h to validate.h.

* *.c, *.h: Include validate.h, not scm_validate.h (old name's
prefix was superfluous).
2000-03-03 00:09:54 +00:00
Greg J. Badros
7866a09b5b * list.c: Moved append docs to append! Thanks Dirk Hermann. Also,
added append docs from R4RS.

* strings.c: Docstring typo fix, + eliminate unneeded IMP tests.
Thanks Dirk Hermann!

* chars.h: Provide SCM_CHARP, SCM_CHAR, SCM_MAKE_CHAR and
deprecate SCM_ICHRP, SCM_ICHR, SCM_MAKICHR.  Thanks Dirk Hermann!

* *.h, *.c: Use SCM_CHARP, SCM_CHAR, SCM_MAKE_CHAR throughout.
Drop use of SCM_P for function prototypes... assume an ANSI C
compiler.  Thanks Dirk Hermann!
2000-03-02 20:54:43 +00:00
Mikael Djurfeldt
b380b88547 * alist.c, chars.c, debug.c, dynl.c, dynwind.c, error.c, eval.c,
evalext.c, filesys.c, gc.c, hash.c, hashtab.c, ioext.c,
   keywords.c, list.c, load.c, macros.c, net_db.c, numbers.c,
   objprop.c, ports.c, posix.c, print.c, procprop.c, procs.c,
   ramap.c, regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c,
   stacks.c, stime.c, strings.c, strop.c, strports.c, struct.c,
   symbols.c, throw.c, unif.c, vectors.c, version.c, vports.c,
   weaks.c: Converted docstrings to ANSI C format.
2000-01-18 11:24:03 +00:00
Greg J. Badros
c1bfcf602b * scm_validate.h: Added SCM_NUM2LONG_DEF macro. Make
SCM_OUT_OF_RANGE use SCM_MAKINUM, not scm_long2num.  Added
SCM_COERCE_ROSTRING macro.  Added SCM_VALIDATE_NONEMPTYLIST
macro.  Fix SCM_VALIDATE_STRINGORSUBSTR macro to not use SLOPPY
variants.

* ports.c (scm_port_closed_p): Validate that the arg is a PORT,
then return whether it's an open port (was validating that it was
an open port -- this was a bug I introduced back in December, but
my careful reading of diffs caught it).

* numbers.c: Recombine the two conditional-compilation paths for
all the log* primitives -- they were split based on #ifndef
scm_long2num;  factored out a SCM_LOGOP_RETURN macro, and fixed
some bugs and inconsistencies in the two sets of implementations.
(scm_lognot) Fixed *atrocious* re-use of a SCM as an integer!

* ioext.c: Use SCM_ASSERT_RANGE in a couple places, and
SCM_VALIDATE_INUM_COPY once where it should've been used.

* fluids.c (scm_internal_with_fluids): Use
SCM_VALIDATE_LIST_COPYLEN.

* filesys.c: Use SCM_NUM2LONG instead of SCM_VALIDATE_INUM_COPY;
this is questionable as it relaxes type safety, but other changes
were useful and all SCM_NUM2LONG's should probably be
revisited. Use SCM_OUT_OF_RANGE, SCM_WRONG_TYPE_ARG.

* evalext.c: line-break change on 1 line.

* eval.c (nconc2last): Takes a non-empty list as its first
argument, not just a list.

* dynl.c: Use new SCM_COERCE_ROSTRING macro.
2000-01-12 01:51:18 +00:00
Greg J. Badros
70d6375376 * dynl.c, error.c, eval.c, feature.c, filesys.c, fports.c, list.c, load.c,
net_db.c, read.c, socket.c: Update error messages to use ~A for
%s, ~S for %S to work with new `simple-format' format and be
standardized better.

* print.h, print.c (scm_simple_format): Added `simple-format'
primitive.  It's the old scm_display_error, with ARGS now a rest
parameter, and the destination first instead of last (and a couple
new capabilities inspired by `format' -- #t as destination means
current-output-port, #f means return the formatted text as a
string.

* gh.h, gh_data.c, ports.h, ports.c: Added some missing const specifications.

* backtrace.c (scm_display_error_message): Rewrote to use
scm_simple_format() procedure.

* __scm.h: Added commented-out #define of GUILE_DEBUG_FREELIST
2000-01-11 18:48:57 +00:00
Gary Houston
f25f761dac * eval.c: define scm_unbound_variable_key ('unbound-variable).
scm_lookupcar1: throw an error with key 'unbound-variable instead
	of 'misc-error when an unbound variable is encountered.

	* filesys.c (scm_mkdir, scm_rmdir, scm_getcwd, scm_select,
	scm_symlink, scm_readlink, scm_lstat),
	posix.c (scm_setpgid, scm_setsid, scm_ctermid, scm_tcgetpgrp,
	scm_tcsetpgrp, scm_uname, scm_setlocale, scm_mknod, scm_nice,
	scm_sync),
	simpos.c (scm_system),
	stime.c (scm_times, scm_strptime):
	move the HAVE_XXX feature tests out of the procedure bodies.
	don't use SCM_SYSMISSING.
	scm_validate.h (SCM_SYSMISSING): removed.
	error.h, error.c (scm_sysmissing): comment that this is deprecated.
	see ChangeLog entry for 1999-12-28.
2000-01-09 13:41:53 +00:00
Greg J. Badros
3b3b36ddb7 * *.[ch]: Whitespace changes -- added space after SCM_VALIDATE_*
macros and SCM_DEFINE macros to match GNU coding standards.
2000-01-05 19:25:37 +00:00
Greg J. Badros
a1ec69163d *.[ch]: Replace GUILE_PROC w/ SCM_DEFINE. 2000-01-05 19:05:23 +00:00
Mikael Djurfeldt
6f13f9cb90 * eval.c (SCM_CEVAL): Optimization: Reverse order of
scm_stack_checking_enabled_p and SCM_STACK_OVERFLOW_P => speed
gain 4-6% for eval1 benchmark on one machine.  (Thanks to Brad
Knotwell.)
2000-01-04 17:43:18 +00:00
Greg J. Badros
cabe682ce6 * dynl-vms.c, debug.c, coop-threads.c, backtrace.c, eval.c: More
SCM_NIMP tests that were redundant are now eliminated.  Patches
from Dirk Hermann applied by hand.
2000-01-03 16:26:28 +00:00
Mikael Djurfeldt
7d2b68a85a * eval.c (SCM_CEVAL): Removed check for unbound slot in
SCM_IM_SLOT_REF.  (This is now handled in a smarter way in GOOPS.)
1999-12-18 03:19:06 +00:00