diff options
| author | Mattias EngdegÄrd | 2025-10-16 17:01:24 +0200 |
|---|---|---|
| committer | Mattias EngdegÄrd | 2025-10-16 19:27:18 +0200 |
| commit | 37ff7a05f3e5af4d570db1b3ed4d4aa2190f70f5 (patch) | |
| tree | f355180f464cd0808d56af592e731ec418191a56 | |
| parent | f4e3fce9ea80973269d24b7179ae2ad2cbff83d0 (diff) | |
| download | emacs-37ff7a05f3e5af4d570db1b3ed4d4aa2190f70f5.tar.gz emacs-37ff7a05f3e5af4d570db1b3ed4d4aa2190f70f5.zip | |
; exec_byte_code: refactor branch case
| -rw-r--r-- | src/bytecode.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/bytecode.c b/src/bytecode.c index c3fc3100e21..ad3844d0213 100644 --- a/src/bytecode.c +++ b/src/bytecode.c | |||
| @@ -851,20 +851,20 @@ exec_byte_code (Lisp_Object fun, ptrdiff_t args_template, | |||
| 851 | CASE (Bgoto): | 851 | CASE (Bgoto): |
| 852 | arg = FETCH2; | 852 | arg = FETCH2; |
| 853 | op_branch: | 853 | op_branch: |
| 854 | arg -= pc - bytestr_data; | 854 | { |
| 855 | if (BYTE_CODE_SAFE | 855 | if (BYTE_CODE_SAFE && !(arg >= 0 && arg < bytestr_length)) |
| 856 | && ! (bytestr_data - pc <= arg | 856 | emacs_abort (); |
| 857 | && arg < bytestr_data + bytestr_length - pc)) | 857 | const unsigned char *new_pc = bytestr_data + arg; |
| 858 | emacs_abort (); | 858 | quitcounter += arg < 0; |
| 859 | quitcounter += arg < 0; | 859 | if (!quitcounter) |
| 860 | if (!quitcounter) | 860 | { |
| 861 | { | 861 | quitcounter = 1; |
| 862 | quitcounter = 1; | 862 | maybe_gc (); |
| 863 | maybe_gc (); | 863 | maybe_quit (); |
| 864 | maybe_quit (); | 864 | } |
| 865 | } | 865 | pc = new_pc; |
| 866 | pc += arg; | 866 | NEXT; |
| 867 | NEXT; | 867 | } |
| 868 | 868 | ||
| 869 | CASE (Bgotoifnonnil): | 869 | CASE (Bgotoifnonnil): |
| 870 | arg = FETCH2; | 870 | arg = FETCH2; |