1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-03 12:31:32 -08:00
Commit graph

42793 commits

Author SHA1 Message Date
Andrea Corallo
f036ec97ce * src/comp.c: Fix i386 --enable-check-lisp-object-type
* src/comp.c (load_comp_unit): Fix return type, on i386 influence
	parameter passing!
2020-05-22 21:52:19 +01:00
Andrea Corallo
38a9ddbc1c * src/comp.c: Some aesthetic code clean-up.
* src/comp.c (comp_t): Remove 'lisp_X_s' field.
	(emit_coerce): Respect 80 columns limit.
	(emit_rvalue_from_emacs_uint): GNU style, unnecessary brackets.
	(emit_rvalue_from_emacs_int): Likewise.
	(emit_rvalue_from_lisp_word_tag): Likewise.
	(emit_rvalue_from_lisp_word): Likewise.
	(emit_lval_XLI): Remove unused function.
	(emit_lval_XLP): Remove commented out code.
	(define_add1_sub1): Respect 80 columns limit.
	(Fcomp__init_ctxt): Reflect 'lisp_X_s' field removal.
2020-05-22 21:52:11 +01:00
Nicolás Bértolo
7fa83f9ac9 Handle LISP_WORDS_ARE_POINTERS and CHECK_LISP_OBJECT_TYPE.
* src/comp.c: Introduce the Lisp_X, Lisp_Word, and Lisp_Word_tag
types. These types are used instead of long or long long. Use
emacs_int_type and emacs_uint_types where appropriate.
(emit_coerce): Add special logic that handles the case when
Lisp_Object is a struct. This is necessary for handling the
--enable-check-lisp-object-type configure option.

* src/lisp.h: Since libgccjit does not support opaque unions, change
Lisp_X to be struct. This is done to ensure that the same types are
used in the same binary. It is probably unnecessary since only a
pointer to it is used.
2020-05-20 20:46:39 +01:00
Nicolás Bértolo
5ff2cbdb04 * Remove a layer of indirection for access to pure storage.
* src/comp.c: Taking the address of an array is the same as casting it
to a pointer. Therefore, the C expression `(EMACS_INT **) &pure` is in
fact adding a layer of indirection that is not necessary. The fix is
to cast the `pure` array to a pointer and store that in a void pointer
that is part of the compiled shared library.
2020-05-20 20:37:49 +01:00
Andrea Corallo
72a96ed992 * src/comp.c (emit_setjmp): Aesthetic, respect 80 columns limit. 2020-05-20 20:30:48 +01:00
Nicolás Bértolo
05b08f2644 * Handle setjmp() taking two arguments in Windows.
* src/comp.c: Add `define_setjmp_deps()` and `emit_setjmp()` which
abstract over this difference in behavior between operating systems.

WARNING: Not all cases are handled by this patch. The Mingw-64
setjmp.h header deals with many other combinations. I don't think it
is a good idea to replicate the logic of that header inside
emacs. (Maybe a few lines in the configure script could be added to
handle this problem?)
2020-05-20 20:30:17 +01:00
Nicolás Bértolo
68fad7a8fc Do not block SIGIO in platforms that don't have it.
* src/comp.c (comp--compile-ctxt-to-file): Add a preprocessor check to
avoid blocking SIGIO in platforms that don't have it.

