[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 04/08: Update "A Virtual Machine for Guile"

From: Andy Wingo
Subject: [Guile-commits] 04/08: Update "A Virtual Machine for Guile"
Date: Fri, 28 Sep 2018 08:40:41 -0400 (EDT)

wingo pushed a commit to branch master
in repository guile.

commit f1b745eec5eb495f214b44e243abd03845079d62
Author: Andy Wingo <address@hidden>
Date:   Fri Sep 28 12:14:09 2018 +0200

    Update "A Virtual Machine for Guile"
    * doc/ref/vm.texi (A Virtual Machine for Guile): Update.
 doc/ref/vm.texi | 40 ++++++++++++++++++++++++++++------------
 1 file changed, 28 insertions(+), 12 deletions(-)

diff --git a/doc/ref/vm.texi b/doc/ref/vm.texi
index 7ff247f..15f0146 100644
--- a/doc/ref/vm.texi
+++ b/doc/ref/vm.texi
@@ -7,18 +7,34 @@
 @node A Virtual Machine for Guile
 @section A Virtual Machine for Guile
-Guile has both an interpreter and a compiler. To a user, the difference
-is transparent---interpreted and compiled procedures can call each other
-as they please.
-The difference is that the compiler creates and interprets bytecode
-for a custom virtual machine, instead of interpreting the
-S-expressions directly. Loading and running compiled code is faster
-than loading and running source code.
-The virtual machine that does the bytecode interpretation is a part of
-Guile itself. This section describes the nature of Guile's virtual
+Enough about data---how does Guile run code?
+Computer systems consist of towers of languages, each level defining a
+higher level language and implemented using lower-level facilities.
+Sometimes these languages are implemented using interpreters: programs
+that run along-side the program being interpreted, dynamically
+translating the high-level code to low-level code.  Sometimes these
+languages are implemented using compilers: programs that translate
+high-level programs to equivalent low-level code, and pass on that
+low-level code to the next level down.  Each of these levels can be
+throught to be virtual machines; they offer programs an abstract machine
+on which to run.
+Guile implements a number of interpreters and compilers on different
+language levels.  For example, there is an interpreter for the Scheme
+language that is itself implemented as a Scheme program compiled to a
+bytecode for a low-level virtual machine shipped with Guile.  That
+virtual machine is implemented by both an interpreter---a C program that
+interprets the bytecodes---and a compiler---a C program that dynamically
+translates bytecode programs to native machine code.
+Even the lowest-level machine code can be thought to be interpreted by
+the CPU, and indeed is often implemented by compiling machine
+instructions to ``micro-operations''.
+This section describes the language implemented by Guile's bytecode
+virtual machine, as well as some examples of translations of Scheme
+programs to Guile's VM.
 * Why a VM?::                   

reply via email to

[Prev in Thread] Current Thread [Next in Thread]