it anyway because 1. it is very useful, and, 2. you can start
making it less premature by complaining to me and by modifying
the source! :-)
(trace): Given one or more procedure objects, trace each one.
Given no arguments, show all traced procedures.
(untrace): Given one or more procedure objects, untrace each one.
Given no arguments, untrace all traced procedures. The tracing in
Guile have an advantage to most other systems: We don't create new
procedure objects, but mark the procedure objects themselves.
This means that also anonymous and internal procedures can be
traced.
* boot-9.scm (error-catching-loop): Added handling of apply-frame
and exit-frame exceptions.
* * boot-9.scm (assert-repl-prompt, the-prompt-string): Removed.
(set-repl-prompt!): Setter for repl prompt.
(scm-style-repl): If prompt is #f, don't prompt; if prompt is a
string, display it; if prompt is a thunk, call it and display its
result; otherwise display "> ".
(Change suggested by Roland Orre <orre@nada.kth.se>.)
`module-defined?', since the module system isn't bootstrapped when
we load r4rs.scm. This is just a temporary fix to make the
repository version runnable.
recording of source code positions. This was placed there for our
convenience, but it has already sneaked into the distribution
once... so we'd better add this in our local copies instead when
we need it. (These options are normally enabled at the end of
boot-9.scm when loading the debug module.)
(macroexpand-1, macroexpand): Use local-ref instead of defined?
and eval.
* r4rs.scm (%load-verbosely): Use "module-defined?" instead of
"defined?".
* slib.scm (defined?): New function to take the place of the
builtin "defined?". It allways examines the slib module.
source files that are not always included in libguile but should
have their dependencies calculated by automake. This variable is
recognized by automake, no further magic is needed.
(libguile_la_DEPENDENCIES): Changed to @LIBLOBJS@. Libtool wants
to deal exclusively with *.lo files, as it seems. The *.o files
are built automatically when the corresponding *.lo file gets
built.
inet_aton.c, srcprop.c, stacks.c, and strerror.c from this list.
They should only be included in the library at configure.in's
discretion.
(libguile_la_LDADD): Include the appropriate .lo files here.
(libguile_la_DEPENDENCIES): List the corresponding .o files here,
so we know when to build them (and their .lo bretheren).
* configure.in (LIBLOBJS): New substituted variable. We let
configure decide which .o files to include in LIBOBJS, and then
put the corresponding list of .lo files in LIBLOBJS. The latter
is what we pass to libtool.
* Makefile.in, configure: regenerated.
* gh_init.c (gh_catch): fixed stupid bug, gh_catch() was not
returning anything.
* gh_data.c (gh_scm2newstr): Renamed gh_scm2str0() to
gh_scm2newstr(), and did away with the str0 convention (it doesn't
seem to belong in gh_).
(gh_scm2str): this function now copies Scheme data to a
pre-allocated C string.
old scm_sysintern but doesn't take a second value argument.
(scm_sysintern): Now uses scm_sysintern0.
(scm_sysintern_no_module_lookup): Renamed to
scm_sysintern0_no_module_lookup and doesn't take a second value
argument any longer.
* symbols.h (scm_sysintern0: Added declaration.
* options.c (scm_init_opts): Use scm_sysintern0 instead of
scm_sysintern when interning option keys. Otherwise we risk
destroying the values of already interned variables.
* symbols.c (scm_sym2vcell): Bugfix: Treat definedp as
scheme-level boolean (use SCM_NFALSEP).
* backtrace.c (scm_init_backtrace): Make Scheme-level variable
`the-last-stack'.
(scm_backtrace): New function. (C version of old function from
boot-9.scm) Motivation: Make it possible to display backtraces
without depending on boot-9.scm. (I'm uncertain if this
motivation is good enough...)
* root.h (scm_root_state): Add member the_last_stack_var.
(scm_the_stack_var): Defined to scm_root->the_last_stack_var.
* root.c (mark_root): Mark scm_the_last_stack_var.
* init.c (scm_start_stack): Initialize scm_the_last_stack_var to
SCM_BOOL_F.
1. mark_lazy_catch didn't mark the smob.
2. Both functions above have standard variants:
(lazy_catch_funs): Changed mark_lazy_catch --> scm_mark0,
free_lazy_catch --> scm_free0.
(scm_lazy_catch): Rewritten to use it.
(scm_ithrow): Handle the new lazy catch representation.
Use SCM_LAZY_CATCH_P, instead of assuming that any wind list entry
that doesn't have a jmpbuf is a lazy catch clause.
(tc16_lazy_catch, struct lazy_catch, mark_lazy_catch,
free_lazy_catch, print_lazy_catch, lazy_catch_funs,
make_lazy_catch, SCM_LAZY_CATCH_P): Support funs, including a new
smob.
(scm_init_throw): Register the new lazy-catch smob type.
* throw.h (scm_internal_lazy_catch): decl for new function.
(scm_lazy_catch): Rewritten to use it.
(scm_ithrow): Handle the new lazy catch representation.
Use SCM_LAZY_CATCH_P, instead of assuming that any wind list entry
that doesn't have a jmpbuf is a lazy catch clause.
(tc16_lazy_catch, struct lazy_catch, mark_lazy_catch,
free_lazy_catch, print_lazy_catch, lazy_catch_funs,
make_lazy_catch, SCM_LAZY_CATCH_P): Support funs, including a new
smob.
(scm_init_throw): Register the new lazy-catch smob type.
* throw.h (scm_internal_lazy_catch): decl for new function.
* throw.c (scm_internal_catch): Doc fixes.
configure.in. Including this might cause problems if applications
that link against libguile include their own copies of alloca, but
if they're using autoconf, they should be adding libguile to LIBS
before calling AC_FUNC_ALLOCA anyway, in which case they'll find
the copy in libguile, and things will be okay. (I think.)
unif.c.
strop.h: move prototypes too.
* posix.c (scm_init_posix): don't intern EINTR since it's now done
elsewhere.
* ioext.c (scm_init_ioext): don't intern stat macros, S_IRUSR
etc. I deleted them from filesys.c long ago, but didn't
notice they were here too (although ineffective since
sys/stat.h wasn't included).
(SCM_CEVAL, SCM_APPLY): Call it, instead of setjmp, to make sure
that values of automatic variables are preserved. See comments
for safe_setjmp for details.