1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-22 20:42:26 -08:00
emacs/doc/lispref
Philipp Stephani 096be9c454 Change module interface to no longer use GMP objects directly.
As described in the new comment added to emacs-module.c, using GMP
directly in the module interface has significant downsides: it couples
the module interface directly to the implementation and requires
module authors to link their module against the same GMP library as
Emacs itself, which is often difficult and an unnecessary burden.  By
picking a representation for the magnitude that often matches the one
used by GMP, we can avoid overhead when converting from and to GMP in
most cases.

Loading the test module in test/data/emacs-module and evaluating

(dotimes (_ 10000)
  (mod-test-double (* 2 most-negative-fixnum)))

under Callgrind shows that on my (GNU/Linux) machine Emacs only spends
10% of the CPU time of mod-test-double in mpz_import and mpz_export
combined, even though that function does little else.  (By contrast,
30% is spent in allocate_pseudovector.)

* src/emacs-module.h.in: Don't check EMACS_MODULE_GMP.  Don't include
gmp.h.  Remove emacs_mpz structure.  Instead, define type alias
emacs_limb_t and macro EMACS_LIMB_MAX.

* src/module-env-27.h: Change interface of extract_big_integer and
make_big_integer to take a sign-magnitude representation instead of
mpz_t.

* src/emacs-module.c: Don't check EMACS_MODULE_GMP or
EMACS_MODULE_HAVE_MPZ_T.  Add a comment about the chosen
implementation.
(module_extract_big_integer, module_make_big_integer): Reimplement
without using mpz_t in the interface.

* doc/lispref/internals.texi (Module Values): Adapt function
documentation and example.  Stop mentioning GMP and EMACS_MODULE_GMP.

