| Commit message (Collapse) | Author | Files | Lines |
|
- 'luaP_isOT' is only used for tests, so it is defined as a macro to avoid
wasting space with an unused function.
- 'luaP_isIT' must include OP_VARARGPREP.
|
|
In function 'funcargs', some compilers can complain that 'args' can be
used unitialized, due to the default case (syntax error).
|
|
OP_VARARGPREP neither sets nor uses L->top.
|
|
|
|
|
|
|
|
'lua_load' does not preserve the stack through the calls to the
reader function, as it should. Immediately after the first call (to
detect whether chunk is binary) it adds stuff, and it also adds a new
table when starting the compilation of each new function.
|
|
Added compiler option LUA_NODEBUGLIB to make Lua with no open debug
library + small improvements in the manual.
|
|
|
|
Use luaL_loadbufferx and luaL_loadfilex instead, being explicit about
whether to accept binary chunks.
|
|
GCC introduced this macro in version 3.
|
|
Function returned by 'string.gmatch' can be left in an inconsistent
state after an error.
|
|
|
|
|
|
'table.tunpack' was not checking its first argument, which could
result in error messages generated inside the API, without location
information.
|
|
|
|
|
|
An initial byte \xFF will ask for 7 continuation bytes, and then the
shift by (count * 5) will try to shift 35 bits.
|
|
Spaces + added initialization to the documentation of global
declarations.
|
|
The original code was like this, where t->u.ind.t and t->u.info overlap:
t->u.ind.t = cast_byte((t->k == VLOCAL) ? t->u.var.ridx: t->u.info);
|
|
The name of the readline library can be changed from its default value
through environment variable LUA_READLINELIB.
|
|
|
|
|
|
A pointer to function 'l_getenv' can point to the regular 'getenv' or
to a dumb function (that always returns NULL) to ignore environment
variables.
|
|
Compilation options LUA_COMPAT_GLOBAL, LUA_COMPAT_LOOPVAR, and
LUA_READLINELIB do not affect the API, so they can be changed
through the make file.
|
|
When on, this option makes for-loop control variables not read only.
|
|
Before calling a finalizer, Lua not only checks stack limits, but
actually ensures that a minimum number of slots are already allocated
for the call. (If it cannot ensure that, it postpones the finalizer.)
That avoids finalizers not running due to memory errors that the
programmer cannot control.
|
|
|
|
'string.packsize' can overflow result in 32-bit machines using 64-bit
integers, as LUA_MAXINTEGER may not fit into size_t.
|
|
In an assignment like 'a = &b', is looks suspicious if 'a' has a scope
larger than 'b'.
|
|
Some comments still talked about bit 'isrealasize', which has been
removed.
|
|
The computation of a new debt could overflow when we give a too large
step to 'collectgarbage"step"' and the current debt was already
negative. This is only an issue if your platform cares for it or if you
compile Lua with an option like '-fsanitize=undefined'.
|
|
typo in comment + formatting + logical 'and' was written as a bitwise
operation (makes code more fragile)
|
|
If the stack does not have some minimum available space, the GC defers
calling a finalizer until the next cycle. That avoids errors while
running a finalizer that the programmer cannot control.
|
|
It is easier to forget to turn them on then to turn them off.
|
|
Lists in inline code don't get a space after commas. (That keeps the
code more compact and avoids line breaks in the middle of the code.)
|
|
- Avoid fixing name "_ENV" in the code
- Small improvements in the manual
|
|
|
|
This should had been corrected in commit fd897027f1.
|
|
Vararg functions with vararg tables don't use the arguments hidden in
the stack; therfore, it doesn't need to build/keep them.
|
|
Conceptually, all functions get their vararg arguments in a vararg
table. The storing of vararg arguments in the stack is always treated
as an optimization.
|
|
Comments, capitalization in the manual, globals in test 'heady.lua'
|
|
|
|
A '__mode' metafield and an "n" key both can be external strings.
|
|
Semantic errors should refer the last used token, not the next one.
|
|
Initialization "global a = 10" raises an error if global 'a' is already
defined, that is, it has a non-nil value.
|
|
- New macro l_strcoll to ease changing 'strcoll' to something else.
- MAXINDEXRK==1 in 'ltests.h' is enough to run test 'code.lua'.
- Removed unused '#include' in 'lutf8lib.c'.
|
|
The syntax 'function foo (a, b, ...arg)' is already used by JavaScript
for this same semantics, so it seems natural to use the same notation in
Lua.
|
|
In a global initialization, the variable does not pass through
'check_readonly', and therefore a VVARGIND is not normalized to a
VINDEXED.
|
|
When calling 'luaK_storevar', the 'expdesc' for the variable must be
created before the one for the expression, to satisfy the assumptions
for register allocation. So, in a statement like 'global a = exp', where
'a' is actually '_ENV.a', this variable must be handled before the
initializing expression 'exp'.
|