1.1 --- a/rsvp.py Mon Aug 25 02:04:10 2008 +0200
1.2 +++ b/rsvp.py Wed Aug 27 00:43:33 2008 +0200
1.3 @@ -253,8 +253,8 @@
1.4 context, ref = self.value
1.5 classcode, attrcode, codeaddr, codedetails = self.load(ref)
1.6 element = self.objtable[classcode + self.operand]
1.7 - found_code, class_attr, replace_context, offset = element
1.8 - if found_code == classcode:
1.9 + attr_index, class_attr, replace_context, offset = element
1.10 + if attr_index == self.operand:
1.11 if class_attr:
1.12 loaded_context, loaded_ref = self.load(offset) # offset is address of class attribute
1.13 if replace_context:
1.14 @@ -271,8 +271,8 @@
1.15 context, ref = self.value
1.16 classcode, attrcode, codeaddr, codedetails = self.load(ref)
1.17 element = self.objtable[classcode + self.operand]
1.18 - found_code, class_attr, replace_context, offset = element
1.19 - if found_code == classcode:
1.20 + attr_index, class_attr, replace_context, offset = element
1.21 + if attr_index == self.operand:
1.22 if class_attr:
1.23 # NOTE: This should cause an attribute or type error.
1.24 # Class attributes cannot be changed at run-time.
1.25 @@ -302,8 +302,8 @@
1.26 frame = self.invocation_sp_stack[-1] # different from the current frame after MakeFrame
1.27 classcode, attrcode, codeaddr, codedetails = self.load(ref)
1.28 element = self.objtable[classcode + self.operand]
1.29 - found_code, offset = element
1.30 - if found_code == classcode:
1.31 + attr_index, offset = element
1.32 + if attr_index == self.operand:
1.33 self.frame_stack[frame + offset] = self.value
1.34 else:
1.35 # NOTE: This should cause an argument error.
1.36 @@ -349,11 +349,17 @@
1.37 def CheckSelf(self):
1.38 context, ref = self.value
1.39 target_context, target_ref = self.source
1.40 +
1.41 + # Load the details of the proposed context and the target's context.
1.42 +
1.43 classcode, attrcode, codeaddr, codedetails = self.load(ref)
1.44 target_classcode, target_attrcode, target_codeaddr, target_codedetails = self.load(target_context)
1.45 +
1.46 + # Find the table entry for the descendant.
1.47 +
1.48 element = self.objtable[target_classcode + attrcode]
1.49 - found_code, class_attr, replace_context, offset = element
1.50 - if found_code == target_classcode:
1.51 + attr_index, class_attr, replace_context, offset = element
1.52 + if attr_index == attrcode:
1.53 self.status = 1
1.54 else:
1.55 self.status = 0