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.
(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.
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.
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.
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.
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.
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.
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.
(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.
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.
(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.