Mercurial Hosting > luan
diff core/src/luan/impl/EqExpr.java @ 645:859c0dedc8b6
remove LuanSource
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 29 Mar 2016 18:09:51 -0600 |
parents | 4723d22062ce |
children | 8e8c30b72e9b |
line wrap: on
line diff
--- a/core/src/luan/impl/EqExpr.java Tue Mar 29 13:53:01 2016 -0600 +++ b/core/src/luan/impl/EqExpr.java Tue Mar 29 18:09:51 2016 -0600 @@ -5,13 +5,12 @@ import luan.LuanFunction; import luan.LuanTable; import luan.LuanException; -import luan.LuanElement; final class EqExpr extends BinaryOpExpr { - EqExpr(LuanElement el,Expr op1,Expr op2) { - super(el,op1,op2); + EqExpr(Expr op1,Expr op2) { + super(op1,op2); } @Override public Object eval(LuanStateImpl luan) throws LuanException { @@ -44,13 +43,8 @@ Object f = mt1.rawGet("__eq"); if( f == null || !f.equals(mt2.rawGet("__eq")) ) return false; - luan.push(el,"__eq"); - try { - LuanFunction fn = luan.checkFunction(f); - return luan.checkBoolean( Luan.first(fn.call(luan,new Object[]{o1,o2})) ); - } finally { - luan.pop(); - } + LuanFunction fn = luan.checkFunction(f); + return luan.checkBoolean( Luan.first(fn.call(luan,new Object[]{o1,o2})) ); } @Override public String toString() {