aboutsummaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
authorStefan Monnier2012-09-28 22:02:34 -0400
committerStefan Monnier2012-09-28 22:02:34 -0400
commite7c1b6ef850e7b4d021fabf4a922010781ed05bd (patch)
treee7dec53a158a9a5acf94f55597f31814c3138ede /src/eval.c
parent277f0cfa8b7dde109913f52c40eb8447b71eaffc (diff)
downloademacs-e7c1b6ef850e7b4d021fabf4a922010781ed05bd.tar.gz
emacs-e7c1b6ef850e7b4d021fabf4a922010781ed05bd.zip
* src/lisp.h (struct backtrace): Remove indirection for `function' field.
* src/xdisp.c (redisplay_internal): * src/profiler.c (record_backtrace, sigprof_handler_1): * src/alloc.c (Fgarbage_collect): * src/eval.c (interactive_p, Fsignal, eval_sub, Ffuncall, Fbacktrace) (Fbacktrace_frame): Adjust accordingly.
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/eval.c b/src/eval.c
index 851b2bb1129..561ba922482 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -552,7 +552,7 @@ interactive_p (void)
552 552
553 /* If this isn't a byte-compiled function, there may be a frame at 553 /* If this isn't a byte-compiled function, there may be a frame at
554 the top for Finteractive_p. If so, skip it. */ 554 the top for Finteractive_p. If so, skip it. */
555 fun = Findirect_function (*btp->function, Qnil); 555 fun = Findirect_function (btp->function, Qnil);
556 if (SUBRP (fun) && (XSUBR (fun) == &Sinteractive_p 556 if (SUBRP (fun) && (XSUBR (fun) == &Sinteractive_p
557 || XSUBR (fun) == &Scalled_interactively_p)) 557 || XSUBR (fun) == &Scalled_interactively_p))
558 btp = btp->next; 558 btp = btp->next;
@@ -565,7 +565,7 @@ interactive_p (void)
565 If this isn't a byte-compiled function, then we may now be 565 If this isn't a byte-compiled function, then we may now be
566 looking at several frames for special forms. Skip past them. */ 566 looking at several frames for special forms. Skip past them. */
567 while (btp 567 while (btp
568 && (EQ (*btp->function, Qbytecode) 568 && (EQ (btp->function, Qbytecode)
569 || btp->nargs == UNEVALLED)) 569 || btp->nargs == UNEVALLED))
570 btp = btp->next; 570 btp = btp->next;
571 571
@@ -573,13 +573,13 @@ interactive_p (void)
573 a special form, ignoring frames for Finteractive_p and/or 573 a special form, ignoring frames for Finteractive_p and/or
574 Fbytecode at the top. If this frame is for a built-in function 574 Fbytecode at the top. If this frame is for a built-in function
575 (such as load or eval-region) return false. */ 575 (such as load or eval-region) return false. */
576 fun = Findirect_function (*btp->function, Qnil); 576 fun = Findirect_function (btp->function, Qnil);
577 if (SUBRP (fun)) 577 if (SUBRP (fun))
578 return 0; 578 return 0;
579 579
580 /* `btp' points to the frame of a Lisp function that called interactive-p. 580 /* `btp' points to the frame of a Lisp function that called interactive-p.
581 Return t if that function was called interactively. */ 581 Return t if that function was called interactively. */
582 if (btp && btp->next && EQ (*btp->next->function, Qcall_interactively)) 582 if (btp && btp->next && EQ (btp->next->function, Qcall_interactively))
583 return 1; 583 return 1;
584 return 0; 584 return 0;
585} 585}
@@ -1496,10 +1496,10 @@ See also the function `condition-case'. */)
1496 if (backtrace_list && !NILP (error_symbol)) 1496 if (backtrace_list && !NILP (error_symbol))
1497 { 1497 {
1498 bp = backtrace_list->next; 1498 bp = backtrace_list->next;
1499 if (bp && bp->function && EQ (*bp->function, Qerror)) 1499 if (bp && EQ (bp->function, Qerror))
1500 bp = bp->next; 1500 bp = bp->next;
1501 if (bp && bp->function) 1501 if (bp)
1502 Vsignaling_function = *bp->function; 1502 Vsignaling_function = bp->function;
1503 } 1503 }
1504 1504
1505 for (h = handlerlist; h; h = h->next) 1505 for (h = handlerlist; h; h = h->next)
@@ -1510,7 +1510,7 @@ See also the function `condition-case'. */)
1510 } 1510 }
1511 1511
1512 if (/* Don't run the debugger for a memory-full error. 1512 if (/* Don't run the debugger for a memory-full error.
1513 (There is no room in memory to do that!) */ 1513 (There is no room in memory to do that!) */
1514 !NILP (error_symbol) 1514 !NILP (error_symbol)
1515 && (!NILP (Vdebug_on_signal) 1515 && (!NILP (Vdebug_on_signal)
1516 /* If no handler is present now, try to run the debugger. */ 1516 /* If no handler is present now, try to run the debugger. */
@@ -2045,7 +2045,7 @@ eval_sub (Lisp_Object form)
2045 original_args = XCDR (form); 2045 original_args = XCDR (form);
2046 2046
2047 backtrace.next = backtrace_list; 2047 backtrace.next = backtrace_list;
2048 backtrace.function = &original_fun; /* This also protects them from gc. */ 2048 backtrace.function = original_fun; /* This also protects them from gc. */
2049 backtrace.args = &original_args; 2049 backtrace.args = &original_args;
2050 backtrace.nargs = UNEVALLED; 2050 backtrace.nargs = UNEVALLED;
2051 backtrace.debug_on_exit = 0; 2051 backtrace.debug_on_exit = 0;
@@ -2713,7 +2713,7 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */)
2713 } 2713 }
2714 2714
2715 backtrace.next = backtrace_list; 2715 backtrace.next = backtrace_list;
2716 backtrace.function = &args[0]; 2716 backtrace.function = args[0];
2717 backtrace.args = &args[1]; /* This also GCPROs them. */ 2717 backtrace.args = &args[1]; /* This also GCPROs them. */
2718 backtrace.nargs = nargs - 1; 2718 backtrace.nargs = nargs - 1;
2719 backtrace.debug_on_exit = 0; 2719 backtrace.debug_on_exit = 0;
@@ -3289,12 +3289,12 @@ Output stream used is value of `standard-output'. */)
3289 write_string (backlist->debug_on_exit ? "* " : " ", 2); 3289 write_string (backlist->debug_on_exit ? "* " : " ", 2);
3290 if (backlist->nargs == UNEVALLED) 3290 if (backlist->nargs == UNEVALLED)
3291 { 3291 {
3292 Fprin1 (Fcons (*backlist->function, *backlist->args), Qnil); 3292 Fprin1 (Fcons (backlist->function, *backlist->args), Qnil);
3293 write_string ("\n", -1); 3293 write_string ("\n", -1);
3294 } 3294 }
3295 else 3295 else
3296 { 3296 {
3297 tem = *backlist->function; 3297 tem = backlist->function;
3298 Fprin1 (tem, Qnil); /* This can QUIT. */ 3298 Fprin1 (tem, Qnil); /* This can QUIT. */
3299 write_string ("(", -1); 3299 write_string ("(", -1);
3300 if (backlist->nargs == MANY) 3300 if (backlist->nargs == MANY)
@@ -3352,7 +3352,7 @@ If NFRAMES is more than the number of frames, the value is nil. */)
3352 if (!backlist) 3352 if (!backlist)
3353 return Qnil; 3353 return Qnil;
3354 if (backlist->nargs == UNEVALLED) 3354 if (backlist->nargs == UNEVALLED)
3355 return Fcons (Qnil, Fcons (*backlist->function, *backlist->args)); 3355 return Fcons (Qnil, Fcons (backlist->function, *backlist->args));
3356 else 3356 else
3357 { 3357 {
3358 if (backlist->nargs == MANY) /* FIXME: Can this happen? */ 3358 if (backlist->nargs == MANY) /* FIXME: Can this happen? */
@@ -3360,7 +3360,7 @@ If NFRAMES is more than the number of frames, the value is nil. */)
3360 else 3360 else
3361 tem = Flist (backlist->nargs, backlist->args); 3361 tem = Flist (backlist->nargs, backlist->args);
3362 3362
3363 return Fcons (Qt, Fcons (*backlist->function, tem)); 3363 return Fcons (Qt, Fcons (backlist->function, tem));
3364 } 3364 }
3365} 3365}
3366 3366