| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
If there are no integer keys outside the array part, there is no
reason to resize it, saving the time to count its elements. Moreover,
assignments to non-integer keys will not collapse a table created with
'table.create'.
|
| |
|
|
|
|
|
| |
It converts a Lua number to a string in a buffer, without creating
a new Lua string.
|
| |
|
|
|
|
| |
Plus, function was renamed to 'luaE_threadsize'.
|
| |
|
|
|
|
| |
Plus extra comments and other details.
|
| |
|
| |
|
|
|
|
|
|
| |
Any call to 'va_start' must have a corresponding call to 'va_end';
so, functions called between them (luaO_pushvfstring in particular)
cannot raise errors.
|
|
|
|
|
|
| |
Any call to 'va_start' must have a corresponding call to 'va_end';
so, functions called between them (luaO_pushvfstring in particular)
cannot raise errors.
|
| |
|
| |
|
|
|
|
|
| |
> warning C4334: '<<': result of 32-bit shift implicitly converted to
> 64 bits (was 64-bit shift intended?)
|
|
|
|
| |
USHRT_MAX does not fit in an 'int' in 16-bit systems.
|
|
|
|
| |
Memory is the resource we want to save. Still to be reviewed again.
|
|
|
|
| |
Fixed comments in sort partition.
|
|
|
|
|
| |
'size_t' is the common type for measuring memory. 'int' can be too
small for steps.
|
|
|
|
|
| |
All fields in the global state that control the pace of the garbage
collector prefixed with 'GC'.
|
|
|
|
| |
Identation + comments
|
|
|
|
|
|
|
|
|
|
| |
The use of a pointer (not access, only for computations) after its
deallocation is forbiden in ISO C, but seems to work fine in all
platforms we are aware of. So, using that to correct stack pointers
after a stack reallocation seems safe and is much simpler than the
current implementation (first change all pointers to offsets and
then changing the offsets back to pointers). Anyway, for now that
option is disabled.
|
| |
|
| |
|
|
|
|
|
|
|
| |
In function 'luaK_exp2val', used to generate code for indices: Macro
'hasjumps' does not consider the case when the whole expression is a
"jump" (a test). In all other of its uses, the surrounding code ensures
that the expression cannot be VJMP.
|
|
|
|
|
|
| |
Conversion float->string ensures that, for any float f,
tonumber(tostring(f)) == f, but still avoiding noise like 1.1
converting to "1.1000000000000001".
|
|
|
|
|
|
| |
That reduces the size of "CallInfo". Moreover, bit CIST_HOOKED from
call status is not needed. When in a hook, 'transferinfo' is always
valid, being zero when the hook is not call/return.
|
| |
|
|
|
|
|
| |
No warnings for standard numerical types. Still pending alternative
numerical types.
|
|
|
|
| |
That gives us more free bits in 'callstatus', for future use.
|
|
|
|
|
| |
The callstatus flag CIST_CLSRET is used in all tests for the
presence of variables to be closed in C functions.
|
|
|
|
|
|
| |
The parameter 'nresults' in 'lua_call' and similar functions has a
limit of 250. It already had an undocumented (and unchecked) limit of
SHRT_MAX, but it is seldom larger than 2.
|
|
|
|
|
|
| |
Therefore, fields ftransfer/ntransfer in lua_Debug must have type
'int'. (Maximum stack size must fit in an 'int'.) Also, this commit
adds check that maximum stack size respects size_t for size in bytes.
|
| |
|
|
|
|
|
|
| |
'incomplete' was popping error message that should be used in case
there is no more lines to complete the input, that is, 'pushline'
returns NULL, due to end of file.
|
|
|
|
| |
That function is useful for debugging the API.
|
|
|
|
|
|
|
| |
(See comments in luaconf.h.) This change allows easier compilation,
as Lua compiles and works even if the package 'readline' is absent
from the system. Moreover, non-interactive uses don't load the library,
making the stand-alone slightly faster for small loads.
|
|
|
|
|
|
| |
Macro moved to llimits.h, and casts from void* to lua_CFunction first
go through 'voidf' (a pointer to a function from void to void), a kind
of void* for functions.
|
|
|
|
| |
Mainly to include 'llimits.h' in the non-kernel files
|
|
|
|
|
|
| |
New instruction format 'ivABC' (a variant of iABC where parameter vC has
10 bits) allows constructors of up to 1024 elements to be coded without
EXTRAARG.
|
| |
|
|
|
|
|
|
|
|
| |
Instead of a fixed limit of 50 registers (which, in a bad worst case,
can limit the nesting of constructors to 5 levels), the compiler
computes an individual limit for each constructor based on how many
registers are available when it runs. This limit then controls the
frequency of SETLIST instructions.
|
|
|
|
| |
Plus, added a test to check that limit.
|
|
|
|
| |
(As the length of any string in Lua.)
|
| |
|
| |
|
| |
|
|
|
|
| |
They don't need to be visible by clients of Lua.
|
|
|
|
|
|
| |
The definitions in llimits.h are useful not only for the core. That
header only defines types and '#define's, so libs and core still do
not share any real code/data.
|
|
|
|
|
|
| |
Several definitions that don't need to be "global" (that is, that
concerns only specific parts of the code) moved out of llimits.h,
to more appropriate places.
|
| |
|