Commit Graph

  • 6b9dece367 Fix mathlib min, max and atan2 behaviour Enrico Horn 2021-07-09 23:06:29 +02:00
  • 179062493d Implement package.seeall Enrico Horn 2021-07-09 22:43:00 +02:00
  • f81bc1e174 Make some errors compatible with native lua Enrico Horn 2021-07-09 22:04:36 +02:00
  • bf23883492 Define clean up steps and clean up code Enrico Horn 2021-07-09 20:37:32 +02:00
  • 5465eff841 Update test result files in a platform dependant manner from native lua Enrico Horn 2021-07-04 23:13:22 +02:00
  • ddc7531845 Remove invalid lua5.2 OOB calls from tablelib.lua Enrico Horn 2021-07-05 21:15:21 +02:00
  • 58a4dec882 Update errors tests for lua 5.2 Enrico Horn 2021-07-08 22:45:26 +02:00
  • f91cc9a509 Scripts to create result files from native lua Enrico Horn 2021-07-05 21:13:49 +02:00
  • 9792fcb018 Cleanup Tests with JUnit5 and move to different modules Enrico Horn 2021-07-11 23:01:01 +02:00
  • 1a6de4a227 Remove temprory test files and ignore them Enrico Horn 2021-07-11 23:00:02 +02:00
  • 1833c57d4d Extract luaj3.0-tests.zip to luaj-test/src/test/resources and delete it Enrico Horn 2021-07-11 22:59:08 +02:00
  • e7e6190f9c Add formatter definition and format code Enrico Horn 2021-07-03 22:23:09 +02:00
  • 3c266bcc98 Move Lua5x.jj to lua-jse and customize package name Enrico Horn 2021-07-03 22:19:30 +02:00
  • d2a92c07d3 Convert all line endings to Unix Enrico Horn 2021-07-03 15:04:49 +02:00
  • 602dc88580 Version farmboy0-3.0.3 v3.0.3-farmboy0 farmboy0/farmboy0-3.0.3 Enrico Horn 2021-04-13 20:00:36 +02:00
  • a58147ddfa Move sources into maven modules Enrico Horn 2021-03-08 20:32:14 +01:00
  • 74e5ef6f36 Ignore eclipse project files Enrico Horn 2021-03-07 01:39:37 +01:00
  • a9d475bbbf Remove eclipse project files Enrico Horn 2021-03-05 21:26:41 +01:00
  • c62eabbf15 Bump junit from 3.8.1 to 4.13.1 in /examples/maven yut23/dependabot/maven/examples/maven/junit-junit-4.13.1 uyong/dependabot/maven/examples/maven/junit-junit-4.13.1 farmboy0/dependabot/maven/examples/maven/junit-junit-4.13.1 fabrice-ducos/dependabot/maven/examples/maven/junit-junit-4.13.1 dependabot/maven/examples/maven/junit-junit-4.13.1 dependabot[bot] 2020-10-13 02:12:41 +00:00
  • 12a449abec Reduce allocations per LuaClosure call TheoTown-Team/master TheoTown-Team/HEAD TheoTown-Team/master Lobby 2020-09-01 10:38:36 +02:00
  • 1084047e47 Revert "Update LuaClosure.java" Lobby 2020-09-01 10:29:49 +02:00
  • 7ed120b704 Update LuaClosure.java Lobby 2020-09-01 10:27:13 +02:00
  • daf3da94e3 Fix #66: Broken license link. yut23/master yut23/HEAD uyong/master uyong/HEAD Enyby 2020-04-01 19:36:00 +03:00
  • 30e60a883e Create LICENSE Enyby 2020-04-01 19:31:39 +03:00
  • 27edcc9a92 Fix possible error in rare cases in LuaTable: Enyby 2019-12-29 16:46:58 +02:00
  • d6737c0bb3 Improve work with weak keys. `` for _, m in ipairs({'', 'k', 'kv', 'v'}) do print('test', m) a = {}; setmetatable(a, {__mode = m}); a[1], a[2], a[3] = {}, {}, {}; for k, v in pairs(a) do print(k, v) end end print('ok') `` Enyby 2019-12-16 15:31:13 +02:00
  • d201bc3012 Fix work with weak tables. `` a = {}; setmetatable(a, {__mode = 'vk'}); a[1], a[2], a[3] = {}, {}, {}; for k, v in pairs(a) do print(k, v) end print('ok') `` Enyby 2019-12-15 20:39:26 +02:00
  • ca64666242 Fix metamethods for compare with numbers. ``` t = {} t.__lt = function (a,b,c) collectgarbage() assert(c == nil) if type(a) == 'table' then a = a.x end if type(b) == 'table' then b = b.x end return a<b, "dummy" end Enyby 2019-11-11 02:47:19 +02:00
  • 725cf89b6f Fix metamethods for compare with string. Enyby 2019-11-11 02:29:20 +02:00
  • da0b06555a Fix pattern error message. Enyby 2019-11-09 23:26:48 +02:00
  • ee2d5284e7 Fix '%b' pattern error message. Enyby 2019-11-09 23:25:58 +02:00
  • 0f0ec4bf7b Add check for too complex patterns. `` -- bug since 2.5 (C-stack overflow) do local function f (size) local s = string.rep("a", size) local p = string.rep(".?", size) return pcall(string.match, s, p) end local r, m = f(80) assert(r and #m == 80) r, m = f(200000) assert(not r and string.find(m, "too complex"), tostring(r)..", "..tostring(m)) end `` Enyby 2019-11-09 23:25:07 +02:00
  • 5813d56f89 Improve error messages for invalid capture index. Enyby 2019-11-09 23:21:39 +02:00
  • 8c42c4712b Fix empty matches in patterns. ``` do -- new (5.3.3) semantics for empty matches assert(string.gsub("a b cd", " *", "-") == "-a-b-c-d-") Enyby 2019-11-09 23:20:06 +02:00
  • 6bc8fd6b1b Fix numeric for add order. Enyby 2019-11-09 23:12:31 +02:00
  • bf663878cb Add support for metatags to table lib methods: sort, insert, remove, unpack. ``` do -- testing table library with metamethods local function test (proxy, t) for i = 1, 10 do table.insert(proxy, 1, i) end assert(#proxy == 10 and #t == 10, tostring(#proxy)..'; '..tostring(#t)) for i = 1, 10 do assert(t[i] == 11 - i) end table.sort(proxy) for i = 1, 10 do assert(t[i] == i and proxy[i] == i, i..': '..tostring(proxy[i])..'; '..tostring(t[i])) end assert(table.concat(proxy, ",") == "1,2,3,4,5,6,7,8,9,10") for i = 1, 8 do assert(table.remove(proxy, 1) == i) end assert(#proxy == 2 and #t == 2) local a, b, c = table.unpack(proxy) assert(a == 9 and b == 10 and c == nil) end Enyby 2019-11-04 07:57:49 +02:00
  • e120008f9b Validate table.remove pos. Enyby 2019-11-03 16:08:01 +02:00
  • 9a20aa8077 Check pos bounds for table.insert. Enyby 2019-11-03 15:55:32 +02:00
  • 99f21b6277 Speed up table.sort. Enyby 2019-11-03 14:03:53 +02:00
  • 53bd4bf71f Fix compiler Bug{ what = [[label between local definitions can mix-up their initializations]], report = [[Karel Tuma, 2016/03/01]], since = [[5.2]], fix = nil, example = [[ do local k = 0 local x ::foo:: local y -- should be reset to nil after goto, but it is not assert(not y) y = true k = k + 1 if k < 2 then goto foo end end ]], patch = [[ --- lparser.c 2015/11/02 16:09:30 2.149 +++ lparser.c 2016/03/03 12:03:37 @@ -1226,7 +1226,7 @@ checkrepeated(fs, ll, label); /* check for repeated labels */ checknext(ls, TK_DBCOLON); /* skip double colon */ /* create new entry for this label */ - l = newlabelentry(ls, ll, label, line, fs->pc); + l = newlabelentry(ls, ll, label, line, luaK_getlabel(fs)); skipnoopstat(ls); /* skip other no-op statements */ if (block_follow(ls, 0)) { /* label is last no-op statement in the block? */ /* assume that locals are already out of scope */ ]] } Enyby 2019-11-02 17:02:21 +02:00
  • b57eb247ba Fix table.unpack. Enyby 2019-11-02 15:18:48 +02:00
  • 05e82f1c3f Add package.config. #49 Enyby 2019-10-27 23:08:44 +02:00
  • 9b2f0a2805 Fix os.tmpname. Enyby 2019-10-22 07:00:21 +03:00
  • ef8175050b Remove unused field. Enyby 2019-10-21 23:26:10 +03:00
  • 0d2aa6cc54 Switch little-endian by default as original Lua does. Enyby 2019-10-21 23:25:30 +03:00
  • fe7bd07450 Fix lexer bugs. Wrong work with spaces. Enyby 2019-10-21 10:20:06 +03:00
  • f0e9348ae2 Fix lexer bugs. Already handled by inside isalnum. Enyby 2019-10-21 10:17:26 +03:00
  • 22e7a8c620 Fix lexer bugs. Already handled by case above. Enyby 2019-10-21 10:16:43 +03:00
  • c8461b8128 Fix pattern classes in string lib. ``` local ref = { } for cl in string.gmatch('acdglpsuwxACDGLPSUWX', '.') do local list = '' for i = 0, 255 do if string.match(string.char(i), '%'..cl) then list = list..i..',' end end if ref[cl] then assert(ref[cl] == list, cl..':\n'..list..'\n'..ref[cl]) else print(cl..' = "'..list..'",') end end Enyby 2019-10-21 08:43:53 +03:00
  • 3a6c382570 Fix 'error' call. #60 Enyby 2019-10-20 19:19:14 +03:00
  • 4db34780b7 Fix build error. Enyby 2019-10-20 18:43:10 +03:00
  • ac3475deee Improved error messages for lib functions. Enyby 2019-10-20 07:19:34 +03:00
  • af35c4d89e Improve error messages for base lib. Enyby 2019-10-20 07:17:46 +03:00
  • c71f277697 Improve error messages for lib table. Enyby 2019-10-20 07:07:17 +03:00
  • 5fe0a3950d Improve get name for func. Enyby 2019-10-20 06:45:53 +03:00
  • 169202362e Fix error message for collectgarbage invalid option. Enyby 2019-10-20 00:34:54 +03:00
  • 5609d8c92b Add check mode for io.open. #57 Enyby 2019-10-19 20:53:56 +03:00
  • dbab0aed01 Fix odd varargs methods. Enyby 2019-10-14 18:33:25 +03:00
  • f8d7731b56 Fix NPE on getobjname in some cases. Enyby 2019-10-14 14:12:08 +03:00
  • 2f5aa594bd Fix getobjname for get constant name if it stored on register. Enyby 2019-10-14 14:11:38 +03:00
  • edfe1a5fde Add check for io.popen modes. Enyby 2019-10-13 06:16:21 +03:00
  • 6efb6f000e Improve error message for file:seek and file:setvbuf. Enyby 2019-10-13 05:58:32 +03:00
  • f3b8a1eddc Fix default setvbuf size. Enyby 2019-10-12 19:12:44 +03:00
  • 20eca5760d Fix detect io lib read modes like file:read('*all'). Enyby 2019-10-12 17:57:37 +03:00
  • 3613bc0862 Add check for values passed to file:vsetbuf and file:seek. Enyby 2019-10-12 17:51:04 +03:00
  • 6985980572 Merge branch 'master' of https://github.com/luaj/luaj Enyby 2019-10-12 16:09:03 +03:00
  • 60d130cecc Fix corrupted args for io.lines and file:lines on reuse stack elements. Enyby 2019-10-12 16:08:36 +03:00
  • b705eb05f4 Merge pull request #59 from Mikhael-Danilov/patch-1 Enyby 2019-10-07 21:53:17 +03:00
  • d0bb0409a3 Fix link Mikhael-Danilov 2019-10-07 20:23:45 +03:00
  • db58e1808b Fix load script from func. Enyby 2019-10-07 18:08:47 +03:00
  • e2ede7f91c Fix call io.lines(nil, ...). Enyby 2019-10-07 17:11:13 +03:00
  • a50deaa75c Fix raise error from io.lines and file:lines. Enyby 2019-10-07 14:52:12 +03:00
  • f9f78b81da Allow read zero bytes in io lib methods. Enyby 2019-10-07 14:26:21 +03:00
  • 984fa30bf6 Fix read all stdin in JSE. Enyby 2019-10-07 00:25:07 +03:00
  • 65beda4c2b Fix read all at EOF. Enyby 2019-10-07 00:23:34 +03:00
  • 934a8fc57b Fix io.read(0) on EOF. Enyby 2019-10-06 23:49:04 +03:00
  • 832ec739ea Close not closed file on GC. #55 Relevant only for J2SE, not for J2ME. Enyby 2019-10-06 23:35:45 +03:00
  • 8345bee6b4 Fix io.lines and file:lines do not honor additional params. #52 Fix io.lines do not close file on EOF. #53 Improve error message for io.lines and file:lines on closed file. Enyby 2019-10-06 19:09:01 +03:00
  • 83f2e1d96a Fix io.read and file:read do not support '*L' format. #54 Enyby 2019-10-06 18:53:15 +03:00
  • 14745ba76a Fix call io.read, file:read without params. Enyby 2019-10-06 18:40:31 +03:00
  • c62ba1f22e File tostring respect closed. Enyby 2019-10-06 16:54:44 +03:00
  • 868928779f Fix rewrite io.input inside io.lines. Enyby 2019-10-06 16:43:11 +03:00
  • f383c27728 We not in C anymore. Enyby 2019-09-23 01:54:27 +03:00
  • e7b11110a3 Raise lexerror if failed parse number as double. Enyby 2019-09-23 01:53:01 +03:00
  • 0fa27c3783 EOZ (-1) not a space char. Fix bug with endless loop at not ended \z sequence. Enyby 2019-09-23 00:39:42 +03:00
  • 72a71e5a65 Merge branch 'master' of https://github.com/luaj/luaj Enyby 2019-09-21 07:18:37 +03:00
  • 6031d6b479 Fix lua error message on bad arg for 'load'. Enyby 2019-09-21 07:18:08 +03:00
  • a071b04b8f remove undesirable import asie 2019-09-03 08:33:28 +02:00
  • 11b29f92c1 fix string.format not converting non-strings for %s (requires __tostring fix) asie 2019-08-11 13:47:25 +02:00
  • c666a507ab Support 4 byte UTF-8 sequences gamax92 2019-08-11 13:05:54 +02:00
  • 5026b5ac1e string.format fixes gamax92 2019-08-11 12:50:29 +02:00
  • 6ba28727d2 move doubleToRawLongBits (not present on JME) to JSE class asie 2019-08-11 12:48:34 +02:00
  • 0707e71c6c Support __pairs and __ipairs gamax92 2019-08-11 12:14:21 +02:00
  • 43f937470f Fix classes based on LibFunction giving "value" for their error message. gamax92 2019-08-11 12:11:40 +02:00
  • 5d3f2eb72c LuaClosure: Add the colon after line numbers to error messages gamax92 2019-08-11 12:10:11 +02:00
  • 244eb4b1a1 StringLib: Support seperators in string.rep gamax92 2019-08-11 12:07:47 +02:00
  • 626664a0fe BaseLib: fix handling of __tostring gamax92 2019-08-11 12:05:48 +02:00
  • 2bccb4670e LuaValue: add 0x to tojstring() to match Lua gamax92 2019-08-11 12:01:51 +02:00
  • 89acb5bcb5 LuaString: port strx2number for accurate double scanning, handle plus signs when converting strings to numbers gamax92 2019-08-11 11:59:49 +02:00
  • c69585332b LexState: rename TK_EOS and <eos> to TK_EOF and <eof> to match Lua gamax92 2019-08-11 11:55:42 +02:00