From 078d2d37f2f6cf7478931810d099c2581ed5db29 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 23 Dec 2016 19:01:36 -0800 Subject: [PATCH] BYTE_CODE_SAFE cleanups MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * 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. --- src/bytecode.c | 29 +++++++++++------------------ 1 file 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; -- 2.39.2