summaryrefslogtreecommitdiff
path: root/src/bytecode.c
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>2001-10-05 09:43:06 +0000
committerGerd Moellmann <gerd@gnu.org>2001-10-05 09:43:06 +0000
commit5133a57883deda14a69e82eb425e02784eea6486 (patch)
tree07035fb07a2161f8c044b66b59e16ac88a2ac258 /src/bytecode.c
parent9e713715867e30e0689601ae1d10f0896eebbebd (diff)
downloademacs-5133a57883deda14a69e82eb425e02784eea6486.tar.gz
(Fbyte_code) <varref>: Use SYMBOL_VALUE.
(Fbyte_code) <varset>: Simplify the test if symbol's value can be set directly.
Diffstat (limited to 'src/bytecode.c')
-rw-r--r--src/bytecode.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/bytecode.c b/src/bytecode.c
index b142e3e667e..48739234a6d 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -520,7 +520,7 @@ If the third argument is incorrect, Emacs may crash.")
v1 = vectorp[op];
if (SYMBOLP (v1))
{
- v2 = XSYMBOL (v1)->value;
+ v2 = SYMBOL_VALUE (v1);
if (MISCP (v2) || EQ (v2, Qunbound))
{
BEFORE_POTENTIAL_GC ();
@@ -626,16 +626,9 @@ If the third argument is incorrect, Emacs may crash.")
/* Inline the most common case. */
if (SYMBOLP (sym)
&& !EQ (val, Qunbound)
- && !MISCP (XSYMBOL (sym)->value)
- /* I think this should either be checked in the byte
- compiler, or there should be a flag indicating that
- a symbol might be constant in Lisp_Symbol, instead
- of checking this here over and over again. --gerd. */
- && !EQ (sym, Qnil)
- && !EQ (sym, Qt)
- && !(XSYMBOL (sym)->name->data[0] == ':'
- && EQ (XSYMBOL (sym)->obarray, initial_obarray)
- && !EQ (val, sym)))
+ && !XSYMBOL (sym)->indirect_variable
+ && !XSYMBOL (sym)->constant
+ && !MISCP (XSYMBOL (sym)->value))
XSYMBOL (sym)->value = val;
else
{