comparison src/luan/interp/LuaClosure.java @ 40:e3624b7cd603

implement stack trace git-svn-id: https://luan-java.googlecode.com/svn/trunk@41 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Fri, 21 Dec 2012 10:45:54 +0000
parents c3eab5a3ce3c
children
comparison
equal deleted inserted replaced
39:e5bcb1eeafc1 40:e3624b7cd603
1 package luan.interp; 1 package luan.interp;
2 2
3 import luan.LuaFunction; 3 import luan.LuaFunction;
4 import luan.LuaState; 4 import luan.LuaState;
5 import luan.LuaElement;
5 import luan.LuaException; 6 import luan.LuaException;
6 7
7 8
8 final class LuaClosure extends LuaFunction { 9 final class LuaClosure extends LuaFunction {
9 private final Chunk chunk; 10 private final Chunk chunk;
21 upValues[i] = upValueGetters[i].get(lua); 22 upValues[i] = upValueGetters[i].get(lua);
22 } 23 }
23 } 24 }
24 } 25 }
25 26
26 public Object[] call(LuaState lua,Object... args) throws LuaException { 27 public Object[] call(LuaState lua,Object[] args) throws LuaException {
27 return call(this,(LuaStateImpl)lua,args); 28 return call(this,(LuaStateImpl)lua,args);
28 } 29 }
29 30
30 private static Object[] call(LuaClosure closure,LuaStateImpl lua,Object[] args) throws LuaException { 31 private static Object[] call(LuaClosure closure,LuaStateImpl lua,Object[] args) throws LuaException {
31 while(true) { 32 while(true) {