| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
The name of the readline library can be changed from its default value
through environment variable LUA_READLINELIB.
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
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.
|
| |
|
|
|
|
| |
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'.
|
| |
|
|
| |
For external strings and for vararg tables.
|
| |
|
|
|
|
| |
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).
|
| | |
|
| |
|
|
|
| |
They are basic for anything that handles the representation of
floating numbers.
|
| | |
|
| |
|
|
|
|
|
| |
A bad actor could fill only a few entries in a table (power of twos in
decreasing order, see tests) and produce a small table with a huge
length. If your program builds a table with external data and iterates
over its length, this behavior could be an issue.
|
| |
|
|
| |
Wrong utf-8 character may have no continuation bytes.
|
| |
|
|
|
|
|
| |
That complicates a little object equality (and therefore table access
for long strings), but the old behavior was somewhat weird. (Short
strings, a concept otherwise absent from the manual, could not be
external.)
|
| |
|
|
|
|
|
|
|
|
| |
External strings created by DLLs may need the DLL code to be
deallocated. This implies that a DLL can only be unloaded after all
its strings were deallocated, which happen only after the run of all
finalizers. To ensure that order, we create a 'library string' to
represent each DLL and keep it locked. When this string is deallocated
(after the deallocation of any string created by the DLL) it closes its
corresponding DLL.
|
| | |
|
| | |
|
| |
|
|
| |
Only local variables, which use registers, need this low limit.
|
| |
|
|
|
|
| |
All-weak tables are not being revisited after being visited during
propagation; if it gets a new metatable after that, the new metatable
may not be marked.
|
| |
|
|
|
| |
Check the mode in a separate function (getmode), instead of using
comma expressions inside the 'if' condition.
|
| |
|
|
|
|
| |
Unlike sizes, these constants can be negative, so it encodes those
integers into unsigned integers in a way that keeps small numbers
small.
|
| |
|
|
|
|
| |
No thread started with pcall (instead of resume) can be closed,
because coroutine.close would not respect the expected number of
results from the protected call.
|
| |
|
|
|
| |
A call to close itself will close all its to-be-closed variables and
return to the resume that (re)started the coroutine.
|
| |
|
|
|
| |
Validity of the preambular global declaration in controled together
with all declarations, when checking variable names.
|
| |
|
|
|
|
| |
A goto cannot jump into the scope of any variable declaration,
including 'global *'. To report the error, it needs a "name" for
the scope it is entering.
|
| |
|
|
|
| |
In this format, the attribute applies to all names in the list;
e.g. "global<const> print, require, math".
|
| |
|
|
|
| |
Reports errors with "?:?:" (instead of "?:-1:") when there is no debug
information.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
'pushglobalfuncname' can be quite slow (as it traverses all globals and
all loaded modules), so try first to get a name from the code.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
Small changes in test library:
- execute mode added to 'all.lua';
- more information about subtypes (tags) when printing a stack.
|
| |
|
|
|
|
|
|
| |
New function 'resetCI' resets the CallInfo list of a thread, ensuring
a proper state when creating a new thread, closing a thread, or
closing a state, so that we can run code after that. (When closing a
thread, we need to run its __close metamethods; when closing a
state, we need to run its __close metamethods and its finalizers.)
|
| |
|
|
|
| |
The string "_ENV" is erroneously identified as a variable _ENV,
so that results from a field is classified as a global.
|
| | |
|