| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
When dumping a string, adding 2 to its size may overflow a size_t for
external strings, which may not have a header. (Adding 1 is Ok, because
all strings end with a '\0' not included in their size.) The new method
for saving NULL strings code them as a repeated string, using the
reserved index 0.
|
| |
|
|
|
|
| |
Unlike sizes, these constants can be negative, so it encodes those
integers into unsigned integers in a way that keeps small numbers
small.
|
| | |
|
| | |
|
| |
|
|
|
| |
The structure 'AbsLineInfo' is hard-dumped into binary chunks, and
it comprises two 'int' fields.
|
| |
|
|
|
| |
No warnings for standard numerical types. Still pending alternative
numerical types.
|
| |
|
|
|
|
| |
Several definitions that don't need to be "global" (that is, that
concerns only specific parts of the code) moved out of llimits.h,
to more appropriate places.
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
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.)
|
| |
|
|
|
|
| |
size_t should be big enough to count the number of strings in a dump.
(And, by definition, it is big enough to count the length of each
string.)
|
| |
|
|
|
|
|
|
| |
- Usign lua_Unsigned to count strings.
- Varint uses a type large enough both for size_t and lua_Unsigned.
- Most-Significant Bit 0 means last byte, to conform to common usage.
- (unrelated) Change in macro 'getaddr' so that multiplication is
by constants.
|
| | |
|
| |
|
|
|
| |
'lua_dump' signals to the writer function the end of a dump, so that
is has more freedom when using the stack.
|
| |
|
|
|
|
| |
Call to 'luaH_setint' could call the GC with the string unanchored.
Moreover, previously saved strings were being assigned to the prototype
without a barrier.
|
| | |
|
| |
|
|
|
|
| |
The use of tables in dump/undump to reuse strings did not exist in
the version that changed the representation of arrays, so it was not
corrected for the new API for tables.
|
| |
|
|
| |
Accesses content and length of a 'TString'.
|
| |
|
|
| |
So that the other bits can be used for other purposes.
|
| | |
|
| |\ |
|
| | |
| |
| |
| |
| | |
The size of the list of upvalue names are stored separated from the
size of the list of upvalues, but they share the same array.
|
| | |
| |
| |
| | |
All strings are being reused now, including 'source'.
|
| |/
|
|
|
| |
A repeated string in a dump is represented as an index to its first
occurence, instead of another copy of the string.
|
| |
|
|
|
|
| |
(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.
|
| |
|
|
|
| |
- function names start with lower case;
- state is always the first parameter.
|
| |
|
|
|
| |
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.)
|
| |
|
|
|
| |
Local constant variables initialized with compile-time constants
are optimized away from the code.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
- 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.)
|
| |
|
|
|
| |
Version numbers and dates (mostly wrong) from RCS keyword strings
removed from all source files; only the file name are kept.
|
| |
|
|
|
| |
rttype -> rawtt; ttyperaw -> withvariant; ttype -> ttypetag;
tnov -> ttype
|
| | |
|
| | |
|
| |
|
|
|
|
| |
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.)
|
| | |
|
| | |
|
| |
|
|
| |
of struct 'TString'
|
| |
|
|
| |
any other header file
|
| |
|
|
| |
(union used only for size purposes)
|
| |
|
|
|
| |
parent when they are equal (only possible case for chunks created
by the parser)
|
| | |
|
| |
|
|
| |
each one separated
|
| | |
|
| | |
|
| |
|
|
| |
to adapt the code to correct endianess, if needed)
|
| |
|
|
| |
able to detect correctly version mismatches)
|
| | |
|
| | |
|
| | |
|