aboutsummaryrefslogtreecommitdiff
path: root/ltm.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Keep correct type for immediate operands in comparisonsRoberto Ierusalimschy2019-03-221-2/+6
| | | | | | | | | | | | When calling metamethods for things like 'a < 3.0', which generates the opcode OP_LTI, the C register tells that the operand was converted to an integer, so that it can be corrected to float when calling a metamethod. This commit also includes some other stuff: - file 'onelua.c' added to the project - opcode OP_PREPVARARG renamed to OP_VARARGPREP - comparison opcodes rewritten through macros
* New macros for arithmetic/bitwise operations in 'luaV_execute'Roberto Ierusalimschy2018-11-051-1/+1
| | | | | | | The repetitive code of the arithmetic and bitwise operators in the main iterpreter loop was moved to appropriate macros. (As a detail, the function 'luaV_div' was renamed 'luaV_idiv', as it does an "integer division" (floor division).
* First "complete" implementation of to-be-closed variablesRoberto Ierusalimschy2018-10-171-1/+1
| | | | | | | Still missing: - handling of memory errors when creating upvalue (must run closing method all the same) - interaction with coroutines
* Deprecated the emulation of '__le' using '__lt'Roberto Ierusalimschy2018-08-241-0/+2
| | | | | | | | | | | As hinted in the manual for Lua 5.3, the emulation of the metamethod for '__le' using '__le' has been deprecated. It is slow, complicates the logic, and it is easy to avoid this emulation by defining a proper '__le' function. Moreover, often this emulation was used wrongly, with a programmer assuming that an order is total when it is not (e.g., NaN in floating-point numbers).
* Removed extra information from RCS keyword stringsRoberto Ierusalimschy2018-08-231-1/+1
| | | | | Version numbers and dates (mostly wrong) from RCS keyword strings removed from all source files; only the file name are kept.
* new field 'nilvalue' in struct 'global_State' to avoid the use ofRoberto Ierusalimschy2018-06-151-3/+2
| | | | addresses of static variables
* added 'const' to 'Proto*' when possibleRoberto Ierusalimschy2018-06-081-2/+2
|
* no more 'luaO_nilobject' to avoid comparison of global variable addressesRoberto Ierusalimschy2018-06-011-2/+3
| | | | (now uses static variables)
* no more nil-in-tableRoberto Ierusalimschy2018-04-041-29/+1
|
* metamethods for 'removekey'/'keyin'Roberto Ierusalimschy2018-02-271-1/+30
|
* better names for macros for tags and types.Roberto Ierusalimschy2018-02-261-4/+4
| | | | | rttype -> rawtt; ttyperaw -> withvariant; ttype -> ttypetag; tnov -> ttype
* first version of empty entries in tablesRoberto Ierusalimschy2018-02-231-4/+4
| | | | (so that, in the future, tables can contain regular nil entries)
* new opcodes OP_GTI/OP_GEIRoberto Ierusalimschy2018-02-211-3/+2
|
* correct way to check stack space for vararg functionsRoberto Ierusalimschy2018-02-171-3/+5
|
* some simplifications/optimizations in returns from Lua functionsRoberto Ierusalimschy2018-02-151-4/+6
|
* vararg back to '...' (but with another implementation)Roberto Ierusalimschy2018-02-091-32/+23
| | | | new implementation should have zero overhead for non-vararg functions
* new opcode 'PREPVARARG'Roberto Ierusalimschy2018-02-071-2/+3
| | | | (avoids test for vararg function in all function calls)
* bug in tailcall of vararg functionsRoberto Ierusalimschy2018-01-281-9/+8
| | | | (when adjusting missing parameters)
* calling a vararg function needs to check GCRoberto Ierusalimschy2018-01-281-1/+3
| | | | (because it creates a new table)
* keep control of stack top in Lua functions concentrated in 'luaV_execute'Roberto Ierusalimschy2017-12-281-17/+5
|
* when running Lua code, there is no need to keep 'L->top' "correct";Roberto Ierusalimschy2017-12-201-7/+19
| | | | set it only when needed.
* new macro 'isLuacode' (to distinguish regular Lua code fromRoberto Ierusalimschy2017-12-191-3/+3
| | | | hooks, where C code can run inside a Lua function).
* 'Proto->numparams' does not include vararg parameterRoberto Ierusalimschy2017-12-151-2/+2
| | | | (one less subtraction when calling functions...)
* new opcodes BANDK/BORK/BXORK. (They do not use immediate operandsRoberto Ierusalimschy2017-12-131-7/+12
| | | | | because, too often, masks in bitwise operations are integers larger than one byte.)
* warnings from Visual Studio /W3Roberto Ierusalimschy2017-11-301-2/+2
|
* new opcodes 'OP_LTI' and 'OP_LEI'Roberto Ierusalimschy2017-11-271-1/+15
|
* small simplifications around 'luaT_callorderTM'Roberto Ierusalimschy2017-11-231-4/+13
|
* new function 'luaV_flttointeger' to convert floats to integers (withoutRoberto Ierusalimschy2017-11-081-3/+2
| | | | | string coercions) + string operands to bitwise operations handled by string metamethods
* back to 'CallInfo' (no gains with its removal)Roberto Ierusalimschy2017-11-071-3/+3
|
* more fields moved out of 'CallInfo'Roberto Ierusalimschy2017-11-031-3/+3
|
* avoid warning about 'const'Roberto Ierusalimschy2017-10-041-2/+2
|
* new function 'luaT_trybiniTM'Roberto Ierusalimschy2017-09-271-1/+13
| | | | to handle tag methods for instructions with immediate integer arguments
* no more reference 'memerrmsg' + new reference to "n"Roberto Ierusalimschy2017-07-271-3/+3
| | | | | | (both can be retrieved by 'luaS_newliteral' without creating anything, because they are fixed, but "n" deserves fast access while 'memerrmsg' does not)
* new type 'StackValue' for stack elementsRoberto Ierusalimschy2017-06-291-17/+29
| | | | (we may want to put extra info there in the future)
* back to old-style vararg system (with vararg table collecting extraRoberto Ierusalimschy2017-05-131-1/+39
| | | | arguments)
* detail ('luaT_callbinTM' does not need to be extern)Roberto Ierusalimschy2017-05-081-5/+5
|
* Upvalues collected like everything else (with mark-sweep) insteadRoberto Ierusalimschy2017-04-111-2/+2
| | | | of reference count (simpler and better for generational mode)
* detail (removing spaces at end of lines)Roberto Ierusalimschy2016-12-221-2/+2
|
* When available, use metafield '__name' in error messagesRoberto Ierusalimschy2016-02-261-1/+17
|
* bug: despite its name, 'luaH_getstr' did not work for strings inRoberto Ierusalimschy2015-11-031-3/+3
| | | | general, but only for short strings
* in 'luaD_call', use two functions instead of one with fixed booleanRoberto Ierusalimschy2015-11-021-5/+10
| | | | argument
* details (avoid 'lint' warnings)Roberto Ierusalimschy2015-03-301-2/+3
|
* 'x//y' extended to floatsRoberto Ierusalimschy2014-11-211-3/+3
|
* detail (comment)Roberto Ierusalimschy2014-11-101-2/+2
|
* better error message for bitwise operators (they are not arithmetic...)Roberto Ierusalimschy2014-11-101-2/+4
|
* added include for 'lprefix.h', for stuff that must be added beforeRoberto Ierusalimschy2014-11-021-4/+6
| | | | any other header file
* type 'TString' refers directly to the structure inside the unionRoberto Ierusalimschy2014-07-181-2/+2
| | | | (union used only for size purposes)
* added check for conversion 'obj2gco' (and corrections for smallRoberto Ierusalimschy2014-07-181-2/+2
| | | | problems detected by this check)
* more relaxed rules for __eq metamethod (more similar to otherRoberto Ierusalimschy2014-06-101-14/+1
| | | | operators)
* errors like 1e100 << "2" were giving wrong messagesRoberto Ierusalimschy2014-04-111-3/+5
|