* TODO(jat): lift most of this interface to platform-independent code (only
* exceptions still need to be made platform-independent)
*/
public void invoke(int jscontext, int jsthisInt, int[] jsargsInt,
int returnValueInt) {
JsValue jsthis = new JsValueMoz(jsthisInt);
JsValue jsargs[] = new JsValue[jsargsInt.length];
for (int i = 0; i < jsargsInt.length; ++i) {
jsargs[i] = new JsValueMoz(jsargsInt[i]);
}
JsValue returnValue = new JsValueMoz(returnValueInt);
Class[] paramTypes = method.getParameterTypes();
int argc = paramTypes.length;
Object args[] = new Object[argc];
// too many arguments are ok: the extra will be silently ignored
if (jsargs.length < argc) {