]> git.eshelyaron.com Git - emacs.git/commitdiff
some fixes to unbind_n
authorAndrea Corallo <andrea_corallo@yahoo.it>
Sun, 11 Aug 2019 07:34:30 +0000 (09:34 +0200)
committerAndrea Corallo <akrl@sdf.org>
Wed, 1 Jan 2020 10:33:58 +0000 (11:33 +0100)
lisp/emacs-lisp/comp.el
src/comp.c

index 7fa723fc88ba791bf731347473aad71020bed2f1..04668b3ed50e57681d39565c8f26c4fa53725505 100644 (file)
@@ -500,9 +500,8 @@ the annotation emission."
        (comp-stack-adjust (- arg))
        (comp-emit-set-call `(callref Ffuncall ,(1+ arg) ,(comp-sp))))
       (byte-unbind
-       (comp-emit `(call unbind_to
-                         ,(make-comp-mvar :constant arg)
-                         ,(make-comp-mvar :constant nil))))
+       (comp-emit `(call helper_unbind_n
+                         ,(make-comp-mvar :constant arg))))
       (byte-pophandler
        (comp-emit '(pop-handler)))
       (byte-pushconditioncase
index 347a3b351e1a246a9c05460d1de1d04dc288a141..e101666cb6ba398007011a5aa4613a9e57054557 100644 (file)
@@ -160,7 +160,7 @@ void helper_unwind_protect (Lisp_Object handler);
 
 Lisp_Object helper_temp_output_buffer_setup (Lisp_Object x);
 
-Lisp_Object helper_unbind_n (int val);
+Lisp_Object helper_unbind_n (Lisp_Object n);
 
 bool helper_PSEUDOVECTOR_TYPEP_XUNTAG (const union vectorlike_header *a,
                                       enum pvec_type code);
@@ -1101,15 +1101,14 @@ emit_simple_limple_call (Lisp_Object args)
   return emit_call (calle, comp.lisp_obj_type, nargs, gcc_args);
 }
 
-/* Entry point to dispatch emission of  (call fun ...).  */
+/* Entry point to dispatch emitting (call fun ...).  */
 
 static gcc_jit_rvalue *
 emit_limple_call (Lisp_Object args)
 {
   Lisp_Object calle_sym = FIRST (args);
   char *calle = (char *) SDATA (SYMBOL_NAME (calle_sym));
-  Lisp_Object emitter =
-    Fgethash (calle_sym, comp.emitter_dispatcher, Qnil);
+  Lisp_Object emitter = Fgethash (calle_sym, comp.emitter_dispatcher, Qnil);
 
   if (!NILP (emitter))
     {
@@ -2061,7 +2060,7 @@ DEFUN ("comp-init-ctxt", Fcomp_init_ctxt, Scomp_init_ctxt,
       /* Move this into syms_of_comp the day will be dumpable.   */
       comp.emitter_dispatcher = CALLN (Fmake_hash_table);
       register_dispatch (Qset_internal, emit_set_internal);
-      register_dispatch (Qhelper_unbind_n, helper_unbind_n);
+      register_dispatch (Qhelper_unbind_n, emit_simple_limple_call);
     }
 
   comp.ctxt = gcc_jit_context_acquire();
@@ -2402,9 +2401,9 @@ helper_temp_output_buffer_setup (Lisp_Object x)
 }
 
 Lisp_Object
-helper_unbind_n (int val)
+helper_unbind_n (Lisp_Object n)
 {
-  return unbind_to (SPECPDL_INDEX () - val, Qnil);
+  return unbind_to (SPECPDL_INDEX () - XFIXNUM (n), Qnil);
 }
 
 bool