case DUP: stack.push(stack.peek()); break;
case NEWSCOPE: scope = new JSScope(scope); break;
case OLDSCOPE: scope = scope.getParentScope(); break;
- case ASSERT: {
- JS o = stack.pop();
- if (JS.checkAssertions && !JS.toBoolean(o))
- throw je("ibex.assertion.failed");
- break;
- }
+ case ASSERT: if (!JS.toBoolean(stack.pop())) throw je("ibex.assertion.failed"); break;
case BITNOT: stack.push(JS.N(~JS.toLong(stack.pop()))); break;
case BANG: stack.push(JS.B(!JS.toBoolean(stack.pop()))); break;
case NEWFUNCTION: stack.push(((JSFunction)arg)._cloneWithNewParentScope(scope)); break;
super(parent); this.t = t;
}
public JS get(JS key) throws JSExn {
- if(JS.isString(key)) {
- //#switch(JS.toString(key))
- case "trapee": return t.target;
- case "callee": return t.f;
- case "trapname": return t.key;
- //#end
- }
+ //#jswitch(key)
+ case "trapee": return t.target;
+ case "callee": return t.f;
+ case "trapname": return t.key;
+ //#end
return super.get(key);
}
}
default: return n>= 0 && n < nargs ? rest[n-3] : null;
}
}
- //#switch(JS.toString(key))
+ //#jswitch(key)
case "callee": return callee;
case "length": return JS.N(nargs);
//#end