diff options
Diffstat (limited to 'src/eval.c')
| -rw-r--r-- | src/eval.c | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/src/eval.c b/src/eval.c index a2b95172d87..a636f6c50ae 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -2153,14 +2153,6 @@ record_in_backtrace (Lisp_Object function, Lisp_Object *args, ptrdiff_t nargs) | |||
| 2153 | Lisp_Object | 2153 | Lisp_Object |
| 2154 | eval_sub (Lisp_Object form) | 2154 | eval_sub (Lisp_Object form) |
| 2155 | { | 2155 | { |
| 2156 | Lisp_Object fun, val, original_fun, original_args; | ||
| 2157 | Lisp_Object funcar; | ||
| 2158 | ptrdiff_t count; | ||
| 2159 | |||
| 2160 | /* Declare here, as this array may be accessed by call_debugger near | ||
| 2161 | the end of this function. See Bug#21245. */ | ||
| 2162 | Lisp_Object argvals[8]; | ||
| 2163 | |||
| 2164 | if (SYMBOLP (form)) | 2156 | if (SYMBOLP (form)) |
| 2165 | { | 2157 | { |
| 2166 | /* Look up its binding in the lexical environment. | 2158 | /* Look up its binding in the lexical environment. |
| @@ -2170,10 +2162,7 @@ eval_sub (Lisp_Object form) | |||
| 2170 | = !NILP (Vinternal_interpreter_environment) /* Mere optimization! */ | 2162 | = !NILP (Vinternal_interpreter_environment) /* Mere optimization! */ |
| 2171 | ? Fassq (form, Vinternal_interpreter_environment) | 2163 | ? Fassq (form, Vinternal_interpreter_environment) |
| 2172 | : Qnil; | 2164 | : Qnil; |
| 2173 | if (CONSP (lex_binding)) | 2165 | return !NILP (lex_binding) ? XCDR (lex_binding) : Fsymbol_value (form); |
| 2174 | return XCDR (lex_binding); | ||
| 2175 | else | ||
| 2176 | return Fsymbol_value (form); | ||
| 2177 | } | 2166 | } |
| 2178 | 2167 | ||
| 2179 | if (!CONSP (form)) | 2168 | if (!CONSP (form)) |
| @@ -2191,18 +2180,22 @@ eval_sub (Lisp_Object form) | |||
| 2191 | error ("Lisp nesting exceeds `max-lisp-eval-depth'"); | 2180 | error ("Lisp nesting exceeds `max-lisp-eval-depth'"); |
| 2192 | } | 2181 | } |
| 2193 | 2182 | ||
| 2194 | original_fun = XCAR (form); | 2183 | Lisp_Object original_fun = XCAR (form); |
| 2195 | original_args = XCDR (form); | 2184 | Lisp_Object original_args = XCDR (form); |
| 2196 | CHECK_LIST (original_args); | 2185 | CHECK_LIST (original_args); |
| 2197 | 2186 | ||
| 2198 | /* This also protects them from gc. */ | 2187 | /* This also protects them from gc. */ |
| 2199 | count = record_in_backtrace (original_fun, &original_args, UNEVALLED); | 2188 | ptrdiff_t count |
| 2189 | = record_in_backtrace (original_fun, &original_args, UNEVALLED); | ||
| 2200 | 2190 | ||
| 2201 | if (debug_on_next_call) | 2191 | if (debug_on_next_call) |
| 2202 | do_debug_on_call (Qt, count); | 2192 | do_debug_on_call (Qt, count); |
| 2203 | 2193 | ||
| 2204 | /* At this point, only original_fun and original_args | 2194 | Lisp_Object fun, val, funcar; |
| 2205 | have values that will be used below. */ | 2195 | /* Declare here, as this array may be accessed by call_debugger near |
| 2196 | the end of this function. See Bug#21245. */ | ||
| 2197 | Lisp_Object argvals[8]; | ||
| 2198 | |||
| 2206 | retry: | 2199 | retry: |
| 2207 | 2200 | ||
| 2208 | /* Optimize for no indirection. */ | 2201 | /* Optimize for no indirection. */ |