Roberto Ierusalimschy
ab5a650029
details (direct access to 'Ck' bit in instructions)
2017-05-08 13:08:01 -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
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
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
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
6a98aa0bb0
new opcode LOADI (for loading immediate integers)
2017-04-20 16:53:55 -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
2331e1beec
small changes in 'luaC_upvalbarrier'
2017-04-06 10:08:56 -03: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
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
c5112f7b15
details (comments)
2015-11-23 09:30:45 -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
9a5d6aedb7
trying to optimize a little 'luaD_poscall'
2015-11-13 11:24:26 -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
ff1289a361
in 'luaD_call', use two functions instead of one with fixed boolean
...
argument
2015-11-02 16:48:07 -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
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
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
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
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
ee5edb6b68
macros 'getaddrstr' and 'getstr' unified (they do the same thing)
2015-09-17 12:51:05 -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
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
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
e247c3ada3
implementation of fast track for gettable operations
2015-07-20 15:24:50 -03:00
Roberto Ierusalimschy
319ccfefbc
computations in numerical for loop must avoid overflows too
2015-07-04 13:31:03 -03:00
Roberto Ierusalimschy
f01c12c891
detail (cast to avoid mixing types in conditional expression)
2015-06-25 11:00:01 -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
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
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
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
0ec12c1bd1
new semantics for numerical order (following math regardless
...
representation)
2015-05-20 13:22:55 -03:00
Roberto Ierusalimschy
04ba6ea83b
new semantics for equality int-float
2015-04-29 15:27:16 -03:00
Roberto Ierusalimschy
ae76c39712
Bug: suspended '__le' metamethod can give wrong result
2015-04-10 14:56:25 -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
4ba0cb4580
always use macros to operate on lua_Numbers
2015-03-07 16:30:16 -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
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
c8d6cb0136
macros 'luai_num*' (for float arithmetic operations) moved to
...
llimits.h.
2015-02-05 15:15:33 -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
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
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
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
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
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
bdf566a8a3
`name' in comments changed to 'name'
2014-10-25 09:50:46 -02:00
Roberto Ierusalimschy
463edee2fd
'lua_numtointeger' -> 'lua_numbertointeger'
2014-10-24 09:42:06 -02:00
Roberto Ierusalimschy
f97c64d7bf
macros 'LUA_QL'/'LUA_QL' deprecated
2014-10-17 13:28:21 -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
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
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
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
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
b9dcf9974d
detail (typos in comments)
2014-06-30 16:48:08 -03:00
Roberto Ierusalimschy
89b56e7d84
more precision between closure types ('LClosure' x 'CClosure')
2014-06-19 15:27:20 -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
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
36715ab7c1
detail (comment)
2014-05-23 15:32:21 -03:00
Roberto Ierusalimschy
8a0acf0898
comments
2014-05-20 11:12:59 -03:00
Roberto Ierusalimschy
3e977f02ac
added a few comments
2014-05-15 17:08:32 -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
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
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
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
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
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
e98ba351ce
n^-m gives float result (instead of error)
2014-04-27 11:41:11 -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
2771050dfa
'MIN/MAX_INTEGER' replaced by 'LUA_MIN/MAXINTEGER'
2014-04-11 16:02:16 -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
7d514af0bc
bug (in work version): comparisons should not try to convert
...
strings to numbers
2014-04-02 13:54:20 -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
ea69f17d98
macro 'tostring' is used only by 'luaV_concat'
2014-03-31 15:37:52 -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
cd12410195
new macro 'cast_void'
2014-03-07 13:19:00 -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
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
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
0a850e641d
larger limit + better error messages for loop detection in inheritance
2014-01-22 18:02:04 -02:00
Roberto Ierusalimschy
1ea2d20f74
first implementation of '<<', '>>', and '~' (bitwise not)
2013-12-30 18:47:58 -02:00
Roberto Ierusalimschy
c0edab0f6d
first implementation of bitwise operators '&' (band), '|' (bor),
...
and '~' (bxor)
2013-12-18 12:12:03 -02:00
Roberto Ierusalimschy
a8f8c7fd80
integer exponentiation with negative exponent is invalid
2013-12-16 12:30:22 -02: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
af35c7f398
upvalues collected by reference count
2013-08-27 15:53:35 -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
439d74e29f
added 'local' bit (true => object is only refered by local variables)
2013-08-16 15:55:49 -03:00
Roberto Ierusalimschy
2f8c51a552
use unsigneds for unary minus, too
2013-07-10 14:15:12 -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
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
318575627f
avoid adding '.0' to "numbers" like "nan" and "inf"
2013-06-07 16:02:05 -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
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
b22a4280c6
macro 'nvalue' removed + cast to void added to avoid warnings
...
with 'clang'
2013-05-06 14:17:09 -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
360587f319
favoring 'tonumber' over 'nvalue'
2013-04-26 16:51:17 -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
a2f5c28a80
new operation '//' (integer division)
2013-04-26 10:08:29 -03:00
Roberto Ierusalimschy
bb1851ce98
'for' loop uses integers when possible
2013-04-25 16:50:02 -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
d4f0c4435d
a few more operations supporting integers (minus, umin, mult)
2013-04-16 15:43:05 -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
8f8665fffa
'ttypenv' -> 'ttnov'
2013-04-12 16:07:09 -03:00
Roberto Ierusalimschy
75250a237c
typos in comments
2013-03-16 18:10:18 -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
53480f1163
details (remove of some extra spaces)
2012-08-14 15:12:34 -03:00
Roberto Ierusalimschy
cc2a60ecb7
bugs in yields inside debug hooks
2012-06-08 12:14:04 -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
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
a4b96ce9a3
first implementation of long strings
2012-01-25 19:05:40 -02:00
Roberto Ierusalimschy
9f1a8dbdd3
'eqstr' -> 'luaS_eqstr'
2012-01-23 21:05:18 -02:00
Roberto Ierusalimschy
c82087b8dd
cast from 'bool' to 'int' (for C++)
2011-12-07 12:43:55 -02:00
Roberto Ierusalimschy
8c62bde36f
comment
2011-11-29 13:54:38 -02:00
Roberto Ierusalimschy
8119374e74
avoid warnings of unreacheable 'break's
2011-11-28 15:25:16 -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
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
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
f62565abea
avoid warnings with -Wstrict-overflow
2011-06-09 15:24:22 -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
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
81952e6884
avoid using expression as argument to unsafe macro 'l_isfalse'
2011-05-05 13:16:33 -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
05ca63642b
added macro for code checking
2011-04-18 16:48:53 -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
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
e7a9c45a48
trying to avoid assumption that sizeof(char)==1
2011-02-07 17:15:24 -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
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
c9af0768fc
GC does not mark dead registers inside activation record
2010-12-17 10:05:37 -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
fdd5f2f7a3
comment typos
2010-10-29 15:52:46 -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
a71c5f6f53
typo in comments
2010-06-30 11:11:17 -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
cf531912f2
one more macro (mvdispatch) to easy experiments with alternative
...
dispatch methods
2010-05-13 16:53:05 -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
237f755dca
typos in comments
2010-05-05 15:49:56 -03:00
Roberto Ierusalimschy
fde866e303
details (comments)
2010-05-04 14:25:19 -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
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
b7be05ad27
invalid instructions "cannot" happen
2010-04-15 16:43:43 -03:00
Roberto Ierusalimschy
7dfa4cd655
first implementation of light C functions
2010-04-14 12:13:48 -03:00
Roberto Ierusalimschy
d394d5536a
new macro 'eqstr'
2010-04-05 13:26:37 -03:00
Roberto Ierusalimschy
a08fc34ee4
avoid using 'luaS_new' when can use 'luaS_newlstr'
2010-04-02 12:39:07 -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
064e406f67
no more fenvs!
2010-03-26 17:58:11 -03:00
Roberto Ierusalimschy
25c557ec63
first version of _ENV; no more global variables
2010-03-12 16:14:06 -03:00
Roberto Ierusalimschy
347f0c33d1
avoid 'continue' unless necessary
2010-02-27 18:16:24 -03:00
Roberto Ierusalimschy
0fe2576a39
new instructions to optimize indexing on upvalues
2010-02-26 17:40:29 -03:00
Roberto Ierusalimschy
36ab1ee10c
__unm metamethod gets nil as its 2nd parameter
2010-01-15 14:23:58 -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
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
77077b39d5
comment explaining OP_VARARG was wrong (and corresponding code was not
...
very clear)
2009-10-28 10:20:07 -02: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
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
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
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
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
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
77fd93188e
'lessequal' renamed 'luaV_lessequal' and exported to be used by
...
'lua_compare'
2009-06-17 13:17:14 -03:00
Roberto Ierusalimschy
2258ec6bc9
'getline' renamed to 'getfuncline' (to avoid problems with POSIX)
2009-06-10 13:57:53 -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
eea6d10866
details (use ci->base instead of L->base when possible)
2009-05-22 12:19:54 -03:00
Roberto Ierusalimschy
d7bc346d7a
no more code checking
2009-04-30 14:42:21 -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
4f88418170
'CallInfo' stack implemented as double-linked list instead of an array
2009-04-17 11:28:06 -03:00
Roberto Ierusalimschy
ba484b9eb1
yielding across lua_call (first version)
2009-03-10 14:14:37 -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
facfcd497f
detail
2009-03-02 13:34:23 -03:00
Roberto Ierusalimschy
2b590aea40
no more '__len' metamethod for strings
2009-02-16 17:09:28 -03: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
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
a4d3080fe3
SETLIST extra argument now is an "instruction" (OP_EXTRAARG)
2008-04-02 14:38:54 -03:00
Roberto Ierusalimschy
fe0838cd1c
tables and strings respect __len metamethod
2007-09-10 14:59:32 -03:00
Roberto Ierusalimschy
6c042e17b1
avoid boolean equality (tricky for some compilers)
2007-06-19 16:48:15 -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
08f902cf49
better documentation for auxiliary functions (that should be called only
...
through specific macros).
2007-02-09 11:04:52 -02: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
a7c9e45c64
avoid trailing white spaces
2006-09-11 11:07:24 -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
fa0c03aaa6
details
2006-07-14 13:22:24 -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
e2dc5f5d15
extra assertion
2006-06-05 12:58:59 -03:00
Roberto Ierusalimschy
9e6e43984d
details
2006-01-23 17:51:43 -02:00
Roberto Ierusalimschy
dd1221582b
details
2006-01-10 10:50:00 -02:00
Roberto Ierusalimschy
c505f341d6
small changes in casts
2005-12-22 14:19:56 -02:00
Roberto Ierusalimschy
a160266c3d
details
2005-11-01 14:08:45 -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
cd12ab2597
details (more uniform coding)
2005-10-13 09:21:26 -03:00
Roberto Ierusalimschy
a77413acd0
include of math.h depends on luaconf
2005-10-03 11:01:26 -03:00
Roberto Ierusalimschy
6dd3a73ca2
detail (macro evaluates twice its arguments)
2005-09-09 15:23:35 -03:00
Roberto Ierusalimschy
3b19af44b0
new method to handle tests without values (negative values)
2005-08-29 17:49:21 -03:00
Roberto Ierusalimschy
98296f6b45
some bugs related to stack reallocation
2005-08-24 13:15:49 -03:00
Roberto Ierusalimschy
6fcd334ca0
small improvements
2005-08-22 15:54:49 -03:00
Roberto Ierusalimschy
42a662334a
simpler implementation for unary minus
2005-08-10 17:20:13 -03:00
Roberto Ierusalimschy
44b19075c0
small changes (to easy integration with Coco)
2005-08-09 16:49:04 -03:00
Roberto Ierusalimschy
894cd31c52
#string is primitive
2005-08-09 14:42:02 -03:00
Roberto Ierusalimschy
ee1edd5734
detail
2005-07-05 11:31:20 -03:00
Roberto Ierusalimschy
5fa2bec1f0
bug: current line should work for call hook
2005-06-13 11:15:22 -03:00
Roberto Ierusalimschy
90de38bf1f
warnings in VS .Net
2005-05-31 11:25:18 -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
65f4a0f636
no more compatibility code for traversing tables
2005-05-04 17:42:28 -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
9b8d136e1c
`*' operator is primitive only for tables
2005-05-02 14:49:43 -03:00
Roberto Ierusalimschy
a7ea0c71e8
detail
2005-04-11 15:01:29 -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
ade585bdf9
no more LUA_FIRSTINDEX
2005-03-28 14:17:53 -03:00
Roberto Ierusalimschy
47984a0cc2
internal definitions have prefix `luai_'
2005-03-18 15:01:37 -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
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
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