FIXME triage and formatting cleanups
[org.ibex.js.git] / src / org / ibex / js / JSArray.java
index dd2aecd..7d1e71d 100644 (file)
@@ -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<end-start;i++) // FIXME: with ArrayStore do System.arraycopy()
+        for(int i=0;i<end-start;i++) // FEATURE: with ArrayStore do System.arraycopy()
             a.set(i, get(start+i));
         return a;
     }
@@ -141,7 +141,7 @@ public class JSArray extends Basket.Array implements JS, Basket.CompareFunc {
         int newLength = oldLength - deleteCount + newCount;
         int lengthChange = newLength - oldLength;
         JSArray ret = new JSArray(deleteCount);
-        for(int i=0;i<deleteCount;i++) // FIXME: ArrayStore System.arraycopy()
+        for(int i=0;i<deleteCount;i++) // FEATURE: ArrayStore System.arraycopy()
             ret.set(i, get(start+i));
         if(lengthChange > 0) {
             setSize(newLength);