def eval(self, ctx): value = ctx.stack.pop() name = ctx.stack.pop() left = ctx.stack.pop() typ = type(left) if typ in PRIMITIVES: if typ is NULL_TYPE: raise MakeError( 'TypeError', "Cannot set property '%s' of null" % to_string(name)) elif typ is UNDEFINED_TYPE: raise MakeError( 'TypeError', "Cannot set property '%s' of undefined" % to_string(name)) ctx.stack.append(BINARY_OPERATIONS[self.op](value, get_member( left, name, ctx.space))) return else: ctx.stack.append(BINARY_OPERATIONS[self.op](value, get_member( left, name, ctx.space))) left.put_member(name, ctx.stack[-1])
def eval(self, ctx): prop = ctx.stack.pop() base = ctx.stack.pop() func = get_member(base, prop, ctx.space) return bytecode_call(ctx, func, base, ())
def eval(self, ctx): value = ctx.stack.pop() name = ctx.stack.pop() left = ctx.stack.pop() typ = type(left) if typ in PRIMITIVES: if typ is NULL_TYPE: raise MakeError('TypeError', "Cannot set property '%s' of null" % to_string(name)) elif typ is UNDEFINED_TYPE: raise MakeError('TypeError', "Cannot set property '%s' of undefined" % to_string(name)) ctx.stack.append(BINARY_OPERATIONS[self.op](get_member(left, name, ctx.space), value)) return else: ctx.stack.append(BINARY_OPERATIONS[self.op](get_member(left, name, ctx.space), value)) left.put_member(name, ctx.stack[-1])
def eval(self, ctx): name = ctx.stack.pop() left = ctx.stack.pop() target = to_number(get_member(left, name, ctx.space)) + self.cb if type(left) not in PRIMITIVES: left.put_member(name, target) ctx.stack.append(target + self.ca)
def eval(self, ctx): prop = ctx.stack.pop() obj = ctx.stack.pop() ctx.stack.append(get_member(obj, prop, ctx.space))