diff options
| author | Glenn Morris | 2012-05-04 21:05:12 -0400 |
|---|---|---|
| committer | Glenn Morris | 2012-05-04 21:05:12 -0400 |
| commit | 51d58083d19efffd47f494c9dbf95aad32b0c07e (patch) | |
| tree | 44aac32576b8c190aac93382f4e903caa31e3ebf | |
| parent | ddff335186c805b3756cff110033fe118f548f17 (diff) | |
| download | emacs-51d58083d19efffd47f494c9dbf95aad32b0c07e.tar.gz emacs-51d58083d19efffd47f494c9dbf95aad32b0c07e.zip | |
* doc/lispref/compile.texi (Disassembly): Condense the examples.
| -rw-r--r-- | doc/lispref/ChangeLog | 2 | ||||
| -rw-r--r-- | doc/lispref/compile.texi | 123 |
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 @@ | |||
| 1 | 2012-05-05 Glenn Morris <rgm@gnu.org> | 1 | 2012-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 |
| 641 | 0 varref integer ; @r{Get the value of @code{integer}} | 641 | 0 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.} |
| 643 | 1 constant 1 ; @r{Push 1 onto stack.} | 643 | 1 constant 1 ; @r{Push 1 onto stack.} |
| 644 | @end group | 644 | @end group |
| 645 | |||
| 646 | @group | 645 | @group |
| 647 | 2 eqlsign ; @r{Pop top two values off stack, compare} | 646 | 2 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 |
| 652 | 3 goto-if-nil 1 ; @r{Pop and test top of stack;} | 650 | 3 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.} | 652 | 6 constant 1 ; @r{Push 1 onto top of stack.} |
| 655 | 6 constant 1 ; @r{Push 1 onto top of stack.} | 653 | 7 return ; @r{Return the top element of the stack.} |
| 656 | 7 return ; @r{Return the top element} | ||
| 657 | ; @r{of the stack.} | ||
| 658 | @end group | 654 | @end group |
| 659 | |||
| 660 | @group | 655 | @group |
| 661 | 8:1 varref integer ; @r{Push value of @code{integer} onto stack.} | 656 | 8:1 varref integer ; @r{Push value of @code{integer} onto stack.} |
| 662 | 9 constant factorial ; @r{Push @code{factorial} onto stack.} | 657 | 9 constant factorial ; @r{Push @code{factorial} onto stack.} |
| 663 | 10 varref integer ; @r{Push value of @code{integer} onto stack.} | 658 | 10 varref integer ; @r{Push value of @code{integer} onto stack.} |
| 664 | 11 sub1 ; @r{Pop @code{integer}, decrement value,} | 659 | 11 sub1 ; @r{Pop @code{integer}, decrement value,} |
| 665 | ; @r{push new value onto stack.} | 660 | ; @r{push new value onto stack.} |
| 666 | 12 call 1 ; @r{Call function @code{factorial} using} | 661 | 12 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 |
| 673 | 13 mult ; @r{Pop top two values off stack, multiply} | 666 | 13 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.} |
| 675 | 14 return ; @r{Return the top element of stack.} | 668 | 14 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 | ||
| 698 | 0 constant current-time-string ; @r{Push} | 692 | @group |
| 699 | ; @r{@code{current-time-string}} | 693 | 0 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 |
| 704 | 1 call 0 ; @r{Call @code{current-time-string}} | 697 | 1 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 |
| 710 | 2 varbind t1 ; @r{Pop stack and bind @code{t1}} | 701 | 2 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 |
| 715 | 3:1 varref n ; @r{Get value of @code{n} from} | 704 | 3: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.} | 706 | 4 sub1 ; @r{Subtract 1 from top of stack.} |
| 718 | 4 sub1 ; @r{Subtract 1 from top of stack.} | ||
| 719 | @end group | 707 | @end group |
| 720 | |||
| 721 | @group | 708 | @group |
| 722 | 5 dup ; @r{Duplicate the top of the stack;} | 709 | 5 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} | 711 | 6 varset n ; @r{Pop the top of the stack,} |
| 725 | ; @r{copy onto the stack.} | 712 | ; @r{and bind @code{n} to the value.} |
| 726 | 6 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 |
| 736 | 7 constant 0 ; @r{Push 0 onto stack.} | 719 | 7 constant 0 ; @r{Push 0 onto stack.} |
| 737 | 8 gtr ; @r{Pop top two values off stack,} | 720 | 8 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 |
| 743 | 9 goto-if-not-nil 1 ; @r{Goto 1 if @code{n} > 0} | 725 | 9 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 |
| 749 | 12 varref t1 ; @r{Push value of @code{t1} onto stack.} | 730 | 12 varref t1 ; @r{Push value of @code{t1} onto stack.} |
| 750 | 13 constant current-time-string ; @r{Push @code{current-time-string}} | 731 | 13 constant current-time-string ; @r{Push @code{current-time-string}} |
| 751 | ; @r{onto top of stack.} | 732 | ; @r{onto the top of the stack.} |
| 752 | 14 call 0 ; @r{Call @code{current-time-string} again.} | 733 | 14 call 0 ; @r{Call @code{current-time-string} again.} |
| 753 | @end group | 734 | @end group |
| 754 | |||
| 755 | @group | 735 | @group |
| 756 | 15 unbind 1 ; @r{Unbind @code{t1} in local environment.} | 736 | 15 unbind 1 ; @r{Unbind @code{t1} in local environment.} |
| 757 | 16 list2 ; @r{Pop top two elements off stack,} | 737 | 16 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.} | 739 | 17 return ; @r{Return value of the top of stack.} |
| 760 | 17 return ; @r{Return value of the top of stack.} | ||
| 761 | @end group | 740 | @end group |
| 762 | @end example | 741 | @end example |
| 763 | 742 | ||