Commit Graph

59 Commits

Author SHA1 Message Date
Roberto Ierusalimschy 413a393e62 Stack indices changed to union's
That will allow to change pointers to offsets while reallocating
the stack.
2022-10-29 12:06:37 -03:00
Roberto Ierusalimschy e500892e18 Optimization/simplification of 'getbaseline'
By producing absolute line information at regular intervals, a simple
division can compute the correct entry for a given instruction.
2021-02-02 14:43:55 -03:00
Roberto Ierusalimschy 949187b049 Optimizations for line hook
The function 'changedline' tries harder to avoid calling
'luaG_getfuncline' plus small changes in the use of 'L->oldpc'.
2021-01-28 14:40:29 -03:00
Roberto Ierusalimschy 4bd10b6fe8 Better error messages for calling non-callable objects
When available, use the calling code to find a suitable name for what
was being called; this is particularly useful for errors of non-callable
metamethods. This commit also improved the debug information for
order metamethods.
2020-12-29 13:15:54 -03:00
Roberto Ierusalimschy a2195644d8 Fixed bug: invalid 'oldpc' when returning to a function
The field 'L->oldpc' is not always updated when control returns to a
function; an invalid value can seg. fault when computing 'changedline'.
(One example is an error in a finalizer; control can return to
'luaV_execute' without executing 'luaD_poscall'.) Instead of trying to
fix all possible corner cases, it seems safer to be resilient to invalid
values for 'oldpc'. Valid but wrong values at most cause an extra call
to a line hook.
2020-07-17 11:01:05 -03:00
Roberto Ierusalimschy 6d04537ea6 A to-be-closed variable must have a closable value (or be nil)
It is an error for a to-be-closed variable to have a non-closable
non-nil value when it is being closed. This situation does not seem to
be useful and often hints to an error. (Particularly in the C API, it is
easy to change a to-be-closed index by mistake.)
2018-11-29 16:02:44 -02:00
Roberto Ierusalimschy e073cbc2e5 Better error messages for invalid operands in numeric 'for'
"Better" and similar to error messages for invalid function arguments.
  *old message: 'for' limit must be a number
  *new message: bad 'for' limit (number expected, got table)
2018-10-30 15:46:56 -03:00
Roberto Ierusalimschy f99509581e Removed extra information from RCS keyword strings
Version numbers and dates (mostly wrong) from RCS keyword strings
removed from all source files; only the file name are kept.
2018-08-23 14:26:12 -03:00
Roberto Ierusalimschy 6f2b8e21c4 added 'const' to 'Proto*' when possible 2018-06-08 16:06:59 -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 e2b15aa21d janitor work on casts 2018-01-28 13:13:26 -02: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 6142e663e4 reuse of 'addinfo' by lexical errors 2015-05-22 14:45:56 -03:00
Roberto Ierusalimschy 0cf3b6495a 'ci_func' don't need to be exported 2015-03-11 13:10:41 -03:00
Roberto Ierusalimschy ad20689feb better error message for bitwise operators (they are not arithmetic...) 2014-11-10 12:46:05 -02:00
Roberto Ierusalimschy fed236ca7f detail (unknown lines are marked as -1, not 0) 2014-02-25 11:31: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 9b9becf384 added 'const' to parameters of 'luaG_concaterror' 2013-04-29 13:58:10 -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 217e67cb22 new type 'l_noret' for function that do not return 2011-10-07 17:45:19 -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 2258ec6bc9 'getline' renamed to 'getfuncline' (to avoid problems with POSIX) 2009-06-10 13:57:53 -03:00
Roberto Ierusalimschy d7bc346d7a no more code checking 2009-04-30 14:42:21 -03:00
Roberto Ierusalimschy 8718fda9b2 added LUAI_FUNC to functions not in the API 2005-04-25 16:24:10 -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 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 fa26d294ae new way to control `pc' of running functions 2003-07-16 17:49:02 -03:00
Roberto Ierusalimschy 43013b39cc new representation for hooks (to allow asynchronous calls to sethook) 2002-11-18 09:01:55 -02: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 8e4ac679ff use a linear count for count hook 2002-08-12 14:23:12 -03:00
Roberto Ierusalimschy 9998082839 external messages add their own extra information 2002-08-08 17:08:41 -03:00
Roberto Ierusalimschy 2e38c6ae5a `luadebug.h' content now is included in `lua.h' 2002-08-06 15:01:50 -03:00
Roberto Ierusalimschy a2fa48a570 new (old?) error handling scheme 2002-08-06 12:32:22 -03:00
Roberto Ierusalimschy 0417a4bb0b new implementation for tailcalls and error handling 2002-08-05 11:51:21 -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 922f36a05b details 2002-06-24 12:07:21 -03:00
Roberto Ierusalimschy 1dbe708aa8 new protocol for error handling 2002-06-18 12:19:27 -03:00
Roberto Ierusalimschy b7a0503c1d new format for error messages 2002-05-15 15:57:44 -03:00
Roberto Ierusalimschy 9a0f0dcc77 precompiler may create functions without `lineinfo' 2002-05-02 10:06:20 -03:00
Roberto Ierusalimschy 6c7334a9ac line trace uses `savedpc' to save last `pc' seen 2002-04-10 09:11:07 -03:00
Roberto Ierusalimschy 801aaf37b1 simpler implementation for line information 2002-03-25 14:47:14 -03:00
Roberto Ierusalimschy 938092489b erroneous objects may not live in the stack 2002-03-19 09:45:25 -03:00
Roberto Ierusalimschy 72659a0605 no more explicit support for wide-chars; too much troble... 2001-11-28 18:13:13 -02:00
Roberto Ierusalimschy 2a4afb97c8 new module lopcodes.c for tables describing opcodes 2001-06-28 16:58:57 -03:00
Roberto Ierusalimschy 0a1b1acdd3 details about opcode parameters 2001-06-11 11:56:42 -03:00
Roberto Ierusalimschy 65c289b046 details 2001-06-07 10:46:29 -03:00
Roberto Ierusalimschy 762d059a13 new implementation for the Virtual Machine 2001-06-05 15:17:01 -03:00
Roberto Ierusalimschy 39b7978329 first (big) step to support wide chars 2001-02-23 14:17:25 -03:00
Roberto Ierusalimschy b3da4ee907 checking consistency of jumps. 2001-02-12 17:54:50 -02:00