summaryrefslogtreecommitdiff
path: root/doc/ref/vm.texi
diff options
context:
space:
mode:
Diffstat (limited to 'doc/ref/vm.texi')
-rw-r--r--doc/ref/vm.texi8
1 files changed, 7 insertions, 1 deletions
diff --git a/doc/ref/vm.texi b/doc/ref/vm.texi
index 03356c724..9936ad97d 100644
--- a/doc/ref/vm.texi
+++ b/doc/ref/vm.texi
@@ -1,6 +1,6 @@
@c -*-texinfo-*-
@c This is part of the GNU Guile Reference Manual.
-@c Copyright (C) 2008,2009,2010
+@c Copyright (C) 2008,2009,2010,2013
@c Free Software Foundation, Inc.
@c See the file guile.texi for copying conditions.
@@ -772,6 +772,7 @@ list. The list is then assigned to the @var{idx}th local variable.
@end deffn
@deffn Instruction bind-optionals/shuffle nreq nreq-and-opt ntotal
+@deffnx Instruction bind-optionals/shuffle-or-br nreq nreq-and-opt ntotal offset
Shuffle keyword arguments to the top of the stack, filling in the holes
with @code{SCM_UNDEFINED}. Each argument is encoded over two bytes.
@@ -783,6 +784,11 @@ the @var{nreq}th argument up to the @var{nreq-and-opt}th, and start
shuffling when it sees the first keyword argument or runs out of
positional arguments.
+@code{bind-optionals/shuffle-or-br} does the same, except that it checks
+if there are too many positional arguments before shuffling. If this is
+the case, it jumps to @var{offset}, encoded using the normal three-byte
+encoding.
+
Shuffling simply moves the keyword arguments past the total number of
arguments, @var{ntotal}, which includes keyword and rest arguments. The
free slots created by the shuffle are filled in with