Roberto Ierusalimschy
0acd55898d
Added gcc option '-Wconversion'
No warnings for standard numerical types. Still pending alternative
numerical types.
3 months ago
Roberto Ierusalimschy
55ac40f859
Cleaning of llimits.h
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.
5 months ago
Roberto Ierusalimschy
9fa63a6268
Some 'unsigned int' changed to 'unsigned'
'unsigned int' is too long sometimes. (We already write 'long' instead
of 'long int'...)
8 months ago
Roberto Ierusalimschy
024f9064f1
External strings
Strings can use external buffers to store their contents.
1 year ago
Roberto Ierusalimschy
7f4906f565
Towards external strings
Long strings have a pointer to string contents.
1 year ago
Roberto Ierusalimschy
9a89fb1c9d
Hash always use all characters in a long string
Hashes for long strings are computed only when they are used as keys
in a table, not a too common case. And, in that case, it is to easy to
force collisions changing only the characters which are not part of the
hash.
4 years ago
Roberto Ierusalimschy
9514abc2da
Cleaner definition for 'TString'
Use a variable-sized array to store string contents at the end of a
structure 'TString', instead of raw memory.
5 years ago
Roberto Ierusalimschy
7288528a1e
Short strings always use all bytes in the hash
Collisions in short strings occurr just by their existence, when
internalizing them. (Collisions in long strings is caused/controlled
by the program, when adding them as keys to the same table.)
5 years ago
Roberto Ierusalimschy
46c3587a6f
Clearer distinction between types and tags
LUA_T* represents only types; tags (types + Variants) are represented
by LUA_V* constants.
5 years ago
Roberto Ierusalimschy
c5feac2b5e
Strings inside Lua are not fully aligned
Removed code to ensure that strings inside Lua (as returned by
'lua_tolstring') always start in fully aligned addresses.
Since version 5.3 the documentation does not ensure that.
6 years ago
Roberto Ierusalimschy
f99509581e
Removed extra information from RCS keyword strings
Version numbers and dates (mostly wrong) from RCS keyword strings
removed from all source files; only the file name are kept.
6 years ago
Roberto Ierusalimschy
ca6fe7449a
userdata can have multiple user values
7 years ago
Roberto Ierusalimschy
599f1742c6
detail (typo in comments)
7 years ago
Roberto Ierusalimschy
6d998055c8
no more reference 'memerrmsg' + new reference to "n"
(both can be retrieved by 'luaS_newliteral' without creating anything,
because they are fixed, but "n" deserves fast access while 'memerrmsg'
does not)
7 years ago
Roberto Ierusalimschy
d356183402
new function 'luaS_hashlongstr'
9 years ago
Roberto Ierusalimschy
41964648ee
long strings are created directly in final position when possible
(instead of using an auxiliar buffer to first create the string
and then allocate the final string and copy result there)
9 years ago
Roberto Ierusalimschy
b436ed58a3
'clearapihash' -> 'luaS_clearcache' and moved to 'lstring.c' (which
keeps all code related to this cache)
10 years ago
Roberto Ierusalimschy
a80cada914
new cache for interning strings
10 years ago
Roberto Ierusalimschy
7e2015a46d
size of short strings stored in a single byte, to reduce the size
of struct 'TString'
10 years ago
Roberto Ierusalimschy
bb12903120
type 'Udata' refers directly to structure inside the union (union
used only for aligning purposes now)
10 years ago
Roberto Ierusalimschy
ca41b43f53
type 'TString' refers directly to the structure inside the union
(union used only for size purposes)
10 years ago
Roberto Ierusalimschy
2f5f77788f
removed function 'luaS_eqstr' (not used anywhere)
11 years ago
Roberto Ierusalimschy
c86b9da022
userdata can have any Lua value as uservalue
11 years ago
Roberto Ierusalimschy
0df6635711
"fixed" objects kept in a separated list (instead of being kept in
'allgc' list with a bit marking them)
11 years ago
Roberto Ierusalimschy
ae800656c9
change in string table: string table is now independent of GC lists; all
strings live in 'normal' GC lists
11 years ago
Roberto Ierusalimschy
439d74e29f
added 'local' bit (true => object is only refered by local variables)
11 years ago
Roberto Ierusalimschy
678c1255c9
random seed used in the hash of all strings to avoid intentional
collisions
13 years ago
Roberto Ierusalimschy
a4b96ce9a3
first implementation of long strings
13 years ago
Roberto Ierusalimschy
d19f1da6ef
new macro 'isreserved' + 'eqstr' -> 'luaS_eqstr' (may be a function)
13 years ago
Roberto Ierusalimschy
d394d5536a
new macro 'eqstr'
15 years ago
Roberto Ierusalimschy
f80ff7a336
'luaS_new' changed from macro to function
15 years ago
Roberto Ierusalimschy
63a2b62468
must include 'string.h' because a macro uses 'strlen'
15 years ago
Roberto Ierusalimschy
8718fda9b2
added LUAI_FUNC to functions not in the API
20 years ago
Roberto Ierusalimschy
d55bb795fa
details
20 years ago
Roberto Ierusalimschy
7d45a5f48f
C functions and userdata also have environments
20 years ago
Roberto Ierusalimschy
6f1ea817f5
better control over memory-size overflows
20 years ago
Roberto Ierusalimschy
32d4f304db
first implementation of generational GC
20 years ago
Roberto Ierusalimschy
ab7d9bfd0c
cleaner code for manipulation of `marked' field
21 years ago
Roberto Ierusalimschy
da19c436cc
cleaning the stage for generational collection
23 years ago
Roberto Ierusalimschy
ab52fc6097
new macro to `fix' strings
23 years ago
Roberto Ierusalimschy
72659a0605
no more explicit support for wide-chars; too much troble...
23 years ago
Roberto Ierusalimschy
e1d072571e
better syntax for type casts
24 years ago
Roberto Ierusalimschy
8e586c13fc
cleaner way to ensure alignment for strings and userdata
24 years ago
Roberto Ierusalimschy
d5b83ead90
new implementation for userdatas, without `keys'
24 years ago
Roberto Ierusalimschy
39b7978329
first (big) step to support wide chars
24 years ago
Roberto Ierusalimschy
099442c41f
better separation between basic types
24 years ago
Roberto Ierusalimschy
d2e340f467
string pointers are always fully aligned
24 years ago
Roberto Ierusalimschy
6875fdc8be
new semantics for pushuserdata (no more different userdatas with same value)
24 years ago
Roberto Ierusalimschy
08496eea8b
small changes in lstring
24 years ago
Roberto Ierusalimschy
0183b8030c
`free' gets size of the block: complete control over memory use
24 years ago