Commit Graph

  • 7e99ae8ac1 1. fixed a bug with not remembering the calling stack's top and reverted the previous change in method printState file Print.java to check on the upper bound 2. fixed a NPE in DebugStackState when an error is raised and debugSupport is null 3. made the DebugStackState not to pause on start by default Shu Lei 2007-11-02 02:33:59 +00:00
  • 100b6a6162 Remove superfluous import James Roseborough 2007-11-01 16:44:04 +00:00
  • 434530b60f Table unit tests and implementation of table.remove(), table.sort() James Roseborough 2007-10-31 23:24:51 +00:00
  • facb8d1d07 Unit test for table package functions James Roseborough 2007-10-31 19:03:18 +00:00
  • 1ebbabc9d6 1. improved stack state (correct scoping) 2. fixed the problem with debugger not pausing on first line Shu Lei 2007-10-30 01:37:26 +00:00
  • 3aeb6fc290 resurrect the dead files Shu Lei 2007-10-27 07:31:49 +00:00
  • abf34c460d redo the error handling due to the changes in DebugStackState made by James Shu Lei 2007-10-25 00:11:23 +00:00
  • 72c01f76c0 Allow dump state to take arguments for endian-ness, force to integer James Roseborough 2007-10-24 23:43:21 +00:00
  • e97b842b45 1. added stepping debug support 2. added debugger error handling Shu Lei 2007-10-24 20:21:16 +00:00
  • b86e06ab1c Coroutine implementation based on Java Threads. James Roseborough 2007-10-23 21:24:49 +00:00
  • c311c31a74 Fix inconsistency in build: filename in real-delete target was not the same as filename produced. Ian Farmer 2007-10-23 21:09:54 +00:00
  • c3f17a3b5e Build changes: * ant build.xml produces 4 output jars: all-in-one jar, a "core" jar that should work under J2ME, an "extras" jar with classes that require J2SE, and the last jar provides the debug support for J2ME. * Change the Eclipse .classpath to include WTK jars. Requires WTK_HOME classpath variable be set in Eclipse workspace. Ian Farmer 2007-10-23 21:06:51 +00:00
  • 504020beda Fix coroutine.wrap() error propogation. James Roseborough 2007-10-23 00:49:52 +00:00
  • 932960c846 Add tests for pcall, add error() builtin, fix assert(), error levels. James Roseborough 2007-10-23 00:34:04 +00:00
  • 8248cca2bf implement corouting.wrap(), fix bugs in coroutine.status(), fix StackState.insert() James Roseborough 2007-10-22 21:05:04 +00:00
  • 78eaaf0fa0 Initial draft of coroutines library. James Roseborough 2007-10-20 00:51:15 +00:00
  • 8e2ff119f9 Add LValue.toJavaX and VM.pushboxedx() functions for all java basic type conversions James Roseborough 2007-10-18 17:47:01 +00:00
  • ccde158514 Fix insert, add LDouble.valueOf() James Roseborough 2007-10-17 17:47:53 +00:00
  • a8422a6908 debug support refactoring Shu Lei 2007-10-17 00:56:08 +00:00
  • 70442348a1 some more refactoring Shu Lei 2007-10-12 23:39:27 +00:00
  • 38dafdb190 1. some refacotring 2. fixed a few files so that they will compile for j2me Shu Lei 2007-10-12 20:39:26 +00:00
  • 3138fdee65 refactoring - create new packages: lua.debug.event, lua.debug.request and lua.debug.response Shu Lei 2007-10-12 01:42:42 +00:00
  • 341a5588b0 first step to bring debugging code to j2me Shu Lei 2007-10-12 01:36:28 +00:00
  • 6970b30c7a Add math.ceil, math.floor James Roseborough 2007-10-11 03:54:40 +00:00
  • 5a92c52fd5 Add "j2me" ant target. James Roseborough 2007-10-10 17:53:34 +00:00
  • 6897febc0a Remove dependence on Arrays.binarySearch James Roseborough 2007-10-10 14:35:35 +00:00
  • a5745d5da0 Turn off debug support by default. James Roseborough 2007-10-10 04:34:46 +00:00
  • 710f13dafc Convert to java 1.3 source style and enable all classes to be built using java class version 1.1 James Roseborough 2007-10-10 03:53:22 +00:00
  • 8eab291c9b make the debugging support code compile under JDK 1.3 Shu Lei 2007-10-10 00:26:23 +00:00
  • edea16fb91 Convert to 1.1 class file version James Roseborough 2007-10-09 04:10:36 +00:00
  • 435368ccd9 Fix metatable processing on luaGetTable James Roseborough 2007-10-09 04:09:00 +00:00
  • 1f817c774c bug fix Shu Lei 2007-10-09 00:25:44 +00:00
  • 251e055594 Fix StrLib test case by fixing pcall to restore currenct call after exceptions James Roseborough 2007-10-06 18:48:37 +00:00
  • 0353660299 Convert to new JavaFunction api James Roseborough 2007-10-05 22:00:31 +00:00
  • ec9cff9050 Misc fixes to java api James Roseborough 2007-10-05 18:38:42 +00:00
  • e4882578f2 Add "Java API" like "C API" for use with JavaFunctions. James Roseborough 2007-10-04 23:51:39 +00:00
  • 9be13fcc1d Convert return value of luaLength to be int James Roseborough 2007-10-04 23:17:09 +00:00
  • a67783899f removed Type.java and updated the depended files to use the new type constants Shu Lei 2007-10-04 21:04:38 +00:00
  • eba4f34505 Fix reported type of LBoolean James Roseborough 2007-10-04 20:44:52 +00:00
  • 72bfd0a376 remove dependence on Type class. James Roseborough 2007-10-04 20:44:03 +00:00
  • 8ae4299764 centralize type id defs James Roseborough 2007-10-04 20:10:50 +00:00
  • 9dee79cb80 Make LInteger constructor private and use LInteger.valueOf() everywhere, caching common values. James Roseborough 2007-10-04 17:37:15 +00:00
  • 885397a74c added back the files that were accidentally deleted Shu Lei 2007-10-03 23:33:45 +00:00
  • 35d02b287e added debugging support and integrated with Eclipse debugger Shu Lei 2007-10-03 17:39:38 +00:00
  • 421eface40 added debugging support and integrated with Eclipse debugger Shu Lei 2007-10-03 17:39:37 +00:00
  • cd5f278e7b Compile code at source version 1.3, and exclude sources that require more recent java features. Ian Farmer 2007-09-26 23:27:15 +00:00
  • d65729f1d7 Add gmatch implementation James Roseborough 2007-09-26 05:19:25 +00:00
  • 11c12281b6 Add a really simple apache ant build script Ian Farmer 2007-09-26 01:26:20 +00:00
  • 673d0e4117 Expose final fields of LString James Roseborough 2007-09-26 00:44:53 +00:00
  • edbe168e42 Add Platform manager James Roseborough 2007-09-25 00:32:25 +00:00
  • ec11c472c8 Various changes to bring pm.lua test closer to passing: * New and complete character class support * string.gsub implemented * rawset implemented * lua_call added (based on lua_pcall) * lua_pop added * newCall removed; luaGetTable and luaSetTable in LFunction updated to use lua_call instead. * StandardTest changed to avoid an ArrayIndexOutOfBoundsException Ian Farmer 2007-09-24 04:35:53 +00:00
  • f801e648bb New math.cos and math.sqrt functions from Lua standard library, with new math library test case. Also, character encoding of LuaCompat was changed from something that Eclipse was not handling well to UTF-8. Ian Farmer 2007-09-23 03:54:06 +00:00
  • 5536159916 Now that compiler is integrated, change LuaJTest to load source files when pre-compiled script is missing. Ian Farmer 2007-09-23 03:51:26 +00:00
  • 9f6d7543cd Remove compiler dependence on mark()/reset() James Roseborough 2007-09-22 16:57:25 +00:00
  • e07382c90d Fix autoload James Roseborough 2007-09-22 07:14:23 +00:00
  • e154a158a9 Add ipow, to compute power for integers. James Roseborough 2007-09-22 05:25:02 +00:00
  • 90cc227e34 Add compiler by default. James Roseborough 2007-09-22 00:25:36 +00:00
  • be87758fe5 add compiler to vm as add-on James Roseborough 2007-09-21 16:50:29 +00:00
  • 2db26b0844 Many built-ins: ipairs, table.insert, require, pcall James Roseborough 2007-09-21 00:34:14 +00:00
  • d45bd96536 Add "require" support. James Roseborough 2007-09-20 18:17:10 +00:00
  • fc8c790b0d Fixes for string.rep, string.byte, string.lower, and string.upper. Also factor out negative index handling to separate function, posrelat (to match C Lua). When converting numbers to strings, see if the double value can be represented exactly as a long, and if so format the string as an integer. With these changes the standard test case "strings.lua" runs to line 104 (over half way through!), where it uses string.format. Ian Farmer 2007-09-19 04:44:31 +00:00
  • 32e1fedba5 Improve error handling, introduce lua stack trace processing. James Roseborough 2007-09-18 22:55:22 +00:00
  • a55504639e Add unit test for LString.toInputStream (meant to commit this a while ago) Ian Farmer 2007-09-18 05:29:29 +00:00
  • bd6dd58a2d String related improvements: (1) Fix string.char and string.byte (argument indexing was off by one) (2) Implement string.find (3) Change calls to charAt, which does array bounds checking, in the pattern matcher with calls to luaByte, which does not. (4) Replace use of recursion with while/continue in pattern matcher. Ian Farmer 2007-09-18 05:17:09 +00:00
  • 534e69fcfb Add pattern matcher implementation ported from C version of Lua. Still work to do: (1) Replace use of recursion with while/continue (2) Remove as many array bounds checks as possible Ian Farmer 2007-09-18 04:18:39 +00:00
  • 108fabc58f Add missing return statement in autoload test case. Still doesn't work. Ian Farmer 2007-09-18 04:16:46 +00:00
  • 952a2f9f16 Add skeleton for string library calls. James Roseborough 2007-09-18 01:00:36 +00:00
  • 5efda81b17 Add loadstring and other standard library commands (untested) James Roseborough 2007-09-15 00:51:30 +00:00
  • 6d0e9bb566 Add some helper methods: (1) getKeys() in LTable is now public. It provides a convenient interface to access the table's elements from Java instead of Lua. (2) LString.toInputStream produces an instance of InputStream from which the string's bytes can be read. Ian Farmer 2007-09-12 05:22:30 +00:00
  • 31e2d95076 Fix broken LTable test case. Ian Farmer 2007-09-10 06:41:25 +00:00
  • aeafca11b6 Change LString to use an array of bytes instead of wrapping Java's String. This brings our implementation more in line with regular C Lua. Ian Farmer 2007-09-10 06:27:54 +00:00
  • aa44eedf4b Allow metatable operations on values of all types, and use the metatable on strings as the string package, so that string functions can be called with self (:) syntax. Autoload test case now inexplicably fails more, but it was already broken. Ian Farmer 2007-09-08 20:54:40 +00:00
  • e30646bcf8 Add string.rep and string.sub to LuaCompat add-on. With these implemented, we get to line 34 of the strings.lua standard test case. Ian Farmer 2007-09-06 03:22:00 +00:00
  • 35131f9f66 Fix "factorial" function in test case that was not actually factorial function. Ian Farmer 2007-09-05 03:02:57 +00:00
  • 75fb975410 Fix a few VM issues which were causing subtle failures in the test cases. Includes a new VM method, newCall, which must be called before pushing a call onto the stack to make sure that base is set correctly. A couple of weird issues remain with autoload.lua. Ian Farmer 2007-09-04 01:52:33 +00:00
  • 0f81c4deaf Fix typo and add TODO comment. Ian Farmer 2007-09-03 06:00:37 +00:00
  • 49bcc0d2f8 Fix a bug where "base" was not set correctly for metatable operations. Ian Farmer 2007-09-03 05:53:55 +00:00
  • b8571b93f9 New implementation for Lua tables. Does not use Vector or Hashtable, instead uses plain Java arrays directly to keep heap allocation to a minimum. Includes some unit tests that seem to indicate the basic operations are correct. However, the following things are not implemented: Ian Farmer 2007-09-03 00:38:38 +00:00
  • 79d5642bfd Fix breakpoint handling James Roseborough 2007-08-11 05:29:56 +00:00
  • add892968d Add DebugStackState to be used as a debugging VM in and IDE. James Roseborough 2007-08-11 04:53:35 +00:00
  • a80351e1ef added the skeleton code for luaJ debugging support Shu Lei 2007-08-10 06:31:21 +00:00
  • 64d02d3559 Fix gettable result handling in LInstances James Roseborough 2007-08-03 15:32:40 +00:00
  • b8376fe0ef Fix tail call argument handling. James Roseborough 2007-08-03 05:42:50 +00:00
  • 5fb097d107 Fix varargs handling James Roseborough 2007-08-02 03:00:46 +00:00
  • 80677e9a16 Let Nil be converted to int, but other values cannot. James Roseborough 2007-08-01 06:16:28 +00:00
  • 01c5595fd6 Let luaAsInt() return sensible values for non-numeric data. James Roseborough 2007-08-01 06:11:43 +00:00
  • 32dcbaca3a Make modulo arithmetic conform to lua rules for negative values. James Roseborough 2007-08-01 04:57:12 +00:00
  • 737c5e2855 Various changes: (1) New lua compatibility bindings, including select() and math functions (2) fix some VM bugs (3) fix some table bugs, and attempt to restore metatable functionality. Ian Farmer 2007-08-01 04:15:27 +00:00
  • 68b3e68169 Remove unused variables. James Roseborough 2007-07-31 05:47:35 +00:00
  • 7cd3195bcd Add guard to prevent null values from being put on stack James Roseborough 2007-07-30 04:53:58 +00:00
  • fbeded0388 Make printCode public, remove unused code from Lua.java James Roseborough 2007-07-29 17:39:15 +00:00
  • b9fdb731fe optimization for tables that include sequential integral indices starting with 0. Christopher Colby 2007-07-24 06:22:07 +00:00
  • 8bf4c82a12 Rework the main API"s that implement the calling convention. Provide utility methods to get arguments that were supplied, and provide return values. Add a VM interface to clarify the relationship between the VM, things that call the VM, and things that are called by the VM. Make the code more closely aligned with the C++ version. James Roseborough 2007-07-24 05:06:10 +00:00
  • 56f33b373d Move LUA_MULTRET def to Lua.java James Roseborough 2007-07-22 16:59:50 +00:00
  • ee5007e718 Add implicit LString to number coercions. Ian Farmer 2007-07-22 06:20:14 +00:00
  • daf71ee672 New LuaCompat add-on provides some standard lua functions that allow the test cases to make more progress: assert, collectgarbage, loadfile, tonumber, rawget, and setfenv. Also added zip file of standard tests to Eclipse classpath, for convenience. Ian Farmer 2007-07-22 05:47:14 +00:00
  • e1d6ddf99c New autoload and math test cases. Currently autoload does not work because the GETGLOBAL instruction does not handle the case where a metatable method is invoked. Ian Farmer 2007-07-21 04:44:22 +00:00
  • b4ac032fd7 Fix the NOT instruction. Includes test case. Ian Farmer 2007-07-21 04:08:28 +00:00
  • c0f054549b Change the pom.xml and remove some use of Java 1.5 features to reduce the number of errors produced by "mvn package". Ian Farmer 2007-07-19 04:23:42 +00:00
  • 2a64db32b5 Add last Lua type: userdata. Changed LInstance to inherit from LUserData, and changed instanceof/casts to LInstance to use LUserData instead. This should enable various add-ons to be compatible without knowing much, or anything, about each other. Ian Farmer 2007-07-17 04:04:18 +00:00