fixed bug related to removal of JS.call(JS[])
[org.ibex.js.git] / src / org / ibex / js / JSFunction.java
index a14bdec..fc5cb39 100644 (file)
@@ -51,7 +51,9 @@ class JSFunction extends JS.Immutable implements ByteCodes, Tokens, Pausable {
         return ret;
     }
 
-    public JS call(JS[] args) throws JSExn { return (JS)new Interpreter(this, false, args).run(null); }
+    public JS call(JS method, JS[] args) throws JSExn {
+        if (method != null) return super.call(method, args);
+        return (JS)new Interpreter(this, false, args).run(null); }
 
     JSScope getParentScope() { return parentScope; }