Mercurial Hosting > luan
changeset 131:15a8e6588f3c
various fixes
git-svn-id: https://luan-java.googlecode.com/svn/trunk@132 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Tue, 10 Jun 2014 04:15:19 +0000 |
parents | 0594c132888b |
children | 14281d5bd36f |
files | src/luan/interp/LuanStateImpl.java src/luan/lib/BasicLib.java src/luan/tools/CmdLine.java |
diffstat | 3 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
diff -r 0594c132888b -r 15a8e6588f3c src/luan/interp/LuanStateImpl.java --- a/src/luan/interp/LuanStateImpl.java Tue Jun 10 02:43:40 2014 +0000 +++ b/src/luan/interp/LuanStateImpl.java Tue Jun 10 04:15:19 2014 +0000 @@ -55,7 +55,7 @@ } private Frame frame = null; - Object returnValues = LuanFunction.NOTHING; + Object returnValues; Closure tailFn; Map<UpValue.EnvGetter,UpValue> envs = new HashMap<UpValue.EnvGetter,UpValue>(); @@ -82,6 +82,7 @@ // returns stack Object[] newFrame(Closure closure, int stackSize, Object[] varArgs) { + returnValues = LuanFunction.NOTHING; frame = new Frame(frame,closure,stackSize,varArgs); return frame.stack; }
diff -r 0594c132888b -r 15a8e6588f3c src/luan/lib/BasicLib.java --- a/src/luan/lib/BasicLib.java Tue Jun 10 02:43:40 2014 +0000 +++ b/src/luan/lib/BasicLib.java Tue Jun 10 04:15:19 2014 +0000 @@ -37,11 +37,13 @@ add( global, "assert_string", LuanState.class, String.class ); add( global, "assert_table", LuanState.class, LuanTable.class ); add( global, "do_file", LuanState.class, String.class ); + add( global, "do_java_resource", LuanState.class, String.class ); add( global, "error", LuanState.class, Object.class ); add( global, "get_metatable", LuanState.class, Object.class ); add( global, "ipairs", LuanState.class, LuanTable.class ); add( global, "load", LuanState.class, String.class, String.class, Boolean.class, Boolean.class ); add( global, "load_file", LuanState.class, String.class ); + add( global, "load_java_resource", LuanState.class, String.class ); add( global, "pairs", LuanState.class, LuanTable.class ); add( global, "range", LuanState.class, Double.TYPE, Double.TYPE, Double.class ); add( global, "raw_equal", Object.class, Object.class );