mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 11:50:28 +02:00
Minor additional manual updates
* doc/ref/api-debug.texi (VM Hooks): Update for changes in VM hook API. * doc/ref/guile.texi: Update copyright years. * doc/ref/preface.texi (Contributors): Update.
This commit is contained in:
parent
a3b32f839b
commit
94e66d2384
3 changed files with 49 additions and 55 deletions
|
@ -1,6 +1,6 @@
|
||||||
@c -*-texinfo-*-
|
@c -*-texinfo-*-
|
||||||
@c This is part of the GNU Guile Reference Manual.
|
@c This is part of the GNU Guile Reference Manual.
|
||||||
@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2007, 2010, 2011, 2012, 2013, 2014
|
@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2007, 2010, 2011, 2012, 2013, 2014, 2018
|
||||||
@c Free Software Foundation, Inc.
|
@c Free Software Foundation, Inc.
|
||||||
@c See the file guile.texi for copying conditions.
|
@c See the file guile.texi for copying conditions.
|
||||||
|
|
||||||
|
@ -938,15 +938,15 @@ when running your program, or otherwise use the @code{call-with-vm} and
|
||||||
@code{set-vm-engine!} procedures to ensure that you are running in a VM
|
@code{set-vm-engine!} procedures to ensure that you are running in a VM
|
||||||
with the @code{debug} engine.
|
with the @code{debug} engine.
|
||||||
|
|
||||||
To digress, Guile's VM has 6 different hooks (@pxref{Hooks}) that can be
|
To digress, Guile's VM has 4 different hooks that can be fired at
|
||||||
fired at different times, which may be accessed with the following
|
different times. For implementation reasons, these hooks are not
|
||||||
procedures.
|
actually implemented with first-class Scheme hooks (@pxref{Hooks}); they
|
||||||
|
are managed using an ad-hoc interface.
|
||||||
|
|
||||||
The first argument of calls to these hooks is the frame in question.
|
VM hooks are called with one argument: the current frame.
|
||||||
@xref{Frames}. Some hooks may call their procedures with more
|
@xref{Frames}. Since these hooks may be fired very frequently, Guile
|
||||||
arguments. Since these hooks may be fired very frequently, Guile does a
|
does a terrible thing: it allocates the frames on the C stack instead of
|
||||||
terrible thing: it allocates the frames on the C stack instead of the
|
the garbage-collected heap.
|
||||||
garbage-collected heap.
|
|
||||||
|
|
||||||
The upshot here is that the frames are only valid within the dynamic
|
The upshot here is that the frames are only valid within the dynamic
|
||||||
extent of the call to the hook. If a hook procedure keeps a reference to
|
extent of the call to the hook. If a hook procedure keeps a reference to
|
||||||
|
@ -962,48 +962,44 @@ The interface to hooks is provided by the @code{(system vm vm)} module:
|
||||||
All of these functions implicitly act on the VM for the current thread
|
All of these functions implicitly act on the VM for the current thread
|
||||||
only.
|
only.
|
||||||
|
|
||||||
@deffn {Scheme Procedure} vm-next-hook
|
@deffn {Scheme Procedure} vm-add-next-hook! f
|
||||||
The hook that will be fired before an instruction is retired (and
|
Arrange to call @var{f} when before an instruction is retired (and
|
||||||
executed).
|
executed).
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Procedure} vm-push-continuation-hook
|
@deffn {Scheme Procedure} vm-add-apply-hook! f
|
||||||
The hook that will be fired after preparing a new frame. Fires just
|
Arrange to call @var{f} whenever a procedure is applied. The frame
|
||||||
before applying a procedure in a non-tail context, just before the
|
locals will be the callee, followed by the arguments to the call.
|
||||||
corresponding apply-hook.
|
|
||||||
@end deffn
|
|
||||||
|
|
||||||
@deffn {Scheme Procedure} vm-pop-continuation-hook
|
|
||||||
The hook that will be fired before returning from a frame.
|
|
||||||
|
|
||||||
This hook fires with a variable number of arguments, corresponding to
|
|
||||||
the values that the frame returns to its continuation.
|
|
||||||
@end deffn
|
|
||||||
|
|
||||||
@deffn {Scheme Procedure} vm-apply-hook
|
|
||||||
The hook that will be fired before a procedure is applied. The frame's
|
|
||||||
procedure will have already been set to the new procedure.
|
|
||||||
|
|
||||||
Note that procedure application is somewhat orthogonal to continuation
|
Note that procedure application is somewhat orthogonal to continuation
|
||||||
pushes and pops. A non-tail call to a procedure will result first in a
|
pushes and pops. To know whether a call is a tail call or not, with
|
||||||
firing of the push-continuation hook, then this application hook,
|
respect to the frame previously in place, check the value of the frame
|
||||||
whereas a tail call will run without having fired a push-continuation
|
pointer compared the previous frame pointer.
|
||||||
hook.
|
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Procedure} vm-abort-continuation-hook
|
@deffn {Scheme Procedure} vm-add-return-hook! f
|
||||||
The hook that will be called after aborting to a
|
Arrange to call @var{f} before returning from a frame. The values in
|
||||||
prompt. @xref{Prompts}.
|
the frame will be the frame's return values.
|
||||||
|
|
||||||
Like the pop-continuation hook, this hook fires with a variable number
|
Note that it's possible to return from an ``inner'' frame: one that was
|
||||||
of arguments, corresponding to the values that returned to the
|
not immediately proceeded by a call with that frame pointer. In that
|
||||||
continuation.
|
case, it corresponds to a non-local control flow jump, either because of
|
||||||
|
applying a composable continuation or because of restoring a saved
|
||||||
|
undelimited continuation.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Procedure} vm-restore-continuation-hook
|
@deffn {Scheme Procedure} vm-add-abort-hook!
|
||||||
The hook that will be called after restoring an undelimited
|
Arrange to call @var{f} after aborting to a prompt. @xref{Prompts}.
|
||||||
continuation. Unfortunately it's not currently possible to introspect on
|
|
||||||
the values that were given to the continuation.
|
Unfortunately, the values passed to the prompt handler are not easily
|
||||||
|
available to @var{f}.
|
||||||
|
@end deffn
|
||||||
|
|
||||||
|
@deffn {Scheme Procedure} vm-remove-next-hook! f
|
||||||
|
@deffnx {Scheme Procedure} vm-remove-apply-hook! f
|
||||||
|
@deffnx {Scheme Procedure} vm-remove-return-hook! f
|
||||||
|
@deffnx {Scheme Procedure} vm-remove-abort-hook! f
|
||||||
|
Remove @var{f} from the corresponding VM hook for the current thread.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@cindex VM trace level
|
@cindex VM trace level
|
||||||
|
|
|
@ -13,9 +13,8 @@
|
||||||
@copying
|
@copying
|
||||||
This manual documents Guile version @value{VERSION}.
|
This manual documents Guile version @value{VERSION}.
|
||||||
|
|
||||||
Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005, 2009,
|
Copyright (C) 1996-1997, 2000-2005, 2009-2018 Free Software Foundation,
|
||||||
2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Free Software
|
Inc.
|
||||||
Foundation, Inc.
|
|
||||||
|
|
||||||
Permission is granted to copy, distribute and/or modify this document
|
Permission is granted to copy, distribute and/or modify this document
|
||||||
under the terms of the GNU Free Documentation License, Version 1.3 or
|
under the terms of the GNU Free Documentation License, Version 1.3 or
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
@c -*-texinfo-*-
|
@c -*-texinfo-*-
|
||||||
@c This is part of the GNU Guile Reference Manual.
|
@c This is part of the GNU Guile Reference Manual.
|
||||||
@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2010, 2011
|
@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2010, 2011, 2018
|
||||||
@c Free Software Foundation, Inc.
|
@c Free Software Foundation, Inc.
|
||||||
@c See the file guile.texi for copying conditions.
|
@c See the file guile.texi for copying conditions.
|
||||||
|
|
||||||
|
@ -25,10 +25,9 @@ identify individuals of whom to say ``yes, this person, she wrote the
|
||||||
manual.''
|
manual.''
|
||||||
|
|
||||||
Still, among the many contributions, some caretakers stand out. First
|
Still, among the many contributions, some caretakers stand out. First
|
||||||
among them is Neil Jerram, who has been working on this document for ten
|
among them is Neil Jerram, who has worked on this document for over ten
|
||||||
years now. Neil's attention both to detail and to the big picture have
|
years. Neil's attention both to detail and to the big picture have made
|
||||||
made a real difference in the understanding of a generation of Guile
|
a real difference in the understanding of a generation of Guile hackers.
|
||||||
hackers.
|
|
||||||
|
|
||||||
Next we should note Marius Vollmer's effect on this document. Marius
|
Next we should note Marius Vollmer's effect on this document. Marius
|
||||||
maintained Guile during a period in which Guile's API was
|
maintained Guile during a period in which Guile's API was
|
||||||
|
@ -41,12 +40,12 @@ the documentation of Scheme data types, control mechanisms and
|
||||||
procedures. In addition, he wrote the documentation for Guile's SRFI
|
procedures. In addition, he wrote the documentation for Guile's SRFI
|
||||||
modules and modules associated with the Guile REPL.
|
modules and modules associated with the Guile REPL.
|
||||||
|
|
||||||
Ludovic Court@`es and Andy Wingo, the Guile maintainers at the time of
|
Ludovic Court@`es and Andy Wingo, who co-maintain Guile since 2010,
|
||||||
this writing (late 2010), have also made their dent in the manual,
|
along with Mark Weaver, have also made their dent in the manual, writing
|
||||||
writing documentation for new modules and subsystems in Guile 2.0. They
|
documentation for new modules and subsystems that arrived with Guile
|
||||||
are also responsible for ensuring that the existing text retains its
|
2.0. Ludovic, Andy, and Mark are also responsible for ensuring that the
|
||||||
relevance as Guile evolves. @xref{Reporting Bugs}, for more information
|
existing text retains its relevance as Guile evolves. @xref{Reporting
|
||||||
on reporting problems in this manual.
|
Bugs}, for more information on reporting problems in this manual.
|
||||||
|
|
||||||
The content for the first versions of this manual incorporated and was
|
The content for the first versions of this manual incorporated and was
|
||||||
inspired by documents from Aubrey Jaffer, author of the SCM system on
|
inspired by documents from Aubrey Jaffer, author of the SCM system on
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue