1.1 --- a/micropython/ast.py Sun Mar 09 02:10:12 2008 +0100
1.2 +++ b/micropython/ast.py Sun Mar 09 02:46:57 2008 +0100
1.3 @@ -181,7 +181,7 @@
1.4 target_name = target.full_name()
1.5 table_entry = self.objtable.table[target_name]
1.6 pos = table_entry[attrname]
1.7 - self.replace_op(AttrInstruction(pos + target.location))
1.8 + self.replace_op(AttrInstruction(pos))
1.9
1.10 # Where the last operation involves the special 'self' name, check to
1.11 # see if the attribute is acceptably positioned.
1.12 @@ -324,7 +324,7 @@
1.13 self.new_op(LoadContext())
1.14 self.new_op(CheckContext())
1.15 self.new_op(JumpIfTrue(continue_label))
1.16 - self.new_op(LoadConst("TypeError")) # NOTE: Do this properly!
1.17 + self.new_op(LoadConst(Const("TypeError"))) # NOTE: Do this properly!
1.18 self.new_op(RaiseException())
1.19 self.set_label(continue_label)
1.20
1.21 @@ -503,7 +503,7 @@
1.22 # Only store the name when visiting this node from outside.
1.23
1.24 if self.unit is not node.unit:
1.25 - self.new_op(LoadConst(Const(node.unit)))
1.26 + self.new_op(LoadConst(node.unit))
1.27 self._visitName(node, (StoreName, StoreAttr))
1.28
1.29 # Visiting of the code occurs when get_code is invoked on this node.