* [ANN] Clue experimental release
@ 2008-07-07 21:47 David Given
0 siblings, 0 replies; only message in thread
From: David Given @ 2008-07-07 21:47 UTC (permalink / raw)
To: linux-sparse
[-- Attachment #1: Type: text/plain, Size: 1765 bytes --]
For the past few weeks I've been working on a C compiler for Lua. It's
now in a sufficient state to run non-trivial programs and benchmarks,
although it's by no means finished.
http://gate.cowlark.com/~dg/clue-0.1pre1.tar.bz2
(This will move to a real URL soon.)
Clue uses Sparse to emit Lua 5.1.3 bytecode by emitting Lua source and
running it through a modified version of luac to patch in goto
instructions. Currently most ANSI C C89 programs and some C99 programs
will compile, although there are big holes in the coverage (varargs,
switch, for example).
There's a libc, but I've only implemented enough to make the sample
benchmark programs work.
The code it generates isn't particularly great because I had to learn
how sparse worked as I went along and needed to make stuff up more or
less on the fly; the register allocator and code generator needs
throwing away and rewriting, for example. This makes the benchmarks
rather poor. But at least at this point they can only improve.
It turns out that there's quite a lot of scope for improvement...
Whetstone benchmark (gcc): 820
(clue with LuaJIT): 7.2
(clue with Lua): 3.6
It's all currently deeply experimental, buggy, half-finished and
potentially useless, but I hope it's at least interesting. In addition,
it should provide a reasonable example of how to write a compiler using
sparse.
--
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│ "I have always wished for my computer to be as easy to use as my
│ telephone; my wish has come true because I can no longer figure out
│ how to use my telephone." --- Bjarne Stroustrup
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-07-07 21:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-07 21:47 [ANN] Clue experimental release David Given
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.