Roberto Ierusalimschy
f59e6a93c0
opening functions must be exported!
2018-06-19 16:23:57 -03:00
Roberto Ierusalimschy
6683f83b51
several details
2018-06-18 15:25:19 -03:00
Roberto Ierusalimschy
a314409dba
in generational mode, an emergency collection can turn any object black
...
during any memory allocation +
'luaT_getvarargs' may reallocate the stack, and therefore the top must
be correct.
2018-06-18 14:58:21 -03:00
Roberto Ierusalimschy
15ce8d0904
in generational mode, an emergency collection can turn any object black
...
during any memory allocation.
2018-06-18 14:57:20 -03:00
Roberto Ierusalimschy
b43300c14f
change in 'LUAI_DDEC' to allow variables to be static in 'onelua'
...
+ change in 'LUAMOD_API' as opening functions do not need to be global
2018-06-18 09:51:05 -03:00
Roberto Ierusalimschy
af70905246
no need to check whether libraries and host use the same kernel;
...
Lua should work correctly with several copies of the kernel
2018-06-18 09:08:10 -03:00
Roberto Ierusalimschy
b95e466218
new field 'nilvalue' in struct 'global_State' to avoid the use of
...
addresses of static variables
2018-06-15 16:31:22 -03:00
Roberto Ierusalimschy
d406d3d05f
removed unused macros 'isstackindex'/'api_checkstackindex' +
...
macro 'api_checkvalidindex' (used only once) expanded and removed
2018-06-15 14:30:52 -03:00
Roberto Ierusalimschy
b6780ee41b
detail (removed unused definition for 'LUA_QS')
2018-06-15 12:49:28 -03:00
Roberto Ierusalimschy
2c107e13a8
warning (comparison between signed and unsigned integers)
2018-06-15 11:18:40 -03:00
Roberto Ierusalimschy
6e600695f8
field 'sizearray' in struct 'Table' changed to 'alimit', which can
...
be used as a hint for '#t'
2018-06-15 11:14:20 -03:00
Roberto Ierusalimschy
06127927ff
new macro 'ispow2'
2018-06-15 11:13:45 -03:00
Roberto Ierusalimschy
aedcfb9414
type 'Rand64' may not be long long, so it should not use 'LL' in its
...
constants
2018-06-14 15:47:22 -03:00
Roberto Ierusalimschy
992b6d2712
no more 'TESTGRAYBIT' (to free this bit for real uses)
2018-06-11 11:19:50 -03:00
Roberto Ierusalimschy
588dfa4ce5
detail in comment
2018-06-08 16:07:27 -03:00
Roberto Ierusalimschy
6f2b8e21c4
added 'const' to 'Proto*' when possible
2018-06-08 16:06:59 -03:00
Roberto Ierusalimschy
c5dc521d65
added patch for bug 5.3.4-7
2018-06-08 13:23:18 -03:00
Roberto Ierusalimschy
505fc91222
no more 'luaO_nilobject' to avoid comparison of global variable addresses
...
(now uses static variables)
2018-06-01 14:40:38 -03:00
Roberto Ierusalimschy
fb8fa66136
no more 'luaH_emptyobject' and comparisons of addresses of global variables
...
(instead, use a different kind of nil to signal the fake entry returned
when a key is not found in a table)
2018-06-01 13:51:34 -03:00
Roberto Ierusalimschy
b397064955
avoid craches when loading tampered code with NULL as a string constant
2018-06-01 13:45:58 -03:00
Roberto Ierusalimschy
34aa0c5bd7
new macros 'likely'/'unlikely' with hints for jump predictions
...
(used only in errors for now)
2018-05-30 11:25:52 -03:00
Roberto Ierusalimschy
97e394ba18
macro 'luai_makeseed' now controls the whole process of making the seed
2018-05-29 15:02:51 -03:00
Roberto Ierusalimschy
950fbcb971
detail ('l_castU2S' should only be used over lua_Unsigned values)
2018-05-29 15:01:50 -03:00
Roberto Ierusalimschy
b2d4d06428
avoid possible overflows when checking sizes in 'string.unpack'
2018-05-25 10:39:32 -03:00
Roberto Ierusalimschy
3b8dba5279
added patches for two bugs (5.3.4-2 and 5.3.4-3)
2018-05-24 17:25:14 -03:00
Roberto Ierusalimschy
892aff2a07
avoid circular inclusion between ltm.h <-> lstate.h
2018-05-23 11:41:20 -03:00
Roberto Ierusalimschy
02ed0b2c30
in 'luaD_poscall', there is no need to compute 'firstResult' when 'nres==0'
2018-05-22 09:02:36 -03:00
Roberto Ierusalimschy
de53c2ec7e
using some weak "randomness" (time and memory address) to initialize
...
seeds for the PRNG
2018-05-16 08:27:59 -03:00
Roberto Ierusalimschy
80bd4a8940
correction on xoshiro256** algorithm
...
(should use state[1] instead of state[0] for output)
2018-05-09 11:54:37 -03:00
Roberto Ierusalimschy
3e7415e846
reorganization of '#if's for sellecting a type for 'Rand64' +
...
comments
2018-05-04 17:01:45 -03:00
Roberto Ierusalimschy
e64e20ac81
minimizing the code ran by 'vmfetch' + no more 'vra'
...
(the code is simpler without 'vra' and conversion is a no-op)
2018-05-02 15:17:59 -03:00
Roberto Ierusalimschy
deb807837c
'luaO_pushvfstring' does not need to reallocate stack
...
(less error cases in the API)
2018-04-25 13:26:20 -03:00
Roberto Ierusalimschy
26eb144541
no need to define 'luaP_opnames' in regular builds
2018-04-19 12:42:41 -03:00
Roberto Ierusalimschy
f9c3d6fdbe
use test mode to test the interpreter without jump tables
2018-04-11 13:49:36 -03:00
Roberto Ierusalimschy
762baf0548
detail (trim constants are unsigned)
2018-04-06 14:52:42 -03:00
Roberto Ierusalimschy
b8a04658b2
PRNG changed from 'xoroshiro128+' to 'xoshiro256**' + "I' renamed 'Rand64'
...
+ implementation can use integer types larger than 64 (or 32) bits
2018-04-06 12:41:29 -03:00
Roberto Ierusalimschy
b44787652b
using 'xoroshiro128+' for PRNG
...
(plus a rotate at the final result to have better lower bits)
2018-04-04 13:12:53 -03:00
Roberto Ierusalimschy
03c6a05ec8
no more nil-in-table
2018-04-04 11:23:41 -03:00
Roberto Ierusalimschy
3d0b5edfe4
using unsigned comparison in 'l_intfitsf' (avoids one comparison)
2018-04-02 14:52:07 -03:00
Roberto Ierusalimschy
8d50a998e3
definition for LUA_UNSIGNEDBITS (number of bits in a LUA_UNSIGNED)
2018-04-02 10:58:33 -03:00
Roberto Ierusalimschy
bdd10a08b1
in 'random', uses high-order bits instead of low-order
...
(better statistical properties)
2018-03-26 16:48:46 -03:00
Roberto Ierusalimschy
c5e3b2f814
in random/'project', remove the special case for "small" intervals;
...
it is slower than the general case.
2018-03-22 16:54:49 -03:00
Roberto Ierusalimschy
6486762463
missing LUAI_FUNC in prototype for 'luaK_patchgoto'
2018-03-19 17:03:44 -03:00
Roberto Ierusalimschy
4907444db9
'fTransfer' -> 'ftransfer' / 'nTransfer' -> 'ntransfer'
...
(keep the standard of names in lower case)
2018-03-16 12:33:34 -03:00
Roberto Ierusalimschy
c3cb31fa9a
some extra goodies for 'readline'
...
('rl_readline_name' and 'rl_inhibit_completion')
2018-03-16 11:23:08 -03:00
Roberto Ierusalimschy
0c7738240e
FALLTHROUGH comment must be last "statement"
...
(so it does not work when inside a block)
2018-03-16 11:22:09 -03:00
Roberto Ierusalimschy
7b0b6b3b39
cannot use 'defined' inside a macro +
...
call to 'luaT_keydef' must be protected
2018-03-16 11:21:20 -03:00
Roberto Ierusalimschy
89da4168df
avoid functions named 'pack'
...
(name too common, may collide when doing 'onelua.c')
2018-03-16 11:18:18 -03:00
Roberto Ierusalimschy
6b01b6cf6a
'lu_int32' may not be 'int'
2018-03-12 09:39:03 -03:00
Roberto Ierusalimschy
e3388ebfad
more explicit casts when converting an integer to a random float
...
(to ensure computations are done with all bits)
2018-03-11 11:48:09 -03:00
Roberto Ierusalimschy
9e3db70482
details (casts between 'lua_Number' and 'double')
2018-03-09 16:24:45 -03:00
Roberto Ierusalimschy
dbec41f34c
random floats of different sizes get exactly needed number of random bits
...
(up to 64)
2018-03-09 16:23:39 -03:00
Roberto Ierusalimschy
0b3db69e41
slight simplification in 'xorshift128plus'
2018-03-09 12:05:13 -03:00
Roberto Ierusalimschy
80ae1c1c16
fairer projection of random integers into an integer interval
2018-03-09 11:56:25 -03:00
Roberto Ierusalimschy
40683b4934
added definition for LUA_MAXUNSIGNED
2018-03-09 11:56:02 -03:00
Roberto Ierusalimschy
6480e73599
details (avoid using non-C89 '//' comment)
2018-03-07 13:26:01 -03:00
Roberto Ierusalimschy
4a1612ff9b
new experimental syntax using reserved word 'undef'
2018-03-07 12:55:38 -03:00
Roberto Ierusalimschy
464658b16a
better modularization of the code for the REPL
2018-03-06 17:30:17 -03:00
Roberto Ierusalimschy
bdcde45d05
updated to use jump tables
2018-03-05 11:26:18 -03:00
Roberto Ierusalimschy
8b0434e5e6
both 'fTransfer' and 'nTransfer' may not fit in a 'char'
2018-03-05 11:15:32 -03:00
Roberto Ierusalimschy
8b0b675149
added casts (warnings in VS)
2018-03-05 11:15:04 -03:00
Roberto Ierusalimschy
8c429311a3
typo in comment
2018-03-05 11:13:55 -03:00
Roberto Ierusalimschy
66b7b075a6
'math.random' using the xorshift128+ algorithm
2018-03-05 11:07:48 -03:00
Roberto Ierusalimschy
62a392ff46
using jump tables when available
2018-03-02 15:59:19 -03:00
Roberto Ierusalimschy
893f382e94
Jump Table for the interpreter
2018-03-02 15:56:14 -03:00
Roberto Ierusalimschy
0eb10c6303
'LUA_USE_READLINE' moved to the make file
2018-03-02 15:31:51 -03:00
Roberto Ierusalimschy
00008b8ed0
back to one format per argument
2018-03-02 15:25:00 -03:00
Roberto Ierusalimschy
df49384516
year in copyright changed to 2018
2018-03-02 13:30:47 -03:00
Roberto Ierusalimschy
fbea553ca2
'lua_setiuservalue' removes value from the stack even in case of error
2018-02-27 17:01:55 -03:00
Roberto Ierusalimschy
34b00c16e2
removed compatibility code with older versions
2018-02-27 15:47:32 -03:00
Roberto Ierusalimschy
12110dec0e
module has been deprecated.
2018-02-27 15:46:26 -03:00
Roberto Ierusalimschy
4105cafb84
no more 'bitlib'
2018-02-27 15:27:30 -03:00
Roberto Ierusalimschy
76ff55750e
no optimizations in test mode + no more compat with 5.2 + a few more
...
options in comments
2018-02-27 15:24:23 -03:00
Roberto Ierusalimschy
b7edf5d2d8
metamethods for 'removekey'/'keyin'
2018-02-27 14:48:28 -03:00
Roberto Ierusalimschy
ef8263f81f
better names for macros for tags and types.
...
rttype -> rawtt; ttyperaw -> withvariant; ttype -> ttypetag;
tnov -> ttype
2018-02-26 11:16:05 -03:00
Roberto Ierusalimschy
2952bc5fc9
special compact representation for userdata with no user values
...
(a common case)
2018-02-26 10:35:03 -03:00
Roberto Ierusalimschy
38d3bc8909
using 'offsetof' to compute the size of parts of a structure
2018-02-25 10:40:00 -03:00
Roberto Ierusalimschy
75efc6722b
avoid variant tags with the same value of the original type
...
(to expose bugs more easily)
2018-02-25 09:52:32 -03:00
Roberto Ierusalimschy
d766e2ae17
first (parcial) implementation of 'keyin'/'removekey'
...
(still no metamethods, no raw verssions)
2018-02-25 09:48:16 -03:00
Roberto Ierusalimschy
f055a9dffd
added check in 'obj2gco' to prevent its use in non Lua-object pointers
...
(otherwise its cast is blind, casting any value given to it)
2018-02-25 09:43:52 -03:00
Roberto Ierusalimschy
4a7fe61806
in 'clearbykeys', clear keys of just-removed entries too
2018-02-23 10:21:27 -03:00
Roberto Ierusalimschy
9243c414d9
first version of empty entries in tables
...
(so that, in the future, tables can contain regular nil entries)
2018-02-23 10:16:18 -03:00
Roberto Ierusalimschy
477ca2fe8c
some reorganization in 'lobject.h'
...
(just moving stuff around)
2018-02-22 14:28:10 -03:00
Roberto Ierusalimschy
c72ac048b9
conditional jumps "deunified"
...
(if a jump table is used, the unification may harm jump prediction.)
2018-02-21 16:43:44 -03:00
Roberto Ierusalimschy
b03dddf9e4
removed coercion string->number in bitwise operations
...
(can be done with a Lua module)
2018-02-21 14:48:31 -03:00
Roberto Ierusalimschy
c80c7a49fd
details (comments)
2018-02-21 13:28:12 -03:00
Roberto Ierusalimschy
212095a601
new opcodes OP_GTI/OP_GEI
2018-02-21 12:49:32 -03:00
Roberto Ierusalimschy
c67603fafb
using new 'lua_newuserdatauv' instead of 'lua_newuserdata'
2018-02-21 10:48:44 -03:00
Roberto Ierusalimschy
06865aa01d
simpler implementation for 'LTintfloat'/'LEintfloat'
...
+ 'LTfloatint'/'LEfloatint'
2018-02-21 10:47:03 -03:00
Roberto Ierusalimschy
465b474899
small reorganization of 'luaV_flttointeger'/'luaV_tointeger'
2018-02-21 09:54:26 -03:00
Roberto Ierusalimschy
6353d619a5
detail (comment)
2018-02-20 17:52:50 -03:00
Roberto Ierusalimschy
ca6fe7449a
userdata can have multiple user values
2018-02-20 13:52:50 -03:00
Roberto Ierusalimschy
1afd5a152d
more generic way to handle 'gclist'
2018-02-19 17:06:56 -03:00
Roberto Ierusalimschy
422318f677
two new fields 'fTransfer'/'nTransfer' in 'lua_Debug' structure
...
(for information about values being given and returned in function calls)
2018-02-17 17:29:29 -02:00
Roberto Ierusalimschy
49dae52d08
correct way to check stack space for vararg functions
2018-02-17 17:20:00 -02:00
Roberto Ierusalimschy
104d249ffb
in return hook, 'top' must be corrected only if smaller than 'ci->top'.
...
(It may be larger when returning multiple values, and then it must
be larger to preserve that stack slice.)
2018-02-17 16:22:00 -02:00
Roberto Ierusalimschy
c7a8cba745
no more 'nfield' string
2018-02-15 16:06:24 -02:00
Roberto Ierusalimschy
0682fe8169
some simplifications/optimizations in returns from Lua functions
2018-02-15 13:34:29 -02:00
Roberto Ierusalimschy
b1379936cf
vararg back to '...' (but with another implementation)
...
new implementation should have zero overhead for non-vararg functions
2018-02-09 13:16:06 -02:00
Roberto Ierusalimschy
4e0de3a43c
details
2018-02-07 13:55:18 -02:00
Roberto Ierusalimschy
318a9a5859
new opcode 'PREPVARARG'
...
(avoids test for vararg function in all function calls)
2018-02-07 13:18:04 -02:00
Roberto Ierusalimschy
73d797ce7e
detail
...
(order of 'OT' and 'IT' bits corresponds with macro 'opmode')
2018-02-07 13:04:41 -02:00
Roberto Ierusalimschy
51280ef2ad
call hooks for Lua functions called by 'luaV_execute'
2018-02-06 17:16:56 -02:00
Roberto Ierusalimschy
fc3eaa2559
GC default mode for the stand-alone interpreter is generational mode
2018-02-06 13:32:36 -02:00
Roberto Ierusalimschy
daff7c3b4d
small corrections in generational mode
...
(cannot call finalizers in emergency collections +
should set everything before calling finalizers)
2018-02-05 15:14:54 -02:00
Roberto Ierusalimschy
a131eae925
default for minor collection intervals a little larger
2018-02-05 15:14:29 -02:00
Roberto Ierusalimschy
022abc301b
'gcemergency' should be zero before any memory allocation
2018-02-05 15:11:37 -02:00
Roberto Ierusalimschy
56e50e8bc5
'collectgarbage' returns old mode when changing mode
2018-02-05 15:10:52 -02:00
Roberto Ierusalimschy
90569630d6
detail
...
(uses a reserved-format name for an internal type in the registry)
2018-01-29 17:13:27 -02:00
Roberto Ierusalimschy
dc0ab1e8ca
warnings in VS (implicit casts from ptrdiff_t to int)
2018-01-29 14:21:35 -02:00
Roberto Ierusalimschy
e2b15aa21d
janitor work on casts
2018-01-28 13:13:26 -02:00
Roberto Ierusalimschy
89110986d7
bug in tailcall of vararg functions
...
(when adjusting missing parameters)
2018-01-28 11:39:52 -02:00
Roberto Ierusalimschy
53979dfe0d
calling a vararg function needs to check GC
...
(because it creates a new table)
2018-01-28 10:08:04 -02:00
Roberto Ierusalimschy
6710a2b0ef
detail (comment)
2018-01-28 10:07:53 -02:00
Roberto Ierusalimschy
5bd8d388de
OP_CONCAT does not move its result (to simplify its execution)
2018-01-27 14:56:33 -02:00
Roberto Ierusalimschy
28f215ecf8
comments
2018-01-18 14:24:31 -02:00
Roberto Ierusalimschy
d2fb34ac88
'OP_TAILCALL' calling C functions finishes the call and returns
...
(instead of waiting for following 'OP_RETURN')
2018-01-14 15:27:50 -02:00
Roberto Ierusalimschy
ab0a851db4
'luaD_tryfuncTM' can ensure it does not change the stack
2018-01-10 17:19:27 -02:00
Roberto Ierusalimschy
728ff94595
error handler in protected calls must be a function
2018-01-10 10:02:35 -02:00
Roberto Ierusalimschy
ad960095bf
avoid jumping into a variable scope (C++ does not allow that)
2018-01-09 12:23:40 -02:00
Roberto Ierusalimschy
33e3774f44
keep more opcode arguments byte-aligned
2018-01-09 09:24:12 -02:00
Roberto Ierusalimschy
a9295a2b8e
typos in comments
2017-12-30 18:46:18 -02:00
Roberto Ierusalimschy
c6fedc92f8
new command 'print' (to print literal strings) in mini-language
2017-12-29 13:59:37 -02:00
Roberto Ierusalimschy
68af7cc81a
another try with table resize.
...
(Old version was leaving some elements unanchored while allocating
new memory)
2017-12-29 13:58:23 -02:00
Roberto Ierusalimschy
28323aeaa6
by-one error when filling missing arguments in a tail call
2017-12-29 13:44:51 -02:00
Roberto Ierusalimschy
cf7eff45f3
keep control of stack top in Lua functions concentrated in 'luaV_execute'
2017-12-28 13:42:57 -02:00
Roberto Ierusalimschy
8691612f01
when calling a hook, cannot decrease 'ci->top' (to preserve stack
...
size if the stack is reallocated)
2017-12-28 12:17:09 -02:00
Roberto Ierusalimschy
f99f3c42ff
comment
2017-12-28 09:51:00 -02:00
Roberto Ierusalimschy
f360e7778b
assert cannot use instruction after the last
2017-12-22 14:43:59 -02:00
Roberto Ierusalimschy
4676f6599e
new macros 'isOT'/'isIT'
...
(plus exchanged parameters of OP_VARARG to make it similar to other
'isOT' instructions)
2017-12-22 12:16:46 -02:00
Roberto Ierusalimschy
1d5b885437
when running Lua code, there is no need to keep 'L->top' "correct";
...
set it only when needed.
2017-12-20 12:58:05 -02:00
Roberto Ierusalimschy
4dc0be950a
new macro 'isLuacode' (to distinguish regular Lua code from
...
hooks, where C code can run inside a Lua function).
2017-12-19 14:40:17 -02:00
Roberto Ierusalimschy
3153a41e33
no need to save 'pc' in case of allocation errors
...
(allocation errors do not call message handlers)
2017-12-19 14:18:04 -02:00
Roberto Ierusalimschy
d388c165ef
new opcodes 'FORLOOP1'/'FORPREP1' for "basic for" (integer variable
...
with increment of 1)
2017-12-18 15:53:50 -02:00
Roberto Ierusalimschy
ab07005568
new auxiliary function 'luaK_isKint' + removal of 'luaK_needclose',
...
which was not being used anywhere.
2017-12-18 13:44:44 -02:00
Roberto Ierusalimschy
7024f49c42
default now is compiling without compatibility options + smaller
...
stack size in debug mode (clang uses still more stack space when
debugging).
2017-12-18 11:01:49 -02:00
Roberto Ierusalimschy
2f6f6abeba
'rehash' -> 'tablerehash'
...
(to avoid name colisions when compiling Lua as a single file)
2017-12-18 11:00:57 -02:00
Roberto Ierusalimschy
3064edead2
details (cleaning uses of 'exp1')
2017-12-18 10:33:54 -02:00
Roberto Ierusalimschy
f8c1c1469a
some cleaning on signed opcode parameters
2017-12-15 16:53:48 -02:00
Roberto Ierusalimschy
4b6928e7f5
(1 << 31) with signed integer has undefined behavior in C
2017-12-15 16:35:22 -02:00
Roberto Ierusalimschy
b3f924bc69
'Proto->numparams' does not include vararg parameter
...
(one less subtraction when calling functions...)
2017-12-15 11:07:10 -02:00
Roberto Ierusalimschy
e001d5aea6
'VRELOCABLE' -> 'VRELOC'
2017-12-14 12:24:02 -02:00
Roberto Ierusalimschy
e752d84ed8
bug: memory-allocation error when resizing a table can leave it
...
in an inconsistent state.
2017-12-13 16:35:03 -02:00
Roberto Ierusalimschy
86431a2f1c
new opcodes BANDK/BORK/BXORK. (They do not use immediate operands
...
because, too often, masks in bitwise operations are integers larger
than one byte.)
2017-12-13 16:32:09 -02:00
Roberto Ierusalimschy
36cf8f3a3c
Code should not change the stack level after the initialization of a
...
string buffer.
2017-12-13 10:51:42 -02:00
Roberto Ierusalimschy
725c15a4ca
when shrinking stack, always shrinks the CI list.
...
(Stack overflow is not corelated to CI overflow anymore.)
2017-12-12 09:57:30 -02:00
Roberto Ierusalimschy
b077b20206
back to reallocation when resizing the string table.
...
(Not a good idea to explicitly allocate new memory when shrinking
something.)
2017-12-12 09:52:35 -02:00
Roberto Ierusalimschy
3cf340f676
allows memory-allocation errors when shrinking blocks
2017-12-11 16:55:31 -02:00
Roberto Ierusalimschy
7ad20af2cf
more freedom in handling memory-allocation errors (not all allocations
...
automatically raise an error), which allows fixing a bug when resizing
a table.
2017-12-11 16:53:53 -02:00
Roberto Ierusalimschy
bfb88e99e9
'luaD_growstack' cannot raise any errors when 'raiseerror' is
...
false (+ some comments)
2017-12-11 10:43:40 -02:00
Roberto Ierusalimschy
c5ebed7399
'luaM_shrinkvector' raises an error if it cannot shrink the block
...
(several parts of Lua use array size in protos as proxies for
number of valid elements)
2017-12-11 10:27:48 -02:00
Roberto Ierusalimschy
e663a24ab0
more freedom in handling memory-allocation errors (not all allocations
...
automatically raise an error), which allows fixing a bug when resizing
a table.
2017-12-08 15:28:25 -02:00
Roberto Ierusalimschy
40f823ec90
new C instruction "rawcheckstack" (to test failing in 'lua_checkstack')
2017-12-08 13:19:13 -02:00
Roberto Ierusalimschy
7622373033
using explicit tests for allocation overflow whenever possible
2017-12-07 16:59:52 -02:00
Roberto Ierusalimschy
46bc7f2bf7
detail (comment)
2017-12-07 16:53:33 -02:00
Roberto Ierusalimschy
cc01d46247
new test function 'T.allocount' to restrict number of allocations
...
before a memory-allocation error
2017-12-07 16:51:39 -02:00
Roberto Ierusalimschy
9fa1baf6de
opcodes for order and shift can use several metamethods,
...
so it is better to use a generic description + metamethod names
in some error messages shown without '__' prefix
2017-12-07 13:44:10 -02:00
Roberto Ierusalimschy
49dfaf7447
avoid using one function for different tasks (malloc, free, etc.)
2017-12-06 16:36:31 -02:00
Roberto Ierusalimschy
348fa1ca56
bug: 'lua_pushcclosure' should not call the garbage collector when
...
'n' is zero.
2017-12-06 16:20:28 -02:00
Roberto Ierusalimschy
ae11e37e53
bug: 'lua_pushcclosure' should not call the GC when 'n' is zero
2017-12-06 16:08:03 -02:00
Roberto Ierusalimschy
c7ee7fe026
new opcodes OP_SHLI/OP_SHRI
2017-12-04 15:41:30 -02:00
Roberto Ierusalimschy
421e459684
'luaS_resize' can raise memory errors
2017-12-01 15:38:49 -02:00
Roberto Ierusalimschy
9d28b40152
rehashes string table always allocating a new array instead of
...
reallocating old one. (Avoids problems if reallocation to a small
size fails.)
2017-12-01 14:40:29 -02:00
Roberto Ierusalimschy
e0bece77d6
detail
2017-12-01 13:44:51 -02:00
Roberto Ierusalimschy
d0356d5f15
another value for LUAI_MAXCCALLS (must think more about that)
2017-12-01 13:08:14 -02:00
Roberto Ierusalimschy
ac78b914b6
warnings from Visual Studio /W3
2017-11-30 13:37:16 -02:00
Roberto Ierusalimschy
10b8c99bbb
small peephole optimizations
2017-11-30 11:29:18 -02:00
Roberto Ierusalimschy
bdc751ce23
details (comments)
2017-11-30 11:16:43 -02:00
Roberto Ierusalimschy
19c6b375c3
detail (spacing)
2017-11-30 10:03:00 -02:00
Roberto Ierusalimschy
745eb41993
new opcodes OP_RETURN0/OP_RETURN1
2017-11-29 14:57:36 -02:00
Roberto Ierusalimschy
c766e4103d
'luaV_execute' gets call info as extra argument (it is always
...
available on call sites)
2017-11-29 11:02:17 -02:00
Roberto Ierusalimschy
36aecd4548
order opcodes cannot use 'K' operands
2017-11-28 13:26:15 -02:00
Roberto Ierusalimschy
1a5e8c1014
conditional jumps unified in label "condjump' + new variable 'vra'
...
to avoid excessive use of macro 's2v'
2017-11-28 12:51:00 -02:00
Roberto Ierusalimschy
ff5fe51044
using register 'k' for conditions in tests (we only need one bit there)
2017-11-28 10:58:18 -02:00
Roberto Ierusalimschy
dfd188ba12
detail (identation of switch)
2017-11-28 09:19:07 -02:00
Roberto Ierusalimschy
093c16b67b
new opcodes 'OP_LTI' and 'OP_LEI'
2017-11-27 15:44:31 -02:00
Roberto Ierusalimschy
599f1742c6
detail (typo in comments)
2017-11-23 17:29:04 -02:00
Roberto Ierusalimschy
73abfde2ef
small simplifications around 'luaT_callorderTM'
2017-11-23 17:18:10 -02:00
Roberto Ierusalimschy
194a4f9710
small simplifications in 'luaD_poscall'
2017-11-23 16:29:41 -02:00
Roberto Ierusalimschy
196c87c9ce
no more 'stackless' implementation; 'luaV_execute' calls itself
...
recursively to execute function calls. 'unroll' continues all
executions suspended by an yield (through a long jump)
2017-11-23 14:41:16 -02:00
Roberto Ierusalimschy
39f26b1480
more information from 'T.stacklevel'
2017-11-23 13:38:42 -02:00
Roberto Ierusalimschy
3c230cc825
using 'A' for register instead of 'B' in relational opcodes
...
('R(A)' is already created by default for all instructions.)
2017-11-22 17:15:44 -02:00
Roberto Ierusalimschy
41f2936d8f
new opcode 'OP_EQI' for equality with immediate numbers
2017-11-22 16:41:20 -02:00
Roberto Ierusalimschy
14c3aa12b5
more direct implementation for tail calls.
2017-11-21 12:18:03 -02:00
Roberto Ierusalimschy
f3ca52bfa9
in order comparison opcodes, fast track for floats too
2017-11-20 10:57:39 -02:00
Roberto Ierusalimschy
c47111bd4e
'io.read' accepts multiple formats in a single string argument
2017-11-16 14:28:36 -02:00
Roberto Ierusalimschy
e4e5aa85a2
detail ('signal' -> 'sign' in comments)
2017-11-16 11:19:06 -02:00
Roberto Ierusalimschy
4c0e36a46e
new instruction 'OP_EQK' (for equality with constants)
2017-11-16 10:59:14 -02:00
Roberto Ierusalimschy
5440b42f43
using 'trap' to stop 'luaV_execute' when necessary (tracing and
...
to update its copy of 'base' when the stack is reallocated)
2017-11-13 13:36:52 -02:00
Roberto Ierusalimschy
7d4828cc9f
avoid accessing wrong union field
2017-11-13 10:26:30 -02:00
Roberto Ierusalimschy
62f3b7c472
detail
2017-11-13 10:20:51 -02:00
Roberto Ierusalimschy
fb9be62f79
includes 'stdio.h' to allow prints when testing
2017-11-13 10:19:35 -02:00
Roberto Ierusalimschy
7c0175bc83
removed unused variable 'islocked'
2017-11-09 11:31:29 -02:00
Roberto Ierusalimschy
32fef60743
detail ('Protect' defined as an expression)
2017-11-08 17:01:02 -02:00
Roberto Ierusalimschy
26679ea35b
new function 'luaV_flttointeger' to convert floats to integers (without
...
string coercions) + string operands to bitwise operations handled
by string metamethods
2017-11-08 12:50:23 -02:00
Roberto Ierusalimschy
c3e5946fb2
new format for JUMP instructions (to allow larger offsets)
2017-11-07 15:20:42 -02:00
Roberto Ierusalimschy
ad0704e40c
back to 'CallInfo' (no gains with its removal)
2017-11-07 11:25:26 -02:00
Roberto Ierusalimschy
5a3f26f855
fitting a StackValue structure into 32 bytes (for 64-bit machines)
2017-11-06 15:34:06 -02:00
Roberto Ierusalimschy
93fd67b793
no more 'CallInfo' structure
2017-11-04 10:57:02 -02:00
Roberto Ierusalimschy
6bb3e40a8d
'lua_Debug' not using 'CallInfo'
2017-11-03 18:41:05 -02:00
Roberto Ierusalimschy
7612f7735d
removing uses of 'CallInfo'
2017-11-03 17:33:22 -02:00
Roberto Ierusalimschy
472c560705
no more useful fields in CallInfo
2017-11-03 15:22:54 -02:00
Roberto Ierusalimschy
54eb35a8aa
more fields moved out of 'CallInfo'
2017-11-03 10:12:30 -02:00
Roberto Ierusalimschy
ba36180fd7
new API for 'lua_resume' + cleaning the uses of the 'extra' field in
...
'CallInfo'
2017-11-02 09:28:56 -02:00
Roberto Ierusalimschy
b9e76be8a6
using 'L->func' when possible
2017-11-01 16:20:48 -02:00
Roberto Ierusalimschy
c5482468fd
baby steps to remove 'CallInfo': keeping 'L->func' correct
2017-10-31 15:54:35 -02:00
Roberto Ierusalimschy
ad5dcdcf0f
detail: in 'isinstack', check against the whole stack instead
...
of against the stack frame
2017-10-31 15:14:02 -02:00
Roberto Ierusalimschy
de9128d09d
do not mess up the debt when the collector is not running
2017-10-31 13:29:28 -02:00
Roberto Ierusalimschy
1d8920dd7f
some cleaning in GC parameters
2017-10-11 09:38:45 -03:00
Roberto Ierusalimschy
911f1e3e7f
raw operation should not convert strings to numbers
2017-10-10 17:05:40 -03:00
Roberto Ierusalimschy
a1ef58b3a5
eplicit 1-bit opcode operand 'k'
2017-10-04 18:56:32 -03:00
Roberto Ierusalimschy
283e7455ff
detail
2017-10-04 18:53:03 -03:00
Roberto Ierusalimschy
8fbe9e3470
new opcodes with immediate integer operand for all arithmetic operations
2017-10-04 12:49:24 -03:00
Roberto Ierusalimschy
9ed9f40f1e
avoid warning about 'const'
2017-10-04 12:49:05 -03:00
Roberto Ierusalimschy
940472c75c
opcode size increased to 7 bits
2017-10-02 19:51:32 -03:00
Roberto Ierusalimschy
f3b3d9b5c2
string constants (Kstr) must fit into 'B' register
2017-10-02 19:50:57 -03:00
Roberto Ierusalimschy
7f9a32ad85
new function 'printcode'
2017-10-01 16:17:51 -03:00
Roberto Ierusalimschy
bc1b0733b8
avoid the use of bit 'Bk' ('B' will lose this bit soon)
2017-10-01 16:13:43 -03:00
Roberto Ierusalimschy
722bdbe17d
no more 'getBMode'-'getCMode' (imprecise + we will need more space
...
for op mode) + better control of op modes
2017-09-28 13:53:29 -03:00
Roberto Ierusalimschy
1b10033583
new function 'luaT_trybiniTM'
...
to handle tag methods for instructions with immediate integer arguments
2017-09-27 15:59:08 -03:00
Roberto Ierusalimschy
00e728af88
binary operators use R instead of RK
...
faster + nobody uses RK(B), so B can be smaller (freeing one bit
for more opcodes, soon)
2017-09-26 15:14:45 -03:00
Roberto Ierusalimschy
13256a4173
detail
...
put explicit all cases for a switch of an enumeration
2017-09-26 14:10:49 -03:00
Roberto Ierusalimschy
abb17cf19b
new opcode OP_LOADF (load immediate float)
2017-09-19 15:38:14 -03:00
Roberto Ierusalimschy
e0c0e2ee14
comments (documentation about instruction formats)
2017-09-18 13:07:54 -03:00
Roberto Ierusalimschy
022e4427cf
detail (keep OP_LOADK and OP_LOADKX together)
2017-09-15 11:19:06 -03:00
Roberto Ierusalimschy
80d9b09f35
jumps do not close upvalues (to be faster and simpler);
...
explicit instruction to close upvalues; command 'break' not
handled like a 'goto' (to optimize removal of uneeded 'close'
instructions)
2017-09-13 16:50:08 -03:00
Roberto Ierusalimschy
029d269f4d
bug: dead keys with nil values can stay in weak tables
2017-08-31 13:14:41 -03:00
Roberto Ierusalimschy
ac65bab25f
jumps in 'for' loops don't need to be signed
2017-08-14 15:33:14 -03:00
Roberto Ierusalimschy
f185c0132e
comment in code fragment
2017-08-12 10:12:42 -03:00
Roberto Ierusalimschy
b77f792b23
comment
2017-08-12 10:12:21 -03:00
Roberto Ierusalimschy
4053eae9eb
bug: Lua does not check GC when creating error messages
2017-07-27 10:55:38 -03:00
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)
2017-07-27 10:50:16 -03:00
Roberto Ierusalimschy
11769b203f
new version (5.4)
2017-07-27 10:36:54 -03:00
Roberto Ierusalimschy
b1daa069ba
bug: Lua does not check GC when creating error messages
2017-07-10 14:35:12 -03:00
Roberto Ierusalimschy
4dff277255
coercion string->number in arithmetic operations moved to string
...
library
2017-07-07 13:34:32 -03:00
Roberto Ierusalimschy
07db10813c
'OP_VARARG' has the vararg parameter as an operand
2017-06-29 12:38:41 -03:00
Roberto Ierusalimschy
f96497397a
new type 'StackValue' for stack elements
...
(we may want to put extra info there in the future)
2017-06-29 12:06:44 -03:00
Roberto Ierusalimschy
5a1c8d8ef3
new constant 'LUA_GNAME' for the name of the global table "_G"
2017-06-27 15:32:49 -03:00
Roberto Ierusalimschy
124bfd2081
dumping ints and size_ts compacted
2017-06-27 11:21:12 -03:00
Roberto Ierusalimschy
b42430fd3a
'lineinfo' in prototypes saved as differences instead of absolute
...
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.)
2017-06-27 08:35:31 -03:00
Roberto Ierusalimschy
60a7492d24
new type 'ls_byte' for signed bytes
2017-06-27 08:35:01 -03:00
Roberto Ierusalimschy
73ec04fcf3
no more 'DEADKEY'. Table traversals do not need to consider dead keys;
...
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.
2017-06-12 11:21:44 -03:00
Roberto Ierusalimschy
d13a3fb070
detail
...
(removed empty spaces at the end of lines)
2017-06-09 16:16:41 -03:00
Roberto Ierusalimschy
b6f87491af
in hash nodes, keys are stored in separate pieces to avoid wasting
...
space with alignments
2017-06-09 13:48:44 -03:00
Roberto Ierusalimschy
4bb30f461b
when assigning to a 'TValue', better assign only exact fields,
...
to allow us to put stuff after the 'TValuefields' if needed
2017-06-01 17:24:05 -03:00
Roberto Ierusalimschy
dad85e4131
macro 'setobj2t' may not be an expression
2017-06-01 17:23:27 -03:00
Roberto Ierusalimschy
b029e7ea20
macro 'luaV_fastget' may need protection ({}) to be used inside
...
'if's
2017-06-01 17:22:33 -03:00
Roberto Ierusalimschy
4bc33d64de
avoid overflows in computation of step size
2017-06-01 16:16:34 -03:00
Roberto Ierusalimschy
8821746841
updated GC states in function 'T.gcstate'
2017-05-31 15:54:58 -03:00
Roberto Ierusalimschy
72d82a296c
revamping the incremental collector
...
Some simplifications (not counting bytes, couting only slots visited;
no more 'gcfinnum'); more GC parameters; using vararg in 'lua_gc' to
set parameters in different GC modes
2017-05-26 16:14:29 -03:00
Roberto Ierusalimschy
4804bbd9bb
include first standard header files
...
(Some broken compiler has problems with 'signal.h' being included
without a definition for 'size_t'.)
2017-05-24 18:11:19 -03:00
Roberto Ierusalimschy
be0d951be8
bug: cannot reuse a dying upvalue
2017-05-24 15:54:54 -03:00
Roberto Ierusalimschy
a9dbc2d641
assert removed in 'luaO_arith'
...
(nobody calls it with L==NULL)
2017-05-24 10:47:11 -03:00
Roberto Ierusalimschy
c25380c28d
details (using proper version of 'setobj')
2017-05-23 09:50:11 -03:00
Roberto Ierusalimschy
03094da80c
detail (extra closing brackets)
2017-05-22 09:55:16 -03:00
Roberto Ierusalimschy
01c96ad12e
handling of inf, -inf, and NaN by string.format'%q'
2017-05-19 13:29:40 -03:00
Roberto Ierusalimschy
1bdc328c75
bug: Lua crashes when building sequences with more than 2^30 elements.
...
bug: Table length computation overflows for sequences larger than
2^31 elements..
2017-05-19 09:58:40 -03:00
Roberto Ierusalimschy
e3d52da144
BUG: in 'computesizes', 'twotoi' overflows when a sequence has
...
more than 2^30 elements.
2017-05-19 09:57:10 -03:00
Roberto Ierusalimschy
e39ee2cc58
'luaH_getn' must return 'lua_Unsigned' (or 'lua_Integer'), to
...
allow the boundary-search algorithm to use 'maxinteger' when
it cannot find a good upper bound.
2017-05-19 09:48:15 -03:00
Roberto Ierusalimschy
84910e04e2
better implementation for 'hash_search', without using 'size_t'
...
(simpler to implement and to explain)
2017-05-19 09:47:00 -03:00
Roberto Ierusalimschy
de74289049
table field names for dedicated opcodes can be restricted to
...
small strings for slightly faster access
2017-05-18 16:44:19 -03:00
Roberto Ierusalimschy
92b3deaffa
details in OP_CALL + comments
2017-05-18 16:34:39 -03:00
Roberto Ierusalimschy
49f7aab62a
'lua_rawlen' returns 'lua_Unsigned' instead of 'size_t'. (Real
...
length of strings and userdata are limited by Lua integers,
but table length is hard to compute limiting it to 'size_t'.)
2017-05-18 09:34:58 -03:00
Roberto Ierusalimschy
3d879fbc5d
reimplementation of 'luaH_getn', trying to handle numeric limits
...
properly.
2017-05-16 16:07:08 -03:00
Roberto Ierusalimschy
6d95de83c6
no more field 'base' in CallInfo (base is always equal to 'func + 1',
...
with old/new vararg implementation)
2017-05-13 10:54:47 -03:00
Roberto Ierusalimschy
5c8770f896
back to old-style vararg system (with vararg table collecting extra
...
arguments)
2017-05-13 10:04:33 -03:00
Roberto Ierusalimschy
7647d5d13d
revamp of fast track for table access (table set uses the same
...
macros as table get + new macro for integer keys)
2017-05-11 15:57:46 -03:00
Roberto Ierusalimschy
7184f6343a
more integer fast tracks (for OP_LT, OP_LE, OP_SETTABLE, and OP_GETTABLE)
2017-05-10 14:32:19 -03:00
Roberto Ierusalimschy
b1b7790f7c
detail ('1' -> '1u' in unsigned operation)
2017-05-09 11:39:46 -03:00
Roberto Ierusalimschy
ab5a650029
details (direct access to 'Ck' bit in instructions)
2017-05-08 13:08:01 -03:00
Roberto Ierusalimschy
fb9de1b4d7
detail ('luaT_callbinTM' does not need to be extern)
2017-05-08 12:57:23 -03:00
Roberto Ierusalimschy
e8757a73e6
'luaV_execute' keeps local copy of program counter and hook mask,
...
to avoid excessive access to globals.
2017-05-05 14:16:11 -03:00
Roberto Ierusalimschy
4ce8d2047c
bug: Wrong code for a goto followed by a label inside an 'if'
2017-05-05 12:55:36 -03:00
Roberto Ierusalimschy
2376eb6347
barrier for prototype's cache (with new gray list 'protogray' to keep
...
prototypes to have their caches visited again) + constant 'MAXMISS'
2017-05-04 10:32:01 -03:00
Roberto Ierusalimschy
8634b2a011
added 'cachemiss' field to prototype to avoid wasting time checking
...
hits that fail too often
2017-04-30 17:43:26 -03:00
Roberto Ierusalimschy
5ecb31003f
bug: cannot "skip" labels after if-goto before the jump over the
...
'then' part
2017-04-29 15:09:17 -03:00
Roberto Ierusalimschy
a454e884e0
details in 'findsetreg'
2017-04-29 12:28:38 -03:00
Roberto Ierusalimschy
502a1d1108
new opcodes for table access with constant keys (strings and integers)
2017-04-28 17:57:45 -03:00
Roberto Ierusalimschy
173e41b2eb
new opcode OP_ADDI (for immediate integer operand) (Experimental)
2017-04-26 14:46:52 -03:00
Roberto Ierusalimschy
a3f9c1a77a
detail (using unsigned comparison in range check for LOADI)
2017-04-25 17:01:14 -03:00
Roberto Ierusalimschy
6dbae1b5d9
registers in a VINDEXED expression must be freed in order
2017-04-25 15:28:25 -03:00
Roberto Ierusalimschy
cb3d5dce30
opcodes 'OP_GETTABUP'/'OP_SETTABUP' operate only with string keys,
...
so they can use fast-track table access
2017-04-24 17:26:39 -03:00
Roberto Ierusalimschy
2caecf1b3e
type 'L_Umaxalign' replaced by macro 'LUAI_MAXALIGN', which is also added
...
to the auxlib buffer
2017-04-24 15:06:12 -03:00
Roberto Ierusalimschy
f399e6705f
ensures that "collectgarbage'step'" in generational mode does a
...
minor collection
2017-04-24 14:52:18 -03:00
Roberto Ierusalimschy
69371c4b84
'KGC_NORMAL' -> 'KGC_INC' + emergency GC signalled by flag (instead
...
of mode)
2017-04-24 13:59:26 -03:00
Roberto Ierusalimschy
6a98aa0bb0
new opcode LOADI (for loading immediate integers)
2017-04-20 16:53:55 -03:00
Roberto Ierusalimschy
c354211744
small bug in generational control
2017-04-20 15:24:33 -03:00
Roberto Ierusalimschy
f748b4bb40
macros to define default parameters for generational collection
2017-04-20 15:22:44 -03:00
Roberto Ierusalimschy
7ae180f8e8
corrected some checks about colors of old objects + new test function
...
'gcage'
2017-04-19 15:46:47 -03:00
Roberto Ierusalimschy
c7bdc0e0e8
first version of control for the generational collector
2017-04-19 14:02:50 -03:00
Roberto Ierusalimschy
a45945b6d5
new macro 'lua_pointer2str' to encapsulate use of 'l_sprintf' inside
...
the kernel
2017-04-19 13:34:35 -03:00
Roberto Ierusalimschy
9e1f1b1f62
detail in usage message for '-l' option
2017-04-19 09:49:17 -03:00
Roberto Ierusalimschy
4679294796
memory check adapted to generational mode
2017-04-18 16:42:12 -03:00
Roberto Ierusalimschy
f74b87c3c2
removed initialization of 'GCestimate' (it is initialized during
...
a GC cycle, when it start counting)
2017-04-12 15:56:25 -03:00
Roberto Ierusalimschy
16001acb15
small corrections + removal of debugging functions 'count' and
...
'printgray'.
2017-04-12 15:01:40 -03:00
Roberto Ierusalimschy
0c8a7e071b
'mainthread' lives in 'allgc' list, like everybody else
2017-04-11 16:00:27 -03:00
Roberto Ierusalimschy
a3d36fe283
Upvalues collected like everything else (with mark-sweep) instead
...
of reference count (simpler and better for generational mode)
2017-04-11 15:41:09 -03:00
Roberto Ierusalimschy
9569ad6b0d
Comments for generational collector
2017-04-10 10:33:04 -03:00
Roberto Ierusalimschy
2331e1beec
small changes in 'luaC_upvalbarrier'
2017-04-06 10:08:56 -03:00
Roberto Ierusalimschy
e4287da3a6
generational collector (still not complete)
2017-04-05 13:50:51 -03:00
Roberto Ierusalimschy
1a1b2f3d7f
added 'return' to calls to 'luaL_error' (to signal to the compiler
...
that the function cannot continue past that call)
2017-03-14 09:40:44 -03:00
Roberto Ierusalimschy
f5f3df3bd1
generational collection: new attempt (still incomplete)
2017-02-23 18:07:34 -03:00
Roberto Ierusalimschy
e6c1e6005a
comments about gray lists
2017-02-15 16:52:13 -02:00
Roberto Ierusalimschy
d266d40dea
error when calling close method without arguments (e.g.,
...
|io.stdin.close()|)
2017-02-09 12:50:05 -02:00
Roberto Ierusalimschy
e354c6355e
small updates
2017-01-31 19:17:47 -02:00
Roberto Ierusalimschy
94c1b3a8ee
Handling of LUA_PATH/LUA_CPATH moved back to 'package' library
...
to avoid incompatibilites with previous releases
2017-01-12 15:14:26 -02:00
Roberto Ierusalimschy
08199ade4a
release 5.3.4 (year 2017)
2016-12-22 13:51:20 -02:00
Roberto Ierusalimschy
2a235312f0
detail (removing spaces at end of lines)
2016-12-22 11:08:50 -02:00
Roberto Ierusalimschy
9903dd52a3
Using LUAI_UAC* types more consistently on vararg calls
2016-12-20 16:37:00 -02:00
Roberto Ierusalimschy
24f6e236a3
'moveresults' and 'luaD_poscall' moved up in the file
2016-12-13 13:52:21 -02:00
Roberto Ierusalimschy
9f594ca6f5
LUA_PATHSUFFIX -> LUA_VERSUFFIX + LUA_VERSUFFIX used in the
...
definition of LUA_INITVARVERSION, too.
2016-12-13 13:50:58 -02:00
Roberto Ierusalimschy
4df4560bf5
detail (wrong comment)
2016-12-06 12:54:31 -02:00
Roberto Ierusalimschy
b2aa2ba046
using constants for "_LOADED" and "PRELOAD"
2016-12-04 18:17:24 -02:00
Roberto Ierusalimschy
beec5af201
'luaL_tolstring' uses metatable's "__name" when available
2016-12-04 18:09:45 -02:00
Roberto Ierusalimschy
7b1fba69b7
using 'lastfree == NULL' to signal that table is using the dummy
...
node for its hash part + new macro 'allocsizenode'
2016-11-07 10:38:35 -02:00
Roberto Ierusalimschy
697593d8d5
bug: When a coroutine tries to resume a non-suspended coroutine,
...
it can do some mess (and break C assertions) before detecting the error.
2016-10-19 10:34:27 -02:00
Roberto Ierusalimschy
e2dc807c6e
check whether function is finalizer when finding a name for it +
...
comments + some instructions can call functions in unespected ways
(e.g., finalizers)
2016-10-19 10:32:10 -02:00
Roberto Ierusalimschy
138d00176c
new flag in 'CallInfo.callstatus' to tell whether function is running
...
as a finalizer
2016-10-19 10:31:42 -02:00
Roberto Ierusalimschy
8edbf57fb8
detail (ANSI C does not accept empty arguments to macros)
2016-09-20 13:37:45 -03:00
Roberto Ierusalimschy
7fe1a4cff3
cleaner and more correct code for 'luaD_shrinkstack' (the old
...
test "inuse <= LUAI_MAXSTACK" for stack overflow is not correct,
as the real maximum usable size is "LUAI_MAXSTACK - EXTRA_STACK")
2016-09-08 13:36:26 -03:00
Roberto Ierusalimschy
dbb6f11e8e
bug (with compat on): 'ipairs' can work with any type that provides
...
an __index; so, 'pairsmeta' should not check for tables. ('pairs'
already checks for tables through 'next'.)
2016-09-05 16:06:34 -03:00
Roberto Ierusalimschy
aeb4c6fff1
comments + removed unused variable
2016-09-05 15:53:02 -03:00
Roberto Ierusalimschy
3b91b07fd9
detail (macro 'l_checkmode' reimplemented as function)
2016-09-01 13:14:56 -03:00
Roberto Ierusalimschy
349badabc1
wrong test in '#if' for floating-point type
2016-08-22 14:21:12 -03:00
Roberto Ierusalimschy
e4a9e6fcca
do not eliminate varargs from functions that do not use varargs
...
(confuses the debug lib and gains very little in performance)
2016-08-01 16:51:24 -03:00
Roberto Ierusalimschy
9de2bb0d62
bug: When a coroutine tries to resume a non-suspended coroutine,
...
it coud do some mess (and break C assertions) before detecting the error.
Now it tests for those errors before anything else.
2016-07-29 14:12:44 -03:00
Roberto Ierusalimschy
d55fd3455b
redefine MAXINDEXRK (for debugging, to force most values to
...
go through registers)
2016-07-19 14:13:00 -03:00
Roberto Ierusalimschy
0d1c6f4188
MAXINDEXRK can be redefined (for debugging, to force most values to
...
go through registers)
2016-07-19 14:12:21 -03:00
Roberto Ierusalimschy
fc6b32bcaa
bug: Lua can generate wrong code in functions with too many constants
2016-07-19 14:12:07 -03:00
Roberto Ierusalimschy
de96e26afc
bug: 'checkoption' could read past end of string + 'os.date' can
...
handle embedded zeros
2016-07-18 14:58:58 -03:00
Roberto Ierusalimschy
de3fd8ab83
Handling of LUA_PATH/LUA_CPATH moved from package library to stand
...
alone interpreter (so that 'lua.c' concentrates all handling of
environment variables)
2016-07-18 14:55:59 -03:00
Roberto Ierusalimschy
788109a3de
new bug: Checking a format for 'os.date' may read pass the format string
2016-07-15 14:24:09 -03:00
Roberto Ierusalimschy
09c9fa36ea
small corrections for C++ compliance
2016-06-27 10:15:08 -03:00
Roberto Ierusalimschy
dcb2998aa6
bug: expression list with four or more expressions in
...
a 'for' loop can crash the interpreter. ('adjust_assign' must
remove extra expresssions from its registers.)
2016-06-22 12:48:25 -03:00
Roberto Ierusalimschy
fac00ca023
bug: expression list with four or more expressions in
...
a 'for' loop can crash the interpreter.
2016-06-21 14:22:34 -03:00
Roberto Ierusalimschy
6487fb11fc
all 'static' variables should be 'const'
2016-06-20 16:12:46 -03:00
Roberto Ierusalimschy
644799537f
allow more bits in 'callstatus' (use no extra space due to alignments)
2016-06-16 10:36:09 -03:00
Roberto Ierusalimschy
aa66ca76ce
'lua_pushglobaltable' returns 'void'
2016-05-30 12:53:28 -03:00
Roberto Ierusalimschy
707b0ba6e2
'string.format("%q")' writes 'math.mininteger' in hexa, to ensure
...
it is read back as an integer
2016-05-20 11:13:21 -03:00
Roberto Ierusalimschy
10b0b09555
do not convert decimal constants with overflow to integers.
...
(Therefore, they will be converted as floats)
2016-05-20 11:07:48 -03:00
Roberto Ierusalimschy
4d5ab9baa6
'string.pack("cn")' does not accept strings longer than 'n'
2016-05-18 15:19:51 -03:00
Roberto Ierusalimschy
b65252b39b
'singlevaraux' returns result only in 'var->k'
2016-05-13 16:10:16 -03:00
Roberto Ierusalimschy
fbd8614bdb
comment (FALLTHROUGH)
2016-05-13 16:09:46 -03:00
Roberto Ierusalimschy
f3b52a6061
'io.read("n")' accepts both a dot and the locale point as its
...
radix character + 'MAXRN' -> 'L_MAXLENNUM' + small detail in
'test2'
2016-05-02 11:03:19 -03:00
Roberto Ierusalimschy
0232fbffbe
now that 'luaO_str2num' always accepts a dot as a radix character,
...
the lexer does not need to bother with this issue.
2016-05-02 11:02:12 -03:00
Roberto Ierusalimschy
ed110f66c5
'luaO_str2num' (and, therefore, 'lua_stringtonumber', 'number',
...
and coercions) accepts both the locale point and a dot as its
radix character
2016-05-02 11:00:32 -03:00
Roberto Ierusalimschy
22093f9c6e
'string.format("%q", number)' ensures a dot as decimal point
2016-05-02 10:58:01 -03:00
Roberto Ierusalimschy
792ffaccf2
detail (macro should "use" all its arguments)
2016-05-01 17:06:09 -03:00
Roberto Ierusalimschy
57cdb60429
no more time limits to pattern matching (at least for now)
2016-04-22 13:36:30 -03:00
Roberto Ierusalimschy
89c09c8e40
match time limit defined by variable 'string.pattlimit'
2016-04-19 09:34:08 -03:00
Roberto Ierusalimschy
48baa5e89c
'os.time(t)' normalizes 't' fields
2016-04-18 10:06:55 -03:00
Roberto Ierusalimschy
fdd7209688
error handling in 'wrap' does not coerce numbers into string messages
2016-04-11 16:19:55 -03:00
Roberto Ierusalimschy
82a8e06524
details ('error' does not coerce numbers to strings + comments)
2016-04-11 16:18:40 -03:00
Roberto Ierusalimschy
c258870c59
diff for last bug was against wrong version
2016-04-11 12:34:21 -03:00
Roberto Ierusalimschy
e8e39a277f
'string.format"%q"' now works for all basic types (nil, boolean,
...
numbers, and strings)
2016-04-08 18:15:02 -03:00
Roberto Ierusalimschy
fff7d42a69
LUA_PACKPADBYTE -> LUAL_PACKPADBYTE (it is an internal library
...
name, not something to be usually configured)
2016-04-07 12:40:07 -03:00
Roberto Ierusalimschy
783aa8a9da
new way to avoid infinite loops in empty matches: "Python rule"
...
("Empty matches for the pattern are replaced only when not
adjacent to a previous match")
2016-03-31 16:07:42 -03:00
Roberto Ierusalimschy
8d4feb504f
do not try to ensure that 'sweepgc' points to a live object
...
when entering sweep phase ('entersweep'); that may be too
expensive to be done still inside the atomic step. Walking
one single object more often than not will work.
2016-03-31 16:02:03 -03:00
Roberto Ierusalimschy
d77a7a8c26
detail (comment)
2016-03-31 16:01:21 -03:00
Roberto Ierusalimschy
e747491b96
comments
2016-03-23 15:08:26 -03:00
Roberto Ierusalimschy
acff3ad88d
bug: 'gmatch' iterator fails when called from a coroutine different
...
from the one that created it
2016-03-23 14:12:17 -03:00
Roberto Ierusalimschy
e7b2e01d43
bug: label between local definitions can mix-up their initializations
2016-03-07 16:25:39 -03:00
Roberto Ierusalimschy
03ca6385dc
call 'checkGC' *after* creating new objects (this is how 'execute'
...
does it)
(It increases the changes that 'allgc' start with a non-white
object, which helps 'entersweep')
2016-02-29 11:27:14 -03:00
Roberto Ierusalimschy
7777b412de
When available, use metafield '__name' in error messages
2016-02-26 16:20:15 -03:00
Roberto Ierusalimschy
c3e9b14d24
'\0' is a control character, no need to check it explicitly
2016-02-25 16:42:55 -03:00
Roberto Ierusalimschy
7d6b78ee79
in 'table.move', destination table can be source table even if
...
given as an explicit extra argument
2016-02-25 16:41:54 -03:00
Roberto Ierusalimschy
5f3ad5731e
simpler yet definition for 'checkoption'
2016-02-09 10:16:11 -02:00
Roberto Ierusalimschy
494e9ba0f4
simpler code for 'checkoption' + added conversion specifiers specific
...
to Windows
2016-02-08 12:42:46 -02:00
Roberto Ierusalimschy
f79b4568ae
details (removed silly use of 'luaL_opt' + better error messages
...
in cases of "table expected")
2016-02-08 10:55:19 -02:00
Roberto Ierusalimschy
fd51651684
new macro 'vmfetch' to help changing code to computed goto's (macro
...
abstracts the code to run before each instruction)
2016-02-05 17:59:14 -02:00
Roberto Ierusalimschy
994374c4df
new release number + new year
2016-01-13 15:55:19 -02:00
Roberto Ierusalimschy
62f6652d53
no more extra space in 'luaL_checkstack'. (It was already useless
...
for the first call, and function works ok without that space
anyway (just error message misses the 'msg' component)
2016-01-08 13:33:09 -02:00
Roberto Ierusalimschy
9945253d57
details (comments + text of error messages)
2016-01-06 11:43:05 -02:00
Roberto Ierusalimschy
1f259be52a
'getcode' -> 'getinstruction'
2016-01-05 14:22:37 -02:00
Roberto Ierusalimschy
1a44e82200
'luaV_fastget' only treats the real fast case (table with a non-nil
...
value at given key, so that it does not need to check metamethods)
2016-01-05 14:07:21 -02:00
Roberto Ierusalimschy
a272fa66f0
bug: Metatable may access its own dealocated field when
...
it has a self reference in __newindex + some refactoring
2016-01-04 14:44:50 -02:00
Roberto Ierusalimschy
b12b635a90
more refactoring
2016-01-04 11:40:57 -02:00
Roberto Ierusalimschy
7cd7c2e0a1
Metatable may access its own dealocated field when
...
it has a self reference in __newindex.
2016-01-04 11:35:56 -02:00
Roberto Ierusalimschy
07cf8415e3
more comments + reordeing of union inside 'expdesc' to allow
...
static initialization of a VKINT value
2015-12-30 16:16:13 -02:00
Roberto Ierusalimschy
c0836dda74
avoid empty macro arguments (invalid in C89)
2015-12-21 11:02:14 -02:00
Roberto Ierusalimschy
384d1b47b0
comments (*lots* of them) + asserts
2015-12-18 11:53:36 -02:00
Roberto Ierusalimschy
19770b03a9
comments. (More explanation about kinds of expressions.)
2015-12-17 13:44:50 -02:00
Roberto Ierusalimschy
a01eba657e
reordering of some functions + 'code_label' renamed to 'code_loadbool'
2015-12-17 13:02:44 -02:00
Roberto Ierusalimschy
b7446ea88d
detail ('while' -> 'for') in 'luaK_patchclose'
2015-12-17 12:52:53 -02:00
Roberto Ierusalimschy
a051b3323e
comments (about hooks vs signals)
2015-12-16 14:40:07 -02:00
Roberto Ierusalimschy
c4e01c568a
make 'hook' volatile (as it may be changed in signal handling)
2015-12-16 14:39:38 -02:00
Roberto Ierusalimschy
bda090b961
comments + small code changes around stack usage when 'luaL_checkstack'
...
raises an error (and needs the stack to create the error message...)
2015-12-14 09:59:27 -02:00
Roberto Ierusalimschy
e383941652
in 'table.sort': 'typedef' for type of indices + removed stack check
...
(recursion is in the C stack, not in the Lua stack!)
2015-12-14 09:57:38 -02:00
Roberto Ierusalimschy
656b3cea1b
using 'sig_atomic_t' for 'hookmask' (as it can be changed inside
...
a signal)
2015-12-14 09:54:49 -02:00
Roberto Ierusalimschy
2d1d57bc18
comments
2015-12-14 09:53:27 -02:00
Roberto Ierusalimschy
03412af06e
detail (removed fixed argument to function 'callallpendingfinalizers')
2015-12-10 16:12:30 -02:00
Roberto Ierusalimschy
542dbd4c65
detail (moving bodies of 'while' to a separate line)
2015-12-09 13:21:28 -02:00
Roberto Ierusalimschy
c25d59a6bd
format "%s" in 'string.format' accepts embedded zeros when it
...
has no modifiers
2015-11-25 14:28:17 -02:00
Roberto Ierusalimschy
5936eb16d8
randomness in 'table.sort' used only when needed (big imbalance in
...
partition result) + small refactoring
2015-11-25 10:48:57 -02:00
Roberto Ierusalimschy
7dc3ca7b8e
handling 'clock_t' and 'time_t' correctly in ISO C point of view
2015-11-24 14:54:32 -02:00
Roberto Ierusalimschy
71344b5cac
easy the way to accept other modifiers for 'mode' in 'io.open'
2015-11-23 09:36:11 -02:00
Roberto Ierusalimschy
f230898ad6
tiny code refactoring in 'luaS_hash'
2015-11-23 09:32:51 -02:00
Roberto Ierusalimschy
3feb702df8
ensure argument to 'string.format("%s")' does not contain zeros
2015-11-23 09:31:21 -02:00
Roberto Ierusalimschy
c5112f7b15
details (comments)
2015-11-23 09:30:45 -02:00
Roberto Ierusalimschy
c231a5e2b6
using unsigned int (instead of int) in 'table.sort' to avoid overflows
...
(when computing the pivot and in original table size)
2015-11-23 09:17:31 -02:00
Roberto Ierusalimschy
dc9ac5b8c2
details (merging declarations with initialization)
2015-11-23 09:09:27 -02:00
Roberto Ierusalimschy
146508b28e
randomness in pivot for 'table.sort' done by a macro (easier to change)
2015-11-20 10:30:20 -02:00
Roberto Ierusalimschy
d103312661
details (typos in comments)
2015-11-19 17:16:22 -02:00
Roberto Ierusalimschy
2e8f8a18e4
detail
2015-11-17 14:00:28 -02:00
Roberto Ierusalimschy
f5b0459aba
details
2015-11-13 15:19:46 -02:00
Roberto Ierusalimschy
d682b3c9ec
added separator for bugs in 5.3.1
2015-11-13 15:19:07 -02:00
Roberto Ierusalimschy
fc085aa627
new release number (5.3.2)
2015-11-13 15:18:42 -02:00
Roberto Ierusalimschy
9a5d6aedb7
trying to optimize a little 'luaD_poscall'
2015-11-13 11:24:26 -02:00
Roberto Ierusalimschy
89e3a84344
removed field 'n' from 'CallInfo' (not being used right now)
2015-11-13 10:16:51 -02:00
Roberto Ierusalimschy
04587b6256
macro with empty argument can be seen as macro with no argument; better
...
to avoid that
2015-11-12 16:08:58 -02:00
Roberto Ierusalimschy
bde03eeb48
in 'table.sort': tighter checks for invalid order function +
...
"random" pivot for larger intervals (to avoid attacks with
bad data)
2015-11-12 16:07:25 -02:00
Roberto Ierusalimschy
330d426ffd
avoid the use of deprecated functions 'luaL_checkunsigned'/
...
'lua_pushunsigned'
2015-11-11 17:08:09 -02:00
Roberto Ierusalimschy
02340375be
janitor work on 'table.sort': added comments, partition code moved
...
to a separated function, code conventions updated, etc. No changes
at all in the logic/algorithm
2015-11-06 14:07:14 -02:00
Roberto Ierusalimschy
5100bc8aa1
no need for a special case to get long strings (not that common)
2015-11-03 16:35:21 -02:00
Roberto Ierusalimschy
ebb2afa54b
allow 'set' macros to be used when 'L' is not available (as it was
...
needed only for assertions)
2015-11-03 16:33:10 -02:00
Roberto Ierusalimschy
7485512384
added comment and assert about dead keys
2015-11-03 16:10:44 -02:00
Roberto Ierusalimschy
46de77b219
bug: despite its name, 'luaH_getstr' did not work for strings in
...
general, but only for short strings
2015-11-03 13:47:30 -02:00
Roberto Ierusalimschy
d356183402
new function 'luaS_hashlongstr'
2015-11-03 13:36:01 -02:00
Roberto Ierusalimschy
e61ee8a036
in 'luaD_call', use two functions instead of one with fixed boolean
...
argument + stack error handling in 'luaD_call' moved to a separated
function
2015-11-02 16:48:49 -02:00
Roberto Ierusalimschy
ff1289a361
in 'luaD_call', use two functions instead of one with fixed boolean
...
argument
2015-11-02 16:48:07 -02:00
Roberto Ierusalimschy
cd73f3ccc5
now that we have a counter for CallInfos, use it for a more
...
accurate value for the memory used by a thread
2015-11-02 14:19:29 -02:00
Roberto Ierusalimschy
8c1fb91802
macro 'incr_top' replaced by function 'luaD_inctop'. (It is not used
...
in critical time pathes, can save a few bytes without the macro)
2015-11-02 14:09:30 -02:00
Roberto Ierusalimschy
33b366ec32
added counters for total and individual CallInfo entries (to allow
...
better syncronization between CallInfo size and stack size)
2015-11-02 14:01:41 -02:00
Roberto Ierusalimschy
c5363a1b58
in 'luaD_precall', in vararg functions, complete missing parameters
...
only after moving them to final place (avoids checking the stack
again)
2015-11-02 12:06:01 -02:00
Roberto Ierusalimschy
332a06bbd1
'luaO_pushvfstring' now uses 'incr_top' to increment top.
2015-11-02 12:02:35 -02:00
Roberto Ierusalimschy
ffd0d1232d
using more "conventional" loops in 'luaD_poscall' (probably a little
...
more efficient?)
2015-11-02 09:48:59 -02:00
Roberto Ierusalimschy
07a2dcacbf
flag CIST_REENTRY changed to CIST_FRESH (its negation); fresh invocations
...
seem to be less frequent than reentries. (So, avoid setting flag on
the frequent case.)
2015-11-02 09:43:17 -02:00
Roberto Ierusalimschy
c874abac98
with 'fast tracks', there is no need to do raw accesses in 'ipairs'
2015-10-29 13:21:04 -02:00
Roberto Ierusalimschy
789e423b32
corrected comparisons of signed (int) with unsigned (size_t)
2015-10-29 13:11:41 -02:00
Roberto Ierusalimschy
96ec8671b1
macro 'buff2num' replaced by its body (it caused more harm than good
...
to readability)
2015-10-28 16:51:47 -02:00
Roberto Ierusalimschy
cc3a42b190
option 'c' in 'string.pack' accepts any string size (truncating
...
if larger and padding if smaller)
2015-10-28 15:56:51 -02:00
Roberto Ierusalimschy
6707ce6349
function prepares vararg only if it really uses them (chunks
...
are always declared vararg but seldom uses them)
2015-10-28 15:28:40 -02:00
Roberto Ierusalimschy
257961c601
OP_SELF can use 'luaV_fastget' specialized for strings, as it
...
is applied only to string keys
2015-10-28 12:50:09 -02:00
Roberto Ierusalimschy
ae515a346c
comments for luaD_precall/luaD_poscall
2015-10-28 10:25:36 -02:00
Roberto Ierusalimschy
3cdf1d676b
details (avoid 'case' inside block + avoid using one variable for
...
two roles)
2015-10-28 10:06:45 -02:00
Roberto Ierusalimschy
82129b9266
use macro 'hasjumps' to test whether expression has jumps...
2015-10-26 12:27:47 -02:00
Roberto Ierusalimschy
8004ab756f
hook test in 'luaV_execute' reduced to minimum (rest done in
...
'luaG_traceexec'; no difference in performance for the non-hook
case, but keeps 'luaV_execute' a little simpler) + 'base' updates
replaced by 'Protect' (which serves this rule)
2015-10-22 12:40:47 -02:00
Roberto Ierusalimschy
ee5ef0f295
hook test in 'luaV_execute' reduced to minimum (rest done in
...
'luaG_traceexec'
2015-10-22 12:40:47 -02:00
Roberto Ierusalimschy
5bdee4f810
small changes to allow 'precall' to spend time preserving 'func'
...
only when needed (that is, when stack actually changes)
2015-10-21 16:40:47 -02:00
Roberto Ierusalimschy
48098c42ff
generic definitions for float types moved to before variable definitions
...
(so that specific cases can redefine these generic definitions if
needed)
2015-10-21 16:17:40 -02:00
Roberto Ierusalimschy
3ad55386c4
'condchangemem' also may need to run 'pre'/'pos'
2015-10-21 16:15:15 -02:00
Roberto Ierusalimschy
caf8278710
added comments
2015-10-20 16:00:19 -02:00
Roberto Ierusalimschy
f7670781cf
cleaner definition for 'luaC_condGC', using 'pre'/'pos' parameters
2015-10-20 15:56:21 -02:00
Roberto Ierusalimschy
df8b996bcc
'Protect' in table operations is not needed in the fast track
...
+ removal of a few dead macros
2015-10-20 15:41:35 -02:00
Roberto Ierusalimschy
75d5a8924c
macro 'addbuff' was using external variable name, instead of using
...
its parameter name inside the macro.
2015-10-20 11:11:05 -02:00
Roberto Ierusalimschy
880f82d089
'*' as a number means stack size, so that "return *" returns
...
all values in the stack.
2015-10-12 13:38:19 -03:00
Roberto Ierusalimschy
1a741157cb
avoid (undefined behavior) integer 'overflow' in left shift
2015-10-08 12:55:35 -03:00
Roberto Ierusalimschy
0c78de0d6d
avoid calling write function with empty block
2015-10-08 12:53:49 -03:00
Roberto Ierusalimschy
df45f7118b
detail (added assertion)
2015-10-08 12:53:31 -03:00
Roberto Ierusalimschy
880df57e52
detail (removed unreacheable 'break')
2015-10-08 12:53:05 -03:00
Roberto Ierusalimschy
8949904783
allow NULL string when length is zero in 'lua_pushlstring' and
...
'luaL_addlstring'
2015-10-06 13:10:22 -03:00
Roberto Ierusalimschy
9294466234
detail (string cache a bit smaller by default)
2015-10-06 11:29:49 -03:00
Roberto Ierusalimschy
e290bd6760
in 'luaL_traceback', print correct number of levels even when
...
initial level is not 1.
2015-10-02 12:46:49 -03:00
Roberto Ierusalimschy
dc4232379d
detail (ensure subtraction is done unsigned)
2015-10-02 12:39:23 -03:00
Roberto Ierusalimschy
10fffcd80a
'gmatch' keeps its state in a userdata (keeping the same 'MatchState'
...
across calls)
2015-09-28 15:05:01 -03:00
Roberto Ierusalimschy
8264dbc2bb
implemented counter to abort non-linear behavior in pattern matching
2015-09-26 15:45:03 -03:00
Roberto Ierusalimschy
9fae7b6d3f
code for string cache generalized for "associative sets" (compiler
...
will optimize away or inline the extra loops)
2015-09-22 11:18:24 -03:00
Roberto Ierusalimschy
0f1f51be4b
'table.move' tries to copy elements in increasing order
...
whenever possible
2015-09-17 12:53:50 -03:00
Roberto Ierusalimschy
ee5edb6b68
macros 'getaddrstr' and 'getstr' unified (they do the same thing)
2015-09-17 12:51:05 -03:00
Roberto Ierusalimschy
bda83e22c0
'tablib' does not try to use raw operations when possible: fast
...
track should make standard operations fast enough to forgo
raw accesses
2015-09-09 12:42:30 -03:00
Roberto Ierusalimschy
364cdbdbdb
'setobj2t' incorporated into 'luaV_fastset' + 'invalidateTMcache'
...
is not needed in the fast track (as it does not create new
entries) + small bug in 'auxsetstr' (calling barrier with wrong
object) + using 'setobj2t' without side effects in its arguments
2015-09-09 10:45:50 -03:00
Roberto Ierusalimschy
b91bc93fd3
'setobj2t' incorporated into 'luaV_fastset' + 'invalidateTMcache'
...
is not needed in the fast track (as it does not create new
entries)
2015-09-09 10:44:07 -03:00
Roberto Ierusalimschy
53be1451a8
new definition for macro 'checkliveness'
2015-09-08 13:55:43 -03:00
Roberto Ierusalimschy
eb0be12ceb
detail in macro 'checkliveness' + macro 'setobj2t' defined as an
...
expression (to be used in macro 'luaV_fastset')
2015-09-08 13:54:52 -03:00
Roberto Ierusalimschy
1198d82530
'lua_longassert' defined as an expression (instead of a command)
2015-09-08 13:53:56 -03:00
Roberto Ierusalimschy
6556fcfe5a
small janitor work
2015-09-08 12:49:25 -03:00
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)
2015-09-08 12:41:05 -03:00
Roberto Ierusalimschy
502214f8a5
added assert for NULL pointer in 'lua_pushlstring'
2015-08-25 15:50:37 -03:00
Roberto Ierusalimschy
ed19fe766c
added ';' at the end of "expression lines" ("return exp;") so that
...
an extra ";" at the end is enough to stop Lua printing the result
("return exp;;" is not valid)
2015-08-14 16:11:20 -03:00
Roberto Ierusalimschy
8f25d08637
'invalidateTMcache' not needed in all 'settable' uses
2015-08-03 17:40:26 -03:00
Roberto Ierusalimschy
3b795541c4
fast track for 'settable'
2015-08-03 16:50:49 -03:00
Roberto Ierusalimschy
20b9e59441
barrier macros rewritten as expressions
2015-08-03 16:40:42 -03:00
Roberto Ierusalimschy
935d9f7f90
new entry should not be commented out
2015-07-23 11:32:17 -03:00
Roberto Ierusalimschy
e247c3ada3
implementation of fast track for gettable operations
2015-07-20 15:24:50 -03:00
Roberto Ierusalimschy
b5dc2f9b0c
bug: 'io.lines' does not check maximum number of options
2015-07-20 13:37:12 -03:00
Roberto Ierusalimschy
5273477cb9
in 'lua_number2strx', use the call to 'l_sprintf' to add exponent
...
to result directly
2015-07-20 13:30:22 -03:00
Roberto Ierusalimschy
b9db9bd0ef
'lua_Number' added to 'L_Umaxalign' union
2015-07-15 12:57:13 -03:00
Roberto Ierusalimschy
050e8536bb
bug: 'io.lines' does not check maximum number of options
2015-07-15 11:40:28 -03:00
Roberto Ierusalimschy
2b61360d82
avoid overflows (detected with 'clang -ftrapv')
2015-07-13 10:30:03 -03:00
Roberto Ierusalimschy
5b6ac971f9
detail (comment)
2015-07-07 14:03:34 -03:00
Roberto Ierusalimschy
403e181d81
'strftime' puts its result directly into 'lua_Buffer'
2015-07-06 12:16:51 -03:00
Roberto Ierusalimschy
4af03c5ae1
better treatment for integer overflows + all errors throw an error
...
(instead of returning nil)
2015-07-04 13:35:14 -03:00
Roberto Ierusalimschy
bde17a419d
because of debt, 'totalbytes' can be negative (and therefore its
...
type must be signed)
2015-07-04 13:33:17 -03:00
Roberto Ierusalimschy
8950e0c049
avoid possibility of subtle arith. overflow
2015-07-04 13:32:34 -03:00
Roberto Ierusalimschy
8217e0d4fe
avoid subtle possibility of arithmetic overflow
2015-07-04 13:31:42 -03:00
Roberto Ierusalimschy
319ccfefbc
computations in numerical for loop must avoid overflows too
2015-07-04 13:31:03 -03:00
Roberto Ierusalimschy
6a8400ba4f
using 'clang' by default + changes in warnings ('old-style-declaration'
...
removed because it is included in 'extra' + 'strict-aliasing' removed
because it is included in 'all' + 'aggregate-return' removed because
no one would do it by mistake)
2015-07-01 14:52:09 -03:00
Roberto Ierusalimschy
2de3361c6c
detail
2015-07-01 14:47:12 -03:00
Roberto Ierusalimschy
e89763e964
simpler code for 'luaO_fb2int'
2015-06-26 16:32:07 -03:00
Roberto Ierusalimschy
be63d995c1
tiny bug: 'randomseed' was calling 'rand' (instead of 'l_rand')
...
to discard first value
2015-06-26 16:30:32 -03:00
Roberto Ierusalimschy
2b1fc1b38c
with string cache, it is not that important for 'type' to avoid
...
'lua_pushstring'
2015-06-26 16:25:45 -03:00
Roberto Ierusalimschy
f01c12c891
detail (cast to avoid mixing types in conditional expression)
2015-06-25 11:00:01 -03:00
Roberto Ierusalimschy
5aabb7a891
buffer size changed from size_t to int (it is always small) +
...
comments + assert that printf result fits in given buffer
2015-06-24 15:25:10 -03:00
Roberto Ierusalimschy
cb1e451999
detail
2015-06-24 15:23:57 -03:00
Roberto Ierusalimschy
43cff79bf7
detail
2015-06-21 10:50:29 -03:00
Roberto Ierusalimschy
95c3144393
redefine 'l_sprintf' to test correctness of buffer sizes given
...
to 'snprintf'
2015-06-18 11:27:44 -03:00
Roberto Ierusalimschy
19eb6ae580
using 'snprintf' in C99 (both for documentation of buffer sizes
...
and some complains from tools)
2015-06-18 11:26:05 -03:00
Roberto Ierusalimschy
cbe05b48bb
using 'lua_longassert' to avoid warnings
2015-06-18 11:25:26 -03:00
Roberto Ierusalimschy
e7f34ad395
better implementation for buffers (reallocated memory directly
...
with allocation function; generates much less garbage)
2015-06-18 11:23:14 -03:00
Roberto Ierusalimschy
a5cbb7c3a7
detail (i + 1 > exp is simply i >= exp)
2015-06-18 11:20:32 -03:00
Roberto Ierusalimschy
dcad08b76d
details (use original type when saving variable's value)
2015-06-18 11:19:52 -03:00
Roberto Ierusalimschy
afbf5c5dab
missing ']]' in long string
2015-06-18 11:05:28 -03:00
Roberto Ierusalimschy
a1415c0d72
bug in order NaN x int (tests must ensure that NaN does not get
...
converted to integer)
2015-06-09 12:53:35 -03:00
Roberto Ierusalimschy
2ecaf18138
using macros ('rttype' and 'settt_') to access "private" field 'tt_'
2015-06-09 11:21:42 -03:00
Roberto Ierusalimschy
cbef15f3ea
comment (FALLTHROUGH position)
2015-06-09 11:21:13 -03:00
Roberto Ierusalimschy
16e8bb360b
comment
2015-06-09 11:21:00 -03:00
Roberto Ierusalimschy
6628012e9e
new release number (5.3.1)
2015-06-03 10:03:38 -03:00
Roberto Ierusalimschy
ed1fe28bb8
When comparing integers with floats, use float as common type when
...
possible (i.e., when integer fits in a float without losses); seems
to be more efficient in architectures with native support for used
Lua numbers
2015-06-02 16:11:24 -03:00
Roberto Ierusalimschy
6645bb2df4
'strcache' elements as arrays of 1 element hints that cache can
...
be n-way (instead of direct mapped)
2015-06-01 13:34:37 -03:00
Roberto Ierusalimschy
02aed045de
bug: return hook may not see correct values for active local variables
...
when function returns
2015-05-22 16:32:42 -03:00
Roberto Ierusalimschy
72bd2ef6c5
dependencies updated
2015-05-22 16:29:43 -03:00
Roberto Ierusalimschy
d39bb51faa
bug: interpreter cannot pop activation frame before calling return
...
hook (as it may want to access local variables active by the end
of the function)
2015-05-22 14:48:19 -03:00
Roberto Ierusalimschy
6142e663e4
reuse of 'addinfo' by lexical errors
2015-05-22 14:45:56 -03:00
Roberto Ierusalimschy
6dc20ff293
'l <= r' for numbers has its own function, instead of using
...
'not (r < l)' (seems to be slightly more efficient)
2015-05-20 15:19:11 -03:00
Roberto Ierusalimschy
99391e24ea
new configuration macro 'l_mathlim' (simplifies some dependencies
...
on float type)
2015-05-20 14:39:23 -03:00
Roberto Ierusalimschy
0ec12c1bd1
new semantics for numerical order (following math regardless
...
representation)
2015-05-20 13:22:55 -03:00
Roberto Ierusalimschy
a71c0ab861
detail (removed useless '#include')
2015-05-20 13:22:30 -03:00
Roberto Ierusalimschy
04ba6ea83b
new semantics for equality int-float
2015-04-29 15:27:16 -03:00
Roberto Ierusalimschy
a1935b9cba
error message ("too complex" -> "too many registers") + MAXREGS
...
changed to 255 (no reason not to use maximum allowed)
2015-04-29 15:24:11 -03:00
Roberto Ierusalimschy
513c639bf9
patch for last bug corrected to be against last released version
...
(and not against last version in RCS...)
2015-04-13 13:13:25 -03:00
Roberto Ierusalimschy
69b5f7a410
some details in 'luaO_int2fb' + more consistent use of the locale
...
decimal point
2015-04-11 15:30:08 -03:00
Roberto Ierusalimschy
ae76c39712
Bug: suspended '__le' metamethod can give wrong result
2015-04-10 14:56:25 -03:00
Roberto Ierusalimschy
0d4a1f71db
re-organization of initial configuration options
2015-04-10 14:41:04 -03:00
Roberto Ierusalimschy
67bf789462
avoid using API functions inside the core
2015-04-06 09:23:48 -03:00
Roberto Ierusalimschy
48d0674c2e
more consistent use of locale radix character across Lua
2015-04-03 15:41:57 -03:00
Roberto Ierusalimschy
6ffe006f5c
detail (removed unused macro VARBITS)
2015-04-02 18:10:53 -03:00
Roberto Ierusalimschy
4998e852ec
new function 'log2' to test 'luaO_ceillog2' (if needed)
2015-04-02 18:10:21 -03:00
Roberto Ierusalimschy
65ac789565
detail (comment)
2015-04-02 18:09:51 -03:00
Roberto Ierusalimschy
cfc84c856d
'LUA_REAL_*' -> 'LUA_FLOAT_*' (everywhere else we are using 'float')
2015-03-31 09:00:07 -03:00
Roberto Ierusalimschy
63720a4290
janitor work (comments, variable names, some other details)
2015-03-30 16:51:00 -03:00
Roberto Ierusalimschy
484bf14a6b
calls to 'luaC_checkGC' in luaD_precall moved near to 'luaD_checkstack'
...
(which is what can need memory)
2015-03-30 13:05:23 -03:00
Roberto Ierusalimschy
abb2f5511d
detail ('b + base' -> 'base + b' to follow all other similar uses)
2015-03-30 12:45:01 -03:00
Roberto Ierusalimschy
fcc6e1220e
avoid expression with side effect (in debug mode) inside 'sizeof'
2015-03-30 12:43:51 -03:00
Roberto Ierusalimschy
3a91274547
details (avoid 'lint' warnings)
2015-03-30 12:42:59 -03:00
Roberto Ierusalimschy
f2a813ae10
details (avoid some 'lint' warnings)
2015-03-28 16:16:55 -03:00
Roberto Ierusalimschy
e723c75c02
details (avoid 'lint' warnings)
2015-03-28 16:14:47 -03:00
Roberto Ierusalimschy
b436ed58a3
'clearapihash' -> 'luaS_clearcache' and moved to 'lstring.c' (which
...
keeps all code related to this cache)
2015-03-25 10:42:19 -03:00
Roberto Ierusalimschy
2b37f2150e
comments
2015-03-14 14:58:57 -03:00
Roberto Ierusalimschy
331632e8d8
code detail ('if' -> '?:')
2015-03-13 13:24:50 -03:00
Roberto Ierusalimschy
7d930ec694
use 'log2' when available
2015-03-12 11:04:04 -03:00
Roberto Ierusalimschy
0cf3b6495a
'ci_func' don't need to be exported
2015-03-11 13:10:41 -03:00
Roberto Ierusalimschy
b66fedadae
'lua_pushliteral' implemented with 'lua_pushstring' (to take
...
advantage of the cache)
2015-03-10 11:17:51 -03:00
Roberto Ierusalimschy
fd6e680e21
detail
2015-03-10 11:15:06 -03:00
Roberto Ierusalimschy
57c0db219b
line history keep lines without added 'return'
2015-03-09 18:57:05 -03:00
Roberto Ierusalimschy
4ba0cb4580
always use macros to operate on lua_Numbers
2015-03-07 16:30:16 -03:00
Roberto Ierusalimschy
a30c66f0fc
macro 'luai_apicheck'/'api_check' back with a 'lua_State' parameter
...
(some people use it)
2015-03-06 16:49:50 -03:00
Roberto Ierusalimschy
bb4baa73ea
allocation function is not exactly API (and cannot raise errors
...
like other API functions); better not use 'api_check' for cheking it.
2015-03-06 16:45:54 -03:00
Roberto Ierusalimschy
d7d44b038d
detail (use 'lua_pushliteral' to push an empty string)
2015-03-06 16:09:08 -03:00
Roberto Ierusalimschy
297512b34c
avoid using 'lua_pushliteral' in a non-zero-terminated string
2015-03-05 13:07:46 -03:00
Roberto Ierusalimschy
2ae2e6408e
avoid testing for NULL when marking objects that cannot be NULL
2015-03-04 10:51:55 -03:00
Roberto Ierusalimschy
a80cada914
new cache for interning strings
2015-03-04 10:31:21 -03:00
Roberto Ierusalimschy
a00013c8d0
'point2int' -> 'point2uint' (to reflect its actual result type)
2015-03-03 16:53:13 -03:00
Roberto Ierusalimschy
b9a1f27250
do not attempt emergency collection while building state (it is
...
useless, and state can be inconsistent)
2015-03-03 15:18:29 -03:00
Roberto Ierusalimschy
29aed28802
detail (use 'luaS_newliteral' when possible)
2015-03-03 15:17:04 -03:00
Roberto Ierusalimschy
951b562cf8
configuration for numerical types through only one #define for
...
each type
2015-03-02 13:59:01 -03:00
Roberto Ierusalimschy
6408bc0b7f
new macros 'chgfltvalue'/'chgivalue' (numerical for loop does
...
not need to set the type of its internal variable at each iteration)
2015-03-02 13:04:52 -03:00
Roberto Ierusalimschy
91efb4b895
LUA_COMPAT_5_1 needs some options deprecated from 5.2 to 5.3
2015-02-28 16:22:31 -03:00
Roberto Ierusalimschy
27c5b1b237
added patches to two bugs
2015-02-23 16:20:43 -03:00
Roberto Ierusalimschy
d51bdc166d
bug: 'string.format("%f")' can cause a buffer overflow (with long doubles)
...
bug: 'debug.getlocal' on a coroutine suspended in a hook can crash
the interpreter
2015-02-20 16:21:29 -02:00
Roberto Ierusalimschy
81245b1ad5
'numisinteger' (for table keys) replaced by 'luaV_tointeger' (old
...
'tointeger_aux'), which can do the same job.
2015-02-20 12:27:53 -02:00
Roberto Ierusalimschy
397ce11996
make 'hashfloat' configurable
2015-02-20 12:05:01 -02:00
Roberto Ierusalimschy
97f2aa5a44
bug: when manipulating other threads, there is no garanties about
...
their stack space
2015-02-19 15:06:21 -02:00
Roberto Ierusalimschy
419e2cb01d
detail (file does not need 'string.h')
2015-02-16 11:15:00 -02:00
Roberto Ierusalimschy
374f6c4612
detail ('fopen' needs 'stdio.h')
2015-02-16 11:14:33 -02:00
Roberto Ierusalimschy
4bdf9962bf
bug: suspended function can have its 'func' field not pointing to
...
its function, crashing debug functions
2015-02-13 14:01:17 -02:00
Roberto Ierusalimschy
e0306e386f
some changes in 'hashfloat' to avoid undefined (in ISO C) numerical
...
conversions
2015-02-13 11:05:34 -02:00
Roberto Ierusalimschy
2e6e53c7cc
added API checks to some unprotected 'top' increments
2015-02-11 16:47:22 -02:00
Roberto Ierusalimschy
2a57d2346e
detail
2015-02-09 16:05:46 -02:00
Roberto Ierusalimschy
7e425be975
bug (in 5.2): Chunk with too many lines can seg. fault
2015-02-09 15:57:45 -02:00
Roberto Ierusalimschy
0705e7b39f
detail (no need to write 'double' in source)
2015-02-09 15:41:54 -02:00
Roberto Ierusalimschy
4ccc4578b3
detail (use 'l_floor' instead of 'l_mathop(floor)')
2015-02-09 13:41:56 -02:00
Roberto Ierusalimschy
5e8c162b6c
detail
2015-02-05 15:50:24 -02:00
Roberto Ierusalimschy
c8d6cb0136
macros 'luai_num*' (for float arithmetic operations) moved to
...
llimits.h.
2015-02-05 15:15:33 -02:00
Roberto Ierusalimschy
0edcdf49c0
added comments documenting LUA_NOCVTN2S/LUA_NOCVTS2N
2015-02-05 14:53:34 -02:00
Roberto Ierusalimschy
b7dfd18612
make buffer for format specification a little larger (length modifier
...
can be larger than 2, e.g. "I64")
2015-02-04 10:54:31 -02:00
Roberto Ierusalimschy
8efcd411fe
own implementation for 'string.format("%a")' for C89 platforms
2015-02-04 10:52:57 -02:00
Roberto Ierusalimschy
90d016980f
detail ('luaL_getmetatable' does not return a boolean, but a tag)
2015-02-03 15:38:24 -02:00
Roberto Ierusalimschy
b3996c55f6
LUAL_BUFFERSIZE affects the API, so it is better not to change it
...
between releases of the same version. (The long double case seems
to be too rare, so that should not be a problem; moreover, that
case is related to a bug)
2015-01-16 15:26:56 -02:00
Roberto Ierusalimschy
438a9fcc78
LUAI_MAXSHORTLEN moved from 'luaconf.h' to 'llimits.h' (does not
...
affect the API and is seldom modified)
2015-01-16 15:15:52 -02:00
Roberto Ierusalimschy
7e2015a46d
size of short strings stored in a single byte, to reduce the size
...
of struct 'TString'
2015-01-16 14:54:37 -02:00
Roberto Ierusalimschy
5b01cb39b5
larger MINSTRTABSIZE (standard Lua starts with ~230 strings, after
...
oppening the standard libraries)
2015-01-16 13:41:03 -02:00
Roberto Ierusalimschy
a0503305bd
comments
2015-01-16 11:26:55 -02:00
Roberto Ierusalimschy
965f74525b
removed macro LUAI_FIRSTPSEUDOIDX (that stuff does not need
...
to be configurable)
2015-01-13 17:50:30 -02:00
Roberto Ierusalimschy
3f2e21f0ea
Long double needs a larger LUAL_BUFFERSIZE (because
...
'string.format("%.99f", 1e4900)' can generate quite long strings),
but otherwise buffer can be 1~2K
2015-01-13 15:24:22 -02:00
Roberto Ierusalimschy
3509914916
BUG (when compiled with long double): buffer overflow when formatting
...
string.format("%.99f", 1e4930)
2015-01-13 15:18:25 -02:00
Roberto Ierusalimschy
ae27be40c9
better check for overflows in 'table.move' (removes restriction that
...
initial position should be positive)
2015-01-13 14:27:29 -02:00
Roberto Ierusalimschy
cdd26700e8
definition for 'MAXUPVAL' moved for a more "private" place and its
...
value and comment corrected to reflect current implementation
2015-01-13 13:49:11 -02:00
Roberto Ierusalimschy
a9a4bf68b0
typo in comment
2015-01-13 11:18:04 -02:00
Roberto Ierusalimschy
f31cc8e342
typo in error message
2015-01-12 17:32:32 -02:00
Roberto Ierusalimschy
3c55790ebe
'setkey' -> 'setnodekey' (to avoid conflicts with POSIX)
2015-01-05 11:52:37 -02:00
Roberto Ierusalimschy
0adfa773b9
new macro 'cast_func' adds '__extension__' (in gnu compilers) when
...
converting void* to function, to avoid warnings
2015-01-05 11:51:39 -02:00
Roberto Ierusalimschy
3317f5c6d9
includes 'stddef.h' (as it uses NULL)
2015-01-05 11:48:33 -02:00
Roberto Ierusalimschy
dbf911c516
detail (added -Wconversion as a comment, to be used ocasionally)
2015-01-02 11:03:52 -02:00
Roberto Ierusalimschy
3a29087cb7
'lua_setlocal' should not pop value when failing (to be consistent
...
with the manual and with 'lua_setupvalue')
2015-01-02 10:52:22 -02:00
Roberto Ierusalimschy
234fb7f695
clearer(?) code (also avoids a warning about 'c' being used
...
without initialization)
2015-01-02 10:50:28 -02:00
Roberto Ierusalimschy
c077d47465
does not define _XOPEN_SOURCE when LUA_USE_C89 is defined + defining
...
_XOPEN_SOURCE==0 undefines that macro
2014-12-29 14:54:13 -02:00
Roberto Ierusalimschy
8e5290d81e
all "divisions" (div,idiv,mod) by zero are not folded, to avoid
...
problems during compilation + does not fold zero results, as they
can collapse with -0.0 and the ANSI test to distinguish both needs
a division by zero (which we are trying to avoid) + removed macro
'luai_numinvalidop' (as its main use case were divisions by zero)
2014-12-29 14:49:25 -02:00
Roberto Ierusalimschy
a1c37f834a
detail (macro 'luai_numidiv' uses 'luai_numdiv' to compute the division)
2014-12-29 11:27:55 -02:00
Roberto Ierusalimschy
1a7868c1d5
bug: 'random' limit is 2^31-1, not RAND_MAX
2014-12-27 18:32:26 -02:00
Roberto Ierusalimschy
de3933480e
details
2014-12-27 18:31:43 -02:00
Roberto Ierusalimschy
50e2eb8954
change in macro 'vmcase', avoding code inside it. (Code inside the
...
macro harms tools such as debuggers.)
2014-12-27 18:30:38 -02:00
Roberto Ierusalimschy
94eb37dc73
new year (2015)
2014-12-26 15:24:27 -02:00
Roberto Ierusalimschy
900bdd5761
detail (to avoid warnings)
2014-12-26 12:46:07 -02:00
Roberto Ierusalimschy
a51069202a
removed macro 'luai_numinvalidop' (main motivation removed, as folding
...
does not handle any division by zero by default)
2014-12-26 12:44:44 -02:00
Roberto Ierusalimschy
fb6796ba06
removed useless initializations
2014-12-26 12:43:45 -02:00
Roberto Ierusalimschy
88ef06f4f3
comments were wrong (not updated about several changes)
2014-12-20 11:58:15 -02:00
Roberto Ierusalimschy
eb45f3a9b6
details in 'luaM_reallocvchar'
2014-12-19 15:26:14 -02:00
Roberto Ierusalimschy
6321041058
new macro 'luaM_reallocvchar' to allocate arrays of chars (avoids
...
uneeded tests and respective warnings)
2014-12-19 11:45:40 -02:00
Roberto Ierusalimschy
2b83711fba
new macro 'nvalue' (to convert an object to a float when we know
...
object is a number)
2014-12-19 11:36:32 -02:00
Roberto Ierusalimschy
3ae21a352c
detail (in test for 'luai_numinvalidop', use a round float)
2014-12-19 11:33:06 -02:00
Roberto Ierusalimschy
570143bf88
comment
2014-12-19 11:31:12 -02:00
Roberto Ierusalimschy
1465edf341
old Visual Studio versions did not support 'noreturn' attribute
2014-12-19 11:30:23 -02:00
Roberto Ierusalimschy
77e786d436
stupid bug in T.stacklevel (not in use by the tests)
2014-12-18 10:13:42 -02:00
Roberto Ierusalimschy
6d79752e65
Windows uses 'long long' (instead of '__int64') when present; again,
...
uses macro LLONG_MAX as a proxy for the support for 'long long'.
2014-12-16 15:17:30 -02:00
Roberto Ierusalimschy
75812a517b
added macro LUA_USE_I64 for separate control of use of Windows-specific
...
types
2014-12-16 14:20:01 -02:00
Roberto Ierusalimschy
151dc5cc5f
traverse loaded modules (instead of globals) for a name for a function +
...
removes prefix '_G.' from names (if present)
2014-12-14 16:32:26 -02:00
Roberto Ierusalimschy
0b6cfea005
comments
2014-12-13 15:57:00 -02:00
Roberto Ierusalimschy
c8da3fbc35
in traceback names, give preference to 'name' over '_G.name'
2014-12-13 15:47:58 -02:00
Roberto Ierusalimschy
c96cd1c647
reinsertion-control macro renamed: lconfig_h -> luaconf_h
2014-12-12 09:49:32 -02:00
Roberto Ierusalimschy
57e91b4159
correct computation for limit in 'getnum'
2014-12-11 12:03:07 -02:00
Roberto Ierusalimschy
ef7d29c666
better limits for 'sting.rep' and 'string.packsize'
2014-12-11 11:40:40 -02:00
Roberto Ierusalimschy
81ecaf6178
new specifiers in 'strftime' are defined in C99 (not Posix)
2014-12-10 13:42:42 -02:00
Roberto Ierusalimschy
27ab59bc16
'ipairs' needs an argument
2014-12-10 10:26:42 -02:00
Roberto Ierusalimschy
bd8ce7e331
macro 'LUA_C89_NUMBERS' makes a little easier to use C89 numerical types
2014-12-10 09:56:55 -02:00
Roberto Ierusalimschy
5c519a69d3
new function 'string.packsize'
2014-12-10 09:36:03 -02:00
Roberto Ierusalimschy
6f54b07663
give preference to global names in tracebacks
2014-12-10 09:31:32 -02:00
Roberto Ierusalimschy
741ad97e92
new parameter for testC instruction 'pcall' (error handler)
2014-12-10 09:30:51 -02:00
Roberto Ierusalimschy
b4633c586b
error handler does not need to be a function (can be a callable
...
object)
2014-12-10 09:30:09 -02:00
Roberto Ierusalimschy
5fae2a5b05
redefinition of LUAI_MAXSTACK to make stack-overflow tests run faster
2014-12-09 15:17:40 -02:00
Roberto Ierusalimschy
36efa6a6b9
no more 'preloadedlibs' when opening libraries (as it is dead code now)
2014-12-09 13:00:17 -02:00
Roberto Ierusalimschy
c6e74e41c9
handle case where function was called as a hook
2014-12-08 13:48:23 -02:00
Roberto Ierusalimschy
6909b5a2b4
In 'debug.gethook', does not query hook table (which may not exist) if
...
there is no hook set
2014-12-08 13:47:25 -02:00
Roberto Ierusalimschy
594d7266af
'assert' checks that it has (at least) one parameter + 'assert' ensures
...
it passes only one value to 'error'
2014-12-08 13:26:55 -02:00
Roberto Ierusalimschy
ab4a890d04
use 'namewhat' when building a traceback
2014-12-08 13:26:09 -02:00
Roberto Ierusalimschy
64e25a6186
avoid octal numerals
2014-12-08 13:12:07 -02:00
Roberto Ierusalimschy
460968353f
in test mode, debug library is not predefined (to allow testing
...
'preloadedlibs')
2014-12-06 18:42:58 -02:00
Roberto Ierusalimschy
32a1f54b9a
no more default size for option 'c' in pack/unpack
2014-12-04 14:25:40 -02:00
Roberto Ierusalimschy
6df197ec15
some functions from test module must be exported
2014-11-29 17:45:37 -02:00
Roberto Ierusalimschy
177807f21e
casts ('(int)' -> 'cast_int')
2014-11-29 15:38:33 -02:00
Roberto Ierusalimschy
92f02fff11
bug: lua_tounsignedx must cast to lua_Unsigned (of course...)
2014-11-29 15:24:05 -02:00
Roberto Ierusalimschy
125296c83d
next release won't be beta
2014-11-28 17:13:39 -02:00
Roberto Ierusalimschy
9c41d9d1df
removed unneeded barrier ('from' must be white)
2014-11-27 16:41:43 -02:00
Roberto Ierusalimschy
ad79eafe86
details (comments)
2014-11-25 16:21:57 -02:00
Roberto Ierusalimschy
fd179ab4b8
clearer notation for "compare" instruction
2014-11-25 12:51:33 -02:00
Roberto Ierusalimschy
bf163ea7f0
bug (' #3 ' causes seg. fault in 5.3-beta) + comments + 'codearith' ->
...
'codeexpval' (confusion about what operations function accept was
one of the reasons for the bug)
2014-11-24 12:59:22 -02:00
Roberto Ierusalimschy
075661ffde
new test for macro 'luai_numinvalidop'
2014-11-24 12:56:56 -02:00
Roberto Ierusalimschy
db5ac2fa0d
detail (buffer in 'LoadF' is related to files)
2014-11-21 10:17:58 -02:00
Roberto Ierusalimschy
1735c05ac7
avoid memory errors while a file is locked (when reading a line)
2014-11-21 10:17:33 -02:00
Roberto Ierusalimschy
5fbd40dbe5
'x//y' extended to floats
2014-11-21 10:15:57 -02:00
Roberto Ierusalimschy
049cf14cf9
'x//y' extended to floats + more comments about module and floor
...
division operations
2014-11-21 10:15:00 -02:00
Roberto Ierusalimschy
5d628519d3
simpler definition for 'luaV_tonumber_'
2014-11-19 13:05:15 -02:00
Roberto Ierusalimschy
244646bdf7
detail (LUAL_BUFFERSIZE has a larger variation among different
...
platforms)
2014-11-19 13:00:42 -02:00
Roberto Ierusalimschy
5bdfefd3a5
allows calling luaL_checkstack with no message (in runC)
2014-11-14 16:15:17 -02:00
Roberto Ierusalimschy
5873786e27
small bug (error of "chunk has too many lines" might use 't.token'
...
before reading the first token)
2014-11-14 14:06:09 -02:00
Roberto Ierusalimschy
cb59019f58
uses return value from luaL_getmetatable
2014-11-12 11:32:27 -02:00
Roberto Ierusalimschy
52c0f9575b
uses return value from lua_getfield
2014-11-12 11:31:51 -02:00
Roberto Ierusalimschy
4fde357130
details (matching parameter names with manual)
2014-11-12 11:30:15 -02:00
Roberto Ierusalimschy
e5fd1e5fe2
details (match parameter names with lua.h and manual)
2014-11-12 11:28:54 -02:00
Roberto Ierusalimschy
87b179e71d
detail (use new returned value from 'lua_getglobal' )
2014-11-11 17:41:27 -02:00
Roberto Ierusalimschy
b401d37188
detail (to avoid a "to avoid warnings" return)
2014-11-11 17:40:20 -02:00
Roberto Ierusalimschy
6624ccff26
independent code for 'printstack' + test for panic function can
...
ran code there
2014-11-11 15:15:06 -02:00
Roberto Ierusalimschy
9a38c08011
no need to ensure any stack space for panic function + some changes
...
in 'tryfuncTM' (small simplification)
2014-11-11 15:13:39 -02:00
Roberto Ierusalimschy
be87789a6c
details
2014-11-11 15:08:19 -02:00
Roberto Ierusalimschy
d1d1ddec1e
details
2014-11-10 16:41:19 -02:00
Roberto Ierusalimschy
bfa0898312
bug: memory error in panic mode does not push error message on
...
the stack + stack check in tryfuncTM + comments
2014-11-10 15:42:04 -02:00
Roberto Ierusalimschy
79b0d05480
new function 'T.checkpanic' (to check panic errors)
2014-11-10 15:41:36 -02:00
Roberto Ierusalimschy
779381fe9e
detail (comment)
2014-11-10 15:24:43 -02:00
Roberto Ierusalimschy
b6911c177d
luaL_loadbuffer replaced by luaL_loadstring (to test luaL_loadstring)
...
+ 'rawgetp'/'rawsetp' added to C interpreter
2014-11-10 12:47:29 -02:00
Roberto Ierusalimschy
9212175ffb
added missing cases for debug info about tag methods +
...
better error message for bitwise operators
2014-11-10 12:46:46 -02:00
Roberto Ierusalimschy
ad20689feb
better error message for bitwise operators (they are not arithmetic...)
2014-11-10 12:46:05 -02:00
Roberto Ierusalimschy
e320790154
using address instead of string for key for table 'CLIBS' in the
...
registry
2014-11-10 12:28:31 -02:00
Roberto Ierusalimschy
fee3aa518d
using address key (light userdata) for hook table, instead of
...
string
2014-11-10 12:27:16 -02:00
Roberto Ierusalimschy
b58602d93d
removed unneeded test (result of b_str2int is already checked
...
against length)
2014-11-10 12:25:52 -02:00
Roberto Ierusalimschy
74e10b9c3b
details (error messages)
2014-11-08 16:12:53 -02:00
Roberto Ierusalimschy
b044b8c182
detail (line break)
2014-11-08 15:57:08 -02:00
Roberto Ierusalimschy
a113e1498d
when checking thread consistency, check its entire stack (always
...
the entire stack must have valid values)
2014-11-07 16:07:17 -02:00
Roberto Ierusalimschy
17ca3b1763
cleaner test for overflow for range of 'math.random'
2014-11-07 09:31:58 -02:00
Roberto Ierusalimschy
50b18f60cb
detail
2014-11-05 16:55:43 -02:00
Roberto Ierusalimschy
ad73e5156e
more direct way to fill sign-extension extra bytes when packing
...
integers with sizes larger than lua_Integer + added comments
2014-11-05 16:50:29 -02:00
Roberto Ierusalimschy
720c68dabb
removed repeated flags (-Wall/-Wdisabled-optimization) + removed flag
...
-Wcast-align (Lua does some unconventional casts) + added flag -std=c99
+ added file lprefix.h in dependency lists
2014-11-05 11:02:26 -02:00
Roberto Ierusalimschy
81c39a5244
no need to cast '*s' to unsigned char when we know it is a digit +
...
no need to call 'luaO_hexavalue' for decimal digits
2014-11-04 17:16:25 -02:00
Roberto Ierusalimschy
cfabcbfb17
added macro for configuring padding value in 'string.pack'
2014-11-04 12:34:43 -02:00
Roberto Ierusalimschy
bde14c3adc
macro to change method of conversion from float to integer (make it
...
use floor intead of requiring an exact integral value)
2014-11-03 18:07:47 -02:00
Roberto Ierusalimschy
4b839d7c72
Definitions for Lua code that must come before any other header file
2014-11-03 13:12:44 -02:00
Roberto Ierusalimschy
c49edc4566
keep "#include <windows.h>" in this file, but without the
...
previous requirement that it must be included before any other
header file (it doesn't seem to matter)
2014-11-03 13:11:10 -02:00
Roberto Ierusalimschy
c5d52a5468
Windows uses "LONGLONG" option, even not having long long (it has __int64)
2014-11-02 17:35:39 -02:00
Roberto Ierusalimschy
e75c0148c3
comments (references to "ANSI C" changed to "ISO C", which is the
...
international name
2014-11-02 17:33:33 -02:00
Roberto Ierusalimschy
28fdbcf393
added include for 'lprefix.h', for stuff that must be added before
...
any other header file
2014-11-02 17:19:04 -02:00
Roberto Ierusalimschy
c25072a246
'lua_load' sets _ENV for any chunk with upvalues (not just those
...
with exactly one upvalue)
2014-10-31 15:41:51 -02:00
Roberto Ierusalimschy
1a69a3ecea
LUA_WIN -> LUA_USE_WINDOWS
2014-10-31 13:54:06 -02:00
Roberto Ierusalimschy
dcfc3c9405
new option '=' (native endian) for pack/unpack
2014-10-31 13:53:31 -02:00
Roberto Ierusalimschy
4542fb9f78
comments (a few extra quotes around identifiers)
2014-10-30 16:53:28 -02:00
Roberto Ierusalimschy
80e817719d
default changed from C89 to C99 + extra tests before using C99
...
features (when possible) + LUA_32BITS use 'int' when possible
('long' can be 64 bits)
2014-10-30 16:50:03 -02:00
Roberto Ierusalimschy
96f3a31b24
Better organization of definitions in categories + removed
...
'_CRT_SECURE_NO_WARNINGS' (useless there) + LUA_ENV/luai_writestring/
luai_writeline/luai_writestringerror/LUA_INT32/LUAI_UMEM/LUAI_MEM
moved to other places (no need to be in luaconf.h) + changed definition
for LUAL_BUFFERSIZE
2014-10-29 16:01:26 -02:00
Roberto Ierusalimschy
ff6c034330
configurations for types 'lu_mem'/'l_mem'/'Instruction' moved to here
...
(from 'luaconf.h'), as they are not needed by the API and probably
will not be changed
2014-10-29 15:07:45 -02:00
Roberto Ierusalimschy
05afee0f50
definitions for 'luai_writestring'/'luai_writeline'/'luai_writestringerror'
...
moved to 'lauxlib.h' (they do not need to be stable or configurable) +
prefixes changed from 'luai_' to 'lua_' (they are not part of the core)
2014-10-29 14:12:30 -02:00
Roberto Ierusalimschy
351a446ec5
definition for 'LUA_ENV' moved from 'luaconf.h' to here (no need to
...
be visible outside Lua + no need for easy redefinitions)
2014-10-29 13:38:24 -02:00
Roberto Ierusalimschy
e9885efc7c
added comment and assert about an (impossible) division by zero
2014-10-29 13:02:53 -02:00
Roberto Ierusalimschy
59fbbf0a65
small simplifications in code for 'lua_strx2number'
2014-10-28 16:41:38 -02:00
Roberto Ierusalimschy
61c3c80177
detail
2014-10-28 16:23:31 -02:00
Roberto Ierusalimschy
9de384e27a
removed useless 'include math.h'
2014-10-28 15:27:50 -02:00
Roberto Ierusalimschy
4b526045fa
comment
2014-10-28 15:27:41 -02:00
Roberto Ierusalimschy
4870194380
small reorganization of tests around LUA_USE_C99
2014-10-27 17:21:56 -02:00
Roberto Ierusalimschy
41d0e66184
comments + Windows numeric types not used if LUA_ANSI is defined
2014-10-27 16:06:03 -02:00
Roberto Ierusalimschy
aa1bd8876c
comments
2014-10-27 16:05:37 -02:00
Roberto Ierusalimschy
7314acaa80
'T.limits' reports some more useful limits
2014-10-27 15:00:02 -02:00
Roberto Ierusalimschy
4b2521cd9e
better (and safer?) way to test native size of type 'int'
2014-10-27 14:59:31 -02:00
Roberto Ierusalimschy
491103708e
'MAXSTACK' -> 'MAXREGS' and moved to 'lcode.c' (there is no reason
...
to change that constant...)
2014-10-27 14:29:58 -02:00
Roberto Ierusalimschy
fa4d5c8689
pack/unpack do not handle final '\0' as an "option" (it streches
...
unnecessarily the switch range)
2014-10-27 11:30:24 -02:00
Roberto Ierusalimschy
aef2d711b1
detail
2014-10-26 13:45:41 -02:00
Roberto Ierusalimschy
bdf566a8a3
`name' in comments changed to 'name'
2014-10-25 09:50:46 -02:00
Roberto Ierusalimschy
c3c78030f7
avoid redeclaration of _CRT_SECURE_NO_WARNINGS + 'lua_numtointeger' ->
...
'lua_numbertointeger'
2014-10-24 09:42:47 -02:00
Roberto Ierusalimschy
ff9ca88aa6
added some casts to avoid warnings in some compilers
2014-10-24 09:42:29 -02:00
Roberto Ierusalimschy
463edee2fd
'lua_numtointeger' -> 'lua_numbertointeger'
2014-10-24 09:42:06 -02:00
Roberto Ierusalimschy
88ff582fd8
detail (using 'sizeof' instead of 'strlen' for length of a constant
...
string)
2014-10-22 14:55:57 -02:00
Roberto Ierusalimschy
6b12b82532
added 'l_' prefix for names that can be redefined externally
2014-10-22 09:44:20 -02:00
Roberto Ierusalimschy
d7a0179cd6
use 'opf' (float) variants only when explicitly allowed (LUA_USE_C99)
2014-10-21 12:38:46 -02:00
Roberto Ierusalimschy
6d613817d4
comments
2014-10-20 20:21:05 -02:00
Roberto Ierusalimschy
b8d412aa07
error in comment
2014-10-20 16:29:55 -02:00
Roberto Ierusalimschy
961760c9b6
message handler always adds a traceback to messages (even if they
...
are not strings), unless they have a __tostring method.
2014-10-20 16:19:26 -02:00
Roberto Ierusalimschy
57559547a3
in 'pack'/'unpack', endianness and alignment treated like options +
...
small changes in names and handling of internal options ('KOption')
2014-10-20 14:44:54 -02:00
Roberto Ierusalimschy
cfa84e1232
does not use 'long long' when LUA_ANSI is set
2014-10-20 14:32:05 -02:00
Roberto Ierusalimschy
0d31efb365
'lua_stringtonum' -> 'lua_stringtonumber'
2014-10-17 16:17:55 -03:00
Roberto Ierusalimschy
f97c64d7bf
macros 'LUA_QL'/'LUA_QL' deprecated
2014-10-17 13:28:21 -03:00
Roberto Ierusalimschy
ea3155e380
'debug.sizeof' removed
2014-10-17 08:07:26 -03:00
Roberto Ierusalimschy
c172a4f7c2
'dumpint' and related functions replaced by 'string.pack'/'string.unpack'
2014-10-17 07:55:28 -03:00
Roberto Ierusalimschy
f8e0d33b25
added "_CRT_SECURE_NO_WARNINGS" for Windows (to avoid warnings about
...
several standard C functions) + small changes in '#include's
2014-10-15 11:53:20 -03:00
Roberto Ierusalimschy
745618d941
'charpatt' -> 'charpattern'
2014-10-15 11:31:10 -03:00
Roberto Ierusalimschy
89602bf747
'lua_strtonum' -> 'lua_stringtonum'
2014-10-15 11:27:40 -03:00
Roberto Ierusalimschy
56d4537879
'$c' in 'lua_pushfstring' prints non-printable characters with
...
their codes
2014-10-10 19:23:04 -03:00
Roberto Ierusalimschy
18014ef2fd
better handling of systems that do not support 'long long'
2014-10-08 17:32:50 -03:00
Roberto Ierusalimschy
ffe7401ceb
avoid warnings in macro 'luaM_reallocv' + comments
2014-10-08 17:25:51 -03:00
Roberto Ierusalimschy
65ec3379b1
added some casts for the cases when lua_Number != double
2014-10-08 16:57:31 -03:00
Roberto Ierusalimschy
85fc9ecd5f
detail ('G(L)' -> 'g')
2014-10-08 09:20:26 -03:00
Roberto Ierusalimschy
2a21f6c894
'lua_Kcontext' -> 'lua_KContext'
2014-10-07 15:29:13 -03:00
Roberto Ierusalimschy
3670db99b6
comments
2014-10-06 18:34:34 -03:00
Roberto Ierusalimschy
e14a02c24f
when thread yields, real "func" is in field 'extra', not in 'func'
2014-10-06 14:06:49 -03:00
Roberto Ierusalimschy
15f4150518
alpha -> beta
2014-10-04 19:57:36 -03:00
Roberto Ierusalimschy
c5cae9362c
added two casts to avoid warnings in VS
2014-10-04 19:57:10 -03:00
Roberto Ierusalimschy
4f4e0e49bb
easier way to compile Lua 32
2014-10-03 09:55:44 -03:00
Roberto Ierusalimschy
2f4d429071
details (comments)
2014-10-03 09:54:57 -03:00
Roberto Ierusalimschy
27f7bd2e83
detail
2014-10-01 13:05:06 -03:00
Roberto Ierusalimschy
798660c9cd
deprecated "cast macros" ('luaL_checkint', 'luaL_optint', etc.)
2014-10-01 08:54:56 -03:00
Roberto Ierusalimschy
34b6664dcb
better to use 'long' to represent UTF-8 code points
2014-10-01 08:52:33 -03:00
Roberto Ierusalimschy
d35fff16d5
'ipairs' always stops at first nil element
2014-09-30 10:53:26 -03:00
Roberto Ierusalimschy
56699cd603
small change to avoid bug in some versions of the clang compiler
2014-09-26 11:09:21 -03:00
Roberto Ierusalimschy
8ede2c353c
detail in 'report' + message handler always is called with an
...
argument + 'report' already handles non-string error messages
2014-09-25 11:20:37 -03:00
Roberto Ierusalimschy
6384475ec4
'luaL_getmetafield' returns type of metafield (instead of a boolean)
2014-09-22 03:42:15 -03:00
Roberto Ierusalimschy
3a15c7ce43
size for array part of a table ('sizearray') changed from 'int' to
...
'unsigned int', which allows twice as many elements in the array part
2014-09-04 15:15:29 -03:00
Roberto Ierusalimschy
0a6b58c3aa
weak tables that must be retraversed are kept in 'grayagain' list
...
until atomic phase (instead of going to their special lists) +
more comments
2014-09-03 13:54:41 -03:00
Roberto Ierusalimschy
979a663d2a
detail (error message from 'coroutine.status')
2014-09-01 15:00:04 -03:00
Roberto Ierusalimschy
22952d8973
'T.gccolor' classify dead objects too
2014-09-01 14:58:55 -03:00
Roberto Ierusalimschy
df608f842a
'linktable' -> 'linkgclist' (and used for all links with 'gclist')
2014-09-01 14:37:11 -03:00
Roberto Ierusalimschy
001bb46ae1
bug: Ephemeron table can wrongly collect entry with strong key
2014-09-01 13:56:01 -03:00
Roberto Ierusalimschy
9b25347a67
detail
2014-08-27 11:59:33 -03:00
Roberto Ierusalimschy
e401513086
new option 'p' for 'debug.sizeof' (size of a pointer)
2014-08-22 13:22:42 -03:00
Roberto Ierusalimschy
7f1a2ad699
new functions 'lua_geti/lua_seti' (non raw)
2014-08-21 17:07:56 -03:00
Roberto Ierusalimschy
a1ab5ab396
'table.copy' -> 'table.move' + optional parameter moved to the end +
...
several functions operate on "virtual" tables too
2014-08-21 16:13:55 -03:00
Roberto Ierusalimschy
01549fb1ed
'Csize' -> 'sizeof' + removed its 'b' option
2014-08-21 16:12:40 -03:00
Roberto Ierusalimschy
4fba117433
[un]'dumpint' -> [un]'dumpinteger'
2014-08-20 19:06:41 -03:00
Roberto Ierusalimschy
2be88d5084
'lua_Ctx' -> 'lua_Kcontext'
2014-08-01 14:33:08 -03:00
Roberto Ierusalimschy
f5c690b684
details in comments
2014-08-01 14:24:02 -03:00
Roberto Ierusalimschy
61fa462535
added cast to avoid warning
2014-08-01 14:22:57 -03:00
Roberto Ierusalimschy
fba9050d3d
release changed to (5.3) alpha
2014-07-31 10:44:30 -03:00
Roberto Ierusalimschy
d861706620
new macro 'cvt2num' to better control whether strings are convertible
...
to numbers
2014-07-30 11:42:44 -03:00
Roberto Ierusalimschy
34ac039fb8
new macro 'cvt2str' to better control whether numbers are convertible
...
to strings
2014-07-30 11:00:14 -03:00
Roberto Ierusalimschy
1aa5262634
do not assume numbers are coercible to strings
2014-07-30 10:59:24 -03:00
Roberto Ierusalimschy
07c7fdb9df
simpler definition for 'setobj' (trust the compiler for the assignment)
2014-07-29 13:22:24 -03:00
Roberto Ierusalimschy
3ccbae84d2
added some casts between integral types (to avoid warnings)
2014-07-29 13:01:00 -03:00
Roberto Ierusalimschy
255d59ed5e
some janitorial work (comments, small refactoring)
2014-07-28 14:47:53 -03:00
Roberto Ierusalimschy
925d1b59f9
new function 'math.ult' (unsigned less than)
2014-07-28 14:35:47 -03:00
Roberto Ierusalimschy
03bbe1baf1
first implementation for 'table.copy'
2014-07-25 15:46:00 -03:00
Roberto Ierusalimschy
f9037ae8c1
'ipairs' respects metamethods
2014-07-24 16:33:29 -03:00
Roberto Ierusalimschy
57d8424146
extra space for new threads is initialized with a copy of the main
...
thread, not of the creator thread.
2014-07-24 13:17:56 -03:00
Roberto Ierusalimschy
baa0e23456
better support for extra user space associated with a Lua state
2014-07-24 11:00:16 -03:00
Roberto Ierusalimschy
55a710545c
detail (extra byte in LUAI_EXTRASPACE to test proper alignment of
...
a lua_State)
2014-07-23 14:16:50 -03:00
Roberto Ierusalimschy
753f2c1da4
better(?) alignment for some structures (pointers first)
2014-07-23 14:15:43 -03:00
Roberto Ierusalimschy
b3b8580606
comments + proper undef of compatibility macros + no need to undef
...
internal macros (this is the first definition)
2014-07-23 13:47:47 -03:00
Roberto Ierusalimschy
73ad16b5c6
no need for type 'pCallInfo'
2014-07-23 13:44:30 -03:00
Roberto Ierusalimschy
97e299c395
'lua_replace' implemented as a macro using 'lua_copy'
2014-07-22 15:07:47 -03:00
Roberto Ierusalimschy
c697aa30bc
more precise type for argument to 'aux_upvalue'
2014-07-21 13:02:57 -03:00
Roberto Ierusalimschy
17ee57f8e0
'iswhite' and related macros now can work directly on any object
...
(no need to convert to 'GCObject')
2014-07-21 13:02:10 -03:00
Roberto Ierusalimschy
3c6d0aaa7d
'iswhite' and related macros now can work directly on any object
...
(no need to convert to 'GCObject')
2014-07-19 12:14:46 -03:00
Roberto Ierusalimschy
e43612aaf6
put the restriction that 'luaC_barrierback' works only on tables
...
in its prototype
2014-07-19 12:09:37 -03:00
Roberto Ierusalimschy
2898e2fd12
removed useless assertion (gcstate != GCSpause already implied by
...
other assertions) and wrong assertion (setmetatable uses this barrier
for tables too)
2014-07-19 11:44:19 -03:00
Roberto Ierusalimschy
8704fca0c9
in 'luaL_checkversion_' check numeric types first. (Other tests
...
depend on correct numeric type.)
2014-07-19 11:37:09 -03:00
Roberto Ierusalimschy
325e44d87e
no more "-2" for limits. (Limits should be precise; safety is in
...
the code that handles these limits.)
2014-07-18 15:29:12 -03:00
Roberto Ierusalimschy
54ac253343
detail (no need to define LUAI_USER_ALIGNMENT_T when it is not
...
defined; simpler to define 'L_Umaxalign' directly)
2014-07-18 15:18:45 -03:00
Roberto Ierusalimschy
bb12903120
type 'Udata' refers directly to structure inside the union (union
...
used only for aligning purposes now)
2014-07-18 11:46:47 -03:00
Roberto Ierusalimschy
ca41b43f53
type 'TString' refers directly to the structure inside the union
...
(union used only for size purposes)
2014-07-18 10:36:14 -03:00
Roberto Ierusalimschy
3511e186cd
ensure size for LUAI_USER_ALIGNMENT_T in tests is larger than the
...
structures it is aligning (in most architectures)
2014-07-18 10:27:45 -03:00
Roberto Ierusalimschy
56137d58ff
added check for conversion 'obj2gco' (and corrections for small
...
problems detected by this check)
2014-07-18 09:17:54 -03:00
Roberto Ierusalimschy
9aec500a26
no need for field 'gch' anymore
2014-07-17 14:27:49 -03:00
Roberto Ierusalimschy
5a9cc57a5e
change in GCObject: instead of being a union, it is now a structure
...
with the common header of all collectable objects; union is used
only for conversions. (Goal is to be able to check that the cast
'obj2gco' can have a check to ensure that object being converted
is really a collectable object.). This is the first step in the
change.
2014-07-17 14:09:50 -03:00
Roberto Ierusalimschy
1aa4f69b51
new type 'lua_Ctx' for continuation-function contexts (to allow type
...
to be configurable)
2014-07-17 10:53:37 -03:00
Roberto Ierusalimschy
8bb272a3e3
new conversion float->integer: conversion is valid only when
...
float has an exact representation as an integer
2014-07-17 09:30:53 -03:00
Roberto Ierusalimschy
c229ed597f
'requiref' checks 'package.loaded' before loading a module
2014-07-16 11:51:36 -03:00
Roberto Ierusalimschy
16b4110521
function 'type' keeps type names as upvalues to avoid creating strings
...
everytime it is called
2014-07-16 10:56:59 -03:00
Roberto Ierusalimschy
f14662fca6
detail (added placeholders for non-function fields to preallocate
...
space for them)
2014-07-16 10:56:14 -03:00
Roberto Ierusalimschy
a9af12bbe7
Table library now respects '__index'/'__newindex' metamethods
2014-07-16 09:44:52 -03:00
Roberto Ierusalimschy
5bbb4a06a6
removed unused parameter Ä'L' in macro 'api_check' and company
2014-07-15 18:26:50 -03:00
Roberto Ierusalimschy
d4fb848be7
added api check in 'lua_typename' (tag is valid)
2014-07-15 18:14:49 -03:00
Roberto Ierusalimschy
b9dcf9974d
detail (typos in comments)
2014-06-30 16:48:08 -03:00
Roberto Ierusalimschy
a77d263e86
unsigned-manipulation functions (lua_puhsunsigned, lua_tounsigned, etc.)
...
deprecated
2014-06-26 15:38:28 -03:00
Roberto Ierusalimschy
7cc40851e1
emergency collection can happen even when collector is stopped
2014-06-26 15:29:05 -03:00
Roberto Ierusalimschy
08a9c9faa3
detail (comment)
2014-06-26 15:28:24 -03:00
Roberto Ierusalimschy
84fe52dbeb
unsigned-manipulation functions (lua_puhsunsigned, lua_tounsigned, etc.)
...
deprecated
2014-06-26 14:25:11 -03:00
Roberto Ierusalimschy
10200585a7
var-arguments to the script come from 'arg' table (not from original
...
'argv' array)
2014-06-26 14:08:52 -03:00
Roberto Ierusalimschy
c94f11d783
'IntPoint' -> 'point2int' + ensure that casted value fits in
...
destination type
2014-06-26 13:17:35 -03:00
Roberto Ierusalimschy
54ac5960a8
LUA_MAXUNSIGNED was only used to define 2.0^intnumbits (and that
...
definition was not strictly portable), so it was removed and
replaced by a more correct and direct definition for 2.0^intnumbits
(only where it was needed)
2014-06-24 14:02:00 -03:00
Roberto Ierusalimschy
0e6229a953
use proper macros to convert 'GCObject' to other objects + better
...
type cheking in 'set*value' macros
2014-06-19 15:39:36 -03:00
Roberto Ierusalimschy
d2ab1aef31
detail (avoid too large macro)
2014-06-19 15:29:30 -03:00
Roberto Ierusalimschy
89b56e7d84
more precision between closure types ('LClosure' x 'CClosure')
2014-06-19 15:27:20 -03:00
Roberto Ierusalimschy
14929f5764
use appropriate macros to convert GCObject to specific types
2014-06-18 19:59:29 -03:00
Roberto Ierusalimschy
7021cc9bc8
allows different 'source' for each prototype, but inherits it from
...
parent when they are equal (only possible case for chunks created
by the parser)
2014-06-18 15:35:43 -03:00
Roberto Ierusalimschy
04da0a40c0
added assertion about sources being the same for all protos in a chunk
2014-06-18 10:54:31 -03:00
Roberto Ierusalimschy
eb67828236
changed macro for compatibility options + details
2014-06-18 10:24:01 -03:00
Roberto Ierusalimschy
94266dfdbd
source for all prototypes must be equal in a chunk; no need to store
...
each one separated
2014-06-18 10:21:12 -03:00
Roberto Ierusalimschy
e3871abe95
'math.ifloor' is back
2014-06-18 09:35:53 -03:00
Roberto Ierusalimschy
3fc25ff15b
macro 'checkobjref' accepts NULL (as all its uses checked for NULL
...
before) + user value from a userdata may not be a GC object
2014-06-17 14:13:29 -03:00
Roberto Ierusalimschy
fa3113ffbf
cleaner way to handle bit CIST_OAH (with auxiliar macros)
2014-06-12 16:07:30 -03:00
Roberto Ierusalimschy
d94bb6c273
janitor work on 'lua_resume' and related code
2014-06-11 13:01:55 -03:00
Roberto Ierusalimschy
5784331768
new items in default path for Windows
2014-06-10 16:21:20 -03:00
Roberto Ierusalimschy
88a9e51f34
bit-field CIST_YIELDED removed (it was never consulted)
2014-06-10 16:18:50 -03:00
Roberto Ierusalimschy
8b5940e7ca
must also reset CIST_OAH if necessary (CallInfo is not a fresh one)
2014-06-10 16:13:26 -03:00
Roberto Ierusalimschy
1a3656e56e
more relaxed rules for __eq metamethod (more similar to other
...
operators)
2014-06-10 15:53:18 -03:00
Roberto Ierusalimschy
542b6cfc02
no need for field 'status' in structure 'CallInfo' (after removal
...
of 'lua_getctx') + field 'old_allowhook' can be packed into a single
bit
2014-06-10 15:51:21 -03:00
Roberto Ierusalimschy
6f6fd96e3b
new type lua_KFunction + no more 'lua_getctx'
2014-06-10 14:41:38 -03:00
Roberto Ierusalimschy
35a6aad0d7
added comments
2014-06-09 13:32:18 -03:00
Roberto Ierusalimschy
23f0ff9517
lots of janitor work (including comments) + 'arg' table created
...
before running any script + changes in the parameters and return
of 'collectargs'
2014-06-05 17:42:06 -03:00
Roberto Ierusalimschy
355037528c
'math.mof' works with integers, too
2014-06-02 20:09:28 -03:00
Roberto Ierusalimschy
9e68c047ae
'assert' does not assume that the error object is a string
2014-06-02 00:06:26 -03:00
Roberto Ierusalimschy
e9d86eddf3
if numeral overflows the reading buffer, signal it as invalid input
...
(resulting in nil)
2014-06-02 00:00:51 -03:00
Roberto Ierusalimschy
11aefa4478
details (comments)
2014-06-01 21:03:16 -03:00
Roberto Ierusalimschy
5ebdd326b6
detail (to avoid warnings of unused variable)
2014-05-29 16:30:07 -03:00
Roberto Ierusalimschy
84db17b6fc
more "religious" definition for 'lua_numtointeger'
2014-05-27 10:59:03 -03:00
Roberto Ierusalimschy
456806f25c
no more 'math.ifloor' + new semantics for 'math.floor'/'math.ceil'
2014-05-26 14:13:52 -03:00
Roberto Ierusalimschy
c98f195eb9
function 'luaV_numtointeger' changed to a global macro
...
'lua_numtointeger' (tricky, small, and useful in several places)
2014-05-26 14:10:22 -03:00
Roberto Ierusalimschy
4d696c45b9
simpler handling of 'GCScallfin' state + more comments
2014-05-25 16:08:32 -03:00
Roberto Ierusalimschy
36715ab7c1
detail (comment)
2014-05-23 15:32:21 -03:00
Roberto Ierusalimschy
e966e53791
no more use of 'scanf' for reading numbers
2014-05-21 12:24:21 -03:00
Roberto Ierusalimschy
c4eff10322
small improvements concerning 'check_next'
2014-05-21 12:22:02 -03:00
Roberto Ierusalimschy
8a0acf0898
comments
2014-05-20 11:12:59 -03:00
Roberto Ierusalimschy
e2be310a85
better(?) implementation for 'pcall'/'xpcall' (regarding the insertion
...
of the boolean first result)
2014-05-16 15:54:01 -03:00
Roberto Ierusalimschy
17159b491c
more direct implementation of 'table.pack'
2014-05-16 15:53:25 -03:00
Roberto Ierusalimschy
0aa32fa0cb
small changes in field order in some structs to reduce padding
2014-05-15 17:41:27 -03:00
Roberto Ierusalimschy
8927c14317
removed macro 'luai_checknum' (as NaN trick is not doable now)
2014-05-15 17:28:39 -03:00
Roberto Ierusalimschy
3e977f02ac
added a few comments
2014-05-15 17:08:32 -03:00
Roberto Ierusalimschy
a73da6112d
deprecated library throws an error if called (instead of silently
...
not loading itself)
2014-05-15 16:28:34 -03:00
Roberto Ierusalimschy
6a5d87771f
added lots of new comments + small changes in code
2014-05-15 16:27:33 -03:00
Roberto Ierusalimschy
15e8405731
'LUA_COMPAT_ALL' -> 'LUA_COMPAT_5_1'/'LUA_COMPAT_5_2' + "@*" in
...
comments replaced by "@@". ("@*" is too distracting)
2014-05-15 12:24:32 -03:00
Roberto Ierusalimschy
fd1672ba98
avoid non-conformant pointer arithmetic in api check for 'lua_rotate'
2014-05-15 12:22:45 -03:00
Roberto Ierusalimschy
1ddb251d86
using a more conventional handling of stack space in 'io_readline'
2014-05-15 12:21:06 -03:00
Roberto Ierusalimschy
f8daddba50
added a compat option (although it will be off by default) to
...
the addition of '.0' to float->string conversions
2014-05-14 16:47:11 -03:00
Roberto Ierusalimschy
e58ef8d0bb
missing macro 'LUAMOD_API' in function to open library
2014-05-14 15:33:37 -03:00
Roberto Ierusalimschy
e3b9569e04
function 'reverse' uses appropriate variants of 'setobj' for better
...
documentation
2014-05-14 15:32:30 -03:00
Roberto Ierusalimschy
8b66040e34
several functions deprecated (cosh, sinh, atanh, pow, frexp, ldexp)
2014-05-14 13:59:27 -03:00
Roberto Ierusalimschy
965993da07
comments added to 'lua_rotate'
2014-05-14 11:20:17 -03:00
Roberto Ierusalimschy
5a5a834975
new API function 'lua_rotate'
2014-05-13 16:40:28 -03:00
Roberto Ierusalimschy
45c430eac0
addition of '.0' to float representation done by the kernel
2014-05-12 18:44:17 -03:00
Roberto Ierusalimschy
27d9219cf3
no more integer exponentiation
2014-05-12 18:22:05 -03:00
Roberto Ierusalimschy
12bd01c567
added comments to several functions
2014-05-12 16:13:32 -03:00
Roberto Ierusalimschy
626124d2d8
old POSIX systems need '<sys/types.h>' for 'off_t'
2014-05-11 11:46:19 -03:00
Roberto Ierusalimschy
5018104a60
better error message for unfinished long strings/comments
2014-05-11 11:45:43 -03:00
Roberto Ierusalimschy
ec11d132db
comments
2014-05-11 10:03:48 -03:00
Roberto Ierusalimschy
06dc893f88
in 'for' loops, make the limit an integer whenever initial value and
...
step are integers
2014-05-09 11:20:52 -03:00
Roberto Ierusalimschy
a09bd59615
'T.totalmem' accepts 0 for unlimited memory
2014-05-08 16:08:46 -03:00
Roberto Ierusalimschy
42ff788e53
comments
2014-05-08 15:58:46 -03:00
Roberto Ierusalimschy
1bd70a8e40
new function 'lua_isyieldable' (and 'coroutine.isyieldable')
2014-05-08 10:52:20 -03:00
Roberto Ierusalimschy
ef83457427
updated several 'fix' fields
2014-05-07 13:57:27 -03:00
Roberto Ierusalimschy
4833fb8273
marks for releases 5.2.2 and 5.2.3 + correction in last bug's description
2014-05-07 13:35:24 -03:00
Roberto Ierusalimschy
77e7ebca0a
better alignments (for 64-bit arquitectures) for structures 'Table' and
...
'TString'
2014-05-07 08:12:51 -03:00
Roberto Ierusalimschy
6d5324f92f
'math.fmod' handles integers as integers
2014-05-02 13:36:51 -03:00
Roberto Ierusalimschy
4fe11ae232
'lua_getuservalue' returns type of user value
2014-05-01 15:21:32 -03:00
Roberto Ierusalimschy
c549d4fe64
'lua_strtonum' (and 'luaO_str2num') now return string size, instead of
...
receiving it
2014-05-01 15:18:06 -03:00
Roberto Ierusalimschy
ddff6ecf30
function 'limittointeger' no needed (now that 'tointeger_aux' handles
...
integers too)
2014-04-30 16:29:51 -03:00
Roberto Ierusalimschy
6b630c0fa0
debug.numbits replaced by debug.Csize
2014-04-30 15:59:15 -03:00
Roberto Ierusalimschy
1a6ef098b0
'luaO_str2d' + 'luaO_str2int' replaced by 'luaO_str2num' plus proper
...
conversion from strings to integers
2014-04-30 13:50:16 -03:00
Roberto Ierusalimschy
5388aa9fc0
'luaO_str2d' + 'luaO_str2int' replaced by 'luaO_str2num' (which converts
...
to float or integer according to the string syntax)
2014-04-30 13:48:44 -03:00
Roberto Ierusalimschy
b123a88673
merge of common parts from 'limittointeger' and 'luaV_tointeger_'
2014-04-29 17:06:05 -03:00
Roberto Ierusalimschy
ffa43df3cd
'setnvalue' -> 'setfltvalue' (for consitency with 'fltvalue')
2014-04-29 15:14:16 -03:00
Roberto Ierusalimschy
9c4398de8f
'for' loop tries to convert limit to integer when initial value and
...
step are integers
2014-04-29 15:11:57 -03:00
Roberto Ierusalimschy
a0d4f0fc8a
template for 'mkstemp' is configurable (via LUA_TMPNAMTEMPLATE)
2014-04-29 14:05:13 -03:00
Roberto Ierusalimschy
68616c6669
using lua_Unsigned (instead of lua_Integer) for bit manipulation
2014-04-27 11:42:26 -03:00
Roberto Ierusalimschy
e98ba351ce
n^-m gives float result (instead of error)
2014-04-27 11:41:11 -03:00
Roberto Ierusalimschy
cbe4998bc2
'math.random(n,m)' interval restricted in size, to avoid using conversion
...
between 'double' and 'unsigned' (which can be slow and unreliable)
2014-04-17 13:09:40 -03:00
Roberto Ierusalimschy
0172c9552c
comment
2014-04-17 11:41:11 -03:00
Roberto Ierusalimschy
3d4913f703
back to larger sizes for 'dumpint/undumpint' (small Lua should
...
be able to dump/undump long-long integers)
2014-04-16 15:48:31 -03:00
Roberto Ierusalimschy
c27ef1b79c
correct integer limits for Windows + small adjustments for short
...
option
2014-04-16 15:45:51 -03:00
Roberto Ierusalimschy
4422b97472
keep 'luaL_checkversion_' with its signature in version 5.2, for
...
correct error messages in case of version mixings
2014-04-15 15:25:49 -03:00
Roberto Ierusalimschy
2f02d264e9
initial '*' in 'io.read' formats is deprecated
2014-04-15 13:46:45 -03:00
Roberto Ierusalimschy
037a70dfea
cast_u2s/cast_s2u renamed l_castS2U/l_castU2S to be configurable from
...
outside (mostly for testing)
2014-04-15 13:32:49 -03:00
Roberto Ierusalimschy
8f961da3db
macros cast_integer/cast_unsigned replaced by cast_u2s/cast_s2u, that
...
should be used only between lua_Integer and lua_Unsigned
2014-04-15 11:29:30 -03:00
Roberto Ierusalimschy
5c46b7b8cf
instructions in 'runC' sorted alphabetically + new instructions
...
'tointeger'/'tounsigned'
2014-04-14 15:42:44 -03:00
Roberto Ierusalimschy
a2c094fe2d
size of strings in 'string.rep' should be limited by the size of
...
lua_Integer, not of 'int'
2014-04-14 13:59:46 -03:00
Roberto Ierusalimschy
f767f29d87
using predefined limits (instead of computing min/max values for each
...
type) + some comments
2014-04-14 13:58:54 -03:00
Roberto Ierusalimschy
675530c4d8
maximum size of array part of a table now is restricted not only by
...
the size of an 'int', but also by the size of a 'lua_Integer'
2014-04-13 18:11:19 -03:00
Roberto Ierusalimschy
ab964ad7c6
new macro LUA_MAXUNSIGNED + support for 'short' integers (for tests only)
2014-04-12 11:51:53 -03:00
Roberto Ierusalimschy
ef789d4161
new global macro 'LUA_MAXUNSIGNED'
2014-04-12 11:45:10 -03:00
Roberto Ierusalimschy
b390d7c168
detail (avoid "casting down" in case lua_Integer is smaller than int)
2014-04-12 11:43:50 -03:00
Roberto Ierusalimschy
218f358461
errors like 1e100 << "2" were giving wrong messages
2014-04-11 17:17:39 -03:00
Roberto Ierusalimschy
bf06e22b6a
correct definition for 'MAX_SIZE' (using singed integers as the limit,
...
not unsigned ones) + new type 'l_uacInt'
2014-04-11 16:56:04 -03:00
Roberto Ierusalimschy
d99ffa920d
new type 'LUAI_UACINT' (result of an 'usual argument conversion' of
...
a lua_Integer)
2014-04-11 16:53:45 -03:00
Roberto Ierusalimschy
2771050dfa
'MIN/MAX_INTEGER' replaced by 'LUA_MIN/MAXINTEGER'
2014-04-11 16:02:16 -03:00
Roberto Ierusalimschy
e1daf10e4c
details in comments
2014-04-11 15:19:07 -03:00
Roberto Ierusalimschy
115fa77009
maximum size for dump of integers is size of lua_Integer (which
...
means that there is no overflows when undumping)
2014-04-10 16:45:43 -03:00
Roberto Ierusalimschy
561030c211
pack/unpack functions renamed dump/undump
2014-04-10 15:24:12 -03:00
Roberto Ierusalimschy
5336cc9d6a
math.random: use 'random' when available + changes to work correctly
...
for any integer interval (up to [minint,maxint])
2014-04-10 14:53:33 -03:00
Roberto Ierusalimschy
fdd137276b
more precision for PI + no more RADIANS_PER_DEGREE +
...
'min/maxint' -> 'min/maxinteger'
2014-04-09 14:29:46 -03:00
Roberto Ierusalimschy
a8aede68c7
new definition for 'luai_nummod' (using 'fmod')
2014-04-09 14:05:11 -03:00
Roberto Ierusalimschy
c7859a046d
using 'volatile' in 'tofloat' to ensure result has the same precision
...
(lua_Number) of other computations
2014-04-08 11:28:04 -03:00
Roberto Ierusalimschy
4a24883674
'GCmemtrav' does not need to track the entire collection, only each
...
single step individually
2014-04-04 14:01:04 -03:00
Roberto Ierusalimschy
9737832641
'int' -> 'lua_Integer' in several functions
2014-04-04 13:38:11 -03:00
Roberto Ierusalimschy
8b45d9806a
new constants 'math.maxint'/'math.minint'
2014-04-03 11:18:19 -03:00
Roberto Ierusalimschy
be52f784d9
new macros LUA_MAXINTEGER/LUA_MININTEGER
2014-04-03 11:18:02 -03:00
Roberto Ierusalimschy
144afa4d47
several changes in 'utf8.offset'
2014-04-03 10:45:09 -03:00
Roberto Ierusalimschy
007f66408d
bug: compiler can optimize away overflow check in 'table.concat'
2014-04-03 10:30:23 -03:00
Roberto Ierusalimschy
48c745a611
avoid constant overflow when shifting left signed integers until
...
their last bit
2014-04-03 10:29:24 -03:00
Roberto Ierusalimschy
3a044de5a1
new implementation for 'utf8.len'
2014-04-02 14:01:22 -03:00
Roberto Ierusalimschy
7d514af0bc
bug (in work version): comparisons should not try to convert
...
strings to numbers
2014-04-02 13:54:20 -03:00
Roberto Ierusalimschy
f61ceee708
LUAI_FUNC is being used only in header files
2014-04-02 13:44:42 -03:00
Roberto Ierusalimschy
5aeb57f11f
detail (error message for conversion from float to integer)
2014-04-01 15:55:06 -03:00
Roberto Ierusalimschy
493b3fdd65
added an 'api_check' for negative sizes in 'lua_checkstack'
2014-04-01 15:51:23 -03:00
Roberto Ierusalimschy
315c5bf7b7
bug: compiler could optimize away overflow check (+ changing indices
...
from 'int' to 'lua_Integer')
2014-04-01 15:50:34 -03:00
Roberto Ierusalimschy
607be77ec8
some details to avoid warnings
2014-04-01 11:39:55 -03:00
Roberto Ierusalimschy
0d745ed04c
more precise estimation (GCestimate) for total bytes in use after
...
a GC cycle
2014-04-01 11:06:59 -03:00
Roberto Ierusalimschy
3d1c6730da
detail ('1U' -> '1u', like other unsigned constants in the code)
2014-03-31 16:18:24 -03:00
Roberto Ierusalimschy
66b7b9b582
math.abs, math.max, and math.min work for integers, too.
2014-03-31 16:00:52 -03:00
Roberto Ierusalimschy
8ef9117924
fancier way to do sign extension
2014-03-31 15:38:26 -03:00
Roberto Ierusalimschy
ea69f17d98
macro 'tostring' is used only by 'luaV_concat'
2014-03-31 15:37:52 -03:00
Roberto Ierusalimschy
420cc62fac
missplelling in comments/function names (endianess -> endianness)
2014-03-27 12:58:05 -03:00
Roberto Ierusalimschy
1a3ebc203a
definition of LUA_REAL_* and LUA_INT_* moved to the beginning of
...
configurations
2014-03-21 11:27:16 -03:00
Roberto Ierusalimschy
2d5e2212d4
native lua_Number may be neither float nor double (in pack/unpackfloat)
2014-03-21 11:26:44 -03:00
Roberto Ierusalimschy
da4811238a
details (typos in comments)
2014-03-21 10:52:33 -03:00
Roberto Ierusalimschy
f96872a534
copyright year -> 2014
2014-03-20 16:42:35 -03:00
Roberto Ierusalimschy
738b3b64af
detail (to avoid warnings with '-O3')
2014-03-20 16:36:02 -03:00
Roberto Ierusalimschy
363b525c23
does not create library when it is deprecated
2014-03-20 16:22:16 -03:00
Roberto Ierusalimschy
469daa16ee
configuration for Lua type corresponding to 'time_t'
2014-03-20 16:18:54 -03:00
Roberto Ierusalimschy
7707f3e7c3
'posrelat' -> 'u_posrelat' (to avoid name conflict in 'one.c')
2014-03-20 11:11:00 -03:00
Roberto Ierusalimschy
16f8e44924
with 64-bit integers, file offsets do not need to be floats
2014-03-19 15:57:42 -03:00
Roberto Ierusalimschy
2f5f77788f
removed function 'luaS_eqstr' (not used anywhere)
2014-03-19 15:51:42 -03:00
Roberto Ierusalimschy
ed795d5ff4
detail (removed unused prototype)
2014-03-19 15:51:16 -03:00
Roberto Ierusalimschy
282d67d8fc
bitlib has been deprecated
2014-03-18 15:27:08 -03:00
Roberto Ierusalimschy
114d10cbc5
detail (comment)
2014-03-15 09:29:48 -03:00
Roberto Ierusalimschy
9f3f5b6f41
details
2014-03-14 13:54:08 -03:00
Roberto Ierusalimschy
a39489194e
changing prefix of configurable macros from "lua_" to "l_"
2014-03-13 17:07:18 -03:00
Roberto Ierusalimschy
a3addae036
lua_gettable and similars return type of gotten value
2014-03-12 17:57:40 -03:00
Roberto Ierusalimschy
ad40bb1181
detail in string.rep: allow large repetitions of the empty string (no
...
possibility of overflows)
2014-03-12 15:09:06 -03:00
Roberto Ierusalimschy
80fe8504f5
make all dumps/loads go trhough Load/DumpVector (so it is easier
...
to adapt the code to correct endianess, if needed)
2014-03-11 15:56:27 -03:00
Roberto Ierusalimschy
e976384213
keep chunk's headers compatible at least up to LUAC_VERSION (to be
...
able to detect correctly version mismatches)
2014-03-11 15:05:46 -03:00
Roberto Ierusalimschy
68f4ccdd00
make sure that LUAC_INT is a lua_Integer and that LUAC_NUM is
...
a lua_Number
2014-03-11 11:22:54 -03:00
Roberto Ierusalimschy
342a936599
detail (breaking too long lines)
2014-03-10 16:52:47 -03:00
Roberto Ierusalimschy
901da539e5
no need to avoid negative ints in 'LoadInt'
2014-03-10 16:50:19 -03:00
Roberto Ierusalimschy
197e249433
"indent -kr -i2 -br -brf -nut" plus a few manual formating
2014-03-10 14:56:32 -03:00
Roberto Ierusalimschy
2aff75f58e
small bug (from revision 2.80): LUA_OP* constants are not from
...
enumeration 'Opcode' (they are integers)
2014-03-09 16:21:34 -03:00
Roberto Ierusalimschy
cd12410195
new macro 'cast_void'
2014-03-07 13:19:00 -03:00
Roberto Ierusalimschy
c5bb3643ab
simpler code to read a line from a file (using 'getc' or, if present,
...
'getc_unlocked')
2014-03-06 14:12:02 -03:00
Roberto Ierusalimschy
5ff1c18a71
back with 'L' for macros 'luai_num*', but now with a new macro
...
'luai_numinvalidop' to protect constant folding
2014-03-06 13:15:18 -03:00
Roberto Ierusalimschy
99ac4a260f
'constfolding' passes a proper Lua state to 'luaO_arith'
2014-03-06 10:58:28 -03:00
Roberto Ierusalimschy
fa7e77fd38
detail ('codearith' uses 'LUA_OP*' constants instead of 'OP_*')
2014-03-06 10:39:05 -03:00
Roberto Ierusalimschy
f69e0ade19
no need to store a full 'size_t' fo the size of (frequent) small strings
2014-03-01 12:18:44 -03:00
Roberto Ierusalimschy
99a1c06ea3
more regularity with vectors + sizeof computed by the macros themselves
2014-02-28 13:13:01 -03:00
Roberto Ierusalimschy
93e28031de
all chars used in binary dumps are unsigned ('lu_byte')
2014-02-28 09:25:12 -03:00
Roberto Ierusalimschy
de84b3fecb
store number of upvalues of main function in front of the dump,
...
so that undump can create initial closure before reading its prototype
2014-02-27 15:56:15 -03:00
Roberto Ierusalimschy
054179c2ff
more explicit handling of headers for binary chunks
2014-02-27 13:56:20 -03:00
Roberto Ierusalimschy
986c11daa6
removal of weird construction in definition of LUA_STRFTIMEOPTIONS
...
(two empty strings concatenated as in "" "")
2014-02-26 12:55:58 -03:00
Roberto Ierusalimschy
c6c41e85b2
more uniformity for defining system-dependent features
2014-02-26 12:27:56 -03:00
Roberto Ierusalimschy
87c930676f
detail (comments)
2014-02-26 09:39:30 -03:00
Roberto Ierusalimschy
11e762dbcd
added macro MAX_UINTEGER
2014-02-26 09:38:43 -03:00
Roberto Ierusalimschy
5c9cb5f0b1
detail (comment)
2014-02-26 09:38:18 -03:00
Roberto Ierusalimschy
fed236ca7f
detail (unknown lines are marked as -1, not 0)
2014-02-25 11:31:16 -03:00
Roberto Ierusalimschy
295f7ac04e
added 'stip' parameter to lua_dump/string.dump
2014-02-25 11:30:21 -03:00
Roberto Ierusalimschy
6318de80d3
added 'strip' parameter to lua_dump/string.dump
2014-02-25 11:30:21 -03:00
Roberto Ierusalimschy
5715de344f
'read_all' does not need to grow buffer, as 'luaL_prepbuffsize'
...
already does that
2014-02-21 11:39:50 -03:00
Roberto Ierusalimschy
c86b9da022
userdata can have any Lua value as uservalue
2014-02-19 10:52:42 -03:00
Roberto Ierusalimschy
a4c6dcf999
detail (better error messages for light userdata)
2014-02-19 10:48:53 -03:00
Roberto Ierusalimschy
3f78de256e
no need to keep threads in a different GC list, now that there is the
...
'twups' list
2014-02-18 10:46:26 -03:00
Roberto Ierusalimschy
d764cc5522
new list 'twups' to allow traversal of upvalues from dead threads
...
(+ fixed some problems with cycles involving those upvalues)
2014-02-18 10:39:37 -03:00
Roberto Ierusalimschy
ffa96d988d
field 'op' renamed to 'open'
2014-02-15 11:12:01 -02:00
Roberto Ierusalimschy
6a24bd17a8
no more second result from 'collectgarbage"count"' (as Lua seldom
...
will need lua_Number to be an integer)
2014-02-14 14:45:38 -02:00
Roberto Ierusalimschy
1cce3e6842
change in the way 'collectgarbage("step", size)' interprets 'size'
...
(mimicking the way the GC itself behaves when Lua allocates 'size'
Kbytes)
2014-02-14 14:43:14 -02:00
Roberto Ierusalimschy
0b04c561f5
new syntax for Unicode escape '\u{012F}'
2014-02-14 13:23:51 -02:00
Roberto Ierusalimschy
90b0ac6495
limit to 'gcstepmul' imposed by 'lua_gc' (+ some details in 'lgc.c')
2014-02-13 15:25:20 -02:00
Roberto Ierusalimschy
de3b1c9b53
better control for number of finalizers called at each GC cycle
...
(increases progressively)
2014-02-13 12:46:38 -02:00
Roberto Ierusalimschy
733c58595b
no more local collection
2014-02-13 10:11:34 -02:00
Roberto Ierusalimschy
4a1ed6e6e5
new field '__name' in metatables to help better error messages
2014-02-11 15:39:15 -02:00
Roberto Ierusalimschy
6b30774469
detail (better presentation for 'luaC_step')
2014-02-11 10:28:47 -02:00
Roberto Ierusalimschy
ba3586cc90
keep a single list of objects to be finalized (with local and non-local
...
objects), to ensure finalization order
2014-02-11 10:18:12 -02:00
Roberto Ierusalimschy
68df7c6279
added proper headers for a standard lib file
2014-02-06 18:03:24 -02:00
Roberto Ierusalimschy
19ad78d713
C++ needs casts for arithmetic with enums
2014-02-06 17:55:55 -02:00
Roberto Ierusalimschy
6ccf150039
new library: utf8
2014-02-06 15:32:33 -02:00
Roberto Ierusalimschy
4ea60463f5
UTF-8 encoding exported as format '%U' in 'lua_pushfstring'
2014-02-06 13:59:24 -02:00
Roberto Ierusalimschy
d438e1379d
insertion of ".0" in floats with integer values done by "luaL_tolstring",
...
not by the core
2014-02-05 17:14:53 -02:00
Roberto Ierusalimschy
1721d09ac8
still accepts initial '=' for expressions, for compatibility with old
...
versions (and old habits...)
2014-02-05 12:22:55 -02:00
Roberto Ierusalimschy
2f3da00e51
added support for UTF-8 escapes
2014-02-04 16:57:34 -02:00
Roberto Ierusalimschy
5a73e3ad9e
simpler way to create messages for errors in escape sequences
2014-01-31 13:14:22 -02:00
Roberto Ierusalimschy
86dd8bf3f5
no more 'L' in macros "luai_num*" (several places that use those macros
...
cannot throw errors anyway...)
2014-01-27 11:34:32 -02:00
Roberto Ierusalimschy
67c5de9283
comment
2014-01-27 11:28:45 -02:00
Roberto Ierusalimschy
0a850e641d
larger limit + better error messages for loop detection in inheritance
2014-01-22 18:02:04 -02:00
Roberto Ierusalimschy
916bd874ad
added explicit default options to string.pack/unpack functions
2014-01-09 14:21:28 -02:00
Roberto Ierusalimschy
cd848cab6b
first implementation for string.pack/unpackfloat + try not to assume
...
that chars have 8 bits
2014-01-08 16:34:34 -02:00
Roberto Ierusalimschy
29256e8960
first implementation of string.packint/string.unpackint
2014-01-05 12:05:58 -02:00
Roberto Ierusalimschy
438c534ff4
'arg' arguments (previously called 'narg', 'nArg', 'numArg', etc.)
...
renamed all to 'arg'
2014-01-05 12:04:46 -02:00
Roberto Ierusalimschy
1ea2d20f74
first implementation of '<<', '>>', and '~' (bitwise not)
2013-12-30 18:47:58 -02:00
Roberto Ierusalimschy
f5133aa1a5
small change in handling of unary operations
2013-12-18 16:44:42 -02:00
Roberto Ierusalimschy
c0edab0f6d
first implementation of bitwise operators '&' (band), '|' (bor),
...
and '~' (bxor)
2013-12-18 12:12:03 -02:00
Roberto Ierusalimschy
a948054a19
new order for binary operations (grouping them by type of result)
2013-12-16 17:06:52 -02:00
Roberto Ierusalimschy
a8f8c7fd80
integer exponentiation with negative exponent is invalid
2013-12-16 12:30:22 -02:00
Roberto Ierusalimschy
1a19893d6f
new "calculator mode"; no need to add '=' to print expressions
2013-12-16 12:27:17 -02:00
Roberto Ierusalimschy
88e23f508c
details
2013-12-13 13:42:08 -02:00
Roberto Ierusalimschy
c8585efc78
use goto to implement a tail call in 'reallymarkobject'
2013-12-13 13:17:00 -02:00
Roberto Ierusalimschy
16493b777f
'lua_sethook' returns void
2013-12-09 12:21:10 -02:00
Roberto Ierusalimschy
cac1ebd1e0
detail ('ttisuserdata' renamed to 'ttisfulluserdata')
2013-12-04 10:15:22 -02:00
Roberto Ierusalimschy
73c5515e00
details (comments)
2013-11-21 15:23:14 -02:00
Roberto Ierusalimschy
e34c35abcf
new bug: Resuming the running coroutine makes it unyieldable
2013-11-08 16:23:16 -02:00
Roberto Ierusalimschy
7a8eb83b4a
bug: attempting to resume the running coroutine makes it unyieldable
2013-11-08 16:16:33 -02:00
Roberto Ierusalimschy
ab5fa213b3
added patch for last bug
2013-11-08 15:45:10 -02:00
Roberto Ierusalimschy
39929384c6
new macro 'luai_userstateclose' (to test it is being called correctly)
2013-11-08 15:36:05 -02:00
Roberto Ierusalimschy
de7cf8e63a
bug: should call 'luai_userstateclose' only when 'luai_userstateopen'
...
has been called before
2013-11-08 15:34:22 -02:00
Roberto Ierusalimschy
124598917f
"./?/init.lua" added to default path
2013-10-10 12:45:03 -03:00
Roberto Ierusalimschy
c5fcba1a17
detail (changing some names of macros)
2013-10-07 11:20:31 -03:00
Roberto Ierusalimschy
4c6dfc342b
CallInfo lists shrinks together with their associated stacks
2013-09-17 12:40:06 -03:00
Roberto Ierusalimschy
686e57cf9c
GC local pause configurable
2013-09-13 13:21:52 -03:00
Roberto Ierusalimschy
06156e7575
detail (setmetatable do not need to use a back GC barrier)
2013-09-11 17:15:31 -03:00
Roberto Ierusalimschy
2e2c109daf
type of 'refcount' changed to lu_mem (to ensure there will be no
...
overflows)
2013-09-11 12:17:00 -03:00
Roberto Ierusalimschy
6ca7b63bce
check for shrinking string table done only at the end of a GC cycle
2013-09-11 11:56:15 -03:00
Roberto Ierusalimschy
4eeb1831be
new names and better order for GC states (sweep first lists that
...
can have dead objects)
2013-09-11 11:47:08 -03:00
Roberto Ierusalimschy
dd373a8f66
threads are kept in a separated GC list, linked after the main thread
2013-09-11 11:09:55 -03:00
Roberto Ierusalimschy
7061fe1d56
detail: 'sweepstep' checks end of phase after calling 'sweeplist', so
...
that phases with small lists return 0 at the first call to 'sweepstep'
2013-09-11 10:24:55 -03:00
Roberto Ierusalimschy
d8aa8dd97e
objects in list 'tobefnz' have a GC life-cycle like all others
...
(specifically they are cleaned during sweep phase)
2013-09-11 09:47:48 -03:00
Roberto Ierusalimschy
1150873447
'luaC_newobj' does not handle special cases; only special case
...
now is threads, which do not use 'luaC_newobj' anymore.
2013-09-11 09:26:14 -03:00
Roberto Ierusalimschy
79ab21be90
more invariants added to memory check
2013-09-11 09:26:14 -03:00
Roberto Ierusalimschy
d3bbb34c24
back to open hashing for the string table (but with a different
...
'hnext' field, to strings are still collected like all other
objects)
2013-09-05 16:31:49 -03:00
Roberto Ierusalimschy
0ad15fc100
better (and correct!) control of 'maybedead'
2013-09-04 12:34:24 -03:00
Roberto Ierusalimschy
aeff4f79fa
local collection now calls finalizers
2013-09-03 12:37:10 -03:00
Roberto Ierusalimschy
1bf4faec64
new GC state to sweep 'localgc' list + small changes in sweep control
2013-08-30 16:14:26 -03:00
Roberto Ierusalimschy
8ef9e8460e
bug (GC can collect long identifier during parser) + change (using
...
a single constant table for all functions in a chunk)
2013-08-30 13:01:37 -03:00
Roberto Ierusalimschy
4f292d753c
bug: GC can collect a long string still in use during parser
2013-08-30 12:51:12 -03:00
Roberto Ierusalimschy
26629d0af1
details (a few casts moved from macro invocation to macro definition)
2013-08-29 10:49:57 -03:00
Roberto Ierusalimschy
b5e75fde4e
bug: local collection must clear rest of stack
2013-08-29 10:34:16 -03:00
Roberto Ierusalimschy
9a871dd3db
tables and userdata all go to local list, too
2013-08-28 15:30:26 -03:00
Roberto Ierusalimschy
90972ff136
LOCALBLACK changed to LOCALMARK and used also to control whether object
...
is in 'localgc' list + luaC_newobj by default puts object in 'localgc'
list
2013-08-27 17:04:00 -03:00
Roberto Ierusalimschy
af35c7f398
upvalues collected by reference count
2013-08-27 15:53:35 -03:00
Roberto Ierusalimschy
742b7377d3
Lua closures go to local, too
2013-08-26 09:41:10 -03:00
Roberto Ierusalimschy
50955e27f5
C functions and strings now go to the local list; first version
...
of the local collector
2013-08-23 10:34:54 -03:00
Roberto Ierusalimschy
33c49f7fa0
some details over new implementation of string table
2013-08-22 12:21:48 -03:00
Roberto Ierusalimschy
0df6635711
"fixed" objects kept in a separated list (instead of being kept in
...
'allgc' list with a bit marking them)
2013-08-21 17:09:51 -03:00
Roberto Ierusalimschy
ae800656c9
change in string table: string table is now independent of GC lists; all
...
strings live in 'normal' GC lists
2013-08-21 16:21:16 -03:00
Roberto Ierusalimschy
8c68863960
initial size of string table (MINSTRTABSIZE) should be large enough
...
to hold all strings needed by an empty Lua state
2013-08-21 16:02:30 -03:00
Roberto Ierusalimschy
8f6b80aa1d
GC bits SEPARATED and FINALIZEDBIT mixed in FINALIZEDBIT (with simpler
...
control)
2013-08-20 14:46:34 -03:00
Roberto Ierusalimschy
9eff921f8f
"barrier" for link prototype->cache changed to be consistent with
...
GC behavior (link is cleared to preserve invariant)
2013-08-19 11:18:43 -03:00
Roberto Ierusalimschy
8e6b7ef9ab
new function 'isgclocal' + test for GC consistency of prototype's caches
2013-08-19 11:16:33 -03:00
Roberto Ierusalimschy
caceeab750
'next' field for tables changed from pointer to integer (for better
...
alignment on 64-bit machines)
2013-08-18 13:12:18 -03:00
Roberto Ierusalimschy
3991312b94
details
2013-08-16 16:02:31 -03:00
Roberto Ierusalimschy
439d74e29f
added 'local' bit (true => object is only refered by local variables)
2013-08-16 15:55:49 -03:00
Roberto Ierusalimschy
3679d33b02
barrier conditions rewritten to test first 'isblack' and then 'iswhite'
...
(during a pause all objects are white, so 'isblack' fails much more
often than 'iswhite')
2013-08-13 14:36:44 -03:00
Roberto Ierusalimschy
78b941039d
change to allow collector to stop when it goes to the atomic phase
...
(just for debugging)
2013-08-07 12:39:09 -03:00
Roberto Ierusalimschy
623e388bb4
double-linked list of all upvalues elliminated and changed to a
...
traversal of all non-marked threads
2013-08-07 09:18:11 -03:00
Roberto Ierusalimschy
677d90165f
no more generational collection !!!
2013-08-05 13:58:28 -03:00
Roberto Ierusalimschy
4244da96bf
'debug.subtype' -> 'math.type' (to distinguish integers and floats)
2013-07-22 13:05:53 -03:00
Roberto Ierusalimschy
fcf99bf788
'math.isfloat' replaced by 'debug.subtype'
2013-07-10 17:57:05 -03:00
Roberto Ierusalimschy
98d76cdcae
bug: Wrong error message in some short-cut expressions
2013-07-10 17:32:36 -03:00
Roberto Ierusalimschy
2f8c51a552
use unsigneds for unary minus, too
2013-07-10 14:15:12 -03:00
Roberto Ierusalimschy
b5f5fcd782
use different constants (instead of different values for the same constant)
...
to define number sizes (LUA_INT_INT/LUA_INT_LONG/LUA_INT_LONGLONG and
LUA_REAL_FLOAT/LUA_REAL_DOUBLE/LUA_REAL_LONGDOUBLE) + use __int64 and
I64 instead of long long (and ll) for Windows
2013-07-09 15:31:35 -03:00
Roberto Ierusalimschy
2ef9bcfd11
avoid undefined shift of LUA_NBITS in rotate operation
2013-07-09 15:31:01 -03:00
Roberto Ierusalimschy
5fa680d47f
no need for type 'b_uint' (lua_Unsigned must have at least 32 bits)
2013-07-09 14:49:50 -03:00
Roberto Ierusalimschy
48735da0d0
When loading a file, Lua may call the reader function again after
...
it returned end of input + luac listings choke on long strings
2013-07-05 15:02:28 -03:00
Roberto Ierusalimschy
2b4bd21585
'tonumber': base must be a number
2013-07-05 11:39:15 -03:00
Roberto Ierusalimschy
beff5b078a
'tonumber': does not accept numbers when given a base + convertion from
...
strings to numbers with a base moved to a separated function (more
modular)
2013-07-05 11:35:49 -03:00
Roberto Ierusalimschy
5519c98655
'lua_cvtonum' -> 'lua_strtonum'; converts only strings to numbers
2013-07-05 11:29:51 -03:00
Roberto Ierusalimschy
cbe164191c
new function 'ifloor'
2013-07-03 14:23:19 -03:00
Roberto Ierusalimschy
66d046833d
no need to check "bad conversion number->int;" in luaL_checkversion,
...
as now Lua does not use tricks for the conversion, but there is a
need to check the sizes of number types, as they can be different
in two modules
2013-06-27 15:32:33 -03:00
Roberto Ierusalimschy
15fdbd26fe
'numbits' moved from 'math' to 'debug' library
2013-06-25 16:37:00 -03:00
Roberto Ierusalimschy
2b4975dca7
LUA_SMALL_* changed to LUA_*SIZE + added support for long double + better
...
support for ANSI systems
2013-06-25 16:04:40 -03:00
Roberto Ierusalimschy
e39da66c8c
macro 'lua_strx2number' does not need to be global
2013-06-25 15:58:32 -03:00
Roberto Ierusalimschy
483c2ccd0f
avoid using raw representation of numbers for hashing, as number may
...
not use all its space (e.g., long double can have sizeof=12 but
use only 10 bytes)
2013-06-25 15:57:18 -03:00
Roberto Ierusalimschy
982aa7058f
'luaL_len' returns lua_Integer instead of 'int'
2013-06-25 11:05:26 -03:00
Roberto Ierusalimschy
80cdf39d0e
avoid using 'modf' in the implementation of 'math.modf', to avoid
...
problems with 'double*'. (When using 'float' as lua_Number,
'float*' is not compatible with 'double*'...)
2013-06-25 11:02:18 -03:00
Roberto Ierusalimschy
45f3797a5b
'long' may have more than 32 bits in some machines; use 'int' for
...
small lua_Integer unless necessary to use 'long'
2013-06-21 14:42:28 -03:00
Roberto Ierusalimschy
de6e5a5919
small bugs uncovered in a 64-bit machine (where 'long' has 64 bits)
2013-06-21 14:27:24 -03:00
Roberto Ierusalimschy
81102d3689
try to avoid warnings when converting int to pointer
2013-06-20 18:59:13 -03:00
Roberto Ierusalimschy
6579bd4190
reorganization of warnings + update of explicit dependencies (gcc -MM)
2013-06-20 15:56:51 -03:00
Roberto Ierusalimschy
f45177f2d3
In the table that hashes constants, use a light userdata as keys
...
to integer values to avoid collisions with floats with the same
numerical value
2013-06-20 14:37:31 -03:00
Roberto Ierusalimschy
d6f5fb2d2c
avoid warning for unary minus over an unsigned value
2013-06-20 12:12:43 -03:00
Roberto Ierusalimschy
7c4cc505db
added "reasonable" limit for 'string.rep' (otherwise it is too easy
...
to crash the machine)
2013-06-20 12:06:51 -03:00
Roberto Ierusalimschy
453450d687
new macro 'l_floor' (allows 'floorf' even when other math operations
...
do not have an 'f' variant)
2013-06-20 12:02:49 -03:00
Roberto Ierusalimschy
55f566bd22
use lua_Integer for integer parameters to avoid truncation
2013-06-19 11:29:01 -03:00
Roberto Ierusalimschy
130c0e40e0
new constant 'MAX_SIZE', distinct from 'MAX_SIZET', for sizes visible
...
from Lua; these must fit in a lua_Integer
2013-06-19 11:27:00 -03:00
Roberto Ierusalimschy
c72fb1cf8e
detail (removed 'assert')
2013-06-14 17:46:40 -03:00
Roberto Ierusalimschy
138e69cc55
correct error message for floating-point values out of (integer) range
2013-06-14 15:34:49 -03:00
Roberto Ierusalimschy
53210d7e5b
correct way (I hope) to convert floats to unsigned int
2013-06-14 15:32:45 -03:00
Roberto Ierusalimschy
0394314c7a
avoid using a negative value to test 'lua_tounsigned'
2013-06-14 15:12:53 -03:00
Roberto Ierusalimschy
0beeb4f6fa
configuration of number sizes goes "mainstream"
2013-06-13 16:35:08 -03:00
Roberto Ierusalimschy
788b251157
'math.random' operates with integers when used for integer results
...
(1 or 2 parameters)
2013-06-13 16:32:52 -03:00
Roberto Ierusalimschy
318575627f
avoid adding '.0' to "numbers" like "nan" and "inf"
2013-06-07 16:02:05 -03:00
Roberto Ierusalimschy
a14992992a
new version (5.3)
2013-06-07 16:01:50 -03:00
Roberto Ierusalimschy
48adb6984c
'io.write' writes integers directly (and correctly)
2013-06-07 16:01:35 -03:00
Roberto Ierusalimschy
c5069528e1
details ('Type* id' -> 'Type *id')
2013-06-07 11:51:10 -03:00
Roberto Ierusalimschy
6fb0b11350
string contatenation handles conversion of integers to strings +
...
floats always format as floats (with decimal dot or exponent)
2013-06-04 16:36:42 -03:00
Roberto Ierusalimschy
932e7fb0e1
'lua_tounsigned' takes number modulo 2^numbits as a result when
...
number is a float
(That may change...)
2013-06-04 16:34:51 -03:00
Roberto Ierusalimschy
188192ce9a
'luai_hashnum' "inlined" into 'hashfloat'
2013-05-29 11:05:03 -03:00
Roberto Ierusalimschy
fc083f1138
removed all tricks for conversions + 'luai_hashnum' moved to ltable.c
2013-05-29 11:04:15 -03:00
Roberto Ierusalimschy
ee865b9fe7
new implementation for 'lua_strx2number' to correct small
...
problems with numbers like 0x10000...000p-100
2013-05-27 14:42:38 -03:00
Roberto Ierusalimschy
d630daca1a
"legal" way to convert a float to an integer in C
2013-05-27 09:43:37 -03:00
Roberto Ierusalimschy
8c883cb4e8
'objlen' can return integers
2013-05-26 11:47:51 -03:00
Roberto Ierusalimschy
c75cca0559
detail (case '%d' of 'luaO_pushvfstring' should use integers)
2013-05-26 11:43:35 -03:00
Roberto Ierusalimschy
1414b7123c
support for the case when 'l_mathop' does not conform to lua_Number
...
(problem with pointers to lua_Number solved by a typedef selected
automatically by 'l_mathop')
2013-05-26 10:45:24 -03:00
Roberto Ierusalimschy
3563b3f519
first version of control for number sizes (still in 'local' section)
2013-05-26 10:35:52 -03:00
Roberto Ierusalimschy
d46ed54646
no more IEEE tricks
2013-05-26 10:26:34 -03:00
Roberto Ierusalimschy
e2c8c756ee
removed 'IEEE tricks' (should not be needed in Lua with integers)
2013-05-23 18:27:06 -03:00
Roberto Ierusalimschy
5ca5086c19
'tonumber' now works with integers too
2013-05-16 15:35:57 -03:00
Roberto Ierusalimschy
2d6a0ae149
added patch to last bug
2013-05-16 13:03:50 -03:00
Roberto Ierusalimschy
b5ec26101f
new API function 'lua_cvtonum' to convert a value (number or string)
...
to a number, following the rules of the language to create integers
or floats
2013-05-14 13:00:11 -03:00
Roberto Ierusalimschy
36e8771076
'luaO_str2int' more generic: accepts white spaces around the numeral
...
and handles signal
2013-05-14 12:59:04 -03:00
Roberto Ierusalimschy
27f09415e3
new read format "*i" for reading integers
2013-05-14 12:57:43 -03:00
Roberto Ierusalimschy
4ad9970649
uses integers for time
2013-05-14 12:57:11 -03:00
Roberto Ierusalimschy
bef345a4b8
bug: Wrong error message in some short-cut expressions
2013-05-13 13:17:47 -03:00
Roberto Ierusalimschy
0ce3018109
'pushnum' pushes a "number" (float) + new C instruction 'pushint'
2013-05-07 16:01:16 -03:00
Roberto Ierusalimschy
0233ce0815
new function 'math.numbits' (not a final decision)
2013-05-06 14:22:55 -03:00
Roberto Ierusalimschy
1f2b82bf25
correct way to avoid compile-time errors in integer divisions
2013-05-06 14:22:16 -03:00
Roberto Ierusalimschy
f2043b7a58
correct error message for conversion errors from float to int
2013-05-06 14:21:59 -03:00
Roberto Ierusalimschy
2b1c2c61b0
bug: Wrong assert when reporting concatenation errors.
2013-05-06 14:21:28 -03:00
Roberto Ierusalimschy
fa6ea831b3
macro 'nvalue' removed (direct conversion from integer to double,
...
without an intermediate variable, can cause "excessive precision"
2013-05-06 14:17:09 -03:00
Roberto Ierusalimschy
b22a4280c6
macro 'nvalue' removed + cast to void added to avoid warnings
...
with 'clang'
2013-05-06 14:17:09 -03:00
Roberto Ierusalimschy
29fe3abda2
new function 'math.isfloat'
2013-05-02 14:31:54 -03:00
Roberto Ierusalimschy
6347004be9
stack overflow in vararg functions + garbage collector in recursive loops
2013-05-02 13:13:27 -03:00
Roberto Ierusalimschy
67532d5a10
constant folding and API arithmetic with integers
2013-05-02 09:37:24 -03:00
Roberto Ierusalimschy
6920a7f2e3
new macro 'intop' (to perform integer arithmetic on unsigned types)
2013-05-02 09:31:26 -03:00
Roberto Ierusalimschy
88bf2f83c0
new function 'tointeger' + 'luaV_arith' replaced by 'luaT_trybinTM'
2013-04-29 14:12:50 -03:00
Roberto Ierusalimschy
8fff05f6d0
integer division operates only on integers
2013-04-29 14:12:12 -03:00
Roberto Ierusalimschy
9b9becf384
added 'const' to parameters of 'luaG_concaterror'
2013-04-29 13:58:10 -03:00
Roberto Ierusalimschy
00744a2729
'luaO_arith' -> 'luaO_numarith'
2013-04-29 13:57:48 -03:00
Roberto Ierusalimschy
b4be507578
new function 'luaT_trybinTM'
2013-04-29 13:56:50 -03:00
Roberto Ierusalimschy
360587f319
favoring 'tonumber' over 'nvalue'
2013-04-26 16:51:17 -03:00
Roberto Ierusalimschy
eee51492e2
dumping and undumping integers
2013-04-26 15:48:35 -03:00
Roberto Ierusalimschy
c37b7b3cca
bug: garbage collector can trigger too many times in recursive loops,
...
because it was not computing the size of CallInfo structures in threads
2013-04-26 15:26:49 -03:00
Roberto Ierusalimschy
f79584faca
detail
2013-04-26 13:06:53 -03:00
Roberto Ierusalimschy
4abe99dc34
new interface for 'tonumber'
2013-04-26 13:03:50 -03:00
Roberto Ierusalimschy
d4e6b75098
"integer" keys in tables are now lua_Integer, not 'int'.
2013-04-26 12:39:25 -03:00
Roberto Ierusalimschy
a2f5c28a80
new operation '//' (integer division)
2013-04-26 10:08:29 -03:00
Roberto Ierusalimschy
a80a2b5e56
new cast macros for lua_Integer and lua_Unsigned
2013-04-25 18:15:37 -03:00
Roberto Ierusalimschy
bb1851ce98
'for' loop uses integers when possible
2013-04-25 16:50:02 -03:00
Roberto Ierusalimschy
5951c79ae1
default increment for 'for' loop is an integer (1, not 1.0)
2013-04-25 16:35:19 -03:00
Roberto Ierusalimschy
e381c582de
integer handling for order comparisons, power, and modulo operations
2013-04-25 16:12:41 -03:00
Roberto Ierusalimschy
9600c60df3
functions 'get_equalTM' and 'call_orderTM' moved to other files
...
to make 'lvm.c' smaller
2013-04-25 13:07:52 -03:00
Roberto Ierusalimschy
32bf6c9b27
functions 'traceexec', 'callTM', and 'call_binTM' moved to other
...
files to make 'lvm.c' a little smaller
2013-04-25 12:59:42 -03:00
Roberto Ierusalimschy
9c43d6a24e
new format "%I" in 'lua_pushfstring' for lua_Integer
2013-04-25 10:53:13 -03:00
Roberto Ierusalimschy
01b6fe0cbf
new API function 'lua_isinteger'
2013-04-25 10:52:49 -03:00
Roberto Ierusalimschy
944709c77b
more definitions to support integer formatting
2013-04-25 10:52:13 -03:00
Roberto Ierusalimschy
52cb90ec75
detail
2013-04-24 16:41:48 -03:00
Roberto Ierusalimschy
fa3b126a23
BUG: stack overflow in vararg functions with many fixed
...
parameters called with few arguments
2013-04-19 18:05:04 -03:00
Roberto Ierusalimschy
1294b09d8e
first implementation of literal integers (no constant folding yet)
2013-04-16 15:46:28 -03:00
Roberto Ierusalimschy
d4f0c4435d
a few more operations supporting integers (minus, umin, mult)
2013-04-16 15:43:05 -03:00
Roberto Ierusalimschy
44358e0206
extra trim applied to 'replace' argument (in case lua_Unsigned is
...
larger than 32 bits)
2013-04-16 15:39:37 -03:00
Roberto Ierusalimschy
07f861385e
first steps in the support of integers: basic representation + table indexing + basic API ops (tointeger/pushinteger) + equality + a few extra stuff
2013-04-15 12:44:46 -03:00
Roberto Ierusalimschy
7a543cfae6
2013-04-15 12:43:34 -03:00
Roberto Ierusalimschy
24689927f2
dependencies updated (with 'gcc -MM')
2013-04-15 11:13:38 -03:00
Roberto Ierusalimschy
8f8665fffa
'ttypenv' -> 'ttnov'
2013-04-12 16:07:09 -03:00
Roberto Ierusalimschy
49c1607157
_FILE_OFFSET_BITS usually also needs _LARGEFILE_SOURCE + easier to
...
use default definition for 'l_fseek' in ansi systems
2013-04-11 15:34:06 -03:00
Roberto Ierusalimschy
c8e96d6e91
logic for checking mode for 'fopen' moved to macro 'lua_checkmode'
2013-03-21 10:57:27 -03:00
Roberto Ierusalimschy
af8efcc762
detail (avoid unnecessary "unconst" in cast)
2013-03-21 10:54:57 -03:00
Roberto Ierusalimschy
3f6f78ea0b
detail (error message)
2013-03-20 16:40:07 -03:00
Roberto Ierusalimschy
e3a7104b40
detail (avoiding warnings)
2013-03-19 10:19:12 -03:00
Roberto Ierusalimschy
76492b4bb2
macro 'lua_checkmode' + typos in comments
2013-03-16 18:10:18 -03:00
Roberto Ierusalimschy
75250a237c
typos in comments
2013-03-16 18:10:18 -03:00
Roberto Ierusalimschy
437a49be5e
cast to avoid warnings
2013-03-15 15:33:36 -03:00
Roberto Ierusalimschy
4f0c716c8e
added two more commented warning options (just to know about them)
2013-03-15 11:00:08 -03:00
Roberto Ierusalimschy
70b0ee6310
export 'lua_ident' to avoid it being removed by C++ linker
2013-03-15 10:04:22 -03:00
Roberto Ierusalimschy
8830901a9c
second parameter to 'ldexp' is an integer
2013-03-07 15:21:32 -03:00
Roberto Ierusalimschy
15a3738b49
no need to handle 0 as a special case in 'table.remove'
2013-03-07 15:17:24 -03:00
Roberto Ierusalimschy
a83ed55f1e
added 'return' (when possible) to calls to error functions
2013-02-21 10:44:53 -03:00
Roberto Ierusalimschy
b559aed2d3
'l_tg' was renamed to 'l_mathop' and this use was not corrected at
...
the time
2013-02-20 11:08:56 -03:00
Roberto Ierusalimschy
d0c038da07
typo in comment
2013-02-20 11:08:21 -03:00
Roberto Ierusalimschy
db424053e8
new release number + copyright year
2013-02-19 15:39:04 -03:00
Roberto Ierusalimschy
ad56721948
details (5.2 corrected to 5.2.0)
2013-02-07 13:57:47 -02:00
Roberto Ierusalimschy
f4e762f688
better error checking for 'table.insert' and 'table.remove'
2013-02-06 16:29:03 -02:00
Roberto Ierusalimschy
1ce57628b2
comments
2013-02-06 11:37:39 -02:00
Roberto Ierusalimschy
181a837cac
small improvement in the support of 'float' as lua_Number
2013-01-29 14:00:40 -02:00
Roberto Ierusalimschy
0730a56d38
detail
2013-01-08 12:06:55 -02:00
Roberto Ierusalimschy
eecc1491f3
added some comments
2012-12-05 17:57:00 -02:00
Roberto Ierusalimschy
7ea68d84c4
added comment
2012-12-05 17:49:55 -02:00
Roberto Ierusalimschy
0e9167bc72
missing brackets in 'if' body (no bug, only 'luaC_checkfinalizer' is
...
called to do nothing)
2012-12-05 17:09:23 -02:00
Roberto Ierusalimschy
65e31fb179
Bug: load/loadfile returns wrong result when given an environment
...
for a binary chunk with no upvalues
2012-12-03 18:18:02 -02:00
Roberto Ierusalimschy
f993771c70
avoids warning with 'clang' + comment explaining macro
2012-11-14 15:21:34 -02:00
Roberto Ierusalimschy
52f9ccd298
removed unreacheable 'lua_unlock'
2012-11-04 18:08:17 -02:00
Roberto Ierusalimschy
a799ed5af9
more precise control for GC pause (based on threshold)
2012-10-19 16:00:33 -03:00
Roberto Ierusalimschy
4082c77ff2
error message for 'bad self' includes original 'extramsg'
2012-10-19 12:55:01 -03:00
Roberto Ierusalimschy
bc84180d12
error message in 'os.rename' does not include file name, because error
...
may be caused both by 'fromname' or 'toname'
2012-10-19 12:54:02 -03:00
Roberto Ierusalimschy
ad5da6ba14
API functions get acceptable indices except when not possible (when
...
they modify the value at that index) + new macro 'ispseudo' +
specific test 'api_checkstackindex'
2012-10-19 12:52:46 -03:00
Roberto Ierusalimschy
86b39206d9
open upvalues cannot be old if thread is not old; when thread is old,
...
their list is not traversed anymore, and therefore can contain dead
elements.
2012-10-03 09:36:46 -03:00
Roberto Ierusalimschy
fdae4b9453
removed commented-out line (for debugging)
2012-10-03 09:36:17 -03:00
Roberto Ierusalimschy
84b6581287
cast to avoid warning in some compilers (size_t x unsigned int)
2012-10-02 14:41:50 -03:00
Roberto Ierusalimschy
c6b6024a9d
cast in 'luai_makeseed' now casts to needed type
2012-10-02 14:40:53 -03:00
Roberto Ierusalimschy
d58ce8106e
macro 'lua_number2unsigned' also needs proper definition if
...
lua_Number is float
2012-10-02 14:32:44 -03:00
Roberto Ierusalimschy
31f7d553e4
LUA_CORE condition removed from definition of some 'tricks' (as it
...
controlled only a few other defines) + MS_ASMTRICK renamed to
LUA_MSASMTRICK
2012-10-01 11:14:45 -03:00
Roberto Ierusalimschy
adaba04059
'pcall' may not restore previous error function when
...
inside coroutines + Check for garbage collector in function calls
does not cover all paths
2012-10-01 11:05:31 -03:00
Roberto Ierusalimschy
b157f3546e
BUG: 'pcall' may not restore previous error function when
...
inside coroutines
2012-10-01 11:05:04 -03:00
Roberto Ierusalimschy
ab7086e209
pops the string from 'get_prompt' only after using it
2012-09-29 17:07:06 -03:00
Roberto Ierusalimschy
7a3de1aba3
typo in comment
2012-09-24 19:57:26 -03:00
Roberto Ierusalimschy
8287a0db55
detail
2012-09-11 16:37:16 -03:00
Roberto Ierusalimschy
cf160abcf9
no more macro 'changenvalue'
2012-09-11 15:21:44 -03:00
Roberto Ierusalimschy
ae1d318822
small bug: generational mode is always in 'propagate' mode only
...
outside the collector: during collection of course it must go to
other modes.
2012-09-11 09:53:08 -03:00
Roberto Ierusalimschy
2038073975
more regularity for field 'fix'
2012-09-11 09:42:14 -03:00
Roberto Ierusalimschy
2dc91ca5ee
checks garbage collector every time it calls a function (as the
...
stack can grow and so allocates more memory)
2012-08-28 15:30:45 -03:00
Roberto Ierusalimschy
a3e1c40d6d
remove of unecessary luaD_checkstack. (In some cases, C should
...
ensure stack space; in others, Lua can use the extra slots for
temporary values.)
2012-08-16 14:34:28 -03:00
Roberto Ierusalimschy
c1a2a646c8
details (no need to use lua_pushfstring for plain strings)
2012-08-16 14:32:20 -03:00
Roberto Ierusalimschy
53480f1163
details (remove of some extra spaces)
2012-08-14 15:12:34 -03:00
Roberto Ierusalimschy
233eac4d3a
detail (avoid being picky about conversion from 'unsigned char'
...
to 'int')
2012-08-06 10:36:34 -03:00
Roberto Ierusalimschy
6625cbecd1
Bug: Some patterns can overflow the C stack, due to recursion
...
(Took the opportunity to refactor function 'match')
2012-07-31 14:48:42 -03:00
Roberto Ierusalimschy
4ac55997ec
typo
2012-07-13 11:54:14 -03:00
Roberto Ierusalimschy
763f84c84c
Some patterns can overflow the C stack, due to recursion.
2012-07-13 11:53:38 -03:00
Roberto Ierusalimschy
e4f609d0ee
collector in generational mode must be in 'propagate' state when
...
not running a collection
2012-07-04 12:52:38 -03:00
Roberto Ierusalimschy
5ac56a94dd
collector in generational mode should never be in 'pause' state
2012-07-02 12:38:36 -03:00
Roberto Ierusalimschy
4fc15bbfb7
major collections in generational mode are triggered by comparison with
...
the memory estimate from last major collection
2012-07-02 10:40:05 -03:00
Roberto Ierusalimschy
f7ec36ab16
comment
2012-07-02 10:37:04 -03:00
Roberto Ierusalimschy
b926472312
change in error message
2012-06-29 16:23:33 -03:00
Roberto Ierusalimschy
78d9865900
bugs: Internal Lua values may escape through the debug API +
...
Problems when yielding from debug hooks
2012-06-11 14:49:37 -03:00
Roberto Ierusalimschy
cc2a60ecb7
bugs in yields inside debug hooks
2012-06-08 12:14:04 -03:00
Roberto Ierusalimschy
43bfb60ac8
new auxiliary function 'luaI_printinst' (to print a single instruction)
2012-06-07 15:52:47 -03:00
Roberto Ierusalimschy
c510d94549
includes counts from 'sweeptolive' in cost of atomic step
2012-05-31 18:28:59 -03:00
Roberto Ierusalimschy
4dd0622d0c
bug in luaL_getsubtable (calling lua_absindex not with original stack)
2012-05-31 17:28:45 -03:00
Roberto Ierusalimschy
ab2c3d5cde
small bug in error handling of finalizers (cannot call lua_tostring
...
inside the core) + small bug in luaC_checkfinalizer (when avoiding
remove object being sweeped from sweep list) + small changes in GC
pace control (for the atomic part)
2012-05-31 17:26:14 -03:00
Roberto Ierusalimschy
01e5f358bd
small improvement in lua_checkmemory (only allow dead objects in
...
part of the sweep list not yet sweeped)
2012-05-31 17:25:42 -03:00
Roberto Ierusalimschy
69c775de21
update of 'lua_checkmemory'
2012-05-30 13:40:29 -03:00
Roberto Ierusalimschy
6fcdfc6d4f
bug: object being moved to 'finobj' list might not be sweeped by
...
the collector
2012-05-30 13:01:10 -03:00
Roberto Ierusalimschy
b77a90681e
typos in comments
2012-05-30 09:33:44 -03:00
Roberto Ierusalimschy
6efffb9acd
only count in 'atomic' objects marked for the first time
2012-05-29 14:52:17 -03:00
Roberto Ierusalimschy
51e8f08e60
more efficient way to apply 'stepmul' + some changes in GC parameters
2012-05-28 17:41:00 -03:00
Roberto Ierusalimschy
5adb5a4812
definition for 'MAX_LMEM'
2012-05-28 17:32:28 -03:00
Roberto Ierusalimschy
e29f3a5751
definition of 'GCSTEPSIZE' moved to header file + small changes
2012-05-23 12:43:14 -03:00
Roberto Ierusalimschy
21ed264a38
compensate for 'GCSTEPSIZE' in GC steps
2012-05-23 12:42:27 -03:00
Roberto Ierusalimschy
e131eb0d9a
removed debug code
2012-05-23 12:41:53 -03:00
Roberto Ierusalimschy
054c20cd5b
spaces -> tabs in #defines
2012-05-23 12:37:09 -03:00
Roberto Ierusalimschy
8e7149f496
detail ('char' should be 'const char')
2012-05-22 15:38:56 -03:00
Roberto Ierusalimschy
086da10dac
merge of fields 'lastmajormem' (used in gen. mode) and 'estimate'
...
(used in inc. mode)
2012-05-22 14:50:39 -03:00
Roberto Ierusalimschy
b36b4b521f
try to avoid sweeping new objects created with new white (and
...
therefore not collectable in the current cycle)
2012-05-22 14:32:25 -03:00
Roberto Ierusalimschy
398811a313
simpler macro 'luaC_condGC' + better 'step' in 'lua_gc' +
...
micro bug in 'luaC_checkfinalizer' (current sweep object could be
removed from 'allgc' list)
2012-05-21 10:18:10 -03:00
Roberto Ierusalimschy
2a66b34f72
revamp of the GC pace control; more like 5.1: any X Kbytes allocated
...
makes the GC handle f(X) Kbytes of objects
2012-05-20 17:36:44 -03:00
Roberto Ierusalimschy
8d0e1ed52f
extend optimization of 'if a then break end' for the case
...
'if a then break; end'
2012-05-20 11:51:23 -03:00
Roberto Ierusalimschy
3ac595da8a
allow "long double" precision for PI constant if needed
2012-05-18 14:47:53 -03:00
Roberto Ierusalimschy
ea980fdeef
removed 'stringmark' trick
2012-05-14 14:52:56 -03:00
Roberto Ierusalimschy
5654763797
macro 'checkGC' takes care of setting 'top' to limit stack live values
2012-05-14 14:50:49 -03:00
Roberto Ierusalimschy
edfa9e007d
details (header comments)
2012-05-14 10:34:18 -03:00
Roberto Ierusalimschy
31829ad177
test for whether collector is running moved from function to
...
macro 'luaC_condGC'.
2012-05-11 16:22:33 -03:00
Roberto Ierusalimschy
c2361e0b61
definition for 'LUAI_MAXSHORTLEN' moved to luaconf.h (too important)
2012-05-11 11:14:42 -03:00
Roberto Ierusalimschy
77cbd817d1
better(?) handling of '#define's for IEEE-related tricks + avoid using
...
IEEE trick for 64-bit integer types (lua_Integer on 64-bit machines)
2012-05-11 11:10:50 -03:00
Roberto Ierusalimschy
4ec7d6de95
bug: wrong handling of 'nCcalls' in coroutines
2012-05-11 11:10:28 -03:00
Roberto Ierusalimschy
f6a12948ca
useless parameter in macro 'luai_makeseed'
2012-05-11 11:06:07 -03:00
Roberto Ierusalimschy
3cadc37f47
no more 'Proto' objects on the stack. Protos are anchored on outer
...
Protos or on a Closure, which must be created before the Proto.
2012-05-08 10:53:33 -03:00
Roberto Ierusalimschy
bb1146dc39
wrong error message when 'coroutine.create' or 'coroutine.wrap' are
...
called with no arguments (new thread is assumed to be the missing
argument).
2012-04-27 15:59:04 -03:00
Roberto Ierusalimschy
fc24a3a6c4
small bug: a reader function should not modify the Lua stack
2012-04-27 11:13:19 -03:00
Roberto Ierusalimschy
a94ce68e0a
bug: wrong handling of 'nCcalls' in coroutines
2012-04-26 17:41:18 -03:00
Roberto Ierusalimschy
ec22fc963a
detail (separate code to create 'searchers' table into a new function)
2012-04-26 16:38:52 -03:00
Roberto Ierusalimschy
c54f5f64c9
primaryexp -> suffixedexp; prefixexp -> primaryexp + more 'syntactical'
...
way to distinguish between function calls and assignments
2012-04-20 16:20:05 -03:00
Roberto Ierusalimschy
4cca1a436d
details (using lua_setglobal/lua_getglobal instead of explicit
...
use of the global table)
2012-04-20 14:05:17 -03:00
Roberto Ierusalimschy
8df0198178
release 5.2.1
2012-04-20 10:18:26 -03:00
Roberto Ierusalimschy
048be9cf27
different scheme to check arguments to '%d', '%x', etc. Old scheme
...
did not work well when lua_Number is an integer.
2012-04-20 10:16:48 -03:00
Roberto Ierusalimschy
1485ea2ee7
Finalizers may call functions from a dynamic library after
...
the library has been unloaded
2012-04-12 13:25:25 -03:00
Roberto Ierusalimschy
b10dbe5c72
bug: C libraries must be unloaded after all other finalizers have run,
...
because a finalizer may use a C function from a C library
2012-04-11 13:35:32 -03:00
Roberto Ierusalimschy
462375ba47
'if' to avoid empty 'memcpy' (may be expensive)
2012-04-03 16:06:19 -03:00
Roberto Ierusalimschy
cfbe2333a4
string hash may not use all bytes (but this is configurable now) +
...
small other changes
2012-03-28 15:28:25 -03:00
Roberto Ierusalimschy
afc3fcf952
definition for 'LUA_MAXSHORTLEN' moved to 'lstring.c' (used only there)
2012-03-28 15:27:25 -03:00
Roberto Ierusalimschy
99bd1a000f
error function can be 'l_noret'
2012-03-19 19:58:09 -03:00
Roberto Ierusalimschy
3e66d3b4be
cleaner code (avoids loop with empty body)
2012-03-19 19:57:14 -03:00
Roberto Ierusalimschy
29a28693e5
'luaL_checkversion' called by 'luaL_setfuncs'
2012-03-18 13:52:49 -03:00
Roberto Ierusalimschy
678c1255c9
random seed used in the hash of all strings to avoid intentional
...
collisions
2012-02-01 19:57:15 -02:00
Roberto Ierusalimschy
a4b96ce9a3
first implementation of long strings
2012-01-25 19:05:40 -02:00
Roberto Ierusalimschy
291f564485
field 'reserved' -> 'extra' (may be used for other purposes too)
2012-01-23 21:05:51 -02:00
Roberto Ierusalimschy
9f1a8dbdd3
'eqstr' -> 'luaS_eqstr'
2012-01-23 21:05:18 -02:00
Roberto Ierusalimschy
d19f1da6ef
new macro 'isreserved' + 'eqstr' -> 'luaS_eqstr' (may be a function)
2012-01-23 21:04:07 -02:00
Roberto Ierusalimschy
f88806a1fb
"default: lua_assert(0)" in switches helps debugging + uses
...
non-variant types in binary files
2012-01-23 21:02:10 -02:00
Roberto Ierusalimschy
fb6eee2805
Lua never uses Ã'assert' (it is always 'lua_assert')
2012-01-23 20:59:02 -02:00
Roberto Ierusalimschy
0010ec68b1
documentation comment (small correction about strings being
...
gray)
2012-01-23 18:29:12 -02:00
Roberto Ierusalimschy
28f8ed9113
new macro 'checktype'
2012-01-20 20:47:11 -02:00
Roberto Ierusalimschy
fd22ccd6d0
object tag keeps variant bits too -> no need for 'isC' field in
...
Closures + more strick typing for closure variants
2012-01-20 20:05:50 -02:00
Roberto Ierusalimschy
76eab106df
bug: Lexical gets confused with some combination of arithmetic
...
operators and hexadecimal numbers
2012-01-20 16:35:36 -02:00
Roberto Ierusalimschy
81ed85ecfb
BUG: memory hoarding when creating Lua hooks for coroutines
...
BUG: Lexical gets confused with some combination of arithmetic
operators and hexadecimal numbers
2012-01-20 16:32:13 -02:00
Roberto Ierusalimschy
7dcc02b165
BUG: coroutine hooks were not collected together with coroutine
2012-01-19 18:14:44 -02:00
Roberto Ierusalimschy
e2fc2ce8df
new way to handle -E option (write a mark in the registry to avoid
...
reading environment variables)
2011-12-12 14:34:03 -02:00
Roberto Ierusalimschy
a241b6cb3c
removed redundant definition for FILEHANDLE
2011-12-08 10:11:37 -02:00
Roberto Ierusalimschy
f0d143f30f
avoid a few warnings (casts)
2011-12-07 16:03:47 -02:00
Roberto Ierusalimschy
c82087b8dd
cast from 'bool' to 'int' (for C++)
2011-12-07 12:43:55 -02:00
Roberto Ierusalimschy
138be5b843
no more explicit support for 'luaall_c': unifying file can do
...
the work
2011-12-06 14:58:36 -02:00
Roberto Ierusalimschy
e320b5b672
small bug: format '%d' for lua_Number argument
2011-12-06 14:33:55 -02:00
Roberto Ierusalimschy
ca9c405fef
some compilers (e.g., gcc C++) do not accept NULL as a pointer in
...
that context
2011-12-02 11:26:54 -02:00
Roberto Ierusalimschy
e2feb886d6
macro 'luaL_getmetatable' seems more appropriate when getting
...
metatables in registry
2011-12-02 11:25:57 -02:00
Roberto Ierusalimschy
5999e14ad9
old error messages may be misleading
2011-12-02 11:23:56 -02:00
Roberto Ierusalimschy
01747f2c24
error message: "tag method" -> "metamethod"
2011-12-02 11:18:41 -02:00
Roberto Ierusalimschy
7377fbdebc
function prototype did not match one in .h
2011-11-30 17:30:16 -02:00
Roberto Ierusalimschy
f1d2ac3a98
allow non-integer arguments to integer formats (%d, %x, etc.),
...
but check range
2011-11-30 16:24:56 -02:00
Roberto Ierusalimschy
c5da4f4cd0
unused variable removed
2011-11-30 11:03:24 -02:00
Roberto Ierusalimschy
7bcb2462e4
comments
2011-11-30 10:58:57 -02:00
Roberto Ierusalimschy
0bd99b327b
avoid "unreachable" 'break'
2011-11-30 10:44:26 -02:00
Roberto Ierusalimschy
6d8b672094
more uses of 'l_noret'
2011-11-30 10:43:51 -02:00
Roberto Ierusalimschy
e21b26a964
avoid 'return' "to avoid warnings"
2011-11-30 10:42:49 -02:00
Roberto Ierusalimschy
0f388193b3
'lUA' -> 'LUA'
2011-11-30 10:35:05 -02:00
Roberto Ierusalimschy
7948b8568e
when available, use '*_r' versions of 'gmtime' and 'localtime'
2011-11-29 15:15:42 -02:00
Roberto Ierusalimschy
61b1d9a466
another try to avoid warnings about unreachable 'return' after 'exit'
2011-11-29 13:55:51 -02:00
Roberto Ierusalimschy
3617e04e97
'lua_load' has an extra argument 'mode'
2011-11-29 13:55:08 -02:00
Roberto Ierusalimschy
8c62bde36f
comment
2011-11-29 13:54:38 -02:00
Roberto Ierusalimschy
51650eac78
small change to avoid warnings of non-specified order of access
...
to volatile fields
2011-11-29 13:39:48 -02:00
Roberto Ierusalimschy
aea68e5c54
explicit option RTLD_LOCAL instead of 0 (Posix does not fix
...
a default for dlopen)
2011-11-28 15:27:51 -02:00
Roberto Ierusalimschy
ece042fef0
'table.pack' does not return 'n' (may be confusing when
...
using table.pack as last argument in a call)
2011-11-28 15:26:30 -02:00
Roberto Ierusalimschy
217b65e6d9
avoid some warnings about converting 32-bit shifts into 64-bit results
2011-11-28 15:25:48 -02:00
Roberto Ierusalimschy
8119374e74
avoid warnings of unreacheable 'break's
2011-11-28 15:25:16 -02:00
Roberto Ierusalimschy
3a997eefb5
MS_ASMTRICK is only valid on MS compilers (not any Windows compiler)
2011-11-25 10:52:27 -02:00
Roberto Ierusalimschy
5184ff2096
'LUA_DL_DLL' is not yet defined before the inclusion of 'lua.h'
2011-11-25 10:52:03 -02:00
Roberto Ierusalimschy
b0cbe77816
'_fseeki64' and family not available in all Windows platforms
2011-11-25 10:50:03 -02:00
Roberto Ierusalimschy
6e899850b9
details
2011-11-24 11:25:41 -02:00
Roberto Ierusalimschy
fded7bef19
options for 'collectgarbage' renamed: "inc" -> "incremental";
...
"gen" -> "generational"
2011-11-23 15:29:04 -02:00
Roberto Ierusalimschy
b5d7255034
small changes to avoid some warnings
2011-11-16 16:51:36 -02:00
Roberto Ierusalimschy
6cce5c0601
new function 'luaL_loadfilex'
2011-11-14 15:10:24 -02:00
Roberto Ierusalimschy
eb70f58279
'luaIO_Stream' -> 'luaL_Stream'
2011-11-14 14:55:35 -02:00
Roberto Ierusalimschy
ef900f224c
strutcture for file handles exported in 'lauxlib.h'
2011-11-11 17:59:17 -02:00
Roberto Ierusalimschy
3105febf9a
using Lua buffers to build error messages
2011-11-10 09:42:58 -02:00
Roberto Ierusalimschy
7133e20c94
make treatment of 'pcall' and 'xpcall' more similar
2011-11-09 17:38:00 -02:00
Roberto Ierusalimschy
888d39ea75
refactoring of common parts of 'pcall' and 'xpcall' + avoids
...
stack errors on these functions (return error code instead)
2011-11-09 17:28:27 -02:00
Roberto Ierusalimschy
eef22fa4ce
create error messages with a single concat, to avoid problems with
...
creating strings piecemeal
2011-11-09 17:11:20 -02:00
Roberto Ierusalimschy
eda87f1156
in 'luaL_checkstack', include extra stack space in test to allow
...
correct execution of error routines, if necessary
2011-11-09 17:08:55 -02:00
Roberto Ierusalimschy
e0e406ead3
extra argument to instruction 'checkstack' (in 'testC')
2011-11-09 17:08:07 -02:00
Roberto Ierusalimschy
30cea671a7
configurable 'directory separator' in 'package.searchpath'
2011-11-09 13:18:04 -02:00
Roberto Ierusalimschy
a716ae1f50
avoids including 'stdio.h' everywhere (because of definitions for
...
luai_writestring/luai_writeline)
2011-11-09 12:47:14 -02:00
Roberto Ierusalimschy
ea382b0be1
small bug: error message in 'io.lines' is not the error number
2011-11-09 12:10:43 -02:00
Roberto Ierusalimschy
6d8d282e0f
avoid calling "extra value" as if it were a function option
2011-11-06 11:59:12 -02:00
Roberto Ierusalimschy
00c8a17a2d
by default, do not use Windows' goodies in Windows CE build
2011-11-05 13:29:05 -02:00
Roberto Ierusalimschy
166ce15512
cannot apply macro 'getstr' over NULL
2011-10-31 15:48:51 -02:00
Roberto Ierusalimschy
87cf2bf711
extra comments about what fields are optional debug information
2011-10-31 15:48:22 -02:00
Roberto Ierusalimschy
fd8a849621
detail (avoid applying macro 'getstr' with a function-call argument)
2011-10-31 15:46:04 -02:00
Roberto Ierusalimschy
5a568a3b01
detail (comment)
2011-10-25 10:01:20 -02:00
Roberto Ierusalimschy
475e6c5352
'lua_setglobal/lua_getglobal' implemented as functions to avoid
...
problems with stack indices
(e.g., lua_getglobal(L, lua_tostring(L, -1)) )
2011-10-24 14:53:05 -02:00
Roberto Ierusalimschy
af00a0772c
new functions lua_rawsetp/lua_rawgetp
2011-10-24 12:54:05 -02:00
Roberto Ierusalimschy
6819c2a98a
silly bug in 5.2 beta: assignment conflict code did not test to check
...
whether variable was a table element
2011-10-24 12:51:44 -02:00
Roberto Ierusalimschy
1dd8af67b6
BUG: parser may collect a prototype while building it.
2011-10-21 17:34:23 -02:00
Roberto Ierusalimschy
1350a2bcb5
more macros to try to make NaN trick work with other sizes of
...
IEEE float numbers. (It has not been tested with such different
sizes...)
2011-10-17 12:46:13 -02:00
Roberto Ierusalimschy
217e67cb22
new type 'l_noret' for function that do not return
2011-10-07 17:45:19 -03:00
Roberto Ierusalimschy
9bbfe9f3fd
avoid the word 'TRICKLE' in macro name (as it has nothing to do
...
with its meaning)
2011-10-07 16:53:05 -03:00
Roberto Ierusalimschy
788a0ecd27
'luaC_separateudata' renamed to 'separatetobefnz' and called only
...
from 'lgc.c'
2011-10-03 14:54:25 -03:00
Roberto Ierusalimschy
6d86b937e4
'luaC_separateudata' called from 'luaC_freeallobjects' + removed
...
extra 'luaF_close' (already being called by 'close_state')
2011-10-03 14:54:25 -03:00
Roberto Ierusalimschy
bc90cf4b83
retraverse all gray lists together to avoid traversing some weak
...
tables twice (as they may change lists when traversed)
2011-10-03 13:22:05 -03:00
Roberto Ierusalimschy
d79190e27f
missing 'LUA_CORE' definition
2011-10-03 13:19:23 -03:00
Roberto Ierusalimschy
9caf5b4f79
lint (unused definition)
2011-09-30 09:46:06 -03:00
Roberto Ierusalimschy
50cddefeeb
lint (wrong identation)
2011-09-30 09:45:45 -03:00
Roberto Ierusalimschy
e24f1ee9ff
lint (unreachable code)
2011-09-30 09:44:45 -03:00
Roberto Ierusalimschy
f3b0eb3ecf
lint (unused macros)
2011-09-30 09:44:19 -03:00
Roberto Ierusalimschy
162ce8256e
lint (unused struct field)
2011-09-30 09:43:54 -03:00
Roberto Ierusalimschy
ad90447eb6
detail: new macros for non-valid values
2011-09-26 17:17:27 -03:00
Roberto Ierusalimschy
87912786af
dead objects are not collectable.
2011-09-24 18:12:01 -03:00
Roberto Ierusalimschy
5645a84368
detail about 'trick' function (nil turn it off)
2011-09-24 18:11:29 -03:00
Roberto Ierusalimschy
95ed6c1127
better(?) scheme for cleaning weak tables; all ressurected objects
...
are removed from weak values before finalization
2011-09-24 18:00:40 -03:00
Roberto Ierusalimschy
12ab78aca6
detail in extra trace code: total bytes is given by 'gettotalbytes',
...
not by 'totalbytes' counter.
2011-09-20 16:25:23 -03:00
Roberto Ierusalimschy
45c346645c
avoid clearing ephemeron tables that have nothing to be cleaned
...
(no white elements)
2011-09-19 14:03:38 -03:00
Roberto Ierusalimschy
68ce878292
cannot compute 'mainposition' before checking whether key is nil
2011-09-15 14:09:02 -03:00
Roberto Ierusalimschy
500336efd0
small bug in if-goto optimization: block must be closed ('leaveblock')
...
*before* the jump out ('escapelist')
2011-09-14 14:40:26 -03:00
Roberto Ierusalimschy
5ea8f108e1
using 'long' versions of 'fseek'/'ftell' when available
2011-09-13 18:09:04 -03:00
Roberto Ierusalimschy
2275030b86
details (and missing 'break's)
2011-09-13 15:05:59 -03:00
Roberto Ierusalimschy
05de314701
upvalue names always can be NULL (if debug info was removed), so
...
always check for that case
2011-09-13 14:40:20 -03:00
Roberto Ierusalimschy
d281d23f8d
detail (make 'lua_assert' a valid expression even when turned off)
2011-09-13 14:39:23 -03:00
Roberto Ierusalimschy
ec431ce5db
comment
2011-09-12 17:33:03 -03:00
Roberto Ierusalimschy
c8f47c2934
optimization for |if cond then goto|
2011-08-30 13:38:58 -03:00
Roberto Ierusalimschy
ca458f1f52
'luaK_goiffalse' exported
2011-08-30 13:26:41 -03:00
Roberto Ierusalimschy
121dc8af66
cleaner code for 'if' construct
2011-08-25 10:45:24 -03:00
Roberto Ierusalimschy
a8675966ec
detail: centralize all tests for Windows on variable 'LUA_WIN'
2011-08-23 14:25:42 -03:00
Roberto Ierusalimschy
3dc5475e23
'nCcalls' should be local to each thread, as each thread may have its
...
own C stack (with LuaThreads or something similar)
2011-08-23 14:24:34 -03:00
Roberto Ierusalimschy
8a008a2057
bug: __newindex metamethod may not work if metatable is its own
...
metatable.
2011-08-17 17:38:51 -03:00
Roberto Ierusalimschy
89b59eee73
bug: __newindex metamethod may not work if metatable is its own
...
metatable + luaV_settable does not create entry when there is a
metamethod (and therefore entry is useless)
2011-08-17 17:26:47 -03:00
Roberto Ierusalimschy
166dd0261a
new option '-E' to avoid environment variables
2011-08-17 17:19:52 -03:00
Roberto Ierusalimschy
51471ba748
comments about use of 'luaH_set'
2011-08-15 16:41:58 -03:00
Roberto Ierusalimschy
0b65cb74cd
new implementation for 'getobjname': first search for relevant
...
instruction (new function 'findsetreg') and then try to build
a meaningful name
2011-08-12 17:01:44 -03:00
Roberto Ierusalimschy
ea46b750dc
comment
2011-08-11 14:06:12 -03:00
Roberto Ierusalimschy
92afcf2823
no more 'luaH_setstr (used only once) + 'luaH_setint' receives value
...
to be set.
2011-08-09 17:58:29 -03:00
Roberto Ierusalimschy
b5bf7d9ef4
'string.format' checks whether values for integer formats are
...
actually integers
2011-08-09 17:58:29 -03:00
Roberto Ierusalimschy
6a5d89b39f
detail (using array instead of several variables to keep track of
...
enabled command-line options)
2011-08-04 15:16:16 -03:00
Roberto Ierusalimschy
ae14adc272
better error message when trying to open files
2011-08-02 15:00:01 -03:00
Roberto Ierusalimschy
ff98f17d27
detail: factoring in common code for opening files and checking for
...
errors
2011-07-28 15:41:15 -03:00
Roberto Ierusalimschy
59bcd137ae
reducing even more use of C stack by the parser: struct 'FuncState'
...
does not need field 'L' + number of labels/gotos in a chunk may be
limited to SHRT_MAX. (Also removed some non-needed 'unsigned's.)
2011-07-27 15:09:01 -03:00
Roberto Ierusalimschy
5ab6d36d99
no more field 'L' in 'FuncState'
2011-07-27 15:07:37 -03:00
Roberto Ierusalimschy
43c873895f
tonumber: base 10 is not special, no base is
2011-07-27 09:14:06 -03:00
Roberto Ierusalimschy
03a078493e
refuse things like 'inf' or 'Nan' as numerals
2011-07-27 09:13:08 -03:00
Roberto Ierusalimschy
bae57ea088
'M_IX86' -> '_M_IX86'
2011-07-25 14:20:47 -03:00
Roberto Ierusalimschy
2557107e91
removed unused variable 'found' (in 'findfield') + removed legacy
...
test for 'what' being "tail"
2011-07-25 14:18:49 -03:00
Roberto Ierusalimschy
32a12e2f3f
detail (cleaned whitespaces at end of lines)
2011-07-15 09:50:29 -03:00
Roberto Ierusalimschy
559bb554c9
no more 'zungetc' (better not to read next char)
2011-07-15 09:48:03 -03:00
Roberto Ierusalimschy
fd5e810e08
macro 'char2int' replaced by 'cast_uchar' (used by other files)
2011-07-15 09:35:32 -03:00
Roberto Ierusalimschy
067f761739
better code for numerical escapes
2011-07-15 09:30:41 -03:00
Roberto Ierusalimschy
7978a8d8b2
added '_M_IX86' in NaN trick
2011-07-08 17:07:11 -03:00
Roberto Ierusalimschy
32e09c2a16
detail
2011-07-08 17:01:38 -03:00
Roberto Ierusalimschy
df19931ddc
error on invalid escape sequences
2011-07-08 16:17:30 -03:00
Roberto Ierusalimschy
b5084fdafe
detail (comment)
2011-07-06 13:45:14 -03:00
Roberto Ierusalimschy
d8200d5f3c
'\*' -> '\z' + '\?' is not an official escape sequence
2011-07-05 16:13:45 -03:00
Roberto Ierusalimschy
79cbc3468c
removed and deprecated functions really removed from the code base
2011-07-05 09:49:35 -03:00
Roberto Ierusalimschy
9e89a55a4f
NILCONSTANT also depends no endianess (with NaN trick)
2011-07-04 17:29:02 -03:00
Roberto Ierusalimschy
b707e81c3d
comments about some compiler options that should be tested once in a while
2011-07-04 13:10:15 -03:00
Roberto Ierusalimschy
ee37ee50d6
'table.pack' also returns 'n' + 'deprecated' changed to 'removed'
2011-07-02 13:01:44 -03:00
Roberto Ierusalimschy
ad1a54b5c0
reordering of some defines (more logical grouping)
2011-07-02 13:00:15 -03:00
Roberto Ierusalimschy
88c29c0cd5
compilation warning about integer size x pointer size
2011-07-02 12:59:17 -03:00
Roberto Ierusalimschy
d93df22bf6
small simplifications (and assert was wrongly written)
2011-07-02 12:58:14 -03:00
Roberto Ierusalimschy
5017cc6ba2
simpler 'luai_apicheck' (and avoids compilation error...)
2011-07-02 12:57:25 -03:00
Roberto Ierusalimschy
2f125ebc33
'deprecated' x 'removed' (they are not the same thing)
2011-07-02 12:56:43 -03:00
Roberto Ierusalimschy
49a01c0991
'package.loaders' -> 'package.searchers'
2011-06-28 14:14:12 -03:00
Roberto Ierusalimschy
17526ed2fe
no more errors on accesses to 'string' and strings
2011-06-28 14:13:52 -03:00
Roberto Ierusalimschy
f180822fa6
back to internal table for 'ctype', no more locale manipulation
2011-06-28 12:42:04 -03:00
Roberto Ierusalimschy
594220c624
use standard "underscore + uppercases" for reserved keys in the registry
2011-06-27 16:42:31 -03:00
Roberto Ierusalimschy
3dd68624dc
comments
2011-06-27 15:27:18 -03:00
Roberto Ierusalimschy
f9eea453b7
avoid "magic constant" 32 (the difference from 'A' to 'a')
2011-06-27 15:22:46 -03:00
Roberto Ierusalimschy
374773748b
back to "one-label-per-block"
2011-06-27 15:18:59 -03:00
Roberto Ierusalimschy
29644366fc
useless assignments removed (macros already do the assignment)
2011-06-24 11:36:21 -03:00
Roberto Ierusalimschy
6eadedbfa1
resort to standard C ctype for non-ASCII systems + 'ltoupper' replaced
...
by 'ltolower'
2011-06-24 09:25:33 -03:00
Roberto Ierusalimschy
1978094b3a
resort to standard C ctype for non-ASCII systems
2011-06-24 09:25:33 -03:00
Roberto Ierusalimschy
5acc5b0c1e
using 'tolower' instead of 'toupper' (slightly simpler to implement)
2011-06-24 09:25:02 -03:00
Roberto Ierusalimschy
59547c6cda
macro 'ltoupper' instead of 'lisupper' (more usefull for Lua)
2011-06-23 13:01:06 -03:00
Roberto Ierusalimschy
3d3355b4f3
label syntax changed to '::label::'
2011-06-23 11:54:48 -03:00
Roberto Ierusalimschy
801f43f09a
change in the representation of file handles
2011-06-21 10:43:48 -03:00
Roberto Ierusalimschy
719c01359f
label syntax changed to '::label::'
2011-06-20 13:52:48 -03:00
Roberto Ierusalimschy
43f13729a2
comment
2011-06-20 13:50:59 -03:00
Roberto Ierusalimschy
136f8e148d
added cast to void to calls to 'setlocale' (to easy redefining it as
...
a constant)
2011-06-20 13:36:03 -03:00
Roberto Ierusalimschy
f90a130b07
typo in message
2011-06-20 13:35:23 -03:00
Roberto Ierusalimschy
cb4950a6d8
parser must work with C locale, but external locale must be preserved
2011-06-18 14:08:58 -03:00
Roberto Ierusalimschy
fdede85419
label names must be unique inside a function
2011-06-16 13:36:39 -03:00
Roberto Ierusalimschy
beab626061
correct length for LUA_COPYRIGHT (without trailing '\0')
2011-06-16 11:30:58 -03:00
Roberto Ierusalimschy
817f8674af
avoid warning about -unsigned value
2011-06-16 11:14:31 -03:00
Roberto Ierusalimschy
cf0562e1e7
detail (missing cast to unsigned char when converting char to int)
2011-06-16 11:13:22 -03:00
Roberto Ierusalimschy
22e1c5ebad
avoid conversion from 'const char*' to 'void *' (warning about 'const')
2011-06-16 11:12:24 -03:00
Roberto Ierusalimschy
470dd56a89
'os.execute' (and similars) should return 'exit' and code in case
...
of success, too.
2011-06-16 11:11:04 -03:00
Roberto Ierusalimschy
20d30bcd33
declarations should be present only when implementations are
2011-06-16 11:10:12 -03:00
Roberto Ierusalimschy
44b6f496b5
just in case, avoid side effects in 'ctype' macros
2011-06-15 11:35:55 -03:00
Roberto Ierusalimschy
fd80e63468
configuration for NaN trick big-endian + macro 'luai_checknum' to
...
ensure numbers comming from C are not "improper" (some kinds of
signaling NaNs)
2011-06-13 11:13:06 -03:00
Roberto Ierusalimschy
f62565abea
avoid warnings with -Wstrict-overflow
2011-06-09 15:24:22 -03:00
Roberto Ierusalimschy
c9d1d9f9c6
better way to test overflows with string indices
2011-06-09 15:22:47 -03:00
Roberto Ierusalimschy
35391d9b1a
macro 'NNMARK' (mark for non-number values using the NaN trick)
2011-06-09 15:21:25 -03:00
Roberto Ierusalimschy
99b1b8e918
first version with 'NANTRICK' (packing all Lua values inside a 'double')
2011-06-07 16:02:33 -03:00
Roberto Ierusalimschy
3b44821334
stricter control (using tag variants) over closure kinds (Lua x C)
2011-06-02 16:31:40 -03:00
Roberto Ierusalimschy
0214dab989
yet another macro ('num_')
2011-05-31 16:15:01 -03:00
Roberto Ierusalimschy
821bd7025e
more uniform names for 'equalobj'-related functions
2011-05-31 15:27:56 -03:00
Roberto Ierusalimschy
9b7dddad7d
no need for two different implementations for equality (one raw and
...
one with metamethods)
2011-05-31 15:24:36 -03:00
Roberto Ierusalimschy
3f04a9f2c0
code is simpler without 'goto' here
2011-05-30 13:36:38 -03:00
Roberto Ierusalimschy
2a59a999d4
yet another macro abstracting TValue representation
2011-05-26 14:12:31 -03:00
Roberto Ierusalimschy
ee7d0c2649
new macro 'luai_writeline' to print newlines (and flush 'stdout')
2011-05-26 13:09:40 -03:00
Roberto Ierusalimschy
aa13c591f5
avoid use of 'ifdef/ifndef'; use 'defined' instead (simpler and
...
more powerful)
2011-05-25 11:12:28 -03:00
Roberto Ierusalimschy
6c8a32217a
changes by lhf (better control of chars x bytes)
2011-05-17 09:42:43 -03:00
Roberto Ierusalimschy
cb09f4fef4
details
2011-05-06 13:00:23 -03:00
Roberto Ierusalimschy
3cf1729a02
new macro 'lua_longassert' that is equivalent to an assertion without
...
a stringfication of the condition, to avoid too long string literals
(limited by C90 to ~510 characters)
2011-05-05 16:43:14 -03:00
Roberto Ierusalimschy
74b0bb3a45
macro 'checkconsistency' moved to this file, as it is used only
...
here
2011-05-05 16:42:25 -03:00
Roberto Ierusalimschy
e4076fe6d9
break long assertion in two shorter ones
2011-05-05 13:18:53 -03:00
Roberto Ierusalimschy
81952e6884
avoid using expression as argument to unsafe macro 'l_isfalse'
2011-05-05 13:16:33 -03:00
Roberto Ierusalimschy
25b4e35ee8
new macros abstracting TValue representation (to easy change to
...
other representations)
2011-05-05 12:53:23 -03:00
Roberto Ierusalimschy
7e1facaa4e
detail in assertion
2011-05-04 14:04:06 -03:00
Roberto Ierusalimschy
ad2531a0ee
more complete (and hopefuly more correct) handling of 'sizeof(char)'
2011-05-03 13:01:57 -03:00
Roberto Ierusalimschy
bc1c718cc0
removed TOKEN_LEN (useless)
2011-05-03 12:51:16 -03:00
Roberto Ierusalimschy
c9ce754e38
comment
2011-05-02 14:33:01 -03:00
Roberto Ierusalimschy
d34271fe42
MacOS 'strtod' handles hexa formats too
2011-04-29 10:56:28 -03:00
Roberto Ierusalimschy
d120ec29ca
bug in OP_SELF when method name goes to a register
2011-04-28 11:00:11 -03:00
Roberto Ierusalimschy
2aff901c93
Mac OS defines LUA_USE_AFORMAT and LUA_USE_LONGLONG by default
2011-04-20 15:25:54 -03:00
Roberto Ierusalimschy
bad231c481
'LUA_USELONGLONG' -> 'LUA_USE_LONGLONG'
2011-04-20 13:36:28 -03:00
Roberto Ierusalimschy
a2b1c279f1
'LUA_USELONGLONG' on by default on Linux + LUA_USE_HEXAFLOAT renamed
...
to LUA_USE_STRTODHEX (as Lua 5.2 always *uses* hexa floats)
2011-04-19 15:31:30 -03:00
Roberto Ierusalimschy
2f128c5130
'luaL_setfuncs' does not need to accept a NULL list. (If there is
...
no list, there is no reason to call this function.)
2011-04-19 15:29:41 -03:00
Roberto Ierusalimschy
4758113043
change in opcode OP_LOADNIL: B is used as a counter instead of a
...
register. (Avoids an assignment to R(B), not present in any other
instruction.)
2011-04-19 13:22:13 -03:00
Roberto Ierusalimschy
a4e644add2
small bug (masked by wrong entry for OP_TEST in opcodes.c)
2011-04-18 16:49:13 -03:00
Roberto Ierusalimschy
05ca63642b
added macro for code checking
2011-04-18 16:48:53 -03:00
Roberto Ierusalimschy
f17e3624ef
local function name only visible to debug info after being initialized
2011-04-18 16:48:24 -03:00
Roberto Ierusalimschy
2e9b8476ca
detail ('luai_apicheck' should be used always through macro 'api_check')
2011-04-18 12:02:37 -03:00
Roberto Ierusalimschy
c31f4946e9
copyright updated to 2011
2011-04-18 11:15:48 -03:00
Roberto Ierusalimschy
c86586e866
small corrections in description of OP_TEST and OP_LOADKX
2011-04-12 14:27:35 -03:00
Roberto Ierusalimschy
19fbdf6cae
'luaL_findtable' -> 'luaL_getsubtable'
2011-04-08 16:17:36 -03:00
Roberto Ierusalimschy
427ee519db
new instruction OP_LOADKX (to replace OP_LOADK with extra argument)
2011-04-07 15:14:12 -03:00
Roberto Ierusalimschy
a958b711f5
cleaner scheme of bits for variant types (light C functions) and
...
collectable types
2011-04-07 13:11:57 -03:00
Roberto Ierusalimschy
1ffdd0bc7a
detail (should use macro 'ttisdeadkey')
2011-04-05 15:32:28 -03:00
Roberto Ierusalimschy
5286650894
new macro 'ttisequal'
2011-04-05 15:32:06 -03:00
Roberto Ierusalimschy
0fb1644c60
2nd operand for unary tag methods does not need to be 'nil'
2011-04-05 11:26:23 -03:00
Roberto Ierusalimschy
119d5e46d5
lua_arith gets no fake operand for unary minus
2011-04-05 11:26:23 -03:00
Roberto Ierusalimschy
83abbac946
all names used internally by macros end with '_'
2011-04-05 11:24:07 -03:00
Roberto Ierusalimschy
a25416a8d5
use of 'luaL_tolstring' for option '%s' in 'string.format'
2011-03-18 16:02:33 -03:00
Roberto Ierusalimschy
682cce3813
macro 'mark' renamed 'EOFMARK' ('mark' is too easy to confict, e.g.
...
in alllua.c)
2011-03-14 12:39:42 -03:00
Roberto Ierusalimschy
d806710ab5
returns for file-related functions and process-related functions
...
unified in 'auxlib'
2011-03-03 13:34:46 -03:00
Roberto Ierusalimschy
e049abb69a
loaders receive an extra argument returned by the searcher
...
(typically the file name)
2011-03-01 14:01:53 -03:00
Roberto Ierusalimschy
98816d0ce5
small problems with 'luaone.c'
2011-02-28 14:32:10 -03:00
Roberto Ierusalimschy
7482e8f914
no need of lookahead in Zio
2011-02-23 10:13:10 -03:00
Roberto Ierusalimschy
03b769053a
correct interpretation of return value from pclose
2011-02-21 16:12:54 -03:00
Roberto Ierusalimschy
3c710f056b
small bug: may call reader function again after it returned end
...
of input
2011-02-17 15:34:16 -02:00
Roberto Ierusalimschy
c0a865fa54
error for repeated label + jumps allowed to labels followed by
...
'no-op' statements
2011-02-14 14:36:34 -02:00
Roberto Ierusalimschy
0009ac1f3a
'break' does not need to be last statement in a block +
...
'explist1' -> 'explist' + moving a few functions around
2011-02-14 12:59:28 -02:00
Roberto Ierusalimschy
7b968bb514
p-close returns "correct" status plus type of termination
2011-02-10 13:35:50 -02:00
Roberto Ierusalimschy
bf8b08295a
'break' coded as 'goto' + small bug when closing multiple gotos
...
to the same label
2011-02-10 12:50:41 -02:00
Roberto Ierusalimschy
3f5b56c48b
simpler code for repeat-until
2011-02-09 15:03:18 -02:00
Roberto Ierusalimschy
e7192dfdbb
corrected 'follow' for checking whether label is last statement
...
in a block
2011-02-09 14:51:28 -02:00
Roberto Ierusalimschy
0539f48661
small changes in goto-related error messages
2011-02-09 12:45:19 -02:00
Roberto Ierusalimschy
e7a9c45a48
trying to avoid assumption that sizeof(char)==1
2011-02-07 17:15:24 -02:00
Roberto Ierusalimschy
fd6c1f4898
ensures that all local variables are declared inside some block,
...
opening a new block at 'open_func'
2011-02-07 17:00:30 -02:00
Roberto Ierusalimschy
f079749287
some reorganization of dynamic data structures used by the parser
2011-02-07 15:14:50 -02:00
Roberto Ierusalimschy
f8d677f94c
no more 'OP_CLOSE' instructions (use jumps to close upvalues)
2011-02-07 10:28:27 -02:00
Roberto Ierusalimschy
094a7d0290
detail in 'print_usage'
2011-02-07 10:27:13 -02:00
Roberto Ierusalimschy
7cc0e63d8a
first implementation of 'goto'
2011-02-04 15:34:43 -02:00
Roberto Ierusalimschy
a4a8914c20
new reserved word 'goto'
2011-02-02 12:55:17 -02:00
Roberto Ierusalimschy
06c7efb4a9
avoid extra increment to 'savedpc' when jumping
2011-02-01 16:32:55 -02:00
Roberto Ierusalimschy
dd547c55c8
new scheme to close upvalues in 'break'; jump instructions may
...
do the close, avoiding the need for a OP_CLOSE instruction
2011-02-01 16:03:10 -02:00
Roberto Ierusalimschy
f6bd8b1147
better control for GC running or stopped
2011-02-01 14:52:38 -02:00
Roberto Ierusalimschy
a7faa557fa
bug: problem with optimizations of short-circuit logic
2011-01-31 12:52:32 -02:00
Roberto Ierusalimschy
026a7e92be
bug in some short-circuit optimizations
2011-01-31 12:28:41 -02:00
Roberto Ierusalimschy
c4ea0c3b29
detail (cleaning trailing spaces)
2011-01-26 14:30:02 -02:00
Roberto Ierusalimschy
7106c491dd
'sep' argument to 'string.rep' + 'string.rep' preallocates entire
...
buffer before creating resulting string
2011-01-12 18:36:01 -02:00
Roberto Ierusalimschy
a10d495b18
'luaL_findtable' returns boolean about whether it created a new
...
table (to easy initializing table)
2011-01-10 13:51:42 -02:00
Roberto Ierusalimschy
c2e3cc4c89
using 'luaL_findtable' to manage hook table
2011-01-10 13:51:19 -02:00
Roberto Ierusalimschy
67feed49f1
optional argument 'sep' to 'searchpath'
2011-01-07 16:54:49 -02:00
Roberto Ierusalimschy
b63b0928cf
prototype for 'luaO_ceillog2' was different from definition
2011-01-07 13:46:27 -02:00
Roberto Ierusalimschy
511679313f
new function 'rawlen'
2011-01-07 10:41:48 -02:00
Roberto Ierusalimschy
868ff40339
full collection does not restart collector + avoid changing GC
...
state if an error happens in a step
2010-12-29 16:00:23 -02:00
Roberto Ierusalimschy
aa6faa6331
own implementation of 'tunumber', so that it works correctly with
...
numbers outside the 'int' range
2010-12-27 16:00:38 -02:00
Roberto Ierusalimschy
0b3f4e254e
more efficient hash for numbers in IEEE754 machines
2010-12-23 13:38:28 -02:00
Roberto Ierusalimschy
551b076f1c
change in the relationship between totalbytes and GCdebt - luaM_realloc_
...
is too critical to update two counters
2010-12-20 17:40:07 -02:00
Roberto Ierusalimschy
737f119187
better control for GC running or stopped
2010-12-20 16:17:46 -02:00
Roberto Ierusalimschy
8980c630bf
error when indexing strings with invalid keys
2010-12-20 15:25:36 -02:00
Roberto Ierusalimschy
8d579c5bc5
'debug.setmetatable' returns object (like 'setmetatable')
2010-12-20 15:24:15 -02:00
Roberto Ierusalimschy
d51743b0c7
removed 'newproxy'
2010-12-17 13:14:58 -02:00
Roberto Ierusalimschy
1a92c2b354
allows number of bits used by the library to be changed from outside
2010-12-17 11:26:38 -02:00
Roberto Ierusalimschy
fe0d54d37e
table library respects '#' metamethods
2010-12-17 10:15:34 -02:00
Roberto Ierusalimschy
c9af0768fc
GC does not mark dead registers inside activation record
2010-12-17 10:05:37 -02:00
Roberto Ierusalimschy
7e0caa7d61
new closures are always created on "next" register (so that GC knows
...
stack limit)
2010-12-17 10:03:41 -02:00
Roberto Ierusalimschy
a40768e5ea
new macro 'luaC_condGC' to allow extra code to be run in case
...
of GC steps
2010-12-17 10:02:29 -02:00
Roberto Ierusalimschy
4a83fe569c
comment
2010-12-15 17:13:29 -02:00
Roberto Ierusalimschy
b83b6ba015
'loadin' -> 'load'
2010-12-13 14:38:00 -02:00
Roberto Ierusalimschy
af119c8b55
official support for floating hexa numerals
2010-12-10 17:03:46 -02:00
Roberto Ierusalimschy
1aead7f553
'hexafloat' moved to 'lobject.c' (hexa conversion needs it too)
2010-12-10 12:53:15 -02:00
Roberto Ierusalimschy
75d8470f0f
new macro 'cast_uchar'
2010-12-10 11:40:22 -02:00
Roberto Ierusalimschy
81646af13b
'loadstring' deprecated; use 'load' instead
2010-12-08 10:58:04 -02:00
Roberto Ierusalimschy
233b71c092
comment
2010-12-07 09:40:42 -02:00
Roberto Ierusalimschy
ccc4fc9cf0
detection of erroneous numeric strings with \0 (such as "1\0")
2010-12-06 19:08:36 -02:00
Roberto Ierusalimschy
c79b4a97aa
using 'strspn' to skip spaces in 'tonumber'
2010-12-06 14:25:48 -02:00
Roberto Ierusalimschy
ac3afc7cd4
'printf' replaced by 'luai_writestring'
2010-12-03 15:20:50 -02:00
Roberto Ierusalimschy
350cc4bcb6
'micro' bug: when closing state, old objects are finalized (breaking
...
assertion)
2010-12-03 09:48:25 -02:00
Roberto Ierusalimschy
35931bbed4
comments
2010-12-02 17:51:15 -02:00
Roberto Ierusalimschy
12779b2b71
getlocal/setlocal can access vararg parameters
2010-11-30 15:17:51 -02:00
Roberto Ierusalimschy
7ca1bd639f
new functions 'extract' and 'replace'
2010-11-29 13:19:28 -02:00
Roberto Ierusalimschy
9b7a12c46d
finalizers (__gc) for tables
2010-11-26 12:32:31 -02:00
Roberto Ierusalimschy
5b33e39855
removed deprecated functions getn-foreach-foreachi
2010-11-23 15:21:14 -02:00
Roberto Ierusalimschy
a64cf8fac9
'test' -> 'btest'
2010-11-22 16:06:33 -02:00
Roberto Ierusalimschy
092fa71ddd
conventional names for bitwise operators
2010-11-22 14:39:20 -02:00
Roberto Ierusalimschy
a2eaad5d81
'gfind' was deprecated in 5.1
2010-11-19 14:25:51 -02:00
Roberto Ierusalimschy
54771c5afa
keep 'seminfo->ts' even for reserved words, just in case
...
(some lhf's tools need this)
2010-11-18 16:38:44 -02:00
Roberto Ierusalimschy
bcce769d29
avoid "unreacheable code" warnings
2010-11-18 16:38:27 -02:00
Roberto Ierusalimschy
24baa919c1
small bug: 'find' did not detect magic chars after a \0 in a pattern
...
and did a plain search in those cases
2010-11-16 18:39:41 -02:00
Roberto Ierusalimschy
d1c0efdb7d
comment about compatibility-only functions
2010-11-16 17:20:01 -02:00
Roberto Ierusalimschy
566758de79
'getuservalue' accepts any type of argument
2010-11-16 16:01:28 -02:00
Roberto Ierusalimschy
50334faad6
no more compatibility with (veryyyy) old ref system
2010-11-16 15:43:29 -02:00
Roberto Ierusalimschy
cee7a8e1ec
-DLUA_COMPAT_ALL is the default
2010-11-16 09:39:42 -02:00
Roberto Ierusalimschy
8c21f463ed
'debug' library is loaded by default
2010-11-12 13:48:30 -02:00
Roberto Ierusalimschy
a1952d9c41
'l_tvar' renamed to 'l_tg'
2010-11-12 13:47:34 -02:00
Roberto Ierusalimschy
1a46a713d2
new macro 'l_tvar' to easy the use of mathlib with other floating
...
types (float and long double)
2010-11-11 13:39:12 -02:00
Roberto Ierusalimschy
23b9ceb0a4
allows larger array parts in tables (no need to restrict it to 2^26)
2010-11-11 13:38:43 -02:00
Roberto Ierusalimschy
0a6a6b9d9d
no more sentinel to detect loops in module dependencies;
...
usual message for infinite recursion is good enough.
2010-11-10 18:00:04 -02:00
Roberto Ierusalimschy
1b54197491
better error message when light userdata is used instead of a
...
full userdata
2010-11-10 16:06:10 -02:00
Roberto Ierusalimschy
c97aa9485c
new function 'luaL_setmetatable'
2010-11-10 16:05:36 -02:00
Roberto Ierusalimschy
e885b91326
'luaL_typeerror' deprecated
2010-11-10 15:38:10 -02:00
Roberto Ierusalimschy
fa1f724378
when reading blocks with given size, try to read whole block
...
at once
2010-11-09 14:57:49 -02:00
Roberto Ierusalimschy
2a966116b1
detail (message)
2010-11-09 09:04:15 -02:00
Roberto Ierusalimschy
43ec354722
added support for conditional use of %Lg when using long double
2010-11-08 15:38:37 -02:00
Roberto Ierusalimschy
700b003fb5
when reading large files, double buffer size at each iteration
2010-11-08 15:27:22 -02:00
Roberto Ierusalimschy
f722ba6890
code should not use "defined" types, but "typedef"s types when they
...
are available (i.e., after including lua.h) + small changes to make
conversions more portable across diferent types for lua_Number
(long double) and lua_Unsigned (long long unsigned)
2010-11-08 14:33:20 -02:00
Roberto Ierusalimschy
c7d4da8746
correction to allow lua_Unsigned larger than usigned int
2010-11-08 14:31:22 -02:00
Roberto Ierusalimschy
f1629217f1
code for conversion macros moved from luaconf to llimits + 'uint'
...
renamed to 'unsigned' in those macros
2010-11-03 13:16:17 -02:00
Roberto Ierusalimschy
fdd5f2f7a3
comment typos
2010-10-29 15:52:46 -02:00
Roberto Ierusalimschy
c6ef3e2672
bug: by-one error when creating short source names (luaO_chunkid)
2010-10-29 13:54:55 -02:00
Roberto Ierusalimschy
ba8dca00ac
detail (ununsed parameter)
2010-10-29 12:35:09 -02:00
Roberto Ierusalimschy
9be89a1864
'luaL_checkversion' also checks convertions (number to integer types)
2010-10-29 10:52:21 -02:00
Roberto Ierusalimschy
b9f371a3c2
added another option for ieeeendian
2010-10-29 09:13:21 -02:00
Roberto Ierusalimschy
4834de8427
comment typo
2010-10-29 09:13:14 -02:00
Roberto Ierusalimschy
94043a3a1a
more robust implementation for 'luaO_str2d'
2010-10-28 13:39:03 -02:00
Roberto Ierusalimschy
e642cc4206
correct handling of negative numbers in non-10 bases by 'tonumber'
...
(e.g., tonumber(-34, 8))
2010-10-28 13:36:30 -02:00
Roberto Ierusalimschy
da57477c3d
added more platforms for ieeeendianess + small comments
2010-10-28 13:18:25 -02:00
Roberto Ierusalimschy
f39034889d
stricter control over number of bits in each operation
2010-10-28 13:17:29 -02:00
Roberto Ierusalimschy
6b053a63cb
added check for architectures with known endianess (only i386 now)
2010-10-27 15:16:37 -02:00
Roberto Ierusalimschy
572e5e6b28
new names for bit functions (mimicking assembler)
2010-10-27 14:50:32 -02:00
Roberto Ierusalimschy
6098e06e09
better organization for coercion functions between lua_Number and
...
integer types + IEEE trick to be used in most platforms, by default
2010-10-26 17:32:19 -02:00
Roberto Ierusalimschy
c6b64ffe65
new type lua_Unsigned and corresponding projection/injection functions
2010-10-25 18:31:11 -02:00
Roberto Ierusalimschy
4590a89b32
corrected warnings from different compilers (mostly casts and small
...
details)
2010-10-25 17:01:37 -02:00
Roberto Ierusalimschy
1475cb59bf
version from lhf
2010-10-25 12:33:38 -02:00
Roberto Ierusalimschy
9e8e60dd5f
bitlib renamed to 'bit32' + new function for arithmetic shift
2010-10-25 12:32:36 -02:00
Roberto Ierusalimschy
d72ec210c7
POS_A replaced by POS_Ax (which is more "precise")
2010-10-25 10:24:55 -02:00
Roberto Ierusalimschy
c77baf752c
comment
2010-10-25 10:24:36 -02:00
Roberto Ierusalimschy
a122688091
better error message for 'lua -e -i'
2010-10-18 14:06:33 -02:00
Roberto Ierusalimschy
f3026c36c2
details in opcode list
2010-10-13 13:45:54 -03:00
Roberto Ierusalimschy
cd0ebd0a80
'proto->source' may be NULL (if dump strips debug information)
2010-10-11 17:24:42 -03:00
Roberto Ierusalimschy
8bc33a088c
'os.exit' acceps booleans as status (for EXIT_SUCESS and EXIT_FAILURE)
2010-10-05 09:18:03 -03:00
Roberto Ierusalimschy
c3eb89544f
'luaL_loadlib' accepts Utf8 BOM in the beginning of files
2010-10-01 15:53:00 -03:00
Roberto Ierusalimschy
ffff9a49da
'nresults' in CallInfo now refers to number of results that the current
...
function returns (and not what it expects from a call)
2010-09-30 14:21:31 -03:00
Roberto Ierusalimschy
b22356e5c5
hexadecimal constants may be floating values too
2010-09-13 18:49:58 -03:00
Roberto Ierusalimschy
a289a62717
'loadin' should not check whether upvalue is called '_ENV',
...
because its name may be unknown when there is no debug information.
2010-09-07 16:38:36 -03:00
Roberto Ierusalimschy
e3eabcf913
'lua_[gs]etupvalue' may work even without debug information
...
(that is, without upvalue names)
2010-09-07 16:35:04 -03:00
Roberto Ierusalimschy
0df2238063
name "_ENV" configurable through 'luaconf.h'
2010-09-07 16:21:39 -03:00
Roberto Ierusalimschy
6828f6d427
new parameter 'majorinc' to control frequency of major collections
...
in generational mode
2010-09-03 11:14:01 -03:00
Roberto Ierusalimschy
daa5fe3e31
'loadin' should accept any value for the environment (not only tables) +
...
it should check whether chunk has upvalue named '_ENV'
2010-08-23 15:03:11 -03:00
Roberto Ierusalimschy
8d9ea59d28
'pushclosure' -> 'codeclosure' (as there is another 'pushclosure' in
...
'lvm.c) + small detail
2010-08-23 14:32:34 -03:00
Roberto Ierusalimschy
5e7dbd0b8b
api checks to ensure that thread is OK when using lua_call/lua_pcall
2010-08-04 15:40:28 -03:00
Roberto Ierusalimschy
cd6c276e41
use index 0 for header of list of free references
2010-08-03 17:21:16 -03:00
Roberto Ierusalimschy
fd4b4a2a68
detail: registry._PRELOAD must be a table, no need to check
2010-08-02 14:14:48 -03:00
Roberto Ierusalimschy
d447945685
'module'/'luaL_register' and associates are deprecated
2010-07-28 12:51:59 -03:00
Roberto Ierusalimschy
78f9635111
several new comments
2010-07-26 12:53:23 -03:00
Roberto Ierusalimschy
8b7cf8c62d
'lua_[gs]etenv' -> 'lua_[gs]etuservalue'
2010-07-25 12:18:19 -03:00
Roberto Ierusalimschy
73b0a3451d
environment variables consulted by Lua may be version-specific
2010-07-25 12:03:37 -03:00
Roberto Ierusalimschy
85c1461422
new macros LUA_VERSION_{MAJOR/MINOR/RELEASE}
2010-07-25 12:02:41 -03:00
Roberto Ierusalimschy
5ba556d27a
using curly brackets to mark blocks of '#if/#else/#endif's
2010-07-18 11:34:45 -03:00
Roberto Ierusalimschy
81dd13f4c6
new way to distinguish between indexing tables in registers and
...
tables in upvalues (+ fixed small bug when checking conflicts in
multiple assignments)
2010-07-07 13:27:29 -03:00
Roberto Ierusalimschy
6a02bbe1e2
better organization for fields in struct 'expdesc'
2010-07-02 17:42:40 -03:00
Roberto Ierusalimschy
7631c29b2f
comand-line option '-l' creates global with given name after
...
requiring module
2010-07-02 14:36:32 -03:00
Roberto Ierusalimschy
a9dc7c8828
functions lua_tonumber/lua_tointeger replaced by lua_tonumberx/lua_tointegerx
...
that have an extra out parameter with conversion status
2010-07-02 14:35:06 -03:00
Roberto Ierusalimschy
7192afafee
new module policy: C modules do not create globals and do not register
...
themselves with 'require' (let 'require' do its work); new auxiliary
functions luaL_newlib/luaL_newlibtable/luaL_setfuncs/luaL_requiref.
Old luaL_register will be deprecated.
2010-07-02 08:38:13 -03:00
Roberto Ierusalimschy
a139e2e003
old (and complex) luaL_findtable now used only in compatibility code
...
inside lauxlib.c
2010-06-30 14:40:27 -03:00
Roberto Ierusalimschy
a71c5f6f53
typo in comments
2010-06-30 11:11:17 -03:00
Roberto Ierusalimschy
d9ea6eca7c
macro 'key2tal' replaced by 'gkey' (as both were equal)
2010-06-25 09:18:10 -03:00
Roberto Ierusalimschy
ca3865cf1b
'getlocal' gets information about parameters of Lua functions
2010-06-21 13:30:12 -03:00
Roberto Ierusalimschy
bef5980744
no more support for old Mac OS systems
2010-06-18 14:23:02 -03:00
Roberto Ierusalimschy
409741e900
'what' may be NULL in 'kname'
2010-06-16 10:44:36 -03:00
Roberto Ierusalimschy
b98de30b8f
'ipair' is back
2010-06-13 16:41:34 -03:00
Roberto Ierusalimschy
9f48712c15
use ANSI versions of DLL functions in Windows
2010-06-13 16:36:17 -03:00
Roberto Ierusalimschy
bd262d591f
'coroutine' library separated from 'baselib'
2010-06-10 18:30:26 -03:00
Roberto Ierusalimschy
0d116c3ada
unused '#include' removed
2010-06-10 18:27:09 -03:00
Roberto Ierusalimschy
79f11fb2bb
back with #-comments for binary files
2010-06-09 14:53:59 -03:00
Roberto Ierusalimschy
fabe4ec487
better barrier for prototypes
2010-06-07 13:55:34 -03:00
Roberto Ierusalimschy
575074fd85
Lua closures are cached for reuse
2010-06-04 10:25:10 -03:00
Roberto Ierusalimschy
545f43065f
'luaF_newLclosure' gets prototype of new closure as argument
2010-06-04 10:06:15 -03:00
Roberto Ierusalimschy
3819c30e55
better names for barrier macros
2010-06-04 10:05:29 -03:00
Roberto Ierusalimschy
e94fac8956
bug: generational collection was not running collector! (must write
...
a test for this...)
2010-06-02 15:36:58 -03:00
Roberto Ierusalimschy
2c1a5d678d
factoring out common code in 'module' and 'luaL_openlib'
2010-05-31 13:34:19 -03:00
Roberto Ierusalimschy
bd619b9311
new macro MAXUPVAL (maximum number of upvalues per closure)
2010-05-31 13:08:55 -03:00
Roberto Ierusalimschy
aca84ee1a0
correct definition for 'lua_cpcall' (tested)
2010-05-28 11:27:07 -03:00
Roberto Ierusalimschy
5038e3c58c
corrected compatibility macro 'lua_cpcall' (untested)
2010-05-27 09:06:42 -03:00
Roberto Ierusalimschy
5a7dee0c5d
added class '%g' in patterns (for graphical characters)
2010-05-24 16:34:57 -03:00
Roberto Ierusalimschy
ddf1f2a053
GC should not run when stopped, even in hard tests
2010-05-24 16:29:46 -03:00
Roberto Ierusalimschy
e34d3c06b0
it is better to call open functions with lua_call to not mess
...
the caller stack
2010-05-20 09:57:59 -03:00
Roberto Ierusalimschy
e8a2c36909
more comments
2010-05-18 14:32:19 -03:00
Roberto Ierusalimschy
3c39a0e8cb
bug: loadfile of binary files read first character twice
2010-05-18 14:21:24 -03:00
Roberto Ierusalimschy
3d45a8eb1c
really stop collection during finalizers
2010-05-17 17:39:31 -03:00
Roberto Ierusalimschy
3d80aeab5a
lua_pushstring may reallocate the stack, making 'o' a dangling
...
pointer
2010-05-17 17:10:17 -03:00
Roberto Ierusalimschy
3811e23b32
detail (comment)
2010-05-17 15:30:27 -03:00
Roberto Ierusalimschy
12c764ed1e
semicolons now represent the empty statement
2010-05-15 10:32:02 -03:00
Roberto Ierusalimschy
e99e9a9473
patches for last two bugs (string.format and io.read)
2010-05-14 12:34:57 -03:00
Roberto Ierusalimschy
f35ac38e1d
updated depenency lists + eliminated duplication of definitions
...
for MYCFLAGS, MYLDFLAGS, and MYLIBS.
2010-05-14 12:08:10 -03:00
Roberto Ierusalimschy
058279d548
comments
2010-05-14 12:03:43 -03:00
Roberto Ierusalimschy
69ba1ac441
new "instruction" 'absindex'
2010-05-14 10:15:54 -03:00
Roberto Ierusalimschy
4a925c1552
in 'absindex', do not need to call gettop (can inline it)
2010-05-14 10:15:26 -03:00
Roberto Ierusalimschy
cf531912f2
one more macro (mvdispatch) to easy experiments with alternative
...
dispatch methods
2010-05-13 16:53:05 -03:00
Roberto Ierusalimschy
0d00729e31
detail (breaking a long line)
2010-05-13 09:03:26 -03:00
Roberto Ierusalimschy
b6e9fcbd70
use of macro ('vmcase') to format all cases in main switch of
...
'luaV_execute' (to facilitate experiences with direct threading)
2010-05-12 17:40:35 -03:00
Roberto Ierusalimschy
8554baeacf
small changes in 'luaV_execute' to make cases more regularly formatted
2010-05-12 17:31:33 -03:00
Roberto Ierusalimschy
f5b7f077ec
added comments to '#else' and '#endif' in long conditionals
2010-05-12 11:17:36 -03:00
Roberto Ierusalimschy
e924a7f9ea
new API function 'lua_absindex'
2010-05-12 11:09:20 -03:00
Roberto Ierusalimschy
4fd76b8148
avoid "strong" cast
2010-05-11 17:49:26 -03:00
Roberto Ierusalimschy
de0f51a02c
wrong type being assigned (not detected because of obj2gco macro)
2010-05-11 17:48:36 -03:00
Roberto Ierusalimschy
0567221848
udata in 'tobefnz' list be have old bit on (it will be cleared
...
when udata is moved to 'allgc' list)
2010-05-10 15:24:36 -03:00
Roberto Ierusalimschy
1c1a98e872
corrected some places where an old object could end up in front
...
of a new one + minimal documentation about this problem
2010-05-10 15:23:45 -03:00
Roberto Ierusalimschy
c006f085d9
new macro 'resetoldbit'
2010-05-10 13:46:49 -03:00
Roberto Ierusalimschy
a48e330f37
macros 'lua_number2int' and 'lua_number2uint' for Visual Studio
...
corrected and tested
2010-05-10 13:38:58 -03:00
Roberto Ierusalimschy
dcc070683c
avoid reserving LUA_RIDX_LAST slots in any table used by reference
...
system. Store free list in a field indexed by a unique name,
instead of using a numerical index.
2010-05-10 12:25:02 -03:00
Roberto Ierusalimschy
2d81cfa4e1
corrected definition of 'lua_register' (there is no LUA_ENVIRONINDEX
...
anymore)
2010-05-10 10:50:20 -03:00
Roberto Ierusalimschy
0bccf03d7e
slightly better definition for 'changenvalue'
2010-05-07 15:44:46 -03:00
Roberto Ierusalimschy
ad2b5decc8
'lua_assert' can be empty when assertions are off
2010-05-07 15:44:12 -03:00
Roberto Ierusalimschy
32c1764b5d
slightly better definition for 'isgray'
2010-05-07 15:43:51 -03:00
Roberto Ierusalimschy
de97177744
avoid 'else assert' (which may result in an empty else)
2010-05-07 15:43:24 -03:00
Roberto Ierusalimschy
fa2ddb070a
details (to avoid too long strings in assertions)
2010-05-07 15:23:17 -03:00
Roberto Ierusalimschy
0fac33da9e
bug: incremental sweep was not cleaning old bits (as it stopped in the
...
first old object) + bug: moving udata to 'udgc' list might put old
object in front a new one + some new macros + generational mode may
be in 'pause' state (it just skips 'markroot')
2010-05-07 15:19:36 -03:00
Roberto Ierusalimschy
8e1bdda66a
stupid bug when calling 'luaC_changemode' (in function lua_gc)
2010-05-07 15:10:01 -03:00
Roberto Ierusalimschy
9c1347e647
more tests in 'lua_checkmemory' + more information in function
...
'gccolor'
2010-05-07 15:09:23 -03:00
Roberto Ierusalimschy
b373a40133
new macro 'isgenerational' + new macro 'isold' + better deffinition
...
for 'isdead', compatible with the code used by 'sweeplist'
2010-05-07 15:08:05 -03:00
Roberto Ierusalimschy
25951e0ea5
some cleaning in 'sweeplist' (threads do not need to be traversed
...
if they are going to be collected + use of bit masks to unify
differences in generational and incremental modes)
2010-05-06 15:18:07 -03:00
Roberto Ierusalimschy
a4f20e3c8b
comments
2010-05-06 15:17:22 -03:00
Roberto Ierusalimschy
8c583c61a3
more tests in 'lua_checkmemory'
2010-05-06 15:16:57 -03:00
Roberto Ierusalimschy
d2ea5b00b7
new function 'luaC_changemode' +
...
bug: objects entering the 'allgc' list must have their OLDBIT cleared
(upvalues being cleared) + bug: in 'checkSizes', KGC_EMERGENCY is
stored in 'gckind' field, not in 'gcstate' + current white changes when
entering sweep phase (so there are dead objects only in that phase)
2010-05-05 15:58:36 -03:00
Roberto Ierusalimschy
d77898597e
new function 'luaC_changemode'
2010-05-05 15:53:41 -03:00
Roberto Ierusalimschy
237f755dca
typos in comments
2010-05-05 15:49:56 -03:00
Roberto Ierusalimschy
7444b5a1d5
better documentation of GC costs
2010-05-05 10:39:58 -03:00
Roberto Ierusalimschy
e7ce7e1850
changes in patch to monitor garbage collection
2010-05-04 15:10:02 -03:00
Roberto Ierusalimschy
3e662cec89
full GC must run finalizers only after finishing everything else
...
(including a return to generational mode if needed)
2010-05-04 15:09:06 -03:00
Roberto Ierusalimschy
fde866e303
details (comments)
2010-05-04 14:25:19 -03:00
Roberto Ierusalimschy
2d7a81a204
missing parentheses in declaration
2010-05-04 14:21:08 -03:00
Roberto Ierusalimschy
658ea8752b
no need to handle '\0' differently from other control chars in
...
format '%q'
2010-05-04 14:20:33 -03:00
Roberto Ierusalimschy
aa73403ba4
no need of a KGC_FORCED collection kind; it has the same behavior of
...
a normal collection
2010-05-03 14:39:48 -03:00
Roberto Ierusalimschy
0c27de2e7b
no more 'finalize' phase in GC; finalizers are called along the
...
entire cycle
2010-05-03 14:33:39 -03:00
Roberto Ierusalimschy
d25f7f9d78
items in 'tobefnz' are kept black (as before recent change) and changed
...
to white only when needed (being moved to 'allgc' when not keeping
invariant).
2010-05-03 08:55:40 -03:00
Roberto Ierusalimschy
85555646e3
invariant must be kept in atomic 'phase' too
2010-05-03 08:24:30 -03:00
Roberto Ierusalimschy
4d871ee973
"gray lists" only need to be valid when 'keepinvariant' is true
2010-04-30 15:37:14 -03:00
Roberto Ierusalimschy
b9e1dec2cb
added comment explaining a bit about the invariants of the collector
2010-04-30 15:36:45 -03:00
Roberto Ierusalimschy
dc2b8a0073
detail
2010-04-30 15:36:22 -03:00
Roberto Ierusalimschy
9a9fe42deb
wrong comment
2010-04-30 15:17:24 -03:00
Roberto Ierusalimschy
0062db1e06
default PAUSE should be 200 (differences may be corrected in
...
internal multiplers)
+ check for unbilt stack equal the one used by lgc.c
2010-04-30 11:22:23 -03:00
Roberto Ierusalimschy
23001d8607
nasty GC bug: upvalue must be turned white when not keeping invariant,
...
but barrier was not being called when uv->v were already white.
2010-04-29 18:43:36 -03:00
Roberto Ierusalimschy
5d79c6684b
removed commented-out debugging code
2010-04-29 18:42:33 -03:00
Roberto Ierusalimschy
3410dcd375
new way to control GC speed
2010-04-29 14:35:10 -03:00
Roberto Ierusalimschy
5a7a0c72d8
'luaC_linkupval' embedded into call site
2010-04-29 14:34:35 -03:00
Roberto Ierusalimschy
ee7478e884
improved 'lua_checkmemory', with better control over gray objects
2010-04-29 14:33:51 -03:00
Roberto Ierusalimschy
aaa5d7adab
'luaC_linkupval' moved into 'lfunc.c' code + new way to control GC speed
2010-04-29 14:32:40 -03:00
Roberto Ierusalimschy
3eb1788bb4
new way to control GC speed (keeping a 'debt' counter)
2010-04-29 14:31:31 -03:00
Roberto Ierusalimschy
00114a95b2
lots of new comments + small changes in loop controls + other small
...
"janitor work"
2010-04-26 14:58:00 -03:00
Roberto Ierusalimschy
4aaf0ef75c
"to-be-finalized" objects marked and sweeped like all other objects
2010-04-20 17:15:30 -03:00
Roberto Ierusalimschy
ed720d09f3
upvalue barriers for Lua functions must act on the upvalue itself,
...
not on its closure
2010-04-20 17:14:50 -03:00
Roberto Ierusalimschy
376e939ef6
missing parentheses around 'luaL_pushresultsize' declaration
2010-04-19 15:52:15 -03:00
Roberto Ierusalimschy
9d28e2b3e5
bug with io.read(op, "*n")
2010-04-19 15:04:58 -03:00
Roberto Ierusalimschy
49ca1f7083
allows thread switches (when/if there are thread switches) in the same
...
places that finalizers can run (so they should be safe...)
2010-04-19 14:58:46 -03:00
Roberto Ierusalimschy
4db6f20770
ensure that 'luai_userstatethread' is always called (even if
...
'stack_init' throws a memory error)
2010-04-19 14:40:13 -03:00
Roberto Ierusalimschy
cca71912e6
'gcinfo' was deprecated in version 5.0.
2010-04-19 14:02:02 -03:00
Roberto Ierusalimschy
8003e9544d
'string.format' may get buffer as an argument when there are
...
missing arguments and format string is too long
2010-04-19 13:39:25 -03:00
Roberto Ierusalimschy
973d81efb3
complete control over number of each kind of object allocated
2010-04-19 13:38:25 -03:00
Roberto Ierusalimschy
26d4a73962
with light C functions, 'pairs' does not need to keep 'next' as an
...
upvalue.
2010-04-19 13:36:06 -03:00
Roberto Ierusalimschy
99a39f6f4a
tells the allocation function that the first block is a thread
2010-04-19 13:34:46 -03:00
Roberto Ierusalimschy
1bb407e494
in lua_gc/step, 'luaC_step' changes GCthreshold, so there was little
...
control over the real step size.
2010-04-19 13:33:19 -03:00
Roberto Ierusalimschy
53f9499f7f
"light C function" is a better name than "C-function pointer"
2010-04-18 10:22:48 -03:00
Roberto Ierusalimschy
575befc394
comparsion tag methods follow the same rule as other binary TMs
2010-04-18 10:15:11 -03:00
Roberto Ierusalimschy
e7ffb1b501
macro LUA_USE_LONGJMP allows choosing longjmp when compiling Lua as
...
C++ code
2010-04-18 09:41:35 -03:00
Roberto Ierusalimschy
c066ac10a9
better line numbers for function calls and unary/binary operators +
...
null statement + no more "ambiguous syntax" restriction
2010-04-17 09:46:32 -03:00
Roberto Ierusalimschy
1e6940f291
'gcstate' now also runs collector until given state + small changes
...
in 'testC' to test 'lua_topointer' and 'lua_tocfunction'
2010-04-16 14:42:49 -03:00
Roberto Ierusalimschy
d8d81ba891
new escape sequence '\*' + several comments + moving options from
...
switch default into cases (as now locale is fixed)
2010-04-16 09:31:07 -03:00
Roberto Ierusalimschy
cf22133b69
no need to avoid calling ctype functions as now they are implemented
...
by us (no inefficiencies due to accessing locale information)
2010-04-15 16:44:43 -03:00
Roberto Ierusalimschy
b7be05ad27
invalid instructions "cannot" happen
2010-04-15 16:43:43 -03:00
Roberto Ierusalimschy
afdb19ac82
no more 'ccall' nor 'cpcall' functions. (With light C functions they
...
are obsolete.)
2010-04-14 12:14:21 -03:00
Roberto Ierusalimschy
7dfa4cd655
first implementation of light C functions
2010-04-14 12:13:48 -03:00
Roberto Ierusalimschy
fc6203ee43
BUG: 'string.format' may get buffer when there are missing arguments
2010-04-12 13:13:02 -03:00
Roberto Ierusalimschy
b2dd246b7a
better control in 'totalmem' over choosing counters
2010-04-12 13:07:39 -03:00
Roberto Ierusalimschy
d20ff60615
new macro LUA_NUMTAGS
2010-04-12 13:07:29 -03:00
Roberto Ierusalimschy
d41b467320
check memory allows strings to live in the main GC list (it should
...
work ok).
2010-04-12 09:42:07 -03:00
Roberto Ierusalimschy
4541243355
patterns now accept '\0' as a regular character
2010-04-12 09:00:50 -03:00
Roberto Ierusalimschy
9100f7479a
new implementation for Generic Buffer manipulation (using userdata as
...
temporary buffer space)
2010-04-09 13:14:46 -03:00
Roberto Ierusalimschy
055104f5b6
keep memory-error message in the global state, so that its use
...
does not depend on Lua internalizing strings to avoid a string
creation on memory errors
2010-04-08 14:16:46 -03:00
Roberto Ierusalimschy
28aa733c15
macro 'eqstr' was being used to compare non-string entities
2010-04-08 14:06:33 -03:00
Roberto Ierusalimschy
6abde1b05a
no need to keep "_ENV" name in global state (can be kept in lex state)
2010-04-05 13:35:37 -03:00
Roberto Ierusalimschy
d394d5536a
new macro 'eqstr'
2010-04-05 13:26:37 -03:00
Roberto Ierusalimschy
a2f98314a3
'lua_pushstring' now uses 'luaS_new'
2010-04-05 11:21:38 -03:00
Roberto Ierusalimschy
a09c8d7beb
cannot sweep main thread in sweepstring phase
2010-04-05 11:15:35 -03:00
Roberto Ierusalimschy
f80ff7a336
'luaS_new' changed from macro to function
2010-04-03 17:24:18 -03:00
Roberto Ierusalimschy
a08fc34ee4
avoid using 'luaS_new' when can use 'luaS_newlstr'
2010-04-02 12:39:07 -03:00
Roberto Ierusalimschy
d00d2eaf51
small changes in 'luaO_pushvfstring'
2010-04-02 12:30:27 -03:00
Roberto Ierusalimschy
11126422d9
option to return GC to normal (incremental, non generational) mode
2010-04-02 12:19:19 -03:00
Roberto Ierusalimschy
e54668b696
added proper code to trace garbage collection
2010-04-02 11:37:41 -03:00
Roberto Ierusalimschy
9eb832de54
work related to hooks moved from 'luaV_execute' to 'traceexec'
2010-03-29 17:45:49 -03:00
Roberto Ierusalimschy
82a1f5d354
comments
2010-03-29 14:44:31 -03:00
Roberto Ierusalimschy
a8d3aa14fd
global table now is only kept in the registry
2010-03-29 14:43:14 -03:00
Roberto Ierusalimschy
064e406f67
no more fenvs!
2010-03-26 17:58:11 -03:00
Roberto Ierusalimschy
5c87f61e6b
major collections in generational mode
2010-03-25 16:37:23 -03:00
Roberto Ierusalimschy
3aa9598177
'mainthread' is not inserted in the 'allgc' list anymore, but swept
...
separately.
2010-03-25 10:06:36 -03:00
Roberto Ierusalimschy
64d39ed1b6
generational mode no longer sweep old objects
2010-03-24 12:51:10 -03:00
Roberto Ierusalimschy
4433dbb5f5
userdata with finalizers are kept in a separated list ('udgc'), instead
...
of at the end of 'rootgc' (which was renamed to 'allgc', as it is not
"root" in the usual meaning for collectors)
2010-03-24 10:07:01 -03:00
Roberto Ierusalimschy
5cb128ea54
BUG: emergency collector might resize 'strt' (string table) when
...
creating a new string
+ atomic and markroot steps has some cost
+ full collection must leave collector in proper state when mode
is generational
2010-03-23 17:16:06 -03:00
Roberto Ierusalimschy
74123e9686
draft version of a generational mode for garbage collection. (Not well
...
tested; no major collections; ...)
2010-03-22 15:28:03 -03:00
Roberto Ierusalimschy
9c196bebad
detail (wrong comment about LUAI_GCPAUSE)
2010-03-22 14:45:55 -03:00
Roberto Ierusalimschy
28b2566c97
'lua_assert' not visible from libraries
2010-03-22 14:28:31 -03:00
Roberto Ierusalimschy
caf74dd731
'cpcall' renamed to 'ccall' as it does not do a protected call
2010-03-19 18:04:17 -03:00
Roberto Ierusalimschy
62840c5fad
'ipairs' is deprecated
2010-03-19 12:52:48 -03:00
Roberto Ierusalimschy
5ca7cdd709
for compatibility only: 'module' changes the first upvalue of
...
calling function to affect its environment
2010-03-19 12:02:34 -03:00
Roberto Ierusalimschy
1514e49d43
avoid using function environments in C libraries (as it probably will
...
be deprecated)
2010-03-17 18:37:37 -03:00
Roberto Ierusalimschy
22ef84b6c8
'_ENV' name permanently stored in global state for easier access
2010-03-13 12:55:42 -03:00
Roberto Ierusalimschy
63a2b62468
must include 'string.h' because a macro uses 'strlen'
2010-03-13 12:55:01 -03:00
Roberto Ierusalimschy
489253d753
better definitions for lua_[gs]etglobal + less uses of ENVIRONINDEX
2010-03-13 00:57:46 -03:00
Roberto Ierusalimschy
25c557ec63
first version of _ENV; no more global variables
2010-03-12 16:14:06 -03:00
Roberto Ierusalimschy
f292760f12
small optimization in luaL_addlstring (avoid adding chars one by one)
...
(suggested by Chuck Coffing)
2010-03-12 15:59:32 -03:00
Roberto Ierusalimschy
1124cb1247
first step towards _ENV: all chunks have an puvalues _ENV with the
...
global table
2010-03-08 13:55:52 -03:00
Roberto Ierusalimschy
c295147874
when finding a 'name' for a function, handle the case when the function
...
is a for iterator
2010-03-05 11:01:29 -03:00
Roberto Ierusalimschy
e560ac4862
when searching for a variable name, look existing upvalues before
...
goingg to upper levels
2010-03-04 15:12:57 -03:00
Roberto Ierusalimschy
915a9a912c
just in case, better to flush error messages
2010-03-03 15:53:02 -03:00
Roberto Ierusalimschy
ae0a5e2142
new option '*L' for io.read + options for io.lines
2010-03-03 15:48:57 -03:00
Roberto Ierusalimschy
347f0c33d1
avoid 'continue' unless necessary
2010-02-27 18:16:24 -03:00
Roberto Ierusalimschy
622e448710
removed useless test (argv[i] cannot be NULL when i<argc)
2010-02-27 18:15:36 -03:00
Roberto Ierusalimschy
0fe2576a39
new instructions to optimize indexing on upvalues
2010-02-26 17:40:29 -03:00
Roberto Ierusalimschy
d08d237a49
detail: in loadfile read function, no need to return NULL on EOF;
...
size ==0 is enough to signal EOF.
2010-02-18 17:37:57 -02:00
Roberto Ierusalimschy
64a7ec987c
avoid using 'ungetc' in loadfile
2010-02-18 17:32:41 -02:00
Roberto Ierusalimschy
4274738e81
new macro 'luai_writestringerror'
2010-02-18 17:18:41 -02:00
Roberto Ierusalimschy
0d7d559dcc
no need to flush either stderr or \n-terminated outputs
2010-02-11 15:12:27 -02:00
Roberto Ierusalimschy
af512ad6da
use of 'conventional' names for shift and rotate operations +
...
right/left versions for them
2010-02-11 13:55:29 -02:00
Roberto Ierusalimschy
d27108ccd5
removed support for '#fist-line comment' on binary files (as binary
...
files do not have lines...)
2010-02-11 13:52:50 -02:00
Roberto Ierusalimschy
a838b3b496
better usage messages, showing entire offending argument
2010-02-09 09:58:57 -02:00
Roberto Ierusalimschy
4c54cd3a10
when yielding, original 'func' value must be kept and restored so
...
that 'poscall' puts results in the right slot.
2010-02-09 09:56:29 -02:00
Roberto Ierusalimschy
c8ff7de7f0
field 'oldtop' renamed to 'extra', as it can be used for other
...
purposes
2010-02-09 09:55:37 -02:00
Roberto Ierusalimschy
3bae8e047c
typo (thanks to Gavin)
2010-02-05 17:09:09 -02:00
Roberto Ierusalimschy
4f5f2fe367
new function 'luaL_cpcall'
2010-01-21 14:49:21 -02:00
Roberto Ierusalimschy
01586d539e
typo in comment
2010-01-21 14:31:24 -02:00
Roberto Ierusalimschy
c8ab34ab7a
better messages for invalid options
2010-01-21 14:31:06 -02:00
Roberto Ierusalimschy
36ab1ee10c
__unm metamethod gets nil as its 2nd parameter
2010-01-15 14:23:58 -02:00
Roberto Ierusalimschy
193ce46970
table.pack was locking last result, avoiding its collection
2010-01-13 17:59:10 -02:00
Roberto Ierusalimschy
b678f246a4
HINSTANCE -> HMODULE (they are the same thing, but the MS documentation
...
uses the latter) + LoadLibrary -> LoadLibraryEx with optional arguments,
to allow the option LOAD_WITH_ALTERED_SEARCH_PATH
2010-01-13 14:30:27 -02:00
Roberto Ierusalimschy
f270e7f044
warnings that are not compatible with C++ separated from other warning
...
options
2010-01-13 14:19:54 -02:00
Roberto Ierusalimschy
070d3743a7
"no value" added to array luaT_typenames + occurrences of "userdata"
...
in that array unified in a single address
2010-01-13 14:18:25 -02:00
Roberto Ierusalimschy
0c7de97d47
correct error message when yielding from outside a coroutine
2010-01-13 14:17:32 -02:00
Roberto Ierusalimschy
900b7d4514
on 64-bit machines, an address may not fit into a 'long', so it
...
is better to convert from pointer to void to pointer to function
directly, even if ANSI C does not like it.
2010-01-13 14:09:05 -02:00
Roberto Ierusalimschy
91f0b20a0e
missing standard defines
2010-01-12 17:40:02 -02:00
Roberto Ierusalimschy
e4b4623abc
'searchpath' changes dots into directory separators
2010-01-11 15:55:25 -02:00
Roberto Ierusalimschy
cef96b73e1
added casts from int to enumerations to follow C++ rules
2010-01-11 15:38:30 -02:00
Roberto Ierusalimschy
427e01eb63
removed useless initialization
2010-01-11 15:37:59 -02:00
Roberto Ierusalimschy
d320c908d0
conversion from pointer to void to pointer to function seems more
...
"correct" if done through an integral type (because conversions
between pointers and numbers are allowed, only "implementation
defined").
2010-01-11 15:34:59 -02:00
Roberto Ierusalimschy
8bfc696676
missing 'external' in variable declaration
2010-01-11 15:33:09 -02:00
Roberto Ierusalimschy
97a35e70af
pathes corrected to 5.2
2010-01-11 15:15:30 -02:00
Roberto Ierusalimschy
03b556b963
corrected copyright notice to 2010
2010-01-11 15:15:11 -02:00
Roberto Ierusalimschy
572b94bbcb
include of 'windows.h' moved to where it is needed
2010-01-11 15:11:24 -02:00
Roberto Ierusalimschy
692209fa8d
Dynamic C functions should be created with the global table as their
...
initial environments
2010-01-11 15:06:31 -02:00
Roberto Ierusalimschy
953d499ea2
changed macro lua_number2int for Windows (added brackets; some recent
...
compilers complain about the old format) + added missing definition
for 'lua_number2int' in Windows case.
2010-01-11 14:35:20 -02:00
Roberto Ierusalimschy
a541ada194
"-"-trick in C packages now accept name-v13...
2010-01-11 14:10:47 -02:00
Roberto Ierusalimschy
55d3138397
removed old prototype for 'luaI_openlib' (which does not exist anymore)
2010-01-11 14:00:45 -02:00
Roberto Ierusalimschy
e74e56f2b1
better may to force recompilation when makefile changes
2010-01-08 18:05:36 -02:00
Roberto Ierusalimschy
1ebf109c53
'setobj' must assing fields one by one, to allow trick of using
...
pad space in table keys
2010-01-08 18:00:20 -02:00
Roberto Ierusalimschy
f75be1cb28
removed parentheses around some function names in their definitions
2010-01-08 13:16:56 -02:00
Roberto Ierusalimschy
16d2ad88fe
some changes in compatibility macros: added LUA_COMPAT_ALL + compatibility
...
macros from lua.h and lauxlib.h moved to luaconf.h
2010-01-06 13:15:04 -02:00
Roberto Ierusalimschy
f3a6815000
compatibility code removed or moved to luaconf.h
2010-01-06 13:14:15 -02:00
Roberto Ierusalimschy
19f8c87375
compatibility code moved to luaconf.h
2010-01-06 13:08:00 -02:00
Roberto Ierusalimschy
5bcfe0c700
new debug info 'isvararg' and 'nparams'
2010-01-06 12:42:35 -02:00
Roberto Ierusalimschy
8cd395564c
no need to use two different defines (LUA_DL_DLOPEN and LUA_USE_DLOPEN)
2010-01-06 12:35:17 -02:00
Roberto Ierusalimschy
389c890ed3
again changing macro to function to save a few bytes
2010-01-06 09:48:02 -02:00
Roberto Ierusalimschy
e3866afa97
macro 'luaY_checklimit' changed into a function (and renamed 'checklimit').
...
It makes no sense to trade space for time in the parser.
2010-01-05 16:46:58 -02:00
Roberto Ierusalimschy
25189b420d
field 'nups' in struct 'lua_Debug' changed from 'int' to 'unsigned
...
char' to save some space (even C functions cannot have more than
maxchar upvalues).
2010-01-05 16:33:26 -02:00
Roberto Ierusalimschy
cec25167d1
new api_check that 'pcallk' cannot be called inside hooks
2010-01-04 16:17:51 -02:00
Roberto Ierusalimschy
1fd4c482a0
reorganization of switch in function 'match' (details)
2010-01-04 14:37:19 -02:00
Roberto Ierusalimschy
35e729fa6d
comments + small details
2010-01-04 14:36:39 -02:00
Roberto Ierusalimschy
0dc09cb42e
'unpack' moved to table library (and therefore "renamed" to
...
'table.unpack'.
2009-12-28 14:30:31 -02:00
Roberto Ierusalimschy
cc1cbd19a0
'lua_cpcall' is deprecated + other small changes in 'pmain' (comments
...
and reordering to check arguments before running any Lua code)
2009-12-22 14:47:12 -02:00
Roberto Ierusalimschy
cb3f95d516
'lua_cpcall' is deprecated
2009-12-22 14:47:00 -02:00
Roberto Ierusalimschy
f84b575cfa
no more pseudoindex LUA_GLOBALSINDEX; global table now accessible
...
through registry
2009-12-22 13:32:50 -02:00
Roberto Ierusalimschy
3cb343efd6
code for error message for 'setn' removed
2009-12-18 14:53:12 -02:00
Roberto Ierusalimschy
ec0fc1a13b
missing parentheses around 'lua_version' + moving typdef's before
...
the extra include
2009-12-18 13:32:36 -02:00
Roberto Ierusalimschy
c3a6f3fa1c
'lua_objlen' replaced by 'lua_rawlen', 'lua_len', and 'luaL_len'
2009-12-17 14:20:01 -02:00
Roberto Ierusalimschy
0bbdddc86b
allocator function receives the tag of object being allocated in 'osize'
...
when 'ptr' is NULL.
2009-12-17 13:46:44 -02:00
Roberto Ierusalimschy
b3b8dfaaea
yet more options moved from luaconf.h into internal files
2009-12-17 11:08:51 -02:00
Roberto Ierusalimschy
adc6a4865b
macro name change: LUA_INIT->LUA_INIT_VAR
2009-12-17 11:07:41 -02:00
Roberto Ierusalimschy
2108754e46
macro name change: LUA_PATH->LUA_PATH_VAR, LUA_CPATH->LUA_CPATH_VAR,
...
LUA_PATHSEP->LUA_PATH_SEP, LUA_EXECDIR->LUA_EXEC_DIR
2009-12-17 11:06:47 -02:00
Roberto Ierusalimschy
46f1429936
more options moved from luaconf.h into internal files
2009-12-17 10:50:20 -02:00
Roberto Ierusalimschy
e0f9d1c8f5
removed export of function only for coco
2009-12-17 10:28:57 -02:00
Roberto Ierusalimschy
de6fc75d63
several configuration options that do not change often moved out of
...
luaconf.h and into more internal files
2009-12-17 10:26:09 -02:00
Roberto Ierusalimschy
2af0d3b459
allocator function receives the tag of object being allocated in 'osize'
...
when 'ptr' is NULL.
2009-12-16 14:42:58 -02:00
Roberto Ierusalimschy
9fbe0690fb
base-level C use global table as its environment
2009-12-15 09:25:36 -02:00
Roberto Ierusalimschy
a25b8ff69c
detail ('lua_tolstring' instead of lua_objlen)
2009-12-15 09:25:16 -02:00
Roberto Ierusalimschy
15b823ce4f
cleaner way to add extra space in a lua state.
2009-12-14 13:27:30 -02:00
Roberto Ierusalimschy
8da245bfd2
better to keep GC state numbers sequential, to optimize switch in
...
'singlestep'
2009-12-11 19:31:14 -02:00
Roberto Ierusalimschy
a2a2abcba4
new function 'luaC_runtilstate' to advance GC until a "valid" state
2009-12-11 17:14:59 -02:00
Roberto Ierusalimschy
2e51792596
avoid using deprecated macros lua_[gs]etglobal
2009-12-11 11:40:44 -02:00
Roberto Ierusalimschy
3a9ae612a4
macro 'ngcotouv' is the same as 'gco2uv', so it was removed
2009-12-11 11:39:34 -02:00
Roberto Ierusalimschy
9db693a57c
detail (comment)
2009-12-10 17:00:33 -02:00
Roberto Ierusalimschy
1375435e4a
several new features in testC to allow better testing of lua_resume
...
at the C API level
2009-12-10 16:21:28 -02:00
Roberto Ierusalimschy
2bb19ccf08
reordering of some functions + cleaner way to code lua_resume/resume +
...
small bug in lua_resume (in case of calling errors lua_resume should
remove only new arguments from the stack and push error message).
2009-12-10 16:20:07 -02:00
Roberto Ierusalimschy
64d5df7772
detail (lua_resume should empty coroutine stack even if they do not
...
fit into caller stack)
2009-12-10 16:17:37 -02:00
Roberto Ierusalimschy
2643da67c6
error messages from 'lua_resume' must be generated in protected mode,
...
to avoid raising memory errors
2009-12-08 16:59:24 -02:00
Roberto Ierusalimschy
ed117bb42a
lua_checkstack does not raise memory errors (instead it signals them)
2009-12-08 14:15:43 -02:00
Roberto Ierusalimschy
a4472490bc
new 'table.pack' function
2009-12-07 13:50:27 -02:00
Roberto Ierusalimschy
86312e1a7d
lua_objlen calls __len metamethod on tables (if present)
2009-12-07 13:49:47 -02:00
Roberto Ierusalimschy
df1dc3f1f5
strings in C scripts may be delimited by quotes + new functionality to
...
set C scripts as C hooks
2009-12-01 14:49:48 -02:00
Roberto Ierusalimschy
513d0258d9
details
2009-12-01 14:31:04 -02:00
Roberto Ierusalimschy
cfa8bc3ca4
continuations may be upvalues too
2009-11-27 13:39:31 -02:00
Roberto Ierusalimschy
a654e82f5c
coroutines may have C bodies
2009-11-27 13:38:51 -02:00
Roberto Ierusalimschy
3e41afcec5
extra api checks for number of returns of C functions and for lua_yield
2009-11-27 13:37:59 -02:00
Roberto Ierusalimschy
3acf5ec5a1
update of file dependencies (gcc -MM)
2009-11-27 12:39:31 -02:00
Roberto Ierusalimschy
93695db903
'table.maxn' deprecated
2009-11-26 15:35:13 -02:00
Roberto Ierusalimschy
9107dd115c
no more compatibility code for 'string.gfind'
2009-11-26 14:49:28 -02:00
Roberto Ierusalimschy
dc4c459546
a few new warnings
2009-11-26 14:36:55 -02:00
Roberto Ierusalimschy
19a6c38745
detail in 'currentpc' (only needs to work for Lua functions)
2009-11-26 13:34:15 -02:00
Roberto Ierusalimschy
3c4d970a7b
comment typos
2009-11-26 09:39:20 -02:00
Roberto Ierusalimschy
b0f2b288a6
new scheme for debug info about tail calls: no more 'fake' stack entries,
...
but stack entry knows whether it was tail called
2009-11-25 13:27:51 -02:00
Roberto Ierusalimschy
2b25489b47
'notail' -> 'noextrachars' ('notail' may confuse with tail calls)
2009-11-24 16:05:12 -02:00
Roberto Ierusalimschy
a6f465f558
new mark LUAMOD_API for all luaopen_* functions
2009-11-24 10:05:44 -02:00
Roberto Ierusalimschy
9a41506b8f
'os.exit' should close state only when second argument is true
2009-11-23 16:20:38 -02:00
Roberto Ierusalimschy
9a6d9ea57a
GC may get stuck during a parser and avoids proper resizing of the
...
string table, making its lists grow too much and degrading performance.
2009-11-23 12:59:30 -02:00
Roberto Ierusalimschy
062e809e54
new macros 'LUAI_DDEC'/'LUAI_DDEF' to better control declarations and
...
definitions of non-static variables
2009-11-19 17:06:52 -02:00
Roberto Ierusalimschy
b4c1824824
'luaV_arith' must be marked 'LUAI_FUNC' (as all non-static functions)
2009-11-19 17:04:58 -02:00
Roberto Ierusalimschy
2e5ef6a9fb
new macro 'isdummy'
2009-11-19 15:54:07 -02:00
Roberto Ierusalimschy
1dea393058
small corrections for 'luaall.c'
2009-11-19 14:26:52 -02:00
Roberto Ierusalimschy
45dec34597
comments
2009-11-19 14:26:29 -02:00
Roberto Ierusalimschy
b40a38a8ac
remove declaration of removed function
2009-11-19 14:24:41 -02:00
Roberto Ierusalimschy
ac899a6307
'debug.joinupvalue' -> 'debug.upvaluejoin'
2009-11-18 13:50:18 -02:00
Roberto Ierusalimschy
ce444bff33
(huge) simplification of GC management
2009-11-18 11:13:47 -02:00
Roberto Ierusalimschy
2d5931ebc8
ensure that reader function cannot yield during parsing
2009-11-17 14:46:44 -02:00
Roberto Ierusalimschy
35fa276099
parser/scanner keep GC running
2009-11-17 14:33:38 -02:00
Roberto Ierusalimschy
b51d76ce8d
when doing hard memory tests, perform a full GC at every possible step
2009-11-17 09:56:03 -02:00
Roberto Ierusalimschy
95020afb63
'module' returns the new module (to be used with lexical environments)
2009-11-16 13:51:19 -02:00
Roberto Ierusalimschy
c5050b1c41
functions 'getfenv' and 'setfenv' are deprecated
2009-11-16 13:51:03 -02:00
Roberto Ierusalimschy
b9063a08f5
new function 'loadin'
2009-11-13 15:01:40 -02:00
Roberto Ierusalimschy
7fe405739c
renaming: 'lua_upvaladdr' -> 'lua_upvalueid',
...
'lua_upvaljoin' -> 'lua_upvaluejoin'
2009-11-09 17:10:48 -02:00
Roberto Ierusalimschy
1ce819333d
new option 'isrunning' for 'lua_gc' (and 'collectgarbage')
2009-11-09 16:55:17 -02:00
Roberto Ierusalimschy
88eb901f81
registry and global table may be changed through the API without a
...
write barrier, so GC should visit them in the atomic phase.
2009-11-09 16:29:21 -02:00
Roberto Ierusalimschy
2583bac3d3
several small changes to simplify changing TValue if needed
2009-11-06 15:09:27 -02:00
Roberto Ierusalimschy
63a3b1a1eb
macro 'checkvalref' redefined as function (to avoid too long macros)
2009-11-06 15:08:43 -02:00
Roberto Ierusalimschy
fbf866a1a5
macro 'gkey' returns a "real" TValue*
2009-11-06 15:07:48 -02:00
Roberto Ierusalimschy
49a67c6d3f
new macro 'NILCONSTANT' to initialize nil constants
2009-11-06 15:07:12 -02:00
Roberto Ierusalimschy
a921d81033
avoid using 'ttype' when there is an explicit test + macro 'checkdeadkey'
...
to avoid repetitions
2009-11-06 15:06:19 -02:00
Roberto Ierusalimschy
155dd01163
avoid using 'ttype' when there is an explicit test
2009-11-06 15:05:34 -02:00
Roberto Ierusalimschy
599789a907
better to enclose macros in 'if' bodies with brackets
2009-11-06 15:03:37 -02:00
Roberto Ierusalimschy
9756f56354
better control over accesses to TValue fields
2009-11-05 15:43:54 -02:00
Roberto Ierusalimschy
b7d5f18d71
api functions to manipulate upvalues do not need to check their
...
arguments (the caller must check them before calling)
2009-11-05 15:26:00 -02:00
Roberto Ierusalimschy
5598b2bc55
new functions to identify and join upvalues
2009-11-05 14:48:31 -02:00
Roberto Ierusalimschy
77077b39d5
comment explaining OP_VARARG was wrong (and corresponding code was not
...
very clear)
2009-10-28 10:20:07 -02:00
Roberto Ierusalimschy
5bc91c6405
no more one environment per thread: all threads share a single global
...
environment
2009-10-23 17:12:19 -02:00
Roberto Ierusalimschy
f5073de0a7
'ipairs' goes until length of array instead of stopping at the first nil
2009-10-23 10:50:25 -02:00
Roberto Ierusalimschy
f6ed285cf2
new hash for doubles based on frexp, to avoid low-level tricks
2009-10-23 10:31:12 -02:00
Roberto Ierusalimschy
1448e736f0
better documentation for constructor syntax
2009-10-14 13:43:11 -03:00
Roberto Ierusalimschy
6e415e9387
local function definition does not need to correct debug information
2009-10-13 16:35:42 -03:00
Roberto Ierusalimschy
b114c99a60
two small bugs: 'debug.getinfo' did not consider negative indices as out
...
of range + 'debug.[gs]etlocal' crash on tail calls
2009-10-13 16:07:40 -03:00
Roberto Ierusalimschy
916587508c
parser keeps list of active local variables in a single dynamic array,
...
therefore saving C stack space
2009-10-11 17:02:19 -03:00
Roberto Ierusalimschy
a5382b763c
new function lua_copy
2009-10-05 13:44:33 -03:00
Roberto Ierusalimschy
ba21aa8b2b
'cpcall' must ensure correct environment for called function
2009-09-30 17:49:47 -03:00
Roberto Ierusalimschy
d119cf3035
a few more instructions to testC (func2udata and getfield)
2009-09-30 17:49:25 -03:00
Roberto Ierusalimschy
0ac3d07ea6
first implementation of lexical environments
2009-09-30 12:38:37 -03:00
Roberto Ierusalimschy
5938212748
information about upvalues (where they come from) kept in Proto structure,
...
instead of sequence of pseudo-opcodes after OP_CLOSURE
2009-09-28 13:32:50 -03:00
Roberto Ierusalimschy
1829911d7c
some operations may shrink g->totalbytes so g->estimate must be
...
more flexible
2009-09-28 10:50:34 -03:00
Roberto Ierusalimschy
bed2cb725a
initialize g->estimate (just in case)
2009-09-28 10:50:19 -03:00
Roberto Ierusalimschy
ab75bd23ee
handle extended opcodes (with OP_EXTRAARG) when checking metamethod
...
calls
2009-09-28 09:37:17 -03:00
Roberto Ierusalimschy
cee94df6e0
function list in luaL_register may be NULL for an empty list
2009-09-28 09:36:40 -03:00
Roberto Ierusalimschy
fcc46467fa
limit of constants per function changed to 2^26 using extra arguments
...
to opcodes LOADK, GETGLOBAL, and SETGLOBAL
2009-09-23 17:33:05 -03:00
Roberto Ierusalimschy
f8e354e240
detail (space between function name and its parameter list)
2009-09-23 17:14:00 -03:00
Roberto Ierusalimschy
a650378822
'cpcall' reimplemented as a predefined value in the registry
2009-09-21 09:09:52 -03:00
Roberto Ierusalimschy
99182c6872
references must start after predefined values in the registry
2009-09-18 15:58:45 -03:00
Roberto Ierusalimschy
67cae2854c
'lua_mainthread' replaced by new preregistered value LUA_RIDX_MAINTHREAD
2009-09-17 15:04:21 -03:00
Roberto Ierusalimschy
0e45ffb8e4
first implementation of 'lua_yieldk' (yield with continuation)
2009-09-14 11:30:39 -03:00
Roberto Ierusalimschy
071e54ae0b
extra facilities to testC: comments + commands print, callk and yield +
...
Cfunc with extra upvalues
2009-09-09 17:44:10 -03:00
Roberto Ierusalimschy
a68494fb32
'debug.[gs]etupvalue' should be able to access C upvalues too
2009-09-09 17:32:19 -03:00
Roberto Ierusalimschy
4b44793dc5
"bug": lua_createtable with sizes changed (array <-> record)
2009-09-07 11:24:12 -03:00
Roberto Ierusalimschy
90e2a716c8
details + comments
2009-09-05 09:39:29 -03:00
Roberto Ierusalimschy
d9fbbe1f23
"file:write" returns "file" in case of success
2009-09-01 16:10:48 -03:00
Roberto Ierusalimschy
4a714cebd1
API checks now have explanatory messages
2009-08-31 11:26:28 -03:00
Roberto Ierusalimschy
5b6be84106
ensures that argument 'mode' to 'io.open' matches "[rwa]%+?b?", to
...
avoid passing invalid modes to 'fopen'.
2009-08-28 10:51:57 -03:00
Roberto Ierusalimschy
b2bb2f7f59
better machinery to test continuations in the C API
2009-08-26 14:41:26 -03:00
Roberto Ierusalimschy
f096ab5421
correct way to check arguments to 'strftime'
2009-08-25 16:58:08 -03:00
Roberto Ierusalimschy
4e1ffc482a
test for 'fs' being NULL at the end of 'close_func' is useless ('fs'
...
cannot be NULl and the new ls->fs can only be NULL when the token
is EOS, in which case anchor_token has no effect).
2009-08-10 17:41:04 -03:00
Roberto Ierusalimschy
bc439e21cd
avoid an unprotected call to 'lua_tostring' which theoretically may
...
cause a panicked exit
2009-08-10 13:23:19 -03:00
Roberto Ierusalimschy
1b4480003b
"stange numbers" (-0 and NaN) also go to the constant table (as
...
strings with their binary representation). Therefore, constant
folding may produce these results.
2009-08-10 12:31:44 -03:00
Roberto Ierusalimschy
42167804b8
luaH_[gs]etnum renamed to luaH_[gs]etint (as they only accept integers,
...
not generic numbers).
2009-08-07 14:53:28 -03:00
Roberto Ierusalimschy
3135a6bbab
luaH_[gs]etnum renamed to luaH_[gs]etint (as they only accept integers,
...
not generic numbers)
2009-08-07 13:17:41 -03:00
Roberto Ierusalimschy
95cbc402dc
"But" -> "Bug" (misspelling)
2009-08-05 10:09:38 -03:00
Roberto Ierusalimschy
decada8dc2
'debug.getfenv' does not check whether it has an argument
2009-08-04 15:51:19 -03:00
Roberto Ierusalimschy
ee5d03b42a
small bug: debug.getfenv should check whether it has an argument
2009-08-04 15:27:57 -03:00
Roberto Ierusalimschy
323f33d014
'collectgarbage"count"' returns a second argument with the count%1024.
2009-08-04 15:20:18 -03:00
Roberto Ierusalimschy
55dc7fb240
bug: stack must be cleared until its end (including extra size) +
...
control of stack size moved to 'ldo.c'
2009-07-16 13:26:09 -03:00
Roberto Ierusalimschy
11d7ba79f2
tail calls do not need to move whole new frame down, only its slice
...
up to last parameter (the rest has not been used yet)
2009-07-15 15:38:16 -03:00
Roberto Ierusalimschy
bd5fa9cc8f
new macro 'getproto'
2009-07-15 15:37:19 -03:00
Roberto Ierusalimschy
2658c94925
detail (comment: 'correspoding' -> 'corresponding')
2009-07-15 14:57:30 -03:00
Roberto Ierusalimschy
215885768c
'index2adr' -> 'index2addr' (correct spelling)
2009-07-15 14:57:03 -03:00
Roberto Ierusalimschy
a5f68589c0
avoid using 'UNUSED' (not defined outside the kernel)
2009-07-15 14:49:48 -03:00
Roberto Ierusalimschy
28419c4383
'luaL_tolstring' uses 'lua_tolstring' instead of 'lua_tostring' and
...
'lua_objlen'
2009-07-15 14:47:34 -03:00
Roberto Ierusalimschy
5bff2aaf47
calls with LUA_MULTRET may leave no free slots in the stack
2009-07-15 14:35:20 -03:00
Roberto Ierusalimschy
f76f4cb79d
new way to control stack overflow, controling only total size of the stack
2009-07-15 14:26:14 -03:00
Roberto Ierusalimschy
abb85fc059
new definition for 'luaD_checkstack' to avoid possible overflows
2009-07-08 13:06:51 -03:00
Roberto Ierusalimschy
aabe3ddbf4
errors in 'resume' should be all protected
2009-07-08 13:06:07 -03:00
Roberto Ierusalimschy
0c258c8492
smart use of varargs may create functions that return too
...
many arguments and overflow the stack of C functions.
2009-07-02 16:57:34 -03:00
Roberto Ierusalimschy
d57c9cdefc
BUG: 'luaV_settable' may invalidate a reference to a table and try
...
to reuse it.
2009-07-01 18:10:33 -03:00
Roberto Ierusalimschy
afb3f7e754
bug: 'luaV_settable' may invalidate a reference to a table and try
...
to reuse it.
2009-07-01 17:31:25 -03:00
Roberto Ierusalimschy
88564c3aec
Standard library for bitwise operations
2009-07-01 13:17:08 -03:00
Roberto Ierusalimschy
3abe3da9fb
new module 'lbitlib.c' for bitwise operations
2009-07-01 13:16:40 -03:00
Roberto Ierusalimschy
eb8499c8e0
use of LUAI_UINT32 replaced by 'unsigned LUA_INT32' (one less
...
definition needed)
2009-07-01 13:14:15 -03:00
Roberto Ierusalimschy
47c562435b
better error messages for luaL_checkversion
2009-06-19 11:21:57 -03:00
Roberto Ierusalimschy
02504d86d3
l_version may be local to 'lua_version'
2009-06-19 11:21:23 -03:00
Roberto Ierusalimschy
4a818f068a
'checkversion' implemented in the auxiliary library
2009-06-18 15:59:58 -03:00
Roberto Ierusalimschy
1d6ebce296
new function 'lua_version' (so that 'checkversion' can be implemented
...
in the auxiliary library)
2009-06-18 15:59:18 -03:00
Roberto Ierusalimschy
bc3e02a1b7
default paths have dot option as the last one (to improve security)
2009-06-18 15:19:36 -03:00
Roberto Ierusalimschy
f4eed60ca9
better treatment of integer formats in string.format
2009-06-18 13:51:03 -03:00
Roberto Ierusalimschy
c1de1fdac6
small optimization in 'lua_arith' (avoids overhead in the common case
...
of both arguments being numbers)
2009-06-18 13:36:40 -03:00
Roberto Ierusalimschy
a36c8e1718
new macro 'changenvalue'
2009-06-18 13:36:40 -03:00
Roberto Ierusalimschy
d7872dcf91
small optimization (reorder of BinOpr enum to unify some cases
...
in switches)
2009-06-18 13:35:05 -03:00
Roberto Ierusalimschy
14115170bc
lua_objlen should not work for numbers (according to the manual)
2009-06-17 15:38:54 -03:00
Roberto Ierusalimschy
ec52149485
'lua_lessthan' replaced by more generic 'lua_compare'
2009-06-17 14:53:50 -03:00
Roberto Ierusalimschy
6980cb1aa7
new functions 'lua_arith' and 'lua_compare'
2009-06-17 14:53:14 -03:00
Roberto Ierusalimschy
59a59fafc6
exports luaV_arith to be used by lua_arith
2009-06-17 14:51:07 -03:00
Roberto Ierusalimschy
2bdd194f43
exports luaV_arith to be used by lua_arith + uses 'luaO_arith' to
...
perform basic arith. operations
2009-06-17 14:50:09 -03:00
Roberto Ierusalimschy
96fa34ec32
constant folding uses 'luaO_arith' to perform basic operations
2009-06-17 14:49:09 -03:00
Roberto Ierusalimschy
6a024df440
new function 'luaO_arith' to perform basic arithmetic operations
2009-06-17 14:48:34 -03:00
Roberto Ierusalimschy
77fd93188e
'lessequal' renamed 'luaV_lessequal' and exported to be used by
...
'lua_compare'
2009-06-17 13:17:14 -03:00
Roberto Ierusalimschy
a21c89ddc8
new API function 'lua_mainthread'
2009-06-15 16:51:31 -03:00
Roberto Ierusalimschy
49b88b1c39
patch for wrong code generation for some particular boolean expressions
2009-06-15 11:12:59 -03:00
Roberto Ierusalimschy
3db5f60547
BUG: "(((1 or false) and true) or false)" gives wrong result
2009-06-15 10:52:08 -03:00
Roberto Ierusalimschy
2258ec6bc9
'getline' renamed to 'getfuncline' (to avoid problems with POSIX)
2009-06-10 13:57:53 -03:00
Roberto Ierusalimschy
2598138ece
new function 'luaK_codek' (detail)
2009-06-10 13:52:03 -03:00
Roberto Ierusalimschy
4a67e48611
new macro 'condmovestack' instead of 'condhardstacktests'
2009-06-08 16:35:59 -03:00
Roberto Ierusalimschy
5cdec7d124
added "\n" at the end of 'package.config' (so that the string
...
is a sequence of complete lines)
2009-06-04 16:34:24 -03:00
Roberto Ierusalimschy
9423e22aa3
no more L->base + ci->base only for Lua functions (C functions may use
...
'func')
2009-06-01 16:09:26 -03:00
Roberto Ierusalimschy
57f8414de1
small bug in 'luaV_concat' (L->top was left incorrect in some cases)
2009-05-27 14:11:27 -03:00
Roberto Ierusalimschy
139d562861
type of 'luai_ctype_' array changed to unsigned (safer for bitwise
...
operations)
2009-05-27 13:51:15 -03:00
Roberto Ierusalimschy
eea6d10866
details (use ci->base instead of L->base when possible)
2009-05-22 12:19:54 -03:00
Roberto Ierusalimschy
019ebcb85f
errors in finalizers are propagated with code LUA_ERRGCMM (ERRor in
...
__gc MetaMethod)
2009-05-21 17:06:11 -03:00
Roberto Ierusalimschy
889284ebd0
hexadecimal escape sequences in strings + better error messages for
...
bad decimal escape sequences
2009-05-18 14:28:04 -03:00
Roberto Ierusalimschy
6956331093
new macro 'zungetc'
2009-05-18 14:26:25 -03:00
Roberto Ierusalimschy
92479f1a8b
new property 'lisupper' (needed to compute values for hexa digits)
2009-05-18 14:15:14 -03:00
Roberto Ierusalimschy
e67dc3a227
'symbexec' merged with 'getobjname' (as only use for symbolic execution
...
now is to find a "good" name for an object)
2009-05-04 15:26:21 -03:00
Roberto Ierusalimschy
0cc3add9f8
variable renaming: 'lualibs' -> 'loadedlibs'; 'luareqlibs' ->
...
'preloadedlibs'
2009-05-01 10:46:35 -03:00
Roberto Ierusalimschy
71c2eeff98
comments
2009-05-01 10:37:11 -03:00
Roberto Ierusalimschy
d7bc346d7a
no more code checking
2009-04-30 14:42:21 -03:00
Roberto Ierusalimschy
673c456cba
resize string hash table only when new size is smaller than current one
2009-04-29 14:09:41 -03:00
Roberto Ierusalimschy
ea44570883
hash table for strings is rehashed in place
2009-04-29 14:09:41 -03:00
Roberto Ierusalimschy
e091a254df
new way to GC stacks: the entire stack must be correct all the times;
...
the 'dead' part of a stack (after the top) must have only nil's, so
that 'top' may go up without cleaning the stack.
2009-04-28 16:04:36 -03:00
Roberto Ierusalimschy
58c3aa8b5f
malicious zero-length string in binary code may segfault Lua +
...
wrong code generation for some particular boolean expressions
2009-04-27 17:11:11 -03:00
Roberto Ierusalimschy
c1f78ff3d3
unused arguments removed
2009-04-27 15:58:31 -03:00
Roberto Ierusalimschy
e5249b9fb5
'exit' changed to 'abort' in case of panic (+ some extra comments)
...
'abort' seems more in line with panic ("abnormal termination")
2009-04-26 18:55:35 -03:00
Roberto Ierusalimschy
d3037d97ec
several small improvements based on 'ci' being fixed now (including
...
erasing savedpc from lua_State)
2009-04-17 19:00:01 -03:00
Roberto Ierusalimschy
c6b442bd36
'luaM_freearray' does not need array type as argument
2009-04-17 11:40:13 -03:00
Roberto Ierusalimschy
4f88418170
'CallInfo' stack implemented as double-linked list instead of an array
2009-04-17 11:28:06 -03:00
Roberto Ierusalimschy
311e9f3ceb
'nresults' is saved in CallInfo from the caller, not the called
2009-04-15 13:53:39 -03:00
Roberto Ierusalimschy
8775f25830
new function 'T.makeCfunc' (for later use)
2009-04-14 16:10:17 -03:00
Roberto Ierusalimschy
70a63fa5ad
first implementation of yieldable 'pcall'
2009-04-08 15:04:33 -03:00
Roberto Ierusalimschy
fffbaede75
detail
2009-04-03 12:58:03 -03:00
Roberto Ierusalimschy
ae9ad6c694
added comment explaining why the 'feof' test when loading a file
2009-04-02 16:54:06 -03:00
Roberto Ierusalimschy
83d2dbb15d
Lua will abort anyway, so 'panic' does not need to.
2009-03-31 14:25:08 -03:00
Roberto Ierusalimschy
4e43741943
in 'lua_call', avoid preparing a continuation when thread cannot yield.
2009-03-30 15:39:20 -03:00
Roberto Ierusalimschy
a274596ecc
avoid making 'lastfree' an invalid pointer
2009-03-30 15:38:24 -03:00
Roberto Ierusalimschy
7e9bc41fe7
'loadlib(lib, "*")' loads 'lib' with global names exported to all
2009-03-26 19:25:05 -03:00
Roberto Ierusalimschy
b1e1c15ced
small bug: EOZ is a valid character to be tested
2009-03-26 15:53:52 -03:00
Roberto Ierusalimschy
3dbf305408
no more support for old-style varargs
2009-03-26 09:57:01 -03:00
Roberto Ierusalimschy
6d0ae11c57
'context' added to suspendable calls
2009-03-23 11:26:12 -03:00
Roberto Ierusalimschy
3ca739b418
'math.random' uses lua_Number to manage its arguments (there is no
...
reason to lose range).
2009-03-17 14:55:39 -03:00
Roberto Ierusalimschy
9e613b8583
missing argument to 'assert' raises "assertion failed" error
2009-03-16 13:30:50 -03:00
Roberto Ierusalimschy
9428ec42d0
new optional argument to 'load', to control allowed modes (binary or
...
textual chunks)
2009-03-13 12:50:03 -03:00
Roberto Ierusalimschy
6ffcf21367
ctype 'lalpha' includes '_' (as '_' behaves as a letter from the
...
point of view of Lua)
2009-03-11 10:27:32 -03:00
Roberto Ierusalimschy
6427c61e7c
added macro 'lisxdigit' (just in case :)
2009-03-10 14:42:33 -03:00
Roberto Ierusalimschy
ba484b9eb1
yielding across lua_call (first version)
2009-03-10 14:14:37 -03:00
Roberto Ierusalimschy
f9d015523e
better notes about some opcodes (comments only)
2009-03-09 12:27:56 -03:00
Roberto Ierusalimschy
1817dfc301
initial separation, in CallInfo, of what is relevant only to Lua
...
functions or only to C functions
2009-03-04 10:32:29 -03:00
Roberto Ierusalimschy
7837e34e56
new states have a reasonable panic function +
...
testC may run code on different threads +
rename of some testC operations ('rawcall'->'call', 'call'->'pcall')
2009-03-03 15:52:36 -03:00
Roberto Ierusalimschy
910310d3ba
if thread has no error handling, try main thread handler before panicking
2009-03-03 15:51:24 -03:00
Roberto Ierusalimschy
facfcd497f
detail
2009-03-02 13:34:23 -03:00
Roberto Ierusalimschy
b403317325
error functions search global space for a name for a function when
...
no other name is available
2009-02-27 15:18:19 -03:00
Roberto Ierusalimschy
9bf05e7364
code section 'Traceback' moved to the beginning of the file
2009-02-27 15:17:13 -03:00
Roberto Ierusalimschy
e39e758a73
closing a "popen" file returns the process exit status
2009-02-20 10:50:27 -03:00
Roberto Ierusalimschy
5438d77221
global array of ctypes renamed to 'luai_ctype_' (extern names must
...
use a "lua" prefix...)
2009-02-20 10:11:15 -03:00
Roberto Ierusalimschy
6905ae900b
Lua now uses "homemade" lctype (instead of ctype.h from ANSI C)
2009-02-19 14:33:51 -03:00
Roberto Ierusalimschy
ada82930fd
"homemade" version of ctype.h
2009-02-19 14:18:25 -03:00
Roberto Ierusalimschy
f36e319658
'fputs' changed to 'luai_writestring' + use of 'lua_checkversion'
2009-02-19 14:15:35 -03:00
Roberto Ierusalimschy
0cea28a785
better error messages for 'lua_checkversion'
2009-02-19 14:15:13 -03:00
Roberto Ierusalimschy
d2ebdc045b
new macro 'lua_checkversion' to check whether core and application are
...
compatible
2009-02-18 14:20:56 -03:00
Roberto Ierusalimschy
81ede6bfce
using light userdata to represent "remote" states
2009-02-18 11:52:51 -03:00
Roberto Ierusalimschy
2b579b4b83
panic mode does not reset stack (so that panic function can gather
...
debug information from it)
2009-02-18 11:52:03 -03:00
Roberto Ierusalimschy
a1d0e1a11a
'log10' is deprecated now
2009-02-18 10:17:10 -03:00
Roberto Ierusalimschy
8975739839
better precision for log(x, 10)
2009-02-18 10:06:05 -03:00
Roberto Ierusalimschy
d07abcc6c7
finalizers always called protected
2009-02-17 16:47:58 -03:00
Roberto Ierusalimschy
189378142a
buffer creation ensures buffer space plus MINSTACK in the stack
2009-02-17 11:31:16 -03:00
Roberto Ierusalimschy
82749b765e
'db_errorfb' changed to 'db_traceback' for consistency
2009-02-17 10:21:28 -03:00
Roberto Ierusalimschy
2b590aea40
no more '__len' metamethod for strings
2009-02-16 17:09:28 -03:00
Roberto Ierusalimschy
547e47649f
'luaL_typeerror' spelled right
2009-02-13 17:39:34 -02:00
Roberto Ierusalimschy
41dd32e18e
comment (should not use 'go trhough' when simply using multiple labels)
2009-02-11 16:25:20 -02:00
Roberto Ierusalimschy
5d3cc5def8
'writestring' changed into a configurable macro
2009-02-07 10:23:15 -02:00
Roberto Ierusalimschy
53db607963
avoid using 'fputs' in 'print' to avoid problems with embedded zeros
2009-02-06 16:38:47 -02:00
Roberto Ierusalimschy
cbf0c7a103
check for invalid use of '%' in replacement string in 'string.gsub'
2009-02-03 17:39:19 -02:00
Roberto Ierusalimschy
4c399c5dfb
detail (MAXSRC changed to LUA_IDSIZE)
2008-12-26 09:55:57 -02:00
Roberto Ierusalimschy
b472098493
concat TM can yield
2008-11-06 10:43:51 -02:00
Roberto Ierusalimschy
84b3daebbd
generic for coded as two dedicated instructions to simplify resumption
2008-10-30 13:39:30 -02:00
Roberto Ierusalimschy
f6978173e0
yields accross metamethods and for iterators (except for __concat)
2008-10-28 14:53:16 -02:00
Roberto Ierusalimschy
e02483dbc0
whole build depends on 'makefile' itself + better format for warning
...
options
2008-10-28 14:52:00 -02:00
Roberto Ierusalimschy
9e58e0df8f
some cleaning
2008-10-28 10:55:00 -02:00
Roberto Ierusalimschy
690efef3de
detail (added 'UNUSED' to unused argument)
2008-10-28 10:54:25 -02:00
Roberto Ierusalimschy
b9e92c8b0d
updating header dependencies
2008-10-03 13:40:56 -03:00
Roberto Ierusalimschy
4376c9bc5f
more specific test to avoid calling luaF_close when function returns
2008-09-09 10:53:02 -03:00
Roberto Ierusalimschy
f94cd2201c
better control of call status through CallInfo
2008-08-26 10:27:42 -03:00
Roberto Ierusalimschy
fdbb243ff9
first steps towards yielding through longjump
2008-08-13 14:02:42 -03:00
Roberto Ierusalimschy
c1565c16ed
small bug: lua_resume returning LUA_YIELD is not an error
2008-08-13 14:02:12 -03:00
Roberto Ierusalimschy
394646891c
new field 'status' in CallInfo structure
2008-08-13 14:01:33 -03:00
Roberto Ierusalimschy
d69aa51088
added missing parentheses around function names
2008-08-13 11:08:49 -03:00
Roberto Ierusalimschy
afe849c9b4
change in error message
2008-08-06 10:38:32 -03:00
Roberto Ierusalimschy
ccd678ea3e
'module' may change the environment of a C function +
...
internal macro 'svalue' is wrong
2008-08-06 10:32:45 -03:00
Roberto Ierusalimschy
bb92ef23cb
bug: string at the end of TString must consider the entire TString
...
entity, not only its 'tsv' part
2008-08-05 16:26:23 -03:00
Roberto Ierusalimschy
bb48f456d9
bug: 'module' now checks that is caller is a Lua function
2008-08-05 16:25:42 -03:00
Roberto Ierusalimschy
df802dc74b
larger alignment requirement helps to uncover some kinds of bugs
2008-08-05 16:24:46 -03:00
Roberto Ierusalimschy
e23da9edee
GC step does not unblock collector (when it is blocked by "stop")
2008-08-01 14:01:16 -03:00
Roberto Ierusalimschy
4db2cddeee
LUA_COMPAT -> LUA_COMPAT_API (more specific)
2008-07-18 16:58:10 -03:00
Roberto Ierusalimschy
f9dec5fc84
do not use compatibility macros in Lua
2008-07-11 14:51:01 -03:00
Roberto Ierusalimschy
6b8725b0ee
new macro LUA_COMPAT to control some compatibility macros
2008-07-11 14:50:31 -03:00
Roberto Ierusalimschy
6955666290
'string.byte' gets confused with some out-of-range negative indices +
...
user-requested GC step may loop forever
2008-07-11 14:27:41 -03:00
Roberto Ierusalimschy
5298392c5a
bug: GC step could loop forever under very particular circumstances
2008-07-04 15:27:11 -03:00
Roberto Ierusalimschy
1ceec74370
useless test removed (pointed by lint)
2008-07-03 11:25:05 -03:00
Roberto Ierusalimschy
2a84c29bc3
comment about exported function not used by Lua
2008-07-03 11:24:36 -03:00
Roberto Ierusalimschy
4d8a1103d3
useless #define removed (pointed by lint)
2008-07-03 11:24:11 -03:00
Roberto Ierusalimschy
202de59254
useless #include removed (pointed by lint)
2008-07-03 11:23:35 -03:00
Roberto Ierusalimschy
f858a155c2
identation error (pointed by lint)
2008-07-03 11:21:41 -03:00
Roberto Ierusalimschy
9e7de9473c
message from -v option goes to stdout, as it is not an error message
2008-06-26 16:47:51 -03:00
Roberto Ierusalimschy
0c8f5fc2fd
simplification in the handling of finalizers: no more 'tmudata' list +
...
no more GCSsweeptmu collector's state
2008-06-26 16:42:45 -03:00
Roberto Ierusalimschy
1527d8f00d
GC called after errors now are called after showing error message (to
...
avoid problems when there are other errors during GC itself)
2008-06-26 16:40:12 -03:00
Roberto Ierusalimschy
8efaf8af81
added a comment about warnings for __attribute__(visibility) in some
...
elf targets
2008-06-25 12:27:12 -03:00
Roberto Ierusalimschy
c3525610fe
bug: when closing the state, 'luaC_separateudata' might mark
...
userdata in the wrong phase of collection, therefore avoiding
their traversal
2008-06-23 19:07:44 -03:00
Roberto Ierusalimschy
7ba62e2985
code reorganization (only changed comments and order of functions)
2008-06-23 13:51:28 -03:00
Roberto Ierusalimschy
8fd28611d5
outdated comment
2008-06-23 13:51:08 -03:00
Roberto Ierusalimschy
93869acb2c
"test trick" seems more useful with pointers instead of integers
2008-06-23 13:50:34 -03:00
Roberto Ierusalimschy
480a1da34a
when error is 'bad self' original message probably makes no sense, so
...
it is better not to show it.
2008-06-13 15:45:35 -03:00
Roberto Ierusalimschy
59e2973335
removed static variable lua_state (not used)
2008-06-13 14:07:10 -03:00
Roberto Ierusalimschy
5d09be4832
by default, 'os.exit' closes current state
2008-06-13 13:59:00 -03:00
Roberto Ierusalimschy
860e285f31
'luaL_gsub' moved into 'testC' (all auxlib should be tested through 'testC')
2008-06-13 11:15:59 -03:00
Roberto Ierusalimschy
eb8ac6e2a0
'luaL_testudata' does not leave garbage on the stack in case of failure
2008-06-12 11:37:27 -03:00
Roberto Ierusalimschy
b1203e036d
'posrelat' avoids problems with -(-2^31)
2008-06-12 11:21:18 -03:00
Roberto Ierusalimschy
92a0d4c67f
extra options in 'testC' for newmetatable and testudata
2008-06-12 11:20:49 -03:00
Roberto Ierusalimschy
5fa55df2ca
updated years in some comments/strings
2008-05-09 13:51:44 -03:00
Roberto Ierusalimschy
a3af42de8e
patch for "blow stack" bug
2008-05-08 13:55:08 -03:00
Roberto Ierusalimschy
198be23f36
added structure for local-variable information to allow extra
...
checkings if needed
2008-05-08 12:44:51 -03:00
Roberto Ierusalimschy
24359ae294
'string.find' cannot find things after subject's end
2008-04-14 12:54:59 -03:00
Roberto Ierusalimschy
6c84722afa
make default GC behavior a little more agressive
...
(to avoid falling behind memory consumption)
2008-04-07 15:58:42 -03:00
Roberto Ierusalimschy
facb0519a0
two bugs: invalid boolean values in constant table + too deep recursion
...
when reading nested functions
2008-04-07 15:44:23 -03:00
Roberto Ierusalimschy
ffdca3522e
'table.sort' detects invalid order function before calling it
...
for nil elements
2008-04-07 15:43:00 -03:00
Roberto Ierusalimschy
4d7469b610
avoid constant folding for -0 (to avoid it colapsing to 0)
2008-04-07 15:41:47 -03:00
Roberto Ierusalimschy
2b84e36b93
patches for some bugs
2008-04-04 22:31:59 -03:00
Roberto Ierusalimschy
85bda9eef5
bugs: precheck must use check (instead of assert) and ensures that
...
code size is at least 1
2008-04-02 16:14:16 -03:00
Roberto Ierusalimschy
a4d3080fe3
SETLIST extra argument now is an "instruction" (OP_EXTRAARG)
2008-04-02 14:38:54 -03:00
Roberto Ierusalimschy
5627d51e05
corrected error message ("too many constants" -> "too many functions")
2008-04-02 14:19:22 -03:00
Roberto Ierusalimschy
e64b0cada8
several bugs related to precompiled code
2008-04-01 16:17:48 -03:00
Roberto Ierusalimschy
7316d61a66
'coroutine.running' should work for the main thread too
2008-02-25 11:33:57 -03:00
Roberto Ierusalimschy
e2b366c760
userdata with finalizers are kept in a separated list
2008-02-19 15:55:09 -03:00
Roberto Ierusalimschy
fa19baab7f
proxies must be created with a __gc field in their metatables to work
...
properly with new semantics for finalizers
2008-02-19 15:54:09 -03:00
Roberto Ierusalimschy
2f8351fe48
turn off optimizations when testing
2008-02-15 15:44:34 -02:00
Roberto Ierusalimschy
32d42bdcdc
bugs: lua_checkstack may have arithmetic overflow for large 'size' +
...
unpack with maximum indices may crash due to arithmetic overflow
2008-02-14 14:51:57 -02:00
Roberto Ierusalimschy
843d53aabb
'table.concat' may get confused with too large limits
2008-02-14 14:03:27 -02:00
Roberto Ierusalimschy
5ac3386888
bug: unpack with maximum indices may crash due to arithmetic overflow
2008-02-14 14:03:09 -02:00
Roberto Ierusalimschy
6d182faab6
bug: lua_checkstack may have arithmetic overflow for large 'size'
2008-02-14 14:02:58 -02:00
Roberto Ierusalimschy
f86f4116c8
micro-optimization: avoid one API call in 'read_chars'
2008-02-12 15:05:36 -02:00
Roberto Ierusalimschy
7f69f0efb0
remove of useless test in 'read_chars' (if n == 0 then the resulting
...
string cannot be empty).
2008-02-12 14:51:03 -02:00
Roberto Ierusalimschy
f6cab9666c
corrected name of 'Patrick Donnelly'
2008-02-12 14:42:46 -02:00
Roberto Ierusalimschy
3deb38814d
added assertions checking maximum number of upvalues
2008-02-12 11:34:12 -02:00
Roberto Ierusalimschy
3b5b14a085
LUAI_MAXCSTACK must be smaller than -LUA_REGISTRYINDEX +
...
coroutine.resume pushes element without ensuring stack size
2008-02-11 17:18:21 -02:00
Roberto Ierusalimschy
aec671c126
maximum C stack should reserve some values for pseudo-indices
2008-02-11 17:17:19 -02:00
Roberto Ierusalimschy
dd92af69db
bug: pseudo-indices should be linked to maximum C stack size
2008-02-11 17:16:02 -02:00
Roberto Ierusalimschy
015e973899
bug: auxresume should reserve stack space for boolean result
2008-02-11 17:14:52 -02:00
Roberto Ierusalimschy
163f58dac5
in 'testC', booleans should be represented by booean values
2008-02-11 17:04:16 -02:00
Roberto Ierusalimschy
dcee7d2fe0
new instructions 'newtable' and 'checkstack' in 'testC'
2008-02-11 16:04:26 -02:00
Roberto Ierusalimschy
5f0a2f6248
more options for 'kinds' of Garbage Collection + more agressive
...
shrinking of stacks and string hash
2008-02-11 13:46:03 -02:00
Roberto Ierusalimschy
a73930228a
more options for 'kinds' of Garbage Collection
2008-02-11 13:45:30 -02:00
Roberto Ierusalimschy
a76fa25199
'ceillog2' now is exported (other modules may need it)
2008-01-30 16:05:23 -02:00
Roberto Ierusalimschy
dd3519ab89
comment (LUA_GLOBALSINDEX does not need write barrier in lua_replace)
2008-01-25 11:42:12 -02:00
Roberto Ierusalimschy
3a515df086
debug.sethook/gethook may overflow the thread's stack
2008-01-21 12:41:19 -02:00
Roberto Ierusalimschy
74897bc52f
bug: debug.sethook/gethook may overflow thread's stack
2008-01-21 11:37:08 -02:00
Roberto Ierusalimschy
e7c989baf1
avoid calling "tail return" hooks if the hook itself turns off the event
2008-01-18 20:36:50 -02:00
Roberto Ierusalimschy
7a3c8314ac
small bug (see http://lua-users.org/lists/lua-l/2007-08/msg00350.html )
2008-01-18 15:14:47 -02:00
Roberto Ierusalimschy
6f8257ec5f
it seems useless trying to avoid this warning...
2008-01-18 13:37:10 -02:00
Roberto Ierusalimschy
87b0191753
better definition for LUAI_MAXCSTACK
2008-01-17 14:24:38 -02:00
Roberto Ierusalimschy
56c17ba4c7
detail
2008-01-17 14:24:30 -02:00
Roberto Ierusalimschy
daddc57abd
luaL_tostring -> luaL_tolstring (more generic)
2008-01-03 15:07:59 -02:00
Roberto Ierusalimschy
f9cdd09191
larger limit for MAXCSTACK (plus removing of some useless definitions)
2008-01-02 14:36:19 -02:00
Roberto Ierusalimschy
47b4858357
detail ('name' of baselib is "_G")
2008-01-02 14:16:28 -02:00
Roberto Ierusalimschy
b8d23d6e07
option to use Sun compiler (on lhf account)
2007-12-27 10:59:43 -02:00
Roberto Ierusalimschy
fdecdd0cec
stand-alone interpreter shows incorrect error message when the
...
'message' is a coroutine (already fixed in 5.2)
2007-12-27 10:58:29 -02:00
Roberto Ierusalimschy
fabdaa37b6
'lua_pushfstring' raises an error if called with invalid format
2007-12-19 15:24:38 -02:00
Roberto Ierusalimschy
bc82b4d78a
new function 'package.searchpath'
2007-12-12 12:36:12 -02:00
Roberto Ierusalimschy
dae850e0ee
details
2007-12-08 09:54:32 -02:00
Roberto Ierusalimschy
abcc124df0
BUG: lua_setfenv may crash if called over an invalid object
2007-11-28 16:27:38 -02:00
Roberto Ierusalimschy
b4164a9aa7
details
2007-11-28 16:25:17 -02:00
Roberto Ierusalimschy
9f0d62ad9f
BUG: table.remove removes last element of a table when given
...
an out-of-bound index
2007-11-26 14:57:33 -02:00
Roberto Ierusalimschy
64ecf24210
detail
2007-11-26 14:56:11 -02:00
Roberto Ierusalimschy
658e7caf92
use prefix in extern names, even those in test files
2007-11-12 14:28:45 -02:00
Roberto Ierusalimschy
788506dd58
detail
2007-11-12 12:10:09 -02:00
Roberto Ierusalimschy
62790ab15d
detail
2007-11-09 16:55:07 -02:00
Roberto Ierusalimschy
ad60b3ead7
avoid the use of "exotic" libc functions
2007-11-09 16:54:25 -02:00
Roberto Ierusalimschy
5e8dd55574
first implementation of ephemerons
2007-10-31 13:41:19 -02:00
Roberto Ierusalimschy
0e961ad47a
some changes toward ephemerons
2007-10-29 14:51:20 -02:00
Roberto Ierusalimschy
c06cc60946
BUG: 'gsub' may go wild when wrongly called without its third
...
> argument and with a large subject.
2007-10-29 13:51:10 -02:00
Roberto Ierusalimschy
2fa476655f
detail
2007-10-25 17:31:05 -02:00
Roberto Ierusalimschy
7a78495f31
avoid problems with 'ptrdiff_t'
2007-10-25 17:30:36 -02:00
Roberto Ierusalimschy
3138afbe2e
parser should not call 'luaX_lexerror'
2007-10-25 14:45:47 -02:00
Roberto Ierusalimschy
4eef0aaad1
detail
2007-10-18 09:01:52 -02:00
Roberto Ierusalimschy
ab09732986
new metamethods for '__pairs' and '__ipairs'
2007-10-17 15:26:39 -02:00
Roberto Ierusalimschy
b7fa64565a
27 is not a prime number :(
2007-09-30 10:09:43 -03:00
Roberto Ierusalimschy
2622ed2528
better way to handle redefinitions of 'localeconv'
2007-09-14 10:27:04 -03:00
Roberto Ierusalimschy
9cb0607f6f
avoid warnings about exit; return
2007-09-14 10:26:28 -03:00
Roberto Ierusalimschy
8998032f66
detail
2007-09-14 10:26:03 -03:00
Roberto Ierusalimschy
80b4753539
better error message for 'concat'
2007-09-12 17:53:24 -03:00
Roberto Ierusalimschy
fe0838cd1c
tables and strings respect __len metamethod
2007-09-10 14:59:32 -03:00
Roberto Ierusalimschy
8acaa2ce07
An error in a module loaded through the '-l' option
...
shows no traceback.
2007-09-05 14:18:27 -03:00
Roberto Ierusalimschy
c676f13e1a
stand-alone error-message details
2007-09-05 14:17:39 -03:00
Roberto Ierusalimschy
9b47cee8b2
better to flush all files before starting new process with popen
2007-08-30 13:13:13 -03:00
Roberto Ierusalimschy
47e666c090
no need for ctype.h
2007-08-10 09:56:02 -03:00
Roberto Ierusalimschy
3059579253
detail
2007-08-09 17:29:15 -03:00
Roberto Ierusalimschy
72c2f75648
detail (LUA_COPYRIGHT includes release number)
2007-08-07 13:53:40 -03:00
Roberto Ierusalimschy
ec68ed66ed
detail
2007-08-01 09:17:29 -03:00
Roberto Ierusalimschy
f6a81dbe97
BUG: too many variables in an assignment may cause a C stack overflow
2007-07-31 16:39:52 -03:00
Roberto Ierusalimschy
3904a66ab0
'debug' library must be required before being used
2007-06-22 13:59:11 -03:00
Roberto Ierusalimschy
ffc5f78229
detail
2007-06-22 12:39:34 -03:00
Roberto Ierusalimschy
3f78748ef3
traceback function moved to auxlib
2007-06-22 12:33:54 -03:00
Roberto Ierusalimschy
d26bfb5ae4
"spacial" reorganization to keep related functions in groups
2007-06-21 11:09:59 -03:00
Roberto Ierusalimschy
8d3dd04137
clearing some old compatibility code
2007-06-21 10:52:27 -03:00
Roberto Ierusalimschy
791d8d8585
detail
2007-06-21 10:50:53 -03:00
Roberto Ierusalimschy
e85515958b
clearing some old compatibility code
2007-06-21 10:48:04 -03:00
Roberto Ierusalimschy
dc59444cd1
strong collision for very small numbers used as table keys
2007-06-19 17:23:29 -03:00
Roberto Ierusalimschy
6c042e17b1
avoid boolean equality (tricky for some compilers)
2007-06-19 16:48:15 -03:00
Roberto Ierusalimschy
18a583306b
patch may be a little simpler
2007-05-29 16:05:25 -03:00
Roberto Ierusalimschy
fc8d077612
bug: wrong error message in some concatenations
2007-05-29 15:59:59 -03:00
Roberto Ierusalimschy
e64fcb9d94
bug: recursive coroutines may overflow C stack
2007-05-25 14:13:47 -03:00
Roberto Ierusalimschy
6c0a9a272e
assignment of nil to parameter may be optimized away
...
__concat metamethod converts numbers to strings
loadlib.c should not access Lua internals
code generated for "-nil", "-true", and "-false" is wrong
Count hook may be called without being set
2007-05-16 12:39:08 -03:00
Roberto Ierusalimschy
01fa1bc114
luaL_testudata (a luaL_checkudata that does not raise errors) is
...
very needed.
2007-05-15 15:46:12 -03:00
Roberto Ierusalimschy
aa003eba8e
details
2007-05-11 14:28:56 -03:00
Roberto Ierusalimschy
becf19feef
better names for metamethods in debug information
2007-05-09 12:49:36 -03:00
Roberto Ierusalimschy
81fc3c4f45
bug: code generated for "-nil", "-true", and "-false" is wrong
2007-05-04 15:41:49 -03:00
Roberto Ierusalimschy
e7fb0d8a6f
'os.date' checks arguments before passing them to 'strftime'
2007-05-03 17:49:29 -03:00
Roberto Ierusalimschy
4eb49163c6
error handler in 'lua.c' tries '__tostring' metamethod if error
...
message is not a string
2007-04-26 17:39:38 -03:00
Roberto Ierusalimschy
79cb336d74
does not allow standard files to be closed
2007-04-19 17:22:32 -03:00
Roberto Ierusalimschy
38063345ae
several details
2007-04-19 17:21:53 -03:00
Roberto Ierusalimschy
ae00b3a76f
another way to normalize -0 that avoids problems with very small
...
numbers (adding 1 turns them all into 1)
2007-04-18 16:24:35 -03:00
Roberto Ierusalimschy
619be354c8
lua_pushstring/pushlstring return string
2007-04-17 10:19:53 -03:00
Roberto Ierusalimschy
94d40f3980
luaO_log2 can be private to ltable.c
2007-04-10 09:18:17 -03:00
Roberto Ierusalimschy
585b81f91e
remove of a non-used test function
2007-04-10 09:17:52 -03:00
Roberto Ierusalimschy
5f4f0d4a63
no more optimization to avoid LOADNIL at function start
2007-03-27 11:11:38 -03:00
Roberto Ierusalimschy
8e36e1fe49
details (randomseed calls rand once to dischard first value)
2007-03-27 09:37:00 -03:00
Roberto Ierusalimschy
97505caa64
detail
2007-03-26 15:35:34 -03:00
Roberto Ierusalimschy
df50c84ee0
BUG: loadlib should not use Lua internals (lobject.h)
2007-03-26 12:57:35 -03:00
Roberto Ierusalimschy
1a455acc81
two small bugs: some metamethods do not accept callable non-function
...
objects + __concat converts numbers to strings before calling metamethod
2007-03-26 12:56:23 -03:00
Roberto Ierusalimschy
60bc151ed7
patch for last bug
2007-03-09 15:51:32 -03:00
Roberto Ierusalimschy
3b19bd4d57
bug: wrong code when constant is coded after it should be
2007-03-09 15:50:56 -03:00
Roberto Ierusalimschy
08f902cf49
better documentation for auxiliary functions (that should be called only
...
through specific macros).
2007-02-09 11:04:52 -02:00
Roberto Ierusalimschy
d3c304e92e
BUG: setfenv accepts invalid argument
2007-02-09 10:40:21 -02:00
Roberto Ierusalimschy
3bf0292cd5
two new bugs + one new patch
2007-02-09 10:39:52 -02:00
Roberto Ierusalimschy
a7861d9d66
new year...
2007-02-07 15:54:52 -02:00
Roberto Ierusalimschy
d62a21b9d3
when formatting with '%q', all control characters are coded
...
as \nnn.
2007-02-07 15:53:08 -02:00
Roberto Ierusalimschy
cf86576a83
new function luaL_tostring
2007-02-07 15:51:21 -02:00
Roberto Ierusalimschy
92dc64e121
more regularity in the use of quotes in error messages
2007-02-07 15:49:18 -02:00
Roberto Ierusalimschy
593bfc9668
should not manipulate NULL pointers (even without accessing them)
2007-02-07 15:48:52 -02:00
Roberto Ierusalimschy
850c60e81b
detail for windows
2007-02-07 15:46:20 -02:00
Roberto Ierusalimschy
3d480b04a5
more specific ident labels
2007-02-07 12:28:00 -02:00
Roberto Ierusalimschy
c36e2265d9
detail (tab->space)
2006-11-30 09:25:40 -02:00
Roberto Ierusalimschy
a68df3898d
detail
2006-11-22 09:43:47 -02:00
Roberto Ierusalimschy
4d7cfff6df
comments
2006-11-22 09:02:03 -02:00
Roberto Ierusalimschy
be822a5f1c
xpcall now may get arguments to function to be called
2006-10-24 16:46:12 -03:00
Roberto Ierusalimschy
9f5a052c27
error message
2006-10-24 10:31:48 -03:00
Roberto Ierusalimschy
fc875334fd
detail
2006-10-20 16:30:53 -03:00
Roberto Ierusalimschy
80a267b130
avoid $URL for ident; it is reserved in subversion
2006-10-17 17:00:07 -03:00
Roberto Ierusalimschy
3182ac69a7
towards 5.2 + detail in authors + avoiding reverse plicks
2006-10-17 16:59:04 -03:00
Roberto Ierusalimschy
dead3858b8
detail
2006-10-16 11:38:38 -03:00
Roberto Ierusalimschy
afa0d0ac0d
new constant LUA_OK
2006-10-10 14:40:17 -03:00
Roberto Ierusalimschy
742b8be0c1
detail
2006-10-10 14:39:00 -03:00
Roberto Ierusalimschy
285f926140
avoid using index 0 for free list of references (because it is not
...
as efficient as index 1...)
2006-09-25 12:35:00 -03:00
Roberto Ierusalimschy
3c8865cf66
detail
2006-09-22 17:24:38 -03:00
Roberto Ierusalimschy
569a326931
small optimization for ""..x
2006-09-19 11:06:45 -03:00
Roberto Ierusalimschy
d1ef7e0ec6
avoid local "pc" in interpreter loop (tricky optimization with no real gain)
2006-09-19 10:57:50 -03:00
Roberto Ierusalimschy
d513c3c66b
bug: os.date throws error when result is the empty string
2006-09-19 10:57:08 -03:00
Roberto Ierusalimschy
93d3c8450c
bug: string.format("%") reads past the string
2006-09-18 13:33:14 -03:00
Roberto Ierusalimschy
8667f29c3b
behavior of 'strchr(x, 0)' is ill defined.
2006-09-18 13:06:41 -03:00
Roberto Ierusalimschy
d22526ec30
'lua_strlen' is for compatibility only
2006-09-18 11:03:18 -03:00
Roberto Ierusalimschy
bd869c7b31
details
2006-09-14 15:42:28 -03:00
Roberto Ierusalimschy
d5a23dde90
little better error messages for internal arrays overflows
2006-09-14 09:59:06 -03:00
Roberto Ierusalimschy
a7c9e45c64
avoid trailing white spaces
2006-09-11 11:07:24 -03:00
Roberto Ierusalimschy
cedd2092eb
'coroutine.running' should return nil (instead of nothing) for main thread
2006-09-11 11:07:24 -03:00
Roberto Ierusalimschy
c473818017
avoid "too complex" conditional expression (some compilers get confused...)
2006-09-11 09:44:56 -03:00
Roberto Ierusalimschy
6087e67771
no more compatibility option for long strings
2006-08-30 10:19:58 -03:00
Roberto Ierusalimschy
93bf618504
BUG: there is only one C stack, so nCcalls must be global
2006-08-15 16:59:20 -03:00
Roberto Ierusalimschy
dfe2f1eeff
macros luai_num* take a state L (when available) as argument, to allow
...
them to generate errors (and other facilities)
2006-08-07 16:14:30 -03:00
Roberto Ierusalimschy
ca7e5b5cb6
wrong message error in some cases involving closures
2006-08-07 16:04:06 -03:00
Roberto Ierusalimschy
5019b2dd20
math.log now accepts an optional base
2006-08-07 16:01:56 -03:00
Roberto Ierusalimschy
33e7bc88f8
comment
2006-08-04 10:34:37 -03:00
Roberto Ierusalimschy
fa0c03aaa6
details
2006-07-14 13:22:24 -03:00
Roberto Ierusalimschy
3fa47c5dc1
bugs now are against 5.1.1
2006-07-13 11:37:36 -03:00
Roberto Ierusalimschy
0782416a74
bug: wrong limit for list constructors
2006-07-12 16:02:50 -03:00
Roberto Ierusalimschy
3ca9af51a4
emergency garbage collector (core forces a GC when allocation fails)
2006-07-11 12:53:29 -03:00
Roberto Ierusalimschy
c7b89dd280
small bug: should not use string after popping it
2006-07-03 17:16:49 -03:00
Roberto Ierusalimschy
74832b2a10
detail
2006-06-23 13:09:15 -03:00
Roberto Ierusalimschy
ee41bc03ab
details
2006-06-22 13:12:59 -03:00
Roberto Ierusalimschy
98194db429
details
2006-06-09 14:31:14 -03:00
Roberto Ierusalimschy
fad7582c9a
explicit test for common error (due to compatibility issue)
2006-06-07 09:37:17 -03:00
Roberto Ierusalimschy
a62fca1ebb
BUG: debug hooks may get wrong when mixed with coroutines
2006-06-05 16:36:45 -03:00
Roberto Ierusalimschy
2b5c1f99e5
small simplifications
2006-06-05 16:35:57 -03:00
Roberto Ierusalimschy
e2dc5f5d15
extra assertion
2006-06-05 12:58:59 -03:00
Roberto Ierusalimschy
ed64346b9d
details
2006-06-05 12:57:59 -03:00
Roberto Ierusalimschy
475b0ecbf1
new macro LUA_RELEASE
2006-06-02 12:34:00 -03:00
Roberto Ierusalimschy
414359b2f1
new version number
2006-05-31 13:50:40 -03:00
Roberto Ierusalimschy
0079efc479
bug: collector did not compensate enough for userdata with finalizers
2006-05-24 11:34:06 -03:00
Roberto Ierusalimschy
ad0765b4f0
subtle problem with the garbage collector
2006-05-24 11:33:49 -03:00
Roberto Ierusalimschy
20f4bbdc3a
does not accept garbage after options (e.g., -ixxx)
2006-05-24 11:16:39 -03:00
Roberto Ierusalimschy
c408158047
only destroy state after running all finalizers
2006-05-24 11:15:50 -03:00
Roberto Ierusalimschy
55e323190e
files should not be operated after fclose, even when fclose fails
2006-05-08 17:14:16 -03:00
Roberto Ierusalimschy
fe8f4c06f1
detail (better error message for invalid format)
2006-04-26 17:41:19 -03:00
Roberto Ierusalimschy
c351392940
details
2006-04-26 15:19:49 -03:00
Roberto Ierusalimschy
18330b6091
lua_dostring/lua_dofile should return any values returned by the chunk
2006-04-12 17:31:15 -03:00
Roberto Ierusalimschy
8487913697
BUG: option '%q' for string.format does not handle '\r' correctly
2006-04-12 17:13:52 -03:00
Roberto Ierusalimschy
672bb67ee6
environment variable names should be configurable
2006-04-10 15:27:23 -03:00
Roberto Ierusalimschy
90df6b7a54
detail
2006-03-23 15:23:32 -03:00
Roberto Ierusalimschy
0238a0b01e
BUG: luaL_checkudata may show wrong error message
2006-03-21 16:31:09 -03:00
Roberto Ierusalimschy
1ae0b6c0bf
BUG: should copy the union, not (some of) its fields
2006-03-21 16:28:49 -03:00
Roberto Ierusalimschy
e1dda047b2
unused macro
2006-03-21 16:28:03 -03:00
Roberto Ierusalimschy
2c8206d448
bug in Lua 4.0.2: weak tables that survive one collection are never collected
2006-03-20 09:49:30 -03:00
Roberto Ierusalimschy
ae76307847
comment
2006-03-14 16:04:44 -03:00
Roberto Ierusalimschy
3d61c31e5a
'lparser.h' should not include 'ltable.h'
2006-03-09 15:15:48 -03:00
Roberto Ierusalimschy
44a9bd6a8c
detail
2006-03-09 15:08:22 -03:00
Roberto Ierusalimschy
69ea087dff
small change to strip file names when stripping debug information
2006-02-17 13:51:03 -02:00
Roberto Ierusalimschy
c05aaf3bf0
avoid warning in OS X - ansi
2006-02-10 15:44:06 -02:00
Roberto Ierusalimschy
298ae7e230
complete support for hexadecimal constants
2006-02-10 15:43:52 -02:00
Roberto Ierusalimschy
6316a866a3
compiler warning
2006-02-06 16:28:16 -02:00
Roberto Ierusalimschy
ea2cc2bc47
small improvements for allignments
2006-02-06 16:27:59 -02:00
Roberto Ierusalimschy
64205e91a3
empty string may cause out-of-bound access
2006-01-28 10:59:13 -02:00
Roberto Ierusalimschy
8173688542
detail
2006-01-27 11:54:39 -02:00
Roberto Ierusalimschy
3ef5a6797f
detail
2006-01-23 18:06:19 -02:00
Roberto Ierusalimschy
9e6e43984d
details
2006-01-23 17:51:43 -02:00
Roberto Ierusalimschy
baffc37f5c
detail
2006-01-18 09:49:12 -02:00
Roberto Ierusalimschy
440113bbe8
unused macro removed
2006-01-18 09:37:34 -02:00
Roberto Ierusalimschy
73ebc5d8f6
compat code should keep compatibility
2006-01-16 10:42:21 -02:00
Roberto Ierusalimschy
a666752b1d
detail
2006-01-13 17:36:28 -02:00
Roberto Ierusalimschy
f8b7a5581e
avoid unnecessary exports
2006-01-10 11:13:06 -02:00
Roberto Ierusalimschy
ffb798e1e2
avoids type punning for table keys
2006-01-10 10:51:53 -02:00
Roberto Ierusalimschy
fa936f8fa9
detail
2006-01-10 10:50:13 -02:00
Roberto Ierusalimschy
dd1221582b
details
2006-01-10 10:50:00 -02:00
Roberto Ierusalimschy
bfdcbbcd76
small optimizations (lua_newtable -> lua_createtable)
2005-12-29 14:23:32 -02:00
Roberto Ierusalimschy
30eebb2d1c
detail (stop collector while openning libraries)
2005-12-29 10:30:16 -02:00
Roberto Ierusalimschy
0fd6466957
lua_assert is an internal matter, not to be configured
2005-12-27 15:12:00 -02:00
Roberto Ierusalimschy
6a516878e9
collectgarbage"count" returns kilobytes (where K = 1024)
2005-12-27 15:10:11 -02:00
Roberto Ierusalimschy
a486090a5c
copyright will be 2006
2005-12-27 15:09:50 -02:00
Roberto Ierusalimschy
0160591998
removal of dead code
2005-12-26 11:35:47 -02:00
Roberto Ierusalimschy
c505f341d6
small changes in casts
2005-12-22 14:19:56 -02:00
Roberto Ierusalimschy
428325baec
detail
2005-12-21 10:59:43 -02:00
Roberto Ierusalimschy
0561f71f0f
(much) better error messages for 'require'
2005-12-19 18:56:39 -02:00
Roberto Ierusalimschy
9fbefdf69c
integer formats in 'string.format' may need to operate with larger-than-int
...
types
2005-12-15 16:53:34 -02:00
Roberto Ierusalimschy
43c61fc113
details
2005-12-15 16:17:49 -02:00
Roberto Ierusalimschy
ea6b1b42c7
more robust way to test for decimal point separator
2005-12-08 13:50:54 -02:00
Roberto Ierusalimschy
87024e257d
details
2005-12-07 13:43:05 -02:00
Roberto Ierusalimschy
6cd461633d
clearer error message for uninstalled loadlib
2005-12-07 13:42:32 -02:00
Roberto Ierusalimschy
16fd4abaf6
corrects decimal point to follow current locale
2005-12-07 13:33:27 -02:00
Roberto Ierusalimschy
f26b85c5b7
small detail
2005-12-02 16:42:08 -02:00
Roberto Ierusalimschy
3592c08a2c
avoid printing two copyright messages with '-v -i' options
2005-11-28 12:44:48 -02:00
Roberto Ierusalimschy
db724e14e0
new macro luai_numisnan
2005-11-25 11:29:32 -02:00
Roberto Ierusalimschy
1702953293
new macro LUA_WIN + new macro luai_numisnan
2005-11-25 11:29:11 -02:00
Roberto Ierusalimschy
33b4dec1cb
no more "auto-detection"
2005-11-16 14:25:08 -02:00
Roberto Ierusalimschy
7dd10a1d7e
new macro LUA_USE_POSIX to control POSIX-related macros
2005-11-16 09:56:28 -02:00
Roberto Ierusalimschy
521a452f28
'mod' may also raise an error when applied to zero
2005-11-16 09:55:27 -02:00
Roberto Ierusalimschy
2753134a38
new versions by lhf
2005-11-16 09:55:07 -02:00
Roberto Ierusalimschy
cbbde11a8a
better position for lua_number2int (it is related to lua_Number)
2005-11-08 17:45:58 -02:00
Roberto Ierusalimschy
7b89cf3aeb
unused include's
2005-11-08 17:45:36 -02:00
Roberto Ierusalimschy
d2811e8097
simpler checking for numbers (strtod does the rest)
2005-11-08 17:45:14 -02:00
Roberto Ierusalimschy
e43e95553f
more privacy
2005-11-08 17:44:31 -02:00
Roberto Ierusalimschy
930018e273
lua_getlocal/setlocal work also for C locals and temporaries
2005-11-01 14:08:52 -02:00
Roberto Ierusalimschy
a160266c3d
details
2005-11-01 14:08:45 -02:00
Roberto Ierusalimschy
d4c99b2673
new function 'getregistry'
2005-11-01 14:08:32 -02:00
Roberto Ierusalimschy
88f9843eee
better error message
2005-10-26 11:28:19 -02:00
Roberto Ierusalimschy
9b5ae6faf9
better control of which values macros use
2005-10-25 11:36:28 -02:00
Roberto Ierusalimschy
caf3cfc6ac
try to ensure that macros actually use their arguments
2005-10-24 15:39:21 -02:00
Roberto Ierusalimschy
ff7638b0ed
VC warnings
2005-10-24 15:38:47 -02:00
Roberto Ierusalimschy
8e48ebb638
no more L in numer-operator macros (some functions that use those macros
...
have no access to L)
2005-10-24 15:37:52 -02:00
Roberto Ierusalimschy
c2bd68d2c3
detail
2005-10-24 15:37:33 -02:00
Roberto Ierusalimschy
201288b4df
small bug
2005-10-23 15:52:42 -02:00
Roberto Ierusalimschy
62367dda44
string.gsub accepts a table as the replacement value
2005-10-23 15:46:30 -02:00
Roberto Ierusalimschy
056b6a8ef4
more robust implementation for table.insert
2005-10-23 15:38:15 -02:00
Roberto Ierusalimschy
502d8f9a06
comments
2005-10-23 15:37:55 -02:00
Roberto Ierusalimschy
7f376e6ea8
do a complete garbage collection in case of errors
2005-10-21 11:48:31 -02:00
Roberto Ierusalimschy
053e873145
new macro luaL_opt to avoid evaluating defaults when no needed
2005-10-21 11:47:42 -02:00
Roberto Ierusalimschy
9f4211310f
more precision for gc count
2005-10-20 09:35:50 -02:00
Roberto Ierusalimschy
515d556832
access to metamethods and metafields should be raw
2005-10-20 09:35:25 -02:00
Roberto Ierusalimschy
ed7039024d
avoid some warnings
2005-10-19 11:05:11 -02:00
Roberto Ierusalimschy
5511bf6b9d
avoid comparisons between (void *) and (int *)
2005-10-17 16:01:51 -02:00
Roberto Ierusalimschy
86704cffe9
detail in usage message
2005-10-14 15:34:23 -03:00
Roberto Ierusalimschy
fa41fafa6e
reorganization of argument handling
2005-10-14 15:15:46 -03:00
Roberto Ierusalimschy
ebf646efb5
detail
2005-10-14 13:24:11 -03:00
Roberto Ierusalimschy
b3f81f1d1d
small bug when debugging dead threads
2005-10-14 13:23:33 -03:00
Roberto Ierusalimschy
a24eb3ef17
different organization for platform dependencies
2005-10-13 09:22:53 -03:00
Roberto Ierusalimschy
4385e2ada4
"conceptually", OP_TEST may change reg. A
2005-10-13 09:22:05 -03:00
Roberto Ierusalimschy
e9b06c506f
small optimization
2005-10-13 09:21:51 -03:00
Roberto Ierusalimschy
cd12ab2597
details (more uniform coding)
2005-10-13 09:21:26 -03:00
Roberto Ierusalimschy
e251e84e0f
constant folding optimizations
2005-10-09 17:05:48 -03:00
Roberto Ierusalimschy
e6bfbc38b5
'luaopen_package' was missing in new states
2005-10-06 17:47:32 -03:00
Roberto Ierusalimschy
d31c04c049
missing macros 'luai_userstate*'
2005-10-06 17:46:25 -03:00
Roberto Ierusalimschy
522481a788
avoid some warnings
2005-10-06 17:46:10 -03:00
Roberto Ierusalimschy
37b49aa451
detail
2005-10-06 17:44:22 -03:00
Roberto Ierusalimschy
0fa9b16148
details
2005-10-06 17:43:44 -03:00
Roberto Ierusalimschy
e41fb9a604
registry._LOADED created "on demand"
2005-10-03 11:36:45 -03:00
Roberto Ierusalimschy
5fc92cce12
registry._LOADED created "on demand" and baselib created as module _G
2005-10-03 11:36:45 -03:00
Roberto Ierusalimschy
6dd0c6ccbc
numeral expressions keep their values in struct 'expdesc'
2005-10-03 11:02:40 -03:00
Roberto Ierusalimschy
a77413acd0
include of math.h depends on luaconf
2005-10-03 11:01:26 -03:00
Roberto Ierusalimschy
5dbb870815
small optimization for local declarations without initializations
2005-09-30 11:23:33 -03:00
Roberto Ierusalimschy
ede19c9138
2005-09-30 11:21:56 -03:00
Roberto Ierusalimschy
9e88b336b4
unused assignment
2005-09-30 10:50:05 -03:00
Roberto Ierusalimschy
0fae476ed4
new function 'table.maxn'
2005-09-20 14:56:47 -03:00
Roberto Ierusalimschy
361a9adba7
smaller initial tables (for programs that create many states)
2005-09-20 14:55:53 -03:00
Roberto Ierusalimschy
d8f1cca16e
new function 'lua_setallocf'
2005-09-20 14:55:10 -03:00
Roberto Ierusalimschy
bf96d3fdd9
'string.find' as it was in 5.0
2005-09-19 10:49:12 -03:00
Roberto Ierusalimschy
c8c2e06899
'select' accepts negative indices
2005-09-16 15:22:48 -03:00
Roberto Ierusalimschy
8dcc6bc532
avoid the use of global lock
2005-09-14 14:48:57 -03:00
Roberto Ierusalimschy
38f585d271
separated macros for thread creation and state creation
2005-09-14 14:44:48 -03:00
Roberto Ierusalimschy
6887f91799
":" is not a good mark as it is not valid in Windows file names
2005-09-14 14:23:03 -03:00
Roberto Ierusalimschy
7fbbf1adc6
explicit macro to control use of _longjmp
2005-09-09 15:24:42 -03:00
Roberto Ierusalimschy
6dd3a73ca2
detail (macro evaluates twice its arguments)
2005-09-09 15:23:35 -03:00
Roberto Ierusalimschy
1e6a559b29
does not set isdst when undefined
2005-09-09 15:22:46 -03:00
Roberto Ierusalimschy
2d2f955763
detail
2005-09-09 15:16:28 -03:00
Roberto Ierusalimschy
669f6306be
small corrections
2005-09-06 14:21:03 -03:00
Roberto Ierusalimschy
2bcbd3c725
avoid 'PathRemoveFileSpec' (not very portable)
2005-09-06 14:20:25 -03:00
Roberto Ierusalimschy
5fa6604f00
detail
2005-09-06 14:20:11 -03:00
Roberto Ierusalimschy
ce67a9be31
avoid exporting undefined functions
2005-09-06 14:19:51 -03:00
Roberto Ierusalimschy
506c89cef8
just in case, flush all output
2005-09-06 14:19:33 -03:00
Roberto Ierusalimschy
8ead2ec358
wrong syntax for Windows-specific options
2005-09-02 16:53:25 -03:00
Roberto Ierusalimschy
c3cc4de3fd
small bug (zero is not error code)
2005-09-01 14:42:22 -03:00
Roberto Ierusalimschy
351f7dad6b
default for 'module' is opaque (with option 'seeall')
2005-08-31 20:17:29 -03:00
Roberto Ierusalimschy
3b19af44b0
new method to handle tests without values (negative values)
2005-08-29 17:49:21 -03:00
Roberto Ierusalimschy
3390f9a35a
detail
2005-08-26 14:36:32 -03:00
Roberto Ierusalimschy
9273fbd131
no more 'luaL_get/setfield' (replaced by more direct luaL_findtable)
2005-08-26 14:32:05 -03:00
Roberto Ierusalimschy
be666a662b
detail
2005-08-25 16:55:38 -03:00
Roberto Ierusalimschy
39cdbce23e
no more '-w' option + new way to check module existence
2005-08-25 12:39:16 -03:00
Roberto Ierusalimschy
8974b59e40
no more compatibility for {;} and similar syntax
2005-08-24 14:41:10 -03:00
Roberto Ierusalimschy
4ff1e5b4e1
details
2005-08-24 14:06:36 -03:00
Roberto Ierusalimschy
98296f6b45
some bugs related to stack reallocation
2005-08-24 13:15:49 -03:00
Roberto Ierusalimschy
23b79c5945
small changes to facilitate external C coroutines
2005-08-22 16:58:29 -03:00
Roberto Ierusalimschy
6fcd334ca0
small improvements
2005-08-22 15:54:49 -03:00
Roberto Ierusalimschy
43ad0637ca
small optimizations
2005-08-22 15:54:32 -03:00
Roberto Ierusalimschy
027e9e99ca
simpler implementation for userdata types
2005-08-18 17:36:26 -03:00
Roberto Ierusalimschy
3b828d9e48
luaL_setfield does a non-raw set
2005-08-18 13:04:05 -03:00
Roberto Ierusalimschy
68548a02d3
fancier code ;)
2005-08-17 17:09:31 -03:00
Roberto Ierusalimschy
2f2b4a42a9
luaL_checkudata raises an error if value is not correct
...
(like other luaL_check functions)
2005-08-17 16:05:04 -03:00
Roberto Ierusalimschy
074352911f
new coding for while and repeat (with new scoping for repeat)
2005-08-17 15:32:09 -03:00
Roberto Ierusalimschy
5e8a9e324c
luaL_openlib -> luaL_register, luaL_putchar -> luaL_addchar
2005-08-15 11:12:32 -03:00
Roberto Ierusalimschy
16ddf86168
luaL_openlib -> luaL_register and new function luaL_loadstring
2005-08-15 11:12:32 -03:00
Roberto Ierusalimschy
e4d369c9b7
comments
2005-08-12 10:34:15 -03:00
Roberto Ierusalimschy
42a662334a
simpler implementation for unary minus
2005-08-10 17:20:13 -03:00
Roberto Ierusalimschy
39c0f391c6
detail
2005-08-10 15:47:09 -03:00
Roberto Ierusalimschy
c7b4f44772
correct name to open package library
2005-08-10 15:06:58 -03:00
Roberto Ierusalimschy
44b19075c0
small changes (to easy integration with Coco)
2005-08-09 16:49:04 -03:00
Roberto Ierusalimschy
ab3dfa5594
store some configuration information
2005-08-09 14:58:09 -03:00
Roberto Ierusalimschy
62f786e08c
new version (and new copyright)...
2005-08-09 14:57:54 -03:00
Roberto Ierusalimschy
bbfd28959d
attempt to better control use of _longjmp
2005-08-09 14:57:29 -03:00
Roberto Ierusalimschy
894cd31c52
#string is primitive
2005-08-09 14:42:02 -03:00
Roberto Ierusalimschy
f01a95d4a0
detail
2005-08-09 09:30:19 -03:00
Roberto Ierusalimschy
680fc88cc2
a small bug
2005-08-04 10:37:38 -03:00
Roberto Ierusalimschy
d96f088a26
'lua_lock' and similars should be hard to use
2005-08-04 10:37:10 -03:00
Roberto Ierusalimschy
d8be9a6326
small changes
2005-08-01 12:05:09 -03:00
Roberto Ierusalimschy
95f3eefa5b
small optimization
2005-08-01 01:22:23 -03:00
Roberto Ierusalimschy
e82bdb24f3
new loader for "all-in-one" C packages
2005-08-01 01:21:17 -03:00
Roberto Ierusalimschy
1a343814d8
details
2005-07-31 14:12:32 -03:00
Roberto Ierusalimschy
280f7becb8
"%0" stands for the whole pattern (in gsub)
2005-07-31 13:47:34 -03:00
Roberto Ierusalimschy
d6ff5d9f46
searchpath is "private affair" of loadlib
2005-07-13 16:02:42 -03:00
Roberto Ierusalimschy
a05190fa3b
elimination of common code + better error message
2005-07-12 18:17:46 -03:00
Roberto Ierusalimschy
a569099b70
no more path for loadfile + function lists sorted
2005-07-12 15:15:11 -03:00
Roberto Ierusalimschy
20131e54d3
no more "getc" when testing if file exists
2005-07-12 11:32:48 -03:00
Roberto Ierusalimschy
80ac5e83fd
details (alphabetical order for list of functions)
2005-07-12 11:32:08 -03:00
Roberto Ierusalimschy
289b5dc67a
details (function list in alphabetical order)
2005-07-11 20:58:35 -03:00
Roberto Ierusalimschy
c2f065f405
detail
2005-07-11 15:48:02 -03:00
Roberto Ierusalimschy
b261cd110f
new macro for conversion double->int + small changes
2005-07-11 14:10:35 -03:00
Roberto Ierusalimschy
e4324f54b9
';;' in a path is replaced by default path + '!' (in Windows) is
...
replaced by executable's directory
2005-07-11 13:41:57 -03:00
Roberto Ierusalimschy
3d08aa591d
details
2005-07-11 13:41:51 -03:00
Roberto Ierusalimschy
0f30d00c87
warnings from Visual C
2005-07-11 11:01:37 -03:00
Roberto Ierusalimschy
e86dab2dae
details
2005-07-11 11:01:28 -03:00
Roberto Ierusalimschy
64b57db377
new test function for conversion from num to int
2005-07-11 11:00:59 -03:00
Roberto Ierusalimschy
575637319e
better recovery at panic
2005-07-11 11:00:31 -03:00
Roberto Ierusalimschy
87be01598b
warnings Visual C
2005-07-11 10:59:03 -03:00
Roberto Ierusalimschy
e84b11a494
avoid names starting with '_'
2005-07-09 10:22:34 -03:00
Roberto Ierusalimschy
bbf2cea9a1
more "polite" way to change a thread's environment
2005-07-07 12:48:29 -03:00
Roberto Ierusalimschy
b3f7a43019
lua_setfenv/lua_getfenv should also manipulate threads
2005-07-06 15:07:30 -03:00
Roberto Ierusalimschy
7f97ec286e
parent modules are also imported toghether with the module itself
2005-07-05 16:29:03 -03:00
Roberto Ierusalimschy
e82b41aac2
several small improvements
2005-07-05 11:31:45 -03:00
Roberto Ierusalimschy
ee1edd5734
detail
2005-07-05 11:31:20 -03:00
Roberto Ierusalimschy
8efb44b5e0
changes in 'string.find' and 'string.gfind' (new 'string.match' and
...
'string.gmatch')
2005-07-05 11:30:38 -03:00
Roberto Ierusalimschy
f7720bebe3
more precise way to check incomplete lines
2005-06-28 10:01:50 -03:00
Roberto Ierusalimschy
69cc0a12fe
small bug
2005-06-28 10:01:31 -03:00
Roberto Ierusalimschy
2f0955b99b
detail
2005-06-27 14:24:40 -03:00
Roberto Ierusalimschy
999d55d887
several updates
2005-06-13 18:20:28 -03:00
Roberto Ierusalimschy
1f9f97e3cf
'math.mod' -> 'math.fmod'
2005-06-13 18:20:14 -03:00
Roberto Ierusalimschy
34aac33c15
detail
2005-06-13 18:17:59 -03:00
Roberto Ierusalimschy
3c2cf9db67
some extra consistency checks
2005-06-13 11:39:19 -03:00
Roberto Ierusalimschy
0b71bfd6af
syntax for length changed from '*' to '#'
2005-06-13 11:25:29 -03:00
Roberto Ierusalimschy
0d1685d751
bug: last tag is not the number of tags...
2005-06-13 11:19:00 -03:00
Roberto Ierusalimschy
bf2b342ac1
better control for compatibility code for varargs
2005-06-13 11:15:54 -03:00
Roberto Ierusalimschy
5fa2bec1f0
bug: current line should work for call hook
2005-06-13 11:15:22 -03:00
Roberto Ierusalimschy
746a1d612b
small bug (type error)
2005-06-07 15:53:45 -03:00
Roberto Ierusalimschy
3ad03b331d
optional size for 'setvbuf'
2005-06-06 15:42:21 -03:00
Roberto Ierusalimschy
86add535d8
'popen' is back
2005-06-06 10:30:52 -03:00
Roberto Ierusalimschy
d987cf1f81
new mark LUAI_DATA for extern data
2005-06-06 10:30:25 -03:00
Roberto Ierusalimschy
eca9fa02d2
small improvement
2005-06-03 17:16:16 -03:00
Roberto Ierusalimschy
e33d7bae45
__STRICT_ANSI__ -> LUA_ANSI (definition is independent of gcc)
2005-06-01 14:07:45 -03:00
Roberto Ierusalimschy
d628795940
lua_objsize -> lua_objlen (more compatible with use of `len´ in other
...
places [opcode name, metamethod index, etc.])
2005-05-31 11:34:02 -03:00
Roberto Ierusalimschy
05348d834b
better error message
2005-05-31 11:31:50 -03:00
Roberto Ierusalimschy
90de38bf1f
warnings in VS .Net
2005-05-31 11:25:18 -03:00
Roberto Ierusalimschy
e8a7ecb982
luaL_findstring -> luaL_checkoption
2005-05-25 10:21:26 -03:00
Roberto Ierusalimschy
38da9d568a
better use defined/undefined as flag values for macros
2005-05-20 16:09:05 -03:00
Roberto Ierusalimschy
f21e9c172f
details
2005-05-20 12:53:42 -03:00
Roberto Ierusalimschy
67578ec51f
several small details
2005-05-17 16:49:15 -03:00
Roberto Ierusalimschy
c2bb9abcec
better quotes for strings in error messages
2005-05-16 18:19:00 -03:00
Roberto Ierusalimschy
da32450c3d
new API function `lua_tolstring'
2005-05-16 16:21:11 -03:00
Roberto Ierusalimschy
a2b78aad49
debug information for active lines
2005-05-16 15:45:15 -03:00
Roberto Ierusalimschy
c6293a76cc
LUA_DL_DLOPEN is for internal use; makefile should use LUA_USE_DLOPEN
2005-05-09 10:14:14 -03:00
Roberto Ierusalimschy
1ab2b93462
debug information for last line of a function definition
2005-05-05 17:47:02 -03:00
Roberto Ierusalimschy
6cf85dcc90
metatables for all types
2005-05-05 12:34:03 -03:00
Roberto Ierusalimschy
65f4a0f636
no more compatibility code for traversing tables
2005-05-04 17:42:28 -03:00
Roberto Ierusalimschy
12acca7bd8
comments
2005-05-04 13:36:23 -03:00
Roberto Ierusalimschy
d5fd44d747
corrected definition of lua_number2int for Windows
2005-05-03 16:30:17 -03:00
Roberto Ierusalimschy
b0abc2ca03
better control of local variables in luaV_execute
2005-05-03 16:01:17 -03:00
Roberto Ierusalimschy
b320d37a80
better tests for correctness of `savedpc'
2005-05-03 16:01:17 -03:00
Roberto Ierusalimschy
9b8d136e1c
`*' operator is primitive only for tables
2005-05-02 14:49:43 -03:00
Roberto Ierusalimschy
9832f6b186
small bug
2005-04-29 10:54:05 -03:00
Roberto Ierusalimschy
8e696dd14a
detail
2005-04-29 10:53:59 -03:00
Roberto Ierusalimschy
c3939f5786
comment
2005-04-29 09:43:47 -03:00
Roberto Ierusalimschy
bcc4089a7d
comment
2005-04-27 15:53:53 -03:00
Roberto Ierusalimschy
cf5d1bdd76
nesting of long strings only in compatibility mode
2005-04-27 15:37:51 -03:00
Roberto Ierusalimschy
8718fda9b2
added LUAI_FUNC to functions not in the API
2005-04-25 16:24:10 -03:00
Roberto Ierusalimschy
8c3c3e7691
small bug for tail-recursive debugging
2005-04-14 10:30:47 -03:00
Roberto Ierusalimschy
04f657c7f8
new protocol to open standard libraries
2005-04-13 14:24:20 -03:00
Roberto Ierusalimschy
2873d4efff
stack could overflow with too many command-line arguments
2005-04-11 15:01:35 -03:00
Roberto Ierusalimschy
a7ea0c71e8
detail
2005-04-11 15:01:29 -03:00
Roberto Ierusalimschy
b1957b1e8e
detail for Windows (untested)
2005-04-07 10:52:45 -03:00
Roberto Ierusalimschy
a17e1fe124
new organization using only one library
2005-04-07 10:52:19 -03:00
Roberto Ierusalimschy
fabf5db237
C stack is the same for the parser and the interpreter, so depth
...
control should be unified in both parts.
2005-04-07 10:09:07 -03:00
Roberto Ierusalimschy
de0bfe33b7
new definition for `lua_number2int' for Windows (not tested yet!)
2005-04-06 14:30:13 -03:00
Roberto Ierusalimschy
9768e2f681
detail
2005-04-05 12:57:59 -03:00
Roberto Ierusalimschy
71eb824036
details
2005-04-05 12:35:15 -03:00
Roberto Ierusalimschy
7b6c3b463e
small optimizations
2005-04-05 10:41:29 -03:00
Roberto Ierusalimschy
0316308c0d
removed dirt optimizations that gave small gains
2005-04-04 15:12:51 -03:00
Roberto Ierusalimschy
409ee99900
detail
2005-04-01 10:51:37 -03:00
Roberto Ierusalimschy
445eda7ead
details
2005-03-30 16:50:29 -03:00
Roberto Ierusalimschy
092dc95b06
using require' to implement -l'
2005-03-29 13:47:48 -03:00
Roberto Ierusalimschy
e6e543a534
better control for compatibility code
2005-03-29 13:20:48 -03:00
Roberto Ierusalimschy
1c9c886974
standard configuration should run out-of-the-box in "any" system
2005-03-29 11:30:16 -03:00
Roberto Ierusalimschy
ade585bdf9
no more LUA_FIRSTINDEX
2005-03-28 14:17:53 -03:00
Roberto Ierusalimschy
04c41444e2
wrong comment corrected
2005-03-28 09:53:40 -03:00
Roberto Ierusalimschy
03fb3c39d4
change #ifdef' for #if defined'
2005-03-23 14:51:11 -03:00
Roberto Ierusalimschy
8af1ca02e0
LUA_USERCONFIG is no longer necessary
2005-03-23 14:50:49 -03:00
Roberto Ierusalimschy
f1eb79fdf4
some line-edit facilities must free the line after its use
2005-03-22 13:55:35 -03:00
Roberto Ierusalimschy
408cb71795
avoid name conflict with some spurious included header files
2005-03-22 13:54:29 -03:00
Roberto Ierusalimschy
390256edf7
better name for GC pause
2005-03-22 13:04:29 -03:00
Roberto Ierusalimschy
ad24cff0f1
lua_gc(STEP) returns whether collection cycle finished
2005-03-21 15:12:21 -03:00
Roberto Ierusalimschy
6d475731ca
cleaner configuration for lua.c
2005-03-21 15:12:07 -03:00
Roberto Ierusalimschy
f41fc0eb0e
small bug: a GC step was not proportional to its "size"
2005-03-18 17:11:28 -03:00
Roberto Ierusalimschy
d872090248
small errors in previous `ci' of luaconf.h.
2005-03-18 15:55:45 -03:00
Roberto Ierusalimschy
fb0f95a2b7
call limit may be larger than shorts
2005-03-18 15:55:09 -03:00
Roberto Ierusalimschy
d3a6d95b9a
more cleaning on configurations
2005-03-18 15:02:04 -03:00
Roberto Ierusalimschy
47984a0cc2
internal definitions have prefix `luai_'
2005-03-18 15:01:37 -03:00
Roberto Ierusalimschy
086d6b09ce
avoid name colision with `close' function
2005-03-18 15:01:14 -03:00
Roberto Ierusalimschy
bfe2905618
avoid too much configuration options
2005-03-18 13:38:43 -03:00
Roberto Ierusalimschy
2cbd9eecfb
try to avoid warnings
2005-03-18 13:38:02 -03:00
Roberto Ierusalimschy
4494094031
detail
2005-03-16 17:02:48 -03:00
Roberto Ierusalimschy
04bbd01171
new operation *t (for size of t) (may yet be removed...)
2005-03-16 13:59:21 -03:00
Roberto Ierusalimschy
9ffae705ee
new "primitive" getn
2005-03-16 13:58:41 -03:00
Roberto Ierusalimschy
6bfef60e77
bug: rawset/rawget do not ignore extra arguments
2005-03-11 12:51:08 -03:00
Roberto Ierusalimschy
370d31a559
luac´ -> luai' (to avoid confusion with other luac stuff)
2005-03-09 13:28:07 -03:00
Roberto Ierusalimschy
f8df21bd20
`luaconf.h´ exports all its definitions always (so all of them
...
must have a lua/LUA prefix).
2005-03-08 17:10:05 -03:00
Roberto Ierusalimschy
d3902cfa81
entries `{[...] = ...}' need space too.
2005-03-08 15:16:45 -03:00
Roberto Ierusalimschy
b5b230d95c
fewer #include's in luaconf.h
2005-03-08 15:09:16 -03:00
Roberto Ierusalimschy
7d57ea70bc
new mod' (%') operator
2005-03-08 15:00:16 -03:00
Roberto Ierusalimschy
2d5b923759
details
2005-03-08 10:37:55 -03:00
Roberto Ierusalimschy
192d185492
C module names may have an optional `l' prefix
2005-03-08 10:27:36 -03:00
Roberto Ierusalimschy
e010ef8948
detail
2005-03-07 15:27:34 -03:00
Roberto Ierusalimschy
1e48b20ce0
loadlib' not global anymore (packaged inside package')
2005-03-07 15:07:34 -03:00
Roberto Ierusalimschy
d1ed6e4c07
small bug: must use original (previous) base
2005-03-07 13:59:01 -03:00
Roberto Ierusalimschy
b6a7983b65
USHRT_MAX may not fit in a (16-bit) int
2005-03-07 13:58:27 -03:00
Roberto Ierusalimschy
49f90ffdeb
new functions (to complete math.h)
2005-03-04 15:57:03 -03:00
Roberto Ierusalimschy
dcabf721f8
"coroutine.current" -> "running" (compatible with "running" status)
2005-02-28 14:24:41 -03:00
Roberto Ierusalimschy
5eeff89f32
comments
2005-02-28 12:59:11 -03:00
Roberto Ierusalimschy
d6143b1d7b
avoid access to undefined global variables
2005-02-28 12:58:48 -03:00
Roberto Ierusalimschy
d55bb795fa
details
2005-02-23 14:30:22 -03:00
Roberto Ierusalimschy
d84cc9d2db
small bug
2005-02-18 10:50:08 -02:00
Roberto Ierusalimschy
7d45a5f48f
C functions and userdata also have environments
2005-02-18 10:40:02 -02:00
Roberto Ierusalimschy
73d7640244
more secure way to stop GC cycles during finalizers
2005-02-14 11:19:50 -02:00
Roberto Ierusalimschy
a9af455b32
detail
2005-02-14 11:19:44 -02:00
Roberto Ierusalimschy
678d2fb2ac
all collected userdata must go to the end of the list of finalizers
2005-02-11 18:03:35 -02:00
Roberto Ierusalimschy
af39352632
LUA_PATH_SEP -> LUA_PATHSEP
2005-02-10 15:12:02 -02:00
Roberto Ierusalimschy
4df8800a01
cleaner way to free all objects
2005-02-10 11:25:02 -02:00
Roberto Ierusalimschy
0e60572606
values holded in open upvalues of suspended threads may be
...
incorrectly collected
2005-01-19 15:03:47 -02:00
Roberto Ierusalimschy
621ef9f767
better control over GC collors of upvalues
2005-01-19 13:54:26 -02:00
Roberto Ierusalimschy
d89a56f869
small warning in C++
2005-01-18 15:23:25 -02:00
Roberto Ierusalimschy
334ba8132b
cleaner way to remark open upvalues
2005-01-18 15:18:09 -02:00
Roberto Ierusalimschy
ac71a0891d
detail
2005-01-17 21:50:55 -02:00
Roberto Ierusalimschy
8e346d875a
auxiliar patch to monitor garbage collection
2005-01-14 12:21:16 -02:00
Roberto Ierusalimschy
5be517602e
no more generational collector (and no more `noinc' mode)
2005-01-14 12:19:42 -02:00
Roberto Ierusalimschy
d2bda8046c
new implementation for loaders
2005-01-14 12:17:18 -02:00
Roberto Ierusalimschy
a72fbf794d
detail
2005-01-10 17:16:29 -02:00
Roberto Ierusalimschy
8ddfe3df29
macros for all arithmetic operations over lua_Numbers
2005-01-10 16:17:39 -02:00
Roberto Ierusalimschy
6eb68ba57a
all function declarations surround name with parentheses
2005-01-10 15:31:50 -02:00
Roberto Ierusalimschy
a27497aa03
debug.traceback' gets an optional initial level' parameter
2005-01-10 15:21:10 -02:00
Roberto Ierusalimschy
0480ea0886
gets `debug.traceback' current when error occurs
2005-01-10 15:21:10 -02:00
Roberto Ierusalimschy
162b66624d
no more `lua_userinit' macro
2005-01-10 14:31:30 -02:00
Roberto Ierusalimschy
e791f025c0
no more `_TRACEBACK' variable
2005-01-10 14:30:59 -02:00
Roberto Ierusalimschy
f61d435a7d
a^b calls `pow´ (from math.h) directly
2005-01-07 18:00:33 -02:00
Roberto Ierusalimschy
071b2ae0e1
details
2005-01-07 17:53:32 -02:00
Roberto Ierusalimschy
e2498e079e
change in hash algorithm so that it does not need empty slot
...
(tables can be 100% full)
2005-01-05 16:20:51 -02:00
Roberto Ierusalimschy
65726f3e2e
cleaner interface to `ltable'
2005-01-04 13:55:12 -02:00
Roberto Ierusalimschy
9fe2d0266a
better configuration for Windows
2005-01-04 10:46:04 -02:00
Roberto Ierusalimschy
e22cdf7752
better error messages when require fails for C module
2004-12-29 16:56:34 -02:00
Roberto Ierusalimschy
a5eb48a3e6
redesigned loadlib (Windows version not tested yet)
2004-12-27 13:58:15 -02:00
Roberto Ierusalimschy
49fe79e9fd
small change
2004-12-27 13:58:15 -02:00
Roberto Ierusalimschy
96727c61b8
several improvements/corrections
2004-12-22 15:43:27 -02:00
Roberto Ierusalimschy
d5ebc3ff6d
small changes
2004-12-22 11:05:33 -02:00
Roberto Ierusalimschy
3d19aee78f
`luac' may generate code without upvalue names
2004-12-20 13:50:00 -02:00
Roberto Ierusalimschy
4194de70e7
details
2004-12-20 11:47:29 -02:00
Roberto Ierusalimschy
c6254dceff
a different option for the GC
2004-12-13 10:15:11 -02:00
Roberto Ierusalimschy
a56d889f72
corrections for `absent' implementation
2004-12-13 10:14:21 -02:00
Roberto Ierusalimschy
2ec4fc4295
simpler code for `print'
2004-12-07 16:31:34 -02:00
Roberto Ierusalimschy
70751dd27c
details
2004-12-07 16:31:16 -02:00
Roberto Ierusalimschy
39a8082f50
more options for controling the GC
2004-12-06 15:53:42 -02:00
Roberto Ierusalimschy
531874f6ce
better (correct?) way to handle `next' over removed keys
2004-12-04 16:10:22 -02:00
Roberto Ierusalimschy
61a888518f
details
2004-12-03 18:54:12 -02:00
Roberto Ierusalimschy
c78940f21a
static names do not need `luaX_' prefix
2004-12-03 18:50:25 -02:00
Roberto Ierusalimschy
8b239eeba1
details
2004-12-03 18:44:19 -02:00
Roberto Ierusalimschy
a5330b77f3
static names do not need `luaX_' prefix
2004-12-03 18:35:33 -02:00
Roberto Ierusalimschy
e1c2fb6eed
details
2004-12-02 10:59:10 -02:00
Roberto Ierusalimschy
12dacd3c0e
added an `L' parameter to macros L_TRY & L_THROW (someone may need it).
2004-12-01 13:52:54 -02:00
Roberto Ierusalimschy
23b38176a7
`LUA_FIRSTINDEX' should not be configurable
2004-12-01 13:50:18 -02:00
Roberto Ierusalimschy
97e2dab1fb
better control of overflows in size computations
2004-12-01 13:46:18 -02:00
Roberto Ierusalimschy
0ed8519127
detail
2004-12-01 13:46:06 -02:00
Roberto Ierusalimschy
0e002005b1
better names for `luaM_free...' macros
2004-11-24 17:20:21 -02:00
Roberto Ierusalimschy
1d99a7360b
details
2004-11-24 17:16:03 -02:00
Roberto Ierusalimschy
2f82bf6fe9
better support for 64-bit machines
2004-11-24 16:55:56 -02:00
Roberto Ierusalimschy
087df82a61
detail
2004-11-24 16:55:42 -02:00
Roberto Ierusalimschy
10e48b9160
details
2004-11-19 14:59:08 -02:00
Roberto Ierusalimschy
6f1ea817f5
better control over memory-size overflows
2004-11-19 13:52:40 -02:00
Roberto Ierusalimschy
cdcb236747
needs to include stdlib.h' to access getenv'
2004-11-19 13:52:12 -02:00
Roberto Ierusalimschy
9be5844713
first full implementation of new package system
2004-11-18 17:53:49 -02:00
Roberto Ierusalimschy
497f042fad
detail
2004-11-17 10:02:41 -02:00
Roberto Ierusalimschy
2ed07ea8c1
towards "requiring" C libraries
2004-11-11 13:42:57 -02:00
Roberto Ierusalimschy
cfd7bc478f
better patch for buffer overflow error
2004-11-03 10:22:39 -02:00
Roberto Ierusalimschy
737ec947d3
better implementation for `floating-point bytes'
2004-11-01 12:06:50 -03:00
Roberto Ierusalimschy
45d566f676
small corrections (thanks to Mike Pall)
2004-11-01 11:33:33 -03:00
Roberto Ierusalimschy
cfb79b1751
more secure way to compute final string length
2004-10-28 14:45:51 -03:00
Roberto Ierusalimschy
3e1a1f2836
better configuration for loadlib + tested Mac OS X version
2004-10-18 15:07:31 -03:00
Roberto Ierusalimschy
b32e9a46d2
better configuration for loadlib
2004-10-18 15:07:31 -03:00
Roberto Ierusalimschy
e5cfa7a367
use of parentheses around macro parameters in call lists, to avoid
...
problems with comma expressions
2004-10-18 09:51:44 -03:00
Roberto Ierusalimschy
aae1612747
avoid name chash in `all.c'
2004-10-08 15:57:16 -03:00
Roberto Ierusalimschy
8050e75f9d
bug: gc metamethod must disable GC steps (to avoid nested calls)
2004-10-08 13:00:34 -03:00
Roberto Ierusalimschy
3bec76abe3
first version of loadlib for Mac OS X (not tested yet!!)
2004-10-07 14:27:20 -03:00
Roberto Ierusalimschy
5cb6037d49
cannot jump to a setlist count
2004-10-07 14:27:00 -03:00
Roberto Ierusalimschy
f1c2dd3aed
detail
2004-10-06 15:34:47 -03:00
Roberto Ierusalimschy
bd38017ddf
small optimization for table size in machines with double allignment
2004-10-06 15:34:16 -03:00
Roberto Ierusalimschy
652f885c30
detail
2004-10-04 16:07:42 -03:00
Roberto Ierusalimschy
f7e9465a0c
new format for SETLIST opcode
2004-10-04 16:04:34 -03:00
Roberto Ierusalimschy
5ee87acd6b
small optimization for boolean constants + new format for SETLIST opcode
2004-10-04 16:01:53 -03:00
Roberto Ierusalimschy
5d834bdf57
function constants may include boolean values
2004-10-04 16:01:12 -03:00
Roberto Ierusalimschy
67391a35da
details
2004-09-29 18:03:42 -03:00
Roberto Ierusalimschy
36541dec9b
towards new package system
2004-09-29 18:03:14 -03:00
Roberto Ierusalimschy
cf2a194edc
better API for luaL_getfield/setfield
2004-09-29 18:00:25 -03:00
Roberto Ierusalimschy
66845f415f
small optimizations
2004-09-27 15:54:45 -03:00
Roberto Ierusalimschy
b2820f39a2
long string delimiter changed from [*[' to [=['
2004-09-22 11:02:00 -03:00
Roberto Ierusalimschy
8b5bb6056b
removal of unused variable
2004-09-22 09:37:52 -03:00
Roberto Ierusalimschy
4973682294
small bug with coroutine tracebacks
2004-09-21 14:58:06 -03:00
Roberto Ierusalimschy
6acfb91c8d
new auxiliary functions to implement new package system
2004-09-21 13:54:32 -03:00
Roberto Ierusalimschy
2419f2bf02
cleaner API for coroutines
2004-09-15 17:39:42 -03:00
Roberto Ierusalimschy
0e54d2be36
bug: barrier was wrong for generational phase
2004-09-15 17:38:15 -03:00
Roberto Ierusalimschy
226c57fec0
simpler configuration to turn on all asserts
2004-09-10 14:30:46 -03:00
Roberto Ierusalimschy
0de2065f4e
tighter tests for stack overflow
2004-09-08 11:23:09 -03:00
Roberto Ierusalimschy
ee165043ef
two bugs related to varargs
2004-09-03 12:48:56 -03:00
Roberto Ierusalimschy
3c394b12f9
detail
2004-09-03 10:17:14 -03:00
Roberto Ierusalimschy
79fc7dea43
simpler implementation for generic reader
2004-09-03 10:16:48 -03:00
Roberto Ierusalimschy
9c34e23214
new libs loslib´ and linit´
2004-09-01 10:49:20 -03:00
Roberto Ierusalimschy
2aba14b623
details
2004-09-01 10:47:31 -03:00
Roberto Ierusalimschy
1dd8c9b6b6
detail
2004-08-31 14:57:33 -03:00
Roberto Ierusalimschy
7d309480dd
new way to handle _PATH (old LUA_PATH)
2004-08-30 15:35:14 -03:00
Roberto Ierusalimschy
bcb2cb59ac
select' returns all values after given n'
2004-08-30 12:28:32 -03:00
Roberto Ierusalimschy
0b06241483
better control for GC cycles
2004-08-30 10:44:44 -03:00
Roberto Ierusalimschy
857253cdfc
detail
2004-08-30 10:44:04 -03:00
Roberto Ierusalimschy
5dcd908add
detail
2004-08-26 11:19:55 -03:00
Roberto Ierusalimschy
32d4f304db
first implementation of generational GC
2004-08-24 17:12:06 -03:00
Roberto Ierusalimschy
4b12eff801
small correction (less conservative write barrier for tables)
2004-08-24 17:09:11 -03:00
Roberto Ierusalimschy
271e05917f
bug: lua_getupvalue and setupvalue do not check for index too small.
2004-08-17 14:45:45 -03:00
Roberto Ierusalimschy
fe8c365281
default state (created by `luaL_newstate´) has a default panic function
2004-08-13 16:52:53 -03:00
Roberto Ierusalimschy
2d8b099274
better checking for read errors (with `ferror´)
2004-08-13 16:52:13 -03:00
Roberto Ierusalimschy
ff4f8fe59a
small bug: calls to upvalues were not correctly traced
2004-08-13 15:02:36 -03:00
Roberto Ierusalimschy
a7c74c06b9
small bug: lua_gc(count) was falling through to next option
2004-08-12 14:02:51 -03:00
Roberto Ierusalimschy
c7dda42c2f
bug (due to new handling of varargs)
2004-08-12 11:19:51 -03:00
Roberto Ierusalimschy
26ae992129
less conservative write barrier for tables
2004-08-10 16:17:23 -03:00
Roberto Ierusalimschy
f87057690b
`io.lines' also can give the file name in its error message
2004-08-09 11:35:59 -03:00
Roberto Ierusalimschy
9e6aa878c9
string.byte truncates indices out of range
2004-08-09 10:30:33 -03:00
Roberto Ierusalimschy
c0fdaf5842
string.byte may return multiple values
2004-08-06 14:35:38 -03:00
Roberto Ierusalimschy
2430d3cb28
small changes (due to Rici Lake) to allow testing non-supported OS functions
2004-08-05 16:30:37 -03:00
Roberto Ierusalimschy
6bddbbde7a
details (opcode may not be the first field)
2004-08-04 17:18:13 -03:00
Roberto Ierusalimschy
31e48f26ed
small bug
2004-07-16 10:30:53 -03:00
Roberto Ierusalimschy
0d9007b642
no more LUA_OPNAMES
2004-07-16 10:17:00 -03:00
Roberto Ierusalimschy
9609236fbb
no more LUA_OPNAMES; it is simpler to "waste" 400 bytes
2004-07-16 10:15:32 -03:00
Roberto Ierusalimschy
942496d767
small bug
2004-07-13 17:11:32 -03:00
Roberto Ierusalimschy
a535ad6fee
several small changes (mainly function names)
2004-07-13 16:56:44 -03:00
Roberto Ierusalimschy
4206d7ed60
`lua_Chunkwriter' returns 0 in case of success
2004-07-09 15:24:41 -03:00
Roberto Ierusalimschy
7a796a0682
new macro `luaL_typename'
2004-07-09 15:23:17 -03:00
Roberto Ierusalimschy
76d8b8db06
lua_pushfstring' now supports %p' option too
2004-07-09 13:01:38 -03:00
Roberto Ierusalimschy
ce455481ab
separation between io lib and os lib
2004-07-09 12:47:48 -03:00
Roberto Ierusalimschy
85f1d70e68
OS lib (finally separated from io lib)
2004-07-09 12:47:48 -03:00
Roberto Ierusalimschy
31f6540fba
back with an "open all libs" function
2004-07-09 11:29:29 -03:00
Roberto Ierusalimschy
eab1965c05
bug: `lua_setfenv' needs a write barrier
2004-07-09 11:20:22 -03:00
Roberto Ierusalimschy
3d5187f6e5
require' uses its private reference to _LOADED' table
2004-07-02 15:09:11 -03:00
Roberto Ierusalimschy
80ec81926c
`lua.c' also needs the default path, so auxlib should provide it
2004-07-01 11:26:28 -03:00
Roberto Ierusalimschy
96917ff42a
"step" option in lua_gc also need to lock Lua.
2004-06-30 11:15:23 -03:00
Roberto Ierusalimschy
a6179adf12
detail
2004-06-30 09:58:44 -03:00
Roberto Ierusalimschy
02a2c01ccd
new way to code RK values
2004-06-29 15:49:02 -03:00
Roberto Ierusalimschy
23e08a68f5
detail
2004-06-29 14:05:00 -03:00
Roberto Ierusalimschy
0f5a497ed9
new interface for search-path function + small changes in require
2004-06-29 13:58:17 -03:00
Roberto Ierusalimschy
753625c3f3
new interface for search-path function
2004-06-29 13:57:56 -03:00
Roberto Ierusalimschy
42b74ccf1d
libraries may want to use `lua_assert' too...
2004-06-23 12:57:29 -03:00
Roberto Ierusalimschy
0c49857c1a
new scheme to search paths
2004-06-21 17:05:29 -03:00
Roberto Ierusalimschy
6b41e84da5
`assert' returns all its parameters (not only the first)
2004-06-21 13:45:09 -03:00
Roberto Ierusalimschy
359840c2f8
new coroutines inherit hook from creator
2004-06-17 11:25:31 -03:00
Roberto Ierusalimschy
dba17070ac
optional error for accesss to undefined variables/fields
2004-06-17 11:06:52 -03:00
Roberto Ierusalimschy
569eefbf73
detail
2004-06-16 17:22:43 -03:00
Roberto Ierusalimschy
5e4ea9a831
`setn' returns its "self" (the table)
2004-06-15 10:37:21 -03:00
Roberto Ierusalimschy
6311e3109f
`setfenv' returns "self"
2004-06-15 10:31:30 -03:00
Roberto Ierusalimschy
9b854e6dbc
BUG: string concatenation may cause arithmetic overflow, leading
...
to a buffer overflow.
2004-06-08 13:23:58 -03:00
Roberto Ierusalimschy
2b2d8ecd7a
details
2004-06-08 11:31:15 -03:00
Roberto Ierusalimschy
75057dfced
2004-06-08 11:31:00 -03:00
Roberto Ierusalimschy
345379b5ff
option for garbage-collector `step'
2004-06-04 12:30:53 -03:00
Roberto Ierusalimschy
118e471fa0
details
2004-06-02 16:09:36 -03:00
Roberto Ierusalimschy
ba9878fcb8
lock stuff defined in `luaconf.h'
2004-06-02 16:09:21 -03:00
Roberto Ierusalimschy
fa38421cea
`testC' can operate on other states
2004-06-02 16:08:52 -03:00
Roberto Ierusalimschy
e8d4fe7236
new macro lua_threadyield' + lock stuff in luaconf.h' + details
2004-06-02 16:07:55 -03:00
Roberto Ierusalimschy
b8691f13a8
`getn' uses binary search if it has to count elements
2004-06-02 16:06:14 -03:00
Roberto Ierusalimschy
f4718544de
what is provided by lauxlib.c should be defined at lauxlib.h
2004-06-02 14:37:03 -03:00
Roberto Ierusalimschy
50f9cd201e
no more `__fenv'
2004-06-02 11:20:08 -03:00
Roberto Ierusalimschy
9d8426bab4
better error messages for `loadfile'
2004-06-02 10:50:46 -03:00
Roberto Ierusalimschy
557f0009c4
clear definition for `lua_number2int'
2004-06-02 10:24:43 -03:00
Roberto Ierusalimschy
0dfd04eb60
lua_strlen' upgraded to lua_objsize' (which also works with userdata)
2004-05-31 16:41:52 -03:00
Roberto Ierusalimschy
1e0aaf2156
luaL_dofile' and luaL_dostring' are deprecated
2004-05-31 16:27:14 -03:00
Roberto Ierusalimschy
616438fe9a
new way to use vararg' parameters (with ...')
2004-05-31 15:51:50 -03:00
Roberto Ierusalimschy
47eda6ebd8
main must return status from original main!
2004-05-31 15:50:48 -03:00
Roberto Ierusalimschy
0f49b3e62d
new function `select'
2004-05-31 15:50:30 -03:00
Roberto Ierusalimschy
0733c83b8c
other modules may need FILEHANDLE definition
2004-05-28 15:35:05 -03:00
Roberto Ierusalimschy
e9844a4f1d
`popen' is not ANSI and therefore was removed from the basic library
2004-05-28 15:32:51 -03:00
Roberto Ierusalimschy
c61bb89dba
details
2004-05-17 09:34:00 -03:00
Roberto Ierusalimschy
0bda88e6cd
small steps towards yields in iterators and tag methods
2004-05-14 16:25:09 -03:00
Roberto Ierusalimschy
7966a4acae
avoid name clashes among different files
2004-05-11 13:52:08 -03:00
Roberto Ierusalimschy
37cd986532
in time', uses default if isdst' is absent
2004-05-10 17:26:37 -03:00
Roberto Ierusalimschy
a17dd24b34
no more USE_DEGREES option
2004-05-10 15:11:32 -03:00
Roberto Ierusalimschy
b072e4ea0b
tinsert' and tremove' also use LUA_FIRSTINDEX
2004-05-10 15:06:14 -03:00
Roberto Ierusalimschy
7e41612eb2
code parameterized by LUA_FIRSTINDEX (first index of an array)
2004-05-10 14:50:51 -03:00
Roberto Ierusalimschy
b0f341ee52
LUAL_BUFFERSIZE is used in `lauxlib.h' and so everybody may need it
2004-05-10 10:58:26 -03:00
Roberto Ierusalimschy
1c459b881f
accept `\r' as newline when looking for line end
2004-05-03 09:30:41 -03:00
Roberto Ierusalimschy
9629508a98
configuration file for Lua project
2004-05-03 09:28:43 -03:00
Roberto Ierusalimschy
763b8fba1b
more stuff goes to configuration file
2004-05-03 09:28:43 -03:00
Roberto Ierusalimschy
b4cd38ba6c
new scheme for configuration through `luaconf.h'
2004-04-30 17:13:38 -03:00
Roberto Ierusalimschy
079facab40
ensures own top is corrected after calling function with multiple results
2004-04-05 11:43:17 -03:00
Roberto Ierusalimschy
4c5d7b2ddd
small optimization for {f()}
2004-03-26 11:02:41 -03:00
Roberto Ierusalimschy
d7cb622866
`unpack' has two optional arguments (to give a range)
2004-03-26 10:25:17 -03:00
Roberto Ierusalimschy
26a9b249db
details
2004-03-24 12:46:49 -03:00
Roberto Ierusalimschy
227bddafe8
new copyright year
2004-03-24 10:55:46 -03:00
Roberto Ierusalimschy
5008e3d7d1
new states must use controlled malloc, too
2004-03-23 14:07:53 -03:00
Roberto Ierusalimschy
21bc05c920
write barrier for C upvalues
2004-03-23 14:07:34 -03:00
Roberto Ierusalimschy
29a13b4128
detail
2004-03-23 13:38:43 -03:00
Roberto Ierusalimschy
ef8c0d7d90
better message for errors with upvalues
2004-03-23 10:10:16 -03:00
Roberto Ierusalimschy
178246062c
reuse `sweeplist' for all lists
2004-03-23 09:57:12 -03:00
Roberto Ierusalimschy
24f2d1183c
detail
2004-03-16 09:31:40 -03:00
Roberto Ierusalimschy
8e1f25e3f8
bug in `dofile'
2004-03-15 18:09:55 -03:00
Roberto Ierusalimschy
48a8d78102
new tests to check memory consistency (for incremental GC)
2004-03-15 18:04:54 -03:00
Roberto Ierusalimschy
a4e1230f95
better way to control open upvalues
2004-03-15 18:04:33 -03:00
Roberto Ierusalimschy
9804467eeb
detail
2004-03-13 10:32:09 -03:00
Roberto Ierusalimschy
a003e89125
better error messages for some limits
2004-03-12 16:53:56 -03:00
Roberto Ierusalimschy
b876ec61c0
new (temporary?) API for garbage collector
2004-03-09 14:34:35 -03:00
Roberto Ierusalimschy
898e8a6794
added include to stdarg.h (as it uses vararg facilities)
2004-02-20 13:01:05 -03:00
Roberto Ierusalimschy
1edea34666
details
2004-02-18 10:40:03 -03:00
Roberto Ierusalimschy
2aaf7394ad
more and better tools (assertions & inspectors) to check incremental GC
2004-02-16 16:09:52 -03:00
Roberto Ierusalimschy
b3ce450529
avoid calling `memcmp' with a NULL argument
2004-01-15 10:40:26 -02:00
Roberto Ierusalimschy
24434b59f7
'%' must be '%%' to avoid formatting problems
2004-01-02 09:54:14 -02:00
Roberto Ierusalimschy
beb2aa5a46
atomic operations are not GC "states"
2003-12-12 16:29:34 -02:00
Roberto Ierusalimschy
47fc57a252
TObject' renamed to TValue' + other name changes and better assertions
...
for incremental garbage collection
2003-12-10 10:13:36 -02:00
Roberto Ierusalimschy
4d5fe1f54b
detail
2003-12-10 09:04:54 -02:00
Roberto Ierusalimschy
df429f163a
First version of incremental GC
2003-12-09 14:56:11 -02:00
Roberto Ierusalimschy
fe595a45c2
`grayagain' list
2003-12-04 16:52:23 -02:00
Roberto Ierusalimschy
9db1942bac
sweep of strings also incremental
2003-12-04 15:22:42 -02:00
Roberto Ierusalimschy
c6eac44a94
two different white flags (to distinguish dead elements from new ones)
2003-12-03 18:03:07 -02:00
Roberto Ierusalimschy
8878554b85
single list for all collectible objects, with udata separated at the
...
end of the list
2003-12-03 10:30:41 -02:00
Roberto Ierusalimschy
af850484a9
default metatable can be NULL
2003-12-01 16:22:56 -02:00
Roberto Ierusalimschy
1d10acb355
incremental GC phases
2003-12-01 14:33:30 -02:00
Roberto Ierusalimschy
da61624756
avoid overflow when doubling size
2003-11-27 16:18:37 -02:00
Roberto Ierusalimschy
8b97b072cd
details
2003-11-27 16:05:14 -02:00
Roberto Ierusalimschy
5ee63257f9
macros for closure sizes are global
2003-11-24 16:50:36 -02:00
Roberto Ierusalimschy
8bc6c68021
details
2003-11-19 17:59:18 -02:00
Roberto Ierusalimschy
57b6ed6815
initial implementation of white/gray/black coloring
2003-11-19 17:41:57 -02:00
Roberto Ierusalimschy
9b9cdfee8b
gclist for upvalues must be available even when upvalue is still open
2003-11-19 17:41:30 -02:00
Roberto Ierusalimschy
366e4af3c9
towards incremental GC
2003-11-18 12:55:11 -02:00
Roberto Ierusalimschy
53c7f86194
details
2003-11-18 08:44:53 -02:00
Roberto Ierusalimschy
ab7d9bfd0c
cleaner code for manipulation of `marked' field
2003-11-17 17:50:05 -02:00
Roberto Ierusalimschy
921b1723e2
comments
2003-11-11 14:34:17 -02:00
Roberto Ierusalimschy
fa198197a0
lua_(set)getglobal are ok to use
2003-11-05 09:59:14 -02:00
Roberto Ierusalimschy
1e944de6cb
towards a "stackless" call of metamethods (?)
2003-10-27 17:14:31 -02:00
Roberto Ierusalimschy
275c150b17
error()' (and error(nil)') generates errors with no error messages
2003-10-23 16:06:22 -02:00
Roberto Ierusalimschy
d6d896b953
lua_set(get)global may use lua_set(get)field
2003-10-21 08:58:58 -02:00
Roberto Ierusalimschy
07201066bd
core does not look for function name in globals (too particular)
2003-10-20 16:42:28 -02:00
Roberto Ierusalimschy
97b838d9ab
new semantics for setn/getn (no more changes to `n')
2003-10-20 16:32:55 -02:00
Roberto Ierusalimschy
c51bcf4796
it's ok to dump functions with upvalues
2003-10-20 15:42:41 -02:00
Roberto Ierusalimschy
03bab90303
new function `lua_getallocf' to retrieve allocation function and data
2003-10-20 10:25:23 -02:00
Roberto Ierusalimschy
8502331f69
`luaX_errorline' was used only in one place
2003-10-20 10:24:34 -02:00
Roberto Ierusalimschy
9914e1bcdd
detail
2003-10-20 10:24:26 -02:00
Roberto Ierusalimschy
10de467c79
new function `lua_createtable'
2003-10-10 10:29:28 -03:00
Roberto Ierusalimschy
533737f26e
new functions lua_getfield' and lua_setfield'
2003-10-10 09:57:55 -03:00
Roberto Ierusalimschy
a41d60e1d1
debugger can only see `local function' after it has a meaningful value
2003-10-09 14:56:23 -03:00
Roberto Ierusalimschy
f04fe526cd
new functions `lua_tointeger' and lua_pushinteger'
2003-10-07 17:13:41 -03:00
Roberto Ierusalimschy
21947deddc
new bug + correction in path for coroutine bug
2003-10-07 09:34:21 -03:00
Roberto Ierusalimschy
3087636c76
detail
2003-10-03 13:07:44 -03:00
Roberto Ierusalimschy
7b8504840f
buffer should better use `size_t' for its size
2003-10-03 13:05:34 -03:00
Roberto Ierusalimschy
3a508b8bd7
avoid the use of `strlen' (strings are literals)
2003-10-03 13:04:24 -03:00
Roberto Ierusalimschy
6becdb3e70
details
2003-10-03 13:04:11 -03:00
Roberto Ierusalimschy
b97fb932ec
Lua kernel does not use malloc/free functions.
2003-10-02 17:31:17 -03:00
Roberto Ierusalimschy
c7cf92e6f3
avoid unecessary includes of `stdlib'
2003-10-02 16:21:09 -03:00
Roberto Ierusalimschy
a62d39aa1c
detail: `luaL_where' does not use the name information
2003-10-01 13:50:53 -03:00
Roberto Ierusalimschy
5d4bf35ec9
bug: syntax `local function' does not increment stack size
2003-09-29 13:41:35 -03:00
Roberto Ierusalimschy
6063c5c61f
bug: cannot invalidate a running coroutine
2003-09-05 11:30:59 -03:00
Roberto Ierusalimschy
2a70107581
detail
2003-09-05 11:00:27 -03:00
Roberto Ierusalimschy
7dae7899b1
main thread and global state are allocated in a single block
2003-09-04 17:19:07 -03:00
Roberto Ierusalimschy
30e51f09b9
some changes in error reporting
2003-09-04 17:00:28 -03:00
Roberto Ierusalimschy
994a37c8e8
IBM AS400 (OS400) has sizeof(void *)==16, and a `%p' may generate
...
up to 60 characters in a `printf'. That causes a buffer overflow in
`tostring'..
2003-08-29 13:50:02 -03:00
Roberto Ierusalimschy
0ff1596476
new form of long strings: `[***[...]***]'
2003-08-29 13:48:14 -03:00
Roberto Ierusalimschy
b27664e0db
simpler manipulation of buffer count in scanner
2003-08-28 11:38:46 -03:00
Roberto Ierusalimschy
beb896b082
new function (generic) `load'
2003-08-27 18:02:08 -03:00
Roberto Ierusalimschy
8332d5c8a5
parser fully reentrant(!)
2003-08-27 18:01:44 -03:00
Roberto Ierusalimschy
885961be1d
reader runs outside core Lua
2003-08-27 17:57:52 -03:00
Roberto Ierusalimschy
b114142799
new auxiliary function `luaH_setstr'
2003-08-26 09:04:13 -03:00
Roberto Ierusalimschy
4b2e71ddb6
ZIO passes Lua state to chunk reader
2003-08-25 17:00:50 -03:00
Roberto Ierusalimschy
9fcc485176
zio does not keep "source" name (nobody uses it)
2003-08-25 16:51:54 -03:00
Roberto Ierusalimschy
64066359dd
bug: IBM AS400 (OS400) has sizeof(void *)==16, and a `%p' may generate
...
up to 60 characters in a `printf'. That causes a buffer overflow in
`tostring'..
2003-08-25 16:49:47 -03:00
Roberto Ierusalimschy
97af24ea32
newlines can be \n', \r', \r\n', or \n\r'
2003-08-21 11:16:43 -03:00
Roberto Ierusalimschy
433cb1d13a
no more checks for non-default compilation options + luaU_dump has
...
new option to strip debug info
2003-08-15 10:48:53 -03:00
Roberto Ierusalimschy
d66198719d
several bugs for Lua 5.0 + new format for bug entries
2003-07-29 16:27:46 -03:00
Roberto Ierusalimschy
91bf77534c
no need for a maximum number of parameters (maximum number of locals
...
take care of that).
2003-07-29 16:26:34 -03:00
Roberto Ierusalimschy
a0a384a6b1
bug: userdata to be collected still counts into new GC threshold,
...
increasing memory consumption
2003-07-29 16:25:37 -03:00
Roberto Ierusalimschy
e89945aaa1
syntax ...=var' changed to var=...'
2003-07-29 15:51:00 -03:00
Roberto Ierusalimschy
d407d3fe0e
details
2003-07-28 15:31:20 -03:00
Roberto Ierusalimschy
522407e23a
we do not need a default panic (that does nothing anyway...)
2003-07-16 17:51:47 -03:00
Roberto Ierusalimschy
fa26d294ae
new way to control `pc' of running functions
2003-07-16 17:49:02 -03:00
Roberto Ierusalimschy
5a761e3a15
opcode number may be invalid
2003-07-10 08:59:06 -03:00
Roberto Ierusalimschy
265530478b
more changes to reduce stack usage by the parser
2003-07-09 17:11:30 -03:00
Roberto Ierusalimschy
00180bb133
small changes to reduce stack usage by the parser
2003-07-09 12:36:38 -03:00
Roberto Ierusalimschy
66ed154c89
details
2003-07-09 09:08:43 -03:00
Roberto Ierusalimschy
f52f357a55
correct handling when a thread turns on line hooks in another thread
2003-07-07 10:37:56 -03:00
Roberto Ierusalimschy
79fee99024
`debug' library can operate over other threads
2003-07-07 10:37:08 -03:00
Roberto Ierusalimschy
a73ded2153
Move nothing when there is nothing to move
2003-07-07 10:34:25 -03:00
Roberto Ierusalimschy
0ec4c473df
bug: file:close cannot be called without a file.
2003-07-07 10:32:52 -03:00
Roberto Ierusalimschy
9e05503ffa
bug: C functions also may have stacks larger than current top
2003-07-07 10:32:19 -03:00
Roberto Ierusalimschy
17f695157c
define a `lua_isthread' for completeness
2003-07-07 10:30:57 -03:00
Roberto Ierusalimschy
b93f67f2ce
detail
2003-06-10 09:36:26 -03:00
Roberto Ierusalimschy
60aa01d8f7
fully-weak tables are more efficient
2003-05-16 15:59:08 -03:00
Roberto Ierusalimschy
ecf5730c0c
(much) smarter way to clear weak tables
2003-05-16 15:58:39 -03:00
Roberto Ierusalimschy
b10bfd4934
comments
2003-05-15 16:46:03 -03:00
Roberto Ierusalimschy
176cd7d1a3
`#!' is detected by loadfile, not by the lexer
2003-05-15 09:20:24 -03:00
Roberto Ierusalimschy
859c7f7ce0
LUA_SIGNATURE is public
2003-05-15 09:20:04 -03:00
Roberto Ierusalimschy
56c5e749cc
no more compatibility code (`lua_pushupvalues')
2003-05-14 18:10:07 -03:00
Roberto Ierusalimschy
9ec9a012e7
details
2003-05-14 18:09:53 -03:00
Roberto Ierusalimschy
dae99205cf
no more compatibility code
2003-05-14 18:06:56 -03:00
Roberto Ierusalimschy
9eb0f25a29
no more compatibility code for 4.0
2003-05-14 18:02:39 -03:00
Roberto Ierusalimschy
f93051155c
ok to use #elif' and #if defined()'
2003-05-14 18:01:53 -03:00
Roberto Ierusalimschy
524ae9fc3d
new function `setvbuf'
2003-05-14 16:03:43 -03:00
Roberto Ierusalimschy
0ddedaee92
new function `string.reverse'
2003-05-14 11:35:54 -03:00
Roberto Ierusalimschy
5cc448386a
new syntax: `... [= name]'
2003-05-14 09:32:46 -03:00
Roberto Ierusalimschy
c116dcb92b
better information about instruction behavior (use of arguments)
2003-05-14 09:09:12 -03:00
Roberto Ierusalimschy
6d268b0b00
new semantics for "for" local variables
2003-05-13 17:15:59 -03:00
Roberto Ierusalimschy
c767747191
new (internal) macros for error handling
2003-05-13 16:22:19 -03:00
Roberto Ierusalimschy
f966404ed6
simpler implementation for valid/acceptable indices
2003-05-09 17:16:54 -03:00
Roberto Ierusalimschy
ee07ad346d
`getn' doesn't need this field (values cannot be nil)
2003-05-07 13:02:16 -03:00
Roberto Ierusalimschy
fee9e473f2
inlining of `luaV_gettable' were too complex (dirty)
2003-05-05 15:39:57 -03:00
Roberto Ierusalimschy
82dfacbcf7
detail
2003-04-30 17:24:38 -03:00
Roberto Ierusalimschy
26097b6c4b
uses integers as keys to standard i/o files
2003-04-30 17:15:55 -03:00
Roberto Ierusalimschy
f1f8f0ca22
simpler way to check maximum gc threshold
2003-04-28 16:58:06 -03:00
Roberto Ierusalimschy
bcc5f1406b
test function for lua_setgcthreshold
2003-04-28 16:58:06 -03:00
Roberto Ierusalimschy
b1b752fb2b
comments
2003-04-28 16:57:50 -03:00
Roberto Ierusalimschy
572a69df78
Lua does not need all those different types...
2003-04-28 16:26:16 -03:00
Roberto Ierusalimschy
943c82b376
avoid unnecessary call to log2 on too large indices
2003-04-28 10:31:46 -03:00
Roberto Ierusalimschy
17149b7d43
avoid warnings (Instruction' may not fit into an int')
2003-04-28 10:31:06 -03:00
Roberto Ierusalimschy
01b303c87e
simpler log2 implementation
2003-04-28 10:30:14 -03:00
Roberto Ierusalimschy
762c737037
last changes by lhf
2003-04-10 14:39:41 -03:00
Roberto Ierusalimschy
de57dc2653
new scheme to control `loadlib' configuration (default for dlopen
...
implementation is not to include it)
2003-04-07 17:11:53 -03:00
Roberto Ierusalimschy
d1df829f8d
lua_getmetatable must accept any acceptable index
2003-04-07 11:36:08 -03:00
Roberto Ierusalimschy
2ad947fe03
new test options for luaL_getn/setn
2003-04-07 11:35:00 -03:00
Roberto Ierusalimschy
f0cc013afa
luaL_getn/setn must operate correctly over negative indices
2003-04-07 11:35:00 -03:00
Roberto Ierusalimschy
0d88545b82
warnings from several compilers (mainly typecasts when lua_Number is float)
2003-04-03 10:35:34 -03:00
Roberto Ierusalimschy
f84c5a5fc6
avoid conflicts in (re)definition of `isatty'
2003-04-03 10:34:42 -03:00
Roberto Ierusalimschy
05d35d8f3c
comments
2003-04-02 10:09:14 -03:00
Roberto Ierusalimschy
3a6230ef7c
error-message format
2003-04-01 14:52:31 -03:00
Roberto Ierusalimschy
a424a112b5
clearance of debuging code (left by mistake)
2003-03-31 10:00:25 -03:00
Roberto Ierusalimschy
b858161fbc
new hash method for lua_Number (double) (due to a performance problem)
2003-03-24 11:18:42 -03:00
Roberto Ierusalimschy
80bac182db
do not mix --help' with --'
2003-03-24 09:40:01 -03:00
Roberto Ierusalimschy
30a411ab3c
chars from zio are always unsigned
2003-03-24 09:39:34 -03:00
Roberto Ierusalimschy
5bb5a1831d
details
2003-03-20 17:26:33 -03:00
Roberto Ierusalimschy
b518d14071
bug: zio mixes a 255 as first char in a buffer with EOZ
2003-03-20 13:00:56 -03:00
Roberto Ierusalimschy
15dbb53461
towards 5.0 final
2003-03-19 18:27:30 -03:00
Roberto Ierusalimschy
abc304f9da
avoid name colision (for alllua.c)
2003-03-19 18:24:04 -03:00
Roberto Ierusalimschy
1a553f9199
better error messages
2003-03-19 18:16:12 -03:00
Roberto Ierusalimschy
0ca225d33a
better error message
2003-03-19 18:15:18 -03:00
Roberto Ierusalimschy
70e2b7ab86
name changes to avoid name collision between macros and variables
2003-03-19 18:14:53 -03:00
Roberto Ierusalimschy
5a144e891a
__globals' -> __fenv'
2003-03-19 18:14:34 -03:00
Roberto Ierusalimschy
b12776f29c
`luaL_getmetafield' was leaving extra value on the stack
2003-03-18 15:48:31 -03:00
Roberto Ierusalimschy
ab9e062928
name changes to avoid name collision between macros and variables
2003-03-18 09:50:04 -03:00
Roberto Ierusalimschy
81cdbabf09
detail (change place of a prototype)
2003-03-18 09:31:39 -03:00
Roberto Ierusalimschy
40cfb0691e
new auxiliary functions for `type' manipulation
2003-03-18 09:25:32 -03:00
Roberto Ierusalimschy
9b7af7e45b
tests for Windows version
2003-03-18 09:25:01 -03:00
Roberto Ierusalimschy
2e66248f8a
unused argument
2003-03-18 09:24:38 -03:00
Roberto Ierusalimschy
79db75101e
detail
2003-03-18 09:24:26 -03:00
Roberto Ierusalimschy
b0c40e2405
first version of `loadlib'
2003-03-17 10:04:58 -03:00
Roberto Ierusalimschy
4734e2de05
`loadlib' now an official library
2003-03-17 10:01:48 -03:00
Roberto Ierusalimschy
7ea180af6e
detail
2003-03-14 16:08:11 -03:00
Roberto Ierusalimschy
05d567d52e
io.input'/io.output' always return current file
2003-03-14 16:00:16 -03:00
Roberto Ierusalimschy
d8a3a00d84
`string.find' also accepts out-of-range indices
2003-03-14 15:59:53 -03:00
Roberto Ierusalimschy
c9ea94ec92
out-of-bound upvalues (in C) are acceptable indices
2003-03-14 15:59:21 -03:00
Roberto Ierusalimschy
fa4b4c1100
loadstring/loadfile use global environment + setfenv(0) changes
...
global environment
2003-03-11 15:17:43 -03:00
Roberto Ierusalimschy
4039bf457d
^ operator is defined by global `__pow'
2003-03-11 09:30:37 -03:00
Roberto Ierusalimschy
034de1fe73
new names for functions that open C libraries
2003-03-11 09:24:34 -03:00
Roberto Ierusalimschy
430d6db928
LUA_PATH components may have multiple interrogation marks
2003-03-11 09:08:13 -03:00
Roberto Ierusalimschy
7c3857cded
comments
2003-03-07 10:21:31 -03:00
Roberto Ierusalimschy
8ce6f0b418
avoid including system headers after program headers
2003-03-06 16:37:42 -03:00
Roberto Ierusalimschy
572bddc0b0
LUA_USETMPNAME -> USE_TMPNAME
2003-03-06 16:36:44 -03:00
Roberto Ierusalimschy
3684f67771
details (text of an error message)
2003-03-06 16:36:16 -03:00
Roberto Ierusalimschy
69dd9461e5
bug: GC metamethod calls could mess C/Lua stack syncronization
2003-02-28 16:45:15 -03:00
Roberto Ierusalimschy
6b6bc532a4
better error message for (deprecated) "%global"
2003-02-28 14:19:47 -03:00
Roberto Ierusalimschy
ea16ee41a8
no more attempt to optimize GC when parsing new modules (too complex)
2003-02-28 12:42:08 -03:00
Roberto Ierusalimschy
60d11ec316
by default, gcc does not get tmpname
2003-02-27 09:39:05 -03:00
Roberto Ierusalimschy
e1a424e8a3
avoid the identifier index' (clashes with BSD index' function)
2003-02-27 09:33:07 -03:00
Roberto Ierusalimschy
59ce42dbd5
detail
2003-02-27 09:32:30 -03:00
Roberto Ierusalimschy
92f6e0c1bf
no-nonsense debug information about tail calls
2003-02-27 08:52:30 -03:00
Roberto Ierusalimschy
5cd99b82b7
set/getenvtable' -> set/getfenv'
2003-02-24 13:54:20 -03:00
Roberto Ierusalimschy
07e210e655
`require' returns value returned by package
2003-02-24 13:50:41 -03:00
Roberto Ierusalimschy
feb724c122
ULONG_MAX>>10 may not fit into an int (old bug)
2003-02-21 16:00:14 -03:00
Roberto Ierusalimschy
67f9a2a98f
details
2003-02-20 17:12:39 -03:00
Roberto Ierusalimschy
c4f9c887fc
expressions too complex for an ARM compiler...
2003-02-19 07:28:58 -03:00
Roberto Ierusalimschy
9866fb0ef1
set/getglobals' -> set/getenvtable'
2003-02-18 13:13:15 -03:00
Roberto Ierusalimschy
60c83ded30
small optimization for sizes of array constructors
2003-02-18 13:02:56 -03:00
Roberto Ierusalimschy
07948c3181
restore _REQUIREDNAME after requiring a file
2003-02-18 13:02:13 -03:00
Roberto Ierusalimschy
dce9a49a08
final version
2003-02-18 13:01:57 -03:00
Roberto Ierusalimschy
15db58a2f5
create arg table with correct size
2003-02-13 14:08:47 -02:00
Roberto Ierusalimschy
d6826dbc80
simpler way to count uses
2003-02-13 14:08:32 -02:00
Roberto Ierusalimschy
e75a6ae9ee
`defaultmeta' is always empty, but registry needs some space for
...
names and numbers (references)
2003-02-13 14:07:57 -02:00
Roberto Ierusalimschy
2866fb2dd0
reset _REQUIREDNAME after loading module
2003-02-13 14:07:37 -02:00
Roberto Ierusalimschy
4b6f436d67
unpack' uses getn' to get table size
2003-02-12 07:11:01 -02:00
Roberto Ierusalimschy
8f105d6b59
string.byte returns nil if index is out-of-range
2003-02-12 07:10:41 -02:00
Roberto Ierusalimschy
2fef8c772b
auxiliary function to check userdata with types
2003-02-11 13:32:31 -02:00
Roberto Ierusalimschy
7285fa393b
use C names for C types
2003-02-11 13:31:50 -02:00
Roberto Ierusalimschy
5085f09ce5
small optimizations
2003-02-11 13:24:52 -02:00
Roberto Ierusalimschy
d674626392
compatibility with '%' syntax is optional
2003-02-11 08:49:53 -02:00
Roberto Ierusalimschy
7a40cdbda0
different variables for number of upvalues and size of upvalue array
...
(makes code clearer)
2003-02-11 08:46:24 -02:00
Roberto Ierusalimschy
3cdeacbbfb
reference system also uses getn/setn (plus small corrections)
2003-02-11 07:44:38 -02:00
Roberto Ierusalimschy
6f207b15fb
resist errors in finalizers during lua_close
2003-02-10 15:32:50 -02:00
Roberto Ierusalimschy
3184314bf3
warning
2003-02-10 15:31:13 -02:00
Roberto Ierusalimschy
7964f7cbbd
more complete information for coroutine errors
2003-02-10 08:21:31 -02:00
Roberto Ierusalimschy
383a6e88f9
argv[0] may be NULL
2003-01-29 11:23:45 -02:00
Roberto Ierusalimschy
871166d7db
test for panic function
2003-01-29 08:27:53 -02:00
Roberto Ierusalimschy
592cf2334e
"panic" cannot happen in lua.c, with lua_cpcall +
...
argv[0] may be empty
2003-01-29 08:27:07 -02:00
Roberto Ierusalimschy
0175f8d5d1
dump/undump of upvalue names
2003-01-27 13:52:57 -02:00
Roberto Ierusalimschy
e79bf02f33
correct semantics for comparison metamethods (they are only valid
...
when both operands have the same metamethod).
2003-01-27 13:12:52 -02:00
Roberto Ierusalimschy
41ed3c4771
getn/setn in C moved to lauxlib
2003-01-27 11:46:16 -02:00
Roberto Ierusalimschy
635b7c707d
details
2003-01-27 11:00:43 -02:00
Roberto Ierusalimschy
83f0d6ef1a
DEPRECATED (new manual uses an independent format instead of LaTeX)
2003-01-24 14:38:18 -02:00
Roberto Ierusalimschy
3088ebd95b
last changes before leaving Latex
2003-01-24 07:14:54 -02:00
Roberto Ierusalimschy
797d964df9
detail
2003-01-23 09:34:18 -02:00
Roberto Ierusalimschy
e44e579dc1
bug: luaD_protectedparser must protect its garbage collection too
2003-01-23 09:31:38 -02:00
Roberto Ierusalimschy
a153cafd8d
starting translation to new format (@comand{...}).
2003-01-22 14:29:38 -02:00
Roberto Ierusalimschy
3b5158f2a1
corrections from Asko Kauppi
2003-01-21 15:45:11 -02:00
Roberto Ierusalimschy
60a8b94fd0
corrections/suggestions by Ed Ferguson
2003-01-20 09:03:05 -02:00
Roberto Ierusalimschy
c499442e5f
compatibility macros must be available by default
2003-01-17 13:28:09 -02:00
Roberto Ierusalimschy
9a5bab82ff
use the more modern _POSIX_C_SOURCE instead of older _POSIX_SOURCE
2003-01-17 13:27:28 -02:00
Roberto Ierusalimschy
32fd039bb5
`openlib' functions return new module
2002-12-20 08:26:33 -02:00
Roberto Ierusalimschy
75f73172c4
bug: `resume' was checking the wrong value for stack overflow
2002-12-20 07:55:56 -02:00
Roberto Ierusalimschy
754c630754
details
2002-12-19 11:21:08 -02:00
Roberto Ierusalimschy
dd8edecae1
new functions to manipulate upvales (get/setupvalue)
2002-12-19 09:11:55 -02:00
Roberto Ierusalimschy
28021c5c66
better explanation (+ example) for coroutines
2002-12-11 11:43:15 -02:00
Roberto Ierusalimschy
73517e86b0
OP_TFORLOOP uses extra stack space
2002-12-11 10:34:22 -02:00
Roberto Ierusalimschy
9e8face8d8
must move call results in the last iteration, too
2002-12-11 10:34:22 -02:00
Roberto Ierusalimschy
64864f094b
new options for debugging Lua (HARDSTACKTESTS & EXTERNMEMCHECK)
2002-12-06 15:20:45 -02:00
Roberto Ierusalimschy
9bd3fc1039
TFORLOOP makes a call that affects all values above it on the stack
2002-12-06 15:15:35 -02:00
Roberto Ierusalimschy
cc4a22ebe2
bug: scope of generic for variables is not sound
2002-12-06 15:09:00 -02:00
Roberto Ierusalimschy
acf62ddfbe
"load*" creates chunk with same global table than caller
2002-12-06 15:05:15 -02:00
Roberto Ierusalimschy
04f95ce879
hook counts are integers now
2002-12-05 15:50:10 -02:00
Roberto Ierusalimschy
27c6b4d422
each .c file defines its own name
2002-12-04 15:38:31 -02:00
Roberto Ierusalimschy
0bb8eb5151
new function `lua_cpcall'
2002-12-04 15:29:32 -02:00
Roberto Ierusalimschy
38da8c0d7d
new facilities to test memory overflow in main.c
2002-12-04 15:29:05 -02:00
Roberto Ierusalimschy
76de732745
avoid non-raw accesses to globals when variable may not exist
2002-12-04 13:38:25 -02:00
Roberto Ierusalimschy
90d7892007
new function `io.type'
2002-12-04 13:27:17 -02:00
Roberto Ierusalimschy
041cb96992
small bug: `write' must return three values in case of errors
2002-12-04 13:17:36 -02:00
Roberto Ierusalimschy
c75c3cfd19
avoid names `str...' (may conflict with string.h)
2002-12-02 10:06:10 -02:00
Roberto Ierusalimschy
24471525d7
details
2002-12-02 10:06:10 -02:00
Roberto Ierusalimschy
1f55dbc699
details
2002-11-26 10:53:29 -02:00
Roberto Ierusalimschy
c194a46bc5
detail
2002-11-26 06:59:48 -02:00
Roberto Ierusalimschy
8954bdc706
new `coroutine.status' function
2002-11-26 06:45:36 -02:00
Roberto Ierusalimschy
5a228bb1d8
new function `lua_version'
2002-11-25 15:50:14 -02:00
Roberto Ierusalimschy
5f698f8b6f
simpler interface to hooks + use of `int' to count hooks
2002-11-25 15:47:13 -02:00
Roberto Ierusalimschy
9b1c586b2f
renaming stringdump' -> string.dump'
2002-11-25 15:33:33 -02:00
Roberto Ierusalimschy
d9340154ac
`__tostring' for files + small bug (could do invalid read inside
...
a userdata when it was not a file)
2002-11-25 13:05:39 -02:00
Roberto Ierusalimschy
e47baca75a
warnings from Visual C++
2002-11-25 10:38:47 -02:00
Roberto Ierusalimschy
b8a680c114
resets hook count even in case of errors
2002-11-25 09:20:29 -02:00
Roberto Ierusalimschy
709b27b456
ULONG_MAX>>10 may not fit into an int
2002-11-25 09:16:48 -02:00
Roberto Ierusalimschy
dbc5451bea
comments
2002-11-22 16:01:46 -02:00
Roberto Ierusalimschy
2d2d45976c
separated control over C recursion level
2002-11-22 15:16:52 -02:00
Roberto Ierusalimschy
0050d983fc
make more clear "primitive" recursive definitions
2002-11-22 14:42:53 -02:00
Roberto Ierusalimschy
04b143ddf9
avoid C stack overflow during parsing
2002-11-22 14:35:20 -02:00
Roberto Ierusalimschy
007f229568
detail
2002-11-22 11:59:04 -02:00
Roberto Ierusalimschy
84488c5670
small bug: previous call may change `base'
2002-11-21 15:19:42 -02:00
Roberto Ierusalimschy
5142e630bf
new macro `condhardstacktests' to control hard stack tests
2002-11-21 15:19:11 -02:00
Roberto Ierusalimschy
010bbd9d9c
simpler definition for incr_top
2002-11-21 14:46:16 -02:00
Roberto Ierusalimschy
be00cd2a6b
easier way to keep `base' correct
2002-11-21 13:46:44 -02:00
Roberto Ierusalimschy
2e4e888de0
Lua functions must have a frame or a saved pc.
2002-11-21 13:46:20 -02:00
Roberto Ierusalimschy
ddc144e4d2
keep L->ci->base in L->base for faster access
2002-11-21 13:16:04 -02:00
Roberto Ierusalimschy
b48c6e7680
no problem keeping some dead meat while doing collection
2002-11-21 12:18:01 -02:00
Roberto Ierusalimschy
aff97fffc4
C functions cannot increase its top without filling the stack
2002-11-21 12:17:15 -02:00
Roberto Ierusalimschy
1648674653
must check GC every time it can create new objects
2002-11-21 12:16:52 -02:00
Roberto Ierusalimschy
d404f0c276
global_State must be deallocated (and so allocated) with NULL also
...
(otherwise it trys to decrement inside itself after its own free)
2002-11-21 12:14:42 -02:00
Roberto Ierusalimschy
48e42261ac
details
2002-11-19 15:42:32 -02:00
Roberto Ierusalimschy
be762f38bd
better organization of "malloc responsabilities"
2002-11-19 12:12:13 -02:00
Roberto Ierusalimschy
c8a79057f7
option -l does a require', instead of dofile'
2002-11-19 11:49:43 -02:00
Roberto Ierusalimschy
642af82e81
small bugs (state could keep its CI_HASFRAME attribute after returning)
2002-11-19 06:50:56 -02:00
Roberto Ierusalimschy
636c629e56
new assertions
2002-11-18 16:45:38 -02:00
Roberto Ierusalimschy
96ba5d0bc2
include file name in error messages
2002-11-18 14:53:19 -02:00
Roberto Ierusalimschy
f0185f7628
support for tests of yield inside hooks + better support for tests
...
with valgrind and other memory checkers
2002-11-18 13:24:27 -02:00
Roberto Ierusalimschy
9bab2cf55d
support for yield inside hooks
2002-11-18 13:24:11 -02:00
Roberto Ierusalimschy
c4ae00a3d1
details
2002-11-18 13:23:43 -02:00
Roberto Ierusalimschy
f4d3bc52f4
towards 5.0 beta
2002-11-18 12:39:34 -02:00
Roberto Ierusalimschy
18765d900e
messages
2002-11-18 09:20:01 -02:00
Roberto Ierusalimschy
43013b39cc
new representation for hooks (to allow asynchronous calls to sethook)
2002-11-18 09:01:55 -02:00
Roberto Ierusalimschy
94912d99fc
details
2002-11-14 14:59:16 -02:00
Roberto Ierusalimschy
b40c9f7a3c
better code to signal write barriers
2002-11-14 14:16:21 -02:00
Roberto Ierusalimschy
41fd639cab
documentation for write barriers
2002-11-14 14:15:53 -02:00
Roberto Ierusalimschy
a845a46cc8
C function may leave garbage on the stack (besides return values)
2002-11-14 13:42:05 -02:00
Roberto Ierusalimschy
097edd3884
better names for auxiliar functions
2002-11-14 13:41:38 -02:00
Roberto Ierusalimschy
5c5d9b2703
back to `__mode' metafield to specify weakness
2002-11-14 10:01:35 -02:00
Roberto Ierusalimschy
43d1a6af12
detail
2002-11-14 09:51:23 -02:00
Roberto Ierusalimschy
3010eb0536
all objects with several children (tables, closures, stacks, prototypes)
...
go to `gray' queue
2002-11-13 09:49:19 -02:00
Roberto Ierusalimschy
2f91f95d94
better control over GCObjects
2002-11-13 09:32:26 -02:00
Roberto Ierusalimschy
42dd080a2e
details
2002-11-12 12:34:18 -02:00
Roberto Ierusalimschy
9957f7d598
better way to open libraries
2002-11-11 11:28:06 -02:00
Roberto Ierusalimschy
ac27b7a842
avoid traversing extra elements when cleaning weak tables
2002-11-11 09:52:43 -02:00
Roberto Ierusalimschy
81e142fc14
detail (`key' is always on stack)
2002-11-07 14:03:33 -02:00
Roberto Ierusalimschy
63633c5b5f
better name for `lua_movethread'
2002-11-07 13:39:23 -02:00
Roberto Ierusalimschy
dff9be4224
new macros to distinguish different types of object moves (for future GC
...
evolution).
2002-11-07 13:37:10 -02:00
Roberto Ierusalimschy
118347d8c3
new API for coroutines
2002-11-06 17:08:00 -02:00
Roberto Ierusalimschy
6820da5096
detail
2002-11-04 10:31:44 -02:00
Roberto Ierusalimschy
c3eb4675b9
new module, ldump.c
2002-10-25 18:38:17 -03:00
Roberto Ierusalimschy
7e0f880bc5
C++ demands cast from void to specific types
2002-10-25 18:36:54 -03:00
Roberto Ierusalimschy
118e9cd843
new facility for dumping chunks
2002-10-25 18:31:28 -03:00
Roberto Ierusalimschy
de00d0d0ad
module for dumping chunks
2002-10-25 18:31:28 -03:00
Roberto Ierusalimschy
1713b64065
Writer type must be public (so, in lua.h)
2002-10-25 18:30:49 -03:00
Roberto Ierusalimschy
671dc6eec2
new version (from lhf)
2002-10-25 18:30:41 -03:00
Roberto Ierusalimschy
e356a43dc0
C needs "union" (unlike C++)
2002-10-25 18:30:00 -03:00
Roberto Ierusalimschy
f36038e42a
assertion must be always valid (not only in debug mode)
2002-10-25 18:29:20 -03:00
Roberto Ierusalimschy
96e15b8501
threads now are real Lua objects, subject to garbage collection
2002-10-25 17:05:28 -03:00
Roberto Ierusalimschy
0fd91b1b08
optional limits for table.concat
2002-10-23 16:08:23 -03:00
Roberto Ierusalimschy
a2b353e044
details
2002-10-23 16:08:13 -03:00
Roberto Ierusalimschy
92a2ef9dca
field `__globals' protect global tables
2002-10-22 16:41:08 -03:00
Roberto Ierusalimschy
4fb9110a6e
tests for compatibility functions lua_dostring/lua_dofile
2002-10-22 15:07:55 -03:00
Roberto Ierusalimschy
11886dc7b0
print error on stderr when _ALERT is not defined
2002-10-22 15:07:55 -03:00
Roberto Ierusalimschy
81bc5711a8
only one instance of registry and default metatable per global state
2002-10-22 14:58:14 -03:00
Roberto Ierusalimschy
6a77a6b73f
avoid too much precision when printing numbers
2002-10-22 14:21:25 -03:00
Roberto Ierusalimschy
84e0b1bc97
small changes in type configuration facilities
2002-10-22 14:18:28 -03:00
Roberto Ierusalimschy
6823a2f57f
better tokens for error messages
2002-10-22 13:45:52 -03:00
Roberto Ierusalimschy
313b2fe902
detail
2002-10-21 17:43:38 -03:00
Roberto Ierusalimschy
425e5813b0
free prototype in (more or less) the same order it is created by
...
`undump'
2002-10-21 17:41:46 -03:00
Roberto Ierusalimschy
6505503b49
do not pretend that file is closed when close fails
2002-10-21 17:41:24 -03:00
Roberto Ierusalimschy
ec748fcb0a
correct handling of opened files in presence of memory allocation
...
errors
2002-10-16 17:41:35 -03:00
Roberto Ierusalimschy
c196348717
in case of memory allocation errors, sizecode and sizelineinfo can
...
be different
2002-10-16 17:40:58 -03:00
Roberto Ierusalimschy
669129a6d8
io.lines() iterate over the standard input file
2002-10-11 17:40:32 -03:00
Roberto Ierusalimschy
46b063ef59
`undump' also uses private buffer
2002-10-09 10:42:01 -03:00
Roberto Ierusalimschy
e1d5153a33
details
2002-10-09 10:00:08 -03:00
Roberto Ierusalimschy
b3d0682fb9
use of different buffers for scanner and concatenation
2002-10-08 15:46:08 -03:00
Roberto Ierusalimschy
02afc892d5
new ANSI C does not assure that realloc(p,0) == free(p)
2002-10-08 15:45:07 -03:00
Roberto Ierusalimschy
fa2f1ec7ba
to avoid `strerror', define itself to something else;
...
nil has a special, fixed reference
2002-10-04 11:31:40 -03:00
Roberto Ierusalimschy
829befcc41
small optimization for object comparison
2002-10-04 11:31:03 -03:00
Roberto Ierusalimschy
d477e4ffd6
detail
2002-10-04 11:30:31 -03:00
Roberto Ierusalimschy
ce09af1e25
easier to define api_check' using assert'
2002-09-20 14:01:24 -03:00
Roberto Ierusalimschy
98d0b79613
EXIT_SUCCESS may be different from 0
2002-09-20 10:32:56 -03:00
Roberto Ierusalimschy
e8f35fc4ff
unification of __index & __gettable (and __newindex & __settable)
2002-09-19 17:12:47 -03:00
Roberto Ierusalimschy
6fb0fd5063
avoid `reclearing' weak tables
2002-09-19 16:54:22 -03:00
Roberto Ierusalimschy
565e6d74e1
state's buffer is used only for chars
2002-09-19 10:03:53 -03:00
Roberto Ierusalimschy
f6bc7884be
new generators for reading a file line by line
2002-09-17 17:35:54 -03:00
Roberto Ierusalimschy
32a5d96dfc
`setmetatable' cannot change protected objects
2002-09-16 16:49:45 -03:00
Roberto Ierusalimschy
8dae071f42
details
2002-09-16 16:18:01 -03:00
Roberto Ierusalimschy
afe1305b1a
avoid luaS_resize (which may need extra memory) during `main' activities
2002-09-05 16:57:40 -03:00
Roberto Ierusalimschy
728fa167d2
cannot raise memory error when realloc to smaller block
2002-09-05 16:57:08 -03:00
Roberto Ierusalimschy
1bdde38bd2
no more newlines at the end of error messages
2002-09-05 16:45:42 -03:00
Roberto Ierusalimschy
b2bc3b44b6
no more reserved word "global"
2002-09-03 08:57:38 -03:00
Roberto Ierusalimschy
7c0ccdfd61
avoid the use of "enum" in the API, as they do not have a fixed representation
2002-09-02 17:00:41 -03:00
Roberto Ierusalimschy
4964e7c8a0
details
2002-09-02 16:54:49 -03:00
Roberto Ierusalimschy
2c670baf24
avoid the use of "obvious" names in header files to avoid conflicts
2002-08-30 17:00:59 -03:00
Roberto Ierusalimschy
fdafd4f4a8
new structure for collectable objects, sharing a common header
2002-08-30 16:09:21 -03:00
Roberto Ierusalimschy
beeff4ccaf
GC metamethod stored in a weak metatable being collected together with
...
userdata may not be cleared properly
2002-08-30 16:08:30 -03:00
Roberto Ierusalimschy
12c4e48506
`frontier' patterns
2002-08-23 16:45:24 -03:00
Roberto Ierusalimschy
c78aaa9a70
better line number for function definitions
2002-08-22 16:51:08 -03:00
Roberto Ierusalimschy
4d7a554921
style for switch statements
2002-08-21 16:39:31 -03:00
Roberto Ierusalimschy
fbc23d0245
details
2002-08-21 15:56:33 -03:00
Roberto Ierusalimschy
81a8845e4f
detail
2002-08-21 11:57:48 -03:00
Roberto Ierusalimschy
6c283b2f4f
new simetric format for ABC instructions, to avoid exchanging operands
...
for `commutative' operators
2002-08-20 17:03:05 -03:00
Roberto Ierusalimschy
576bded513
details
2002-08-16 17:02:13 -03:00
Roberto Ierusalimschy
ecc7769de2
names...
2002-08-16 17:00:28 -03:00
Roberto Ierusalimschy
da19c436cc
cleaning the stage for generational collection
2002-08-16 11:45:55 -03:00
Roberto Ierusalimschy
0039feb9da
warning from Visual C
2002-08-16 11:45:18 -03:00
Roberto Ierusalimschy
aa5b15f271
detail
2002-08-14 17:10:33 -03:00
Roberto Ierusalimschy
653416d5c0
angles in radians(!)
2002-08-14 17:07:43 -03:00
Roberto Ierusalimschy
82a3be0671
some corrections + angles in radians
2002-08-14 17:07:25 -03:00
Roberto Ierusalimschy
94b5ad31f4
details
2002-08-13 17:00:51 -03:00
Roberto Ierusalimschy
90d26b9266
update of `debug' library (Lua binding)
2002-08-13 16:44:47 -03:00
Roberto Ierusalimschy
a048d71ef3
new LUA_USERCONFIG to include user options
2002-08-13 12:04:59 -03:00
Roberto Ierusalimschy
27f8a4a69e
towards 5.0 (one more step)...
2002-08-12 14:43:35 -03:00
Roberto Ierusalimschy
8e4ac679ff
use a linear count for count hook
2002-08-12 14:23:12 -03:00
Roberto Ierusalimschy
221b5be7b7
use of `LoadState' struct (instead of several separate arguments)
2002-08-12 10:37:19 -03:00
Roberto Ierusalimschy
b6791f5fa5
details
2002-08-12 10:37:19 -03:00
Roberto Ierusalimschy
3b058177af
towards 5.0 alpha...
2002-08-09 18:03:19 -03:00
Roberto Ierusalimschy
586e510577
details
2002-08-08 17:08:41 -03:00
Roberto Ierusalimschy
9998082839
external messages add their own extra information
2002-08-08 17:08:41 -03:00
Roberto Ierusalimschy
08da48a73c
detail
2002-08-07 17:55:00 -03:00
Roberto Ierusalimschy
00a40f4d6a
ensure proper rounding
2002-08-07 17:54:38 -03:00
Roberto Ierusalimschy
3bb5079dd4
ensure fixed order for library initialization
2002-08-07 17:54:17 -03:00
Roberto Ierusalimschy
5016f43aa4
(much) cleaner way to control function states
2002-08-07 16:22:39 -03:00
Roberto Ierusalimschy
c1c100a0c0
warnings in other compilers
2002-08-07 11:35:55 -03:00
Roberto Ierusalimschy
b6e2f1a86e
small bugs when stack is reallocated
2002-08-07 11:24:24 -03:00
Roberto Ierusalimschy
260e35f576
the usual...
2002-08-06 16:12:54 -03:00
Roberto Ierusalimschy
a56e01a9a0
towards 5.0 alpha...
2002-08-06 16:10:44 -03:00
Roberto Ierusalimschy
4664f2e927
any Lua closure has a table of globals (not only active functions)
2002-08-06 15:54:18 -03:00
Roberto Ierusalimschy
2e38c6ae5a
luadebug.h' content now is included in lua.h'
2002-08-06 15:01:50 -03:00
Roberto Ierusalimschy
d3dd337fca
lua_Chunkreader gets a lua_State, to avoid future incompatibilities
2002-08-06 14:26:45 -03:00
Roberto Ierusalimschy
634344d61f
new API for weak mode
2002-08-06 14:06:56 -03:00
Roberto Ierusalimschy
a2fa48a570
new (old?) error handling scheme
2002-08-06 12:32:22 -03:00
Roberto Ierusalimschy
8b2b8790b5
small bug: basic `ci' must have a valid func (base - 1)
2002-08-05 15:45:45 -03:00
Roberto Ierusalimschy
0b3d380f9f
internal names
2002-08-05 15:45:02 -03:00
Roberto Ierusalimschy
4e23699aa6
new implementation for error handling
2002-08-05 14:36:24 -03:00
Roberto Ierusalimschy
1c0ac3c0f5
new implementation for tailcall
2002-08-05 14:35:45 -03:00
Roberto Ierusalimschy
4a4f243795
new API for error handling
2002-08-05 11:51:47 -03:00
Roberto Ierusalimschy
0417a4bb0b
new implementation for tailcalls and error handling
2002-08-05 11:51:21 -03:00
Roberto Ierusalimschy
5037196f6f
new macros `ttis*'
2002-08-05 11:50:39 -03:00
Roberto Ierusalimschy
9fb80bde3c
tailcall is executed together with call
2002-08-05 11:46:43 -03:00
Roberto Ierusalimschy
2dcc31574f
new function xpcall
2002-08-05 11:46:02 -03:00
Roberto Ierusalimschy
390fc99a5c
xpcall now is builtin + new macros `ttis*'
2002-08-05 11:10:10 -03:00
Roberto Ierusalimschy
79c8edb6c4
new names for light userdata operations
2002-07-17 13:25:13 -03:00
Roberto Ierusalimschy
e5146fb01f
CallInfo has different fields for C functions and Lua functions
2002-07-16 11:26:56 -03:00
Roberto Ierusalimschy
ce6b930464
`isdst' should be a boolean (and not 0/1!!)
2002-07-12 15:54:53 -03:00
Roberto Ierusalimschy
ac7006d374
^D in interactive mode finish interaction (no questions asked)
2002-07-10 17:49:01 -03:00
Roberto Ierusalimschy
12bee999dd
new way to handle macros read_line/save_line
2002-07-10 17:44:34 -03:00
Roberto Ierusalimschy
a8c9eec426
bug: chunk can end just after a '\' in a string
2002-07-10 17:43:53 -03:00
Roberto Ierusalimschy
a885b826b3
LUA_ALERT is no longer used
2002-07-09 15:49:13 -03:00
Roberto Ierusalimschy
a960e62c3e
new options; no more _ALERT; no more getargs
2002-07-09 15:19:44 -03:00
Roberto Ierusalimschy
c51aa6ee33
details
2002-07-09 15:19:19 -03:00
Roberto Ierusalimschy
d88860131a
new macro `lua_isudataval' (for completude)
2002-07-09 11:58:28 -03:00
Roberto Ierusalimschy
44752fc9ce
hook count is quadratic
2002-07-08 17:22:08 -03:00
Roberto Ierusalimschy
39b2d58c39
new interface for debug hooks
2002-07-08 15:21:33 -03:00
Roberto Ierusalimschy
d2d24f0971
details to allow compilation of Lua as a single file
2002-07-08 15:14:36 -03:00
Roberto Ierusalimschy
0436c96866
C++ warning
2002-07-08 13:51:20 -03:00
Roberto Ierusalimschy
f8279f6cd8
optimizations for gettable (temporary)
2002-07-05 15:27:39 -03:00
Roberto Ierusalimschy
1fe280df72
new priority for and/or
2002-07-04 15:23:42 -03:00
Roberto Ierusalimschy
1ede98157d
strings are always `strong' in weaktables
2002-07-04 14:58:02 -03:00
Roberto Ierusalimschy
3e52573c72
details (error messages)
2002-07-04 09:29:32 -03:00
Roberto Ierusalimschy
84ad1eea81
use of NaN as key breaks some invariants
2002-07-02 14:54:23 -03:00
Roberto Ierusalimschy
b30ec2532c
details
2002-07-02 13:43:28 -03:00
Roberto Ierusalimschy
68ee518e81
only tables need `lua_number2int'
2002-07-01 16:31:10 -03:00
Roberto Ierusalimschy
76a73cb2ee
new getn' (and setn')
2002-07-01 16:25:28 -03:00
Roberto Ierusalimschy
aa3da1605c
`newproxy' uses its own weaktable
2002-07-01 16:23:58 -03:00
Roberto Ierusalimschy
9f4b5b5232
weak keys are removed only after finalization
2002-07-01 14:06:58 -03:00
Roberto Ierusalimschy
5fabed21a1
getglobals(0) is the C global table
2002-06-26 17:36:17 -03:00
Roberto Ierusalimschy
f67ccfbdeb
no more `lua_getn' function
2002-06-26 16:28:44 -03:00
Roberto Ierusalimschy
cfcf200806
concat' goes to table' library
2002-06-26 16:28:08 -03:00
Roberto Ierusalimschy
f32a8c0477
details (temporary?)
2002-06-26 13:37:39 -03:00
Roberto Ierusalimschy
88607acc2c
details
2002-06-26 13:37:23 -03:00
Roberto Ierusalimschy
6de93e2932
two new bugs in 4.0 :-( (both were already corrected in 5.0 :-)
2002-06-25 16:23:55 -03:00
Roberto Ierusalimschy
25dc9b7faf
new functions dofile' and pairs'; correct way to check proxies
2002-06-25 16:19:33 -03:00
Roberto Ierusalimschy
78c507b7b8
lua_upcall' -> lua_call'
2002-06-25 16:18:49 -03:00
Roberto Ierusalimschy
69906cb56f
error message ends with `\n' (is already formatted)
2002-06-25 16:18:20 -03:00
Roberto Ierusalimschy
9d6556fd87
userdata are removed from weaktables before invoking their GC fallbacks
2002-06-25 16:17:42 -03:00
Roberto Ierusalimschy
35707e94f3
__weakmode' -> __mode'
2002-06-25 16:17:22 -03:00
Roberto Ierusalimschy
89b102bd1d
new `luaL_weakregistry' function
2002-06-25 16:15:21 -03:00
Roberto Ierusalimschy
fdfd5b44ee
TM_GETTABLE/TM_SETTABLE don't need fast access anymore
2002-06-24 17:18:38 -03:00
Roberto Ierusalimschy
1a4c428d6d
new function `newproxy'
2002-06-24 14:23:16 -03:00
Roberto Ierusalimschy
2394604d10
assertion may fail when closing a state
2002-06-24 14:19:43 -03:00
Roberto Ierusalimschy
922f36a05b
details
2002-06-24 12:07:21 -03:00
Roberto Ierusalimschy
ad41fc11eb
details in arithmetic implementation
2002-06-24 11:11:14 -03:00
Roberto Ierusalimschy
e182cf452f
`^' operator is defined in registry.__pow
2002-06-24 10:54:13 -03:00
Roberto Ierusalimschy
e34f282365
`luaV_gettable' returns element position
2002-06-24 10:08:45 -03:00
Roberto Ierusalimschy
3941af53ad
first implementation of independent global table per function
2002-06-20 17:41:46 -03:00
Roberto Ierusalimschy
5610fdd776
avoid using obsolete lua_dostring
2002-06-20 17:40:38 -03:00
Roberto Ierusalimschy
b449a5e574
more robust when printing error messages
2002-06-20 17:40:09 -03:00
Roberto Ierusalimschy
e572dffa15
small bug building error messages
2002-06-20 17:39:44 -03:00
Roberto Ierusalimschy
5893fcb71a
accept option arguments without spaces (e.g. "-eprint(a)")
2002-06-18 14:43:49 -03:00
Roberto Ierusalimschy
eec0905173
better tests (assertions) for debug hooks
2002-06-18 14:42:52 -03:00
Roberto Ierusalimschy
a44f37513b
better treatment for error messages
2002-06-18 14:12:05 -03:00
Roberto Ierusalimschy
6ee2dbdfe9
traceback stops at first protected call
2002-06-18 14:10:43 -03:00
Roberto Ierusalimschy
1dbe708aa8
new protocol for error handling
2002-06-18 12:19:27 -03:00
Roberto Ierusalimschy
8f080fd683
`traceback' returns only the traceback
2002-06-18 12:17:58 -03:00
Roberto Ierusalimschy
d8678edddc
luaL_verror -> luaL_error
2002-06-18 12:16:18 -03:00
Roberto Ierusalimschy
e812aa2002
avoid assignments to TObject access macros
2002-06-17 10:51:01 -03:00
Roberto Ierusalimschy
c31494df26
avoid gotos when possible
2002-06-14 14:21:32 -03:00
Roberto Ierusalimschy
8fd0f6a82b
new macro to check conditions on expression macros
2002-06-13 10:45:31 -03:00
Roberto Ierusalimschy
eb3de8768a
rawcall' -> upcall' (unprotected call)
2002-06-13 10:44:50 -03:00
Roberto Ierusalimschy
864c96f36c
new fallback for equality `__eq'
2002-06-13 10:39:55 -03:00
Roberto Ierusalimschy
0052930ffe
details
2002-06-12 16:16:00 -03:00
Roberto Ierusalimschy
eeab473fc8
new fallback __le (less equal), for partial order
2002-06-12 11:56:22 -03:00
Roberto Ierusalimschy
6b8cdc9cdd
Lua now uses only `realloc' for all its memory management
2002-06-11 13:26:12 -03:00
Roberto Ierusalimschy
000d081fd0
warnings from other compilers
2002-06-06 15:17:33 -03:00
Roberto Ierusalimschy
65d66ba275
new "local function"
2002-06-06 14:29:53 -03:00
Roberto Ierusalimschy
cff22f57dd
some refactoring
2002-06-06 10:52:37 -03:00
Roberto Ierusalimschy
168ea16acb
details
2002-06-06 10:16:02 -03:00
Roberto Ierusalimschy
dc6e6c48bb
on the way to 5.0
2002-06-06 09:49:28 -03:00
Roberto Ierusalimschy
e3cddc950c
C is not C++...
2002-06-06 09:43:08 -03:00
Roberto Ierusalimschy
630acb2048
_ERRORMESSAGE `accepts' non-string arguments (at least for now...)
2002-06-06 09:40:36 -03:00
Roberto Ierusalimschy
16f4723398
names & names
2002-06-06 09:40:22 -03:00
Roberto Ierusalimschy
f1c43bbe19
new function `xpcall' (at least for now...)
2002-06-06 09:39:48 -03:00
Roberto Ierusalimschy
5a8f383e60
io.close() closes standard output file; `close' now is method
2002-06-05 14:42:03 -03:00
Roberto Ierusalimschy
711b936849
new versions from lhf
2002-06-05 14:26:23 -03:00
Roberto Ierusalimschy
5b8ee9fa8d
new names for standard libraries
2002-06-05 14:24:04 -03:00
Roberto Ierusalimschy
2cd6161060
don't need stdio
2002-06-05 13:59:52 -03:00
Roberto Ierusalimschy
a102221a0b
better error messages
2002-06-05 13:59:37 -03:00
Roberto Ierusalimschy
6dd0b6c62b
details
2002-06-05 13:59:21 -03:00
Roberto Ierusalimschy
fa23301251
defintions for lua_number2str and lua_str2number don't need to be public
2002-06-05 09:34:19 -03:00
Roberto Ierusalimschy
94c2449d25
undump may return LUA_ERRRUN
2002-06-03 17:12:50 -03:00
Roberto Ierusalimschy
c398a02110
uses `isspace' to recognize space characters
2002-06-03 17:12:21 -03:00
Roberto Ierusalimschy
ad7103ea3a
lua_load* defined in auxlib (and so renamed to luaL_load*)
2002-06-03 17:11:41 -03:00
Roberto Ierusalimschy
0079e0f57c
core tests whether file is binary
2002-06-03 17:11:07 -03:00
Roberto Ierusalimschy
cfff013586
detail
2002-06-03 14:47:18 -03:00
Roberto Ierusalimschy
35a22ed1ab
lua_load* replaced by a simple lua_load
2002-06-03 14:46:34 -03:00
Roberto Ierusalimschy
ff91b355f4
no more use of stdio inside the core (except for `tostring'...)
2002-06-03 11:09:57 -03:00
Roberto Ierusalimschy
5094c37988
strconc' -> concat'
2002-06-03 11:08:43 -03:00
Roberto Ierusalimschy
46c471d7e9
new `__newindex' eventfield
2002-05-27 17:35:40 -03:00
Roberto Ierusalimschy
859ecf36b6
new copyright notice
2002-05-23 17:29:05 -03:00
Roberto Ierusalimschy
a1700bbc50
details
2002-05-23 16:43:04 -03:00
Roberto Ierusalimschy
8876a1bf92
details
2002-05-20 16:51:06 -03:00
Roberto Ierusalimschy
f53fd8d5f5
_ALERT is a private afair of lua.c
2002-05-16 16:09:19 -03:00
Roberto Ierusalimschy
955def0348
new names for string formating functions
2002-05-16 15:39:46 -03:00
Roberto Ierusalimschy
9c3b3f82fe
new commands to test `load'
2002-05-16 11:59:49 -03:00
Roberto Ierusalimschy
b7a0503c1d
new format for error messages
2002-05-15 15:57:44 -03:00
Roberto Ierusalimschy
1c328a191a
no more `global' declarations
2002-05-14 14:52:22 -03:00
Roberto Ierusalimschy
58bf77bc7f
no more extra space when growing hash
2002-05-13 10:38:59 -03:00
Roberto Ierusalimschy
8da6fe62d8
`nexti' returns correct indices
2002-05-13 10:10:58 -03:00
Roberto Ierusalimschy
c18fe57e54
quick-and-dirty function to print code (for debugging Lua)
2002-05-13 10:10:04 -03:00
Roberto Ierusalimschy
af19d55635
generic for also coded to make test at the end of the loop
2002-05-13 10:09:00 -03:00
Roberto Ierusalimschy
b55fded18c
details about jump optimization
2002-05-13 10:07:48 -03:00
Roberto Ierusalimschy
2dadc81822
cleaner implementation of code generation for jumps
2002-05-10 16:22:11 -03:00
Roberto Ierusalimschy
b487975344
optimization for `while' (first version)
2002-05-10 14:02:32 -03:00
Roberto Ierusalimschy
94e5545806
comment
2002-05-09 15:00:38 -03:00
Roberto Ierusalimschy
78b40bf57d
`skip' instructions must be followed by a jump
2002-05-09 11:14:34 -03:00
Roberto Ierusalimschy
01f1ac36b1
`global' tables (registry, etc.) stored in proper place, not in the stack
2002-05-08 14:34:23 -03:00
Roberto Ierusalimschy
a4d06736d4
correct implementation for arrays of size 1
2002-05-08 14:34:00 -03:00
Roberto Ierusalimschy
dea6b6da94
new function lua_vpushstr' to replace uses of sprintf'
2002-05-07 14:36:56 -03:00
Roberto Ierusalimschy
71144e3ff0
errors `return' int, to avoid warnings
...
+ home-made `sprintf' (first version)
2002-05-06 16:05:10 -03:00
Roberto Ierusalimschy
0dbf0c5953
new format for test intructions (handle NaN correctly)
2002-05-06 12:51:41 -03:00
Roberto Ierusalimschy
85dcb411a8
all textual errors go through `luaL_verror'
2002-05-02 14:12:27 -03:00
Roberto Ierusalimschy
3c6a383d62
avoid limits in filename size
2002-05-02 13:55:55 -03:00
Roberto Ierusalimschy
9a0f0dcc77
precompiler may create functions without `lineinfo'
2002-05-02 10:06:20 -03:00
Roberto Ierusalimschy
751cd867d3
new way to handle errors
2002-05-01 17:48:12 -03:00
Roberto Ierusalimschy
b36b2a061c
new way to handle errors
2002-05-01 17:40:42 -03:00
Roberto Ierusalimschy
ab52fc6097
new macro to `fix' strings
2002-04-30 10:01:48 -03:00
Roberto Ierusalimschy
e68d0df1c6
function `zsopen' is not used
2002-04-29 09:37:41 -03:00
Roberto Ierusalimschy
9b38a696d5
avoid names that differ only in capitalization
2002-04-24 17:07:46 -03:00
Roberto Ierusalimschy
383e8b9e77
use of a common `dummynode' for all empty tables
2002-04-23 12:04:39 -03:00
Roberto Ierusalimschy
f1a1bb23fe
good stack limit to compute ack(8,3)
2002-04-23 11:59:35 -03:00
Roberto Ierusalimschy
151ba1cc7b
details
2002-04-23 11:59:22 -03:00
Roberto Ierusalimschy
ee4859b3e3
new way to handle errors (temporary version)
2002-04-22 11:40:50 -03:00
Roberto Ierusalimschy
f388ee4a82
new way to handle errors
2002-04-22 11:40:23 -03:00
Roberto Ierusalimschy
30ad4c75db
bug: 'local a,b; a,b = 1,f()' did not close f()
2002-04-22 11:38:52 -03:00
Roberto Ierusalimschy
3ee1efa7b2
some simplifications
2002-04-22 11:37:09 -03:00
Roberto Ierusalimschy
c11d374c59
`panic' function configurable via API
2002-04-16 14:08:28 -03:00
Roberto Ierusalimschy
13230c451b
details
2002-04-16 09:00:02 -03:00
Roberto Ierusalimschy
391c5459cb
new implementation for `require' (with templates)
2002-04-15 17:54:41 -03:00
Roberto Ierusalimschy
62dd4cbe91
check for errors while loading file
2002-04-15 16:34:42 -03:00
Roberto Ierusalimschy
ae5283dc36
co' library goes with basic library (and not with tab')
2002-04-12 16:57:29 -03:00
Roberto Ierusalimschy
1ce6cb6032
no more option `*u' in read (too complex)
2002-04-12 16:56:25 -03:00
Roberto Ierusalimschy
11c63bc3af
error in calls signalled in first line (instead of last)
2002-04-10 16:14:45 -03:00
Roberto Ierusalimschy
f1f271ae76
details
2002-04-10 15:05:08 -03:00
Roberto Ierusalimschy
6c7334a9ac
line trace uses savedpc' to save last pc' seen
2002-04-10 09:11:07 -03:00
Roberto Ierusalimschy
8e1e618606
baselib' splited in baselib' and `tablib'
2002-04-09 17:19:06 -03:00
Roberto Ierusalimschy
af4721f7a3
library with table manipulation functions
2002-04-09 17:19:06 -03:00
Roberto Ierusalimschy
018e50ad7f
use addresses as keys to hooks
2002-04-09 16:48:08 -03:00
Roberto Ierusalimschy
7b65328c8e
new semantics for `generic for' (with state)
2002-04-09 16:47:44 -03:00
Roberto Ierusalimschy
d2e05589d7
bug: `resume' was returning its arguments, too
2002-04-09 16:46:56 -03:00
Roberto Ierusalimschy
237969724f
support for light' userdata + simpler support for boxed' udata
2002-04-05 15:54:31 -03:00
Roberto Ierusalimschy
f438d00ef3
correct #args for calls with self (a:foo(...))
2002-04-04 17:25:55 -03:00
Roberto Ierusalimschy
c3b90061ea
new design for iolib (object style)
2002-04-04 17:24:56 -03:00
Roberto Ierusalimschy
a2e414d679
`pow' must be global (as the implementation of '^')
2002-04-04 17:20:49 -03:00
Roberto Ierusalimschy
93bcb65a9b
debug interface uses method' to describe calls like a:foo()'
2002-04-04 14:21:31 -03:00
Roberto Ierusalimschy
49c95648a0
getmetatable doesn't push nil when there is no metatable
2002-04-02 17:43:18 -03:00
Roberto Ierusalimschy
13ab5a6bb1
details
2002-04-02 17:43:08 -03:00
Roberto Ierusalimschy
cd99bbcd0d
better support for new libraries
2002-04-02 17:42:49 -03:00
Roberto Ierusalimschy
2cbbf7e95a
tostring' uses __tostring' when available
2002-04-02 17:42:20 -03:00
Roberto Ierusalimschy
e5919be1a7
bug: end of block may not be end of stat
2002-04-02 17:34:15 -03:00
Roberto Ierusalimschy
b795d4b561
details
2002-04-01 11:42:33 -03:00
Roberto Ierusalimschy
c371413530
small bug if LUA_USERINIT leaves garbage on the stack
2002-03-27 15:00:13 -03:00
Roberto Ierusalimschy
d1f220217b
when possible, library functions accept nil as none
2002-03-27 12:30:41 -03:00
Roberto Ierusalimschy
405e3a4597
metatable always return some value
2002-03-27 09:49:53 -03:00
Roberto Ierusalimschy
81215cd59f
simpler way to control stack overflow
2002-03-26 17:46:10 -03:00
Roberto Ierusalimschy
0b9b53e21c
details
2002-03-26 15:55:50 -03:00
Roberto Ierusalimschy
44a5484d73
small bug (L->ci->top may be larger than L->top...)
2002-03-25 16:45:06 -03:00
Roberto Ierusalimschy
801aaf37b1
simpler implementation for line information
2002-03-25 14:47:14 -03:00
Roberto Ierusalimschy
00af2faae7
first implementation of proper tail call
2002-03-22 13:54:31 -03:00
Roberto Ierusalimschy
e9ef7ed2d3
first implementation for tail call
2002-03-21 17:32:22 -03:00
Roberto Ierusalimschy
2626708b72
details
2002-03-21 17:31:43 -03:00
Roberto Ierusalimschy
19ac0fadc9
don't need to mark the stacks twice ;-)
2002-03-20 15:54:29 -03:00
Roberto Ierusalimschy
ca2ceef659
simpler solution for finalizing udata
2002-03-20 15:37:28 -03:00
Roberto Ierusalimschy
5023aaee0a
reserve one more bit for GC
2002-03-20 15:37:13 -03:00
Roberto Ierusalimschy
88c9bf99de
standard libraries in packages
2002-03-20 09:54:08 -03:00
Roberto Ierusalimschy
63a614e145
some improvements in stack control
2002-03-20 09:52:32 -03:00
Roberto Ierusalimschy
48e732e07d
improvements in stack control
2002-03-20 09:51:29 -03:00
Roberto Ierusalimschy
938092489b
erroneous objects may not live in the stack
2002-03-19 09:45:25 -03:00
Roberto Ierusalimschy
578d1da00d
new names for tag methods
2002-03-18 17:24:14 -03:00
Roberto Ierusalimschy
24d6d0528d
api.c only needs to check pushes when api_check is defined
2002-03-18 17:11:52 -03:00
Roberto Ierusalimschy
0b00e7f1a2
new macro to convert double->int
2002-03-18 15:18:35 -03:00
Roberto Ierusalimschy
b7ed502dea
configurable macros should live in llimits.h
2002-03-18 15:16:16 -03:00
Roberto Ierusalimschy
58badbab99
special treatment for 'global in nil'
2002-03-18 11:49:46 -03:00
Roberto Ierusalimschy
da81845cd5
an error may call GC and find an incomplete `ci'
2002-03-15 14:17:16 -03:00
Roberto Ierusalimschy
9681ff09db
small optimization when returning a single local value
2002-03-14 15:32:37 -03:00
Roberto Ierusalimschy
7ff21273d6
implementation of `global' statement
2002-03-14 15:01:52 -03:00
Roberto Ierusalimschy
207dad8606
comments
2002-03-14 13:50:06 -03:00
Roberto Ierusalimschy
c97dc294a9
first implementation of `gfind'
2002-03-11 10:29:40 -03:00
Roberto Ierusalimschy
71c716e5a8
avoid C identifiers beginning with '_'
2002-03-11 09:45:00 -03:00
Roberto Ierusalimschy
51ad2f1162
error message
2002-03-08 16:25:24 -03:00
Roberto Ierusalimschy
ecda9c1972
details
2002-03-08 16:17:59 -03:00
Roberto Ierusalimschy
e19eba7219
cannot store `top' in local variables...
2002-03-08 16:11:03 -03:00
Roberto Ierusalimschy
bd8b9c94b3
generic for (with any number of control variables)
2002-03-08 16:10:32 -03:00
Roberto Ierusalimschy
4db04555f0
implementation of long comments
2002-03-08 16:07:01 -03:00
Roberto Ierusalimschy
c16a35d669
lua_stackspace' replaced by lua_checkstack'
2002-03-07 15:15:10 -03:00
Roberto Ierusalimschy
8f837e83b2
using `ci->top' to control acceptable indices in C calls
2002-03-07 15:14:29 -03:00
Roberto Ierusalimschy
6658b9588f
details
2002-03-07 15:11:51 -03:00
Roberto Ierusalimschy
457d88eaaa
configurable minimum size for the string table
2002-03-05 13:22:54 -03:00
Roberto Ierusalimschy
8a1a512c64
lu_byte is enough for those fields (maxstack < 256)
2002-03-05 09:42:47 -03:00
Roberto Ierusalimschy
6b0c38c2e7
`inline' of tonumber
2002-03-04 18:33:09 -03:00
Roberto Ierusalimschy
1a3f175640
small optimization
2002-03-04 18:32:34 -03:00
Roberto Ierusalimschy
88c7b574cb
`luaA_index' is a local macro now
2002-03-04 18:29:41 -03:00
Roberto Ierusalimschy
51bf91a970
detail
2002-03-04 12:40:04 -03:00
Roberto Ierusalimschy
1b6315ba10
not all unfinished strings with "..." end in EOF
2002-03-04 12:27:14 -03:00
Roberto Ierusalimschy
3b001d9a9d
more tests for boolean API
2002-03-04 12:26:56 -03:00
Roberto Ierusalimschy
c36b5cc726
detail
2002-02-15 13:15:10 -02:00
Roberto Ierusalimschy
2c1eb62a08
get error messages from luaL_errstr
2002-02-14 20:23:43 -02:00
Roberto Ierusalimschy
63e2d92123
no more -DOLD_ANSI option + details
2002-02-14 19:49:33 -02:00
Roberto Ierusalimschy
e966dd93be
towards next version...
2002-02-14 19:48:32 -02:00
Roberto Ierusalimschy
2f8e3c5543
prints any results returned by chunk
2002-02-14 19:47:50 -02:00
Roberto Ierusalimschy
b0a5e156b8
no more maximum stack size
2002-02-14 19:47:29 -02:00
Roberto Ierusalimschy
ac178ee478
new constructor syntax + new generic `for'
2002-02-14 19:46:58 -02:00
Roberto Ierusalimschy
1e602a61b3
new generic `for'
2002-02-14 19:46:43 -02:00
Roberto Ierusalimschy
57fb51f975
luaH_next' works like next'
2002-02-14 19:46:13 -02:00
Roberto Ierusalimschy
1c423d2661
LFIELDS_PER_FLUSH is an opcode detail
2002-02-14 19:43:01 -02:00
Roberto Ierusalimschy
b3ffaca638
details
2002-02-14 19:41:53 -02:00
Roberto Ierusalimschy
bee86e23be
luaH_next' works like next' + better hash for pointers
2002-02-14 19:41:08 -02:00
Roberto Ierusalimschy
0056ed4135
better(?) order for types (nil == 0)
2002-02-14 19:40:29 -02:00
Roberto Ierusalimschy
e01f5e6809
better order of record fields for 64-bit machines
2002-02-08 20:42:41 -02:00
Roberto Ierusalimschy
cbfc581990
details.
2002-02-08 20:41:50 -02:00
Roberto Ierusalimschy
d3651c1d88
`getstr' now gives const char *
2002-02-08 20:41:09 -02:00
Roberto Ierusalimschy
57a7baafb9
error message compatible with incomplete lines of lua.c
2002-02-08 20:40:27 -02:00
Roberto Ierusalimschy
252e01e398
`setlocale' may be used to query the current locale
2002-02-08 20:39:56 -02:00
Roberto Ierusalimschy
87b0e3d477
no more `lua_istrue' function
2002-02-08 20:39:36 -02:00
Roberto Ierusalimschy
cb50fcf42d
incomplete lines (by lhf)
2002-02-07 15:27:12 -02:00
Roberto Ierusalimschy
c6a108e012
test for lua_pushbool
2002-02-07 15:26:33 -02:00
Roberto Ierusalimschy
d5ceb369b1
boolean type must be 0 or 1
2002-02-07 15:26:10 -02:00
Roberto Ierusalimschy
86a4de256e
no more lua_[gs]etstr
2002-02-07 15:25:36 -02:00
Roberto Ierusalimschy
53aaee6ee6
comments
2002-02-07 15:25:12 -02:00
Roberto Ierusalimschy
67bda7e136
details.
2002-02-07 15:24:05 -02:00
Roberto Ierusalimschy
7c8f1823e7
bug: true 1 != true 2 + no more lua_getstr + some new macros
2002-02-07 15:22:53 -02:00
Roberto Ierusalimschy
ca181f31e4
line number in listcode (and tests for replace)
2002-02-05 20:40:05 -02:00
Roberto Ierusalimschy
38b0e6128d
simpler implementation for `for' loops
2002-02-05 20:39:12 -02:00
Roberto Ierusalimschy
addbe8c8b0
protected execution of `resume'
2002-02-05 20:38:37 -02:00
Roberto Ierusalimschy
6bb5cb1cbd
comments
2002-02-05 20:37:26 -02:00
Roberto Ierusalimschy
d070506a25
new function luaL_errstr
2002-02-05 20:36:52 -02:00
Roberto Ierusalimschy
0a87d9d334
new function `lua_replace'
2002-02-05 20:35:58 -02:00
Roberto Ierusalimschy
f856fdeabd
details
2002-01-30 15:28:05 -02:00
Roberto Ierusalimschy
653977a0ac
callhook can be static
2002-01-30 15:27:53 -02:00
Roberto Ierusalimschy
d6fd33e76f
eventtable' renamed to metatable'
2002-01-30 15:26:44 -02:00
Roberto Ierusalimschy
50e2952593
first version of dynamic stack
2002-01-25 20:14:54 -02:00
Roberto Ierusalimschy
b217ae644e
details
2002-01-25 20:14:09 -02:00
Roberto Ierusalimschy
a048cc9676
nil is a `valid' eventtable
2002-01-25 19:55:41 -02:00
Roberto Ierusalimschy
eb262bc617
2^15 does not fit in a 16-bit int
2002-01-25 19:51:33 -02:00
Roberto Ierusalimschy
74907fb71e
OP_LOADINT can be done by OP_LOADK
2002-01-25 19:50:39 -02:00
Roberto Ierusalimschy
b38e594ed7
small improvements
2002-01-18 15:39:40 -02:00
Roberto Ierusalimschy
448517e47e
no more linehook field in CallInfo
2002-01-18 15:39:06 -02:00
Roberto Ierusalimschy
931ee346e3
legacy declaration
2002-01-18 15:38:13 -02:00
Roberto Ierusalimschy
dea98702c9
preparations for stack reallocation
2002-01-16 20:04:50 -02:00
Roberto Ierusalimschy
7ab7703b53
cleaner semantics for test instructions (skips)
2002-01-16 20:03:57 -02:00
Roberto Ierusalimschy
566310fa04
small optimization
2002-01-16 20:02:46 -02:00
Roberto Ierusalimschy
6272c843de
yield' passes its arguments to resume'
2002-01-11 18:27:41 -02:00
Roberto Ierusalimschy
5d14ce612b
details
2002-01-11 18:27:11 -02:00
Roberto Ierusalimschy
d56d4cf776
distinct functions to create/destroy states and threads
2002-01-11 18:26:52 -02:00
Roberto Ierusalimschy
b7ae43d457
detail
2002-01-11 18:23:01 -02:00
Roberto Ierusalimschy
f083812c02
first implementation of coroutines
2002-01-09 20:02:47 -02:00
Roberto Ierusalimschy
3533382a1e
dependencies updated
2002-01-09 19:59:24 -02:00
Roberto Ierusalimschy
ea2a75d19e
new macro lua_userstateopen
2002-01-09 19:51:06 -02:00
Roberto Ierusalimschy
b3bb0f132b
new interface for weak modes
2002-01-09 19:50:35 -02:00
Roberto Ierusalimschy
facfec0687
small optimizations
2002-01-03 15:42:57 -02:00
Roberto Ierusalimschy
34df9976a9
some compatibility macros
2002-01-03 15:28:58 -02:00
Roberto Ierusalimschy
cfaa8fbf1d
better check for option in `strfind'
2002-01-03 15:27:43 -02:00
Roberto Ierusalimschy
f42cc90d2d
some warnings
2001-12-21 15:31:35 -02:00
Roberto Ierusalimschy
9d2e454d6f
BUG: seg. fault when rawget/rawset get extra arguments
2001-12-21 15:30:31 -02:00
Roberto Ierusalimschy
09e15692f3
rename of lua_isnull to lua_isnone
2001-12-20 19:27:12 -02:00
Roberto Ierusalimschy
42754c0f15
small optimizations
2001-12-20 19:26:52 -02:00
Roberto Ierusalimschy
18afb90349
first version of stackless Lua
2001-12-20 13:13:38 -02:00
Roberto Ierusalimschy
22dd271cbb
another bug in next (when n is a power of 2)
2001-12-19 16:11:00 -02:00
Roberto Ierusalimschy
e04f7ed450
first version of Lua "stackless"
2001-12-18 18:52:30 -02:00
Roberto Ierusalimschy
101cee3032
LUA_ERRERR also cannot generate error message
2001-12-13 16:11:02 -02:00
Roberto Ierusalimschy
eb7312d9be
comments
2001-12-13 16:10:55 -02:00
Roberto Ierusalimschy
21259a50e1
run GC tag methods in protected mod
2001-12-12 15:47:33 -02:00
Roberto Ierusalimschy
9aff171f3b
new type `boolean'
2001-12-11 20:48:44 -02:00
Roberto Ierusalimschy
ed9be5e1f0
reentrant implementation of garbage collection
2001-12-11 14:52:57 -02:00
Roberto Ierusalimschy
9d801f43d4
details
2001-12-10 20:12:08 -02:00
Roberto Ierusalimschy
e043b72a55
simpler way to collect userdata
2001-12-10 20:11:23 -02:00
Roberto Ierusalimschy
a4c35a3269
it doesn't pay to optimize absence when it is an error
2001-12-10 20:10:30 -02:00
Roberto Ierusalimschy
9cd36059ad
new API functions lua_getstr/lua_setstr
2001-12-10 20:09:51 -02:00
Roberto Ierusalimschy
592a309177
tag system replaced by event tables
2001-12-05 18:15:18 -02:00
Roberto Ierusalimschy
413fc7334b
new implementation for lua upvalues (sugested by E.T.): simpler and solves
...
a bug for multi-stacks
2001-11-29 18:22:22 -02:00
Roberto Ierusalimschy
fca0a12e23
avoid clashing names between macros and fields
2001-11-29 18:21:46 -02:00
Roberto Ierusalimschy
72659a0605
no more explicit support for wide-chars; too much troble...
2001-11-28 18:13:13 -02:00
Roberto Ierusalimschy
dfaf8c5291
details
2001-11-27 18:56:47 -02:00
Roberto Ierusalimschy
657f65211a
bug: `next' did not work for numeric indices
2001-11-16 14:29:51 -02:00
Roberto Ierusalimschy
39395e1211
`luaX_syntaxerror' does not need to be public
2001-11-16 14:29:10 -02:00
Roberto Ierusalimschy
26bf2adace
optimizations for space in LClosures and time cleanning weak tables
2001-11-06 19:41:53 -02:00
Roberto Ierusalimschy
fd48dcc7c8
details.
2001-11-06 19:41:43 -02:00
Roberto Ierusalimschy
617008f552
field G renamed to _G to avoid problemas with bugged macro-systems
...
(there is a macro named G too)
2001-11-06 19:40:51 -02:00
Roberto Ierusalimschy
ec9d8308b4
global table is also pseudo-index
2001-10-31 18:31:38 -02:00
Roberto Ierusalimschy
af59848219
tables of globals accessible through pseudo-index in C API
2001-10-31 17:58:11 -02:00
Roberto Ierusalimschy
46347d768e
`ref' support goes to auxlib
2001-10-31 17:40:14 -02:00
Roberto Ierusalimschy
36eb665859
no more refs, upvalues; lexical scoping;pseudo-indices
2001-10-31 16:06:05 -02:00
Roberto Ierusalimschy
070204300c
more consistent names for auxlib functions
2001-10-26 15:33:30 -02:00
Roberto Ierusalimschy
21aa7e55f2
optimization for array part of a Table
2001-10-25 17:14:14 -02:00
Roberto Ierusalimschy
fffb6f3814
no more MINPOWER2
2001-10-25 17:13:33 -02:00
Roberto Ierusalimschy
0b551a24f8
Hash' -> Table'
2001-10-25 17:12:21 -02:00
Roberto Ierusalimschy
8069f77ca4
C++ warning
2001-10-17 19:17:45 -02:00
Roberto Ierusalimschy
1e81da51ba
new API for registry and C upvalues + new implementation for references
2001-10-17 19:12:57 -02:00
Roberto Ierusalimschy
7cd37142f4
details
2001-10-17 19:06:56 -02:00
Roberto Ierusalimschy
e7c2eebd87
new function `concat'
2001-10-16 15:41:43 -02:00
Roberto Ierusalimschy
0c3ea96541
no more copytagmethod function
2001-10-11 18:41:21 -03:00
Roberto Ierusalimschy
babaa96eab
URL in indentification
2001-10-11 18:40:56 -03:00
Roberto Ierusalimschy
15462edb0f
new definitions for closure structures
2001-10-02 13:45:03 -03:00
Roberto Ierusalimschy
6f936bc793
"compatibility module" no longer exists
2001-10-02 13:43:54 -03:00
Roberto Ierusalimschy
b840a7518d
details
2001-10-02 13:43:29 -03:00
Roberto Ierusalimschy
f54cdb33a5
small bug in close x return
2001-09-28 13:48:16 -03:00
Roberto Ierusalimschy
8e9b1e4ae9
details
2001-09-25 14:08:46 -03:00
Roberto Ierusalimschy
328d53e77b
restricted syntax for function call/table accesses prefixes
2001-09-25 14:06:48 -03:00
Roberto Ierusalimschy
c04d9b9ecb
small bug when closing closures in error conditions
2001-09-25 14:05:49 -03:00
Roberto Ierusalimschy
c44c68450a
changes by lhf
2001-09-24 12:54:36 -03:00
Roberto Ierusalimschy
abdbe883a8
first implementation of unrestricted static scoping
2001-09-07 14:39:10 -03:00
Roberto Ierusalimschy
4d0935ec0f
better definition for `luaM_freelem'
2001-09-07 14:30:16 -03:00
Roberto Ierusalimschy
e1d072571e
better syntax for type casts
2001-08-31 16:46:07 -03:00
Roberto Ierusalimschy
7651a5c6b2
start of new version
2001-08-31 16:46:07 -03:00
Roberto Ierusalimschy
8c8ad5f3ff
better locality of assignment of table values
2001-08-30 17:56:43 -03:00
Roberto Ierusalimschy
34a09b65f3
some changes of arguments from char to int
2001-08-30 17:55:58 -03:00
Roberto Ierusalimschy
29d883b9bd
avoid augmenting alignment of pointers
2001-08-30 17:55:22 -03:00
Roberto Ierusalimschy
b0d5bd8c70
tinsert gets 3d argument instead of last one
2001-08-30 17:54:51 -03:00
Roberto Ierusalimschy
9fca43f5b0
details
2001-08-30 17:54:36 -03:00
Roberto Ierusalimschy
33d820d41d
new syntax "= exp" to rpint exp + simplifications
2001-08-30 17:54:02 -03:00
Roberto Ierusalimschy
c3d72096c4
use a table to find (and reuse) constants when parsing
2001-08-27 12:16:28 -03:00
Roberto Ierusalimschy
7afc74ff07
avoid some warnings from strange compilers
2001-08-27 12:14:57 -03:00
Roberto Ierusalimschy
022bf27202
extra parenteses to avoid warnings
2001-08-27 12:13:59 -03:00
Roberto Ierusalimschy
fd40af92e4
the parser is not LL(1)
2001-08-10 17:53:03 -03:00
Roberto Ierusalimschy
0171543704
better optimization options
2001-07-24 19:40:08 -03:00
Roberto Ierusalimschy
ebd1d1f82c
no more deprecated code
2001-07-24 19:39:34 -03:00
Roberto Ierusalimschy
04320e04bf
warnings from Visual C++ (plus small details)
2001-07-24 18:57:19 -03:00
Roberto Ierusalimschy
5d2d2b1752
the usual stuff
2001-07-24 14:25:30 -03:00
Roberto Ierusalimschy
f34001faa9
details
2001-07-24 14:25:03 -03:00
Roberto Ierusalimschy
95988676d8
small bug when creating AsBc instructions in 16-bit machines
2001-07-24 14:19:07 -03:00
Roberto Ierusalimschy
767abdfdc0
`newtype' returns old tag when given an old name
2001-07-23 16:56:00 -03:00
Roberto Ierusalimschy
45b173cbf8
warnings/details
2001-07-21 21:59:36 -03:00
Roberto Ierusalimschy
a94cba4b88
ready for 4.1 alpha?
2001-07-19 10:36:18 -03:00
Roberto Ierusalimschy
f9f355221f
version -> 4.1 alpha
2001-07-19 10:24:18 -03:00
Roberto Ierusalimschy
b3dd9b1bb1
`format' can handle \0 in format string (why not?)
2001-07-17 15:46:49 -03:00
Roberto Ierusalimschy
d8f37bf42a
weakregistry has its keys weak, too
2001-07-17 14:54:46 -03:00
Roberto Ierusalimschy
a598804a04
small bug in luaK_self (side effects)
2001-07-17 11:30:44 -03:00
Roberto Ierusalimschy
6c8e652aa6
use macros for 'getc'
2001-07-16 17:24:48 -03:00
Roberto Ierusalimschy
9f25df02d5
new definition for headers of binary files
2001-07-12 16:34:03 -03:00
Roberto Ierusalimschy
ae1cf64348
better names for type-related functions
2001-07-12 15:11:58 -03:00
Roberto Ierusalimschy
a264fd089e
small bug in read_chars (fread x eof)
2001-07-12 11:59:14 -03:00
Roberto Ierusalimschy
a3d03ff6b6
bug: error message for `%a' gave wrong line number
2001-07-10 17:02:22 -03:00
Roberto Ierusalimschy
654b16e83a
better performance for table operations (mainly for integer indices)
2001-07-05 17:31:14 -03:00
Roberto Ierusalimschy
dc4e0ecdaf
new versions by lhf
2001-07-05 17:29:15 -03:00
Roberto Ierusalimschy
9924668931
LUA_MINSTACK has a fixed value
2001-07-05 16:32:42 -03:00
Roberto Ierusalimschy
89ef91a7fe
`opmodes' table also generated automatically by mkprint
2001-07-03 14:02:02 -03:00
Roberto Ierusalimschy
00aaee0ae7
details
2001-07-03 14:01:34 -03:00
Roberto Ierusalimschy
18d3e82cfe
check C is independent from check B
2001-07-03 14:01:34 -03:00
Roberto Ierusalimschy
2a4afb97c8
new module lopcodes.c for tables describing opcodes
2001-06-28 16:58:57 -03:00
Roberto Ierusalimschy
87a5fae453
tables describing opcodes
2001-06-28 16:58:57 -03:00
Roberto Ierusalimschy
afed6c6864
missing an opcode name
2001-06-28 12:06:20 -03:00
Roberto Ierusalimschy
770954510f
rename of kproto' to p'
2001-06-28 11:57:17 -03:00
Roberto Ierusalimschy
b346834a09
new macros for changing numbers
2001-06-28 11:48:44 -03:00
Roberto Ierusalimschy
61a036eaa5
new macro to control format for `read"*n"'
2001-06-28 11:45:44 -03:00
Roberto Ierusalimschy
37f3a1c045
too much optimization to "break" keys in tables; keep them as TObjects...
2001-06-26 10:20:45 -03:00
Roberto Ierusalimschy
9559c111a3
new read' option *u' (read-until) + simpler implementation for `read'
2001-06-22 10:49:42 -03:00
Roberto Ierusalimschy
777061e441
resurect userdata before calling its GC tag method
2001-06-21 13:41:34 -03:00
Roberto Ierusalimschy
fccadba4b5
new reserved words in' and global'
2001-06-20 18:07:57 -03:00
Roberto Ierusalimschy
b940f09984
no more "compat mode" with 3.2 (deprecated functions)
2001-06-20 14:25:30 -03:00
Roberto Ierusalimschy
878979cef7
no more opnames in binary tag methods
2001-06-20 14:22:46 -03:00
Roberto Ierusalimschy
8e586c13fc
cleaner way to ensure alignment for strings and userdata
2001-06-15 17:36:57 -03:00
Roberto Ierusalimschy
eadf2aaaff
small optimizations
2001-06-15 16:17:33 -03:00
Roberto Ierusalimschy
ae19b2f51e
more relaxed rules for syncronized access
2001-06-15 16:16:41 -03:00
Roberto Ierusalimschy
a3fbf5f5fd
details
2001-06-13 15:51:20 -03:00
Roberto Ierusalimschy
7fae1c17b1
detail
2001-06-13 11:25:49 -03:00
Roberto Ierusalimschy
89e8303f4e
more robust treatment of GC tag methods (now they can create new
...
objects while running...)
2001-06-12 15:43:13 -03:00
Roberto Ierusalimschy
89c301d180
`(exp)' adjusts exp to 1 result
2001-06-12 11:36:48 -03:00
Roberto Ierusalimschy
186111dc01
unused definition
2001-06-11 11:57:17 -03:00
Roberto Ierusalimschy
0a1b1acdd3
details about opcode parameters
2001-06-11 11:56:42 -03:00
Roberto Ierusalimschy
79acf5ea60
details
2001-06-08 16:20:02 -03:00
Roberto Ierusalimschy
cbc59592ff
new definition for luaD_call' and luaD_adjusttop'
2001-06-08 16:01:38 -03:00
Roberto Ierusalimschy
4905fdd135
C++ warning
2001-06-08 13:48:32 -03:00
Roberto Ierusalimschy
0267168675
details.
2001-06-08 09:29:27 -03:00
Roberto Ierusalimschy
ba11831d35
smaller structs for udata and for strings
2001-06-07 12:01:21 -03:00
Roberto Ierusalimschy
190ddd431d
details (rests of debug code)
2001-06-07 11:44:51 -03:00
Roberto Ierusalimschy
65c289b046
details
2001-06-07 10:46:29 -03:00
Roberto Ierusalimschy
d5b83ead90
new implementation for userdatas, without `keys'
2001-06-06 15:00:19 -03:00
Roberto Ierusalimschy
da673d31aa
user can define extra alignment requirements
2001-06-05 17:01:09 -03:00
Roberto Ierusalimschy
323da72577
weakmode' queries must have an explicit ?'
2001-06-05 16:41:31 -03:00
Roberto Ierusalimschy
943b8f5b18
details
2001-06-05 16:41:24 -03:00
Roberto Ierusalimschy
762d059a13
new implementation for the Virtual Machine
2001-06-05 15:17:01 -03:00
Roberto Ierusalimschy
572a69b6af
name changes
2001-04-23 13:35:45 -03:00
Roberto Ierusalimschy
beee01b170
re-implementation of refs through weak tables
2001-04-17 14:35:54 -03:00
Roberto Ierusalimschy
6473f965ca
new API functions to load (parse?) a chunk without running it.
2001-04-11 15:39:37 -03:00
Roberto Ierusalimschy
0e0e4a480e
first implementation for weak tables
2001-04-11 11:42:41 -03:00
Roberto Ierusalimschy
2a50188269
avoid use of l_char outside INTERNALs (use lua_char instead)
2001-04-06 18:17:37 -03:00
Roberto Ierusalimschy
9aedea6ec8
small bug (when parser fails, there is no function on the stack...)
2001-04-06 16:26:06 -03:00
Roberto Ierusalimschy
a68635a919
list constructors do not adjust last expression
2001-04-06 15:25:00 -03:00
Roberto Ierusalimschy
2112142680
allow syntax << function (x) ... end (...) >> as a statement
2001-04-05 13:49:14 -03:00
Roberto Ierusalimschy
dd3a63c205
new way to handle `profiles'
2001-03-26 11:31:49 -03:00
Roberto Ierusalimschy
cb49b088b6
old signature for lua_open
2001-03-09 15:05:05 -03:00
Roberto Ierusalimschy
c5a23cf01a
details
2001-03-07 15:16:22 -03:00
Roberto Ierusalimschy
6048c4f74d
better way to link callinfo's and stack
2001-03-07 15:09:25 -03:00
Roberto Ierusalimschy
5e870f86a2
optimization for tailcall does not seem to pay itself
2001-03-07 10:22:55 -03:00
Roberto Ierusalimschy
f81b8adb3f
string [[...]] ignores initial \n
2001-03-07 09:49:37 -03:00
Roberto Ierusalimschy
2b2267069b
new functions pack' and unpack'
2001-03-07 09:43:52 -03:00
Roberto Ierusalimschy
72d3d155b0
detail
2001-03-07 09:27:06 -03:00
Roberto Ierusalimschy
6d4db86888
open functions are lua_Cfunctions
2001-03-06 17:09:38 -03:00
Roberto Ierusalimschy
e9a3820370
sizeof(string) != strlen(string)+1 when sizeof(char) != 1
2001-03-06 11:46:54 -03:00
Roberto Ierusalimschy
9e8a46daa2
details (identation)
2001-03-02 14:40:08 -03:00
Roberto Ierusalimschy
7b84f9e65c
lower-case for macros with arguments
2001-03-02 14:27:50 -03:00
Roberto Ierusalimschy
1e40b4dc61
buffer should be void *, as char now is not that neutral...
...
+ little bug in pointer arithmetic
2001-02-23 17:32:32 -03:00
Roberto Ierusalimschy
dfd7ce74cf
buffer should be void *, as char now is not that neutral...
2001-02-23 17:32:16 -03:00
Roberto Ierusalimschy
8399df5dcf
detail
2001-02-23 17:31:37 -03:00
Roberto Ierusalimschy
d2a64bb6d4
`llimits' may need definitions from LUA_USER_H
2001-02-23 17:28:56 -03:00
Roberto Ierusalimschy
a90f06dcd8
`atoi' does not have a wide-char equivalent
2001-02-23 17:28:26 -03:00
Roberto Ierusalimschy
35023355f2
details for wchar
2001-02-23 14:28:12 -03:00
Roberto Ierusalimschy
39b7978329
first (big) step to support wide chars
2001-02-23 14:17:25 -03:00
Roberto Ierusalimschy
d164e2294f
_ERRORMESSAGE called through get global tag method
2001-02-23 10:38:56 -03:00
Roberto Ierusalimschy
2cc94ac81b
avoid name clash with `sys/stat'
2001-02-23 10:38:56 -03:00
Roberto Ierusalimschy
5f37134e64
avoid '...' and "..." inside comments
2001-02-22 15:59:59 -03:00
Roberto Ierusalimschy
52ee91dd73
better encapsulation of some types
2001-02-22 14:15:18 -03:00
Roberto Ierusalimschy
191fd35f0a
warnings from Visual C++
2001-02-21 13:52:09 -03:00
Roberto Ierusalimschy
d6978d03e1
small bug in testing (pushuserdata needs some memory to work...)
2001-02-21 13:51:25 -03:00
Roberto Ierusalimschy
68b08848d4
`dostring' now is safe to run binary code.
2001-02-20 15:29:54 -03:00
Roberto Ierusalimschy
888f91fa24
code check for upvalues
2001-02-20 15:28:11 -03:00
Roberto Ierusalimschy
c1db0b2bf1
detail
2001-02-20 15:18:00 -03:00
Roberto Ierusalimschy
099442c41f
better separation between basic types
2001-02-20 15:15:33 -03:00
Roberto Ierusalimschy
27600fe87a
better strucuture for code checker
2001-02-16 15:58:27 -02:00
Roberto Ierusalimschy
f8509668dc
details.
2001-02-14 15:38:45 -02:00
Roberto Ierusalimschy
40f4e931f3
more liberal syntax for expressions
2001-02-14 15:19:28 -02:00
Roberto Ierusalimschy
29371ecfe8
better way to handle multi-line input (with concat)
2001-02-14 15:19:01 -02:00
Roberto Ierusalimschy
5d9b8b7cdc
more secure definition for lua_concat
2001-02-14 15:04:11 -02:00
Roberto Ierusalimschy
1c2501fad4
tests for string alignment
2001-02-13 14:52:01 -02:00
Roberto Ierusalimschy
a4ae1475e3
details (smaller code)
2001-02-13 14:17:53 -02:00
Roberto Ierusalimschy
b3da4ee907
checking consistency of jumps.
2001-02-12 17:54:50 -02:00
Roberto Ierusalimschy
3c649ce123
checking consistency of jumps (and some other details)
2001-02-12 17:54:28 -02:00
Roberto Ierusalimschy
95da574dbc
some compilers (wrongly) complain about that
2001-02-12 17:21:19 -02:00
Roberto Ierusalimschy
255052b6c6
better API checks
2001-02-12 13:42:44 -02:00
Roberto Ierusalimschy
1bdc156b52
details
2001-02-12 11:04:19 -02:00
Roberto Ierusalimschy
03d8a9bf0d
details
2001-02-09 18:29:33 -02:00
Roberto Ierusalimschy
d2e340f467
string pointers are always fully aligned
2001-02-09 18:22:29 -02:00
Roberto Ierusalimschy
6875fdc8be
new semantics for pushuserdata (no more different userdatas with same value)
2001-02-09 17:53:16 -02:00
Roberto Ierusalimschy
dc17a9cc24
new semantics for pushuserdata
2001-02-09 17:52:54 -02:00
Roberto Ierusalimschy
81e63f75c0
`tostring' uses type names (when available)
2001-02-09 17:52:24 -02:00
Roberto Ierusalimschy
c81404cae5
first version of code verification
2001-02-09 16:37:33 -02:00
Roberto Ierusalimschy
b6ce590433
details
2001-02-09 16:07:47 -02:00
Roberto Ierusalimschy
e70e6a3b7a
<read(0)> tests for EOF
2001-02-09 14:25:50 -02:00
Roberto Ierusalimschy
6548bf7462
warnings from Visual C
2001-02-08 09:19:10 -02:00
Roberto Ierusalimschy
7178a5e34a
new way to handle top x L->top
2001-02-07 16:13:49 -02:00
Roberto Ierusalimschy
322b7b5fc5
easier to add new initialization functions
2001-02-06 16:18:58 -02:00
Roberto Ierusalimschy
1f917e709c
better use of extra include files (both for tests and for old_ansi)
2001-02-06 14:01:29 -02:00
Roberto Ierusalimschy
d444153dbe
ESC (which starts precompiled code) in C is \33, not \27
2001-02-06 11:59:29 -02:00
Roberto Ierusalimschy
a894499566
details
2001-02-05 17:08:01 -02:00
Roberto Ierusalimschy
d1fc6244f0
extended syntax to allow function a.b.c (x)
2001-02-05 15:48:52 -02:00
Roberto Ierusalimschy
7e3d3e1f70
details
2001-02-02 17:02:40 -02:00
Roberto Ierusalimschy
1f9e3731d1
back to the basics (well-behaved variant record...)
2001-02-02 14:32:00 -02:00
Roberto Ierusalimschy
42224ca553
loop of 'dostring' may never reclaim memory
2001-02-02 14:23:20 -02:00
Roberto Ierusalimschy
426d3e43bd
lock/unlock may use L + better structure for internal debug stuff
2001-02-02 13:13:05 -02:00
Roberto Ierusalimschy
8823f371a2
new header to put together debug-related declarations
2001-02-02 13:12:25 -02:00
Roberto Ierusalimschy
e506b864cd
no need for tags in boxed values :-(
2001-02-01 15:40:48 -02:00
Roberto Ierusalimschy
9a231afa97
top must be updated when there is any error
2001-02-01 15:39:55 -02:00
Roberto Ierusalimschy
4ab6acacdf
better control of relationship top x L->top
2001-02-01 14:03:38 -02:00
Roberto Ierusalimschy
6858763994
bug in lua_pushuserdata(L, NULL)
2001-02-01 11:56:49 -02:00
Roberto Ierusalimschy
b68fb7f62e
`assert' returns its first argument
2001-01-31 17:53:01 -02:00
Roberto Ierusalimschy
60ff79451c
detail in error message
2001-01-31 11:13:17 -02:00
Roberto Ierusalimschy
44a53df688
better to avoid dirty tricks
2001-01-30 17:48:37 -02:00
Roberto Ierusalimschy
63a822c8e1
all boxed types start with their tags
2001-01-29 17:34:02 -02:00
Roberto Ierusalimschy
09def5da44
small corrections
2001-01-29 17:33:55 -02:00
Roberto Ierusalimschy
6b71a9cfe5
smaller tables for machines with 8-bit alignment
2001-01-29 15:17:26 -02:00
Roberto Ierusalimschy
fa8c44b510
avoid the use of "reopen" (not that standard)
2001-01-29 13:35:17 -02:00
Roberto Ierusalimschy
3b6f8bfbe6
simpler implementation of for loops
2001-01-29 13:26:40 -02:00
Roberto Ierusalimschy
caf01b5bfa
better implementation for list "for"
2001-01-29 11:14:49 -02:00
Roberto Ierusalimschy
ca1f28b829
avoid side-effects on macros that may use twice their arguments
2001-01-26 16:43:22 -02:00
Roberto Ierusalimschy
b82242d4c4
detail
2001-01-26 13:58:50 -02:00
Roberto Ierusalimschy
ac390020e9
optimizations based on all types but number and nil are pointers
2001-01-26 12:16:35 -02:00
Roberto Ierusalimschy
9b45439860
details
2001-01-26 12:16:24 -02:00
Roberto Ierusalimschy
7959f3aebb
easier way to erase 'dead' keys
2001-01-26 11:18:00 -02:00
Roberto Ierusalimschy
bce6572579
new macros + new names to facilitate compilation of threaded version
2001-01-26 09:45:51 -02:00
Roberto Ierusalimschy
a53d9b66ca
first implementation for type names
2001-01-25 14:45:36 -02:00
Roberto Ierusalimschy
c8559e3c8d
a small optimization
2001-01-24 14:20:54 -02:00
Roberto Ierusalimschy
71ae4801d6
macros LUA_ENTRY/LUA_EXIT to control exclusive access to Lua core
2001-01-24 13:45:33 -02:00
Roberto Ierusalimschy
6fda6a5302
support for multiple stacks sharing the same global environment
2001-01-22 16:01:38 -02:00
Roberto Ierusalimschy
4ac58853dc
thead-specific state separated from "global" state
2001-01-19 11:20:30 -02:00
Roberto Ierusalimschy
f2c451d745
all accesses to TObjects done through macros
2001-01-18 13:59:09 -02:00
Roberto Ierusalimschy
619edfd9e4
details
2001-01-15 16:07:56 -02:00
Roberto Ierusalimschy
a04de4f0ad
no more END opcode
2001-01-15 14:13:24 -02:00
Roberto Ierusalimschy
a653d93a43
string comparison only needs to test for "less than"
2001-01-11 16:59:32 -02:00
Roberto Ierusalimschy
321c7fb6f8
details
2001-01-11 16:59:20 -02:00
Roberto Ierusalimschy
dabb19fc17
specialized versions for luaH_set (numbers and strings)
2001-01-10 16:56:11 -02:00
Roberto Ierusalimschy
08496eea8b
small changes in lstring
2001-01-10 15:41:50 -02:00
Roberto Ierusalimschy
4ff5545709
new macro pushliteral
2001-01-10 14:58:11 -02:00
Roberto Ierusalimschy
595e449537
tighter size for error buffers
2001-01-10 14:40:56 -02:00
Roberto Ierusalimschy
a907aeeb1e
general corrections
2000-12-28 15:25:45 -02:00
Roberto Ierusalimschy
76f62fc5a1
correct size only after malloc success
2000-12-28 10:59:41 -02:00
Roberto Ierusalimschy
0183b8030c
`free' gets size of the block: complete control over memory use
2000-12-28 10:55:41 -02:00
Roberto Ierusalimschy
8c49e19865
explicit control of size for growing vectors
2000-12-26 16:46:09 -02:00
Roberto Ierusalimschy
6af005ec20
bug: when `read' fails it must return nil (and not no value)
2000-12-22 15:32:28 -02:00
Roberto Ierusalimschy
f8a0fd268e
temporary version
2000-12-22 14:58:41 -02:00
Roberto Ierusalimschy
0066bbbb0b
details
2000-12-22 14:57:46 -02:00
Roberto Ierusalimschy
1db05793a0
time' does not need to correct its table argument (use date' for that)
2000-12-22 14:57:13 -02:00
Roberto Ierusalimschy
af97be026b
new function for time and date
2000-12-18 11:42:19 -02:00
Roberto Ierusalimschy
cce8ebd306
obsolete `format' option (d$).
2000-12-18 11:41:41 -02:00
Roberto Ierusalimschy
4894c27962
lua_Number defined in lua.h (1st version)
2000-12-04 16:33:40 -02:00
Roberto Ierusalimschy
10ac68c648
first implementation for position captures
2000-12-04 12:43:06 -02:00
Roberto Ierusalimschy
01b00cc292
better control over extensions of char/short to int
2000-11-30 16:50:47 -02:00
Roberto Ierusalimschy
fc7b167ae0
BUG: parser does not accept a ;' after a return'
2000-11-29 09:57:42 -02:00
Roberto Ierusalimschy
96253ed8ce
better support for 64-bit machines (avoid excessive use of longs)
2000-11-24 15:39:56 -02:00
Roberto Ierusalimschy
35d6b15057
some cleaning
2000-11-23 11:49:35 -02:00
Roberto Ierusalimschy
22914afab3
avoid the use of (non const) static data
2000-11-23 11:47:39 -02:00
Roberto Ierusalimschy
523c5d8e1c
last changes by lhf.
2000-11-07 10:44:44 -02:00
Roberto Ierusalimschy
40a4c76773
setlinehook/setcallhook return old hook
2000-11-06 15:58:38 -02:00
Roberto Ierusalimschy
1385d81d20
2000-11-06 11:45:18 -02:00
Roberto Ierusalimschy
906d5dcc41
details
2000-11-06 11:45:18 -02:00
Roberto Ierusalimschy
93a5649d40
hooks may call `error' to break a chunk.
2000-11-06 11:19:08 -02:00
Roberto Ierusalimschy
df416661cc
many changes
2000-10-31 16:20:01 -02:00
Roberto Ierusalimschy
67c1afff59
lua_settagmethod does not return old tag method
2000-10-31 11:10:24 -02:00
Roberto Ierusalimschy
03770ecfc9
comments
2000-10-31 10:44:07 -02:00
Roberto Ierusalimschy
7409678b5d
DEBUG renamed to LUA_DEBUG
2000-10-30 15:50:00 -02:00
Roberto Ierusalimschy
d1c689af40
subtelties in layout of TString
2000-10-30 15:49:19 -02:00
Roberto Ierusalimschy
37e9c2e744
macro DEBUG renamed to LUA_DEBUG
2000-10-30 14:29:59 -02:00
Roberto Ierusalimschy
e42a219eeb
`lua_typename' accepts LUA_TNONE
2000-10-30 11:07:48 -02:00
Roberto Ierusalimschy
b3959d58ff
2000-10-30 10:50:09 -02:00
Roberto Ierusalimschy
f379d06e24
all API functions are declared in a single line (to facilitate pre-processing).
2000-10-30 10:38:50 -02:00
Roberto Ierusalimschy
728ff20701
details
2000-10-30 10:20:29 -02:00
Roberto Ierusalimschy
2cbbf3933a
new macro LUALIB_API (so the lib can be a separate DLL)
2000-10-27 14:15:53 -02:00
Roberto Ierusalimschy
e2b6b7de1b
details
2000-10-27 09:39:52 -02:00
Roberto Ierusalimschy
563b1f5704
new way to ensure uniqueness of registry keys
2000-10-26 17:04:22 -02:00
Roberto Ierusalimschy
4670476584
details.
2000-10-26 16:44:26 -02:00
Roberto Ierusalimschy
89f98c0995
in function `read_file', realloc() doesn't free the buffer if it can't
...
allocate new memory
2000-10-26 10:53:55 -02:00
Roberto Ierusalimschy
b892f0a877
new API function `createuserdata'
2000-10-26 10:47:05 -02:00
Roberto Ierusalimschy
aadc35449e
lua_settag does not pop its argument
2000-10-24 17:19:15 -02:00
Roberto Ierusalimschy
cdc8139e29
registry mechanism
2000-10-24 17:12:06 -02:00
Roberto Ierusalimschy
e833bd47c9
comments
2000-10-24 14:05:59 -02:00
Roberto Ierusalimschy
b7ffb128cb
it is unsafe to allow Lua to get gc tag methods
2000-10-20 14:57:42 -02:00
Roberto Ierusalimschy
64eecc0b82
new macro LUA_API
2000-10-20 14:39:03 -02:00
Roberto Ierusalimschy
8b88ab07f7
more controled use of `sprintf'
2000-10-20 14:36:32 -02:00
Roberto Ierusalimschy
2779ceeb12
((n)-1) may be negative (-1), and so it is not wise to keep it as unsigned
2000-10-18 15:19:09 -02:00
Roberto Ierusalimschy
e93c4547fe
no more USERINIT (macro)
2000-10-17 11:36:24 -02:00
Roberto Ierusalimschy
0ffc676ce7
details
2000-10-11 14:47:50 -02:00
Roberto Ierusalimschy
18fb3ddb89
details.
2000-10-10 17:52:58 -02:00
Roberto Ierusalimschy
2bddbe6603
cannot change filename' before eventual call to freopen'
2000-10-10 17:51:39 -02:00
Roberto Ierusalimschy
e323338fd0
`nlineinfo' must include end flag.
2000-10-10 17:51:15 -02:00
Roberto Ierusalimschy
46b543ebef
better treatment for errors inside _ERRORMETHOD
2000-10-09 13:46:43 -02:00
Roberto Ierusalimschy
79909a92e1
details
2000-10-09 11:47:46 -02:00
Roberto Ierusalimschy
d6232a0b2e
better treatment for source names
2000-10-09 11:47:32 -02:00
Roberto Ierusalimschy
ae63a0e692
new implementation for some API functions
2000-10-06 16:29:26 -03:00
Roberto Ierusalimschy
cd3d446957
detail
2000-10-06 16:28:47 -03:00
Roberto Ierusalimschy
f01e6c6f1d
small optimization in `sort'
2000-10-06 16:13:29 -03:00
Roberto Ierusalimschy
ad3816d0d1
luaD_call is more uniform
2000-10-06 09:45:25 -03:00
Roberto Ierusalimschy
046a3d6173
tag methods are always functions, so don't need to store a whole object
2000-10-05 10:00:17 -03:00
Roberto Ierusalimschy
001f2bdd0e
new definition for types-tags
2000-10-05 09:14:08 -03:00
Roberto Ierusalimschy
cd2ddaded9
call hooks can only be called when `pc' is active (that is, inside
...
`execute'...)
2000-10-04 09:16:08 -03:00
Roberto Ierusalimschy
d68209e822
details.
2000-10-03 11:27:44 -03:00
Roberto Ierusalimschy
1088cde03c
easier way to change type Number
2000-10-03 11:03:21 -03:00
Roberto Ierusalimschy
6759f3ec5e
no more `proprietary' convertion algorithm (too complex)
2000-10-03 11:03:21 -03:00
Roberto Ierusalimschy
f6834f4393
new API function `lua_type' + new type lua_Type
2000-10-02 17:10:55 -03:00
Roberto Ierusalimschy
78bc8e553d
new API for garbage collector
2000-10-02 11:47:43 -03:00
Roberto Ierusalimschy
dad808a73a
new way to count `nblocks' for GC (try to count bytes).
2000-09-29 09:42:13 -03:00
Roberto Ierusalimschy
ca7fd50a4e
small optimizations
2000-09-29 09:40:56 -03:00
Roberto Ierusalimschy
282ab366f4
bug: parser overwrites semantic information when looking ahead
2000-09-27 14:41:58 -03:00
Roberto Ierusalimschy
444d6a106b
lua_tag should return LUA_NOTAG for non-valid indices
2000-09-27 09:51:39 -03:00
Roberto Ierusalimschy
13635f7de7
new version of protected execution
2000-09-25 13:22:42 -03:00
Roberto Ierusalimschy
d8a442206d
lua_state (now called `L') should not be global
2000-09-25 13:15:52 -03:00
Roberto Ierusalimschy
c9c6f9747c
GC may crash when checking C closures
2000-09-25 11:52:10 -03:00
Roberto Ierusalimschy
c2aa7bd72d
bug: lua_gettable does not get key from stack top
2000-09-25 11:48:42 -03:00
Roberto Ierusalimschy
f9dd50cefc
`read("*w")' should return nil at EOF
2000-09-22 15:14:06 -03:00
Roberto Ierusalimschy
dbde9f8817
wrong assert
2000-09-21 11:41:25 -03:00
Roberto Ierusalimschy
857a1204d8
by lhf
2000-09-21 11:18:43 -03:00
Roberto Ierusalimschy
d742b88fa1
final version (by lhf)
2000-09-20 15:43:54 -03:00
Roberto Ierusalimschy
eb822c314a
macros to do jumps
2000-09-20 14:57:08 -03:00
Roberto Ierusalimschy
ab7aceb980
Tochange
2000-09-20 14:21:20 -03:00
Roberto Ierusalimschy
72b12e0956
error messages in lower case.
2000-09-20 09:54:17 -03:00
Roberto Ierusalimschy
5ed3bcd4ea
warnings in Solaris
2000-09-19 05:42:35 -03:00
Roberto Ierusalimschy
7508fed673
final version for 4.0 beta
2000-09-18 16:46:37 -03:00
Roberto Ierusalimschy
aab4fde468
changes by lhf
2000-09-18 16:42:05 -03:00
Roberto Ierusalimschy
6ec4a0ef76
updates by lhf
2000-09-18 16:41:16 -03:00
Roberto Ierusalimschy
42ca3105ac
small "by 1" bug
2000-09-18 16:39:49 -03:00
Roberto Ierusalimschy
6030d5fed4
avoid assignment to local structure
2000-09-18 16:39:26 -03:00
Roberto Ierusalimschy
91c003dcc2
details
2000-09-18 16:39:18 -03:00
Roberto Ierusalimschy
620d22f2a0
new API function lua_rawget
2000-09-14 11:09:31 -03:00
Roberto Ierusalimschy
f45cba42b5
details for OLD_ANSI
2000-09-13 17:12:14 -03:00
Roberto Ierusalimschy
2628a42480
re-implementation of deprecated functions (wiht compiler option)
2000-09-13 16:52:39 -03:00
Roberto Ierusalimschy
0b3b6850c9
`back-up' definition for ERRORMESSAGE
2000-09-12 15:42:32 -03:00
Roberto Ierusalimschy
5d033f33eb
details in ERRORMESSAGE
2000-09-12 15:41:55 -03:00
Roberto Ierusalimschy
e143fed484
better standard error messages
2000-09-12 15:41:43 -03:00
Roberto Ierusalimschy
01ce1ce48c
field short_src
2000-09-12 15:38:25 -03:00
Roberto Ierusalimschy
024ed4218f
better name for source_id (short_src)
2000-09-12 15:38:02 -03:00
Roberto Ierusalimschy
c1f725ba4a
read patterns (deprecated) use new auxlib's buffer system
2000-09-12 10:58:37 -03:00
Roberto Ierusalimschy
5d69960734
error codes as strings for dofile and dostring
2000-09-12 10:49:05 -03:00
Roberto Ierusalimschy
d1c351857d
ERRORMESSAGE uses auxlib's buffer to build message string
2000-09-12 10:48:34 -03:00
Roberto Ierusalimschy
4ef14ba280
new function `luaL_addstring'
2000-09-12 10:48:22 -03:00
Roberto Ierusalimschy
b8d57092eb
topointer handles only types that have no other "to" function
2000-09-12 10:47:46 -03:00
Roberto Ierusalimschy
0f59e3d7a7
details
2000-09-12 10:47:39 -03:00
Roberto Ierusalimschy
55c3bc2bcb
_ALERT is used (and assumed) only by the libs
2000-09-12 10:46:59 -03:00
Roberto Ierusalimschy
8060193702
`lauxlib' is now part of the libraries (not used by core Lua)
2000-09-11 17:29:27 -03:00
Roberto Ierusalimschy
2779e81fbb
API functions check stack overflow
2000-09-11 16:45:27 -03:00
Roberto Ierusalimschy
30f6e658d2
lua_newstate' renamed to lua_open'
2000-09-11 16:42:57 -03:00
Roberto Ierusalimschy
787a78f83e
new scheme for buffers
2000-09-11 14:38:42 -03:00
Roberto Ierusalimschy
70c8a31092
obsolete module
2000-09-11 11:44:38 -03:00
Roberto Ierusalimschy
2018380e9f
late `lbuiltin.c', now implemented through the official API (and
...
therefore distributed as a regular library).
2000-09-05 16:33:56 -03:00
Roberto Ierusalimschy
6e80c1cde1
new version for API
2000-09-05 16:33:32 -03:00
Roberto Ierusalimschy
f67f324377
deprecated files
2000-09-05 16:28:46 -03:00
Roberto Ierusalimschy
eebc9729e4
new versions by lhf
2000-09-04 15:53:41 -03:00
Roberto Ierusalimschy
6990b06467
finish with parse data before doing main chunk.
2000-09-04 15:52:51 -03:00
Roberto Ierusalimschy
cad91499dd
no more support for single state
2000-09-04 15:27:32 -03:00
Roberto Ierusalimschy
ebdd4e8451
`call' doesn't use pack anymore
2000-08-31 18:02:55 -03:00
Roberto Ierusalimschy
9a21e81907
more builtin functions using official API
2000-08-31 18:01:43 -03:00
Roberto Ierusalimschy
f0b3cd1d6f
new API functions pop', insert', and `move'
2000-08-31 17:23:40 -03:00
Roberto Ierusalimschy
fb5e6d5ac4
more functions implemented through the official API
2000-08-31 13:52:06 -03:00
Roberto Ierusalimschy
d63afba9d3
negative stack sizes are invalid, too.
2000-08-31 11:28:17 -03:00
Roberto Ierusalimschy
100bfec39a
new implementation for `next'
2000-08-31 11:08:27 -03:00
Roberto Ierusalimschy
a290b84c67
dohook' to abstract callhook' and `linehook'
2000-08-31 10:31:44 -03:00
Roberto Ierusalimschy
1022b3c85e
minimum size for stack
2000-08-31 10:30:39 -03:00
Roberto Ierusalimschy
a1d3e001b9
comments
2000-08-31 10:30:22 -03:00
Roberto Ierusalimschy
10b4799ce5
details
2000-08-31 10:30:10 -03:00
Roberto Ierusalimschy
a0de89d62a
simpler tests for simpler API
2000-08-31 10:29:47 -03:00
Roberto Ierusalimschy
21dc77b2af
errors may happen before function start running (with pc=-1)
2000-08-31 10:29:12 -03:00
Roberto Ierusalimschy
2d3ebba537
last version before new API
2000-08-30 15:58:46 -03:00
Roberto Ierusalimschy
a97f29f154
explicit stack control in the API
2000-08-29 17:43:28 -03:00
Roberto Ierusalimschy
4135f4f586
new API does not need tests that complex
2000-08-29 16:05:11 -03:00
Roberto Ierusalimschy
808525e417
new asserts for hooks
2000-08-29 16:01:34 -03:00
Roberto Ierusalimschy
48a968e6b5
gc tag method for nil could call line hook
2000-08-29 16:00:57 -03:00
Roberto Ierusalimschy
58adbde216
details
2000-08-29 11:57:23 -03:00
Roberto Ierusalimschy
9e74ca62d7
tests for lua_is*
2000-08-29 11:57:10 -03:00
Roberto Ierusalimschy
d396562b5e
lua_equal also accepts out-of-range indices
2000-08-29 11:52:27 -03:00
Roberto Ierusalimschy
9d60598260
better definitions for MULTRET
2000-08-29 11:48:16 -03:00
Roberto Ierusalimschy
4e56c0d514
better implementation for luaV_pack
2000-08-29 11:41:56 -03:00
Roberto Ierusalimschy
ac12f4db4b
C upvalues are the last arguments to a function
2000-08-29 11:33:31 -03:00
Roberto Ierusalimschy
b691d4344b
L is not unused.
2000-08-28 17:22:21 -03:00
Roberto Ierusalimschy
9fdf73bc9a
first version for new API
2000-08-28 14:57:04 -03:00
Roberto Ierusalimschy
f1fd9b5c2c
intermediate version (only to avoid compiler errors)
2000-08-24 11:19:39 -03:00
Roberto Ierusalimschy
3723d790ae
checkstack needs a correct stack
2000-08-22 17:53:30 -03:00
Roberto Ierusalimschy
b800c38b69
simpler code for settable and gettable
2000-08-22 17:49:29 -03:00
Roberto Ierusalimschy
5c0e79847c
pragmas are no longer supported
2000-08-22 17:07:56 -03:00
Roberto Ierusalimschy
e662e0f1cd
simpler way to access _INPUT and _OUTPUT
2000-08-22 14:47:17 -03:00
Roberto Ierusalimschy
c85162be27
new way to store local-variable information.
2000-08-22 14:44:17 -03:00
Roberto Ierusalimschy
bd39db46ed
details
2000-08-21 11:34:43 -03:00
Roberto Ierusalimschy
90fb2e18e8
pushref' is more efficient (and probably more useful) than getref'.
2000-08-17 10:18:01 -03:00
Roberto Ierusalimschy
4365c31c89
new name for globaltable.
2000-08-15 17:14:27 -03:00
Roberto Ierusalimschy
44eb7d91ac
comments
2000-08-15 15:28:48 -03:00
Roberto Ierusalimschy
ddc8d94a08
new name for `lua_[sg]etglobaltable'
2000-08-14 16:18:14 -03:00
Roberto Ierusalimschy
5d9cbdadfb
cannot run symbolic execution for non-active functions
2000-08-14 14:59:20 -03:00
Roberto Ierusalimschy
58453dc1e1
small bug in symbolic execution
2000-08-14 14:46:27 -03:00
Roberto Ierusalimschy
f555e493f0
lua_state may not exist
2000-08-14 14:46:07 -03:00
Roberto Ierusalimschy
d1ffd1a1c5
details
2000-08-14 14:45:59 -03:00
Roberto Ierusalimschy
9e84bf18db
still more debug information
2000-08-11 13:17:28 -03:00
Roberto Ierusalimschy
daf09c476f
still better error messages
2000-08-10 16:50:47 -03:00
Roberto Ierusalimschy
e238efc536
default now is multi-state
2000-08-09 16:16:57 -03:00
Roberto Ierusalimschy
fdd04e7a7f
first version of manual for 4.0 beta
2000-08-09 16:09:20 -03:00
Roberto Ierusalimschy
fb55c96706
obsolete module; not part of the oficial distribution
2000-08-09 11:50:13 -03:00
Roberto Ierusalimschy
c39bec81dc
bug: lastpc was not initialized
2000-08-09 11:49:41 -03:00
Roberto Ierusalimschy
5f22f8961c
better code for unary/binary operators
2000-08-09 11:49:13 -03:00
Roberto Ierusalimschy
a7c1390ffa
syntax "function foo (...)" can be nested
2000-08-08 17:48:55 -03:00
Roberto Ierusalimschy
0802a9df9e
no more options for debug information: it is always on
2000-08-08 17:42:07 -03:00
Roberto Ierusalimschy
f90bc248b3
new structure for line information
2000-08-08 15:26:05 -03:00
Roberto Ierusalimschy
d9e61e8cea
new algorithm for traversing in GC to avoid deep recursion calls
2000-08-07 17:21:34 -03:00
Roberto Ierusalimschy
397905ef86
(much) better handling of memory alloction errors
2000-08-07 15:39:16 -03:00
Roberto Ierusalimschy
435f587ed0
(much) better handling of memory alloction errors
2000-08-04 16:38:35 -03:00
Roberto Ierusalimschy
ae55f3eead
no varargs in Lua API
2000-06-30 16:17:08 -03:00
Roberto Ierusalimschy
cfba572076
remove dummy argument in LUA_ASSERT
2000-06-30 11:35:17 -03:00
Roberto Ierusalimschy
aa01d2568d
symbolic execution must handle return and tailcall
2000-06-30 11:29:35 -03:00
Roberto Ierusalimschy
014a09c509
better error messages
2000-06-28 17:21:06 -03:00
Roberto Ierusalimschy
b622282973
local is valid only after adjust
2000-06-28 14:06:07 -03:00
Roberto Ierusalimschy
7f867eb0b9
tests for locals and line numbers
2000-06-28 14:06:07 -03:00
Roberto Ierusalimschy
5362426ffa
error message
2000-06-28 14:03:56 -03:00
Roberto Ierusalimschy
906434011f
better (?) treatment for 16-bit machines
2000-06-28 14:03:32 -03:00
Roberto Ierusalimschy
c07cebbbf6
details
2000-06-27 16:00:36 -03:00
Roberto Ierusalimschy
afef009fce
new version of debug system
2000-06-26 16:28:31 -03:00
Roberto Ierusalimschy
b69e712713
new way to generate SETLINEs
2000-06-21 15:13:56 -03:00
Roberto Ierusalimschy
f517759507
details
2000-06-21 14:05:49 -03:00
Roberto Ierusalimschy
52062684e1
better control over use of `errno'
2000-06-20 14:13:21 -03:00
Roberto Ierusalimschy
83e3ec0117
no more labels
2000-06-19 15:26:23 -03:00
Roberto Ierusalimschy
feb2083730
better control of source name
2000-06-19 15:05:14 -03:00
Roberto Ierusalimschy
8d2baf719c
comment
2000-06-19 15:04:41 -03:00
Roberto Ierusalimschy
88657809ac
details
2000-06-19 10:15:15 -03:00
Roberto Ierusalimschy
2e1b32d873
optimizations for "while 1", "until nil", and the like
2000-06-16 14:51:40 -03:00
Roberto Ierusalimschy
89a3ec08f3
function lua_userinit is used only in single-state mode (by lua.c)
2000-06-16 14:22:43 -03:00
Roberto Ierusalimschy
e3ea307434
small changes to allow redefinition of some buffer sizes.
2000-06-16 14:16:34 -03:00
Roberto Ierusalimschy
18b0e8270d
32 characteres are more than enough for a good hash
2000-06-15 14:01:12 -03:00
Roberto Ierusalimschy
094880ef9e
details
2000-06-12 11:37:18 -03:00
Roberto Ierusalimschy
1de5587184
`lua.h' is included before any other Lua header file
2000-06-12 10:52:05 -03:00
Roberto Ierusalimschy
8ca9534d04
access to `values' in TObject always through macros
2000-06-08 15:27:13 -03:00
Roberto Ierusalimschy
8bcf622876
new signature for `luaH_set'
2000-06-06 13:31:41 -03:00
Roberto Ierusalimschy
dbbf6c073b
0 (in MAX_SIZET) may be shorter than size_t
2000-06-06 13:27:11 -03:00
Roberto Ierusalimschy
292c953018
new auxiliar function `luaH_setstr'
2000-06-05 17:15:33 -03:00
Roberto Ierusalimschy
c542aac0b9
collect dead indices in tables
2000-06-05 17:07:53 -03:00
Roberto Ierusalimschy
dbfb810267
cleansing of lparser.c
2000-06-05 11:56:18 -03:00
Roberto Ierusalimschy
9c14b5e416
new test function to list strings from a function
2000-06-02 16:10:01 -03:00
Roberto Ierusalimschy
6b9bf49265
better to keep foreach' and foreachi'.
2000-06-02 16:08:56 -03:00
Roberto Ierusalimschy
989ad7232a
changed to test macros for single-state use
2000-06-02 14:06:42 -03:00
Roberto Ierusalimschy
190c3be739
details
2000-05-31 13:53:30 -03:00
Roberto Ierusalimschy
7e30900def
better field name
2000-05-30 16:00:31 -03:00
Roberto Ierusalimschy
f63d7753b8
files are closed when collected (again)
2000-05-30 15:55:16 -03:00
Roberto Ierusalimschy
50a82ec1b9
gc tag methods for udata are called in (reverse) tag order
2000-05-30 15:54:49 -03:00
Roberto Ierusalimschy
ed1751bc32
details
2000-05-29 11:48:03 -03:00
Roberto Ierusalimschy
8e617985fa
functions for...' and raw...' are obsolete now
2000-05-26 16:17:57 -03:00
Roberto Ierusalimschy
c39345fba3
no more pragmas
2000-05-26 11:04:04 -03:00
Roberto Ierusalimschy
ed94a85f0c
type details
2000-05-25 16:02:21 -03:00
Roberto Ierusalimschy
58fbdc76d5
better implementation for looh-ahead
2000-05-25 15:59:59 -03:00
Roberto Ierusalimschy
a301304612
accepts `$debug' in the middle of a function.
2000-05-25 15:26:42 -03:00
Roberto Ierusalimschy
677313da32
bug: record-constructor starting with an upvalue name gets an error
2000-05-24 15:04:17 -03:00
Roberto Ierusalimschy
ef62b340e0
code cleaner for 16 bits.
2000-05-24 10:54:49 -03:00
Roberto Ierusalimschy
5c2dd7a9e0
array `luaK_opproperties' keeps delta stack and mode for each opcode
2000-05-22 15:44:46 -03:00
Roberto Ierusalimschy
93d93a0bfb
first implementation of `for' over tables
2000-05-15 16:48:04 -03:00
Roberto Ierusalimschy
9e1f94fc1c
cannot change value of private locals (used to implement `for')
2000-05-15 16:30:41 -03:00
Roberto Ierusalimschy
8714cc02d6
`getinfo' gets information about non-active functions, too.
2000-05-12 16:49:18 -03:00
Roberto Ierusalimschy
69b45bb4e9
changes by lhf
2000-05-12 16:19:18 -03:00
Roberto Ierusalimschy
843f84f4ce
first element in a list constructor is not adjusted to one value.
2000-05-12 15:12:04 -03:00
Roberto Ierusalimschy
b803c0600e
details
2000-05-11 15:57:19 -03:00
Roberto Ierusalimschy
8ac0bbf64b
new option `-c' to close lua.
2000-05-10 14:00:21 -03:00
Roberto Ierusalimschy
dc1e4f5073
missing define for `lua_dobuffer' single-state
2000-05-10 13:35:18 -03:00
Roberto Ierusalimschy
330e51bed3
string hash uses one single hash table
2000-05-10 13:33:20 -03:00
Roberto Ierusalimschy
44b71ca816
defines for _ERRORMESSAGE and _ALERT
2000-05-09 11:50:16 -03:00
Roberto Ierusalimschy
bad6365540
details
2000-05-08 17:49:05 -03:00
Roberto Ierusalimschy
91f34fb05c
lua.h should not use names without prefix lua_ (`TObject', for instance)
2000-05-08 16:37:10 -03:00
Roberto Ierusalimschy
11a7022067
global variables are stored in a Lua table
2000-05-08 16:32:53 -03:00
Roberto Ierusalimschy
35a6ed2838
detail (error message)
2000-05-08 15:46:34 -03:00
Roberto Ierusalimschy
cfe6ca819b
default for `getstack' is to get everything
2000-05-08 10:21:35 -03:00
Roberto Ierusalimschy
fe5c37ae95
BUG: `strfind' gets wrong subject length when there is an offset
2000-05-02 15:32:22 -03:00
Roberto Ierusalimschy
c31f02948f
[C++ Warning] lparser.c(326): W8066 Unreachable code.
...
[C++ Warning] lparser.c(486): W8004 'nargs' is assigned a value that is never used.
2000-04-27 14:39:56 -03:00
Roberto Ierusalimschy
c9f91c6fe3
[C++ Warning]: W8084 Suggest parentheses to clarify precedence.
2000-04-27 14:39:15 -03:00
Roberto Ierusalimschy
66d620674c
IntPoint does not need L
2000-04-26 10:43:25 -03:00
Roberto Ierusalimschy
84790bb953
"conceptual" bug
2000-04-26 10:43:10 -03:00
Roberto Ierusalimschy
534c3a64d3
small optimizations for table access
2000-04-25 13:55:09 -03:00
Roberto Ierusalimschy
b9c98cd4d9
entry for new version (4.0a)
2000-04-25 13:45:39 -03:00
Roberto Ierusalimschy
0e8855e171
final version (by lhf)
2000-04-25 13:44:31 -03:00
Roberto Ierusalimschy
2ae9c856cf
more uniform names
2000-04-24 18:05:11 -03:00
Roberto Ierusalimschy
c4409f69ab
details
2000-04-19 10:41:37 -03:00
Roberto Ierusalimschy
89a9c36281
no more `register' declarations: leave it to the compiler.
2000-04-19 10:36:25 -03:00
Roberto Ierusalimschy
8f2fba5877
using new constructs (for & break) in the examples and code fragments
2000-04-17 16:23:48 -03:00
Roberto Ierusalimschy
62824137d6
no more `seterrormethod' function
2000-04-17 16:23:12 -03:00
Roberto Ierusalimschy
71219ccc39
simpler version of `luaK_tostack'
2000-04-17 11:05:34 -03:00
Roberto Ierusalimschy
870f61d299
code redistribution
2000-04-14 15:12:35 -03:00
Roberto Ierusalimschy
c845ec777a
new order for modules (better locality??)
2000-04-14 14:52:09 -03:00
Roberto Ierusalimschy
e408cf61a2
new version number
2000-04-14 14:48:20 -03:00
Roberto Ierusalimschy
4e90768635
lots of changes (almost ready for 4.0)
2000-04-14 14:47:55 -03:00
Roberto Ierusalimschy
c1666a13e3
better code organization
2000-04-14 14:47:24 -03:00
Roberto Ierusalimschy
e02750ec60
new type for CFunction (for "pure" C)
2000-04-14 14:46:37 -03:00
Roberto Ierusalimschy
0b56646baf
new function `getargs'
2000-04-14 14:46:29 -03:00
Roberto Ierusalimschy
634c3d57e9
optimization for SETLOCAL was too specific.
2000-04-14 14:46:15 -03:00
Roberto Ierusalimschy
4aa9ad6514
functions must return explicit `nil' on failure
2000-04-14 14:44:20 -03:00
Roberto Ierusalimschy
d76b1a0eef
base' for tonumber' must be >= 2.
2000-04-13 15:08:18 -03:00
Roberto Ierusalimschy
e7c8393682
optimization INCLOCAL is not necessary, with `for'
2000-04-13 13:51:01 -03:00
Roberto Ierusalimschy
ceaa97ff5b
tonumber must return `nil' when convertion fails.
2000-04-13 13:46:43 -03:00
Roberto Ierusalimschy
2bb77cdaed
keep opcodes in the right order
2000-04-12 16:56:50 -03:00
Roberto Ierusalimschy
f9cf402fbd
first implementation of FOR
2000-04-12 15:57:19 -03:00
Roberto Ierusalimschy
0c3fe2c44b
comment
2000-04-12 15:47:03 -03:00
Roberto Ierusalimschy
0433e42023
no more repeat ... end.
2000-04-11 15:37:18 -03:00
Roberto Ierusalimschy
0810bc707f
new syntax: |label|
2000-04-10 16:21:14 -03:00
Roberto Ierusalimschy
c3b73cbeb8
comments (detail)
2000-04-10 16:20:24 -03:00
Roberto Ierusalimschy
1eabd0549e
comments
2000-04-07 16:35:31 -03:00
Roberto Ierusalimschy
54dd5cc7fd
reorganization of lcode.c
2000-04-07 16:35:20 -03:00
Roberto Ierusalimschy
031978798c
more optimizations
2000-04-07 10:13:11 -03:00
Roberto Ierusalimschy
14251c5a56
name changes + new operation - old operation
2000-04-07 10:12:50 -03:00
Roberto Ierusalimschy
42130ed712
name changes
2000-04-07 10:11:49 -03:00
Roberto Ierusalimschy
d615e78e08
new optimization: jumps to jumps
2000-04-06 14:36:52 -03:00
Roberto Ierusalimschy
c6965ce551
new functions: disassembler and get limit.
2000-04-06 14:35:23 -03:00
Roberto Ierusalimschy
22329e4cdf
implementation of BREAK
2000-04-05 14:51:58 -03:00
Roberto Ierusalimschy
9f734094f9
`nil' is optional for next and nextvar (and is not for tonumber & tag).
2000-04-04 17:49:32 -03:00
Roberto Ierusalimschy
4e7e9e8de5
new opcode INCLOCAL.
2000-04-04 17:48:44 -03:00
Roberto Ierusalimschy
3e45496295
syntactical details
2000-04-03 10:44:55 -03:00
Roberto Ierusalimschy
e30327728c
BUG: tostring() without arguments gives seg. fault.
2000-04-03 10:20:33 -03:00
Roberto Ierusalimschy
36e1390631
details.
2000-03-31 13:28:45 -03:00
Roberto Ierusalimschy
8f0f54ec38
name change
2000-03-30 17:55:50 -03:00
Roberto Ierusalimschy
556a89e537
new names for debug types
2000-03-30 14:19:48 -03:00
Roberto Ierusalimschy
e2c60eda16
`luaT_validevent' is exported, because compatibility module for fallbacks
...
uses it.
2000-03-30 13:41:51 -03:00
Roberto Ierusalimschy
a69356e9e0
no more special cases for closures with 0 upvalues (performance is the same,
...
memory use a little higher, code much simpler).
2000-03-29 17:19:20 -03:00
Roberto Ierusalimschy
b53dc0c485
TAG_ARRAY -> TAG_TABLE
2000-03-27 17:10:21 -03:00
Roberto Ierusalimschy
63e230a16b
comments
2000-03-27 17:08:33 -03:00
Roberto Ierusalimschy
102a1be615
no more support for gc TM for tables
2000-03-27 17:08:02 -03:00
Roberto Ierusalimschy
4c03196697
lua_setstate makes no sense with explicit multiple states
2000-03-27 11:00:35 -03:00
Roberto Ierusalimschy
54633d7c7d
new name for llimits.h
2000-03-24 16:49:23 -03:00
Roberto Ierusalimschy
13578517c7
new file to keep all limits and instalation-dependent definitions
2000-03-24 14:26:08 -03:00
Roberto Ierusalimschy
213e9febc8
limits now are in `llims.n'
2000-03-24 14:26:08 -03:00
Roberto Ierusalimschy
47b4bf5964
small refactoring.
2000-03-24 09:18:30 -03:00
Roberto Ierusalimschy
415ee1a24f
SETLINEs for reserved words, too.
2000-03-24 09:17:53 -03:00
Roberto Ierusalimschy
5f3c5ace95
message detail
2000-03-22 13:24:13 -03:00
Roberto Ierusalimschy
441469f803
new option `-s' + argv ends with NULL (so we don't need argc).
2000-03-20 17:27:32 -03:00
Roberto Ierusalimschy
1157c2a7e4
better(?) treatment for SETLINE + while optimization is too complex for
...
only 3% of maximum improvement.
2000-03-20 16:15:37 -03:00
Roberto Ierusalimschy
374cc888f4
better(?) treatment for SETLINE
2000-03-20 16:15:37 -03:00
Roberto Ierusalimschy
bb9605bbc9
tags can be positive values
2000-03-20 16:14:54 -03:00
Roberto Ierusalimschy
6759299880
new implementation for handling I/O tags + setglobal TM for tracing
...
changes in _INPUT/_OUTPUT
2000-03-20 16:13:45 -03:00
Roberto Ierusalimschy
da7eb34cd6
optimization for "while 1" and "repeat until nil"
2000-03-17 11:46:04 -03:00
Roberto Ierusalimschy
2c8e28d75a
small changes
2000-03-17 10:09:46 -03:00
Roberto Ierusalimschy
4fb8e93c36
small optimization for i..''
2000-03-17 10:09:12 -03:00
Roberto Ierusalimschy
7f77431950
detail
2000-03-16 18:06:16 -03:00
Roberto Ierusalimschy
87367e97f3
more information about memory use
2000-03-16 17:35:07 -03:00
Roberto Ierusalimschy
06f08f5634
small problems with limits and jumps
2000-03-16 15:03:09 -03:00
Roberto Ierusalimschy
3860c5934e
details.
2000-03-15 17:50:33 -03:00
Roberto Ierusalimschy
f0b697e01c
details
2000-03-13 17:37:16 -03:00
Roberto Ierusalimschy
73aa465a8e
some name changes
2000-03-10 15:37:44 -03:00
Roberto Ierusalimschy
3d0577f4b9
small optimizations.
2000-03-10 11:38:10 -03:00
Roberto Ierusalimschy
977b8f65f0
comment detail.
2000-03-10 11:01:05 -03:00
Roberto Ierusalimschy
e3cf93ddb6
first implementation of "threaded code" for boolean operations
2000-03-09 10:57:37 -03:00
Roberto Ierusalimschy
88b306f495
some optimizations
2000-03-08 21:19:22 -03:00
Roberto Ierusalimschy
563de491be
a better way to control optimizations.
2000-03-04 17:18:15 -03:00
Roberto Ierusalimschy
29e0193425
details
2000-03-03 17:30:47 -03:00
Roberto Ierusalimschy
61f97a8ace
maybe a concat right associative allows some optimizations...
2000-03-03 17:29:25 -03:00
Roberto Ierusalimschy
d1ea38580a
change of code generation design (independent functions for each opcode)
2000-03-03 15:53:17 -03:00
Roberto Ierusalimschy
3c9d999424
many details (most by lhf).
2000-03-03 11:58:26 -03:00
Roberto Ierusalimschy
f7840a3e0b
new algorithm to parse expressions + distribution of code between lparser
...
and lcode.
2000-03-03 09:33:59 -03:00
Roberto Ierusalimschy
1780e2c977
lua_settable should check stack space (it could call a T.M.)
2000-03-02 09:44:29 -03:00
Roberto Ierusalimschy
fa14cbf8e8
comments
2000-03-02 09:32:53 -03:00
Roberto Ierusalimschy
4d4e6f07c0
all order operators use a single tag method (<)
2000-02-22 16:12:46 -02:00
Roberto Ierusalimschy
5cecf0ea9f
it is better to control stack space where it is needed.
2000-02-22 15:54:16 -02:00
Roberto Ierusalimschy
3bc925138e
first version of code optimizer
2000-02-22 11:31:43 -02:00
Roberto Ierusalimschy
39e1f079bd
code generator (and optimizer) for Lua
2000-02-22 11:31:19 -02:00
Roberto Ierusalimschy
075da266e5
there is no need to use shorts...
2000-02-21 16:33:26 -02:00
Roberto Ierusalimschy
228a62f799
details
2000-02-21 16:30:42 -02:00
Roberto Ierusalimschy
7c2fb15bec
need "string.h" to use "strchr".
2000-02-21 16:30:06 -02:00
Roberto Ierusalimschy
1f01998516
nobody uses memmove any more.
2000-02-17 16:30:36 -02:00
Roberto Ierusalimschy
c929376d59
must include a definition for NULL
2000-02-17 16:30:36 -02:00
Roberto Ierusalimschy
3afe85b2ce
new version for INSTRUCTION formats
2000-02-14 14:51:08 -02:00
Roberto Ierusalimschy
52aad0ab59
removing implementation for better error messages (must rethink it...)
2000-02-11 14:52:54 -02:00
Roberto Ierusalimschy
74f1c3d025
small changes for "clean C"
2000-02-08 14:39:42 -02:00
Roberto Ierusalimschy
1f691a4fcd
renaming of some opcodes and fields
2000-01-28 14:53:00 -02:00
Roberto Ierusalimschy
d6b9f49aaf
only need to reset buffer for strings, numbers, and names.
2000-01-26 16:51:49 -02:00
Roberto Ierusalimschy
d83c2a8455
performance details.
2000-01-25 16:44:21 -02:00
Roberto Ierusalimschy
d11e5adf55
`const' array in protos breaked in 3 arrays (for strings, numbers, and
...
prototypes).
2000-01-25 11:57:18 -02:00
Roberto Ierusalimschy
99e340b2ba
keep `top' in registers when running basic tasks (settable, getglobal, ...)
2000-01-24 18:14:07 -02:00
Roberto Ierusalimschy
9744255ae9
error in call must be propagated
2000-01-24 18:11:26 -02:00
Roberto Ierusalimschy
512b15b601
small optimizations (relational operators)
2000-01-19 14:50:30 -02:00
Roberto Ierusalimschy
33d3504889
new debug API
2000-01-19 14:50:14 -02:00
Roberto Ierusalimschy
2877bad4c2
new debug API (first version)
2000-01-19 10:00:45 -02:00
Roberto Ierusalimschy
27163f032e
Auxiliary functions from Debug Interface module
2000-01-14 15:15:44 -02:00
Roberto Ierusalimschy
eab57ed6fd
details
2000-01-13 14:30:47 -02:00
Roberto Ierusalimschy
ea45f3eb28
better separation between debug code and regular code
2000-01-13 14:30:47 -02:00
Roberto Ierusalimschy
46ec57cbc6
little change when calling tag methods
2000-01-13 13:56:03 -02:00
Roberto Ierusalimschy
62787f1b1f
`exp' is "reserved word" in Visual-C++ ;-)
2000-01-12 14:24:39 -02:00
Roberto Ierusalimschy
dcb7bb514e
details (error messages)
2000-01-10 15:34:38 -02:00
Roberto Ierusalimschy
b3aaa048b0
bug: cannot reopen stdin (for binary mode)
1999-12-30 16:40:57 -02:00
Roberto Ierusalimschy
aee07c6599
details
1999-12-30 16:29:46 -02:00
Roberto Ierusalimschy
bcdbdaccc3
more debug information (still with bug for tag methods...)
1999-12-30 16:28:40 -02:00
Roberto Ierusalimschy
5cafe5af02
tag method must be a function
1999-12-30 16:27:03 -02:00
Roberto Ierusalimschy
607012ece1
tag method must be a function
...
+ error message must be a string
1999-12-30 16:27:03 -02:00
Roberto Ierusalimschy
0652906e7a
details.
1999-12-30 10:40:29 -02:00
Roberto Ierusalimschy
4d1b815b60
return gives wrong line in debug information.
1999-12-29 16:07:10 -02:00
Roberto Ierusalimschy
4ebc183e56
bug: return gives wrong line in debug information.
1999-12-29 16:07:10 -02:00
Roberto Ierusalimschy
298d0abff7
first version of extra debug information (NAME)
1999-12-29 14:31:15 -02:00
Roberto Ierusalimschy
4fbe775154
details
1999-12-29 14:24:03 -02:00
Roberto Ierusalimschy
aabefe9d68
details.
1999-12-28 17:23:41 -02:00
Roberto Ierusalimschy
fb60283974
better error messages
1999-12-28 09:52:49 -02:00
Roberto Ierusalimschy
acdb0b741e
comments.
1999-12-27 15:33:22 -02:00
Roberto Ierusalimschy
5b08fcd5a1
no more "lua" in error messages
1999-12-27 11:04:53 -02:00
Roberto Ierusalimschy
b1b0c219f5
new ttypes to distinguish between C closures and Lua closures.
1999-12-23 16:19:57 -02:00
Roberto Ierusalimschy
be3212de78
details
1999-12-22 14:58:36 -02:00
Roberto Ierusalimschy
2eaf9a00ae
little bug: `1ea' got a wrong token at the error message
1999-12-22 14:58:36 -02:00
Roberto Ierusalimschy
6c79a0a80d
new way to control hooks inside hooks (now the control is done inside Lua)
1999-12-21 16:04:41 -02:00
Roberto Ierusalimschy
3daeabb606
new way to pass arguments: with option `-f'
1999-12-21 15:34:23 -02:00
Roberto Ierusalimschy
cfdebfbc53
debug information for parameters use line 0 for them (as they are
...
always visible).
1999-12-21 15:31:28 -02:00
Roberto Ierusalimschy
d61d5bef9d
details
1999-12-20 11:10:38 -02:00
Roberto Ierusalimschy
4450efc97e
new chunkid for C functions (`luaL_chunkid')
1999-12-20 11:09:45 -02:00
Roberto Ierusalimschy
de65253f2d
new way to handle _PROMPT
1999-12-20 11:03:20 -02:00
Roberto Ierusalimschy
12b45c2df2
luaS_newfixedstring renamed to luaS_newfixed
1999-12-14 16:42:57 -02:00
Roberto Ierusalimschy
1b15206cf9
many details + code redistribution
1999-12-14 16:33:29 -02:00
Roberto Ierusalimschy
e6d56cd2d8
module for internal use only, with functions for internal tests
1999-12-14 16:31:20 -02:00
Roberto Ierusalimschy
c16c63cc59
new module with the debug API functions
1999-12-14 16:31:20 -02:00
Roberto Ierusalimschy
dea54a7c71
comments
1999-12-09 18:01:48 -02:00
Roberto Ierusalimschy
544eeb1f9c
details
1999-12-07 10:05:34 -02:00
Roberto Ierusalimschy
b3fe203c36
keep it simple
1999-12-07 10:05:34 -02:00
Roberto Ierusalimschy
9c142740c1
stack may not be empty after a correct run...
1999-12-07 09:42:54 -02:00
Roberto Ierusalimschy
7621cc2aa5
for the future...
1999-12-07 09:36:16 -02:00
Roberto Ierusalimschy
ba1f504970
`optimization' doesn't seem to make any difference...
1999-12-06 17:30:53 -02:00
Roberto Ierusalimschy
617be66015
better control (and error recovery) for begin/end blocks
1999-12-06 10:03:45 -02:00
Roberto Ierusalimschy
f356eb010b
configurable stack size + some corrections in error recovery in
...
`protectedrun'
1999-12-06 09:43:58 -02:00
Roberto Ierusalimschy
3e38fd2463
`lua_setfallback' leaves things on the stack, so it is better to protect
...
it.
1999-12-06 09:43:09 -02:00
Roberto Ierusalimschy
533beedad2
new tests for begin/end blocks and multi-state
1999-12-06 09:42:18 -02:00
Roberto Ierusalimschy
968ad49da6
`lua_newstate' gets the inital stack size and other arguments
1999-12-06 09:41:28 -02:00
Roberto Ierusalimschy
1fdb445e7d
details.
1999-12-06 09:40:55 -02:00
Roberto Ierusalimschy
c7119a93f0
new language for testC (debugging facility)
1999-12-03 16:02:54 -02:00
Roberto Ierusalimschy
3c9e29f56d
details
1999-12-03 09:26:23 -02:00
Roberto Ierusalimschy
72afb6debb
modifications by lhf
1999-12-02 17:11:51 -02:00
Roberto Ierusalimschy
b097076678
missing include
1999-12-02 14:41:29 -02:00
Roberto Ierusalimschy
8223ff473f
lua_Object is a pointer to the stack (because now the stack doen't move)
1999-12-02 14:24:45 -02:00
Roberto Ierusalimschy
fe237ad808
fixed stack; first version.
1999-12-01 17:50:08 -02:00
Roberto Ierusalimschy
3181dfefee
details
1999-11-30 11:06:50 -02:00
Roberto Ierusalimschy
764e095d7f
object' and string' are very busy names...
1999-11-29 17:31:29 -02:00
Roberto Ierusalimschy
2b3ea61342
mistake in change for multi-state (gc threshold was not corrected)
1999-11-29 17:12:07 -02:00
Roberto Ierusalimschy
49af08e3e7
new name for lua_equal(obj); LUA_NOOBJECT is equal to LUA_NOOBJECT
1999-11-29 17:11:36 -02:00
Roberto Ierusalimschy
c5fa0895e9
table sizes don't need to be primes; power of 2 gives the same performance.
1999-11-29 14:38:48 -02:00
Roberto Ierusalimschy
d015f1fc02
table sizes don't need to be primes; power of 2 gives the same performance.
1999-11-26 16:59:20 -02:00
Roberto Ierusalimschy
790690a223
new way to keep function arguments (with StkId instead of copy)
1999-11-26 16:53:03 -02:00
Roberto Ierusalimschy
33b8a01032
new way to code CALLs + passing multiple arguments between function calls
1999-11-25 16:59:43 -02:00
Roberto Ierusalimschy
d29ce75737
new signature for function luaD_call (old luaD_calln)
1999-11-25 16:58:51 -02:00
Roberto Ierusalimschy
878ef96127
comment
1999-11-25 16:44:02 -02:00
Roberto Ierusalimschy
e5743adb21
macros key', val', and `node' don't need the state
1999-11-23 11:58:02 -02:00
Roberto Ierusalimschy
514783de9d
simpler without `init_hash'
1999-11-22 16:24:50 -02:00
Roberto Ierusalimschy
7d1499ba88
new macro luaL_openl
1999-11-22 15:39:51 -02:00
Roberto Ierusalimschy
29ede6aa13
first implementation of multiple states (reentrant code).
1999-11-22 11:12:07 -02:00
Roberto Ierusalimschy
951897c093
last warnings in Visual C
1999-11-16 10:50:48 -02:00
Roberto Ierusalimschy
a34677e4f4
details
1999-11-12 11:54:44 -02:00
Roberto Ierusalimschy
573372665a
new API function `lua_equalobj'
1999-11-11 15:02:40 -02:00
Roberto Ierusalimschy
a6755e2f1a
BUG: `strfind' does not handle \0 in plain search.
1999-11-11 14:45:04 -02:00
Roberto Ierusalimschy
a4628a02cf
better ways to test lock mechanism
1999-11-10 13:41:11 -02:00
Roberto Ierusalimschy
0c725b2492
buffer can shrink when too big
1999-11-10 13:40:46 -02:00
Roberto Ierusalimschy
d915cf4f9d
ways to measure number of `blocks' for GC + details
1999-11-10 13:39:35 -02:00
Roberto Ierusalimschy
53fb65d394
better implementation of `lua_ref' (much better...)
1999-11-10 13:37:50 -02:00
Roberto Ierusalimschy
a7fa7bafc8
new warnings with option "-W" (gcc)
1999-11-09 15:59:35 -02:00
Roberto Ierusalimschy
cde179b369
new implementation for global variable values (separated from strings)
1999-11-04 15:23:12 -02:00
Roberto Ierusalimschy
80b39d83c3
default `success' for exit is more useful.
1999-10-26 09:00:12 -02:00
Roberto Ierusalimschy
5a48255c9f
invariant tests over tables performed externally, through a built-in
...
function (when DEBUG is ion).
1999-10-26 08:53:40 -02:00
Roberto Ierusalimschy
bbab974717
details (comments)
1999-10-25 11:35:44 -02:00
Roberto Ierusalimschy
910836fb53
warnings from Visual C++
1999-10-19 11:33:22 -02:00
Roberto Ierusalimschy
8e7451512f
some more `const's
1999-10-14 17:46:57 -02:00
Roberto Ierusalimschy
4e9f2d13d5
new implementation of hash tables.
1999-10-14 17:13:31 -02:00
Roberto Ierusalimschy
b6ebbb2fee
better assertions.
1999-10-14 15:53:35 -02:00
Roberto Ierusalimschy
c5fee7615e
new implementation for string hashing, with chaining.
1999-10-11 14:13:42 -02:00
Roberto Ierusalimschy
cca78b5c71
Visual C++ warning
1999-10-11 14:06:01 -02:00
Roberto Ierusalimschy
d435b7acd8
read patterns are deprecated; new option `read(n)' to read n bytes.
1999-10-07 17:18:36 -02:00
Roberto Ierusalimschy
63ccf42397
new API function 'lua_type'.
1999-10-07 17:04:30 -02:00
Roberto Ierusalimschy
1942b58609
details
1999-10-05 16:33:43 -02:00
Roberto Ierusalimschy
4343420d4d
simplified version of `gc' tag method (only for userdata now).
1999-10-04 15:51:04 -02:00
Roberto Ierusalimschy
1f7103e05d
implementation of lua_ref (previously in module `lmem').
1999-10-04 15:50:24 -02:00
Roberto Ierusalimschy
dcc10accea
temporary version
1999-09-29 09:56:22 -03:00
Roberto Ierusalimschy
e2fc5aa684
checks table size only when element is a new one
1999-09-28 09:27:06 -03:00
Roberto Ierusalimschy
d53e2d2386
details
1999-09-27 15:00:25 -03:00
Roberto Ierusalimschy
cf9a22396c
"luaH_set" only needs to check size when key is new
1999-09-22 11:38:45 -03:00
Roberto Ierusalimschy
17374d2daa
`put_luaObjectonTop' must be public (to be used by lfback.c), and so
...
it must have a "public" name: `luaA_putObjectOnTop'
1999-09-21 13:10:13 -03:00
Roberto Ierusalimschy
04265655a8
compatibility with old fallback system now provided by external module
1999-09-20 11:57:29 -03:00
Roberto Ierusalimschy
e10788b2ff
reorganization of `stat' function.
1999-09-20 11:15:18 -03:00
Roberto Ierusalimschy
7eb2f18621
remove of some useless #includes
1999-09-17 13:53:54 -03:00
Roberto Ierusalimschy
a8a75fb7ab
details
1999-09-13 16:42:02 -03:00
Roberto Ierusalimschy
ae3ecc2d4a
tonumber'e1' and tonumber(' ', x), for x!=10, gave 0 instead of nil.
1999-09-08 17:45:18 -03:00
Roberto Ierusalimschy
2e13cd77ab
new interface for `luaO_strtod', which now checks signal, too.
1999-09-06 17:34:18 -03:00
Roberto Ierusalimschy
ff9c0da783
test first the most common case.
1999-09-06 17:19:22 -03:00
Roberto Ierusalimschy
f7fe04d4b7
details.
1999-09-06 12:24:46 -03:00
Roberto Ierusalimschy
82699d0c4f
new interface for `luaO_strtod', which now checks signal, too.
1999-09-06 10:55:09 -03:00
Roberto Ierusalimschy
88866208f0
luaL_arg_check' always has an extramsg'.
1999-09-06 10:13:03 -03:00
Roberto Ierusalimschy
7d365a5c7a
in the (old) expression << ls->fs->f->consts[checkname(ls)] >>, checkname
...
could realloc f->consts.
1999-09-02 10:13:22 -03:00
Roberto Ierusalimschy
52a206366d
bug: in the (old) expression << ls->fs->f->consts[checkname(ls)] >>, checkname
...
could realloc f->consts.
1999-09-02 10:13:22 -03:00
Roberto Ierusalimschy
b2c89ed2d2
new mechanism to access argv from a script
1999-08-18 14:40:54 -03:00
Roberto Ierusalimschy
2a03170ebd
random(0) and random(x,0) are wrong (0 is read as no argument!).
1999-08-18 11:40:51 -03:00
Roberto Ierusalimschy
05f55cc062
more warning checking (mainly related to const strings).
1999-08-17 17:21:52 -03:00
Roberto Ierusalimschy
c787dccd9b
"const" !!!
1999-08-16 17:52:00 -03:00
Roberto Ierusalimschy
b44e35b773
new constants LUA_NOREF and LUA_REFNIL.
1999-08-11 14:00:59 -03:00
Roberto Ierusalimschy
21843f022a
writeto, readfrom, and closefile must return an error code when
...
closing a file.
1999-08-10 10:05:16 -03:00
Roberto Ierusalimschy
900257e814
char-set may contain '%]'
1999-08-10 09:55:56 -03:00
Roberto Ierusalimschy
a82c8185bc
details
1999-08-10 09:55:47 -03:00
Roberto Ierusalimschy
4bbe0679a8
variables _INPUT and _OUTPUT should be read as rawglobal.
1999-07-22 16:35:50 -03:00
Roberto Ierusalimschy
438598aeea
details.
1999-07-22 16:35:41 -03:00
Roberto Ierusalimschy
e9a670695a
details
1999-07-22 16:29:42 -03:00
Roberto Ierusalimschy
16024861bd
new format for numbers in precompiled code (as strings)
1999-07-08 09:43:23 -03:00
Roberto Ierusalimschy
3f43aaa23f
new RedHat defines PI :-(
1999-07-07 14:54:08 -03:00
Roberto Ierusalimschy
3b4c831ca9
some systems do not reset signal handlers when a signal happens
1999-07-02 15:22:38 -03:00
Roberto Ierusalimschy
3fdab3981b
no more automatic setlocale.
1999-06-24 16:42:02 -03:00
Roberto Ierusalimschy
88b65da4d7
simplifications.
1999-06-23 10:48:39 -03:00
Roberto Ierusalimschy
521b38532a
better interfaces for luaD_calln (x luaD_call)
1999-06-22 17:37:23 -03:00
Roberto Ierusalimschy
36b6fe8d17
better treatment for arbitrary limits
1999-06-17 14:04:03 -03:00
Roberto Ierusalimschy
d4dce57f5c
cannot assign to unlimited variables, because it causes overflow in
...
the number of returns of a function.
1999-06-16 10:35:01 -03:00
Roberto Ierusalimschy
5c19ed2a13
bigger limit for number of local variables and upvalues
1999-06-16 10:22:04 -03:00
Roberto Ierusalimschy
5caf7f4a33
tremove erases its previous last element (to avoid locking potential
...
garbagge).
1999-05-27 17:21:03 -03:00
Roberto Ierusalimschy
3b533ea7c7
foreach, foreachi, foreachvar points to function in stack when stack
...
can be reallocated.
1999-05-24 14:53:49 -03:00
Roberto Ierusalimschy
995775e1cb
tighter control on the stack when debugging
1999-05-24 14:53:03 -03:00
Roberto Ierusalimschy
abfc885079
when debugging, move and erase old blocks to realloc.
1999-05-24 14:51:05 -03:00
Roberto Ierusalimschy
613b60c156
detail
1999-05-21 16:54:06 -03:00
Roberto Ierusalimschy
cdd0fe9946
some C compilers cannot initialize a local struct
1999-05-21 16:41:49 -03:00
Roberto Ierusalimschy
bc8619342a
better control of stack size (only for DEBUG).
1999-05-21 14:23:15 -03:00
Roberto Ierusalimschy
48326500d0
longer marks when controling memory leaks
1999-05-20 17:43:06 -03:00
Roberto Ierusalimschy
c8d219798a
lhf
1999-05-17 11:12:01 -03:00
Roberto Ierusalimschy
34695d4f4a
details (message text)
1999-05-14 09:24:20 -03:00
Roberto Ierusalimschy
924bbe020b
bigger limits
1999-05-14 09:24:04 -03:00
Roberto Ierusalimschy
3aa500b524
new pattern item '+'
1999-05-11 17:46:28 -03:00
Roberto Ierusalimschy
f1861ee210
no more beta
1999-05-11 17:29:19 -03:00
Roberto Ierusalimschy
705eae9fe4
there is no need for a size for Cblocks
1999-05-11 17:08:20 -03:00
Roberto Ierusalimschy
6eb1399a1c
array Cblocks should grow dynamically
1999-05-11 11:19:32 -03:00
Roberto Ierusalimschy
c390f73e3b
block must always have a power-of-2 size (even at the limit)
1999-05-11 11:18:40 -03:00
Roberto Ierusalimschy
73308c7605
warnings by clinio
1999-05-10 10:54:01 -03:00
Roberto Ierusalimschy
288fa05602
opcodes with LONGARG do not use byte variants.
1999-05-06 11:41:41 -03:00
Roberto Ierusalimschy
7808ea3a5f
new implementation for '*' in patterns + new option '+'
1999-05-05 16:23:11 -03:00
Roberto Ierusalimschy
732741b62f
cannot use (i=i+1)
1999-05-05 16:21:57 -03:00
Roberto Ierusalimschy
cc0f635ef7
'$' at end of pattern was matching regular '$', too.
1999-04-30 11:12:05 -03:00
Roberto Ierusalimschy
e64dbc390a
new version is beta.
1999-04-15 09:33:19 -03:00
Roberto Ierusalimschy
a0fd8d1787
manual for 3.2 beta should be the same one that for 3.2.
1999-04-14 17:47:12 -03:00
Roberto Ierusalimschy
d9d04a9274
"read_pattern" could lock when reading a lookahead from stdin.
1999-04-14 17:40:32 -03:00
Roberto Ierusalimschy
b4ad600b93
numbers are stored in ascii format for better portability and simplicity
1999-04-13 17:16:37 -03:00
Roberto Ierusalimschy
cb7f027380
IMtable must be initialized (and IMtable_size is not needed any more) due
...
to new way to handle growing vectors (previous modification).
1999-04-13 16:30:51 -03:00
Roberto Ierusalimschy
0bbd96bd5f
details.
1999-04-13 16:28:49 -03:00
Roberto Ierusalimschy
4eb67aa710
changes from lhf.
1999-04-07 13:40:04 -03:00
Roberto Ierusalimschy
0133610315
format for function prototypes.
1999-04-07 12:37:02 -03:00
Roberto Ierusalimschy
de04533dc0
better the old way, using upvalues to keep iotag.
1999-04-05 16:47:05 -03:00
Roberto Ierusalimschy
7c9aee64c2
new version by lhf.
1999-03-30 17:29:34 -03:00
Roberto Ierusalimschy
e0ff4e5d22
first version about Lua debug library.
1999-03-29 11:21:37 -03:00
Roberto Ierusalimschy
bf7f85d609
GC of files is tricky when Lua is being closed...
1999-03-26 10:48:26 -03:00
Roberto Ierusalimschy
a775a2d81a
check first whether function is global.
1999-03-26 10:14:00 -03:00
Roberto Ierusalimschy
e9aa98d594
do not generate SETLINE after main (it will be after last line)
1999-03-25 18:06:57 -03:00
Roberto Ierusalimschy
3e9c6a8a24
details
1999-03-25 18:05:05 -03:00
Roberto Ierusalimschy
1f4e2ba7b2
more precise debug information about local variables
1999-03-23 16:58:37 -03:00
Roberto Ierusalimschy
d6ff06751a
new functions openfile and closefile;
...
new way to keep file handle tags.
1999-03-16 17:07:54 -03:00
Roberto Ierusalimschy
7a11c7f8e4
details
1999-03-16 13:43:27 -03:00
Roberto Ierusalimschy
c454dc7bdd
no more if expressions.
1999-03-11 16:00:12 -03:00
Roberto Ierusalimschy
82ad0d5770
details
1999-03-11 15:59:19 -03:00
Roberto Ierusalimschy
256d1bea08
missing #include
1999-03-10 11:23:07 -03:00
Roberto Ierusalimschy
f2d35bdc78
format for file source is independent of "ldo".
1999-03-10 11:19:41 -03:00
Roberto Ierusalimschy
2679461637
no more assignment expressions (they don't fit in Lua...)
1999-03-10 11:09:45 -03:00
Roberto Ierusalimschy
0870a2d1d8
new opcode TAILCALL
1999-03-05 18:16:07 -03:00
Roberto Ierusalimschy
78edc241e9
details about debug info.
1999-03-05 17:45:01 -03:00
Roberto Ierusalimschy
e907c711c0
"feof" may be a macro.
1999-03-05 10:15:50 -03:00
Roberto Ierusalimschy
5a8bb00df4
storing chunk "sources" instead of "filenames".
1999-03-04 18:23:39 -03:00
Roberto Ierusalimschy
677188de8a
details.
1999-03-04 18:15:50 -03:00
Roberto Ierusalimschy
6233d21c9d
file stream cannot call fread after EOF.
1999-03-04 11:50:26 -03:00
Roberto Ierusalimschy
ab8ea5c38a
warnings
1999-03-01 17:22:16 -03:00
Roberto Ierusalimschy
ae9fd122fa
vector do not need to grow until MINSIZE
1999-03-01 14:49:13 -03:00
Roberto Ierusalimschy
da18ec5d54
warnings...
1999-03-01 14:49:04 -03:00
Roberto Ierusalimschy
038848eccd
better control of vector when DEBUGing
1999-02-26 12:50:10 -03:00
Roberto Ierusalimschy
b678e465a1
warnings in Solaris
1999-02-26 12:49:53 -03:00
Roberto Ierusalimschy
72d675aba7
macros "growvector" and "reallocvector" more compact
1999-02-26 12:48:55 -03:00
Roberto Ierusalimschy
ba57f7d946
details
1999-02-26 12:48:30 -03:00
Roberto Ierusalimschy
e63b542c9b
comments
1999-02-26 12:19:54 -03:00
Roberto Ierusalimschy
6a853fcb8b
details (from lhf)
1999-02-25 18:07:26 -03:00
Roberto Ierusalimschy
31bea2190b
small correction
1999-02-25 16:20:40 -03:00
Roberto Ierusalimschy
4b954e9b2e
details (from lhf)
1999-02-25 16:13:56 -03:00
Roberto Ierusalimschy
055823c04d
"L->Mbuffbase" is better kept as offset instead of pointer
1999-02-25 12:17:01 -03:00
Roberto Ierusalimschy
26d1e21c89
new way to handle "growing" vectors
1999-02-25 12:16:26 -03:00
Roberto Ierusalimschy
24a2c08145
details
1999-02-24 18:31:03 -03:00
Roberto Ierusalimschy
9d7bae0b6a
better instrumentation for internal debugging
1999-02-24 14:55:51 -03:00
Roberto Ierusalimschy
082aded149
warnings
1999-02-24 12:37:19 -03:00
Roberto Ierusalimschy
aa9c75c06e
no more EXTRALIBS (and new dependencies)
1999-02-23 12:01:29 -03:00
Roberto Ierusalimschy
f04c83e075
new function "lua_next" (+ new implementation for "next")
1999-02-23 11:57:28 -03:00
Roberto Ierusalimschy
c364e9f97e
LONGARGW (for completeness).
1999-02-23 10:38:38 -03:00
Roberto Ierusalimschy
e3a02e6a9c
comments
1999-02-22 16:23:36 -03:00
Roberto Ierusalimschy
d5feffdb60
new function lua_nextvar
1999-02-22 16:13:12 -03:00
Roberto Ierusalimschy
bb5627f3a4
better control over calls to _ALERT and _ERRORMESSAGE (to avoid error
...
loops)
1999-02-22 11:17:24 -03:00
Roberto Ierusalimschy
21107d7c2c
debug state is restored after a dofile/dostring
1999-02-22 10:51:44 -03:00
Roberto Ierusalimschy
b5cd7d426f
details
1999-02-19 15:33:35 -02:00
Roberto Ierusalimschy
bf6d2ccf92
details
1999-02-12 17:23:02 -02:00
Roberto Ierusalimschy
b82ff713e3
new name for opcode
1999-02-09 16:01:55 -02:00
Roberto Ierusalimschy
77113ee02f
new year for Copyright.
1999-02-09 13:59:22 -02:00
Roberto Ierusalimschy
ad6c7b0dd4
small corrections in opcodes.
1999-02-09 13:59:10 -02:00
Roberto Ierusalimschy
8b2d97d187
assignment expression may be multiple
1999-02-08 16:54:19 -02:00
Roberto Ierusalimschy
fb1cf6ab2d
clearer way to set tables.
1999-02-08 15:07:59 -02:00
Roberto Ierusalimschy
19ca2087de
another (silly) debuging function.
1999-02-08 14:29:35 -02:00
Roberto Ierusalimschy
7bdbd833b5
userdata and strings are kept in separate stringtables
1999-02-08 14:28:48 -02:00
Roberto Ierusalimschy
b22baf386d
Lua cannot have static variables.
1999-02-05 13:22:43 -02:00
Roberto Ierusalimschy
8fdd06ba3c
lots of new stuff from 3.2
1999-02-05 10:15:07 -02:00
Roberto Ierusalimschy
028ec00ab9
details
1999-02-05 09:22:58 -02:00
Roberto Ierusalimschy
1dcf1c9cbd
format "%s" may break limit of "sprintf" on some machines.
1999-02-04 17:29:51 -02:00
Roberto Ierusalimschy
76179a1014
compile option EXTRALIB for builtin functions that can be written in Lua.
1999-02-04 17:12:35 -02:00
Roberto Ierusalimschy
bdfab46c22
"errorim" now is _ERRORMESSAGE.
1999-02-04 16:59:31 -02:00
Roberto Ierusalimschy
5687949560
"lua_debug", "lua_callhook" and "lua_linehook" must be inside "lua_state".
1999-02-04 15:47:59 -02:00
Roberto Ierusalimschy
19de5b2205
new dependencies
1999-02-04 14:37:41 -02:00
Roberto Ierusalimschy
cbc58af260
new opcode for "long" arguments (3 bytes)
1999-02-04 14:36:16 -02:00
Roberto Ierusalimschy
80001ab0eb
getlocal cannot return the local itself, since lua_isstring and
...
lua_isnumber can modify it.
1999-02-03 14:42:42 -02:00
Roberto Ierusalimschy
ae29ab9858
only parser uses MAX_WORD
1999-02-03 11:53:48 -02:00
Roberto Ierusalimschy
27407fc1f5
new syntax: assignment expressions + better order for opcodes
1999-02-02 17:41:17 -02:00
Roberto Ierusalimschy
1a17da2ff9
opcodes with builtin parameters are too complicated for very little extra
...
performance.
1999-02-02 15:57:49 -02:00
Roberto Ierusalimschy
50248e440a
"if" expression leaves only one of its expressions on the stack
1999-02-02 11:47:31 -02:00
Roberto Ierusalimschy
0f0079f394
"if" expressions.
1999-02-01 16:52:05 -02:00
Roberto Ierusalimschy
68267ed878
negative numerals do not need a MINUSOPeration; go directly to contant
...
table.
1999-01-29 11:48:58 -02:00
Roberto Ierusalimschy
fd25d4ad85
no need to define functions for macros...
1999-01-26 13:38:01 -02:00
Roberto Ierusalimschy
2431534f10
details
1999-01-26 09:50:58 -02:00
Roberto Ierusalimschy
fd7d0774e5
luaH_set does the set and protect its value; luaH_move can then be a
...
macro.
New algorithm for double hashing (does not use "%").
1999-01-25 15:41:19 -02:00
Roberto Ierusalimschy
57ffc3f009
luaH_set does the set, and protects its value, so luaH_move can be a
...
macro.
1999-01-25 15:40:10 -02:00
Roberto Ierusalimschy
4a13f513f8
luaH_set does the set!
1999-01-25 15:39:28 -02:00
Roberto Ierusalimschy
13ad46b67d
uses the same double hashing that is used for tables
1999-01-25 15:38:04 -02:00
Roberto Ierusalimschy
1b45e967b4
table entries with ref=null always have val=null too.
1999-01-25 10:30:11 -02:00
Roberto Ierusalimschy
933bead92e
small optimizations(?)
1999-01-22 16:47:23 -02:00
Roberto Ierusalimschy
3314f49ec4
C cannot initialize a struct.
1999-01-22 16:46:11 -02:00
Roberto Ierusalimschy
bc930aa5ff
"free" usually handles NULL; handle non ANSI case separately.
1999-01-22 16:08:57 -02:00
Roberto Ierusalimschy
67b44c9493
local names are all in the constant pool, so they do not need to be
...
marked in GC.
1999-01-22 16:08:03 -02:00
Roberto Ierusalimschy
758a381644
"realloc" usually implements "malloc"; handle non ANSI case separately.
1999-01-22 15:28:00 -02:00
Roberto Ierusalimschy
eec31aaca5
<string.h> is needed because of "memcpy".
1999-01-21 16:38:39 -02:00
Roberto Ierusalimschy
595738f6fe
small optimizations
1999-01-20 18:22:06 -02:00
Roberto Ierusalimschy
b5eb4f3126
small optimization in getglobal
1999-01-15 11:14:24 -02:00
Roberto Ierusalimschy
3fecf187ff
names...
1999-01-15 11:11:57 -02:00
Roberto Ierusalimschy
54840fb256
new functions to manipulate C global variables
1999-01-15 11:11:22 -02:00
Roberto Ierusalimschy
e87fddf1ad
GC can be called during parsing, if needed.
1999-01-15 09:38:33 -02:00
Roberto Ierusalimschy
dea400bc1d
"getstack" returns func, too.
1999-01-15 09:36:28 -02:00
Roberto Ierusalimschy
fb663f768d
"%.16g" already formats integers as integers, so we do not need an
...
alternative "%ld" convertion in "tostring".
1999-01-13 17:09:04 -02:00
Roberto Ierusalimschy
e03767b3eb
details (comments)
1999-01-13 17:08:37 -02:00
Roberto Ierusalimschy
8396027516
better precision when converting numbers to strings.
1999-01-12 16:38:35 -02:00
Roberto Ierusalimschy
e24f7fd2d2
details
1999-01-11 18:23:54 -02:00
Roberto Ierusalimschy
8081f39dab
header missing.
1999-01-11 16:57:35 -02:00
Roberto Ierusalimschy
3cc4ca821e
initialization module (to load libraries)
1999-01-08 14:49:32 -02:00
Roberto Ierusalimschy
01772cefa5
new library for debbuging
1999-01-08 14:47:44 -02:00
Roberto Ierusalimschy
dc90d4bce3
when handling signals (^C), deep old hook values.
1999-01-06 11:12:41 -02:00
Roberto Ierusalimschy
f5bc671030
"goto" for tail recursion changed to "while"
1999-01-04 15:34:49 -02:00
Roberto Ierusalimschy
d7294c6de8
double hashing for string tables.
1999-01-04 11:37:29 -02:00
Roberto Ierusalimschy
63a752f961
small improvements.
1999-01-04 11:37:07 -02:00
Roberto Ierusalimschy
03d38b66fd
new sort algorithm.
1999-01-04 10:55:09 -02:00
Roberto Ierusalimschy
b9c9ccfbb4
function "move" for tables is better implemented with some "inside
...
information".
1999-01-04 10:54:33 -02:00
Roberto Ierusalimschy
b94110a68f
bug: "format" does not check size of format item (such as "%00000...00000d").
1999-01-04 10:53:24 -02:00
Roberto Ierusalimschy
8278468041
comments
1999-01-04 10:41:12 -02:00
Roberto Ierusalimschy
4fbb2531b3
don´t need the "+1", the "%" is enough to garantee r<1.
1998-12-30 19:23:26 -02:00
Roberto Ierusalimschy
59f8e6fb77
details ("settable")
1998-12-30 15:26:49 -02:00
Roberto Ierusalimschy
05d89b5c05
new option for function "random": random(a,b) returns a<=x<=b
1998-12-30 15:22:17 -02:00
Roberto Ierusalimschy
fe5c41fb8a
new functions "tinsert" and "tremove"
1998-12-30 11:16:50 -02:00
Roberto Ierusalimschy
9a45543841
tables are better manipulated via "Hash *" instead of "TObject" or
...
"lua_Object".
1998-12-30 11:14:46 -02:00
Roberto Ierusalimschy
766e67ef3b
to avoid warnings about "typecast" (Visual C++)
1998-12-28 11:44:54 -02:00
Roberto Ierusalimschy
4c94d8cc2c
new function "luaO_str2d" to convert strings to numbers, because
...
old "lex" algorithm had aproximation errors, but strtod (and atof
and scanf) are too slow.
1998-12-27 18:25:20 -02:00
Roberto Ierusalimschy
d2de2d5eda
format for double is always "%g", do not need #defines
1998-12-27 18:23:22 -02:00
Roberto Ierusalimschy
96a7695275
reorder and rename of most functions, for better documentation.
1998-12-27 18:22:36 -02:00
Roberto Ierusalimschy
63166c0ca0
new implementation of function "read", with predifined options.
1998-12-27 18:21:28 -02:00
Roberto Ierusalimschy
a881abfd1e
"strtod" is cleaner than "scanf" for this job.
1998-12-24 12:57:23 -02:00
Roberto Ierusalimschy
d3ac7075a2
better error message
1998-12-23 12:06:57 -02:00
Roberto Ierusalimschy
0c9080c7a9
"tonumber" goes crazy with negative numbers in other bases (not 10),
...
because "strtol" returns long, not unsigned long.
1998-12-18 11:26:43 -02:00
Roberto Ierusalimschy
b8fcb7b151
details
1998-12-15 13:21:09 -02:00
Roberto Ierusalimschy
5d6de9075d
"print" uses fputs instead of printf (easier to reimplement).
1998-12-15 12:59:59 -02:00
Roberto Ierusalimschy
21cff3015a
details (for regularity)
1998-12-15 12:59:43 -02:00
Roberto Ierusalimschy
5ca2709ba0
small warnings
1998-12-03 13:45:15 -02:00
Roberto Ierusalimschy
bb1cb7b9f1
NUMBER_FMT also may be predefined in makefile
1998-12-01 17:09:47 -02:00
Roberto Ierusalimschy
c64f36ab2b
better behavior for "strsub" when indices are out-of-range
1998-12-01 16:41:25 -02:00
Roberto Ierusalimschy
e4830ddce3
new option "mode" in "readfrom", "writeto" and "appendto" (for
...
binary files).
1998-11-20 13:41:43 -02:00
Roberto Ierusalimschy
758e330d6e
new functions "getn" and "foreachi"
1998-11-13 14:48:48 -02:00
Roberto Ierusalimschy
8e3bd752bb
small optimization in "sort" + new functions "getn" and "foreachi"
1998-11-13 14:39:18 -02:00
Roberto Ierusalimschy
a84bca67fc
bug: gsub/strfind do not check whether captures are properly finished.
1998-11-10 17:38:12 -02:00
Roberto Ierusalimschy
4ccfb2f9bc
"_TRIGMODE" was still being declared.
1998-09-08 16:25:35 -03:00
Roberto Ierusalimschy
ce9609296c
function "luaL_argerror" prints wrong argument number (from a user's point
...
of view) when functions have upvalues.
1998-09-07 15:59:59 -03:00
Roberto Ierusalimschy
b1450721be
new function "lua_nups" (number of upvalues).
1998-09-07 15:59:59 -03:00
Roberto Ierusalimschy
b04294d3d8
details.
1998-08-30 17:25:24 -03:00
Roberto Ierusalimschy
22c2704842
"lua_state" is already declared in lua.h, which is included here.
1998-08-30 15:28:58 -03:00
Roberto Ierusalimschy
ee22af5ced
new functions "seek" and "flush".
1998-08-24 17:14:56 -03:00
Roberto Ierusalimschy
cc117253c8
new implementation for error handling: on error, function _ERRORMESSAGE
...
is called, which in turn calls _ALERT to write a message to stderr.
1998-08-21 14:43:44 -03:00
Roberto Ierusalimschy
8e226e6a09
small bug: nuse may change when table is rehashed;
...
3/2 is a good fraction for hash limit (instead of 0.7, using floats)
1998-08-11 13:38:34 -03:00
Roberto Ierusalimschy
1d420c2c11
better error message for code too long (old one was misleading when the
...
problem was SETLINE after 64k lines...)
1998-08-11 10:28:05 -03:00
Roberto Ierusalimschy
5378331f2d
hash tables may shrink if use rate is too small.
1998-08-10 18:36:32 -03:00
Roberto Ierusalimschy
894a264671
new hash function.
1998-07-27 14:06:17 -03:00
Roberto Ierusalimschy
e1a127245d
details ("luaX_token2str" doesn't need LexState)
1998-07-24 15:02:38 -03:00
Roberto Ierusalimschy
afb5ef72e1
new function "sort" + many small changes
1998-07-12 13:16:43 -03:00
Roberto Ierusalimschy
1d8edd347d
small changes to use new auxiliar functions
1998-07-12 13:16:02 -03:00
Roberto Ierusalimschy
41d9ea948c
auxiliar functions "luaH_setint" & "luaH_getint".
1998-07-12 13:15:19 -03:00
Roberto Ierusalimschy
ee912e5a7f
auxiliar function "luaD_calln".
1998-07-12 13:14:34 -03:00
Roberto Ierusalimschy
ad446a0eb0
"%q" can handle strings with '\0'.
1998-07-12 13:13:45 -03:00
Roberto Ierusalimschy
176cb39feb
macro encapsulates de "-".
1998-07-12 13:11:55 -03:00
Roberto Ierusalimschy
64ad009fb2
"fileName" cannot be NULL
1998-07-12 13:10:38 -03:00
Roberto Ierusalimschy
dcb1a08906
"exp" changed to "exp0" to avoid problems with math.h.
1998-07-06 19:07:51 -03:00
Roberto Ierusalimschy
1788501eed
double constant used in integer expression
1998-07-06 19:04:58 -03:00
Roberto Ierusalimschy
bee1a5aeb2
spelling
1998-07-01 11:21:57 -03:00
Roberto Ierusalimschy
994aba062b
when debuging, blocks must be kept in double allignment.
1998-06-29 19:03:06 -03:00
Roberto Ierusalimschy
e869d17eb1
functions should return explicit "nil"s.
1998-06-29 15:24:06 -03:00
Roberto Ierusalimschy
9a0221ef58
detail
1998-06-29 15:09:28 -03:00
Roberto Ierusalimschy
07008b5d45
details (by lhf)
1998-06-25 13:48:44 -03:00
Roberto Ierusalimschy
8f31eda649
details in comments
1998-06-25 11:37:00 -03:00
Roberto Ierusalimschy
da94130160
stupid bug (in syntax print "hello")
1998-06-24 11:48:15 -03:00
Roberto Ierusalimschy
468fbdbde7
details
1998-06-24 10:33:00 -03:00
Roberto Ierusalimschy
eb45f8b631
details (dependencies)
1998-06-19 15:52:27 -03:00
Roberto Ierusalimschy
df0df08bc5
"dostring" accepts chunk name.
1998-06-19 15:47:06 -03:00
Roberto Ierusalimschy
9618aaf07d
small corrections in comments
1998-06-19 13:14:09 -03:00
Roberto Ierusalimschy
bec9bc4154
sugestions by lhf
1998-06-18 14:36:27 -03:00
Roberto Ierusalimschy
955a811aa1
category for "setlocale" is given by name
1998-06-18 14:04:28 -03:00
Roberto Ierusalimschy
c9902be294
"findname" moved from lobject.c to lauxlib.c (so libraries may use it).
1998-06-18 13:57:03 -03:00
Roberto Ierusalimschy
112c9d53ab
new version by lhf
1998-06-18 13:52:04 -03:00
Roberto Ierusalimschy
0789451458
details
1998-06-18 13:51:53 -03:00
Roberto Ierusalimschy
d97af0de26
"lua_dobuffer" gets an extra argument, with the chunk name
1998-06-15 18:34:14 -03:00
Roberto Ierusalimschy
1917149fdd
details.
1998-06-11 15:21:37 -03:00
Roberto Ierusalimschy
0845e73b6a
new copyright notice
1998-06-06 18:05:52 -03:00
Roberto Ierusalimschy
7dfa952091
no more error for '\x' (with "invalid" x)
1998-06-06 17:44:05 -03:00
Roberto Ierusalimschy
02134b4a87
name: lua_pushCclosure -> lua_pushcclosure.
1998-06-05 19:17:44 -03:00
Roberto Ierusalimschy
bdb1db4d37
"read" more efficient when reading lines and whole files ('.*')
1998-06-02 18:20:54 -03:00
Roberto Ierusalimschy
02a6891939
API for functions to manipulate global state.
1998-06-02 17:37:04 -03:00
Roberto Ierusalimschy
741c6f5006
'dobuffer' addpoted.
1998-05-31 19:22:00 -03:00
Roberto Ierusalimschy
6152973f9c
new names for 'ascii' ('strbyte') and 'int2str' ('strchar')
1998-05-31 19:20:45 -03:00
Roberto Ierusalimschy
243a808067
'print' now calls 'tostring'
1998-05-31 19:19:35 -03:00
Roberto Ierusalimschy
62c36a6056
better error message when '^' is not defined.
1998-05-31 19:18:24 -03:00
Roberto Ierusalimschy
74719afc33
new functions "frexp" and "ldexp"
1998-05-27 16:09:39 -03:00
Roberto Ierusalimschy
7e59a8901d
NEW LL(1) PARSER
1998-05-27 10:08:34 -03:00
Roberto Ierusalimschy
abc6eac404
new function "clock"
1998-05-20 19:21:35 -03:00
Roberto Ierusalimschy
054e0b888a
number type in Lua changed for double (by default).
1998-05-18 19:26:03 -03:00
Roberto Ierusalimschy
da252eeff7
arguments for "format" 'x', 'X', 'o' and 'u' must be unsigned int.
1998-05-18 19:21:55 -03:00
Roberto Ierusalimschy
9890bedaab
details (format for html)
1998-04-02 13:09:16 -03:00
Roberto Ierusalimschy
0a0c9593b8
many small corrections; strings with '\0'
1998-03-30 15:17:55 -03:00
Roberto Ierusalimschy
d470792517
words are stored in hi-lo order (easier to print)
1998-03-30 10:57:23 -03:00
Roberto Ierusalimschy
439236773b
changes by lhf
1998-03-26 11:50:19 -03:00
Roberto Ierusalimschy
2a2b64d6ac
opcode "CLOSURE" gets the prototipe (instead of a previous pushconstant)
1998-03-25 15:52:29 -03:00
Roberto Ierusalimschy
daa937c043
pattern-matching support for '\0'.
1998-03-24 17:14:25 -03:00
Roberto Ierusalimschy
21455162b5
details (and new escape sequences: \a, \b, ...)
1998-03-20 11:18:18 -03:00
Roberto Ierusalimschy
99cc4b20f2
details
1998-03-11 10:59:50 -03:00
Roberto Ierusalimschy
0969a971cd
better use of "ASSERT".
1998-03-09 18:49:52 -03:00
Roberto Ierusalimschy
be6d215f67
BUG: gsub('a', '(b?)%1*' ...) loops (because the capture is empty).
1998-03-09 15:28:08 -03:00
Roberto Ierusalimschy
e74817f8aa
correct way to handle string delimiters
1998-03-09 14:22:49 -03:00
Roberto Ierusalimschy
043c2ac258
new names for "lua_pushlstr" and "lua_getstrlen"
1998-03-06 15:47:42 -03:00
Roberto Ierusalimschy
88a2023c32
support for strings with '\0'
1998-03-06 13:54:42 -03:00
Roberto Ierusalimschy
5ef1989c4b
"settag" returns its first argument.
1998-02-12 17:27:10 -02:00
Roberto Ierusalimschy
f380d627f8
usefull macros also available as functions
1998-02-12 17:23:32 -02:00
Roberto Ierusalimschy
aafa106d10
implementation of numerical escape sequences in strings ("\12");
...
better error messages for wrong tokens
1998-02-11 18:56:46 -02:00
Roberto Ierusalimschy
29b7b8e52c
better error messages for wrong tokens
1998-02-11 18:56:46 -02:00
Roberto Ierusalimschy
a9dd2c6717
interrupts lua loops with "^C" (via signals)
1998-02-11 18:56:05 -02:00
Roberto Ierusalimschy
aee3f97acb
put back quotes (") when string in dostring ends with a \n
1998-01-29 13:59:35 -02:00
Roberto Ierusalimschy
46968b8ffa
"volatile is the only reliable way to ensure that a local variable
...
retains the value it had at the time of the call to longjmp"
1998-01-28 15:47:05 -02:00
Roberto Ierusalimschy
6cdf0d8768
tables can become full of "emptys" slots, and keep growing without limits.
1998-01-28 14:50:33 -02:00
Roberto Ierusalimschy
07ff251a17
details in "dostring" identification
1998-01-27 19:21:27 -02:00
Roberto Ierusalimschy
b3b7cf7335
BUG: "lua_getstring" may create a new string, so should check GC
1998-01-27 17:13:45 -02:00
Roberto Ierusalimschy
8622dc18bf
bug: format size limits with little problems
1998-01-27 17:11:36 -02:00
Roberto Ierusalimschy
d22e2644dd
wrong line number (+1) in error report when file starts with "#..."
1998-01-19 18:18:02 -02:00
Roberto Ierusalimschy
f529a22ca5
BUG: wrong line number (+1) in error report when file starts with "#..."
1998-01-19 18:18:02 -02:00
Roberto Ierusalimschy
783ba75129
needs "stdlib.h" (calls "exit")
1998-01-19 17:49:49 -02:00
Roberto Ierusalimschy
d49e4dd752
MAX_WORD should not be bigger than MAX_INT
1998-01-19 17:49:22 -02:00
Roberto Ierusalimschy
981fddea02
module to load bytecodes from files.
1998-01-14 13:49:01 -02:00
Roberto Ierusalimschy
81b953f27e
details
1998-01-14 11:49:44 -02:00
Roberto Ierusalimschy
b9acf4b4af
"strcoll" may not exist in ond ansi machines
1998-01-14 11:49:15 -02:00
Roberto Ierusalimschy
44ace0aefd
we don't need a type "Word".
1998-01-14 11:48:28 -02:00
Roberto Ierusalimschy
5981161360
small optimizations (?)
1998-01-13 16:06:27 -02:00
Roberto Ierusalimschy
763c64be9b
details
1998-01-13 13:42:43 -02:00
Roberto Ierusalimschy
f0dffaa209
new way to hanlde arg information
1998-01-12 11:35:37 -02:00
Roberto Ierusalimschy
77a6836fef
we don't need a type "Word".
1998-01-12 11:00:51 -02:00
Roberto Ierusalimschy
9f043e8017
luaL_arg_check now is inlined
1998-01-09 13:09:53 -02:00
Roberto Ierusalimschy
6ac047afc4
details
1998-01-09 12:57:43 -02:00
Roberto Ierusalimschy
0e1058cfdd
small optimizations in switch order
1998-01-09 12:44:55 -02:00
Roberto Ierusalimschy
26679b1a48
back to upavalues as extra arguments for C closures; this way it's
...
trivial to make currying.
1998-01-07 14:26:48 -02:00
Roberto Ierusalimschy
e04c2b9aa8
details
1998-01-06 17:17:31 -02:00
Roberto Ierusalimschy
0c031dcc8b
details
1998-01-05 15:12:54 -02:00
Roberto Ierusalimschy
c332c4e927
reference manual of the Lua language
1998-01-02 16:34:00 -02:00
Roberto Ierusalimschy
964c503a63
LUA_COMPAT2.5 may use #ifdef instead of #if
1998-01-02 15:46:32 -02:00
Roberto Ierusalimschy
90d87e3a78
details
1997-12-30 17:15:52 -02:00
Roberto Ierusalimschy
f76bca23ef
variants for "ARGS".
1997-12-30 17:08:23 -02:00
Roberto Ierusalimschy
a5fd7d722c
opctional "base" in "tonumber" convertion.
1997-12-30 15:57:45 -02:00
Roberto Ierusalimschy
4e0bf95622
variant opcodes for PUSHSELF
1997-12-29 15:35:46 -02:00
Roberto Ierusalimschy
498a934abf
new syntax possibilities: f(x).x, etc; on the other hand,
...
"function ... (x)" now is more restricted.
1997-12-29 15:28:45 -02:00
Roberto Ierusalimschy
ce53872684
new syntax: f´s´ for f(´s´).
1997-12-28 20:48:15 -02:00
Roberto Ierusalimschy
da96eb2cce
some details related to OLD_ANSI
1997-12-26 16:38:16 -02:00
Roberto Ierusalimschy
fada8efd01
"rand()", in SunOS, may return values bigger than "RAND_MAX"...
1997-12-26 16:36:31 -02:00
Roberto Ierusalimschy
d916487d7c
auxlib split in two parts (lauxlib and lbuffer)
1997-12-23 17:24:36 -02:00
Roberto Ierusalimschy
1bf762ba38
Generic buffer facilities for Lua (and libraries)
1997-12-23 17:24:36 -02:00
Roberto Ierusalimschy
541e722360
details
1997-12-23 17:24:19 -02:00
Roberto Ierusalimschy
807ba6301c
error method *always* gets a string (otherwise it is not called at all)
1997-12-23 10:50:49 -02:00
Roberto Ierusalimschy
03f3f9e707
"zio" now keeps its "name".
1997-12-22 18:57:18 -02:00
Roberto Ierusalimschy
a78eecee48
details (aborts with invalid arguments)
1997-12-22 18:03:50 -02:00
Roberto Ierusalimschy
43461d267f
help message
1997-12-22 16:05:23 -02:00
Roberto Ierusalimschy
fae0b52825
small bugs in error report
1997-12-22 15:52:20 -02:00
Roberto Ierusalimschy
22439a7511
new syntax for constructors (a={n=3;1,2,3}).
1997-12-22 15:24:11 -02:00
Roberto Ierusalimschy
7ecc3ce827
new command line options
1997-12-19 16:34:23 -02:00
Roberto Ierusalimschy
4e91384e14
sorting the includes...
1997-12-18 17:11:43 -02:00
Roberto Ierusalimschy
de79e7fc58
back to "lua_upvalue"... (seems better choice)
1997-12-18 16:32:39 -02:00
Roberto Ierusalimschy
8b5b42563c
"lua_dobuffer" (is not official, but its there...)
1997-12-17 18:57:20 -02:00
Roberto Ierusalimschy
502343b402
new scheme for buffers, centralized in auxlib.
1997-12-17 18:48:58 -02:00
Roberto Ierusalimschy
82d09fbf0d
new structure for closures, without static variables.
1997-12-15 15:58:49 -02:00
Roberto Ierusalimschy
9be85d1648
new year
1997-12-15 15:47:55 -02:00
Roberto Ierusalimschy
45e533599f
optimization: closures without upvalues don't need to be closures
1997-12-15 14:17:20 -02:00
Roberto Ierusalimschy
94144a7821
otimization: closures without upvalues don't need to be closures
1997-12-15 14:17:20 -02:00
Roberto Ierusalimschy
4daae2165d
new API function and built-in "lua_copytagmethods"
1997-12-11 15:21:11 -02:00
Roberto Ierusalimschy
cdd261f332
new option "-q" (quiet), and multi-line commands (ending with '\')
1997-12-11 15:00:21 -02:00
Roberto Ierusalimschy
034f16892e
better treatment of MARKs and DEBUG cases.
1997-12-11 12:48:46 -02:00
Roberto Ierusalimschy
c759520bc8
safer way to put #defines in error messages...
1997-12-09 14:01:08 -02:00
Roberto Ierusalimschy
80b3d28f4a
details (mainly error messages)
1997-12-09 11:50:08 -02:00
Roberto Ierusalimschy
69d97712ec
arguments "var=value" doesn't need quotes for value
1997-12-03 17:57:54 -02:00
Roberto Ierusalimschy
5d89dad9b8
bug log
1997-12-02 10:46:15 -02:00
Roberto Ierusalimschy
525a91fed3
BUG: "lastline" was not reset on function entry, so debug information
...
started only in the 2nd line of a function.
1997-12-02 10:43:54 -02:00
Roberto Ierusalimschy
868d16dee0
comments
1997-12-02 10:43:44 -02:00
Roberto Ierusalimschy
3393fd7f25
first version of "lua_close"
1997-12-01 18:31:25 -02:00
Roberto Ierusalimschy
00c122cc29
other distribution of memory debug information.
1997-12-01 18:30:44 -02:00
Roberto Ierusalimschy
03160920cf
store "functofind" in stack top, so doesn't need this field in
...
global state.
1997-11-28 14:56:05 -02:00
Roberto Ierusalimschy
b42cc6a4d2
no more protected global variables; using upvalues to store tags.
1997-11-28 10:40:37 -02:00
Roberto Ierusalimschy
a6ad644bf2
no more protected global variables
1997-11-28 10:39:45 -02:00
Roberto Ierusalimschy
39fd5bb9b0
details
1997-11-28 10:39:22 -02:00
Roberto Ierusalimschy
5482992dec
other access method for C upvalues (as arguments)
1997-11-27 16:25:14 -02:00
Roberto Ierusalimschy
024528e0c2
global variables starting with '.' are protected in Lua (temporarily at
...
least...)
1997-11-27 13:59:44 -02:00
Roberto Ierusalimschy
ef37c87e93
no more 'globalbag'
1997-11-27 13:59:25 -02:00
Roberto Ierusalimschy
9e029f98b9
details
1997-11-26 18:44:52 -02:00
Roberto Ierusalimschy
e962330df9
"stacklimit" is not necessary.
1997-11-26 18:28:22 -02:00
Roberto Ierusalimschy
b291e50006
extra argument for "assert"
1997-11-26 17:40:27 -02:00
Roberto Ierusalimschy
9ae0c082a3
small details by lint.
1997-11-26 16:53:45 -02:00
Roberto Ierusalimschy
accd7bc253
small modifications (format, small optimizations, etc)
1997-11-21 17:00:46 -02:00
Roberto Ierusalimschy
6153200bc2
make sure there is no mem problems, using %.ns instead of %s for luaV_error.
1997-11-19 16:16:33 -02:00
Roberto Ierusalimschy
2e7595522d
allows '\r' at the end of pragmas, so one can mix Windows and Unix files
1997-11-19 15:35:47 -02:00
Roberto Ierusalimschy
b79ffdc4ce
global state for Lua interpreter
1997-11-19 15:31:19 -02:00
Roberto Ierusalimschy
592a3f289b
first implementation of centralized global state.
1997-11-19 15:29:23 -02:00
Roberto Ierusalimschy
9cdeb275e7
details
1997-11-10 15:47:01 -02:00
Roberto Ierusalimschy
c957b270d2
"call" now handles errors (instead of "dostring")
1997-11-07 16:19:13 -02:00
Roberto Ierusalimschy
92791b9dd6
small details
1997-11-07 13:09:49 -02:00
Roberto Ierusalimschy
45cad43c3f
"lua_open": now lua has an explicit open operation.
1997-11-04 13:27:53 -02:00
Roberto Ierusalimschy
dad5a01fb0
trigonometric mode stored in a Lua global variable.
1997-11-03 19:11:44 -02:00
Roberto Ierusalimschy
66713181c1
no need of "emergency error"...
1997-11-03 19:00:23 -02:00
Roberto Ierusalimschy
7135803cc8
"global" version of a nil object.
1997-11-03 18:45:23 -02:00
Roberto Ierusalimschy
b7567b6673
"read" & "write" may receive a file handler as first argument
1997-10-30 18:29:09 -02:00
Roberto Ierusalimschy
f8c95fa9e8
new "block" syntax (DO ... END)
1997-10-30 16:47:19 -02:00
Roberto Ierusalimschy
9c965d0ffb
more precise error messages for compiler limits.
1997-10-28 15:26:53 -02:00
Roberto Ierusalimschy
6103dca8ee
small bug.
1997-10-27 14:14:37 -02:00
Roberto Ierusalimschy
18cd7adac6
optimization to handle <a.x> (new opcode).
1997-10-24 16:40:29 -02:00
Roberto Ierusalimschy
41223a01ec
definition of "PI" and modes for angles.
1997-10-24 15:44:22 -02:00
Roberto Ierusalimschy
e78cf96c97
first version of Cclosures.
1997-10-24 15:17:24 -02:00
Roberto Ierusalimschy
0cb3843956
"foreach" and "foreachvar" more robust (to survive GCs), and with
...
termination test.
1997-10-23 14:28:48 -02:00
Roberto Ierusalimschy
907368ead5
GC now considers an "estimate" of object size, instead of just the number
...
of objects.
1997-10-23 14:26:37 -02:00
Roberto Ierusalimschy
81489beea1
functions may use many upvalues, to keep global values.
1997-10-18 14:46:39 -02:00
Roberto Ierusalimschy
ac30aad09b
new functions "foreach" and "foreachvar"
1997-10-18 14:33:36 -02:00
Roberto Ierusalimschy
2c89651fc6
macro "val" should live together with macro "ref".
1997-10-18 14:29:15 -02:00
Roberto Ierusalimschy
3a89c973ff
details
1997-10-16 19:14:47 -02:00
Roberto Ierusalimschy
52d5e8032c
better identification of types which are tags
1997-10-16 18:07:40 -02:00
Roberto Ierusalimschy
19c178fa14
new (smaller) prompt
1997-10-16 16:35:59 -02:00
Roberto Ierusalimschy
45ccb0e881
"nupvalues" is kept in Closure, not in prototype (as a preparation
...
for C closures...)
1997-10-16 08:59:34 -02:00
Roberto Ierusalimschy
4be18fa889
details
1997-10-15 18:16:00 -02:00
Roberto Ierusalimschy
7c261a13b5
more uniform treatment to opcode variants.
1997-10-13 20:12:04 -02:00
Roberto Ierusalimschy
2bb94d9e22
using bison instead of yacc; lparser.c renamed to lstx.c (to
...
avoid confusion with lparser.h...)
1997-10-13 20:10:45 -02:00
Roberto Ierusalimschy
a3235ad270
prompt for interactive mode
1997-10-06 12:51:32 -02:00
Roberto Ierusalimschy
f6a9cc9a67
jumps are relative to next instruction
1997-10-06 12:51:11 -02:00
Roberto Ierusalimschy
28d47a0aaa
all jumps have byte variants; WHILE optimization
1997-10-01 17:05:34 -03:00
Roberto Ierusalimschy
eb617df2d8
better way to traverse GCnode lists.
1997-09-26 13:46:20 -03:00
Roberto Ierusalimschy
a580480b07
new implementation for globals: Global value is stored in TaggedString
1997-09-26 12:02:26 -03:00
Roberto Ierusalimschy
0dd6d1080e
new opcode variants.
1997-09-24 16:43:11 -03:00
Roberto Ierusalimschy
3c820d622e
better control over closed files
1997-09-23 11:12:44 -03:00
Roberto Ierusalimschy
d6c867ea50
better way to cope with opcode variants
1997-09-22 17:53:20 -03:00
Roberto Ierusalimschy
2079cfe8fa
new way to code globals, using const table instead of putting global
...
index inside the opcode.
1997-09-19 18:17:52 -03:00
Roberto Ierusalimschy
dfe03c7abe
small optimizations (bit scrubbing)
1997-09-19 15:40:32 -03:00
Roberto Ierusalimschy
8cd67ac676
Syntax analizer and code generator
1997-09-16 16:33:21 -03:00
Roberto Ierusalimschy
9828893f7e
Makefile
1997-09-16 16:33:21 -03:00
Roberto Ierusalimschy
6990da0057
Lua virtual machine
1997-09-16 16:25:59 -03:00
Roberto Ierusalimschy
d985dc0629
Opcodes for Lua virtual machine
1997-09-16 16:25:59 -03:00
Roberto Ierusalimschy
451124005b
Standard I/O (and system) library
1997-09-16 16:25:59 -03:00
Roberto Ierusalimschy
2f1fa3d427
Type definitions for Lua objects
1997-09-16 16:25:59 -03:00
Roberto Ierusalimschy
189d64409b
Garbage Collector
1997-09-16 16:25:59 -03:00
Roberto Ierusalimschy
60cc473bcf
Lexical Analizer
1997-09-16 16:25:59 -03:00
Roberto Ierusalimschy
43a2ee6ea1
Stack and Call structure of Lua
1997-09-16 16:25:59 -03:00
Roberto Ierusalimschy
4b91e9cde6
Tag methods
1997-09-16 16:25:59 -03:00
Roberto Ierusalimschy
26c5f56ad1
Built-in functions
1997-09-16 16:25:59 -03:00
Roberto Ierusalimschy
daa858ef27
String table (keep all strings handled by Lua)
1997-09-16 16:25:59 -03:00
Roberto Ierusalimschy
ea169d2083
auxiliar functions from Lua API
1997-09-16 16:25:59 -03:00
Roberto Ierusalimschy
c31aa863ac
Auxiliar functions for building Lua libraries
1997-09-16 16:25:59 -03:00
Roberto Ierusalimschy
ff08b0f406
Lua Function structures
1997-09-16 16:25:59 -03:00
Roberto Ierusalimschy
c1801e623f
Some generic functions over Lua objects
1997-09-16 16:25:59 -03:00
Roberto Ierusalimschy
a404f6e0e6
Lua tables (hash)
1997-09-16 16:25:59 -03:00
Roberto Ierusalimschy
2d2440a753
Lua stand-alone interpreter
1997-09-16 16:25:59 -03:00
Roberto Ierusalimschy
0c4ed2b3dc
main header file
1997-09-16 16:25:59 -03:00
Roberto Ierusalimschy
b945fae40e
Lua standard mathematical library
1997-09-16 16:25:59 -03:00
Roberto Ierusalimschy
dadba4d6ed
Interface to Memory Manager
1997-09-16 16:25:59 -03:00
Roberto Ierusalimschy
d600a6b5b3
a generic input stream interface
1997-09-16 16:25:59 -03:00
Roberto Ierusalimschy
75ac0d2172
Standard library for strings and pattern-matching
1997-09-16 16:25:59 -03:00
Roberto Ierusalimschy
9f3785a2f3
Lua standard libraries
1997-09-16 16:25:59 -03:00
Roberto Ierusalimschy
84e92e0976
Debuging API
1997-09-16 16:25:59 -03:00
Roberto Ierusalimschy
b8a049abed
Global variables
1997-09-16 16:25:59 -03:00
Roberto Ierusalimschy
e18f681333
very small corrections...
1997-09-16 16:01:10 -03:00
Roberto Ierusalimschy
dd1aa28390
small optimization in opcodes for "and" and "or"
1997-08-04 16:15:05 -03:00
Roberto Ierusalimschy
abbf14cd32
small optimizations; try to find previous use when coding a real constant.
1997-07-31 17:46:59 -03:00
Roberto Ierusalimschy
e8292f076d
new dependencies
1997-07-31 17:45:25 -03:00
Roberto Ierusalimschy
3037dccaf6
prime numbers spread better.
1997-07-31 17:44:46 -03:00
Roberto Ierusalimschy
a7793468aa
correct support for changing real to double (optional)
1997-07-31 16:37:37 -03:00
Roberto Ierusalimschy
caa987faad
"random" accepts an 'n' to return between 1 and 'n'.
1997-07-30 19:15:18 -03:00
Roberto Ierusalimschy
0892f0e5b7
BIG CHANGE: functions have their own "constant table".
1997-07-30 19:00:50 -03:00
Roberto Ierusalimschy
1d7857bc63
free(b) is equivalent to realloc(b, 0)
1997-07-30 15:29:08 -03:00
Roberto Ierusalimschy
72a1d81b51
bug: lua_getlocal breaks when called with a CFunction.
1997-07-29 18:11:10 -03:00
Roberto Ierusalimschy
2c580a0afb
new way to handle global state during compilation.
1997-07-29 17:38:45 -03:00
Roberto Ierusalimschy
05e8b0ae80
new opcode, ENDCODE, to signal end of code vector.
1997-07-29 17:38:06 -03:00
Roberto Ierusalimschy
16dd77e8d9
unused field "size" in struct TFunc.
1997-07-29 16:44:02 -03:00
Roberto Ierusalimschy
0600f968c3
BUG: LUA_COMPAT2_5 written wrong...
1997-07-29 10:35:06 -03:00
Roberto Ierusalimschy
971b1d557d
bug log. Most of the log is done automatically by RCS, and not in
...
the file itself :-)
1997-07-29 10:34:15 -03:00
Roberto Ierusalimschy
11d97c34d5
skipping of '#' in first line is done by lex.c.
1997-07-29 10:33:15 -03:00
Roberto Ierusalimschy
66be42549e
BUG: files starting with '#' get wrong line numbers
1997-07-07 18:05:51 -03:00
Roberto Ierusalimschy
067db30d71
"next" & "nextvar" check if argument is a result of previous calls
1997-07-07 13:44:26 -03:00
Roberto Ierusalimschy
da4dbe65b2
new functionality for "format": "%d$...".
1997-07-04 19:35:38 -03:00
Roberto Ierusalimschy
4321fde2a7
error inside an error method could break the stack.
1997-07-04 11:55:37 -03:00
Roberto Ierusalimschy
8f3df1d471
small details.
1997-07-02 15:50:18 -03:00
Roberto Ierusalimschy
1a17211707
auxliar support for "locale" (to avoid portability problems)
1997-07-02 15:45:09 -03:00
Roberto Ierusalimschy
d56e3a6481
"locale" support + better uniformity in formating
1997-07-02 14:09:48 -03:00
Roberto Ierusalimschy
7820a47184
LOCALE support
1997-07-01 16:32:41 -03:00
Roberto Ierusalimschy
88b185ada1
more uniform source (more macros...)
1997-07-01 14:41:34 -03:00
Roberto Ierusalimschy
ef3c45d523
for security reasons, one cannot change the tag of a udata
...
from Lua.
1997-06-27 19:38:49 -03:00
Roberto Ierusalimschy
20a48a818f
a file handle must be a userdata.
1997-06-27 19:38:49 -03:00
Roberto Ierusalimschy
c9e6ed1d9f
small corrections.
1997-06-27 15:39:34 -03:00
Roberto Ierusalimschy
56fdab67d8
believe it or not, this makes a difference...
1997-06-26 18:40:57 -03:00
Roberto Ierusalimschy
3a98c8670d
new name for _VERSION (standard of _UPPERCASES for pre-defined
...
global variable)
1997-06-26 17:47:43 -03:00
Roberto Ierusalimschy
da585783e3
new method to handle current files, with global variables
...
_INPUT and _OUTPUT.
1997-06-26 17:39:10 -03:00
Roberto Ierusalimschy
e81f184164
new #define LUA_COMPAT2_5 to select "compatibility mode".
1997-06-23 15:27:53 -03:00
Roberto Ierusalimschy
3e43275308
incompatibilities with 2.5 + restrictions on tag methods
1997-06-20 16:28:16 -03:00
Roberto Ierusalimschy
f97307b548
zio should not care about how a user creates a FILE (pipe, socket, popen,
...
etc).
1997-06-20 16:25:54 -03:00
Roberto Ierusalimschy
6402bfb1f8
better error message for dostring (2nd argument)
1997-06-20 16:19:09 -03:00
Roberto Ierusalimschy
27b6bbdcf3
"testC" inactive (active only for tests)
1997-06-19 15:55:40 -03:00
Roberto Ierusalimschy
5a198de3c1
new prefix luaZ
1997-06-19 15:55:28 -03:00
Roberto Ierusalimschy
c5d7ba7347
dostring has an optional error method argument
1997-06-19 15:49:40 -03:00
Roberto Ierusalimschy
f84c2ebc4a
dostring has an optional error method argument;
...
counter for gsub only when there is a table (to keep full compatibility)
1997-06-19 15:49:40 -03:00
Roberto Ierusalimschy
c8897f2b08
counter for gsub only when there is a table (to keep full compatibility)
1997-06-19 15:49:40 -03:00
Roberto Ierusalimschy
6bb2cac3db
setparsedfile is extern; luaz_... changed to luaZ_...
1997-06-19 15:04:34 -03:00
Roberto Ierusalimschy
88f020b626
new interface to "lua_seterrormethod" and "lua_settagmethod", to
...
allow the use of Lua functions too.
1997-06-19 15:03:04 -03:00
Roberto Ierusalimschy
a38f093f05
luaI_initTFunc initializes fileName.
1997-06-19 14:46:12 -03:00
Roberto Ierusalimschy
b6adfdd01b
gsub aborts if error occurs.
1997-06-19 14:45:28 -03:00
Roberto Ierusalimschy
b90b4bbd3a
macros don't need prototypes.
1997-06-18 18:39:56 -03:00
Roberto Ierusalimschy
f6d95140ae
using old version functions.
1997-06-18 18:20:45 -03:00
Roberto Ierusalimschy
eca17b24ea
#if wraps compatibility issue
1997-06-18 18:20:45 -03:00
Roberto Ierusalimschy
6b61582e47
do not use $...$ to italic.
1997-06-18 18:11:53 -03:00
Roberto Ierusalimschy
60bdc370d9
new functions lua_doFILE and lua_dobuffer to help users...
1997-06-18 17:35:49 -03:00
Roberto Ierusalimschy
b9e31f73ee
exported functions follow "lua" prefix rule.
1997-06-18 17:30:52 -03:00
Roberto Ierusalimschy
ea98620d98
new arguments for gsub
1997-06-18 17:15:47 -03:00
Roberto Ierusalimschy
6b78040840
lhf corrections + new gsub
1997-06-18 17:14:52 -03:00
Roberto Ierusalimschy
e931c7c0f6
error message always shows file names.
1997-06-18 14:33:30 -03:00
Roberto Ierusalimschy
70160320b1
first version for Lua 3.0 (with tag methods, etc)
1997-06-17 15:45:16 -03:00
Roberto Ierusalimschy
bfbf56f15a
extra parameter for "call" is "pack" or "plain".
1997-06-17 15:44:31 -03:00
Roberto Ierusalimschy
732ef82c72
"luaI_undump1" cannot be static; luac uses it.
1997-06-17 15:19:17 -03:00
Roberto Ierusalimschy
2a1da64872
"lua_getobjname" must return "tag-method" and not "fallback".
1997-06-17 15:09:31 -03:00
Roberto Ierusalimschy
3c5d71cf77
"nil" may have fallbacks too.
1997-06-17 14:27:07 -03:00
Roberto Ierusalimschy
1848bcc15b
"strsub" accepts negative indices (count from the end of the string).
1997-06-16 17:29:59 -03:00
Roberto Ierusalimschy
4d2de484f6
"lua_seterrormethod" should return the previous handler.
1997-06-16 16:48:18 -03:00
Roberto Ierusalimschy
312f78d925
default error method is not nil (nil does nothing).
1997-06-16 15:43:19 -03:00
Roberto Ierusalimschy
e4b69d6c9c
"order" and "concat" operations choose tag methods the same way that
...
"arith" operations do (first the first parameter, etc).
1997-06-16 15:42:32 -03:00
Roberto Ierusalimschy
c9a2dfeb2c
using "zio" for parsing Lua code.
1997-06-16 13:50:22 -03:00
Roberto Ierusalimschy
9fe5be3acf
library for uniform buffered input.
1997-06-16 13:50:22 -03:00
Roberto Ierusalimschy
611680af08
functions "lua_settagmethod" and similars should be safe too.
1997-06-12 15:27:29 -03:00
Roberto Ierusalimschy
cb1d8f0fa0
missing small dependency.
1997-06-11 15:57:00 -03:00
Roberto Ierusalimschy
33f4fef410
BUG: did not handle properly pragmas $endinput/$debug inside a $if.
1997-06-11 15:56:02 -03:00
Roberto Ierusalimschy
e77534c08f
small 'improvement'
1997-06-11 11:24:40 -03:00
Roberto Ierusalimschy
a22b54bbb6
format more uniform, to facilitate filters .tex->.html
1997-06-09 15:16:33 -03:00
Roberto Ierusalimschy
414ebe8ce1
power method (^) acts only in numbers.
1997-06-09 14:30:10 -03:00
Roberto Ierusalimschy
33ace03b5a
udata is just void * again, so there is no point for function "getbyte".
1997-06-09 14:29:45 -03:00
Roberto Ierusalimschy
085181a08a
new function "testC", to help debug the API.
1997-06-09 14:29:16 -03:00
Roberto Ierusalimschy
dd22ea4da5
new implementation for udata (again they are just void *);
...
new implementation for the API: most operations now do not disturb
structures lua2C and C2lua.
1997-06-09 14:28:14 -03:00
Roberto Ierusalimschy
5fdcfeb353
new lua_Objects are created below the C2lua stack, so most API functions
...
don't need to adjust stack.
1997-06-06 17:54:40 -03:00
Roberto Ierusalimschy
d68d8287aa
new lua_Objects are created below the C2lua stack, so most API functions
...
don't need to adjust stack. So lua_getref does not change the stack,
and lua_pushref can use it as a macro.
1997-06-06 17:54:40 -03:00
Roberto Ierusalimschy
e1249970c2
new API function to force garbage collection.
1997-05-26 11:42:51 -03:00
Roberto Ierusalimschy
9d6f4e48a6
unused declaration.
1997-05-26 11:42:36 -03:00
Roberto Ierusalimschy
b546a042e8
another (better?) implementation for "pushsubscript".
1997-05-26 11:23:55 -03:00
Roberto Ierusalimschy
bd9e68cfcd
new implementation of gc: "Pre-collect" garbage in temporary lists and
...
then call fallbacks.
1997-05-14 15:38:29 -03:00
Roberto Ierusalimschy
9747f3c87a
double hashing + tables do not grow if there are empty slots
1997-05-08 17:43:30 -03:00
Roberto Ierusalimschy
12d9731a49
bug: string table must be initialized.
1997-05-05 17:21:23 -03:00
Roberto Ierusalimschy
4aade854bb
correction of name (and "iternal" was wrong, any way).
1997-04-30 16:55:47 -03:00
Roberto Ierusalimschy
369dd65318
small optimization in the access to i.m. table.
1997-04-24 19:59:57 -03:00
Roberto Ierusalimschy
209602ac31
BUG: input file must be closed just after parser.
1997-04-15 14:32:47 -03:00
Roberto Ierusalimschy
6251d889ca
missing definition of "lua_storesubscript", for compatibility
1997-04-15 13:52:20 -03:00
Roberto Ierusalimschy
faec0b0824
new pragma "$endinput"
1997-04-14 16:08:09 -03:00
Roberto Ierusalimschy
64d93e7cf9
global variables (in $if) may have '_'.
1997-04-14 12:30:29 -03:00
Roberto Ierusalimschy
d73c5bcfe7
function name is only needed *if* there is an error.
1997-04-14 12:30:03 -03:00
Luiz Henrique de Figueiredo
e78c1c54aa
mem.h is now luamem.h
...
removed warn
added support for new opcodes (VARARGS, STOREMAP)
better error messages with luaL_verror
1997-04-14 09:12:40 -03:00
Luiz Henrique de Figueiredo
42049b42f1
fix comment in VERSION
1997-04-14 09:12:40 -03:00
Roberto Ierusalimschy
a8cd072c76
nested "$if's", "$else", and "$if" constants (nil & 1).
1997-04-12 12:01:49 -03:00
Roberto Ierusalimschy
83e9897cf0
correction on comments about opcodes.
1997-04-11 18:34:53 -03:00
Roberto Ierusalimschy
f93704728f
one cannot "create" a userdata.
1997-04-08 12:41:44 -03:00
Roberto Ierusalimschy
c9e3d32182
first implementation of "$if";
...
new function "findstring" (useful in good places)
1997-04-07 11:48:53 -03:00
Roberto Ierusalimschy
00050b8a6b
detail: local names
1997-04-06 11:17:06 -03:00
Roberto Ierusalimschy
19a1e19ae1
detail: better way to put a "..." in message.
1997-04-06 11:14:27 -03:00
Roberto Ierusalimschy
3a9516ffc8
luaL check functions do not need the function name (it can be
...
accessed via luadebug interface).
1997-04-06 11:08:08 -03:00
Roberto Ierusalimschy
42fa305649
better error messages;
...
better names for some API functions.
1997-04-04 19:24:51 -03:00
Roberto Ierusalimschy
9319735744
using new lib auxlib.
1997-04-04 12:35:37 -03:00
Roberto Ierusalimschy
1ea6e8064c
"setintmethod" returns old method (to be coerent with seterrormethod).
...
BUG: wrong pointer arithmetic (index out of range when comparing).
obs: version 4 is due to internal methods.
1997-04-03 15:27:06 -03:00
Roberto Ierusalimschy
c1746340c3
obs: version 4 is due to internal methods.
...
(some small details in comments)
1997-04-03 15:26:08 -03:00
Roberto Ierusalimschy
d0339e7b72
"setintmethod" returns old method (to be coerent with seterrormethod).
...
obs: version 2 is due to internal methods.
1997-04-03 15:24:23 -03:00
Roberto Ierusalimschy
075b7918c3
new function "getintmethod"
1997-04-02 20:04:12 -03:00
Roberto Ierusalimschy
7c99149a76
"tostring" gives an overview of a userdata.
1997-04-02 19:53:35 -03:00
Roberto Ierusalimschy
27d95f1880
"newtag" does not need a type name.
1997-04-02 19:52:42 -03:00
Roberto Ierusalimschy
f0d523887d
lua_getuserdata must return NULL if object is not userdata
1997-04-02 14:44:18 -03:00
Roberto Ierusalimschy
f29fbf2bf6
lua_getuserdata must return NULL if object is not userdata;
...
small BUG: wrong error message for a=b[1] (b not a table)
1997-04-02 14:44:18 -03:00
Roberto Ierusalimschy
4355e1afcd
"getbyte" returns userdata size when called without second parameter.
1997-04-02 14:44:18 -03:00
Roberto Ierusalimschy
cae1eff901
small "bugs" detected by Purify: cannot read "next" after 0.
1997-04-01 18:23:20 -03:00
Roberto Ierusalimschy
f83bc86e51
small "bugs" detected by Purify: some blocks may be smaller than
...
sizeof(int).
1997-04-01 18:23:20 -03:00
Roberto Ierusalimschy
59744f0311
"storeglobal" changed to "setglobal"
1997-04-01 16:02:43 -03:00
Roberto Ierusalimschy
bb2e2bec18
new lua function "tag"
1997-04-01 14:31:42 -03:00
Roberto Ierusalimschy
efaaf99c42
first version of "setglobal" and "getglobal" internal methods.
1997-03-31 17:59:09 -03:00
Roberto Ierusalimschy
f8a571ee35
some new options for warnings and optimizations.
1997-03-31 17:58:42 -03:00
Roberto Ierusalimschy
397e32399b
update of ".h" dependencies
1997-03-31 11:23:49 -03:00
Roberto Ierusalimschy
373363cb69
new name for old "mem.h" (conflicts with some compiler libraries)
1997-03-31 11:19:01 -03:00
Roberto Ierusalimschy
ad5574c4c9
"Object" renamed to "TObject" (Tagged Object), to avoid conflicts with
...
pre-defined names in some C compilers.
1997-03-31 11:02:58 -03:00
Roberto Ierusalimschy
264f8c5e7b
new (internal?) functions to manipulate userdata
1997-03-26 19:23:15 -03:00
Roberto Ierusalimschy
9e9e2ea287
BUG: must mark userdata in garbage collection.
1997-03-26 19:22:41 -03:00
Roberto Ierusalimschy
03d917f229
some corrections, improvements;
1997-03-24 14:13:22 -03:00
Roberto Ierusalimschy
c3488f5115
must call "gc" i.m. for nil after all others.
1997-03-21 18:39:57 -03:00
Roberto Ierusalimschy
6fef372fb8
mathlib now uses i.m. for "pow" operator.
1997-03-21 15:37:28 -03:00
Roberto Ierusalimschy
052a1cc46c
files now have proper tags.
1997-03-20 17:36:58 -03:00
Roberto Ierusalimschy
ae067dcddd
BUG: lua_newtag can be called before luaI_IMtable is initialized.
1997-03-20 17:36:19 -03:00
Roberto Ierusalimschy
5d60470508
i.m. "arith" and "order" splited for different operations
1997-03-20 16:20:43 -03:00
Roberto Ierusalimschy
88d7ffb0d0
luaI_type moved to fallback.c
1997-03-20 16:20:23 -03:00
Roberto Ierusalimschy
47527d2d3c
setmethods should return old methods.
1997-03-19 18:12:34 -03:00
Roberto Ierusalimschy
1444d28476
first full implementation of internal methods
1997-03-19 16:41:10 -03:00
Roberto Ierusalimschy
2de803c250
new header 'auxlib.h' + new function luaL_verror
1997-03-18 12:30:50 -03:00
Roberto Ierusalimschy
fa08b42dd8
new header for auxiliar functions.
1997-03-18 12:30:50 -03:00
Roberto Ierusalimschy
eea734aa88
new module 'auxlib' centralizes functions to get/check parameters.
1997-03-17 14:02:29 -03:00
Roberto Ierusalimschy
b6d91e24e2
"tag" changed to "ttype" (since now tag has other meaning)
1997-03-11 15:44:28 -03:00
Roberto Ierusalimschy
a82ab0852e
new explanation about communication between Lua and C.
1997-03-06 19:19:08 -03:00
Roberto Ierusalimschy
b8af9c56c9
new form for constructors: {[exp] = exp, ...}
1997-03-06 14:30:55 -03:00
Roberto Ierusalimschy
c3c0b52a1f
atualization of #include dependencies.
1997-03-05 10:37:04 -03:00
Roberto Ierusalimschy
ec422ec7d0
skips can be nested (why not?).
1997-03-05 10:32:41 -03:00
Roberto Ierusalimschy
a8a15ff1bd
"mem.c.debug" incorporated (with "#if").
1997-03-03 16:55:38 -03:00
Roberto Ierusalimschy
131d66efd2
first step in implementing internal methods.
1997-02-26 14:38:41 -03:00
Roberto Ierusalimschy
bbf1b3060a
small correction.
1997-02-26 14:07:57 -03:00
Roberto Ierusalimschy
8b7f271ea2
new pattern item ".-";
...
empty patterns may be used in gsub.
1997-02-21 12:21:34 -03:00
Roberto Ierusalimschy
bc323435ee
new facilities for pattern matching (%b and .-);
...
explanations about next-nextvar.
1997-02-21 12:19:37 -03:00
Roberto Ierusalimschy
6769f34817
lua_Type is private (preparation for tags)
1997-02-20 12:51:14 -03:00
Roberto Ierusalimschy
0b110f7922
small syntax error (yacc does not complain, but bison does).
1997-02-13 14:18:39 -02:00
Roberto Ierusalimschy
205ee1ec84
userdata can handle arbitrary binary data;
...
user tag is stored with data;
1997-02-11 09:40:01 -02:00
Roberto Ierusalimschy
b48847c5fa
BUG: "inclinenumber" cannot use public buffer, since it could change
...
the buffer pointer (luaY_lex and read_long_string have local
pointers to it).
1997-02-07 11:49:46 -02:00
Roberto Ierusalimschy
1143bf9286
better check when converting from float to int, to avoid overflow
...
(on some machines it may result in run-time error)
1997-01-31 12:27:11 -02:00
Roberto Ierusalimschy
d9ecc13545
lhf revisions/sugestions
1997-01-23 14:17:53 -02:00
Roberto Ierusalimschy
f00d692445
small correction to avoid "wrong" default action
1997-01-15 14:11:37 -02:00
Roberto Ierusalimschy
d8b0bbb2ad
BUG: pointer arithmetic does not have to work when pointing outside
...
an array.
1996-11-22 11:08:28 -02:00
Roberto Ierusalimschy
1f4ee4a4d2
ANSI ctype only works for unsigned chars (or EOF)
1996-11-22 11:08:02 -02:00
Roberto Ierusalimschy
6a9efa8b8e
useless include.
1996-11-22 11:07:20 -02:00
Roberto Ierusalimschy
65459e7938
small BUG: pragma deletes 0 at end of yytext, so a syntax error just after
...
it may have a wrong token in message.
1996-11-21 12:44:04 -02:00
Roberto Ierusalimschy
42359b8b13
new version
1996-11-20 11:49:32 -02:00
Roberto Ierusalimschy
169870e37d
BUG: ISO chars are negative, ISO ints are not.
1996-11-20 11:47:59 -02:00
Roberto Ierusalimschy
78e454d864
BUG: ISO chars are negative, ISO ints are not.
...
new "balanced" pattern.
1996-11-20 11:47:59 -02:00
Roberto Ierusalimschy
dbfe28e199
correction in inheritance code in C
1996-11-18 12:27:42 -02:00
Roberto Ierusalimschy
d59c52753f
undump needs file in binary mode
1996-11-18 11:48:44 -02:00
Roberto Ierusalimschy
62e1a4c84d
BUG: problems with negative indexes
1996-11-18 11:48:44 -02:00
Luiz Henrique de Figueiredo
81411e8913
headers includes sizeof(Word) not sizeof(int)
1996-11-18 09:18:29 -02:00
Luiz Henrique de Figueiredo
62aa717f7e
stdlib.h for exit
...
blocks are void*
1996-11-16 18:14:23 -02:00
Roberto Ierusalimschy
a5614eae3c
spelling corrections.
1996-11-14 15:45:37 -02:00
Luiz Henrique de Figueiredo
536bae5871
corrected version test (0x23 not 23)
1996-11-14 13:00:32 -02:00
Luiz Henrique de Figueiredo
679eddf296
1996-11-14 11:33:15 -02:00
Luiz Henrique de Figueiredo
d991def36c
added 3 new bytes to header (sizeof's)
1996-11-14 09:44:34 -02:00
Luiz Henrique de Figueiredo
8b195533d2
new header version
1996-11-14 09:44:34 -02:00
Roberto Ierusalimschy
3ccdd57c26
new version
1996-11-12 14:00:16 -02:00
Roberto Ierusalimschy
a103455dda
better format for error messages.
1996-11-08 17:08:30 -02:00
Roberto Ierusalimschy
60242e1930
error message for syntax "1..2";
...
syntax error function is in "lex.c" (it has the token)
1996-11-08 10:49:35 -02:00
Roberto Ierusalimschy
a0e9bfbb48
syntax error function is in "lex.c" (it has the token)
1996-11-08 10:49:35 -02:00
Roberto Ierusalimschy
2f19e0ba16
SunOS is not ANSI about the return value of "sprintf".
1996-11-07 18:26:19 -02:00
Roberto Ierusalimschy
ab7fdcbbed
corrected copyright notice
1996-11-07 18:26:08 -02:00
Luiz Henrique de Figueiredo
48cf1de356
replaced unions by memcpy
1996-11-07 12:13:28 -02:00
Luiz Henrique de Figueiredo
8d50122af0
replaced unions by memcpy
1996-11-07 11:59:51 -02:00
Roberto Ierusalimschy
fd379b38f7
new flag for STRERROR; libs now are called lib...
1996-11-06 18:48:03 -02:00
Roberto Ierusalimschy
aa4d865077
anna's comments
1996-11-06 18:26:56 -02:00
Roberto Ierusalimschy
3e94febfc1
pragmas should not be recognized inside literal strings.
1996-11-06 18:24:29 -02:00
Roberto Ierusalimschy
243b3a1a47
i/o functions return an error message
1996-11-01 16:02:53 -02:00
Roberto Ierusalimschy
389e808c60
although an ANSI function, some systems do not offer "strerror"
1996-11-01 15:54:41 -02:00
Roberto Ierusalimschy
450465c4d4
new parameters for "read" and "write". BIG CHANGE.
1996-11-01 15:03:36 -02:00
Roberto Ierusalimschy
2f44cc9f4d
new pattern matching facilities; new version of i/o lib;
...
other small corrections.
1996-11-01 15:02:10 -02:00
Roberto Ierusalimschy
d106f3f43c
pre-defined variable _VERSION_
1996-11-01 10:47:45 -02:00
Roberto Ierusalimschy
bf3091d94f
new version number
1996-11-01 10:46:59 -02:00
Roberto Ierusalimschy
4dbf7285a8
small omission corrected ("s_tsvalue")
1996-11-01 10:46:59 -02:00
Roberto Ierusalimschy
a1e41e3a12
small corrections in error messages
1996-10-31 18:18:05 -02:00
Roberto Ierusalimschy
9d0044ce53
"strfind" has an extra parameter to turn off all special characteres.
1996-10-31 15:26:04 -02:00
Roberto Ierusalimschy
37bf74efb7
some compilers do not accept "stdin"/"stdout" as constants.
1996-10-16 18:22:34 -02:00
Roberto Ierusalimschy
8c37d3b9d6
documentation of opcode meanings (thanks to lhf)
1996-09-26 18:08:41 -03:00
Roberto Ierusalimschy
0af581f0bf
new way to handle pragmas (at the lexical level, instead of parsing).
1996-09-25 18:52:00 -03:00
Roberto Ierusalimschy
2a506ea9d2
lua_linenumber is initialized in lex.c
1996-09-25 09:57:22 -03:00
Roberto Ierusalimschy
e5ec547eb3
"call" returns separate results, instead of a table.
1996-09-24 18:46:44 -03:00
Roberto Ierusalimschy
6d383202dc
"dofile" and "dostring" may return values.
1996-09-24 14:30:28 -03:00
Roberto Ierusalimschy
7b8166d7b3
a chunk may end with a return.
1996-09-24 14:29:50 -03:00
Roberto Ierusalimschy
3636bbad3a
new function "strrep"
1996-09-20 15:20:44 -03:00
Roberto Ierusalimschy
82f9f3e552
better structure to control stack interface lua-C.
...
beginblock-endblock keeps better control over stack
1996-09-20 09:51:16 -03:00
Roberto Ierusalimschy
c96ad1c945
"strmap" replaced by "strupper" and "strlower" (that's what people will
...
use, anyway).
"gsub" aceppts a function to give the replacement string.
1996-09-16 15:02:40 -03:00
Roberto Ierusalimschy
5b9fbfa006
"dostring" now stores the prefix of its string, to improve error messages.
1996-09-11 18:53:02 -03:00
Roberto Ierusalimschy
f0cc2d5506
BUG: a program ending in a comment without EOL made lex loops forever.
1996-09-09 11:11:11 -03:00
Roberto Ierusalimschy
d289ac81d3
functions may have tags CMARK and MARK, too.
1996-09-02 18:57:51 -03:00
Roberto Ierusalimschy
15791f93fe
lhf's corrections.
1996-08-28 17:46:26 -03:00
Roberto Ierusalimschy
d763b69740
skip first line of a lua file if it starts with a '#' (to allow shell
...
scripts).
1996-08-15 15:40:55 -03:00
Roberto Ierusalimschy
36dd1af92d
"[^]]" must mean "not ]".
1996-08-09 10:14:11 -03:00
Roberto Ierusalimschy
25b6dae7c0
singlematch and item_end are used by "read", in iolib.
1996-08-05 17:55:24 -03:00
Roberto Ierusalimschy
1630c2533a
Pattern-Matching!
...
plus several other changes...
1996-08-01 11:55:33 -03:00
Roberto Ierusalimschy
1d373d77de
more functions exported.
1996-08-01 11:55:33 -03:00
Roberto Ierusalimschy
f025b0d160
"pushnil" is not needed (default return is nil).
1996-08-01 11:55:33 -03:00
Roberto Ierusalimschy
cc02b4729b
new mod implementation (more portable).
1996-08-01 11:55:33 -03:00
Roberto Ierusalimschy
2bb3830fc1
"memcpy" is defined in "string.h".
1996-07-24 15:01:52 -03:00
Roberto Ierusalimschy
7a38bdd4b3
"exit" is defined in "stdlib".
1996-07-24 14:55:57 -03:00
Roberto Ierusalimschy
7614b17e85
very small corrections
1996-07-24 11:38:12 -03:00
Roberto Ierusalimschy
6dfdb76538
C functions don't need to "pushnil" to return nil value (this is
...
the default value).
1996-07-12 17:00:26 -03:00
Roberto Ierusalimschy
9a3c51cff1
new name for POSIX flag (this one turns on some posix stuff in standard
...
header files).
1996-07-06 17:20:35 -03:00
Roberto Ierusalimschy
6336d2f9e1
flag for direct execution is "-e"; argument with an "=" goes to
...
direct execution, independently of flags.
1996-07-05 17:55:43 -03:00
Roberto Ierusalimschy
ec6677e551
when "block" is computed, "nentity" == "block". So the change is only
...
a simpler way to write the same expression.
1996-06-18 18:12:23 -03:00
Roberto Ierusalimschy
20cbca699a
"lua_dofile" has a more informative return code.
1996-06-18 17:08:40 -03:00
Roberto Ierusalimschy
3211a9648a
"lua_dofile" returns different error codes if it could not open the file
1996-06-10 16:36:24 -03:00
Roberto Ierusalimschy
0baa915343
new option "-x" to execute a string given as argument.
1996-06-10 16:35:46 -03:00
Roberto Ierusalimschy
5cddb264d4
lexical analiser may use luaI_buffer, instead of waste space with
...
a separate buffer.
1996-05-30 11:04:07 -03:00
Roberto Ierusalimschy
9863223fbf
first version of vararg facility (plus new function "call").
1996-05-28 18:07:32 -03:00
Roberto Ierusalimschy
9a1948e67d
small correction.
1996-05-27 11:06:58 -03:00
Roberto Ierusalimschy
f9deeac632
"luaI_malloc(s)" is just a macro to "luaI_realloc(NULL, s)".
1996-05-24 11:31:10 -03:00
Roberto Ierusalimschy
29f0021837
variables which contain string lengths must be long (if they also may
...
be negative) or size_t.
1996-05-22 18:59:07 -03:00
Roberto Ierusalimschy
7acddb871d
memory manager for old versions of Lua. It should be in RCS since
...
the beginning.
1996-05-06 18:37:28 -03:00
Roberto Ierusalimschy
a7ca46405d
unused "#include".
1996-05-06 13:59:00 -03:00
Roberto Ierusalimschy
0e2297afaa
update of dependencies from "#include"s.
1996-05-06 11:38:40 -03:00
Roberto Ierusalimschy
0a1891f6a0
new version.
1996-05-06 11:32:59 -03:00
Roberto Ierusalimschy
1936a9e53b
tables may grow bigger than words.
1996-05-06 11:30:27 -03:00
Roberto Ierusalimschy
820ec63bdf
as strings are no more duplicated, "nextvar" can use "pushstring".
1996-05-06 11:29:35 -03:00
Roberto Ierusalimschy
01ea523b80
small corrections.
1996-05-03 17:10:59 -03:00
Roberto Ierusalimschy
88cf0836fc
"isatty" is POSIX, but not ANSI.
1996-05-03 14:27:03 -03:00
Roberto Ierusalimschy
3ec9ee0d0f
new function "luaI_openlib" to help open libs.
1996-04-30 18:13:55 -03:00
Roberto Ierusalimschy
21c9ebf4a9
new algotithm to adjust garbage collection: it tries to adapt gc calls
...
so that it collects half of the total objects when it is called.
1996-04-29 15:53:53 -03:00
Roberto Ierusalimschy
4fb77c4308
no more "lua_Reference"; new return value for "append";
...
documentation of "exit" (it was not in the manual).
1996-04-29 15:50:08 -03:00
Roberto Ierusalimschy
bced00ab9e
lua_Reference is int, so say so.
1996-04-25 11:10:00 -03:00
Roberto Ierusalimschy
25116a3065
"malloc.h" is not ansi.
1996-04-25 11:01:27 -03:00
Roberto Ierusalimschy
eadbb9cff4
"stat" is not ansi.
1996-04-23 09:43:07 -03:00
Roberto Ierusalimschy
42b947296b
"fileno" is not ansi.
1996-04-23 09:43:07 -03:00
Roberto Ierusalimschy
f37e65d1cb
"exit" has an optional parameter of status.
1996-04-22 16:28:37 -03:00
Roberto Ierusalimschy
0ef5cf2289
lock mechanism seperseded by the REFERENCE mechanism.
1996-04-22 15:00:37 -03:00
Roberto Ierusalimschy
fed9408ab5
page size "letter".
1996-04-01 11:36:35 -03:00