diff options
author | Andy Wingo <wingo@pobox.com> | 2018-09-30 16:08:40 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2018-09-30 16:08:40 +0200 |
commit | 4e8d27f0d1d08b32cd5c15e50af67de37d917c7e (patch) | |
tree | 79062ed34fe4f8de099a27a26bf021a8e70ba98e /doc/ref/compiler.texi | |
parent | 4c53593bbef29e90a2a43a870e951c8d8f7d5c37 (diff) | |
download | guile-4e8d27f0d1d08b32cd5c15e50af67de37d917c7e.tar.gz |
Finish updating vm.texi
* doc/ref/compiler.texi (Bytecode): Update macro-assembler instructions,
and move most of them to the instruction set reference.
* doc/ref/vm.texi (A Virtual Machine for Guile, VM Programs): Minor
fixes.
(Instruction Set): Update for Guile 3 instruction set.
* libguile/vm-engine.c (vm_engine): Update a few instruction
docstrings.
Diffstat (limited to 'doc/ref/compiler.texi')
-rw-r--r-- | doc/ref/compiler.texi | 39 |
1 files changed, 12 insertions, 27 deletions
diff --git a/doc/ref/compiler.texi b/doc/ref/compiler.texi index 057ebe817..7cff3cb55 100644 --- a/doc/ref/compiler.texi +++ b/doc/ref/compiler.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Guile Reference Manual. -@c Copyright (C) 2008-2016 +@c Copyright (C) 2008-2016, 2018 @c Free Software Foundation, Inc. @c See the file guile.texi for copying conditions. @@ -1175,15 +1175,15 @@ compile-time from a machine-readable description of the VM. With a few exceptions for certain operand types, each operand of an emit procedure corresponds to an operand of the corresponding instruction. -Consider @code{vector-length}, from @pxref{Miscellaneous Instructions}. +Consider @code{allocate-words}, from @pxref{Memory Access Instructions}. It is documented as: -@deftypefn Instruction {} vector-length u12:@var{dst} u12:@var{src} +@deftypefn Instruction {} allocate-words s12:@var{dst} s12:@var{nwords} @end deftypefn Therefore the emit procedure has the form: -@deffn {Scheme Procedure} emit-vector-length asm dst src +@deffn {Scheme Procedure} emit-allocate-words asm dst nwords @end deffn All emit procedure take the assembler as their first argument, and @@ -1191,9 +1191,9 @@ return no useful values. The argument types depend on the operand types. @xref{Instruction Set}. Most are integers within a restricted range, though labels are generally -expressed as opaque symbols. - -There are a few macro-instructions as well. +expressed as opaque symbols. Besides the emitters that correspond to +instructions, there are a few additional helpers defined in the +assembler module. @deffn {Scheme Procedure} emit-label asm label Define a label at the current program point. @@ -1203,15 +1203,11 @@ Define a label at the current program point. Associate @var{source} with the current program point. @end deffn -@deffn {Scheme Procedure} emit-cache-current-module! asm module scope -@deffnx {Scheme Procedure} emit-cached-toplevel-box asm dst scope sym bound? -@deffnx {Scheme Procedure} emit-cached-module-box asm dst module-name sym public? bound? -Macro-instructions to implement caching of top-level variables. The -first takes the current module, in the slot @var{module}, and associates -it with a cache location identified by @var{scope}. The second takes a -@var{scope}, and resolves the variable. @xref{Top-Level Environment -Instructions}. The last does not need a cached module, rather taking -the module name directly. +@deffn {Scheme Procedure} emit-cache-ref asm dst key +@deffnx {Scheme Procedure} emit-cache-set! asm key val +Macro-instructions to implement compilation-unit caches. A single cache +cell corresponding to @var{key} will be allocated for the compilation +unit. @end deffn @deffn {Scheme Procedure} emit-load-constant asm dst constant @@ -1237,17 +1233,6 @@ variables -- procedures that are not closures. Delimit a clause of a procedure. @end deffn -@deffn {Scheme Procedure} emit-br-if-symbol asm slot invert? label -@deffnx {Scheme Procedure} emit-br-if-variable asm slot invert? label -@deffnx {Scheme Procedure} emit-br-if-vector asm slot invert? label -@deffnx {Scheme Procedure} emit-br-if-string asm slot invert? label -@deffnx {Scheme Procedure} emit-br-if-bytevector asm slot invert? label -@deffnx {Scheme Procedure} emit-br-if-bitvector asm slot invert? label -TC7-specific test-and-branch instructions. The TC7 is a 7-bit code that -is part of a heap object's type. @xref{The SCM Type in Guile}. Also, -@xref{Branch Instructions}. -@end deffn - The linker is a complicated beast. Hackers interested in how it works would do well do read Ian Lance Taylor's series of articles on linkers. Searching the internet should find them easily. From the user's |