jswitch
[org.ibex.core.git] / src / org / ibex / js / JSScope.java
index f7d3d6d..5036220 100644 (file)
@@ -50,8 +50,7 @@ public class JSScope extends JS.BT {
         }
         
         public JS _get(JS key) throws JSExn {
-            if(!JS.isString(key)) return super.get(key);
-            //#switch(JS.toString(key))
+            //#jswitch(key)
             case "NaN": return NaN;
             case "Infinity": return POSITIVE_INFINITY;
             case "undefined": return null;
@@ -71,8 +70,7 @@ public class JSScope extends JS.BT {
         }
 
         public JS callMethod(JS method, JS a0, JS a1, JS a2, JS[] rest, int nargs) throws JSExn {
-            if(!JS.isString(method)) return super.callMethod(method, a0, a1, a2, rest, nargs);
-            //#switch(JS.toString(method))
+            //#jswitch(method)
             case "parseInt": return parseInt(a0, N(0));
             case "parseFloat": return parseFloat(a0);
             case "isNaN": { double d = toDouble(a0); return d == d ? F : T; }