| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
With MMBIN instructions, there are fewer opcodes that need to update
'L->top', so that change does not seem to pay for the increased
complexity.
|
|
|
|
|
|
|
| |
Instead of updating 'L->top' in every place that may call a
metamethod, the metamethod functions themselves (luaT_trybinTM and
luaT_callorderTM) correct the top. (When calling metamethods from
the C API, however, the callers must preserve 'L->top'.)
|
|
|
|
|
| |
In 'lua_settop', avoid calling 'luaF_close' when increasing the stack
or when the function has no to-be-closed variables.
|
|
|
|
|
|
| |
When leaving a scope, the new stack top should be set only after
closing any upvalue, to avoid manipulating values in an "invalid"
part of the stack.
|
|
|
|
|
|
|
|
| |
Checks of the form '1 <= x && x <= M' were rewritten in the form
'(unsigned)x - 1 < (unsigned)M', which is usually more efficient.
(Other similar checks have similar translations.) Although
some compilers do these optimizations, that does not happen
for all compilers or all cases.
|
|
|
|
|
|
|
|
| |
- The warning functions get an extra parameter that tells whether
message is to be continued (instead of using end-of-lines as a signal).
- The user data for the warning function is a regular value, instead
of a writable slot inside the Lua state.
|
|
|
|
|
|
|
|
|
|
| |
Several small improvements (code style, warnings, comments, more tests),
in particular:
- 'lua_topointer' extended to handle strings
- raises an error in 'string.format("%10q")' ('%q' with modifiers)
- in the manual for 'string.format', the term "option" replaced by
"conversion specifier" (the term used by the C standard)
|
|
|
|
|
|
|
| |
After a major bad collection (one that collects too few objects),
next collection will be major again. In that case, avoid switching
back to generational mode (as it will have to switch again to
incremental to do next major collection).
|
|
|
|
|
| |
Errors in finalizers (__gc metamethods) are never propagated.
Instead, they generate a warning.
|
|
|
|
|
| |
The warning system is just a way for Lua to emit warnings, messages
to the programmer that do not interfere with the running program.
|
|
|
|
|
|
|
|
|
|
| |
* unification of the 'nny' and 'nCcalls' counters;
* external C functions ('lua_CFunction') count more "slots" in
the C stack (to allow for their possible use of buffers)
* added a new test script specific for C-stack overflows. (Most
of those tests were already present, but concentrating them
in a single script easies the task of checking whether
'LUAI_MAXCCALLS' is adequate in a system.)
|
|
|
|
|
|
|
| |
It is an error for a to-be-closed variable to have a non-closable
non-nil value when it is being closed. This situation does not seem to
be useful and often hints to an error. (Particularly in the C API, it is
easy to change a to-be-closed index by mistake.)
|
|
|
|
|
|
|
| |
To remove a to-be-closed variable from the stack in the C API a
function must use 'lua_settop' or 'lua_pop'. Previous implementation of
'luaL_pushresult' was not closing the box. (This commit also added
tests to check that box is being closed "as soon as possible".)
|
|
|
|
|
|
| |
Sometimes it is useful to mark to-be-closed an index that is not
at the top of the stack (e.g., if the value to be closed came from
a function call returning multiple values).
|
|
|
|
|
|
|
| |
The new syntax is <local *toclose x = f()>. The mark '*' allows other
attributes to be added later without the need of new keywords; it
also allows better error messages. The API function was also renamed
('lua_tobeclosed' -> 'lua_toclose').
|
| |
|
| |
|
|
|
|
|
| |
Version numbers and dates (mostly wrong) from RCS keyword strings
removed from all source files; only the file name are kept.
|
|
|
|
| |
Lua should work correctly with several copies of the kernel
|
|
|
|
| |
addresses of static variables
|
|
|
|
| |
macro 'api_checkvalidindex' (used only once) expanded and removed
|
|
|
|
| |
(now uses static variables)
|
| |
|
| |
|
| |
|
|
|
|
|
| |
rttype -> rawtt; ttyperaw -> withvariant; ttype -> ttypetag;
tnov -> ttype
|
|
|
|
| |
(still no metamethods, no raw verssions)
|
|
|
|
| |
(so that, in the future, tables can contain regular nil entries)
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
automatically raise an error), which allows fixing a bug when resizing
a table.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
'CallInfo'
|
| |
|
| |
|
|
|
|
| |
(we may want to put extra info there in the future)
|
|
|
|
| |
'if's
|
|
|
|
|
|
| |
Some simplifications (not counting bytes, couting only slots visited;
no more 'gcfinnum'); more GC parameters; using vararg in 'lua_gc' to
set parameters in different GC modes
|
|
|
|
|
| |
length of strings and userdata are limited by Lua integers,
but table length is hard to compute limiting it to 'size_t'.)
|
|
|
|
| |
macros as table get + new macro for integer keys)
|
|
|
|
| |
of mode)
|
| |
|