w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

lj_def.h File Reference
#include "lua.h"
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
Include dependency graph for lj_def.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define LJ_MAX_MEM32   0x7fffff00 /* Max. 32 bit memory allocation. */
 
#define LJ_MAX_MEM64   ((uint64_t)1<<47) /* Max. 64 bit memory allocation. */
 
#define LJ_MAX_MEM   (LJ_GC64 ? LJ_MAX_MEM64 : LJ_MAX_MEM32)
 
#define LJ_MAX_ALLOC   LJ_MAX_MEM /* Max. individual allocation length. */
 
#define LJ_MAX_STR   LJ_MAX_MEM32 /* Max. string length. */
 
#define LJ_MAX_BUF   LJ_MAX_MEM32 /* Max. buffer length. */
 
#define LJ_MAX_UDATA   LJ_MAX_MEM32 /* Max. userdata length. */
 
#define LJ_MAX_STRTAB   (1<<26) /* Max. string table size. */
 
#define LJ_MAX_HBITS   26 /* Max. hash bits. */
 
#define LJ_MAX_ABITS   28 /* Max. bits of array key. */
 
#define LJ_MAX_ASIZE   ((1<<(LJ_MAX_ABITS-1))+1) /* Max. array part size. */
 
#define LJ_MAX_COLOSIZE   16 /* Max. elems for colocated array. */
 
#define LJ_MAX_LINE   LJ_MAX_MEM32 /* Max. source code line number. */
 
#define LJ_MAX_XLEVEL   200 /* Max. syntactic nesting level. */
 
#define LJ_MAX_BCINS   (1<<26) /* Max. # of bytecode instructions. */
 
#define LJ_MAX_SLOTS   250 /* Max. # of slots in a Lua func. */
 
#define LJ_MAX_LOCVAR   200 /* Max. # of local variables. */
 
#define LJ_MAX_UPVAL   249 /* Max. # of upvalues. */
 
#define LJ_MAX_IDXCHAIN   100 /* __index/__newindex chain limit. */
 
#define LJ_STACK_EXTRA   (5+2*LJ_FR2) /* Extra stack space (metamethods). */
 
#define LJ_NUM_CBPAGE   1 /* Number of FFI callback pages. */
 
#define LJ_MIN_GLOBAL   6 /* Min. global table size (hbits). */
 
#define LJ_MIN_REGISTRY   2 /* Min. registry size (hbits). */
 
#define LJ_MIN_STRTAB   256 /* Min. string table size (pow2). */
 
#define LJ_MIN_SBUF   32 /* Min. string buffer length. */
 
#define LJ_MIN_VECSZ   8 /* Min. size for growable vectors. */
 
#define LJ_MIN_IRSZ   32 /* Min. size for growable IR. */
 
#define LJ_MIN_K64SZ   16 /* Min. size for chained K64Array. */
 
#define LJ_MAX_JSLOTS   250 /* Max. # of stack slots for a trace. */
 
#define LJ_MAX_PHI   64 /* Max. # of PHIs for a loop. */
 
#define LJ_MAX_EXITSTUBGR   16 /* Max. # of exit stub groups. */
 
#define UNUSED(x)   ((void)(x)) /* to avoid warnings */
 
#define U64x(hi, lo)   (((uint64_t)0x##hi << 32) + (uint64_t)0x##lo)
 
#define i32ptr(p)   ((int32_t)(intptr_t)(void *)(p))
 
#define u32ptr(p)   ((uint32_t)(intptr_t)(void *)(p))
 
#define i64ptr(p)   ((int64_t)(intptr_t)(void *)(p))
 
#define u64ptr(p)   ((uint64_t)(intptr_t)(void *)(p))
 
#define igcptr(p)   (LJ_GC64 ? i64ptr(p) : i32ptr(p))
 
#define checki8(x)   ((x) == (int32_t)(int8_t)(x))
 
#define checku8(x)   ((x) == (int32_t)(uint8_t)(x))
 
#define checki16(x)   ((x) == (int32_t)(int16_t)(x))
 
#define checku16(x)   ((x) == (int32_t)(uint16_t)(x))
 
#define checki32(x)   ((x) == (int32_t)(x))
 
#define checku32(x)   ((x) == (uint32_t)(x))
 
#define checkptr32(x)   ((uintptr_t)(x) == (uint32_t)(uintptr_t)(x))
 
#define checkptr47(x)   (((uint64_t)(uintptr_t)(x) >> 47) == 0)
 
#define checkptrGC(x)   (LJ_GC64 ? checkptr47((x)) : LJ_64 ? checkptr32((x)) :1)
 
