Commit Graph

166 Commits

Author SHA1 Message Date
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
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
cf7eff45f3 keep control of stack top in Lua functions concentrated in 'luaV_execute' 2017-12-28 13:42:57 -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
b3f924bc69 'Proto->numparams' does not include vararg parameter
(one less subtraction when calling functions...)
2017-12-15 11:07:10 -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
ac78b914b6 warnings from Visual Studio /W3 2017-11-30 13:37:16 -02:00
Roberto Ierusalimschy
093c16b67b new opcodes 'OP_LTI' and 'OP_LEI' 2017-11-27 15:44:31 -02:00
Roberto Ierusalimschy
73abfde2ef small simplifications around 'luaT_callorderTM' 2017-11-23 17:18:10 -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
ad0704e40c back to 'CallInfo' (no gains with its removal) 2017-11-07 11:25:26 -02:00
Roberto Ierusalimschy
54eb35a8aa more fields moved out of 'CallInfo' 2017-11-03 10:12:30 -02:00
Roberto Ierusalimschy
9ed9f40f1e avoid warning about 'const' 2017-10-04 12:49:05 -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
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
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
5c8770f896 back to old-style vararg system (with vararg table collecting extra
arguments)
2017-05-13 10:04:33 -03:00
Roberto Ierusalimschy
fb9de1b4d7 detail ('luaT_callbinTM' does not need to be extern) 2017-05-08 12:57:23 -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
2a235312f0 detail (removing spaces at end of lines) 2016-12-22 11:08:50 -02:00
Roberto Ierusalimschy
7777b412de When available, use metafield '__name' in error messages 2016-02-26 16:20:15 -03: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
ff1289a361 in 'luaD_call', use two functions instead of one with fixed boolean
argument
2015-11-02 16:48:07 -02:00
Roberto Ierusalimschy
3a91274547 details (avoid 'lint' warnings) 2015-03-30 12:42:59 -03:00
Roberto Ierusalimschy
5fbd40dbe5 'x//y' extended to floats 2014-11-21 10:15:57 -02:00
Roberto Ierusalimschy
779381fe9e detail (comment) 2014-11-10 15:24:43 -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
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
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
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
1a3656e56e more relaxed rules for __eq metamethod (more similar to other
operators)
2014-06-10 15:53:18 -03:00
Roberto Ierusalimschy
218f358461 errors like 1e100 << "2" were giving wrong messages 2014-04-11 17:17:39 -03: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
a948054a19 new order for binary operations (grouping them by type of result) 2013-12-16 17:06:52 -02:00
Roberto Ierusalimschy
af35c7f398 upvalues collected by reference count 2013-08-27 15:53:35 -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
f2043b7a58 correct error message for conversion errors from float to int 2013-05-06 14:21:59 -03:00
Roberto Ierusalimschy
b4be507578 new function 'luaT_trybinTM' 2013-04-29 13:56:50 -03:00
Roberto Ierusalimschy
a2f5c28a80 new operation '//' (integer division) 2013-04-26 10:08:29 -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
8f8665fffa 'ttypenv' -> 'ttnov' 2013-04-12 16:07:09 -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
98816d0ce5 small problems with 'luaone.c' 2011-02-28 14:32:10 -03:00
Roberto Ierusalimschy
7dfa4cd655 first implementation of light C functions 2010-04-14 12:13:48 -03: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
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