From: David Given <dg@cowlark.com>
To: linux-sparse@vger.kernel.org
Subject: [ANN] Clue experimental release
Date: Mon, 07 Jul 2008 22:47:46 +0100 [thread overview]
Message-ID: <48728F02.9080306@cowlark.com> (raw)
[-- 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 --]
reply other threads:[~2008-07-07 21:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48728F02.9080306@cowlark.com \
--to=dg@cowlark.com \
--cc=linux-sparse@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.