Skip to content

Commit

Permalink
Merge PR #1515 (Release 2023-10: Enigma) into master
Browse files Browse the repository at this point in the history
  • Loading branch information
eugeneia committed Nov 16, 2023
2 parents de5aaa3 + 3205054 commit b7f6934
Show file tree
Hide file tree
Showing 206 changed files with 9,610 additions and 7,698 deletions.
2 changes: 2 additions & 0 deletions lib/luajit/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ script:
- nix-build -A test-O2
- nix-build -A test-O1
- nix-build -A test-nojit
- nix-build -A test-capi
- nix-build -A test-libraptorjit
- nix-build -A check-generated-code --arg check true
8 changes: 4 additions & 4 deletions lib/luajit/COPYRIGHT
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Copyright is retained by the individual authors and contributors.

[ RaptorJIT includes code from LuaJIT 2.1 which has the following statements: ]
===============================================================================
LuaJIT -- a Just-In-Time Compiler for Lua. http://luajit.org/
LuaJIT -- a Just-In-Time Compiler for Lua. https://luajit.org/

Copyright (C) 2005-2017 Mike Pall. All rights reserved.
Copyright (C) 2005-2022 Mike Pall. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -28,7 +28,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

[ MIT license: http://www.opensource.org/licenses/mit-license.php ]
[ MIT license: https://www.opensource.org/licenses/mit-license.php ]

===============================================================================
[ LuaJIT includes code from Lua 5.1/5.2, which has this license statement: ]
Expand Down Expand Up @@ -58,6 +58,6 @@ THE SOFTWARE.

This is a version (aka dlmalloc) of malloc/free/realloc written by
Doug Lea and released to the public domain, as explained at
http://creativecommons.org/licenses/publicdomain
https://creativecommons.org/licenses/publicdomain

===============================================================================
20 changes: 16 additions & 4 deletions lib/luajit/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# For MSVC, please follow the instructions given in src/msvcbuild.bat.
# For MinGW and Cygwin, cd to src and run make with the Makefile there.
#
# Copyright (C) 2005-2017 Mike Pall. See Copyright Notice in luajit.h
# Copyright (C) 2005-2022 Mike Pall. See Copyright Notice in luajit.h
##############################################################################

MAJVER= 1
Expand All @@ -33,10 +33,12 @@ DPREFIX= $(DESTDIR)$(PREFIX)
INSTALL_BIN= $(DPREFIX)/bin
INSTALL_LIB= $(DPREFIX)/$(MULTILIB)
INSTALL_SHARE= $(DPREFIX)/share
INSTALL_INC= $(DPREFIX)/include/raptorjit-$(MAJVER).$(MINVER)
INSTALL_DEFINC= $(DPREFIX)/include/raptorjit-$(MAJVER).$(MINVER)
INSTALL_INC= $(INSTALL_DEFINC)

INSTALL_LJLIBD= $(INSTALL_SHARE)/raptorjit-$(VERSION)
INSTALL_JITLIB= $(INSTALL_LJLIBD)/jit
INSTALL_PKGCONFIG= $(INSTALL_LIB)/pkgconfig

INSTALL_TNAME= raptorjit-$(VERSION)
INSTALL_TSYMNAME= raptorjit
Expand All @@ -47,6 +49,7 @@ INSTALL_SONAME= $(INSTALL_SOSHORT2).$(MINVER).$(RELVER)
INSTALL_DYLIBSHORT1= libraptorjit-$(ABIVER).dylib
INSTALL_DYLIBSHORT2= libraptorjit-$(ABIVER).$(MAJVER).dylib
INSTALL_DYLIBNAME= libraptorjit-$(ABIVER).$(MAJVER).$(MINVER).$(RELVER).dylib
INSTALL_PCNAME= raptorjit.pc

INSTALL_STATIC= $(INSTALL_LIB)/$(INSTALL_ANAME)
INSTALL_DYN= $(INSTALL_LIB)/$(INSTALL_SONAME)
Expand All @@ -66,11 +69,17 @@ SYMLINK= ln -sf
INSTALL_X= install -m 0755
INSTALL_F= install -m 0644
UNINSTALL= $(RM)
LDCONFIG= ldconfig -n
LDCONFIG= ldconfig -n 2>/dev/null
SED_PC= sed -e "s|^prefix=.*|prefix=$(PREFIX)|" \
-e "s|^multilib=.*|multilib=$(MULTILIB)|"
ifneq ($(INSTALL_DEFINC),$(INSTALL_INC))
SED_PC+= -e "s|^includedir=.*|includedir=$(INSTALL_INC)|"
endif

FILE_T= raptorjit
FILE_A= libraptorjit.a
FILE_SO= libraptorjit.so
FILE_PC= raptorjit.pc
FILES_INC= lua.h lualib.h lauxlib.h luaconf.h lua.hpp luajit.h
FILES_JITLIB= bc.lua bcsave.lua vmdef.lua

Expand Down Expand Up @@ -108,9 +117,12 @@ install: $(INSTALL_DEP)
$(RM) $(INSTALL_DYN) $(INSTALL_SHORT1) $(INSTALL_SHORT2)
cd src && test -f $(FILE_SO) && \
$(INSTALL_X) $(FILE_SO) $(INSTALL_DYN) && \
$(LDCONFIG) $(INSTALL_LIB) && \
( $(LDCONFIG) $(INSTALL_LIB) || : ) && \
$(SYMLINK) $(INSTALL_SONAME) $(INSTALL_SHORT1) && \
$(SYMLINK) $(INSTALL_SONAME) $(INSTALL_SHORT2) || :
cd etc && $(SED_PC) $(FILE_PC) > $(FILE_PC).tmp && \
$(INSTALL_F) -D $(FILE_PC).tmp $(INSTALL_PC) && \
$(RM) $(FILE_PC).tmp
cd src && $(INSTALL_F) $(FILES_INC) $(INSTALL_INC)
cd src/jit && $(INSTALL_F) $(FILES_JITLIB) $(INSTALL_JITLIB)
$(SYMLINK) $(INSTALL_TNAME) $(INSTALL_TSYM)
Expand Down
10 changes: 10 additions & 0 deletions lib/luajit/PROFESSIONAL-SUPPORT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Professional support is available to help you use RaptorJIT
successfully. You can contact the parties listed below if you need
help to design your application; to understand the compiler and the
tools; to fix bugs and optimize code; to maintain a port to a new
platform; etc.

Links in alphabetical order with one-sentence summaries:

- [Snabb Solutions](https://snabb.solutions/) offers consulting and standard support agreements for RaptorJIT and related projects.

6 changes: 3 additions & 3 deletions lib/luajit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The most notable technical changes since forking LuaJIT are:
support, 32-bit heap support, and non-x86 backends. This is a
necessary short-term expedient to make the code maintainable while
we bootstrap the project.
- Compiler heursitics tightened to reduce the risk of bytecode
- Compiler heuristics tightened to reduce the risk of bytecode
blacklisting causing catastrophic performance drops.
- Started using `git merge` to accept contributions of both code and
development history from other forks.
Expand Down Expand Up @@ -173,7 +173,7 @@ These are the authoritative optimization resources for processors
supported by RaptorJIT. If you are confused by references to CPU
details in discussions then these are the places to look for answers.

- [Computer Architecture: A Quantitiave Approach](https://www.amazon.com/Computer-Architecture-Fifth-Quantitative-Approach/dp/012383872X) by Hennessy and Patterson.
- [Computer Architecture: A Quantitative Approach](https://www.amazon.com/Computer-Architecture-Fifth-Quantitative-Approach/dp/012383872X) by Hennessy and Patterson.
- [Intel Architectures Optimization Reference Manual](http://www.intel.com/content/www/us/en/architecture-and-technology/64-ia-32-architectures-optimization-manual.html).
- Agner Fog's [software optimization resources](http://www.agner.org/optimize/):
- [Instruction latency and throughput tables](http://www.agner.org/optimize/instruction_tables.pdf).
Expand All @@ -191,7 +191,7 @@ Here are some borrowed words to put this branch into context:
> Optimal code is not optimal to maintain. _[Vyacheslav Egorov](https://www.youtube.com/watch?v=EaLboOUG9VQ)_
> If a programmer is indispensible, get rid of him as quickly as possible. _[Gerald M. Weinberg](https://www.amazon.com/Psychology-Computer-Programming-Silver-Anniversary/dp/0932633420)_
> If a programmer is indispensable, get rid of him as quickly as possible. _[Gerald M. Weinberg](https://www.amazon.com/Psychology-Computer-Programming-Silver-Anniversary/dp/0932633420)_
> If a system is to serve the creative spirit, it
> must be entirely comprehensible to a single individual. _[Dan
Expand Down
5 changes: 5 additions & 0 deletions lib/luajit/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ let
raptorjit-assert = raptorjit.overrideAttrs(
old: { NIX_CFLAGS_COMPILE = " -DLUA_USE_ASSERT"; });
test = name: args: (callPackage ./test.nix { inherit name args; raptorjit = raptorjit-assert; });
test-capi = callPackage ./test-capi.nix { inherit pkgs raptorjit; };
test-libraptorjit = callPackage ./test-libraptorjit.nix { inherit pkgs raptorjit; };
check-generated-code = (callPackage ./check-generated-code.nix { inherit raptorjit; });
nowarnings = raptorjit.overrideAttrs(
old: { NIX_CFLAGS_COMPILE = "-Werror"; });
Expand All @@ -26,10 +28,13 @@ in
# Build RaptorJIT and run multiple test suites.
{
raptorjit = raptorjit;
raptorjit-assert = raptorjit-assert;
test-O3 = test "O3" "-O3";
test-O2 = test "O2" "-O2";
test-O1 = test "O1" "-O1";
test-nojit = test "nojit" "-joff";
test-capi = test-capi;
test-libraptorjit = test-libraptorjit;
# Test that generated bytecode is compatible
test-bytecode-compat = pkgs.runCommand "test-bytecode-compat"
{ buildInputs = [ raptorjit ]; }
Expand Down
2 changes: 1 addition & 1 deletion lib/luajit/doc/bluequad-print.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (C) 2004-2017 Mike Pall.
/* Copyright (C) 2004-2022 Mike Pall.
*
* You are welcome to use the general ideas of this design for your own sites.
* But please do not steal the stylesheet, the layout or the color scheme.
Expand Down
2 changes: 1 addition & 1 deletion lib/luajit/doc/bluequad.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (C) 2004-2017 Mike Pall.
/* Copyright (C) 2004-2022 Mike Pall.
*
* You are welcome to use the general ideas of this design for your own sites.
* But please do not steal the stylesheet, the layout or the color scheme.
Expand Down
Loading

0 comments on commit b7f6934

Please sign in to comment.