aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2012-05-04 21:05:12 -0400
committerGlenn Morris2012-05-04 21:05:12 -0400
commit51d58083d19efffd47f494c9dbf95aad32b0c07e (patch)
tree44aac32576b8c190aac93382f4e903caa31e3ebf
parentddff335186c805b3756cff110033fe118f548f17 (diff)
downloademacs-51d58083d19efffd47f494c9dbf95aad32b0c07e.tar.gz
emacs-51d58083d19efffd47f494c9dbf95aad32b0c07e.zip
* doc/lispref/compile.texi (Disassembly): Condense the examples.
-rw-r--r--doc/lispref/ChangeLog2
-rw-r--r--doc/lispref/compile.texi123
2 files changed, 53 insertions, 72 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index beaf0c0476b..64a64dc8230 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,5 +1,7 @@
12012-05-05 Glenn Morris <rgm@gnu.org> 12012-05-05 Glenn Morris <rgm@gnu.org>
2 2
3 * compile.texi (Disassembly): Condense the examples.
4
3 * eval.texi, functions.texi, loading.texi, macros.texi: 5 * eval.texi, functions.texi, loading.texi, macros.texi:
4 Where possible, use example rather than smallexample. 6 Where possible, use example rather than smallexample.
5 7
diff --git a/doc/lispref/compile.texi b/doc/lispref/compile.texi
index e6931aae016..06767a4a329 100644
--- a/doc/lispref/compile.texi
+++ b/doc/lispref/compile.texi
@@ -1,6 +1,6 @@
1@c -*-texinfo-*- 1@c -*-texinfo-*-
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990-1994, 2001-2012 Free Software Foundation, Inc. 3@c Copyright (C) 1990-1994, 2001-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5@setfilename ../../info/compile 5@setfilename ../../info/compile
6@node Byte Compilation, Advising Functions, Loading, Top 6@node Byte Compilation, Advising Functions, Loading, Top
@@ -638,41 +638,34 @@ Lisp source; these do not appear in the output of @code{disassemble}.
638@end group 638@end group
639 639
640@group 640@group
6410 varref integer ; @r{Get the value of @code{integer}} 6410 varref integer ; @r{Get the value of @code{integer} and}
642 ; @r{and push it onto the stack.} 642 ; @r{push it onto the stack.}
6431 constant 1 ; @r{Push 1 onto stack.} 6431 constant 1 ; @r{Push 1 onto stack.}
644@end group 644@end group
645
646@group 645@group
6472 eqlsign ; @r{Pop top two values off stack, compare} 6462 eqlsign ; @r{Pop top two values off stack, compare}
648 ; @r{them, and push result onto stack.} 647 ; @r{them, and push result onto stack.}
649@end group 648@end group
650
651@group 649@group
6523 goto-if-nil 1 ; @r{Pop and test top of stack;} 6503 goto-if-nil 1 ; @r{Pop and test top of stack;}
653 ; @r{if @code{nil}, go to 1,} 651 ; @r{if @code{nil}, go to 1, else continue.}
654 ; @r{else continue.} 6526 constant 1 ; @r{Push 1 onto top of stack.}
6556 constant 1 ; @r{Push 1 onto top of stack.} 6537 return ; @r{Return the top element of the stack.}
6567 return ; @r{Return the top element}
657 ; @r{of the stack.}
658@end group 654@end group
659
660@group 655@group
6618:1 varref integer ; @r{Push value of @code{integer} onto stack.} 6568:1 varref integer ; @r{Push value of @code{integer} onto stack.}
6629 constant factorial ; @r{Push @code{factorial} onto stack.} 6579 constant factorial ; @r{Push @code{factorial} onto stack.}
66310 varref integer ; @r{Push value of @code{integer} onto stack.} 65810 varref integer ; @r{Push value of @code{integer} onto stack.}
66411 sub1 ; @r{Pop @code{integer}, decrement value,} 65911 sub1 ; @r{Pop @code{integer}, decrement value,}
665 ; @r{push new value onto stack.} 660 ; @r{push new value onto stack.}
66612 call 1 ; @r{Call function @code{factorial} using} 66112 call 1 ; @r{Call function @code{factorial} using first}
667 ; @r{the first (i.e., the top) element} 662 ; @r{(i.e. top) stack element as argument;}
668 ; @r{of the stack as the argument;} 663 ; @r{push returned value onto stack.}
669 ; @r{push returned value onto stack.}
670@end group 664@end group
671
672@group 665@group
67313 mult ; @r{Pop top two values off stack, multiply} 66613 mult ; @r{Pop top two values off stack, multiply}
674 ; @r{them, and push result onto stack.} 667 ; @r{them, and push result onto stack.}
67514 return ; @r{Return the top element of stack.} 66814 return ; @r{Return the top element of the stack.}
676@end group 669@end group
677@end example 670@end example
678 671
@@ -694,70 +687,56 @@ The @code{silly-loop} function is somewhat more complex:
694 @print{} byte-code for silly-loop: 687 @print{} byte-code for silly-loop:
695 doc: Return time before and after N iterations of a loop. 688 doc: Return time before and after N iterations of a loop.
696 args: (n) 689 args: (n)
690@end group
697 691
6980 constant current-time-string ; @r{Push} 692@group
699 ; @r{@code{current-time-string}} 6930 constant current-time-string ; @r{Push @code{current-time-string}}
700 ; @r{onto top of stack.} 694 ; @r{onto top of stack.}
701@end group 695@end group
702
703@group 696@group
7041 call 0 ; @r{Call @code{current-time-string}} 6971 call 0 ; @r{Call @code{current-time-string} with no}
705 ; @r{with no argument,} 698 ; @r{argument, push result onto stack.}
706 ; @r{pushing result onto stack.}
707@end group 699@end group
708
709@group 700@group
7102 varbind t1 ; @r{Pop stack and bind @code{t1}} 7012 varbind t1 ; @r{Pop stack and bind @code{t1} to popped value.}
711 ; @r{to popped value.}
712@end group 702@end group
713
714@group 703@group
7153:1 varref n ; @r{Get value of @code{n} from} 7043:1 varref n ; @r{Get value of @code{n} from the environment}
716 ; @r{the environment and push} 705 ; @r{and push the value on the stack.}
717 ; @r{the value onto the stack.} 7064 sub1 ; @r{Subtract 1 from top of stack.}
7184 sub1 ; @r{Subtract 1 from top of stack.}
719@end group 707@end group
720
721@group 708@group
7225 dup ; @r{Duplicate the top of the stack;} 7095 dup ; @r{Duplicate top of stack; i.e. copy the top}
723 ; @r{i.e., copy the top of} 710 ; @r{of the stack and push copy onto stack.}
724 ; @r{the stack and push the} 7116 varset n ; @r{Pop the top of the stack,}
725 ; @r{copy onto the stack.} 712 ; @r{and bind @code{n} to the value.}
7266 varset n ; @r{Pop the top of the stack,} 713
727 ; @r{and bind @code{n} to the value.} 714;; @r{(In effect, the sequence @code{dup varset} copies the top of the stack}
728 715;; @r{into the value of @code{n} without popping it.)}
729 ; @r{In effect, the sequence @code{dup varset}}
730 ; @r{copies the top of the stack}
731 ; @r{into the value of @code{n}}
732 ; @r{without popping it.}
733@end group 716@end group
734 717
735@group 718@group
7367 constant 0 ; @r{Push 0 onto stack.} 7197 constant 0 ; @r{Push 0 onto stack.}
7378 gtr ; @r{Pop top two values off stack,} 7208 gtr ; @r{Pop top two values off stack,}
738 ; @r{test if @var{n} is greater than 0} 721 ; @r{test if @var{n} is greater than 0}
739 ; @r{and push result onto stack.} 722 ; @r{and push result onto stack.}
740@end group 723@end group
741
742@group 724@group
7439 goto-if-not-nil 1 ; @r{Goto 1 if @code{n} > 0} 7259 goto-if-not-nil 1 ; @r{Goto 1 if @code{n} > 0}
744 ; @r{(this continues the while loop)} 726 ; @r{(this continues the while loop)}
745 ; @r{else continue.} 727 ; @r{else continue.}
746@end group 728@end group
747
748@group 729@group
74912 varref t1 ; @r{Push value of @code{t1} onto stack.} 73012 varref t1 ; @r{Push value of @code{t1} onto stack.}
75013 constant current-time-string ; @r{Push @code{current-time-string}} 73113 constant current-time-string ; @r{Push @code{current-time-string}}
751 ; @r{onto top of stack.} 732 ; @r{onto the top of the stack.}
75214 call 0 ; @r{Call @code{current-time-string} again.} 73314 call 0 ; @r{Call @code{current-time-string} again.}
753@end group 734@end group
754
755@group 735@group
75615 unbind 1 ; @r{Unbind @code{t1} in local environment.} 73615 unbind 1 ; @r{Unbind @code{t1} in local environment.}
75716 list2 ; @r{Pop top two elements off stack,} 73716 list2 ; @r{Pop top two elements off stack, create a}
758 ; @r{create a list of them,} 738 ; @r{list of them, and push it onto stack.}
759 ; @r{and push list onto stack.} 73917 return ; @r{Return value of the top of stack.}
76017 return ; @r{Return value of the top of stack.}
761@end group 740@end group
762@end example 741@end example
763 742