diff options
| author | Paul Eggert | 2015-01-10 13:33:38 -0800 |
|---|---|---|
| committer | Paul Eggert | 2015-01-10 13:42:35 -0800 |
| commit | 6a37ecee0884ff30ac7666e6502e2a9d2608f291 (patch) | |
| tree | 875bd8310981ff850911f04da4c3c3b95f34537b /lib-src/make-docfile.c | |
| parent | 649937920b5023be5c0685d1537f5ea2bfb9899a (diff) | |
| download | emacs-6a37ecee0884ff30ac7666e6502e2a9d2608f291.tar.gz emacs-6a37ecee0884ff30ac7666e6502e2a9d2608f291.zip | |
Port to 32-bit --with-wide-int
Prefer symbol indexes to struct Lisp_Symbol * casted and then
widened, as the latter had trouble with GCC on Fedora 21 when
configured --with-wide-int and when used in static initializers.
* lib-src/make-docfile.c (write_globals): Define and use symbols like
iQnil (a small integer, like 0) rather than aQnil (an address
constant).
* src/alloc.c (garbage_collect_1, which_symbols):
* src/lread.c (init_obarray):
Prefer builtin_lisp_symbol when it can be used.
* src/dispextern.h (struct image_type.type):
* src/font.c (font_property_table.key):
* src/frame.c (struct frame_parm_table.sym):
* src/keyboard.c (scroll_bar_parts, struct event_head):
* src/xdisp.c (struct props.name):
Use the index of a builtin symbol rather than its address.
All uses changed.
* src/lisp.h (TAG_SYMPTR, XSYMBOL_INIT): Remove, replacing with ...
(TAG_SYMOFFSET, SYMBOL_INDEX): ... new macros that deal with
symbol indexes rather than pointers, and which work better on MSB
hosts because they shift right before tagging. All uses changed.
(DEFINE_LISP_SYMBOL_BEGIN, DEFINE_LISP_SYMBOL_END):
No longer noops on wide-int hosts, since they work now.
(builtin_lisp_symbol): New function.
Diffstat (limited to 'lib-src/make-docfile.c')
| -rw-r--r-- | lib-src/make-docfile.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c index 7c5c4bcb865..bc5420ea939 100644 --- a/lib-src/make-docfile.c +++ b/lib-src/make-docfile.c | |||
| @@ -613,7 +613,7 @@ compare_globals (const void *a, const void *b) | |||
| 613 | if (ga->type != gb->type) | 613 | if (ga->type != gb->type) |
| 614 | return ga->type - gb->type; | 614 | return ga->type - gb->type; |
| 615 | 615 | ||
| 616 | /* Consider "nil" to be the least, so that aQnil is firat. That | 616 | /* Consider "nil" to be the least, so that iQnil is zero. That |
| 617 | way, Qnil's internal representation is zero, which is a bit faster. */ | 617 | way, Qnil's internal representation is zero, which is a bit faster. */ |
| 618 | if (ga->type == SYMBOL) | 618 | if (ga->type == SYMBOL) |
| 619 | { | 619 | { |
| @@ -701,9 +701,9 @@ write_globals (void) | |||
| 701 | } | 701 | } |
| 702 | else if (globals[i].type == SYMBOL) | 702 | else if (globals[i].type == SYMBOL) |
| 703 | printf (("DEFINE_LISP_SYMBOL_BEGIN (%s)\n" | 703 | printf (("DEFINE_LISP_SYMBOL_BEGIN (%s)\n" |
| 704 | "#define a%s (&lispsym[%d])\n" | 704 | "#define i%s %d\n" |
| 705 | "#define %s make_lisp_symbol (a%s)\n" | 705 | "#define %s builtin_lisp_symbol (i%s)\n" |
| 706 | "DEFINE_LISP_SYMBOL_END (a%s)\n\n"), | 706 | "DEFINE_LISP_SYMBOL_END (%s)\n\n"), |
| 707 | globals[i].name, globals[i].name, symnum++, | 707 | globals[i].name, globals[i].name, symnum++, |
| 708 | globals[i].name, globals[i].name, globals[i].name); | 708 | globals[i].name, globals[i].name, globals[i].name); |
| 709 | else | 709 | else |