aboutsummaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c55
1 files changed, 27 insertions, 28 deletions
diff --git a/src/eval.c b/src/eval.c
index a9703fc0aa0..65cd87cd8ed 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -139,7 +139,7 @@ Lisp_Object Vsignaling_function;
139 139
140int handling_signal; 140int handling_signal;
141 141
142static Lisp_Object funcall_lambda (Lisp_Object, size_t, Lisp_Object *); 142static Lisp_Object funcall_lambda (Lisp_Object, ptrdiff_t, Lisp_Object *);
143static void unwind_to_catch (struct catchtag *, Lisp_Object) NO_RETURN; 143static void unwind_to_catch (struct catchtag *, Lisp_Object) NO_RETURN;
144static int interactive_p (int); 144static int interactive_p (int);
145static Lisp_Object apply_lambda (Lisp_Object fun, Lisp_Object args); 145static Lisp_Object apply_lambda (Lisp_Object fun, Lisp_Object args);
@@ -1052,7 +1052,7 @@ usage: (let VARLIST BODY...) */)
1052 Lisp_Object *temps, tem, lexenv; 1052 Lisp_Object *temps, tem, lexenv;
1053 register Lisp_Object elt, varlist; 1053 register Lisp_Object elt, varlist;
1054 int count = SPECPDL_INDEX (); 1054 int count = SPECPDL_INDEX ();
1055 register size_t argnum; 1055 ptrdiff_t argnum;
1056 struct gcpro gcpro1, gcpro2; 1056 struct gcpro gcpro1, gcpro2;
1057 USE_SAFE_ALLOCA; 1057 USE_SAFE_ALLOCA;
1058 1058
@@ -1608,8 +1608,8 @@ internal_condition_case_2 (Lisp_Object (*bfun) (Lisp_Object, Lisp_Object),
1608 and ARGS as second argument. */ 1608 and ARGS as second argument. */
1609 1609
1610Lisp_Object 1610Lisp_Object
1611internal_condition_case_n (Lisp_Object (*bfun) (size_t, Lisp_Object *), 1611internal_condition_case_n (Lisp_Object (*bfun) (ptrdiff_t, Lisp_Object *),
1612 size_t nargs, 1612 ptrdiff_t nargs,
1613 Lisp_Object *args, 1613 Lisp_Object *args,
1614 Lisp_Object handlers, 1614 Lisp_Object handlers,
1615 Lisp_Object (*hfun) (Lisp_Object)) 1615 Lisp_Object (*hfun) (Lisp_Object))
@@ -2336,7 +2336,7 @@ eval_sub (Lisp_Object form)
2336 { 2336 {
2337 /* Pass a vector of evaluated arguments. */ 2337 /* Pass a vector of evaluated arguments. */
2338 Lisp_Object *vals; 2338 Lisp_Object *vals;
2339 register size_t argnum = 0; 2339 ptrdiff_t argnum = 0;
2340 USE_SAFE_ALLOCA; 2340 USE_SAFE_ALLOCA;
2341 2341
2342 SAFE_ALLOCA_LISP (vals, XINT (numargs)); 2342 SAFE_ALLOCA_LISP (vals, XINT (numargs));
@@ -2466,9 +2466,9 @@ DEFUN ("apply", Fapply, Sapply, 2, MANY, 0,
2466Then return the value FUNCTION returns. 2466Then return the value FUNCTION returns.
2467Thus, (apply '+ 1 2 '(3 4)) returns 10. 2467Thus, (apply '+ 1 2 '(3 4)) returns 10.
2468usage: (apply FUNCTION &rest ARGUMENTS) */) 2468usage: (apply FUNCTION &rest ARGUMENTS) */)
2469 (size_t nargs, Lisp_Object *args) 2469 (ptrdiff_t nargs, Lisp_Object *args)
2470{ 2470{
2471 register size_t i, numargs; 2471 ptrdiff_t i, numargs;
2472 register Lisp_Object spread_arg; 2472 register Lisp_Object spread_arg;
2473 register Lisp_Object *funcall_args; 2473 register Lisp_Object *funcall_args;
2474 Lisp_Object fun, retval; 2474 Lisp_Object fun, retval;
@@ -2550,7 +2550,7 @@ usage: (apply FUNCTION &rest ARGUMENTS) */)
2550/* Run hook variables in various ways. */ 2550/* Run hook variables in various ways. */
2551 2551
2552static Lisp_Object 2552static Lisp_Object
2553funcall_nil (size_t nargs, Lisp_Object *args) 2553funcall_nil (ptrdiff_t nargs, Lisp_Object *args)
2554{ 2554{
2555 Ffuncall (nargs, args); 2555 Ffuncall (nargs, args);
2556 return Qnil; 2556 return Qnil;
@@ -2571,10 +2571,10 @@ hook; they should use `run-mode-hooks' instead.
2571Do not use `make-local-variable' to make a hook variable buffer-local. 2571Do not use `make-local-variable' to make a hook variable buffer-local.
2572Instead, use `add-hook' and specify t for the LOCAL argument. 2572Instead, use `add-hook' and specify t for the LOCAL argument.
2573usage: (run-hooks &rest HOOKS) */) 2573usage: (run-hooks &rest HOOKS) */)
2574 (size_t nargs, Lisp_Object *args) 2574 (ptrdiff_t nargs, Lisp_Object *args)
2575{ 2575{
2576 Lisp_Object hook[1]; 2576 Lisp_Object hook[1];
2577 register size_t i; 2577 ptrdiff_t i;
2578 2578
2579 for (i = 0; i < nargs; i++) 2579 for (i = 0; i < nargs; i++)
2580 { 2580 {
@@ -2600,7 +2600,7 @@ as that may change.
2600Do not use `make-local-variable' to make a hook variable buffer-local. 2600Do not use `make-local-variable' to make a hook variable buffer-local.
2601Instead, use `add-hook' and specify t for the LOCAL argument. 2601Instead, use `add-hook' and specify t for the LOCAL argument.
2602usage: (run-hook-with-args HOOK &rest ARGS) */) 2602usage: (run-hook-with-args HOOK &rest ARGS) */)
2603 (size_t nargs, Lisp_Object *args) 2603 (ptrdiff_t nargs, Lisp_Object *args)
2604{ 2604{
2605 return run_hook_with_args (nargs, args, funcall_nil); 2605 return run_hook_with_args (nargs, args, funcall_nil);
2606} 2606}
@@ -2620,13 +2620,13 @@ However, if they all return nil, we return nil.
2620Do not use `make-local-variable' to make a hook variable buffer-local. 2620Do not use `make-local-variable' to make a hook variable buffer-local.
2621Instead, use `add-hook' and specify t for the LOCAL argument. 2621Instead, use `add-hook' and specify t for the LOCAL argument.
2622usage: (run-hook-with-args-until-success HOOK &rest ARGS) */) 2622usage: (run-hook-with-args-until-success HOOK &rest ARGS) */)
2623 (size_t nargs, Lisp_Object *args) 2623 (ptrdiff_t nargs, Lisp_Object *args)
2624{ 2624{
2625 return run_hook_with_args (nargs, args, Ffuncall); 2625 return run_hook_with_args (nargs, args, Ffuncall);
2626} 2626}
2627 2627
2628static Lisp_Object 2628static Lisp_Object
2629funcall_not (size_t nargs, Lisp_Object *args) 2629funcall_not (ptrdiff_t nargs, Lisp_Object *args)
2630{ 2630{
2631 return NILP (Ffuncall (nargs, args)) ? Qt : Qnil; 2631 return NILP (Ffuncall (nargs, args)) ? Qt : Qnil;
2632} 2632}
@@ -2645,13 +2645,13 @@ Then we return nil. However, if they all return non-nil, we return non-nil.
2645Do not use `make-local-variable' to make a hook variable buffer-local. 2645Do not use `make-local-variable' to make a hook variable buffer-local.
2646Instead, use `add-hook' and specify t for the LOCAL argument. 2646Instead, use `add-hook' and specify t for the LOCAL argument.
2647usage: (run-hook-with-args-until-failure HOOK &rest ARGS) */) 2647usage: (run-hook-with-args-until-failure HOOK &rest ARGS) */)
2648 (size_t nargs, Lisp_Object *args) 2648 (ptrdiff_t nargs, Lisp_Object *args)
2649{ 2649{
2650 return NILP (run_hook_with_args (nargs, args, funcall_not)) ? Qt : Qnil; 2650 return NILP (run_hook_with_args (nargs, args, funcall_not)) ? Qt : Qnil;
2651} 2651}
2652 2652
2653static Lisp_Object 2653static Lisp_Object
2654run_hook_wrapped_funcall (size_t nargs, Lisp_Object *args) 2654run_hook_wrapped_funcall (ptrdiff_t nargs, Lisp_Object *args)
2655{ 2655{
2656 Lisp_Object tmp = args[0], ret; 2656 Lisp_Object tmp = args[0], ret;
2657 args[0] = args[1]; 2657 args[0] = args[1];
@@ -2669,7 +2669,7 @@ it calls WRAP-FUNCTION with arguments FUN and ARGS.
2669As soon as a call to WRAP-FUNCTION returns non-nil, `run-hook-wrapped' 2669As soon as a call to WRAP-FUNCTION returns non-nil, `run-hook-wrapped'
2670aborts and returns that value. 2670aborts and returns that value.
2671usage: (run-hook-wrapped HOOK WRAP-FUNCTION &rest ARGS) */) 2671usage: (run-hook-wrapped HOOK WRAP-FUNCTION &rest ARGS) */)
2672 (size_t nargs, Lisp_Object *args) 2672 (ptrdiff_t nargs, Lisp_Object *args)
2673{ 2673{
2674 return run_hook_with_args (nargs, args, run_hook_wrapped_funcall); 2674 return run_hook_with_args (nargs, args, run_hook_wrapped_funcall);
2675} 2675}
@@ -2682,8 +2682,8 @@ usage: (run-hook-wrapped HOOK WRAP-FUNCTION &rest ARGS) */)
2682 except that it isn't necessary to gcpro ARGS[0]. */ 2682 except that it isn't necessary to gcpro ARGS[0]. */
2683 2683
2684Lisp_Object 2684Lisp_Object
2685run_hook_with_args (size_t nargs, Lisp_Object *args, 2685run_hook_with_args (ptrdiff_t nargs, Lisp_Object *args,
2686 Lisp_Object (*funcall) (size_t nargs, Lisp_Object *args)) 2686 Lisp_Object (*funcall) (ptrdiff_t nargs, Lisp_Object *args))
2687{ 2687{
2688 Lisp_Object sym, val, ret = Qnil; 2688 Lisp_Object sym, val, ret = Qnil;
2689 struct gcpro gcpro1, gcpro2, gcpro3; 2689 struct gcpro gcpro1, gcpro2, gcpro3;
@@ -2956,16 +2956,16 @@ DEFUN ("funcall", Ffuncall, Sfuncall, 1, MANY, 0,
2956Return the value that function returns. 2956Return the value that function returns.
2957Thus, (funcall 'cons 'x 'y) returns (x . y). 2957Thus, (funcall 'cons 'x 'y) returns (x . y).
2958usage: (funcall FUNCTION &rest ARGUMENTS) */) 2958usage: (funcall FUNCTION &rest ARGUMENTS) */)
2959 (size_t nargs, Lisp_Object *args) 2959 (ptrdiff_t nargs, Lisp_Object *args)
2960{ 2960{
2961 Lisp_Object fun, original_fun; 2961 Lisp_Object fun, original_fun;
2962 Lisp_Object funcar; 2962 Lisp_Object funcar;
2963 size_t numargs = nargs - 1; 2963 ptrdiff_t numargs = nargs - 1;
2964 Lisp_Object lisp_numargs; 2964 Lisp_Object lisp_numargs;
2965 Lisp_Object val; 2965 Lisp_Object val;
2966 struct backtrace backtrace; 2966 struct backtrace backtrace;
2967 register Lisp_Object *internal_args; 2967 register Lisp_Object *internal_args;
2968 register size_t i; 2968 ptrdiff_t i;
2969 2969
2970 QUIT; 2970 QUIT;
2971 if ((consing_since_gc > gc_cons_threshold 2971 if ((consing_since_gc > gc_cons_threshold
@@ -3119,14 +3119,13 @@ static Lisp_Object
3119apply_lambda (Lisp_Object fun, Lisp_Object args) 3119apply_lambda (Lisp_Object fun, Lisp_Object args)
3120{ 3120{
3121 Lisp_Object args_left; 3121 Lisp_Object args_left;
3122 size_t numargs; 3122 ptrdiff_t i, numargs;
3123 register Lisp_Object *arg_vector; 3123 register Lisp_Object *arg_vector;
3124 struct gcpro gcpro1, gcpro2, gcpro3; 3124 struct gcpro gcpro1, gcpro2, gcpro3;
3125 register size_t i;
3126 register Lisp_Object tem; 3125 register Lisp_Object tem;
3127 USE_SAFE_ALLOCA; 3126 USE_SAFE_ALLOCA;
3128 3127
3129 numargs = XINT (Flength (args)); 3128 numargs = XFASTINT (Flength (args));
3130 SAFE_ALLOCA_LISP (arg_vector, numargs); 3129 SAFE_ALLOCA_LISP (arg_vector, numargs);
3131 args_left = args; 3130 args_left = args;
3132 3131
@@ -3162,12 +3161,12 @@ apply_lambda (Lisp_Object fun, Lisp_Object args)
3162 FUN must be either a lambda-expression or a compiled-code object. */ 3161 FUN must be either a lambda-expression or a compiled-code object. */
3163 3162
3164static Lisp_Object 3163static Lisp_Object
3165funcall_lambda (Lisp_Object fun, size_t nargs, 3164funcall_lambda (Lisp_Object fun, ptrdiff_t nargs,
3166 register Lisp_Object *arg_vector) 3165 register Lisp_Object *arg_vector)
3167{ 3166{
3168 Lisp_Object val, syms_left, next, lexenv; 3167 Lisp_Object val, syms_left, next, lexenv;
3169 int count = SPECPDL_INDEX (); 3168 int count = SPECPDL_INDEX ();
3170 size_t i; 3169 ptrdiff_t i;
3171 int optional, rest; 3170 int optional, rest;
3172 3171
3173 if (CONSP (fun)) 3172 if (CONSP (fun))
@@ -3584,7 +3583,7 @@ Output stream used is value of `standard-output'. */)
3584 } 3583 }
3585 else 3584 else
3586 { 3585 {
3587 size_t i; 3586 ptrdiff_t i;
3588 for (i = 0; i < backlist->nargs; i++) 3587 for (i = 0; i < backlist->nargs; i++)
3589 { 3588 {
3590 if (i) write_string (" ", -1); 3589 if (i) write_string (" ", -1);
@@ -3644,7 +3643,7 @@ void
3644mark_backtrace (void) 3643mark_backtrace (void)
3645{ 3644{
3646 register struct backtrace *backlist; 3645 register struct backtrace *backlist;
3647 register size_t i; 3646 ptrdiff_t i;
3648 3647
3649 for (backlist = backtrace_list; backlist; backlist = backlist->next) 3648 for (backlist = backtrace_list; backlist; backlist = backlist->next)
3650 { 3649 {