X-Git-Url: http://git.megacz.com/?p=org.ibex.js.git;a=blobdiff_plain;f=src%2Forg%2Fibex%2Fjs%2FJSArray.java;fp=src%2Forg%2Fibex%2Fjs%2FJSArray.java;h=7d1e71dca7139381544d340dda012a8f462f606b;hp=dd2aecd355210948f989fef0d76f8431be92c2fc;hb=f3ad8b6cba43f3c5364dc2cd9f1d050c1f48f167;hpb=f63da7aeac2f942be41aefde91002d14117a8573 diff --git a/src/org/ibex/js/JSArray.java b/src/org/ibex/js/JSArray.java index dd2aecd..7d1e71d 100644 --- a/src/org/ibex/js/JSArray.java +++ b/src/org/ibex/js/JSArray.java @@ -56,7 +56,7 @@ public class JSArray extends Basket.Array implements JS, Basket.CompareFunc { } public String[] getFormalArgs() { return empty; } - public String coerceToString() { return "array"; } // FIXME + public String coerceToString() throws JSExn { throw new JSExn("cannot coerce a "+getClass().getName()+" to a string"); } public JS call(JS method, JS[] args) throws JSExn { //#switch(JSU.str(method)) @@ -87,7 +87,7 @@ public class JSArray extends Basket.Array implements JS, Basket.CompareFunc { public void delTrap(JS k, JS f) throws JSExn { throw new JSExn("arrays do not support traps"); } public JS.Trap getTrap(JS k) throws JSExn { throw new JSExn("arrays do not support traps"); } - /** FIXME: move to specialised ArrayStore superclass. */ + /** FEATURE: move to specialised ArrayStore superclass. */ public void addAll(JS[] entries) { for (int i=0; i < entries.length; i++) add(entries[i]); } public void setSize(int newSize) { @@ -122,7 +122,7 @@ public class JSArray extends Basket.Array implements JS, Basket.CompareFunc { if(start > length) start = length; if(end > length) end = length; JSArray a = new JSArray(end-start); - for(int i=0;i 0) { setSize(newLength);