635f127cd0
Add new built-in function type() that returns the name of the type of the given value as a string. Includes test case.
Ian Farmer
2007-07-16 02:37:08 +00:00
c65dec54fb
Fix a bug in how comparison instructions are handled: the 'a' intruction field was ignored. Includes new test case.
Ian Farmer
2007-07-15 20:33:20 +00:00
ba3da1ca2c
Fine-tune protection to enable compiler porting.
James Roseborough
2007-07-13 14:49:58 +00:00
2a28925f74
Fix a bug in how OP_SETLIST is handled. Includes new test case.
Ian Farmer
2007-07-12 04:06:41 +00:00
f7d6a49acb
Add a new test case for upvalues, and enhance upvalue handling so that they pass.
Ian Farmer
2007-07-09 04:10:25 +00:00
45964d7e22
Add simple test for correct upvalue handling.
Ian Farmer
2007-07-09 01:43:34 +00:00
62022d5881
While loading chunks, check if double values can be represented as integers, and load them as LIntegers instead of LDoubles if so. Also change test2 so that it does not fail because of the rounding problem. With these changes, 4 out of 7 test cases in LuaJTest now pass.
Ian Farmer
2007-07-09 01:31:31 +00:00
241edfbf37
Added a JUnit test case. Unfortunately, it will almost certainly not work on Windows in its present form, and only one of the test cases passes. In addition two changes to print() were made: output can be redirected to an arbitrary OutputStream and tabs are no longer printed at the end of each line.
Ian Farmer
2007-07-04 04:25:06 +00:00
ba26aed248
Add maven's "target" directory to .cvsignore file.
Ian Farmer
2007-07-04 03:24:44 +00:00
d987d89092
Fix two bugs in LuaJava compatibility addon: (1) LDouble to Double/double coercions were missing (2) LuaJava.LMethod.luaStackCall adjusted the top of stack in a way that produces the wrong results when the call occurs as the argument to another function (such as print)
Ian Farmer
2007-07-04 03:23:09 +00:00
a3ffb9a207
Add .cvsignore listing "bin" directory, which is Eclipse's build outputs directory.
Ian Farmer
2007-07-04 02:46:18 +00:00
bb8844f6b8
Fix Eclipse project settings: Java 1.5 features are used, so the java language version must be set to 5.
Ian Farmer
2007-07-04 02:44:07 +00:00
7aab64e6d3
Allow null values in arguments to pushCall, expose the underlying storage in LTable to simplify add-ons until the lTable is finished.
James Roseborough
2007-07-02 14:39:17 +00:00
2fe87230d8
Fix pointer to next available stack slot
James Roseborough
2007-06-27 14:30:18 +00:00
c8e1934916
Refactor call stack and its use throughout. CallFrame now does all bytecode processing, and the callframe is reinitialized anytime something might have changed, like a function call.
James Roseborough
2007-06-27 06:43:33 +00:00
93fc4699a9
Type coercion for luajava package, make luajava an "addon"
James Roseborough
2007-06-24 15:04:19 +00:00
1d7793f8e6
Initial draft of luajava package support.
James Roseborough
2007-06-19 05:17:07 +00:00
99077764ac
Fix basic class processing via metatables. Make print output more closely match that produces by C interpreter
James Roseborough
2007-06-19 04:25:34 +00:00
54927db2fc
Implement most of metatables
James Roseborough
2007-06-17 02:58:40 +00:00
5d3c86e552
Partial implementation of metatables.
James Roseborough
2007-06-16 15:31:27 +00:00
7449605d56
Improve table processing when table lookup fails.
James Roseborough
2007-06-16 04:42:20 +00:00
a9c72414d1
Fix for loop that uses iterator
James Roseborough
2007-06-16 02:47:47 +00:00
4fb619fe87
fix builtins to keep them from obliterating stack values.
James Roseborough
2007-06-15 15:20:21 +00:00
be20581731
Improve call stack handling to prepare for propert tail call handling.
James Roseborough
2007-06-15 06:41:40 +00:00
19bd995ba6
Enhance binary compare operators, especially equals, to more closely match what standard lua does.
James Roseborough
2007-06-14 04:58:09 +00:00
14108aee87
Fix upvalues that allow closures to work properly.
James Roseborough
2007-06-14 04:09:57 +00:00
4b7bbc1d8e
Vix VARARGS passing by adjusting stack on varargs call to bury varargs + length of varargs under base of stack
James Roseborough
2007-06-12 14:30:49 +00:00
b6f123d5e5
Improve vararg handling logic.
James Roseborough
2007-06-12 06:22:55 +00:00
da6f63bb3d
Fix calling convention by managing top of stack and adjusting on way in and out of function calls.
James Roseborough
2007-06-11 05:51:19 +00:00
05cfdaa33b
Improve calling convention handling when the number of arguments doesn't match the expected number, and the number of return values doesn't match those needed.
James Roseborough
2007-06-11 04:30:03 +00:00
de763e0a1e
Support for iterator-style for loops, and "pairs" builting function
James Roseborough
2007-06-10 22:53:09 +00:00
e1e6625aa1
Add binary compares, some unary ops, fix binary arithmetic, add plain for loop.
James Roseborough
2007-06-10 19:49:47 +00:00
70dfc20f57
Initial draft of interpreter. Lua compiled "chunks" can be unmarshalled. Approximately half of bytecodes implemented in some form or another.
James Roseborough
2007-06-08 05:11:37 +00:00