Mirror of the LuaJIT git repository
Go to file
Ilya Leoshkevich 6a079a441b FFI: Support VLA function parameters
glibc 2.39's regex.h contains the following declaration:

    extern int regexec (const regex_t *_Restrict_ __preg,
                        const char *_Restrict_ __String, size_t __nmatch,
                        regmatch_t __pmatch[_Restrict_arr_
                                            _REGEX_NELTS (__nmatch)],
                        int __eflags);

__pmatch is a VLA, which LuaJIT currently cannot parse. Implement
parsing VLA function parameters as follows:

- Allow parsing CT_FIELD identifiers. Long-term it's probably better to
  define a new CT_* constant to avoid mix-ups, but currently struct
  fields are not added to the hash, so in this context CT_FIELD is
  guaranteed to be a function parameter.
- Allow function parameter lists to reference CT_FIELD ctypes (function
  parameters are CT_FIELDs).
- Add function parameters to the hash table as they are being parsed;
  remove them after the function parameter list is parsed, since they
  go out of scope.
- Mark CPValues that are compile-time constants using the new "imm"
  flag. Integer literals and enum members are compile-time constants;
  arithmetic operations propagate this property if all operands are
  compile-time constants.
- Distinguish array sizes that are compile-time constants from those
  that are not. Treat variable sizes as CTSIZE_INVALID.
2024-11-12 21:33:52 +01:00
doc Call math.randomseed() without arguments to seed from system entropy. 2024-07-04 01:26:29 +02:00
dynasm DynASM/x86: Add endbr instruction. 2024-01-22 19:17:45 +01:00
etc Merge branch 'master' into v2.1 2023-08-21 03:18:35 +02:00
src FFI: Support VLA function parameters 2024-11-12 21:33:52 +01:00
.gitattributes Add .gitattributes to dynamically resolve .relver. 2023-08-22 15:30:27 +02:00
.gitignore RELEASE LuaJIT-2.0.0-beta1 2009-12-08 19:46:35 +01:00
.relver Add .gitattributes to dynamically resolve .relver. 2023-08-22 15:30:27 +02:00
COPYRIGHT Bump copyright date. 2023-08-20 21:25:30 +02:00
Makefile Reflect override of INSTALL_LJLIBD in package.path. 2024-08-15 00:38:43 +02:00
README Merge branch 'master' into v2.1 2023-08-21 02:38:56 +02:00

README for LuaJIT 2.1
---------------------

LuaJIT is a Just-In-Time (JIT) compiler for the Lua programming language.

Project Homepage: https://luajit.org/

LuaJIT is Copyright (C) 2005-2023 Mike Pall.
LuaJIT is free software, released under the MIT license.
See full Copyright Notice in the COPYRIGHT file or in luajit.h.

Documentation for LuaJIT is available in HTML format.
Please point your favorite browser to:

 doc/luajit.html