Signed-off-by: Andrea Corallo <akrl@sdf.org>
2020-05-20 16:36:42 +00:00
Andrea Corallo
cd4ef52c86 Merge remote-tracking branch 'savannah/master' into HEAD 2020-05-17 22:49:02 +01:00
Andrea Corallo
abec255c02 * Fix Garbage Collector for missing calle-saved regs content (Bug#41357)
* src/alloc.c (SET_STACK_TOP_ADDRESS): Do not call
	__builtin_unwind_init.
	(flush_stack_call_func1): Rename from 'flush_stack_call_func'.
	(flush_stack_call_func): New function to spill all registers
	before calling 'flush_stack_call_func1'.  This to make sure the
	top of the stack identified includes those registers.
2020-05-17 22:37:28 +01:00
Andrea Corallo
9e9421c7ee * Fix bug#41346 assertion triggered while loading dump
* src/comp.c (load_comp_unit): While loading from dump lambda
	fixups are still to happen here.  Verify relocation coherency only
	after 'top_level_run' execution.
2020-05-17 08:50:53 +01:00
Glenn Morris
788c2480f4 Merge from origin/emacs-27
b4937f64cd (origin/emacs-27) Improve documentation of manually instal...
efd4e973a4 Reflect the emacs-devel ELPA/MELPA dispute in FAQ
28541674cd Consider face inheritance when checking region face backgr...
e75f6be6cc Fix dired default file operation (bug#41261)
406fb0746c Fix documentation related to 'command-switch-alist'.
747e0a2523 Improve ediff readability in misterioso theme (Bug#41221)
48830c73e7 Fix a crash in handle_display_spec
a37290a6f9 In x_hide_tip reset tip_last_frame for GTK+ tooltips only ...
3d81995692 Fix docstring of flymake-make-diagnostic (bug#40351)
632aa9d57a Go back to “Bahá’í”
e2406ff60f * lisp/dired.el (dired-toggle-marks): Doc fix.  (Bug#41097)

# Conflicts:
#	doc/emacs/building.texi
2020-05-16 10:29:14 -07:00
Andrea Corallo
ff9e40e9fe * Add check_comp_unit_relocs
* src/comp.c (check_comp_unit_relocs): Add function to verify
	relocation coherency.
	(load_comp_unit): Call it.
2020-05-15 20:06:49 +01:00
Andrea Corallo
e351a12216 Sanity check on lambdas fixups
* src/pdumper.c (dump_do_dump_relocation): While fixing up lambda
	relocation verify placeholder coherency.

	* src/comp.c (syms_of_comp): Define symbol 'lambda-fixup'.

	* lisp/emacs-lisp/comp.el (comp-finalize-container): Leave a
	lambda-fixup as placeholder in the relocation as a sanity check.
2020-05-15 20:06:49 +01:00
Andrea Corallo
27b80ae94c * Better Vcomp_sym_subr_c_name_h test function + doc
* src/comp.c (syms_of_comp): 'Vcomp_sym_subr_c_name_h' need only
	'eq' as test + fix doc for 'comp-sym-subr-c-name-h'.
2020-05-15 20:06:49 +01:00
Andrea Corallo
44b0ce6e38 Add anonymous lambdas reload mechanism
* src/pdumper.c (dump_do_dump_relocation): Initialize
	'lambda_gc_guard' while resurrecting.
	(dump_do_dump_relocation): Revive lambdas and fixup them.

	* src/comp.h (struct Lisp_Native_Comp_Unit): Define new
	'lambda_gc_guard' 'lambda_c_name_idx_h' 'data_imp_relocs'
	'loaded_once' fields.

	* src/comp.c (load_comp_unit): Use compilaiton unit 'loaded_once'
	field.
	(make_subr, Fcomp__register_lambda): New functions.
	(Fcomp__register_subr): Make use of 'make_subr'.
	(Fnative_elisp_load): Indent.
	(Fnative_elisp_load): Initialize 'lambda_gc_guard'
	'lambda_c_name_idx_h' fields.
	(syms_of_comp): Add Scomp__register_lambda.

	* lisp/emacs-lisp/comp.el (comp-ctxt): Change
	'byte-func-to-func-h' hash key test.
	(comp-ctxt): Add 'lambda-fixups-h' slot.
	(comp-emit-lambda-for-top-level): New function.
	(comp-finalize-relocs): Never emit lambdas in pure space.
	(comp-finalize-relocs): Fixup relocation indexes.
2020-05-15 20:06:49 +01:00
Andrea Corallo
49f0331f53 * Render all immediates as comments at comp-debug > 2
* src/comp.c (emit_mvar_rval): No reason to emit only fixnums.
2020-05-14 21:50:32 +01:00
Andrea Corallo
6eb14daccf * Dump log and intemediate GCC IRs only at comp-debug 3
* src/comp.c (Fcomp__init_ctxt): Increase threshold for dumping
	really everything to 'comp-debug' 3.
2020-05-14 21:50:32 +01:00
Andrea Corallo
392a6f9bab * Split emit_const_lisp_obj logic
* src/comp.c (emit_lisp_obj_reloc_lval): New function.
	(emit_const_lisp_obj): Rename into 'emit_lisp_obj_rval' and strip
	logic for 'emit_lisp_obj_reloc_lval'.
	(emit_NILP, emit_CHECK_CONS, emit_mvar_rval, emit_set_internal)
	(define_CAR_CDR, define_bool_to_lisp_obj): Update for
	'emit_const_lisp_obj' being renamed.
2020-05-14 21:50:32 +01:00
Andrea Corallo
acf7e129ea * Rename emit_mvar_access -> emit_mvar_lval
* src/comp.c (emit_mvar_access): Rename into 'emit_mvar_lval'.
	(emit_mvar_rval, emit_frame_assignment): Update for
	'emit_mvar_access' rename.
2020-05-14 21:50:32 +01:00
Andrea Corallo
5bf685f17c * Rename emit_mvar_val -> emit_mvar_rval
* src/comp.c (emit_mvar_val): Rename into 'emit_mvar_rval'.
	(emit_set_internal, emit_simple_limple_call, emit_limple_insn)
	(emit_call_with_type_hint, emit_call2_with_type_hint)
	(emit_consp, emit_numperp, emit_integerp): Update for
	'emit_mvar_val' rename.
2020-05-14 21:50:31 +01:00
Andrea Corallo
3ab6a75667 * Indentation fix
* src/comp.c (Fcomp__init_ctxt, Fcomp__release_ctxt)
	(Fcomp__compile_ctxt_to_file, Fcomp__register_subr): Indentation
	fix.
2020-05-14 21:50:31 +01:00
Andrea Corallo
3bcb79fdcd Merge remote-tracking branch 'savannah/master' into HEAD 2020-05-14 07:14:23 +01:00
Clément Pit-Claudel
48830c73e7 Fix a crash in handle_display_spec
* src/xdisp.c (handle_display_spec): Check that the cdr of the
disable-eval spec is a cons before taking its car.  (Bug#41232)
2020-05-13 18:53:25 +03:00
Martin Rudalics
a37290a6f9 In x_hide_tip reset tip_last_frame for GTK+ tooltips only (Bug#41200)
* src/xfns.c (x_hide_tip): Reset tip_last_frame only when
using GTK+ system tooltips (Bug#41200).
2020-05-13 10:31:50 +02:00
Paul Eggert
4645430b92 Pacify GCC 10.1.0
Pacify GCC 10.1.0 so that it does not issue false alarms
when Emacs is configured with --enable-gcc-warnings.
* src/dispnew.c (clear_glyph_row):
* src/fns.c (hash_clear):
* src/keyboard.c (append_tab_bar_item):
* src/lisp.h (vcopy):
* src/xfaces.c (get_lface_attributes_no_remap)
(Finternal_copy_lisp_face, realize_default_face):
* src/xmenu.c (set_frame_menubar):
Work around -Warray-bounds false alarm in GCC 10.1.0.
* src/intervals.c (copy_properties):
Avoid -Wnull-dereference false alarm in GCC 10.1.0.
* src/lisp.h (xvector_contents_addr, xvector_contents):
New functions, useful for working around GCC bug 95072.
2020-05-11 17:54:24 -07:00
Andrea Corallo
49def706f3 * src/comp.c (load_comp_unit): Style fix. 2020-05-10 09:34:21 +01:00
Andrea Corallo
bc50c0c57e Merge remote-tracking branch 'savannah/master' into HEAD 2020-05-09 20:04:41 +01:00
Andrea Corallo
bd8be64ce3 * Fix --enable-check-lisp-object-type GNU/Linux X86_64 build
* src/comp.c (emit_mvar_val): Fix missing use of XLP macro.
	(load_comp_unit): Fix missing use of NILP macro.
2020-05-09 19:09:33 +01:00
Glenn Morris
94224c4add * src/xdisp.c (Fwindow_text_pixel_size): Fix previous merge. 2020-05-09 10:17:27 -07:00
Glenn Morris
5c890bfc19 Merge from origin/emacs-27
be0d1cac83 (origin/emacs-27) Small fix for type of 'display-fill-colu...
c5e5839776 Fix customization of 'display-fill-column-indicator-charac...
d5c184aa3e Refer to fill column indicator Info node in some places.
e13300ae50 Merge branch 'emacs-27' of git.sv.gnu.org:/srv/git/emacs i...
0bae57033f Fix GTK's Tool Bar menu radio buttons
4c98aa7ea5 Minor clarifications in NEWS
a1cbd05f38 Improve documentation of 'with-suppressed-warnings'.
4a895c1b26 Fix a typo in a comment
2caf3e997e Improve documentation of Hi Lock mode
7081c1d66f Fix typos in the Emacs user manual
0385771e2f Fix references to Speedbar in VHDL mode
a76cafea0d Fix handling of FROM = t and TO = t by 'window-text-pixel-...

# Conflicts:
#	etc/NEWS
#	src/xdisp.c
2020-05-09 10:03:21 -07:00
Paul Eggert
e59f697cd5 Improve nonnull checking with GCC in emacs-module
* src/emacs-module.h.in (EMACS_ATTRIBUTE_NONNULL):
Also do the nonnull check with GCC.  (The old code did the
check with Clang but not with GCC.)
2020-05-09 09:11:53 -07:00
Andrea Corallo
c6eb276076 Merge remote-tracking branch 'savannah/master' into HEAD 2020-05-09 14:06:55 +01:00
Philipp Stephani
d5c184aa3e Refer to fill column indicator Info node in some places.
* src/xdisp.c (syms_of_xdisp): Add reference to manual in
documentation strings for variables related to fill column indicators.

* lisp/display-fill-column-indicator.el (display-fill-column-indicator)
(display-fill-column-indicator-mode): Add reference to manual.
2020-05-09 10:22:01 +02:00
Federico Tedin
1f149cb392 Prevent hanging in next-single-char-property-change
* src/textprop.c (Fnext_single_char_property_change): Clarify in
the doc string the behavior when LIMIT is past the end of OBJECT.
Stop the search when position gets to end of buffer, for when LIMIT
is beyond that.  (Bug#40000)
2020-05-09 10:27:06 +03:00
Eli Zaretskii
a76cafea0d Fix handling of FROM = t and TO = t by 'window-text-pixel-size'
* src/xdisp.c (Fwindow_text_pixel_size): Use byte position for
accessing buffer text, not character positions.  (Bug#41125)
2020-05-08 13:35:34 +03:00
Andrea Corallo
92cf4bb8cc Merge remote-tracking branch 'savannah/master' into HEAD 2020-05-06 20:11:59 +01:00
Paul Eggert
02f5a419fd Pacify buggy old GCC with a cast
* src/bignum.h (bignum_integer): Pacify GCC 4.8.5.
Problem reported by Andreas Schwab in:
https://lists.gnu.org/r/emacs-devel/2020-05/msg00781.html
2020-05-06 11:01:57 -07:00
Glenn Morris
3568c5d86f Merge from origin/emacs-27
7be160d800 Improve "Help Summary" section in user manual
f6d6ccc984 Clarify message-sendmail-extra-arguments docstring
95fde1a851 * src/editfns.c (Fformat): Small documentation fix.
2020-05-06 09:28:36 -07:00
Glenn Morris
b147e6e507 Merge from origin/emacs-27
f9fa726ced Improve doc strings of makunbound and fmakunbound
2020-05-06 09:22:55 -07:00
Paul Eggert
8f6524db83 Don’t assume __has_attribute in emacs-module.c
Problem reported by Glenn Morris in:
https://lists.gnu.org/r/emacs-devel/2020-05/msg00724.html
* src/emacs-module.c: Use HAS_ATTRIBUTE instead of assuming
the compiler supports __has_attribute.
2020-05-05 17:22:07 -07:00
Philipp Stephani
95fde1a851 * src/editfns.c (Fformat): Small documentation fix. 2020-05-05 14:59:27 +02:00
Paul Eggert
daab2d3a62 Fix typos in recent attribute.h simplification
Problem reported by Andreas Schwab in:
https://lists.gnu.org/r/emacs-devel/2020-05/msg00650.html
* src/conf_post.h (HAS_ATTR_no_sanitize): Define to false in case
cpp is picky, fixing a longstanding glitch here.
(ATTRIBUTE_NO_SANITIZE_ADDRESS, ATTRIBUTE_NO_SANITIZE_UNDEFINED):
Use HAS_ATTRIBUTE, not __has_attribute.
2020-05-05 00:51:24 -07:00
Andrea Corallo
c6a610ecdc Merge remote-tracking branch 'savannah/master' into HEAD 2020-05-04 18:24:00 +01:00
Paul Eggert
106936415d Simplify by using attribute.h macros
attribute.h is partly designed for C2X forward compatibility,
since C2X will add some standard attributes.  Using its macros
should help insulate Emacs from C2X teething problems.
* src/conf_post.h: Include attribute.h.
(HAS_ATTRIBUTE, HAS_FEATURE): Rename from __has_attribute and
__has_feature, to avoid polluting the builtin namespace.
All uses changed.
(ATTRIBUTE_COLD, ATTRIBUTE_FORMAT, FALLTHROUGH, ATTRIBUTE_CONST)
(ATTRIBUTE_PURE, ATTRIBUTE_UNUSED, ATTRIBUTE_MAY_ALIAS)
(ATTRIBUTE_MALLOC, ATTRIBUTE_ALLOC_SIZE)
(ATTRIBUTE_RETURNS_NONNULL): Remove, as attribute.h does this now.
(NO_INLINE, EXTERNALLY_VISIBLE, ARG_NONNULL, ATTRIBUTE_UNUSED):
Simplify by defining in terms of attribute.h macros.
* src/systhread.h (ATTRIBUTE_WARN_UNUSED_RESULT): Remove.
All uses replaced by attribute.h’s NODISCARD.
2020-05-03 15:10:07 -07:00
Stefan Kangas
f9fa726ced Improve doc strings of makunbound and fmakunbound
* src/data.c (Fmakunbound, Ffmakunbound): Improve doc
strings.  (Bug#41026)
2020-05-03 22:01:23 +02:00
Alan Third
2c306146d2 Fix initial frame resizing issue on NS (bug#40200)
* src/nsterm.m ([EmacsView viewDidResize:]): Don't try to determine
the old size when not drawing to the buffer.
2020-05-03 17:14:48 +01:00
Glenn Morris
c6d70f890c Merge from origin/emacs-27
1f17193e00 Expand file name for remote dirs as well
7a12ab5ea2 Fix project.el commands in "transient" projects
274ec97e3c Make sure alist-related functions say so in their doc
2020-05-03 07:50:20 -07:00
Eli Zaretskii
cb1e73d1bc Improve accuracy of apropos commands that search doc strings
It is conceptually wrong for apropos commands that search doc
strings to look for matches of several words only on the same
line, because division of doc strings between lines is
ephemeral.
* lisp/apropos.el (apropos-parse-pattern): Accept an optional
argument MULTILINE-P, and if that is non-nil, produce regexps that
match words in the list even if they are separated by line
boundaries.
(apropos-value, apropos-local-value, apropos-documentation): Use
the new optional argument in apropos commands that search
multiline text, such as doc strings.

* src/search.c (Fposix_looking_at, Fposix_string_match)
(Fposix_search_backward, Fposix_search_forward): Make sure Posix
appears in the doc strings near REGEXP, for better matches.
2020-05-03 16:53:53 +03:00
Andrea Corallo
ab66e61b58 Merge remote-tracking branch 'savannah/master' into HEAD 2020-04-29 20:25:23 +01:00
Eli Zaretskii
274ec97e3c Make sure alist-related functions say so in their doc
* src/fns.c (Fassq, assq_no_quit, Fassoc, assoc_no_quit, Frassq)
(Frassoc): Rename argument LIST to ALIST.  Doc strings updated.
2020-04-29 17:52:53 +03:00