* libguile/lightning/lib/lightning.c (_jit_emit): The default code
allocator will simply mmap a code buffer, try to emit into that
buffer, and if it fails, try again with a larger buffer. However the
buffer size starts at 0, for some reason. Why? I can't see the
reason. Change the default to 4096. In the future we will need to
implement our own allocator anyway so that we can pack multiple JIT
runs in one page.
* libguile/Makefile.am (AM_CPPFLAGS):
(libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES): If ENABLE_JIT, build
lightning.
(EXTRA_DIST): Add lightning files.
* libguile/lightning/lightning.am (lightning_extra_files): Add COPYING
and related files to the dist.
* libguile/jit.c:
* libguile/jit.h: New files.
* libguile/lightning/configure.ac: Start trimming down for inclusion in
configure.ac. Remove check for getopt things; we don't include bits
of lightning that use getopt. Remove check for stdint, as we will have
it.
* libguile/lightning/include/lightning.h: Unconditionally include
stdint.h.
* libguile/lightning/Makefile.am:
* libguile/lightning/lib/Makefile.am: Remove.
* libguile/lightning/lightning.am: Add all the C and H files here.
* libguile/lightning/configure.ac: Remove AC_OUTPUT clause.
* libguile/lightning/lightning.am: New file. libguile will include
this. Contents initially from include/Makefile.am and
include/lightning/Makefile.am.
* libguile/lightning/include/Makefile.am:
* libguile/lightning/include/lightning/Makefile.am: Remove.
* libguile/lightning/configure.ac: Remove output of include Makefiles.
* libguile/lightning/configure.ac:
* libguile/lightning/Makefile.am:
* libguile/lightning/check: Remove unit tests. If there is a problem
with lightning on this target, users should check if the upstream tests
pass. Otherwise we will find errors via the Guile test suite.
* libguile/lightning/: New directory, made by the following commands:
git remote add lightning https://git.savannah.gnu.org/git/lightning.git
git merge -s ours --no-commit --allow-unrelated-histories lightning/master
git read-tree --prefix=libguile/lightning/ -u lightning/master
In theory we will be able to update via:
git merge -s subtree lightning/master