From 99ec16475a6d1bbe3b308f89e45afb0096e02f0e Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 10 Mar 2013 17:46:55 -0400 Subject: * src/bytecode.c (struct byte_stack): Remove `constants' when unused. --- src/bytecode.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/bytecode.c') diff --git a/src/bytecode.c b/src/bytecode.c index bd8abe85e04..628c4d90cf3 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -313,9 +313,11 @@ struct byte_stack Lisp_Object byte_string; const unsigned char *byte_string_start; +#if BYTE_MARK_STACK /* The vector of constants used during byte-code execution. Storing this here protects it from GC because mark_byte_stack marks it. */ Lisp_Object constants; +#endif /* Next entry in byte_stack_list. */ struct byte_stack *next; @@ -379,12 +381,12 @@ unmark_byte_stack (void) } -/* Fetch the next byte from the bytecode stream */ +/* Fetch the next byte from the bytecode stream. */ #define FETCH *stack.pc++ /* Fetch two bytes from the bytecode stream and make a 16-bit number - out of them */ + out of them. */ #define FETCH2 (op = FETCH, op + (FETCH << 8)) @@ -404,7 +406,7 @@ unmark_byte_stack (void) #define DISCARD(n) (top -= (n)) /* Get the value which is at the top of the execution stack, but don't - pop it. */ + pop it. */ #define TOP (*top) @@ -535,7 +537,9 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, stack.byte_string = bytestr; stack.pc = stack.byte_string_start = SDATA (bytestr); +#if BYTE_MARK_STACK stack.constants = vector; +#endif if (MAX_ALLOCA / word_size <= XFASTINT (maxdepth)) memory_full (SIZE_MAX); top = alloca ((XFASTINT (maxdepth) + 1) * sizeof *top); -- cgit v1.2.1 From d9df6f40e326f3f5487b7c50b99bf5112262badc Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Mar 2013 00:27:34 -0700 Subject: Static checking by Sun C 5.12. * lib-src/etags.c (analyse_regex): Omit unreachable code. * src/alloc.c (buffer_memory_full) [REL_ALLOC]: * src/bytecode.c (exec_byte_code): * src/dispnew.c (init_display): * src/eval.c (error): * src/fileio.c (Fsubstitute_in_file_name): * src/keyboard.c (Fevent_convert_list): * src/keymap.c (Fsingle_key_description): * src/term.c (maybe_fatal, fatal): * src/xfns.c (Fx_display_backing_store, Fx_display_visual_class): * src/xsmfns.c (Fhandle_save_session): Omit unreachable code. * src/keymap.c (map_keymap_char_table_item): Cast void * to a function pointer type; the C Standard requires this. --- src/bytecode.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/bytecode.c') diff --git a/src/bytecode.c b/src/bytecode.c index 628c4d90cf3..acb96c1e61b 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -755,7 +755,6 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, { BEFORE_POTENTIAL_GC (); wrong_type_argument (Qlistp, v1); - AFTER_POTENTIAL_GC (); } NEXT; } @@ -790,7 +789,6 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, { BEFORE_POTENTIAL_GC (); wrong_type_argument (Qlistp, v1); - AFTER_POTENTIAL_GC (); } NEXT; } -- cgit v1.2.1