]> code.delx.au - gnu-emacs/blobdiff - src/bytecode.c
Add some Authors: headers based on authors.el.
[gnu-emacs] / src / bytecode.c
index f7ccd35cbba9b2cb38a6989d69b57cfed1a4d994..0ea646a9741d320f133d98c2bf58b6bc1bbd860f 100644 (file)
@@ -1,5 +1,5 @@
 /* Execution of byte code produced by bytecomp.el.
-   Copyright (C) 1985-1988, 1993, 2000-2013 Free Software Foundation,
+   Copyright (C) 1985-1988, 1993, 2000-2014 Free Software Foundation,
    Inc.
 
 This file is part of GNU Emacs.
@@ -332,7 +332,7 @@ struct byte_stack
 
 /* A list of currently active byte-code execution value stacks.
    Fbyte_code adds an entry to the head of this list before it starts
-   processing byte-code, and it removed the entry again when it is
+   processing byte-code, and it removes the entry again when it is
    done.  Signaling an error truncates the list analogous to
    gcprolist.  */
 
@@ -501,19 +501,22 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
                Lisp_Object args_template, ptrdiff_t nargs, Lisp_Object *args)
 {
   ptrdiff_t count = SPECPDL_INDEX ();
+  ptrdiff_t volatile count_volatile;
 #ifdef BYTE_CODE_METER
-  int this_op = 0;
+  int volatile this_op = 0;
   int prev_op;
 #endif
   int op;
   /* Lisp_Object v1, v2; */
   Lisp_Object *vectorp;
+  Lisp_Object *volatile vectorp_volatile;
 #ifdef BYTE_CODE_SAFE
-  ptrdiff_t const_length;
-  Lisp_Object *stacke;
-  ptrdiff_t bytestr_length;
+  ptrdiff_t volatile const_length;
+  Lisp_Object *volatile stacke;
+  ptrdiff_t volatile bytestr_length;
 #endif
   struct byte_stack stack;
+  struct byte_stack volatile stack_volatile;
   Lisp_Object *top;
   Lisp_Object result;
   enum handlertype type;
@@ -547,7 +550,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
 #ifdef BYTE_CODE_SAFE
   bytestr_length = SBYTES (bytestr);
 #endif
-  vectorp = XVECTOR (vector)->u.contents;
+  vectorp = XVECTOR (vector)->contents;
 
   stack.byte_string = bytestr;
   stack.pc = stack.byte_string_start = SDATA (bytestr);
@@ -1119,16 +1122,25 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
            PUSH_HANDLER (c, tag, type);
            c->bytecode_dest = dest;
            c->bytecode_top = top;
+           count_volatile = count;
+           stack_volatile = stack;
+           vectorp_volatile = vectorp;
+
            if (sys_setjmp (c->jmp))
              {
                struct handler *c = handlerlist;
+               int dest;
                top = c->bytecode_top;
-               int dest = c->bytecode_dest;
+               dest = c->bytecode_dest;
                handlerlist = c->next;
                PUSH (c->val);
                CHECK_RANGE (dest);
+               stack = stack_volatile;
                stack.pc = stack.byte_string_start + dest;
              }
+
+           count = count_volatile;
+           vectorp = vectorp_volatile;
            NEXT;
          }