unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Pip Cet <pipcet@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: [EXPERIMENT] Emacs with the SpiderMonkey garbage collector
Date: Fri, 24 Nov 2017 23:05:45 +0000	[thread overview]
Message-ID: <CAOqdjBfNVGXPKuhpB58FNVJPWNU9KjOJUcqL5PmRU3CVz8MgQA@mail.gmail.com> (raw)
In-Reply-To: <jwvd147gwid.fsf-monnier+gmane.emacs.devel@gnu.org>

> I'm not sure what we should do with it, tho:

I think the simple awareness that doing the switch at some point in
the future is feasible is quite enough to satisfy me. Part of what
triggered this was what I perceived as a "switching GCs is impossible,
so let's not worry about it at all" attitude.

My main reason for writing a converter in the first place is that as
the Emacs code base is relatively stable, at least as far as using
regular and well-structured C code goes, there's no rush to do
anything. I'll probably just continue to lurk on the list until I hear
someone say something that makes me think they'd benefit from running
(part of) the converter, then pounce :-), and I hope my converter will
still work then.

> I don't think building Emacs by preprocessing all files through a C->C++ converter is going to be a very popular proposition (e.g. will make debugging the "C" code even more fun).

I agree completely. The current converter uses Perl and Marpa, which
are Free Software but not GNU, so it's definitely not an option.

But let's not make it any harder to eventually move to a moving GC. In
particular, let's require save values to know where their Lisp_Objects
are! I've ignored that issue for now, but "potential Lisp_Object" is a
bad thing to have. (For the same reason, I would like to submit a
patch to change SAFE_ALLOCA to SAFE_ALLOCA_LISP where the latter is
appropriate). I think the current compromise whereby stack values are
conservatively marked and heap values are precisely Lisp Objects or
not is good.

We could, at some point in the future that's definitely not now, have
a flag day and run the preprocessor once[1] to disambiguate what are
currently Lisp_Objects by their uses, all typedef'd to Lisp_Object.
Then switching garbage collectors becomes a matter of providing the
right header file rather than having to go through all the source
code, manually or with a converter. Again, there's no rush and no need
to do everything at once. So

Lisp_Object f(Lisp_Object arg)
{
    Lisp_Object val = XCDR (arg);
    return val;
}

would become

Lisp_Return_Value f(Lisp_Handle arg)
{
     Lisp_Value val = XCDR (arg);
     return val;
}

I don't think that's horrible, though better names could surely be
found, but others might disagree.

[1] I don't think there's a legal issue with merely using Perl and
Marpa to run a converter that I'd gladly transfer copyright of to the
FSF. If there is, please let me know!



  reply	other threads:[~2017-11-24 23:05 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-23 19:01 [EXPERIMENT] Emacs with the SpiderMonkey garbage collector Pip Cet
2017-11-24  8:07 ` Paul Eggert
2017-11-24 16:23   ` Pip Cet
2017-11-24 18:20     ` Paul Eggert
2017-11-24 23:27       ` Pip Cet
2017-11-25  0:21         ` Paul Eggert
2017-11-25 23:50           ` Pip Cet
2017-11-24 22:13 ` Stefan Monnier
2017-11-24 23:05   ` Pip Cet [this message]
2017-11-25  4:15     ` Stefan Monnier
2017-11-25 23:50       ` Pip Cet
2017-11-26  1:20         ` Stefan Monnier
2017-11-26  4:20           ` Paul Eggert
2017-11-26  5:11             ` Stefan Monnier
2017-11-26 10:27         ` martin rudalics
     [not found]         ` <jwva7z9rgqh.fsf&#45;monnier+Inbox@gnu.org>
     [not found]           ` <9d7be625&#45;85ae&#45;54d5&#45;3897&#45;6f701c8ea124@cs.ucla.edu>
     [not found]             ` <jwvo9npprfw.fsf&#45;monnier+emacs@gnu.org>
2017-12-01  1:03               ` Steve Fink
     [not found] <CAOqdjBe98BpWE&#45; Ey8fPY1DmfCiLYnB06d30Xqf_KMm_muvKbDg@mail.gmail.com>
2017-12-01 17:57 ` Steve Fink
2017-12-03  0:37   ` Pip Cet
2017-12-03  5:24     ` Steve Fink

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=CAOqdjBfNVGXPKuhpB58FNVJPWNU9KjOJUcqL5PmRU3CVz8MgQA@mail.gmail.com \
    --to=pipcet@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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).