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