CC: redirected to xemacs-beta.
>>>> "Robert" == Robert Pluim
<rpluim(a)bigfoot.com> writes:
Robert> Martin Buchholz writes:
> If you really want to make mark_object faster, make sure Qnil is
a
> compile-time constant (I have a plan to do this, but it's a lot of work).
Robert> Hmm, I'm intrigued. What needs to change?
You have to portably detect if an address is malloced or not. The
most portable way is to link xemacs like
firstfile.o ... lastfile.o
and check addresses of objects relative to symbols in firstfile.o and
lastfile.o.
Then you have to fix pdump to remember when it's dumping objects,
whether they were in malloced space. When it restores the contents of
non-malloced memory, it restores them to the original location. This
makes xemacs a little smaller at run time. We can also optimize
Lisp_Subrs to be const (and therefore shared) objects by moving the
docstring out of the Lisp_Subr into a dynamic hash table.
Then you make sure the contents of Qnil is a static object, i.e. not
malloced. Like Qunbound has static contents guts_of_unbound_marker or
something.
Do this consistently for all symbols, and maybe some other lisp
objects, like Qunbound.
Then, if not using union type, Qnil is just a constant pointer to
static memory. So Qnil can be defined to be
#define Qnil &guts_of_Qnil; /* since we have no tag bits */
Figure out how to make this work even when using union type (we can
accept a slowdown when using union type).