From c19899ad338895f9856c5bbbe1241bbd734a7cd8 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 24 Aug 2022 09:54:47 +0200 Subject: [PATCH 01/27] Update to latest luajit v2.1 git version --- luajit-2.1-fedora.patch | 87 +- luajit-2.1-update.patch | 4869 ++++++++++++++++++++++++++++++--------- luajit.spec | 5 +- 3 files changed, 3818 insertions(+), 1143 deletions(-) diff --git a/luajit-2.1-fedora.patch b/luajit-2.1-fedora.patch index e84dfa1..d98f5dd 100644 --- a/luajit-2.1-fedora.patch +++ b/luajit-2.1-fedora.patch @@ -1,4 +1,4 @@ -From 86a1a5033a3eb07e694f8e7f7024550928191024 Mon Sep 17 00:00:00 2001 +From d5b06e912851816bed265905f4d86d82b78f26ab Mon Sep 17 00:00:00 2001 From: Siddhesh Poyarekar Date: Thu, 21 Oct 2021 11:04:58 +0200 Subject: [PATCH 01/10] Merge in LuaJIT-test-cleanup into the main repo @@ -530,10 +530,10 @@ index 00000000..a1c9209b +Vlad Krasnov +William Adams diff --git a/Makefile b/Makefile -index aa1b84bd..cb2b3418 100644 +index b0288b4d..b3c88f23 100644 --- a/Makefile +++ b/Makefile -@@ -106,14 +106,14 @@ endif +@@ -110,14 +110,14 @@ endif ############################################################################## @@ -551,7 +551,7 @@ index aa1b84bd..cb2b3418 100644 @echo "==== Installing LuaJIT $(VERSION) to $(PREFIX) ====" $(MKDIR) $(INSTALL_DIRS) cd src && $(INSTALL_X) $(FILE_T) $(INSTALL_T) -@@ -152,6 +152,17 @@ uninstall: +@@ -156,6 +156,17 @@ uninstall: $(RMDIR) $(UNINSTALL_DIRS) || : @echo "==== Successfully uninstalled LuaJIT $(VERSION) from $(PREFIX) ====" @@ -569,7 +569,7 @@ index aa1b84bd..cb2b3418 100644 ############################################################################## amalg: -@@ -161,6 +172,6 @@ amalg: +@@ -165,6 +176,6 @@ amalg: clean: $(MAKE) -C src clean @@ -188575,10 +188575,10 @@ index 00000000..ef4de129 +-- Pointless: deg, rad, min, max, pow +-- LATER: %, fmod, frexp, ldexp, modf, sinh, cosh, tanh -- -2.31.1 +2.37.1 -From 6508eeb5c841344e3f128267a04e8150dd36f926 Mon Sep 17 00:00:00 2001 +From 78914a298dbadaa30613df89d94b8dddb1b64d03 Mon Sep 17 00:00:00 2001 From: Sameera Deshpande Date: Fri, 15 Feb 2019 07:46:16 +0530 Subject: [PATCH 02/10] Add support for FNMADD and FNMSUB. @@ -188588,7 +188588,7 @@ Subject: [PATCH 02/10] Add support for FNMADD and FNMSUB. 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/src/lj_asm_arm64.h b/src/lj_asm_arm64.h -index 67c53ee2..0e913fa5 100644 +index 1f44d023..dd3d1408 100644 --- a/src/lj_asm_arm64.h +++ b/src/lj_asm_arm64.h @@ -353,6 +353,35 @@ static int asm_fusemadd(ASMState *as, IRIns *ir, A64Ins ai, A64Ins air) @@ -188638,10 +188638,10 @@ index 67c53ee2..0e913fa5 100644 } asm_intneg(as, ir); -- -2.31.1 +2.37.1 -From aa0b2a0c837af307d26468fce05a7c24ab6045d3 Mon Sep 17 00:00:00 2001 +From 84e0677c95af42b1ccfa6f55a572880d93854026 Mon Sep 17 00:00:00 2001 From: Vivien HENRIET Date: Wed, 30 Jan 2019 23:44:51 +0100 Subject: [PATCH 03/10] Fix os.date() for timezone change awareness @@ -188663,7 +188663,7 @@ To fix the issue tzset is called before localtime_r. 1 file changed, 1 insertion(+) diff --git a/src/lib_os.c b/src/lib_os.c -index f19b831c..609cb2ec 100644 +index 6bcd0147..4b4e1503 100644 --- a/src/lib_os.c +++ b/src/lib_os.c @@ -185,6 +185,7 @@ LJLIB_CF(os_date) @@ -188675,10 +188675,10 @@ index f19b831c..609cb2ec 100644 #else stm = localtime(&t); -- -2.31.1 +2.37.1 -From a62dc6306c4e5a4b672040067c169143da804a4f Mon Sep 17 00:00:00 2001 +From c874fa39e227ce3a8f33820b7d5046779b690fb4 Mon Sep 17 00:00:00 2001 From: Siddhesh Poyarekar Date: Thu, 14 Mar 2019 23:08:24 +0530 Subject: [PATCH 04/10] Revert "FFI: Make FP to U64 conversions match JIT @@ -188700,10 +188700,10 @@ making things worse. There needs to be a better fix for this. 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/src/lj_obj.h b/src/lj_obj.h -index 1a6445fc..97885683 100644 +index 67e41181..ad9dba5d 100644 --- a/src/lj_obj.h +++ b/src/lj_obj.h -@@ -995,22 +995,14 @@ static LJ_AINLINE int32_t lj_num2bit(lua_Number n) +@@ -996,22 +996,14 @@ static LJ_AINLINE int32_t lj_num2bit(lua_Number n) #define lj_num2int(n) ((int32_t)(n)) @@ -188732,10 +188732,10 @@ index 1a6445fc..97885683 100644 static LJ_AINLINE int32_t numberVint(cTValue *o) -- -2.31.1 +2.37.1 -From fe2399a76bab67b32409fda1de82c34e8d5d7904 Mon Sep 17 00:00:00 2001 +From f452a25f4daf8c20fb09f42624881a127ee6f335 Mon Sep 17 00:00:00 2001 From: Siddhesh Poyarekar Date: Sun, 17 Mar 2019 11:34:04 +0530 Subject: [PATCH 05/10] Guard against undefined behaviour when casting from @@ -188751,10 +188751,10 @@ TODO: Do the same for JIT as well as for float to other ranges. 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lj_obj.h b/src/lj_obj.h -index 97885683..9878059f 100644 +index ad9dba5d..cbfa67c3 100644 --- a/src/lj_obj.h +++ b/src/lj_obj.h -@@ -997,12 +997,18 @@ static LJ_AINLINE int32_t lj_num2bit(lua_Number n) +@@ -998,12 +998,18 @@ static LJ_AINLINE int32_t lj_num2bit(lua_Number n) static LJ_AINLINE uint64_t lj_num2u64(lua_Number n) { @@ -188775,10 +188775,10 @@ index 97885683..9878059f 100644 static LJ_AINLINE int32_t numberVint(cTValue *o) -- -2.31.1 +2.37.1 -From c193115e16a138dac69f774a7f57a5b4cc7f1097 Mon Sep 17 00:00:00 2001 +From 47e6173d38bd0a20847ebce22dd67ba7a0e82f5c Mon Sep 17 00:00:00 2001 From: Siddhesh Poyarekar Date: Mon, 25 Mar 2019 17:56:53 +0530 Subject: [PATCH 06/10] Fix build erro with fnmsub fusing @@ -188788,7 +188788,7 @@ Subject: [PATCH 06/10] Fix build erro with fnmsub fusing 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lj_asm_arm64.h b/src/lj_asm_arm64.h -index 0e913fa5..4c7bf401 100644 +index dd3d1408..1061b7d0 100644 --- a/src/lj_asm_arm64.h +++ b/src/lj_asm_arm64.h @@ -1495,7 +1495,7 @@ static void asm_mul(ASMState *as, IRIns *ir) @@ -188801,10 +188801,10 @@ index 0e913fa5..4c7bf401 100644 return; } -- -2.31.1 +2.37.1 -From b5c2492406bf07ab80e134f351c1066e8f6224f2 Mon Sep 17 00:00:00 2001 +From 9cae182f30be1bbab4defb9f1b9f848555a14522 Mon Sep 17 00:00:00 2001 From: Siddhesh Poyarekar Date: Thu, 28 Mar 2019 09:19:34 +0530 Subject: [PATCH 07/10] aarch64: better float to unsigned int conversion @@ -188826,7 +188826,7 @@ This currently works only for 64-bit conversions, 32-bit is still WIP. 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/src/lj_asm_arm64.h b/src/lj_asm_arm64.h -index 4c7bf401..e7e744a8 100644 +index 1061b7d0..1b0a82a8 100644 --- a/src/lj_asm_arm64.h +++ b/src/lj_asm_arm64.h @@ -626,14 +626,28 @@ static void asm_conv(ASMState *as, IRIns *ir) @@ -188867,7 +188867,7 @@ index 4c7bf401..e7e744a8 100644 } else if (st >= IRT_I8 && st <= IRT_U16) { /* Extend to 32 bit integer. */ Reg dest = ra_dest(as, ir, RSET_GPR); diff --git a/src/lj_target_arm64.h b/src/lj_target_arm64.h -index 6d39ffb8..370699d9 100644 +index d45af2e4..7051e1d1 100644 --- a/src/lj_target_arm64.h +++ b/src/lj_target_arm64.h @@ -283,6 +283,7 @@ typedef enum A64Ins { @@ -188879,10 +188879,10 @@ index 6d39ffb8..370699d9 100644 A64I_FCSELd = 0x1e600c00, A64I_FRINTMd = 0x1e654000, -- -2.31.1 +2.37.1 -From bd79b1d4596ed6780470c8d02f77b8398d80cd3a Mon Sep 17 00:00:00 2001 +From d3bd1eb4f097422e8f225af848d713faaba7a6a6 Mon Sep 17 00:00:00 2001 From: Siddhesh Poyarekar Date: Thu, 28 Mar 2019 10:50:23 +0530 Subject: [PATCH 08/10] Better behaviour for float to uint32_t conversions @@ -188900,7 +188900,7 @@ during the narrowing pass. 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lj_cconv.c b/src/lj_cconv.c -index 613f66e2..7e8a8b92 100644 +index 3bbfd3f1..35efe3c9 100644 --- a/src/lj_cconv.c +++ b/src/lj_cconv.c @@ -203,7 +203,13 @@ void lj_cconv_ct_ct(CTState *cts, CType *d, CType *s, @@ -188919,10 +188919,10 @@ index 613f66e2..7e8a8b92 100644 if (!(dinfo & CTF_UNSIGNED)) *(int64_t *)dp = (int64_t)n; -- -2.31.1 +2.37.1 -From a1636c6e1879b5eeb55a51ebba796501c93614dd Mon Sep 17 00:00:00 2001 +From a745c003a562ee8392346953214951cf62bfba85 Mon Sep 17 00:00:00 2001 From: Siddhesh Poyarekar Date: Mon, 17 Jun 2019 13:50:57 +0530 Subject: [PATCH 09/10] test: Check for package.searchers only in compat5.2 @@ -188955,10 +188955,10 @@ index 2baacd5c..09866f6f 100644 assert(not package.loaders) assert(package.searchers) -- -2.31.1 +2.37.1 -From ec04137a0873c09eef216b32f3df3b66209f47d5 Mon Sep 17 00:00:00 2001 +From e11f638adbb95f3975d4f5c0fa610cff43d9a434 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Thu, 19 Nov 2015 16:29:02 +0200 Subject: [PATCH 10/10] Get rid of LUAJIT_VERSION_SYM that changes ABI on every @@ -188966,12 +188966,12 @@ Subject: [PATCH 10/10] Get rid of LUAJIT_VERSION_SYM that changes ABI on every --- src/lj_dispatch.c | 5 ----- - src/luajit.c | 2 -- + src/luajit.c | 1 - src/luajit.h | 3 --- - 3 files changed, 10 deletions(-) + 3 files changed, 9 deletions(-) diff --git a/src/lj_dispatch.c b/src/lj_dispatch.c -index 7b73d3dd..3f69d0d1 100644 +index ded382aa..62e5a15b 100644 --- a/src/lj_dispatch.c +++ b/src/lj_dispatch.c @@ -318,11 +318,6 @@ int luaJIT_setmode(lua_State *L, int idx, int mode) @@ -188987,20 +188987,19 @@ index 7b73d3dd..3f69d0d1 100644 /* This function can be called asynchronously (e.g. during a signal). */ diff --git a/src/luajit.c b/src/luajit.c -index 6aed5337..a4a11cb1 100644 +index 6dd64026..9c0b5767 100644 --- a/src/luajit.c +++ b/src/luajit.c -@@ -518,8 +518,6 @@ static int pmain(lua_State *L) +@@ -515,7 +515,6 @@ static int pmain(lua_State *L) + int argn; + int flags = 0; globalL = L; - if (argv[0] && argv[0][0]) progname = argv[0]; - - LUAJIT_VERSION_SYM(); /* Linker-enforced version check. */ -- + argn = collectargs(argv, &flags); if (argn < 0) { /* Invalid args? */ - print_usage(); diff --git a/src/luajit.h b/src/luajit.h -index 2ee1f908..04f6b456 100644 +index 31f1eb1f..54a40ac3 100644 --- a/src/luajit.h +++ b/src/luajit.h @@ -73,7 +73,4 @@ LUA_API void luaJIT_profile_stop(lua_State *L); @@ -189012,5 +189011,5 @@ index 2ee1f908..04f6b456 100644 - #endif -- -2.31.1 +2.37.1 diff --git a/luajit-2.1-update.patch b/luajit-2.1-update.patch index 93fa207..24354bc 100644 --- a/luajit-2.1-update.patch +++ b/luajit-2.1-update.patch @@ -1,5 +1,5 @@ diff --git a/COPYRIGHT b/COPYRIGHT -index 6ed40025..9c2bca55 100644 +index 6ed40025..c74216c3 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -1,7 +1,7 @@ @@ -8,7 +8,7 @@ index 6ed40025..9c2bca55 100644 +LuaJIT -- a Just-In-Time Compiler for Lua. https://luajit.org/ -Copyright (C) 2005-2017 Mike Pall. All rights reserved. -+Copyright (C) 2005-2021 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 @@ -30,7 +30,7 @@ index 6ed40025..9c2bca55 100644 =============================================================================== diff --git a/Makefile b/Makefile -index 0f933089..aa1b84bd 100644 +index 0f933089..b0288b4d 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ @@ -38,11 +38,21 @@ index 0f933089..aa1b84bd 100644 # 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-2021 Mike Pall. See Copyright Notice in luajit.h ++# Copyright (C) 2005-2022 Mike Pall. See Copyright Notice in luajit.h ############################################################################## MAJVER= 2 -@@ -75,7 +75,7 @@ SYMLINK= ln -sf +@@ -33,7 +33,8 @@ DPREFIX= $(DESTDIR)$(PREFIX) + INSTALL_BIN= $(DPREFIX)/bin + INSTALL_LIB= $(DPREFIX)/$(MULTILIB) + INSTALL_SHARE= $(DPREFIX)/share +-INSTALL_INC= $(DPREFIX)/include/luajit-$(MAJVER).$(MINVER) ++INSTALL_DEFINC= $(DPREFIX)/include/luajit-$(MAJVER).$(MINVER) ++INSTALL_INC= $(INSTALL_DEFINC) + + INSTALL_LJLIBD= $(INSTALL_SHARE)/luajit-$(VERSION) + INSTALL_JITLIB= $(INSTALL_LJLIBD)/jit +@@ -75,9 +76,12 @@ SYMLINK= ln -sf INSTALL_X= install -m 0755 INSTALL_F= install -m 0644 UNINSTALL= $(RM) @@ -50,8 +60,13 @@ index 0f933089..aa1b84bd 100644 +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 -@@ -121,7 +121,7 @@ install: $(INSTALL_DEP) + FILE_T= luajit + FILE_A= libluajit.a +@@ -121,7 +125,7 @@ install: $(INSTALL_DEP) $(RM) $(INSTALL_DYN) $(INSTALL_SHORT1) $(INSTALL_SHORT2) cd src && test -f $(FILE_SO) && \ $(INSTALL_X) $(FILE_SO) $(INSTALL_DYN) && \ @@ -61,7 +76,7 @@ index 0f933089..aa1b84bd 100644 $(SYMLINK) $(INSTALL_SONAME) $(INSTALL_SHORT2) || : cd etc && $(INSTALL_F) $(FILE_MAN) $(INSTALL_MAN) diff --git a/README b/README -index 2b9ae9d2..c9f7d9ad 100644 +index 2b9ae9d2..1faef255 100644 --- a/README +++ b/README @@ -3,9 +3,9 @@ README for LuaJIT 2.1.0-beta3 @@ -72,27 +87,27 @@ index 2b9ae9d2..c9f7d9ad 100644 +Project Homepage: https://luajit.org/ -LuaJIT is Copyright (C) 2005-2017 Mike Pall. -+LuaJIT is Copyright (C) 2005-2021 Mike Pall. ++LuaJIT is Copyright (C) 2005-2022 Mike Pall. LuaJIT is free software, released under the MIT license. See full Copyright Notice in the COPYRIGHT file or in luajit.h. diff --git a/doc/bluequad-print.css b/doc/bluequad-print.css -index 62e1c165..0b385cee 100644 +index 62e1c165..a49d309f 100644 --- a/doc/bluequad-print.css +++ b/doc/bluequad-print.css @@ -1,4 +1,4 @@ -/* Copyright (C) 2004-2017 Mike Pall. -+/* Copyright (C) 2004-2021 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. diff --git a/doc/bluequad.css b/doc/bluequad.css -index be2c4bf2..86cd9ac0 100644 +index be2c4bf2..4c1a9082 100644 --- a/doc/bluequad.css +++ b/doc/bluequad.css @@ -1,4 +1,4 @@ -/* Copyright (C) 2004-2017 Mike Pall. -+/* Copyright (C) 2004-2021 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. @@ -986,7 +1001,7 @@ index a66a8d95..00000000 - - diff --git a/doc/contact.html b/doc/contact.html -index fe4751c0..c253a08b 100644 +index fe4751c0..89c1af95 100644 --- a/doc/contact.html +++ b/doc/contact.html @@ -1,17 +1,16 @@ @@ -999,7 +1014,7 @@ index fe4751c0..c253a08b 100644 - - + -+ ++ @@ -1066,7 +1081,7 @@ index fe4751c0..c253a08b 100644

