GNU bug report logs -
#15880
Compute C declarations for DEFSYMs automatically.
Previous Next
Reported by: Paul Eggert <eggert <at> cs.ucla.edu>
Date: Wed, 13 Nov 2013 00:35:02 UTC
Severity: wishlist
Tags: patch
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
Message #26 received at 15880 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier wrote:
> I was thinking of doing it only for the DEFSYMs (which would obviously
> need to be kept in a separate file).
There still might be problems with existing symbols that are not
DEFSYMed. For example, suppose we add 'DEFSYM (Qprotected_field,
"protected-field");' to window.c. The new include file will be rebuilt
and only window.c will be recompiled, and 'make' will succeed. But
buffer.c (which declares Qprotected_field as a static var and
defines it by hand) will disagree with window.c about where
Qprotected_field is, so Emacs might not work right, and the
problems might be hard to find and diagnose.
While we're on the topic let me tell you of a couple more things
I've been thinking of doing, which this patch would make easier to do.
First, put all DEFSYMS into a single table, initialized statically
with the name of the symbol. That way, during startup we can run
through the table and intern all the strings, and DEFSYM can turn
into a no-op; this should make Emacs smaller (no need to
staticpro the symbols, for example, since the g.c. can consult the
table). (This idea is incompatible with the idea of removing
dependencies on a new DEFSYMs include file.)
Second, preallocate each DEFSYM's struct Lisp_Symbol, so that its
address is known at link-time. This should measurably improve
runtime performance, e.g., NILP will run faster.
This bug report was last modified 10 years and 131 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.