package org.ibex.js;
import org.ibex.util.*;
-import org.ibex.*;
import java.io.*;
import java.util.*;
/** The minimum set of functionality required for objects which are manipulated by JavaScript */
public class JS extends org.ibex.util.BalancedTree {
+ public static boolean checkAssertions = false;
+
public static final Object METHOD = new Object();
public final JS unclone() { return _unclone(); }
public Enumeration keys() throws JSExn { return entries == null ? emptyEnumeration : entries.keys(); }
JS _unclone() { return this; }
public static class Cloneable extends JS {
- public Cloneable() { }
public Object jsclone() throws JSExn {
return new Clone(this);
}
return new JS.UnpauseCallback(i);
}
- public static class UnpauseCallback implements Scheduler.Task {
+ public static class UnpauseCallback implements Task {
Interpreter i;
UnpauseCallback(Interpreter i) { this.i = i; }
public void perform() throws JSExn { unpause(null); }
if((int)d == d) return Integer.toString((int)d);
return o.toString();
}
- throw new RuntimeException("can't coerce that!");
+ throw new RuntimeException("can't coerce "+o+" [" + o.getClass().getName() + "] to type String.");
}
// Instance Methods ////////////////////////////////////////////////////////////////////