X-Git-Url: http://git.megacz.com/?p=org.ibex.core.git;a=blobdiff_plain;f=src%2Forg%2Fibex%2Fjs%2FJS.java;h=a81c41950be64bf3f5bb08f4526e9ddd83805d62;hp=96ab988b48d7b69968b4a64acd6f8633afdf2984;hb=9aff374663aa8e336b3903c2ee97aa09f344ea0c;hpb=e471904257ff52be6a0b77cd5946cb4219e36da5 diff --git a/src/org/ibex/js/JS.java b/src/org/ibex/js/JS.java index 96ab988..a81c419 100644 --- a/src/org/ibex/js/JS.java +++ b/src/org/ibex/js/JS.java @@ -28,7 +28,6 @@ public abstract class JS { throw new JSExn("method not found (" + JS.debugToString(method) + ")"); } - // FIXME: JSArgs objects, pointers into stack frame public JS call(JS a0, JS a1, JS a2, JS[] rest, int nargs) throws JSExn { throw new JSExn("you cannot call this object (class=" + this.getClass().getName() +")"); } @@ -42,6 +41,7 @@ public abstract class JS { Trap getTrap(JS key) { return null; } void putTrap(JS key, Trap value) throws JSExn { throw new JSExn("traps cannot be placed on this object (class=" + this.getClass().getName() +")"); } String coerceToString() throws JSExn { throw new JSExn("can't coerce to a string (class=" + getClass().getName() +")"); } + String debugToString() { return "[class=" + getClass().getName() + "]"; } boolean jsequals(JS o) { return this == o; } public static class O extends JS { @@ -209,7 +209,7 @@ public abstract class JS { public static String debugToString(JS o) { try { return toString(o); } - catch(JSExn e) { return "[class=" + o.getClass().getName() + "]"; } + catch(JSExn e) { return o.debugToString(); } } public static boolean isInt(JS o) {