Commit Graph

251 Commits

Author SHA1 Message Date
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 0183b8030c `free' gets size of the block: complete control over memory use 2000-12-28 10:55:41 -02:00
Roberto Ierusalimschy 4894c27962 lua_Number defined in lua.h (1st version) 2000-12-04 16:33:40 -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 b892f0a877 new API function `createuserdata' 2000-10-26 10:47:05 -02: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 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 c2aa7bd72d bug: lua_gettable does not get key from stack top 2000-09-25 11:48:42 -03:00
Roberto Ierusalimschy eb822c314a macros to do jumps 2000-09-20 14:57:08 -03:00
Roberto Ierusalimschy 787a78f83e new scheme for buffers 2000-09-11 14:38:42 -03:00
Roberto Ierusalimschy 6e80c1cde1 new version for API 2000-09-05 16:33:32 -03:00
Roberto Ierusalimschy ebdd4e8451 `call' doesn't use pack anymore 2000-08-31 18:02:55 -03:00
Roberto Ierusalimschy 100bfec39a new implementation for `next' 2000-08-31 11:08: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 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 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 c39bec81dc bug: lastpc was not initialized 2000-08-09 11:49:41 -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 cfba572076 remove dummy argument in LUA_ASSERT 2000-06-30 11:35:17 -03:00
Roberto Ierusalimschy 014a09c509 better error messages 2000-06-28 17:21:06 -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 8d2baf719c comment 2000-06-19 15:04:41 -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 292c953018 new auxiliar function `luaH_setstr' 2000-06-05 17:15:33 -03:00
Roberto Ierusalimschy dbfb810267 cleansing of lparser.c 2000-06-05 11:56:18 -03:00
Roberto Ierusalimschy 7e30900def better field name 2000-05-30 16:00:31 -03:00
Roberto Ierusalimschy ed94a85f0c type details 2000-05-25 16:02:21 -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 11a7022067 global variables are stored in a Lua table 2000-05-08 16:32:53 -03:00
Roberto Ierusalimschy 89a9c36281 no more `register' declarations: leave it to the compiler. 2000-04-19 10:36:25 -03:00
Roberto Ierusalimschy 634c3d57e9 optimization for SETLOCAL was too specific. 2000-04-14 14:46:15 -03:00
Roberto Ierusalimschy e7c8393682 optimization INCLOCAL is not necessary, with `for' 2000-04-13 13:51:01 -03:00
Roberto Ierusalimschy f9cf402fbd first implementation of FOR 2000-04-12 15:57:19 -03:00
Roberto Ierusalimschy 031978798c more optimizations 2000-04-07 10:13:11 -03:00
Roberto Ierusalimschy 4e7e9e8de5 new opcode INCLOCAL. 2000-04-04 17:48:44 -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 4fb8e93c36 small optimization for i..'' 2000-03-17 10:09:12 -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 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 3c9d999424 many details (most by lhf). 2000-03-03 11:58:26 -03:00
Roberto Ierusalimschy 4d4e6f07c0 all order operators use a single tag method (<) 2000-02-22 16:12:46 -02:00
Roberto Ierusalimschy 3bc925138e first version of code optimizer 2000-02-22 11:31:43 -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 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 512b15b601 small optimizations (relational operators) 2000-01-19 14:50:30 -02:00
Roberto Ierusalimschy 2877bad4c2 new debug API (first version) 2000-01-19 10:00:45 -02:00
Roberto Ierusalimschy 46ec57cbc6 little change when calling tag methods 2000-01-13 13:56:03 -02:00
Roberto Ierusalimschy bcdbdaccc3 more debug information (still with bug for tag methods...) 1999-12-30 16:28:40 -02:00
Roberto Ierusalimschy 298d0abff7 first version of extra debug information (NAME) 1999-12-29 14:31:15 -02:00
Roberto Ierusalimschy acdb0b741e comments. 1999-12-27 15:33:22 -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 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 1b15206cf9 many details + code redistribution 1999-12-14 16:33:29 -02:00
Roberto Ierusalimschy dea54a7c71 comments 1999-12-09 18:01:48 -02:00
Roberto Ierusalimschy ba1f504970 `optimization' doesn't seem to make any difference... 1999-12-06 17:30:53 -02:00
Roberto Ierusalimschy 1fdb445e7d details. 1999-12-06 09:40:55 -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 33b8a01032 new way to code CALLs + passing multiple arguments between function calls 1999-11-25 16:59:43 -02:00
Roberto Ierusalimschy 29ede6aa13 first implementation of multiple states (reentrant code). 1999-11-22 11:12:07 -02:00
Roberto Ierusalimschy cde179b369 new implementation for global variable values (separated from strings) 1999-11-04 15:23:12 -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 7eb2f18621 remove of some useless #includes 1999-09-17 13:53:54 -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 c787dccd9b "const" !!! 1999-08-16 17:52:00 -03:00
Roberto Ierusalimschy a82c8185bc details 1999-08-10 09:55:47 -03:00
Roberto Ierusalimschy 521b38532a better interfaces for luaD_calln (x luaD_call) 1999-06-22 17:37:23 -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 0bbd96bd5f details. 1999-04-13 16:28:49 -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 677188de8a details. 1999-03-04 18:15:50 -03:00
Roberto Ierusalimschy 9d7bae0b6a better instrumentation for internal debugging 1999-02-24 14:55:51 -03:00
Roberto Ierusalimschy c364e9f97e LONGARGW (for completeness). 1999-02-23 10:38:38 -03:00
Roberto Ierusalimschy b82ff713e3 new name for opcode 1999-02-09 16:01:55 -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 5687949560 "lua_debug", "lua_callhook" and "lua_linehook" must be inside "lua_state". 1999-02-04 15:47:59 -02:00
Roberto Ierusalimschy cbc58af260 new opcode for "long" arguments (3 bytes) 1999-02-04 14:36:16 -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 4a13f513f8 luaH_set does the set! 1999-01-25 15:39:28 -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 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 8396027516 better precision when converting numbers to strings. 1999-01-12 16:38:35 -02:00
Roberto Ierusalimschy 59f8e6fb77 details ("settable") 1998-12-30 15:26:49 -02:00
Roberto Ierusalimschy fe5c41fb8a new functions "tinsert" and "tremove" 1998-12-30 11:16:50 -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 a881abfd1e "strtod" is cleaner than "scanf" for this job. 1998-12-24 12:57:23 -02:00
Roberto Ierusalimschy 5ca2709ba0 small warnings 1998-12-03 13:45:15 -02:00
Roberto Ierusalimschy afb5ef72e1 new function "sort" + many small changes 1998-07-12 13:16:43 -03:00
Roberto Ierusalimschy 1917149fdd details. 1998-06-11 15:21:37 -03:00
Roberto Ierusalimschy 62c36a6056 better error message when '^' is not defined. 1998-05-31 19:18:24 -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 2a2b64d6ac opcode "CLOSURE" gets the prototipe (instead of a previous pushconstant) 1998-03-25 15:52:29 -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 88a2023c32 support for strings with '\0' 1998-03-06 13:54:42 -03:00
Roberto Ierusalimschy b9acf4b4af "strcoll" may not exist in ond ansi machines 1998-01-14 11:49:15 -02:00
Roberto Ierusalimschy f0dffaa209 new way to hanlde arg information 1998-01-12 11:35:37 -02:00
Roberto Ierusalimschy f76bca23ef variants for "ARGS". 1997-12-30 17:08:23 -02:00
Roberto Ierusalimschy 4e0bf95622 variant opcodes for PUSHSELF 1997-12-29 15:35:46 -02:00
Roberto Ierusalimschy 541e722360 details 1997-12-23 17:24:19 -02:00
Roberto Ierusalimschy 502343b402 new scheme for buffers, centralized in auxlib. 1997-12-17 18:48:58 -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 80b3d28f4a details (mainly error messages) 1997-12-09 11:50:08 -02:00
Roberto Ierusalimschy accd7bc253 small modifications (format, small optimizations, etc) 1997-11-21 17:00:46 -02:00
Roberto Ierusalimschy 592a3f289b first implementation of centralized global state. 1997-11-19 15:29:23 -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 e78cf96c97 first version of Cclosures. 1997-10-24 15:17:24 -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 7c261a13b5 more uniform treatment to opcode variants. 1997-10-13 20:12:04 -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 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 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