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