Merge from emacs-23
[bpt/emacs.git] / src / bytecode.c
index db80f5b..b04d71a 100644 (file)
@@ -272,7 +272,7 @@ struct byte_stack *byte_stack_list;
 /* Mark objects on byte_stack_list.  Called during GC.  */
 
 void
-mark_byte_stack ()
+mark_byte_stack (void)
 {
   struct byte_stack *stack;
   Lisp_Object *obj;
@@ -301,7 +301,7 @@ mark_byte_stack ()
    counters.  Called when GC has completed.  */
 
 void
-unmark_byte_stack ()
+unmark_byte_stack (void)
 {
   struct byte_stack *stack;
 
@@ -403,8 +403,7 @@ The first argument, BYTESTR, is a string of byte code;
 the second, VECTOR, a vector of constants;
 the third, MAXDEPTH, the maximum stack depth used in this function.
 If the third argument is incorrect, Emacs may crash.  */)
-     (bytestr, vector, maxdepth)
-     Lisp_Object bytestr, vector, maxdepth;
+  (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth)
 {
   int count = SPECPDL_INDEX ();
 #ifdef BYTE_CODE_METER
@@ -505,8 +504,9 @@ If the third argument is incorrect, Emacs may crash.  */)
            v1 = vectorp[op];
            if (SYMBOLP (v1))
              {
-               v2 = SYMBOL_VALUE (v1);
-               if (MISCP (v2) || EQ (v2, Qunbound))
+               if (XSYMBOL (v1)->redirect != SYMBOL_PLAINVAL
+                   || (v2 = SYMBOL_VAL (XSYMBOL (v1)),
+                       EQ (v2, Qunbound)))
                  {
                    BEFORE_POTENTIAL_GC ();
                    v2 = Fsymbol_value (v1);
@@ -597,14 +597,13 @@ If the third argument is incorrect, Emacs may crash.  */)
            /* Inline the most common case.  */
            if (SYMBOLP (sym)
                && !EQ (val, Qunbound)
-               && !XSYMBOL (sym)->indirect_variable
-               && !SYMBOL_CONSTANT_P (sym)
-               && !MISCP (XSYMBOL (sym)->value))
-             XSYMBOL (sym)->value = val;
+               && !XSYMBOL (sym)->redirect
+               && !SYMBOL_CONSTANT_P (sym))
+             XSYMBOL (sym)->val.value = val;
            else
              {
                BEFORE_POTENTIAL_GC ();
-               set_internal (sym, val, current_buffer, 0);
+               set_internal (sym, val, Qnil, 0);
                AFTER_POTENTIAL_GC ();
              }
          }
@@ -1678,7 +1677,7 @@ If the third argument is incorrect, Emacs may crash.  */)
 }
 
 void
-syms_of_bytecode ()
+syms_of_bytecode (void)
 {
   Qbytecode = intern_c_string ("byte-code");
   staticpro (&Qbytecode);