cleaned up trap handling in Interpreter.java
[org.ibex.core.git] / src / org / ibex / js / Trap.java
index 77476f6..e2566c5 100644 (file)
@@ -29,6 +29,9 @@ class Trap {
         getInvoker.add(2, Tokens.RETURN, null);
     }
     
+    boolean readTrap() { return f.numFormalArgs == 0; }
+    boolean writeTrap() { return f.numFormalArgs != 0; }
+    
     void invoke(Object value) throws JSExn {
         Interpreter i = new Interpreter(putInvoker, false, null);
         i.stack.push(trapee);
@@ -45,7 +48,7 @@ class Trap {
     }
 
     // FIXME: review; is necessary?
-    static class TrapScope extends JSScope {
+    /*static class TrapScope extends JSScope {
         Trap t;
         Object val = null;
         boolean cascadeHappened = false;
@@ -56,6 +59,6 @@ class Trap {
             if (key.equals("trapname")) return t.name;
             return super.get(key);
         }
-    }
+    }*/
 }