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
Kevin Ryde
dd72382c32 (scm_input_error): Pass arg list parameter to scm_error_scm,
rather than SCM_EOL.  Needed by "Unknown # object" case in scm_lreadr.
2003-06-04 16:36:03 +00:00
Kevin Ryde
3ec52c513f *** empty log message *** 2003-06-04 16:14:37 +00:00
Kevin Ryde
e06beeadda (scm_max, scm_min): For inum, bignum and real, if other
operand is NaN, then return NaN.  Also avoid passing NaN to mpz_cmp_d.
2003-06-04 16:09:38 +00:00
Dirk Herrmann
d0624e391b * __scm.h, gc-card.c (SCM_DEBUG_DEBUGGER_SUPPORT,
SCM_DEBUG_DEBUGGING_SUPPORT): Renamed macro
	SCM_DEBUG_DEBUGGER_SUPPORT to SCM_DEBUG_DEBUGGING_SUPPORT and
	generalized it to apply not only to C level functions but also to
	scheme level functions.

	* debug.c, debug.h, eval.c (make-iloc, scm_make_iloc, iloc?,
	scm_iloc_p, dbg-make-iloc, scm_dbg_make_iloc, dbg-iloc?,
	scm_dbg_iloc_p): Moved functions scm_make_iloc, scm_iloc_p to
	eval.c, made them available under SCM_DEBUG_DEBUGGING_SUPPORT == 1
	only and renamed them to scm_dbg_make_iloc, scm_dbg_iloc_p,
	respectively.

	* deprecated.h, eval.c, eval.h (SCM_ILOC00, SCM_IDINC,
	SCM_IDSTMSK): Deprecated.  The macro definitions are moved from
	eval.h into eval.c and a copy is placed into deprecated.h.

	* eval.c, eval.h (SCM_MAKE_ILOC): Removed from eval.h and placed
	into eval.c. This definition was not part of the API in any
	officially released version of guile and thus does not need to go
	through a phase of deprecation.
2003-06-04 05:28:34 +00:00
Dirk Herrmann
e90c3a895d * deprecated.c, deprecated.h, eval.c, eval.h: Deprecated
scm_s_expression, scm_s_test, scm_s_body, scm_s_bindings,
	scm_s_variable, scm_s_clauses, scm_s_formals.  In eval.c the
	definitions are make static and renamed from scm_s_xxx to s_xxx.
	In deprecated.c the original definitions are copied.

	* deprecated.h, eval.c, eval: Deprecated SCM_EVALIM2, SCM_EVALIM,
	SCM_XEVAL and SCM_XEVALCAR.  The macro definitions are moved from
	eval.h into eval.c and a copy (slightly modified to work in user
	code) is placed into deprecated.h.

	* eval.c: Use the local static s_xxx definitions instead of the
	scm_s_xxx definitions throughout.
2003-06-02 20:54:21 +00:00
Dirk Herrmann
14b18ed6f5 This set of patches separates the representation of the cxr family
of functions (car, cdr etc.) from the dsubr family of functions
	(i. e. functions that take a double precision floating point
	argument).  Further, the algorithm for handling the cxr function
	is improved.

	* eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_1), numbers.c
	(scm_asinh, scm_acosh, scm_atanh, scm_truncate, scm_round, floor,
	ceil, sqrt, fabs, exp, log, sin, cos, tan, asin, acos, atan, sinh,
	cosh, tanh), objects.c (scm_class_of), procprop.c
	(scm_i_procedure_arity), ramap.c (scm_array_map_x), tags.h
	(scm_tc7_dsubr, scm_tcs_subrs): Introduce scm_tc7_dsubr as new
	typecode for the dsubr family of functions.

	* ramap.c (ramap_cxr, ramap_dsubr): Renamed ramap_cxr to
	ramap_dsubr.

	* eval.c (SCM_CEVAL, SCM_APPLY, call_cxr_1), pairs.c
	(scm_init_pairs): Make use of the (now usable) second cell element
	of a scm_tc7_cxr function to implement the cxr family of functions
	more efficiently.
2003-06-01 13:58:42 +00:00
Dirk Herrmann
2ca0d20720 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_0,
scm_trampoline_1, scm_trampoline_2): Postpone error cases to the
	end of an if-else-if-sequence of checks.
2003-05-31 07:38:04 +00:00
Dirk Herrmann
9a069bdd77 * eval.c (SCM_CEVAL): Improved readability of call-with-values
execution.  Generalize apply_closure to apply_proc and use that
	for call-with-values.
