summaryrefslogtreecommitdiff
path: root/doc/lispref/compile.texi
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2012-05-08 20:06:08 -0700
committerGlenn Morris <rgm@gnu.org>2012-05-08 20:06:08 -0700
commit666b903b912ca0aa2b1a034859b752b04f03141a (patch)
treeadd3234ca1ed7c2d5b18422b3f6982b34388d65b /doc/lispref/compile.texi
parent8f6b6da8ecdcd37ecbb83778d35baa02d68621a3 (diff)
parent0a454caf059b4cc050984a41decc2344cd9a083f (diff)
downloademacs-666b903b912ca0aa2b1a034859b752b04f03141a.tar.gz
Merge from emacs-24; up to 2012-04-21T14:12:27Z!sdl.web@gmail.com
Diffstat (limited to 'doc/lispref/compile.texi')
-rw-r--r--doc/lispref/compile.texi121
1 files changed, 50 insertions, 71 deletions
diff --git a/doc/lispref/compile.texi b/doc/lispref/compile.texi
index 8cebd9fade6..c1e0706bb43 100644
--- a/doc/lispref/compile.texi
+++ b/doc/lispref/compile.texi
@@ -637,41 +637,34 @@ Lisp source; these do not appear in the output of @code{disassemble}.
@end group
@group
-0 varref integer ; @r{Get the value of @code{integer}}
- ; @r{and push it onto the stack.}
-1 constant 1 ; @r{Push 1 onto stack.}
+0 varref integer ; @r{Get the value of @code{integer} and}
+ ; @r{push it onto the stack.}
+1 constant 1 ; @r{Push 1 onto stack.}
@end group
-
@group
-2 eqlsign ; @r{Pop top two values off stack, compare}
- ; @r{them, and push result onto stack.}
+2 eqlsign ; @r{Pop top two values off stack, compare}
+ ; @r{them, and push result onto stack.}
@end group
-
@group
-3 goto-if-nil 1 ; @r{Pop and test top of stack;}
- ; @r{if @code{nil}, go to 1,}
- ; @r{else continue.}
-6 constant 1 ; @r{Push 1 onto top of stack.}
-7 return ; @r{Return the top element}
- ; @r{of the stack.}
+3 goto-if-nil 1 ; @r{Pop and test top of stack;}
+ ; @r{if @code{nil}, go to 1, else continue.}
+6 constant 1 ; @r{Push 1 onto top of stack.}
+7 return ; @r{Return the top element of the stack.}
@end group
-
@group
-8:1 varref integer ; @r{Push value of @code{integer} onto stack.}
-9 constant factorial ; @r{Push @code{factorial} onto stack.}
-10 varref integer ; @r{Push value of @code{integer} onto stack.}
-11 sub1 ; @r{Pop @code{integer}, decrement value,}
- ; @r{push new value onto stack.}
-12 call 1 ; @r{Call function @code{factorial} using}
- ; @r{the first (i.e., the top) element}
- ; @r{of the stack as the argument;}
- ; @r{push returned value onto stack.}
+8:1 varref integer ; @r{Push value of @code{integer} onto stack.}
+9 constant factorial ; @r{Push @code{factorial} onto stack.}
+10 varref integer ; @r{Push value of @code{integer} onto stack.}
+11 sub1 ; @r{Pop @code{integer}, decrement value,}
+ ; @r{push new value onto stack.}
+12 call 1 ; @r{Call function @code{factorial} using first}
+ ; @r{(i.e. top) stack element as argument;}
+ ; @r{push returned value onto stack.}
@end group
-
@group
-13 mult ; @r{Pop top two values off stack, multiply}
- ; @r{them, and push result onto stack.}
-14 return ; @r{Return the top element of stack.}
+13 mult ; @r{Pop top two values off stack, multiply}
+ ; @r{them, and push result onto stack.}
+14 return ; @r{Return the top element of the stack.}
@end group
@end example
@@ -693,70 +686,56 @@ The @code{silly-loop} function is somewhat more complex:
@print{} byte-code for silly-loop:
doc: Return time before and after N iterations of a loop.
args: (n)
+@end group
-0 constant current-time-string ; @r{Push}
- ; @r{@code{current-time-string}}
+@group
+0 constant current-time-string ; @r{Push @code{current-time-string}}
; @r{onto top of stack.}
@end group
-
@group
-1 call 0 ; @r{Call @code{current-time-string}}
- ; @r{with no argument,}
- ; @r{pushing result onto stack.}
+1 call 0 ; @r{Call @code{current-time-string} with no}
+ ; @r{argument, push result onto stack.}
@end group
-
@group
-2 varbind t1 ; @r{Pop stack and bind @code{t1}}
- ; @r{to popped value.}
+2 varbind t1 ; @r{Pop stack and bind @code{t1} to popped value.}
@end group
-
@group
-3:1 varref n ; @r{Get value of @code{n} from}
- ; @r{the environment and push}
- ; @r{the value onto the stack.}
-4 sub1 ; @r{Subtract 1 from top of stack.}
+3:1 varref n ; @r{Get value of @code{n} from the environment}
+ ; @r{and push the value on the stack.}
+4 sub1 ; @r{Subtract 1 from top of stack.}
@end group
-
@group
-5 dup ; @r{Duplicate the top of the stack;}
- ; @r{i.e., copy the top of}
- ; @r{the stack and push the}
- ; @r{copy onto the stack.}
-6 varset n ; @r{Pop the top of the stack,}
- ; @r{and bind @code{n} to the value.}
-
- ; @r{In effect, the sequence @code{dup varset}}
- ; @r{copies the top of the stack}
- ; @r{into the value of @code{n}}
- ; @r{without popping it.}
+5 dup ; @r{Duplicate top of stack; i.e. copy the top}
+ ; @r{of the stack and push copy onto stack.}
+6 varset n ; @r{Pop the top of the stack,}
+ ; @r{and bind @code{n} to the value.}
+
+;; @r{(In effect, the sequence @code{dup varset} copies the top of the stack}
+;; @r{into the value of @code{n} without popping it.)}
@end group
@group
-7 constant 0 ; @r{Push 0 onto stack.}
-8 gtr ; @r{Pop top two values off stack,}
- ; @r{test if @var{n} is greater than 0}
- ; @r{and push result onto stack.}
+7 constant 0 ; @r{Push 0 onto stack.}
+8 gtr ; @r{Pop top two values off stack,}
+ ; @r{test if @var{n} is greater than 0}
+ ; @r{and push result onto stack.}
@end group
-
@group
-9 goto-if-not-nil 1 ; @r{Goto 1 if @code{n} > 0}
- ; @r{(this continues the while loop)}
- ; @r{else continue.}
+9 goto-if-not-nil 1 ; @r{Goto 1 if @code{n} > 0}
+ ; @r{(this continues the while loop)}
+ ; @r{else continue.}
@end group
-
@group
-12 varref t1 ; @r{Push value of @code{t1} onto stack.}
+12 varref t1 ; @r{Push value of @code{t1} onto stack.}
13 constant current-time-string ; @r{Push @code{current-time-string}}
- ; @r{onto top of stack.}
-14 call 0 ; @r{Call @code{current-time-string} again.}
+ ; @r{onto the top of the stack.}
+14 call 0 ; @r{Call @code{current-time-string} again.}
@end group
-
@group
-15 unbind 1 ; @r{Unbind @code{t1} in local environment.}
-16 list2 ; @r{Pop top two elements off stack,}
- ; @r{create a list of them,}
- ; @r{and push list onto stack.}
-17 return ; @r{Return value of the top of stack.}
+15 unbind 1 ; @r{Unbind @code{t1} in local environment.}
+16 list2 ; @r{Pop top two elements off stack, create a}
+ ; @r{list of them, and push it onto stack.}
+17 return ; @r{Return value of the top of stack.}
@end group
@end example