diff options
Diffstat (limited to 'src/bytecode.c')
| -rw-r--r-- | src/bytecode.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/bytecode.c b/src/bytecode.c index 6b7e9cbc7b9..8e3cddf7851 100644 --- a/src/bytecode.c +++ b/src/bytecode.c | |||
| @@ -311,6 +311,10 @@ enum byte_code_op | |||
| 311 | 311 | ||
| 312 | #define TOP (*top) | 312 | #define TOP (*top) |
| 313 | 313 | ||
| 314 | /* Update the thread's bytecode offset, just before NEXT. */ | ||
| 315 | |||
| 316 | #define UPDATE_OFFSET (backtrace_byte_offset = pc - bytestr_data) | ||
| 317 | |||
| 314 | DEFUN ("byte-code", Fbyte_code, Sbyte_code, 3, 3, 0, | 318 | DEFUN ("byte-code", Fbyte_code, Sbyte_code, 3, 3, 0, |
| 315 | doc: /* Function used internally in byte-compiled code. | 319 | doc: /* Function used internally in byte-compiled code. |
| 316 | The first argument, BYTESTR, is a string of byte code; | 320 | The first argument, BYTESTR, is a string of byte code; |
| @@ -424,14 +428,13 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, | |||
| 424 | Threading provides a performance boost. These macros are how | 428 | Threading provides a performance boost. These macros are how |
| 425 | we allow the code to be compiled both ways. */ | 429 | we allow the code to be compiled both ways. */ |
| 426 | #ifdef BYTE_CODE_THREADED | 430 | #ifdef BYTE_CODE_THREADED |
| 427 | #define UPDATE_OFFSET (backtrace_byte_offset = pc - bytestr_data); | ||
| 428 | /* The CASE macro introduces an instruction's body. It is | 431 | /* The CASE macro introduces an instruction's body. It is |
| 429 | either a label or a case label. */ | 432 | either a label or a case label. */ |
| 430 | #define CASE(OP) insn_ ## OP | 433 | #define CASE(OP) insn_ ## OP |
| 431 | /* NEXT is invoked at the end of an instruction to go to the | 434 | /* NEXT is invoked at the end of an instruction to go to the |
| 432 | next instruction. It is either a computed goto, or a | 435 | next instruction. It is either a computed goto, or a |
| 433 | plain break. */ | 436 | plain break. */ |
| 434 | #define NEXT UPDATE_OFFSET goto *(targets[op = FETCH]) | 437 | #define NEXT UPDATE_OFFSET; goto *(targets[op = FETCH]) |
| 435 | /* FIRST is like NEXT, but is only used at the start of the | 438 | /* FIRST is like NEXT, but is only used at the start of the |
| 436 | interpreter body. In the switch-based interpreter it is the | 439 | interpreter body. In the switch-based interpreter it is the |
| 437 | switch, so the threaded definition must include a semicolon. */ | 440 | switch, so the threaded definition must include a semicolon. */ |