1.1 --- a/rsvp.py Sun May 24 02:16:33 2009 +0200
1.2 +++ b/rsvp.py Sun May 24 02:29:50 2009 +0200
1.3 @@ -543,49 +543,8 @@
1.4 # Retrieve the context from the first local.
1.5
1.6 frame = self.local_sp_stack[-1]
1.7 - context_context, context_ref = self.frame_stack[frame] # + 0
1.8 nlocals = len(self.frame_stack[frame:])
1.9
1.10 - # Support sliding of the frame to exclude any inappropriate context.
1.11 - # Since a context will always be present when this instruction is being
1.12 - # used (whether or not it is desired), we can always test the nature of
1.13 - # the context.
1.14 -
1.15 - if context_ref is None:
1.16 - self.local_sp_stack[-1] += 1
1.17 - nlocals -= 1
1.18 - else:
1.19 - context_data = self.load(context_ref)
1.20 -
1.21 - # Classes are not themselves usable as the self argument.
1.22 - # NOTE: This may change at some point.
1.23 - # However, where classes appear as the context, instance
1.24 - # compatibility is required in the first argument.
1.25 -
1.26 - if context_data.attrcode is None: # absent attrcode == class
1.27 -
1.28 - # Slide the frame to exclude the context.
1.29 -
1.30 - self.local_sp_stack[-1] += 1
1.31 - nlocals -= 1
1.32 -
1.33 - # Check the context against the first argument.
1.34 - # NOTE: Raise a proper exception here.
1.35 -
1.36 - if nlocals > 0:
1.37 - self_context, self_ref = self.frame_stack[frame + 1]
1.38 - if not self._CheckInstance(self_ref, context_context):
1.39 - #raise Exception, "CheckFrame %r (%r vs. %r)" % (self.operand, self.load(self_ref), self.load(context_context))
1.40 - self.exception = self._MakeObject(2, self.type_error_instance)
1.41 - return self.RaiseException()
1.42 - else:
1.43 - #raise Exception, "CheckFrame %r (no self argument)" % self.operand
1.44 - self.exception = self._MakeObject(2, self.type_error_instance)
1.45 - return self.RaiseException()
1.46 -
1.47 - # Test the frame size.
1.48 - # NOTE: Raise a proper exception here.
1.49 -
1.50 if not ((nargs - ndefaults) <= nlocals and (nlocals <= nargs or has_star)):
1.51 #raise Exception, "CheckFrame %r (%r <= %r <= %r)" % (self.operand, nargs - ndefaults, nlocals, nargs)
1.52 self.exception = self._MakeObject(2, self.type_error_instance)