Mercurial > emacs
annotate src/bytecode.c @ 29018:2f43c508a9b5
(wordify): Use FETCH_STRING_CHAR_ADVANCE
unconditionally.
(Freplace_match): Use FETCH_STRING_CHAR_ADVANCE and
FETCH_STRING_CHAR_ADVANCE_NO_CHECK appropriately.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Sat, 20 May 2000 00:05:02 +0000 |
parents | 4c808e415352 |
children | d0b424336374 |
rev | line source |
---|---|
310 | 1 /* Execution of byte code produced by bytecomp.el. |
2961 | 2 Copyright (C) 1985, 1986, 1987, 1988, 1993 Free Software Foundation, Inc. |
310 | 3 |
4 This file is part of GNU Emacs. | |
5 | |
6 GNU Emacs is free software; you can redistribute it and/or modify | |
7 it under the terms of the GNU General Public License as published by | |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
8 the Free Software Foundation; either version 2, or (at your option) |
310 | 9 any later version. |
10 | |
11 GNU Emacs is distributed in the hope that it will be useful, | |
12 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 GNU General Public License for more details. | |
15 | |
16 You should have received a copy of the GNU General Public License | |
17 along with GNU Emacs; see the file COPYING. If not, write to | |
14186
ee40177f6c68
Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents:
14061
diff
changeset
|
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
ee40177f6c68
Update FSF's address in the preamble.
Erik Naggum <erik@naggum.no>
parents:
14061
diff
changeset
|
19 Boston, MA 02111-1307, USA. |
310 | 20 |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
21 hacked on by jwz@lucid.com 17-jun-91 |
310 | 22 o added a compile-time switch to turn on simple sanity checking; |
23 o put back the obsolete byte-codes for error-detection; | |
24 o added a new instruction, unbind_all, which I will use for | |
25 tail-recursion elimination; | |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
26 o made temp_output_buffer_show be called with the right number |
310 | 27 of args; |
28 o made the new bytecodes be called with args in the right order; | |
29 o added metering support. | |
30 | |
31 by Hallvard: | |
435
43e88c4db330
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
396
diff
changeset
|
32 o added relative jump instructions; |
310 | 33 o all conditionals now only do QUIT if they jump. |
34 */ | |
35 | |
4696
1fc792473491
Include <config.h> instead of "config.h".
Roland McGrath <roland@gnu.org>
parents:
2961
diff
changeset
|
36 #include <config.h> |
310 | 37 #include "lisp.h" |
38 #include "buffer.h" | |
23715 | 39 #include "charset.h" |
310 | 40 #include "syntax.h" |
41 | |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
42 /* |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
43 * define BYTE_CODE_SAFE to enable some minor sanity checking (useful for |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
44 * debugging the byte compiler...) |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
45 * |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
46 * define BYTE_CODE_METER to enable generation of a byte-op usage histogram. |
310 | 47 */ |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
48 /* #define BYTE_CODE_SAFE */ |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
49 /* #define BYTE_CODE_METER */ |
310 | 50 |
51 | |
52 #ifdef BYTE_CODE_METER | |
53 | |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
54 Lisp_Object Vbyte_code_meter, Qbyte_code_meter; |
310 | 55 int byte_metering_on; |
56 | |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
57 #define METER_2(code1, code2) \ |
310 | 58 XFASTINT (XVECTOR (XVECTOR (Vbyte_code_meter)->contents[(code1)]) \ |
59 ->contents[(code2)]) | |
60 | |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
61 #define METER_1(code) METER_2 (0, (code)) |
310 | 62 |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
63 #define METER_CODE(last_code, this_code) \ |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
64 { \ |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
65 if (byte_metering_on) \ |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
66 { \ |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
67 if (METER_1 (this_code) != ((1<<VALBITS)-1)) \ |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
68 METER_1 (this_code)++; \ |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
69 if (last_code \ |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
70 && METER_2 (last_code, this_code) != ((1<<VALBITS)-1))\ |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
71 METER_2 (last_code, this_code)++; \ |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
72 } \ |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
73 } |
310 | 74 |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
75 #else /* no BYTE_CODE_METER */ |
310 | 76 |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
77 #define METER_CODE(last_code, this_code) |
310 | 78 |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
79 #endif /* no BYTE_CODE_METER */ |
310 | 80 |
81 | |
82 Lisp_Object Qbytecode; | |
83 | |
84 /* Byte codes: */ | |
85 | |
86 #define Bvarref 010 | |
87 #define Bvarset 020 | |
88 #define Bvarbind 030 | |
89 #define Bcall 040 | |
90 #define Bunbind 050 | |
91 | |
92 #define Bnth 070 | |
93 #define Bsymbolp 071 | |
94 #define Bconsp 072 | |
95 #define Bstringp 073 | |
96 #define Blistp 074 | |
97 #define Beq 075 | |
98 #define Bmemq 076 | |
99 #define Bnot 077 | |
100 #define Bcar 0100 | |
101 #define Bcdr 0101 | |
102 #define Bcons 0102 | |
103 #define Blist1 0103 | |
104 #define Blist2 0104 | |
105 #define Blist3 0105 | |
106 #define Blist4 0106 | |
107 #define Blength 0107 | |
108 #define Baref 0110 | |
109 #define Baset 0111 | |
110 #define Bsymbol_value 0112 | |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
111 #define Bsymbol_function 0113 |
310 | 112 #define Bset 0114 |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
113 #define Bfset 0115 |
310 | 114 #define Bget 0116 |
115 #define Bsubstring 0117 | |
116 #define Bconcat2 0120 | |
117 #define Bconcat3 0121 | |
118 #define Bconcat4 0122 | |
119 #define Bsub1 0123 | |
120 #define Badd1 0124 | |
121 #define Beqlsign 0125 | |
122 #define Bgtr 0126 | |
123 #define Blss 0127 | |
124 #define Bleq 0130 | |
125 #define Bgeq 0131 | |
126 #define Bdiff 0132 | |
127 #define Bnegate 0133 | |
128 #define Bplus 0134 | |
129 #define Bmax 0135 | |
130 #define Bmin 0136 | |
131 #define Bmult 0137 | |
132 | |
133 #define Bpoint 0140 | |
16292
86408ea93da6
(Bsave_current_buffer): New macro.
Richard M. Stallman <rms@gnu.org>
parents:
16039
diff
changeset
|
134 /* Was Bmark in v17. */ |
86408ea93da6
(Bsave_current_buffer): New macro.
Richard M. Stallman <rms@gnu.org>
parents:
16039
diff
changeset
|
135 #define Bsave_current_buffer 0141 |
310 | 136 #define Bgoto_char 0142 |
137 #define Binsert 0143 | |
138 #define Bpoint_max 0144 | |
139 #define Bpoint_min 0145 | |
140 #define Bchar_after 0146 | |
141 #define Bfollowing_char 0147 | |
142 #define Bpreceding_char 0150 | |
143 #define Bcurrent_column 0151 | |
144 #define Bindent_to 0152 | |
145 #define Bscan_buffer 0153 /* No longer generated as of v18 */ | |
146 #define Beolp 0154 | |
147 #define Beobp 0155 | |
148 #define Bbolp 0156 | |
149 #define Bbobp 0157 | |
150 #define Bcurrent_buffer 0160 | |
151 #define Bset_buffer 0161 | |
18245 | 152 #define Bsave_current_buffer_1 0162 /* Replacing Bsave_current_buffer. */ |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
153 #define Bread_char 0162 /* No longer generated as of v19 */ |
310 | 154 #define Bset_mark 0163 /* this loser is no longer generated as of v18 */ |
155 #define Binteractive_p 0164 /* Needed since interactive-p takes unevalled args */ | |
156 | |
157 #define Bforward_char 0165 | |
158 #define Bforward_word 0166 | |
159 #define Bskip_chars_forward 0167 | |
160 #define Bskip_chars_backward 0170 | |
161 #define Bforward_line 0171 | |
162 #define Bchar_syntax 0172 | |
163 #define Bbuffer_substring 0173 | |
164 #define Bdelete_region 0174 | |
165 #define Bnarrow_to_region 0175 | |
166 #define Bwiden 0176 | |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
167 #define Bend_of_line 0177 |
310 | 168 |
169 #define Bconstant2 0201 | |
170 #define Bgoto 0202 | |
171 #define Bgotoifnil 0203 | |
172 #define Bgotoifnonnil 0204 | |
173 #define Bgotoifnilelsepop 0205 | |
174 #define Bgotoifnonnilelsepop 0206 | |
175 #define Breturn 0207 | |
176 #define Bdiscard 0210 | |
177 #define Bdup 0211 | |
178 | |
179 #define Bsave_excursion 0212 | |
180 #define Bsave_window_excursion 0213 | |
181 #define Bsave_restriction 0214 | |
182 #define Bcatch 0215 | |
183 | |
184 #define Bunwind_protect 0216 | |
185 #define Bcondition_case 0217 | |
186 #define Btemp_output_buffer_setup 0220 | |
187 #define Btemp_output_buffer_show 0221 | |
188 | |
189 #define Bunbind_all 0222 | |
190 | |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
191 #define Bset_marker 0223 |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
192 #define Bmatch_beginning 0224 |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
193 #define Bmatch_end 0225 |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
194 #define Bupcase 0226 |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
195 #define Bdowncase 0227 |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
196 |
310 | 197 #define Bstringeqlsign 0230 |
198 #define Bstringlss 0231 | |
199 #define Bequal 0232 | |
200 #define Bnthcdr 0233 | |
201 #define Belt 0234 | |
202 #define Bmember 0235 | |
203 #define Bassq 0236 | |
204 #define Bnreverse 0237 | |
205 #define Bsetcar 0240 | |
206 #define Bsetcdr 0241 | |
207 #define Bcar_safe 0242 | |
208 #define Bcdr_safe 0243 | |
209 #define Bnconc 0244 | |
210 #define Bquo 0245 | |
211 #define Brem 0246 | |
212 #define Bnumberp 0247 | |
213 #define Bintegerp 0250 | |
214 | |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
215 #define BRgoto 0252 |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
216 #define BRgotoifnil 0253 |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
217 #define BRgotoifnonnil 0254 |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
218 #define BRgotoifnilelsepop 0255 |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
219 #define BRgotoifnonnilelsepop 0256 |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
220 |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
221 #define BlistN 0257 |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
222 #define BconcatN 0260 |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
223 #define BinsertN 0261 |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
224 |
310 | 225 #define Bconstant 0300 |
226 #define CONSTANTLIM 0100 | |
26363 | 227 |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
228 |
26363 | 229 /* Structure describing a value stack used during byte-code execution |
230 in Fbyte_code. */ | |
231 | |
232 struct byte_stack | |
233 { | |
234 /* Program counter. This points into the byte_string below | |
235 and is relocated when that string is relocated. */ | |
236 unsigned char *pc; | |
237 | |
238 /* Top and bottom of stack. The bottom points to an area of memory | |
239 allocated with alloca in Fbyte_code. */ | |
240 Lisp_Object *top, *bottom; | |
241 | |
242 /* The string containing the byte-code, and its current address. | |
243 Storing this here protects it from GC because mark_byte_stack | |
244 marks it. */ | |
245 Lisp_Object byte_string; | |
246 unsigned char *byte_string_start; | |
247 | |
248 /* The vector of constants used during byte-code execution. Storing | |
249 this here protects it from GC because mark_byte_stack marks it. */ | |
250 Lisp_Object constants; | |
251 | |
252 /* Next entry in byte_stack_list. */ | |
253 struct byte_stack *next; | |
254 }; | |
255 | |
256 /* A list of currently active byte-code execution value stacks. | |
257 Fbyte_code adds an entry to the head of this list before it starts | |
258 processing byte-code, and it removed the entry again when it is | |
259 done. Signalling an error truncates the list analoguous to | |
260 gcprolist. */ | |
261 | |
262 struct byte_stack *byte_stack_list; | |
263 | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
264 |
26363 | 265 /* Mark objects on byte_stack_list. Called during GC. */ |
266 | |
267 void | |
268 mark_byte_stack () | |
269 { | |
270 struct byte_stack *stack; | |
271 Lisp_Object *obj; | |
272 | |
273 for (stack = byte_stack_list; stack; stack = stack->next) | |
274 { | |
275 if (!stack->top) | |
276 abort (); | |
277 | |
278 for (obj = stack->bottom; obj <= stack->top; ++obj) | |
26376
6706cd0ece4d
(mark_byte_stack): Use XMARKBIT and XMARK.
Gerd Moellmann <gerd@gnu.org>
parents:
26370
diff
changeset
|
279 if (!XMARKBIT (*obj)) |
6706cd0ece4d
(mark_byte_stack): Use XMARKBIT and XMARK.
Gerd Moellmann <gerd@gnu.org>
parents:
26370
diff
changeset
|
280 { |
6706cd0ece4d
(mark_byte_stack): Use XMARKBIT and XMARK.
Gerd Moellmann <gerd@gnu.org>
parents:
26370
diff
changeset
|
281 mark_object (obj); |
6706cd0ece4d
(mark_byte_stack): Use XMARKBIT and XMARK.
Gerd Moellmann <gerd@gnu.org>
parents:
26370
diff
changeset
|
282 XMARK (*obj); |
6706cd0ece4d
(mark_byte_stack): Use XMARKBIT and XMARK.
Gerd Moellmann <gerd@gnu.org>
parents:
26370
diff
changeset
|
283 } |
26363 | 284 |
26376
6706cd0ece4d
(mark_byte_stack): Use XMARKBIT and XMARK.
Gerd Moellmann <gerd@gnu.org>
parents:
26370
diff
changeset
|
285 if (!XMARKBIT (stack->byte_string)) |
6706cd0ece4d
(mark_byte_stack): Use XMARKBIT and XMARK.
Gerd Moellmann <gerd@gnu.org>
parents:
26370
diff
changeset
|
286 { |
6706cd0ece4d
(mark_byte_stack): Use XMARKBIT and XMARK.
Gerd Moellmann <gerd@gnu.org>
parents:
26370
diff
changeset
|
287 mark_object (&stack->byte_string); |
6706cd0ece4d
(mark_byte_stack): Use XMARKBIT and XMARK.
Gerd Moellmann <gerd@gnu.org>
parents:
26370
diff
changeset
|
288 XMARK (stack->byte_string); |
6706cd0ece4d
(mark_byte_stack): Use XMARKBIT and XMARK.
Gerd Moellmann <gerd@gnu.org>
parents:
26370
diff
changeset
|
289 } |
6706cd0ece4d
(mark_byte_stack): Use XMARKBIT and XMARK.
Gerd Moellmann <gerd@gnu.org>
parents:
26370
diff
changeset
|
290 |
6706cd0ece4d
(mark_byte_stack): Use XMARKBIT and XMARK.
Gerd Moellmann <gerd@gnu.org>
parents:
26370
diff
changeset
|
291 if (!XMARKBIT (stack->constants)) |
6706cd0ece4d
(mark_byte_stack): Use XMARKBIT and XMARK.
Gerd Moellmann <gerd@gnu.org>
parents:
26370
diff
changeset
|
292 { |
6706cd0ece4d
(mark_byte_stack): Use XMARKBIT and XMARK.
Gerd Moellmann <gerd@gnu.org>
parents:
26370
diff
changeset
|
293 mark_object (&stack->constants); |
6706cd0ece4d
(mark_byte_stack): Use XMARKBIT and XMARK.
Gerd Moellmann <gerd@gnu.org>
parents:
26370
diff
changeset
|
294 XMARK (stack->constants); |
6706cd0ece4d
(mark_byte_stack): Use XMARKBIT and XMARK.
Gerd Moellmann <gerd@gnu.org>
parents:
26370
diff
changeset
|
295 } |
26363 | 296 } |
297 } | |
298 | |
299 | |
26376
6706cd0ece4d
(mark_byte_stack): Use XMARKBIT and XMARK.
Gerd Moellmann <gerd@gnu.org>
parents:
26370
diff
changeset
|
300 /* Unmark objects in the stacks on byte_stack_list. Relocate program |
6706cd0ece4d
(mark_byte_stack): Use XMARKBIT and XMARK.
Gerd Moellmann <gerd@gnu.org>
parents:
26370
diff
changeset
|
301 counters. Called when GC has completed. */ |
26363 | 302 |
303 void | |
26376
6706cd0ece4d
(mark_byte_stack): Use XMARKBIT and XMARK.
Gerd Moellmann <gerd@gnu.org>
parents:
26370
diff
changeset
|
304 unmark_byte_stack () |
26363 | 305 { |
306 struct byte_stack *stack; | |
26376
6706cd0ece4d
(mark_byte_stack): Use XMARKBIT and XMARK.
Gerd Moellmann <gerd@gnu.org>
parents:
26370
diff
changeset
|
307 Lisp_Object *obj; |
26363 | 308 |
309 for (stack = byte_stack_list; stack; stack = stack->next) | |
26376
6706cd0ece4d
(mark_byte_stack): Use XMARKBIT and XMARK.
Gerd Moellmann <gerd@gnu.org>
parents:
26370
diff
changeset
|
310 { |
6706cd0ece4d
(mark_byte_stack): Use XMARKBIT and XMARK.
Gerd Moellmann <gerd@gnu.org>
parents:
26370
diff
changeset
|
311 for (obj = stack->bottom; obj <= stack->top; ++obj) |
6706cd0ece4d
(mark_byte_stack): Use XMARKBIT and XMARK.
Gerd Moellmann <gerd@gnu.org>
parents:
26370
diff
changeset
|
312 XUNMARK (*obj); |
6706cd0ece4d
(mark_byte_stack): Use XMARKBIT and XMARK.
Gerd Moellmann <gerd@gnu.org>
parents:
26370
diff
changeset
|
313 |
6706cd0ece4d
(mark_byte_stack): Use XMARKBIT and XMARK.
Gerd Moellmann <gerd@gnu.org>
parents:
26370
diff
changeset
|
314 XUNMARK (stack->byte_string); |
6706cd0ece4d
(mark_byte_stack): Use XMARKBIT and XMARK.
Gerd Moellmann <gerd@gnu.org>
parents:
26370
diff
changeset
|
315 XUNMARK (stack->constants); |
6706cd0ece4d
(mark_byte_stack): Use XMARKBIT and XMARK.
Gerd Moellmann <gerd@gnu.org>
parents:
26370
diff
changeset
|
316 |
6706cd0ece4d
(mark_byte_stack): Use XMARKBIT and XMARK.
Gerd Moellmann <gerd@gnu.org>
parents:
26370
diff
changeset
|
317 if (stack->byte_string_start != XSTRING (stack->byte_string)->data) |
6706cd0ece4d
(mark_byte_stack): Use XMARKBIT and XMARK.
Gerd Moellmann <gerd@gnu.org>
parents:
26370
diff
changeset
|
318 { |
6706cd0ece4d
(mark_byte_stack): Use XMARKBIT and XMARK.
Gerd Moellmann <gerd@gnu.org>
parents:
26370
diff
changeset
|
319 int offset = stack->pc - stack->byte_string_start; |
6706cd0ece4d
(mark_byte_stack): Use XMARKBIT and XMARK.
Gerd Moellmann <gerd@gnu.org>
parents:
26370
diff
changeset
|
320 stack->byte_string_start = XSTRING (stack->byte_string)->data; |
6706cd0ece4d
(mark_byte_stack): Use XMARKBIT and XMARK.
Gerd Moellmann <gerd@gnu.org>
parents:
26370
diff
changeset
|
321 stack->pc = stack->byte_string_start + offset; |
6706cd0ece4d
(mark_byte_stack): Use XMARKBIT and XMARK.
Gerd Moellmann <gerd@gnu.org>
parents:
26370
diff
changeset
|
322 } |
6706cd0ece4d
(mark_byte_stack): Use XMARKBIT and XMARK.
Gerd Moellmann <gerd@gnu.org>
parents:
26370
diff
changeset
|
323 } |
26363 | 324 } |
325 | |
310 | 326 |
327 /* Fetch the next byte from the bytecode stream */ | |
328 | |
26363 | 329 #define FETCH *stack.pc++ |
310 | 330 |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
331 /* Fetch two bytes from the bytecode stream and make a 16-bit number |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
332 out of them */ |
310 | 333 |
334 #define FETCH2 (op = FETCH, op + (FETCH << 8)) | |
335 | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
336 /* Push x onto the execution stack. This used to be #define PUSH(x) |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
337 (*++stackp = (x)) This oddity is necessary because Alliant can't be |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
338 bothered to compile the preincrement operator properly, as of 4/91. |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
339 -JimB */ |
26363 | 340 |
341 #define PUSH(x) (top++, *top = (x)) | |
310 | 342 |
343 /* Pop a value off the execution stack. */ | |
344 | |
26363 | 345 #define POP (*top--) |
310 | 346 |
347 /* Discard n values from the execution stack. */ | |
348 | |
26363 | 349 #define DISCARD(n) (top -= (n)) |
350 | |
351 /* Get the value which is at the top of the execution stack, but don't | |
352 pop it. */ | |
310 | 353 |
26363 | 354 #define TOP (*top) |
310 | 355 |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
356 /* Actions that must be performed before and after calling a function |
26363 | 357 that might GC. */ |
358 | |
359 #define BEFORE_POTENTIAL_GC() stack.top = top | |
360 #define AFTER_POTENTIAL_GC() stack.top = NULL | |
310 | 361 |
16628 | 362 /* Garbage collect if we have consed enough since the last time. |
363 We do this at every branch, to avoid loops that never GC. */ | |
364 | |
365 #define MAYBE_GC() \ | |
366 if (consing_since_gc > gc_cons_threshold) \ | |
16815
9e0f59154164
(HANDLE_RELOCATION): New macro.
Richard M. Stallman <rms@gnu.org>
parents:
16784
diff
changeset
|
367 { \ |
26363 | 368 BEFORE_POTENTIAL_GC (); \ |
16815
9e0f59154164
(HANDLE_RELOCATION): New macro.
Richard M. Stallman <rms@gnu.org>
parents:
16784
diff
changeset
|
369 Fgarbage_collect (); \ |
26363 | 370 AFTER_POTENTIAL_GC (); \ |
16815
9e0f59154164
(HANDLE_RELOCATION): New macro.
Richard M. Stallman <rms@gnu.org>
parents:
16784
diff
changeset
|
371 } \ |
9e0f59154164
(HANDLE_RELOCATION): New macro.
Richard M. Stallman <rms@gnu.org>
parents:
16784
diff
changeset
|
372 else |
9e0f59154164
(HANDLE_RELOCATION): New macro.
Richard M. Stallman <rms@gnu.org>
parents:
16784
diff
changeset
|
373 |
26363 | 374 /* Check for jumping out of range. */ |
16628 | 375 |
26363 | 376 #ifdef BYTE_CODE_SAFE |
377 | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
378 #define CHECK_RANGE(ARG) \ |
16784
79ea730b7e20
(Fbyte_code): Add error check for jumping out of range.
Richard M. Stallman <rms@gnu.org>
parents:
16628
diff
changeset
|
379 if (ARG >= bytestr_length) abort () |
79ea730b7e20
(Fbyte_code): Add error check for jumping out of range.
Richard M. Stallman <rms@gnu.org>
parents:
16628
diff
changeset
|
380 |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
381 #else /* not BYTE_CODE_SAFE */ |
26363 | 382 |
383 #define CHECK_RANGE(ARG) | |
384 | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
385 #endif /* not BYTE_CODE_SAFE */ |
26363 | 386 |
387 | |
310 | 388 DEFUN ("byte-code", Fbyte_code, Sbyte_code, 3, 3, 0, |
389 "Function used internally in byte-compiled code.\n\ | |
14061
bf43ef5a139c
(Fbyte_code): Harmonize arguments with documentation.
Erik Naggum <erik@naggum.no>
parents:
12575
diff
changeset
|
390 The first argument, BYTESTR, is a string of byte code;\n\ |
bf43ef5a139c
(Fbyte_code): Harmonize arguments with documentation.
Erik Naggum <erik@naggum.no>
parents:
12575
diff
changeset
|
391 the second, VECTOR, a vector of constants;\n\ |
bf43ef5a139c
(Fbyte_code): Harmonize arguments with documentation.
Erik Naggum <erik@naggum.no>
parents:
12575
diff
changeset
|
392 the third, MAXDEPTH, the maximum stack depth used in this function.\n\ |
310 | 393 If the third argument is incorrect, Emacs may crash.") |
394 (bytestr, vector, maxdepth) | |
395 Lisp_Object bytestr, vector, maxdepth; | |
396 { | |
397 int count = specpdl_ptr - specpdl; | |
398 #ifdef BYTE_CODE_METER | |
399 int this_op = 0; | |
400 int prev_op; | |
401 #endif | |
26363 | 402 int op; |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
403 /* Lisp_Object v1, v2; */ |
28999
4c808e415352
(Fbyte_code): If arg BYTESTR is multibyte, convert it
Kenichi Handa <handa@m17n.org>
parents:
28497
diff
changeset
|
404 Lisp_Object *vectorp; |
310 | 405 #ifdef BYTE_CODE_SAFE |
26363 | 406 int const_length = XVECTOR (vector)->size; |
407 Lisp_Object *stacke; | |
310 | 408 #endif |
28999
4c808e415352
(Fbyte_code): If arg BYTESTR is multibyte, convert it
Kenichi Handa <handa@m17n.org>
parents:
28497
diff
changeset
|
409 int bytestr_length; |
26363 | 410 struct byte_stack stack; |
411 Lisp_Object *top; | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
412 Lisp_Object result; |
310 | 413 |
414 CHECK_STRING (bytestr, 0); | |
9139
127823d9444d
(Fbyte_code): Use type test macros.
Karl Heuer <kwzh@gnu.org>
parents:
4696
diff
changeset
|
415 if (!VECTORP (vector)) |
310 | 416 vector = wrong_type_argument (Qvectorp, vector); |
417 CHECK_NUMBER (maxdepth, 2); | |
418 | |
28999
4c808e415352
(Fbyte_code): If arg BYTESTR is multibyte, convert it
Kenichi Handa <handa@m17n.org>
parents:
28497
diff
changeset
|
419 if (STRING_MULTIBYTE (bytestr)) |
4c808e415352
(Fbyte_code): If arg BYTESTR is multibyte, convert it
Kenichi Handa <handa@m17n.org>
parents:
28497
diff
changeset
|
420 /* BYTESTR must have been produced by Emacs 20.2 or the earlier |
4c808e415352
(Fbyte_code): If arg BYTESTR is multibyte, convert it
Kenichi Handa <handa@m17n.org>
parents:
28497
diff
changeset
|
421 because they produced a raw 8-bit string for byte-code and now |
4c808e415352
(Fbyte_code): If arg BYTESTR is multibyte, convert it
Kenichi Handa <handa@m17n.org>
parents:
28497
diff
changeset
|
422 such a byte-code string is loaded as multibyte while raw 8-bit |
4c808e415352
(Fbyte_code): If arg BYTESTR is multibyte, convert it
Kenichi Handa <handa@m17n.org>
parents:
28497
diff
changeset
|
423 characters converted to multibyte form. Thus, now we must |
4c808e415352
(Fbyte_code): If arg BYTESTR is multibyte, convert it
Kenichi Handa <handa@m17n.org>
parents:
28497
diff
changeset
|
424 convert them back to the original unibyte form. */ |
4c808e415352
(Fbyte_code): If arg BYTESTR is multibyte, convert it
Kenichi Handa <handa@m17n.org>
parents:
28497
diff
changeset
|
425 bytestr = Fstring_as_unibyte (bytestr); |
4c808e415352
(Fbyte_code): If arg BYTESTR is multibyte, convert it
Kenichi Handa <handa@m17n.org>
parents:
28497
diff
changeset
|
426 |
4c808e415352
(Fbyte_code): If arg BYTESTR is multibyte, convert it
Kenichi Handa <handa@m17n.org>
parents:
28497
diff
changeset
|
427 bytestr_length = STRING_BYTES (XSTRING (bytestr)); |
4c808e415352
(Fbyte_code): If arg BYTESTR is multibyte, convert it
Kenichi Handa <handa@m17n.org>
parents:
28497
diff
changeset
|
428 vectorp = XVECTOR (vector)->contents; |
4c808e415352
(Fbyte_code): If arg BYTESTR is multibyte, convert it
Kenichi Handa <handa@m17n.org>
parents:
28497
diff
changeset
|
429 |
26363 | 430 stack.byte_string = bytestr; |
431 stack.pc = stack.byte_string_start = XSTRING (bytestr)->data; | |
432 stack.constants = vector; | |
433 stack.bottom = (Lisp_Object *) alloca (XFASTINT (maxdepth) | |
434 * sizeof (Lisp_Object)); | |
435 top = stack.bottom - 1; | |
436 stack.top = NULL; | |
437 stack.next = byte_stack_list; | |
438 byte_stack_list = &stack; | |
310 | 439 |
26363 | 440 #ifdef BYTE_CODE_SAFE |
441 stacke = stack.bottom - 1 + XFASTINT (maxdepth); | |
442 #endif | |
443 | |
310 | 444 while (1) |
445 { | |
446 #ifdef BYTE_CODE_SAFE | |
27438
5218aa03936e
(Fbyte_code) [BYTE_CODE_SAFE]: Fix typo.
Gerd Moellmann <gerd@gnu.org>
parents:
27293
diff
changeset
|
447 if (top > stacke) |
27727
9400865ec7cf
Remove `LISP_FLOAT_TYPE' and `standalone'.
Gerd Moellmann <gerd@gnu.org>
parents:
27442
diff
changeset
|
448 abort (); |
26363 | 449 else if (top < stack.bottom - 1) |
27727
9400865ec7cf
Remove `LISP_FLOAT_TYPE' and `standalone'.
Gerd Moellmann <gerd@gnu.org>
parents:
27442
diff
changeset
|
450 abort (); |
310 | 451 #endif |
452 | |
453 #ifdef BYTE_CODE_METER | |
454 prev_op = this_op; | |
455 this_op = op = FETCH; | |
456 METER_CODE (prev_op, op); | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
457 #else |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
458 op = FETCH; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
459 #endif |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
460 |
310 | 461 switch (op) |
462 { | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
463 case Bvarref + 7: |
310 | 464 op = FETCH2; |
465 goto varref; | |
466 | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
467 case Bvarref: |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
468 case Bvarref + 1: |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
469 case Bvarref + 2: |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
470 case Bvarref + 3: |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
471 case Bvarref + 4: |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
472 case Bvarref + 5: |
310 | 473 op = op - Bvarref; |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
474 goto varref; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
475 |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
476 /* This seems to be the most frequently executed byte-code |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
477 among the Bvarref's, so avoid a goto here. */ |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
478 case Bvarref+6: |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
479 op = FETCH; |
310 | 480 varref: |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
481 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
482 Lisp_Object v1, v2; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
483 |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
484 v1 = vectorp[op]; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
485 if (SYMBOLP (v1)) |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
486 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
487 v2 = XSYMBOL (v1)->value; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
488 if (MISCP (v2) || EQ (v2, Qunbound)) |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
489 { |
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
490 BEFORE_POTENTIAL_GC (); |
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
491 v2 = Fsymbol_value (v1); |
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
492 AFTER_POTENTIAL_GC (); |
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
493 } |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
494 } |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
495 else |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
496 { |
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
497 BEFORE_POTENTIAL_GC (); |
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
498 v2 = Fsymbol_value (v1); |
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
499 AFTER_POTENTIAL_GC (); |
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
500 } |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
501 PUSH (v2); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
502 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
503 } |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
504 |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
505 case Bgotoifnil: |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
506 MAYBE_GC (); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
507 op = FETCH2; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
508 if (NILP (POP)) |
310 | 509 { |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
510 QUIT; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
511 CHECK_RANGE (op); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
512 stack.pc = stack.byte_string_start + op; |
310 | 513 } |
514 break; | |
515 | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
516 case Bcar: |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
517 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
518 Lisp_Object v1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
519 v1 = TOP; |
26380
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
520 if (CONSP (v1)) |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
521 TOP = XCAR (v1); |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
522 else if (NILP (v1)) |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
523 TOP = Qnil; |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
524 else |
27442
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
525 { |
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
526 BEFORE_POTENTIAL_GC (); |
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
527 Fcar (wrong_type_argument (Qlistp, v1)); |
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
528 AFTER_POTENTIAL_GC (); |
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
529 } |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
530 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
531 } |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
532 |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
533 case Beq: |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
534 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
535 Lisp_Object v1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
536 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
537 TOP = EQ (v1, TOP) ? Qt : Qnil; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
538 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
539 } |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
540 |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
541 case Bmemq: |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
542 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
543 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
544 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
545 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
546 TOP = Fmemq (TOP, v1); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
547 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
548 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
549 } |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
550 |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
551 case Bcdr: |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
552 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
553 Lisp_Object v1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
554 v1 = TOP; |
26380
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
555 if (CONSP (v1)) |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
556 TOP = XCDR (v1); |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
557 else if (NILP (v1)) |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
558 TOP = Qnil; |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
559 else |
27442
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
560 { |
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
561 BEFORE_POTENTIAL_GC (); |
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
562 Fcdr (wrong_type_argument (Qlistp, v1)); |
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
563 AFTER_POTENTIAL_GC (); |
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
564 } |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
565 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
566 } |
310 | 567 |
27782
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
568 case Bvarset: |
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
569 case Bvarset+1: |
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
570 case Bvarset+2: |
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
571 case Bvarset+3: |
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
572 case Bvarset+4: |
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
573 case Bvarset+5: |
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
574 op -= Bvarset; |
310 | 575 goto varset; |
576 | |
27782
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
577 case Bvarset+7: |
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
578 op = FETCH2; |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
579 goto varset; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
580 |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
581 case Bvarset+6: |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
582 op = FETCH; |
310 | 583 varset: |
27782
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
584 { |
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
585 Lisp_Object sym, val; |
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
586 |
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
587 sym = vectorp[op]; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
588 val = TOP; |
27782
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
589 |
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
590 /* Inline the most common case. */ |
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
591 if (SYMBOLP (sym) |
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
592 && !EQ (val, Qunbound) |
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
593 && !MISCP (XSYMBOL (sym)->value) |
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
594 /* I think this should either be checked in the byte |
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
595 compiler, or there should be a flag indicating that |
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
596 a symbol might be constant in Lisp_Symbol, instead |
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
597 of checking this here over and over again. --gerd. */ |
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
598 && !EQ (sym, Qnil) |
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
599 && !EQ (sym, Qt) |
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
600 && !(XSYMBOL (sym)->name->data[0] == ':' |
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
601 && EQ (XSYMBOL (sym)->obarray, initial_obarray) |
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
602 && !EQ (val, sym))) |
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
603 XSYMBOL (sym)->value = val; |
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
604 else |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
605 { |
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
606 BEFORE_POTENTIAL_GC (); |
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
607 set_internal (sym, val, current_buffer, 0); |
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
608 AFTER_POTENTIAL_GC (); |
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
609 } |
27782
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
610 } |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
611 POP; |
310 | 612 break; |
613 | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
614 case Bdup: |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
615 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
616 Lisp_Object v1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
617 v1 = TOP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
618 PUSH (v1); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
619 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
620 } |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
621 |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
622 /* ------------------ */ |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
623 |
310 | 624 case Bvarbind+6: |
625 op = FETCH; | |
626 goto varbind; | |
627 | |
628 case Bvarbind+7: | |
629 op = FETCH2; | |
630 goto varbind; | |
631 | |
26380
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
632 case Bvarbind: |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
633 case Bvarbind+1: |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
634 case Bvarbind+2: |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
635 case Bvarbind+3: |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
636 case Bvarbind+4: |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
637 case Bvarbind+5: |
310 | 638 op -= Bvarbind; |
639 varbind: | |
640 specbind (vectorp[op], POP); | |
641 break; | |
642 | |
643 case Bcall+6: | |
644 op = FETCH; | |
645 goto docall; | |
646 | |
647 case Bcall+7: | |
648 op = FETCH2; | |
649 goto docall; | |
650 | |
26380
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
651 case Bcall: |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
652 case Bcall+1: |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
653 case Bcall+2: |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
654 case Bcall+3: |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
655 case Bcall+4: |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
656 case Bcall+5: |
310 | 657 op -= Bcall; |
658 docall: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
659 { |
26380
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
660 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
661 DISCARD (op); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
662 #ifdef BYTE_CODE_METER |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
663 if (byte_metering_on && SYMBOLP (TOP)) |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
664 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
665 Lisp_Object v1, v2; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
666 |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
667 v1 = TOP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
668 v2 = Fget (v1, Qbyte_code_meter); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
669 if (INTEGERP (v2) |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
670 && XINT (v2) != ((1<<VALBITS)-1)) |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
671 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
672 XSETINT (v2, XINT (v2) + 1); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
673 Fput (v1, Qbyte_code_meter, v2); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
674 } |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
675 } |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
676 #endif |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
677 TOP = Ffuncall (op + 1, &TOP); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
678 AFTER_POTENTIAL_GC (); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
679 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
680 } |
310 | 681 |
682 case Bunbind+6: | |
683 op = FETCH; | |
684 goto dounbind; | |
685 | |
686 case Bunbind+7: | |
687 op = FETCH2; | |
688 goto dounbind; | |
689 | |
26380
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
690 case Bunbind: |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
691 case Bunbind+1: |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
692 case Bunbind+2: |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
693 case Bunbind+3: |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
694 case Bunbind+4: |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
695 case Bunbind+5: |
310 | 696 op -= Bunbind; |
697 dounbind: | |
26363 | 698 BEFORE_POTENTIAL_GC (); |
310 | 699 unbind_to (specpdl_ptr - specpdl - op, Qnil); |
26363 | 700 AFTER_POTENTIAL_GC (); |
310 | 701 break; |
702 | |
703 case Bunbind_all: | |
704 /* To unbind back to the beginning of this frame. Not used yet, | |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
705 but will be needed for tail-recursion elimination. */ |
26363 | 706 BEFORE_POTENTIAL_GC (); |
310 | 707 unbind_to (count, Qnil); |
26363 | 708 AFTER_POTENTIAL_GC (); |
310 | 709 break; |
710 | |
711 case Bgoto: | |
16628 | 712 MAYBE_GC (); |
310 | 713 QUIT; |
714 op = FETCH2; /* pc = FETCH2 loses since FETCH2 contains pc++ */ | |
16784
79ea730b7e20
(Fbyte_code): Add error check for jumping out of range.
Richard M. Stallman <rms@gnu.org>
parents:
16628
diff
changeset
|
715 CHECK_RANGE (op); |
26363 | 716 stack.pc = stack.byte_string_start + op; |
310 | 717 break; |
718 | |
719 case Bgotoifnonnil: | |
16628 | 720 MAYBE_GC (); |
310 | 721 op = FETCH2; |
944 | 722 if (!NILP (POP)) |
310 | 723 { |
724 QUIT; | |
16784
79ea730b7e20
(Fbyte_code): Add error check for jumping out of range.
Richard M. Stallman <rms@gnu.org>
parents:
16628
diff
changeset
|
725 CHECK_RANGE (op); |
26363 | 726 stack.pc = stack.byte_string_start + op; |
310 | 727 } |
728 break; | |
729 | |
730 case Bgotoifnilelsepop: | |
16628 | 731 MAYBE_GC (); |
310 | 732 op = FETCH2; |
944 | 733 if (NILP (TOP)) |
310 | 734 { |
735 QUIT; | |
16784
79ea730b7e20
(Fbyte_code): Add error check for jumping out of range.
Richard M. Stallman <rms@gnu.org>
parents:
16628
diff
changeset
|
736 CHECK_RANGE (op); |
26363 | 737 stack.pc = stack.byte_string_start + op; |
310 | 738 } |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
739 else DISCARD (1); |
396 | 740 break; |
741 | |
934 | 742 case Bgotoifnonnilelsepop: |
16628 | 743 MAYBE_GC (); |
934 | 744 op = FETCH2; |
944 | 745 if (!NILP (TOP)) |
396 | 746 { |
747 QUIT; | |
16784
79ea730b7e20
(Fbyte_code): Add error check for jumping out of range.
Richard M. Stallman <rms@gnu.org>
parents:
16628
diff
changeset
|
748 CHECK_RANGE (op); |
26363 | 749 stack.pc = stack.byte_string_start + op; |
396 | 750 } |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
751 else DISCARD (1); |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
752 break; |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
753 |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
754 case BRgoto: |
16628 | 755 MAYBE_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
756 QUIT; |
26363 | 757 stack.pc += (int) *stack.pc - 127; |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
758 break; |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
759 |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
760 case BRgotoifnil: |
16628 | 761 MAYBE_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
762 if (NILP (POP)) |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
763 { |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
764 QUIT; |
26363 | 765 stack.pc += (int) *stack.pc - 128; |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
766 } |
26363 | 767 stack.pc++; |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
768 break; |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
769 |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
770 case BRgotoifnonnil: |
16628 | 771 MAYBE_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
772 if (!NILP (POP)) |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
773 { |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
774 QUIT; |
26363 | 775 stack.pc += (int) *stack.pc - 128; |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
776 } |
26363 | 777 stack.pc++; |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
778 break; |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
779 |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
780 case BRgotoifnilelsepop: |
16628 | 781 MAYBE_GC (); |
26363 | 782 op = *stack.pc++; |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
783 if (NILP (TOP)) |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
784 { |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
785 QUIT; |
26363 | 786 stack.pc += op - 128; |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
787 } |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
788 else DISCARD (1); |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
789 break; |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
790 |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
791 case BRgotoifnonnilelsepop: |
16628 | 792 MAYBE_GC (); |
26363 | 793 op = *stack.pc++; |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
794 if (!NILP (TOP)) |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
795 { |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
796 QUIT; |
26363 | 797 stack.pc += op - 128; |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
798 } |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
799 else DISCARD (1); |
396 | 800 break; |
801 | |
310 | 802 case Breturn: |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
803 result = POP; |
310 | 804 goto exit; |
805 | |
806 case Bdiscard: | |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
807 DISCARD (1); |
310 | 808 break; |
809 | |
810 case Bconstant2: | |
811 PUSH (vectorp[FETCH2]); | |
812 break; | |
813 | |
814 case Bsave_excursion: | |
26380
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
815 record_unwind_protect (save_excursion_restore, |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
816 save_excursion_save ()); |
310 | 817 break; |
818 | |
16292
86408ea93da6
(Bsave_current_buffer): New macro.
Richard M. Stallman <rms@gnu.org>
parents:
16039
diff
changeset
|
819 case Bsave_current_buffer: |
18245 | 820 case Bsave_current_buffer_1: |
20697
6c8ba5a6147b
(Fbyte_code) <Bsave_current_buffer_1>: Use set_buffer_if_live.
Richard M. Stallman <rms@gnu.org>
parents:
20592
diff
changeset
|
821 record_unwind_protect (set_buffer_if_live, Fcurrent_buffer ()); |
16292
86408ea93da6
(Bsave_current_buffer): New macro.
Richard M. Stallman <rms@gnu.org>
parents:
16039
diff
changeset
|
822 break; |
86408ea93da6
(Bsave_current_buffer): New macro.
Richard M. Stallman <rms@gnu.org>
parents:
16039
diff
changeset
|
823 |
310 | 824 case Bsave_window_excursion: |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
825 BEFORE_POTENTIAL_GC (); |
310 | 826 TOP = Fsave_window_excursion (TOP); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
827 AFTER_POTENTIAL_GC (); |
310 | 828 break; |
829 | |
830 case Bsave_restriction: | |
26380
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
831 record_unwind_protect (save_restriction_restore, |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
832 save_restriction_save ()); |
310 | 833 break; |
834 | |
835 case Bcatch: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
836 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
837 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
838 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
839 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
840 TOP = internal_catch (TOP, Feval, v1); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
841 AFTER_POTENTIAL_GC (); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
842 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
843 } |
310 | 844 |
845 case Bunwind_protect: | |
846 record_unwind_protect (0, POP); | |
847 (specpdl_ptr - 1)->symbol = Qnil; | |
848 break; | |
849 | |
850 case Bcondition_case: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
851 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
852 Lisp_Object v1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
853 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
854 v1 = Fcons (POP, v1); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
855 BEFORE_POTENTIAL_GC (); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
856 TOP = Fcondition_case (Fcons (TOP, v1)); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
857 AFTER_POTENTIAL_GC (); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
858 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
859 } |
310 | 860 |
861 case Btemp_output_buffer_setup: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
862 BEFORE_POTENTIAL_GC (); |
310 | 863 temp_output_buffer_setup (XSTRING (TOP)->data); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
864 AFTER_POTENTIAL_GC (); |
310 | 865 TOP = Vstandard_output; |
866 break; | |
867 | |
868 case Btemp_output_buffer_show: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
869 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
870 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
871 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
872 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
873 temp_output_buffer_show (TOP); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
874 TOP = v1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
875 /* pop binding of standard-output */ |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
876 unbind_to (specpdl_ptr - specpdl - 1, Qnil); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
877 AFTER_POTENTIAL_GC (); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
878 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
879 } |
310 | 880 |
881 case Bnth: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
882 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
883 Lisp_Object v1, v2; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
884 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
885 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
886 v2 = TOP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
887 CHECK_NUMBER (v2, 0); |
27442
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
888 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
889 op = XINT (v2); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
890 immediate_quit = 1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
891 while (--op >= 0) |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
892 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
893 if (CONSP (v1)) |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
894 v1 = XCDR (v1); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
895 else if (!NILP (v1)) |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
896 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
897 immediate_quit = 0; |
27442
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
898 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
899 v1 = wrong_type_argument (Qlistp, v1); |
27442
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
900 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
901 immediate_quit = 1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
902 op++; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
903 } |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
904 } |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
905 immediate_quit = 0; |
26380
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
906 if (CONSP (v1)) |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
907 TOP = XCAR (v1); |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
908 else if (NILP (v1)) |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
909 TOP = Qnil; |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
910 else |
27442
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
911 { |
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
912 BEFORE_POTENTIAL_GC (); |
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
913 Fcar (wrong_type_argument (Qlistp, v1)); |
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
914 AFTER_POTENTIAL_GC (); |
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
915 } |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
916 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
917 } |
310 | 918 |
919 case Bsymbolp: | |
9139
127823d9444d
(Fbyte_code): Use type test macros.
Karl Heuer <kwzh@gnu.org>
parents:
4696
diff
changeset
|
920 TOP = SYMBOLP (TOP) ? Qt : Qnil; |
310 | 921 break; |
922 | |
923 case Bconsp: | |
924 TOP = CONSP (TOP) ? Qt : Qnil; | |
925 break; | |
926 | |
927 case Bstringp: | |
9139
127823d9444d
(Fbyte_code): Use type test macros.
Karl Heuer <kwzh@gnu.org>
parents:
4696
diff
changeset
|
928 TOP = STRINGP (TOP) ? Qt : Qnil; |
310 | 929 break; |
930 | |
931 case Blistp: | |
944 | 932 TOP = CONSP (TOP) || NILP (TOP) ? Qt : Qnil; |
310 | 933 break; |
934 | |
935 case Bnot: | |
944 | 936 TOP = NILP (TOP) ? Qt : Qnil; |
310 | 937 break; |
938 | |
939 case Bcons: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
940 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
941 Lisp_Object v1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
942 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
943 TOP = Fcons (TOP, v1); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
944 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
945 } |
310 | 946 |
947 case Blist1: | |
948 TOP = Fcons (TOP, Qnil); | |
949 break; | |
950 | |
951 case Blist2: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
952 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
953 Lisp_Object v1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
954 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
955 TOP = Fcons (TOP, Fcons (v1, Qnil)); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
956 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
957 } |
310 | 958 |
959 case Blist3: | |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
960 DISCARD (2); |
310 | 961 TOP = Flist (3, &TOP); |
962 break; | |
963 | |
964 case Blist4: | |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
965 DISCARD (3); |
310 | 966 TOP = Flist (4, &TOP); |
967 break; | |
968 | |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
969 case BlistN: |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
970 op = FETCH; |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
971 DISCARD (op - 1); |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
972 TOP = Flist (op, &TOP); |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
973 break; |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
974 |
310 | 975 case Blength: |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
976 BEFORE_POTENTIAL_GC (); |
310 | 977 TOP = Flength (TOP); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
978 AFTER_POTENTIAL_GC (); |
310 | 979 break; |
980 | |
981 case Baref: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
982 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
983 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
984 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
985 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
986 TOP = Faref (TOP, v1); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
987 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
988 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
989 } |
310 | 990 |
991 case Baset: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
992 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
993 Lisp_Object v1, v2; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
994 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
995 v2 = POP; v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
996 TOP = Faset (TOP, v1, v2); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
997 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
998 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
999 } |
310 | 1000 |
1001 case Bsymbol_value: | |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1002 BEFORE_POTENTIAL_GC (); |
310 | 1003 TOP = Fsymbol_value (TOP); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1004 AFTER_POTENTIAL_GC (); |
310 | 1005 break; |
1006 | |
1007 case Bsymbol_function: | |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1008 BEFORE_POTENTIAL_GC (); |
310 | 1009 TOP = Fsymbol_function (TOP); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1010 AFTER_POTENTIAL_GC (); |
310 | 1011 break; |
1012 | |
1013 case Bset: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1014 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1015 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1016 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1017 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1018 TOP = Fset (TOP, v1); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1019 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1020 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1021 } |
310 | 1022 |
1023 case Bfset: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1024 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1025 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1026 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1027 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1028 TOP = Ffset (TOP, v1); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1029 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1030 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1031 } |
310 | 1032 |
1033 case Bget: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1034 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1035 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1036 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1037 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1038 TOP = Fget (TOP, v1); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1039 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1040 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1041 } |
310 | 1042 |
1043 case Bsubstring: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1044 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1045 Lisp_Object v1, v2; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1046 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1047 v2 = POP; v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1048 TOP = Fsubstring (TOP, v1, v2); |
26380
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
1049 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1050 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1051 } |
310 | 1052 |
1053 case Bconcat2: | |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1054 BEFORE_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1055 DISCARD (1); |
310 | 1056 TOP = Fconcat (2, &TOP); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1057 AFTER_POTENTIAL_GC (); |
310 | 1058 break; |
1059 | |
1060 case Bconcat3: | |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1061 BEFORE_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1062 DISCARD (2); |
310 | 1063 TOP = Fconcat (3, &TOP); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1064 AFTER_POTENTIAL_GC (); |
310 | 1065 break; |
1066 | |
1067 case Bconcat4: | |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1068 BEFORE_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1069 DISCARD (3); |
310 | 1070 TOP = Fconcat (4, &TOP); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1071 AFTER_POTENTIAL_GC (); |
310 | 1072 break; |
1073 | |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1074 case BconcatN: |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1075 op = FETCH; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1076 BEFORE_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1077 DISCARD (op - 1); |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1078 TOP = Fconcat (op, &TOP); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1079 AFTER_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1080 break; |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1081 |
310 | 1082 case Bsub1: |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1083 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1084 Lisp_Object v1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1085 v1 = TOP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1086 if (INTEGERP (v1)) |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1087 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1088 XSETINT (v1, XINT (v1) - 1); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1089 TOP = v1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1090 } |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1091 else |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1092 TOP = Fsub1 (v1); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1093 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1094 } |
310 | 1095 |
1096 case Badd1: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1097 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1098 Lisp_Object v1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1099 v1 = TOP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1100 if (INTEGERP (v1)) |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1101 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1102 XSETINT (v1, XINT (v1) + 1); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1103 TOP = v1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1104 } |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1105 else |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1106 { |
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1107 BEFORE_POTENTIAL_GC (); |
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1108 TOP = Fadd1 (v1); |
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1109 AFTER_POTENTIAL_GC (); |
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1110 } |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1111 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1112 } |
310 | 1113 |
1114 case Beqlsign: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1115 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1116 Lisp_Object v1, v2; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1117 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1118 v2 = POP; v1 = TOP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1119 CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (v1, 0); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1120 CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (v2, 0); |
27442
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
1121 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1122 if (FLOATP (v1) || FLOATP (v2)) |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1123 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1124 double f1, f2; |
12527
ebaf016075f1
(Fbyte_code): For Beqlsign, if both args are ints,
Karl Heuer <kwzh@gnu.org>
parents:
10134
diff
changeset
|
1125 |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1126 f1 = (FLOATP (v1) ? XFLOAT_DATA (v1) : XINT (v1)); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1127 f2 = (FLOATP (v2) ? XFLOAT_DATA (v2) : XINT (v2)); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1128 TOP = (f1 == f2 ? Qt : Qnil); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1129 } |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1130 else |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1131 TOP = (XINT (v1) == XINT (v2) ? Qt : Qnil); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1132 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1133 } |
310 | 1134 |
1135 case Bgtr: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1136 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1137 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1138 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1139 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1140 TOP = Fgtr (TOP, v1); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1141 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1142 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1143 } |
310 | 1144 |
1145 case Blss: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1146 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1147 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1148 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1149 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1150 TOP = Flss (TOP, v1); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1151 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1152 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1153 } |
310 | 1154 |
1155 case Bleq: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1156 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1157 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1158 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1159 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1160 TOP = Fleq (TOP, v1); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1161 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1162 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1163 } |
310 | 1164 |
1165 case Bgeq: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1166 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1167 Lisp_Object v1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1168 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1169 TOP = Fgeq (TOP, v1); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1170 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1171 } |
310 | 1172 |
1173 case Bdiff: | |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1174 BEFORE_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1175 DISCARD (1); |
310 | 1176 TOP = Fminus (2, &TOP); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1177 AFTER_POTENTIAL_GC (); |
310 | 1178 break; |
1179 | |
1180 case Bnegate: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1181 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1182 Lisp_Object v1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1183 v1 = TOP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1184 if (INTEGERP (v1)) |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1185 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1186 XSETINT (v1, - XINT (v1)); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1187 TOP = v1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1188 } |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1189 else |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1190 { |
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1191 BEFORE_POTENTIAL_GC (); |
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1192 TOP = Fminus (1, &TOP); |
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1193 AFTER_POTENTIAL_GC (); |
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1194 } |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1195 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1196 } |
310 | 1197 |
1198 case Bplus: | |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1199 BEFORE_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1200 DISCARD (1); |
310 | 1201 TOP = Fplus (2, &TOP); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1202 AFTER_POTENTIAL_GC (); |
310 | 1203 break; |
1204 | |
1205 case Bmax: | |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1206 BEFORE_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1207 DISCARD (1); |
310 | 1208 TOP = Fmax (2, &TOP); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1209 AFTER_POTENTIAL_GC (); |
310 | 1210 break; |
1211 | |
1212 case Bmin: | |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1213 BEFORE_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1214 DISCARD (1); |
310 | 1215 TOP = Fmin (2, &TOP); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1216 AFTER_POTENTIAL_GC (); |
310 | 1217 break; |
1218 | |
1219 case Bmult: | |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1220 BEFORE_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1221 DISCARD (1); |
310 | 1222 TOP = Ftimes (2, &TOP); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1223 AFTER_POTENTIAL_GC (); |
310 | 1224 break; |
1225 | |
1226 case Bquo: | |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1227 BEFORE_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1228 DISCARD (1); |
310 | 1229 TOP = Fquo (2, &TOP); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1230 AFTER_POTENTIAL_GC (); |
310 | 1231 break; |
1232 | |
1233 case Brem: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1234 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1235 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1236 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1237 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1238 TOP = Frem (TOP, v1); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1239 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1240 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1241 } |
310 | 1242 |
1243 case Bpoint: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1244 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1245 Lisp_Object v1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1246 XSETFASTINT (v1, PT); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1247 PUSH (v1); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1248 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1249 } |
310 | 1250 |
1251 case Bgoto_char: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1252 BEFORE_POTENTIAL_GC (); |
310 | 1253 TOP = Fgoto_char (TOP); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1254 AFTER_POTENTIAL_GC (); |
310 | 1255 break; |
1256 | |
1257 case Binsert: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1258 BEFORE_POTENTIAL_GC (); |
310 | 1259 TOP = Finsert (1, &TOP); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1260 AFTER_POTENTIAL_GC (); |
310 | 1261 break; |
1262 | |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1263 case BinsertN: |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1264 op = FETCH; |
26380
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
1265 BEFORE_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1266 DISCARD (op - 1); |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1267 TOP = Finsert (op, &TOP); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1268 AFTER_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1269 break; |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1270 |
310 | 1271 case Bpoint_max: |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1272 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1273 Lisp_Object v1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1274 XSETFASTINT (v1, ZV); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1275 PUSH (v1); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1276 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1277 } |
310 | 1278 |
1279 case Bpoint_min: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1280 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1281 Lisp_Object v1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1282 XSETFASTINT (v1, BEGV); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1283 PUSH (v1); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1284 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1285 } |
310 | 1286 |
1287 case Bchar_after: | |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1288 BEFORE_POTENTIAL_GC (); |
310 | 1289 TOP = Fchar_after (TOP); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1290 AFTER_POTENTIAL_GC (); |
310 | 1291 break; |
1292 | |
1293 case Bfollowing_char: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1294 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1295 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1296 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1297 v1 = Ffollowing_char (); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1298 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1299 PUSH (v1); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1300 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1301 } |
310 | 1302 |
1303 case Bpreceding_char: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1304 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1305 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1306 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1307 v1 = Fprevious_char (); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1308 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1309 PUSH (v1); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1310 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1311 } |
310 | 1312 |
1313 case Bcurrent_column: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1314 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1315 Lisp_Object v1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1316 XSETFASTINT (v1, current_column ()); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1317 PUSH (v1); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1318 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1319 } |
310 | 1320 |
1321 case Bindent_to: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1322 BEFORE_POTENTIAL_GC (); |
310 | 1323 TOP = Findent_to (TOP, Qnil); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1324 AFTER_POTENTIAL_GC (); |
310 | 1325 break; |
1326 | |
1327 case Beolp: | |
1328 PUSH (Feolp ()); | |
1329 break; | |
1330 | |
1331 case Beobp: | |
1332 PUSH (Feobp ()); | |
1333 break; | |
1334 | |
1335 case Bbolp: | |
1336 PUSH (Fbolp ()); | |
1337 break; | |
1338 | |
1339 case Bbobp: | |
1340 PUSH (Fbobp ()); | |
1341 break; | |
1342 | |
1343 case Bcurrent_buffer: | |
1344 PUSH (Fcurrent_buffer ()); | |
1345 break; | |
1346 | |
1347 case Bset_buffer: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1348 BEFORE_POTENTIAL_GC (); |
310 | 1349 TOP = Fset_buffer (TOP); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1350 AFTER_POTENTIAL_GC (); |
310 | 1351 break; |
1352 | |
1353 case Binteractive_p: | |
1354 PUSH (Finteractive_p ()); | |
1355 break; | |
1356 | |
1357 case Bforward_char: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1358 BEFORE_POTENTIAL_GC (); |
310 | 1359 TOP = Fforward_char (TOP); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1360 AFTER_POTENTIAL_GC (); |
310 | 1361 break; |
1362 | |
1363 case Bforward_word: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1364 BEFORE_POTENTIAL_GC (); |
310 | 1365 TOP = Fforward_word (TOP); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1366 AFTER_POTENTIAL_GC (); |
310 | 1367 break; |
1368 | |
1369 case Bskip_chars_forward: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1370 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1371 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1372 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1373 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1374 TOP = Fskip_chars_forward (TOP, v1); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1375 AFTER_POTENTIAL_GC (); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1376 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1377 } |
310 | 1378 |
1379 case Bskip_chars_backward: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1380 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1381 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1382 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1383 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1384 TOP = Fskip_chars_backward (TOP, v1); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1385 AFTER_POTENTIAL_GC (); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1386 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1387 } |
310 | 1388 |
1389 case Bforward_line: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1390 BEFORE_POTENTIAL_GC (); |
310 | 1391 TOP = Fforward_line (TOP); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1392 AFTER_POTENTIAL_GC (); |
310 | 1393 break; |
1394 | |
1395 case Bchar_syntax: | |
27442
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
1396 BEFORE_POTENTIAL_GC (); |
310 | 1397 CHECK_NUMBER (TOP, 0); |
27442
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
1398 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1399 XSETFASTINT (TOP, syntax_code_spec[(int) SYNTAX (XINT (TOP))]); |
310 | 1400 break; |
1401 | |
1402 case Bbuffer_substring: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1403 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1404 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1405 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1406 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1407 TOP = Fbuffer_substring (TOP, v1); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1408 AFTER_POTENTIAL_GC (); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1409 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1410 } |
310 | 1411 |
1412 case Bdelete_region: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1413 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1414 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1415 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1416 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1417 TOP = Fdelete_region (TOP, v1); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1418 AFTER_POTENTIAL_GC (); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1419 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1420 } |
310 | 1421 |
1422 case Bnarrow_to_region: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1423 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1424 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1425 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1426 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1427 TOP = Fnarrow_to_region (TOP, v1); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1428 AFTER_POTENTIAL_GC (); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1429 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1430 } |
310 | 1431 |
1432 case Bwiden: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1433 BEFORE_POTENTIAL_GC (); |
310 | 1434 PUSH (Fwiden ()); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1435 AFTER_POTENTIAL_GC (); |
310 | 1436 break; |
1437 | |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1438 case Bend_of_line: |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1439 BEFORE_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1440 TOP = Fend_of_line (TOP); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1441 AFTER_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1442 break; |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1443 |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1444 case Bset_marker: |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1445 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1446 Lisp_Object v1, v2; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1447 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1448 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1449 v2 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1450 TOP = Fset_marker (TOP, v2, v1); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1451 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1452 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1453 } |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1454 |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1455 case Bmatch_beginning: |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1456 BEFORE_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1457 TOP = Fmatch_beginning (TOP); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1458 AFTER_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1459 break; |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1460 |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1461 case Bmatch_end: |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1462 BEFORE_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1463 TOP = Fmatch_end (TOP); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1464 AFTER_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1465 break; |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1466 |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1467 case Bupcase: |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1468 BEFORE_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1469 TOP = Fupcase (TOP); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1470 AFTER_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1471 break; |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1472 |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1473 case Bdowncase: |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1474 BEFORE_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1475 TOP = Fdowncase (TOP); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1476 AFTER_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1477 break; |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1478 |
310 | 1479 case Bstringeqlsign: |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1480 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1481 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1482 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1483 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1484 TOP = Fstring_equal (TOP, v1); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1485 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1486 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1487 } |
310 | 1488 |
1489 case Bstringlss: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1490 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1491 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1492 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1493 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1494 TOP = Fstring_lessp (TOP, v1); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1495 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1496 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1497 } |
310 | 1498 |
1499 case Bequal: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1500 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1501 Lisp_Object v1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1502 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1503 TOP = Fequal (TOP, v1); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1504 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1505 } |
310 | 1506 |
1507 case Bnthcdr: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1508 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1509 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1510 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1511 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1512 TOP = Fnthcdr (TOP, v1); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1513 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1514 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1515 } |
310 | 1516 |
1517 case Belt: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1518 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1519 Lisp_Object v1, v2; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1520 if (CONSP (TOP)) |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1521 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1522 /* Exchange args and then do nth. */ |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1523 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1524 v2 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1525 v1 = TOP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1526 CHECK_NUMBER (v2, 0); |
27442
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
1527 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1528 op = XINT (v2); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1529 immediate_quit = 1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1530 while (--op >= 0) |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1531 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1532 if (CONSP (v1)) |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1533 v1 = XCDR (v1); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1534 else if (!NILP (v1)) |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1535 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1536 immediate_quit = 0; |
27442
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
1537 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1538 v1 = wrong_type_argument (Qlistp, v1); |
27442
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
1539 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1540 immediate_quit = 1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1541 op++; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1542 } |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1543 } |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1544 immediate_quit = 0; |
26380
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
1545 if (CONSP (v1)) |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
1546 TOP = XCAR (v1); |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
1547 else if (NILP (v1)) |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
1548 TOP = Qnil; |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
1549 else |
27442
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
1550 { |
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
1551 BEFORE_POTENTIAL_GC (); |
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
1552 Fcar (wrong_type_argument (Qlistp, v1)); |
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
1553 AFTER_POTENTIAL_GC (); |
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
1554 } |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1555 } |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1556 else |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1557 { |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1558 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1559 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1560 TOP = Felt (TOP, v1); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1561 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1562 } |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1563 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1564 } |
310 | 1565 |
1566 case Bmember: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1567 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1568 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1569 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1570 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1571 TOP = Fmember (TOP, v1); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1572 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1573 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1574 } |
310 | 1575 |
1576 case Bassq: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1577 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1578 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1579 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1580 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1581 TOP = Fassq (TOP, v1); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1582 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1583 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1584 } |
310 | 1585 |
1586 case Bnreverse: | |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1587 BEFORE_POTENTIAL_GC (); |
310 | 1588 TOP = Fnreverse (TOP); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1589 AFTER_POTENTIAL_GC (); |
310 | 1590 break; |
1591 | |
1592 case Bsetcar: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1593 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1594 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1595 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1596 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1597 TOP = Fsetcar (TOP, v1); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1598 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1599 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1600 } |
310 | 1601 |
1602 case Bsetcdr: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1603 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1604 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1605 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1606 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1607 TOP = Fsetcdr (TOP, v1); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1608 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1609 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1610 } |
310 | 1611 |
1612 case Bcar_safe: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1613 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1614 Lisp_Object v1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1615 v1 = TOP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1616 if (CONSP (v1)) |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1617 TOP = XCAR (v1); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1618 else |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1619 TOP = Qnil; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1620 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1621 } |
310 | 1622 |
1623 case Bcdr_safe: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1624 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1625 Lisp_Object v1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1626 v1 = TOP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1627 if (CONSP (v1)) |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1628 TOP = XCDR (v1); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1629 else |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1630 TOP = Qnil; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1631 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1632 } |
310 | 1633 |
1634 case Bnconc: | |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1635 BEFORE_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1636 DISCARD (1); |
310 | 1637 TOP = Fnconc (2, &TOP); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1638 AFTER_POTENTIAL_GC (); |
310 | 1639 break; |
1640 | |
1641 case Bnumberp: | |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1642 TOP = (NUMBERP (TOP) ? Qt : Qnil); |
310 | 1643 break; |
1644 | |
1645 case Bintegerp: | |
9139
127823d9444d
(Fbyte_code): Use type test macros.
Karl Heuer <kwzh@gnu.org>
parents:
4696
diff
changeset
|
1646 TOP = INTEGERP (TOP) ? Qt : Qnil; |
310 | 1647 break; |
1648 | |
1649 #ifdef BYTE_CODE_SAFE | |
1650 case Bset_mark: | |
27442
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
1651 BEFORE_POTENTIAL_GC (); |
310 | 1652 error ("set-mark is an obsolete bytecode"); |
27442
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
1653 AFTER_POTENTIAL_GC (); |
310 | 1654 break; |
1655 case Bscan_buffer: | |
27442
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
1656 BEFORE_POTENTIAL_GC (); |
310 | 1657 error ("scan-buffer is an obsolete bytecode"); |
27442
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
1658 AFTER_POTENTIAL_GC (); |
310 | 1659 break; |
1660 #endif | |
1661 | |
27293
d94d421ca521
(Fbyte_code): Pass new arg to set_internal.
Richard M. Stallman <rms@gnu.org>
parents:
26380
diff
changeset
|
1662 case 0: |
d94d421ca521
(Fbyte_code): Pass new arg to set_internal.
Richard M. Stallman <rms@gnu.org>
parents:
26380
diff
changeset
|
1663 abort (); |
d94d421ca521
(Fbyte_code): Pass new arg to set_internal.
Richard M. Stallman <rms@gnu.org>
parents:
26380
diff
changeset
|
1664 |
d94d421ca521
(Fbyte_code): Pass new arg to set_internal.
Richard M. Stallman <rms@gnu.org>
parents:
26380
diff
changeset
|
1665 case 255: |
310 | 1666 default: |
1667 #ifdef BYTE_CODE_SAFE | |
1668 if (op < Bconstant) | |
27442
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
1669 { |
27727
9400865ec7cf
Remove `LISP_FLOAT_TYPE' and `standalone'.
Gerd Moellmann <gerd@gnu.org>
parents:
27442
diff
changeset
|
1670 abort (); |
27442
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
1671 } |
310 | 1672 if ((op -= Bconstant) >= const_length) |
27442
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
1673 { |
27727
9400865ec7cf
Remove `LISP_FLOAT_TYPE' and `standalone'.
Gerd Moellmann <gerd@gnu.org>
parents:
27442
diff
changeset
|
1674 abort (); |
27442
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
1675 } |
310 | 1676 PUSH (vectorp[op]); |
1677 #else | |
1678 PUSH (vectorp[op - Bconstant]); | |
1679 #endif | |
1680 } | |
1681 } | |
1682 | |
1683 exit: | |
26363 | 1684 |
1685 byte_stack_list = byte_stack_list->next; | |
1686 | |
310 | 1687 /* Binds and unbinds are supposed to be compiled balanced. */ |
1688 if (specpdl_ptr - specpdl != count) | |
1689 #ifdef BYTE_CODE_SAFE | |
1690 error ("binding stack not balanced (serious byte compiler bug)"); | |
1691 #else | |
1692 abort (); | |
1693 #endif | |
26363 | 1694 |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1695 return result; |
310 | 1696 } |
1697 | |
21514 | 1698 void |
310 | 1699 syms_of_bytecode () |
1700 { | |
1701 Qbytecode = intern ("byte-code"); | |
1702 staticpro (&Qbytecode); | |
1703 | |
1704 defsubr (&Sbyte_code); | |
1705 | |
1706 #ifdef BYTE_CODE_METER | |
1707 | |
1708 DEFVAR_LISP ("byte-code-meter", &Vbyte_code_meter, | |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1709 "A vector of vectors which holds a histogram of byte-code usage.\n\ |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1710 (aref (aref byte-code-meter 0) CODE) indicates how many times the byte\n\ |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1711 opcode CODE has been executed.\n\ |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1712 (aref (aref byte-code-meter CODE1) CODE2), where CODE1 is not 0,\n\ |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1713 indicates how many times the byte opcodes CODE1 and CODE2 have been\n\ |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1714 executed in succession."); |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1715 DEFVAR_BOOL ("byte-metering-on", &byte_metering_on, |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1716 "If non-nil, keep profiling information on byte code usage.\n\ |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1717 The variable byte-code-meter indicates how often each byte opcode is used.\n\ |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1718 If a symbol has a property named `byte-code-meter' whose value is an\n\ |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1719 integer, it is incremented each time that symbol's function is called."); |
310 | 1720 |
1721 byte_metering_on = 0; | |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1722 Vbyte_code_meter = Fmake_vector (make_number (256), make_number (0)); |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1723 Qbyte_code_meter = intern ("byte-code-meter"); |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1724 staticpro (&Qbyte_code_meter); |
310 | 1725 { |
1726 int i = 256; | |
1727 while (i--) | |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1728 XVECTOR (Vbyte_code_meter)->contents[i] = |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1729 Fmake_vector (make_number (256), make_number (0)); |
310 | 1730 } |
1731 #endif | |
1732 } |