| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
The assertion cannot compute 'f->abslineinfo[i]' when the initial
estimate 'i' is -1.
|
|
|
|
|
|
|
| |
The function 'isinstack' tried to work around the undefined behavior
of subtracting two pointers that do not point to the same object,
but the compiler killed to trick. (It optimizes out the safety check,
because in a correct execution it will be always true.)
|
|
|
|
|
|
|
|
| |
Some places don't need the "fast path" macro tointegerns, either
because speed is not essential (lcode.c) or because the value is not
supposed to be an integer already (luaV_equalobj and luaG_tointerror).
Moreover, luaV_equalobj should always use F2Ieq, even if Lua is
compiled to "round to floor".
|
|
|
|
|
| |
By producing absolute line information at regular intervals, a simple
division can compute the correct entry for a given instruction.
|
|
|
|
|
| |
The function 'changedline' tries harder to avoid calling
'luaG_getfuncline' plus small changes in the use of 'L->oldpc'.
|
|
|
|
|
|
|
| |
When available, use the calling code to find a suitable name for what
was being called; this is particularly useful for errors of non-callable
metamethods. This commit also improved the debug information for
order metamethods.
|
|
|
|
|
| |
Line-hook handling was accessing debug info. without checking whether
it was present.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The field 'L->oldpc' is not always updated when control returns to a
function; an invalid value can seg. fault when computing 'changedline'.
(One example is an error in a finalizer; control can return to
'luaV_execute' without executing 'luaD_poscall'.) Instead of trying to
fix all possible corner cases, it seems safer to be resilient to invalid
values for 'oldpc'. Valid but wrong values at most cause an extra call
to a line hook.
|
|
|
|
| |
Added 'volatile' to 'l_signalT' variables plus some minor changes.
|
|
|
|
|
| |
Several details in code (e.g., moving a variable to the most inner
scope that encloses its uses), comments, parameter names, extra tests.
|
|
|
|
|
| |
LUA_T* represents only types; tags (types + Variants) are represented
by LUA_V* constants.
|
|
|
|
|
|
|
| |
Instead of an explicit value (field 'b'), true and false use different
tag variants. This avoids reading an extra field and results in more
direct code. (Most code that uses booleans needs to distinguish between
true and false anyway.)
|
|
|
|
| |
Macro 'testMMMode' checks whether opcode is an MM opcode.
|
|
|
|
| |
Plus, this commit removes useless 'tm' parameters in 'op_*' macros.
|
|
|
|
|
|
|
|
|
|
|
| |
In arithmetic/bitwise operators, the call to metamethods is made
in a separate opcode following the main one. (The main
opcode skips this next one when the operation succeeds.) This
change reduces slightly the size of the binary and the complexity
of the arithmetic/bitwise opcodes. It also simplfies the treatment
of errors and yeld/resume in these operations, as there are much
fewer cases to consider. (Only OP_MMBIN/OP_MMBINI/OP_MMBINK,
instead of all variants of all arithmetic/bitwise operators.)
|
| |
|
|
|
|
|
| |
Several small changes from feedback on 5.4 alhpa rc1 (warnings,
typos in the manual, and the like)
|
|
|
|
|
|
| |
This new field gets the length of 'source' in the same structure.
Unlike the other strings in that structure, 'source' can be
relatively large, and Lua already has its length readily available.
|
|
|
|
|
|
|
| |
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.)
|
|
|
|
|
|
|
|
| |
Added opcodes for all seven arithmetic operators with K operands
(that is, operands that are numbers in the array of constants of
the function). They cover the cases of constant float operands
(e.g., 'x + .0.0', 'x^0.5') and large integer operands (e.g.,
'x % 10000').
|
|
|
|
|
|
| |
"Better" and similar to error messages for invalid function arguments.
*old message: 'for' limit must be a number
*new message: bad 'for' limit (number expected, got table)
|
|
|
|
|
| |
Version numbers and dates (mostly wrong) from RCS keyword strings
removed from all source files; only the file name are kept.
|
| |
|
|
|
|
| |
(the code is simpler without 'vra' and conversion is a no-op)
|
|
|
|
| |
(keep the standard of names in lower case)
|
|
|
|
| |
(for information about values being given and returned in function calls)
|
|
|
|
| |
new implementation should have zero overhead for non-vararg functions
|
| |
|
| |
|
| |
|
|
|
|
| |
set it only when needed.
|
|
|
|
| |
(one less subtraction when calling functions...)
|
|
|
|
|
| |
because, too often, masks in bitwise operations are integers larger
than one byte.)
|
|
|
|
|
| |
so it is better to use a generic description + metamethod names
in some error messages shown without '__' prefix
|
| |
|
|
|
|
|
| |
recursively to execute function calls. 'unroll' continues all
executions suspended by an yield (through a long jump)
|
|
|
|
| |
to update its copy of 'base' when the stack is reallocated)
|
| |
|
|
|
|
|
| |
string coercions) + string operands to bitwise operations handled
by string metamethods
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
'CallInfo'
|
| |
|
|
|
|
| |
of against the stack frame
|
| |
|