- public Object call(Object a0, Object a1, Object a2, Object[] 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<nargs; i++) args.addElement(rest[i-3]);
- Interpreter cx = new Interpreter(this, false, args);
+ public JS call(JS a0, JS a1, JS a2, JS[] rest, int nargs) throws JSExn {
+ Interpreter cx = new Interpreter(this, false, new Interpreter.JSArgs(a0,a1,a2,rest,nargs,this));