Commit Graph

150 Commits

Author SHA1 Message Date
Shu Lei
96864694de added a factory method to LuaState to dynamically create LuaState or DebugLuaState depending on the presence of the platform debug properties 2007-11-30 23:47:44 +00:00
James Roseborough
0db9925ee9 Add test scripts for require() 2007-11-30 16:41:59 +00:00
Shu Lei
89e4f9cc02 update the unit test to reflect to new StandardLuaVM run() behavior 2007-11-29 22:41:29 +00:00
Shu Lei
fd9b9b51c3 1. completed j2me debugging support
2. refactored DebugEvents and DebugRequests
2007-11-29 21:24:07 +00:00
James Roseborough
b493230edb Initial implementation of module, package.seeall 2007-11-29 01:11:18 +00:00
Shu Lei
9f7b675220 1. updated the code to use LuaErrorException and removed VMException
2. refactored debugging network communication layer
2007-11-20 23:26:50 +00:00
James Roseborough
62a3510272 Fix next() 2007-11-20 00:10:18 +00:00
Ian Farmer
ad5e776dc9 Add a string.gmatch call to strlib.lua test case and fix the bug it exposed. 2007-11-19 23:06:26 +00:00
James Roseborough
f2867eee0d tests for tostring, tonumber 2007-11-16 19:45:12 +00:00
James Roseborough
eef469c715 Add unit tests for part of base library plus fixes to [gs]etfenv, [gs]etmetatable 2007-11-16 00:41:43 +00:00
Shu Lei
7ddfb80116 1. updated DebugSupport to use one port for two-way communication
2. added a command line debug option to pause the VM on start
3. minor code clean up - replaced tabs with 4 white spaces
2007-11-12 22:08:26 +00:00
James Roseborough
a68fcb6743 Make compiler optional 2007-11-09 22:59:19 +00:00
James Roseborough
2023ac3464 Split libraries into pieces. 2007-11-09 00:15:56 +00:00
Shu Lei
af51bf6f07 renamed DebugStackState to DebugLuaState 2007-11-08 01:59:42 +00:00
Shu Lei
25c008dab6 re-apply my last two check-ins before the code structure refactoring:
(1) added getGlobals to returns the globals for Globals view in Eclipse
(2) fixed the scoping issue with stack state
(3) renamed DebugResponseStack to DebugResponseVariables
2007-11-08 01:55:27 +00:00
James Roseborough
ff66779330 Major refactoring of package names, class names 2007-11-07 23:56:06 +00:00
Shu Lei
3bf2fc2958 1. renamed DebugResponseStack to DebugResponseVariables
2. added getGlobal to DebugStackState for supporting the Globals view
3. converted tabs to 4 whitespaces in some files
2007-11-07 19:33:06 +00:00
James Roseborough
d6a3525357 Fix return value of table.remove() 2007-11-06 23:33:11 +00:00
James Roseborough
ec5068a96e Fix select for "#" argument 2007-11-05 19:16:08 +00:00
James Roseborough
cce33612ce replace deprecated API's. 2007-11-05 19:12:01 +00:00
James Roseborough
c93301506a Replace deprecated API's 2007-11-05 17:19:46 +00:00
James Roseborough
434530b60f Table unit tests and implementation of table.remove(), table.sort() 2007-10-31 23:24:51 +00:00
James Roseborough
facb8d1d07 Unit test for table package functions 2007-10-31 19:03:18 +00:00
Shu Lei
e97b842b45 1. added stepping debug support
2. added debugger error handling
2007-10-24 20:21:16 +00:00
James Roseborough
b86e06ab1c Coroutine implementation based on Java Threads. 2007-10-23 21:24:49 +00:00
James Roseborough
504020beda Fix coroutine.wrap() error propogation. 2007-10-23 00:49:52 +00:00
James Roseborough
932960c846 Add tests for pcall, add error() builtin, fix assert(), error levels. 2007-10-23 00:34:04 +00:00
James Roseborough
8248cca2bf implement corouting.wrap(), fix bugs in coroutine.status(), fix StackState.insert() 2007-10-22 21:05:04 +00:00
James Roseborough
78eaaf0fa0 Initial draft of coroutines library. 2007-10-20 00:51:15 +00:00
James Roseborough
8e2ff119f9 Add LValue.toJavaX and VM.pushboxedx() functions for all java basic type conversions 2007-10-18 17:47:01 +00:00
Shu Lei
38dafdb190 1. some refacotring
2. fixed a few files so that they will compile for j2me
2007-10-12 20:39:26 +00:00
Shu Lei
3138fdee65 refactoring - create new packages: lua.debug.event, lua.debug.request and lua.debug.response 2007-10-12 01:42:42 +00:00
Shu Lei
341a5588b0 first step to bring debugging code to j2me 2007-10-12 01:36:28 +00:00
James Roseborough
710f13dafc Convert to java 1.3 source style and enable all classes to be built using java class version 1.1 2007-10-10 03:53:22 +00:00
Shu Lei
8eab291c9b make the debugging support code compile under JDK 1.3 2007-10-10 00:26:23 +00:00
James Roseborough
435368ccd9 Fix metatable processing on luaGetTable 2007-10-09 04:09:00 +00:00
James Roseborough
251e055594 Fix StrLib test case by fixing pcall to restore currenct call after exceptions 2007-10-06 18:48:37 +00:00
James Roseborough
ec9cff9050 Misc fixes to java api 2007-10-05 18:38:42 +00:00
Shu Lei
a67783899f removed Type.java and updated the depended files to use the new type constants 2007-10-04 21:04:38 +00:00
James Roseborough
9dee79cb80 Make LInteger constructor private and use LInteger.valueOf() everywhere, caching common values. 2007-10-04 17:37:15 +00:00
Shu Lei
885397a74c added back the files that were accidentally deleted 2007-10-03 23:33:45 +00:00
Shu Lei
35d02b287e added debugging support and integrated with Eclipse debugger 2007-10-03 17:39:38 +00:00
Shu Lei
421eface40 added debugging support and integrated with Eclipse debugger 2007-10-03 17:39:37 +00:00
Ian Farmer
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

Unfortunately I discovered a problem where execute() will loop around too
many times and call exec() with a call frame that has already completed.
This might be due to the lack of the "tailcalls" field in our CallInfo class
that the C version maintains?
2007-09-24 04:35:53 +00:00
Ian Farmer
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.
2007-09-23 03:54:06 +00:00
Ian Farmer
5536159916 Now that compiler is integrated, change LuaJTest to load source files when
pre-compiled script is missing.
2007-09-23 03:51:26 +00:00
James Roseborough
9f6d7543cd Remove compiler dependence on mark()/reset() 2007-09-22 16:57:25 +00:00
James Roseborough
e07382c90d Fix autoload 2007-09-22 07:14:23 +00:00
James Roseborough
be87758fe5 add compiler to vm as add-on 2007-09-21 16:50:29 +00:00
Ian Farmer
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.
2007-09-19 04:44:31 +00:00