- static class TrapArgs extends JS {
- private Trap t;
- private JS val;
- public TrapArgs(Trap t, JS val) { this.t = t; this.val = val; }
- public JS get(JS key) throws JSExn {
- if(JS.isInt(key) && JS.toInt(key) == 0) return val;
- //#switch(JS.toString(key))
- case "trapee": return t.target;
- case "callee": return t.f;
- case "trapname": return t.key;
- case "length": return t.isWriteTrap() ? ONE : ZERO;
- //#end
- return super.get(key);
- }
- }
-
- static class JSArgs extends JS {
- private final JS a0;
- private final JS a1;
- private final JS a2;
- private final JS[] rest;
- private final int nargs;