X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fibex%2Fjs%2FJSPrimitive.java;fp=src%2Forg%2Fibex%2Fjs%2FJSPrimitive.java;h=4d6bcbafdd40823b91fa23a477494b2e0e29f1e4;hb=2d38cf96f2ac17fe1961aadb8bf4f02e5a1b5294;hp=441965563c540b0ad8437359326e12a72c33cd8f;hpb=73131826a18c93af4fb04672bc3ec820e1197ad1;p=org.ibex.js.git diff --git a/src/org/ibex/js/JSPrimitive.java b/src/org/ibex/js/JSPrimitive.java index 4419655..4d6bcba 100644 --- a/src/org/ibex/js/JSPrimitive.java +++ b/src/org/ibex/js/JSPrimitive.java @@ -4,9 +4,11 @@ package org.ibex.js; -class JSPrimitive extends JS { - public JS callMethod(JS method, JS arg0, JS arg1, JS arg2, JS[] rest, int alength) throws JSExn { - //#switch(JS.toString(method)) +class JSPrimitive extends JS.Immutable { + private static final JS.Method METHOD = new JS.Method(); + + public JS callMethod(JS method, JS[] args) throws JSExn { + //#switch(Script.str(method)) case "toFixed": throw new JSExn("toFixed() not implemented"); case "toExponential": throw new JSExn("toExponential() not implemented"); case "toPrecision": throw new JSExn("toPrecision() not implemented"); @@ -49,8 +51,8 @@ class JSPrimitive extends JS { } case "concat": { StringBuffer sb = new StringBuffer(slength*2).append(s); - for(int i=0;i= 1 ? JS.toString(arg0) : "null"; @@ -83,7 +85,7 @@ class JSPrimitive extends JS { return JS.S(s.substring(a,b)); } //#end - return super.callMethod(method,arg0,arg1,arg2,rest,alength); + return super.call(method, args); } public JS get(JS key) throws JSExn {