[pypy-commit] pypy less-stringly-ops: avoid direct modification of opname

rlamy noreply at buildbot.pypy.org
Wed Nov 27 18:17:14 CET 2013


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: less-stringly-ops
Changeset: r68333:ecad647dab5d
Date: 2013-11-27 14:35 +0000
http://bitbucket.org/pypy/pypy/changeset/ecad647dab5d/

Log:	avoid direct modification of opname

diff --git a/rpython/rtyper/rclass.py b/rpython/rtyper/rclass.py
--- a/rpython/rtyper/rclass.py
+++ b/rpython/rtyper/rclass.py
@@ -1,6 +1,7 @@
 import types
 
 from rpython.flowspace.model import Constant
+from rpython.flowspace.operation import op
 from rpython.annotator import description, model as annmodel
 from rpython.rtyper.error import TyperError
 from rpython.rtyper.lltypesystem.lltype import Void
@@ -401,7 +402,8 @@
         r_method = self.rtyper.getrepr(s_attr)
         r_method.get_method_from_instance(self, vinst, hop.llops)
         hop2 = hop.copy()
-        hop2.spaceop.opname = 'simple_call'
+        hop2.spaceop = op.simple_call(hop.spaceop.args[0])
+        hop2.spaceop.result = hop.spaceop.result
         hop2.args_r = [r_method]
         hop2.args_s = [s_attr]
         return hop2.dispatch()


More information about the pypy-commit mailing list