diff options
| author | Paul Eggert | 2016-12-23 19:01:36 -0800 |
|---|---|---|
| committer | Paul Eggert | 2016-12-23 19:03:03 -0800 |
| commit | 078d2d37f2f6cf7478931810d099c2581ed5db29 (patch) | |
| tree | 7198bc3eeb0aed3a39c81a5fbc1d5144bd760faf /src/bytecode.c | |
| parent | 9227b5ce0c0e9a52bcce58673cc246cb9ca4b3d1 (diff) | |
| download | emacs-078d2d37f2f6cf7478931810d099c2581ed5db29.tar.gz emacs-078d2d37f2f6cf7478931810d099c2581ed5db29.zip | |
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.
Diffstat (limited to 'src/bytecode.c')
| -rw-r--r-- | src/bytecode.c | 29 |
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 | |||
| 280 | Bset_mark = 0163, /* this loser is no longer generated as of v18 */ | 280 | Bset_mark = 0163, /* this loser is no longer generated as of v18 */ |
| 281 | #endif | 281 | #endif |
| 282 | }; | 282 | }; |
| 283 | |||
| 284 | /* Whether to maintain a `top' and `bottom' field in the stack frame. */ | ||
| 285 | #define BYTE_MAINTAIN_TOP BYTE_CODE_SAFE | ||
| 286 | 283 | ||
| 287 | /* Structure describing a value stack used during byte-code execution | 284 | /* Structure describing a value stack used during byte-code execution |
| 288 | in Fbyte_code. */ | 285 | in Fbyte_code. */ |
| @@ -293,12 +290,6 @@ struct byte_stack | |||
| 293 | and is relocated when that string is relocated. */ | 290 | and is relocated when that string is relocated. */ |
| 294 | const unsigned char *pc; | 291 | const unsigned char *pc; |
| 295 | 292 | ||
| 296 | /* Top and bottom of stack. The bottom points to an area of memory | ||
| 297 | allocated with alloca in Fbyte_code. */ | ||
| 298 | #if BYTE_MAINTAIN_TOP | ||
| 299 | Lisp_Object *top, *bottom; | ||
| 300 | #endif | ||
| 301 | |||
| 302 | /* The string containing the byte-code, and its current address. | 293 | /* The string containing the byte-code, and its current address. |
| 303 | Storing this here protects it from GC because mark_byte_stack | 294 | Storing this here protects it from GC because mark_byte_stack |
| 304 | marks it. */ | 295 | marks it. */ |
| @@ -760,15 +751,17 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, | |||
| 760 | NEXT; | 751 | NEXT; |
| 761 | 752 | ||
| 762 | CASE (Bgotoifnonnil): | 753 | CASE (Bgotoifnonnil): |
| 763 | op = FETCH2; | 754 | { |
| 764 | Lisp_Object v1 = POP; | 755 | op = FETCH2; |
| 765 | if (!NILP (v1)) | 756 | Lisp_Object v1 = POP; |
| 766 | { | 757 | if (!NILP (v1)) |
| 767 | BYTE_CODE_QUIT; | 758 | { |
| 768 | CHECK_RANGE (op); | 759 | BYTE_CODE_QUIT; |
| 769 | stack.pc = stack.byte_string_start + op; | 760 | CHECK_RANGE (op); |
| 770 | } | 761 | stack.pc = stack.byte_string_start + op; |
| 771 | NEXT; | 762 | } |
| 763 | NEXT; | ||
| 764 | } | ||
| 772 | 765 | ||
| 773 | CASE (Bgotoifnilelsepop): | 766 | CASE (Bgotoifnilelsepop): |
| 774 | op = FETCH2; | 767 | op = FETCH2; |