All documentation is -Copyright © 2005-2017 Mike Pall. -+Copyright © 2005-2021 Mike Pall. ++Copyright © 2005-2022 Mike Pall.

@@ -1075,22 +1090,22 @@ index fe4751c0..c253a08b 100644 +
+@@ -161,7 +157,7 @@ call the binding function. Phew! +

Motivating Example: Using C Data Structures

+

+ The FFI library allows you to create and access C data +-structures. Of course the main use for this is for interfacing with ++structures. Of course, the main use for this is for interfacing with + C functions. But they can be used stand-alone, too. +

+

+@@ -173,7 +169,7 @@ implemented with a big table holding lots of tiny tables. This imposes + both a substantial memory overhead as well as a performance overhead. +

+

+-Here's a sketch of a library that operates on color images plus a ++Here's a sketch of a library that operates on color images, plus a + simple benchmark. First, the plain Lua version: +

+
+@@ -188,7 +184,7 @@ local function image_ramp_green(n)
+   return img
+ end
+ 
+-local function image_to_grey(img, n)
++local function image_to_gray(img, n)
+   for i=1,n do
+     local y = floor(0.3*img[i].red + 0.59*img[i].green + 0.11*img[i].blue)
+     img[i].red = y; img[i].green = y; img[i].blue = y
+@@ -198,14 +194,14 @@ end
+ local N = 400*400
+ local img = image_ramp_green(N)
+ for i=1,1000 do
+-  image_to_grey(img, N)
++  image_to_gray(img, N)
+ end
+ 
+

