all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Philipp Stephani <p.stephani2@gmail.com>, Eli Zaretskii <eliz@gnu.org>
Cc: phst@google.com, emacs-devel@gnu.org
Subject: Re: emacs-module.c, eassert, and nonnull args
Date: Sun, 11 Jun 2017 10:45:24 -0700	[thread overview]
Message-ID: <63164307-2ba1-a827-665f-ec130c62bcaa@cs.ucla.edu> (raw)
In-Reply-To: <CAArVCkSWNUBL-t3CeyAVtziUSx8d+9Ew0G587Mo-U1m4oz2Ajw@mail.gmail.com>

Philipp Stephani wrote:
> Here's a new patch. It makes this change, and also changes the allocation
> slightly so that objects have unique addresses (useful for checking).

Thanks for working on this. Some comments.

Have you looked into the runtime overhead of this approach, assuming 
-module-assertions is not specified? Currently lisp_to_value and value_to_lisp 
typically  are optimized away (i.e., zero machine instructions), and that 
wouldn't be true under the proposed patch even when -module-assertions is not 
used. Granted, module calls need not be super-fast, but it might be nice to 
avoid the overhead in the typical case if that is easy.

What happens if -module-assertions is enabled for Emacs, Emacs dumps itself, and 
-module-assertions is not enabled when the dumped Emacs is run? Or vice versa.

Are the FOR_EACH_TAIL_SAFE macro calls needed? This macro is needed only for 
lists that might be circular (e.g., the lists are available to Lisp code, which 
can call setcdr on their components). If the calls are not needed I suggest just 
an ordinary for loop.

A small point: the FOR_EACH... loops should be indented like ordinary for-loops.



  reply	other threads:[~2017-06-11 17:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-05  2:48 emacs-module.c, eassert, and nonnull args Paul Eggert
2017-06-05 13:56 ` Philipp Stephani
2017-06-05 15:33   ` Eli Zaretskii
2017-06-11 13:50     ` Philipp Stephani
2017-06-11 17:45       ` Paul Eggert [this message]
2017-06-11 20:34         ` Philipp Stephani
2017-06-12 14:34           ` Philipp Stephani

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=63164307-2ba1-a827-665f-ec130c62bcaa@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=p.stephani2@gmail.com \
    --cc=phst@google.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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.