Mercurial > emacs
annotate src/bytecode.c @ 97696:5d466e3c0ab7
(vc-dir-marked-only-files-and-states):
(vc-dir-child-files-and-states): Reverse the list before returning it.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Mon, 25 Aug 2008 15:14:52 +0000 |
parents | 0be9063ab8a8 |
children | e038c1a8307c |
rev | line source |
---|---|
310 | 1 /* Execution of byte code produced by bytecomp.el. |
64770
a0d1312ede66
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
64615
diff
changeset
|
2 Copyright (C) 1985, 1986, 1987, 1988, 1993, 2000, 2001, 2002, 2003, 2004, |
79759 | 3 2005, 2006, 2007, 2008 Free Software Foundation, Inc. |
310 | 4 |
5 This file is part of GNU Emacs. | |
6 | |
94963
8971ddf55736
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
91327
diff
changeset
|
7 GNU Emacs is free software: you can redistribute it and/or modify |
310 | 8 it under the terms of the GNU General Public License as published by |
94963
8971ddf55736
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
91327
diff
changeset
|
9 the Free Software Foundation, either version 3 of the License, or |
8971ddf55736
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
91327
diff
changeset
|
10 (at your option) any later version. |
310 | 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 | |
94963
8971ddf55736
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
91327
diff
changeset
|
18 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
310 | 19 |
94963
8971ddf55736
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
91327
diff
changeset
|
20 /* |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
21 hacked on by jwz@lucid.com 17-jun-91 |
310 | 22 o added a compile-time switch to turn on simple sanity checking; |
23 o put back the obsolete byte-codes for error-detection; | |
45617
36bc4f35dc18
(Fbyte_code): Cast `current_column' return value to int.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
44031
diff
changeset
|
24 o added a new instruction, unbind_all, which I will use for |
310 | 25 tail-recursion elimination; |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
26 o made temp_output_buffer_show be called with the right number |
310 | 27 of args; |
28 o made the new bytecodes be called with args in the right order; | |
29 o added metering support. | |
30 | |
31 by Hallvard: | |
435
43e88c4db330
*** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents:
396
diff
changeset
|
32 o added relative jump instructions; |
310 | 33 o all conditionals now only do QUIT if they jump. |
34 */ | |
35 | |
4696
1fc792473491
Include <config.h> instead of "config.h".
Roland McGrath <roland@gnu.org>
parents:
2961
diff
changeset
|
36 #include <config.h> |
310 | 37 #include "lisp.h" |
38 #include "buffer.h" | |
88351
aac41b50c875
Include "character.h" instead of "charset.h".
Kenichi Handa <handa@m17n.org>
parents:
42350
diff
changeset
|
39 #include "character.h" |
310 | 40 #include "syntax.h" |
50995
c955fcb7a64a
Include window.h.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
50760
diff
changeset
|
41 #include "window.h" |
310 | 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. */ | |
46545
99d1224dfe6c
(struct byte_stack): Pointers into byte string now
Ken Raeburn <raeburn@raeburn.org>
parents:
46370
diff
changeset
|
242 const unsigned char *pc; |
26363 | 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; | |
46545
99d1224dfe6c
(struct byte_stack): Pointers into byte string now
Ken Raeburn <raeburn@raeburn.org>
parents:
46370
diff
changeset
|
252 const unsigned char *byte_string_start; |
26363 | 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. */ |
52472
30a3237237e0
(mark_byte_stack, unmark_byte_stack): Ignore the markbit.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
288 eassert (stack->top); |
45617
36bc4f35dc18
(Fbyte_code): Cast `current_column' return value to int.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
44031
diff
changeset
|
289 |
26363 | 290 for (obj = stack->bottom; obj <= stack->top; ++obj) |
52472
30a3237237e0
(mark_byte_stack, unmark_byte_stack): Ignore the markbit.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
291 mark_object (*obj); |
26363 | 292 |
52472
30a3237237e0
(mark_byte_stack, unmark_byte_stack): Ignore the markbit.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
293 mark_object (stack->byte_string); |
30a3237237e0
(mark_byte_stack, unmark_byte_stack): Ignore the markbit.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
52401
diff
changeset
|
294 mark_object (stack->constants); |
26363 | 295 } |
296 } | |
297 | |
298 | |
26376
6706cd0ece4d
(mark_byte_stack): Use XMARKBIT and XMARK.
Gerd Moellmann <gerd@gnu.org>
parents:
26370
diff
changeset
|
299 /* 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
|
300 counters. Called when GC has completed. */ |
26363 | 301 |
45617
36bc4f35dc18
(Fbyte_code): Cast `current_column' return value to int.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
44031
diff
changeset
|
302 void |
26376
6706cd0ece4d
(mark_byte_stack): Use XMARKBIT and XMARK.
Gerd Moellmann <gerd@gnu.org>
parents:
26370
diff
changeset
|
303 unmark_byte_stack () |
26363 | 304 { |
305 struct byte_stack *stack; | |
306 | |
307 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
|
308 { |
46370
40db0673e6f0
Most uses of XSTRING combined with STRING_BYTES or indirection changed to
Ken Raeburn <raeburn@raeburn.org>
parents:
46293
diff
changeset
|
309 if (stack->byte_string_start != SDATA (stack->byte_string)) |
26376
6706cd0ece4d
(mark_byte_stack): Use XMARKBIT and XMARK.
Gerd Moellmann <gerd@gnu.org>
parents:
26370
diff
changeset
|
310 { |
6706cd0ece4d
(mark_byte_stack): Use XMARKBIT and XMARK.
Gerd Moellmann <gerd@gnu.org>
parents:
26370
diff
changeset
|
311 int offset = stack->pc - stack->byte_string_start; |
46370
40db0673e6f0
Most uses of XSTRING combined with STRING_BYTES or indirection changed to
Ken Raeburn <raeburn@raeburn.org>
parents:
46293
diff
changeset
|
312 stack->byte_string_start = SDATA (stack->byte_string); |
26376
6706cd0ece4d
(mark_byte_stack): Use XMARKBIT and XMARK.
Gerd Moellmann <gerd@gnu.org>
parents:
26370
diff
changeset
|
313 stack->pc = stack->byte_string_start + offset; |
6706cd0ece4d
(mark_byte_stack): Use XMARKBIT and XMARK.
Gerd Moellmann <gerd@gnu.org>
parents:
26370
diff
changeset
|
314 } |
6706cd0ece4d
(mark_byte_stack): Use XMARKBIT and XMARK.
Gerd Moellmann <gerd@gnu.org>
parents:
26370
diff
changeset
|
315 } |
26363 | 316 } |
317 | |
310 | 318 |
319 /* Fetch the next byte from the bytecode stream */ | |
320 | |
26363 | 321 #define FETCH *stack.pc++ |
310 | 322 |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
323 /* 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
|
324 out of them */ |
310 | 325 |
326 #define FETCH2 (op = FETCH, op + (FETCH << 8)) | |
327 | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
328 /* 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
|
329 (*++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
|
330 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
|
331 -JimB */ |
26363 | 332 |
333 #define PUSH(x) (top++, *top = (x)) | |
310 | 334 |
335 /* Pop a value off the execution stack. */ | |
336 | |
26363 | 337 #define POP (*top--) |
310 | 338 |
339 /* Discard n values from the execution stack. */ | |
340 | |
26363 | 341 #define DISCARD(n) (top -= (n)) |
342 | |
343 /* Get the value which is at the top of the execution stack, but don't | |
344 pop it. */ | |
310 | 345 |
26363 | 346 #define TOP (*top) |
310 | 347 |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
348 /* Actions that must be performed before and after calling a function |
26363 | 349 that might GC. */ |
350 | |
351 #define BEFORE_POTENTIAL_GC() stack.top = top | |
352 #define AFTER_POTENTIAL_GC() stack.top = NULL | |
310 | 353 |
16628 | 354 /* Garbage collect if we have consed enough since the last time. |
355 We do this at every branch, to avoid loops that never GC. */ | |
356 | |
64615
c94082ceb41d
(MAYBE_GC): Test gc_cons_threshold and gc_relative_threshold, one by one.
Richard M. Stallman <rms@gnu.org>
parents:
64268
diff
changeset
|
357 #define MAYBE_GC() \ |
c94082ceb41d
(MAYBE_GC): Test gc_cons_threshold and gc_relative_threshold, one by one.
Richard M. Stallman <rms@gnu.org>
parents:
64268
diff
changeset
|
358 if (consing_since_gc > gc_cons_threshold \ |
c94082ceb41d
(MAYBE_GC): Test gc_cons_threshold and gc_relative_threshold, one by one.
Richard M. Stallman <rms@gnu.org>
parents:
64268
diff
changeset
|
359 && consing_since_gc > gc_relative_threshold) \ |
c94082ceb41d
(MAYBE_GC): Test gc_cons_threshold and gc_relative_threshold, one by one.
Richard M. Stallman <rms@gnu.org>
parents:
64268
diff
changeset
|
360 { \ |
c94082ceb41d
(MAYBE_GC): Test gc_cons_threshold and gc_relative_threshold, one by one.
Richard M. Stallman <rms@gnu.org>
parents:
64268
diff
changeset
|
361 BEFORE_POTENTIAL_GC (); \ |
c94082ceb41d
(MAYBE_GC): Test gc_cons_threshold and gc_relative_threshold, one by one.
Richard M. Stallman <rms@gnu.org>
parents:
64268
diff
changeset
|
362 Fgarbage_collect (); \ |
c94082ceb41d
(MAYBE_GC): Test gc_cons_threshold and gc_relative_threshold, one by one.
Richard M. Stallman <rms@gnu.org>
parents:
64268
diff
changeset
|
363 AFTER_POTENTIAL_GC (); \ |
c94082ceb41d
(MAYBE_GC): Test gc_cons_threshold and gc_relative_threshold, one by one.
Richard M. Stallman <rms@gnu.org>
parents:
64268
diff
changeset
|
364 } \ |
16815
9e0f59154164
(HANDLE_RELOCATION): New macro.
Richard M. Stallman <rms@gnu.org>
parents:
16784
diff
changeset
|
365 else |
9e0f59154164
(HANDLE_RELOCATION): New macro.
Richard M. Stallman <rms@gnu.org>
parents:
16784
diff
changeset
|
366 |
26363 | 367 /* Check for jumping out of range. */ |
16628 | 368 |
26363 | 369 #ifdef BYTE_CODE_SAFE |
370 | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
371 #define CHECK_RANGE(ARG) \ |
16784
79ea730b7e20
(Fbyte_code): Add error check for jumping out of range.
Richard M. Stallman <rms@gnu.org>
parents:
16628
diff
changeset
|
372 if (ARG >= bytestr_length) abort () |
79ea730b7e20
(Fbyte_code): Add error check for jumping out of range.
Richard M. Stallman <rms@gnu.org>
parents:
16628
diff
changeset
|
373 |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
374 #else /* not BYTE_CODE_SAFE */ |
26363 | 375 |
376 #define CHECK_RANGE(ARG) | |
377 | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
378 #endif /* not BYTE_CODE_SAFE */ |
26363 | 379 |
37029
d7378777b985
(BYTE_CODE_QUIT): New macro.
Gerd Moellmann <gerd@gnu.org>
parents:
36639
diff
changeset
|
380 /* A version of the QUIT macro which makes sure that the stack top is |
d7378777b985
(BYTE_CODE_QUIT): New macro.
Gerd Moellmann <gerd@gnu.org>
parents:
36639
diff
changeset
|
381 set before signaling `quit'. */ |
d7378777b985
(BYTE_CODE_QUIT): New macro.
Gerd Moellmann <gerd@gnu.org>
parents:
36639
diff
changeset
|
382 |
d7378777b985
(BYTE_CODE_QUIT): New macro.
Gerd Moellmann <gerd@gnu.org>
parents:
36639
diff
changeset
|
383 #define BYTE_CODE_QUIT \ |
d7378777b985
(BYTE_CODE_QUIT): New macro.
Gerd Moellmann <gerd@gnu.org>
parents:
36639
diff
changeset
|
384 do { \ |
d7378777b985
(BYTE_CODE_QUIT): New macro.
Gerd Moellmann <gerd@gnu.org>
parents:
36639
diff
changeset
|
385 if (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) \ |
d7378777b985
(BYTE_CODE_QUIT): New macro.
Gerd Moellmann <gerd@gnu.org>
parents:
36639
diff
changeset
|
386 { \ |
62981
79e0dd73c671
(BYTE_CODE_QUIT): Check Vthrow_on_input.
Kim F. Storm <storm@cua.dk>
parents:
57099
diff
changeset
|
387 Lisp_Object flag = Vquit_flag; \ |
37029
d7378777b985
(BYTE_CODE_QUIT): New macro.
Gerd Moellmann <gerd@gnu.org>
parents:
36639
diff
changeset
|
388 Vquit_flag = Qnil; \ |
d7378777b985
(BYTE_CODE_QUIT): New macro.
Gerd Moellmann <gerd@gnu.org>
parents:
36639
diff
changeset
|
389 BEFORE_POTENTIAL_GC (); \ |
62981
79e0dd73c671
(BYTE_CODE_QUIT): Check Vthrow_on_input.
Kim F. Storm <storm@cua.dk>
parents:
57099
diff
changeset
|
390 if (EQ (Vthrow_on_input, flag)) \ |
64848
51a9d1289e86
(BYTE_CODE_QUIT): Throw t to Vthrow_on_input.
Richard M. Stallman <rms@gnu.org>
parents:
64770
diff
changeset
|
391 Fthrow (Vthrow_on_input, Qt); \ |
37029
d7378777b985
(BYTE_CODE_QUIT): New macro.
Gerd Moellmann <gerd@gnu.org>
parents:
36639
diff
changeset
|
392 Fsignal (Qquit, Qnil); \ |
57099
569cd6a5babd
(BYTE_CODE_QUIT): Add missing AFTER_POTENTIAL_GC.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
56769
diff
changeset
|
393 AFTER_POTENTIAL_GC (); \ |
37029
d7378777b985
(BYTE_CODE_QUIT): New macro.
Gerd Moellmann <gerd@gnu.org>
parents:
36639
diff
changeset
|
394 } \ |
d7378777b985
(BYTE_CODE_QUIT): New macro.
Gerd Moellmann <gerd@gnu.org>
parents:
36639
diff
changeset
|
395 } while (0) |
d7378777b985
(BYTE_CODE_QUIT): New macro.
Gerd Moellmann <gerd@gnu.org>
parents:
36639
diff
changeset
|
396 |
26363 | 397 |
310 | 398 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
|
399 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
|
400 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
|
401 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
|
402 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
|
403 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
|
404 (bytestr, vector, maxdepth) |
310 | 405 Lisp_Object bytestr, vector, maxdepth; |
406 { | |
46293
1fb8f75062c6
Use macro SPECPDL_INDEX.
Juanma Barranquero <lekktu@gmail.com>
parents:
45617
diff
changeset
|
407 int count = SPECPDL_INDEX (); |
310 | 408 #ifdef BYTE_CODE_METER |
409 int this_op = 0; | |
410 int prev_op; | |
411 #endif | |
26363 | 412 int op; |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
413 /* Lisp_Object v1, v2; */ |
28999
4c808e415352
(Fbyte_code): If arg BYTESTR is multibyte, convert it
Kenichi Handa <handa@m17n.org>
parents:
28497
diff
changeset
|
414 Lisp_Object *vectorp; |
310 | 415 #ifdef BYTE_CODE_SAFE |
26363 | 416 int const_length = XVECTOR (vector)->size; |
417 Lisp_Object *stacke; | |
310 | 418 #endif |
28999
4c808e415352
(Fbyte_code): If arg BYTESTR is multibyte, convert it
Kenichi Handa <handa@m17n.org>
parents:
28497
diff
changeset
|
419 int bytestr_length; |
26363 | 420 struct byte_stack stack; |
421 Lisp_Object *top; | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
422 Lisp_Object result; |
310 | 423 |
96286
0be9063ab8a8
(Fbyte_code): Disable debugging code that doesn't compile.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
94963
diff
changeset
|
424 #if 0 /* CHECK_FRAME_FONT */ |
34711
583cd327d7b5
(toplevel) [CHECK_FRAME_FONT]: Include frame.h and
Gerd Moellmann <gerd@gnu.org>
parents:
33688
diff
changeset
|
425 { |
583cd327d7b5
(toplevel) [CHECK_FRAME_FONT]: Include frame.h and
Gerd Moellmann <gerd@gnu.org>
parents:
33688
diff
changeset
|
426 struct frame *f = SELECTED_FRAME (); |
583cd327d7b5
(toplevel) [CHECK_FRAME_FONT]: Include frame.h and
Gerd Moellmann <gerd@gnu.org>
parents:
33688
diff
changeset
|
427 if (FRAME_X_P (f) |
583cd327d7b5
(toplevel) [CHECK_FRAME_FONT]: Include frame.h and
Gerd Moellmann <gerd@gnu.org>
parents:
33688
diff
changeset
|
428 && FRAME_FONT (f)->direction != 0 |
583cd327d7b5
(toplevel) [CHECK_FRAME_FONT]: Include frame.h and
Gerd Moellmann <gerd@gnu.org>
parents:
33688
diff
changeset
|
429 && FRAME_FONT (f)->direction != 1) |
583cd327d7b5
(toplevel) [CHECK_FRAME_FONT]: Include frame.h and
Gerd Moellmann <gerd@gnu.org>
parents:
33688
diff
changeset
|
430 abort (); |
583cd327d7b5
(toplevel) [CHECK_FRAME_FONT]: Include frame.h and
Gerd Moellmann <gerd@gnu.org>
parents:
33688
diff
changeset
|
431 } |
583cd327d7b5
(toplevel) [CHECK_FRAME_FONT]: Include frame.h and
Gerd Moellmann <gerd@gnu.org>
parents:
33688
diff
changeset
|
432 #endif |
583cd327d7b5
(toplevel) [CHECK_FRAME_FONT]: Include frame.h and
Gerd Moellmann <gerd@gnu.org>
parents:
33688
diff
changeset
|
433 |
40656
cdfd4d09b79a
Update usage of CHECK_ macros (remove unused second argument).
Pavel Janík <Pavel@Janik.cz>
parents:
40088
diff
changeset
|
434 CHECK_STRING (bytestr); |
71825
7db6ed27e18f
(Fbyte_code): Use CHECK_VECTOR.
Kim F. Storm <storm@cua.dk>
parents:
68651
diff
changeset
|
435 CHECK_VECTOR (vector); |
40656
cdfd4d09b79a
Update usage of CHECK_ macros (remove unused second argument).
Pavel Janík <Pavel@Janik.cz>
parents:
40088
diff
changeset
|
436 CHECK_NUMBER (maxdepth); |
310 | 437 |
28999
4c808e415352
(Fbyte_code): If arg BYTESTR is multibyte, convert it
Kenichi Handa <handa@m17n.org>
parents:
28497
diff
changeset
|
438 if (STRING_MULTIBYTE (bytestr)) |
4c808e415352
(Fbyte_code): If arg BYTESTR is multibyte, convert it
Kenichi Handa <handa@m17n.org>
parents:
28497
diff
changeset
|
439 /* 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
|
440 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
|
441 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
|
442 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
|
443 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
|
444 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
|
445 |
46370
40db0673e6f0
Most uses of XSTRING combined with STRING_BYTES or indirection changed to
Ken Raeburn <raeburn@raeburn.org>
parents:
46293
diff
changeset
|
446 bytestr_length = SBYTES (bytestr); |
28999
4c808e415352
(Fbyte_code): If arg BYTESTR is multibyte, convert it
Kenichi Handa <handa@m17n.org>
parents:
28497
diff
changeset
|
447 vectorp = XVECTOR (vector)->contents; |
4c808e415352
(Fbyte_code): If arg BYTESTR is multibyte, convert it
Kenichi Handa <handa@m17n.org>
parents:
28497
diff
changeset
|
448 |
26363 | 449 stack.byte_string = bytestr; |
46370
40db0673e6f0
Most uses of XSTRING combined with STRING_BYTES or indirection changed to
Ken Raeburn <raeburn@raeburn.org>
parents:
46293
diff
changeset
|
450 stack.pc = stack.byte_string_start = SDATA (bytestr); |
26363 | 451 stack.constants = vector; |
45617
36bc4f35dc18
(Fbyte_code): Cast `current_column' return value to int.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
44031
diff
changeset
|
452 stack.bottom = (Lisp_Object *) alloca (XFASTINT (maxdepth) |
26363 | 453 * sizeof (Lisp_Object)); |
454 top = stack.bottom - 1; | |
455 stack.top = NULL; | |
456 stack.next = byte_stack_list; | |
457 byte_stack_list = &stack; | |
310 | 458 |
26363 | 459 #ifdef BYTE_CODE_SAFE |
460 stacke = stack.bottom - 1 + XFASTINT (maxdepth); | |
461 #endif | |
45617
36bc4f35dc18
(Fbyte_code): Cast `current_column' return value to int.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
44031
diff
changeset
|
462 |
310 | 463 while (1) |
464 { | |
465 #ifdef BYTE_CODE_SAFE | |
27438
5218aa03936e
(Fbyte_code) [BYTE_CODE_SAFE]: Fix typo.
Gerd Moellmann <gerd@gnu.org>
parents:
27293
diff
changeset
|
466 if (top > stacke) |
27727
9400865ec7cf
Remove `LISP_FLOAT_TYPE' and `standalone'.
Gerd Moellmann <gerd@gnu.org>
parents:
27442
diff
changeset
|
467 abort (); |
26363 | 468 else if (top < stack.bottom - 1) |
27727
9400865ec7cf
Remove `LISP_FLOAT_TYPE' and `standalone'.
Gerd Moellmann <gerd@gnu.org>
parents:
27442
diff
changeset
|
469 abort (); |
310 | 470 #endif |
471 | |
472 #ifdef BYTE_CODE_METER | |
473 prev_op = this_op; | |
474 this_op = op = FETCH; | |
475 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
|
476 #else |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
477 op = FETCH; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
478 #endif |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
479 |
310 | 480 switch (op) |
481 { | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
482 case Bvarref + 7: |
310 | 483 op = FETCH2; |
484 goto varref; | |
485 | |
45617
36bc4f35dc18
(Fbyte_code): Cast `current_column' return value to int.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
44031
diff
changeset
|
486 case Bvarref: |
36bc4f35dc18
(Fbyte_code): Cast `current_column' return value to int.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
44031
diff
changeset
|
487 case Bvarref + 1: |
36bc4f35dc18
(Fbyte_code): Cast `current_column' return value to int.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
44031
diff
changeset
|
488 case Bvarref + 2: |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
489 case Bvarref + 3: |
45617
36bc4f35dc18
(Fbyte_code): Cast `current_column' return value to int.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
44031
diff
changeset
|
490 case Bvarref + 4: |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
491 case Bvarref + 5: |
310 | 492 op = op - Bvarref; |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
493 goto varref; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
494 |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
495 /* 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
|
496 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
|
497 case Bvarref+6: |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
498 op = FETCH; |
310 | 499 varref: |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
500 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
501 Lisp_Object v1, v2; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
502 |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
503 v1 = vectorp[op]; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
504 if (SYMBOLP (v1)) |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
505 { |
39573
b17103d5e3c8
(Fbyte_code) <varref>: Use SYMBOL_VALUE.
Gerd Moellmann <gerd@gnu.org>
parents:
37029
diff
changeset
|
506 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
|
507 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
|
508 { |
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
509 BEFORE_POTENTIAL_GC (); |
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
510 v2 = Fsymbol_value (v1); |
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
511 AFTER_POTENTIAL_GC (); |
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
512 } |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
513 } |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
514 else |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
515 { |
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
516 BEFORE_POTENTIAL_GC (); |
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
517 v2 = Fsymbol_value (v1); |
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
518 AFTER_POTENTIAL_GC (); |
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
519 } |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
520 PUSH (v2); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
521 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
522 } |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
523 |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
524 case Bgotoifnil: |
67336
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
525 { |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
526 Lisp_Object v1; |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
527 MAYBE_GC (); |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
528 op = FETCH2; |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
529 v1 = POP; |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
530 if (NILP (v1)) |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
531 { |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
532 BYTE_CODE_QUIT; |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
533 CHECK_RANGE (op); |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
534 stack.pc = stack.byte_string_start + op; |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
535 } |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
536 break; |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
537 } |
310 | 538 |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
539 case Bcar: |
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 Lisp_Object v1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
542 v1 = TOP; |
71870
a0954041b695
(Fbyte_code): Use CAR, CDR for Bcar, Bcdr.
Kim F. Storm <storm@cua.dk>
parents:
71825
diff
changeset
|
543 TOP = CAR (v1); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
544 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
545 } |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
546 |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
547 case Beq: |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
548 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
549 Lisp_Object v1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
550 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
551 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
|
552 break; |
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 |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
555 case Bmemq: |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
556 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
557 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
558 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
559 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
560 TOP = Fmemq (TOP, v1); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
561 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
562 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
563 } |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
564 |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
565 case Bcdr: |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
566 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
567 Lisp_Object v1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
568 v1 = TOP; |
71870
a0954041b695
(Fbyte_code): Use CAR, CDR for Bcar, Bcdr.
Kim F. Storm <storm@cua.dk>
parents:
71825
diff
changeset
|
569 TOP = CDR (v1); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
570 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
571 } |
310 | 572 |
27782
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
573 case Bvarset: |
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
574 case Bvarset+1: |
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
575 case Bvarset+2: |
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
576 case Bvarset+3: |
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
577 case Bvarset+4: |
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
578 case Bvarset+5: |
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
579 op -= Bvarset; |
310 | 580 goto varset; |
581 | |
27782
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
582 case Bvarset+7: |
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
583 op = FETCH2; |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
584 goto varset; |
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 case Bvarset+6: |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
587 op = FETCH; |
310 | 588 varset: |
27782
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
589 { |
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
590 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
|
591 |
27782
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
592 sym = vectorp[op]; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
593 val = TOP; |
27782
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
594 |
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
595 /* Inline the most common case. */ |
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
596 if (SYMBOLP (sym) |
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
597 && !EQ (val, Qunbound) |
39573
b17103d5e3c8
(Fbyte_code) <varref>: Use SYMBOL_VALUE.
Gerd Moellmann <gerd@gnu.org>
parents:
37029
diff
changeset
|
598 && !XSYMBOL (sym)->indirect_variable |
73839
7c6439fdd0c7
(Fbyte_code): Use SYMBOL_CONSTANT_P macro.
Juanma Barranquero <lekktu@gmail.com>
parents:
71870
diff
changeset
|
599 && !SYMBOL_CONSTANT_P (sym) |
39573
b17103d5e3c8
(Fbyte_code) <varref>: Use SYMBOL_VALUE.
Gerd Moellmann <gerd@gnu.org>
parents:
37029
diff
changeset
|
600 && !MISCP (XSYMBOL (sym)->value)) |
27782
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
601 XSYMBOL (sym)->value = val; |
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
602 else |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
603 { |
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
604 BEFORE_POTENTIAL_GC (); |
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
605 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
|
606 AFTER_POTENTIAL_GC (); |
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
607 } |
27782
f53ecb062478
(Fbyte_code) <Bvarset>: Inline most common case.
Gerd Moellmann <gerd@gnu.org>
parents:
27727
diff
changeset
|
608 } |
51230
1e9eeff3616b
(Fbyte_code): Remove `unused val' warning.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
50995
diff
changeset
|
609 (void) POP; |
310 | 610 break; |
611 | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
612 case Bdup: |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
613 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
614 Lisp_Object v1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
615 v1 = TOP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
616 PUSH (v1); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
617 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
618 } |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
619 |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
620 /* ------------------ */ |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
621 |
310 | 622 case Bvarbind+6: |
623 op = FETCH; | |
624 goto varbind; | |
625 | |
626 case Bvarbind+7: | |
627 op = FETCH2; | |
628 goto varbind; | |
629 | |
26380
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
630 case Bvarbind: |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
631 case Bvarbind+1: |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
632 case Bvarbind+2: |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
633 case Bvarbind+3: |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
634 case Bvarbind+4: |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
635 case Bvarbind+5: |
310 | 636 op -= Bvarbind; |
637 varbind: | |
33688
35fae77e31dc
(Fbyte_code) <Bvarbind, Bunwind_protect>: Add
Gerd Moellmann <gerd@gnu.org>
parents:
31152
diff
changeset
|
638 /* Specbind can signal and thus GC. */ |
35fae77e31dc
(Fbyte_code) <Bvarbind, Bunwind_protect>: Add
Gerd Moellmann <gerd@gnu.org>
parents:
31152
diff
changeset
|
639 BEFORE_POTENTIAL_GC (); |
310 | 640 specbind (vectorp[op], POP); |
33688
35fae77e31dc
(Fbyte_code) <Bvarbind, Bunwind_protect>: Add
Gerd Moellmann <gerd@gnu.org>
parents:
31152
diff
changeset
|
641 AFTER_POTENTIAL_GC (); |
310 | 642 break; |
643 | |
644 case Bcall+6: | |
645 op = FETCH; | |
646 goto docall; | |
647 | |
648 case Bcall+7: | |
649 op = FETCH2; | |
650 goto docall; | |
651 | |
26380
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
652 case Bcall: |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
653 case Bcall+1: |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
654 case Bcall+2: |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
655 case Bcall+3: |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
656 case Bcall+4: |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
657 case Bcall+5: |
310 | 658 op -= Bcall; |
659 docall: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
660 { |
26380
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
661 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
662 DISCARD (op); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
663 #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
|
664 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
|
665 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
666 Lisp_Object v1, v2; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
667 |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
668 v1 = TOP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
669 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
|
670 if (INTEGERP (v2) |
39635
c6144b4dc5c1
(Fbyte_code): Use MOST_POSITIVE_FIXNUM.
Gerd Moellmann <gerd@gnu.org>
parents:
39634
diff
changeset
|
671 && 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
|
672 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
673 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
|
674 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
|
675 } |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
676 } |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
677 #endif |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
678 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
|
679 AFTER_POTENTIAL_GC (); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
680 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
681 } |
310 | 682 |
683 case Bunbind+6: | |
684 op = FETCH; | |
685 goto dounbind; | |
686 | |
687 case Bunbind+7: | |
688 op = FETCH2; | |
689 goto dounbind; | |
690 | |
26380
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
691 case Bunbind: |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
692 case Bunbind+1: |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
693 case Bunbind+2: |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
694 case Bunbind+3: |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
695 case Bunbind+4: |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
696 case Bunbind+5: |
310 | 697 op -= Bunbind; |
698 dounbind: | |
26363 | 699 BEFORE_POTENTIAL_GC (); |
46293
1fb8f75062c6
Use macro SPECPDL_INDEX.
Juanma Barranquero <lekktu@gmail.com>
parents:
45617
diff
changeset
|
700 unbind_to (SPECPDL_INDEX () - op, Qnil); |
26363 | 701 AFTER_POTENTIAL_GC (); |
310 | 702 break; |
703 | |
704 case Bunbind_all: | |
705 /* 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
|
706 but will be needed for tail-recursion elimination. */ |
26363 | 707 BEFORE_POTENTIAL_GC (); |
310 | 708 unbind_to (count, Qnil); |
26363 | 709 AFTER_POTENTIAL_GC (); |
310 | 710 break; |
711 | |
712 case Bgoto: | |
16628 | 713 MAYBE_GC (); |
37029
d7378777b985
(BYTE_CODE_QUIT): New macro.
Gerd Moellmann <gerd@gnu.org>
parents:
36639
diff
changeset
|
714 BYTE_CODE_QUIT; |
310 | 715 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
|
716 CHECK_RANGE (op); |
26363 | 717 stack.pc = stack.byte_string_start + op; |
310 | 718 break; |
719 | |
720 case Bgotoifnonnil: | |
67336
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
721 { |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
722 Lisp_Object v1; |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
723 MAYBE_GC (); |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
724 op = FETCH2; |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
725 v1 = POP; |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
726 if (!NILP (v1)) |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
727 { |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
728 BYTE_CODE_QUIT; |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
729 CHECK_RANGE (op); |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
730 stack.pc = stack.byte_string_start + op; |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
731 } |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
732 break; |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
733 } |
310 | 734 |
735 case Bgotoifnilelsepop: | |
16628 | 736 MAYBE_GC (); |
310 | 737 op = FETCH2; |
944 | 738 if (NILP (TOP)) |
310 | 739 { |
37029
d7378777b985
(BYTE_CODE_QUIT): New macro.
Gerd Moellmann <gerd@gnu.org>
parents:
36639
diff
changeset
|
740 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
|
741 CHECK_RANGE (op); |
26363 | 742 stack.pc = stack.byte_string_start + op; |
310 | 743 } |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
744 else DISCARD (1); |
396 | 745 break; |
746 | |
934 | 747 case Bgotoifnonnilelsepop: |
16628 | 748 MAYBE_GC (); |
934 | 749 op = FETCH2; |
944 | 750 if (!NILP (TOP)) |
396 | 751 { |
37029
d7378777b985
(BYTE_CODE_QUIT): New macro.
Gerd Moellmann <gerd@gnu.org>
parents:
36639
diff
changeset
|
752 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
|
753 CHECK_RANGE (op); |
26363 | 754 stack.pc = stack.byte_string_start + op; |
396 | 755 } |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
756 else DISCARD (1); |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
757 break; |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
758 |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
759 case BRgoto: |
16628 | 760 MAYBE_GC (); |
37029
d7378777b985
(BYTE_CODE_QUIT): New macro.
Gerd Moellmann <gerd@gnu.org>
parents:
36639
diff
changeset
|
761 BYTE_CODE_QUIT; |
26363 | 762 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
|
763 break; |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
764 |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
765 case BRgotoifnil: |
67336
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
766 { |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
767 Lisp_Object v1; |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
768 MAYBE_GC (); |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
769 v1 = POP; |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
770 if (NILP (v1)) |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
771 { |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
772 BYTE_CODE_QUIT; |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
773 stack.pc += (int) *stack.pc - 128; |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
774 } |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
775 stack.pc++; |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
776 break; |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
777 } |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
778 |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
779 case BRgotoifnonnil: |
67336
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
780 { |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
781 Lisp_Object v1; |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
782 MAYBE_GC (); |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
783 v1 = POP; |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
784 if (!NILP (v1)) |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
785 { |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
786 BYTE_CODE_QUIT; |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
787 stack.pc += (int) *stack.pc - 128; |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
788 } |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
789 stack.pc++; |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
790 break; |
1eb416c4b163
(Fbyte_code): Avoid dangerous side effects in NILP argument.
Ken Raeburn <raeburn@raeburn.org>
parents:
66527
diff
changeset
|
791 } |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
792 |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
793 case BRgotoifnilelsepop: |
16628 | 794 MAYBE_GC (); |
26363 | 795 op = *stack.pc++; |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
796 if (NILP (TOP)) |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
797 { |
37029
d7378777b985
(BYTE_CODE_QUIT): New macro.
Gerd Moellmann <gerd@gnu.org>
parents:
36639
diff
changeset
|
798 BYTE_CODE_QUIT; |
26363 | 799 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
|
800 } |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
801 else DISCARD (1); |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
802 break; |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
803 |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
804 case BRgotoifnonnilelsepop: |
16628 | 805 MAYBE_GC (); |
26363 | 806 op = *stack.pc++; |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
807 if (!NILP (TOP)) |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
808 { |
37029
d7378777b985
(BYTE_CODE_QUIT): New macro.
Gerd Moellmann <gerd@gnu.org>
parents:
36639
diff
changeset
|
809 BYTE_CODE_QUIT; |
26363 | 810 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
|
811 } |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
812 else DISCARD (1); |
396 | 813 break; |
814 | |
310 | 815 case Breturn: |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
816 result = POP; |
310 | 817 goto exit; |
818 | |
819 case Bdiscard: | |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
820 DISCARD (1); |
310 | 821 break; |
822 | |
823 case Bconstant2: | |
824 PUSH (vectorp[FETCH2]); | |
825 break; | |
826 | |
827 case Bsave_excursion: | |
26380
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
828 record_unwind_protect (save_excursion_restore, |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
829 save_excursion_save ()); |
310 | 830 break; |
831 | |
16292
86408ea93da6
(Bsave_current_buffer): New macro.
Richard M. Stallman <rms@gnu.org>
parents:
16039
diff
changeset
|
832 case Bsave_current_buffer: |
18245 | 833 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
|
834 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
|
835 break; |
86408ea93da6
(Bsave_current_buffer): New macro.
Richard M. Stallman <rms@gnu.org>
parents:
16039
diff
changeset
|
836 |
310 | 837 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
|
838 BEFORE_POTENTIAL_GC (); |
310 | 839 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
|
840 AFTER_POTENTIAL_GC (); |
310 | 841 break; |
842 | |
843 case Bsave_restriction: | |
26380
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
844 record_unwind_protect (save_restriction_restore, |
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
845 save_restriction_save ()); |
310 | 846 break; |
847 | |
848 case Bcatch: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
849 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
850 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
851 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
852 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
853 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
|
854 AFTER_POTENTIAL_GC (); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
855 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
856 } |
310 | 857 |
858 case Bunwind_protect: | |
50760
a32b154ea162
(Fbyte_code) <unwind-protect>: Use Fprogn rather than 0 and Qnil.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
47035
diff
changeset
|
859 record_unwind_protect (Fprogn, POP); |
310 | 860 break; |
861 | |
862 case Bcondition_case: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
863 { |
66527
098219e8d2e8
(Fbyte_code): Use internal_lisp_condition_case.
Richard M. Stallman <rms@gnu.org>
parents:
64848
diff
changeset
|
864 Lisp_Object handlers, body; |
098219e8d2e8
(Fbyte_code): Use internal_lisp_condition_case.
Richard M. Stallman <rms@gnu.org>
parents:
64848
diff
changeset
|
865 handlers = POP; |
098219e8d2e8
(Fbyte_code): Use internal_lisp_condition_case.
Richard M. Stallman <rms@gnu.org>
parents:
64848
diff
changeset
|
866 body = POP; |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
867 BEFORE_POTENTIAL_GC (); |
66527
098219e8d2e8
(Fbyte_code): Use internal_lisp_condition_case.
Richard M. Stallman <rms@gnu.org>
parents:
64848
diff
changeset
|
868 TOP = internal_lisp_condition_case (TOP, body, handlers); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
869 AFTER_POTENTIAL_GC (); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
870 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
871 } |
310 | 872 |
873 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
|
874 BEFORE_POTENTIAL_GC (); |
40656
cdfd4d09b79a
Update usage of CHECK_ macros (remove unused second argument).
Pavel Janík <Pavel@Janik.cz>
parents:
40088
diff
changeset
|
875 CHECK_STRING (TOP); |
46370
40db0673e6f0
Most uses of XSTRING combined with STRING_BYTES or indirection changed to
Ken Raeburn <raeburn@raeburn.org>
parents:
46293
diff
changeset
|
876 temp_output_buffer_setup (SDATA (TOP)); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
877 AFTER_POTENTIAL_GC (); |
310 | 878 TOP = Vstandard_output; |
879 break; | |
880 | |
881 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
|
882 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
883 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
884 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
885 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
886 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
|
887 TOP = v1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
888 /* pop binding of standard-output */ |
46293
1fb8f75062c6
Use macro SPECPDL_INDEX.
Juanma Barranquero <lekktu@gmail.com>
parents:
45617
diff
changeset
|
889 unbind_to (SPECPDL_INDEX () - 1, Qnil); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
890 AFTER_POTENTIAL_GC (); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
891 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
892 } |
310 | 893 |
894 case Bnth: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
895 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
896 Lisp_Object v1, v2; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
897 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
898 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
899 v2 = TOP; |
40656
cdfd4d09b79a
Update usage of CHECK_ macros (remove unused second argument).
Pavel Janík <Pavel@Janik.cz>
parents:
40088
diff
changeset
|
900 CHECK_NUMBER (v2); |
27442
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
901 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
902 op = XINT (v2); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
903 immediate_quit = 1; |
71870
a0954041b695
(Fbyte_code): Use CAR, CDR for Bcar, Bcdr.
Kim F. Storm <storm@cua.dk>
parents:
71825
diff
changeset
|
904 while (--op >= 0 && CONSP (v1)) |
a0954041b695
(Fbyte_code): Use CAR, CDR for Bcar, Bcdr.
Kim F. Storm <storm@cua.dk>
parents:
71825
diff
changeset
|
905 v1 = XCDR (v1); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
906 immediate_quit = 0; |
71870
a0954041b695
(Fbyte_code): Use CAR, CDR for Bcar, Bcdr.
Kim F. Storm <storm@cua.dk>
parents:
71825
diff
changeset
|
907 TOP = CAR (v1); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
908 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
909 } |
310 | 910 |
911 case Bsymbolp: | |
9139
127823d9444d
(Fbyte_code): Use type test macros.
Karl Heuer <kwzh@gnu.org>
parents:
4696
diff
changeset
|
912 TOP = SYMBOLP (TOP) ? Qt : Qnil; |
310 | 913 break; |
914 | |
915 case Bconsp: | |
916 TOP = CONSP (TOP) ? Qt : Qnil; | |
917 break; | |
918 | |
919 case Bstringp: | |
9139
127823d9444d
(Fbyte_code): Use type test macros.
Karl Heuer <kwzh@gnu.org>
parents:
4696
diff
changeset
|
920 TOP = STRINGP (TOP) ? Qt : Qnil; |
310 | 921 break; |
922 | |
923 case Blistp: | |
944 | 924 TOP = CONSP (TOP) || NILP (TOP) ? Qt : Qnil; |
310 | 925 break; |
926 | |
927 case Bnot: | |
944 | 928 TOP = NILP (TOP) ? Qt : Qnil; |
310 | 929 break; |
930 | |
931 case Bcons: | |
26370
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 Lisp_Object v1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
934 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
935 TOP = Fcons (TOP, v1); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
936 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
937 } |
310 | 938 |
939 case Blist1: | |
940 TOP = Fcons (TOP, Qnil); | |
941 break; | |
942 | |
943 case Blist2: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
944 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
945 Lisp_Object v1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
946 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
947 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
|
948 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
949 } |
310 | 950 |
951 case Blist3: | |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
952 DISCARD (2); |
310 | 953 TOP = Flist (3, &TOP); |
954 break; | |
955 | |
956 case Blist4: | |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
957 DISCARD (3); |
310 | 958 TOP = Flist (4, &TOP); |
959 break; | |
960 | |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
961 case BlistN: |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
962 op = FETCH; |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
963 DISCARD (op - 1); |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
964 TOP = Flist (op, &TOP); |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
965 break; |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
966 |
310 | 967 case Blength: |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
968 BEFORE_POTENTIAL_GC (); |
310 | 969 TOP = Flength (TOP); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
970 AFTER_POTENTIAL_GC (); |
310 | 971 break; |
972 | |
973 case Baref: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
974 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
975 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
976 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
977 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
978 TOP = Faref (TOP, v1); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
979 AFTER_POTENTIAL_GC (); |
26370
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 Baset: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
984 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
985 Lisp_Object v1, v2; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
986 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
987 v2 = POP; v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
988 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
|
989 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
990 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
991 } |
310 | 992 |
993 case Bsymbol_value: | |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
994 BEFORE_POTENTIAL_GC (); |
310 | 995 TOP = Fsymbol_value (TOP); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
996 AFTER_POTENTIAL_GC (); |
310 | 997 break; |
998 | |
999 case Bsymbol_function: | |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1000 BEFORE_POTENTIAL_GC (); |
310 | 1001 TOP = Fsymbol_function (TOP); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1002 AFTER_POTENTIAL_GC (); |
310 | 1003 break; |
1004 | |
1005 case Bset: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1006 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1007 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1008 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1009 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1010 TOP = Fset (TOP, v1); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1011 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1012 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1013 } |
310 | 1014 |
1015 case Bfset: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1016 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1017 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1018 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1019 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1020 TOP = Ffset (TOP, v1); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1021 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1022 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1023 } |
310 | 1024 |
1025 case Bget: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1026 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1027 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1028 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1029 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1030 TOP = Fget (TOP, v1); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1031 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1032 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1033 } |
310 | 1034 |
1035 case Bsubstring: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1036 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1037 Lisp_Object v1, v2; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1038 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1039 v2 = POP; v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1040 TOP = Fsubstring (TOP, v1, v2); |
26380
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
1041 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1042 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1043 } |
310 | 1044 |
1045 case Bconcat2: | |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1046 BEFORE_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1047 DISCARD (1); |
310 | 1048 TOP = Fconcat (2, &TOP); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1049 AFTER_POTENTIAL_GC (); |
310 | 1050 break; |
1051 | |
1052 case Bconcat3: | |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1053 BEFORE_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1054 DISCARD (2); |
310 | 1055 TOP = Fconcat (3, &TOP); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1056 AFTER_POTENTIAL_GC (); |
310 | 1057 break; |
1058 | |
1059 case Bconcat4: | |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1060 BEFORE_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1061 DISCARD (3); |
310 | 1062 TOP = Fconcat (4, &TOP); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1063 AFTER_POTENTIAL_GC (); |
310 | 1064 break; |
1065 | |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1066 case BconcatN: |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1067 op = FETCH; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1068 BEFORE_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1069 DISCARD (op - 1); |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1070 TOP = Fconcat (op, &TOP); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1071 AFTER_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1072 break; |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1073 |
310 | 1074 case Bsub1: |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1075 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1076 Lisp_Object v1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1077 v1 = TOP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1078 if (INTEGERP (v1)) |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1079 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1080 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
|
1081 TOP = v1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1082 } |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1083 else |
47035
58d2828adc19
(Fbyte_code): Fsub1 can GC, so protect it.
Miles Bader <miles@gnu.org>
parents:
46545
diff
changeset
|
1084 { |
58d2828adc19
(Fbyte_code): Fsub1 can GC, so protect it.
Miles Bader <miles@gnu.org>
parents:
46545
diff
changeset
|
1085 BEFORE_POTENTIAL_GC (); |
58d2828adc19
(Fbyte_code): Fsub1 can GC, so protect it.
Miles Bader <miles@gnu.org>
parents:
46545
diff
changeset
|
1086 TOP = Fsub1 (v1); |
58d2828adc19
(Fbyte_code): Fsub1 can GC, so protect it.
Miles Bader <miles@gnu.org>
parents:
46545
diff
changeset
|
1087 AFTER_POTENTIAL_GC (); |
58d2828adc19
(Fbyte_code): Fsub1 can GC, so protect it.
Miles Bader <miles@gnu.org>
parents:
46545
diff
changeset
|
1088 } |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1089 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1090 } |
310 | 1091 |
1092 case Badd1: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1093 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1094 Lisp_Object v1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1095 v1 = TOP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1096 if (INTEGERP (v1)) |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1097 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1098 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
|
1099 TOP = v1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1100 } |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1101 else |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1102 { |
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1103 BEFORE_POTENTIAL_GC (); |
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1104 TOP = Fadd1 (v1); |
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1105 AFTER_POTENTIAL_GC (); |
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1106 } |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1107 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1108 } |
310 | 1109 |
1110 case Beqlsign: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1111 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1112 Lisp_Object v1, v2; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1113 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1114 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
|
1115 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
|
1116 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
|
1117 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1118 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
|
1119 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1120 double f1, f2; |
12527
ebaf016075f1
(Fbyte_code): For Beqlsign, if both args are ints,
Karl Heuer <kwzh@gnu.org>
parents:
10134
diff
changeset
|
1121 |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1122 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
|
1123 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
|
1124 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
|
1125 } |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1126 else |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1127 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
|
1128 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1129 } |
310 | 1130 |
1131 case Bgtr: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1132 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1133 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1134 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1135 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1136 TOP = Fgtr (TOP, v1); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1137 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1138 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1139 } |
310 | 1140 |
1141 case Blss: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1142 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1143 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1144 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1145 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1146 TOP = Flss (TOP, v1); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1147 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1148 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1149 } |
310 | 1150 |
1151 case Bleq: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1152 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1153 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1154 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1155 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1156 TOP = Fleq (TOP, v1); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
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 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1159 } |
310 | 1160 |
1161 case Bgeq: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1162 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1163 Lisp_Object v1; |
35721
91fee7514fc7
(Fbyte_code) <Bgeq>: Add BEFORE_POTENTIAL_GC and
Dave Love <fx@gnu.org>
parents:
35711
diff
changeset
|
1164 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1165 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1166 TOP = Fgeq (TOP, v1); |
35721
91fee7514fc7
(Fbyte_code) <Bgeq>: Add BEFORE_POTENTIAL_GC and
Dave Love <fx@gnu.org>
parents:
35711
diff
changeset
|
1167 AFTER_POTENTIAL_GC (); |
26370
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 Bdiff: | |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1172 BEFORE_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1173 DISCARD (1); |
310 | 1174 TOP = Fminus (2, &TOP); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1175 AFTER_POTENTIAL_GC (); |
310 | 1176 break; |
1177 | |
1178 case Bnegate: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1179 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1180 Lisp_Object v1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1181 v1 = TOP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1182 if (INTEGERP (v1)) |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1183 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1184 XSETINT (v1, - XINT (v1)); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1185 TOP = v1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1186 } |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1187 else |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1188 { |
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1189 BEFORE_POTENTIAL_GC (); |
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1190 TOP = Fminus (1, &TOP); |
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1191 AFTER_POTENTIAL_GC (); |
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1192 } |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1193 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1194 } |
310 | 1195 |
1196 case Bplus: | |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1197 BEFORE_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1198 DISCARD (1); |
310 | 1199 TOP = Fplus (2, &TOP); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1200 AFTER_POTENTIAL_GC (); |
310 | 1201 break; |
1202 | |
1203 case Bmax: | |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1204 BEFORE_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1205 DISCARD (1); |
310 | 1206 TOP = Fmax (2, &TOP); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1207 AFTER_POTENTIAL_GC (); |
310 | 1208 break; |
1209 | |
1210 case Bmin: | |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1211 BEFORE_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1212 DISCARD (1); |
310 | 1213 TOP = Fmin (2, &TOP); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1214 AFTER_POTENTIAL_GC (); |
310 | 1215 break; |
1216 | |
1217 case Bmult: | |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1218 BEFORE_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1219 DISCARD (1); |
310 | 1220 TOP = Ftimes (2, &TOP); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1221 AFTER_POTENTIAL_GC (); |
310 | 1222 break; |
1223 | |
1224 case Bquo: | |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1225 BEFORE_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1226 DISCARD (1); |
310 | 1227 TOP = Fquo (2, &TOP); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1228 AFTER_POTENTIAL_GC (); |
310 | 1229 break; |
1230 | |
1231 case Brem: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1232 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1233 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1234 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1235 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1236 TOP = Frem (TOP, v1); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1237 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1238 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1239 } |
310 | 1240 |
1241 case Bpoint: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1242 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1243 Lisp_Object v1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1244 XSETFASTINT (v1, PT); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1245 PUSH (v1); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1246 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1247 } |
310 | 1248 |
1249 case Bgoto_char: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1250 BEFORE_POTENTIAL_GC (); |
310 | 1251 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
|
1252 AFTER_POTENTIAL_GC (); |
310 | 1253 break; |
1254 | |
1255 case Binsert: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1256 BEFORE_POTENTIAL_GC (); |
310 | 1257 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
|
1258 AFTER_POTENTIAL_GC (); |
310 | 1259 break; |
1260 | |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1261 case BinsertN: |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1262 op = FETCH; |
26380
97289ec4d7d0
* bytecode.c (Fbyte_code) <BinsertN, Bcall>: Do the
Gerd Moellmann <gerd@gnu.org>
parents:
26376
diff
changeset
|
1263 BEFORE_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1264 DISCARD (op - 1); |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1265 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
|
1266 AFTER_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1267 break; |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1268 |
310 | 1269 case Bpoint_max: |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1270 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1271 Lisp_Object v1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1272 XSETFASTINT (v1, ZV); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1273 PUSH (v1); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1274 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1275 } |
310 | 1276 |
1277 case Bpoint_min: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1278 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1279 Lisp_Object v1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1280 XSETFASTINT (v1, BEGV); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1281 PUSH (v1); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1282 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1283 } |
310 | 1284 |
1285 case Bchar_after: | |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1286 BEFORE_POTENTIAL_GC (); |
310 | 1287 TOP = Fchar_after (TOP); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1288 AFTER_POTENTIAL_GC (); |
310 | 1289 break; |
1290 | |
1291 case Bfollowing_char: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1292 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1293 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1294 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1295 v1 = Ffollowing_char (); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1296 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1297 PUSH (v1); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1298 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1299 } |
310 | 1300 |
1301 case Bpreceding_char: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1302 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1303 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1304 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1305 v1 = Fprevious_char (); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1306 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1307 PUSH (v1); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1308 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1309 } |
310 | 1310 |
1311 case Bcurrent_column: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1312 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1313 Lisp_Object v1; |
35711
f17e8743925c
(Fbyte_code) <Bcurrent_column>: Add
Gerd Moellmann <gerd@gnu.org>
parents:
34711
diff
changeset
|
1314 BEFORE_POTENTIAL_GC (); |
45617
36bc4f35dc18
(Fbyte_code): Cast `current_column' return value to int.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
44031
diff
changeset
|
1315 XSETFASTINT (v1, (int) current_column ()); /* iftc */ |
35711
f17e8743925c
(Fbyte_code) <Bcurrent_column>: Add
Gerd Moellmann <gerd@gnu.org>
parents:
34711
diff
changeset
|
1316 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1317 PUSH (v1); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1318 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1319 } |
310 | 1320 |
1321 case Bindent_to: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1322 BEFORE_POTENTIAL_GC (); |
310 | 1323 TOP = Findent_to (TOP, Qnil); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1324 AFTER_POTENTIAL_GC (); |
310 | 1325 break; |
1326 | |
1327 case Beolp: | |
1328 PUSH (Feolp ()); | |
1329 break; | |
1330 | |
1331 case Beobp: | |
1332 PUSH (Feobp ()); | |
1333 break; | |
1334 | |
1335 case Bbolp: | |
1336 PUSH (Fbolp ()); | |
1337 break; | |
1338 | |
1339 case Bbobp: | |
1340 PUSH (Fbobp ()); | |
1341 break; | |
1342 | |
1343 case Bcurrent_buffer: | |
1344 PUSH (Fcurrent_buffer ()); | |
1345 break; | |
1346 | |
1347 case Bset_buffer: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1348 BEFORE_POTENTIAL_GC (); |
310 | 1349 TOP = Fset_buffer (TOP); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1350 AFTER_POTENTIAL_GC (); |
310 | 1351 break; |
1352 | |
1353 case Binteractive_p: | |
1354 PUSH (Finteractive_p ()); | |
1355 break; | |
1356 | |
1357 case Bforward_char: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1358 BEFORE_POTENTIAL_GC (); |
310 | 1359 TOP = Fforward_char (TOP); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1360 AFTER_POTENTIAL_GC (); |
310 | 1361 break; |
1362 | |
1363 case Bforward_word: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1364 BEFORE_POTENTIAL_GC (); |
310 | 1365 TOP = Fforward_word (TOP); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1366 AFTER_POTENTIAL_GC (); |
310 | 1367 break; |
1368 | |
1369 case Bskip_chars_forward: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1370 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1371 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1372 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1373 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1374 TOP = Fskip_chars_forward (TOP, v1); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1375 AFTER_POTENTIAL_GC (); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1376 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1377 } |
310 | 1378 |
1379 case Bskip_chars_backward: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1380 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1381 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1382 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1383 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1384 TOP = Fskip_chars_backward (TOP, v1); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1385 AFTER_POTENTIAL_GC (); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1386 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1387 } |
310 | 1388 |
1389 case Bforward_line: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1390 BEFORE_POTENTIAL_GC (); |
310 | 1391 TOP = Fforward_line (TOP); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1392 AFTER_POTENTIAL_GC (); |
310 | 1393 break; |
1394 | |
1395 case Bchar_syntax: | |
89052
547647cd162a
(Fbyte_code): Convert a unibyte character to multibyte if necessary.
Kenichi Handa <handa@m17n.org>
parents:
88351
diff
changeset
|
1396 { |
547647cd162a
(Fbyte_code): Convert a unibyte character to multibyte if necessary.
Kenichi Handa <handa@m17n.org>
parents:
88351
diff
changeset
|
1397 int c; |
547647cd162a
(Fbyte_code): Convert a unibyte character to multibyte if necessary.
Kenichi Handa <handa@m17n.org>
parents:
88351
diff
changeset
|
1398 |
547647cd162a
(Fbyte_code): Convert a unibyte character to multibyte if necessary.
Kenichi Handa <handa@m17n.org>
parents:
88351
diff
changeset
|
1399 BEFORE_POTENTIAL_GC (); |
547647cd162a
(Fbyte_code): Convert a unibyte character to multibyte if necessary.
Kenichi Handa <handa@m17n.org>
parents:
88351
diff
changeset
|
1400 CHECK_CHARACTER (TOP); |
547647cd162a
(Fbyte_code): Convert a unibyte character to multibyte if necessary.
Kenichi Handa <handa@m17n.org>
parents:
88351
diff
changeset
|
1401 AFTER_POTENTIAL_GC (); |
547647cd162a
(Fbyte_code): Convert a unibyte character to multibyte if necessary.
Kenichi Handa <handa@m17n.org>
parents:
88351
diff
changeset
|
1402 c = XFASTINT (TOP); |
547647cd162a
(Fbyte_code): Convert a unibyte character to multibyte if necessary.
Kenichi Handa <handa@m17n.org>
parents:
88351
diff
changeset
|
1403 if (NILP (current_buffer->enable_multibyte_characters)) |
547647cd162a
(Fbyte_code): Convert a unibyte character to multibyte if necessary.
Kenichi Handa <handa@m17n.org>
parents:
88351
diff
changeset
|
1404 MAKE_CHAR_MULTIBYTE (c); |
547647cd162a
(Fbyte_code): Convert a unibyte character to multibyte if necessary.
Kenichi Handa <handa@m17n.org>
parents:
88351
diff
changeset
|
1405 XSETFASTINT (TOP, syntax_code_spec[(int) SYNTAX (c)]); |
89483 | 1406 } |
310 | 1407 break; |
1408 | |
1409 case Bbuffer_substring: | |
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 = Fbuffer_substring (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 Bdelete_region: | |
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 = Fdelete_region (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 Bnarrow_to_region: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1430 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1431 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1432 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1433 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1434 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
|
1435 AFTER_POTENTIAL_GC (); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1436 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1437 } |
310 | 1438 |
1439 case Bwiden: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1440 BEFORE_POTENTIAL_GC (); |
310 | 1441 PUSH (Fwiden ()); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1442 AFTER_POTENTIAL_GC (); |
310 | 1443 break; |
1444 | |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1445 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
|
1446 BEFORE_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1447 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
|
1448 AFTER_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1449 break; |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1450 |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1451 case Bset_marker: |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1452 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1453 Lisp_Object v1, v2; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1454 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1455 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1456 v2 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1457 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
|
1458 AFTER_POTENTIAL_GC (); |
26370
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 } |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1461 |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1462 case Bmatch_beginning: |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1463 BEFORE_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1464 TOP = Fmatch_beginning (TOP); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1465 AFTER_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1466 break; |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1467 |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1468 case Bmatch_end: |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1469 BEFORE_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1470 TOP = Fmatch_end (TOP); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1471 AFTER_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1472 break; |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1473 |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1474 case Bupcase: |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1475 BEFORE_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1476 TOP = Fupcase (TOP); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1477 AFTER_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1478 break; |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1479 |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1480 case Bdowncase: |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1481 BEFORE_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1482 TOP = Fdowncase (TOP); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1483 AFTER_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1484 break; |
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1485 |
310 | 1486 case Bstringeqlsign: |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1487 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1488 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1489 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1490 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1491 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
|
1492 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1493 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1494 } |
310 | 1495 |
1496 case Bstringlss: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1497 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1498 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1499 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1500 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1501 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
|
1502 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1503 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1504 } |
310 | 1505 |
1506 case Bequal: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1507 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1508 Lisp_Object v1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1509 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1510 TOP = Fequal (TOP, v1); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1511 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1512 } |
310 | 1513 |
1514 case Bnthcdr: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1515 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1516 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1517 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1518 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1519 TOP = Fnthcdr (TOP, v1); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1520 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1521 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1522 } |
310 | 1523 |
1524 case Belt: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1525 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1526 Lisp_Object v1, v2; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1527 if (CONSP (TOP)) |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1528 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1529 /* 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
|
1530 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1531 v2 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1532 v1 = TOP; |
40656
cdfd4d09b79a
Update usage of CHECK_ macros (remove unused second argument).
Pavel Janík <Pavel@Janik.cz>
parents:
40088
diff
changeset
|
1533 CHECK_NUMBER (v2); |
27442
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
1534 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1535 op = XINT (v2); |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1536 immediate_quit = 1; |
71870
a0954041b695
(Fbyte_code): Use CAR, CDR for Bcar, Bcdr.
Kim F. Storm <storm@cua.dk>
parents:
71825
diff
changeset
|
1537 while (--op >= 0 && CONSP (v1)) |
a0954041b695
(Fbyte_code): Use CAR, CDR for Bcar, Bcdr.
Kim F. Storm <storm@cua.dk>
parents:
71825
diff
changeset
|
1538 v1 = XCDR (v1); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1539 immediate_quit = 0; |
71870
a0954041b695
(Fbyte_code): Use CAR, CDR for Bcar, Bcdr.
Kim F. Storm <storm@cua.dk>
parents:
71825
diff
changeset
|
1540 TOP = CAR (v1); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1541 } |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1542 else |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1543 { |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1544 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1545 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1546 TOP = Felt (TOP, v1); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1547 AFTER_POTENTIAL_GC (); |
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 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1550 } |
310 | 1551 |
1552 case Bmember: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1553 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1554 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1555 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1556 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1557 TOP = Fmember (TOP, v1); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1558 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1559 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1560 } |
310 | 1561 |
1562 case Bassq: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1563 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1564 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1565 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1566 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1567 TOP = Fassq (TOP, v1); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1568 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1569 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1570 } |
310 | 1571 |
1572 case Bnreverse: | |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1573 BEFORE_POTENTIAL_GC (); |
310 | 1574 TOP = Fnreverse (TOP); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1575 AFTER_POTENTIAL_GC (); |
310 | 1576 break; |
1577 | |
1578 case Bsetcar: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1579 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1580 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1581 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1582 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1583 TOP = Fsetcar (TOP, v1); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1584 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1585 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1586 } |
310 | 1587 |
1588 case Bsetcdr: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1589 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1590 Lisp_Object v1; |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1591 BEFORE_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1592 v1 = POP; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1593 TOP = Fsetcdr (TOP, v1); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1594 AFTER_POTENTIAL_GC (); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1595 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1596 } |
310 | 1597 |
1598 case Bcar_safe: | |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1599 { |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1600 Lisp_Object v1; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1601 v1 = TOP; |
71870
a0954041b695
(Fbyte_code): Use CAR, CDR for Bcar, Bcdr.
Kim F. Storm <storm@cua.dk>
parents:
71825
diff
changeset
|
1602 TOP = CAR_SAFE (v1); |
26370
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 Bcdr_safe: | |
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; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1609 v1 = TOP; |
71870
a0954041b695
(Fbyte_code): Use CAR, CDR for Bcar, Bcdr.
Kim F. Storm <storm@cua.dk>
parents:
71825
diff
changeset
|
1610 TOP = CDR_SAFE (v1); |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1611 break; |
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1612 } |
310 | 1613 |
1614 case Bnconc: | |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1615 BEFORE_POTENTIAL_GC (); |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1616 DISCARD (1); |
310 | 1617 TOP = Fnconc (2, &TOP); |
28497
334ebb7a551c
(Fbyte_code): Add a bunch of BEFORE_POTENTIAL_GC/
Gerd Moellmann <gerd@gnu.org>
parents:
27817
diff
changeset
|
1618 AFTER_POTENTIAL_GC (); |
310 | 1619 break; |
1620 | |
1621 case Bnumberp: | |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1622 TOP = (NUMBERP (TOP) ? Qt : Qnil); |
310 | 1623 break; |
1624 | |
1625 case Bintegerp: | |
9139
127823d9444d
(Fbyte_code): Use type test macros.
Karl Heuer <kwzh@gnu.org>
parents:
4696
diff
changeset
|
1626 TOP = INTEGERP (TOP) ? Qt : Qnil; |
310 | 1627 break; |
1628 | |
1629 #ifdef BYTE_CODE_SAFE | |
1630 case Bset_mark: | |
27442
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
1631 BEFORE_POTENTIAL_GC (); |
310 | 1632 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
|
1633 AFTER_POTENTIAL_GC (); |
310 | 1634 break; |
1635 case Bscan_buffer: | |
27442
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
1636 BEFORE_POTENTIAL_GC (); |
310 | 1637 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
|
1638 AFTER_POTENTIAL_GC (); |
310 | 1639 break; |
1640 #endif | |
1641 | |
27293
d94d421ca521
(Fbyte_code): Pass new arg to set_internal.
Richard M. Stallman <rms@gnu.org>
parents:
26380
diff
changeset
|
1642 case 0: |
d94d421ca521
(Fbyte_code): Pass new arg to set_internal.
Richard M. Stallman <rms@gnu.org>
parents:
26380
diff
changeset
|
1643 abort (); |
d94d421ca521
(Fbyte_code): Pass new arg to set_internal.
Richard M. Stallman <rms@gnu.org>
parents:
26380
diff
changeset
|
1644 |
d94d421ca521
(Fbyte_code): Pass new arg to set_internal.
Richard M. Stallman <rms@gnu.org>
parents:
26380
diff
changeset
|
1645 case 255: |
310 | 1646 default: |
1647 #ifdef BYTE_CODE_SAFE | |
1648 if (op < Bconstant) | |
27442
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
1649 { |
27727
9400865ec7cf
Remove `LISP_FLOAT_TYPE' and `standalone'.
Gerd Moellmann <gerd@gnu.org>
parents:
27442
diff
changeset
|
1650 abort (); |
27442
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
1651 } |
310 | 1652 if ((op -= Bconstant) >= const_length) |
27442
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
1653 { |
27727
9400865ec7cf
Remove `LISP_FLOAT_TYPE' and `standalone'.
Gerd Moellmann <gerd@gnu.org>
parents:
27442
diff
changeset
|
1654 abort (); |
27442
ad65b21bc4cd
(Fbyte_code): Use {BEFORE,AFTER}_POTENTIAL_GC where
Gerd Moellmann <gerd@gnu.org>
parents:
27438
diff
changeset
|
1655 } |
310 | 1656 PUSH (vectorp[op]); |
1657 #else | |
1658 PUSH (vectorp[op - Bconstant]); | |
1659 #endif | |
1660 } | |
1661 } | |
1662 | |
1663 exit: | |
26363 | 1664 |
1665 byte_stack_list = byte_stack_list->next; | |
1666 | |
310 | 1667 /* Binds and unbinds are supposed to be compiled balanced. */ |
46293
1fb8f75062c6
Use macro SPECPDL_INDEX.
Juanma Barranquero <lekktu@gmail.com>
parents:
45617
diff
changeset
|
1668 if (SPECPDL_INDEX () != count) |
310 | 1669 #ifdef BYTE_CODE_SAFE |
1670 error ("binding stack not balanced (serious byte compiler bug)"); | |
1671 #else | |
1672 abort (); | |
1673 #endif | |
45617
36bc4f35dc18
(Fbyte_code): Cast `current_column' return value to int.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
44031
diff
changeset
|
1674 |
26370
5f52cc1417ab
Use block statements in cases and declare v1 and v2
Gerd Moellmann <gerd@gnu.org>
parents:
26368
diff
changeset
|
1675 return result; |
310 | 1676 } |
1677 | |
21514 | 1678 void |
310 | 1679 syms_of_bytecode () |
1680 { | |
1681 Qbytecode = intern ("byte-code"); | |
1682 staticpro (&Qbytecode); | |
1683 | |
1684 defsubr (&Sbyte_code); | |
1685 | |
1686 #ifdef BYTE_CODE_METER | |
1687 | |
1688 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
|
1689 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
|
1690 \(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
|
1691 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
|
1692 \(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
|
1693 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
|
1694 executed in succession. */); |
45617
36bc4f35dc18
(Fbyte_code): Cast `current_column' return value to int.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
44031
diff
changeset
|
1695 |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1696 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
|
1697 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
|
1698 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
|
1699 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
|
1700 integer, it is incremented each time that symbol's function is called. */); |
310 | 1701 |
1702 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
|
1703 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
|
1704 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
|
1705 staticpro (&Qbyte_code_meter); |
310 | 1706 { |
1707 int i = 256; | |
1708 while (i--) | |
959
c1fc76b79275
* bytecode.c (Fbyte_code): When metering the Bcall opcodes, make
Jim Blandy <jimb@redhat.com>
parents:
944
diff
changeset
|
1709 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
|
1710 Fmake_vector (make_number (256), make_number (0)); |
310 | 1711 } |
1712 #endif | |
1713 } | |
52401 | 1714 |
1715 /* arch-tag: b9803b6f-1ed6-4190-8adf-33fd3a9d10e9 | |
1716 (do not change this comment) */ |