[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 078d2d3: BYTE_CODE_SAFE cleanups
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] master 078d2d3: BYTE_CODE_SAFE cleanups |
Date: |
Sat, 24 Dec 2016 03:03:07 +0000 (UTC) |
branch: master
commit 078d2d37f2f6cf7478931810d099c2581ed5db29
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>
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.
---
src/bytecode.c | 29 +++++++++++------------------
1 file changed, 11 insertions(+), 18 deletions(-)
diff --git a/src/bytecode.c b/src/bytecode.c
index c581ed6..06a800b 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;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 078d2d3: BYTE_CODE_SAFE cleanups,
Paul Eggert <=