From: Thomas Lord <lord@emf.net>
To: Tom Tromey <tromey@redhat.com>
Cc: Wojciech Meyer <wojciech.meyer@googlemail.com>, emacs-devel@gnu.org
Subject: Re: Compiling Elisp to a native code with a GCC plugin
Date: Tue, 14 Sep 2010 16:13:53 -0700 [thread overview]
Message-ID: <1284506033.2446.11.camel@dell-desktop.example.com> (raw)
In-Reply-To: <m34ods58l4.fsf@fleche.redhat.com>
I've only loosely followed this thread so
its possible I'm off the mark (in which case - sorry)
but, i'm pretty sure it might be helpful to remark
about a variant of what I guess Tromey is suggesting:
Years ago - not for GC but for managing critical
sections wherein interrupts had to be deferred -
we did something similar in a fork of GNU Guile.
In that case, semi-automated ad-hoc rewriting was
used a tiny bit but the most helpful thing turned
out to be:
a) rip a C grammar out of GCC (unless we used a
different source, I forget).
b) hack the actions to hook up to a scheme (or
other lisp) run-time system and build an AST
as a big S-EXP. Make sure this AST records source
files and line numbers.
c) write ad-hoc cheapo static analysis tools to
walk the AST and find places where either it was
obvious fixes were needed, or where it was not obvious
fixes were not needed --- print those out like compiler
error messages.
d) Interactively page through those and, as you watch
each case, apply the ad hoc semi-automated rewrite tools
(or do it by hand in hard cases).
Step (d) can go very, very fast and, at least in that
case, steps (a .. c) can go a lot faster than
you might guess at first glance.
-t
On Tue, 2010-09-14 at 15:16 -0600, Tom Tromey wrote:
> >>>>> "Wojciech" == Wojciech Meyer <wojciech.meyer@googlemail.com> writes:
>
> Tom> It could be done. It just requires someone willing to do the work.
>
> Wojciech> I know. I could get my old sources of generational garbage
> Wojciech> collector, to work. However it is a daunting job (the worse I
> Wojciech> could imagine, garbage collectors are nasty), plugging and
> Wojciech> debugging a new garbage collector to such huge and esoteric (I
> Wojciech> am sure people that who've been working on Emacs for years
> Wojciech> will not take this words badly and understand straight away
> Wojciech> what I am (a newbie) talking about) project like
> Wojciech> Emacs. However I might try to experiment with it (however
> Wojciech> unfortunately I am not that self confident about it ;) ).
>
> It is always ok to ask for help.
>
> The current collector is very simple to understand. If you read
> alloc.c, and look through the data structures representing lisp objects
> (in lisp.h), you will have a pretty good idea of what is going on.
>
>
> FWIW, I looked at writing an incremental collector for Emacs. I was
> primarily interested in using software write barriers... this turns out
> to be hard because there is a lot of code in Emacs of the form:
>
> FIELD_ACCESSOR (object) = value;
>
> ... which for a software barrier has to be converted to:
>
> SET_FIELD_ACCESSOR (object, value);
>
> (There are other bad things, too, like passing around a Lisp_Object*
> that points to the contents of a vector.)
>
> So, lots of grunge work, just to get the point where you could start
> actually working on the GC. I would look at automated rewriting to
> make this work -- that worked out great on the concurrent branch.
>
>
> There was a more real attempt based on the Boehm GC. I think the bits
> from that are still on a branch. This GC has a generational mode that,
> IIRC, is based on memory protection bits.
>
> Tom
>
next prev parent reply other threads:[~2010-09-14 23:13 UTC|newest]
Thread overview: 97+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-14 19:12 Compiling Elisp to a native code with a GCC plugin Wojciech Meyer
2010-09-14 19:32 ` Tom Tromey
2010-09-14 19:45 ` Wojciech Meyer
2010-09-14 20:17 ` Lars Magne Ingebrigtsen
2010-09-14 20:52 ` Wojciech Meyer
2010-09-14 20:55 ` Tom Tromey
2010-09-14 21:05 ` Wojciech Meyer
2010-09-14 20:44 ` Tom Tromey
2010-09-14 21:00 ` Wojciech Meyer
2010-09-14 21:16 ` Tom Tromey
2010-09-14 21:29 ` Wojciech Meyer
2010-09-14 21:59 ` Tom Tromey
2010-09-14 22:37 ` Wojciech Meyer
2010-09-14 22:55 ` Tom Tromey
2010-09-14 23:33 ` Wojciech Meyer
2010-09-15 1:38 ` Tom Tromey
2010-09-14 22:49 ` Wojciech Meyer
2010-09-14 23:13 ` Thomas Lord [this message]
2010-09-14 23:42 ` Wojciech Meyer
2010-09-15 10:47 ` Leo
2010-09-15 11:41 ` Andreas Schwab
2010-09-15 12:10 ` Wojciech Meyer
2010-09-15 14:07 ` Stefan Monnier
2010-09-15 14:27 ` Helmut Eller
2010-09-15 14:59 ` Stefan Monnier
2010-09-15 15:09 ` Lars Magne Ingebrigtsen
2010-09-15 15:31 ` Andreas Schwab
2010-09-15 15:35 ` Lars Magne Ingebrigtsen
2010-09-15 16:28 ` Andreas Schwab
2010-09-16 16:57 ` Lars Magne Ingebrigtsen
2010-09-15 15:42 ` Stefan Monnier
2010-09-15 15:51 ` Lars Magne Ingebrigtsen
2010-09-15 15:57 ` Leo
2010-09-15 16:01 ` Lars Magne Ingebrigtsen
2010-09-15 16:05 ` David Kastrup
2010-09-15 16:23 ` Leo
2010-09-15 16:37 ` David Kastrup
2010-09-16 16:58 ` Lars Magne Ingebrigtsen
2010-09-16 21:11 ` Andreas Schwab
2010-09-16 23:17 ` Lars Magne Ingebrigtsen
2010-09-17 8:13 ` Eli Zaretskii
2010-09-17 13:17 ` Lars Magne Ingebrigtsen
2010-09-17 13:30 ` Eli Zaretskii
2010-09-17 13:34 ` Lars Magne Ingebrigtsen
2010-09-16 17:35 ` Lars Magne Ingebrigtsen
2010-09-16 2:57 ` Stephen J. Turnbull
2010-09-16 6:54 ` David Kastrup
2010-09-16 8:10 ` Stephen J. Turnbull
2010-09-16 8:31 ` David Kastrup
2010-09-16 17:01 ` Lars Magne Ingebrigtsen
2010-09-17 6:52 ` Stephen J. Turnbull
2010-09-17 13:09 ` Lars Magne Ingebrigtsen
2010-09-17 13:31 ` David Kastrup
2010-09-17 13:39 ` Lars Magne Ingebrigtsen
2010-09-17 13:55 ` David Kastrup
2010-09-17 14:18 ` Lars Magne Ingebrigtsen
2010-09-17 14:57 ` David Kastrup
2010-09-17 15:06 ` Lars Magne Ingebrigtsen
2010-09-17 15:24 ` Lars Magne Ingebrigtsen
2010-09-17 16:11 ` Eli Zaretskii
2010-09-17 16:33 ` David Kastrup
2010-09-17 16:41 ` Andreas Schwab
2010-09-17 17:17 ` David Kastrup
2010-09-17 18:24 ` David Kastrup
2010-09-17 20:30 ` David Kastrup
2010-09-17 20:49 ` Lars Magne Ingebrigtsen
2010-09-18 4:31 ` David Kastrup
2010-09-17 18:53 ` Stephen J. Turnbull
2010-09-17 20:57 ` Eli Zaretskii
2010-09-18 14:19 ` Stephen J. Turnbull
2010-09-18 15:46 ` Eli Zaretskii
2010-09-18 15:58 ` Stefan Monnier
2010-09-17 17:24 ` Lars Magne Ingebrigtsen
2010-09-17 16:11 ` David Kastrup
2010-09-17 16:18 ` Eli Zaretskii
2010-09-17 16:24 ` Lars Magne Ingebrigtsen
2010-09-17 16:39 ` Eli Zaretskii
2010-09-17 17:30 ` Lars Magne Ingebrigtsen
2010-09-17 18:49 ` Eli Zaretskii
2010-09-17 16:39 ` Eli Zaretskii
2010-09-17 13:49 ` Andreas Schwab
2010-09-17 13:55 ` Lars Magne Ingebrigtsen
2010-09-17 14:31 ` Wojciech Meyer
2010-09-17 14:40 ` Andreas Schwab
2010-09-17 14:47 ` Lars Magne Ingebrigtsen
2010-09-17 15:10 ` Andreas Schwab
2010-09-17 15:16 ` Lars Magne Ingebrigtsen
2010-09-17 15:39 ` Andreas Schwab
2010-09-17 15:42 ` Lars Magne Ingebrigtsen
2010-09-17 16:04 ` Andreas Schwab
2010-09-17 16:14 ` Eli Zaretskii
2010-09-17 19:22 ` James Cloos
2010-09-17 17:40 ` Stephen J. Turnbull
2010-09-17 19:40 ` Lars Magne Ingebrigtsen
2010-09-15 15:46 ` Helmut Eller
2010-09-15 16:28 ` Thomas Lord
2010-09-15 21:04 ` Leo
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1284506033.2446.11.camel@dell-desktop.example.com \
--to=lord@emf.net \
--cc=emacs-devel@gnu.org \
--cc=tromey@redhat.com \
--cc=wojciech.meyer@googlemail.com \
/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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).