1.1 --- a/rsvp.py Sun Nov 22 21:21:41 2009 +0100
1.2 +++ b/rsvp.py Sun Nov 22 22:53:24 2009 +0100
1.3 @@ -97,6 +97,7 @@
1.4 self.pc = pc or 0
1.5 self.debug = debug
1.6 self.abort_upon_exception = abort_upon_exception
1.7 + self.counter = 0
1.8
1.9 # Stacks.
1.10
1.11 @@ -336,6 +337,7 @@
1.12
1.13 "Perform the 'instruction', returning the next PC value or None."
1.14
1.15 + self.counter += 1
1.16 self.operand = instruction.get_operand()
1.17 method = self.get_method(instruction)
1.18 return method()
1.19 @@ -651,13 +653,14 @@
1.20
1.21 self.value = DataValue(ref, ref)
1.22
1.23 - def CheckSelf(self):
1.24 + def CheckInstance(self):
1.25 value = self.value
1.26 - context_value = self.source
1.27 + target_value = self.source
1.28
1.29 - # Check the details of the proposed context and the target's context.
1.30 + # For the 'self' parameter in an invoked function, the proposed context
1.31 + # ('self') is checked against the target's context.
1.32
1.33 - self.status = self._CheckInstance(value.ref, context_value.ref)
1.34 + self.status = self._CheckInstance(value.ref, target_value.ref)
1.35
1.36 def JumpInFrame(self):
1.37 codeaddr = self.callable