jswitch
[org.ibex.core.git] / src / org / ibex / js / Interpreter.java
index 6f163fa..3b4dd28 100644 (file)
@@ -614,13 +614,11 @@ class Interpreter implements ByteCodes, Tokens {
             super(parent); this.t = t;
         }
         public JS get(JS key) throws JSExn {
             super(parent); this.t = t;
         }
         public JS get(JS key) throws JSExn {
-            if(JS.isString(key)) {
-                //#switch(JS.toString(key))
-                case "trapee": return t.target;
-                case "callee": return t.f;
-                case "trapname": return t.key;
-                //#end
-            }
+            //#jswitch(key)
+            case "trapee": return t.target;
+            case "callee": return t.f;
+            case "trapname": return t.key;
+            //#end
             return super.get(key);
         }
     }
             return super.get(key);
         }
     }
@@ -651,7 +649,7 @@ class Interpreter implements ByteCodes, Tokens {
                     default: return n>= 0 && n < nargs ? rest[n-3] : null;
                 }
             }
                     default: return n>= 0 && n < nargs ? rest[n-3] : null;
                 }
             }
-            //#switch(JS.toString(key))
+            //#jswitch(key)
             case "callee": return callee;
             case "length": return JS.N(nargs);
             //#end
             case "callee": return callee;
             case "length": return JS.N(nargs);
             //#end