[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r109696: Inline setter functions for
From: |
Dmitry Antipov |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r109696: Inline setter functions for Lisp_Objects slots of struct specbinding. |
Date: |
Mon, 20 Aug 2012 13:39:57 +0400 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 109696
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Mon 2012-08-20 13:39:57 +0400
message:
Inline setter functions for Lisp_Objects slots of struct specbinding.
* eval.c (set_specpdl_symbol, set_specpdl_old_value): New functions.
Adjust users.
modified:
src/ChangeLog
src/eval.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2012-08-20 09:28:39 +0000
+++ b/src/ChangeLog 2012-08-20 09:39:57 +0000
@@ -1,3 +1,9 @@
+2012-08-20 Dmitry Antipov <address@hidden>
+
+ Inline setter functions for Lisp_Objects slots of struct specbinding.
+ * eval.c (set_specpdl_symbol, set_specpdl_old_value): New functions.
+ Adjust users.
+
2012-08-20 Martin Rudalics <address@hidden>
* window.c (select_window): Always make selected window's buffer
=== modified file 'src/eval.c'
--- a/src/eval.c 2012-08-17 14:24:43 +0000
+++ b/src/eval.c 2012-08-20 09:39:57 +0000
@@ -133,7 +133,21 @@
static Lisp_Object funcall_lambda (Lisp_Object, ptrdiff_t, Lisp_Object *);
static int interactive_p (int);
static Lisp_Object apply_lambda (Lisp_Object fun, Lisp_Object args);
-
+
+/* Functions to set Lisp_Object slots of struct specbinding. */
+
+static inline void
+set_specpdl_symbol (Lisp_Object symbol)
+{
+ specpdl_ptr->symbol = symbol;
+}
+
+static inline void
+set_specpdl_old_value (Lisp_Object oldval)
+{
+ specpdl_ptr->old_value = oldval;
+}
+
void
init_eval_once (void)
{
@@ -3136,8 +3150,8 @@
case SYMBOL_PLAINVAL:
/* The most common case is that of a non-constant symbol with a
trivial value. Make that as fast as we can. */
- specpdl_ptr->symbol = symbol;
- specpdl_ptr->old_value = SYMBOL_VAL (sym);
+ set_specpdl_symbol (symbol);
+ set_specpdl_old_value (SYMBOL_VAL (sym));
specpdl_ptr->func = NULL;
++specpdl_ptr;
if (!sym->constant)
@@ -3152,7 +3166,7 @@
{
Lisp_Object ovalue = find_symbol_value (symbol);
specpdl_ptr->func = 0;
- specpdl_ptr->old_value = ovalue;
+ set_specpdl_old_value (ovalue);
eassert (sym->redirect != SYMBOL_LOCALIZED
|| (EQ (SYMBOL_BLV (sym)->where,
@@ -3186,7 +3200,7 @@
let_shadows_buffer_binding_p which is itself only used
in set_internal for local_if_set. */
eassert (NILP (where) || EQ (where, cur_buf));
- specpdl_ptr->symbol = Fcons (symbol, Fcons (where, cur_buf));
+ set_specpdl_symbol (Fcons (symbol, Fcons (where, cur_buf)));
/* If SYMBOL is a per-buffer variable which doesn't have a
buffer-local value here, make the `let' change the global
@@ -3203,7 +3217,7 @@
}
}
else
- specpdl_ptr->symbol = symbol;
+ set_specpdl_symbol (symbol);
specpdl_ptr++;
set_internal (symbol, value, Qnil, 1);
@@ -3221,8 +3235,8 @@
if (specpdl_ptr == specpdl + specpdl_size)
grow_specpdl ();
specpdl_ptr->func = function;
- specpdl_ptr->symbol = Qnil;
- specpdl_ptr->old_value = arg;
+ set_specpdl_symbol (Qnil);
+ set_specpdl_old_value (arg);
specpdl_ptr++;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r109696: Inline setter functions for Lisp_Objects slots of struct specbinding.,
Dmitry Antipov <=