Remove env constructors.
This commit is contained in:
@@ -25,14 +25,15 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Hashtable;
|
||||
|
||||
import org.luaj.vm2.LuaInteger;
|
||||
import org.luaj.vm2.LocVars;
|
||||
import org.luaj.vm2.Lua;
|
||||
import org.luaj.vm2.LuaError;
|
||||
import org.luaj.vm2.Prototype;
|
||||
import org.luaj.vm2.LuaInteger;
|
||||
import org.luaj.vm2.LuaString;
|
||||
import org.luaj.vm2.LuaValue;
|
||||
import org.luaj.vm2.Prototype;
|
||||
import org.luaj.vm2.compiler.FuncState.BlockCnt;
|
||||
import org.luaj.vm2.lib.MathLib;
|
||||
|
||||
|
||||
public class LexState {
|
||||
@@ -397,7 +398,7 @@ public class LexState {
|
||||
exp1 = -exp1;
|
||||
e += exp1;
|
||||
}
|
||||
return LuaValue.valueOf(sgn * m * Math.pow(2.0, e));
|
||||
return LuaValue.valueOf(sgn * m * MathLib.dpow_d(2.0, e));
|
||||
}
|
||||
|
||||
boolean str2d(String str, SemInfo seminfo) {
|
||||
|
||||
@@ -53,14 +53,7 @@ abstract public class OneArgFunction extends LibFunction {
|
||||
/** Default constructor */
|
||||
public OneArgFunction() {
|
||||
}
|
||||
|
||||
/** Constructor with specific environment
|
||||
* @param env The environment to apply during constructon.
|
||||
*/
|
||||
public OneArgFunction( LuaValue env ) {
|
||||
throw new UnsupportedOperationException("Cannot supply env to constructor");
|
||||
}
|
||||
|
||||
|
||||
public final LuaValue call() {
|
||||
return call(NIL);
|
||||
}
|
||||
|
||||
@@ -54,13 +54,6 @@ abstract public class ThreeArgFunction extends LibFunction {
|
||||
public ThreeArgFunction() {
|
||||
}
|
||||
|
||||
/** Constructor with specific environment
|
||||
* @param env The environment to apply during constructon.
|
||||
*/
|
||||
public ThreeArgFunction( LuaValue env ) {
|
||||
throw new UnsupportedOperationException("Cannot supply env to constructor");
|
||||
}
|
||||
|
||||
public final LuaValue call() {
|
||||
return call(NIL, NIL, NIL);
|
||||
}
|
||||
|
||||
@@ -54,13 +54,6 @@ abstract public class TwoArgFunction extends LibFunction {
|
||||
public TwoArgFunction() {
|
||||
}
|
||||
|
||||
/** Constructor with specific environment
|
||||
* @param env The environment to apply during constructon.
|
||||
*/
|
||||
public TwoArgFunction( LuaValue env ) {
|
||||
throw new UnsupportedOperationException("Cannot supply env to constructor");
|
||||
}
|
||||
|
||||
public final LuaValue call() {
|
||||
return call(NIL, NIL);
|
||||
}
|
||||
|
||||
@@ -49,10 +49,6 @@ abstract public class VarArgFunction extends LibFunction {
|
||||
public VarArgFunction() {
|
||||
}
|
||||
|
||||
public VarArgFunction( LuaValue env ) {
|
||||
throw new UnsupportedOperationException("Cannot supply env to constructor");
|
||||
}
|
||||
|
||||
public LuaValue call() {
|
||||
return invoke(NONE).arg1();
|
||||
}
|
||||
|
||||
@@ -52,13 +52,6 @@ abstract public class ZeroArgFunction extends LibFunction {
|
||||
public ZeroArgFunction() {
|
||||
}
|
||||
|
||||
/** Constructor with specific environment
|
||||
* @param env The environment to apply during constructon.
|
||||
*/
|
||||
public ZeroArgFunction( LuaValue env ) {
|
||||
throw new UnsupportedOperationException("Cannot supply env to constructor");
|
||||
}
|
||||
|
||||
public LuaValue call(LuaValue arg) {
|
||||
return call();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user