diff options
| author | Andrea Corallo | 2019-06-23 17:30:00 +0200 |
|---|---|---|
| committer | Andrea Corallo | 2020-01-01 11:33:44 +0100 |
| commit | ee38ed1e7de2415b54cdfbd59a6f06d09b01779f (patch) | |
| tree | 9cfa31754ad1ff27239d5d3666622931fe6b9d14 /src/comp.c | |
| parent | 175d932b95ac918da6b9d0e4341a5e7715f04a39 (diff) | |
| download | emacs-ee38ed1e7de2415b54cdfbd59a6f06d09b01779f.tar.gz emacs-ee38ed1e7de2415b54cdfbd59a6f06d09b01779f.zip | |
add discard macro
Diffstat (limited to 'src/comp.c')
| -rw-r--r-- | src/comp.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/comp.c b/src/comp.c index 63318c5a58c..31088f23323 100644 --- a/src/comp.c +++ b/src/comp.c | |||
| @@ -79,6 +79,8 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | |||
| 79 | 79 | ||
| 80 | #define TOS (*(stack - 1)) | 80 | #define TOS (*(stack - 1)) |
| 81 | 81 | ||
| 82 | #define DISCARD(n) (stack -= (n)) | ||
| 83 | |||
| 82 | #define POP0 | 84 | #define POP0 |
| 83 | 85 | ||
| 84 | #define POP1 \ | 86 | #define POP1 \ |
| @@ -2104,7 +2106,7 @@ compile_f (const char *f_name, ptrdiff_t bytestr_length, | |||
| 2104 | nil, | 2106 | nil, |
| 2105 | bb_map[op].gcc_bb, bb_map[pc].gcc_bb); | 2107 | bb_map[op].gcc_bb, bb_map[pc].gcc_bb); |
| 2106 | bb_map[op].top = stack; | 2108 | bb_map[op].top = stack; |
| 2107 | POP1; | 2109 | DISCARD (1); |
| 2108 | break; | 2110 | break; |
| 2109 | 2111 | ||
| 2110 | CASE (Bgotoifnonnilelsepop) | 2112 | CASE (Bgotoifnonnilelsepop) |
| @@ -2114,7 +2116,7 @@ compile_f (const char *f_name, ptrdiff_t bytestr_length, | |||
| 2114 | nil, | 2116 | nil, |
| 2115 | bb_map[op].gcc_bb, bb_map[pc].gcc_bb); | 2117 | bb_map[op].gcc_bb, bb_map[pc].gcc_bb); |
| 2116 | bb_map[op].top = stack; | 2118 | bb_map[op].top = stack; |
| 2117 | POP1; | 2119 | DISCARD (1); |
| 2118 | break; | 2120 | break; |
| 2119 | 2121 | ||
| 2120 | CASE (Breturn) | 2122 | CASE (Breturn) |
| @@ -2126,7 +2128,7 @@ compile_f (const char *f_name, ptrdiff_t bytestr_length, | |||
| 2126 | break; | 2128 | break; |
| 2127 | 2129 | ||
| 2128 | CASE (Bdiscard) | 2130 | CASE (Bdiscard) |
| 2129 | POP1; | 2131 | DISCARD (1); |
| 2130 | break; | 2132 | break; |
| 2131 | 2133 | ||
| 2132 | CASE (Bdup) | 2134 | CASE (Bdup) |
| @@ -2135,7 +2137,7 @@ compile_f (const char *f_name, ptrdiff_t bytestr_length, | |||
| 2135 | 2137 | ||
| 2136 | CASE (Bsave_excursion) | 2138 | CASE (Bsave_excursion) |
| 2137 | res = emit_call ("record_unwind_protect_excursion", | 2139 | res = emit_call ("record_unwind_protect_excursion", |
| 2138 | comp.void_type, 0, args); | 2140 | comp.void_type, 0, args); |
| 2139 | break; | 2141 | break; |
| 2140 | 2142 | ||
| 2141 | CASE (Bsave_window_excursion) /* Obsolete since 24.1. */ | 2143 | CASE (Bsave_window_excursion) /* Obsolete since 24.1. */ |
| @@ -2284,7 +2286,7 @@ compile_f (const char *f_name, ptrdiff_t bytestr_length, | |||
| 2284 | nil, | 2286 | nil, |
| 2285 | bb_map[op].gcc_bb, bb_map[pc].gcc_bb); | 2287 | bb_map[op].gcc_bb, bb_map[pc].gcc_bb); |
| 2286 | bb_map[op].top = stack; | 2288 | bb_map[op].top = stack; |
| 2287 | POP1; | 2289 | DISCARD (1); |
| 2288 | break; | 2290 | break; |
| 2289 | 2291 | ||
| 2290 | CASE (BRgotoifnonnilelsepop) | 2292 | CASE (BRgotoifnonnilelsepop) |
| @@ -2295,7 +2297,7 @@ compile_f (const char *f_name, ptrdiff_t bytestr_length, | |||
| 2295 | nil, | 2297 | nil, |
| 2296 | bb_map[op].gcc_bb, bb_map[pc].gcc_bb); | 2298 | bb_map[op].gcc_bb, bb_map[pc].gcc_bb); |
| 2297 | bb_map[op].top = stack; | 2299 | bb_map[op].top = stack; |
| 2298 | POP1; | 2300 | DISCARD (1); |
| 2299 | break; | 2301 | break; |
| 2300 | 2302 | ||
| 2301 | CASE (BinsertN) | 2303 | CASE (BinsertN) |
| @@ -2335,7 +2337,7 @@ compile_f (const char *f_name, ptrdiff_t bytestr_length, | |||
| 2335 | args[0]); | 2337 | args[0]); |
| 2336 | } | 2338 | } |
| 2337 | 2339 | ||
| 2338 | stack -= op; | 2340 | DISCARD (op); |
| 2339 | break; | 2341 | break; |
| 2340 | CASE (Bswitch) | 2342 | CASE (Bswitch) |
| 2341 | error ("Bswitch not supported"); | 2343 | error ("Bswitch not supported"); |