Compiling to the Virtual Machine
================================

Compilers have a mystique about them that is attractive and off-putting at the same time. They are attractive because they are magical -- they transform inert text into live results, like throwing the switch on Frankenstein's monster. However, this magic is perceived by many to be impenetrable.

This section aims to pay attention to the small man behind the curtain.

See Read/Load/Eval/Compile, if you're lost and you just wanted to know how to compile your .scm file.

Compiler Tower
--------------

Guile's compiler is quite simple, actually -- its compilers, to put it more accurately. Guile defines a tower of languages, starting at Scheme and progressively simplifying down to languages that resemble the VM instruction set (see Instruction Set).

Each language knows how to compile to the next, so each step is simple and understandable. Furthermore, this set of languages is not hardcoded into Guile, so it is possible for the user to add new high-level languages, new passes, or even different compilation targets.

Languages are registered in the module, (system base language):

     (use-modules (system base language))

They are registered with the define-language form.

 -- Scheme Syntax: define-language
     name title version reader printer
     [parser=#f] [compilers='()] [decompilers='()] [evaluator=#f]
     Define a language.

     This syntax defines a #<language> object, bound to NAME in the current environment. In addition, the language will be added to the global language set. For example, this is the language definition for Scheme:

          (define-language scheme
            #:title       "Guile Scheme"
            #:version     "0.5"
            #:reader      read
            #:compilers   `((tree-il . ,compile-tree-il))
            #:decompilers `((tree-il . ,decompile-tree-il))
            #:evaluator   (lambda (x module) (primitive-eval x))
            #:printer     write)

The interesting thing about having languages defined this way is that they present a uniform interface to the read-eval-print loop. This allows the user to change the current language of the REPL:

     $ guile
     Guile Scheme interpreter 0.5 on Guile 1.9.0
     Copyright (C) 2001-2008 Free Software Foundation, Inc.

     Enter `,help' for help.
     scheme@(guile-user)> ,language tree-il
     Tree Intermediate Language interpreter 1.0 on Guile 1.9.0
     Copyright (C) 2001-2008 Free Software Foundation, Inc.

     Enter `,help' for help.
     tree-il@(guile-user)>

Languages can be looked up by name, as they were above.

 -- Scheme Procedure: lookup-language name
     Looks up a language named NAME, autoloading it if necessary.

     Languages are autoloaded by looking for a variable named NAME in a module named (language NAME spec).

     The language object will be returned, or #f if there does not exist a language with that name.

Defining languages this way allows us to programmatically determine the necessary steps for compiling code from one language to another.

 -- Scheme Procedure: lookup-compilation-order from to
     Recursively traverses the set of languages to which FROM can compile, depth-first, and return the first path that can transform FROM to TO. Returns #f if no path is found.

     This function memoizes its results in a cache that is invalidated by subsequent calls to define-language, so it should be quite fast.

There is a notion of a ``current language'', which is maintained in the *current-language* fluid. This language is normally Scheme, and may be rebound by the user. The run-time compilation interfaces (see Read/Load/Eval/Compile) also allow you to choose other source and target languages.

The normal tower of languages when compiling Scheme goes like this:

  * Scheme, which we know and love

  * Tree Intermediate Language (Tree-IL)

  * Guile Low Intermediate Language (GLIL)

  * Assembly

  * Bytecode

  * Objcode

Object code may be serialized to disk directly, though it has a cookie and version prepended to the front. But when compiling Scheme at run time, you want a Scheme value: for example, a compiled procedure. For this reason, so as not to break the abstraction, Guile defines a fake language at the bottom of the tower:

  * Value

Compiling to value loads the object code into a procedure, and wakes the sleeping giant.

Perhaps this strangeness can be explained by example: compile-file defaults to compiling to object code, because it produces object code that has to live in the barren world outside the Guile runtime; but compile defaults to compiling to value, as its product re-enters the Guile world.

Indeed, the process of compilation can circulate through these different worlds indefinitely, as shown by the following quine:

     ((lambda (x) ((compile x) x)) '(lambda (x) ((compile x) x)))

The Scheme Compiler
-------------------

The job of the Scheme compiler is to expand all macros and all of Scheme to its most primitive expressions. The definition of ``primitive'' is given by the inventory of constructs provided by Tree-IL, the target language of the Scheme compiler: procedure applications, conditionals, lexical references, etc. This is described more fully in the next section.

The tricky and amusing thing about the Scheme-to-Tree-IL compiler is that it is completely implemented by the macro expander. Since the macro expander has to run over all of the source code already in order to expand macros, it might as well do the analysis at the same time, producing Tree-IL expressions directly.

Because this compiler is actually the macro expander, it is extensible. Any macro which the user writes becomes part of the compiler.

The Scheme-to-Tree-IL expander may be invoked using the generic compile procedure:

     (compile '(+ 1 2) #:from 'scheme #:to 'tree-il)
     =>
      #<<application> src: #f
                      proc: #<<toplevel-ref> src: #f name: +>
                      args: (#<<const> src: #f exp: 1>
                             #<<const> src: #f exp: 2>)>

Or, since Tree-IL is so close to Scheme, it is often useful to expand Scheme to Tree-IL, then translate back to Scheme. For that reason the expander provides two interfaces. The former is equivalent to calling (sc-expand '(+ 1 2) 'c), where the 'c is for ``compile''. With 'e (the default), the result is translated back to Scheme:

     (sc-expand '(+ 1 2))
     => (+ 1 2)
     (sc-expand '(let ((x 10)) (* x x)))
     => (let ((x84 10)) (* x84 x84))

The second example shows that as part of its job, the macro expander renames lexically-bound variables. The original names are preserved when compiling to Tree-IL, but can't be represented in Scheme: a lexical binding only has one name. It is for this reason that the native output of the expander is not Scheme. There's too much information we would lose if we translated to Scheme directly: lexical variable names, source locations, and module hygiene.

Note however that sc-expand does not have the same signature as compile-tree-il. compile-tree-il is a small wrapper around sc-expand, to make it conform to the general form of compiler procedures in Guile's language tower.

Compiler procedures take three arguments: an expression, an environment, and a keyword list of options. They return three values: the compiled expression, the corresponding environment for the target language, and a ``continuation environment''. The compiled expression and environment will serve as input to the next language's compiler. The ``continuation environment'' can be used to compile another expression from the same source language within the same module.

For example, you might compile the expression, (define-module (foo)). This will result in a Tree-IL expression and environment. But if you compiled a second expression, you would want to take into account the compile-time effect of compiling the previous expression, which puts the user in the (foo) module. That is purpose of the ``continuation environment''; you would pass it as the environment when compiling the subsequent expression.

For Scheme, an environment may be one of two things:

  * #f, in which case compilation is performed in the context of the current module; or

  * a module, which specifies the context of the compilation.

By default, the compile and compile-file procedures compile in a fresh module, such that bindings and macros introduced by the expression being compiled are isolated:

     (eq? (current-module) (compile '(current-module)))
     => #f

     (compile '(define hello 'world))
     (defined? 'hello)
     => #f

     (define / *)
     (eq? (compile '/) /)
     => #f

Similarly, changes to the current-reader fluid (see current-reader) are isolated:

     (compile '(fluid-set! current-reader (lambda args 'fail)))
     (fluid-ref current-reader)
     => #f

Nevertheless, having the compiler and compilee share the same name space can be achieved by explicitly passing (current-module) as the compilation environment:

     (define hello 'world)
     (compile 'hello #:env (current-module))
     => world

Tree-IL
-------

Tree Intermediate Language (Tree-IL) is a structured intermediate language that is close in expressive power to Scheme. It is an expanded, pre-analyzed Scheme.

Tree-IL is ``structured'' in the sense that its representation is based on records, not S-expressions. This gives a rigidity to the language that ensures that compiling to a lower-level language only requires a limited set of transformations. Practically speaking, consider the Tree-IL type, <const>, which has two fields, src and exp. Instances of this type are records created via make-const, and whose fields are accessed as const-src, and const-exp. There is also a predicate, const?. See Records, for more information on records.

All Tree-IL types have a src slot, which holds source location information for the expression. This information, if present, will be residualized into the compiled object code, allowing backtraces to show source information. The format of src is the same as that returned by Guile's source-properties function. See Source Properties, for more information.

Although Tree-IL objects are represented internally using records, there is also an equivalent S-expression external representation for each kind of Tree-IL. For example, an the S-expression representation of #<const src: #f exp: 3> expression would be:

     (const 3)

Users may program with this format directly at the REPL:

     scheme@(guile-user)> ,language tree-il
     Tree Intermediate Language interpreter 1.0 on Guile 1.9.0
     Copyright (C) 2001-2008 Free Software Foundation, Inc.

     Enter `,help' for help.
     tree-il@(guile-user)> (apply (primitive +) (const 32) (const 10))
     => 42

The src fields are left out of the external representation.

One may create Tree-IL objects from their external representations via calling parse-tree-il, the reader for Tree-IL. If any source information is attached to the input S-expression, it will be propagated to the resulting Tree-IL expressions. This is probably the easiest way to compile to Tree-IL: just make the appropriate external representations in S-expression format, and let parse-tree-il take care of the rest.

 -- Scheme Variable: <void> src
 -- External Representation: (void)
     An empty expression. In practice, equivalent to Scheme's (if #f #f).

 -- Scheme Variable: <const> src exp
 -- External Representation: (const EXP)
     A constant.

 -- Scheme Variable: <primitive-ref> src name
 -- External Representation: (primitive NAME)
     A reference to a ``primitive''. A primitive is a procedure that, when compiled, may be open-coded. For example, cons is usually recognized as a primitive, so that it compiles down to a single instruction.

     Compilation of Tree-IL usually begins with a pass that resolves some <module-ref> and <toplevel-ref> expressions to <primitive-ref> expressions. The actual compilation pass has special cases for applications of certain primitives, like apply or cons.

 -- Scheme Variable: <lexical-ref> src name gensym
 -- External Representation: (lexical NAME GENSYM)
     A reference to a lexically-bound variable. The NAME is the original name of the variable in the source program. GENSYM is a unique identifier for this variable.

 -- Scheme Variable: <lexical-set> src name gensym exp
 -- External Representation: (set! (lexical NAME GENSYM) EXP)
     Sets a lexically-bound variable.

 -- Scheme Variable: <module-ref> src mod name public?
 -- External Representation: (@ MOD NAME)
 -- External Representation: (@@ MOD NAME)
     A reference to a variable in a specific module. MOD should be the name of the module, e.g. (guile-user).

     If PUBLIC? is true, the variable named NAME will be looked up in MOD's public interface, and serialized with @; otherwise it will be looked up among the module's private bindings, and is serialized with @@.

 -- Scheme Variable: <module-set> src mod name public? exp
 -- External Representation: (set! (@ MOD NAME) EXP)
 -- External Representation: (set! (@@ MOD NAME) EXP)
     Sets a variable in a specific module.

 -- Scheme Variable: <toplevel-ref> src name
 -- External Representation: (toplevel NAME)
     References a variable from the current procedure's module.

 -- Scheme Variable: <toplevel-set> src name exp
 -- External Representation: (set! (toplevel NAME) EXP)
     Sets a variable in the current procedure's module.

 -- Scheme Variable: <toplevel-define> src name exp
 -- External Representation: (define (toplevel NAME) EXP)
     Defines a new top-level variable in the current procedure's module.

 -- Scheme Variable: <conditional> src test then else
 -- External Representation: (if TEST THEN ELSE)
     A conditional. Note that ELSE is not optional.

 -- Scheme Variable: <application> src proc args
 -- External Representation: (apply PROC . ARGS)
     A procedure call.

 -- Scheme Variable: <sequence> src exps
 -- External Representation: (begin . EXPS)
     Like Scheme's begin.

 -- Scheme Variable: <lambda> src names vars meta body
 -- External Representation: (lambda NAMES VARS META BODY)
     A closure. NAMES is original binding form, as given in the source code, which may be an improper list. VARS are gensyms corresponding to the NAMES. META is an association list of properties. The actual BODY is a single Tree-IL expression.

 -- Scheme Variable: <let> src names vars vals exp
 -- External Representation: (let NAMES VARS VALS EXP)
     Lexical binding, like Scheme's let. NAMES are the original binding names, VARS are gensyms corresponding to the NAMES, and VALS are Tree-IL expressions for the values. EXP is a single Tree-IL expression.

 -- Scheme Variable: <letrec> src names vars vals exp
 -- External Representation: (letrec NAMES VARS VALS EXP)
     A version of <let> that creates recursive bindings, like Scheme's letrec.

There are two Tree-IL constructs that are not normally produced by higher-level compilers, but instead are generated during the source-to-source optimization and analysis passes that the Tree-IL compiler does. Users should not generate these expressions directly, unless they feel very clever, as the default analysis pass will generate them as necessary.

 -- Scheme Variable: <let-values> src names vars exp body
 -- External Representation: (let-values NAMES VARS EXP BODY)
     Like Scheme's receive -- binds the values returned by evaluating exp to the lambda-like bindings described by VARS. That is to say, VARS may be an improper list.

     <let-values> is an optimization of <application> of the primitive, call-with-values.

 -- Scheme Variable: <fix> src names vars vals body
 -- External Representation: (fix NAMES VARS VALS BODY)
     Like <letrec>, but only for VALS that are unset lambda expressions.

     fix is an optimization of letrec (and let).

Tree-IL implements a compiler to GLIL that recursively traverses Tree-IL expressions, writing out GLIL expressions into a linear list. The compiler also keeps some state as to whether the current expression is in tail context, and whether its value will be used in future computations. This state allows the compiler not to emit code for constant expressions that will not be used (e.g. docstrings), and to perform tail calls when in tail position.

Most optimization, such as it currently is, is performed on Tree-IL expressions as source-to-source transformations. There will be more optimizations added in the future.

Interested readers are encouraged to read the implementation in (language tree-il compile-glil) for more details.

GLIL
----

Guile Low Intermediate Language (GLIL) is a structured intermediate language whose expressions more closely approximate Guile's VM instruction set. Its expression types are defined in (language glil).

 -- Scheme Variable: <glil-program> nargs nrest nlocs meta . body
     A unit of code that at run-time will correspond to a compiled procedure. NARGS NREST and NLOCS collectively define the program's arity; see Compiled Procedures, for more information. META should be an alist of properties, as in Tree-IL's <lambda>. BODY is an ordered list of GLIL expressions.

 -- Scheme Variable: <glil-bind> . vars
     An advisory expression that notes a liveness extent for a set of variables. VARS is a list of (NAME TYPE INDEX), where TYPE should be either argument, local, or external.

     <glil-bind> expressions end up being serialized as part of a program's metadata and do not form part of a program's code path.

 -- Scheme Variable: <glil-mv-bind> vars rest
     A multiple-value binding of the values on the stack to VARS. Iff REST is true, the last element of VARS will be treated as a rest argument.

     In addition to pushing a binding annotation on the stack, like <glil-bind>, an expression is emitted at compilation time to make sure that there are enough values available to bind. See the notes on truncate-values in Procedural Instructions, for more information.

 -- Scheme Variable: <glil-unbind>
     Closes the liveness extent of the most recently encountered <glil-bind> or <glil-mv-bind> expression. As GLIL expressions are compiled, a parallel stack of live bindings is maintained; this expression pops off the top element from that stack.

     Bindings are written into the program's metadata so that debuggers and other tools can determine the set of live local variables at a given offset within a VM program.

 -- Scheme Variable: <glil-source> loc
     Records source information for the preceding expression. LOC should be an association list of containing line column, and filename keys, e.g. as returned by source-properties.

 -- Scheme Variable: <glil-void>
     Pushes ``the unspecified value'' on the stack.

 -- Scheme Variable: <glil-const> obj
     Pushes a constant value onto the stack. OBJ must be a number, string, symbol, keyword, boolean, character, uniform array, the empty list, or a pair or vector of constants.

 -- Scheme Variable: <glil-lexical> local? boxed? op index
     Accesses a lexically bound variable. If the variable is not LOCAL? it is free. All variables may have ref and set as their OP. Boxed variables may also have the OPs box, empty-box, and fix, which correspond in semantics to the VM instructions box, empty-box, and fix-closure. See Stack Layout, for more information.

 -- Scheme Variable: <glil-toplevel> op name
     Accesses a toplevel variable. OP may be ref, set, or define.

 -- Scheme Variable: <glil-module> op mod name public?
     Accesses a variable within a specific module. See Tree-IL's <module-ref>, for more information.

 -- Scheme Variable: <glil-label> label
     Creates a new label. LABEL can be any Scheme value, and should be unique.

 -- Scheme Variable: <glil-branch> inst label
     Branch to a label. LABEL should be a <ghil-label>. inst is a branching instruction: br-if, br, etc.

 -- Scheme Variable: <glil-call> inst nargs
     This expression is probably misnamed, as it does not correspond to function calls. <glil-call> invokes the VM instruction named INST, noting that it is called with NARGS stack arguments. The arguments should be pushed on the stack already. What happens to the stack afterwards depends on the instruction.

 -- Scheme Variable: <glil-mv-call> nargs ra
     Performs a multiple-value call. RA is a <glil-label> corresponding to the multiple-value return address for the call. See the notes on mv-call in Procedural Instructions, for more information.

Users may enter in GLIL at the REPL as well, though there is a bit more bookkeeping to do. Since GLIL needs the set of variables to be declared explicitly in a <glil-program>, GLIL expressions must be wrapped in a thunk that declares the arity of the expression:

     scheme@(guile-user)> ,language glil
     Guile Lowlevel Intermediate Language (GLIL) interpreter 0.3 on
        Guile 1.9.0
     Copyright (C) 2001-2008 Free Software Foundation, Inc.

     Enter `,help' for help.
     glil@(guile-user)> (program 0 0 0 () (const 3) (call return 1))
     => 3

Just as in all of Guile's compilers, an environment is passed to the GLIL-to-object code compiler, and one is returned as well, along with the object code.

Assembly
--------

Assembly is an S-expression-based, human-readable representation of the actual bytecodes that will be emitted for the VM. As such, it is a useful intermediate language both for compilation and for decompilation.

Besides the fact that it is not a record-based language, assembly differs from GLIL in four main ways:

  * Labels have been resolved to byte offsets in the program.

  * Constants inside procedures have either been expressed as inline instructions or cached in object arrays.

  * Procedures with metadata (source location information, liveness extents, procedure names, generic properties, etc) have had their metadata serialized out to thunks.

  * All expressions correspond directly to VM instructions -- i.e., there is no <glil-lexical> which can be a ref or a set.

Assembly is isomorphic to the bytecode that it compiles to. You can compile to bytecode, then decompile back to assembly, and you have the same assembly code.

The general form of assembly instructions is the following:

     (INST ARG ...)

The INST names a VM instruction, and its ARGs will be embedded in the instruction stream. The easiest way to see assembly is to play around with it at the REPL, as can be seen in this annotated example:

     scheme@(guile-user)> (compile '(lambda (x) (+ x x)) #:to 'assembly)
     (load-program 0 0 0
       () ; Labels
       70 ; Length
       #f ; Metadata
       (make-false)
       (make-false) ; object table for the returned lambda
       (nop)
       (nop) ; Alignment. Since assembly has already resolved its labels
       (nop) ; to offsets, and programs must be 8-byte aligned since their
       (nop) ; object code is mmap'd directly to structures, assembly
       (nop) ; has to have the alignment embedded in it.
       (nop)
       (load-program
         1
         0
         ()
         8
         (load-program 0 0 0 () 21 #f
           (load-symbol "x")  ; Name and liveness extent for x.
           (make-false)
           (make-int8:0) ; Some instruction+arg combinations
           (make-int8:0) ; have abbreviations.
           (make-int8 6)
           (list 0 5)
           (list 0 1)
           (make-eol)
           (list 0 2)
           (return))
         ; And here, the actual code.
         (local-ref 0)
         (local-ref 0)
         (add)
         (return)
         (nop)
         (nop))
       ; Return our new procedure.
       (return))

Of course you can switch the REPL to assembly and enter in assembly S-expressions directly, like with other languages, though it is more difficult, given that the length fields have to be correct.

Bytecode and Objcode
--------------------

Finally, the raw bytes. There are actually two different ``languages'' here, corresponding to two different ways to represent the bytes.

``Bytecode'' represents code as uniform byte vectors, useful for structuring and destructuring code on the Scheme level. Bytecode is the next step down from assembly:

     scheme@(guile-user)> (compile '(+ 32 10) #:to 'assembly)
     => (load-program 0 0 0 () 6 #f
            (make-int8 32) (make-int8 10) (add) (return))
     scheme@(guile-user)> (compile '(+ 32 10) #:to 'bytecode)
     => #u8(0 0 0 0 6 0 0 0 0 0 0 0 0 0 0 0 10 32 10 10 120 52)

``Objcode'' is bytecode, but mapped directly to a C structure, struct scm_objcode:

     struct scm_objcode {
       scm_t_uint8 nargs;
       scm_t_uint8 nrest;
       scm_t_uint16 nlocs;
       scm_t_uint32 len;
       scm_t_uint32 metalen;
       scm_t_uint8 base[0];
     };

As one might imagine, objcode imposes a minimum length on the bytecode. Also, the multibyte fields are in native endianness, which makes objcode (and bytecode) system-dependent. Indeed, in the short example above, all but the last 6 bytes were the program's header.

Objcode also has a couple of important efficiency hacks. First, objcode may be mapped directly from disk, allowing compiled code to be loaded quickly, often from the system's disk cache, and shared among multiple processes. Secondly, objcode may be embedded in other objcode, allowing procedures to have the text of other procedures inlined into their bodies, without the need for separate allocation of the code. Of course, the objcode object itself does need to be allocated.

Procedures related to objcode are defined in the (system vm objcode) module.

 -- Scheme Procedure: objcode? obj
 -- C Function: scm_objcode_p (obj)
     Returns #f iff OBJ is object code, #f otherwise.

 -- Scheme Procedure: bytecode->objcode bytecode
 -- C Function: scm_bytecode_to_objcode (bytecode,)
     Makes a bytecode object from BYTECODE, which should be a u8vector.

 -- Scheme Variable: load-objcode file
 -- C Function: scm_load_objcode (file)
     Load object code from a file named FILE. The file will be mapped into memory via mmap, so this is a very fast operation.

     On disk, object code has an sixteen-byte cookie prepended to it, to prevent accidental loading of arbitrary garbage.

 -- Scheme Variable: write-objcode objcode file
 -- C Function: scm_write_objcode (objcode)
     Write object code out to a file, prepending the eight-byte cookie.

 -- Scheme Variable: objcode->u8vector objcode
 -- C Function: scm_objcode_to_u8vector (objcode)
     Copy object code out to a u8vector for analysis by Scheme.

The following procedure is actually in (system vm program), but we'll mention it here:

 -- Scheme Variable: make-program objcode objtable [free-vars=#f]
 -- C Function: scm_make_program (objcode, objtable, free_vars)
     Load up object code into a Scheme program. The resulting program will have OBJTABLE as its object table, which should be a vector or #f, and will capture the free variables from FREE-VARS.

Object code from a file may be disassembled at the REPL via the meta-command ,disassemble-file, abbreviated as ,xx. Programs may be disassembled via ,disassemble, abbreviated as ,x.

Compiling object code to the fake language, value, is performed via loading objcode into a program, then executing that thunk with respect to the compilation environment. Normally the environment propagates through the compiler transparently, but users may specify the compilation environment manually as well:

 -- Scheme Procedure: make-objcode-env module free-vars
     Make an object code environment. MODULE should be a Scheme module, and FREE-VARS should be a vector of free variables. #f is also a valid object code environment.

Writing New High-Level Languages
--------------------------------

In order to integrate a new language LANG into Guile's compiler system, one has to create the module (language LANG spec) containing the language definition and referencing the parser, compiler and other routines processing it. The module hierarchy in (language brainfuck) defines a very basic Brainfuck implementation meant to serve as easy-to-understand example on how to do this. See for instance http://en.wikipedia.org/wiki/Brainfuck for more information about the Brainfuck language itself.

Extending the Compiler
----------------------

At this point, we break with the impersonal tone of the rest of the manual, and make an intervention. Admit it: if you've read this far into the compiler internals manual, you are a junkie. Perhaps a course at your university left you unsated, or perhaps you've always harbored a sublimated desire to hack the holy of computer science holies: a compiler. Well you're in good company, and in a good position. Guile's compiler needs your help.

There are many possible avenues for improving Guile's compiler. Probably the most important improvement, speed-wise, will be some form of native compilation, both just-in-time and ahead-of-time. This could be done in many ways. Probably the easiest strategy would be to extend the compiled procedure structure to include a pointer to a native code vector, and compile from bytecode to native code at run-time after a procedure is called a certain number of times.

The name of the game is a profiling-based harvest of the low-hanging fruit, running programs of interest under a system-level profiler and determining which improvements would give the most bang for the buck. It's really getting to the point though that native compilation is the next step.

The compiler also needs help at the top end, enhancing the Scheme that it knows to also understand R6RS, and adding new high-level compilers. We have JavaScript and Emacs Lisp mostly complete, but they could use some love; Lua would be nice as well, butq whatever language it is that strikes your fancy would be welcome too.

Compilers are for hacking, not for admiring or for complaining about. Get to it!