diff -Nru luajit-2.1.20220411/debian/changelog luajit-2.1.20230119/debian/changelog --- luajit-2.1.20220411/debian/changelog 2022-07-16 23:01:49.000000000 +0000 +++ luajit-2.1.20230119/debian/changelog 2023-01-19 11:00:06.000000000 +0000 @@ -1,7 +1,7 @@ -luajit (2.1.20220411-3myguard2~bionic) bionic; urgency=medium +luajit (2.1.20230119-3myguard1~bionic) bionic; urgency=medium * luajit2 from openresty * See for more http://deb.myguard.nl - -- Thijs Eilander Sun, 17 Jul 2022 01:01:49 +0200 + -- Thijs Eilander Thu, 19 Jan 2023 12:00:06 +0100 diff -Nru luajit-2.1.20220411/doc/contact.html luajit-2.1.20230119/doc/contact.html --- luajit-2.1.20220411/doc/contact.html 2022-04-05 12:12:47.000000000 +0000 +++ luajit-2.1.20230119/doc/contact.html 2023-01-02 04:12:33.000000000 +0000 @@ -50,8 +50,6 @@
  • FAQ
  • -Wiki » -
  • Mailing List »
  • @@ -86,6 +84,13 @@

    +

    +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 diff -Nru luajit-2.1.20220411/doc/ext_buffer.html luajit-2.1.20230119/doc/ext_buffer.html --- luajit-2.1.20220411/doc/ext_buffer.html 2022-04-05 12:12:47.000000000 +0000 +++ luajit-2.1.20230119/doc/ext_buffer.html 2023-01-02 04:12:33.000000000 +0000 @@ -61,8 +61,6 @@

  • FAQ
  • -Wiki » -
  • Mailing List »
  • @@ -86,7 +84,7 @@ operations.

    -The string buffer libary also includes a high-performance +The string buffer library also includes a high-performance serializer for Lua objects.

    @@ -434,8 +432,8 @@

    obj = buffer.decode(str)
    obj = buf:decode()

    -The stand-alone function de-serializes (decodes) the string -str, the buffer method de-serializes one object from the +The stand-alone function deserializes (decodes) the string +str, the buffer method deserializes one object from the buffer. Both return a Lua object obj.

    @@ -449,7 +447,7 @@ any left-over data in the buffer.

    -Attempting to de-serialize an FFI type will throw an error, if the FFI +Attempting to deserialize an FFI type will throw an error, if the FFI library is not built-in or has not been loaded, yet.

    @@ -462,7 +460,7 @@
  • dict is a Lua table holding a dictionary of strings that commonly occur as table keys of objects you are serializing. These keys -are compactly encoded as indexes during serialization. A well chosen +are compactly encoded as indexes during serialization. A well-chosen dictionary saves space and improves serialization performance.
  • @@ -473,7 +471,7 @@

    dict needs to be an array of strings and metatable needs to be an array of tables. Both starting at index 1 and without holes (no -nil inbetween). The tables are anchored in the buffer object and +nil in between). The tables are anchored in the buffer object and internally modified into a two-way index (don't do this yourself, just pass a plain array). The tables must not be modified after they have been passed to buffer.new(). @@ -624,7 +622,7 @@ There's not much one can do after that, anyway.

    -OTOH you may want to catch some errors individually. Buffer methods need +OTOH, you may want to catch some errors individually. Buffer methods need to receive the buffer object as the first argument. The Lua colon-syntax obj:method() does that implicitly. But to wrap a method with pcall(), the arguments need to be passed like this: diff -Nru luajit-2.1.20220411/doc/ext_c_api.html luajit-2.1.20230119/doc/ext_c_api.html --- luajit-2.1.20220411/doc/ext_c_api.html 2022-04-05 12:12:47.000000000 +0000 +++ luajit-2.1.20230119/doc/ext_c_api.html 2023-01-02 04:12:33.000000000 +0000 @@ -50,8 +50,6 @@

  • FAQ
  • -Wiki » -
  • Mailing List »
  • @@ -107,7 +105,7 @@ 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 -already compiled code or only flushes already compiled code. This +already compiled code, or only flushes already compiled code. This applies recursively to all sub-functions of the function with LUAJIT_MODE_ALLFUNC or only to the sub-functions with LUAJIT_MODE_ALLSUBFUNC. @@ -126,7 +124,7 @@ 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 -function. From now on all C functions are called through the wrapper +function. From now on, all C functions are called through the wrapper function. If called with LUAJIT_MODE_OFF this mode is turned off and all C functions are directly called.

    diff -Nru luajit-2.1.20220411/doc/extensions.html luajit-2.1.20230119/doc/extensions.html --- luajit-2.1.20220411/doc/extensions.html 2022-04-05 12:12:47.000000000 +0000 +++ luajit-2.1.20230119/doc/extensions.html 2023-01-02 04:12:33.000000000 +0000 @@ -67,8 +67,6 @@
  • FAQ
  • -Wiki » -
  • Mailing List »
  • @@ -88,7 +86,7 @@

    LuaJIT extends the standard Lua VM with new functionality and adds -several extension modules. Please note this page is only about +several extension modules. Please note, this page is only about functional enhancements and not about performance enhancements, such as the optimized VM, the faster interpreter or the JIT compiler.

    @@ -197,7 +195,7 @@

    The generated bytecode is portable and can be loaded on any architecture -that LuaJIT supports, independent of word size or endianess. However the +that LuaJIT supports, independent of word size or endianess. However, the bytecode compatibility versions must match. Bytecode stays compatible for dot releases (x.y.0 → x.y.1), but may change with major or minor releases (2.0 → 2.1) or between any beta release. Foreign @@ -229,7 +227,7 @@ incremental array/hash part growth.

    -Please note this function is meant for very specific situations. In most +Please note, this function is meant for very specific situations. In most cases it's better to replace the (usually single) link with a new table and let the GC do its work.

    @@ -239,7 +237,7 @@ LuaJIT uses a Tausworthe PRNG with period 2^223 to implement math.random() and math.randomseed(). The quality of the PRNG results is much superior compared to the standard Lua -implementation which uses the platform-specific ANSI rand(). +implementation, which uses the platform-specific ANSI rand().

    The PRNG generates the same sequences from the same seeds on all @@ -257,7 +255,7 @@

    io.* functions handle 64 bit file offsets

    The file I/O functions in the standard io.* library handle -64 bit file offsets. In particular this means it's possible +64 bit file offsets. In particular, this means it's possible to open files larger than 2 Gigabytes and to reposition or obtain the current file position for offsets beyond 2 GB (fp:seek() method). diff -Nru luajit-2.1.20220411/doc/ext_ffi_api.html luajit-2.1.20230119/doc/ext_ffi_api.html --- luajit-2.1.20220411/doc/ext_ffi_api.html 2022-04-05 12:12:47.000000000 +0000 +++ luajit-2.1.20230119/doc/ext_ffi_api.html 2023-01-02 04:12:33.000000000 +0000 @@ -55,8 +55,6 @@

  • FAQ
  • -Wiki » -
  • Mailing List »
  • @@ -121,7 +119,7 @@ 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).

    @@ -209,7 +207,7 @@ 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 @@ -256,12 +254,12 @@ 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 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() @@ -492,7 +490,7 @@

    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).

    diff -Nru luajit-2.1.20220411/doc/ext_ffi.html luajit-2.1.20230119/doc/ext_ffi.html --- luajit-2.1.20220411/doc/ext_ffi.html 2022-04-05 12:12:47.000000000 +0000 +++ luajit-2.1.20230119/doc/ext_ffi.html 2023-01-02 04:12:33.000000000 +0000 @@ -50,8 +50,6 @@
  • FAQ
  • -Wiki » -
  • Mailing List »
  • @@ -157,7 +155,7 @@

    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.

    @@ -169,7 +167,7 @@ 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:

    @@ -184,7 +182,7 @@
       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
    @@ -194,14 +192,14 @@
     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 ...

    @@ -308,7 +306,7 @@ ~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, diff -Nru luajit-2.1.20220411/doc/ext_ffi_semantics.html luajit-2.1.20230119/doc/ext_ffi_semantics.html --- luajit-2.1.20220411/doc/ext_ffi_semantics.html 2022-04-05 12:12:47.000000000 +0000 +++ luajit-2.1.20230119/doc/ext_ffi_semantics.html 2023-01-02 04:12:33.000000000 +0000 @@ -55,8 +55,6 @@

  • FAQ
  • -Wiki » -
  • Mailing List »
  • @@ -88,7 +86,7 @@ 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. @@ -165,7 +163,7 @@

    -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):

    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).

    @@ -656,7 +654,7 @@

    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.

    @@ -675,8 +673,8 @@ 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 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 @@ -687,7 +685,7 @@ 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.
  • @@ -697,7 +695,7 @@
  • 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.
  • @@ -712,7 +710,7 @@ 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.
    @@ -759,7 +757,7 @@
  • 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.
    @@ -784,9 +782,9 @@ 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].

    @@ -808,7 +806,7 @@ 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 @@ -816,7 +814,7 @@
  • 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.
  • @@ -882,7 +880,7 @@ 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: @@ -931,18 +929,18 @@

    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 @@ -1003,7 +1001,7 @@ __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() @@ -1056,7 +1054,7 @@

    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). @@ -1075,7 +1073,7 @@

    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 @@ -1130,7 +1128,7 @@ 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.

    @@ -1155,14 +1153,14 @@ 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++.

    @@ -1190,7 +1188,7 @@
  • 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 diff -Nru luajit-2.1.20220411/doc/ext_ffi_tutorial.html luajit-2.1.20230119/doc/ext_ffi_tutorial.html --- luajit-2.1.20220411/doc/ext_ffi_tutorial.html 2022-04-05 12:12:47.000000000 +0000 +++ luajit-2.1.20230119/doc/ext_ffi_tutorial.html 2023-01-02 04:12:33.000000000 +0000 @@ -57,8 +57,6 @@
  • FAQ
  • -Wiki » -
  • Mailing List »
  • @@ -85,7 +83,7 @@ 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.

    @@ -194,7 +192,7 @@ 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. @@ -291,12 +289,12 @@

    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 @@ -324,7 +322,7 @@

    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.

    @@ -348,7 +346,7 @@ 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 @@ -382,7 +380,7 @@ 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. @@ -454,7 +452,7 @@

    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.

    @@ -468,13 +466,13 @@ 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 @@ -483,7 +481,7 @@

    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 @@ -569,7 +567,7 @@

    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:

    diff -Nru luajit-2.1.20220411/doc/ext_jit.html luajit-2.1.20230119/doc/ext_jit.html
    --- luajit-2.1.20220411/doc/ext_jit.html	2022-04-05 12:12:47.000000000 +0000
    +++ luajit-2.1.20230119/doc/ext_jit.html	2023-01-02 04:12:33.000000000 +0000
    @@ -50,8 +50,6 @@
     
  • FAQ
  • -Wiki » -
  • Mailing List »
  • @@ -154,7 +152,7 @@

    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.

    @@ -174,7 +172,7 @@

    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.

    diff -Nru luajit-2.1.20220411/doc/ext_profiler.html luajit-2.1.20230119/doc/ext_profiler.html --- luajit-2.1.20220411/doc/ext_profiler.html 2022-04-05 12:12:47.000000000 +0000 +++ luajit-2.1.20230119/doc/ext_profiler.html 2023-01-02 04:12:33.000000000 +0000 @@ -50,8 +50,6 @@
  • FAQ
  • -Wiki » -
  • Mailing List »
  • @@ -158,7 +156,7 @@ 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?".

    @@ -217,7 +215,7 @@ 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. @@ -271,9 +269,9 @@ 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.
    • diff -Nru luajit-2.1.20220411/doc/faq.html luajit-2.1.20230119/doc/faq.html --- luajit-2.1.20220411/doc/faq.html 2022-04-05 12:12:47.000000000 +0000 +++ luajit-2.1.20230119/doc/faq.html 2023-01-02 04:12:33.000000000 +0000 @@ -53,8 +53,6 @@
    • FAQ
    • -Wiki » -
    • Mailing List »
    @@ -65,8 +63,6 @@
    • The » LuaJIT mailing list focuses on topics related to LuaJIT.
    • -
    • The » LuaJIT wiki gathers community -resources about LuaJIT.
    • News about Lua itself can be found at the » Lua mailing list. The mailing list archives are worth checking out for older postings @@ -120,7 +116,7 @@ Consider testing your application with older versions, too.
      Similarly, the Borland/Delphi runtime modifies the FPU control word and -enables FP exceptions. Of course this violates the Windows ABI, too. +enables FP exceptions. Of course, this violates the Windows ABI, too. Please check the Delphi docs for the Set8087CW method. @@ -130,7 +126,7 @@ ignored by compiled code. If your program is running in a tight loop and never falls back to the interpreter, the debug hook never runs and can't throw the "interrupted!" error.
      -You have to press Ctrl-C twice to get stop your program. That's similar +You have to press Ctrl-C twice to stop your program. That's similar to when it's stuck running inside a C function under the Lua interpreter. @@ -150,7 +146,7 @@
      Q: Can Lua code be safely sandboxed?
      -Maybe for an extremly restricted subset of Lua and if you relentlessly +Maybe for an extremely restricted subset of Lua and if you relentlessly scrutinize every single interface function you offer to the untrusted code.
      Although Lua provides some sandboxing functionality (setfenv(), hooks), diff -Nru luajit-2.1.20220411/doc/install.html luajit-2.1.20230119/doc/install.html --- luajit-2.1.20220411/doc/install.html 2022-04-05 12:12:47.000000000 +0000 +++ luajit-2.1.20230119/doc/install.html 2023-01-02 04:12:33.000000000 +0000 @@ -14,25 +14,20 @@ } table.compat td { border: 1px solid #bfcfff; - height: 2.5em; + height: 1.5em; } table.compat tr.compathead td { font-weight: bold; border-bottom: 2px solid #bfcfff; } -tr.compathead td.compatos { - vertical-align: top; +td.compatname, td.compatver { + width: 10%; } -table.compat td.compatcpu { - width: 18%; - border-right: 2px solid #bfcfff; +td.compatbits { + width: 5%; } -td.compatos { +td.compatx { width: 21%; - vertical-align: middle; -} -td.compatno { - background-color: #d0d0d0; } @@ -78,8 +73,6 @@
    • FAQ
    • -Wiki » -
    • Mailing List »
    @@ -95,62 +88,204 @@
     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, OthermacOS 10.4+ or
    iOS 3.0+
    Windows 7
    or later
    OSMin. VersionRequirementsLuaJIT Versions
    x86 (32 bit)GCC 4.2+GCC 4.2+XCode 5.0+
    Clang
    MSVC
    MinGW, Cygwin
    x64 (64 bit)GCC 4.2+GCC 4.2+
    ORBIS (PS4)
    XCode 5.0+
    Clang
    MSVC
    Durango (Xbox One)
    ARMv5+
    ARM9E+
    GCC 4.2+GCC 4.2+
    PSP2 (PS VITA)
    XCode 5.0+
    Clang
     
    ARM64
    ARM64be
    GCC 4.8+ XCode 6.0+
    Clang 3.5+
     
    PPCGCC 4.3+GCC 4.3+
    GCC 4.1 (PS3)
     XEDK (Xbox 360)
    MIPS32
    MIPS64
    MIPS64r6
    GCC 4.3+GCC 4.3+  Windows7x86 or x64, ARM64: TBAv2.0 –
    Linux  v2.0 –
    *BSD  v2.0 –
    macOS (OSX)10.4 v2.1 –
    POSIX mmap, dlopenv2.0 –
    Android4.0Recent Android NDKv2.0 –
    iOS3.0Xcode iOS SDKv2.1 –
    PS3 PS3 SDKv2.0 – v2.1 EOL
    PS4 PS4 SDK (ORBIS)v2.0 –
    PS5 PS5 SDK (PROSPERO)v2.1 –
    PS Vita PS Vita SDK (PSP2)v2.0 – v2.1 EOL
    Xbox 360 Xbox 360 SDK (XEDK)v2.0 – v2.1 EOL
    Xbox One Xbox One SDK (DURANGO)v2.1 –
    Nintendo Switch NintendoSDK + NX Addonv2.1 –
    +

    +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 +MSVC++. +

    +

    +The Makefile-based build system requires GNU Make and supports +cross-builds. Batch files are provided for MSVC++ builds and console +cross-builds. +

    +

    CPU Architectures

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    CPUBitsRequirementsVariantsLuaJIT Versions
    x8632v2.1+: SSE2 v2.0 –
    x6464  v2.0 –
    ARM32ARMv5+, ARM9E+hard-fp + soft-fpv2.0 –
    ARM6464 ARM64le + ARM64bev2.1 –
    PPC3232 hard-fp + soft-fpv2.0 – v2.1 EOL
    PPC/e50032e500v2 v2.0 EOL
    MIPS3232MIPS32r1 – r5hard-fp + soft-fpv2.0 –
    MIPS6464MIPS64r1 – r5hard-fp + soft-fpv2.1 –
    MIPS6464MIPS64r6hard-fp + soft-fpv2.1 EOL
    RISC-V64RVA22+ 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 +available anymore. Likewise, there are no plans to support marginal +and/or de-facto-dead architectures. +

    Configuring LuaJIT

    @@ -191,7 +326,7 @@ the git repository.

    -Alternatively download the latest source package of LuaJIT (pick the .tar.gz). +Alternatively, download the latest source package of LuaJIT (pick the .tar.gz). Move it to a directory of your choice, open a terminal window and change to this directory. Now unpack the archive and change to the newly created directory (replace XX.YY.ZZ with the version you downloaded): @@ -446,8 +581,7 @@

    Cross-compiling for consoles

    Building LuaJIT for consoles requires both a supported host compiler -(x86 or x64) and a cross-compiler (to PPC or ARM) from the official -console SDK. +(x86 or x64) and a cross-compiler from the official console SDK.

    Due to restrictions on consoles, the JIT compiler is disabled and only @@ -468,45 +602,58 @@ make HOST_CC="gcc -m32" CROSS=ppu-lv2-

    -To cross-compile for PS4 from a Windows host, -open a "Visual Studio .NET Command Prompt" (64 bit host compiler), -cd to the directory where you've unpacked the sources and -run the following commands: +To cross-compile for the other consoles from a Windows host, open a +"Native Tools Command Prompt for VS". You need to choose either the 32 +or the 64 bit version of the host compiler to match the target. +Then cd to the src directory below where you've +unpacked the sources and run the build command given in the table:

    -
    -cd src
    -ps4build
    -
    -

    -To cross-compile for PS Vita from a Windows host, -open a "Visual Studio .NET Command Prompt" (32 bit host compiler), -cd to the directory where you've unpacked the sources and -run the following commands: -

    -
    -cd src
    -psvitabuild
    -
    -

    -To cross-compile for Xbox 360 from a Windows host, -open a "Visual Studio .NET Command Prompt" (32 bit host compiler), -cd to the directory where you've unpacked the sources and run -the following commands: -

    -
    -cd src
    -xedkbuild
    -
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ConsoleBitsBuild Command
    PS464ps4build
    PS564ps5build
    PS Vita32psvitabuild
    Xbox 36032xedkbuild
    Xbox One64xb1build
    Nintendo Switch NX3232nxbuild
    Nintendo Switch NX6464nxbuild

    -To cross-compile for Xbox One from a Windows host, -open a "Visual Studio .NET Command Prompt" (64 bit host compiler), -cd to the directory where you've unpacked the sources and run -the following commands: +Please check out the comments in the corresponding *.bat +file for more options.

    -
    -cd src
    -xb1build
    -

    Embedding LuaJIT

    @@ -548,7 +695,7 @@ of calling luaopen_base etc. directly.

  • To change or extend the list of standard libraries to load, copy src/lib_init.c to your project and modify it accordingly. -Make sure the jit library is loaded or the JIT compiler +Make sure the jit library is loaded, or the JIT compiler will not be activated.
  • The bit.* module for bitwise operations is already built-in. There's no need to statically link @@ -567,7 +714,7 @@ 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 -for all of the files and directories it creates. +for all the files and directories it creates.

    The build system uses GNU make and auto-detects most settings based on diff -Nru luajit-2.1.20220411/doc/luajit.html luajit-2.1.20230119/doc/luajit.html --- luajit-2.1.20220411/doc/luajit.html 2022-04-05 12:12:47.000000000 +0000 +++ luajit-2.1.20230119/doc/luajit.html 2023-01-02 04:12:33.000000000 +0000 @@ -135,8 +135,6 @@

  • FAQ
  • -Wiki » -
  • Mailing List »
  • @@ -162,7 +160,7 @@ EmbeddedAndroidiOS - +
    PS3PS4PS VitaXbox 360Xbox One
    PS3PS4
    PS5
    PS VitaXbox 360Xbox OneNintendo
    Switch
    diff -Nru luajit-2.1.20220411/doc/running.html luajit-2.1.20230119/doc/running.html --- luajit-2.1.20220411/doc/running.html 2022-04-05 12:12:47.000000000 +0000 +++ luajit-2.1.20230119/doc/running.html 2023-01-02 04:12:33.000000000 +0000 @@ -72,8 +72,6 @@
  • FAQ
  • -Wiki » -
  • Mailing List »
  • @@ -111,6 +109,7 @@
  • -t type — Set output file type (default: auto-detect from output name).
  • -a arch — Override architecture for object files (default: native).
  • -o os — Override OS for object files (default: native).
  • +
  • -F name — Override filename (default: input filename).
  • -e chunk — Use chunk string as input.
  • - (a single minus sign) — Use stdin as input and/or stdout as output.
  • @@ -184,7 +183,7 @@ itself. For a description of their options and output format, please read the comment block at the start of their source. They can be found in the lib directory of the source -distribution or installed under the jit directory. By default +distribution or installed under the jit directory. By default, this is /usr/local/share/luajit-XX.YY.ZZ>/jit on POSIX systems (replace XX.YY.ZZ by the installed version).

    @@ -216,11 +215,17 @@ You can either use this option multiple times (like -Ocse -O-dce -Ohotloop=10) or separate several settings with a comma (like -O+cse,-dce,hotloop=10). The settings are applied from -left to right and later settings override earlier ones. You can freely +left to right, and later settings override earlier ones. You can freely mix the three forms, but note that setting an optimization level overrides all earlier flags.

    +Note that -Ofma is not enabled by default at any level, +because it affects floating-point result accuracy. Only enable this, +if you fully understand the trade-offs of FMA for performance (higher), +determinism (lower) and numerical accuracy (higher). +

    +

    Here are the available flags and at what optimization levels they are enabled:

    @@ -252,6 +257,8 @@ + +
    GCCClang
    LLVM
    MSVC
    sink  Allocation/Store Sinking
    fuse  Fusion of operands into instructions
    fma    Fused multiply-add

    Here are the parameters and their default settings: diff -Nru luajit-2.1.20220411/doc/status.html luajit-2.1.20230119/doc/status.html --- luajit-2.1.20220411/doc/status.html 2022-04-05 12:12:47.000000000 +0000 +++ luajit-2.1.20230119/doc/status.html 2023-01-02 04:12:33.000000000 +0000 @@ -53,8 +53,6 @@

  • FAQ
  • -Wiki » -
  • Mailing List »
  • @@ -83,7 +81,7 @@