[Top][All Lists]

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

bug#15880: Compute C declarations for DEFSYMs automatically.

From: Paul Eggert
Subject: bug#15880: Compute C declarations for DEFSYMs automatically.
Date: Wed, 13 Nov 2013 17:32:15 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0

Stefan Monnier wrote:

> The two variables have the
> same name and same content and are read-only, so the redundancy is harmless.

Hmm, well, I suppose you're right.  Still, the idea of removing the
dependency on DEFSYM-related globals would preclude the potential
optimization of putting these globals into a table at compile-time.
I suppose that part of the issue is that I don't add or remove
DEFSYMs very often, so even aside from the precluded optimization
I'm reluctant to complicate the build system just to save a few
build-time cycles on these rare occasions.

> such that make-docfile finds the "INTERN", infers the Lisp name from the
> C name and writes a "syms.c" file which does little else but initialize
> all those symbols.

I was thinking of something even simpler: no macros at all.
If the C source code mentions an identifier Qfoo_bar, make-docfile
automatically generates the Lisp symbol foo-bar.  To aid transition
we could make DEFSYM a no-op, or we could go through the code and
eliminate all the DEFSYM calls.  (This would all be done after the
current patch is installed, of course.)

reply via email to

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