1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-13 09:32:47 +00:00

some minors

This commit is contained in:
Andrea Corallo 2019-08-11 19:03:06 +02:00 committed by Andrea Corallo
parent b6288d1322
commit ab69bb6364
2 changed files with 15 additions and 14 deletions

View File

@ -287,7 +287,7 @@ Restore the original value afterwards."
(defun comp-emit-set-call (call)
"Emit CALL assigning the result the the current slot frame.
If the calle function is known to have a return type propagate it."
If the callee function is known to have a return type propagate it."
(cl-assert call)
(setf (comp-slot)
(make-comp-mvar :slot (comp-sp)
@ -701,13 +701,13 @@ the annotation emission."
(comp-stack-adjust (- arg))
(comp-copy-slot (+ arg (comp-sp)))))))
(defun comp-emit-narg-prologue (args-min non-rest)
(defun comp-emit-narg-prologue (minarg nonrest)
"Emit the prologue for a narg function."
(cl-loop for i below args-min
(cl-loop for i below minarg
do (progn
(comp-emit `(set-args-to-local ,i))
(comp-emit '(inc-args))))
(cl-loop for i from args-min below non-rest
(cl-loop for i from minarg below nonrest
for bb = (intern (format "entry_%s" i))
for fallback = (intern (format "entry_fallback_%s" i))
do (progn
@ -717,12 +717,12 @@ the annotation emission."
(comp-emit `(set-args-to-local ,i))
(comp-emit '(inc-args)))
finally (comp-emit-jump 'entry_rest_args))
(cl-loop for i from args-min below non-rest
(cl-loop for i from minarg below nonrest
do (comp-with-sp i
(comp-emit-block (intern (format "entry_fallback_%s" i)))
(comp-emit-set-const nil)))
(comp-emit-block 'entry_rest_args)
(comp-emit `(set-rest-args-to-local ,non-rest)))
(comp-emit `(set-rest-args-to-local ,nonrest)))
(defun comp-limplify (func)
"Given FUNC compute its LIMPLE ir."

View File

@ -1019,14 +1019,14 @@ static gcc_jit_rvalue *
emit_simple_limple_call (Lisp_Object args, gcc_jit_type *ret_type)
{
int i = 0;
char *calle = (char *) SDATA (SYMBOL_NAME (FIRST (args)));
char *callee = (char *) SDATA (SYMBOL_NAME (FIRST (args)));
args = XCDR (args);
ptrdiff_t nargs = list_length (args);
gcc_jit_rvalue *gcc_args[nargs];
FOR_EACH_TAIL (args)
gcc_args[i++] = emit_mvar_val (XCAR (args));
return emit_call (calle, ret_type, nargs, gcc_args);
return emit_call (callee, ret_type, nargs, gcc_args);
}
static gcc_jit_rvalue *
@ -1052,16 +1052,16 @@ emit_simple_limple_call_void_ret (Lisp_Object args)
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 callee_sym = FIRST (args);
char *callee = (char *) SDATA (SYMBOL_NAME (callee_sym));
Lisp_Object emitter = Fgethash (callee_sym, comp.emitter_dispatcher, Qnil);
if (!NILP (emitter))
{
gcc_jit_rvalue * (* emitter_ptr) (Lisp_Object) = xmint_pointer (emitter);
return emitter_ptr (args);
}
else if (calle[0] == 'F')
else if (callee[0] == 'F')
{
return emit_simple_limple_call_lisp_ret (args);
}
@ -1074,7 +1074,7 @@ emit_limple_call_ref (Lisp_Object args)
{
/* Ex: (callref Fplus 2 0). */
char *calle = (char *) SDATA (SYMBOL_NAME (FIRST (args)));
char *callee = (char *) SDATA (SYMBOL_NAME (FIRST (args)));
EMACS_UINT nargs = XFIXNUM (SECOND (args));
EMACS_UINT base_ptr = XFIXNUM (THIRD (args));
gcc_jit_rvalue *gcc_args[2] =
@ -1083,7 +1083,7 @@ emit_limple_call_ref (Lisp_Object args)
nargs),
gcc_jit_lvalue_get_address (comp.frame[base_ptr], NULL) };
return emit_call (calle, comp.lisp_obj_type, 2, gcc_args);
return emit_call (callee, comp.lisp_obj_type, 2, gcc_args);
}
/* Register an handler for a non local exit. */
@ -2487,6 +2487,7 @@ syms_of_comp (void)
DEFSYM (Qpush_handler, "push-handler");
DEFSYM (Qpop_handler, "pop-handler");
DEFSYM (Qcondition_case, "condition-case");
/* call operands. */
DEFSYM (Qcatcher, "catcher");
DEFSYM (Qentry, "entry");
DEFSYM (Qset_internal, "set_internal");