trim down public api
[org.ibex.core.git] / src / org / ibex / core / Ibex.java
index e14a970..ccc6afb 100644 (file)
@@ -185,7 +185,7 @@ public final class Ibex extends JS implements JS.Cloneable {
                         throw new JSExn("invalid resource specifier " + url);
                     }
                     case "thread.sleep": sleep(JS.toInt(a)); return null;
-                    case "regexp": return new JSRegexp(a, null);
+                    case "regexp": return JS.newRegexp(a, null);
                     case "net.rpc.xml": return new XMLRPC(JS.toString(a), "");
                     case "crypto.rsa": /* FEATURE */ return null;
                     case "crypto.md5": /* FEATURE */ return null;
@@ -202,7 +202,7 @@ public final class Ibex extends JS implements JS.Cloneable {
                 case 2:
                     //#jswitch(name)
                     case "stream.watch": return new Stream.ProgressWatcher(a, b);
-                    case "regexp": return new JSRegexp(a, b);
+                    case "regexp": return JS.newRegexp(a, b);
                     //#end
                 case 3:
                     //#jswitch(name)
@@ -243,7 +243,7 @@ public final class Ibex extends JS implements JS.Cloneable {
         }
     }
     
-    public static final JSMath ibexMath = new JSMath() {
+    public static final JS ibexMath = new JS() {
             // FEATURE: find a cleaner way to do this
             private JS gs = /*new JSScope.Global();*/ null; // FIXME: Global scope
             public JS get(JS key) throws JSExn {
@@ -253,7 +253,7 @@ public final class Ibex extends JS implements JS.Cloneable {
                 case "NaN": return METHOD;
                 case "Infinity": return METHOD;
                 //#end
-                return super.get(key);
+                return MATH.get(key);
             }
             public JS callMethod(JS name, JS a, JS b, JS c, JS[] rest, int nargs) throws JSExn {
                 //#jswitch(name)
@@ -262,7 +262,7 @@ public final class Ibex extends JS implements JS.Cloneable {
                 case "NaN": return gs.callMethod(name,a,b,c,rest,nargs);
                 case "Infinity": return gs.callMethod(name,a,b,c,rest,nargs);
                 //#end
-                return super.callMethod(name,a,b,c,rest,nargs);
+                return MATH.callMethod(name,a,b,c,rest,nargs);
             }
     };