comparison man/lispref/compile.texi @ 5791:9fae6227ede5

Silence texinfo 5.2 warnings, primarily by adding next, prev, and up pointers to all nodes. See xemacs-patches message with ID <5315f7bf.sHpFD7lXYR05GH6E%james@xemacs.org>.
author Jerry James <james@xemacs.org>
date Thu, 27 Mar 2014 08:59:03 -0600
parents a46c5c8d6564
children
comparison
equal deleted inserted replaced
5790:dcf9067f26bb 5791:9fae6227ede5
48 * Compiled-Function Objects:: The data type used for byte-compiled functions. 48 * Compiled-Function Objects:: The data type used for byte-compiled functions.
49 * Disassembly:: Disassembling byte-code; how to read byte-code. 49 * Disassembly:: Disassembling byte-code; how to read byte-code.
50 * Different Behavior:: When compiled code gives different results. 50 * Different Behavior:: When compiled code gives different results.
51 @end menu 51 @end menu
52 52
53 @node Speed of Byte-Code 53 @node Speed of Byte-Code, Compilation Functions, Byte Compilation, Byte Compilation
54 @section Performance of Byte-Compiled Code 54 @section Performance of Byte-Compiled Code
55 55
56 A byte-compiled function is not as efficient as a primitive function 56 A byte-compiled function is not as efficient as a primitive function
57 written in C, but runs much faster than the version written in Lisp. 57 written in C, but runs much faster than the version written in Lisp.
58 Here is an example: 58 Here is an example:
93 93
94 In this example, the interpreted code required 18 seconds to run, 94 In this example, the interpreted code required 18 seconds to run,
95 whereas the byte-compiled code required 6 seconds. These results are 95 whereas the byte-compiled code required 6 seconds. These results are
96 representative, but actual results will vary greatly. 96 representative, but actual results will vary greatly.
97 97
98 @node Compilation Functions 98 @node Compilation Functions, Compilation Options, Speed of Byte-Code, Byte Compilation
99 @comment node-name, next, previous, up 99 @comment node-name, next, previous, up
100 @section The Compilation Functions 100 @section The Compilation Functions
101 @cindex compilation functions 101 @cindex compilation functions
102 102
103 You can byte-compile an individual function or macro definition with 103 You can byte-compile an individual function or macro definition with
280 defined with a body that calls @code{byte-code}, but in recent versions 280 defined with a body that calls @code{byte-code}, but in recent versions
281 of Emacs @code{byte-code} is only used to run isolated fragments of lisp 281 of Emacs @code{byte-code} is only used to run isolated fragments of lisp
282 code without an associated argument list. 282 code without an associated argument list.
283 @end defun 283 @end defun
284 284
285 @node Compilation Options 285 @node Compilation Options, Docs and Compilation, Compilation Functions, Byte Compilation
286 @section Options for the Byte Compiler 286 @section Options for the Byte Compiler
287 @cindex compilation options 287 @cindex compilation options
288 288
289 Warning: this node is a quick draft based on docstrings. There may be 289 Warning: this node is a quick draft based on docstrings. There may be
290 inaccuracies, as the docstrings occasionally disagree with each other. 290 inaccuracies, as the docstrings occasionally disagree with each other.
561 (warnings (+ unused-vars)) ; Do warn about unused bindings 561 (warnings (+ unused-vars)) ; Do warn about unused bindings
562 (file-format emacs19)) 562 (file-format emacs19))
563 @end example 563 @end example
564 @end defun 564 @end defun
565 565
566 @node Docs and Compilation 566 @node Docs and Compilation, Dynamic Loading, Compilation Options, Byte Compilation
567 @section Documentation Strings and Compilation 567 @section Documentation Strings and Compilation
568 @cindex dynamic loading of documentation 568 @cindex dynamic loading of documentation
569 569
570 Functions and variables loaded from a byte-compiled file access their 570 Functions and variables loaded from a byte-compiled file access their
571 documentation strings dynamically from the file whenever needed. This 571 documentation strings dynamically from the file whenever needed. This
624 use a special Lisp reader construct, @samp{#@@@var{count}}. This 624 use a special Lisp reader construct, @samp{#@@@var{count}}. This
625 construct skips the next @var{count} characters. It also uses the 625 construct skips the next @var{count} characters. It also uses the
626 @samp{#$} construct, which stands for ``the name of this file, as a 626 @samp{#$} construct, which stands for ``the name of this file, as a
627 string.'' It is best not to use these constructs in Lisp source files. 627 string.'' It is best not to use these constructs in Lisp source files.
628 628
629 @node Dynamic Loading 629 @node Dynamic Loading, Eval During Compile, Docs and Compilation, Byte Compilation
630 @section Dynamic Loading of Individual Functions 630 @section Dynamic Loading of Individual Functions
631 631
632 @cindex dynamic loading of functions 632 @cindex dynamic loading of functions
633 @cindex lazy loading 633 @cindex lazy loading
634 When you compile a file, you can optionally enable the @dfn{dynamic 634 When you compile a file, you can optionally enable the @dfn{dynamic
683 This immediately finishes loading the definition of @var{function} from 683 This immediately finishes loading the definition of @var{function} from
684 its byte-compiled file, if it is not fully loaded already. The argument 684 its byte-compiled file, if it is not fully loaded already. The argument
685 @var{function} may be a compiled-function object or a function name. 685 @var{function} may be a compiled-function object or a function name.
686 @end defun 686 @end defun
687 687
688 @node Eval During Compile 688 @node Eval During Compile, Compiled-Function Objects, Dynamic Loading, Byte Compilation
689 @section Evaluation During Compilation 689 @section Evaluation During Compilation
690 690
691 These features permit you to write code to be evaluated during 691 These features permit you to write code to be evaluated during
692 compilation of a program. 692 compilation of a program.
693 693
712 @code{(eval-when (compile eval) @dots{})}. Elsewhere, the Common Lisp 712 @code{(eval-when (compile eval) @dots{})}. Elsewhere, the Common Lisp
713 @samp{#.} reader macro (but not when interpreting) is closer to what 713 @samp{#.} reader macro (but not when interpreting) is closer to what
714 @code{eval-when-compile} does. 714 @code{eval-when-compile} does.
715 @end defmac 715 @end defmac
716 716
717 @node Compiled-Function Objects 717 @node Compiled-Function Objects, Disassembly, Eval During Compile, Byte Compilation
718 @section Compiled-Function Objects 718 @section Compiled-Function Objects
719 @cindex compiled function 719 @cindex compiled function
720 @cindex byte-code function 720 @cindex byte-code function
721 721
722 Byte-compiled functions have a special data type: they are 722 Byte-compiled functions have a special data type: they are
840 This function returns the domain of compiled-function object 840 This function returns the domain of compiled-function object
841 @var{function}, if any. The result will be a string or @code{nil}. 841 @var{function}, if any. The result will be a string or @code{nil}.
842 @xref{Domain Specification}. 842 @xref{Domain Specification}.
843 @end defun 843 @end defun
844 844
845 @node Disassembly 845 @node Disassembly, Different Behavior, Compiled-Function Objects, Byte Compilation
846 @section Disassembled Byte-Code 846 @section Disassembled Byte-Code
847 @cindex disassembled byte-code 847 @cindex disassembled byte-code
848 848
849 People do not write byte-code; that job is left to the byte compiler. 849 People do not write byte-code; that job is left to the byte compiler.
850 But we provide a disassembler to satisfy a cat-like curiosity. The 850 But we provide a disassembler to satisfy a cat-like curiosity. The
1073 @result{} nil 1073 @result{} nil
1074 @end group 1074 @end group
1075 @end example 1075 @end example
1076 1076
1077 1077
1078 @node Different Behavior 1078 @node Different Behavior, , Disassembly, Byte Compilation
1079 @section Different Behavior 1079 @section Different Behavior
1080 1080
1081 The intent is that compiled byte-code and the corresponding code 1081 The intent is that compiled byte-code and the corresponding code
1082 executed by the Lisp interpreter produce identical results. However, 1082 executed by the Lisp interpreter produce identical results. However,
1083 there are some circumstances where the results will differ. 1083 there are some circumstances where the results will differ.