#define lj_rol(x, n)   (((x)<<(n)) | ((x)>>(-(int)(n)&(8*sizeof(x)-1))))
 
#define lj_ror(x, n)   (((x)<<(-(int)(n)&(8*sizeof(x)-1))) | ((x)>>(n)))
 
#define BLOOM_MASK   (8*sizeof(BloomFilter) - 1)
 
#define bloombit(x)   ((uintptr_t)1 << ((x) & BLOOM_MASK))
 
#define bloomset(b, x)   ((b) |= bloombit((x)))
 
#define bloomtest(b, x)   ((b) & bloombit((x)))
 
#define LJ_FASTCALL
 
#define LJ_NORET
 
#define LJ_NOAPI   extern
 
#define LJ_LIKELY(x)   (x)
 
#define LJ_UNLIKELY(x)   (x)
 
#define LJ_DATA   LJ_NOAPI
 
#define LJ_DATADEF
 
#define LJ_ASMF   LJ_NOAPI
 
#define LJ_FUNCA   LJ_NOAPI
 
#define LJ_FUNC   LJ_NOAPI
 
#define LJ_FUNC_NORET   LJ_FUNC LJ_NORET
 
#define LJ_FUNCA_NORET   LJ_FUNCA LJ_NORET
 
#define LJ_ASMF_NORET   LJ_ASMF LJ_NORET
 
#define lua_assert(c)   ((void)0)
 
#define check_exp(c, e)   (e)
 
#define api_check   luai_apicheck
 
#define LJ_ASSERT_NAME2(name, line)   name ## line
 
#define LJ_ASSERT_NAME(line)   LJ_ASSERT_NAME2(lj_assert_, line)
 
#define LJ_STATIC_ASSERT(cond)    extern void LJ_ASSERT_NAME(__LINE__)(int STATIC_ASSERTION_FAILED[(cond)?1:-1])
 

Typedefs

typedef uintptr_t BloomFilter
 

Macro Definition Documentation

◆ api_check

#define api_check   luai_apicheck

Definition at line 348 of file lj_def.h.

◆ BLOOM_MASK

#define BLOOM_MASK   (8*sizeof(BloomFilter) - 1)

Definition at line 118 of file lj_def.h.

◆ bloombit

#define bloombit (   x)    ((uintptr_t)1 << ((x) & BLOOM_MASK))

Definition at line 119 of file lj_def.h.

◆ bloomset

#define bloomset (   b,
  x 
)    ((b) |= bloombit((x)))

Definition at line 120 of file lj_def.h.

◆ bloomtest

#define bloomtest (   b,
  x 
)    ((b) & bloombit((x)))

Definition at line 121 of file lj_def.h.

◆ check_exp

#define check_exp (   c,
  e 
)    (e)

Definition at line 347 of file lj_def.h.

◆ checki16

#define checki16 (   x)    ((x) == (int32_t)(int16_t)(x))

Definition at line 104 of file lj_def.h.

◆ checki32

#define checki32 (   x)    ((x) == (int32_t)(x))

Definition at line 106 of file lj_def.h.

◆ checki8

#define checki8 (   x)    ((x) == (int32_t)(int8_t)(x))

Definition at line 102 of file lj_def.h.

◆ checkptr32

#define checkptr32 (   x)    ((uintptr_t)(x) == (uint32_t)(uintptr_t)(x))

Definition at line 108 of file lj_def.h.

◆ checkptr47

#define checkptr47 (   x)    (((uint64_t)(uintptr_t)(x) >> 47) == 0)

Definition at line 109 of file lj_def.h.

◆ checkptrGC

#define checkptrGC (   x)    (LJ_GC64 ? checkptr47((x)) : LJ_64 ? checkptr32((x)) :1)

Definition at line 110 of file lj_def.h.

◆ checku16

#define checku16 (   x)    ((x) == (int32_t)(uint16_t)(x))

Definition at line 105 of file lj_def.h.

◆ checku32

#define checku32 (   x)    ((x) == (uint32_t)(x))

Definition at line 107 of file lj_def.h.

◆ checku8

#define checku8 (   x)    ((x) == (int32_t)(uint8_t)(x))

Definition at line 103 of file lj_def.h.

◆ i32ptr

#define i32ptr (   p)    ((int32_t)(intptr_t)(void *)(p))

Definition at line 96 of file lj_def.h.

◆ i64ptr

#define i64ptr (   p)    ((int64_t)(intptr_t)(void *)(p))

Definition at line 98 of file lj_def.h.

◆ igcptr

#define igcptr (   p)    (LJ_GC64 ? i64ptr(p) : i32ptr(p))

Definition at line 100 of file lj_def.h.

