Mercurial Hosting > luan
diff src/luan/interp/EqExpr.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 | 8a57ebfdfd78 |
children | a443637829c1 |
line wrap: on
line diff
--- a/src/luan/interp/EqExpr.java Thu Dec 20 02:54:06 2012 +0000 +++ b/src/luan/interp/EqExpr.java Fri Dec 21 10:45:54 2012 +0000 @@ -5,12 +5,13 @@ import luan.LuaFunction; import luan.LuaTable; import luan.LuaException; +import luan.LuaSource; final class EqExpr extends BinaryOpExpr { - EqExpr(Expr op1,Expr op2) { - super(op1,op2); + EqExpr(LuaSource.Element se,Expr op1,Expr op2) { + super(se,op1,op2); } @Override public Object eval(LuaStateImpl lua) throws LuaException { @@ -27,7 +28,7 @@ Object f = mt1.get("__eq"); if( f == null || !f.equals(mt2.get("__eq")) ) return null; - LuaFunction fn = Lua.checkFunction(f); - return Lua.toBoolean( Utils.first(fn.call(lua,o1,o2)) ); + LuaFunction fn = lua.checkFunction(se,f); + return Lua.toBoolean( Lua.first(lua.call(fn,se,"__eq",o1,o2)) ); } }