[Contents] [Back] [Prev] [Up] [Next] [Forward]
-
Producing maximally fast C code from simple scheme code.
By simple we mean code which does not rely on procedures
returning procedures (closures) and nontrivial forms of
higher-order procedures. All the latter are also compiled,
but the optimizations specially target simple code fragments.
Hobbit performs global optimization in order to locate such fragments.
-
Producing C code which would preserve as much original scheme
code structure as possible, to enable using the output C code
by a human programmer (eg. for introducing special optimizations
possible in C). Also, this will hopefully help the C compiler
to find better optimizations.
| `hobbit.scm' |
the hobbit compiler.
|
| `scmhob.scm' |
the file defining some additional procedures recognized
by hobbit as primitives. Use it with the interpreter only.
|
| `scmhob.h' |
the common headerfile for hobbit-compiled C files.
|
| `hobbit.texi' |
documentation for hobbit.
|
Tanel Tammet
Department of Computing Science
Chalmers University of Technology
University of Go"teborg
S-41296 Go"teborg Sweden
A. Jaffer (agj @ alum.mit.edu), the author of SCM, has been of major
help with a number of suggestions and hacks, especially concerning the
interface between compiled code and the SCM interpreter.
Several people have helped with suggestions and detailed bug reports,
e.g. David J. Fiander (davidf@mks.com), Gordon Oulsnam
(STCS8004@IRUCCVAX.UCC.IE), Pertti Kelloma"ki (pk@cs.tut.fi),
Dominique de Waleffe (ddw2@sunbim.be) Terry Moore (tmm@databook.com),
Marshall Abrams (ab2r@midway.uchicago.edu). Georgy K. Bronnikov
(goga@bronnikov.msk.su), Bernard Urban (Bernard.URBAN@meteo.fr),
Charlie Xiaoli Huang, Tom Lord (lord@cygnus.com),
NMICHAEL@us.oracle.com, Lee Iverson (leei@ai.sri.com), Burt
Leavenworth (EDLSOFT@aol.com).
-
Optimisations:
-
the calls to internal apply: we'd like to avoid the excessive consing of
always building the list of arguments.
-
speeding up the creation of a vector for assignable closure-variables
-
several peephole optimisations.
-
Improve Variable creation and naming to avoid C function name clashes.
-
Report 4 macros.
-
Better error-checking.
-
Better liftability analysis.
-
More tailrecursion recognition.
-
Better numeric optimizations.
-
Fast real-only arithmetics: $eqv, $=, $>, $+, $*, etc.
[In February 2002, hobbit5x was integrated into the SCM distribution.
Changes since then are recorded in `scm/ChangeLog'.]
- hobbit4d:
-
-
the incorrect translation of char>?, char-ci>?, char>=?, char-ci>=?
string>?, string-ci>?, string-ci>=?, string>=? reported by
Burt Leavenworth (EDLSOFT@aol.com) was fixed.
-
the name clash bug for new variables new_varN occurring in
non-liftable closures (reported by Lee Iverson (leei@ai.sri.com))
was fixed.
-
the major COPYRIGHT change: differently from all the previous
versions of Hobbit, hobbit4d is Free Software.
- hobbit4c:
-
-
a liftability-analysis bug for for-each and map reported
by Lee Iverson (leei@ai.sri.com) has been fixed.
-
The output C code does not contain the unnecessary ;-s on
separate lines any more.
- hobbit4b:
-
The following bugs have been fixed:
-
Erroneous treatment of [ and ] inside symbols,
reported by A. Jaffer (agj @ alum.mit.edu).
-
A bug in the liftability analysis,
reported by A. Jaffer (agj @ alum.mit.edu).
-
A bug occurring in case arguments are evaluated right-to-left,
which happens with Hobbit compiled by gcc on GNU/Linux.
Reported and patched by George K. Bronnikov (goga@bronnikov.msk.su)
-
A closure-building bug sometimes leading to a serious loss of
efficiency (liftability not recognized),
reported by NMICHAEL@us.oracle.com.
-
A bug in the liftability analysis (non-liftable lambda-term
inside a liftable lambda-term)
reported by Lee Iverson (leei@ai.sri.com)
- hobbit4a:
-
Several bugs found in version4x are fixed.
- hobbit4x (not public):
-
-
A major overhaul: Hobbit is now able to compile full scheme,
not just the fast liftable-clonable fragment.
The optimizations done by the earlier versions are preserved.
-
Numerous bugs found in earlier versions have been fixed.
- hobbit3d:
-
bugs found in the version 3c are fixed.
- hobbit3c:
-
- hobbit3b:
-
-
Aubrey fixed some problems with the version 3.
-
It is now OK to define procedures "by name" on top level.
-
It is now OK to apply "apply", etc to procedures defined
in the compiled file. Compiled procedures may now be passed
to procedures not defined but still called in the compiled files.
- hobbit3:
-
- hobbit2:
-
- hobbit1a3 (not public):
-
-
the letrec-sorting bug often resulting in not recognizing procedures
defined in letrec (or local defines) has been corrected.
-
the primitives string and vector are now compiled correctly.
- hobbit1a2 (not public):
-
-
any fixed arity procedure (including primitives) may be passed to any
higher-order procedure by name. Variable arity procedures (eg
primitives list, +, display and defined funs like
(define (foo x . y) x)) must not be passed to new defined
higher-order funs.
-
some optimizations have been introduced for calls to map
and for-each.
-
(map list x y) bug has been corrected.
-
Corrected self-compilation name clash between call_cc and call-cc.
- hobbit1a1 (not public):
-
- hobbit1:
-
the first release
[Contents] [Back] [Prev] [Up] [Next] [Forward]