diff options
| author | Stefan Monnier | 2016-07-21 11:12:59 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2016-07-21 11:12:59 -0400 |
| commit | 29f645d5262b1dee9118c6eb29c4ed462396444f (patch) | |
| tree | a2f570226132ae41fc821a50c233f40ff688f282 /src/bytecode.c | |
| parent | cf23d8e9d3d3b4165a9d94759895ee1c022ab0ef (diff) | |
| download | emacs-29f645d5262b1dee9118c6eb29c4ed462396444f.tar.gz emacs-29f645d5262b1dee9118c6eb29c4ed462396444f.zip | |
* src/bytecode.c: Fix compilation with BYTE_CODE_SAFE
(struct byte_stack): Re-add `bottom'.
(exec_byte_code): Initialize it.
Diffstat (limited to 'src/bytecode.c')
| -rw-r--r-- | src/bytecode.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/bytecode.c b/src/bytecode.c index 8b700b0312a..05bc9fcdb08 100644 --- a/src/bytecode.c +++ b/src/bytecode.c | |||
| @@ -288,6 +288,12 @@ struct byte_stack | |||
| 288 | and is relocated when that string is relocated. */ | 288 | and is relocated when that string is relocated. */ |
| 289 | const unsigned char *pc; | 289 | const unsigned char *pc; |
| 290 | 290 | ||
| 291 | /* bottom of stack. The bottom points to an area of memory | ||
| 292 | allocated with alloca in Fbyte_code. */ | ||
| 293 | #ifdef BYTE_CODE_SAFE | ||
| 294 | Lisp_Object *bottom; | ||
| 295 | #endif | ||
| 296 | |||
| 291 | /* The string containing the byte-code, and its current address. | 297 | /* The string containing the byte-code, and its current address. |
| 292 | Storing this here protects it from GC. */ | 298 | Storing this here protects it from GC. */ |
| 293 | Lisp_Object byte_string; | 299 | Lisp_Object byte_string; |
| @@ -460,6 +466,9 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, | |||
| 460 | if (MAX_ALLOCA / word_size <= XFASTINT (maxdepth)) | 466 | if (MAX_ALLOCA / word_size <= XFASTINT (maxdepth)) |
| 461 | memory_full (SIZE_MAX); | 467 | memory_full (SIZE_MAX); |
| 462 | top = alloca ((XFASTINT (maxdepth) + 1) * sizeof *top); | 468 | top = alloca ((XFASTINT (maxdepth) + 1) * sizeof *top); |
| 469 | #ifdef BYTE_CODE_SAFE | ||
| 470 | stack.bottom = top + 1; | ||
| 471 | #endif | ||
| 463 | stack.next = byte_stack_list; | 472 | stack.next = byte_stack_list; |
| 464 | byte_stack_list = &stack; | 473 | byte_stack_list = &stack; |
| 465 | 474 | ||