bring back in JSGlobal (default impl)
[org.ibex.js.git] / src / org / ibex / js / JSFunction.java
index 03508b7..a14bdec 100644 (file)
@@ -3,9 +3,10 @@
 // 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 ///////////////////////////////////////////////
@@ -97,7 +98,7 @@ class JSFunction extends JS.Immutable implements ByteCodes, Tokens {
             if (op[i] < 0) sb.append(bytecodeToString[-op[i]]);
             else sb.append(codeToString[op[i]]);
             sb.append(" ");
-            sb.append(arg[i] == null ? "(no arg)" : arg[i] instanceof JS ? Script.str((JS)arg[i]) : arg[i]);
+            sb.append(arg[i] == null ? "(no arg)" : arg[i] instanceof JS ? JSU.str((JS)arg[i]) : arg[i]);
             if((op[i] == JF || op[i] == JT || op[i] == JMP) && arg[i] != null && arg[i] instanceof Number) {
                 sb.append(" jump to ").append(i+((Number) arg[i]).intValue());
             } else  if(op[i] == TRY) {