diff options
author | Dmitry Antipov <dmantipov@yandex.ru> | 2014-09-29 10:44:31 +0400 |
---|---|---|
committer | Dmitry Antipov <dmantipov@yandex.ru> | 2014-09-29 10:44:31 +0400 |
commit | 71a72686e3e81253f2bc0ad74568aafdbd86879c (patch) | |
tree | e2f2d44e9a01c782e71e8de88e3b345733c86fc7 /src/font.c | |
parent | c3301e3c7f146a3aa017fa24f6ed240d6ecbafb4 (diff) | |
download | emacs-71a72686e3e81253f2bc0ad74568aafdbd86879c.tar.gz emacs-71a72686e3e81253f2bc0ad74568aafdbd86879c.tar.bz2 emacs-71a72686e3e81253f2bc0ad74568aafdbd86879c.zip |
Keep stack-allocated Lisp objects fast rather than versatile.
* configure.ac (HAVE_STATEMENT_EXPRESSIONS): Remove.
For USE_STACK_LISP_OBJECTS, we always assume __GNUC__.
* lisp.h (union Aligned_Cons) [!GCALIGNED]: Define as such.
(SCOPED_CONS_INITIALIZER): New macro.
(scoped_cons) [USE_STACK_LISP_OBJECTS]: Use it.
(USE_LOCAL_ALLOCA): Remove.
(local_cons, local_list1, local_list2, local_list3, local_list4):
Remove. Stack overflow checking makes them too slow.
(make_local_vector): Likewise. Also we just don't have enough
users for it.
(enum LISP_STRING_OVERHEAD): Remove.
(local_string_init, local_vector_init): Remove prototypes.
(make_local_string, build_local_string): Redesign to target short
compile-time string constants, fall back to regular string allocation
where appropriate.
(lisp_string_size): New function.
(verify_ascii) [ENABLE_CHECKING]: Add prototype.
* alloc.c (local_string_init, local_vector_init): Remove.
(verify_ascii) [ENABLE_CHECKING]: New function.
* buffer.c, charset.c, chartab.c, data.c, editfns.c, emacs.c, fileio.c:
* fns.c, font.c, fontset.c, frame.c, keyboard.c, keymap.c, lread.c:
* menu.c, minibuf.c, process.c, textprop.c, xdisp.c, xfns.c, xfont.c:
* xselect.c, xterm.c: All related users changed.
Diffstat (limited to 'src/font.c')
-rw-r--r-- | src/font.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/font.c b/src/font.c index 3614d97d473..673a934f38f 100644 --- a/src/font.c +++ b/src/font.c @@ -357,7 +357,6 @@ int font_style_to_value (enum font_property_index prop, Lisp_Object val, bool noerror) { - USE_LOCAL_ALLOCA; Lisp_Object table = AREF (font_style_table, prop - FONT_WEIGHT_INDEX); int len; @@ -402,7 +401,7 @@ font_style_to_value (enum font_property_index prop, Lisp_Object val, ASET (elt, 1, val); ASET (font_style_table, prop - FONT_WEIGHT_INDEX, Fvconcat (2, ((Lisp_Object []) - { table, make_local_vector (1, elt) }))); + { table, Fmake_vector (make_number (1), elt) }))); return (100 << 8) | (i << 4); } else @@ -1050,7 +1049,6 @@ font_expand_wildcards (Lisp_Object *field, int n) int font_parse_xlfd (char *name, ptrdiff_t len, Lisp_Object font) { - USE_LOCAL_ALLOCA; int i, j, n; char *f[XLFD_LAST_INDEX + 1]; Lisp_Object val; @@ -1760,7 +1758,6 @@ font_parse_name (char *name, ptrdiff_t namelen, Lisp_Object font) void font_parse_family_registry (Lisp_Object family, Lisp_Object registry, Lisp_Object font_spec) { - USE_LOCAL_ALLOCA; ptrdiff_t len; char *p0, *p1; @@ -2686,7 +2683,6 @@ static Lisp_Object scratch_font_spec, scratch_font_prefer; static Lisp_Object font_delete_unmatched (Lisp_Object vec, Lisp_Object spec, int size) { - USE_LOCAL_ALLOCA; Lisp_Object entity, val; enum font_property_index prop; ptrdiff_t i; @@ -2717,7 +2713,7 @@ font_delete_unmatched (Lisp_Object vec, Lisp_Object spec, int size) } if (NILP (spec)) { - val = local_cons (entity, val); + val = Fcons (entity, val); continue; } for (prop = FONT_WEIGHT_INDEX; prop < FONT_SIZE_INDEX; prop++) @@ -2748,7 +2744,7 @@ font_delete_unmatched (Lisp_Object vec, Lisp_Object spec, int size) AREF (entity, FONT_AVGWIDTH_INDEX))) prop = FONT_SPEC_MAX; if (prop < FONT_SPEC_MAX) - val = local_cons (entity, val); + val = Fcons (entity, val); } return (Fvconcat (1, &val)); } @@ -5006,7 +5002,6 @@ static Lisp_Object Vfont_log_deferred; void font_add_log (const char *action, Lisp_Object arg, Lisp_Object result) { - USE_LOCAL_ALLOCA; Lisp_Object val; int i; |