aboutsummaryrefslogtreecommitdiff
path: root/ltable.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Free bit 7 of GC 'marked' fieldRoberto Ierusalimschy2020-08-071-1/+1
| | | | | | | | Tables were using this bit to indicate their array sizes were real ('isrealasize'), but this bit can be useful for tests. Instead, they can use bit 7 of their 'flag' field for that purpose. (There are only six fast-access metamethods.) This 'flag' field only exists in tables, so this use does not affect other types.
* Clearer distinction between types and tagsRoberto Ierusalimschy2020-01-311-23/+23
| | | | | LUA_T* represents only types; tags (types + Variants) are represented by LUA_V* constants.
* Changed internal representation of booleansRoberto Ierusalimschy2020-01-061-5/+5
| | | | | | | 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.)
* Using an enumeration for float->integer coercion modesRoberto Ierusalimschy2019-12-051-2/+2
|
* Details (mostly comments)Roberto Ierusalimschy2019-10-221-0/+3
|
* Janitorial workRoberto Ierusalimschy2019-10-011-20/+24
| | | | | | | - 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'
* A few changes in tests about number of bits in integersRoberto Ierusalimschy2019-05-131-2/+2
| | | | | | - The preprocessor must work with at least 'long', and therefore must do shifts of up to 31 bits correctly. - Whenever possible, use unsigned types in shifts.
* Small optimizations in range checksRoberto Ierusalimschy2019-03-271-5/+5
| | | | | | | | 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.
* 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.
* warning (comparison between signed and unsigned integers)Roberto Ierusalimschy2018-06-151-2/+3
|
* field 'sizearray' in struct 'Table' changed to 'alimit', which canRoberto Ierusalimschy2018-06-151-36/+161
| | | | be used as a hint for '#t'
* no more 'luaH_emptyobject' and comparisons of addresses of global variablesRoberto Ierusalimschy2018-06-011-9/+10
| | | | | (instead, use a different kind of nil to signal the fake entry returned when a key is not found in a table)
* new macros 'likely'/'unlikely' with hints for jump predictionsRoberto Ierusalimschy2018-05-301-5/+6
| | | | (used only in errors for now)
* detail ('l_castU2S' should only be used over lua_Unsigned values)Roberto Ierusalimschy2018-05-291-2/+2
|
* better names for macros for tags and types.Roberto Ierusalimschy2018-02-261-6/+6
| | | | | rttype -> rawtt; ttyperaw -> withvariant; ttype -> ttypetag; tnov -> ttype
* first version of empty entries in tablesRoberto Ierusalimschy2018-02-231-30/+33
| | | | (so that, in the future, tables can contain regular nil entries)
* small reorganization of 'luaV_flttointeger'/'luaV_tointeger'Roberto Ierusalimschy2018-02-211-4/+5
|
* more generic way to handle 'gclist'Roberto Ierusalimschy2018-02-191-2/+2
|
* janitor work on castsRoberto Ierusalimschy2018-01-281-5/+5
|
* another try with table resize.Roberto Ierusalimschy2017-12-291-41/+55
| | | | | (Old version was leaving some elements unanchored while allocating new memory)
* more freedom in handling memory-allocation errors (not all allocationsRoberto Ierusalimschy2017-12-081-32/+63
| | | | | automatically raise an error), which allows fixing a bug when resizing a table.
* using explicit tests for allocation overflow whenever possibleRoberto Ierusalimschy2017-12-071-9/+29
|
* detail (typo in comments)Roberto Ierusalimschy2017-11-231-2/+2
|
* new function 'luaV_flttointeger' to convert floats to integers (withoutRoberto Ierusalimschy2017-11-081-3/+3
| | | | | string coercions) + string operands to bitwise operations handled by string metamethods
* new type 'StackValue' for stack elementsRoberto Ierusalimschy2017-06-291-6/+6
| | | | (we may want to put extra info there in the future)
* no more 'DEADKEY'. Table traversals do not need to consider dead keys;Roberto Ierusalimschy2017-06-121-37/+27
| | | | | | if the key is dead, it cannot be given to 'next'. Instead, we now use a 'table' tag without the collectable bit, which makes it a unique tag good enough to reserve space.
* in hash nodes, keys are stored in separate pieces to avoid wastingRoberto Ierusalimschy2017-06-091-46/+85
| | | | space with alignments
* BUG: in 'computesizes', 'twotoi' overflows when a sequence hasRoberto Ierusalimschy2017-05-191-3/+6
| | | | more than 2^30 elements.
* better implementation for 'hash_search', without using 'size_t'Roberto Ierusalimschy2017-05-191-28/+36
| | | | (simpler to implement and to explain)
* reimplementation of 'luaH_getn', trying to handle numeric limitsRoberto Ierusalimschy2017-05-161-33/+44
| | | | properly.
* detail ('1' -> '1u' in unsigned operation)Roberto Ierusalimschy2017-05-091-2/+2
|
* using 'lastfree == NULL' to signal that table is using the dummyRoberto Ierusalimschy2016-11-071-23/+23
| | | | node for its hash part + new macro 'allocsizenode'
* details (typos in comments)Roberto Ierusalimschy2015-11-191-2/+2
|
* no need for a special case to get long strings (not that common)Roberto Ierusalimschy2015-11-031-22/+16
|
* added comment and assert about dead keysRoberto Ierusalimschy2015-11-031-2/+3
|
* bug: despite its name, 'luaH_getstr' did not work for strings inRoberto Ierusalimschy2015-11-031-16/+35
| | | | general, but only for short strings
* avoid possibility of subtle arith. overflowRoberto Ierusalimschy2015-07-041-2/+2
|
* detailRoberto Ierusalimschy2015-07-011-2/+2
|
* comment (FALLTHROUGH position)Roberto Ierusalimschy2015-06-091-3/+3
|
* detail (removed useless '#include')Roberto Ierusalimschy2015-05-201-2/+1
|
* detail (comment)Roberto Ierusalimschy2015-04-021-2/+2
|
* janitor work (comments, variable names, some other details)Roberto Ierusalimschy2015-03-301-25/+31
|
* details (avoid 'lint' warnings)Roberto Ierusalimschy2015-03-301-2/+2
|
* 'point2int' -> 'point2uint' (to reflect its actual result type)Roberto Ierusalimschy2015-03-031-2/+2
|
* 'numisinteger' (for table keys) replaced by 'luaV_tointeger' (oldRoberto Ierusalimschy2015-02-201-17/+5
| | | | 'tointeger_aux'), which can do the same job.
* make 'hashfloat' configurableRoberto Ierusalimschy2015-02-201-8/+8
|
* detail (file does not need 'string.h')Roberto Ierusalimschy2015-02-161-2/+1
|
* some changes in 'hashfloat' to avoid undefined (in ISO C) numericalRoberto Ierusalimschy2015-02-131-8/+21
| | | | conversions
* size of short strings stored in a single byte, to reduce the sizeRoberto Ierusalimschy2015-01-161-2/+2
| | | | of struct 'TString'
* 'setkey' -> 'setnodekey' (to avoid conflicts with POSIX)v5.3.0Roberto Ierusalimschy2015-01-051-2/+2
|