- public Object call2(Object method, Object arg1, Object arg2) {
- if (method.equals("parseInt")) return parseInt(arg1, arg2);
- return null;
+ public Object callMethod(Object method, Object a0, Object a1, Object a2, Object[] rest, int nargs) {
+ switch(nargs) {
+ case 0: {
+ //#switch(method)
+ case "stringFromCharCode":
+ JSArray args = new JSArray();
+ for(int i=0; i<nargs; i++) args.addElement(i==0?a0:i==1?a1:i==2?a2:rest[i-3]);
+ return stringFromCharCode(args);
+ default: break;
+ //#end
+ }
+ case 1: {
+ //#switch(method)
+ case "parseInt": return parseInt(a0, N(0));
+ case "isNaN": { double d = toDouble(a0); return d == d ? F : T; }
+ case "isFinite": { double d = toDouble(a0); return (d == d && !Double.isInfinite(d)) ? T : F; }
+ case "decodeURI": throw new JS.Exn("unimplemented");
+ case "decodeURIComponent": throw new JS.Exn("unimplemented");
+ case "encodeURI": throw new JS.Exn("unimplemented");
+ case "encodeURIComponent": throw new JS.Exn("unimplemented");
+ case "escape": throw new JS.Exn("unimplemented");
+ case "unescape": throw new JS.Exn("unimplemented");
+ default: break;
+ //#end
+ }
+ case 2: {
+ //#switch(method)
+ case "parseInt": return parseInt(a0, a1);
+ default: break;
+ //#end
+ }
+ }
+ return super.callMethod(method, a0, a1, a2, rest, nargs);