2003-05-30 14:36:56 +00:00
Dirk Herrmann
e910e9d2eb * eval.c (SCM_CEVAL): Avoid one level of indirection when applying
a non closure.
2003-05-30 11:04:57 +00:00
Stefan Jahn
1e498fbd0f 2003-05-30 Stefan Jahn <stefan@lkcc.org>
* configure.in: Checking for unsetenv().

2003-05-30  Stefan Jahn  <stefan@lkcc.org>

        * posix.c (s_scm_putenv): Use the new HAVE_UNSETENV
        appropriately for mingw32 hosts.

        * numbers.h: Defining copysign(), isnan() and finite() to
        be prefixed by a single '_' for mingw32 hosts.
2003-05-30 09:39:34 +00:00
Kevin Ryde
c47e2599cb *** empty log message *** 2003-05-30 00:28:04 +00:00
Kevin Ryde
713a425913 (z_negative_one): New variable.
(scm_init_numbers): Initialize it.
(scm_logcount): Use it and mpz_hamdist to count zeros for negatives.
2003-05-30 00:23:11 +00:00
Stefan Jahn
2e945bccca 2003-05-29 Stefan Jahn <stefan@lkcc.org>
* configure.in: Removed -lm check and added a cached check for
        __libc_stack_end to get it building for mingw32 hosts.

2003-05-29  Stefan Jahn  <stefan@lkcc.org>

        * win32-dirent.c: Use malloc() instead of scm_malloc().

        * stime.c (s_scm_strftime): Add a type cast to avoid compiler
        warning.

        * posix.c (s_scm_putenv): Disable use of unsetenv() for the
        mingw32 build.

        * modules.c (s_scm_module_import_interface): Renamed local
        variable interface to _interface.  Seems like 'interface'
        is a special compiler directive for the mingw32 compiler.

        * mkstemp.c: Provide prototype to avoid compiler warning.

        * load.c (s_scm_search_path): Fixed absolute and relative
        path detections for native Windows platforms.

        * gc.h, threads.h: Export some more symbols using SCM_API
	(necessary to build on mingw32).

        * gc-freelist.c ("s_scm_map_free_list",
        "s_scm_gc_set_debug_check_freelist_x"): Fixed use of FUNC_NAME.

        * fports.c (fport_fill_input): Disable use of
        fport_wait_for_input() on Win32 platforms.

        * filesys.c (s_scm_basename): Fixed __MINGW32__ code.

        * Makefile.am: Modified some rules for cross compiling.

2003-05-29  Stefan Jahn  <stefan@lkcc.org>

        * raw-ltdl.c: Some more modifications for mingw32 platforms.

2003-05-29  Stefan Jahn  <stefan@lkcc.org>

        * Makefile.am (libguile_srfi_srfi_1_la_LDFLAGS,
        libguile_srfi_srfi_4_la_LDFLAGS,
        libguile_srfi_srfi_13_14__la_LDFLAGS): Added the -no-undefined
        option for the mingw32 build.

2003-05-29  Stefan Jahn  <stefan@lkcc.org>

        * standalone/Makefile.am: Setup to build on mingw32.
2003-05-29 14:39:13 +00:00
Dirk Herrmann
ddd8f927d8 * libguile/eval.c (SCM_CEVAL): In case of an application, all checks
for a proper function object and the correct number of arguments are
	now performed in the application part of SCM_CEVAL.

	(scm_badformalsp):  Removed.

	* test-suite/tests/r5rs_pitfall.test: Test 2.1 now passes.
2003-05-25 07:50:23 +00:00
Dirk Herrmann
f8ba2197fa * deprecated.c (scm_read_and_eval_x): Fixed C99-ism. 2003-05-25 05:13:17 +00:00
Mikael Djurfeldt
a502595f05 (NUM2INTEGRAL): Avoid warning about conditional
always being false by inserting preprocessor conditional.  (Thanks
to Bruce Korb.)
2003-05-22 10:22:20 +00:00
Mikael Djurfeldt
79f55b7c6b * __scm.h (SCM_STACK_PTR): New macro. (Cast argument through
(void *) in order to avoid an aliasing warning; thanks to Bruce
Korb.)

* stackchk.h (SCM_STACK_OVERFLOW_P): Use SCM_STACK_PTR.

* threads.c (suspend, launch_thread, scm_threads_mark_stacks): Use
SCM_STACK_PTR.

