[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs-module.c, eassert, and nonnull args

From: Paul Eggert
Subject: Re: emacs-module.c, eassert, and nonnull args
Date: Sun, 11 Jun 2017 10:45:24 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1

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 via email to

[Prev in Thread] Current Thread [Next in Thread]