| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
Variants can use zero for first variant.
|
|
|
|
|
| |
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.)
|
|
|
|
|
| |
In 'aux_rawset', top must be decremented after the barrier, which
refers to top-1. (Bug introduced in commit c646e57fd.)
|
| |
|
| |
|
| |
|
|
|
|
| |
For those that want to try it...
|
|
|
|
|
|
| |
ISO C states that standard library functions should not be called
with NULL arguments, unless stated otherwise. 'sprintf' does not
state otherwise, and it doesn't hurt to be on the safe side.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
That macro is applied to float attributes, not to limits.
|
| |
|
| |
|
|
|
|
|
| |
Parts of the code for opcodes OP_FORPREP and OP_FORLOOP were moved
to functions outside the interpreter loop.
|
|
|
|
|
| |
Both 'tonumber' and 'tointeger' cannot change the out parameter when
the conversion fails.
|
|
|
|
|
| |
The result of 'string.format("%a", 0.0)' can have multiple zeros
after the dot.
|
| |
|
|
|
|
|
|
| |
Several "metamethods" are not required to be methods (functions),
so it seems clearer not to call them metamethods. The manual now
uses the word 'metavalue' for those values.
|
|
|
|
|
| |
Both 'R' and 'K' are arrays, so the comments should use square
brackets to index them.
|
|
|
|
|
|
|
| |
The file 'bugs' reports bugs in several different versions
(corresponding to different branches in the repository), without
a clear division of "this bugs belongs to this version". So, it
doesn't make sense to track it along with one (or many) versions.
|
|
|
|
|
| |
A tail call of a __call chain (a __call metamethod that itself is
also not a function) was being perfomed as a regular call.
|
| |
|
|
|
|
|
|
| |
The initial "\n\t" to properly indent a searcher message is being added
by 'findloader' when building the error message, instead of being
included in the original message by each searcher itself.
|
| |
|
| |
|
|
|
|
|
|
|
| |
In 'str__dump', the call to 'lua_dump' assumes the function is on the
top of the stack, but the manual allows 'luaL_buffinit' to push stuff
on the stack (although the current implementation does not). So, the
call to 'luaL_buffinit' must come after the call to 'lua_dump'.
|
|
|
|
|
|
| |
The old definition did one test for nil, but three tests for the all
too common booleans (and two tests for other values); this definition
does two tests for all values.
|
| |
|
|
|
|
|
|
| |
New threads were being created with very small C-stack limits.
This is not a problem for coroutines, because 'lua_resume' sets
a new limit, but not all threads are coroutines.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
The performance of the Lua compiler is not critical for Lua
performance, but it is a big component in the source. So, it makes
sense to trade speed for size in this component.
|
|
|
|
| |
Fixed some minor issues from the feedback for 5.4-beta rc1.
|
| |
|
|
|
|
|
|
|
| |
- Several details in 'lcode.c'
- A few more tests for code generation
- Bug in assert in 'lcode.c' ("=" x "==")
- Comments in 'lopcodes.h' and 'ltable.c'
|
| |
|
| |
|
|
|
|
| |
Function names in the API use only lowercase letters.
|
| |
|
| |
|
|
|
|
|
|
|
| |
The difference in performance between immediate operands and K operands
does not seem to justify all those extra opcodes. We only keep OP_ADDI,
due to its ubiquity and because the difference is a little more relevant.
(Later, OP_SUBI will be implemented by OP_ADDI, negating the constant.)
|
|
|
|
| |
Macro 'testMMMode' checks whether opcode is an MM opcode.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
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.)
|