summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2016-12-23 19:01:36 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2016-12-23 19:03:03 -0800
commit078d2d37f2f6cf7478931810d099c2581ed5db29 (patch)
tree7198bc3eeb0aed3a39c81a5fbc1d5144bd760faf
parent9227b5ce0c0e9a52bcce58673cc246cb9ca4b3d1 (diff)
downloademacs-078d2d37f2f6cf7478931810d099c2581ed5db29.tar.gz
BYTE_CODE_SAFE cleanups
* src/bytecode.c (BYTE_MAINTAIN_TOP): Remove; no longer needed. (struct byte_stack) [BYTE_MAINTAIN_TOP]: Remove unused members ‘top’ and ‘bottom’. (exec_byte_code): Nest inside { } to avoid GCC warning about jumping over declaration when compiled with -DBYTE_CODE_SAFE.
-rw-r--r--src/bytecode.c29
1 files changed, 11 insertions, 18 deletions
diff --git a/src/bytecode.c b/src/bytecode.c
index c581ed6d982..06a800bef49 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -280,9 +280,6 @@ enum byte_code_op
Bset_mark = 0163, /* this loser is no longer generated as of v18 */
#endif
};
-
-/* Whether to maintain a `top' and `bottom' field in the stack frame. */
-#define BYTE_MAINTAIN_TOP BYTE_CODE_SAFE
/* Structure describing a value stack used during byte-code execution
in Fbyte_code. */
@@ -293,12 +290,6 @@ struct byte_stack
and is relocated when that string is relocated. */
const unsigned char *pc;
- /* Top and bottom of stack. The bottom points to an area of memory
- allocated with alloca in Fbyte_code. */
-#if BYTE_MAINTAIN_TOP
- Lisp_Object *top, *bottom;
-#endif
-
/* The string containing the byte-code, and its current address.
Storing this here protects it from GC because mark_byte_stack
marks it. */
@@ -760,15 +751,17 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
NEXT;
CASE (Bgotoifnonnil):
- op = FETCH2;
- Lisp_Object v1 = POP;
- if (!NILP (v1))
- {
- BYTE_CODE_QUIT;
- CHECK_RANGE (op);
- stack.pc = stack.byte_string_start + op;
- }
- NEXT;
+ {
+ op = FETCH2;
+ Lisp_Object v1 = POP;
+ if (!NILP (v1))
+ {
+ BYTE_CODE_QUIT;
+ CHECK_RANGE (op);
+ stack.pc = stack.byte_string_start + op;
+ }
+ NEXT;
+ }
CASE (Bgotoifnilelsepop):
op = FETCH2;