diff options
| author | Mattias EngdegÄrd | 2022-06-24 11:48:42 +0200 |
|---|---|---|
| committer | Mattias EngdegÄrd | 2022-06-24 11:48:42 +0200 |
| commit | 253a4a2c689d757cb798cfb9f51b2110283d7146 (patch) | |
| tree | 4102db0afea99357de76e305f26e6b28c4fbcacc /src/bytecode.c | |
| parent | 0c784a483f98d6bea4d955a99bbf5ea6faf80acf (diff) | |
| download | emacs-253a4a2c689d757cb798cfb9f51b2110283d7146.tar.gz emacs-253a4a2c689d757cb798cfb9f51b2110283d7146.zip | |
Bytecode opcode comments update
This is a cosmetic change only; there is no change in behaviour.
* lisp/emacs-lisp/bytecomp.el:
* src/bytecode.c (BYTE_CODES, exec_byte_code):
Update and/or remove incorrect, outdated or useless comments.
Clarify. Reorder where appropriate. Rename Bsave_current_buffer to
Bsave_current_buffer_OBSOLETE and Bsave_current_buffer_1 to
Bsave_current_buffer, reflecting the state since 1996.
Diffstat (limited to 'src/bytecode.c')
| -rw-r--r-- | src/bytecode.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/bytecode.c b/src/bytecode.c index fa068e1ec6b..d75767bb0c5 100644 --- a/src/bytecode.c +++ b/src/bytecode.c | |||
| @@ -176,8 +176,8 @@ DEFINE (Bmin, 0136) \ | |||
| 176 | DEFINE (Bmult, 0137) \ | 176 | DEFINE (Bmult, 0137) \ |
| 177 | \ | 177 | \ |
| 178 | DEFINE (Bpoint, 0140) \ | 178 | DEFINE (Bpoint, 0140) \ |
| 179 | /* Was Bmark in v17. */ \ | 179 | /* 0141 was Bmark in v17, Bsave_current_buffer in 18-19. */ \ |
| 180 | DEFINE (Bsave_current_buffer, 0141) /* Obsolete. */ \ | 180 | DEFINE (Bsave_current_buffer_OBSOLETE, 0141) /* Obsolete since 20. */ \ |
| 181 | DEFINE (Bgoto_char, 0142) \ | 181 | DEFINE (Bgoto_char, 0142) \ |
| 182 | DEFINE (Binsert, 0143) \ | 182 | DEFINE (Binsert, 0143) \ |
| 183 | DEFINE (Bpoint_max, 0144) \ | 183 | DEFINE (Bpoint_max, 0144) \ |
| @@ -194,7 +194,7 @@ DEFINE (Bbolp, 0156) \ | |||
| 194 | DEFINE (Bbobp, 0157) \ | 194 | DEFINE (Bbobp, 0157) \ |
| 195 | DEFINE (Bcurrent_buffer, 0160) \ | 195 | DEFINE (Bcurrent_buffer, 0160) \ |
| 196 | DEFINE (Bset_buffer, 0161) \ | 196 | DEFINE (Bset_buffer, 0161) \ |
| 197 | DEFINE (Bsave_current_buffer_1, 0162) /* Replacing Bsave_current_buffer. */ \ | 197 | DEFINE (Bsave_current_buffer, 0162) \ |
| 198 | /* 0163 was Bset_mark in v17. */ \ | 198 | /* 0163 was Bset_mark in v17. */ \ |
| 199 | DEFINE (Binteractive_p, 0164) /* Obsolete since Emacs-24.1. */ \ | 199 | DEFINE (Binteractive_p, 0164) /* Obsolete since Emacs-24.1. */ \ |
| 200 | \ | 200 | \ |
| @@ -924,8 +924,8 @@ exec_byte_code (Lisp_Object fun, ptrdiff_t args_template, | |||
| 924 | record_unwind_protect_excursion (); | 924 | record_unwind_protect_excursion (); |
| 925 | NEXT; | 925 | NEXT; |
| 926 | 926 | ||
| 927 | CASE (Bsave_current_buffer): /* Obsolete since ??. */ | 927 | CASE (Bsave_current_buffer_OBSOLETE): /* Obsolete since 20. */ |
| 928 | CASE (Bsave_current_buffer_1): | 928 | CASE (Bsave_current_buffer): |
| 929 | record_unwind_current_buffer (); | 929 | record_unwind_current_buffer (); |
| 930 | NEXT; | 930 | NEXT; |
| 931 | 931 | ||
| @@ -1678,6 +1678,12 @@ exec_byte_code (Lisp_Object fun, ptrdiff_t args_template, | |||
| 1678 | /* TODO: Perhaps introduce another byte-code for switch when the | 1678 | /* TODO: Perhaps introduce another byte-code for switch when the |
| 1679 | number of cases is less, which uses a simple vector for linear | 1679 | number of cases is less, which uses a simple vector for linear |
| 1680 | search as the jump table. */ | 1680 | search as the jump table. */ |
| 1681 | |||
| 1682 | /* TODO: Instead of pushing the table in a separate | ||
| 1683 | Bconstant op, use an immediate argument (maybe separate | ||
| 1684 | switch opcodes for 1-byte and 2-byte constant indices). | ||
| 1685 | This would also get rid of some hacks that assume each | ||
| 1686 | Bswitch to be preceded by a Bconstant. */ | ||
| 1681 | Lisp_Object jmp_table = POP; | 1687 | Lisp_Object jmp_table = POP; |
| 1682 | if (BYTE_CODE_SAFE && !HASH_TABLE_P (jmp_table)) | 1688 | if (BYTE_CODE_SAFE && !HASH_TABLE_P (jmp_table)) |
| 1683 | emacs_abort (); | 1689 | emacs_abort (); |