private JS rp = null;
/** the function for this trap */
- CompiledFunction f = null;
+ JS.CompiledFunction f = null;
/** the name of the property that this trap was placed on */
private String name = null;
* @param isreadtrap true iff this is a read (double-underscore) trap
* @param rp if this trap is being placed via a rootproxy, this is that proxy object.
*/
- static void addTrap(Box trapee, String name, CompiledFunction f, boolean isreadtrap, JS rp) {
+ static void addTrap(Box trapee, String name, JS.CompiledFunction f, boolean isreadtrap, JS rp) {
if (PROHIBITED.get(name) != null || name.startsWith("xwt_")) {
Log.log(Trap.class, "Error: you cannot place traps on special property \"" + name + "\"");
}
// find out what script is currently running
- CompiledFunction placer = Context.getContextForThread(Thread.currentThread()).getCurrentFunction();
+ JS.CompiledFunction placer = Context.getContextForThread(Thread.currentThread()).getCurrentFunction();
if (placer == null) { Log.log(Trap.class, "placer is null"); return; }
String placerNodeName = placer.getSourceName();
public static final CascadeFunction cascadeFunction = new CascadeFunction();
private static class CascadeFunction extends JS.Callable {
CascadeFunction() { setSeal(true); }
- public Object call(Array args) { return call(args, Context.getContextForThread(Thread.currentThread()).getCurrentFunction()); }
- public Object call(Array args, CompiledFunction currentFunction) {
+ public Object call(JS.Array args) { return call(args, Context.getContextForThread(Thread.currentThread()).getCurrentFunction()); }
+ public Object call(JS.Array args, JS.CompiledFunction currentFunction) {
Trap currentTrap = TrapContext.get().currentTrap;
if (args.length() != 0) TrapContext.get().putCascadeHappened = true;
Trap t = currentTrap.next;
private Trap() { allTraps.put(myWeak, dummy); }
/** perform this trap -- arg.length == 0 if this is a get; otherwise it contains a single element to be put */
- public Object perform(Array args) {
+ public Object perform(JS.Array args) {
TrapContext tc = TrapContext.get();
// save both thread-locals on the stack and update their values