From bc9dbce6ee527ded152682c98f5f82e42c33dde9 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 3 Dec 2012 13:07:47 -0800 Subject: * bytecode.c, lisp.h (Qbytecode): Remove. No longer needed after 2012-11-20 interactive-p changes. --- src/bytecode.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/bytecode.c') diff --git a/src/bytecode.c b/src/bytecode.c index 3267c7c8c76..4c5ac151de1 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -87,8 +87,6 @@ Lisp_Object Qbyte_code_meter; #endif /* BYTE_CODE_METER */ -Lisp_Object Qbytecode; - /* Byte codes: */ #define BYTE_CODES \ @@ -1963,8 +1961,6 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, void syms_of_bytecode (void) { - DEFSYM (Qbytecode, "byte-code"); - defsubr (&Sbyte_code); #ifdef BYTE_CODE_METER -- cgit v1.2.1 From ab422c4d6899b1442cb6954c1829c1fb656b006c Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 1 Jan 2013 09:11:05 +0000 Subject: Update copyright notices for 2013. --- src/bytecode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/bytecode.c') diff --git a/src/bytecode.c b/src/bytecode.c index 648813aed86..843a12a0e33 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -1,5 +1,6 @@ /* Execution of byte code produced by bytecomp.el. - Copyright (C) 1985-1988, 1993, 2000-2012 Free Software Foundation, Inc. + Copyright (C) 1985-1988, 1993, 2000-2013 Free Software Foundation, + Inc. This file is part of GNU Emacs. -- cgit v1.2.1 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 From 908589fd28437a9b0995b103e22ce5e4d421eb8a Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 24 Mar 2013 13:59:45 +0100 Subject: Reorder conditions that are written backwards * alloc.c (xpalloc, Fgarbage_collect): Reorder conditions that are written backwards. * blockinput.h (input_blocked_p): Likewise. * bytecode.c (exec_byte_code): Likewise. * callproc.c (call_process_kill, call_process_cleanup) (Fcall_process): Likewise. * ccl.c (ccl_driver, resolve_symbol_ccl_program) (Fccl_execute_on_string): Likewise. * character.c (string_escape_byte8): Likewise. * charset.c (read_hex): Likewise. * cm.c (calccost): Likewise. * data.c (cons_to_unsigned): Likewise. * dired.c (directory_files_internal, file_name_completion): Likewise. * dispnew.c (scrolling_window, update_frame_1, Fsleep_for) (sit_for): Likewise. * doc.c (Fsubstitute_command_keys): Likewise. * doprnt.c (doprnt): Likewise. * editfns.c (hi_time, decode_time_components, Fformat): Likewise. * emacsgtkfixed.c: Likewise. * fileio.c (file_offset, Fwrite_region): Likewise. * floatfns.c (Fexpt, fmod_float): Likewise. * fns.c (larger_vector, make_hash_table, Fmake_hash_table): Likewise. * font.c (font_intern_prop): Likewise. * frame.c (x_set_alpha): Likewise. * gtkutil.c (get_utf8_string): Likewise. * indent.c (check_display_width): Likewise. * intervals.c (create_root_interval, rotate_right, rotate_left) (split_interval_right, split_interval_left) (adjust_intervals_for_insertion, delete_node) (interval_deletion_adjustment, adjust_intervals_for_deletion) (merge_interval_right, merge_interval_left, copy_intervals) (set_intervals_multibyte_1): Likewise. * keyboard.c (gobble_input, append_tool_bar_item): Likewise. * keymap.c (Fkey_description): Likewise. * lisp.h (FIXNUM_OVERFLOW_P, vcopy): Likewise. * lread.c (openp, read_integer, read1, string_to_number): Likewise. * menu.c (ensure_menu_items): Likewise. * minibuf.c (read_minibuf_noninteractive): Likewise. * print.c (printchar, strout): Likewise. * process.c (create_process, Faccept_process_output) (wait_reading_process_output, read_process_output, send_process) (wait_reading_process_output): Likewise. * profiler.c (make_log, handle_profiler_signal): Likewise. * regex.c (re_exec): Likewise. * regex.h: Likewise. * search.c (looking_at_1, Freplace_match): Likewise. * sysdep.c (get_child_status, procfs_ttyname) (procfs_get_total_memory): Likewise. * systime.h (EMACS_TIME_VALID_P): Likewise. * term.c (dissociate_if_controlling_tty): Likewise. * window.c (get_phys_cursor_glyph): Likewise. * xdisp.c (init_iterator, redisplay_internal, redisplay_window) (try_window_reusing_current_matrix, try_window_id, pint2hrstr): Likewise. * xfns.c (Fx_window_property): Likewise. * xmenu.c (set_frame_menubar): Likewise. * xselect.c (x_get_window_property, x_handle_dnd_message): Likewise. * xsmfns.c (smc_save_yourself_CB): Likewise. * xterm.c (x_scroll_bar_set_handle): Likewise. --- src/bytecode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/bytecode.c') diff --git a/src/bytecode.c b/src/bytecode.c index acb96c1e61b..7676c8550a4 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -660,7 +660,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, the table clearer. */ #define LABEL(OP) [OP] = &&insn_ ## OP -#if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__ +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Woverride-init" #endif @@ -676,7 +676,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, #undef DEFINE }; -#if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__ +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) # pragma GCC diagnostic pop #endif -- cgit v1.2.1