[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r104830: * eval.c (struct backtrace):
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r104830: * eval.c (struct backtrace): Simplify and port the data structure. |
Date: |
Thu, 30 Jun 2011 22:12:00 -0700 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 104830
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Thu 2011-06-30 22:12:00 -0700
message:
* eval.c (struct backtrace): Simplify and port the data structure.
Do not assume that "int nargs : BITS_PER_INT - 2;" produces a
signed bit field, as this assumption is not portable and it makes
Emacs crash when compiled with Sun C 5.8 on sparc. Do not use
"char debug_on_exit : 1" as this is not portable either; instead,
use the portable "unsigned int debug_on_exit : 1". Remove unused
member evalargs. Remove obsolete comments about cc bombing out.
modified:
src/ChangeLog
src/eval.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2011-06-30 15:07:40 +0000
+++ b/src/ChangeLog 2011-07-01 05:12:00 +0000
@@ -1,3 +1,13 @@
+2011-07-01 Paul Eggert <address@hidden>
+
+ * eval.c (struct backtrace): Simplify and port the data structure.
+ Do not assume that "int nargs : BITS_PER_INT - 2;" produces a
+ signed bit field, as this assumption is not portable and it makes
+ Emacs crash when compiled with Sun C 5.8 on sparc. Do not use
+ "char debug_on_exit : 1" as this is not portable either; instead,
+ use the portable "unsigned int debug_on_exit : 1". Remove unused
+ member evalargs. Remove obsolete comments about cc bombing out.
+
2011-06-30 Jan Djärv <address@hidden>
* xsettings.c: Include glib-object.h, gio/gio.h if HAVE_GSETTINGS.
=== modified file 'src/eval.c'
--- a/src/eval.c 2011-06-24 21:25:22 +0000
+++ b/src/eval.c 2011-07-01 05:12:00 +0000
@@ -32,25 +32,14 @@
#include "xterm.h"
#endif
-/* This definition is duplicated in alloc.c and keyboard.c. */
-/* Putting it in lisp.h makes cc bomb out! */
-
struct backtrace
{
struct backtrace *next;
Lisp_Object *function;
Lisp_Object *args; /* Points to vector of args. */
-#define NARGS_BITS (BITS_PER_INT - 2)
- /* Let's not use size_t because we want to allow negative values (for
- UNEVALLED). Also let's steal 2 bits so we save a word (or more for
- alignment). In any case I doubt Emacs would survive a function call with
- more than 500M arguments. */
- int nargs : NARGS_BITS; /* Length of vector.
- If nargs is UNEVALLED, args points
- to slot holding list of unevalled args. */
- char evalargs : 1;
+ ptrdiff_t nargs; /* Length of vector. */
/* Nonzero means call value of debugger when done with this operation. */
- char debug_on_exit : 1;
+ unsigned int debug_on_exit : 1;
};
static struct backtrace *backtrace_list;
@@ -2291,7 +2280,6 @@
backtrace.function = &original_fun; /* This also protects them from gc. */
backtrace.args = &original_args;
backtrace.nargs = UNEVALLED;
- backtrace.evalargs = 1;
backtrace.debug_on_exit = 0;
if (debug_on_next_call)
@@ -2325,10 +2313,7 @@
xsignal2 (Qwrong_number_of_arguments, original_fun, numargs);
else if (XSUBR (fun)->max_args == UNEVALLED)
- {
- backtrace.evalargs = 0;
- val = (XSUBR (fun)->function.aUNEVALLED) (args_left);
- }
+ val = (XSUBR (fun)->function.aUNEVALLED) (args_left);
else if (XSUBR (fun)->max_args == MANY)
{
/* Pass a vector of evaluated arguments. */
@@ -2984,7 +2969,6 @@
backtrace.function = &args[0];
backtrace.args = &args[1];
backtrace.nargs = nargs - 1;
- backtrace.evalargs = 0;
backtrace.debug_on_exit = 0;
if (debug_on_next_call)
@@ -3141,7 +3125,6 @@
backtrace_list->args = arg_vector;
backtrace_list->nargs = i;
- backtrace_list->evalargs = 0;
tem = funcall_lambda (fun, numargs, arg_vector);
/* Do the debug-on-exit now, while arg_vector still exists. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r104830: * eval.c (struct backtrace): Simplify and port the data structure.,
Paul Eggert <=