diff options
| author | Dmitry Antipov | 2014-09-15 18:53:23 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2014-09-15 18:53:23 +0400 |
| commit | edb0288b83b45d295df52ce7644e897613358971 (patch) | |
| tree | 8f169c257e9752ca860764cc19ec232d287eb189 /src/lread.c | |
| parent | 497daa12743ed71a70e41f966631d1c8856248cc (diff) | |
| download | emacs-edb0288b83b45d295df52ce7644e897613358971.tar.gz emacs-edb0288b83b45d295df52ce7644e897613358971.zip | |
If USE_LOCAL_ALLOCATORS, allocate some Lisp objects on stack.
* lisp.h (local_cons, local_list1, local_list2, local_list3)
[USE_LOCAL_ALLOCATORS]: New macros.
[!USE_LOCAL_ALLOCATORS]: Fall back to regular functions.
(build_local_string): Avoid argument name expansion clash with
make_local_string.
* alloc.c (toplevel)
[USE_LOCAL_ALLOCATORS && GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS]:
Preprocessor guard to avoid impossible configuration.
* charset.c (Ffind_charset_region, Ffind_charset_string):
Use make_local_vector.
* lread.c (read1, substitute_object_recurse): Use scoped_cons.
* textprop.c (Fput_text_property, Fadd_face_text_property):
Use scoped_list2.
(copy_text_properties): Use local_cons and local_list3.
* chartab.c (uniprop_table):
* data.c (wrong_choice, wrong_range):
* doc.c (get_doc_string):
* editfns.c (format2):
* fileio.c (Fexpand_file_name, auto_save_error):
* fns.c (Fyes_or_no_p):
* font.c (font_parse_xlfd, font_parse_family_registry, font_add_log):
* fontset.c (Fset_fontset_font):
* keyboard.c (echo_add_key, echo_dash, parse_menu_item)
(read_char_minibuf_menu_prompt):
* keymap.c (silly_event_symbol_error, describe_vector):
* menu.c (single_menu_item):
* minibuf.c (Fread_buffer):
* process.c (status_message, Fformat_network_address)
(server_accept_connection): Use make_local_string and
build_local_string. Prefer compound literals where appropriate.
Diffstat (limited to 'src/lread.c')
| -rw-r--r-- | src/lread.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lread.c b/src/lread.c index f32b60ad588..fabd2010035 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -2894,7 +2894,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list) | |||
| 2894 | Lisp_Object placeholder; | 2894 | Lisp_Object placeholder; |
| 2895 | Lisp_Object cell; | 2895 | Lisp_Object cell; |
| 2896 | 2896 | ||
| 2897 | placeholder = Fcons (Qnil, Qnil); | 2897 | placeholder = scoped_cons (Qnil, Qnil); |
| 2898 | cell = Fcons (make_number (n), placeholder); | 2898 | cell = Fcons (make_number (n), placeholder); |
| 2899 | read_objects = Fcons (cell, read_objects); | 2899 | read_objects = Fcons (cell, read_objects); |
| 2900 | 2900 | ||
| @@ -3374,7 +3374,7 @@ substitute_object_recurse (Lisp_Object object, Lisp_Object placeholder, Lisp_Obj | |||
| 3374 | substitute_in_interval contains part of the logic. */ | 3374 | substitute_in_interval contains part of the logic. */ |
| 3375 | 3375 | ||
| 3376 | INTERVAL root_interval = string_intervals (subtree); | 3376 | INTERVAL root_interval = string_intervals (subtree); |
| 3377 | Lisp_Object arg = Fcons (object, placeholder); | 3377 | Lisp_Object arg = scoped_cons (object, placeholder); |
| 3378 | 3378 | ||
| 3379 | traverse_intervals_noorder (root_interval, | 3379 | traverse_intervals_noorder (root_interval, |
| 3380 | &substitute_in_interval, arg); | 3380 | &substitute_in_interval, arg); |
| @@ -3681,8 +3681,8 @@ read_list (bool flag, Lisp_Object readcharfun) | |||
| 3681 | in the installed Lisp directory. | 3681 | in the installed Lisp directory. |
| 3682 | We don't use Fexpand_file_name because that would make | 3682 | We don't use Fexpand_file_name because that would make |
| 3683 | the directory absolute now. */ | 3683 | the directory absolute now. */ |
| 3684 | elt = concat2 (build_string ("../lisp/"), | 3684 | elt = concat2 (build_local_string ("../lisp/"), |
| 3685 | Ffile_name_nondirectory (elt)); | 3685 | Ffile_name_nondirectory (elt)); |
| 3686 | } | 3686 | } |
| 3687 | else if (EQ (elt, Vload_file_name) | 3687 | else if (EQ (elt, Vload_file_name) |
| 3688 | && ! NILP (elt) | 3688 | && ! NILP (elt) |