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

21194 commits

Author SHA1 Message Date
Mikael Djurfeldt
c27659c87d Bugfix: arg-list --> args in error handler. 1996-10-17 23:56:31 +00:00
Mikael Djurfeldt
1bb961a353 *** empty log message *** 1996-10-17 23:43:30 +00:00
Mikael Djurfeldt
1c6cd8e85e * boot-9.scm (handle-system-error): Added hooks before-error-hook,
after-error-hook, before-backtrace-hook and after-backtrace-hook
to the error handler.  E.g.: fancy emacs support could plug into
these.
(save-stack): New function.  The stack is now made differently
depending on the stack id.  (The motivation is to make a better
choice regarding what stack frames to present to the user.)
(error-catching-loop): Stack handling code moved outside into
save-stack.
1996-10-17 23:43:23 +00:00
Mikael Djurfeldt
b210cb7399 Oops! 1996-10-17 23:43:00 +00:00
Mikael Djurfeldt
841076acf4 * backtrace.c (scm_display_error): Just a safety measure: Stacks
aren't created with zero length, but should such a strange
creature suddenly turn up...
1996-10-17 23:32:47 +00:00
Mikael Djurfeldt
6c1797119b * debug.c (scm_make_memoized): Made it available at scheme level.
(scm_unmemoize, scm_memoized_environment): Bugfix: Check for
SCM_NIMP before applying heavier predicates in argument checking.
(scm_local_eval): Also take memoized object as argument.
1996-10-17 23:32:40 +00:00
Mikael Djurfeldt
d043d8c221 * ports.c (scm_port_line_x, scm_port_column_x): New mutators. 1996-10-17 23:32:32 +00:00
Mikael Djurfeldt
7115d1e4dd * stacks.c: Improve selection of relevant stack frames when making
a stack object.  Introduce one level of indirection in the stack
object to make it possible to "narrow" to a certain region of the
stack.  This facilitates making use of more clever algorithms (not
implemented) for selecting relevant frames and gives a cleaner
design since selection of frames can be done independently of
extraction of frames from the real stack.
(scm_stack_id): Also take #t as argument which means look at
current stack.
1996-10-17 23:32:25 +00:00
Mikael Djurfeldt
c692c370d8 * stacks.h: In struct scm_stack: Turn field frames into a pointer.
Turn n_tail into an integer directly representing current number
of frames in stack.  Add field tail.
1996-10-17 23:32:15 +00:00
Gary Houston
d7189b4983 * Makefile.in (scm_files): add expect.scm.
* expect.scm: new file ported from guile-iii.
1996-10-17 23:21:10 +00:00
Gary Houston
35c5db8731 Second thoughts, keep handle-system-error but call it from
error-catching-loop.
1996-10-17 21:56:22 +00:00
Gary Houston
9a0d70e21e * boot-9.scm: remove handle-system-error, after moving the code into
error-catching-loop.
Don't set 'throw-handler-default property on error keys.
Just interpret (almost) any throw with 4 args as an error throw.
Delete some try-load stuff that was already commented out.
1996-10-17 21:45:04 +00:00
Jim Blandy
44cf1f0f8c Formatting niggles. 1996-10-16 22:29:19 +00:00
Mark Galassi
8a2c7b7170 added gh and removed lgh; modified other stuff to reflect the new gh_
prefix replacing the old lgh_ prefix.
1996-10-16 14:01:56 +00:00
Jim Blandy
aa9576adaf *** empty log message *** 1996-10-16 02:22:21 +00:00
Jim Blandy
0179ae48bf * variable.c (scm_make_variable): Make the name hint optional, as
documented.
(anonymous_variable_sym): Renamed from variable_sym.  All uses
changed.
1996-10-16 02:20:47 +00:00
Jim Blandy
8b718458f3 * boot-9.scm: Doc fixes.
(make-module): Rework for readability.
(make-root-module, make-scm-module): USES argument to make-module
should be '(), not #f.
1996-10-16 02:18:33 +00:00
Jim Blandy
d065b65fdb *** empty log message *** 1996-10-15 22:31:06 +00:00
Jim Blandy
b9d5d65460 * load.c (scm_primitive_load, scm_primitive_load_path): Renamed
from scm_sys_try_load and scm_sys_try_load_path.  The Scheme name
of scm_primitive_load_path was also changed to
"primitive-load-path", from "%try-load-path".  Callers changed.
We'd like to respect the convention that a function named
"try-mumble" should behave just like the function called "mumble",
but return #f instead of signalling some error.
* load.h: Rename prototypes.
1996-10-15 22:30:48 +00:00
Jim Blandy
352a1ccedb * boot-9.scm (try-load): %sys-load-path has been renamed to
primitive-load-path; adjust call here.
1996-10-15 22:29:46 +00:00
Jim Blandy
820bb96d3e *** empty log message *** 1996-10-15 21:57:15 +00:00
Jim Blandy
cf18adf033 * alist.c (scm_sloppy_assq, scm_sloppy_assv, scm_sloppy_assoc):
Don't crash when passed an improper list terminated by a
non-immediate value.
1996-10-15 21:56:27 +00:00
Mikael Djurfeldt
fcd69146b1 *** empty log message *** 1996-10-15 14:06:29 +00:00
Mikael Djurfeldt
c01c94bf26 *** empty log message *** 1996-10-15 12:27:01 +00:00
Mikael Djurfeldt
5f771ab149 * boot-9.scm ((signal-handler n)): Bugfix: Moved the recording of
the stack to the correct place: when it is decided to generate an
error-signal.
1996-10-15 12:26:49 +00:00
Mikael Djurfeldt
7bf80fd0e4 *** empty log message *** 1996-10-15 03:40:31 +00:00
Mikael Djurfeldt
bf685b6d20 * print.c (make_print_state, grow_print_state), print.h: Modified
the print state representation: Don't use a tail array for
recording of circular references.  Resizing of the print state
structure invalidates the print state pointer.  To avoid passing
around an indirect print state reference to all printing
functions, we instead let the print state reference a resizable
vector.
1996-10-15 03:40:21 +00:00
Jim Blandy
2a786759c1 *** empty log message *** 1996-10-15 00:14:14 +00:00
Jim Blandy
14d1400fa7 Allocate data for structures on an eight-byte boundary, as
required by the tagging system.
* struct.c (alloc_struct): New function.
(scm_make_struct, scm_make_vtable_vtable): Call it.
* struct.h (scm_struct_n_extra_words): Bump to 3.
(scm_struct_i_ptr): New "field".
* gc.c (scm_gc_sweep): When we need to free the data, use the
information stored by alloc_struct to find the beginning of the
block allocated to the structure, so we can free it.
1996-10-15 00:10:59 +00:00
Mikael Djurfeldt
2dfc85c018 *** empty log message *** 1996-10-14 20:29:16 +00:00
Mikael Djurfeldt
4cdee789b7 * boot-9.scm (error-catching-loop, signal-handler,
handle-system-error): Backtracing now works for signals aswell;
Backtracing mechanism can now identify the stack root created by
start-stack so that the user isn't exposed to system stack frames.
1996-10-14 20:28:39 +00:00
Mikael Djurfeldt
c6b8a41a55 * debug.c (scm_procedure_name): Try procedure property `name' for
compiled closures aswell.
1996-10-14 20:28:18 +00:00
Mikael Djurfeldt
473c250d0a * debug.h (SCM_VOIDFRAME, SCM_VOIDFRAMEP): New macros.
(scm_debug_info): New member: id.
1996-10-14 20:28:13 +00:00
Mikael Djurfeldt
38bd0b3b0e * eval.c: scm_i_name moved to gsubr.c
(scm_m_define): Record names of all kinds of procedure
objects.  (Earlier, only closures were recorded.)
1996-10-14 20:28:08 +00:00
Mikael Djurfeldt
8960e0a0c4 * gc.c (scm_init_storage): Initialize scm_stand_in_procs to SCM_EOL. 1996-10-14 20:27:51 +00:00
Mikael Djurfeldt
abae3119ee * eval.c: scm_i_name moved to gsubr.c
(scm_m_define): Record names of all kinds of procedure
objects.  (Earlier, only closures were recorded.)

* gsubr.c: Added global scm_i_name.  Added #include "procprop.h".
(scm_make_gsubr): Record names of compiled closures.
1996-10-14 20:27:45 +00:00
Mikael Djurfeldt
7439c0b988 * init.c (scm_boot_guile_1): Moved scm_init_struct in front of
scm_init_stacks.
1996-10-14 20:27:39 +00:00
Mikael Djurfeldt
e1bd234308 * procprop.h: Added declaration of scm_i_name.
* gsubr.c: Added global scm_i_name.  Added #include "procprop.h".
(scm_make_gsubr): Record names of compiled closures.
1996-10-14 20:27:20 +00:00
Mikael Djurfeldt
66f45472b5 * stacks.c: Stacks are now represented as structs; Stacks have an
id given to them by `start-stack'.
(scm_last_stack_frame): Added predicates `stack?' and `frame?'.
1996-10-14 20:27:14 +00:00
Mikael Djurfeldt
b902ec8513 * stacks.h: Added declarations of scm_stack_p and scm_frame_p;
Changed stack representation.
1996-10-14 20:27:07 +00:00
Mikael Djurfeldt
84d8ad9726 *** empty log message *** 1996-10-14 04:08:01 +00:00
Mikael Djurfeldt
bf05754893 * Makefile.in: Added threads.scm. 1996-10-14 04:07:53 +00:00
Mikael Djurfeldt
294d380662 *** empty log message *** 1996-10-14 03:44:37 +00:00
Mikael Djurfeldt
4f0292cfdb *** empty log message *** 1996-10-14 03:28:57 +00:00
Mikael Djurfeldt
6d2388ee6c * debug.scm (make-enable, make-disable): Simplified. 1996-10-14 03:28:35 +00:00
Mikael Djurfeldt
9b7def6677 * boot-9.scm: Renamed %%throw-handler-default -->
throw-handler-default.
((handle-system-error key . arg-list)): Changed the way errors are
reported.
((scm-style-repl)): Wrap up the call to eval in a start-stack
acro.
((error-catching-loop thunk)): Introduce a lazy-catch into
error-catching-loop so that the stack can be captured.
1996-10-14 03:28:26 +00:00
Mikael Djurfeldt
49bc24feca * symbols.c (scm_sym2ovcell): Fixed documentation. 1996-10-14 03:27:11 +00:00
Mikael Djurfeldt
02aa5a4c2f * init.c: Added #include "backtrace.h" and #include "stacks.h".
(scm_boot_guile_1): Added calls to scm_init_backtrace and
scm_init_stacks.

* Makefile.in: Added entries for new files: backtrace.c,
backtrace.h, stacks.c and stacks.h.
1996-10-14 03:26:57 +00:00
Mikael Djurfeldt
782d171cf0 * continuations.c, continuations.h, debug.c, gc.c, init.c, root.c,
stacks.c: Renamed regs --> scm_contregs.

* Makefile.in: Added entries for new files: backtrace.c,
backtrace.h, stacks.c and stacks.h.
1996-10-14 03:26:51 +00:00
Mikael Djurfeldt
34019bd652 * srcprop.c, srcprop.h: Made scm_i_filename, scm_i_copy,
scm_i_line, scm_i_column and scm_i_breakpoint global.
1996-10-14 03:26:44 +00:00