aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrea Corallo2019-05-25 11:17:01 +0200
committerAndrea Corallo2020-01-01 11:33:39 +0100
commitd234e9bc8ae3c8ea1ecb82970a4fd1fd89850249 (patch)
tree9fba68823d587b03d7e16fcd8bbb1caef836df12 /src
parent70fc2a742d28697b0bb05c16665f038f6f79c86e (diff)
downloademacs-d234e9bc8ae3c8ea1ecb82970a4fd1fd89850249.tar.gz
emacs-d234e9bc8ae3c8ea1ecb82970a4fd1fd89850249.zip
add stuffs
Diffstat (limited to 'src')
-rw-r--r--src/comp.c48
1 files changed, 40 insertions, 8 deletions
diff --git a/src/comp.c b/src/comp.c
index 08cdf29f9f3..8cf3131daea 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -539,7 +539,7 @@ compile_f (const char *f_name, ptrdiff_t bytestr_length,
539 comp.ptrdiff_type, 539 comp.ptrdiff_type,
540 op); 540 op);
541 541
542 res = gcc_emit_call ("unbind_n", comp.lisp_obj_type, 1, args); 542 gcc_emit_call ("helper_unbind_n", comp.lisp_obj_type, 1, args);
543 } 543 }
544 break; 544 break;
545 case Bpophandler: 545 case Bpophandler:
@@ -801,16 +801,30 @@ compile_f (const char *f_name, ptrdiff_t bytestr_length,
801 gcc_emit_call ("helper_unwind_protect", comp.void_type, 1, args); 801 gcc_emit_call ("helper_unwind_protect", comp.void_type, 1, args);
802 break; 802 break;
803 803
804 case Bcondition_case: 804 case Bcondition_case: /* Obsolete since 24.4. */
805 error ("Bcondition_case not supported"); 805 POP3;
806 gcc_emit_call ("internal_lisp_condition_case",
807 comp.lisp_obj_type, 3, args);
806 break; 808 break;
807 case Btemp_output_buffer_setup: 809
808 error ("Btemp_output_buffer_setup not supported"); 810 case Btemp_output_buffer_setup: /* Obsolete since 24.1. */
811 POP1;
812 res = gcc_emit_call ("helper_temp_output_buffer_setup", comp.lisp_obj_type,
813 1, args);
814 PUSH (gcc_jit_lvalue_as_rvalue (res));
809 break; 815 break;
810 case Btemp_output_buffer_show: 816
811 error ("Btemp_output_buffer_show not supported"); 817 case Btemp_output_buffer_show: /* Obsolete since 24.1. */
818 POP2;
819 gcc_emit_call ("temp_output_buffer_show", comp.void_type, 1,
820 &args[1]);
821 PUSH (args[0]);
822 gcc_emit_call ("helper_unbind_n", comp.lisp_obj_type, 1, args);
823
812 break; 824 break;
813 case Bunbind_all: 825 case Bunbind_all: /* Obsolete. Never used. */
826 /* To unbind back to the beginning of this frame. Not used yet,
827 but will be needed for tail-recursion elimination. */
814 error ("Bunbind_all not supported"); 828 error ("Bunbind_all not supported");
815 break; 829 break;
816 case Bset_marker: 830 case Bset_marker:
@@ -1156,6 +1170,10 @@ Lisp_Object helper_save_window_excursion (Lisp_Object v1);
1156 1170
1157void helper_unwind_protect (Lisp_Object handler); 1171void helper_unwind_protect (Lisp_Object handler);
1158 1172
1173Lisp_Object helper_temp_output_buffer_setup (Lisp_Object x);
1174
1175Lisp_Object helper_unbind_n (int val);
1176
1159Lisp_Object 1177Lisp_Object
1160helper_save_window_excursion (Lisp_Object v1) 1178helper_save_window_excursion (Lisp_Object v1)
1161{ 1179{
@@ -1174,4 +1192,18 @@ void helper_unwind_protect (Lisp_Object handler)
1174 handler); 1192 handler);
1175} 1193}
1176 1194
1195Lisp_Object
1196helper_temp_output_buffer_setup (Lisp_Object x)
1197{
1198 CHECK_STRING (x);
1199 temp_output_buffer_setup (SSDATA (x));
1200 return Vstandard_output;
1201}
1202
1203Lisp_Object
1204helper_unbind_n (int val)
1205{
1206 return unbind_to (SPECPDL_INDEX () - val, Qnil);
1207}
1208
1177#endif /* HAVE_LIBJIT */ 1209#endif /* HAVE_LIBJIT */