◆ LJ_ASMF

#define LJ_ASMF   LJ_NOAPI

Definition at line 330 of file lj_def.h.

◆ LJ_ASMF_NORET

#define LJ_ASMF_NORET   LJ_ASMF LJ_NORET

Definition at line 339 of file lj_def.h.

◆ LJ_ASSERT_NAME

#define LJ_ASSERT_NAME (   line)    LJ_ASSERT_NAME2(lj_assert_, line)

Definition at line 353 of file lj_def.h.

◆ LJ_ASSERT_NAME2

#define LJ_ASSERT_NAME2 (   name,
  line 
)    name ## line

Definition at line 352 of file lj_def.h.

◆ LJ_DATA

#define LJ_DATA   LJ_NOAPI

Definition at line 328 of file lj_def.h.

◆ LJ_DATADEF

#define LJ_DATADEF

Definition at line 329 of file lj_def.h.

◆ LJ_FASTCALL

#define LJ_FASTCALL

Definition at line 314 of file lj_def.h.

◆ LJ_FUNC

#define LJ_FUNC   LJ_NOAPI

Definition at line 335 of file lj_def.h.

◆ LJ_FUNC_NORET

#define LJ_FUNC_NORET   LJ_FUNC LJ_NORET

Definition at line 337 of file lj_def.h.

◆ LJ_FUNCA

#define LJ_FUNCA   LJ_NOAPI

Definition at line 331 of file lj_def.h.

◆ LJ_FUNCA_NORET

#define LJ_FUNCA_NORET   LJ_FUNCA LJ_NORET

Definition at line 338 of file lj_def.h.

◆ LJ_LIKELY

#define LJ_LIKELY (   x)    (x)

Definition at line 323 of file lj_def.h.

◆ LJ_MAX_ABITS

#define LJ_MAX_ABITS   28 /* Max. bits of array key. */

Definition at line 60 of file lj_def.h.

◆ LJ_MAX_ALLOC

#define LJ_MAX_ALLOC   LJ_MAX_MEM /* Max. individual allocation length. */

Definition at line 53 of file lj_def.h.

◆ LJ_MAX_ASIZE

#define LJ_MAX_ASIZE   ((1<<(LJ_MAX_ABITS-1))+1) /* Max. array part size. */

Definition at line 61 of file lj_def.h.

◆ LJ_MAX_BCINS

#define LJ_MAX_BCINS   (1<<26) /* Max. # of bytecode instructions. */

Definition at line 66 of file lj_def.h.

◆ LJ_MAX_BUF

#define LJ_MAX_BUF   LJ_MAX_MEM32 /* Max. buffer length. */

Definition at line 55 of file lj_def.h.

◆ LJ_MAX_COLOSIZE

#define LJ_MAX_COLOSIZE   16 /* Max. elems for colocated array. */

Definition at line 62 of file lj_def.h.

◆ LJ_MAX_EXITSTUBGR

#define LJ_MAX_EXITSTUBGR   16 /* Max. # of exit stub groups. */

Definition at line 88 of file lj_def.h.

◆ LJ_MAX_HBITS

#define LJ_MAX_HBITS   26 /* Max. hash bits. */

Definition at line 59 of file lj_def.h.

◆ LJ_MAX_IDXCHAIN

#define LJ_MAX_IDXCHAIN   100 /* __index/__newindex chain limit. */

Definition at line 71 of file lj_def.h.

◆ LJ_MAX_JSLOTS

#define LJ_MAX_JSLOTS   250 /* Max. # of stack slots for a trace. */

Definition at line 86 of file lj_def.h.

◆ LJ_MAX_LINE

#define LJ_MAX_LINE   LJ_MAX_MEM32 /* Max. source code line number. */

Definition at line 64 of file lj_def.h.

◆ LJ_MAX_LOCVAR

#define LJ_MAX_LOCVAR   200 /* Max. # of local variables. */

Definition at line 68 of file lj_def.h.

◆ LJ_MAX_MEM

#define LJ_MAX_MEM   (LJ_GC64 ? LJ_MAX_MEM64 : LJ_MAX_MEM32)

Definition at line 52 of file lj_def.h.

◆ LJ_MAX_MEM32

#define LJ_MAX_MEM32   0x7fffff00 /* Max. 32 bit memory allocation. */

Definition at line 49 of file lj_def.h.

◆ LJ_MAX_MEM64

#define LJ_MAX_MEM64   ((uint64_t)1<<47) /* Max. 64 bit memory allocation. */

Definition at line 50 of file lj_def.h.

◆ LJ_MAX_PHI

#define LJ_MAX_PHI   64 /* Max. # of PHIs for a loop. */