* threads.c (scm_threads_mark_stacks): Bugfix: Changed
thread->base --> t->base.

* eval.c (SCM_CEVAL): Don't cast argument of SCM_STACK_OVERFLOW_P.
2003-05-22 09:16:33 +00:00
Marius Vollmer
8549458751 *** empty log message *** 2003-05-20 19:59:52 +00:00
Marius Vollmer
4abecea81c (scm_subr_entry, SCM_SUBR_DOC, scm_make_subr,
scm_make_subr_with_generic, scm_make_subr_opt,
scm_call_catching_errors, scm_make_smob_type_mfpe, scm_set_smob_mfpe,
scm_strprint_obj, scm_read_0str, scm_eval_0str, SCM_CHARS, SCM_UCHARS,
SCM_LENGTH): Re-added from the release_1_6 branch.  Some have been
slightly rewritten.  (scm_i_object_chars, scm_i_object_length): New,
to support SCM_CHARS, SCM_UCHARS, and SCM_LENTH.
2003-05-20 19:59:38 +00:00
Marius Vollmer
47dee22897 *** empty log message *** 2003-05-20 19:14:38 +00:00
Marius Vollmer
965445d4b3 (scm_makstr, scm_makfromstr, scm_variable_set_name_hint,
scm_builtin_variable, scm_internal_with_fluids, scm_make_gsubr,
scm_make_gsubr_with_generic, scm_create_hook, SCM_LIST0, SCM_LIST1,
SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5, SCM_LIST6, SCM_LIST7,
SCM_LIST8, SCM_LIST9, scm_listify, scm_sloppy_memq, scm_sloppy_memv,
scm_sloppy_member, scm_read_and_eval_x): Re-added from release_1_6
branch.
2003-05-20 19:14:20 +00:00
Dirk Herrmann
e681d1876f * eval.c (scm_m_do, unmemocopy, SCM_CEVAL): Reversed order of
names and inits in the memoized code of do.
2003-05-19 20:15:08 +00:00
Mikael Djurfeldt
7e59d9d437 (yyget_lineno, yyget_in, yyget_out, yyget_leng,
yyget_text, yyset_lineno, yyset_in, yyset_out, yyget_debug,
yyset_debug, yylex_destroy): Added prototypes (otherwise we'll get
a compilation error if error-on-warning is enabled).
2003-05-19 09:57:01 +00:00
Marius Vollmer
9950a42cc5 *** empty log message *** 2003-05-17 00:09:41 +00:00
Marius Vollmer
6d7c6cf491 Gobble up complete lines after a '#'. This
removes preprocessor directives from the snarfage that might
otherwise confuse us.  These directives appear when compiling with
"-g3", for example.
2003-05-17 00:06:30 +00:00
Han-Wen Nienhuys
26e6879536 add my surname 2003-05-15 23:02:48 +00:00
Han-Wen Nienhuys
0068984be5 (scm_finish_srcprop): use
scm_gc_register_collectable_memory()
(scm_make_srcprops): idem.
2003-05-15 22:48:20 +00:00
Han-Wen Nienhuys
131805f0cd (scm_gc_register_collectable_memory): avoid
wrap-around for scm_mtrigger
(scm_gc_register_collectable_memory): abort on overflowing
scm_mallocated().
2003-05-14 11:01:23 +00:00
Kevin Ryde
d4611024b6 *** empty log message *** 2003-05-12 23:21:37 +00:00
Kevin Ryde
b127c712ea (xmpz_cmp_d): New macro, handling infs if gmp doesn't.
(scm_num_eq_p, scm_less_p, scm_max, scm_min): Use it.
2003-05-12 23:16:43 +00:00
Mikael Djurfeldt
dfd03fb91b * backtrace.c (scm_display_error_message): Introduced fancy
printing with max level 7 and length 10.  (Purpose: avoid printing
gigantic objects in error messages.)

* print.c, print.h (scm_i_port_with_print_state): New function.

