1.1 --- a/rsvp.py Fri May 29 00:18:40 2009 +0200
1.2 +++ b/rsvp.py Sat May 30 20:27:20 2009 +0200
1.3 @@ -395,7 +395,7 @@
1.4
1.5 def StoreName(self):
1.6 frame = self.local_sp_stack[-1]
1.7 - self.frame_stack[frame + self.operand] = self.source
1.8 + self.frame_stack[frame + self.operand] = self.source # uses the source value
1.9
1.10 LoadTemp = LoadName
1.11
1.12 @@ -511,9 +511,6 @@
1.13 frame = self.invocation_sp_stack.pop()
1.14 self.frame_stack = self.frame_stack[:frame] # reset stack before call
1.15
1.16 - def RecoverFrame(self):
1.17 - self.invocation_sp_stack[-1] = self.local_sp_stack.pop()
1.18 -
1.19 def StoreFrame(self):
1.20 frame = self.invocation_sp_stack[-1] # different from the current frame after MakeFrame
1.21 self.frame_stack[frame + self.operand] = self.value
1.22 @@ -607,6 +604,10 @@
1.23
1.24 self.status = self._CheckInstance(ref, target_context)
1.25
1.26 + def JumpInFrame(self):
1.27 + codeaddr = self.callable
1.28 + return self.jump(codeaddr, self.pc + 1) # return to the instruction after this one
1.29 +
1.30 def JumpWithFrame(self):
1.31 codeaddr = self.callable
1.32 self.local_sp_stack.append(self.invocation_sp_stack[-1]) # adopt the invocation frame
1.33 @@ -714,10 +715,9 @@
1.34 return addr
1.35
1.36 def _LoadAddressContextCond(self, context, ref, inst_ref):
1.37 -
1.38 # Check the instance context against the target's context.
1.39 -
1.40 - if self._CheckInstance(inst_ref, context):
1.41 + # This provides the context overriding for methods.
1.42 + if context is not None and self._CheckInstance(inst_ref, context):
1.43 # Replace the context with the instance.
1.44 return inst_ref, ref
1.45 else: