- case LITERAL: t.push(arg[pc]); break;
- case OBJECT: t.push(new JS.Obj()); break;
- case ARRAY: t.push(new JS.Array(JS.toNumber(arg[pc]).intValue())); break;
- case DECLARE: s.declare((String)(arg[pc]==null ? t.peek() : arg[pc])); if(arg[pc] != null) t.push(arg[pc]); break;
- case TOPSCOPE: t.push(s); break;
- case JT: if (JS.toBoolean(t.pop())) pc += JS.toNumber(arg[pc]).intValue() - 1; break;
- case JF: if (!JS.toBoolean(t.pop())) pc += JS.toNumber(arg[pc]).intValue() - 1; break;
- case JMP: pc += JS.toNumber(arg[pc]).intValue() - 1; break;
- case POP: t.pop(); break;
- case SWAP: { Object o1 = t.pop(); Object o2 = t.pop(); t.push(o1); t.push(o2); break; }
- case DUP: t.push(t.peek()); break;
- case NEWSCOPE: s = new JS.Scope(s); break;
- case OLDSCOPE: s = s.getParentScope(); break;
- case ASSERT: if (!JS.toBoolean(t.pop())) throw je("assertion failed"); break;
- case BITNOT: t.push(new Long(~JS.toLong(t.pop()))); break;
- case BANG: t.push(new Boolean(!JS.toBoolean(t.pop()))); break;
+ case LITERAL: cx.stack.push(curArg); break;
+ case OBJECT: cx.stack.push(new JS.Obj()); break;
+ case ARRAY: cx.stack.push(new JS.Array(JS.toNumber(curArg).intValue())); break;
+ case DECLARE: cx.scope.declare((String)(curArg==null ? cx.stack.peek() : curArg)); if(curArg != null) cx.stack.push(curArg); break;
+ case TOPSCOPE: cx.stack.push(cx.scope); break;
+ case JT: if (JS.toBoolean(cx.stack.pop())) cx.pc += JS.toNumber(curArg).intValue() - 1; break;
+ case JF: if (!JS.toBoolean(cx.stack.pop())) cx.pc += JS.toNumber(curArg).intValue() - 1; break;
+ case JMP: cx.pc += JS.toNumber(curArg).intValue() - 1; break;
+ case POP: cx.stack.pop(); break;
+ case SWAP: { Object o1 = cx.stack.pop(); Object o2 = cx.stack.pop(); cx.stack.push(o1); cx.stack.push(o2); break; }
+ case DUP: cx.stack.push(cx.stack.peek()); break;
+ case NEWSCOPE: cx.scope = new JS.Scope(cx.scope); break;
+ case OLDSCOPE: cx.scope = cx.scope.getParentScope(); break;
+ case ASSERT: if (!JS.toBoolean(cx.stack.pop())) throw je("assertion failed"); break;
+ case BITNOT: cx.stack.push(new Long(~JS.toLong(cx.stack.pop()))); break;
+ case BANG: cx.stack.push(new Boolean(!JS.toBoolean(cx.stack.pop()))); break;