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/charset.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/charset.c')
-rw-r--r-- | src/charset.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/charset.c b/src/charset.c index 30bcc054221..9fe3548be08 100644 --- a/src/charset.c +++ b/src/charset.c @@ -481,7 +481,6 @@ static void load_charset_map_from_file (struct charset *charset, Lisp_Object mapfile, int control_flag) { - USE_LOCAL_ALLOCA; unsigned min_code = CHARSET_MIN_CODE (charset); unsigned max_code = CHARSET_MAX_CODE (charset); int fd; @@ -1551,7 +1550,6 @@ If the current buffer is unibyte, the returned list may contain only `ascii', `eight-bit-control', and `eight-bit-graphic'. */) (Lisp_Object beg, Lisp_Object end, Lisp_Object table) { - USE_LOCAL_ALLOCA; Lisp_Object charsets; ptrdiff_t from, from_byte, to, stop, stop_byte; int i; @@ -1572,7 +1570,7 @@ only `ascii', `eight-bit-control', and `eight-bit-graphic'. */) from_byte = CHAR_TO_BYTE (from); - charsets = make_local_vector (charset_table_used, Qnil); + charsets = Fmake_vector (make_number (charset_table_used), Qnil); while (1) { find_charsets_in_text (BYTE_POS_ADDR (from_byte), stop - from, @@ -1603,14 +1601,13 @@ If STR is unibyte, the returned list may contain only `ascii', `eight-bit-control', and `eight-bit-graphic'. */) (Lisp_Object str, Lisp_Object table) { - USE_LOCAL_ALLOCA; Lisp_Object charsets; int i; Lisp_Object val; CHECK_STRING (str); - charsets = make_local_vector (charset_table_used, Qnil); + charsets = Fmake_vector (make_number (charset_table_used), Qnil); find_charsets_in_text (SDATA (str), SCHARS (str), SBYTES (str), charsets, table, STRING_MULTIBYTE (str)); |