aboutsummaryrefslogtreecommitdiffstats
path: root/src/bytecode.c
diff options
context:
space:
mode:
authorAndrea Corallo2020-08-09 15:03:23 +0200
committerAndrea Corallo2020-08-09 15:03:23 +0200
commit12a982d9789052d8e85efcacb4b311f4876c882a (patch)
treea452a8e888c6ee9c85d6a487359b7a1c0c9fa15b /src/bytecode.c
parent80d7f710f2fab902e46aa3fddb8e1c1795420af3 (diff)
parent8e82baf5a730ff542118ddba5b76afdc1db643f6 (diff)
downloademacs-12a982d9789052d8e85efcacb4b311f4876c882a.tar.gz
emacs-12a982d9789052d8e85efcacb4b311f4876c882a.zip
Merge remote-tracking branch 'savannah/master' into HEAD
Diffstat (limited to 'src/bytecode.c')
-rw-r--r--src/bytecode.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/bytecode.c b/src/bytecode.c
index 5ac30aa1010..1913a4812a0 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -24,7 +24,6 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
24#include "character.h" 24#include "character.h"
25#include "buffer.h" 25#include "buffer.h"
26#include "keyboard.h" 26#include "keyboard.h"
27#include "ptr-bounds.h"
28#include "syntax.h" 27#include "syntax.h"
29#include "window.h" 28#include "window.h"
30 29
@@ -47,7 +46,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
47 indirect threaded, using GCC's computed goto extension. This code, 46 indirect threaded, using GCC's computed goto extension. This code,
48 as currently implemented, is incompatible with BYTE_CODE_SAFE and 47 as currently implemented, is incompatible with BYTE_CODE_SAFE and
49 BYTE_CODE_METER. */ 48 BYTE_CODE_METER. */
50#if (defined __GNUC__ && !defined __STRICT_ANSI__ && !defined __CHKP__ \ 49#if (defined __GNUC__ && !defined __STRICT_ANSI__ \
51 && !BYTE_CODE_SAFE && !defined BYTE_CODE_METER) 50 && !BYTE_CODE_SAFE && !defined BYTE_CODE_METER)
52#define BYTE_CODE_THREADED 51#define BYTE_CODE_THREADED
53#endif 52#endif
@@ -368,14 +367,12 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
368 USE_SAFE_ALLOCA; 367 USE_SAFE_ALLOCA;
369 void *alloc; 368 void *alloc;
370 SAFE_ALLOCA_LISP_EXTRA (alloc, stack_items, bytestr_length); 369 SAFE_ALLOCA_LISP_EXTRA (alloc, stack_items, bytestr_length);
371 ptrdiff_t item_bytes = stack_items * word_size; 370 Lisp_Object *stack_base = alloc;
372 Lisp_Object *stack_base = ptr_bounds_clip (alloc, item_bytes);
373 Lisp_Object *top = stack_base; 371 Lisp_Object *top = stack_base;
374 *top = vector; /* Ensure VECTOR survives GC (Bug#33014). */ 372 *top = vector; /* Ensure VECTOR survives GC (Bug#33014). */
375 Lisp_Object *stack_lim = stack_base + stack_items; 373 Lisp_Object *stack_lim = stack_base + stack_items;
376 unsigned char *bytestr_data = alloc; 374 unsigned char const *bytestr_data = memcpy (stack_lim,
377 bytestr_data = ptr_bounds_clip (bytestr_data + item_bytes, bytestr_length); 375 SDATA (bytestr), bytestr_length);
378 memcpy (bytestr_data, SDATA (bytestr), bytestr_length);
379 unsigned char const *pc = bytestr_data; 376 unsigned char const *pc = bytestr_data;
380 ptrdiff_t count = SPECPDL_INDEX (); 377 ptrdiff_t count = SPECPDL_INDEX ();
381 378