* print.c (scm_iprin1, scm_printer_apply,
scm_port_with_print_state): Use scm_i_port_with_print_state.
(scm_simple_format): Modified not to destroy print states.
(print_state_mutex): New mutex.
(scm_make_print_state, scm_free_print_state, scm_prin1):
Lock/unlock print_state_mutex.
2003-05-12 20:46:52 +00:00
Mikael Djurfeldt
7aaf8dc9f7 (SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK):
Use current names in definitions.
2003-05-12 16:29:45 +00:00
Kevin Ryde
d25e96a4b7 *** empty log message *** 2003-05-10 01:23:53 +00:00
Kevin Ryde
8c5b0afcbf (scm_gcd): In bignum/inum, don't pass yy==0 to mpz_gcd_ui
since we're only using the ulong return value, and x might not fit.
2003-05-10 00:20:05 +00:00
Kevin Ryde
2c57607ca8 (scm_integer_length): On negative bignums, adjust
mpz_sizeinbase to account for it looking at absolute value where we
want ones-complement.
2003-05-10 00:05:51 +00:00
Kevin Ryde
a4d9ffa1ed *** empty log message *** 2003-05-09 23:20:03 +00:00
Kevin Ryde
2b031f4f65 (scm_num_eq_p, scm_less_p): Don't pass NaN to mpz_cmp_d. 2003-05-09 23:14:35 +00:00
Dirk Herrmann
5bf6a6f0f3 * eval.c, eval.h, read.c, read.h (scm_sym_dot): Moved from eval to
read.  This will allow to make the definition in read.c static.
2003-05-06 20:17:26 +00:00
Dirk Herrmann
f58c472a84 * eval.c, eval.h, evalext.c, evalext.h (scm_m_undefine): Moved
from evalext to eval.  This will allow to make some of the
	definitions in eval.c static.
2003-05-06 20:05:04 +00:00
Kevin Ryde
90382aebf6 *** empty log message *** 2003-05-06 00:30:38 +00:00
Kevin Ryde
c78b590e56 (scm_logcount): Use mpz_com, not mpz_neg. 2003-05-05 23:01:30 +00:00
Kevin Ryde
9c4443d38c (scm_difference): In inum - bignum, handle negative inum. 2003-05-05 22:55:46 +00:00
Dirk Herrmann
3b88ed2a4d The purpose of this patch is to make guile's internal memoizers
distinguishable from memoizing macros created on the scheme level
	or from user provided primitive memoizing macros.  The reason is,
	that the internal memoizers are the only ones that are allowed to
	transform their scheme input into memoizer byte code, while all
	other memoizing macros may only transform scheme code into new
	scheme code.

	To achieve this, a new macro type 'builtin-macro!' is introduced.
	Currently, 'builtin-macro!'s are handled as memoizing macros, but
	this will change when the memoizer and executor are separated.

	* macros.[ch] (scm_i_makbimacro): New.

	* macros.h (SCM_BUILTIN_MACRO_P): New.

	* macros.c (macro_print, scm_macro_type): Support builtin-macro!s.

	* eval.c, goops.c: All of guile's primitive memoizing macros are
	primitive builtin-macros now.

	* eval.c (scm_macroexp, SCM_CEVAL): Make sure the primitive
	builtin-macros are handled equally to memoizing macros.
2003-05-04 08:36:56 +00:00
Marius Vollmer
9dd023e147 Doc fix for the usage of num2intergral. 2003-05-03 23:19:51 +00:00
Marius Vollmer
b0780eb1a9 *** empty log message *** 2003-05-03 22:10:05 +00:00
Marius Vollmer
ed6de6e9bd (scm_ithrow): Remove "asm volatile" hack. It used to work around a
bug in GCC 2.95.2 but is now a bug in itself.
2003-05-03 22:09:20 +00:00
Marius Vollmer
1cbf4fe9d5 *** empty log message *** 2003-05-01 23:14:02 +00:00
Marius Vollmer
97f28fa42b (scm_rstate, scm_rng, SCM_SLOPPY_CONSP, SCM_SLOPPY_NCONSP,
scm_tc7_ssymbol, scm_tc7_msymbol, scm_tcs_symbols): New.
2003-05-01 23:11:51 +00:00
Marius Vollmer
096ecbaf7d *** empty log message *** 2003-04-30 14:51:01 +00:00
Marius Vollmer
a0454d7215 (scm_protect_object, scm_unprotect_object, SCM_SETAND_CAR,
SCM_SETOR_CAR, SCM_SET_AND_CDR, SCM_SET_OR_CDR, SCM_FREEP, SCM_NFREEP,
SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16, SCM_GCCDR,
scm_remember, scm_the_root_module, scm_make_module,
scm_ensure_user_module, scm_load_scheme_module, scm_port,
scm_ptob_descriptor, scm_port_rw_active, scm_close_all_ports_except):
New.
2003-04-30 14:50:53 +00:00