1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-25 20:50:31 +02:00
Commit graph

460 commits

Author SHA1 Message Date
Jim Blandy
c0ab1b8d03 Don't use GCC extensions to allocate space for debugging frames.
(Here he goes again!  Why do we put up with this?!)
* debug.h (scm_debug_frame): Make the 'vect' member a pointer to
an scm_debug_info structure, not an in-line array of them.  Add
'info' member, to say how many vect elements we've used, for eval
frames.
* eval.c (SCM_CEVAL): Use alloca to allocate space for vect.  Use
a new variable debug_info_end to mark the end of vect, instead of
the address of the 'info' pointer itself.
[DEVAL] (ENTER_APPLY, SCM_CEVAL, SCM_APPLY): Remove casts of
&debug to scm_debug_frame *; debug is a real scm_debug_frame now.
(SCM_APPLY): Explicitly allocate space for debug.vect.
* debug.c (scm_m_start_stack): Same, for vframe.vect.
* stacks.c: Adjusted for new debug frame structure.
(RELOC_INFO, RELOC_FRAME): New macros.
(stack_depth, read_frames): Use them, and new scm_debug_frame
element 'info', instead of magically knowing that eval frames have
an info pointer sitting after vect.
(scm_make_stack, scm_stack_id, scm_last_stack_frame): Use
RELOC_FRAME.
(scm_init_stacks): Formatting tweaks.
1996-12-19 07:55:42 +00:00
Jim Blandy
4d46a0279b *** empty log message *** 1996-12-18 21:42:26 +00:00
Jim Blandy
4dc2435aef In some cases, the code is fine, but GCC isn't smart enough to
figure that out; this usually happens when one variable is only
initialized and used when a particular condition holds true, and
we know that condition will never change within a given invocation
of the function.  In this case, we simply initialize the variables
to placate the compiler, hopefully to a value which will cause a
crash if it is ever actually used.
* print.c (scm_iprin1): Initialize mw_pos.
* read.c (scm_lreadrecparen): Initialize tl2, ans2.
* throw.c (scm_ithrow): Initialize dynpair.
* unif.c (scm_uniform_vector_ref): Initialize cra.
* struct.c (init_struct): Initialize prot.
* mbstrings.c (scm_print_mb_symbol): Initialize mw_pos and inc.
1996-12-18 21:42:09 +00:00
Jim Blandy
35de7ebe4a Give GCC more control flow information, so it can be sure that
variables aren't used uninitialized.
* error.h (scm_error, scm_syserror, scm_syserror_msg,
scm_sysmissing, scm_num_overflow, scm_out_of_range,
scm_wrong_num_args, scm_wrong_type_arg, scm_memory_error,
scm_misc_error): Tell GCC that these functions never return.
* struct.c (scm_struct_ref, scm_struct_set_x): If we can't figure
out the field type, call abort if SCM_ASSERT returns, to placate
the optimizer.
* stacks.c (scm_make_stack, scm_last_stack_frame): abort if
scm_wta ever returns.  We can't handle this case anyway, and this
gives the optimizer more information.
* unif.c (scm_uniform_vector_ref, scm_array_set_x): Abort if
scm_wta ever returns.

