emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 29f645d: * src/bytecode.c: Fix compilation with BYT


From: Stefan Monnier
Subject: [Emacs-diffs] master 29f645d: * src/bytecode.c: Fix compilation with BYTE_CODE_SAFE
Date: Thu, 21 Jul 2016 15:13:05 +0000 (UTC)

branch: master
commit 29f645d5262b1dee9118c6eb29c4ed462396444f
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>

    * src/bytecode.c: Fix compilation with BYTE_CODE_SAFE
    
    (struct byte_stack): Re-add `bottom'.
    (exec_byte_code): Initialize it.
---
 src/bytecode.c |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/bytecode.c b/src/bytecode.c
index 8b700b0..05bc9fc 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -288,6 +288,12 @@ struct byte_stack
      and is relocated when that string is relocated.  */
   const unsigned char *pc;
 
+  /* bottom of stack.  The bottom points to an area of memory
+     allocated with alloca in Fbyte_code.  */
+#ifdef BYTE_CODE_SAFE
+  Lisp_Object *bottom;
+#endif
+
   /* The string containing the byte-code, and its current address.
      Storing this here protects it from GC.  */
   Lisp_Object byte_string;
@@ -460,6 +466,9 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, 
Lisp_Object maxdepth,
   if (MAX_ALLOCA / word_size <= XFASTINT (maxdepth))
     memory_full (SIZE_MAX);
   top = alloca ((XFASTINT (maxdepth) + 1) * sizeof *top);
+#ifdef BYTE_CODE_SAFE
+  stack.bottom = top + 1;
+#endif
   stack.next = byte_stack_list;
   byte_stack_list = &stack;
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]