From: jay@people.kldp.org
Subject: threaded code in bytecode.c
Date: Mon, 3 May 2004 10:10:11 +0900 [thread overview]
Message-ID: <20040503011011.GA16378@people.kldp.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 149 bytes --]
Hello,
I've just added gcc's computed goto based bytecode interpretation in
bytecode.c without affecting any other parts.
Can anybody try this?
[-- Attachment #2: threaded-bytecode.patch --]
[-- Type: text/plain, Size: 37719 bytes --]
Index: ChangeLog
===================================================================
RCS file: /cvsroot/emacs/emacs/src/ChangeLog,v
retrieving revision 1.3655
diff -u -r1.3655 ChangeLog
--- ChangeLog 2 May 2004 18:47:57 -0000 1.3655
+++ ChangeLog 3 May 2004 01:04:07 -0000
@@ -1,3 +1,8 @@
+2004-05-03 Jaeyoun Chung <jay@kldp.org>
+
+ * bytecode.c (Fbyte_code): theaded bytecode interpretation code added.
+ Define THREADED_CODE to enable computed goto based interpretation.
+
2004-05-02 Eli Zaretskii <eliz@gnu.org>
* syntax.h (SET_RAW_SYNTAX_ENTRY, SYNTAX_ENTRY_INT): Avoid
cvs server: ChangeLog.22 no longer exists, no comparison available
cvs server: ChangeLog.lexbind no longer exists, no comparison available
cvs server: alloca.s no longer exists, no comparison available
cvs server: bidi.c no longer exists, no comparison available
Index: bytecode.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/bytecode.c,v
retrieving revision 1.79
diff -u -r1.79 bytecode.c
--- bytecode.c 11 Sep 2003 21:58:32 -0000 1.79
+++ bytecode.c 3 May 2004 01:04:07 -0000
@@ -55,6 +55,10 @@
/* #define BYTE_CODE_SAFE */
/* #define BYTE_CODE_METER */
+/* define THREADED_CODE to enable the gcc's computed goto based jump instead
+ * of while(1) switch bytecod dispatch */
+/* #define THREADED_CODE */
+
\f
#ifdef BYTE_CODE_METER
@@ -90,146 +94,181 @@
/* Byte codes: */
-#define Bvarref 010
-#define Bvarset 020
-#define Bvarbind 030
-#define Bcall 040
-#define Bunbind 050
-
-#define Bnth 070
-#define Bsymbolp 071
-#define Bconsp 072
-#define Bstringp 073
-#define Blistp 074
-#define Beq 075
-#define Bmemq 076
-#define Bnot 077
-#define Bcar 0100
-#define Bcdr 0101
-#define Bcons 0102
-#define Blist1 0103
-#define Blist2 0104
-#define Blist3 0105
-#define Blist4 0106
-#define Blength 0107
-#define Baref 0110
-#define Baset 0111
-#define Bsymbol_value 0112
+#define Bvarref0 010
+#define Bvarref1 011
+#define Bvarref2 012
+#define Bvarref3 013
+#define Bvarref4 014
+#define Bvarref5 015
+#define Bvarref6 016
+#define Bvarref7 017
+#define Bvarset0 020
+#define Bvarset1 021
+#define Bvarset2 022
+#define Bvarset3 023
+#define Bvarset4 024
+#define Bvarset5 025
+#define Bvarset6 026
+#define Bvarset7 027
+#define Bvarbind0 030
+#define Bvarbind1 031
+#define Bvarbind2 032
+#define Bvarbind3 033
+#define Bvarbind4 034
+#define Bvarbind5 035
+#define Bvarbind6 036
+#define Bvarbind7 037
+#define Bcall0 040
+#define Bcall1 041
+#define Bcall2 042
+#define Bcall3 043
+#define Bcall4 044
+#define Bcall5 045
+#define Bcall6 046
+#define Bcall7 047
+#define Bunbind0 050
+#define Bunbind1 051
+#define Bunbind2 052
+#define Bunbind3 053
+#define Bunbind4 054
+#define Bunbind5 055
+#define Bunbind6 056
+#define Bunbind7 057
+
+#define Bnth 070
+#define Bsymbolp 071
+#define Bconsp 072
+#define Bstringp 073
+#define Blistp 074
+#define Beq 075
+#define Bmemq 076
+#define Bnot 077
+#define Bcar 0100
+#define Bcdr 0101
+#define Bcons 0102
+#define Blist1 0103
+#define Blist2 0104
+#define Blist3 0105
+#define Blist4 0106
+#define Blength 0107
+#define Baref 0110
+#define Baset 0111
+#define Bsymbol_value 0112
#define Bsymbol_function 0113
-#define Bset 0114
-#define Bfset 0115
-#define Bget 0116
-#define Bsubstring 0117
-#define Bconcat2 0120
-#define Bconcat3 0121
-#define Bconcat4 0122
-#define Bsub1 0123
-#define Badd1 0124
-#define Beqlsign 0125
-#define Bgtr 0126
-#define Blss 0127
-#define Bleq 0130
-#define Bgeq 0131
-#define Bdiff 0132
-#define Bnegate 0133
-#define Bplus 0134
-#define Bmax 0135
-#define Bmin 0136
-#define Bmult 0137
+#define Bset 0114
+#define Bfset 0115
+#define Bget 0116
+#define Bsubstring 0117
+#define Bconcat2 0120
+#define Bconcat3 0121
+#define Bconcat4 0122
+#define Bsub1 0123
+#define Badd1 0124
+#define Beqlsign 0125
+#define Bgtr 0126
+#define Blss 0127
+#define Bleq 0130
+#define Bgeq 0131
+#define Bdiff 0132
+#define Bnegate 0133
+#define Bplus 0134
+#define Bmax 0135
+#define Bmin 0136
+#define Bmult 0137
-#define Bpoint 0140
+#define Bpoint 0140
/* Was Bmark in v17. */
-#define Bsave_current_buffer 0141
-#define Bgoto_char 0142
-#define Binsert 0143
-#define Bpoint_max 0144
-#define Bpoint_min 0145
-#define Bchar_after 0146
-#define Bfollowing_char 0147
-#define Bpreceding_char 0150
-#define Bcurrent_column 0151
-#define Bindent_to 0152
-#define Bscan_buffer 0153 /* No longer generated as of v18 */
-#define Beolp 0154
-#define Beobp 0155
-#define Bbolp 0156
-#define Bbobp 0157
-#define Bcurrent_buffer 0160
-#define Bset_buffer 0161
+#define Bsave_current_buffer 0141
+#define Bgoto_char 0142
+#define Binsert 0143
+#define Bpoint_max 0144
+#define Bpoint_min 0145
+#define Bchar_after 0146
+#define Bfollowing_char 0147
+#define Bpreceding_char 0150
+#define Bcurrent_column 0151
+#define Bindent_to 0152
+#define Bscan_buffer 0153 /* No longer generated as of v18 */
+#define Beolp 0154
+#define Beobp 0155
+#define Bbolp 0156
+#define Bbobp 0157
+#define Bcurrent_buffer 0160
+#define Bset_buffer 0161
#define Bsave_current_buffer_1 0162 /* Replacing Bsave_current_buffer. */
-#define Bread_char 0162 /* No longer generated as of v19 */
-#define Bset_mark 0163 /* this loser is no longer generated as of v18 */
-#define Binteractive_p 0164 /* Needed since interactive-p takes unevalled args */
-
-#define Bforward_char 0165
-#define Bforward_word 0166
-#define Bskip_chars_forward 0167
+#define Bread_char 0162 /* No longer generated as of v19 */
+#define Bset_mark 0163 /* this loser is no longer generated as of v18 */
+#define Binteractive_p 0164 /* Needed since interactive-p takes unevalled args */
+
+#define Bforward_char 0165
+#define Bforward_word 0166
+#define Bskip_chars_forward 0167
#define Bskip_chars_backward 0170
-#define Bforward_line 0171
-#define Bchar_syntax 0172
-#define Bbuffer_substring 0173
-#define Bdelete_region 0174
-#define Bnarrow_to_region 0175
-#define Bwiden 0176
-#define Bend_of_line 0177
-
-#define Bconstant2 0201
-#define Bgoto 0202
-#define Bgotoifnil 0203
-#define Bgotoifnonnil 0204
-#define Bgotoifnilelsepop 0205
+#define Bforward_line 0171
+#define Bchar_syntax 0172
+#define Bbuffer_substring 0173
+#define Bdelete_region 0174
+#define Bnarrow_to_region 0175
+#define Bwiden 0176
+#define Bend_of_line 0177
+
+#define Bconstant2 0201
+#define Bgoto 0202
+#define Bgotoifnil 0203
+#define Bgotoifnonnil 0204
+#define Bgotoifnilelsepop 0205
#define Bgotoifnonnilelsepop 0206
-#define Breturn 0207
-#define Bdiscard 0210
-#define Bdup 0211
+#define Breturn 0207
+#define Bdiscard 0210
+#define Bdup 0211
-#define Bsave_excursion 0212
+#define Bsave_excursion 0212
#define Bsave_window_excursion 0213
-#define Bsave_restriction 0214
-#define Bcatch 0215
+#define Bsave_restriction 0214
+#define Bcatch 0215
-#define Bunwind_protect 0216
-#define Bcondition_case 0217
+#define Bunwind_protect 0216
+#define Bcondition_case 0217
#define Btemp_output_buffer_setup 0220
-#define Btemp_output_buffer_show 0221
+#define Btemp_output_buffer_show 0221
#define Bunbind_all 0222
-#define Bset_marker 0223
+#define Bset_marker 0223
#define Bmatch_beginning 0224
-#define Bmatch_end 0225
-#define Bupcase 0226
-#define Bdowncase 0227
+#define Bmatch_end 0225
+#define Bupcase 0226
+#define Bdowncase 0227
#define Bstringeqlsign 0230
-#define Bstringlss 0231
-#define Bequal 0232
-#define Bnthcdr 0233
-#define Belt 0234
-#define Bmember 0235
-#define Bassq 0236
-#define Bnreverse 0237
-#define Bsetcar 0240
-#define Bsetcdr 0241
-#define Bcar_safe 0242
-#define Bcdr_safe 0243
-#define Bnconc 0244
-#define Bquo 0245
-#define Brem 0246
-#define Bnumberp 0247
-#define Bintegerp 0250
-
-#define BRgoto 0252
-#define BRgotoifnil 0253
-#define BRgotoifnonnil 0254
-#define BRgotoifnilelsepop 0255
+#define Bstringlss 0231
+#define Bequal 0232
+#define Bnthcdr 0233
+#define Belt 0234
+#define Bmember 0235
+#define Bassq 0236
+#define Bnreverse 0237
+#define Bsetcar 0240
+#define Bsetcdr 0241
+#define Bcar_safe 0242
+#define Bcdr_safe 0243
+#define Bnconc 0244
+#define Bquo 0245
+#define Brem 0246
+#define Bnumberp 0247
+#define Bintegerp 0250
+
+#define BRgoto 0252
+#define BRgotoifnil 0253
+#define BRgotoifnonnil 0254
+#define BRgotoifnilelsepop 0255
#define BRgotoifnonnilelsepop 0256
-#define BlistN 0257
+#define BlistN 0257
#define BconcatN 0260
#define BinsertN 0261
-#define Bconstant 0300
+#define Bconstant 0300
#define CONSTANTLIM 0100
\f
@@ -417,6 +456,198 @@
Lisp_Object *top;
Lisp_Object result;
+#ifdef THREADED_CODE
+# define OPCODE(X) lbl_ ##X
+# define Next() goto *op_tbls[op = FETCH]
+# define DEFAULT lbl_default
+
+ static int op_inited = 0;
+ static void **op_tbls[256] = {
+# define OPLABL(X) [X] = &&lbl_ ##X
+OPLABL(Bvarref7),
+OPLABL(Bvarref0),
+OPLABL(Bvarref1),
+OPLABL(Bvarref2),
+OPLABL(Bvarref3),
+OPLABL(Bvarref4),
+OPLABL(Bvarref5),
+OPLABL(Bvarref6),
+OPLABL(Bgotoifnil),
+OPLABL(Bcar),
+OPLABL(Beq),
+OPLABL(Bmemq),
+OPLABL(Bcdr),
+OPLABL(Bvarset0),
+OPLABL(Bvarset1),
+OPLABL(Bvarset2),
+OPLABL(Bvarset3),
+OPLABL(Bvarset4),
+OPLABL(Bvarset5),
+OPLABL(Bvarset7),
+OPLABL(Bvarset6),
+OPLABL(Bdup),
+OPLABL(Bvarbind6),
+OPLABL(Bvarbind7),
+OPLABL(Bvarbind0),
+OPLABL(Bvarbind1),
+OPLABL(Bvarbind2),
+OPLABL(Bvarbind3),
+OPLABL(Bvarbind4),
+OPLABL(Bvarbind5),
+OPLABL(Bcall6),
+OPLABL(Bcall7),
+OPLABL(Bcall0),
+OPLABL(Bcall1),
+OPLABL(Bcall2),
+OPLABL(Bcall3),
+OPLABL(Bcall4),
+OPLABL(Bcall5),
+OPLABL(Bunbind6),
+OPLABL(Bunbind7),
+OPLABL(Bunbind0),
+OPLABL(Bunbind1),
+OPLABL(Bunbind2),
+OPLABL(Bunbind3),
+OPLABL(Bunbind4),
+OPLABL(Bunbind5),
+OPLABL(Bunbind_all),
+OPLABL(Bgoto),
+OPLABL(Bgotoifnonnil),
+OPLABL(Bgotoifnilelsepop),
+OPLABL(Bgotoifnonnilelsepop),
+OPLABL(BRgoto),
+OPLABL(BRgotoifnil),
+OPLABL(BRgotoifnonnil),
+OPLABL(BRgotoifnilelsepop),
+OPLABL(BRgotoifnonnilelsepop),
+OPLABL(Breturn),
+OPLABL(Bdiscard),
+OPLABL(Bconstant2),
+OPLABL(Bsave_excursion),
+OPLABL(Bsave_current_buffer),
+OPLABL(Bsave_current_buffer_1),
+OPLABL(Bsave_window_excursion),
+OPLABL(Bsave_restriction),
+OPLABL(Bcatch),
+OPLABL(Bunwind_protect),
+OPLABL(Bcondition_case),
+OPLABL(Btemp_output_buffer_setup),
+OPLABL(Btemp_output_buffer_show),
+OPLABL(Bnth),
+OPLABL(Bsymbolp),
+OPLABL(Bconsp),
+OPLABL(Bstringp),
+OPLABL(Blistp),
+OPLABL(Bnot),
+OPLABL(Bcons),
+OPLABL(Blist1),
+OPLABL(Blist2),
+OPLABL(Blist3),
+OPLABL(Blist4),
+OPLABL(BlistN),
+OPLABL(Blength),
+OPLABL(Baref),
+OPLABL(Baset),
+OPLABL(Bsymbol_value),
+OPLABL(Bsymbol_function),
+OPLABL(Bset),
+OPLABL(Bfset),
+OPLABL(Bget),
+OPLABL(Bsubstring),
+OPLABL(Bconcat2),
+OPLABL(Bconcat3),
+OPLABL(Bconcat4),
+OPLABL(BconcatN),
+OPLABL(Bsub1),
+OPLABL(Badd1),
+OPLABL(Beqlsign),
+OPLABL(Bgtr),
+OPLABL(Blss),
+OPLABL(Bleq),
+OPLABL(Bgeq),
+OPLABL(Bdiff),
+OPLABL(Bnegate),
+OPLABL(Bplus),
+OPLABL(Bmax),
+OPLABL(Bmin),
+OPLABL(Bmult),
+OPLABL(Bquo),
+OPLABL(Brem),
+OPLABL(Bpoint),
+OPLABL(Bgoto_char),
+OPLABL(Binsert),
+OPLABL(BinsertN),
+OPLABL(Bpoint_max),
+OPLABL(Bpoint_min),
+OPLABL(Bchar_after),
+OPLABL(Bfollowing_char),
+OPLABL(Bpreceding_char),
+OPLABL(Bcurrent_column),
+OPLABL(Bindent_to),
+OPLABL(Beolp),
+OPLABL(Beobp),
+OPLABL(Bbolp),
+OPLABL(Bbobp),
+OPLABL(Bcurrent_buffer),
+OPLABL(Bset_buffer),
+OPLABL(Binteractive_p),
+OPLABL(Bforward_char),
+OPLABL(Bforward_word),
+OPLABL(Bskip_chars_forward),
+OPLABL(Bskip_chars_backward),
+OPLABL(Bforward_line),
+OPLABL(Bchar_syntax),
+OPLABL(Bbuffer_substring),
+OPLABL(Bdelete_region),
+OPLABL(Bnarrow_to_region),
+OPLABL(Bwiden),
+OPLABL(Bend_of_line),
+OPLABL(Bset_marker),
+OPLABL(Bmatch_beginning),
+OPLABL(Bmatch_end),
+OPLABL(Bupcase),
+OPLABL(Bdowncase),
+OPLABL(Bstringeqlsign),
+OPLABL(Bstringlss),
+OPLABL(Bequal),
+OPLABL(Bnthcdr),
+OPLABL(Belt),
+OPLABL(Bmember),
+OPLABL(Bassq),
+OPLABL(Bnreverse),
+OPLABL(Bsetcar),
+OPLABL(Bsetcdr),
+OPLABL(Bcar_safe),
+OPLABL(Bcdr_safe),
+OPLABL(Bnconc),
+OPLABL(Bnumberp),
+OPLABL(Bintegerp),
+# ifdef BYTE_CODE_SAFE
+OPLABL(Bset_mark),
+OPLABL(Bscan_buffer),
+# endif
+OPLABL(0),
+OPLABL(255),
+
+# undef OPLABL
+ };
+
+ if (!op_inited) {
+ int i;
+
+ for (i = 0; i < sizeof (op_tbls)/sizeof(op_tbls[0]); ++i)
+ if (!op_tbls[i]) op_tbls[i] = &&lbl_default;
+
+ op_inited = 1;
+ }
+
+#else
+# define OPCODE(X) case X
+# define Next() break
+# define DEFAULT default
+#endif /* THREADED_CODE */
+
+
#ifdef CHECK_FRAME_FONT
{
struct frame *f = SELECTED_FRAME ();
@@ -457,6 +688,7 @@
stacke = stack.bottom - 1 + XFASTINT (maxdepth);
#endif
+#ifndef THREADED_CODE
while (1)
{
#ifdef BYTE_CODE_SAFE
@@ -476,22 +708,26 @@
switch (op)
{
- case Bvarref + 7:
+#else
+ Next();
+#endif /* !THREADED_CODE */
+
+ OPCODE(Bvarref7):
op = FETCH2;
goto varref;
- case Bvarref:
- case Bvarref + 1:
- case Bvarref + 2:
- case Bvarref + 3:
- case Bvarref + 4:
- case Bvarref + 5:
- op = op - Bvarref;
+ OPCODE(Bvarref0):
+ OPCODE(Bvarref1):
+ OPCODE(Bvarref2):
+ OPCODE(Bvarref3):
+ OPCODE(Bvarref4):
+ OPCODE(Bvarref5):
+ op = op - Bvarref0;
goto varref;
/* This seems to be the most frequently executed byte-code
among the Bvarref's, so avoid a goto here. */
- case Bvarref+6:
+ OPCODE(Bvarref6):
op = FETCH;
varref:
{
@@ -515,10 +751,10 @@
AFTER_POTENTIAL_GC ();
}
PUSH (v2);
- break;
+ Next();
}
- case Bgotoifnil:
+ OPCODE(Bgotoifnil):
MAYBE_GC ();
op = FETCH2;
if (NILP (POP))
@@ -527,9 +763,9 @@
CHECK_RANGE (op);
stack.pc = stack.byte_string_start + op;
}
- break;
+ Next();
- case Bcar:
+ OPCODE(Bcar):
{
Lisp_Object v1;
v1 = TOP;
@@ -543,28 +779,28 @@
Fcar (wrong_type_argument (Qlistp, v1));
AFTER_POTENTIAL_GC ();
}
- break;
+ Next();
}
- case Beq:
+ OPCODE(Beq):
{
Lisp_Object v1;
v1 = POP;
TOP = EQ (v1, TOP) ? Qt : Qnil;
- break;
+ Next();
}
- case Bmemq:
+ OPCODE(Bmemq):
{
Lisp_Object v1;
BEFORE_POTENTIAL_GC ();
v1 = POP;
TOP = Fmemq (TOP, v1);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
}
- case Bcdr:
+ OPCODE(Bcdr):
{
Lisp_Object v1;
v1 = TOP;
@@ -578,23 +814,23 @@
Fcdr (wrong_type_argument (Qlistp, v1));
AFTER_POTENTIAL_GC ();
}
- break;
+ Next();
}
- case Bvarset:
- case Bvarset+1:
- case Bvarset+2:
- case Bvarset+3:
- case Bvarset+4:
- case Bvarset+5:
- op -= Bvarset;
+ OPCODE(Bvarset0):
+ OPCODE(Bvarset1):
+ OPCODE(Bvarset2):
+ OPCODE(Bvarset3):
+ OPCODE(Bvarset4):
+ OPCODE(Bvarset5):
+ op -= Bvarset0;
goto varset;
- case Bvarset+7:
+ OPCODE(Bvarset7):
op = FETCH2;
goto varset;
- case Bvarset+6:
+ OPCODE(Bvarset6):
op = FETCH;
varset:
{
@@ -618,55 +854,55 @@
}
}
(void) POP;
- break;
+ Next();
- case Bdup:
+ OPCODE(Bdup):
{
Lisp_Object v1;
v1 = TOP;
PUSH (v1);
- break;
+ Next();
}
/* ------------------ */
- case Bvarbind+6:
+ OPCODE(Bvarbind6):
op = FETCH;
goto varbind;
- case Bvarbind+7:
+ OPCODE(Bvarbind7):
op = FETCH2;
goto varbind;
- case Bvarbind:
- case Bvarbind+1:
- case Bvarbind+2:
- case Bvarbind+3:
- case Bvarbind+4:
- case Bvarbind+5:
- op -= Bvarbind;
+ OPCODE(Bvarbind0):
+ OPCODE(Bvarbind1):
+ OPCODE(Bvarbind2):
+ OPCODE(Bvarbind3):
+ OPCODE(Bvarbind4):
+ OPCODE(Bvarbind5):
+ op -= Bvarbind0;
varbind:
/* Specbind can signal and thus GC. */
BEFORE_POTENTIAL_GC ();
specbind (vectorp[op], POP);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
- case Bcall+6:
+ OPCODE(Bcall6):
op = FETCH;
goto docall;
- case Bcall+7:
+ OPCODE(Bcall7):
op = FETCH2;
goto docall;
- case Bcall:
- case Bcall+1:
- case Bcall+2:
- case Bcall+3:
- case Bcall+4:
- case Bcall+5:
- op -= Bcall;
+ OPCODE(Bcall0):
+ OPCODE(Bcall1):
+ OPCODE(Bcall2):
+ OPCODE(Bcall3):
+ OPCODE(Bcall4):
+ OPCODE(Bcall5):
+ op -= Bcall0;
docall:
{
BEFORE_POTENTIAL_GC ();
@@ -688,47 +924,47 @@
#endif
TOP = Ffuncall (op + 1, &TOP);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
}
- case Bunbind+6:
+ OPCODE(Bunbind6):
op = FETCH;
goto dounbind;
- case Bunbind+7:
+ OPCODE(Bunbind7):
op = FETCH2;
goto dounbind;
- case Bunbind:
- case Bunbind+1:
- case Bunbind+2:
- case Bunbind+3:
- case Bunbind+4:
- case Bunbind+5:
- op -= Bunbind;
+ OPCODE(Bunbind0):
+ OPCODE(Bunbind1):
+ OPCODE(Bunbind2):
+ OPCODE(Bunbind3):
+ OPCODE(Bunbind4):
+ OPCODE(Bunbind5):
+ op -= Bunbind0;
dounbind:
BEFORE_POTENTIAL_GC ();
unbind_to (SPECPDL_INDEX () - op, Qnil);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
- case Bunbind_all:
+ OPCODE(Bunbind_all):
/* To unbind back to the beginning of this frame. Not used yet,
but will be needed for tail-recursion elimination. */
BEFORE_POTENTIAL_GC ();
unbind_to (count, Qnil);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
- case Bgoto:
+ OPCODE(Bgoto):
MAYBE_GC ();
BYTE_CODE_QUIT;
op = FETCH2; /* pc = FETCH2 loses since FETCH2 contains pc++ */
CHECK_RANGE (op);
stack.pc = stack.byte_string_start + op;
- break;
+ Next();
- case Bgotoifnonnil:
+ OPCODE(Bgotoifnonnil):
MAYBE_GC ();
op = FETCH2;
if (!NILP (POP))
@@ -737,9 +973,9 @@
CHECK_RANGE (op);
stack.pc = stack.byte_string_start + op;
}
- break;
+ Next();
- case Bgotoifnilelsepop:
+ OPCODE(Bgotoifnilelsepop):
MAYBE_GC ();
op = FETCH2;
if (NILP (TOP))
@@ -749,9 +985,9 @@
stack.pc = stack.byte_string_start + op;
}
else DISCARD (1);
- break;
+ Next();
- case Bgotoifnonnilelsepop:
+ OPCODE(Bgotoifnonnilelsepop):
MAYBE_GC ();
op = FETCH2;
if (!NILP (TOP))
@@ -761,15 +997,15 @@
stack.pc = stack.byte_string_start + op;
}
else DISCARD (1);
- break;
+ Next();
- case BRgoto:
+ OPCODE(BRgoto):
MAYBE_GC ();
BYTE_CODE_QUIT;
stack.pc += (int) *stack.pc - 127;
- break;
+ Next();
- case BRgotoifnil:
+ OPCODE(BRgotoifnil):
MAYBE_GC ();
if (NILP (POP))
{
@@ -777,9 +1013,9 @@
stack.pc += (int) *stack.pc - 128;
}
stack.pc++;
- break;
+ Next();
- case BRgotoifnonnil:
+ OPCODE(BRgotoifnonnil):
MAYBE_GC ();
if (!NILP (POP))
{
@@ -787,9 +1023,9 @@
stack.pc += (int) *stack.pc - 128;
}
stack.pc++;
- break;
+ Next();
- case BRgotoifnilelsepop:
+ OPCODE(BRgotoifnilelsepop):
MAYBE_GC ();
op = *stack.pc++;
if (NILP (TOP))
@@ -798,9 +1034,9 @@
stack.pc += op - 128;
}
else DISCARD (1);
- break;
+ Next();
- case BRgotoifnonnilelsepop:
+ OPCODE(BRgotoifnonnilelsepop):
MAYBE_GC ();
op = *stack.pc++;
if (!NILP (TOP))
@@ -809,59 +1045,59 @@
stack.pc += op - 128;
}
else DISCARD (1);
- break;
+ Next();
- case Breturn:
+ OPCODE(Breturn):
result = POP;
goto exit;
- case Bdiscard:
+ OPCODE(Bdiscard):
DISCARD (1);
- break;
+ Next();
- case Bconstant2:
+ OPCODE(Bconstant2):
PUSH (vectorp[FETCH2]);
- break;
+ Next();
- case Bsave_excursion:
+ OPCODE(Bsave_excursion):
record_unwind_protect (save_excursion_restore,
save_excursion_save ());
- break;
+ Next();
- case Bsave_current_buffer:
- case Bsave_current_buffer_1:
+ OPCODE(Bsave_current_buffer):
+ OPCODE(Bsave_current_buffer_1):
record_unwind_protect (set_buffer_if_live, Fcurrent_buffer ());
- break;
+ Next();
- case Bsave_window_excursion:
+ OPCODE(Bsave_window_excursion):
BEFORE_POTENTIAL_GC ();
TOP = Fsave_window_excursion (TOP);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
- case Bsave_restriction:
+ OPCODE(Bsave_restriction):
record_unwind_protect (save_restriction_restore,
save_restriction_save ());
- break;
+ Next();
- case Bcatch:
+ OPCODE(Bcatch):
{
Lisp_Object v1;
BEFORE_POTENTIAL_GC ();
v1 = POP;
TOP = internal_catch (TOP, Feval, v1);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
}
- case Bunwind_protect:
+ OPCODE(Bunwind_protect):
/* The function record_unwind_protect can GC. */
BEFORE_POTENTIAL_GC ();
record_unwind_protect (Fprogn, POP);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
- case Bcondition_case:
+ OPCODE(Bcondition_case):
{
Lisp_Object v1;
v1 = POP;
@@ -869,18 +1105,18 @@
BEFORE_POTENTIAL_GC ();
TOP = Fcondition_case (Fcons (TOP, v1));
AFTER_POTENTIAL_GC ();
- break;
+ Next();
}
- case Btemp_output_buffer_setup:
+ OPCODE(Btemp_output_buffer_setup):
BEFORE_POTENTIAL_GC ();
CHECK_STRING (TOP);
temp_output_buffer_setup (SDATA (TOP));
AFTER_POTENTIAL_GC ();
TOP = Vstandard_output;
- break;
+ Next();
- case Btemp_output_buffer_show:
+ OPCODE(Btemp_output_buffer_show):
{
Lisp_Object v1;
BEFORE_POTENTIAL_GC ();
@@ -890,10 +1126,10 @@
/* pop binding of standard-output */
unbind_to (SPECPDL_INDEX () - 1, Qnil);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
}
- case Bnth:
+ OPCODE(Bnth):
{
Lisp_Object v1, v2;
BEFORE_POTENTIAL_GC ();
@@ -928,173 +1164,173 @@
Fcar (wrong_type_argument (Qlistp, v1));
AFTER_POTENTIAL_GC ();
}
- break;
+ Next();
}
- case Bsymbolp:
+ OPCODE(Bsymbolp):
TOP = SYMBOLP (TOP) ? Qt : Qnil;
- break;
+ Next();
- case Bconsp:
+ OPCODE(Bconsp):
TOP = CONSP (TOP) ? Qt : Qnil;
- break;
+ Next();
- case Bstringp:
+ OPCODE(Bstringp):
TOP = STRINGP (TOP) ? Qt : Qnil;
- break;
+ Next();
- case Blistp:
+ OPCODE(Blistp):
TOP = CONSP (TOP) || NILP (TOP) ? Qt : Qnil;
- break;
+ Next();
- case Bnot:
+ OPCODE(Bnot):
TOP = NILP (TOP) ? Qt : Qnil;
- break;
+ Next();
- case Bcons:
+ OPCODE(Bcons):
{
Lisp_Object v1;
v1 = POP;
TOP = Fcons (TOP, v1);
- break;
+ Next();
}
- case Blist1:
+ OPCODE(Blist1):
TOP = Fcons (TOP, Qnil);
- break;
+ Next();
- case Blist2:
+ OPCODE(Blist2):
{
Lisp_Object v1;
v1 = POP;
TOP = Fcons (TOP, Fcons (v1, Qnil));
- break;
+ Next();
}
- case Blist3:
+ OPCODE(Blist3):
DISCARD (2);
TOP = Flist (3, &TOP);
- break;
+ Next();
- case Blist4:
+ OPCODE(Blist4):
DISCARD (3);
TOP = Flist (4, &TOP);
- break;
+ Next();
- case BlistN:
+ OPCODE(BlistN):
op = FETCH;
DISCARD (op - 1);
TOP = Flist (op, &TOP);
- break;
+ Next();
- case Blength:
+ OPCODE(Blength):
BEFORE_POTENTIAL_GC ();
TOP = Flength (TOP);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
- case Baref:
+ OPCODE(Baref):
{
Lisp_Object v1;
BEFORE_POTENTIAL_GC ();
v1 = POP;
TOP = Faref (TOP, v1);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
}
- case Baset:
+ OPCODE(Baset):
{
Lisp_Object v1, v2;
BEFORE_POTENTIAL_GC ();
v2 = POP; v1 = POP;
TOP = Faset (TOP, v1, v2);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
}
- case Bsymbol_value:
+ OPCODE(Bsymbol_value):
BEFORE_POTENTIAL_GC ();
TOP = Fsymbol_value (TOP);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
- case Bsymbol_function:
+ OPCODE(Bsymbol_function):
BEFORE_POTENTIAL_GC ();
TOP = Fsymbol_function (TOP);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
- case Bset:
+ OPCODE(Bset):
{
Lisp_Object v1;
BEFORE_POTENTIAL_GC ();
v1 = POP;
TOP = Fset (TOP, v1);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
}
- case Bfset:
+ OPCODE(Bfset):
{
Lisp_Object v1;
BEFORE_POTENTIAL_GC ();
v1 = POP;
TOP = Ffset (TOP, v1);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
}
- case Bget:
+ OPCODE(Bget):
{
Lisp_Object v1;
BEFORE_POTENTIAL_GC ();
v1 = POP;
TOP = Fget (TOP, v1);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
}
- case Bsubstring:
+ OPCODE(Bsubstring):
{
Lisp_Object v1, v2;
BEFORE_POTENTIAL_GC ();
v2 = POP; v1 = POP;
TOP = Fsubstring (TOP, v1, v2);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
}
- case Bconcat2:
+ OPCODE(Bconcat2):
BEFORE_POTENTIAL_GC ();
DISCARD (1);
TOP = Fconcat (2, &TOP);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
- case Bconcat3:
+ OPCODE(Bconcat3):
BEFORE_POTENTIAL_GC ();
DISCARD (2);
TOP = Fconcat (3, &TOP);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
- case Bconcat4:
+ OPCODE(Bconcat4):
BEFORE_POTENTIAL_GC ();
DISCARD (3);
TOP = Fconcat (4, &TOP);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
- case BconcatN:
+ OPCODE(BconcatN):
op = FETCH;
BEFORE_POTENTIAL_GC ();
DISCARD (op - 1);
TOP = Fconcat (op, &TOP);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
- case Bsub1:
+ OPCODE(Bsub1):
{
Lisp_Object v1;
v1 = TOP;
@@ -1109,10 +1345,10 @@
TOP = Fsub1 (v1);
AFTER_POTENTIAL_GC ();
}
- break;
+ Next();
}
- case Badd1:
+ OPCODE(Badd1):
{
Lisp_Object v1;
v1 = TOP;
@@ -1127,10 +1363,10 @@
TOP = Fadd1 (v1);
AFTER_POTENTIAL_GC ();
}
- break;
+ Next();
}
- case Beqlsign:
+ OPCODE(Beqlsign):
{
Lisp_Object v1, v2;
BEFORE_POTENTIAL_GC ();
@@ -1148,57 +1384,57 @@
}
else
TOP = (XINT (v1) == XINT (v2) ? Qt : Qnil);
- break;
+ Next();
}
- case Bgtr:
+ OPCODE(Bgtr):
{
Lisp_Object v1;
BEFORE_POTENTIAL_GC ();
v1 = POP;
TOP = Fgtr (TOP, v1);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
}
- case Blss:
+ OPCODE(Blss):
{
Lisp_Object v1;
BEFORE_POTENTIAL_GC ();
v1 = POP;
TOP = Flss (TOP, v1);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
}
- case Bleq:
+ OPCODE(Bleq):
{
Lisp_Object v1;
BEFORE_POTENTIAL_GC ();
v1 = POP;
TOP = Fleq (TOP, v1);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
}
- case Bgeq:
+ OPCODE(Bgeq):
{
Lisp_Object v1;
BEFORE_POTENTIAL_GC ();
v1 = POP;
TOP = Fgeq (TOP, v1);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
}
- case Bdiff:
+ OPCODE(Bdiff):
BEFORE_POTENTIAL_GC ();
DISCARD (1);
TOP = Fminus (2, &TOP);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
- case Bnegate:
+ OPCODE(Bnegate):
{
Lisp_Object v1;
v1 = TOP;
@@ -1213,258 +1449,258 @@
TOP = Fminus (1, &TOP);
AFTER_POTENTIAL_GC ();
}
- break;
+ Next();
}
- case Bplus:
+ OPCODE(Bplus):
BEFORE_POTENTIAL_GC ();
DISCARD (1);
TOP = Fplus (2, &TOP);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
- case Bmax:
+ OPCODE(Bmax):
BEFORE_POTENTIAL_GC ();
DISCARD (1);
TOP = Fmax (2, &TOP);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
- case Bmin:
+ OPCODE(Bmin):
BEFORE_POTENTIAL_GC ();
DISCARD (1);
TOP = Fmin (2, &TOP);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
- case Bmult:
+ OPCODE(Bmult):
BEFORE_POTENTIAL_GC ();
DISCARD (1);
TOP = Ftimes (2, &TOP);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
- case Bquo:
+ OPCODE(Bquo):
BEFORE_POTENTIAL_GC ();
DISCARD (1);
TOP = Fquo (2, &TOP);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
- case Brem:
+ OPCODE(Brem):
{
Lisp_Object v1;
BEFORE_POTENTIAL_GC ();
v1 = POP;
TOP = Frem (TOP, v1);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
}
- case Bpoint:
+ OPCODE(Bpoint):
{
Lisp_Object v1;
XSETFASTINT (v1, PT);
PUSH (v1);
- break;
+ Next();
}
- case Bgoto_char:
+ OPCODE(Bgoto_char):
BEFORE_POTENTIAL_GC ();
TOP = Fgoto_char (TOP);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
- case Binsert:
+ OPCODE(Binsert):
BEFORE_POTENTIAL_GC ();
TOP = Finsert (1, &TOP);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
- case BinsertN:
+ OPCODE(BinsertN):
op = FETCH;
BEFORE_POTENTIAL_GC ();
DISCARD (op - 1);
TOP = Finsert (op, &TOP);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
- case Bpoint_max:
+ OPCODE(Bpoint_max):
{
Lisp_Object v1;
XSETFASTINT (v1, ZV);
PUSH (v1);
- break;
+ Next();
}
- case Bpoint_min:
+ OPCODE(Bpoint_min):
{
Lisp_Object v1;
XSETFASTINT (v1, BEGV);
PUSH (v1);
- break;
+ Next();
}
- case Bchar_after:
+ OPCODE(Bchar_after):
BEFORE_POTENTIAL_GC ();
TOP = Fchar_after (TOP);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
- case Bfollowing_char:
+ OPCODE(Bfollowing_char):
{
Lisp_Object v1;
BEFORE_POTENTIAL_GC ();
v1 = Ffollowing_char ();
AFTER_POTENTIAL_GC ();
PUSH (v1);
- break;
+ Next();
}
- case Bpreceding_char:
+ OPCODE(Bpreceding_char):
{
Lisp_Object v1;
BEFORE_POTENTIAL_GC ();
v1 = Fprevious_char ();
AFTER_POTENTIAL_GC ();
PUSH (v1);
- break;
+ Next();
}
- case Bcurrent_column:
+ OPCODE(Bcurrent_column):
{
Lisp_Object v1;
BEFORE_POTENTIAL_GC ();
XSETFASTINT (v1, (int) current_column ()); /* iftc */
AFTER_POTENTIAL_GC ();
PUSH (v1);
- break;
+ Next();
}
- case Bindent_to:
+ OPCODE(Bindent_to):
BEFORE_POTENTIAL_GC ();
TOP = Findent_to (TOP, Qnil);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
- case Beolp:
+ OPCODE(Beolp):
PUSH (Feolp ());
- break;
+ Next();
- case Beobp:
+ OPCODE(Beobp):
PUSH (Feobp ());
- break;
+ Next();
- case Bbolp:
+ OPCODE(Bbolp):
PUSH (Fbolp ());
- break;
+ Next();
- case Bbobp:
+ OPCODE(Bbobp):
PUSH (Fbobp ());
- break;
+ Next();
- case Bcurrent_buffer:
+ OPCODE(Bcurrent_buffer):
PUSH (Fcurrent_buffer ());
- break;
+ Next();
- case Bset_buffer:
+ OPCODE(Bset_buffer):
BEFORE_POTENTIAL_GC ();
TOP = Fset_buffer (TOP);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
- case Binteractive_p:
+ OPCODE(Binteractive_p):
PUSH (Finteractive_p ());
- break;
+ Next();
- case Bforward_char:
+ OPCODE(Bforward_char):
BEFORE_POTENTIAL_GC ();
TOP = Fforward_char (TOP);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
- case Bforward_word:
+ OPCODE(Bforward_word):
BEFORE_POTENTIAL_GC ();
TOP = Fforward_word (TOP);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
- case Bskip_chars_forward:
+ OPCODE(Bskip_chars_forward):
{
Lisp_Object v1;
BEFORE_POTENTIAL_GC ();
v1 = POP;
TOP = Fskip_chars_forward (TOP, v1);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
}
- case Bskip_chars_backward:
+ OPCODE(Bskip_chars_backward):
{
Lisp_Object v1;
BEFORE_POTENTIAL_GC ();
v1 = POP;
TOP = Fskip_chars_backward (TOP, v1);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
}
- case Bforward_line:
+ OPCODE(Bforward_line):
BEFORE_POTENTIAL_GC ();
TOP = Fforward_line (TOP);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
- case Bchar_syntax:
+ OPCODE(Bchar_syntax):
BEFORE_POTENTIAL_GC ();
CHECK_NUMBER (TOP);
AFTER_POTENTIAL_GC ();
XSETFASTINT (TOP, syntax_code_spec[(int) SYNTAX (XINT (TOP))]);
- break;
+ Next();
- case Bbuffer_substring:
+ OPCODE(Bbuffer_substring):
{
Lisp_Object v1;
BEFORE_POTENTIAL_GC ();
v1 = POP;
TOP = Fbuffer_substring (TOP, v1);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
}
- case Bdelete_region:
+ OPCODE(Bdelete_region):
{
Lisp_Object v1;
BEFORE_POTENTIAL_GC ();
v1 = POP;
TOP = Fdelete_region (TOP, v1);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
}
- case Bnarrow_to_region:
+ OPCODE(Bnarrow_to_region):
{
Lisp_Object v1;
BEFORE_POTENTIAL_GC ();
v1 = POP;
TOP = Fnarrow_to_region (TOP, v1);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
}
- case Bwiden:
+ OPCODE(Bwiden):
BEFORE_POTENTIAL_GC ();
PUSH (Fwiden ());
AFTER_POTENTIAL_GC ();
- break;
+ Next();
- case Bend_of_line:
+ OPCODE(Bend_of_line):
BEFORE_POTENTIAL_GC ();
TOP = Fend_of_line (TOP);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
- case Bset_marker:
+ OPCODE(Bset_marker):
{
Lisp_Object v1, v2;
BEFORE_POTENTIAL_GC ();
@@ -1472,72 +1708,72 @@
v2 = POP;
TOP = Fset_marker (TOP, v2, v1);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
}
- case Bmatch_beginning:
+ OPCODE(Bmatch_beginning):
BEFORE_POTENTIAL_GC ();
TOP = Fmatch_beginning (TOP);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
- case Bmatch_end:
+ OPCODE(Bmatch_end):
BEFORE_POTENTIAL_GC ();
TOP = Fmatch_end (TOP);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
- case Bupcase:
+ OPCODE(Bupcase):
BEFORE_POTENTIAL_GC ();
TOP = Fupcase (TOP);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
- case Bdowncase:
+ OPCODE(Bdowncase):
BEFORE_POTENTIAL_GC ();
TOP = Fdowncase (TOP);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
- case Bstringeqlsign:
+ OPCODE(Bstringeqlsign):
{
Lisp_Object v1;
BEFORE_POTENTIAL_GC ();
v1 = POP;
TOP = Fstring_equal (TOP, v1);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
}
- case Bstringlss:
+ OPCODE(Bstringlss):
{
Lisp_Object v1;
BEFORE_POTENTIAL_GC ();
v1 = POP;
TOP = Fstring_lessp (TOP, v1);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
}
- case Bequal:
+ OPCODE(Bequal):
{
Lisp_Object v1;
v1 = POP;
TOP = Fequal (TOP, v1);
- break;
+ Next();
}
- case Bnthcdr:
+ OPCODE(Bnthcdr):
{
Lisp_Object v1;
BEFORE_POTENTIAL_GC ();
v1 = POP;
TOP = Fnthcdr (TOP, v1);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
}
- case Belt:
+ OPCODE(Belt):
{
Lisp_Object v1, v2;
if (CONSP (TOP))
@@ -1583,56 +1819,56 @@
TOP = Felt (TOP, v1);
AFTER_POTENTIAL_GC ();
}
- break;
+ Next();
}
- case Bmember:
+ OPCODE(Bmember):
{
Lisp_Object v1;
BEFORE_POTENTIAL_GC ();
v1 = POP;
TOP = Fmember (TOP, v1);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
}
- case Bassq:
+ OPCODE(Bassq):
{
Lisp_Object v1;
BEFORE_POTENTIAL_GC ();
v1 = POP;
TOP = Fassq (TOP, v1);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
}
- case Bnreverse:
+ OPCODE(Bnreverse):
BEFORE_POTENTIAL_GC ();
TOP = Fnreverse (TOP);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
- case Bsetcar:
+ OPCODE(Bsetcar):
{
Lisp_Object v1;
BEFORE_POTENTIAL_GC ();
v1 = POP;
TOP = Fsetcar (TOP, v1);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
}
- case Bsetcdr:
+ OPCODE(Bsetcdr):
{
Lisp_Object v1;
BEFORE_POTENTIAL_GC ();
v1 = POP;
TOP = Fsetcdr (TOP, v1);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
}
- case Bcar_safe:
+ OPCODE(Bcar_safe):
{
Lisp_Object v1;
v1 = TOP;
@@ -1640,10 +1876,10 @@
TOP = XCAR (v1);
else
TOP = Qnil;
- break;
+ Next();
}
- case Bcdr_safe:
+ OPCODE(Bcdr_safe):
{
Lisp_Object v1;
v1 = TOP;
@@ -1651,42 +1887,42 @@
TOP = XCDR (v1);
else
TOP = Qnil;
- break;
+ Next();
}
- case Bnconc:
+ OPCODE(Bnconc):
BEFORE_POTENTIAL_GC ();
DISCARD (1);
TOP = Fnconc (2, &TOP);
AFTER_POTENTIAL_GC ();
- break;
+ Next();
- case Bnumberp:
+ OPCODE(Bnumberp):
TOP = (NUMBERP (TOP) ? Qt : Qnil);
- break;
+ Next();
- case Bintegerp:
+ OPCODE(Bintegerp):
TOP = INTEGERP (TOP) ? Qt : Qnil;
- break;
+ Next();
#ifdef BYTE_CODE_SAFE
- case Bset_mark:
+ OPCODE(Bset_mark):
BEFORE_POTENTIAL_GC ();
error ("set-mark is an obsolete bytecode");
AFTER_POTENTIAL_GC ();
- break;
- case Bscan_buffer:
+ Next();
+ OPCODE(Bscan_buffer):
BEFORE_POTENTIAL_GC ();
error ("scan-buffer is an obsolete bytecode");
AFTER_POTENTIAL_GC ();
- break;
+ Next();
#endif
- case 0:
+ OPCODE(0):
abort ();
- case 255:
- default:
+ OPCODE(255):
+ DEFAULT:
#ifdef BYTE_CODE_SAFE
if (op < Bconstant)
{
@@ -1700,8 +1936,12 @@
#else
PUSH (vectorp[op - Bconstant]);
#endif
+ Next();
+
+#ifndef THREADED_CODE
}
}
+#endif /* !THREADED_CODE */
exit:
[-- Attachment #3: Type: text/plain, Size: 141 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel
next reply other threads:[~2004-05-03 1:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-03 1:10 jay [this message]
2004-05-03 1:35 ` threaded code in bytecode.c Miles Bader
2004-05-03 4:15 ` Jaeyoun Chung
2004-05-03 22:20 ` Richard Stallman
2004-05-04 1:06 ` Jaeyoun Chung
2004-05-04 20:08 ` Richard Stallman
2004-05-05 5:40 ` Lars Brinkhoff
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040503011011.GA16378@people.kldp.org \
--to=jay@people.kldp.org \
--cc=jay@kldp.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).