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

1862 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
9696316685 Regenerated by aclocal 1.1l 1996-12-18 21:58:24 +00:00
Jim Blandy
2bb21d9358 rebuilt 1996-12-18 21:56: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
Mark Galassi
22c7f3c838 little stuff in docs 1996-12-18 00:38:36 +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
faefae8409 Regenerated with automake1.1l. 1996-12-14 14:42:02 +00:00
Mikael Djurfeldt
f04ad11c0f Regenerated using automake-1.1l. 1996-12-13 20:04:30 +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
a1d5d83adc updating 1996-12-13 15:11:40 +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
0871d40773 working on gh_catch examples 1996-12-13 02:01:23 +00:00
Mark Galassi
0fedd45c50 some more work on handlers for gh 1996-12-12 02:59:15 +00:00
Gary Houston
0a67c27a79 * scsh: new directory. 1996-12-12 00:18:36 +00:00
Gary Houston
00f06035f1 * slib.scm (slib-parent-dir): throw error if #f returned from
%search-load-path.
1996-12-12 00:16:05 +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
85e02c55a9 updated to automake 1.1l 1996-12-10 07:31:57 +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
Jim Blandy
41de7f36dd *** empty log message *** 1996-12-09 23:26:39 +00:00
Jim Blandy
8add7d5de8 Rebuilt in honor of changes to ../configure.in. 1996-12-09 23:26:23 +00:00
Jim Blandy
b2b965ad5c We need to name the object files produced from the
machine-dependent C and assembler files qtmds.o and qtmdc.o, but
using -c and -o together on the cc command line isn't portable.
* configure.in: Generate the names of the .o files here, and
substitute them into Makefile.
* Makefile.am (qtmds.o, qtmdc.o): Let CC name them what it wants,
and then rename them when it's done.
(configure, Makefile.in): Regenerated.
1996-12-09 23:25:22 +00:00
Anthony Green
9855b7a8cc * Makefile.am: Added missing -c options for qtmds.o and qrmdc.o. 1996-12-09 22:09:59 +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
Mark Galassi
11599e6b9c some work on guile-programmer 1996-12-09 16:19:03 +00:00