changeset 39573:b17103d5e3c8

(Fbyte_code) <varref>: Use SYMBOL_VALUE. (Fbyte_code) <varset>: Simplify the test if symbol's value can be set directly.
author Gerd Moellmann <gerd@gnu.org>
date Fri, 05 Oct 2001 09:43:06 +0000
parents 715a67381594
children bdd381bc9eb0
files src/bytecode.c
diffstat 1 files changed, 4 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/src/bytecode.c	Fri Oct 05 09:42:02 2001 +0000
+++ b/src/bytecode.c	Fri Oct 05 09:43:06 2001 +0000
@@ -520,7 +520,7 @@
 	    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 @@
 	    /* 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
 	      {