diff options
| author | Andrea Corallo | 2019-12-15 09:35:50 +0100 |
|---|---|---|
| committer | Andrea Corallo | 2020-01-01 11:38:12 +0100 |
| commit | 8234a62e6fb9f706f410a96e2ce9877c19e44a20 (patch) | |
| tree | 8e9ef477a1e12dea2a0dc08e514c94cf7d0c796d /src | |
| parent | 26ce5664ae431ec141e852a4183844d83c3f8856 (diff) | |
| download | emacs-8234a62e6fb9f706f410a96e2ce9877c19e44a20.tar.gz emacs-8234a62e6fb9f706f410a96e2ce9877c19e44a20.zip | |
stringify within macro ADD_IMPORTED
Diffstat (limited to 'src')
| -rw-r--r-- | src/comp.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/comp.c b/src/comp.c index 42f3b5d04f9..70b423aa97a 100644 --- a/src/comp.c +++ b/src/comp.c | |||
| @@ -68,7 +68,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | |||
| 68 | #else | 68 | #else |
| 69 | #define SETJMP setjmp | 69 | #define SETJMP setjmp |
| 70 | #endif | 70 | #endif |
| 71 | #define SETJMP_NAME STR (SETJMP) | 71 | #define SETJMP_NAME SETJMP |
| 72 | 72 | ||
| 73 | /* C side of the compiler context. */ | 73 | /* C side of the compiler context. */ |
| 74 | 74 | ||
| @@ -1199,7 +1199,7 @@ emit_limple_push_handler (gcc_jit_rvalue *handler, gcc_jit_rvalue *handler_type, | |||
| 1199 | 1199 | ||
| 1200 | gcc_jit_rvalue *res; | 1200 | gcc_jit_rvalue *res; |
| 1201 | res = | 1201 | res = |
| 1202 | emit_call (intern_c_string (SETJMP_NAME), comp.int_type, 1, args, false); | 1202 | emit_call (intern_c_string (STR (SETJMP_NAME)), comp.int_type, 1, args, false); |
| 1203 | emit_cond_jump (res, handler_bb, guarded_bb); | 1203 | emit_cond_jump (res, handler_bb, guarded_bb); |
| 1204 | } | 1204 | } |
| 1205 | 1205 | ||
| @@ -1713,7 +1713,7 @@ declare_runtime_imported_funcs (void) | |||
| 1713 | Lisp_Object field_list = Qnil; | 1713 | Lisp_Object field_list = Qnil; |
| 1714 | #define ADD_IMPORTED(f_name, ret_type, nargs, args) \ | 1714 | #define ADD_IMPORTED(f_name, ret_type, nargs, args) \ |
| 1715 | { \ | 1715 | { \ |
| 1716 | Lisp_Object name = intern_c_string (f_name); \ | 1716 | Lisp_Object name = intern_c_string (STR (f_name)); \ |
| 1717 | Lisp_Object field = \ | 1717 | Lisp_Object field = \ |
| 1718 | make_mint_ptr (declare_imported_func (name, ret_type, nargs, args)); \ | 1718 | make_mint_ptr (declare_imported_func (name, ret_type, nargs, args)); \ |
| 1719 | Lisp_Object el = Fcons (name, field); \ | 1719 | Lisp_Object el = Fcons (name, field); \ |
| @@ -1722,39 +1722,39 @@ declare_runtime_imported_funcs (void) | |||
| 1722 | 1722 | ||
| 1723 | gcc_jit_type *args[4]; | 1723 | gcc_jit_type *args[4]; |
| 1724 | 1724 | ||
| 1725 | ADD_IMPORTED ("wrong_type_argument", comp.void_type, 2, NULL); | 1725 | ADD_IMPORTED (wrong_type_argument, comp.void_type, 2, NULL); |
| 1726 | 1726 | ||
| 1727 | args[0] = comp.lisp_obj_type; | 1727 | args[0] = comp.lisp_obj_type; |
| 1728 | args[1] = comp.int_type; | 1728 | args[1] = comp.int_type; |
| 1729 | ADD_IMPORTED ("helper_PSEUDOVECTOR_TYPEP_XUNTAG", comp.bool_type, 2, args); | 1729 | ADD_IMPORTED (helper_PSEUDOVECTOR_TYPEP_XUNTAG, comp.bool_type, 2, args); |
| 1730 | 1730 | ||
| 1731 | ADD_IMPORTED ("pure_write_error", comp.void_type, 1, NULL); | 1731 | ADD_IMPORTED (pure_write_error, comp.void_type, 1, NULL); |
| 1732 | 1732 | ||
| 1733 | args[0] = comp.lisp_obj_type; | 1733 | args[0] = comp.lisp_obj_type; |
| 1734 | args[1] = comp.int_type; | 1734 | args[1] = comp.int_type; |
| 1735 | ADD_IMPORTED ("push_handler", comp.handler_ptr_type, 2, args); | 1735 | ADD_IMPORTED (push_handler, comp.handler_ptr_type, 2, args); |
| 1736 | 1736 | ||
| 1737 | args[0] = gcc_jit_type_get_pointer (gcc_jit_struct_as_type (comp.jmp_buf_s)); | 1737 | args[0] = gcc_jit_type_get_pointer (gcc_jit_struct_as_type (comp.jmp_buf_s)); |
| 1738 | ADD_IMPORTED (SETJMP_NAME, comp.int_type, 1, args); | 1738 | ADD_IMPORTED (SETJMP_NAME, comp.int_type, 1, args); |
| 1739 | 1739 | ||
| 1740 | ADD_IMPORTED ("record_unwind_protect_excursion", comp.void_type, 0, NULL); | 1740 | ADD_IMPORTED (record_unwind_protect_excursion, comp.void_type, 0, NULL); |
| 1741 | 1741 | ||
| 1742 | args[0] = comp.lisp_obj_type; | 1742 | args[0] = comp.lisp_obj_type; |
| 1743 | ADD_IMPORTED ("helper_unbind_n", comp.lisp_obj_type, 1, args); | 1743 | ADD_IMPORTED (helper_unbind_n, comp.lisp_obj_type, 1, args); |
| 1744 | 1744 | ||
| 1745 | ADD_IMPORTED ("helper_save_restriction", comp.void_type, 0, NULL); | 1745 | ADD_IMPORTED (helper_save_restriction, comp.void_type, 0, NULL); |
| 1746 | 1746 | ||
| 1747 | ADD_IMPORTED ("record_unwind_current_buffer", comp.void_type, 0, NULL); | 1747 | ADD_IMPORTED (record_unwind_current_buffer, comp.void_type, 0, NULL); |
| 1748 | 1748 | ||
| 1749 | args[0] = args[1] = args[2] = comp.lisp_obj_type; | 1749 | args[0] = args[1] = args[2] = comp.lisp_obj_type; |
| 1750 | args[3] = comp.int_type; | 1750 | args[3] = comp.int_type; |
| 1751 | ADD_IMPORTED ("set_internal", comp.void_type, 4, args); | 1751 | ADD_IMPORTED (set_internal, comp.void_type, 4, args); |
| 1752 | 1752 | ||
| 1753 | args[0] = comp.lisp_obj_type; | 1753 | args[0] = comp.lisp_obj_type; |
| 1754 | ADD_IMPORTED ("helper_unwind_protect", comp.void_type, 1, args); | 1754 | ADD_IMPORTED (helper_unwind_protect, comp.void_type, 1, args); |
| 1755 | 1755 | ||
| 1756 | args[0] = args[1] = comp.lisp_obj_type; | 1756 | args[0] = args[1] = comp.lisp_obj_type; |
| 1757 | ADD_IMPORTED ("specbind", comp.void_type, 2, args); | 1757 | ADD_IMPORTED (specbind, comp.void_type, 2, args); |
| 1758 | 1758 | ||
| 1759 | #undef ADD_IMPORTED | 1759 | #undef ADD_IMPORTED |
| 1760 | 1760 | ||
| @@ -3278,7 +3278,7 @@ load_comp_unit (dynlib_handle_ptr handle, Lisp_Object file) | |||
| 3278 | f_relocs[i] = (void *) pure_write_error; | 3278 | f_relocs[i] = (void *) pure_write_error; |
| 3279 | else if (!strcmp (f_str, "push_handler")) | 3279 | else if (!strcmp (f_str, "push_handler")) |
| 3280 | f_relocs[i] = (void *) push_handler; | 3280 | f_relocs[i] = (void *) push_handler; |
| 3281 | else if (!strcmp (f_str, SETJMP_NAME)) | 3281 | else if (!strcmp (f_str, STR (SETJMP_NAME))) |
| 3282 | f_relocs[i] = (void *) SETJMP; | 3282 | f_relocs[i] = (void *) SETJMP; |
| 3283 | else if (!strcmp (f_str, "record_unwind_protect_excursion")) | 3283 | else if (!strcmp (f_str, "record_unwind_protect_excursion")) |
| 3284 | f_relocs[i] = (void *) record_unwind_protect_excursion; | 3284 | f_relocs[i] = (void *) record_unwind_protect_excursion; |