ES6 Support Groundwork + Fixes (OLD ONE DON'T LOOK AT ME!!!) #22
@ -1,17 +0,0 @@
|
||||
package me.topchetoeu.jscript.compilation.values;
|
||||
|
||||
import me.topchetoeu.jscript.common.Instruction;
|
||||
import me.topchetoeu.jscript.common.parsing.Location;
|
||||
import me.topchetoeu.jscript.compilation.CompileResult;
|
||||
import me.topchetoeu.jscript.compilation.Node;
|
||||
|
||||
|
||||
public class ArgumentsNode extends Node {
|
||||
@Override public void compile(CompileResult target, boolean pollute) {
|
||||
if (pollute) target.add(Instruction.loadArgs());
|
||||
}
|
||||
|
||||
public ArgumentsNode(Location loc) {
|
||||
super(loc);
|
||||
}
|
||||
}
|
@ -13,7 +13,6 @@ import me.topchetoeu.jscript.common.parsing.Source;
|
||||
import me.topchetoeu.jscript.compilation.CompileResult;
|
||||
import me.topchetoeu.jscript.compilation.JavaScript;
|
||||
import me.topchetoeu.jscript.compilation.Node;
|
||||
import me.topchetoeu.jscript.compilation.values.ArgumentsNode;
|
||||
import me.topchetoeu.jscript.compilation.values.ArrayNode;
|
||||
import me.topchetoeu.jscript.compilation.values.ObjectNode;
|
||||
import me.topchetoeu.jscript.compilation.values.ThisNode;
|
||||
@ -56,15 +55,6 @@ public class CallNode extends Node {
|
||||
else if (func instanceof ThisNode) {
|
||||
res = "this";
|
||||
}
|
||||
else if (func instanceof ArgumentsNode) {
|
||||
res = "arguments";
|
||||
}
|
||||
// else if (func instanceof VariableIndexNode) {
|
||||
// var i = ((VariableIndexNode)func).index;
|
||||
|
||||
// if (i == 0) res = "this";
|
||||
// else if (i == 1) res = "arguments";
|
||||
// }
|
||||
else if (func instanceof ArrayNode) {
|
||||
var els = new ArrayList<String>();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user