[pypy-commit] pypy result-in-resops: pass few more tests
fijal
noreply at buildbot.pypy.org
Mon Oct 22 16:49:59 CEST 2012
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: result-in-resops
Changeset: r58363:f87ec8cadc4f
Date: 2012-10-22 16:45 +0200
http://bitbucket.org/pypy/pypy/changeset/f87ec8cadc4f/
Log: pass few more tests
diff --git a/pypy/jit/backend/llgraph/runner.py b/pypy/jit/backend/llgraph/runner.py
--- a/pypy/jit/backend/llgraph/runner.py
+++ b/pypy/jit/backend/llgraph/runner.py
@@ -47,8 +47,8 @@
map(mapping, op.getarglist()),
mapping(op.result),
newdescr)
- if op.get_failargs() is not None:
- newop.setfailargs(map(mapping, op.get_failargs()))
+ if op.getfailargs() is not None:
+ newop.setfailargs(map(mapping, op.getfailargs()))
self.operations.append(newop)
class WeakrefDescr(AbstractDescr):
@@ -674,7 +674,7 @@
i = 0
self.lltrace = gf.descr._llgraph_bridge
newargs = [self.env[arg] for arg in
- self.current_op.get_failargs() if arg is not None]
+ self.current_op.getfailargs() if arg is not None]
self.do_renaming(self.lltrace.inputargs, newargs)
continue
raise
@@ -697,7 +697,7 @@
if op is None:
op = self.current_op
r = []
- for arg in op.get_failargs():
+ for arg in op.getfailargs():
if arg is None:
r.append(None)
elif arg is skip:
@@ -719,7 +719,7 @@
raise GuardFailed(self._getfailargs(), descr)
def execute_finish(self, descr, arg=None):
- if self.current_op.get_failargs() is not None:
+ if self.current_op.getfailargs() is not None:
failargs = self._getfailargs()
else:
failargs = None # compatibility
diff --git a/pypy/jit/metainterp/blackhole.py b/pypy/jit/metainterp/blackhole.py
--- a/pypy/jit/metainterp/blackhole.py
+++ b/pypy/jit/metainterp/blackhole.py
@@ -1137,11 +1137,11 @@
bhimpl_getarrayitem_gc_r_pure = bhimpl_getarrayitem_gc_r
bhimpl_getarrayitem_gc_f_pure = bhimpl_getarrayitem_gc_f
- @arguments("cpu", "i", "d", "i", returns="i")
- def bhimpl_getarrayitem_raw_i(cpu, array, arraydescr, index):
+ @arguments("cpu", "i", "i", "d", returns="i")
+ def bhimpl_getarrayitem_raw_i(cpu, array, index, arraydescr):
return cpu.bh_getarrayitem_raw_i(array, index, arraydescr)
- @arguments("cpu", "i", "d", "i", returns="f")
- def bhimpl_getarrayitem_raw_f(cpu, array, arraydescr, index):
+ @arguments("cpu", "i", "i", "d", returns="f")
+ def bhimpl_getarrayitem_raw_f(cpu, array, index, arraydescr):
return cpu.bh_getarrayitem_raw_f(array, index, arraydescr)
bhimpl_getarrayitem_raw_i_pure = bhimpl_getarrayitem_raw_i
diff --git a/pypy/jit/metainterp/executor.py b/pypy/jit/metainterp/executor.py
--- a/pypy/jit/metainterp/executor.py
+++ b/pypy/jit/metainterp/executor.py
@@ -319,16 +319,11 @@
if func is not None:
execute[value] = func
continue
-<<<<<<< local
- if value in (rop.FORCE_TOKEN,
+ if value in (rop.JIT_FRAME,
rop.CALL_ASSEMBLER_i,
rop.CALL_ASSEMBLER_r,
rop.CALL_ASSEMBLER_f,
rop.CALL_ASSEMBLER_N,
-=======
- if value in (rop.JIT_FRAME,
- rop.CALL_ASSEMBLER,
->>>>>>> other
rop.COND_CALL_GC_WB,
rop.COND_CALL_GC_WB_ARRAY,
rop.DEBUG_MERGE_POINT,
diff --git a/pypy/jit/metainterp/optmodel.py b/pypy/jit/metainterp/optmodel.py
--- a/pypy/jit/metainterp/optmodel.py
+++ b/pypy/jit/metainterp/optmodel.py
@@ -12,8 +12,8 @@
def setter(self, value):
setattr(self, '_' + attr, value)
setattr(cls, '_' + attr, default_value)
- setattr(cls, 'get_' + attr, func_with_new_name(getter, 'get_' + attr))
- setattr(cls, 'set_' + attr, func_with_new_name(setter, 'set_' + attr))
+ setattr(cls, 'get' + attr, func_with_new_name(getter, 'get' + attr))
+ setattr(cls, 'set' + attr, func_with_new_name(setter, 'set' + attr))
for i, cls in enumerate(opclasses):
if cls is None:
@@ -23,6 +23,8 @@
is_mutable = True
if cls.is_guard() or cls.getopnum() == rop.FINISH:
addattr(Mutable, 'failargs')
+ if cls.is_guard():
+ addattr(Mutable, 'descr') # mutable guards have descrs
Mutable.__name__ = cls.__name__ + '_mutable'
assert len(opclasses_mutable) == i
opclasses_mutable.append(Mutable)
diff --git a/pypy/jit/tool/oparser.py b/pypy/jit/tool/oparser.py
--- a/pypy/jit/tool/oparser.py
+++ b/pypy/jit/tool/oparser.py
@@ -246,7 +246,7 @@
i = line.find('[', endnum) + 1
j = line.find(']', i)
if i <= 0 or j <= 0:
- if self.guards_with_failargs:
+ if self.guards_with_failargs and opnum != rop.FINISH:
raise ParseError("missing fail_args for guard operation")
fail_args = None
else:
@@ -301,14 +301,14 @@
opres = self.create_op(opnum, result, args, descr)
self.vars[res] = opres
if fail_args is not None:
- opres.set_failargs(fail_args)
+ opres.setfailargs(fail_args)
return opres
def parse_op_no_result(self, line):
opnum, args, descr, fail_args = self.parse_op(line)
res = self.create_op(opnum, None, args, descr)
if fail_args is not None:
- res.set_failargs(fail_args)
+ res.setfailargs(fail_args)
return res
def parse_next_op(self, line, num):
More information about the pypy-commit
mailing list