summaryrefslogtreecommitdiff
path: root/lundump.c
Commit message (Collapse)AuthorAgeFilesLines
* Detailsv5.4.0v5.4.0Roberto Ierusalimschy2020-06-181-2/+2
| | | | Added as incompatibility, in the manual, the extra return of 'io.lines'.
* Fixed missing GC barriers in compiler and undumpRoberto Ierusalimschy2020-06-161-14/+19
| | | | | While building a new prototype, the GC needs barriers for every object (strings and nested prototypes) that is attached to the new prototype.
* Back to old encoding of versions in binary filesRoberto Ierusalimschy2020-05-061-1/+1
| | | | | | (Undoing part of commit f53eabeed8.) It is better to keep this encoding stable, so that all Lua versions can read at least the version of a binary file.
* Code style in 'ldump'/'lundump'.Roberto Ierusalimschy2020-02-271-73/+73
| | | | | - function names start with lower case; - state is always the first parameter.
* Clearer distinction between types and tagsRoberto Ierusalimschy2020-01-311-7/+7
| | | | | LUA_T* represents only types; tags (types + Variants) are represented by LUA_V* constants.
* Changed internal representation of booleansRoberto Ierusalimschy2020-01-061-2/+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.)
* First implementation of constant propagationRoberto Ierusalimschy2019-07-121-3/+2
| | | | | Local constant variables initialized with compile-time constants are optimized away from the code.
* New implementation for constantsRoberto Ierusalimschy2019-07-091-0/+1
| | | | | | | | | VLOCAL expressions keep a reference to their corresponding 'Vardesc', and 'Upvaldesc' (for upvalues) has a field 'ro' (read-only). So, it is easier to check whether a variable is read-only. The decoupling in VLOCAL between 'vidx' ('Vardesc' index) and 'sidx' (stack index) should also help the forthcoming implementation of compile-time constant propagation.
* 'require' returns where module was foundRoberto Ierusalimschy2019-04-171-2/+2
| | | | | The function 'require' returns the *loader data* as a second result. For file searchers, this data is the path where they found the module.
* Small changes in the header of binary filesc6f7181e910b6Roberto Ierusalimschy2019-03-191-15/+23
| | | | | | | | | - LUAC_VERSION is equal to LUA_VERSION_NUM, and it is stored as an int. - 'sizeof(int)' and 'sizeof(size_t)' removed from the header, as the binary format does not depend on these sizes. (It uses its own serialization for unsigned integer values.)
* 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.
* avoid craches when loading tampered code with NULL as a string constantRoberto Ierusalimschy2018-06-011-6/+20
|
* using explicit tests for allocation overflow whenever possibleRoberto Ierusalimschy2017-12-071-8/+8
|
* detail (identation of switch)Roberto Ierusalimschy2017-11-281-19/+18
|
* new type 'StackValue' for stack elementsRoberto Ierusalimschy2017-06-291-2/+2
| | | | (we may want to put extra info there in the future)
* dumping ints and size_ts compactedRoberto Ierusalimschy2017-06-271-9/+17
|
* 'lineinfo' in prototypes saved as differences instead of absoluteRoberto Ierusalimschy2017-06-271-2/+9
| | | | | | values, so that the array can use bytes instead of ints, reducing its size. (A new array 'abslineinfo' is used when line differences do not fit in a byte.)
* macro 'incr_top' replaced by function 'luaD_inctop'. (It is not usedRoberto Ierusalimschy2015-11-021-2/+2
| | | | in critical time pathes, can save a few bytes without the macro)
* macros 'getaddrstr' and 'getstr' unified (they do the same thing)Roberto Ierusalimschy2015-09-171-2/+2
|
* long strings are created directly in final position when possibleRoberto Ierusalimschy2015-09-081-9/+11
| | | | | (instead of using an auxiliar buffer to first create the string and then allocate the final string and copy result there)
* added include for 'lprefix.h', for stuff that must be added beforeRoberto Ierusalimschy2014-11-021-3/+6
| | | | any other header file
* more precision between closure types ('LClosure' x 'CClosure')Roberto Ierusalimschy2014-06-191-8/+8
|
* allows different 'source' for each prototype, but inherits it fromRoberto Ierusalimschy2014-06-181-11/+17
| | | | | parent when they are equal (only possible case for chunks created by the parser)
* source for all prototypes must be equal in a chunk; no need to storeRoberto Ierusalimschy2014-06-181-2/+4
| | | | each one separated
* 'setnvalue' -> 'setfltvalue' (for consitency with 'fltvalue')Roberto Ierusalimschy2014-04-291-2/+2
|
* some details to avoid warningsRoberto Ierusalimschy2014-04-011-2/+2
|
* missplelling in comments/function names (endianess -> endianness)Roberto Ierusalimschy2014-03-271-3/+3
|
* make all dumps/loads go trhough Load/DumpVector (so it is easierRoberto Ierusalimschy2014-03-111-4/+10
| | | | to adapt the code to correct endianess, if needed)
* keep chunk's headers compatible at least up to LUAC_VERSION (to beRoberto Ierusalimschy2014-03-111-7/+8
| | | | able to detect correctly version mismatches)
* no need to avoid negative ints in 'LoadInt'Roberto Ierusalimschy2014-03-101-3/+1
|
* "indent -kr -i2 -br -brf -nut" plus a few manual formatingRoberto Ierusalimschy2014-03-101-207/+222
|
* no need to store a full 'size_t' fo the size of (frequent) small stringsRoberto Ierusalimschy2014-03-011-5/+5
|
* more regularity with vectors + sizeof computed by the macros themselvesRoberto Ierusalimschy2014-02-281-8/+7
|
* all chars used in binary dumps are unsigned ('lu_byte')Roberto Ierusalimschy2014-02-281-6/+5
|
* store number of upvalues of main function in front of the dump,Roberto Ierusalimschy2014-02-271-9/+3
| | | | so that undump can create initial closure before reading its prototype
* more explicit handling of headers for binary chunksRoberto Ierusalimschy2014-02-271-45/+29
|
* no more local collectionRoberto Ierusalimschy2014-02-131-2/+1
|
* added 'local' bit (true => object is only refered by local variables)Roberto Ierusalimschy2013-08-161-2/+5
|
* dumping and undumping integersRoberto Ierusalimschy2013-04-261-3/+13
|
* no more 'Proto' objects on the stack. Protos are anchored on outerRoberto Ierusalimschy2012-05-081-11/+24
| | | | Protos or on a Closure, which must be created before the Proto.
* error function can be 'l_noret'Roberto Ierusalimschy2012-03-191-2/+2
|
* "default: lua_assert(0)" in switches helps debugging + usesRoberto Ierusalimschy2012-01-231-1/+2
| | | | non-variant types in binary files
* avoid a few warnings (casts)Roberto Ierusalimschy2011-12-071-3/+3
|
* detailsRoberto Ierusalimschy2011-11-241-2/+2
|
* changes by lhf (better control of chars x bytes)Roberto Ierusalimschy2011-05-171-21/+41
|
* no need of lookahead in ZioRoberto Ierusalimschy2011-02-231-3/+3
|
* trying to avoid assumption that sizeof(char)==1Roberto Ierusalimschy2011-02-071-3/+3
|
* version from lhfRoberto Ierusalimschy2010-10-251-26/+14
|
* first version of _ENV; no more global variablesRoberto Ierusalimschy2010-03-121-2/+1
|
* first implementation of lexical environmentsRoberto Ierusalimschy2009-09-301-1/+2
|