unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stephen Berman <stephen.berman@gmx.net>
To: emacs-devel@gnu.org
Subject: Re: Finding objects on C stack - alternate GCPRO
Date: Thu, 17 Nov 2011 13:50:11 +0100	[thread overview]
Message-ID: <87ehx6q5fg.fsf@escher.home> (raw)
In-Reply-To: E1RQdJm-0004Vq-L7@fencepost.gnu.org

On Wed, 16 Nov 2011 06:06:14 -0500 Eli Zaretskii <eliz@gnu.org> wrote:

> Given that most platforms make GCPRO and UNGCPRO a no-op (and the only
> 2 platforms that don't are probably simply not maintained enough and
> don't use GCC anyway), why is this important enough to waste energy on
> it?

On Wed, 16 Nov 2011 09:41:36 -0500 Stefan Monnier <monnier@iro.umontreal.ca> wrote:

> The problem is that the few platforms that don't use GCC are the ones
> that require GCPROs as well, so not only it would be a large change, but
> it would also require us dropping support for those non-gcc
> non-conservative-GC platforms.

In light of these two statements it seems like the Elisp manual (section
Writing Emacs Primitives) gives too much weight to GCPRO, e.g. where it
says:

      It suffices to ensure that at least one pointer to each object is
   GC-protected; that way, the object cannot be recycled, so all pointers
   to it remain valid.  Thus, a particular local variable can do without
   protection if it is certain that the object it points to will be
   preserved by some other pointer (such as another local variable which
   has a `GCPRO')(1).  Otherwise, the local variable needs a `GCPRO'.

If this is only needed on platforms that don't support gcc, shouldn't
the manual say that, or should GCPRO be mentioned at all?  Perhaps I'm
completely missing the point, since the only thing I know about GCPRO is
what's in the manual; if so, could someone elaborate on the role of
GCPRO, or if that's inappropriate here, point me to relevant places
(preferable comments) in the Emacs sources or relevant external
discussion?  Thanks.

Steve Berman




  reply	other threads:[~2011-11-17 12:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-16 10:07 Finding objects on C stack - alternate GCPRO Dmitry Antipov
2011-11-16 10:18 ` Helmut Eller
2011-11-16 10:33   ` Dmitry Antipov
2011-11-16 23:27   ` Richard Stallman
2011-11-17  4:17     ` Stephen J. Turnbull
2011-11-17 19:12       ` Richard Stallman
2011-11-16 11:06 ` Eli Zaretskii
2011-11-17 12:50   ` Stephen Berman [this message]
2011-11-17 16:50     ` Eli Zaretskii
2011-11-16 14:41 ` Stefan Monnier
2011-11-16 18:19 ` Tom Tromey
2011-11-16 21:07 ` Ken Raeburn

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=87ehx6q5fg.fsf@escher.home \
    --to=stephen.berman@gmx.net \
    --cc=emacs-devel@gnu.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.
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).