9c4bbf670f
Fix for case when more than 127 local variables are declared in one function
James Roseborough
2008-02-08 21:54:53 +00:00
cd760d6ec8
Fix the bug in the CLOSE instruction that was causing upvalues3.lua to fail.
Ian Farmer
2008-02-07 23:13:48 +00:00
cb6ce20dde
New failing test case involving do/end blocks and upvalues.
Ian Farmer
2008-02-07 18:56:17 +00:00
1eb969f84d
Add version.properties to track version number of the build.
James Roseborough
2008-02-06 19:28:12 +00:00
7679040493
Fix for table initializers greater than 50 elements.
James Roseborough
2008-02-06 19:00:23 +00:00
f87f77e327
Bump versino to 0.17
James Roseborough
2008-02-05 19:32:04 +00:00
8e06d7aff9
Add test case with many local variables.
James Roseborough
2008-02-05 19:19:39 +00:00
e126010a36
Add test for huge, sparse table initialization
James Roseborough
2008-02-05 19:13:48 +00:00
78bb849c08
Revert changes to getglobal() setglobal()
James Roseborough
2008-02-05 19:13:14 +00:00
bc5dd60a1a
Fix LuaState.getglobal() and LuaState.setglobal() to use the currently closure's environment.
James Roseborough
2008-01-29 00:17:50 +00:00
527ca6545d
Fix bugs in LTable.
Ian Farmer
2008-01-23 02:22:19 +00:00
4fa417bdd9
Fix a bug with table resizing. Includes junit test case.
Ian Farmer
2008-01-23 01:21:54 +00:00
f55a393fb8
Fix environment propogation from function to function.
James Roseborough
2008-01-17 00:59:16 +00:00
32d5e9c15e
Fix the bug where the wrong file/line# is reported on attempts to index nil.
Ian Farmer
2008-01-17 00:36:20 +00:00
08f4a02529
Fix error reporting in LValue.luaBinOpUnknown.
Ian Farmer
2008-01-16 18:17:42 +00:00
4e239b6c46
Fix incorrect comparison in checkstack() when stack is one element too small.
Ian Farmer
2008-01-16 18:07:41 +00:00
1cddbe97a2
Add new test case for stack handling.
Ian Farmer
2008-01-16 06:07:59 +00:00
8570761928
Make utf-8 conversion more robust to bad input.
James Roseborough
2008-01-14 23:11:09 +00:00
2461b46908
Fix equality test for userdata. Includes improved test7.lua.
Ian Farmer
2008-01-11 07:56:42 +00:00
9f9f31b969
Changes made for the following: 1) Platform.java stays as abstract class with, but default implementation is removed. Stays in org.luaj.vm package 2) org.luaj.platform package is created to hold concrete Platform implementations 3) Platform.newLuaState() method is introduced to instantiate the LuaState. Other constructors are privatized. 4) Following Platform implementations are created: J2sePlatform J2meMidp20Cldc11Platform J2meMidp10Cldc10Platform 5) All clients of luaj-vm are changed to include startup code that looks something like this: Platform.setInstance( new J2meMidp20Cldc11Platform() ); LuaState state = Platform.getInstance().newLuaState();
Shu Lei
2007-12-19 21:44:15 +00:00
bcf7dd1c66
Add tests for argument type checking on standard library functions.
James Roseborough
2007-12-19 06:41:00 +00:00
407d830582
1. code clean and added documentation for debugging protocol 2. upgrade to version 0.14 since I trimmed the debug message types
Shu Lei
2007-12-17 19:42:02 +00:00
d80e29a1ff
More tests for module.
James Roseborough
2007-12-13 22:12:21 +00:00
5612201e43
1. bug fix: reset the VM when EOF occurs, which indicates that debug client or debug service exit abnormally 2. make LUA_PATH a system property instead of a command line option to StandardLuaJVM
Shu Lei
2007-12-13 21:41:03 +00:00
976c405033
fix the NPE. When the vm cannot connect to the debug client/service, it would not create the redirectOutputStream. Hence, no need to call redirectOutputStream.close() and BaseLib.restoreStandardOutput.
Shu Lei
2007-12-13 01:49:15 +00:00
9d728af4a6
Add simple loadstring test.
James Roseborough
2007-12-13 01:43:21 +00:00
78b231353f
quote results.
James Roseborough
2007-12-13 01:04:08 +00:00
b8b65767b5
More test cases for string.sub()
James Roseborough
2007-12-13 01:03:02 +00:00
60cc93d64c
Correctly remove values stored in the array-part of a table.
Ian Farmer
2007-12-12 19:19:03 +00:00
eef737fde1
Fix math.pow() for custom platforms.
James Roseborough
2007-12-12 19:11:25 +00:00
6569563ddc
Implement math.pow() for all platforms, add unit tests for basic math operations.
James Roseborough
2007-12-11 19:47:38 +00:00
42b94709f0
1. added a shutdown method for LuaState and DebugLuaState to clean up before shutting down 2. added the capability to set LUA_PATH 3. minor debugging improvement 4. bump up the version to 0.12 because the addition outputRedirect debug message is not compatible with the previous versions
Shu Lei
2007-12-11 01:51:28 +00:00
ab8fc4883e
Implement foreach(), foreachi()
James Roseborough
2007-12-11 01:18:04 +00:00
1923d8e6a0
Add math.random() and math.randomseed()
James Roseborough
2007-12-08 01:42:51 +00:00
215134feb5
Correct javadoc
James Roseborough
2007-12-08 01:21:14 +00:00
0f3fe0452d
Add table.getn() for compatibility
James Roseborough
2007-12-08 01:20:30 +00:00
9706564647
simplify the debug protocol - no more ACK to debug client for resume, stepInto, stepOver and stepReturn
Shu Lei
2007-12-08 00:40:45 +00:00
f19fa165b9
1. added J2sePlatform for StandardLuaJVM to use J2SE DebugNetSupportImpl
Shu Lei
2007-12-07 19:51:06 +00:00
9cf85debad
Add test cases for loadfile, dofile on bad filenames.
James Roseborough
2007-12-07 18:43:34 +00:00
66e78f6980
Merge STDOUT and stdout
James Roseborough
2007-12-07 18:20:46 +00:00
23710a8994
missed the file when I upgrade to version 0.11
Shu Lei
2007-12-07 01:02:53 +00:00
d7c15f99a1
fix setmetatable() to match C version
James Roseborough
2007-12-07 00:52:39 +00:00
dc08fcbec2
Send test error output to System.err
James Roseborough
2007-12-06 23:31:11 +00:00
e8e1aaf892
Fix for loop processing, add vmerror()
James Roseborough
2007-12-06 22:59:16 +00:00
6871903303
Add PackageLib.setLuaPath() utility method.
James Roseborough
2007-12-06 21:53:42 +00:00
2ee0a1eeed
Add PackageLib.setLuaPath() utility method.
James Roseborough
2007-12-06 21:52:37 +00:00
edd8bc33ea
remove compiled versions of test files
James Roseborough
2007-12-06 21:14:44 +00:00
a6f46413c0
Added 'loops' test case.
Ian Farmer
2007-12-06 19:16:56 +00:00
644896c467
Improve error reporting.
James Roseborough
2007-12-06 15:29:49 +00:00
8f581c8f07
Improve testing around require() features.
James Roseborough
2007-12-05 22:00:37 +00:00
7db4d54d50
Implement require() using package.loaders, etc. add preload_loader, lua_loader, and java_loader.
James Roseborough
2007-12-05 01:46:59 +00:00
3c05880012
added getDebugHost() and getDebugPort() methods to Platform for convenience
Shu Lei
2007-12-01 01:04:34 +00:00
9fd34436fe
minor refactoring
Shu Lei
2007-12-01 00:40:51 +00:00
ca721124e1
continuation of previous work to add factory method to create LuaState or DebugLuaState dynamically, refactored DebugSupport so that Platform.getInstance().getDebugSupport() does not depend on debug module
Shu Lei
2007-12-01 00:17:18 +00:00
96864694de
added a factory method to LuaState to dynamically create LuaState or DebugLuaState depending on the presence of the platform debug properties
Shu Lei
2007-11-30 23:47:44 +00:00
0db9925ee9
Add test scripts for require()
James Roseborough
2007-11-30 16:41:59 +00:00
d7e0aeaac5
bug fix
Shu Lei
2007-11-29 22:59:09 +00:00
89e4f9cc02
update the unit test to reflect to new StandardLuaVM run() behavior
Shu Lei
2007-11-29 22:41:29 +00:00
fd9b9b51c3
1. completed j2me debugging support 2. refactored DebugEvents and DebugRequests
Shu Lei
2007-11-29 21:24:07 +00:00
c57969bc77
Replace middle dot with period in elipses
James Roseborough
2007-11-29 17:54:15 +00:00
14007944a1
Throw lua error when attempting table access on a non-table value.
James Roseborough
2007-11-29 01:11:51 +00:00
b493230edb
Initial implementation of module, package.seeall
James Roseborough
2007-11-29 01:11:18 +00:00
62cda2bc49
Change upvalues to point to the LuaState instead of directly to the stack.
Ian Farmer
2007-11-21 02:21:35 +00:00
9f7b675220
1. updated the code to use LuaErrorException and removed VMException 2. refactored debugging network communication layer
Shu Lei
2007-11-20 23:26:50 +00:00
6c9d02b3a3
1. changed to use LuaErrorException and removed VMException 2. refactored the debug network communication layer
Shu Lei
2007-11-20 23:25:50 +00:00
62a3510272
Fix next()
James Roseborough
2007-11-20 00:10:18 +00:00
ad5e776dc9
Add a string.gmatch call to strlib.lua test case and fix the bug it exposed.
Ian Farmer
2007-11-19 23:06:26 +00:00
0d1aed5b5a
Clear stack before any lua call.
James Roseborough
2007-11-19 22:30:55 +00:00
3331abeb1d
Fixes to rawset, rawget, collectgarbage
James Roseborough
2007-11-16 23:55:58 +00:00
f2867eee0d
tests for tostring, tonumber
James Roseborough
2007-11-16 19:45:12 +00:00
d2b58a3abf
Fix tonumber()
James Roseborough
2007-11-16 19:43:00 +00:00
45f483f706
Replace settop(0) with resettop()
James Roseborough
2007-11-16 19:19:13 +00:00
d7ae4a809c
Fixes to unpack
James Roseborough
2007-11-16 19:17:18 +00:00
ecacbfde92
Fix thread constructor so upvalues setfenv work correctly
James Roseborough
2007-11-16 18:13:40 +00:00
eef469c715
Add unit tests for part of base library plus fixes to [gs]etfenv, [gs]etmetatable
James Roseborough
2007-11-16 00:41:43 +00:00
31abaacec1
added remote debugging support
Shu Lei
2007-11-15 21:08:28 +00:00
549c35aa59
Make compile for j2me
James Roseborough
2007-11-15 01:31:50 +00:00
abad119a5c
Introduce LuaErrorException which is thrown and caught when a lua error() needs to be processed.
James Roseborough
2007-11-15 00:49:02 +00:00
7e22487624
Bullet-proof dynamic stack size
James Roseborough
2007-11-14 17:52:39 +00:00
1726350d93
Fix getmetatable
James Roseborough
2007-11-14 17:51:51 +00:00
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
Shu Lei
2007-11-12 22:08:26 +00:00
a68fcb6743
Make compiler optional
James Roseborough
2007-11-09 22:59:19 +00:00
2023ac3464
Split libraries into pieces.
James Roseborough
2007-11-09 00:15:56 +00:00
4acaa11845
added some java doc and clean the code formatting
Shu Lei
2007-11-08 19:09:40 +00:00
af51bf6f07
renamed DebugStackState to DebugLuaState
Shu Lei
2007-11-08 01:59:42 +00:00
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
Shu Lei
2007-11-08 01:55:27 +00:00
ff66779330
Major refactoring of package names, class names
James Roseborough
2007-11-07 23:56:06 +00:00
2281d056ec
fix the scoping problem: variables in an outer scope were not included in the stack
Shu Lei
2007-11-07 20:11:55 +00:00
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
Shu Lei
2007-11-07 19:33:06 +00:00
d6a3525357
Fix return value of table.remove()
James Roseborough
2007-11-06 23:33:11 +00:00
f398387222
Up version to 0.9
James Roseborough
2007-11-06 22:17:24 +00:00
0ff616579f
change version to 0.8
James Roseborough
2007-11-06 21:54:16 +00:00
439f14c267
1. refactored getCurrentPc() to retrieve the current pc for the stack frame 2. reverted the code to aggregate all visible variables. due to the lack of debugging info about the lexical scope, only local visible variables are returned for now.
Shu Lei
2007-11-06 01:29:57 +00:00
d0bd5c9ff8
Remove deprecated API's
James Roseborough
2007-11-05 22:30:48 +00:00
e785b88f30
fix the bug that the current line number for the calling frame is off by one
Shu Lei
2007-11-05 19:55:29 +00:00
484a758b3c
Fix top handling for table module
James Roseborough
2007-11-05 19:42:31 +00:00
ec5068a96e
Fix select for "#" argument
James Roseborough
2007-11-05 19:16:08 +00:00
cce33612ce
replace deprecated API's.
James Roseborough
2007-11-05 19:12:01 +00:00
c93301506a
Replace deprecated API's
James Roseborough
2007-11-05 17:19:46 +00:00
dda1af0570
updated the top for FORLOOP so that the loop index shows up when the first time stepped into the loop
Shu Lei
2007-11-02 03:03:10 +00:00