[pypy-svn] r66446 - pypy/branch/parser-compiler/pypy/interpreter/astcompiler
benjamin at codespeak.net
benjamin at codespeak.net
Mon Jul 20 18:14:39 CEST 2009
Author: benjamin
Date: Mon Jul 20 18:14:38 2009
New Revision: 66446
Modified:
pypy/branch/parser-compiler/pypy/interpreter/astcompiler/codegen.py
Log:
revert unintended change
Modified: pypy/branch/parser-compiler/pypy/interpreter/astcompiler/codegen.py
==============================================================================
--- pypy/branch/parser-compiler/pypy/interpreter/astcompiler/codegen.py (original)
+++ pypy/branch/parser-compiler/pypy/interpreter/astcompiler/codegen.py Mon Jul 20 18:14:38 2009
@@ -1007,20 +1007,19 @@
def visit_Attribute(self, attr):
self.update_position(attr.lineno)
names = self.names
- ctx = attr.ctx
- if ctx != ast.AugStore:
+ if attr.ctx != ast.AugStore:
attr.value.walkabout(self)
- if ctx == ast.AugLoad:
+ if attr.ctx == ast.AugLoad:
self.emit_op(ops.DUP_TOP)
self.emit_op_name(ops.LOAD_ATTR, names, attr.attr)
- elif ctx == ast.Load:
+ elif attr.ctx == ast.Load:
self.emit_op_name(ops.LOAD_ATTR, names, attr.attr)
- elif ctx == ast.AugStore:
+ elif attr.ctx == ast.AugStore:
self.emit_op(ops.ROT_TWO)
self.emit_op_name(ops.STORE_ATTR, names, attr.attr)
- elif ctx == ast.Store:
+ elif attr.ctx == ast.Store:
self.emit_op_name(ops.STORE_ATTR, names, attr.attr)
- elif ctx == ast.Del:
+ elif attr.ctx == ast.Del:
self.emit_op_name(ops.DELETE_ATTR, names, attr.attr)
else:
raise AssertionError("unknown context")
More information about the Pypy-commit
mailing list