X-Git-Url: http://git.megacz.com/?p=org.ibex.core.git;a=blobdiff_plain;f=src%2Forg%2Fibex%2Fjs%2FJSFunction.java;fp=src%2Forg%2Fibex%2Fjs%2FJSFunction.java;h=61b5268ac8d9d4c765de1d3d648b9f899af669d5;hp=020cb1137b4461cafd72ca274bb561592aafd41a;hb=14dcf4ac275ea25af9e7bb517e61a82d2b935d0d;hpb=e1a626a6cccf4846b90c98821f597429bf095d71
diff --git a/src/org/ibex/js/JSFunction.java b/src/org/ibex/js/JSFunction.java
index 020cb11..61b5268 100644
--- a/src/org/ibex/js/JSFunction.java
+++ b/src/org/ibex/js/JSFunction.java
@@ -28,7 +28,7 @@ class JSFunction extends JS implements ByteCodes, Tokens, Task {
// FEATURE: make sure that this can only be called from the Scheduler...
/** if you enqueue a function, it gets invoked in its own pauseable context */
public void perform() throws JSExn {
- Interpreter i = new Interpreter(this, true, new JSArray());
+ Interpreter i = new Interpreter(this, true, new Interpreter.JSArgs(this));
i.resume();
}
@@ -61,12 +61,7 @@ class JSFunction extends JS implements ByteCodes, Tokens, Task {
/** Note: code gets run in an unpauseable context. */
public JS call(JS a0, JS a1, JS a2, JS[] rest, int nargs) throws JSExn {
- JSArray args = new JSArray();
- if (nargs > 0) args.addElement(a0);
- if (nargs > 1) args.addElement(a1);
- if (nargs > 2) args.addElement(a2);
- for(int i=3; i