[pypy-commit] pypy HopArg: fix r_os_stat, maybe (is this even tested?)
rlamy
noreply at buildbot.pypy.org
Wed May 14 21:05:12 CEST 2014
Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: HopArg
Changeset: r71513:d1c416a40298
Date: 2014-05-14 20:04 +0100
http://bitbucket.org/pypy/pypy/changeset/d1c416a40298/
Log: fix r_os_stat, maybe (is this even tested?)
diff --git a/rpython/rtyper/module/r_os_stat.py b/rpython/rtyper/module/r_os_stat.py
--- a/rpython/rtyper/module/r_os_stat.py
+++ b/rpython/rtyper/module/r_os_stat.py
@@ -14,6 +14,7 @@
from rpython.rtyper.rmodel import Repr
from rpython.rtyper.rint import IntegerRepr
from rpython.rtyper.error import TyperError
+from rpython.rtyper.rtyper import HopArg
from rpython.rtyper.module import ll_os_stat
@@ -34,12 +35,12 @@
def redispatch_getfield(self, hop, index):
rtyper = self.rtyper
- s_index = rtyper.annotator.bookkeeper.immutablevalue(index)
hop2 = hop.copy()
hop2.forced_opname = 'getitem'
- hop2.args_v = [hop2.args_v[0], Constant(index)]
- hop2.args_s = [self.s_tuple, s_index]
- hop2.args_r = [self.r_tuple, rtyper.getrepr(s_index)]
+ s_index = rtyper.annotator.bookkeeper.immutablevalue(index)
+ h_index = HopArg(Constant(index), s_index, rtyper.getrepr(s_index))
+ h_tuple = HopArg(hop2.args[0].v, self.s_tuple, self.r_tuple)
+ hop2.args = [h_tuple, h_index]
return hop2.dispatch()
def rtype_getattr(self, hop):
More information about the pypy-commit
mailing list