annotate src/bytecode.c @ 673:6217fa6e2cab

*** empty log message ***
author Jim Blandy <jimb@redhat.com>
date Tue, 02 Jun 1992 05:18:06 +0000
parents eca8812e61cd
children 1e2e41fd188b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1 /* Execution of byte code produced by bytecomp.el.
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 485
diff changeset
2 Copyright (C) 1985, 1986, 1987, 1988, 1992 Free Software Foundation, Inc.
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
3
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
4 This file is part of GNU Emacs.
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
5
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
6 GNU Emacs is free software; you can redistribute it and/or modify
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
7 it under the terms of the GNU General Public License as published by
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 485
diff changeset
8 the Free Software Foundation; either version 2, or (at your option)
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
9 any later version.
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
10
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
11 GNU Emacs is distributed in the hope that it will be useful,
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
14 GNU General Public License for more details.
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
15
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
17 along with GNU Emacs; see the file COPYING. If not, write to
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
18 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
19
396
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
20 hacked on by jwz@lucid.com 17-jun-91
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
21 o added a compile-time switch to turn on simple sanity checking;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
22 o put back the obsolete byte-codes for error-detection;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
23 o added a new instruction, unbind_all, which I will use for
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
24 tail-recursion elimination;
435
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
25 o made temp_output_buffer_show be called with the right number
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
26 of args;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
27 o made the new bytecodes be called with args in the right order;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
28 o added metering support.
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
29
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
30 by Hallvard:
435
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
31 o added relative jump instructions;
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
32 o all conditionals now only do QUIT if they jump.
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
33 */
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
34
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
35 #include "config.h"
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
36 #include "lisp.h"
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
37 #include "buffer.h"
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
38 #include "syntax.h"
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
39
396
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
40 /*
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
41 * define BYTE_CODE_SAFE to enable some minor sanity checking (useful for
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
42 * debugging the byte compiler...)
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
43 *
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
44 * define BYTE_CODE_METER to enable generation of a byte-op usage histogram.
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
45 */
435
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
46 /* #define BYTE_CODE_SAFE */
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
47 /* #define BYTE_CODE_METER */
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
48
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
49
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
50 #ifdef BYTE_CODE_METER
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
51
396
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
52 Lisp_Object Vbyte_code_meter, Qbyte_code_meter;
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
53 int byte_metering_on;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
54
435
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
55 #define METER_2(code1, code2) \
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
56 XFASTINT (XVECTOR (XVECTOR (Vbyte_code_meter)->contents[(code1)]) \
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
57 ->contents[(code2)])
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
58
435
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
59 #define METER_1(code) METER_2 (0, (code))
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
60
435
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
61 #define METER_CODE(last_code, this_code) \
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
62 { \
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
63 if (byte_metering_on) \
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
64 { \
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
65 if (METER_1 (this_code) != ((1<<VALBITS)-1)) \
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
66 METER_1 (this_code)++; \
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
67 if (last_code \
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
68 && METER_2 (last_code, this_code) != ((1<<VALBITS)-1)) \
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
69 METER_2 (last_code, this_code)++; \
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
70 } \
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
71 }
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
72
435
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
73 #else /* no BYTE_CODE_METER */
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
74
435
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
75 #define METER_CODE(last_code, this_code)
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
76
435
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
77 #endif /* no BYTE_CODE_METER */
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
78
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
79
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
80 Lisp_Object Qbytecode;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
81
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
82 /* Byte codes: */
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
83
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
84 #define Bvarref 010
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
85 #define Bvarset 020
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
86 #define Bvarbind 030
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
87 #define Bcall 040
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
88 #define Bunbind 050
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
89
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
90 #define Bnth 070
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
91 #define Bsymbolp 071
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
92 #define Bconsp 072
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
93 #define Bstringp 073
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
94 #define Blistp 074
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
95 #define Beq 075
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
96 #define Bmemq 076
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
97 #define Bnot 077
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
98 #define Bcar 0100
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
99 #define Bcdr 0101
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
100 #define Bcons 0102
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
101 #define Blist1 0103
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
102 #define Blist2 0104
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
103 #define Blist3 0105
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
104 #define Blist4 0106
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
105 #define Blength 0107
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
106 #define Baref 0110
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
107 #define Baset 0111
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
108 #define Bsymbol_value 0112
435
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
109 #define Bsymbol_function 0113 /* no longer generated as of v19 */
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
110 #define Bset 0114
435
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
111 #define Bfset 0115 /* no longer generated as of v19 */
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
112 #define Bget 0116
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
113 #define Bsubstring 0117
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
114 #define Bconcat2 0120
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
115 #define Bconcat3 0121
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
116 #define Bconcat4 0122
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
117 #define Bsub1 0123
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
118 #define Badd1 0124
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
119 #define Beqlsign 0125
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
120 #define Bgtr 0126
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
121 #define Blss 0127
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
122 #define Bleq 0130
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
123 #define Bgeq 0131
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
124 #define Bdiff 0132
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
125 #define Bnegate 0133
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
126 #define Bplus 0134
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
127 #define Bmax 0135
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
128 #define Bmin 0136
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
129 #define Bmult 0137
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
130
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
131 #define Bpoint 0140
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
132 #define Bmark 0141 /* no longer generated as of v18 */
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
133 #define Bgoto_char 0142
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
134 #define Binsert 0143
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
135 #define Bpoint_max 0144
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
136 #define Bpoint_min 0145
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
137 #define Bchar_after 0146
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
138 #define Bfollowing_char 0147
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
139 #define Bpreceding_char 0150
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
140 #define Bcurrent_column 0151
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
141 #define Bindent_to 0152
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
142 #define Bscan_buffer 0153 /* No longer generated as of v18 */
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
143 #define Beolp 0154
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
144 #define Beobp 0155
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
145 #define Bbolp 0156
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
146 #define Bbobp 0157
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
147 #define Bcurrent_buffer 0160
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
148 #define Bset_buffer 0161
396
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
149 #define Bread_char 0162 /* No longer generated as of v19 */
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
150 #define Bset_mark 0163 /* this loser is no longer generated as of v18 */
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
151 #define Binteractive_p 0164 /* Needed since interactive-p takes unevalled args */
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
152
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
153 #define Bforward_char 0165
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
154 #define Bforward_word 0166
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
155 #define Bskip_chars_forward 0167
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
156 #define Bskip_chars_backward 0170
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
157 #define Bforward_line 0171
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
158 #define Bchar_syntax 0172
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
159 #define Bbuffer_substring 0173
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
160 #define Bdelete_region 0174
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
161 #define Bnarrow_to_region 0175
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
162 #define Bwiden 0176
396
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
163 #define Bend_of_line 0177
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
164
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
165 #define Bconstant2 0201
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
166 #define Bgoto 0202
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
167 #define Bgotoifnil 0203
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
168 #define Bgotoifnonnil 0204
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
169 #define Bgotoifnilelsepop 0205
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
170 #define Bgotoifnonnilelsepop 0206
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
171 #define Breturn 0207
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
172 #define Bdiscard 0210
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
173 #define Bdup 0211
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
174
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
175 #define Bsave_excursion 0212
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
176 #define Bsave_window_excursion 0213
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
177 #define Bsave_restriction 0214
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
178 #define Bcatch 0215
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
179
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
180 #define Bunwind_protect 0216
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
181 #define Bcondition_case 0217
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
182 #define Btemp_output_buffer_setup 0220
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
183 #define Btemp_output_buffer_show 0221
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
184
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
185 #define Bunbind_all 0222
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
186
396
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
187 #define Bset_marker 0223
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
188 #define Bmatch_beginning 0224
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
189 #define Bmatch_end 0225
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
190 #define Bupcase 0226
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
191 #define Bdowncase 0227
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
192
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
193 #define Bstringeqlsign 0230
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
194 #define Bstringlss 0231
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
195 #define Bequal 0232
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
196 #define Bnthcdr 0233
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
197 #define Belt 0234
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
198 #define Bmember 0235
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
199 #define Bassq 0236
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
200 #define Bnreverse 0237
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
201 #define Bsetcar 0240
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
202 #define Bsetcdr 0241
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
203 #define Bcar_safe 0242
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
204 #define Bcdr_safe 0243
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
205 #define Bnconc 0244
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
206 #define Bquo 0245
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
207 #define Brem 0246
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
208 #define Bnumberp 0247
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
209 #define Bintegerp 0250
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
210
396
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
211 #define BRgoto 0252
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
212 #define BRgotoifnil 0253
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
213 #define BRgotoifnonnil 0254
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
214 #define BRgotoifnilelsepop 0255
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
215 #define BRgotoifnonnilelsepop 0256
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
216
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
217 #define BlistN 0257
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
218 #define BconcatN 0260
435
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
219 #define BinsertN 0261
396
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
220
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
221 #define Bconstant 0300
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
222 #define CONSTANTLIM 0100
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
223
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
224 /* Fetch the next byte from the bytecode stream */
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
225
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
226 #define FETCH *pc++
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
227
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
228 /* Fetch two bytes from the bytecode stream
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
229 and make a 16-bit number out of them */
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
230
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
231 #define FETCH2 (op = FETCH, op + (FETCH << 8))
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
232
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
233 /* Push x onto the execution stack. */
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
234
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
235 /* This used to be #define PUSH(x) (*++stackp = (x))
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
236 This oddity is necessary because Alliant can't be bothered to
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
237 compile the preincrement operator properly, as of 4/91. -JimB */
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
238 #define PUSH(x) (stackp++, *stackp = (x))
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
239
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
240 /* Pop a value off the execution stack. */
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
241
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
242 #define POP (*stackp--)
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
243
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
244 /* Discard n values from the execution stack. */
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
245
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
246 #define DISCARD(n) (stackp -= (n))
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
247
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
248 /* Get the value which is at the top of the execution stack, but don't pop it. */
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
249
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
250 #define TOP (*stackp)
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
251
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
252 DEFUN ("byte-code", Fbyte_code, Sbyte_code, 3, 3, 0,
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
253 "Function used internally in byte-compiled code.\n\
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
254 The first argument is a string of byte code; the second, a vector of constants;\n\
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
255 the third, the maximum stack depth used in this function.\n\
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
256 If the third argument is incorrect, Emacs may crash.")
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
257 (bytestr, vector, maxdepth)
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
258 Lisp_Object bytestr, vector, maxdepth;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
259 {
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
260 struct gcpro gcpro1, gcpro2, gcpro3;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
261 int count = specpdl_ptr - specpdl;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
262 #ifdef BYTE_CODE_METER
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
263 int this_op = 0;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
264 int prev_op;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
265 #endif
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
266 register int op;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
267 unsigned char *pc;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
268 Lisp_Object *stack;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
269 register Lisp_Object *stackp;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
270 Lisp_Object *stacke;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
271 register Lisp_Object v1, v2;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
272 register Lisp_Object *vectorp = XVECTOR (vector)->contents;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
273 #ifdef BYTE_CODE_SAFE
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
274 register int const_length = XVECTOR (vector)->size;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
275 #endif
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
276 /* Copy of BYTESTR, saved so we can tell if BYTESTR was relocated. */
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
277 Lisp_Object string_saved;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
278 /* Cached address of beginning of string,
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
279 valid if BYTESTR equals STRING_SAVED. */
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
280 register unsigned char *strbeg;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
281
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
282 CHECK_STRING (bytestr, 0);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
283 if (XTYPE (vector) != Lisp_Vector)
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
284 vector = wrong_type_argument (Qvectorp, vector);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
285 CHECK_NUMBER (maxdepth, 2);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
286
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
287 stackp = (Lisp_Object *) alloca (XFASTINT (maxdepth) * sizeof (Lisp_Object));
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
288 bzero (stackp, XFASTINT (maxdepth) * sizeof (Lisp_Object));
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
289 GCPRO3 (bytestr, vector, *stackp);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
290 gcpro3.nvars = XFASTINT (maxdepth);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
291
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
292 --stackp;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
293 stack = stackp;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
294 stacke = stackp + XFASTINT (maxdepth);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
295
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
296 /* Initialize the saved pc-pointer for fetching from the string. */
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
297 string_saved = bytestr;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
298 pc = XSTRING (string_saved)->data;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
299
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
300 while (1)
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
301 {
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
302 #ifdef BYTE_CODE_SAFE
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
303 if (stackp > stacke)
435
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
304 error ("Byte code stack overflow (byte compiler bug), pc %d, depth %d",
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
305 pc - XSTRING (string_saved)->data, stacke - stackp);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
306 if (stackp < stack)
435
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
307 error ("Byte code stack underflow (byte compiler bug), pc %d",
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
308 pc - XSTRING (string_saved)->data);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
309 #endif
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
311 if (string_saved != bytestr)
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
312 {
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
313 pc = pc - XSTRING (string_saved)->data + XSTRING (bytestr)->data;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
314 string_saved = bytestr;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
315 }
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
316
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
317 #ifdef BYTE_CODE_METER
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
318 prev_op = this_op;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
319 this_op = op = FETCH;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
320 METER_CODE (prev_op, op);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
321 switch (op)
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
322 #else
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
323 switch (op = FETCH)
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
324 #endif
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
325 {
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
326 case Bvarref+6:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
327 op = FETCH;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
328 goto varref;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
329
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
330 case Bvarref+7:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
331 op = FETCH2;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
332 goto varref;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
333
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
334 case Bvarref: case Bvarref+1: case Bvarref+2: case Bvarref+3:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
335 case Bvarref+4: case Bvarref+5:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
336 op = op - Bvarref;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
337 varref:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
338 v1 = vectorp[op];
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
339 if (XTYPE (v1) != Lisp_Symbol)
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
340 v2 = Fsymbol_value (v1);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
341 else
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
342 {
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
343 v2 = XSYMBOL (v1)->value;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
344 #ifdef SWITCH_ENUM_BUG
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
345 switch ((int) XTYPE (v2))
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
346 #else
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
347 switch (XTYPE (v2))
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
348 #endif
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
349 {
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
350 case Lisp_Symbol:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
351 if (!EQ (v2, Qunbound))
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
352 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
353 case Lisp_Intfwd:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
354 case Lisp_Boolfwd:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
355 case Lisp_Objfwd:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
356 case Lisp_Buffer_Local_Value:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
357 case Lisp_Some_Buffer_Local_Value:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
358 case Lisp_Buffer_Objfwd:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
359 case Lisp_Void:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
360 v2 = Fsymbol_value (v1);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
361 }
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
362 }
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
363 PUSH (v2);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
364 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
365
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
366 case Bvarset+6:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
367 op = FETCH;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
368 goto varset;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
369
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
370 case Bvarset+7:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
371 op = FETCH2;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
372 goto varset;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
373
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
374 case Bvarset: case Bvarset+1: case Bvarset+2: case Bvarset+3:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
375 case Bvarset+4: case Bvarset+5:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
376 op -= Bvarset;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
377 varset:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
378 Fset (vectorp[op], POP);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
379 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
380
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
381 case Bvarbind+6:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
382 op = FETCH;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
383 goto varbind;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
384
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
385 case Bvarbind+7:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
386 op = FETCH2;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
387 goto varbind;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
388
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
389 case Bvarbind: case Bvarbind+1: case Bvarbind+2: case Bvarbind+3:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
390 case Bvarbind+4: case Bvarbind+5:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
391 op -= Bvarbind;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
392 varbind:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
393 specbind (vectorp[op], POP);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
394 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
395
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
396 case Bcall+6:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
397 op = FETCH;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
398 goto docall;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
399
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
400 case Bcall+7:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
401 op = FETCH2;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
402 goto docall;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
403
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
404 case Bcall: case Bcall+1: case Bcall+2: case Bcall+3:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
405 case Bcall+4: case Bcall+5:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
406 op -= Bcall;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
407 docall:
435
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
408 DISCARD (op);
396
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
409 #ifdef BYTE_CODE_METER
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
410 if (byte_metering_on && XTYPE (TOP) == Lisp_Symbol)
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
411 {
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
412 v1 = TOP;
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
413 v2 = Fget (v1, Qbyte_code_meter);
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
414 if (XTYPE (v2) == Lisp_Int)
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
415 {
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
416 XSETINT (v2, XINT (v2) + 1);
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
417 Fput (v1, Qbyte_code_meter, v2);
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
418 }
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
419 }
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
420 #endif
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
421 TOP = Ffuncall (op + 1, &TOP);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
422 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
423
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
424 case Bunbind+6:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
425 op = FETCH;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
426 goto dounbind;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
427
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
428 case Bunbind+7:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
429 op = FETCH2;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
430 goto dounbind;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
431
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
432 case Bunbind: case Bunbind+1: case Bunbind+2: case Bunbind+3:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
433 case Bunbind+4: case Bunbind+5:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
434 op -= Bunbind;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
435 dounbind:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
436 unbind_to (specpdl_ptr - specpdl - op, Qnil);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
437 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
438
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
439 case Bunbind_all:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
440 /* To unbind back to the beginning of this frame. Not used yet,
435
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
441 but will be needed for tail-recursion elimination. */
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
442 unbind_to (count, Qnil);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
443 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
444
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
445 case Bgoto:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
446 QUIT;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
447 op = FETCH2; /* pc = FETCH2 loses since FETCH2 contains pc++ */
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
448 pc = XSTRING (string_saved)->data + op;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
449 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
450
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
451 case Bgotoifnil:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
452 op = FETCH2;
485
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 470
diff changeset
453 if (NILP (POP))
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
454 {
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
455 QUIT;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
456 pc = XSTRING (string_saved)->data + op;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
457 }
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
458 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
459
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
460 case Bgotoifnonnil:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
461 op = FETCH2;
485
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 470
diff changeset
462 if (!NILP (POP))
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
463 {
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
464 QUIT;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
465 pc = XSTRING (string_saved)->data + op;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
466 }
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
467 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
468
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
469 case Bgotoifnilelsepop:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
470 op = FETCH2;
485
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 470
diff changeset
471 if (NILP (TOP))
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
472 {
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
473 QUIT;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
474 pc = XSTRING (string_saved)->data + op;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
475 }
435
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
476 else DISCARD (1);
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
477 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
478
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
479 case Bgotoifnonnilelsepop:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
480 op = FETCH2;
485
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 470
diff changeset
481 if (!NILP (TOP))
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
482 {
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
483 QUIT;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
484 pc = XSTRING (string_saved)->data + op;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
485 }
435
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
486 else DISCARD (1);
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
487 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
488
396
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
489 case BRgoto:
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
490 QUIT;
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
491 pc += *pc - 127;
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
492 break;
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
493
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
494 case BRgotoifnil:
485
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 470
diff changeset
495 if (NILP (POP))
396
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
496 {
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
497 QUIT;
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
498 pc += *pc - 128;
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
499 }
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
500 pc++;
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
501 break;
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
502
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
503 case BRgotoifnonnil:
485
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 470
diff changeset
504 if (!NILP (POP))
396
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
505 {
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
506 QUIT;
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
507 pc += *pc - 128;
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
508 }
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
509 pc++;
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
510 break;
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
511
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
512 case BRgotoifnilelsepop:
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
513 op = *pc++;
485
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 470
diff changeset
514 if (NILP (TOP))
396
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
515 {
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
516 QUIT;
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
517 pc += op - 128;
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
518 }
435
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
519 else DISCARD (1);
396
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
520 break;
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
521
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
522 case BRgotoifnonnilelsepop:
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
523 op = *pc++;
485
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 470
diff changeset
524 if (!NILP (TOP))
396
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
525 {
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
526 QUIT;
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
527 pc += op - 128;
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
528 }
435
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
529 else DISCARD (1);
396
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
530 break;
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
531
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
532 case Breturn:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
533 v1 = POP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
534 goto exit;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
535
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
536 case Bdiscard:
435
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
537 DISCARD (1);
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
538 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
539
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
540 case Bdup:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
541 v1 = TOP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
542 PUSH (v1);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
543 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
544
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
545 case Bconstant2:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
546 PUSH (vectorp[FETCH2]);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
547 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
548
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
549 case Bsave_excursion:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
550 record_unwind_protect (save_excursion_restore, save_excursion_save ());
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
551 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
552
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
553 case Bsave_window_excursion:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
554 TOP = Fsave_window_excursion (TOP);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
555 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
556
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
557 case Bsave_restriction:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
558 record_unwind_protect (save_restriction_restore, save_restriction_save ());
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
559 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
560
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
561 case Bcatch:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
562 v1 = POP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
563 TOP = internal_catch (TOP, Feval, v1);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
564 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
565
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
566 case Bunwind_protect:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
567 record_unwind_protect (0, POP);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
568 (specpdl_ptr - 1)->symbol = Qnil;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
569 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
570
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
571 case Bcondition_case:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
572 v1 = POP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
573 v1 = Fcons (POP, v1);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
574 TOP = Fcondition_case (Fcons (TOP, v1));
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
575 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
576
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
577 case Btemp_output_buffer_setup:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
578 temp_output_buffer_setup (XSTRING (TOP)->data);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
579 TOP = Vstandard_output;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
580 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
581
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
582 case Btemp_output_buffer_show:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
583 v1 = POP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
584 temp_output_buffer_show (TOP, Qnil);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
585 TOP = v1;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
586 /* pop binding of standard-output */
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
587 unbind_to (specpdl_ptr - specpdl - 1, Qnil);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
588 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
589
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
590 case Bnth:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
591 v1 = POP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
592 v2 = TOP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
593 nth_entry:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
594 CHECK_NUMBER (v2, 0);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
595 op = XINT (v2);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
596 immediate_quit = 1;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
597 while (--op >= 0)
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
598 {
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
599 if (CONSP (v1))
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
600 v1 = XCONS (v1)->cdr;
485
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 470
diff changeset
601 else if (!NILP (v1))
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
602 {
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
603 immediate_quit = 0;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
604 v1 = wrong_type_argument (Qlistp, v1);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
605 immediate_quit = 1;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
606 op++;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
607 }
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
608 }
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
609 immediate_quit = 0;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
610 goto docar;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
611
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
612 case Bsymbolp:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
613 TOP = XTYPE (TOP) == Lisp_Symbol ? Qt : Qnil;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
614 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
615
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
616 case Bconsp:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
617 TOP = CONSP (TOP) ? Qt : Qnil;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
618 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
619
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
620 case Bstringp:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
621 TOP = XTYPE (TOP) == Lisp_String ? Qt : Qnil;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
622 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
623
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
624 case Blistp:
485
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 470
diff changeset
625 TOP = CONSP (TOP) || NILP (TOP) ? Qt : Qnil;
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
626 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
627
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
628 case Beq:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
629 v1 = POP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
630 TOP = EQ (v1, TOP) ? Qt : Qnil;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
631 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
632
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
633 case Bmemq:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
634 v1 = POP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
635 TOP = Fmemq (TOP, v1);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
636 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
637
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
638 case Bnot:
485
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 470
diff changeset
639 TOP = NILP (TOP) ? Qt : Qnil;
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
640 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
641
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
642 case Bcar:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
643 v1 = TOP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
644 docar:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
645 if (CONSP (v1)) TOP = XCONS (v1)->car;
485
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 470
diff changeset
646 else if (NILP (v1)) TOP = Qnil;
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
647 else Fcar (wrong_type_argument (Qlistp, v1));
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
648 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
649
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
650 case Bcdr:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
651 v1 = TOP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
652 if (CONSP (v1)) TOP = XCONS (v1)->cdr;
485
8c615e453683 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 470
diff changeset
653 else if (NILP (v1)) TOP = Qnil;
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
654 else Fcdr (wrong_type_argument (Qlistp, v1));
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
655 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
656
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
657 case Bcons:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
658 v1 = POP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
659 TOP = Fcons (TOP, v1);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
660 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
661
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
662 case Blist1:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
663 TOP = Fcons (TOP, Qnil);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
664 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
665
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
666 case Blist2:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
667 v1 = POP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
668 TOP = Fcons (TOP, Fcons (v1, Qnil));
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
669 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
670
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
671 case Blist3:
435
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
672 DISCARD (2);
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
673 TOP = Flist (3, &TOP);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
674 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
675
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
676 case Blist4:
435
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
677 DISCARD (3);
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
678 TOP = Flist (4, &TOP);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
679 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
680
396
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
681 case BlistN:
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
682 op = FETCH;
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
683 DISCARD (op - 1);
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
684 TOP = Flist (op, &TOP);
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
685 break;
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
686
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
687 case Blength:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
688 TOP = Flength (TOP);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
689 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
690
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
691 case Baref:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
692 v1 = POP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
693 TOP = Faref (TOP, v1);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
694 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
695
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
696 case Baset:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
697 v2 = POP; v1 = POP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
698 TOP = Faset (TOP, v1, v2);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
699 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
700
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
701 case Bsymbol_value:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
702 TOP = Fsymbol_value (TOP);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
703 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
704
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
705 case Bsymbol_function:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
706 TOP = Fsymbol_function (TOP);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
707 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
708
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
709 case Bset:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
710 v1 = POP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
711 TOP = Fset (TOP, v1);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
712 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
713
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
714 case Bfset:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
715 v1 = POP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
716 TOP = Ffset (TOP, v1);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
717 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
718
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
719 case Bget:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
720 v1 = POP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
721 TOP = Fget (TOP, v1);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
722 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
723
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
724 case Bsubstring:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
725 v2 = POP; v1 = POP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
726 TOP = Fsubstring (TOP, v1, v2);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
727 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
728
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
729 case Bconcat2:
435
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
730 DISCARD (1);
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
731 TOP = Fconcat (2, &TOP);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
732 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
733
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
734 case Bconcat3:
435
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
735 DISCARD (2);
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
736 TOP = Fconcat (3, &TOP);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
737 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
738
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
739 case Bconcat4:
435
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
740 DISCARD (3);
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
741 TOP = Fconcat (4, &TOP);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
742 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
743
396
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
744 case BconcatN:
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
745 op = FETCH;
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
746 DISCARD (op - 1);
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
747 TOP = Fconcat (op, &TOP);
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
748 break;
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
749
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
750 case Bsub1:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
751 v1 = TOP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
752 if (XTYPE (v1) == Lisp_Int)
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
753 {
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
754 XSETINT (v1, XINT (v1) - 1);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
755 TOP = v1;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
756 }
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
757 else
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
758 TOP = Fsub1 (v1);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
759 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
760
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
761 case Badd1:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
762 v1 = TOP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
763 if (XTYPE (v1) == Lisp_Int)
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
764 {
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
765 XSETINT (v1, XINT (v1) + 1);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
766 TOP = v1;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
767 }
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
768 else
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
769 TOP = Fadd1 (v1);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
770 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
771
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
772 case Beqlsign:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
773 v2 = POP; v1 = TOP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
774 CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (v1, 0);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
775 CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (v2, 0);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
776 TOP = (XFLOATINT (v1) == XFLOATINT (v2)) ? Qt : Qnil;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
777 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
778
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
779 case Bgtr:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
780 v1 = POP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
781 TOP = Fgtr (TOP, v1);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
782 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
783
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
784 case Blss:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
785 v1 = POP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
786 TOP = Flss (TOP, v1);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
787 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
788
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
789 case Bleq:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
790 v1 = POP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
791 TOP = Fleq (TOP, v1);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
792 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
793
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
794 case Bgeq:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
795 v1 = POP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
796 TOP = Fgeq (TOP, v1);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
797 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
798
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
799 case Bdiff:
435
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
800 DISCARD (1);
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
801 TOP = Fminus (2, &TOP);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
802 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
803
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
804 case Bnegate:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
805 v1 = TOP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
806 if (XTYPE (v1) == Lisp_Int)
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
807 {
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
808 XSETINT (v1, - XINT (v1));
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
809 TOP = v1;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
810 }
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
811 else
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
812 TOP = Fminus (1, &TOP);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
813 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
814
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
815 case Bplus:
435
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
816 DISCARD (1);
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
817 TOP = Fplus (2, &TOP);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
818 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
819
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
820 case Bmax:
435
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
821 DISCARD (1);
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
822 TOP = Fmax (2, &TOP);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
823 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
824
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
825 case Bmin:
435
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
826 DISCARD (1);
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
827 TOP = Fmin (2, &TOP);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
828 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
829
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
830 case Bmult:
435
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
831 DISCARD (1);
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
832 TOP = Ftimes (2, &TOP);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
833 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
834
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
835 case Bquo:
435
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
836 DISCARD (1);
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
837 TOP = Fquo (2, &TOP);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
838 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
839
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
840 case Brem:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
841 v1 = POP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
842 TOP = Frem (TOP, v1);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
843 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
844
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
845 case Bpoint:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
846 XFASTINT (v1) = point;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
847 PUSH (v1);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
848 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
849
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
850 case Bgoto_char:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
851 TOP = Fgoto_char (TOP);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
852 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
853
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
854 case Binsert:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
855 TOP = Finsert (1, &TOP);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
856 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
857
435
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
858 case BinsertN:
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
859 op = FETCH;
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
860 DISCARD (op - 1);
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
861 TOP = Finsert (op, &TOP);
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
862 break;
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
863
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
864 case Bpoint_max:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
865 XFASTINT (v1) = ZV;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
866 PUSH (v1);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
867 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
868
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
869 case Bpoint_min:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
870 XFASTINT (v1) = BEGV;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
871 PUSH (v1);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
872 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
873
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
874 case Bchar_after:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
875 TOP = Fchar_after (TOP);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
876 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
877
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
878 case Bfollowing_char:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
879 XFASTINT (v1) = PT == ZV ? 0 : FETCH_CHAR (point);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
880 PUSH (v1);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
881 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
882
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
883 case Bpreceding_char:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
884 XFASTINT (v1) = point <= BEGV ? 0 : FETCH_CHAR (point - 1);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
885 PUSH (v1);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
886 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
887
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
888 case Bcurrent_column:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
889 XFASTINT (v1) = current_column ();
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
890 PUSH (v1);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
891 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
892
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
893 case Bindent_to:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
894 TOP = Findent_to (TOP, Qnil);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
895 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
896
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
897 case Beolp:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
898 PUSH (Feolp ());
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
899 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
900
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
901 case Beobp:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
902 PUSH (Feobp ());
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
903 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
904
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
905 case Bbolp:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
906 PUSH (Fbolp ());
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
907 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
908
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
909 case Bbobp:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
910 PUSH (Fbobp ());
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
911 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
912
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
913 case Bcurrent_buffer:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
914 PUSH (Fcurrent_buffer ());
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
915 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
916
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
917 case Bset_buffer:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
918 TOP = Fset_buffer (TOP);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
919 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
920
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
921 case Bread_char:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
922 PUSH (Fread_char ());
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
923 QUIT;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
924 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
925
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
926 case Binteractive_p:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
927 PUSH (Finteractive_p ());
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
928 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
929
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
930 case Bforward_char:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
931 TOP = Fforward_char (TOP);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
932 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
933
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
934 case Bforward_word:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
935 TOP = Fforward_word (TOP);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
936 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
937
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
938 case Bskip_chars_forward:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
939 v1 = POP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
940 TOP = Fskip_chars_forward (TOP, v1);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
941 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
942
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
943 case Bskip_chars_backward:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
944 v1 = POP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
945 TOP = Fskip_chars_backward (TOP, v1);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
946 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
947
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
948 case Bforward_line:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
949 TOP = Fforward_line (TOP);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
950 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
951
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
952 case Bchar_syntax:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
953 CHECK_NUMBER (TOP, 0);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
954 XFASTINT (TOP) = syntax_code_spec[(int) SYNTAX (0xFF & XINT (TOP))];
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
955 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
956
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
957 case Bbuffer_substring:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
958 v1 = POP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
959 TOP = Fbuffer_substring (TOP, v1);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
960 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
961
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
962 case Bdelete_region:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
963 v1 = POP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
964 TOP = Fdelete_region (TOP, v1);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
965 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
966
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
967 case Bnarrow_to_region:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
968 v1 = POP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
969 TOP = Fnarrow_to_region (TOP, v1);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
970 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
971
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
972 case Bwiden:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
973 PUSH (Fwiden ());
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
974 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
975
396
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
976 case Bend_of_line:
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
977 TOP = Fend_of_line (TOP);
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
978 break;
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
979
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
980 case Bset_marker:
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
981 v1 = POP;
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
982 v2 = POP;
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
983 TOP = Fset_marker (TOP, v2, v1);
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
984 break;
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
985
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
986 case Bmatch_beginning:
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
987 TOP = Fmatch_beginning (TOP);
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
988 break;
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
989
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
990 case Bmatch_end:
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
991 TOP = Fmatch_end (TOP);
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
992 break;
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
993
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
994 case Bupcase:
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
995 TOP = Fupcase (TOP);
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
996 break;
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
997
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
998 case Bdowncase:
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
999 TOP = Fdowncase (TOP);
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
1000 break;
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
1001
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1002 case Bstringeqlsign:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1003 v1 = POP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1004 TOP = Fstring_equal (TOP, v1);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1005 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1006
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1007 case Bstringlss:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1008 v1 = POP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1009 TOP = Fstring_lessp (TOP, v1);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1010 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1011
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1012 case Bequal:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1013 v1 = POP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1014 TOP = Fequal (TOP, v1);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1015 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1016
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1017 case Bnthcdr:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1018 v1 = POP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1019 TOP = Fnthcdr (TOP, v1);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1020 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1021
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1022 case Belt:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1023 if (XTYPE (TOP) == Lisp_Cons)
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1024 {
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1025 /* Exchange args and then do nth. */
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1026 v2 = POP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1027 v1 = TOP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1028 goto nth_entry;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1029 }
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1030 v1 = POP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1031 TOP = Felt (TOP, v1);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1032 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1033
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1034 case Bmember:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1035 v1 = POP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1036 TOP = Fmember (TOP, v1);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1037 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1038
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1039 case Bassq:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1040 v1 = POP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1041 TOP = Fassq (TOP, v1);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1042 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1043
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1044 case Bnreverse:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1045 TOP = Fnreverse (TOP);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1046 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1047
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1048 case Bsetcar:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1049 v1 = POP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1050 TOP = Fsetcar (TOP, v1);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1051 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1052
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1053 case Bsetcdr:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1054 v1 = POP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1055 TOP = Fsetcdr (TOP, v1);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1056 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1057
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1058 case Bcar_safe:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1059 v1 = TOP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1060 if (XTYPE (v1) == Lisp_Cons)
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1061 TOP = XCONS (v1)->car;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1062 else
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1063 TOP = Qnil;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1064 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1065
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1066 case Bcdr_safe:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1067 v1 = TOP;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1068 if (XTYPE (v1) == Lisp_Cons)
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1069 TOP = XCONS (v1)->cdr;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1070 else
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1071 TOP = Qnil;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1072 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1073
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1074 case Bnconc:
435
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
1075 DISCARD (1);
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1076 TOP = Fnconc (2, &TOP);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1077 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1078
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1079 case Bnumberp:
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 485
diff changeset
1080 TOP = (NUMBERP (TOP) ? Qt : Qnil);
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1081 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1082
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1083 case Bintegerp:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1084 TOP = XTYPE (TOP) == Lisp_Int ? Qt : Qnil;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1085 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1086
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1087 #ifdef BYTE_CODE_SAFE
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1088 case Bset_mark:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1089 error ("set-mark is an obsolete bytecode");
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1090 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1091 case Bscan_buffer:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1092 error ("scan-buffer is an obsolete bytecode");
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1093 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1094 case Bmark:
435
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
1095 error ("mark is an obsolete bytecode");
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1096 break;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1097 #endif
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1098
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1099 default:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1100 #ifdef BYTE_CODE_SAFE
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1101 if (op < Bconstant)
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1102 error ("unknown bytecode %d (byte compiler bug)", op);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1103 if ((op -= Bconstant) >= const_length)
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1104 error ("no constant number %d (byte compiler bug)", op);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1105 PUSH (vectorp[op]);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1106 #else
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1107 PUSH (vectorp[op - Bconstant]);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1108 #endif
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1109 }
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1110 }
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1111
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1112 exit:
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1113 UNGCPRO;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1114 /* Binds and unbinds are supposed to be compiled balanced. */
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1115 if (specpdl_ptr - specpdl != count)
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1116 #ifdef BYTE_CODE_SAFE
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1117 error ("binding stack not balanced (serious byte compiler bug)");
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1118 #else
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1119 abort ();
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1120 #endif
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1121 return v1;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1122 }
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1123
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1124 syms_of_bytecode ()
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1125 {
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1126 Qbytecode = intern ("byte-code");
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1127 staticpro (&Qbytecode);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1128
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1129 defsubr (&Sbyte_code);
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1130
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1131 #ifdef BYTE_CODE_METER
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1132
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1133 DEFVAR_LISP ("byte-code-meter", &Vbyte_code_meter,
435
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
1134 "A vector of vectors which holds a histogram of byte-code usage.");
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1135 DEFVAR_BOOL ("byte-metering-on", &byte_metering_on, "");
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1136
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1137 byte_metering_on = 0;
435
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
1138 Vbyte_code_meter = Fmake_vector (make_number (256), make_number (0));
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
1139 Qbyte_code_meter = intern ("byte-code-meter");
396
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 310
diff changeset
1140 staticpro (&Qbyte_code_meter);
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1141 {
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1142 int i = 256;
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1143 while (i--)
435
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
1144 XVECTOR (Vbyte_code_meter)->contents[i] =
43e88c4db330 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 396
diff changeset
1145 Fmake_vector (make_number (256), make_number (0));
310
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1146 }
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1147 #endif
88bee8093f43 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1148 }