Definition at line 87 of file lj_def.h.

◆ LJ_MAX_SLOTS

#define LJ_MAX_SLOTS   250 /* Max. # of slots in a Lua func. */

Definition at line 67 of file lj_def.h.

◆ LJ_MAX_STR

#define LJ_MAX_STR   LJ_MAX_MEM32 /* Max. string length. */

Definition at line 54 of file lj_def.h.

◆ LJ_MAX_STRTAB

#define LJ_MAX_STRTAB   (1<<26) /* Max. string table size. */

Definition at line 58 of file lj_def.h.

◆ LJ_MAX_UDATA

#define LJ_MAX_UDATA   LJ_MAX_MEM32 /* Max. userdata length. */

Definition at line 56 of file lj_def.h.

◆ LJ_MAX_UPVAL

#define LJ_MAX_UPVAL   249 /* Max. # of upvalues. */

Definition at line 69 of file lj_def.h.

◆ LJ_MAX_XLEVEL

#define LJ_MAX_XLEVEL   200 /* Max. syntactic nesting level. */

Definition at line 65 of file lj_def.h.

◆ LJ_MIN_GLOBAL

#define LJ_MIN_GLOBAL   6 /* Min. global table size (hbits). */

Definition at line 77 of file lj_def.h.

◆ LJ_MIN_IRSZ

#define LJ_MIN_IRSZ   32 /* Min. size for growable IR. */

Definition at line 82 of file lj_def.h.

◆ LJ_MIN_K64SZ

#define LJ_MIN_K64SZ   16 /* Min. size for chained K64Array. */

Definition at line 83 of file lj_def.h.

◆ LJ_MIN_REGISTRY

#define LJ_MIN_REGISTRY   2 /* Min. registry size (hbits). */

Definition at line 78 of file lj_def.h.

◆ LJ_MIN_SBUF

#define LJ_MIN_SBUF   32 /* Min. string buffer length. */

Definition at line 80 of file lj_def.h.

◆ LJ_MIN_STRTAB

#define LJ_MIN_STRTAB   256 /* Min. string table size (pow2). */

Definition at line 79 of file lj_def.h.

◆ LJ_MIN_VECSZ

#define LJ_MIN_VECSZ   8 /* Min. size for growable vectors. */

Definition at line 81 of file lj_def.h.

◆ LJ_NOAPI

#define LJ_NOAPI   extern

Definition at line 320 of file lj_def.h.

◆ LJ_NORET

#define LJ_NORET

Definition at line 317 of file lj_def.h.

◆ LJ_NUM_CBPAGE

#define LJ_NUM_CBPAGE   1 /* Number of FFI callback pages. */

Definition at line 74 of file lj_def.h.

◆ lj_rol

#define lj_rol (   x,
  n 
)    (((x)<<(n)) | ((x)>>(-(int)(n)&(8*sizeof(x)-1))))

Definition at line 113 of file lj_def.h.

◆ lj_ror

#define lj_ror (   x,
  n 
)    (((x)<<(-(int)(n)&(8*sizeof(x)-1))) | ((x)>>(n)))

Definition at line 114 of file lj_def.h.

◆ LJ_STACK_EXTRA

#define LJ_STACK_EXTRA   (5+2*LJ_FR2) /* Extra stack space (metamethods). */

Definition at line 72 of file lj_def.h.

◆ LJ_STATIC_ASSERT

#define LJ_STATIC_ASSERT (   cond)     extern void LJ_ASSERT_NAME(__LINE__)(int STATIC_ASSERTION_FAILED[(cond)?1:-1])

Definition at line 358 of file lj_def.h.

◆ LJ_UNLIKELY

#define LJ_UNLIKELY (   x)    (x)

Definition at line 324 of file lj_def.h.

◆ lua_assert

#define lua_assert (   c)    ((void)0)

Definition at line 346 of file lj_def.h.

◆ u32ptr

#define u32ptr (   p)    ((uint32_t)(intptr_t)(void *)(p))

Definition at line 97 of file lj_def.h.

◆ u64ptr

#define u64ptr (   p)    ((uint64_t)(intptr_t)(void *)(p))

Definition at line 99 of file lj_def.h.

◆ U64x

#define U64x (   hi,
  lo 
)    (((uint64_t)0x##hi << 32) + (uint64_t)0x##lo)

Definition at line 95 of file lj_def.h.

◆ UNUSED

#define UNUSED (   x)    ((void)(x)) /* to avoid warnings */

Definition at line 92 of file lj_def.h.

Typedef Documentation

◆ BloomFilter

Definition at line 117 of file lj_def.h.