Commit Graph

  • 3ccbae84d2 added some casts between integral types (to avoid warnings) Roberto Ierusalimschy 2014-07-29 13:01:00 -03:00
  • 255d59ed5e some janitorial work (comments, small refactoring) Roberto Ierusalimschy 2014-07-28 14:47:53 -03:00
  • 925d1b59f9 new function 'math.ult' (unsigned less than) Roberto Ierusalimschy 2014-07-28 14:35:47 -03:00
  • 03bbe1baf1 first implementation for 'table.copy' Roberto Ierusalimschy 2014-07-25 15:46:00 -03:00
  • f9037ae8c1 'ipairs' respects metamethods Roberto Ierusalimschy 2014-07-24 16:33:29 -03:00
  • 57d8424146 extra space for new threads is initialized with a copy of the main thread, not of the creator thread. Roberto Ierusalimschy 2014-07-24 13:17:56 -03:00
  • baa0e23456 better support for extra user space associated with a Lua state Roberto Ierusalimschy 2014-07-24 11:00:16 -03:00
  • 55a710545c detail (extra byte in LUAI_EXTRASPACE to test proper alignment of a lua_State) Roberto Ierusalimschy 2014-07-23 14:16:50 -03:00
  • 753f2c1da4 better(?) alignment for some structures (pointers first) Roberto Ierusalimschy 2014-07-23 14:15:43 -03:00
  • b3b8580606 comments + proper undef of compatibility macros + no need to undef internal macros (this is the first definition) Roberto Ierusalimschy 2014-07-23 13:47:47 -03:00
  • 73ad16b5c6 no need for type 'pCallInfo' Roberto Ierusalimschy 2014-07-23 13:44:30 -03:00
  • 97e299c395 'lua_replace' implemented as a macro using 'lua_copy' Roberto Ierusalimschy 2014-07-22 15:07:47 -03:00
  • c697aa30bc more precise type for argument to 'aux_upvalue' Roberto Ierusalimschy 2014-07-21 13:02:57 -03:00
  • 17ee57f8e0 'iswhite' and related macros now can work directly on any object (no need to convert to 'GCObject') Roberto Ierusalimschy 2014-07-21 13:02:10 -03:00
  • 3c6d0aaa7d 'iswhite' and related macros now can work directly on any object (no need to convert to 'GCObject') Roberto Ierusalimschy 2014-07-19 12:14:46 -03:00
  • e43612aaf6 put the restriction that 'luaC_barrierback' works only on tables in its prototype Roberto Ierusalimschy 2014-07-19 12:09:37 -03:00
  • 2898e2fd12 removed useless assertion (gcstate != GCSpause already implied by other assertions) and wrong assertion (setmetatable uses this barrier for tables too) Roberto Ierusalimschy 2014-07-19 11:44:19 -03:00
  • 8704fca0c9 in 'luaL_checkversion_' check numeric types first. (Other tests depend on correct numeric type.) Roberto Ierusalimschy 2014-07-19 11:37:09 -03:00
  • 325e44d87e no more "-2" for limits. (Limits should be precise; safety is in the code that handles these limits.) Roberto Ierusalimschy 2014-07-18 15:29:12 -03:00
  • 54ac253343 detail (no need to define LUAI_USER_ALIGNMENT_T when it is not defined; simpler to define 'L_Umaxalign' directly) Roberto Ierusalimschy 2014-07-18 15:18:45 -03:00
  • bb12903120 type 'Udata' refers directly to structure inside the union (union used only for aligning purposes now) Roberto Ierusalimschy 2014-07-18 11:46:47 -03:00
  • ca41b43f53 type 'TString' refers directly to the structure inside the union (union used only for size purposes) Roberto Ierusalimschy 2014-07-18 10:36:14 -03:00
  • 3511e186cd ensure size for LUAI_USER_ALIGNMENT_T in tests is larger than the structures it is aligning (in most architectures) Roberto Ierusalimschy 2014-07-18 10:27:45 -03:00
  • 56137d58ff added check for conversion 'obj2gco' (and corrections for small problems detected by this check) Roberto Ierusalimschy 2014-07-18 09:17:54 -03:00
  • 9aec500a26 no need for field 'gch' anymore Roberto Ierusalimschy 2014-07-17 14:27:49 -03:00
  • 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. Roberto Ierusalimschy 2014-07-17 14:09:50 -03:00
  • 1aa4f69b51 new type 'lua_Ctx' for continuation-function contexts (to allow type to be configurable) Roberto Ierusalimschy 2014-07-17 10:53:37 -03:00
  • 8bb272a3e3 new conversion float->integer: conversion is valid only when float has an exact representation as an integer Roberto Ierusalimschy 2014-07-17 09:30:53 -03:00
  • c229ed597f 'requiref' checks 'package.loaded' before loading a module Roberto Ierusalimschy 2014-07-16 11:51:36 -03:00
  • 16b4110521 function 'type' keeps type names as upvalues to avoid creating strings everytime it is called Roberto Ierusalimschy 2014-07-16 10:56:59 -03:00
  • f14662fca6 detail (added placeholders for non-function fields to preallocate space for them) Roberto Ierusalimschy 2014-07-16 10:56:14 -03:00
  • a9af12bbe7 Table library now respects '__index'/'__newindex' metamethods Roberto Ierusalimschy 2014-07-16 09:44:52 -03:00
  • 5bbb4a06a6 removed unused parameter Ä'L' in macro 'api_check' and company Roberto Ierusalimschy 2014-07-15 18:26:50 -03:00
  • d4fb848be7 added api check in 'lua_typename' (tag is valid) Roberto Ierusalimschy 2014-07-15 18:14:49 -03:00
  • b9dcf9974d detail (typos in comments) Roberto Ierusalimschy 2014-06-30 16:48:08 -03:00
  • a77d263e86 unsigned-manipulation functions (lua_puhsunsigned, lua_tounsigned, etc.) deprecated Roberto Ierusalimschy 2014-06-26 15:38:28 -03:00
  • 7cc40851e1 emergency collection can happen even when collector is stopped Roberto Ierusalimschy 2014-06-26 15:29:05 -03:00
  • 08a9c9faa3 detail (comment) Roberto Ierusalimschy 2014-06-26 15:28:24 -03:00
  • 84fe52dbeb unsigned-manipulation functions (lua_puhsunsigned, lua_tounsigned, etc.) deprecated Roberto Ierusalimschy 2014-06-26 14:25:11 -03:00
  • 10200585a7 var-arguments to the script come from 'arg' table (not from original 'argv' array) Roberto Ierusalimschy 2014-06-26 14:08:52 -03:00
  • c94f11d783 'IntPoint' -> 'point2int' + ensure that casted value fits in destination type Roberto Ierusalimschy 2014-06-26 13:17:35 -03:00
  • 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) Roberto Ierusalimschy 2014-06-24 14:02:00 -03:00
  • 0e6229a953 use proper macros to convert 'GCObject' to other objects + better type cheking in 'set*value' macros Roberto Ierusalimschy 2014-06-19 15:39:36 -03:00
  • d2ab1aef31 detail (avoid too large macro) Roberto Ierusalimschy 2014-06-19 15:29:30 -03:00
  • 89b56e7d84 more precision between closure types ('LClosure' x 'CClosure') Roberto Ierusalimschy 2014-06-19 15:27:20 -03:00
  • 14929f5764 use appropriate macros to convert GCObject to specific types Roberto Ierusalimschy 2014-06-18 19:59:29 -03:00
  • 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) Roberto Ierusalimschy 2014-06-18 15:35:43 -03:00
  • 04da0a40c0 added assertion about sources being the same for all protos in a chunk Roberto Ierusalimschy 2014-06-18 10:54:31 -03:00
  • eb67828236 changed macro for compatibility options + details Roberto Ierusalimschy 2014-06-18 10:24:01 -03:00
  • 94266dfdbd source for all prototypes must be equal in a chunk; no need to store each one separated Roberto Ierusalimschy 2014-06-18 10:21:12 -03:00
  • e3871abe95 'math.ifloor' is back Roberto Ierusalimschy 2014-06-18 09:35:53 -03:00
  • 3fc25ff15b macro 'checkobjref' accepts NULL (as all its uses checked for NULL before) + user value from a userdata may not be a GC object Roberto Ierusalimschy 2014-06-17 14:13:29 -03:00
  • fa3113ffbf cleaner way to handle bit CIST_OAH (with auxiliar macros) Roberto Ierusalimschy 2014-06-12 16:07:30 -03:00
  • d94bb6c273 janitor work on 'lua_resume' and related code Roberto Ierusalimschy 2014-06-11 13:01:55 -03:00
  • 5784331768 new items in default path for Windows Roberto Ierusalimschy 2014-06-10 16:21:20 -03:00
  • 88a9e51f34 bit-field CIST_YIELDED removed (it was never consulted) Roberto Ierusalimschy 2014-06-10 16:18:50 -03:00
  • 8b5940e7ca must also reset CIST_OAH if necessary (CallInfo is not a fresh one) Roberto Ierusalimschy 2014-06-10 16:13:26 -03:00
  • 1a3656e56e more relaxed rules for __eq metamethod (more similar to other operators) Roberto Ierusalimschy 2014-06-10 15:53:18 -03:00
  • 542b6cfc02 no need for field 'status' in structure 'CallInfo' (after removal of 'lua_getctx') + field 'old_allowhook' can be packed into a single bit Roberto Ierusalimschy 2014-06-10 15:51:21 -03:00
  • 6f6fd96e3b new type lua_KFunction + no more 'lua_getctx' Roberto Ierusalimschy 2014-06-10 14:41:38 -03:00
  • 35a6aad0d7 added comments Roberto Ierusalimschy 2014-06-09 13:32:18 -03:00
  • 23f0ff9517 lots of janitor work (including comments) + 'arg' table created before running any script + changes in the parameters and return of 'collectargs' Roberto Ierusalimschy 2014-06-05 17:42:06 -03:00
  • 355037528c 'math.mof' works with integers, too Roberto Ierusalimschy 2014-06-02 20:09:28 -03:00
  • 9e68c047ae 'assert' does not assume that the error object is a string Roberto Ierusalimschy 2014-06-02 00:06:26 -03:00
  • e9d86eddf3 if numeral overflows the reading buffer, signal it as invalid input (resulting in nil) Roberto Ierusalimschy 2014-06-02 00:00:51 -03:00
  • 11aefa4478 details (comments) Roberto Ierusalimschy 2014-06-01 21:03:16 -03:00
  • 5ebdd326b6 detail (to avoid warnings of unused variable) Roberto Ierusalimschy 2014-05-29 16:30:07 -03:00
  • 84db17b6fc more "religious" definition for 'lua_numtointeger' Roberto Ierusalimschy 2014-05-27 10:59:03 -03:00
  • 456806f25c no more 'math.ifloor' + new semantics for 'math.floor'/'math.ceil' Roberto Ierusalimschy 2014-05-26 14:13:52 -03:00
  • c98f195eb9 function 'luaV_numtointeger' changed to a global macro 'lua_numtointeger' (tricky, small, and useful in several places) Roberto Ierusalimschy 2014-05-26 14:10:22 -03:00
  • 4d696c45b9 simpler handling of 'GCScallfin' state + more comments Roberto Ierusalimschy 2014-05-25 16:08:32 -03:00
  • 36715ab7c1 detail (comment) Roberto Ierusalimschy 2014-05-23 15:32:21 -03:00
  • e966e53791 no more use of 'scanf' for reading numbers Roberto Ierusalimschy 2014-05-21 12:24:21 -03:00
  • c4eff10322 small improvements concerning 'check_next' Roberto Ierusalimschy 2014-05-21 12:22:02 -03:00
  • 8a0acf0898 comments Roberto Ierusalimschy 2014-05-20 11:12:59 -03:00
  • e2be310a85 better(?) implementation for 'pcall'/'xpcall' (regarding the insertion of the boolean first result) Roberto Ierusalimschy 2014-05-16 15:54:01 -03:00
  • 17159b491c more direct implementation of 'table.pack' Roberto Ierusalimschy 2014-05-16 15:53:25 -03:00
  • 0aa32fa0cb small changes in field order in some structs to reduce padding Roberto Ierusalimschy 2014-05-15 17:41:27 -03:00
  • 8927c14317 removed macro 'luai_checknum' (as NaN trick is not doable now) Roberto Ierusalimschy 2014-05-15 17:28:39 -03:00
  • 3e977f02ac added a few comments Roberto Ierusalimschy 2014-05-15 17:08:32 -03:00
  • a73da6112d deprecated library throws an error if called (instead of silently not loading itself) Roberto Ierusalimschy 2014-05-15 16:28:34 -03:00
  • 6a5d87771f added lots of new comments + small changes in code Roberto Ierusalimschy 2014-05-15 16:27:33 -03:00
  • 15e8405731 'LUA_COMPAT_ALL' -> 'LUA_COMPAT_5_1'/'LUA_COMPAT_5_2' + "@*" in comments replaced by "@@". ("@*" is too distracting) Roberto Ierusalimschy 2014-05-15 12:24:32 -03:00
  • fd1672ba98 avoid non-conformant pointer arithmetic in api check for 'lua_rotate' Roberto Ierusalimschy 2014-05-15 12:22:45 -03:00
  • 1ddb251d86 using a more conventional handling of stack space in 'io_readline' Roberto Ierusalimschy 2014-05-15 12:21:06 -03:00
  • f8daddba50 added a compat option (although it will be off by default) to the addition of '.0' to float->string conversions Roberto Ierusalimschy 2014-05-14 16:47:11 -03:00
  • e58ef8d0bb missing macro 'LUAMOD_API' in function to open library Roberto Ierusalimschy 2014-05-14 15:33:37 -03:00
  • e3b9569e04 function 'reverse' uses appropriate variants of 'setobj' for better documentation Roberto Ierusalimschy 2014-05-14 15:32:30 -03:00
  • 8b66040e34 several functions deprecated (cosh, sinh, atanh, pow, frexp, ldexp) Roberto Ierusalimschy 2014-05-14 13:59:27 -03:00
  • 965993da07 comments added to 'lua_rotate' Roberto Ierusalimschy 2014-05-14 11:20:17 -03:00
  • 5a5a834975 new API function 'lua_rotate' Roberto Ierusalimschy 2014-05-13 16:40:28 -03:00
  • 45c430eac0 addition of '.0' to float representation done by the kernel Roberto Ierusalimschy 2014-05-12 18:44:17 -03:00
  • 27d9219cf3 no more integer exponentiation Roberto Ierusalimschy 2014-05-12 18:22:05 -03:00
  • 12bd01c567 added comments to several functions Roberto Ierusalimschy 2014-05-12 16:13:32 -03:00
  • 626124d2d8 old POSIX systems need '<sys/types.h>' for 'off_t' Roberto Ierusalimschy 2014-05-11 11:46:19 -03:00
  • 5018104a60 better error message for unfinished long strings/comments Roberto Ierusalimschy 2014-05-11 11:45:43 -03:00
  • ec11d132db comments Roberto Ierusalimschy 2014-05-11 10:03:48 -03:00
  • 06dc893f88 in 'for' loops, make the limit an integer whenever initial value and step are integers Roberto Ierusalimschy 2014-05-09 11:20:52 -03:00
  • a09bd59615 'T.totalmem' accepts 0 for unlimited memory Roberto Ierusalimschy 2014-05-08 16:08:46 -03:00
  • 42ff788e53 comments Roberto Ierusalimschy 2014-05-08 15:58:46 -03:00