Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | New way to keep hints for table length | Roberto Ierusalimschy | 2024-11-29 | 1 | -14/+22 |
| | | | | | | | | | | Instead of using 'alimit' for keeping the size of the array and at the same time being a hint for '#t', a table now keeps these two values separate. The Table structure has a field 'asize' with the size of the array, while the length hint is kept in the array itself. That way, tables with no array part waste no space with that field. Moreover, the space for the hint may have zero cost for small arrays, if the array of tags plus the hint still fits in a single word. | ||||
* | 'objsize' returns 'l_mem' | Roberto Ierusalimschy | 2024-11-15 | 1 | -1/+1 |
| | | | | Sums of size_t may not fit in a size_t. | ||||
* | 'objsize' broke in smaller pieces | Roberto Ierusalimschy | 2024-09-30 | 1 | -0/+1 |
| | |||||
* | Added gcc option '-Wconversion' | Roberto Ierusalimschy | 2024-07-27 | 1 | -5/+5 |
| | | | | | No warnings for standard numerical types. Still pending alternative numerical types. | ||||
* | Encoding of table indices (hres) must use C indices | Roberto Ierusalimschy | 2024-06-10 | 1 | -15/+21 |
| | | | | | As the encoding of array indices is (~index), 0 is encoded as -1 and INT_MAX is encoded as INT_MIN. | ||||
* | Yet another representation for arrays | Roberto Ierusalimschy | 2024-04-05 | 1 | -17/+20 |
| | | | | | | This "linear" representation (see ltable.h for details) has worse locality than cells, but the simpler access code seems to compensate that. | ||||
* | Some 'unsigned int' changed to 'unsigned' | Roberto Ierusalimschy | 2024-03-22 | 1 | -4/+4 |
| | | | | | 'unsigned int' is too long sometimes. (We already write 'long' instead of 'long int'...) | ||||
* | 'luaH_get' functions return tag of the result | Roberto Ierusalimschy | 2024-03-21 | 1 | -13/+16 |
| | | | | | | | Undoing previous commit. Returning TValue increases code size without any visible gains. Returning the tag is a little simpler than returning a special code (HOK/HNOTFOUND) and the tag is useful by itself in some cases. | ||||
* | 'luaH_get' functions return 'TValue' | Roberto Ierusalimschy | 2024-03-18 | 1 | -16/+13 |
| | | | | | | Instead of receiving a parameter telling them where to put the result of the query, these functions return the TValue directly. (That is, they return a structure.) | ||||
* | Removed "bulk operations" | Roberto Ierusalimschy | 2024-03-15 | 1 | -15/+3 |
| | | | | Negligible performance gains don't justify extra complexity. | ||||
* | Added "bulk operations" to arrays | Roberto Ierusalimschy | 2024-03-15 | 1 | -3/+15 |
| | | | | | A few operations on arrays can be performed "in bulk", treating all tags of a cell as a simple (or a few) word(s). | ||||
* | Optimizations for 'lua_rawgeti' and 'lua_rawseti' | Roberto Ierusalimschy | 2024-01-12 | 1 | -0/+19 |
| | | | | | | 'lua_rawgeti' now uses "fast track"; 'lua_rawseti' still calls 'luaH_setint', but the latter was recoded to avoid extra overhead when writing to the array part after 'alimit'. | ||||
* | Simpler coding for new representation for arrays | Roberto Ierusalimschy | 2023-11-24 | 1 | -30/+8 |
| | | | | | With the tags comming first in a cell, we can define the whole cell as a C type and let C do part of the address computations. | ||||
* | Details | Roberto Ierusalimschy | 2023-11-08 | 1 | -9/+18 |
| | | | | Comments and parameter name in header file. | ||||
* | Merge branch 'newarray' into nextversion | Roberto Ierusalimschy | 2023-11-07 | 1 | -5/+94 |
|\ | |||||
| * | Merge branch 'master' into newarray | Roberto Ierusalimschy | 2023-11-03 | 1 | -2/+0 |
| |\ | |||||
| * | | Full implementation of new representation for arrays | Roberto Ierusalimschy | 2023-11-03 | 1 | -13/+50 |
| | | | |||||
| * | | Full abstraction for representation of array values | Roberto Ierusalimschy | 2023-10-30 | 1 | -4/+17 |
| | | | |||||
| * | | Some cleaning in the new table API | Roberto Ierusalimschy | 2023-05-16 | 1 | -15/+22 |
| | | | |||||
| * | | New table API for 'set' functions | Roberto Ierusalimschy | 2023-05-16 | 1 | -0/+11 |
| | | | |||||
| * | | Towards a new implementation of arrays | Roberto Ierusalimschy | 2023-05-15 | 1 | -0/+21 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The array part of a table wastes too much space, due to padding. To avoid that, we need to store values in the array as something different from a TValue. Therefore, the API for table access should not assume that any value in a table lives in a *TValue. This commit is the first step to remove that assumption: functions luaH_get*, instead of returning a *TValue where the value lives, receive a *TValue where to put the value being accessed. (We still have to change the luaH_set* functions.) | ||||
* | | | Merge branch 'master' into nextversion | Roberto Ierusalimschy | 2023-06-22 | 1 | -2/+0 |
|\ \ \ | | |/ | |/| | |||||
| * | | Details | Roberto Ierusalimschy | 2023-05-15 | 1 | -2/+0 |
| |/ | | | | | | | | | - Better comments about short strings in opcodes. - luaH_newkey made static. | ||||
* / | Tables have a 'lastfree' information only when needed | Roberto Ierusalimschy | 2022-11-01 | 1 | -2/+12 |
|/ | | | | | Only tables with some minimum number of entries in their hash part have a 'lastfree' field, kept in a header before the node vector. | ||||
* | Removed test function 'luaH_isdummy' | Roberto Ierusalimschy | 2022-10-21 | 1 | -1/+0 |
| | | | | It was not being used anywhere. | ||||
* | Changes in the API of 'luaH_set' and related functions | Roberto Ierusalimschy | 2020-12-04 | 1 | -2/+6 |
| | | | | | Functions to set values in a table (luaH_set, luaH_newkey, etc.) receive the new value, instead of returning a slot where to put the value. | ||||
* | Free bit 7 of GC 'marked' field | Roberto Ierusalimschy | 2020-08-07 | 1 | -1/+6 |
| | | | | | | | | 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. | ||||
* | Several details about 5.4.0 rc1 | Roberto Ierusalimschy | 2020-04-23 | 1 | -1/+1 |
| | | | | | Corrected several small details: added 'const', adjusts in tabs x spaces, removed unused #includes and #defines, misspellings, etc. | ||||
* | Removed extra information from RCS keyword strings | Roberto Ierusalimschy | 2018-08-23 | 1 | -1/+1 |
| | | | | | Version numbers and dates (mostly wrong) from RCS keyword strings removed from all source files; only the file name are kept. | ||||
* | field 'sizearray' in struct 'Table' changed to 'alimit', which can | Roberto Ierusalimschy | 2018-06-15 | 1 | -1/+2 |
| | | | | be used as a hint for '#t' | ||||
* | no more 'luaH_emptyobject' and comparisons of addresses of global variables | Roberto Ierusalimschy | 2018-06-01 | 1 | -6/+1 |
| | | | | | (instead, use a different kind of nil to signal the fake entry returned when a key is not found in a table) | ||||
* | first version of empty entries in tables | Roberto Ierusalimschy | 2018-02-23 | 1 | -1/+6 |
| | | | | (so that, in the future, tables can contain regular nil entries) | ||||
* | in hash nodes, keys are stored in separate pieces to avoid wasting | Roberto Ierusalimschy | 2017-06-09 | 1 | -14/+4 |
| | | | | space with alignments | ||||
* | 'luaH_getn' must return 'lua_Unsigned' (or 'lua_Integer'), to | Roberto Ierusalimschy | 2017-05-19 | 1 | -2/+2 |
| | | | | | allow the boundary-search algorithm to use 'maxinteger' when it cannot find a good upper bound. | ||||
* | detail (removing spaces at end of lines) | Roberto Ierusalimschy | 2016-12-22 | 1 | -2/+2 |
| | |||||
* | using 'lastfree == NULL' to signal that table is using the dummy | Roberto Ierusalimschy | 2016-11-07 | 1 | -2/+10 |
| | | | | node for its hash part + new macro 'allocsizenode' | ||||
* | bug: despite its name, 'luaH_getstr' did not work for strings in | Roberto Ierusalimschy | 2015-11-03 | 1 | -1/+6 |
| | | | | general, but only for short strings | ||||
* | size for array part of a table ('sizearray') changed from 'int' to | Roberto Ierusalimschy | 2014-09-04 | 1 | -4/+5 |
| | | | | 'unsigned int', which allows twice as many elements in the array part | ||||
* | simpler definition for 'setobj' (trust the compiler for the assignment) | Roberto Ierusalimschy | 2014-07-29 | 1 | -2/+7 |
| | |||||
* | bug (GC can collect long identifier during parser) + change (using | Roberto Ierusalimschy | 2013-08-30 | 1 | -1/+6 |
| | | | | a single constant table for all functions in a chunk) | ||||
* | "integer" keys in tables are now lua_Integer, not 'int'. | Roberto Ierusalimschy | 2013-04-26 | 1 | -3/+4 |
| | |||||
* | bug: __newindex metamethod may not work if metatable is its own | Roberto Ierusalimschy | 2011-08-17 | 1 | -1/+4 |
| | | | | | metatable + luaV_settable does not create entry when there is a metamethod (and therefore entry is useless) | ||||
* | no more 'luaH_setstr (used only once) + 'luaH_setint' receives value | Roberto Ierusalimschy | 2011-08-09 | 1 | -3/+2 |
| | | | | to be set. | ||||
* | macro 'key2tal' replaced by 'gkey' (as both were equal) | Roberto Ierusalimschy | 2010-06-25 | 1 | -3/+1 |
| | |||||
* | macro 'gkey' returns a "real" TValue* | Roberto Ierusalimschy | 2009-11-06 | 1 | -2/+2 |
| | |||||
* | luaH_[gs]etnum renamed to luaH_[gs]etint (as they only accept integers, | Roberto Ierusalimschy | 2009-08-07 | 1 | -3/+3 |
| | | | | not generic numbers) | ||||
* | emergency garbage collector (core forces a GC when allocation fails) | Roberto Ierusalimschy | 2006-07-11 | 1 | -2/+3 |
| | |||||
* | avoid unnecessary exports | Roberto Ierusalimschy | 2006-01-10 | 1 | -6/+5 |
| | |||||
* | avoids type punning for table keys | Roberto Ierusalimschy | 2006-01-10 | 1 | -6/+8 |
| | |||||
* | new mark LUAI_DATA for extern data | Roberto Ierusalimschy | 2005-06-06 | 1 | -2/+2 |
| |