# HG changeset patch # User Paul Boddie # Date 1243124990 -7200 # Node ID f7698e3444e0b81a48a8134b0ea8ac4756a143e2 # Parent 09ae448806d1c6361c576d3e179cb9145e9b8190 Removed redundant code. diff -r 09ae448806d1 -r f7698e3444e0 rsvp.py --- a/rsvp.py Sun May 24 02:16:33 2009 +0200 +++ b/rsvp.py Sun May 24 02:29:50 2009 +0200 @@ -543,49 +543,8 @@ # Retrieve the context from the first local. frame = self.local_sp_stack[-1] - context_context, context_ref = self.frame_stack[frame] # + 0 nlocals = len(self.frame_stack[frame:]) - # Support sliding of the frame to exclude any inappropriate context. - # Since a context will always be present when this instruction is being - # used (whether or not it is desired), we can always test the nature of - # the context. - - if context_ref is None: - self.local_sp_stack[-1] += 1 - nlocals -= 1 - else: - context_data = self.load(context_ref) - - # Classes are not themselves usable as the self argument. - # NOTE: This may change at some point. - # However, where classes appear as the context, instance - # compatibility is required in the first argument. - - if context_data.attrcode is None: # absent attrcode == class - - # Slide the frame to exclude the context. - - self.local_sp_stack[-1] += 1 - nlocals -= 1 - - # Check the context against the first argument. - # NOTE: Raise a proper exception here. - - if nlocals > 0: - self_context, self_ref = self.frame_stack[frame + 1] - if not self._CheckInstance(self_ref, context_context): - #raise Exception, "CheckFrame %r (%r vs. %r)" % (self.operand, self.load(self_ref), self.load(context_context)) - self.exception = self._MakeObject(2, self.type_error_instance) - return self.RaiseException() - else: - #raise Exception, "CheckFrame %r (no self argument)" % self.operand - self.exception = self._MakeObject(2, self.type_error_instance) - return self.RaiseException() - - # Test the frame size. - # NOTE: Raise a proper exception here. - if not ((nargs - ndefaults) <= nlocals and (nlocals <= nargs or has_star)): #raise Exception, "CheckFrame %r (%r <= %r <= %r)" % (self.operand, nargs - ndefaults, nlocals, nargs) self.exception = self._MakeObject(2, self.type_error_instance)