+ This creates a table with 160.000 pixels, each of which is a table +-holding four number values in the range of 0-255. First an image with ++holding four number values in the range of 0-255. First, an image with + a green ramp is created (1D for simplicity), then the image is +-converted to greyscale 1000 times. Yes, that's silly, but I was in ++converted to grayscale 1000 times. Yes, that's silly, but I was in + need of a simple example ... +

+

+@@ -312,7 +308,7 @@ be more compact and faster. This is certainly true (by a factor of + ~1.7x). Switching to a struct-of-arrays would help, too. +

+

+-However the resulting code would be less idiomatic and rather ++However, the resulting code would be less idiomatic and rather + error-prone. And it still doesn't get even close to the performance of + the FFI version of the code. Also, high-level data structures cannot + be easily passed to other C functions, especially I/O functions, @@ -322,7 +318,7 @@ without undue conversion penalties.

-@@ -261,7 +257,7 @@ contents of an __index table (if any) may be modified +@@ -125,7 +121,7 @@ separated by semicolons. The trailing semicolon for a single + declaration may be omitted. +

+

+-Please note that external symbols are only declared, but they ++Please note, that external symbols are only declared, but they + are not bound to any specific address, yet. Binding is + achieved with C library namespaces (see below). +

+@@ -213,7 +209,7 @@ parse the cdecl only once and get its ctype with + ffi.typeof(). Then use the ctype as a constructor repeatedly. +

+

+-Please note that an anonymous struct declaration implicitly ++Please note, that an anonymous struct declaration implicitly + creates a new and distinguished ctype every time you use it for + ffi.new(). This is probably not what you want, + especially if you create more than one cdata object. Different anonymous +@@ -260,12 +256,12 @@ afterwards. Neither the contents of the metatable nor the + contents of an __index table (if any) may be modified afterwards. The associated metatable automatically applies to all uses of this type, no matter how the objects are created or where they - originate from. Note that pre-defined operations on types have +-originate from. Note that pre-defined operations on types have -precedence (e.g. declared field names cannot be overriden). ++originate from. Note that predefined operations on types have +precedence (e.g. declared field names cannot be overridden).

All standard Lua metamethods are implemented. These are called directly, +-without shortcuts and on any mix of types. For binary operations, the ++without shortcuts, and on any mix of types. For binary operations, the + left operand is checked first for a valid ctype metamethod. The + __gc metamethod only applies to struct/union + types and performs an implicit ffi.gc() @@ -469,6 +465,8 @@ otherwise. The following parameters are currently defined: winWindows variant of the standard ABI @@ -2015,17 +2131,26 @@ index 91af2e1d..061cc42a 100644 gc6464 bit GC references +@@ -494,7 +492,7 @@ have some extra methods: +

+ Free the resources associated with a callback. The associated Lua + function is unanchored and may be garbage collected. The callback +-function pointer is no longer valid and must not be called anymore ++function pointer is no longer valid and must not be called again + (it may be reused by a subsequently created callback). +

+ @@ -560,7 +558,7 @@ named i.
-@@ -678,7 +674,7 @@ through unions is explicitly detected and allowed. +@@ -92,7 +88,7 @@ footprint. It's used by the ffi.* library + functions to declare C types or external symbols. +

+

+-It's only purpose is to parse C declarations, as found e.g. in ++Its only purpose is to parse C declarations, as found e.g. in + C header files. Although it does evaluate constant expressions, + it's not a C compiler. The body of inline + C function definitions is simply ignored. +@@ -169,7 +165,7 @@ function declarations. + + +

