aboutsummaryrefslogtreecommitdiffstats
path: root/src/bytecode.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bytecode.c')
-rw-r--r--src/bytecode.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/bytecode.c b/src/bytecode.c
index 3c90544f3f2..8ef84682035 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -286,12 +286,13 @@ enum byte_code_op
286 286
287/* Fetch the next byte from the bytecode stream. */ 287/* Fetch the next byte from the bytecode stream. */
288 288
289#define FETCH (*pc++) 289#define FETCH (last_pc = pc, *pc++)
290#define FETCH_NORECORD (*pc++)
290 291
291/* Fetch two bytes from the bytecode stream and make a 16-bit number 292/* Fetch two bytes from the bytecode stream and make a 16-bit number
292 out of them. */ 293 out of them. */
293 294
294#define FETCH2 (op = FETCH, op + (FETCH << 8)) 295#define FETCH2 (op = FETCH, op + (FETCH_NORECORD << 8))
295 296
296/* Push X onto the execution stack. The expression X should not 297/* Push X onto the execution stack. The expression X should not
297 contain TOP, to avoid competing side effects. */ 298 contain TOP, to avoid competing side effects. */
@@ -375,6 +376,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
375 bytestr_data = ptr_bounds_clip (bytestr_data + item_bytes, bytestr_length); 376 bytestr_data = ptr_bounds_clip (bytestr_data + item_bytes, bytestr_length);
376 memcpy (bytestr_data, SDATA (bytestr), bytestr_length); 377 memcpy (bytestr_data, SDATA (bytestr), bytestr_length);
377 unsigned char const *pc = bytestr_data; 378 unsigned char const *pc = bytestr_data;
379 unsigned char const *last_pc = pc;
378 ptrdiff_t count = SPECPDL_INDEX (); 380 ptrdiff_t count = SPECPDL_INDEX ();
379 381
380 if (!NILP (args_template)) 382 if (!NILP (args_template))
@@ -535,7 +537,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
535 if (CONSP (TOP)) 537 if (CONSP (TOP))
536 TOP = XCDR (TOP); 538 TOP = XCDR (TOP);
537 else if (!NILP (TOP)) 539 else if (!NILP (TOP))
538 wrong_type_argument (Qlistp, TOP); 540 wrong_type_argument_new (Qlistp, TOP, last_pc - bytestr_data);
539 NEXT; 541 NEXT;
540 } 542 }
541 543