aboutsummaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
authorJoakim Verona2012-08-15 21:49:40 +0200
committerJoakim Verona2012-08-15 21:49:40 +0200
commitb648c26ec642a1dc58c0bd7e59d6011b964dbe37 (patch)
treef0f3b38ffa9054702f475fc53622e28da14f97b1 /src/eval.c
parentc8b0fc1999006af5a4317b44068fac13d9592143 (diff)
parent94c9ece10275f8ca9323c38f93607f1046035c79 (diff)
downloademacs-b648c26ec642a1dc58c0bd7e59d6011b964dbe37.tar.gz
emacs-b648c26ec642a1dc58c0bd7e59d6011b964dbe37.zip
upstream
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/eval.c b/src/eval.c
index 64f384f2ca9..b531f790cc5 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -976,7 +976,7 @@ definitions to shadow the loaded ones for use in file byte-compilation. */)
976 tem = Fassq (sym, environment); 976 tem = Fassq (sym, environment);
977 if (NILP (tem)) 977 if (NILP (tem))
978 { 978 {
979 def = SVAR (XSYMBOL (sym), function); 979 def = XSYMBOL (sym)->function;
980 if (!EQ (def, Qunbound)) 980 if (!EQ (def, Qunbound))
981 continue; 981 continue;
982 } 982 }
@@ -1399,7 +1399,9 @@ internal_condition_case_n (Lisp_Object (*bfun) (ptrdiff_t, Lisp_Object *),
1399 ptrdiff_t nargs, 1399 ptrdiff_t nargs,
1400 Lisp_Object *args, 1400 Lisp_Object *args,
1401 Lisp_Object handlers, 1401 Lisp_Object handlers,
1402 Lisp_Object (*hfun) (Lisp_Object)) 1402 Lisp_Object (*hfun) (Lisp_Object err,
1403 ptrdiff_t nargs,
1404 Lisp_Object *args))
1403{ 1405{
1404 Lisp_Object val; 1406 Lisp_Object val;
1405 struct catchtag c; 1407 struct catchtag c;
@@ -1417,7 +1419,7 @@ internal_condition_case_n (Lisp_Object (*bfun) (ptrdiff_t, Lisp_Object *),
1417 c.byte_stack = byte_stack_list; 1419 c.byte_stack = byte_stack_list;
1418 if (_setjmp (c.jmp)) 1420 if (_setjmp (c.jmp))
1419 { 1421 {
1420 return (*hfun) (c.val); 1422 return (*hfun) (c.val, nargs, args);
1421 } 1423 }
1422 c.next = catchlist; 1424 c.next = catchlist;
1423 catchlist = &c; 1425 catchlist = &c;
@@ -1893,9 +1895,9 @@ this does nothing and returns nil. */)
1893 CHECK_STRING (file); 1895 CHECK_STRING (file);
1894 1896
1895 /* If function is defined and not as an autoload, don't override. */ 1897 /* If function is defined and not as an autoload, don't override. */
1896 if (!EQ (SVAR (XSYMBOL (function), function), Qunbound) 1898 if (!EQ (XSYMBOL (function)->function, Qunbound)
1897 && !(CONSP (SVAR (XSYMBOL (function), function)) 1899 && !(CONSP (XSYMBOL (function)->function)
1898 && EQ (XCAR (SVAR (XSYMBOL (function), function)), Qautoload))) 1900 && EQ (XCAR (XSYMBOL (function)->function), Qautoload)))
1899 return Qnil; 1901 return Qnil;
1900 1902
1901 if (NILP (Vpurify_flag)) 1903 if (NILP (Vpurify_flag))
@@ -2081,7 +2083,7 @@ eval_sub (Lisp_Object form)
2081 /* Optimize for no indirection. */ 2083 /* Optimize for no indirection. */
2082 fun = original_fun; 2084 fun = original_fun;
2083 if (SYMBOLP (fun) && !EQ (fun, Qunbound) 2085 if (SYMBOLP (fun) && !EQ (fun, Qunbound)
2084 && (fun = SVAR (XSYMBOL (fun), function), SYMBOLP (fun))) 2086 && (fun = XSYMBOL (fun)->function, SYMBOLP (fun)))
2085 fun = indirect_function (fun); 2087 fun = indirect_function (fun);
2086 2088
2087 if (SUBRP (fun)) 2089 if (SUBRP (fun))
@@ -2266,7 +2268,7 @@ usage: (apply FUNCTION &rest ARGUMENTS) */)
2266 2268
2267 /* Optimize for no indirection. */ 2269 /* Optimize for no indirection. */
2268 if (SYMBOLP (fun) && !EQ (fun, Qunbound) 2270 if (SYMBOLP (fun) && !EQ (fun, Qunbound)
2269 && (fun = SVAR (XSYMBOL (fun), function), SYMBOLP (fun))) 2271 && (fun = XSYMBOL (fun)->function, SYMBOLP (fun)))
2270 fun = indirect_function (fun); 2272 fun = indirect_function (fun);
2271 if (EQ (fun, Qunbound)) 2273 if (EQ (fun, Qunbound))
2272 { 2274 {
@@ -2301,7 +2303,7 @@ usage: (apply FUNCTION &rest ARGUMENTS) */)
2301 gcpro1.nvars = 1 + numargs; 2303 gcpro1.nvars = 1 + numargs;
2302 } 2304 }
2303 2305
2304 memcpy (funcall_args, args, nargs * sizeof (Lisp_Object)); 2306 memcpy (funcall_args, args, nargs * word_size);
2305 /* Spread the last arg we got. Its first element goes in 2307 /* Spread the last arg we got. Its first element goes in
2306 the slot that it used to occupy, hence this value of I. */ 2308 the slot that it used to occupy, hence this value of I. */
2307 i = nargs - 1; 2309 i = nargs - 1;
@@ -2771,7 +2773,7 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */)
2771 /* Optimize for no indirection. */ 2773 /* Optimize for no indirection. */
2772 fun = original_fun; 2774 fun = original_fun;
2773 if (SYMBOLP (fun) && !EQ (fun, Qunbound) 2775 if (SYMBOLP (fun) && !EQ (fun, Qunbound)
2774 && (fun = SVAR (XSYMBOL (fun), function), SYMBOLP (fun))) 2776 && (fun = XSYMBOL (fun)->function, SYMBOLP (fun)))
2775 fun = indirect_function (fun); 2777 fun = indirect_function (fun);
2776 2778
2777 if (SUBRP (fun)) 2779 if (SUBRP (fun))
@@ -2794,7 +2796,7 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */)
2794 { 2796 {
2795 internal_args = alloca (XSUBR (fun)->max_args 2797 internal_args = alloca (XSUBR (fun)->max_args
2796 * sizeof *internal_args); 2798 * sizeof *internal_args);
2797 memcpy (internal_args, args + 1, numargs * sizeof (Lisp_Object)); 2799 memcpy (internal_args, args + 1, numargs * word_size);
2798 for (i = numargs; i < XSUBR (fun)->max_args; i++) 2800 for (i = numargs; i < XSUBR (fun)->max_args; i++)
2799 internal_args[i] = Qnil; 2801 internal_args[i] = Qnil;
2800 } 2802 }
@@ -3254,7 +3256,7 @@ unbind_to (ptrdiff_t count, Lisp_Object value)
3254 local binding, but only if that binding still exists. */ 3256 local binding, but only if that binding still exists. */
3255 else if (BUFFERP (where) 3257 else if (BUFFERP (where)
3256 ? !NILP (Flocal_variable_p (symbol, where)) 3258 ? !NILP (Flocal_variable_p (symbol, where))
3257 : !NILP (Fassq (symbol, FVAR (XFRAME (where), param_alist)))) 3259 : !NILP (Fassq (symbol, XFRAME (where)->param_alist)))
3258 set_internal (symbol, this_binding.old_value, where, 1); 3260 set_internal (symbol, this_binding.old_value, where, 1);
3259 } 3261 }
3260 /* If variable has a trivial value (no forwarding), we can 3262 /* If variable has a trivial value (no forwarding), we can