+-The following C types are pre-defined by the C parser (like ++The following C types are predefined by the C parser (like + a typedef, except re-declarations will be ignored): +

+
    +@@ -587,9 +583,9 @@ ffi.new("struct nested", {x=1,y={2,3}}) --> x = 1, y.a = 2, y.b = 3 + +

    Operations on cdata Objects

    +

    +-All of the standard Lua operators can be applied to cdata objects or a ++All standard Lua operators can be applied to cdata objects or a + mix of a cdata object and another Lua object. The following list shows +-the pre-defined operations. ++the predefined operations. +

    +

    + Reference types are dereferenced before performing each of +@@ -597,7 +593,7 @@ the operations below — the operation is applied to the + C type pointed to by the reference. +

    +

    +-The pre-defined operations are always tried first before deferring to a ++The predefined operations are always tried first before deferring to a + metamethod or index table (if any) for the corresponding ctype (except + for __new). An error is raised if the metamethod lookup or + index table lookup fails. +@@ -647,7 +643,7 @@ assigning to an index of a vector raises an error. +

+

+ A ctype object can be indexed with a string key, too. The only +-pre-defined operation is reading scoped constants of ++predefined operation is reading scoped constants of + struct/union types. All other accesses defer + to the corresponding metamethods or index tables (if any). +

+@@ -660,7 +656,7 @@ certain optimizations. +

+ As a consequence, the elements of complex numbers and + vectors are immutable. But the elements of an aggregate holding these +-types may be modified of course. I.e. you cannot assign to ++types may be modified, of course. I.e. you cannot assign to + foo.c.im, but you can assign a (newly created) complex number + to foo.c. +

+@@ -678,9 +674,9 @@ through unions is explicitly detected and allowed. constructor. This is equivalent to ffi.new(ct, ...), unless a __new metamethod is defined. The __new metamethod is called with the ctype object -plus any other arguments passed to the contructor. Note that you have to +-use ffi.new inside of it, since calling ct(...) would +-cause infinite recursion. +plus any other arguments passed to the constructor. Note that you have to - use ffi.new inside of it, since calling ct(...) would - cause infinite recursion. ++use ffi.new inside the metamethod, since calling ct(...) ++would cause infinite recursion. + +
  • C function call: a cdata function or cdata function + pointer can be called. The passed arguments are +@@ -691,7 +687,7 @@ variable argument part of vararg C function use + C function is called and the return value (if any) is + converted to a Lua object.
    + On Windows/x86 systems, __stdcall functions are automatically +-detected and a function declared as __cdecl (the default) is ++detected, and a function declared as __cdecl (the default) is + silently fixed up after the first call.
  • + + +@@ -701,7 +697,7 @@ silently fixed up after the first call. + +
  • Pointer arithmetic: a cdata pointer/array and a cdata + number or a Lua number can be added or subtracted. The number must be +-on the right hand side for a subtraction. The result is a pointer of ++on the right-hand side for a subtraction. The result is a pointer of + the same type with an address plus or minus the number value + multiplied by the element size in bytes. An error is raised if the + element size is undefined.
  • +@@ -716,7 +712,7 @@ operators (+ - * / % ^ and unary + minus) can be applied to two cdata numbers, or a cdata number and a + Lua number. If one of them is an uint64_t, the other side is + converted to an uint64_t and an unsigned arithmetic operation +-is performed. Otherwise both sides are converted to an ++is performed. Otherwise, both sides are converted to an + int64_t and a signed arithmetic operation is performed. The + result is a boxed 64 bit cdata object.
    + +@@ -763,7 +759,7 @@ which is compatible with any other pointer type. +
  • 64 bit integer comparison: two cdata numbers, or a + cdata number and a Lua number can be compared with each other. If one + of them is an uint64_t, the other side is converted to an +-uint64_t and an unsigned comparison is performed. Otherwise ++uint64_t and an unsigned comparison is performed. Otherwise, + both sides are converted to an int64_t and a signed + comparison is performed.
    + +@@ -788,9 +784,9 @@ keys! + A cdata object is treated like any other garbage-collected object and + is hashed and compared by its address for table indexing. Since + there's no interning for cdata value types, the same value may be +-boxed in different cdata objects with different addresses. Thus ++boxed in different cdata objects with different addresses. Thus, + t[1LL+1LL] and t[2LL] usually do not point to +-the same hash slot and they certainly do not point to the same ++the same hash slot, and they certainly do not point to the same + hash slot as t[2]. +

    +

    +@@ -812,7 +808,7 @@ the resulting Lua number as a key when indexing tables.
    + One obvious benefit: t[tonumber(2LL)] does point to + the same slot as t[2].

  • + +-
  • Otherwise use either tostring() on 64 bit integers ++
  • Otherwise, use either tostring() on 64 bit integers + or complex numbers or combine multiple fields of a cdata aggregate to + a Lua string (e.g. with + ffi.string()). Then +@@ -820,7 +816,7 @@ use the resulting Lua string as a key when indexing tables.
  • + +
  • Create your own specialized hash table implementation using the + C types provided by the FFI library, just like you would in +-C code. Ultimately this may give much better performance than the ++C code. Ultimately, this may give much better performance than the + other alternatives or what a generic by-value hash table could + possibly provide.
  • @@ -864,7 +860,7 @@ place of a type, you'd need to use ffi.typeof("int") instead.

    @@ -2106,6 +2358,100 @@ index 800b6b18..fef39c32 100644 similar to what can be achieved with C++ template metaprogramming. Another use case are derived types of anonymous structs, which avoids pollution of the global struct namespace. +@@ -886,7 +882,7 @@ garbage collector will automatically free the memory used by it (at + the end of the next GC cycle). +

    +

    +-Please note that pointers themselves are cdata objects, however they ++Please note, that pointers themselves are cdata objects, however they + are not followed by the garbage collector. So e.g. if you + assign a cdata array to a pointer, you must keep the cdata object + holding the array alive as long as the pointer is still in use: +@@ -935,18 +931,18 @@ of the function pointer and the Lua function object (closure). +

    +

    + This can happen implicitly due to the usual conversions, e.g. when +-passing a Lua function to a function pointer argument. Or you can use ++passing a Lua function to a function pointer argument. Or, you can use + ffi.cast() to explicitly cast a Lua function to a + C function pointer. +

    +

    +-Currently only certain C function types can be used as callback ++Currently, only certain C function types can be used as callback + functions. Neither C vararg functions nor functions with + pass-by-value aggregate argument or result types are supported. There +-are no restrictions for the kind of Lua functions that can be called ++are no restrictions on the kind of Lua functions that can be called + from the callback — no checks for the proper number of arguments + are made. The return value of the Lua function will be converted to the +-result type and an error will be thrown for invalid conversions. ++result type, and an error will be thrown for invalid conversions. +

    +

    + It's allowed to throw errors across a callback invocation, but it's not +@@ -1007,7 +1003,7 @@ convention cannot be automatically detected, unlike for + __stdcall calls to Windows functions. +

    +

    +-For some use cases it's necessary to free up the resources or to ++For some use cases, it's necessary to free up the resources or to + dynamically redirect callbacks. Use an explicit cast to a + C function pointer and keep the resulting cdata object. Then use + the cb:free() +@@ -1060,7 +1056,7 @@ GUI application, which waits for user input most of the time, anyway. +

    +

    + For new designs avoid push-style APIs: a C function repeatedly +-calling a callback for each result. Instead use pull-style APIs: ++calling a callback for each result. Instead, use pull-style APIs: + call a C function repeatedly to get a new result. Calls from Lua + to C via the FFI are much faster than the other way round. Most well-designed + libraries already use pull-style APIs (read/write, get/put). +@@ -1079,7 +1075,7 @@ function. +

    +

    + Indexing a C library namespace object with a symbol name (a Lua +-string) automatically binds it to the library. First the symbol type ++string) automatically binds it to the library. First, the symbol type + is resolved — it must have been declared with + ffi.cdef. Then the + symbol address is resolved by searching for the symbol name in the +@@ -1134,7 +1130,7 @@ Performance notice: the JIT compiler specializes to the identity of + namespace objects and to the strings used to index it. This + effectively turns function cdata objects into constants. It's not + useful and actually counter-productive to explicitly cache these +-function objects, e.g. local strlen = ffi.C.strlen. OTOH it ++function objects, e.g. local strlen = ffi.C.strlen. OTOH, it + is useful to cache the namespace itself, e.g. local C = + ffi.C. +

    +@@ -1159,14 +1155,14 @@ This behavior is inevitable, since the goal is to provide full + interoperability with C code. Adding extra safety measures, like + bounds checks, would be futile. There's no way to detect + misdeclarations of C functions, since shared libraries only +-provide symbol names, but no type information. Likewise there's no way ++provide symbol names, but no type information. Likewise, there's no way + to infer the valid range of indexes for a returned pointer. +

    +

    + Again: the FFI library is a low-level library. This implies it needs + to be used with care, but it's flexibility and performance often + outweigh this concern. If you're a C or C++ developer, it'll be easy +-to apply your existing knowledge. OTOH writing code for the FFI ++to apply your existing knowledge. OTOH, writing code for the FFI + library is not for the faint of heart and probably shouldn't be the + first exercise for someone with little experience in Lua, C or C++. +

    +@@ -1194,7 +1190,7 @@ currently incomplete: +
  • C declarations are not passed through a C pre-processor, + yet.
  • +
  • The C parser is able to evaluate most constant expressions +-commonly found in C header files. However it doesn't handle the ++commonly found in C header files. However, it doesn't handle the + full range of C expression semantics and may fail for some + obscure constructs.
  • +
  • static const declarations only work for integer types @@ -1225,7 +1221,7 @@ suboptimal performance, especially when used in inner loops:
  • Table initializers.
  • Initialization of nested struct/union types.
  • @@ -2120,12 +2466,12 @@ index 800b6b18..fef39c32 100644
    +@@ -89,7 +85,7 @@ of its functions: + local ffi = require("ffi") + +

    +-Please note this doesn't define an ffi variable in the table ++Please note, this doesn't define an ffi variable in the table + of globals — you really need to use the local variable. The + require function ensures the library is only loaded once. +

    +@@ -198,7 +194,7 @@ don't need to declare them as such. + The poll() + function takes a couple more arguments we're not going to use. You can + simply use nil to pass a NULL pointer and 0 +-for the nfds parameter. Please note that the ++for the nfds parameter. Please note, that the + number 0 does not convert to a pointer value, + unlike in C++. You really have to pass pointers to pointer arguments + and numbers to number arguments. @@ -222,7 +218,7 @@ a fascinating best-selling game is left as an exercise for the reader.

    Accessing the zlib Compression Library

    @@ -2197,7 +2561,19 @@ index 36500664..ca71be4d 100644 We'll define two convenience wrapper functions that take a string and compress or uncompress it to another string:

    -@@ -305,7 +301,7 @@ comes pre-installed. Since ffi.load() automatically adds any +@@ -295,17 +291,17 @@ Here's the step-by-step explanation: +

    + This defines some of the + C functions provided by zlib. For the sake of this example, some +-type indirections have been reduced and it uses the pre-defined ++type indirections have been reduced and it uses the predefined + fixed-size integer types, while still adhering to the zlib API/ABI. +

    +

    + This loads the zlib shared +-library. On POSIX systems it's named libz.so and usually ++library. On POSIX systems, it's named libz.so and usually + comes pre-installed. Since ffi.load() automatically adds any missing standard prefixes/suffixes, we can simply load the "z" library. On Windows it's named zlib1.dll and you'll have to download it first from the @@ -2206,17 +2582,87 @@ index 36500664..ca71be4d 100644 ffi.os makes sure we pass the right name to ffi.load().

    +@@ -328,7 +324,7 @@ actual length that was used. +

    + In C you'd pass in the address of a local variable + (&buflen). But since there's no address-of operator in +-Lua, we'll just pass in a one-element array. Conveniently it can be ++Lua, we'll just pass in a one-element array. Conveniently, it can be + initialized with the maximum buffer size in one step. Calling the + actual zlib.compress2 function is then straightforward. +

    +@@ -352,7 +348,7 @@ for garbage collection and string interning. + The uncompress + functions does the exact opposite of the compress function. + The compressed data doesn't include the size of the original string, +-so this needs to be passed in. Otherwise no surprises here. ++so this needs to be passed in. Otherwise, no surprises here. +

    +

    + The code, that makes use +@@ -386,7 +382,7 @@ Ok, so the ffi.* functions generally accept cdata objects + wherever you'd want to use a number. That's why we get a away with + passing n to ffi.string() above. But other Lua + library functions or modules don't know how to deal with this. So for +-maximum portability one needs to use tonumber() on returned ++maximum portability, one needs to use tonumber() on returned + long results before passing them on. Otherwise the + application might work on some systems, but would fail in a POSIX/x64 + environment. +@@ -458,7 +454,7 @@ the origin. +

    +

    + If we run out of operators, we can +-define named methods, too. Here the __index table defines an ++define named methods, too. Here, the __index table defines an + area function. For custom indexing needs, one might want to + define __index and __newindex functions instead. +

    +@@ -472,13 +468,13 @@ be used e.g. to create an array of points. The metamethods automatically + apply to any and all uses of this type. +

    +

    +-Please note that the association with a metatable is permanent and ++Please note, that the association with a metatable is permanent and + the metatable must not be modified afterwards! Ditto for the + __index table. +

    +

    + Here are some simple usage examples +-for the point type and their expected results. The pre-defined ++for the point type and their expected results. The predefined + operations (such as a.x) can be freely mixed with the newly + defined metamethods. Note that area is a method and must be + called with the Lua syntax for methods: a:area(), not +@@ -487,7 +483,7 @@ called with the Lua syntax for methods: a:area(), not +

    + The C type metamethod mechanism is most useful when used in + conjunction with C libraries that are written in an object-oriented +-style. Creators return a pointer to a new instance and methods take an ++style. Creators return a pointer to a new instance, and methods take an + instance pointer as the first argument. Sometimes you can just point + __index to the library namespace and __gc to the + destructor and you're done. But often enough you'll want to add +@@ -573,7 +569,7 @@ end + +

    + This turns them into indirect calls and generates bigger and slower +-machine code. Instead you'll want to cache the namespace itself and ++machine code. Instead, you'll want to cache the namespace itself and + rely on the JIT compiler to eliminate the lookups: +

    +
     @@ -593,7 +589,7 @@ it to a local variable in the function scope is unnecessary.
      
    -@@ -153,7 +149,7 @@ Contains the target OS name: +@@ -153,12 +149,12 @@ Contains the target OS name:

    jit.arch

    Contains the target architecture name: @@ -2287,17 +2733,32 @@ index e4088bcb..6dd54c70 100644

    jit.opt.* — JIT compiler optimization control

    +

    +-This sub-module provides the backend for the -O command line ++This submodule provides the backend for the -O command line + option. +

    +

    +@@ -178,7 +174,7 @@ which was one of the ways to enable optimization. + +

    jit.util.* — JIT compiler introspection

    +

    +-This sub-module holds functions to introspect the bytecode, generated ++This submodule holds functions to introspect the bytecode, generated + traces, the IR and the generated machine code. The functionality + provided by this module is still in flux and therefore undocumented. +

    @@ -191,7 +187,7 @@ if you want to know more.
    +@@ -162,7 +158,7 @@ To see how much time is spent in different VM states or + Combinations of v/z with f/F/l produce two-level + views, e.g. -jp=vf or -jp=fv. This shows the time + spent in a VM state or zone vs. hotspots. This can be used to answer +-questions like "Which time consuming functions are only interpreted?" or ++questions like "Which time-consuming functions are only interpreted?" or + "What's the garbage collector overhead for a specific function?". +

    +

    +@@ -221,7 +217,7 @@ local profile = require("jit.profile") + This module can be used to implement your own higher-level profiler. + A typical profiling run starts the profiler, captures stack dumps in + the profiler callback, adds them to a hash table to aggregate the number +-of samples, stops the profiler and then analyzes all of the captured ++of samples, stops the profiler and then analyzes all captured + stack dumps. Other parameters can be sampled in the profiler callback, + too. But it's important not to spend too much time in the callback, + since this may skew the statistics. +@@ -275,9 +271,9 @@ returns a string with a stack dump for the thread (coroutine), + formatted according to the fmt argument: +

    +
      +-
    • p — Preserve the full path for module names. Otherwise ++
    • p — Preserve the full path for module names. Otherwise, + only the file name is used.
    • +-
    • f — Dump the function name if it can be derived. Otherwise ++
    • f — Dump the function name if it can be derived. Otherwise, + use module:line.
    • +
    • F — Ditto, but dump module:name.
    • +
    • l — Dump module:line.
    • @@ -355,7 +351,7 @@ use.
    -@@ -91,8 +87,8 @@ other Lua/C API functions). +@@ -91,8 +85,8 @@ other Lua/C API functions).

    The third argument specifies the mode, which is 'or'ed with a flag. @@ -1871,7 +1879,7 @@ index ad462c63..21dc1310 100644 LUAJIT_MODE_FLUSH to flush cached code.

    -@@ -111,7 +107,7 @@ Turn the whole JIT compiler on or off or flush the whole cache of compiled code. +@@ -111,7 +105,7 @@ Turn the whole JIT compiler on or off or flush the whole cache of compiled code. This sets the mode for the function at the stack index idx or the parent of the calling function (idx = 0). It either enables JIT compilation for a function, disables it and flushes any @@ -1880,7 +1888,7 @@ index ad462c63..21dc1310 100644 applies recursively to all sub-functions of the function with LUAJIT_MODE_ALLFUNC or only to the sub-functions with LUAJIT_MODE_ALLSUBFUNC. -@@ -130,7 +126,7 @@ traces which link to it. +@@ -130,7 +124,7 @@ traces which link to it. This mode defines a wrapper function for calls to C functions. If called with LUAJIT_MODE_ON, the stack index at idx must be a lightuserdata object holding a pointer to the wrapper @@ -1889,7 +1897,7 @@ index ad462c63..21dc1310 100644 function. If called with LUAJIT_MODE_OFF this mode is turned off and all C functions are directly called.

    -@@ -179,7 +175,7 @@ Also note that this mechanism is not without overhead. +@@ -179,7 +173,7 @@ Also note that this mechanism is not without overhead.
    -@@ -161,7 +157,7 @@ call the binding function. Phew! +@@ -161,7 +155,7 @@ call the binding function. Phew!

    Motivating Example: Using C Data Structures

    The FFI library allows you to create and access C data @@ -1970,7 +1978,7 @@ index 5e1daaf5..b39ae314 100644 C functions. But they can be used stand-alone, too.

    -@@ -173,7 +169,7 @@ implemented with a big table holding lots of tiny tables. This imposes +@@ -173,7 +167,7 @@ implemented with a big table holding lots of tiny tables. This imposes both a substantial memory overhead as well as a performance overhead.

    @@ -1979,7 +1987,7 @@ index 5e1daaf5..b39ae314 100644 simple benchmark. First, the plain Lua version:

    -@@ -188,7 +184,7 @@ local function image_ramp_green(n)
    +@@ -188,7 +182,7 @@ local function image_ramp_green(n)
        return img
      end
      
    @@ -1988,7 +1996,7 @@ index 5e1daaf5..b39ae314 100644
        for i=1,n do
          local y = floor(0.3*img[i].red + 0.59*img[i].green + 0.11*img[i].blue)
          img[i].red = y; img[i].green = y; img[i].blue = y
    -@@ -198,14 +194,14 @@ end
    +@@ -198,14 +192,14 @@ end
      local N = 400*400
      local img = image_ramp_green(N)
      for i=1,1000 do
    @@ -2006,7 +2014,7 @@ index 5e1daaf5..b39ae314 100644
      need of a simple example ...
      

    -@@ -312,7 +308,7 @@ be more compact and faster. This is certainly true (by a factor of +@@ -312,7 +306,7 @@ be more compact and faster. This is certainly true (by a factor of ~1.7x). Switching to a struct-of-arrays would help, too.

    @@ -2015,7 +2023,7 @@ index 5e1daaf5..b39ae314 100644 error-prone. And it still doesn't get even close to the performance of the FFI version of the code. Also, high-level data structures cannot be easily passed to other C functions, especially I/O functions, -@@ -322,7 +318,7 @@ without undue conversion penalties. +@@ -322,7 +316,7 @@ without undue conversion penalties.

    -@@ -125,7 +121,7 @@ separated by semicolons. The trailing semicolon for a single +@@ -125,7 +119,7 @@ separated by semicolons. The trailing semicolon for a single declaration may be omitted.

    @@ -2097,7 +2105,7 @@ index 91af2e1d..b8da1c95 100644 are not bound to any specific address, yet. Binding is achieved with C library namespaces (see below).

    -@@ -213,7 +209,7 @@ parse the cdecl only once and get its ctype with +@@ -213,7 +207,7 @@ parse the cdecl only once and get its ctype with ffi.typeof(). Then use the ctype as a constructor repeatedly.

    @@ -2106,7 +2114,7 @@ index 91af2e1d..b8da1c95 100644 creates a new and distinguished ctype every time you use it for ffi.new(). This is probably not what you want, especially if you create more than one cdata object. Different anonymous -@@ -260,12 +256,12 @@ afterwards. Neither the contents of the metatable nor the +@@ -260,12 +254,12 @@ afterwards. Neither the contents of the metatable nor the contents of an __index table (if any) may be modified afterwards. The associated metatable automatically applies to all uses of this type, no matter how the objects are created or where they @@ -2122,7 +2130,7 @@ index 91af2e1d..b8da1c95 100644 left operand is checked first for a valid ctype metamethod. The __gc metamethod only applies to struct/union types and performs an implicit ffi.gc() -@@ -469,6 +465,8 @@ otherwise. The following parameters are currently defined: +@@ -469,6 +463,8 @@ otherwise. The following parameters are currently defined: winWindows variant of the standard ABI @@ -2131,7 +2139,7 @@ index 91af2e1d..b8da1c95 100644 gc6464 bit GC references -@@ -494,7 +492,7 @@ have some extra methods: +@@ -494,7 +490,7 @@ have some extra methods:

    Free the resources associated with a callback. The associated Lua function is unanchored and may be garbage collected. The callback @@ -2140,7 +2148,7 @@ index 91af2e1d..b8da1c95 100644 (it may be reused by a subsequently created callback).

    -@@ -560,7 +558,7 @@ named i. +@@ -560,7 +556,7 @@ named i.
    -@@ -92,7 +88,7 @@ footprint. It's used by the ffi.* library +@@ -92,7 +86,7 @@ footprint. It's used by the ffi.* library functions to declare C types or external symbols.

    @@ -2222,7 +2230,7 @@ index 800b6b18..22f7f17c 100644 C header files. Although it does evaluate constant expressions, it's not a C compiler. The body of inline C function definitions is simply ignored. -@@ -169,7 +165,7 @@ function declarations. +@@ -169,7 +163,7 @@ function declarations.

    @@ -2231,7 +2239,7 @@ index 800b6b18..22f7f17c 100644 a typedef, except re-declarations will be ignored):

      -@@ -587,9 +583,9 @@ ffi.new("struct nested", {x=1,y={2,3}}) --> x = 1, y.a = 2, y.b = 3 +@@ -587,9 +581,9 @@ ffi.new("struct nested", {x=1,y={2,3}}) --> x = 1, y.a = 2, y.b = 3

      Operations on cdata Objects

      @@ -2243,7 +2251,7 @@ index 800b6b18..22f7f17c 100644

      Reference types are dereferenced before performing each of -@@ -597,7 +593,7 @@ the operations below — the operation is applied to the +@@ -597,7 +591,7 @@ the operations below — the operation is applied to the C type pointed to by the reference.

      @@ -2252,7 +2260,7 @@ index 800b6b18..22f7f17c 100644 metamethod or index table (if any) for the corresponding ctype (except for __new). An error is raised if the metamethod lookup or index table lookup fails. -@@ -647,7 +643,7 @@ assigning to an index of a vector raises an error. +@@ -647,7 +641,7 @@ assigning to an index of a vector raises an error.

    A ctype object can be indexed with a string key, too. The only @@ -2261,7 +2269,7 @@ index 800b6b18..22f7f17c 100644 struct/union types. All other accesses defer to the corresponding metamethods or index tables (if any).

    -@@ -660,7 +656,7 @@ certain optimizations. +@@ -660,7 +654,7 @@ certain optimizations.

    As a consequence, the elements of complex numbers and vectors are immutable. But the elements of an aggregate holding these @@ -2270,7 +2278,7 @@ index 800b6b18..22f7f17c 100644 foo.c.im, but you can assign a (newly created) complex number to foo.c.

    -@@ -678,9 +674,9 @@ through unions is explicitly detected and allowed. +@@ -678,9 +672,9 @@ through unions is explicitly detected and allowed. constructor. This is equivalent to ffi.new(ct, ...), unless a __new metamethod is defined. The __new metamethod is called with the ctype object @@ -2283,7 +2291,7 @@ index 800b6b18..22f7f17c 100644
  • C function call: a cdata function or cdata function pointer can be called. The passed arguments are -@@ -691,7 +687,7 @@ variable argument part of vararg C function use +@@ -691,7 +685,7 @@ variable argument part of vararg C function use C function is called and the return value (if any) is converted to a Lua object.
    On Windows/x86 systems, __stdcall functions are automatically @@ -2292,7 +2300,7 @@ index 800b6b18..22f7f17c 100644 silently fixed up after the first call.
  • -@@ -701,7 +697,7 @@ silently fixed up after the first call. +@@ -701,7 +695,7 @@ silently fixed up after the first call.
  • Pointer arithmetic: a cdata pointer/array and a cdata number or a Lua number can be added or subtracted. The number must be @@ -2301,7 +2309,7 @@ index 800b6b18..22f7f17c 100644 the same type with an address plus or minus the number value multiplied by the element size in bytes. An error is raised if the element size is undefined.
  • -@@ -716,7 +712,7 @@ operators (+ - * / % ^ and unary +@@ -716,7 +710,7 @@ operators (+ - * / % ^ and unary minus) can be applied to two cdata numbers, or a cdata number and a Lua number. If one of them is an uint64_t, the other side is converted to an uint64_t and an unsigned arithmetic operation @@ -2310,7 +2318,7 @@ index 800b6b18..22f7f17c 100644 int64_t and a signed arithmetic operation is performed. The result is a boxed 64 bit cdata object.
    -@@ -763,7 +759,7 @@ which is compatible with any other pointer type. +@@ -763,7 +757,7 @@ which is compatible with any other pointer type.
  • 64 bit integer comparison: two cdata numbers, or a cdata number and a Lua number can be compared with each other. If one of them is an uint64_t, the other side is converted to an @@ -2319,7 +2327,7 @@ index 800b6b18..22f7f17c 100644 both sides are converted to an int64_t and a signed comparison is performed.
    -@@ -788,9 +784,9 @@ keys! +@@ -788,9 +782,9 @@ keys! A cdata object is treated like any other garbage-collected object and is hashed and compared by its address for table indexing. Since there's no interning for cdata value types, the same value may be @@ -2331,7 +2339,7 @@ index 800b6b18..22f7f17c 100644 hash slot as t[2].

    -@@ -812,7 +808,7 @@ the resulting Lua number as a key when indexing tables.
    +@@ -812,7 +806,7 @@ the resulting Lua number as a key when indexing tables.
    One obvious benefit: t[tonumber(2LL)] does point to the same slot as t[2].

  • @@ -2340,7 +2348,7 @@ index 800b6b18..22f7f17c 100644 or complex numbers or combine multiple fields of a cdata aggregate to a Lua string (e.g. with ffi.string()). Then -@@ -820,7 +816,7 @@ use the resulting Lua string as a key when indexing tables. +@@ -820,7 +814,7 @@ use the resulting Lua string as a key when indexing tables.
  • Create your own specialized hash table implementation using the C types provided by the FFI library, just like you would in @@ -2349,7 +2357,7 @@ index 800b6b18..22f7f17c 100644 other alternatives or what a generic by-value hash table could possibly provide.
  • -@@ -864,7 +860,7 @@ place of a type, you'd need to use ffi.typeof("int") instead. +@@ -864,7 +858,7 @@ place of a type, you'd need to use ffi.typeof("int") instead.

    The main use for parameterized types are libraries implementing abstract data types @@ -2358,7 +2366,7 @@ index 800b6b18..22f7f17c 100644 similar to what can be achieved with C++ template metaprogramming. Another use case are derived types of anonymous structs, which avoids pollution of the global struct namespace. -@@ -886,7 +882,7 @@ garbage collector will automatically free the memory used by it (at +@@ -886,7 +880,7 @@ garbage collector will automatically free the memory used by it (at the end of the next GC cycle).

    @@ -2367,7 +2375,7 @@ index 800b6b18..22f7f17c 100644 are not followed by the garbage collector. So e.g. if you assign a cdata array to a pointer, you must keep the cdata object holding the array alive as long as the pointer is still in use: -@@ -935,18 +931,18 @@ of the function pointer and the Lua function object (closure). +@@ -935,18 +929,18 @@ of the function pointer and the Lua function object (closure).

    This can happen implicitly due to the usual conversions, e.g. when @@ -2390,7 +2398,7 @@ index 800b6b18..22f7f17c 100644

    It's allowed to throw errors across a callback invocation, but it's not -@@ -1007,7 +1003,7 @@ convention cannot be automatically detected, unlike for +@@ -1007,7 +1001,7 @@ convention cannot be automatically detected, unlike for __stdcall calls to Windows functions.

    @@ -2399,7 +2407,7 @@ index 800b6b18..22f7f17c 100644 dynamically redirect callbacks. Use an explicit cast to a C function pointer and keep the resulting cdata object. Then use the cb:free() -@@ -1060,7 +1056,7 @@ GUI application, which waits for user input most of the time, anyway. +@@ -1060,7 +1054,7 @@ GUI application, which waits for user input most of the time, anyway.

    For new designs avoid push-style APIs: a C function repeatedly @@ -2408,7 +2416,7 @@ index 800b6b18..22f7f17c 100644 call a C function repeatedly to get a new result. Calls from Lua to C via the FFI are much faster than the other way round. Most well-designed libraries already use pull-style APIs (read/write, get/put). -@@ -1079,7 +1075,7 @@ function. +@@ -1079,7 +1073,7 @@ function.

    Indexing a C library namespace object with a symbol name (a Lua @@ -2417,7 +2425,7 @@ index 800b6b18..22f7f17c 100644 is resolved — it must have been declared with ffi.cdef. Then the symbol address is resolved by searching for the symbol name in the -@@ -1134,7 +1130,7 @@ Performance notice: the JIT compiler specializes to the identity of +@@ -1134,7 +1128,7 @@ Performance notice: the JIT compiler specializes to the identity of namespace objects and to the strings used to index it. This effectively turns function cdata objects into constants. It's not useful and actually counter-productive to explicitly cache these @@ -2426,7 +2434,7 @@ index 800b6b18..22f7f17c 100644 is useful to cache the namespace itself, e.g. local C = ffi.C.

    -@@ -1159,14 +1155,14 @@ This behavior is inevitable, since the goal is to provide full +@@ -1159,14 +1153,14 @@ This behavior is inevitable, since the goal is to provide full interoperability with C code. Adding extra safety measures, like bounds checks, would be futile. There's no way to detect misdeclarations of C functions, since shared libraries only @@ -2443,7 +2451,7 @@ index 800b6b18..22f7f17c 100644 library is not for the faint of heart and probably shouldn't be the first exercise for someone with little experience in Lua, C or C++.

    -@@ -1194,7 +1190,7 @@ currently incomplete: +@@ -1194,7 +1188,7 @@ currently incomplete:
  • C declarations are not passed through a C pre-processor, yet.
  • The C parser is able to evaluate most constant expressions @@ -2452,7 +2460,7 @@ index 800b6b18..22f7f17c 100644 full range of C expression semantics and may fail for some obscure constructs.
  • static const declarations only work for integer types -@@ -1225,7 +1221,7 @@ suboptimal performance, especially when used in inner loops: +@@ -1225,7 +1219,7 @@ suboptimal performance, especially when used in inner loops:
  • Table initializers.
  • Initialization of nested struct/union types.
  • Non-default initialization of VLA/VLS or large C types @@ -2461,7 +2469,7 @@ index 800b6b18..22f7f17c 100644
  • Bitfield initializations.
  • Pointer differences for element sizes that are not a power of two.
  • -@@ -1252,7 +1248,7 @@ compiled. +@@ -1252,7 +1246,7 @@ compiled.
    -@@ -89,7 +85,7 @@ of its functions: +@@ -89,7 +83,7 @@ of its functions: local ffi = require("ffi")

    @@ -2543,7 +2551,7 @@ index 36500664..e0bf9040 100644 of globals — you really need to use the local variable. The require function ensures the library is only loaded once.

    -@@ -198,7 +194,7 @@ don't need to declare them as such. +@@ -198,7 +192,7 @@ don't need to declare them as such. The poll() function takes a couple more arguments we're not going to use. You can simply use nil to pass a NULL pointer and 0 @@ -2552,7 +2560,7 @@ index 36500664..e0bf9040 100644 number 0 does not convert to a pointer value, unlike in C++. You really have to pass pointers to pointer arguments and numbers to number arguments. -@@ -222,7 +218,7 @@ a fascinating best-selling game is left as an exercise for the reader. +@@ -222,7 +216,7 @@ a fascinating best-selling game is left as an exercise for the reader.

    Accessing the zlib Compression Library

    The following code shows how to access the -@@ -295,17 +291,17 @@ Here's the step-by-step explanation: +@@ -295,17 +289,17 @@ Here's the step-by-step explanation:

    This defines some of the C functions provided by zlib. For the sake of this example, some @@ -2582,7 +2590,7 @@ index 36500664..e0bf9040 100644 ffi.os makes sure we pass the right name to ffi.load().

    -@@ -328,7 +324,7 @@ actual length that was used. +@@ -328,7 +322,7 @@ actual length that was used.

    In C you'd pass in the address of a local variable (&buflen). But since there's no address-of operator in @@ -2591,7 +2599,7 @@ index 36500664..e0bf9040 100644 initialized with the maximum buffer size in one step. Calling the actual zlib.compress2 function is then straightforward.

    -@@ -352,7 +348,7 @@ for garbage collection and string interning. +@@ -352,7 +346,7 @@ for garbage collection and string interning. The uncompress functions does the exact opposite of the compress function. The compressed data doesn't include the size of the original string, @@ -2600,7 +2608,7 @@ index 36500664..e0bf9040 100644

    The code, that makes use -@@ -386,7 +382,7 @@ Ok, so the ffi.* functions generally accept cdata objects +@@ -386,7 +380,7 @@ Ok, so the ffi.* functions generally accept cdata objects wherever you'd want to use a number. That's why we get a away with passing n to ffi.string() above. But other Lua library functions or modules don't know how to deal with this. So for @@ -2609,7 +2617,7 @@ index 36500664..e0bf9040 100644 long results before passing them on. Otherwise the application might work on some systems, but would fail in a POSIX/x64 environment. -@@ -458,7 +454,7 @@ the origin. +@@ -458,7 +452,7 @@ the origin.

    If we run out of operators, we can @@ -2618,7 +2626,7 @@ index 36500664..e0bf9040 100644 area function. For custom indexing needs, one might want to define __index and __newindex functions instead.

    -@@ -472,13 +468,13 @@ be used e.g. to create an array of points. The metamethods automatically +@@ -472,13 +466,13 @@ be used e.g. to create an array of points. The metamethods automatically apply to any and all uses of this type.

    @@ -2634,7 +2642,7 @@ index 36500664..e0bf9040 100644 operations (such as a.x) can be freely mixed with the newly defined metamethods. Note that area is a method and must be called with the Lua syntax for methods: a:area(), not -@@ -487,7 +483,7 @@ called with the Lua syntax for methods: a:area(), not +@@ -487,7 +481,7 @@ called with the Lua syntax for methods: a:area(), not

    The C type metamethod mechanism is most useful when used in conjunction with C libraries that are written in an object-oriented @@ -2643,7 +2651,7 @@ index 36500664..e0bf9040 100644 instance pointer as the first argument. Sometimes you can just point __index to the library namespace and __gc to the destructor and you're done. But often enough you'll want to add -@@ -573,7 +569,7 @@ end +@@ -573,7 +567,7 @@ end

    This turns them into indirect calls and generates bigger and slower @@ -2652,7 +2660,7 @@ index 36500664..e0bf9040 100644 rely on the JIT compiler to eliminate the lookups:

    -@@ -593,7 +589,7 @@ it to a local variable in the function scope is unnecessary.
    +@@ -593,7 +587,7 @@ it to a local variable in the function scope is unnecessary.
      
    -@@ -153,12 +149,12 @@ Contains the target OS name: +@@ -153,12 +147,12 @@ Contains the target OS name:

    jit.arch

    Contains the target architecture name: @@ -2739,7 +2747,7 @@ index e4088bcb..b8a25967 100644 option.

    -@@ -178,7 +174,7 @@ which was one of the ways to enable optimization. +@@ -178,7 +172,7 @@ which was one of the ways to enable optimization.

    jit.util.* — JIT compiler introspection

    @@ -2748,7 +2756,7 @@ index e4088bcb..b8a25967 100644 traces, the IR and the generated machine code. The functionality provided by this module is still in flux and therefore undocumented.

    -@@ -191,7 +187,7 @@ if you want to know more. +@@ -191,7 +185,7 @@ if you want to know more.
    -@@ -162,7 +158,7 @@ To see how much time is spent in different VM states or +@@ -162,7 +156,7 @@ To see how much time is spent in different VM states or Combinations of v/z with f/F/l produce two-level views, e.g. -jp=vf or -jp=fv. This shows the time spent in a VM state or zone vs. hotspots. This can be used to answer @@ -2829,7 +2837,7 @@ index 71b8c033..b645a204 100644 "What's the garbage collector overhead for a specific function?".

    -@@ -221,7 +217,7 @@ local profile = require("jit.profile") +@@ -221,7 +215,7 @@ local profile = require("jit.profile") This module can be used to implement your own higher-level profiler. A typical profiling run starts the profiler, captures stack dumps in the profiler callback, adds them to a hash table to aggregate the number @@ -2838,7 +2846,7 @@ index 71b8c033..b645a204 100644 stack dumps. Other parameters can be sampled in the profiler callback, too. But it's important not to spend too much time in the callback, since this may skew the statistics. -@@ -275,9 +271,9 @@ returns a string with a stack dump for the thread (coroutine), +@@ -275,9 +269,9 @@ returns a string with a stack dump for the thread (coroutine), formatted according to the fmt argument:

      @@ -2850,7 +2858,7 @@ index 71b8c033..b645a204 100644 use module:line.
    • F — Ditto, but dump module:name.
    • l — Dump module:line.
    • -@@ -355,7 +351,7 @@ use. +@@ -355,7 +349,7 @@ use.
    -@@ -99,62 +90,204 @@ For the impatient (on POSIX systems): +@@ -99,62 +88,204 @@ For the impatient (on POSIX systems):
      make && sudo make install
      
    + +

    Requirements

    +

    Systems

    -

    --LuaJIT currently builds out-of-the box on most systems. --Here's the compatibility matrix for the supported combinations of --operating systems, CPUs and compilers: ++

    +LuaJIT currently builds out-of-the box on most systems: -

    - - -- -- -- -- -- ++

    ++
    CPU / OSLinux or
    Android
    *BSD, OtherOSX 10.4+ or
    iOS 3.0+
    Windows
    XP/Vista/7
    ++ + + + + - - -- -- -- -- -- ++ ++ + + + @@ -3462,13 +3457,8 @@ index c491c601..9fad31f4 100644 + + + - - -- -- -- -- -- ++ ++ + + + @@ -3497,46 +3487,26 @@ index c491c601..9fad31f4 100644 + + + - - -- -- -- -- -- ++ ++ + + + + - - -- -- -- -- -- ++ ++ + + + + - - -- -- -- -- -- ++ ++ + + + + - - -- -- -- -- -- ++ ++ + + + @@ -3553,12 +3523,15 @@ index c491c601..9fad31f4 100644 + + + - -
    OSMin. VersionRequirementsLuaJIT Versions
    x86 (32 bit)GCC 4.2+GCC 4.2+XCode 5.0+
    Clang
    MSVC, MSVC/EE
    WinSDK
    MinGW, Cygwin
    Windows7x86 or x64, ARM64: TBA  v2.0 –
    x64 (64 bit)GCC 4.2+GCC 4.2+
    ORBIS (PS4)
    XCode 5.0+
    Clang
    MSVC + SDK v7.0
    WinSDK v7.0
    Durango (Xbox One)
    macOS (OSX)10.4  PS3 SDKv2.0 – v2.1 EOL
    ARMv5+
    ARM9E+
    GCC 4.2+GCC 4.2+
    PSP2 (PS VITA)
    XCode 5.0+
    Clang
     
    PS4 PS4 SDK (ORBIS)v2.0 –
    ARM64GCC 4.8+ XCode 6.0+
    Clang 3.5+
     
    PS5 PS5 SDK (PROSPERO)v2.1 –
    PPCGCC 4.3+GCC 4.3+
    GCC 4.1 (PS3)
     XEDK (Xbox 360)
    PS Vita PS Vita SDK (PSP2)v2.0 – v2.1 EOL
    MIPS32
    MIPS64
    GCC 4.3+GCC 4.3+  
    Xbox 360 Xbox 360 SDK (XEDK) NintendoSDK + NX Addonv2.1 –
    -+

    ++ ++ +

    +-LuaJIT currently builds out-of-the box on most systems. +-Here's the compatibility matrix for the supported combinations of +-operating systems, CPUs and compilers: +The codebase has compatibility defines for some more systems, but +without official support. -+

    +

    +

    Toolchains

    +

    +Building LuaJIT requires a recent toolchain based on GCC, Clang/LLVM or @@ -3570,15 +3543,25 @@ index c491c601..9fad31f4 100644 +cross-builds. +

    +

    CPU Architectures

    -+ -+ +
    + +- +- +- +- +- + + + + + -+ -+ + + +- +- +- +- +- + + + @@ -3598,36 +3581,61 @@ index c491c601..9fad31f4 100644 + + + -+ -+ + + +- +- +- +- +- + + + + + -+ -+ + + +- +- +- +- +- + + + + + -+ -+ + + +- +- +- +- +- + + + + + -+ -+ + + +- +- +- +- +- + + + + + -+ -+ + + +- +- +- +- +- + + + @@ -3647,8 +3655,8 @@ index c491c601..9fad31f4 100644 + + + -+ -+
    CPU / OSLinux or
    Android
    *BSD, OtherOSX 10.4+ or
    iOS 3.0+
    Windows
    XP/Vista/7
    CPUBitsRequirementsVariantsLuaJIT Versions
    x86 (32 bit)GCC 4.2+GCC 4.2+XCode 5.0+
    Clang
    MSVC, MSVC/EE
    WinSDK
    MinGW, Cygwin
    x8632v2.1+: SSE2ARMv5+, ARM9E+hard-fp + soft-fpv2.0 –
    x64 (64 bit)GCC 4.2+GCC 4.2+
    ORBIS (PS4)
    XCode 5.0+
    Clang
    MSVC + SDK v7.0
    WinSDK v7.0
    Durango (Xbox One)
    ARM6464 ARM64le + ARM64bev2.1 –
    ARMv5+
    ARM9E+
    GCC 4.2+GCC 4.2+
    PSP2 (PS VITA)
    XCode 5.0+
    Clang
     PPC3232 hard-fp + soft-fpv2.0 – v2.1 EOL
    ARM64GCC 4.8+ XCode 6.0+
    Clang 3.5+
     PPC/e50032e500v2 v2.0 EOL
    PPCGCC 4.3+GCC 4.3+
    GCC 4.1 (PS3)
     XEDK (Xbox 360)MIPS3232MIPS32r1 – r5hard-fp + soft-fpv2.0 –
    MIPS32
    MIPS64
    GCC 4.3+GCC 4.3+  MIPS6464MIPS64r1 – r5RVA22+ TBA
    + + +

    +There are no plans to add historic architectures or to continue support +for end-of-life (EOL) architectures, for which no new CPUs are commonly @@ -3658,7 +3666,7 @@ index c491c601..9fad31f4 100644

    Configuring LuaJIT

    -@@ -169,22 +302,21 @@ only). +@@ -169,22 +300,21 @@ only).

  • src/Makefile has settings for compiling LuaJIT under POSIX, MinGW or Cygwin.
  • src/msvcbuild.bat has settings for compiling LuaJIT with @@ -3688,7 +3696,7 @@ index c491c601..9fad31f4 100644

    Prerequisites

    Depending on your distribution, you may need to install a package for -@@ -192,14 +324,19 @@ GCC, the development headers and/or a complete SDK. E.g. on a current +@@ -192,14 +322,19 @@ GCC, the development headers and/or a complete SDK. E.g. on a current Debian/Ubuntu, install libc6-dev with the package manager.

    @@ -3714,7 +3722,7 @@ index c491c601..9fad31f4 100644

    Building LuaJIT

    The supplied Makefiles try to auto-detect the settings needed for your -@@ -223,9 +360,12 @@ You can add an extra prefix to the search paths by appending the +@@ -223,9 +358,12 @@ You can add an extra prefix to the search paths by appending the make PREFIX=/home/myself/lj2

    @@ -3729,7 +3737,7 @@ index c491c601..9fad31f4 100644

    Installing LuaJIT

    The top-level Makefile installs LuaJIT by default under -@@ -252,27 +392,18 @@ Obviously the prefixes given during build and installation need to be the same. +@@ -252,27 +390,18 @@ Obviously the prefixes given during build and installation need to be the same.

    Either install one of the open source SDKs (» MinGW or @@ -3763,7 +3771,7 @@ index c491c601..9fad31f4 100644 directory where you've unpacked the sources and run these commands:

    -@@ -280,37 +411,14 @@ cd src
    +@@ -280,37 +409,14 @@ cd src
      msvcbuild
      

    @@ -3804,7 +3812,7 @@ index c491c601..9fad31f4 100644

      mingw32-make
    -@@ -365,7 +473,7 @@ You need to specify TARGET_SYS whenever the host OS and the
    +@@ -365,7 +471,7 @@ You need to specify TARGET_SYS whenever the host OS and the
      target OS differ, or you'll get assembler or linker errors:
      

      @@ -3813,7 +3821,7 @@ index c491c601..9fad31f4 100644
    • For a minimal target OS, you may need to disable the built-in allocator in src/Makefile and use TARGET_SYS=Other.
    • Don't forget to specify the same TARGET_SYS for the install step, too.
    -@@ -428,52 +536,33 @@ make CROSS=mips-linux- TARGET_CFLAGS="-mips64r2 -mabi=64" +@@ -428,52 +534,33 @@ make CROSS=mips-linux- TARGET_CFLAGS="-mips64r2 -mabi=64" make CROSS=mipsel-linux- TARGET_CFLAGS="-mips64r2 -mabi=64"

    @@ -3888,7 +3896,7 @@ index c491c601..9fad31f4 100644

    Note: the JIT compiler is disabled for iOS, because regular iOS Apps -@@ -483,13 +572,6 @@ much slower than the JIT compiler. Please complain to Apple, not me. +@@ -483,13 +570,6 @@ much slower than the JIT compiler. Please complain to Apple, not me. Or use Android. :-p

    @@ -3902,7 +3910,7 @@ index c491c601..9fad31f4 100644
      # iOS/ARM64
      ISDKP=$(xcrun --sdk iphoneos --show-sdk-path)
      ICC=$(xcrun --sdk iphoneos --find clang)
    -@@ -501,8 +583,7 @@ make DEFAULT_CC=clang CROSS="$(dirname $ICC)/" \
    +@@ -501,8 +581,7 @@ make DEFAULT_CC=clang CROSS="$(dirname $ICC)/" \
      

    Cross-compiling for consoles

    Building LuaJIT for consoles requires both a supported host compiler @@ -3912,7 +3920,7 @@ index c491c601..9fad31f4 100644

    Due to restrictions on consoles, the JIT compiler is disabled and only -@@ -523,45 +604,58 @@ To cross-compile for PS3 from a Linux host (requires +@@ -523,45 +602,58 @@ To cross-compile for PS3 from a Linux host (requires make HOST_CC="gcc -m32" CROSS=ppu-lv2-

    @@ -4007,7 +4015,7 @@ index c491c601..9fad31f4 100644

    Embedding LuaJIT

    -@@ -590,14 +684,6 @@ the DLL). You may link LuaJIT statically on Windows only if you don't +@@ -590,14 +682,6 @@ the DLL). You may link LuaJIT statically on Windows only if you don't intend to load Lua/C modules at runtime.

  • @@ -4022,7 +4030,7 @@ index c491c601..9fad31f4 100644

    Additional hints for initializing LuaJIT using the C API functions:

      -@@ -606,16 +692,16 @@ you need to link your main executable with these flags: +@@ -606,16 +690,16 @@ you need to link your main executable with these flags: for embedding Lua or LuaJIT into your application.
    • Make sure you use luaL_newstate. Avoid using lua_newstate, since this uses the (slower) default memory @@ -4042,7 +4050,7 @@ index c491c601..9fad31f4 100644

    Hints for Distribution Maintainers

    -@@ -630,7 +716,7 @@ in unspeakable ways. +@@ -630,7 +714,7 @@ in unspeakable ways. There should be absolutely no need to patch luaconf.h or any of the Makefiles. And please do not hand-pick files for your packages — simply use whatever make install creates. There's a reason @@ -4051,7 +4059,7 @@ index c491c601..9fad31f4 100644

    The build system uses GNU make and auto-detects most settings based on -@@ -682,7 +768,7 @@ to me (the upstream) and not you (the package maintainer), anyway. +@@ -682,7 +766,7 @@ to me (the upstream) and not you (the package maintainer), anyway.

    -
    -

    - If you want to report bugs, propose fixes or suggest enhancements, - please use the --GitHub issue tracker. -+» GitHub issue tracker. -

    -

    - Please send general questions to the --» LuaJIT mailing list. -+» LuaJIT mailing list. -

    -

    - You can also send any questions you have directly to me: -@@ -90,10 +84,17 @@ xD("fyZKB8xv\"FJytmz8.KAB0u52D") -

    - - -+

    -+Note: I cannot reply to GMail, Google Workplace, Outlook or Office365 -+mail addresses, since they prefer to mindlessly filter out mails sent -+from small domains using independent mail servers, such as mine. If you -+don't like that, please complain to Google or Microsoft, not me. -+

    -+ -

    Copyright

    -

    - All documentation is --Copyright © 2005-2017 Mike Pall. -+Copyright © 2005-2022 Mike Pall. -

    - - -@@ -101,7 +102,7 @@ Copyright © 2005-2017 Mike Pall. -
    -