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