From c34594681909cac98d44629863df2c7afd93eaf0 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Mon, 21 Aug 2023 02:28:49 +0200 Subject: [PATCH] Update documentation for switch to rolling releases. --- README | 4 +- doc/bluequad.css | 8 +- doc/contact.html | 4 +- doc/ext_c_api.html | 4 +- doc/ext_ffi.html | 4 +- doc/ext_ffi_api.html | 4 +- doc/ext_ffi_semantics.html | 4 +- doc/ext_ffi_tutorial.html | 4 +- doc/ext_jit.html | 8 +- doc/extensions.html | 5 +- doc/faq.html | 191 ------------------------------ doc/install.html | 236 +++---------------------------------- doc/luajit.html | 53 ++------- doc/running.html | 5 +- doc/status.html | 107 ----------------- 15 files changed, 60 insertions(+), 581 deletions(-) delete mode 100644 doc/faq.html delete mode 100644 doc/status.html diff --git a/README b/README index 7a97df6b..dfa7ca94 100644 --- a/README +++ b/README @@ -1,5 +1,5 @@ -README for LuaJIT 2.0.5 ------------------------ +README for LuaJIT 2.0 +--------------------- LuaJIT is a Just-In-Time (JIT) compiler for the Lua programming language. diff --git a/doc/bluequad.css b/doc/bluequad.css index 14a0d1b9..7399f625 100644 --- a/doc/bluequad.css +++ b/doc/bluequad.css @@ -206,11 +206,9 @@ img.right { .ext { color: #ff8000; } -.new { - font-size: 6pt; - vertical-align: middle; - background: #ff8000; - color: #ffffff; +.note { + padding: 0.5em 1em; + border-left: 3px solid #bfcfff; } #site { clear: both; diff --git a/doc/contact.html b/doc/contact.html index 7b8cd404..c32bc9dc 100644 --- a/doc/contact.html +++ b/doc/contact.html @@ -42,9 +42,9 @@ Lua/C API
  • -Status +Status »
  • -FAQ +FAQ »
  • Mailing List »
  • diff --git a/doc/ext_c_api.html b/doc/ext_c_api.html index ee64ec0f..43c82047 100644 --- a/doc/ext_c_api.html +++ b/doc/ext_c_api.html @@ -42,9 +42,9 @@ Lua/C API
  • -Status +Status »
  • -FAQ +FAQ »
  • Mailing List »
  • diff --git a/doc/ext_ffi.html b/doc/ext_ffi.html index c78fef84..683c0cd0 100644 --- a/doc/ext_ffi.html +++ b/doc/ext_ffi.html @@ -42,9 +42,9 @@ Lua/C API
  • -Status +Status »
  • -FAQ +FAQ »
  • Mailing List »
  • diff --git a/doc/ext_ffi_api.html b/doc/ext_ffi_api.html index 570ea4fe..d5f7032f 100644 --- a/doc/ext_ffi_api.html +++ b/doc/ext_ffi_api.html @@ -47,9 +47,9 @@ td.abiparam { font-weight: bold; width: 6em; } Lua/C API
  • -Status +Status »
  • -FAQ +FAQ »
  • Mailing List »
  • diff --git a/doc/ext_ffi_semantics.html b/doc/ext_ffi_semantics.html index 5ecb2f4e..381a2010 100644 --- a/doc/ext_ffi_semantics.html +++ b/doc/ext_ffi_semantics.html @@ -47,9 +47,9 @@ td.convop { font-style: italic; width: 40%; } Lua/C API
  • -Status +Status »
  • -FAQ +FAQ »
  • Mailing List »
  • diff --git a/doc/ext_ffi_tutorial.html b/doc/ext_ffi_tutorial.html index 94e2f61d..03b6ec56 100644 --- a/doc/ext_ffi_tutorial.html +++ b/doc/ext_ffi_tutorial.html @@ -49,9 +49,9 @@ td.idiomlua b { font-weight: normal; color: #2142bf; } Lua/C API
  • -Status +Status »
  • -FAQ +FAQ »
  • Mailing List »
  • diff --git a/doc/ext_jit.html b/doc/ext_jit.html index 908701b6..b1dbf36c 100644 --- a/doc/ext_jit.html +++ b/doc/ext_jit.html @@ -42,9 +42,9 @@ Lua/C API
  • -Status +Status »
  • -FAQ +FAQ »
  • Mailing List »
  • @@ -131,7 +131,9 @@ Contains the LuaJIT version string.

    jit.version_num

    Contains the version number of the LuaJIT core. Version xx.yy.zz -is represented by the decimal number xxyyzz. +is represented by the decimal number xxyyzz.
    +DEPRECATED after the switch to +» rolling releases. zz is frozen at 99.

    jit.os

    diff --git a/doc/extensions.html b/doc/extensions.html index fc673ef7..f8b45c28 100644 --- a/doc/extensions.html +++ b/doc/extensions.html @@ -59,14 +59,15 @@ td.excinterop { Lua/C API
  • -Status +Status »
  • -FAQ +FAQ »
  • Mailing List »
  • +

    LuaJIT is fully upwards-compatible with Lua 5.1. It supports all » standard Lua diff --git a/doc/faq.html b/doc/faq.html deleted file mode 100644 index f160fffe..00000000 --- a/doc/faq.html +++ /dev/null @@ -1,191 +0,0 @@ - - - -Frequently Asked Questions (FAQ) - - - - - - - - -

    - - -
    -
    -
    Q: Where can I learn more about LuaJIT and Lua?
    -
    -
    -
    - -
    -
    Q: Where can I learn more about the compiler technology used by LuaJIT?
    -
    -Please use the following Google Scholar searches to find relevant papers:
    -Search for: » Trace Compiler
    -Search for: » JIT Compiler
    -Search for: » Dynamic Language Optimizations
    -Search for: » SSA Form
    -Search for: » Linear Scan Register Allocation
    -Here is a list of the » innovative features in LuaJIT.
    -And, you know, reading the source is of course the only way to enlightenment. -
    -
    - -
    -
    Q: Why do I get this error: "attempt to index global 'arg' (a nil value)"?
    -Q: My vararg functions fail after switching to LuaJIT!
    -
    LuaJIT is compatible to the Lua 5.1 language standard. It doesn't -support the implicit arg parameter for old-style vararg -functions from Lua 5.0.
    Please convert your code to the -» Lua 5.1 -vararg syntax.
    -
    - -
    -
    Q: Why do I get this error: "bad FPU precision"?
    -
    Q: I get weird behavior after initializing Direct3D.
    -
    Q: Some FPU operations crash after I load a Delphi DLL.
    -
    -
    - -DirectX/Direct3D (up to version 9) sets the x87 FPU to single-precision -mode by default. This violates the Windows ABI and interferes with the -operation of many programs — LuaJIT is affected, too. Please make -sure you always use the D3DCREATE_FPU_PRESERVE flag when -initializing Direct3D.
    - -Direct3D version 10 or higher do not show this behavior anymore. -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. -Please check the Delphi docs for the Set8087CW method.
    -
    - -
    -
    Q: Sometimes Ctrl-C fails to stop my Lua program. Why?
    -
    The interrupt signal handler sets a Lua debug hook. But this is -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 stop your program. That's similar -to when it's stuck running inside a C function under the Lua interpreter.
    -
    - -
    -
    Q: Table iteration with pairs() does not result in the same order?
    -
    The order of table iteration is explicitly undefined by -the Lua language standard.
    -Different Lua implementations or versions may use different orders for -otherwise identical tables. Different ways of constructing a table may -result in different orders, too.
    -Due to improved VM security, LuaJIT 2.1 may even use a different order -on separate VM invocations or when string keys are newly interned.

    -If your program relies on a deterministic order, it has a bug. Rewrite it, -so it doesn't rely on the key order. Or sort the table keys, if you must.
    -
    - -
    -
    Q: Can Lua code be safely sandboxed?
    -
    -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), -it's very hard to get this right even for the Lua core libraries. Of course, -you'll need to inspect any extension library, too. And there are libraries -that are inherently unsafe, e.g. the FFI library.
    - -More reading material at the » Lua Wiki and » Wikipedia.

    - -Relatedly, loading untrusted bytecode is not safe!
    - -It's trivial to crash the Lua or LuaJIT VM with maliciously crafted bytecode. -This is well known and there's no bytecode verification on purpose, so please -don't report a bug about it. Check the mode parameter for the -load*() functions to disable loading of bytecode.

    - -In general, the only promising approach is to sandbox Lua code at the -process level and not the VM level. -
    -
    - -
    -
    Q: Lua runs everywhere. Why doesn't LuaJIT support my CPU?
    -
    Because it's a compiler — it needs to generate native -machine code. This means the code generator must be ported to each -architecture. And the fast interpreter is written in assembler and -must be ported, too. This is quite an undertaking.
    -The install documentation shows the supported -architectures.
    -Other architectures may follow based on sufficient user demand and -market-relevance of the architecture. Sponsoring is required to develop -the port itself, to integrate it and to continuously maintain it in the -actively developed branches.
    -
    -
    -
    - - - diff --git a/doc/install.html b/doc/install.html index c960e071..21866315 100644 --- a/doc/install.html +++ b/doc/install.html @@ -20,7 +20,7 @@ table.compat tr.compathead td { font-weight: bold; border-bottom: 2px solid #bfcfff; } -td.compatname, td.compatver { +td.compatname { width: 10%; } td.compatbits { @@ -65,18 +65,18 @@ td.compatx { Lua/C API
  • -Status +Status »
  • -FAQ +FAQ »
  • Mailing List »
  • -LuaJIT is only distributed as a source package. This page explains -how to build and install LuaJIT with different operating systems -and C compilers. +LuaJIT is only distributed as source code — get it from the +» git repository. This page explains how to build +and install the LuaJIT binary and library for different operating systems.

    For the impatient (on POSIX systems): @@ -86,201 +86,21 @@ make && sudo make install

    Requirements

    -

    Systems

    -LuaJIT currently builds out-of-the box on most systems: +LuaJIT currently builds out-of-the box on most systems. Please check the +supported operating systems and CPU architectures on the +» status page.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    OSMin. VersionRequirementsLuaJIT Versions
    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. +Batch files are provided for MSVC++ builds and console cross-builds.

    Configuring LuaJIT

    @@ -290,7 +110,6 @@ Usually there is no need to tweak the settings. The following files hold all user-configurable settings:

  • -Status +Status »
  • -FAQ +FAQ »
  • Mailing List »
  • +

    LuaJIT has only a single stand-alone executable, called luajit on POSIX systems or luajit.exe on Windows. It can be used to run simple diff --git a/doc/status.html b/doc/status.html deleted file mode 100644 index b69a9721..00000000 --- a/doc/status.html +++ /dev/null @@ -1,107 +0,0 @@ - - - -Status - - - - - - - - -

    -Lua -
    - - -
    -

    -This documentation is for LuaJIT 2.0.5. Please check the doc -directory in each git branch for the version-specific documentation. -

    -

    -The currently developed branches are LuaJIT 2.1 and LuaJIT 2.0. -

    -

    -LuaJIT 2.0 is in feature-freeze — new features will only -be added to LuaJIT 2.1. -

    - -

    Current Status

    -

    -LuaJIT ought to run all Lua 5.1-compatible source code just fine. -It's considered a serious bug if the VM crashes or produces unexpected -results — please report this. -

    -

    -Known incompatibilities and issues in LuaJIT 2.0: -

    -
      -
    • -There are some differences in implementation-defined behavior. -These either have a good reason, are arbitrary design choices, -or are due to quirks in the VM. The latter cases may get fixed if a -demonstrable need is shown. -
    • -
    • -The Lua debug API is missing a couple of features (return -hooks for non-Lua functions) and shows slightly different behavior -in LuaJIT (no per-coroutine hooks, no tail call counting). -
    • -
    • -Currently, some out-of-memory errors from on-trace code are not -handled correctly. The error may fall through an on-trace -pcall or it may be passed on to the function set with -lua_atpanic on x64. -
    • -
    -
    -
    - - -