| Commit message (Collapse) | Author | Files | Lines |
|
|
|
'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'.
|
|
Operation name can be diferent from metamethod name.
|
|
Also, makefile does not add compiling options (LOCAL) to linker
flags (MYLDFLAGS).
|
|
That makes easier to redefine luaL_newstate.
|
|
- Functions luaK_goiffalse, luaS_hash made private.
- Removed unused macro log2maxs.
|
|
For external strings and for vararg tables.
|
|
When dumping a string, adding 2 to its size may overflow a size_t for
external strings, which may not have a header. (Adding 1 is Ok, because
all strings end with a '\0' not included in their size.) The new method
for saving NULL strings code them as a repeated string, using the
reserved index 0.
|
|
The check for limit of local variables is made after generating code to
initialize them. If there are too many local variables not initialized,
the coding of instruction OP_LOADNIL could overflow an argument.
|
|
A vararg table can be virtual. If the vararg table is used only as
a base in indexing expressions, the code does not need to create an
actual table for it. Instead, it compiles the indexing expressions
into direct accesses to the internal vararg data.
|
|
|
|
To allow some optimizations on its use.
|
|
Not yet optimized nor documented.
|
|
- LUAMOD_API defined as 'extern "C"' in C++.
- "ANSI C" is in fact "ISO C" (comments)
- Removed option -std from makefile in testes/libs. (Easier to change
to C++ for tests).
|
|
In C, we may have several "setjmp" nested, and the "longjmp" will go
to the one given by the corresponding "jmp_buf". In C++, a "throw"
will always go to the inner "catch". So, the "catch" must check
whether it is the recipient of the "throw" and, if not, rethrow
the exception to the outer level.
|
|
An external definition for LUA_32BITS can change the API, but libraries
check number-format compatibility when loading. So, any incompatible
modules will report a clear error.
|
|
The reasoning in commit 519c57d5 is wrong: A sequence of nils generates
several fields with just one OP_LOADNIL.
|
|
LUAI_FUNC is now defined in llimits.h.
|
|
Allows non-Posix systems to use off_t and related functions for
file offsets.
|
|
|
|
These definitions were in luaconf.h only because the standard libraries
need them. Now that llimits.h is included by the libraries, it offers a
more private place for these definitions.
|
|
|
|
Not all errors in a message handler generate a LUA_ERRERR.
|
|
The call to 'luaH_getn' can change the "field" 'lenhint' of a table.
|
|
Opcodes OP_SHLI-OP_SHRI and the cases for opcodes OP_SHL-OP_SHR were
out of order.
|
|
Its check should use the type of the object, not its tag. (Change only
relevant in test mode.)
|
|
|
|
They are basic for anything that handles the representation of
floating numbers.
|
|
|