X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fibex%2Fjs%2FTrap.java;fp=src%2Forg%2Fibex%2Fjs%2FTrap.java;h=e2566c58999e78c63f1b8ff1f8b7aeca223233a9;hb=64b8c4b435a4457e342fd03fc4a725d5ea16da36;hp=77476f6f688b9d0711c54b550b5d508014e26084;hpb=2b3517021799c6d2f5ebbd3af4f399ddbfd2c4e8;p=org.ibex.core.git diff --git a/src/org/ibex/js/Trap.java b/src/org/ibex/js/Trap.java index 77476f6..e2566c5 100644 --- a/src/org/ibex/js/Trap.java +++ b/src/org/ibex/js/Trap.java @@ -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); } - } + }*/ }