[pypy-svn] r66392 - pypy/branch/parser-compiler/pypy/interpreter/astcompiler
benjamin at codespeak.net
benjamin at codespeak.net
Sat Jul 18 22:07:00 CEST 2009
Author: benjamin
Date: Sat Jul 18 22:06:59 2009
New Revision: 66392
Modified:
pypy/branch/parser-compiler/pypy/interpreter/astcompiler/codegen.py
Log:
help the annotator in optimize_method_call
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 Sat Jul 18 22:06:59 2009
@@ -876,8 +876,10 @@
not self._call_has_simple_args(call) or \
not isinstance(call.func, ast.Attribute):
return False
- call.func.value.walkabout(self)
- self.emit_op_name(ops.LOOKUP_METHOD, self.names, call.func.attr)
+ attr_lookup = call.func
+ assert isinstance(attr_lookup, ast.Attribute)
+ attr_lookup.value.walkabout(self)
+ self.emit_op_name(ops.LOOKUP_METHOD, self.names, attr_lookup.attr)
if call.args:
self.visit_sequence(call.args)
arg_count = len(call.args)
More information about the Pypy-commit
mailing list