In some cases, the code is fine, but GCC isn't smart enough to
figure that out; this usually happens when one variable is only
initialized and used when a particular condition holds true, and
we know that condition will never change within a given invocation
of the function.  In this case, we simply initialize the variables
to placate the compiler, hopefully to a value which will cause a
crash if it is ever actually used.
* print.c (scm_iprin1): Initialize mw_pos.
* read.c (scm_lreadrecparen): Initialize tl2, ans2.
* throw.c (scm_ithrow): Initialize dynpair.
* unif.c (scm_uniform_vector_ref): Initialize cra.
* struct.c (init_struct): Initialize prot.
* mbstrings.c (scm_print_mb_symbol): Initialize mw_pos and inc.
1996-12-18 21:41:44 +00:00
Jim Blandy
407775cb81 * strports.c (scm_eval_0str): Don't return uninitialized garbage
if EXPR contains no expressions.
1996-12-18 21:40:21 +00:00
Jim Blandy
3323ad081e Give GCC more control flow information, so it can be sure that
variables aren't used uninitialized.
* error.h (scm_error, scm_syserror, scm_syserror_msg,
scm_sysmissing, scm_num_overflow, scm_out_of_range,
scm_wrong_num_args, scm_wrong_type_arg, scm_memory_error,
scm_misc_error): Tell GCC that these functions never return.
* struct.c (scm_struct_ref, scm_struct_set_x): If we can't figure
out the field type, call abort if SCM_ASSERT returns, to placate
the optimizer.
* stacks.c (scm_make_stack, scm_last_stack_frame): abort if
scm_wta ever returns.  We can't handle this case anyway, and this
gives the optimizer more information.
* unif.c (scm_uniform_vector_ref, scm_array_set_x): Abort if
scm_wta ever returns.
1996-12-18 21:39:44 +00:00
Jim Blandy
1b306e1623 *** empty log message *** 1996-12-18 16:50:19 +00:00
Jim Blandy
2c8f214468 * eval.c, debug.h: Revert changes of Dec 16 and Nov 21. They
cause an infinite loop (???).  So much for the algebraic
equivalency of variable-sized arrays and alloca...
1996-12-18 16:45:03 +00:00
Marius Vollmer
e4bcd6d945 *** empty log message *** 1996-12-18 09:43:23 +00:00
Marius Vollmer
6064dcc69e * gc.c (SCM_MTRIGGER_HYSTERESIS): New memory management parameter.
(scm_must_malloc, scm_must_realloc): Added a hysteresis to the
rules for raising scm_mtrigger. Previously, unfortunate but not
unlikely circumstances could result in almost constant invokation
of the gc. Now, this situations should be less likely, but they
are not prevented completely.
1996-12-18 09:42:39 +00:00
Marius Vollmer
016e2ce1d0 * backtrace.c (scm_display_error): Bugfix: scm_procedure_p returns
a SCM boolean, not a C boolean.
1996-12-18 09:40:46 +00:00
Jim Blandy
5e06e4dbb5 *** empty log message *** 1996-12-17 21:24:20 +00:00
Jim Blandy
9ab5a13fc7 * numbers.c (scm_fuck): Procedure removed; looks like old test code.
* numbers.h: Prototype removed.
1996-12-17 21:24:03 +00:00
Jim Blandy
458917df95 *** empty log message *** 1996-12-17 21:21:19 +00:00
Jim Blandy
073621cd66 * numbers.c (scm_fuck): Procedure removed; looks like old test code. 1996-12-17 21:21:01 +00:00
Jim Blandy
0032595465 *** empty log message *** 1996-12-16 23:22:49 +00:00
Jim Blandy
4387795a11 * debug.h (scm_debug_frame): Change `vect' member from an in-line
array to a pointer, to match my Nov 21 change in eval.c.
1996-12-16 23:22:31 +00:00
Jim Blandy
4aff3ae213 *** empty log message *** 1996-12-16 22:18:23 +00:00
Jim Blandy
01e2a66d26 * ramap.c (scm_ra_sum, scm_ra_difference, scm_ra_product,
scm_ra_divide): Properly terminate statements passed as arguments
to IVDEP macros.  (Thanks to Bernard Urban.)
1996-12-16 22:17:57 +00:00
Jim Blandy
2210c32f67 * eval.c (SCM_CEVAL): Use alloca, not GCC's extensions for arrays
with non-constant sizes.  (Thanks to Bernard Urban.)
1996-12-16 22:17:29 +00:00
Mikael Djurfeldt
efcb39f2c8 *** empty log message *** 1996-12-14 14:50:24 +00:00
Mikael Djurfeldt
74f17710af Regenerated by automake-1.1l. 1996-12-14 14:46:02 +00:00
Mikael Djurfeldt
a8aa30d896 * * strports.c, strports.h: Make scm_eval_0str return the value of
the last expression evaluated (previously, it returned void).

*	* strports.c, strports.h: New function: scm_read_0str.  Does what
	it sounds like.
1996-12-13 19:41:18 +00:00
Mikael Djurfeldt
dbe2648143 *** empty log message *** 1996-12-13 19:41:07 +00:00
Mikael Djurfeldt
a65b9c802e * strings.c (scm_string scm_make_string scm_string_ref
scm_string_set_x scm_string_equal_p scm_string_append):
Bugfix according to scm patch from Aubrey Jaffer:
Corrected long-standing
(not (eqv? (integer->char 128)
	   (string-ref (make-string 1 (integer->char 128)) 0)))
bug found by John Kozak <jk@noontide.demon.co.uk>.
1996-12-13 19:40:57 +00:00
Mikael Djurfeldt
dd2c906423 * libguile.h: Added #include "libguile/backtrace.h", #include
"libguile/stacks.h".
1996-12-13 19:40:45 +00:00
Mark Galassi
f9d81b6bcb updated the Makefile.in files with the right automake 1.1l 1996-12-13 02:50:04 +00:00
Mark Galassi
0fedd45c50 some more work on handlers for gh 1996-12-12 02:59:15 +00:00
Gary Houston
9373b38711 * simpos.c (scm_getenv): return #f if string can't be found in the
environment instead of throwing an exception, for compatibility
with numerous other systems.
1996-12-11 19:06:31 +00:00
Tom Tromey
adb75a4155 guile-snarf script once again used for creating .x files 1996-12-10 06:25:08 +00:00
Jim Blandy
52b60d44fb *** empty log message *** 1996-12-10 01:42:08 +00:00
Jim Blandy
f3acc5c15f * backtrace.c (scm_display_error_message): Made non-static, and
renamed from display_error_message.
* backtrace.h (scm_display_error_message): Added extern decl.
* throw.c (uncaught_throw): Use it to display the error message.
1996-12-10 01:41:37 +00:00
Jim Blandy
e82afdb843 Don't print extra newline. 1996-12-09 23:53:47 +00:00
Gary Houston
8588fa1267 * ioext.c (scm_sys_ftell): use scm_long2num instead of SCM_MAKINUM
to convert the returned value.
(scm_sys_fseek): use scm_num2long instead of SCM_INUM to convert
the offset argument.
1996-12-09 20:52:37 +00:00
Tom Tromey
5ce61f2470 Fixed erroneous use of #ifdef 1996-12-09 20:21:47 +00:00
Jim Blandy
f8d0b1924e Rebuilt from Makefile.am. 1996-12-09 02:22:44 +00:00
Jim Blandy
a73b898540 * Makefile.am (libpath.h): Re-incorporate Mikael's changes of Wed
Oct 30.
1996-12-09 02:20:11 +00:00
Jim Blandy
5b9ad5c2db *** empty log message *** 1996-12-09 02:16:35 +00:00
Jim Blandy
650fa1abe5 Add new interface to catch/throw, usable from C as well as
Scheme.
* throw.h (scm_catch_body_t, scm_catch_handler_t): New types.
(scm_internal_catch): New function, replaces...
(scm_catch_apply): Deleted.
* throw.c (scm_catch_apply): Deleted; replaced with a more general
mechanism which is a bit more code, but can be used nicely from C
and implement the Scheme semantics as well.
(scm_internal_catch): This is the replacement; it's named after
the analogous function in Emacs.
(scm_catch): Reimplemented in terms of the above.
(struct catch_body_data, catch_body, catch_handler): New
functions, used by scm_catch.
* root.c (cwdr): Reimplemented in terms of scm_internal_catch.
(struct cwdr_body_data, cwdr_body, cwdr_handler): New functions;
support for new cwdr.
1996-12-09 02:15:17 +00:00
Mark Galassi
10f74a138b little stuff 1996-12-08 20:28:36 +00:00
Marius Vollmer
0734d24657 *** empty log message *** 1996-12-08 17:14:42 +00:00
Marius Vollmer
f0cea46d8b * acconfig.h: Added DYNAMIC_LINKING symbol. 1996-12-08 17:10:34 +00:00
Marius Vollmer
abb2a7d007 * configure.in: Add option and checks for dynamic linking. 1996-12-08 17:06:38 +00:00
Marius Vollmer
496f55cd25 * Makefile.am (libguile_a_SOURCES):
Added "dynl.c".
(modinclude_HEADERS): Added "dynl.h".
(EXTRA_DIST): Added "dynl-dl.c", "dynl-dld.c", "dynl-shl.c" and
"dynl-vms.c".
1996-12-08 17:04:08 +00:00
Marius Vollmer
70122cd30d * init.c (scm_boot_guile_1): Call scm_init_dynamic_linking to
initialize dynamic linking support.

* init.c (scm_boot_guile_1): Moved `live' variable to the toplevel
(as we Schemers say). It needs to be global, so that I can tweak
it for the proper operation of unexec.
(scm_boot_guile_1_live): New variable, see above.
1996-12-08 16:57:16 +00:00
Marius Vollmer
1edae07624 Initial revision 1996-12-08 16:52:38 +00:00
Jim Blandy
a62ca5a1d3 Regenerated using patched automake-1.1k. 1996-12-08 06:21:24 +00:00
Mark Galassi
84da179fc3 some configuration fixes to get gtcltk to work for me 1996-12-07 04:25:26 +00:00
Tom Tromey
5b043bb2f3 Re-removed files restored after crash 1996-12-07 02:57:39 +00:00
Tom Tromey
733943b9d2 Changes to use automake-generated Makefile.ins everywhere 1996-12-03 05:34:34 +00:00