import java.util.*;
/** The minimum set of functionality required for objects which are manipulated by JavaScript */
-public interface JS extends Pausable {
+public interface JS {
/** Returns an enumeration of the keys in this object. */
public JS.Enumeration keys() throws JSExn;
public String[] getFormalArgs() { return empty; }
public String coerceToString() { return "array"; } // FIXME
- public Object run(Object o) throws JSExn { return call(null, null); }
- public void pause() throws NotPausableException { throw new NotPausableException(); }
public JS call(JS method, JS[] args) throws JSExn {
//#switch(JSU.str(method))
case "pop": return size() == 0 ? null : (JS)remove(size() - 1);
// You may not use this file except in compliance with the License.
package org.ibex.js;
+import org.ibex.util.*;
/** A JavaScript function, compiled into bytecode */
-class JSFunction extends JS.Immutable implements ByteCodes, Tokens {
+class JSFunction extends JS.Immutable implements ByteCodes, Tokens, Pausable {
private static final JS[] emptyArgs = new JS[0];
// Fields and Accessors ///////////////////////////////////////////////