projects
/
org.ibex.core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cleaned up trap handling in Interpreter.java
[org.ibex.core.git]
/
src
/
org
/
ibex
/
js
/
Trap.java
diff --git
a/src/org/ibex/js/Trap.java
b/src/org/ibex/js/Trap.java
index
77476f6
..
e2566c5
100644
(file)
--- 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);
}
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);
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?
}
// FIXME: review; is necessary?
- static class TrapScope extends JSScope {
+ /*static class TrapScope extends JSScope {
Trap t;
Object val = null;
boolean cascadeHappened = false;
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);
}
if (key.equals("trapname")) return t.name;
return super.get(key);
}
- }
+ }*/
}
}