* test/data/emacs-module/mod-test.c: Don't define EMACS_MODULE_GMP or
EMACS_MODULE_HAVE_MPZ_T.
(memory_full, extract_big_integer, make_big_integer): New helper
functions, identical to example in the Info documentation.
(Fmod_test_nanoseconds, Fmod_test_double): Adapt to new interface.
2019-12-04 21:17:10 +01:00
..
abbrevs.texi Merge from origin/emacs-26 2019-02-20 12:07:22 -08:00
anti.texi Update copyright year to 2019 2019-01-01 01:01:13 +00:00
back.texi Update copyright year to 2019 2019-01-01 01:01:13 +00:00
backups.texi Update copyright year to 2019 2019-01-01 01:01:13 +00:00
book-spine.texi
buffers.texi Merge from origin/emacs-26 2019-03-09 10:07:46 -08:00
ChangeLog.1 Update copyright year to 2019 2019-01-01 01:01:13 +00:00
commands.texi Mouse rectangular region selection (bug#38013) 2019-11-27 13:40:29 +01:00
compile.texi Add the new macro with-suppressed-warnings 2019-06-12 15:59:19 +02:00
control.texi Add conditional operator xor to subr.el 2019-08-06 13:38:47 +02:00
customize.texi Document :match-inline widget elements 2019-10-12 06:40:49 +02:00
debugging.texi Add new macro `benchmark-progn' 2019-10-15 08:19:14 +02:00
display.texi message uses minibuffer-message in the active minibuffer (bug#17272 bug#19064) 2019-11-27 01:43:49 +02:00
doclicense.texi
edebug.texi Make it clear what edebug-remove-instrumentation offers 2019-11-16 05:27:37 +01:00
elisp.texi Conditionally omit edition numbers, dates in doc 2019-11-12 11:30:02 -08:00
errors.texi Overflow errors are range errors 2019-11-04 23:39:55 -08:00
eval.texi Backport: Improve pure and side-effect-free docs 2019-04-22 16:14:33 +01:00
files.texi ; Add @cindex in files.texi for "temporary file on a remote host" 2019-11-01 10:36:26 +01:00
frames.texi Improve indexing of ELisp manual 2019-09-28 22:09:11 +03:00
functions.texi Improve indexing of function doc string conventions 2019-11-15 11:42:11 +02:00
gpl.texi
hash.texi Avoid overexposing fixnums for hash codes 2019-07-22 21:28:18 -07:00
help.texi Update copyright year to 2019 2019-01-01 01:01:13 +00:00
hooks.texi Mention quit-window-hook in "Standard Hooks" 2019-08-21 13:21:52 -07:00
index.texi
internals.texi Change module interface to no longer use GMP objects directly. 2019-12-04 21:17:10 +01:00
intro.texi Merge from origin/emacs-26 2018-12-31 17:57:29 -08:00
keymaps.texi Use 'C-x t' for tab-prefix-map instead of 'C-x 6' still used by 2C-mode-map. 2019-10-20 01:06:38 +03:00
lay-flat.texi Update copyright year to 2019 2019-01-01 01:01:13 +00:00
lists.texi Minor copyedits in ELisp manual 2019-11-08 11:55:36 +02:00
loading.texi Merge from origin/emacs-26 2019-05-22 10:18:51 -07:00
macros.texi Update copyright year to 2019 2019-01-01 01:01:13 +00:00
Makefile.in Merge from origin/emacs-26 2018-12-31 17:57:29 -08:00
maps.texi Use 'C-x t' for tab-prefix-map instead of 'C-x 6' still used by 2C-mode-map. 2019-10-20 01:06:38 +03:00
markers.texi Update copyright year to 2019 2019-01-01 01:01:13 +00:00
minibuf.texi Fix recent documentation changes 2019-11-14 12:25:10 +02:00
modes.texi Improve errors & warnings due to fancy quoted vars (Bug#32939) 2019-11-28 18:10:07 -05:00
nonascii.texi Fix with-coding-priority markup in Elisp manual 2019-10-13 16:40:23 +01:00
numbers.texi Document Lisp floats a bit better 2019-11-10 15:04:20 -08:00
objects.texi Improve errors & warnings due to fancy quoted vars (Bug#32939) 2019-11-28 18:10:07 -05:00
os.texi Improve time documentation a bit more 2019-11-03 17:38:33 -08:00
package.texi Avoid changing value of defcustom package-enable-at-startup 2019-11-06 01:19:23 +01:00
positions.texi Remove no-longer relevant xref 2019-07-31 08:33:28 -04:00
processes.texi Extend network-interface-list to return IPv6 and network info 2019-11-26 08:46:13 +01:00
README Update copyright year to 2019 2019-01-01 01:01:13 +00:00
records.texi Update copyright year to 2019 2019-01-01 01:01:13 +00:00
searching.texi Expand rx definitions inside (not ...) 2019-10-27 09:54:54 +01:00
sequences.texi Merge from origin/emacs-26 2019-05-22 10:18:51 -07:00
spellfile Update lispref spellfile 2019-06-04 08:34:16 -07:00
streams.texi Merge from origin/emacs-26 2018-12-31 17:57:29 -08:00
strings.texi Support "%x" etc. formats on more floats 2019-07-23 01:46:41 -07:00
symbols.texi Inhibit undo-in-region for mouse-drag-region (bug#37700) 2019-10-31 17:41:29 +01:00
syntax.texi Document syntax-ppss-context 2019-06-24 00:04:04 +02:00
text.texi Inhibit undo-in-region for mouse-drag-region (bug#37700) 2019-10-31 17:41:29 +01:00
threads.texi Merge from origin/emacs-26 2018-12-31 17:57:29 -08:00
tips.texi ; Minor copyedits in a recent ELisp manual change. 2019-10-13 10:59:18 +03:00
two-volume-cross-refs.txt Update copyright year to 2019 2019-01-01 01:01:13 +00:00
two-volume.make Update copyright year to 2019 2019-01-01 01:01:13 +00:00
variables.texi Improve documentation of 'add-variable-watcher' 2019-11-15 11:16:09 +02:00
windows.texi 2019-11-26 Martin Rudalics <rudalics@gmx.at> 2019-11-26 10:13:12 +01:00

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Copyright (C) 2001-2019 Free Software Foundation, Inc.  -*- outline -*-
See the end of the file for license conditions.


README for the Emacs Lisp Reference Manual.

* This directory contains the texinfo source files for the Emacs Lisp
Reference Manual.

* Report bugs in the Lisp Manual (or in Emacs) using M-x report-emacs-bug.
To ask questions, use the help-gnu-emacs mailing list.

* The Emacs Lisp Reference Manual is quite large.  It totals around
1100 pages in smallbook format; the info files total around 3.0 megabytes.

* You can format this manual for Info, for printing hardcopy using TeX,
or for HTML.

* You can buy nicely printed copies from the Free Software Foundation.
Buying a manual from the Free Software Foundation helps support our GNU
development work.  See <https://shop.fsf.org/>.
(At time of writing, this manual is out of print.)

* The master file for formatting this manual for Tex is called 'elisp.texi'.
It contains @include commands to include all the chapters that make up
the manual.

* This distribution contains a Makefile that you can use with GNU Make.

** To make an Info file, you need to install Texinfo, then run 'make info'.

** Use 'make elisp.pdf' or 'make elisp.html' to create PDF or HTML versions.


This file is part of GNU Emacs.

GNU Emacs is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

GNU Emacs is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.