1. Prefer "native-compiled" to "native compiled".
The adjective "native-compiled" with the hyphen is generally more
consistent with the typical pattern in English, especially when the
compound modifies a noun (e.g., "native-compiled code").
2. Prefer "natively compiled" to "natively-compiled".
The adverb "natively" modifies "compiled", and it is standard not
to hyphenate an adverb + adjective combination when the adverb ends
in -ly (e.g., "code that is natively compiled").
For example, note that we say "high-speed internet" but "highly
performant code".
* Makefile.in (dest):
* configure.ac (HAVE_NATIVE_COMP):
* doc/emacs/building.texi (Lisp Libraries):
* doc/lispref/compile.texi (Native Compilation)
(Native-Compilation Functions, Native-Compilation Variables):
* doc/lispref/functions.texi (What Is a Function, Declare Form):
* doc/lispref/loading.texi (How Programs Do Loading, Library Search):
* etc/NEWS:
* etc/NEWS.28:
* etc/NEWS.29:
* etc/NEWS.30:
* lisp/emacs-lisp/comp-common.el (native-comp-never-optimize-functions)
(comp-function-type-spec):
* lisp/emacs-lisp/comp-cstr.el:
* lisp/subr.el (locate-eln-file):
* src/comp.c (SETJMP_NAME, syms_of_comp):
* src/data.c (Fsubrp, Fnative_comp_function_p, Fsubr_native_lambda_list):
* src/lread.c (Fload):
* src/pdumper.c (dump_do_dump_relocation):
* test/src/comp-tests.el (lambda-return2): Avoid grammatically incorrect
variations on "natively compiled" and "native-compiled". (Bug#56727)
(cherry picked from commit
678fdcc16594aaedb319fe145d039aa118174f5d)
done ; \
done
-### Install native compiled Lisp files.
+### Install native-compiled Lisp files.
install-eln: lisp
ifeq ($(HAVE_NATIVE_COMP),yes)
umask 022 ; \
LIBS=$SAVE_LIBS
fi
AC_DEFINE_UNQUOTED([NATIVE_ELISP_SUFFIX], [".eln"],
- [System extension for native compiled elisp])
+ [System extension for native-compiled elisp])
AC_SUBST([HAVE_NATIVE_COMP])
AC_SUBST([LIBGCCJIT_CFLAGS])
AC_SUBST([LIBGCCJIT_LIBS])
@cindex native compilation
Emacs Lisp code can also be compiled into @dfn{native code}: machine
code not unlike the one produced by a C or Fortran compiler. Native
-code runs even faster than byte-code. Natively-compiled Emacs Lisp
+code runs even faster than byte-code. Natively compiled Emacs Lisp
code is stored in files whose names end in @samp{.eln}. @xref{Native
Compilation,, Native Compilation, elisp, the Emacs Lisp Reference Manual}.
@vindex native-comp-eln-load-path
Similarly to @code{load-path}, the list of directories where Emacs
-looks for @file{*.eln} files with natively-compiled Lisp code is
+looks for @file{*.eln} files with native-compiled Lisp code is
specified by the variable @code{native-comp-eln-load-path}.
@cindex autoload
@vindex native-compile@r{, a Lisp feature}
To determine whether the current Emacs process can produce and load
-natively-compiled Lisp code, call
+natively compiled Lisp code, call
@code{native-comp-available-p} (@pxref{Native-Compilation Functions}).
- Unlike byte-compiled code, natively-compiled Lisp code is executed
+ Unlike byte-compiled code, native-compiled Lisp code is executed
directly by the machine's hardware, and therefore runs at full speed
that the host CPU can provide. The resulting speedup generally
depends on what the Lisp code does, but is usually 2.5 to 5 times
faster than the corresponding byte-compiled code.
Since native code is generally incompatible between different
-systems, the natively-compiled code is @emph{not} transportable from
+systems, the native-compiled code is @emph{not} transportable from
one machine to another, it can only be used on the same machine where
it was produced or on very similar ones (having the same CPU and
-run-time libraries). The transportability of natively-compiled code
+run-time libraries). The transportability of native-compiled code
is the same as that of shared libraries (@file{.so} or @file{.dll}
files).
- Libraries of natively-compiled code include crucial dependencies on
+ Libraries of native-compiled code include crucial dependencies on
Emacs Lisp primitives (@pxref{What Is a Function}) and their calling
-conventions, and thus Emacs usually won't load natively-compiled code
+conventions, and thus Emacs usually won't load native-compiled code
produced by earlier or later Emacs versions; native compilation of the
same Lisp code by a different Emacs version will usually produce a
-natively-compiled library under a unique file name that only that
+natively compiled library under a unique file name that only that
version of Emacs will be able to load. However, the use of unique
file names enables several versions of the same Lisp library
-natively-compiled by several different versions of Emacs to be placed
+natively compiled by several different versions of Emacs to be placed
within the same directory.
@vindex no-native-compile
files in the last directory mentioned in
@code{native-comp-eln-load-path} (@pxref{Library Search}); this is
meant to be used as part of building an Emacs source tarball for the
-first time, when the natively-compiled files, which are absent from
+first time, when the native-compiled files, which are absent from
the source tarball, should be generated in the build tree instead of
the user's cache directory.
@end defun
of the main Emacs process. This leaves the main Emacs process free to
use while the compilation runs in the background. This is the method
used by Emacs to natively-compile any Lisp file or byte-compiled Lisp
-file that is loaded into Emacs, when no natively-compiled file for it
+file that is loaded into Emacs, when no native-compiled file for it
is available. Note that because of this use of a subprocess, native
compilation may produce warning and errors which byte-compilation does
not, and Lisp code may thus need to be modified to work correctly. See
@deffn Command emacs-lisp-native-compile
This command compiles the file visited by the current buffer into
native code, if the file was changed since the last time it was
-natively-compiled.
+natively compiled.
@end deffn
@deffn Command emacs-lisp-native-compile-and-load
This variable controls generation of trampolines. A trampoline is a
small piece of native code required to allow calling Lisp primitives,
which were advised or redefined, from Lisp code that was
-natively-compiled with @code{native-comp-speed} set to 2 or greater.
+natively compiled with @code{native-comp-speed} set to 2 or greater.
Emacs stores the generated trampolines on separate @file{*.eln} files.
By default, this variable's value is @code{t}, which enables the
generation of trampoline files; setting it to @code{nil} disables the
generation of trampolines. Note that if a trampoline needed for
advising or redefining a primitive is not available and cannot be
-generated, calls to that primitive from natively-compiled Lisp will
+generated, calls to that primitive from native-compiled Lisp will
ignore redefinitions and advices, and will behave as if the primitive
was called directly from C. Therefore, we don't recommend disabling
the trampoline generation, unless you know that all the trampolines
machine code or byte code instead. More specifically it returns
@code{t} if the function is built-in (a.k.a.@: ``primitive'',
@pxref{What Is a Function}), or byte-compiled (@pxref{Byte
-Compilation}), or natively-compiled (@pxref{Native Compilation}), or
+Compilation}), or native-compiled (@pxref{Native Compilation}), or
a function loaded from a dynamic module (@pxref{Dynamic Modules}).
@end defun
Declaring a function with an incorrect type produces undefined behavior
and could lead to unexpected results or might even crash Emacs when
-natively-compiled code is loaded, if it was compiled with
+native-compiled code is loaded, if it was compiled with
@code{compilation-safety} level of zero (@pxref{compilation-safety}).
Note also that when redefining (or advising) a type-declared function,
the replacement should respect the original signature to avoid such
searching suffixes, @code{load} selects whichever version of a file
(@samp{.elc}, @samp{.el}, etc.)@: has been modified most recently.
In this case, @code{load} doesn't load the @samp{.eln}
-natively-compiled file even if it exists.
+native-compiled file even if it exists.
If @var{filename} is a relative file name, such as @file{foo} or
@file{baz/foo.bar}, @code{load} searches for the file using the variable
Messages like @samp{Loading foo...} and @samp{Loading foo...done} appear
in the echo area during loading unless @var{nomessage} is
-non-@code{nil}. If a natively-compiled @samp{.eln} file is loaded,
+non-@code{nil}. If a native-compiled @samp{.eln} file is loaded,
the message says so.
@cindex load errors
(@pxref{Native Compilation}), then when a @samp{.elc} byte-compiled
file is found by searching @code{load-path}, Emacs will try to look
for a corresponding @samp{.eln} file holding the corresponding
-natively-compiled code. The natively-compiled files are looked up in
+native-compiled code. The native-compiled files are looked up in
the directories listed by the @code{native-comp-eln-load-path}.
@vindex comp-native-version-dir
@defvar native-comp-eln-load-path
This variable holds a list of directories where Emacs looks for
-natively-compiled @samp{.eln} files. File names in the list that are
+native-compiled @samp{.eln} files. File names in the list that are
not absolute are interpreted as relative to @code{invocation-directory}
(@pxref{System Environment}). The last directory in the list is the
system directory, i.e.@: the directory with @samp{.eln} files
line of the "make install" command.
The reason for this new requirement is that Emacs needs to locate at
-startup the directory with its "*.eln" natively-compiled files for the
+startup the directory with its "*.eln" natively compiled files for the
preloaded Lisp packages, and the relative name of that directory needs
therefore to be recorded in the executable as part of the build.
** New function 'compiled-function-p'.
This returns non-nil if its argument is either a built-in, or a
-byte-compiled, or a natively-compiled function object, or a function
+byte-compiled, or a native-compiled function object, or a function
loaded from a dynamic module.
** 'deactivate-mark' can have new value 'dont-save'.
** New function 'string-equal-ignore-case'.
This compares strings ignoring case differences.
-** 'symbol-file' can now report natively-compiled ".eln" files.
+** 'symbol-file' can now report native-compiled ".eln" files.
If Emacs was built with native-compilation enabled, Lisp programs can
now call 'symbol-file' with the new optional 3rd argument non-nil to
request the name of the ".eln" file which defined a given symbol.
"Primitive functions to exclude from trampoline optimization.
Primitive functions included in this list will not be called
-directly by the natively-compiled code, which makes trampolines for
+directly by the native-compiled code, which makes trampolines for
those primitives unnecessary in case of function redefinition/advice."
:type '(repeat symbol)
:version "30.1")
;; Declared Lisp function
(setf type-spec delc-type)
(when (native-comp-function-p f)
- ;; Native compiled inferred
+ ;; Natively compiled inferred
(setf kind 'inferred
type-spec (subr-type f))))))
(when type-spec
collect cstr into positives
finally return (cl-values positives negatives)))
-;; So we can load comp-cstr.el and comp.el in non native compiled
+;; So we can load comp-cstr.el and comp.el in non natively compiled
;; builds.
(defvar comp-ctxt nil)
(declare-function comp-el-to-eln-rel-filename "comp.c")
(defun locate-eln-file (eln-file)
- "Locate a natively-compiled ELN-FILE by searching its load path.
+ "Locate a native-compiled ELN-FILE by searching its load path.
This function looks in directories named by `native-comp-eln-load-path'."
(declare (important-return-value t))
(or (locate-file-internal (concat comp-native-version-dir "/" eln-file)
#endif
#define SETJMP_NAME SETJMP
-/* Max number function importable by native compiled code. */
+/* Max number function importable by native-compiled code. */
#define F_RELOC_MAX_SIZE 1600
typedef struct {
doc: /* If non-nil, compile loaded .elc files asynchronously.
After compilation, each function definition is updated to use the
-natively-compiled one. */);
+natively compiled one. */);
native_comp_jit_compilation = true;
DEFSYM (Qnative_comp_speed, "native-comp-speed");
Vcomp_eln_to_el_h = CALLN (Fmake_hash_table, QCtest, Qequal);
DEFVAR_LISP ("native-comp-eln-load-path", Vnative_comp_eln_load_path,
- doc: /* List of directories to look for natively-compiled *.eln files.
+ doc: /* List of directories to look for native-compiled *.eln files.
The *.eln files are actually looked for in a version-specific
subdirectory of each directory in this list. That subdirectory
Vnative_comp_enable_subr_trampolines,
doc: /* If non-nil, enable generation of trampolines for calling primitives.
Trampolines are needed so that Emacs respects redefinition or advice of
-primitive functions when they are called from Lisp code natively-compiled
+primitive functions when they are called from native-compiled Lisp code
at `native-comp-speed' of 2.
By default, the value is t, and when Emacs sees a redefined or advised
-primitive called from natively-compiled Lisp, it generates a trampoline
+primitive called from native-compiled Lisp, it generates a trampoline
for it on-the-fly.
If the value is a file name (a string), it specifies the directory in
Disabling the generation of trampolines, when a trampoline for a redefined
or advised primitive is not already available from previous compilations,
means that such redefinition or advice will not have effect when calling
-primitives from natively-compiled Lisp code. That is, calls to primitives
-without existing trampolines from natively-compiled Lisp will behave as if
+primitives from native-compiled Lisp code. That is, calls to primitives
+without existing trampolines from native-compiled Lisp will behave as if
the primitive was called directly from C, and will ignore its redefinition
and advice. */);
#endif
DEFUN ("subrp", Fsubrp, Ssubrp, 1, 1, 0,
- doc: /* Return t if OBJECT is a built-in or native compiled Lisp function.
+ doc: /* Return t if OBJECT is a built-in or native-compiled Lisp function.
See also `primitive-function-p' and `native-comp-function-p'. */)
(Lisp_Object object)
}
DEFUN ("native-comp-function-p", Fnative_comp_function_p, Snative_comp_function_p, 1, 1,
- 0, doc: /* Return t if the object is native compiled Lisp function, nil otherwise. */)
+ 0, doc: /* Return t if the object is native-compiled Lisp function, nil otherwise. */)
(Lisp_Object object)
{
return NATIVE_COMP_FUNCTIONP (object) ? Qt : Qnil;
DEFUN ("subr-native-lambda-list", Fsubr_native_lambda_list,
Ssubr_native_lambda_list, 1, 1, 0,
- doc: /* Return the lambda list for a native compiled lisp/d
+ doc: /* Return the lambda list for a native-compiled lisp/d
function or t otherwise. */)
(Lisp_Object subr)
{
if (is_module)
message_with_string ("Loading %s (module)...", file, 1);
else if (is_native_elisp)
- message_with_string ("Loading %s (native compiled elisp)...", file, 1);
+ message_with_string ("Loading %s (native-compiled elisp)...", file, 1);
else if (!compiled)
message_with_string ("Loading %s (source)...", file, 1);
else if (newer)
if (is_module)
message_with_string ("Loading %s (module)...done", file, 1);
else if (is_native_elisp)
- message_with_string ("Loading %s (native compiled elisp)...done", file, 1);
+ message_with_string ("Loading %s (native-compiled elisp)...done", file, 1);
else if (!compiled)
message_with_string ("Loading %s (source)...done", file, 1);
else if (newer)
case RELOC_NATIVE_SUBR:
{
/* When resurrecting from a dump given non all the original
- native compiled subrs may be still around we can't rely on
+ native-compiled subrs may be still around we can't rely on
a 'top_level_run' mechanism, we revive them one-by-one
here. */
struct Lisp_Subr *subr = dump_ptr (dump_base, reloc_offset);
(should (= (funcall f 3) 4))))
(comp-deftest lambda-return2 ()
- "Check a nested lambda function gets native compiled."
+ "Check a nested lambda function gets natively compiled."
(let ((f (comp-tests-lambda-return-f2)))
(should (native-comp-function-p f))
(let ((f2 (funcall f)))