Remove env constructors.

This commit is contained in:
James Roseborough
2012-09-10 02:45:20 +00:00
parent 329bfa26ca
commit f40a38ccae
6 changed files with 5 additions and 36 deletions

View File

@@ -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) {

View File

@@ -54,13 +54,6 @@ abstract public class OneArgFunction extends LibFunction {
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);
}

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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();
}

View File

@@ -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();
}