better JSArray.sort() exception handling
[org.ibex.core.git] / src / org / ibex / js / Test.java
index d2dd77f..8e4be33 100644 (file)
@@ -14,7 +14,7 @@ public class Test extends JS {
         s.put(JS.S("sys"),new Test());
         f = JS.cloneWithNewParentScope(f,s);
         //JS ret = f.call(null,null,null,null,0);
-        Interpreter i = new Interpreter((JSFunction)f, true, new JSArray());
+        Interpreter i = new Interpreter((JSFunction)f, true, new Interpreter.JSArgs(f));
         JS ret = i.resume();
         while(up != null) {
             JS.UnpauseCallback up = Test.up; Test.up = null;
@@ -59,7 +59,7 @@ public class Test extends JS {
     public JS callMethod(JS method, JS a0, JS a1, JS a2, JS[] rest, int nargs) throws JSExn {
         if(!JS.isString(method)) return null;
         if("print".equals(JS.toString(method))) {
-            System.out.println(JS.toString(a0));
+            System.out.println(JS.debugToString(a0));
             return null;
         }
         return null;